diff --git a/CCD_Cloud_Sync.ffs_batch b/CCD_Cloud_Sync.ffs_batch index 97d64e45..691f1fc2 100644 --- a/CCD_Cloud_Sync.ffs_batch +++ b/CCD_Cloud_Sync.ffs_batch @@ -3,7 +3,7 @@ Content - Exclude + Direct diff --git a/CCD_Sync.ffs_batch b/CCD_Sync.ffs_batch index 6bde7dff..fb50fbd7 100644 --- a/CCD_Sync.ffs_batch +++ b/CCD_Sync.ffs_batch @@ -20,6 +20,7 @@ \$Recycle.Bin\ \RECYCLE?\ *\thumbs.db + *\.git 0 0 diff --git a/图像/火球.rar b/图像/火球.rar new file mode 100644 index 00000000..25854076 Binary files /dev/null and b/图像/火球.rar differ diff --git a/图像/火球2/1_0.png b/图像/火球2/1_0.png new file mode 100644 index 00000000..ca93c04a Binary files /dev/null and b/图像/火球2/1_0.png differ diff --git a/图像/火球2/1_1.png b/图像/火球2/1_1.png new file mode 100644 index 00000000..f0d3924b Binary files /dev/null and b/图像/火球2/1_1.png differ diff --git a/图像/火球2/1_10.png b/图像/火球2/1_10.png new file mode 100644 index 00000000..edba80b7 Binary files /dev/null and b/图像/火球2/1_10.png differ diff --git a/图像/火球2/1_11.png b/图像/火球2/1_11.png new file mode 100644 index 00000000..fbdd821c Binary files /dev/null and b/图像/火球2/1_11.png differ diff --git a/图像/火球2/1_12.png b/图像/火球2/1_12.png new file mode 100644 index 00000000..e5e4080e Binary files /dev/null and b/图像/火球2/1_12.png differ diff --git a/图像/火球2/1_13.png b/图像/火球2/1_13.png new file mode 100644 index 00000000..fe9dd0a1 Binary files /dev/null and b/图像/火球2/1_13.png differ diff --git a/图像/火球2/1_14.png b/图像/火球2/1_14.png new file mode 100644 index 00000000..48275bf8 Binary files /dev/null and b/图像/火球2/1_14.png differ diff --git a/图像/火球2/1_15.png b/图像/火球2/1_15.png new file mode 100644 index 00000000..bef646d5 Binary files /dev/null and b/图像/火球2/1_15.png differ diff --git a/图像/火球2/1_16.png b/图像/火球2/1_16.png new file mode 100644 index 00000000..4f379129 Binary files /dev/null and b/图像/火球2/1_16.png differ diff --git a/图像/火球2/1_17.png b/图像/火球2/1_17.png new file mode 100644 index 00000000..0e1813f1 Binary files /dev/null and b/图像/火球2/1_17.png differ diff --git a/图像/火球2/1_18.png b/图像/火球2/1_18.png new file mode 100644 index 00000000..441671d0 Binary files /dev/null and b/图像/火球2/1_18.png differ diff --git a/图像/火球2/1_19.png b/图像/火球2/1_19.png new file mode 100644 index 00000000..1bce9075 Binary files /dev/null and b/图像/火球2/1_19.png differ diff --git a/图像/火球2/1_2.png b/图像/火球2/1_2.png new file mode 100644 index 00000000..38d6a637 Binary files /dev/null and b/图像/火球2/1_2.png differ diff --git a/图像/火球2/1_20.png b/图像/火球2/1_20.png new file mode 100644 index 00000000..b8dd9b0a Binary files /dev/null and b/图像/火球2/1_20.png differ diff --git a/图像/火球2/1_21.png b/图像/火球2/1_21.png new file mode 100644 index 00000000..26bfd0ae Binary files /dev/null and b/图像/火球2/1_21.png differ diff --git a/图像/火球2/1_22.png b/图像/火球2/1_22.png new file mode 100644 index 00000000..b56c7e2b Binary files /dev/null and b/图像/火球2/1_22.png differ diff --git a/图像/火球2/1_23.png b/图像/火球2/1_23.png new file mode 100644 index 00000000..fdc03997 Binary files /dev/null and b/图像/火球2/1_23.png differ diff --git a/图像/火球2/1_24.png b/图像/火球2/1_24.png new file mode 100644 index 00000000..3dbf4b0f Binary files /dev/null and b/图像/火球2/1_24.png differ diff --git a/图像/火球2/1_25.png b/图像/火球2/1_25.png new file mode 100644 index 00000000..979e94f7 Binary files /dev/null and b/图像/火球2/1_25.png differ diff --git a/图像/火球2/1_26.png b/图像/火球2/1_26.png new file mode 100644 index 00000000..c461b0ff Binary files /dev/null and b/图像/火球2/1_26.png differ diff --git a/图像/火球2/1_27.png b/图像/火球2/1_27.png new file mode 100644 index 00000000..a11ac60c Binary files /dev/null and b/图像/火球2/1_27.png differ diff --git a/图像/火球2/1_28.png b/图像/火球2/1_28.png new file mode 100644 index 00000000..625a7105 Binary files /dev/null and b/图像/火球2/1_28.png differ diff --git a/图像/火球2/1_29.png b/图像/火球2/1_29.png new file mode 100644 index 00000000..60fb7d47 Binary files /dev/null and b/图像/火球2/1_29.png differ diff --git a/图像/火球2/1_3.png b/图像/火球2/1_3.png new file mode 100644 index 00000000..b89bccdd Binary files /dev/null and b/图像/火球2/1_3.png differ diff --git a/图像/火球2/1_30.png b/图像/火球2/1_30.png new file mode 100644 index 00000000..e136f259 Binary files /dev/null and b/图像/火球2/1_30.png differ diff --git a/图像/火球2/1_31.png b/图像/火球2/1_31.png new file mode 100644 index 00000000..d8b3f6ac Binary files /dev/null and b/图像/火球2/1_31.png differ diff --git a/图像/火球2/1_32.png b/图像/火球2/1_32.png new file mode 100644 index 00000000..44fcc523 Binary files /dev/null and b/图像/火球2/1_32.png differ diff --git a/图像/火球2/1_33.png b/图像/火球2/1_33.png new file mode 100644 index 00000000..4120f3f2 Binary files /dev/null and b/图像/火球2/1_33.png differ diff --git a/图像/火球2/1_34.png b/图像/火球2/1_34.png new file mode 100644 index 00000000..87b9d3be Binary files /dev/null and b/图像/火球2/1_34.png differ diff --git a/图像/火球2/1_35.png b/图像/火球2/1_35.png new file mode 100644 index 00000000..87623177 Binary files /dev/null and b/图像/火球2/1_35.png differ diff --git a/图像/火球2/1_36.png b/图像/火球2/1_36.png new file mode 100644 index 00000000..d9174efc Binary files /dev/null and b/图像/火球2/1_36.png differ diff --git a/图像/火球2/1_37.png b/图像/火球2/1_37.png new file mode 100644 index 00000000..e3e56f5a Binary files /dev/null and b/图像/火球2/1_37.png differ diff --git a/图像/火球2/1_38.png b/图像/火球2/1_38.png new file mode 100644 index 00000000..b9d98e35 Binary files /dev/null and b/图像/火球2/1_38.png differ diff --git a/图像/火球2/1_39.png b/图像/火球2/1_39.png new file mode 100644 index 00000000..23427a29 Binary files /dev/null and b/图像/火球2/1_39.png differ diff --git a/图像/火球2/1_4.png b/图像/火球2/1_4.png new file mode 100644 index 00000000..ef5c770d Binary files /dev/null and b/图像/火球2/1_4.png differ diff --git a/图像/火球2/1_40.png b/图像/火球2/1_40.png new file mode 100644 index 00000000..3add31c9 Binary files /dev/null and b/图像/火球2/1_40.png differ diff --git a/图像/火球2/1_41.png b/图像/火球2/1_41.png new file mode 100644 index 00000000..26d45128 Binary files /dev/null and b/图像/火球2/1_41.png differ diff --git a/图像/火球2/1_42.png b/图像/火球2/1_42.png new file mode 100644 index 00000000..b57dce05 Binary files /dev/null and b/图像/火球2/1_42.png differ diff --git a/图像/火球2/1_43.png b/图像/火球2/1_43.png new file mode 100644 index 00000000..90a8cc18 Binary files /dev/null and b/图像/火球2/1_43.png differ diff --git a/图像/火球2/1_44.png b/图像/火球2/1_44.png new file mode 100644 index 00000000..3dc94db6 Binary files /dev/null and b/图像/火球2/1_44.png differ diff --git a/图像/火球2/1_45.png b/图像/火球2/1_45.png new file mode 100644 index 00000000..a7757243 Binary files /dev/null and b/图像/火球2/1_45.png differ diff --git a/图像/火球2/1_46.png b/图像/火球2/1_46.png new file mode 100644 index 00000000..7f37d154 Binary files /dev/null and b/图像/火球2/1_46.png differ diff --git a/图像/火球2/1_47.png b/图像/火球2/1_47.png new file mode 100644 index 00000000..7bd780d9 Binary files /dev/null and b/图像/火球2/1_47.png differ diff --git a/图像/火球2/1_48.png b/图像/火球2/1_48.png new file mode 100644 index 00000000..57ef0411 Binary files /dev/null and b/图像/火球2/1_48.png differ diff --git a/图像/火球2/1_49.png b/图像/火球2/1_49.png new file mode 100644 index 00000000..34711f1a Binary files /dev/null and b/图像/火球2/1_49.png differ diff --git a/图像/火球2/1_5.png b/图像/火球2/1_5.png new file mode 100644 index 00000000..003ee9f0 Binary files /dev/null and b/图像/火球2/1_5.png differ diff --git a/图像/火球2/1_50.png b/图像/火球2/1_50.png new file mode 100644 index 00000000..192a84e6 Binary files /dev/null and b/图像/火球2/1_50.png differ diff --git a/图像/火球2/1_51.png b/图像/火球2/1_51.png new file mode 100644 index 00000000..375d2832 Binary files /dev/null and b/图像/火球2/1_51.png differ diff --git a/图像/火球2/1_52.png b/图像/火球2/1_52.png new file mode 100644 index 00000000..d6d32f13 Binary files /dev/null and b/图像/火球2/1_52.png differ diff --git a/图像/火球2/1_53.png b/图像/火球2/1_53.png new file mode 100644 index 00000000..ca59551a Binary files /dev/null and b/图像/火球2/1_53.png differ diff --git a/图像/火球2/1_54.png b/图像/火球2/1_54.png new file mode 100644 index 00000000..eee8c074 Binary files /dev/null and b/图像/火球2/1_54.png differ diff --git a/图像/火球2/1_55.png b/图像/火球2/1_55.png new file mode 100644 index 00000000..c32048ed Binary files /dev/null and b/图像/火球2/1_55.png differ diff --git a/图像/火球2/1_56.png b/图像/火球2/1_56.png new file mode 100644 index 00000000..6d0a17e3 Binary files /dev/null and b/图像/火球2/1_56.png differ diff --git a/图像/火球2/1_57.png b/图像/火球2/1_57.png new file mode 100644 index 00000000..70b5bb73 Binary files /dev/null and b/图像/火球2/1_57.png differ diff --git a/图像/火球2/1_58.png b/图像/火球2/1_58.png new file mode 100644 index 00000000..6926ba27 Binary files /dev/null and b/图像/火球2/1_58.png differ diff --git a/图像/火球2/1_59.png b/图像/火球2/1_59.png new file mode 100644 index 00000000..7737447c Binary files /dev/null and b/图像/火球2/1_59.png differ diff --git a/图像/火球2/1_6.png b/图像/火球2/1_6.png new file mode 100644 index 00000000..3d9da5ed Binary files /dev/null and b/图像/火球2/1_6.png differ diff --git a/图像/火球2/1_60.png b/图像/火球2/1_60.png new file mode 100644 index 00000000..477f6065 Binary files /dev/null and b/图像/火球2/1_60.png differ diff --git a/图像/火球2/1_7.png b/图像/火球2/1_7.png new file mode 100644 index 00000000..83280737 Binary files /dev/null and b/图像/火球2/1_7.png differ diff --git a/图像/火球2/1_8.png b/图像/火球2/1_8.png new file mode 100644 index 00000000..b970c6fb Binary files /dev/null and b/图像/火球2/1_8.png differ diff --git a/图像/火球2/1_9.png b/图像/火球2/1_9.png new file mode 100644 index 00000000..0af08529 Binary files /dev/null and b/图像/火球2/1_9.png differ diff --git a/声音/音乐委托/Boss战斗/Civilization of Magic (死なばもろとも ).mid b/声音/音乐委托/Boss战斗/Civilization of Magic (死なばもろとも ).mid new file mode 100644 index 00000000..11dfe52a Binary files /dev/null and b/声音/音乐委托/Boss战斗/Civilization of Magic (死なばもろとも ).mid differ diff --git a/声音/音乐委托/Boss战斗/Civilization of Magic() (死なばもろとも ).mid b/声音/音乐委托/Boss战斗/Civilization of Magic() (死なばもろとも ).mid new file mode 100644 index 00000000..081bf79c Binary files /dev/null and b/声音/音乐委托/Boss战斗/Civilization of Magic() (死なばもろとも ).mid differ diff --git a/声音/音乐委托/Boss战斗/Civilization_of_Magic_-_Touhou_1_Sariels_2nd_Theme_Piano.mid b/声音/音乐委托/Boss战斗/Civilization_of_Magic_-_Touhou_1_Sariels_2nd_Theme_Piano.mid new file mode 100644 index 00000000..d97e08c8 Binary files /dev/null and b/声音/音乐委托/Boss战斗/Civilization_of_Magic_-_Touhou_1_Sariels_2nd_Theme_Piano.mid differ diff --git a/声音/音乐委托/Boss战斗/Ex关卡场景设计 - 页面提取自-东方秘闻章全手稿.pdf b/声音/音乐委托/Boss战斗/Ex关卡场景设计 - 页面提取自-东方秘闻章全手稿.pdf new file mode 100644 index 00000000..7f38c231 Binary files /dev/null and b/声音/音乐委托/Boss战斗/Ex关卡场景设计 - 页面提取自-东方秘闻章全手稿.pdf differ diff --git a/声音/音乐委托/Boss战斗/社团 荷城空间 向 “千叶明里” 发出《东方秘闻章》音乐制作 关底Boss战斗音乐 委托技术说明书.pdf b/声音/音乐委托/Boss战斗/社团 荷城空间 向 “千叶明里” 发出《东方秘闻章》音乐制作 关底Boss战斗音乐 委托技术说明书.pdf new file mode 100644 index 00000000..e8ebd10f Binary files /dev/null and b/声音/音乐委托/Boss战斗/社团 荷城空间 向 “千叶明里” 发出《东方秘闻章》音乐制作 关底Boss战斗音乐 委托技术说明书.pdf differ diff --git a/声音/音乐委托/Staff/ProjectStaff_SampleOne.wav b/声音/音乐委托/Staff/ProjectStaff_SampleOne.wav new file mode 100644 index 00000000..c7930894 Binary files /dev/null and b/声音/音乐委托/Staff/ProjectStaff_SampleOne.wav differ diff --git a/声音/音乐委托/道中/17. The Grimoire of Alice (Piano Only).mid b/声音/音乐委托/道中/17. The Grimoire of Alice (Piano Only).mid new file mode 100644 index 00000000..ba2737df Binary files /dev/null and b/声音/音乐委托/道中/17. The Grimoire of Alice (Piano Only).mid differ diff --git a/声音/音乐委托/道中/17. The Grimoire of Alice (Ruukasu2005).mid b/声音/音乐委托/道中/17. The Grimoire of Alice (Ruukasu2005).mid new file mode 100644 index 00000000..61a2a51d Binary files /dev/null and b/声音/音乐委托/道中/17. The Grimoire of Alice (Ruukasu2005).mid differ diff --git a/声音/音乐委托/道中/Ex关卡场景设计 - 页面提取自-东方秘闻章全手稿.pdf b/声音/音乐委托/道中/Ex关卡场景设计 - 页面提取自-东方秘闻章全手稿.pdf new file mode 100644 index 00000000..7f38c231 Binary files /dev/null and b/声音/音乐委托/道中/Ex关卡场景设计 - 页面提取自-东方秘闻章全手稿.pdf differ diff --git a/声音/音乐委托/道中/社团 荷城空间 向 “千叶明里” 发出《东方秘闻章》音乐制作 道中背景音乐 委托技术说明书.pdf b/声音/音乐委托/道中/社团 荷城空间 向 “千叶明里” 发出《东方秘闻章》音乐制作 道中背景音乐 委托技术说明书.pdf new file mode 100644 index 00000000..4c15ebb8 Binary files /dev/null and b/声音/音乐委托/道中/社团 荷城空间 向 “千叶明里” 发出《东方秘闻章》音乐制作 道中背景音乐 委托技术说明书.pdf differ diff --git a/源代码/.cr/personal/Editor/Spell checker.xml b/源代码/.cr/personal/Editor/Spell checker.xml index b61e1ba3..c6b7944b 100644 --- a/源代码/.cr/personal/Editor/Spell checker.xml +++ b/源代码/.cr/personal/Editor/Spell checker.xml @@ -1,6 +1,6 @@  - XmlComments|Comments|Strings|VerbatimStrings|PublicIdentifiers|InternalIdentifiers|ProtectedInternalIdentifiers|ProtectedIdentifiers + XmlComments|Comments|Strings|VerbatimStrings|PublicIdentifiers|InternalIdentifiers|ProtectedInternalIdentifiers|ProtectedIdentifiers|PrivateIdentifiers|LocalIdentifiers \ No newline at end of file diff --git a/源代码/.vs/ProjectEvaluation/stgsharpdevelop.metadata.v7.bin b/源代码/.vs/ProjectEvaluation/stgsharpdevelop.metadata.v7.bin deleted file mode 100644 index 4133ea3d..00000000 Binary files a/源代码/.vs/ProjectEvaluation/stgsharpdevelop.metadata.v7.bin and /dev/null differ diff --git a/源代码/.vs/ProjectEvaluation/stgsharpdevelop.metadata.v9.bin b/源代码/.vs/ProjectEvaluation/stgsharpdevelop.metadata.v9.bin new file mode 100644 index 00000000..0fc97dd7 Binary files /dev/null and b/源代码/.vs/ProjectEvaluation/stgsharpdevelop.metadata.v9.bin differ diff --git a/源代码/.vs/ProjectEvaluation/stgsharpdevelop.projects.v7.bin b/源代码/.vs/ProjectEvaluation/stgsharpdevelop.projects.v7.bin deleted file mode 100644 index 084a95e9..00000000 Binary files a/源代码/.vs/ProjectEvaluation/stgsharpdevelop.projects.v7.bin and /dev/null differ diff --git a/源代码/.vs/ProjectEvaluation/stgsharpdevelop.projects.v9.bin b/源代码/.vs/ProjectEvaluation/stgsharpdevelop.projects.v9.bin new file mode 100644 index 00000000..2ed69df6 Binary files /dev/null and b/源代码/.vs/ProjectEvaluation/stgsharpdevelop.projects.v9.bin differ diff --git a/源代码/.vs/ProjectEvaluation/stgsharpdevelop.strings.v9.bin b/源代码/.vs/ProjectEvaluation/stgsharpdevelop.strings.v9.bin new file mode 100644 index 00000000..877a84e9 Binary files /dev/null and b/源代码/.vs/ProjectEvaluation/stgsharpdevelop.strings.v9.bin differ diff --git a/源代码/.vs/StgSharpDevelop/DesignTimeBuild/.dtbcache.v2 b/源代码/.vs/StgSharpDevelop/DesignTimeBuild/.dtbcache.v2 index 76e67ef3..6637dc86 100644 Binary files a/源代码/.vs/StgSharpDevelop/DesignTimeBuild/.dtbcache.v2 and b/源代码/.vs/StgSharpDevelop/DesignTimeBuild/.dtbcache.v2 differ diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/1aea0cbb-d5ee-47c1-8934-f1f94ad9585a.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/1aea0cbb-d5ee-47c1-8934-f1f94ad9585a.vsidx deleted file mode 100644 index 4576d418..00000000 Binary files a/源代码/.vs/StgSharpDevelop/FileContentIndex/1aea0cbb-d5ee-47c1-8934-f1f94ad9585a.vsidx and /dev/null differ diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/4ec47fdb-4638-4f5d-9651-04265086605f.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/4ec47fdb-4638-4f5d-9651-04265086605f.vsidx new file mode 100644 index 00000000..31e794e1 Binary files /dev/null and b/源代码/.vs/StgSharpDevelop/FileContentIndex/4ec47fdb-4638-4f5d-9651-04265086605f.vsidx differ diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/59531398-2038-4cc0-9e6f-931c8b643ae7.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/59531398-2038-4cc0-9e6f-931c8b643ae7.vsidx new file mode 100644 index 00000000..95cdda65 Binary files /dev/null and b/源代码/.vs/StgSharpDevelop/FileContentIndex/59531398-2038-4cc0-9e6f-931c8b643ae7.vsidx differ diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/5d14f360-08b2-47ca-93b1-d31ea78990e9.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/5d14f360-08b2-47ca-93b1-d31ea78990e9.vsidx deleted file mode 100644 index fde198f3..00000000 Binary files a/源代码/.vs/StgSharpDevelop/FileContentIndex/5d14f360-08b2-47ca-93b1-d31ea78990e9.vsidx and /dev/null differ diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/7988e311-92d1-41bd-9336-d4e73abfb043.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/7988e311-92d1-41bd-9336-d4e73abfb043.vsidx new file mode 100644 index 00000000..c8ca4454 Binary files /dev/null and b/源代码/.vs/StgSharpDevelop/FileContentIndex/7988e311-92d1-41bd-9336-d4e73abfb043.vsidx differ diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/7ae2020d-db73-4343-a3df-63ecc5d18e46.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/7ae2020d-db73-4343-a3df-63ecc5d18e46.vsidx deleted file mode 100644 index 82ecb3bd..00000000 Binary files a/源代码/.vs/StgSharpDevelop/FileContentIndex/7ae2020d-db73-4343-a3df-63ecc5d18e46.vsidx and /dev/null differ diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/952b2646-9ddf-4476-b4df-b66eadd87fc0.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/952b2646-9ddf-4476-b4df-b66eadd87fc0.vsidx new file mode 100644 index 00000000..4a0a2bb4 Binary files /dev/null and b/源代码/.vs/StgSharpDevelop/FileContentIndex/952b2646-9ddf-4476-b4df-b66eadd87fc0.vsidx differ diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/9fcb332b-c4bc-44b6-9fc5-b6186fb1a7eb.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/9fcb332b-c4bc-44b6-9fc5-b6186fb1a7eb.vsidx deleted file mode 100644 index 0b94f032..00000000 Binary files a/源代码/.vs/StgSharpDevelop/FileContentIndex/9fcb332b-c4bc-44b6-9fc5-b6186fb1a7eb.vsidx and /dev/null differ diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/ae0c6fb4-057c-4670-895a-8960a46c83b5.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/ae0c6fb4-057c-4670-895a-8960a46c83b5.vsidx new file mode 100644 index 00000000..db0bba91 Binary files /dev/null and b/源代码/.vs/StgSharpDevelop/FileContentIndex/ae0c6fb4-057c-4670-895a-8960a46c83b5.vsidx differ diff --git a/源代码/.vs/StgSharpDevelop/FileContentIndex/c165da7e-6b4a-4ca7-98c2-ab6c0c84eb21.vsidx b/源代码/.vs/StgSharpDevelop/FileContentIndex/c165da7e-6b4a-4ca7-98c2-ab6c0c84eb21.vsidx deleted file mode 100644 index 7c1f12c6..00000000 Binary files a/源代码/.vs/StgSharpDevelop/FileContentIndex/c165da7e-6b4a-4ca7-98c2-ab6c0c84eb21.vsidx and /dev/null differ diff --git a/源代码/.vs/StgSharpDevelop/v17/.futdcache.v2 b/源代码/.vs/StgSharpDevelop/v17/.futdcache.v2 index 63a9429b..7e6b77c1 100644 Binary files a/源代码/.vs/StgSharpDevelop/v17/.futdcache.v2 and b/源代码/.vs/StgSharpDevelop/v17/.futdcache.v2 differ diff --git a/源代码/.vs/StgSharpDevelop/v17/.suo b/源代码/.vs/StgSharpDevelop/v17/.suo index 22fd79bd..649c649c 100644 Binary files a/源代码/.vs/StgSharpDevelop/v17/.suo and b/源代码/.vs/StgSharpDevelop/v17/.suo differ diff --git a/源代码/.vs/StgSharpDevelop/v17/DocumentLayout.backup.json b/源代码/.vs/StgSharpDevelop/v17/DocumentLayout.backup.json new file mode 100644 index 00000000..a4bd49dc --- /dev/null +++ b/源代码/.vs/StgSharpDevelop/v17/DocumentLayout.backup.json @@ -0,0 +1,3980 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\cpuanimation\\imagehelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\cpuanimation\\imagehelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\image.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\image.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\cpuanimation\\imagehelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\cpuanimation\\imagehelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\autotexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\autotexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glfunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glfunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\image.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\image.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\cpuanimation\\iimageprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\cpuanimation\\iimageprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\viewmodelmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\viewmodelmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\renderstream\\partical.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\renderstream\\partical.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\texturegl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\texturegl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\triggerbutton.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\triggerbutton.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\buffer\\autotexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\buffer\\autotexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\collections\\bidirectionaldictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\collections\\bidirectionaldictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Youmu\\AppData\\Local\\SourceServer\\60546032f23b31a03685e30ef880f5c48e6df2d00a71d09e625da4e2a208bd88\\Dictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glresourcegenrator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glresourcegenrator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\texturepipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\texturepipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\view\\viewbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\view\\viewbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\view\\viewmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\view\\viewmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\stg\\collisiontexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\stg\\collisiontexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\view\\viewrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\view\\viewrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\blueprint\\sidenode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\blueprint\\sidenode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\battlefield.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\battlefield.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\blueprint\\blueprintactionnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\blueprint\\blueprintactionnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\blueprint\\blueprint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\blueprint\\blueprint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\timing\\timespanprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\timing\\timespanprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\markinglable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\markinglable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\renderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\renderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\viewmodel\\viewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\viewmodel\\viewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\environment\\timeprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\environment\\timeprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\controls\\markinglable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\controls\\markinglable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\timing\\timefunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\timing\\timefunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\geometries\\geometryoperation\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\geometries\\geometryoperation\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\timing\\timefunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\timing\\timefunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\geometryoperation\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\geometryoperation\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\viewmodel\\viewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\viewmodel\\viewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\blueprint\\blueprintrunner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\blueprint\\blueprintrunner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\collections\\sizefixedlist.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\collections\\sizefixedlist.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\collections\\ibidrirectionaldictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\collections\\ibidrirectionaldictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\globalsuppressions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\globalsuppressions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\bpnodebuilder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\bpnodebuilder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\texturepipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\texturepipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\blueprintrunner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\blueprintrunner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\counter.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\counter.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\collections\\sizefixedlist.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\collections\\sizefixedlist.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\timing\\timespanprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\timing\\timespanprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\timing\\timesourceprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\timing\\timesourceprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\cancellabletask.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\cancellabletask.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\blueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\blueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\blueprint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\blueprint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\pipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\pipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\routeswitch.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\routeswitch.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\sidenode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\sidenode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\iconvertabletoblueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\iconvertabletoblueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\bpnodeactionattribute.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\bpnodeactionattribute.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\blueprintactionnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\blueprintactionnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\data\\m128.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\data\\m128.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\environment\\globalsetting.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\environment\\globalsetting.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\environment\\globalsetting.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\environment\\globalsetting.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\stgsharpdebug.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\stgsharpdebug.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glresourcemanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glresourcemanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\buffer\\texturegl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\buffer\\texturegl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\stg\\collisiontexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\stg\\collisiontexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glapimanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glapimanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glexception.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glexception.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glapimanagerconst.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glapimanagerconst.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glresourcemanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glresourcemanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\vbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\vbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\glbufferobjectbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\glbufferobjectbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\vao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\vao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\rbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\rbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\fbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\fbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\ebo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\ebo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\define\\glenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\define\\glenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glapicalling.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glapicalling.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\view\\viewresponder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\view\\viewresponder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\view\\viewdesigner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\view\\viewdesigner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\shader\\controlitemrender.frag||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\controlitemrender.frag||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\shader\\controlitemrender.vert||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\controlitemrender.vert||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\stg\\touhou\\touhouwindow.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\stg\\touhou\\touhouwindow.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\shader\\fbo.frag||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\fbo.frag||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\shader\\fbo.vert||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\fbo.vert||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\shader\\main.frag||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\main.frag||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\data\\internaldata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\data\\internaldata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\openglcontrollingitemrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\openglcontrollingitemrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\geometries\\igeomtrybuffer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\geometries\\igeomtrybuffer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\openglcontrollingitemrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\openglcontrollingitemrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\stg\\touhou\\view\\openningview.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\stg\\touhou\\view\\openningview.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\stg\\touhou\\touhouwindow.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\stg\\touhou\\touhouwindow.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\internaldata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\internaldata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\shader\\particle.vert||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\particle.vert||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\c6a36f44105246e8389794d6b1ff0c946741477e6dd52e219c7f2f689247fedc\\src\\libraries\\System.Private.CoreLib\\src\\System\\Threading\\SemaphoreSlim.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\io\\glio.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\io\\glio.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\view\\newrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\view\\newrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\3fbd2d3f2a21976ceea22ce6d61d2bfc56abbb0356d59a09e7367042f1d26101\\src\\libraries\\System.Private.CoreLib\\src\\System\\Object.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\math\\graphic\\camera.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\math\\graphic\\camera.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glhandle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glhandle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\define\\bufferobjectbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\define\\bufferobjectbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\define\\structdefine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\define\\structdefine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\shader\\particle.frag||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\particle.frag||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\view\\design.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\view\\design.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\viewmodel\\showviewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\viewmodel\\showviewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\plaingeometrymesh.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\plaingeometrymesh.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\view\\control.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\view\\control.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\buttongroup.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\buttongroup.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\view\\viewrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\view\\viewrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\stgsharpdebug.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\stgsharpdebug.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\viewmodel\\viewmanage.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\viewmodel\\viewmanage.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\viewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\viewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\geometries\\plaingeometry\\rectangle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\geometries\\plaingeometry\\rectangle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\geometries\\plaingeometry\\define\\plaingeometry.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\geometries\\plaingeometry\\define\\plaingeometry.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\decorationbox.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\decorationbox.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\controllingintem.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\controllingintem.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\characterindeximage.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\characterindeximage.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\textureprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\textureprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\usractivity\\keytrigger.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\usractivity\\keytrigger.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\keycontrol.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\keycontrol.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\viewmodel\\databinding.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\viewmodel\\databinding.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\View.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Graphics\\View\\View.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\viewmodel\\showviewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\viewmodel\\showviewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\viewmodel\\viewmanage.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\viewmodel\\viewmanage.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\view\\viewdesigner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\view\\viewdesigner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\view\\viewbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\view\\viewbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\view\\viewresponder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\view\\viewresponder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\renderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\renderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\viewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\viewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\viewmodel\\databinding.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\viewmodel\\databinding.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\stgsharp.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\stgsharp.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\controls\\buttongroup.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\controls\\buttongroup.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\keyeventattribute.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\keyeventattribute.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\math\\linear\\vec3d.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\math\\linear\\vec3d.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glfunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glfunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\define\\glenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\define\\glenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\74ed84df48c00229a8da75e7d99c26a3409b78c17ddfc863196b29969f1b9863\\src\\libraries\\Common\\src\\System\\SR.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{20CBFF26-6746-402E-992C-7B643E9423EB}|StgSharpC\\StgSharpC.vcxproj|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\StgSharpC.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{20CBFF26-6746-402E-992C-7B643E9423EB}|StgSharpC\\StgSharpC.vcxproj|solutionrelative:StgSharpC\\StgSharpC.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glhandle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glhandle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\6c91e49c16b65a4a6086c168a4f34965ffdd867f9cb4d0d10207e862c24f2808\\src\\libraries\\System.Private.CoreLib\\src\\System\\Threading\\Tasks\\Task.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glapimanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glapimanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glapimanagerconst.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glapimanagerconst.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\pixels.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\pixels.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\math\\graphic\\camera.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\math\\graphic\\camera.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\buffer\\glbufferobjectbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\buffer\\glbufferobjectbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\shaderedit\\shaderstruct.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\shaderedit\\shaderstruct.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\shaderedit\\uniform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\shaderedit\\uniform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\shaderedit\\shader.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\shaderedit\\shader.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\buffer\\vbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\buffer\\vbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\define\\glconst.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\define\\glconst.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\buffer\\vao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\buffer\\vao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\buffer\\rbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\buffer\\rbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\buffer\\fbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\buffer\\fbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\define\\bufferobjectbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\define\\bufferobjectbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\buffer\\ebo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\buffer\\ebo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glresourcegenrator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glresourcegenrator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\io\\internalio.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\io\\internalio.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\triangle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\triangle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\polygon6.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\polygon6.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\polygon4.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\polygon4.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\polygon5.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\polygon5.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glexception.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glexception.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\shaderedit\\shaderstruct.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\shaderedit\\shaderstruct.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\igraphicapis.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\igraphicapis.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{20CBFF26-6746-402E-992C-7B643E9423EB}|StgSharpC\\StgSharpC.vcxproj|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\glfw3.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{20CBFF26-6746-402E-992C-7B643E9423EB}|StgSharpC\\StgSharpC.vcxproj|solutionrelative:StgSharpC\\glfw3.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\framework.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\framework.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\environment\\platform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\environment\\platform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\environment\\timeprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\environment\\timeprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\ssd\\datasegment.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\ssd\\datasegment.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\ssd\\area.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\ssd\\area.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\serialize\\issdserializable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\serialize\\issdserializable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\serialize\\define.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\serialize\\define.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\ssd\\ssdvirtualfolder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\ssd\\ssdvirtualfolder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\ssd\\ssd.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\ssd\\ssd.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\ssd\\ssdraw.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\ssd\\ssdraw.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\randomgenerator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\randomgenerator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\environment\\globalkeystat.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\environment\\globalkeystat.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\environment\\errordefine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\environment\\errordefine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\usractivity\\keytrigger.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\usractivity\\keytrigger.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\plaingeometrymesh.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\plaingeometrymesh.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\controls\\triggerbutton.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\controls\\triggerbutton.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\controls\\decorationbox.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\controls\\decorationbox.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\controls\\characterindeximage.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\controls\\characterindeximage.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\controls\\battlefield.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\controls\\battlefield.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\controls\\controllingintem.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\controls\\controllingintem.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\define\\particleonplain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\define\\particleonplain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\iinstancing.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\iinstancing.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\define\\iplainentity.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\define\\iplainentity.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\keycontrol.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\keycontrol.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\stg\\touhou\\touhoubuilder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\stg\\touhou\\touhoubuilder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{000EFD45-7F4D-47DB-8F3C-CD26612F0EAB}|StgsharpEnvDebug\\StgsharpEnvDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpenvdebug\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{000EFD45-7F4D-47DB-8F3C-CD26612F0EAB}|StgsharpEnvDebug\\StgsharpEnvDebug.csproj|solutionrelative:stgsharpenvdebug\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{183AA95A-FEBD-42A5-A205-AB7048678251}|OEM\\OEM.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\oem\\mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{183AA95A-FEBD-42A5-A205-AB7048678251}|OEM\\OEM.csproj|solutionrelative:oem\\mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\igeometry.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\igeometry.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\define\\plaingeometry.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\define\\plaingeometry.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\rectangle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\rectangle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\parallelogram.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\parallelogram.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\cordinate.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\cordinate.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\square.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\square.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\coordination\\plaincoordinate.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\coordination\\plaincoordinate.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\point.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\point.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\coordination\\spacecoordinate.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\coordination\\spacecoordinate.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\spacegeometry\\class1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\spacegeometry\\class1.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\coordination\\coordinationbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\coordination\\coordinationbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\define\\plaininstancingbuffer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\define\\plaininstancingbuffer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\math\\linear\\vec4d.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\math\\linear\\vec4d.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\math\\linear\\cordination.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\math\\linear\\cordination.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\math\\linear\\vector.cross.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\math\\linear\\vector.cross.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\math\\linear\\vector.normalize.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\math\\linear\\vector.normalize.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\math\\linear\\vector.orthogonalize.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\math\\linear\\vector.orthogonalize.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\plain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\plain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\entities\\ientity.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\entities\\ientity.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\coordination\\streamlocalcoordinate.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\coordination\\streamlocalcoordinate.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\usractivity\\joysticktrigger.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\usractivity\\joysticktrigger.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\usractivity\\itrigger.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\usractivity\\itrigger.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{20CBFF26-6746-402E-992C-7B643E9423EB}|StgSharpC\\StgSharpC.vcxproj|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\StgSharpC.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{20CBFF26-6746-402E-992C-7B643E9423EB}|StgSharpC\\StgSharpC.vcxproj|solutionrelative:StgSharpC\\StgSharpC.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\iinstancingbuffer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\iinstancingbuffer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\shaderedit\\shadergenerator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\shaderedit\\shadergenerator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\io\\glio.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\io\\glio.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\geometryscaler\\angle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\geometryscaler\\angle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\m128.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\m128.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\plaingeometry\\define\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\plaingeometry\\define\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\stg\\bullet.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\stg\\bullet.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\math\\linear\\vec3d.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\math\\linear\\vec3d.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\GeometryOperation\\Angle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Geometries\\GeometryOperation\\Angle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\PlainGeometry\\Define\\IInstancing.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Geometries\\PlainGeometry\\Define\\IInstancing.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\KeyEvent.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Controlling\\KeyEvent.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\KeyboardButton.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Controlling\\Controls\\KeyboardButton.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\Coordination\\ICoord.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Geometries\\Coordination\\ICoord.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Form\\ShowForm.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Graphics\\Form\\ShowForm.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Form\\FormThreading.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Graphics\\Form\\FormThreading.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Form\\Form.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Graphics\\Form\\Form.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\RBO.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Graphics\\GL\\Buffer\\RBO.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\EBO.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Graphics\\GL\\Buffer\\EBO.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\ShaderEdit\\Shader.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Graphics\\GL\\ShaderEdit\\Shader.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\VBO.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Graphics\\GL\\Buffer\\VBO.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\glRenderStream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Graphics\\GL\\glRenderStream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Test\\MainRenderStream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Test\\MainRenderStream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\Render.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Demo\\View\\Render.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\DataBinding.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Logic\\ViewModel\\DataBinding.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ShowViewPort.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Logic\\ViewModel\\ShowViewPort.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\ViewPort.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Graphics\\View\\ViewPort.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\ViewResponder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Controlling\\ViewResponder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\ViewRender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Graphics\\View\\ViewRender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\ViewDesigner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Controlling\\ViewDesigner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ViewManage.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Logic\\ViewModel\\ViewManage.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ViewModel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Logic\\ViewModel\\ViewModel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\CrossFrameBlueprintNode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Logic\\CrossFrameBlueprintNode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\MultiKeyDictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Logic\\MultiKeyDictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\TimeFunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Logic\\TimeFunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\blueprint\\crossframeblueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\blueprint\\crossframeblueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 214, + "DocumentGroups": [ + { + "DockedWidth": 197, + "SelectedChildIndex": 1, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "ImageHelper.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\CPUanimation\\ImageHelper.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\CPUanimation\\ImageHelper.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\CPUanimation\\ImageHelper.cs", + "RelativeToolTip": "StgSharp\\Graphics\\CPUanimation\\ImageHelper.cs", + "ViewState": "AgIAABsAAAAAAAAAAAD4vzQAAAAaAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-28T02:49:25.315Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 14, + "Title": "Dictionary.cs", + "DocumentMoniker": "C:\\Users\\Youmu\\AppData\\Local\\SourceServer\\60546032f23b31a03685e30ef880f5c48e6df2d00a71d09e625da4e2a208bd88\\Dictionary.cs", + "ToolTip": "C:\\Users\\Youmu\\AppData\\Local\\SourceServer\\60546032f23b31a03685e30ef880f5c48e6df2d00a71d09e625da4e2a208bd88\\Dictionary.cs", + "ViewState": "AgIAAFkBAAAAAAAAAIA0wGQBAAAMAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T21:35:54.107Z" + }, + { + "$type": "Document", + "DocumentIndex": 21, + "Title": "SideNode.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\SideNode.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Blueprint\\SideNode.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\SideNode.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Blueprint\\SideNode.cs", + "ViewState": "AgIAAAsAAAAAAAAAAAAvwB4AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T18:05:45.53Z" + }, + { + "$type": "Document", + "DocumentIndex": 23, + "Title": "BlueprintActionNode.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\BlueprintActionNode.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Blueprint\\BlueprintActionNode.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\BlueprintActionNode.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Blueprint\\BlueprintActionNode.cs", + "ViewState": "AgIAAAsAAAAAAAAAAAAvwB4AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T18:04:09.577Z" + }, + { + "$type": "Document", + "DocumentIndex": 24, + "Title": "Blueprint.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\Blueprint.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Blueprint\\Blueprint.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\Blueprint.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Blueprint\\Blueprint.cs", + "ViewState": "AgIAAAwAAAAAAAAAAAAvwB8AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T18:04:06.765Z" + }, + { + "$type": "Document", + "DocumentIndex": 26, + "Title": "TimeSpanProvider.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Timing\\TimeSpanProvider.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Timing\\TimeSpanProvider.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Timing\\TimeSpanProvider.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Timing\\TimeSpanProvider.cs", + "ViewState": "AgIAACYAAAAAAAAAAAAvwB4AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T18:04:00.578Z" + }, + { + "$type": "Document", + "DocumentIndex": 32, + "Title": "TimeFunction.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Timing\\TimeFunction.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Timing\\TimeFunction.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Timing\\TimeFunction.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Timing\\TimeFunction.cs", + "ViewState": "AgIAABsAAAAAAAAAAAAvwC4AAAAMAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T18:02:49.325Z" + }, + { + "$type": "Document", + "DocumentIndex": 37, + "Title": "BlueprintRunner.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\BlueprintRunner.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Blueprint\\BlueprintRunner.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\BlueprintRunner.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Blueprint\\BlueprintRunner.cs", + "ViewState": "AgIAAFwAAAAAAAAAAIA0wCgAAAAZAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T17:53:00.315Z" + }, + { + "$type": "Document", + "DocumentIndex": 39, + "Title": "SizeFixedList.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Collections\\SizeFixedList.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Collections\\SizeFixedList.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Collections\\SizeFixedList.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Collections\\SizeFixedList.cs", + "ViewState": "AgIAAA0AAAAAAAAAAAAvwH0AAAAEAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T17:51:39.457Z" + }, + { + "$type": "Document", + "DocumentIndex": 40, + "Title": "IBidrirectionalDictionary.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Collections\\IBidrirectionalDictionary.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Collections\\IBidrirectionalDictionary.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Collections\\IBidrirectionalDictionary.cs", + "RelativeToolTip": "StgSharp\\Logic\\Collections\\IBidrirectionalDictionary.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAC8AAAA/AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-26T23:33:42.221Z" + }, + { + "$type": "Document", + "DocumentIndex": 43, + "Title": "TexturePipeline.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\TexturePipeline.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\TexturePipeline.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\TexturePipeline.cs", + "RelativeToolTip": "StgSharp\\Graphics\\TexturePipeline.cs", + "ViewState": "AgIAABUAAAAAAAAAAAAvwCgAAAAjAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-26T03:29:30.925Z" + }, + { + "$type": "Document", + "DocumentIndex": 45, + "Title": "Counter.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Counter.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Counter.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Counter.cs", + "RelativeToolTip": "StgSharp\\Logic\\Counter.cs", + "ViewState": "AgIAACQAAAAAAAAAAAAAACYAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-26T03:27:55.46Z" + }, + { + "$type": "Document", + "DocumentIndex": 13, + "Title": "BidirectionalDictionary.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Collections\\BidirectionalDictionary.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Collections\\BidirectionalDictionary.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Collections\\BidirectionalDictionary.cs", + "RelativeToolTip": "StgSharp\\Logic\\Collections\\BidirectionalDictionary.cs", + "ViewState": "AgIAAEMAAAAAAAAAAIAzwFUAAAANAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-26T03:20:40.602Z" + }, + { + "$type": "Document", + "DocumentIndex": 57, + "Title": "BlueprintActionNode.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BlueprintActionNode.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\BlueprintActionNode.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BlueprintActionNode.cs", + "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\BlueprintActionNode.cs", + "ViewState": "AgIAABsAAAAAAAAAAAAAACYAAAAcAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-26T02:58:10.928Z" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "IImageProvider.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\CPUanimation\\IImageProvider.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\CPUanimation\\IImageProvider.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\CPUanimation\\IImageProvider.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\CPUanimation\\IImageProvider.cs", + "ViewState": "AgIAABgAAAAAAAAAAAAAACYAAAAdAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-26T00:21:20.169Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 58, + "Title": "M128.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Data\\M128.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Data\\M128.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Data\\M128.cs", + "RelativeToolTip": "StgSharpDebug\\Data\\M128.cs", + "ViewState": "AgIAABwAAAAAAAAAAAAowC4AAAAbAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-25T23:57:32.075Z" + }, + { + "$type": "Document", + "DocumentIndex": 245, + "Title": "CrossFrameBlueprintNode.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\CrossFrameBlueprintNode.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\CrossFrameBlueprintNode.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\CrossFrameBlueprintNode.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\CrossFrameBlueprintNode.cs", + "ViewState": "AgIAAB0AAAAAAAAAAAAvwDAAAAA/AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-25T22:04:59.351Z" + }, + { + "$type": "Document", + "DocumentIndex": 59, + "Title": "GlobalSetting.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Environment\\GlobalSetting.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Environment\\GlobalSetting.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Environment\\GlobalSetting.cs", + "RelativeToolTip": "StgSharpDebug\\Environment\\GlobalSetting.cs", + "ViewState": "AgIAADUAAAAAAAAAAAAvwEgAAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-25T22:04:46.699Z" + }, + { + "$type": "Document", + "DocumentIndex": 12, + "Title": "AutoTexture.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "ViewState": "AgIAAGwAAAAAAAAAAAAiwH4AAAAQAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-25T21:16:55.239Z" + }, + { + "$type": "Document", + "DocumentIndex": 62, + "Title": "glResourceManager.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glResourceManager.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glResourceManager.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glResourceManager.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glResourceManager.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAEMAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-25T21:16:48.829Z" + }, + { + "$type": "Document", + "DocumentIndex": 70, + "Title": "GLBufferObjectBase.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAADMAAAAFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-25T20:33:11.097Z" + }, + { + "$type": "Document", + "DocumentIndex": 69, + "Title": "VBO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VBO.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VBO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VBO.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VBO.cs", + "ViewState": "AgIAAH8AAAAAAAAAAAAUwCoAAAAZAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-24T21:48:41.305Z" + }, + { + "$type": "Document", + "DocumentIndex": 72, + "Title": "RBO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\RBO.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\RBO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\RBO.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\RBO.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-24T21:48:25.007Z" + }, + { + "$type": "Document", + "DocumentIndex": 76, + "Title": "glAPICalling.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glAPICalling.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glAPICalling.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glAPICalling.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glAPICalling.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-24T19:14:08.969Z" + }, + { + "$type": "Document", + "DocumentIndex": 15, + "Title": "glResourceGenrator.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glResourceGenrator.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glResourceGenrator.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glResourceGenrator.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glResourceGenrator.cs", + "ViewState": "AgIAADYAAAAAAAAAAIAzwFIAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-24T19:13:55.184Z" + }, + { + "$type": "Document", + "DocumentIndex": 68, + "Title": "glResourceManager.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glResourceManager.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glResourceManager.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glResourceManager.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glResourceManager.cs", + "ViewState": "AgIAAEcAAAAAAAAAAAAqwFUAAAAPAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-24T19:13:42.377Z" + }, + { + "$type": "Document", + "DocumentIndex": 246, + "Title": "MultiKeyDictionary.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\MultiKeyDictionary.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\MultiKeyDictionary.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\MultiKeyDictionary.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\MultiKeyDictionary.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAcAAAA5AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-23T20:00:13.62Z" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "AutoTexture.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "ViewState": "AgIAAHAAAAAAAAAAAAAvwJAAAAA9AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-23T19:22:04.183Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 79, + "Title": "ControlItemRender.frag", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\ControlItemRender.frag", + "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\ControlItemRender.frag", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\ControlItemRender.frag", + "RelativeToolTip": "StgSharpDebug\\Shader\\ControlItemRender.frag", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2024-08-01T11:42:48.589Z" + }, + { + "$type": "Document", + "DocumentIndex": 84, + "Title": "main.frag", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\main.frag", + "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\main.frag", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\main.frag", + "RelativeToolTip": "StgSharpDebug\\Shader\\main.frag", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2024-08-01T11:40:09.913Z" + }, + { + "$type": "Document", + "DocumentIndex": 80, + "Title": "ControlItemRender.vert", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\ControlItemRender.vert", + "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\ControlItemRender.vert", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\ControlItemRender.vert", + "RelativeToolTip": "StgSharpDebug\\Shader\\ControlItemRender.vert", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAWAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2024-08-01T11:36:54.425Z" + }, + { + "$type": "Document", + "DocumentIndex": 86, + "Title": "OpenGLControllingItemRenderStream.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\OpenGLControllingItemRenderStream.cs", + "RelativeDocumentMoniker": "StgSharp\\MVVM\\OpenGLControllingItemRenderStream.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\OpenGLControllingItemRenderStream.cs", + "RelativeToolTip": "StgSharp\\MVVM\\OpenGLControllingItemRenderStream.cs", + "ViewState": "AgIAAAAAAAAAAAAAAIBgwBUAAAAwAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-01T11:32:58.353Z" + }, + { + "$type": "Document", + "DocumentIndex": 87, + "Title": "IGeomtryBuffer.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\IGeomtryBuffer.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\IGeomtryBuffer.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\IGeomtryBuffer.cs", + "RelativeToolTip": "StgSharpDebug\\Geometries\\IGeomtryBuffer.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-01T11:26:58.217Z" + }, + { + "$type": "Document", + "DocumentIndex": 88, + "Title": "OpenGLControllingItemRenderStream.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\OpenGLControllingItemRenderStream.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\OpenGLControllingItemRenderStream.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\OpenGLControllingItemRenderStream.cs", + "RelativeToolTip": "StgSharpDebug\\MVVM\\OpenGLControllingItemRenderStream.cs", + "ViewState": "AgIAAAcAAAAAAAAAAAAIwBoAAAAwAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-01T11:23:06.648Z" + }, + { + "$type": "Document", + "DocumentIndex": 89, + "Title": "OpenningView.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Stg\\Touhou\\View\\OpenningView.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Stg\\Touhou\\View\\OpenningView.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Stg\\Touhou\\View\\OpenningView.cs", + "RelativeToolTip": "StgSharpDebug\\Stg\\Touhou\\View\\OpenningView.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-01T11:20:02.653Z" + }, + { + "$type": "Document", + "DocumentIndex": 81, + "Title": "TouhouWindow.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Stg\\Touhou\\TouhouWindow.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Stg\\Touhou\\TouhouWindow.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Stg\\Touhou\\TouhouWindow.cs", + "RelativeToolTip": "StgSharpDebug\\Stg\\Touhou\\TouhouWindow.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-01T11:14:18.39Z" + }, + { + "$type": "Document", + "DocumentIndex": 85, + "Title": "InternalData.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Data\\InternalData.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Data\\InternalData.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Data\\InternalData.cs", + "RelativeToolTip": "StgSharpDebug\\Data\\InternalData.cs", + "ViewState": "AgIAAAcAAAAAAAAAAAAuwDMAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-30T23:52:16.105Z" + }, + { + "$type": "Document", + "DocumentIndex": 67, + "Title": "glApiManagerConst.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glApiManagerConst.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glApiManagerConst.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glApiManagerConst.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glApiManagerConst.cs", + "ViewState": "AgIAABgAAAAAAAAAAIBQwAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-29T22:56:27.205Z" + }, + { + "$type": "Document", + "DocumentIndex": 96, + "Title": "Object.cs", + "DocumentMoniker": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\3fbd2d3f2a21976ceea22ce6d61d2bfc56abbb0356d59a09e7367042f1d26101\\src\\libraries\\System.Private.CoreLib\\src\\System\\Object.cs", + "ToolTip": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\3fbd2d3f2a21976ceea22ce6d61d2bfc56abbb0356d59a09e7367042f1d26101\\src\\libraries\\System.Private.CoreLib\\src\\System\\Object.cs", + "ViewState": "AgIAABIAAAAAAAAAAIAxwBkAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-29T22:53:04.659Z" + }, + { + "$type": "Document", + "DocumentIndex": 66, + "Title": "glException.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glException.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glException.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glException.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glException.cs", + "ViewState": "AgIAAEMAAAAAAAAAAAAUwGUAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-29T22:18:29.968Z" + }, + { + "$type": "Document", + "DocumentIndex": 100, + "Title": "StructDefine.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Define\\StructDefine.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Define\\StructDefine.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Define\\StructDefine.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\Define\\StructDefine.cs", + "ViewState": "AgIAABIAAAAAAAAAAIBgwC0AAAAEAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-29T22:08:05.513Z" + }, + { + "$type": "Document", + "DocumentIndex": 94, + "Title": "GLIO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\IO\\GLIO.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\IO\\GLIO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\IO\\GLIO.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\IO\\GLIO.cs", + "ViewState": "AgIAAGgAAAAAAAAAAAAqwGgAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-29T22:06:08.827Z" + }, + { + "$type": "Document", + "DocumentIndex": 109, + "Title": "ViewManage.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\ViewManage.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\ViewModel\\ViewManage.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\ViewManage.cs", + "RelativeToolTip": "StgSharpDebug\\MVVM\\ViewModel\\ViewManage.cs", + "ViewState": "AgIAABoAAAAAAAAAAAA1wDIAAAAYAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-28T20:47:56.998Z" + }, + { + "$type": "Document", + "DocumentIndex": 30, + "Title": "TimeProvider.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Environment\\TimeProvider.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Environment\\TimeProvider.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Environment\\TimeProvider.cs", + "RelativeToolTip": "StgSharpDebug\\Environment\\TimeProvider.cs", + "ViewState": "AgIAABkAAAAAAAAAAAAnwDAAAAAlAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-28T20:44:41.918Z" + }, + { + "$type": "Document", + "DocumentIndex": 93, + "Title": "SemaphoreSlim.cs", + "DocumentMoniker": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\c6a36f44105246e8389794d6b1ff0c946741477e6dd52e219c7f2f689247fedc\\src\\libraries\\System.Private.CoreLib\\src\\System\\Threading\\SemaphoreSlim.cs", + "ToolTip": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\c6a36f44105246e8389794d6b1ff0c946741477e6dd52e219c7f2f689247fedc\\src\\libraries\\System.Private.CoreLib\\src\\System\\Threading\\SemaphoreSlim.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-28T20:44:32.439Z" + }, + { + "$type": "Document", + "DocumentIndex": 110, + "Title": "ViewPort.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewPort.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\ViewPort.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewPort.cs", + "RelativeToolTip": "StgSharpDebug\\MVVM\\ViewPort.cs", + "ViewState": "AgIAAB8AAAAAAAAAAAA1wDoAAAAUAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-28T20:31:16.196Z" + }, + { + "$type": "Document", + "DocumentIndex": 77, + "Title": "ViewResponder.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewResponder.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\View\\ViewResponder.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewResponder.cs", + "RelativeToolTip": "StgSharpDebug\\MVVM\\View\\ViewResponder.cs", + "ViewState": "AgIAAFEAAAAAAAAAAAAWwHQAAAAvAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-28T20:20:17.17Z" + }, + { + "$type": "Document", + "DocumentIndex": 103, + "Title": "ShowViewPort.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\ShowViewPort.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\ViewModel\\ShowViewPort.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\ShowViewPort.cs", + "RelativeToolTip": "StgSharpDebug\\MVVM\\ViewModel\\ShowViewPort.cs", + "ViewState": "AgIAADIAAAAAAAAAAAAtwEgAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-28T19:28:00.87Z" + }, + { + "$type": "Document", + "DocumentIndex": 29, + "Title": "ViewModel.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\ViewModel.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\ViewModel\\ViewModel.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\ViewModel.cs", + "RelativeToolTip": "StgSharpDebug\\MVVM\\ViewModel\\ViewModel.cs", + "ViewState": "AgIAAFMAAAAAAAAAAAAvwGoAAAA5AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-28T19:24:58.03Z" + }, + { + "$type": "Document", + "DocumentIndex": 112, + "Title": "PlainGeometry.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", + "RelativeToolTip": "StgSharpDebug\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", + "ViewState": "AgIAABsAAAAAAAAAAAAqwC0AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-28T19:16:05.323Z" + }, + { + "$type": "Document", + "DocumentIndex": 111, + "Title": "Rectangle.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\PlainGeometry\\Rectangle.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\PlainGeometry\\Rectangle.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\PlainGeometry\\Rectangle.cs", + "RelativeToolTip": "StgSharpDebug\\Geometries\\PlainGeometry\\Rectangle.cs", + "ViewState": "AgIAABAAAAAAAAAAAAA1wCUAAAAFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-28T19:14:47.657Z" + }, + { + "$type": "Document", + "DocumentIndex": 78, + "Title": "ViewDesigner.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewDesigner.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\View\\ViewDesigner.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewDesigner.cs", + "RelativeToolTip": "StgSharpDebug\\MVVM\\View\\ViewDesigner.cs", + "ViewState": "AgIAAFEAAAAAAAAAAAAmwGUAAAAUAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-28T18:02:40.594Z" + }, + { + "$type": "Document", + "DocumentIndex": 117, + "Title": "KeyTrigger.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\UsrActivity\\KeyTrigger.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\UsrActivity\\KeyTrigger.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\UsrActivity\\KeyTrigger.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\UsrActivity\\KeyTrigger.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-26T22:07:04.226Z" + }, + { + "$type": "Document", + "DocumentIndex": 119, + "Title": "DataBinding.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\DataBinding.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\ViewModel\\DataBinding.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\DataBinding.cs", + "RelativeToolTip": "StgSharpDebug\\MVVM\\ViewModel\\DataBinding.cs", + "ViewState": "AgIAADgAAAAAAAAAAAA0wC8AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-26T21:50:43.739Z" + }, + { + "$type": "Document", + "DocumentIndex": 17, + "Title": "ViewBase.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewBase.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\View\\ViewBase.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewBase.cs", + "RelativeToolTip": "StgSharpDebug\\MVVM\\View\\ViewBase.cs", + "ViewState": "AgIAABIAAAAAAAAAAAApwH8AAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-26T21:46:52.221Z" + }, + { + "$type": "Document", + "DocumentIndex": 20, + "Title": "ViewRender.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewRender.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\View\\ViewRender.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewRender.cs", + "RelativeToolTip": "StgSharpDebug\\MVVM\\View\\ViewRender.cs", + "ViewState": "AgIAAAwAAAAAAAAAAAAvwB8AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-26T21:02:28.873Z" + }, + { + "$type": "Document", + "DocumentIndex": 95, + "Title": "NewRender.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\NewRender.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\View\\NewRender.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\NewRender.cs", + "RelativeToolTip": "StgSharpDebug\\Demo\\View\\NewRender.cs", + "ViewState": "AgIAABIAAAAAAAAAAAAcwBgAAAA7AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-26T21:00:30.407Z" + }, + { + "$type": "Document", + "DocumentIndex": 125, + "Title": "ViewResponder.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewResponder.cs", + "RelativeDocumentMoniker": "StgSharp\\MVVM\\View\\ViewResponder.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewResponder.cs", + "RelativeToolTip": "StgSharp\\MVVM\\View\\ViewResponder.cs", + "ViewState": "AgIAABwAAAAAAAAAAIBgwDsAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-24T14:44:59.912Z" + }, + { + "$type": "Document", + "DocumentIndex": 107, + "Title": "ViewRender.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewRender.cs", + "RelativeDocumentMoniker": "StgSharp\\MVVM\\View\\ViewRender.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewRender.cs", + "RelativeToolTip": "StgSharp\\MVVM\\View\\ViewRender.cs", + "ViewState": "AgIAAGoAAAAAAAAAAAAYwG0AAAAgAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-24T14:44:50.254Z" + }, + { + "$type": "Document", + "DocumentIndex": 123, + "Title": "ViewDesigner.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewDesigner.cs", + "RelativeDocumentMoniker": "StgSharp\\MVVM\\View\\ViewDesigner.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewDesigner.cs", + "RelativeToolTip": "StgSharp\\MVVM\\View\\ViewDesigner.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAIYAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-24T14:42:19.45Z" + }, + { + "$type": "Document", + "DocumentIndex": 105, + "Title": "Control.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\Control.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\View\\Control.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\Control.cs", + "RelativeToolTip": "StgSharpDebug\\Demo\\View\\Control.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-22T23:13:34.964Z" + }, + { + "$type": "Document", + "DocumentIndex": 9, + "Title": "Partical.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\RenderStream\\Partical.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\RenderStream\\Partical.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\RenderStream\\Partical.cs", + "RelativeToolTip": "StgSharpDebug\\Demo\\RenderStream\\Partical.cs", + "ViewState": "AgIAAFQAAAAAAAAAAAAzwFsAAAANAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-22T18:54:09.535Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 236, + "Title": "Render.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\Render.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\View\\Render.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\Render.cs", + "RelativeToolTip": "StgSharpDebug\\Demo\\View\\Render.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-22T18:52:26.586Z" + }, + { + "$type": "Document", + "DocumentIndex": 104, + "Title": "PlainGeometryMesh.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\PlainGeometryMesh.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\PlainGeometryMesh.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\PlainGeometryMesh.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\PlainGeometryMesh.cs", + "ViewState": "AgIAACsAAAAAAAAAAAAiwDoAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-21T18:21:10.362Z" + }, + { + "$type": "Document", + "DocumentIndex": 16, + "Title": "TexturePipeline.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\TexturePipeline.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\TexturePipeline.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\TexturePipeline.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\TexturePipeline.cs", + "ViewState": "AgIAABAAAAAAAAAAAAAhwCoAAAA0AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-21T18:20:56.032Z" + }, + { + "$type": "Document", + "DocumentIndex": 27, + "Title": "MarkingLable.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\MarkingLable.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\MarkingLable.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\MarkingLable.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\MarkingLable.cs", + "ViewState": "AgIAABwAAAAAAAAAAAAvwC8AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-21T18:08:20.718Z" + }, + { + "$type": "Document", + "DocumentIndex": 113, + "Title": "DecorationBox.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\DecorationBox.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\DecorationBox.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\DecorationBox.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\DecorationBox.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAuwBMAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-21T18:08:04.698Z" + }, + { + "$type": "Document", + "DocumentIndex": 115, + "Title": "CharacterIndexImage.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\CharacterIndexImage.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\CharacterIndexImage.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\CharacterIndexImage.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\CharacterIndexImage.cs", + "ViewState": "AgIAAAMAAAAAAAAAAIBgwA0AAAArAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-21T18:07:37.453Z" + }, + { + "$type": "Document", + "DocumentIndex": 22, + "Title": "BattleField.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\BattleField.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\BattleField.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\BattleField.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\BattleField.cs", + "ViewState": "AgIAAA0AAAAAAAAAAAAvwCAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-21T18:06:14.126Z" + }, + { + "$type": "Document", + "DocumentIndex": 114, + "Title": "ControllingIntem.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\ControllingIntem.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\ControllingIntem.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\ControllingIntem.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\ControllingIntem.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAuwA4AAAAHAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-21T18:05:39.942Z" + }, + { + "$type": "Document", + "DocumentIndex": 116, + "Title": "TextureProvider.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\TextureProvider.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\TextureProvider.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\TextureProvider.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\TextureProvider.cs", + "ViewState": "AgIAABIAAAAAAAAAAAAcwCMAAAASAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-21T17:09:02.036Z" + }, + { + "$type": "Document", + "DocumentIndex": 102, + "Title": "Design.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\Design.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\View\\Design.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\Design.cs", + "RelativeToolTip": "StgSharpDebug\\Demo\\View\\Design.cs", + "ViewState": "AgIAABQAAAAAAAAAAAAqwCYAAAAhAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-21T08:07:56.357Z" + }, + { + "$type": "Document", + "DocumentIndex": 18, + "Title": "ViewMain.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\ViewMain.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\View\\ViewMain.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\ViewMain.cs", + "RelativeToolTip": "StgSharpDebug\\Demo\\View\\ViewMain.cs", + "ViewState": "AgIAAAwAAAAAAAAAAAAvwB4AAAAYAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-21T08:06:54.118Z" + }, + { + "$type": "Document", + "DocumentIndex": 128, + "Title": "DataBinding.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\DataBinding.cs", + "RelativeDocumentMoniker": "StgSharp\\MVVM\\ViewModel\\DataBinding.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\DataBinding.cs", + "RelativeToolTip": "StgSharp\\MVVM\\ViewModel\\DataBinding.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACgAAAAhAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-19T16:41:06.14Z" + }, + { + "$type": "Document", + "DocumentIndex": 131, + "Title": "KeyEventAttribute.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\KeyEventAttribute.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\KeyEventAttribute.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\KeyEventAttribute.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\KeyEventAttribute.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-19T15:04:20.506Z" + }, + { + "$type": "Document", + "DocumentIndex": 237, + "Title": "DataBinding.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\DataBinding.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\ViewModel\\DataBinding.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\DataBinding.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\ViewModel\\DataBinding.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-18T17:19:17.458Z" + }, + { + "$type": "Document", + "DocumentIndex": 108, + "Title": "StgSharpDebug", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\StgSharpDebug.csproj", + "RelativeDocumentMoniker": "StgSharpDebug\\StgSharpDebug.csproj", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\StgSharpDebug.csproj", + "RelativeToolTip": "StgSharpDebug\\StgSharpDebug.csproj", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", + "WhenOpened": "2024-07-17T19:34:54.548Z" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "ViewModelMain.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\ViewModelMain.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\ViewModelMain.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\ViewModelMain.cs", + "RelativeToolTip": "StgSharpDebug\\Demo\\ViewModelMain.cs", + "ViewState": "AgIAADAAAAAAAAAAAADgvzAAAAA3AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-16T07:19:49.481Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 61, + "Title": "StgSharpDebug.csproj", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\StgSharpDebug.csproj", + "RelativeDocumentMoniker": "StgSharpDebug\\StgSharpDebug.csproj", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\StgSharpDebug.csproj", + "RelativeToolTip": "StgSharpDebug\\StgSharpDebug.csproj", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABUAAAAUAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", + "WhenOpened": "2024-07-16T07:19:00.583Z" + }, + { + "$type": "Document", + "DocumentIndex": 247, + "Title": "TimeFunction.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\TimeFunction.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\TimeFunction.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\TimeFunction.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\TimeFunction.cs", + "ViewState": "AgIAABAAAAAAAAAAAAAqwCQAAAAdAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-15T20:04:24.579Z" + }, + { + "$type": "Document", + "DocumentIndex": 11, + "Title": "TriggerButton.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\TriggerButton.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\TriggerButton.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\TriggerButton.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\TriggerButton.cs", + "ViewState": "AgIAALMAAAAAAAAAAIA0wL4AAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-15T19:54:09.954Z" + }, + { + "$type": "Document", + "DocumentIndex": 106, + "Title": "ButtonGroup.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\ButtonGroup.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\ButtonGroup.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\ButtonGroup.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\ButtonGroup.cs", + "ViewState": "AgIAADAAAAAAAAAAAAAqwEEAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-15T19:53:42.786Z" + }, + { + "$type": "Document", + "DocumentIndex": 238, + "Title": "ShowViewPort.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ShowViewPort.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\ViewModel\\ShowViewPort.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ShowViewPort.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\ViewModel\\ShowViewPort.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-15T19:07:20.391Z" + }, + { + "$type": "Document", + "DocumentIndex": 239, + "Title": "ViewPort.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\ViewPort.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\View\\ViewPort.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\ViewPort.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\View\\ViewPort.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-15T18:55:25.494Z" + }, + { + "$type": "Document", + "DocumentIndex": 118, + "Title": "KeyControl.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\KeyControl.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\KeyControl.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\KeyControl.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\KeyControl.cs", + "ViewState": "AgIAABAAAAAAAAAAAAAqwCQAAAAbAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-15T18:23:56.059Z" + }, + { + "$type": "Document", + "DocumentIndex": 240, + "Title": "ViewResponder.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\ViewResponder.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\ViewResponder.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\ViewResponder.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\ViewResponder.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-15T18:00:35.036Z" + }, + { + "$type": "Document", + "DocumentIndex": 241, + "Title": "ViewRender.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\ViewRender.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\View\\ViewRender.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\ViewRender.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\View\\ViewRender.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-15T17:27:33.542Z" + }, + { + "$type": "Document", + "DocumentIndex": 242, + "Title": "ViewDesigner.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\ViewDesigner.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\ViewDesigner.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\ViewDesigner.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\ViewDesigner.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-15T17:21:21.477Z" + }, + { + "$type": "Document", + "DocumentIndex": 120, + "Title": "View.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\View.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\View\\View.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\View.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\View\\View.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-15T15:23:07.924Z" + }, + { + "$type": "Document", + "DocumentIndex": 132, + "Title": "vec3d.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Math\\Linear\\vec3d.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Math\\Linear\\vec3d.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Math\\Linear\\vec3d.cs", + "RelativeToolTip": "StgSharpDebug\\Math\\Linear\\vec3d.cs", + "ViewState": "AgIAAF0AAAAAAAAAAAAmwEcAAAAZAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-14T17:17:29.238Z" + }, + { + "$type": "Document", + "DocumentIndex": 33, + "Title": "GeometryOperation.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\GeometryOperation\\GeometryOperation.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\GeometryOperation\\GeometryOperation.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\GeometryOperation\\GeometryOperation.cs", + "RelativeToolTip": "StgSharpDebug\\Geometries\\GeometryOperation\\GeometryOperation.cs", + "ViewState": "AgIAAB8AAAAAAAAAAAAvwDIAAAAQAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-13T17:37:00.956Z" + }, + { + "$type": "Document", + "DocumentIndex": 101, + "Title": "particle.frag", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\particle.frag", + "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\particle.frag", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\particle.frag", + "RelativeToolTip": "StgSharpDebug\\Shader\\particle.frag", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAA4AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2024-07-13T05:34:34.109Z" + }, + { + "$type": "Document", + "DocumentIndex": 92, + "Title": "particle.vert", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\particle.vert", + "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\particle.vert", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\particle.vert", + "RelativeToolTip": "StgSharpDebug\\Shader\\particle.vert", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABoAAAAoAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2024-07-13T05:34:25.67Z" + }, + { + "$type": "Document", + "DocumentIndex": 83, + "Title": "fbo.vert", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\fbo.vert", + "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\fbo.vert", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\fbo.vert", + "RelativeToolTip": "StgSharpDebug\\Shader\\fbo.vert", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2024-07-12T17:46:54.077Z" + }, + { + "$type": "Document", + "DocumentIndex": 82, + "Title": "fbo.frag", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\fbo.frag", + "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\fbo.frag", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\fbo.frag", + "RelativeToolTip": "StgSharpDebug\\Shader\\fbo.frag", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2024-07-12T17:46:52.616Z" + }, + { + "$type": "Document", + "DocumentIndex": 75, + "Title": "glEnum.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Define\\glEnum.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Define\\glEnum.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Define\\glEnum.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\Define\\glEnum.cs", + "ViewState": "AgIAAFUAAAAAAAAAAAASwGcAAAAQAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-12T17:36:17.134Z" + }, + { + "$type": "Document", + "DocumentIndex": 28, + "Title": "RenderStream.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\RenderStream.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\RenderStream.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\RenderStream.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\RenderStream.cs", + "ViewState": "AgIAAJoAAAAAAAAAAAAewB8AAAAWAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-12T16:50:10.581Z" + }, + { + "$type": "Document", + "DocumentIndex": 71, + "Title": "VAO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VAO.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VAO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VAO.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VAO.cs", + "ViewState": "AgIAABwAAAAAAAAAAAAqwCcAAAAWAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-12T10:04:44.545Z" + }, + { + "$type": "Document", + "DocumentIndex": 10, + "Title": "TextureGL.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", + "ViewState": "AgIAAFkAAAAAAAAAAAArwGMAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-11T18:46:51.043Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 135, + "Title": "SR.cs", + "DocumentMoniker": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\74ed84df48c00229a8da75e7d99c26a3409b78c17ddfc863196b29969f1b9863\\src\\libraries\\Common\\src\\System\\SR.cs", + "ToolTip": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\74ed84df48c00229a8da75e7d99c26a3409b78c17ddfc863196b29969f1b9863\\src\\libraries\\Common\\src\\System\\SR.cs", + "ViewState": "AgIAABkAAAAAAAAAAADgvyIAAAANAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-11T18:09:43.749Z" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "ImageHelper.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\CPUanimation\\ImageHelper.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\CPUanimation\\ImageHelper.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\CPUanimation\\ImageHelper.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\CPUanimation\\ImageHelper.cs", + "ViewState": "AgIAABsAAAAAAAAAAAD4vywAAAAkAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-11T13:33:11Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "Image.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Image.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Image.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Image.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\Image.cs", + "ViewState": "AgIAADkAAAAAAAAAAIA7wE8AAAAXAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-11T13:30:30.357Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 138, + "Title": "Task.cs", + "DocumentMoniker": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\6c91e49c16b65a4a6086c168a4f34965ffdd867f9cb4d0d10207e862c24f2808\\src\\libraries\\System.Private.CoreLib\\src\\System\\Threading\\Tasks\\Task.cs", + "ToolTip": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\6c91e49c16b65a4a6086c168a4f34965ffdd867f9cb4d0d10207e862c24f2808\\src\\libraries\\System.Private.CoreLib\\src\\System\\Threading\\Tasks\\Task.cs", + "ViewState": "AgIAAD8JAAAAAAAAAAAjwEcJAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-11T03:46:13.673Z" + }, + { + "$type": "Document", + "DocumentIndex": 98, + "Title": "GlHandle.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\GlHandle.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\GlHandle.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\GlHandle.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\GlHandle.cs", + "ViewState": "AgIAACQAAAAAAAAAAAAYwDoAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T18:49:23.76Z" + }, + { + "$type": "Document", + "DocumentIndex": 243, + "Title": "ViewManage.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ViewManage.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\ViewModel\\ViewManage.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ViewManage.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\ViewModel\\ViewManage.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T18:32:18.12Z" + }, + { + "$type": "Document", + "DocumentIndex": 25, + "Title": "glRenderStream.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glRenderStream.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glRenderStream.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glRenderStream.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glRenderStream.cs", + "ViewState": "AgIAAAsAAAAAAAAAAAAvwB4AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T18:31:57.791Z" + }, + { + "$type": "Document", + "DocumentIndex": 65, + "Title": "glApiManager.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glApiManager.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glApiManager.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glApiManager.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glApiManager.cs", + "ViewState": "AgIAABUAAAAAAAAAAIBQwLAAAACCAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T18:26:52.544Z" + }, + { + "$type": "Document", + "DocumentIndex": 139, + "Title": "glApiManager.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glApiManager.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glApiManager.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glApiManager.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glApiManager.cs", + "ViewState": "AgIAACoAAAAAAAAAAAAYwD8AAAAWAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T18:24:34.903Z" + }, + { + "$type": "Document", + "DocumentIndex": 140, + "Title": "glApiManagerConst.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glApiManagerConst.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glApiManagerConst.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glApiManagerConst.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glApiManagerConst.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T18:24:33.785Z" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "glFunction.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glFunction.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glFunction.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glFunction.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glFunction.cs", + "ViewState": "AgIAAOMBAAAAAAAAAIAzwPYBAAAWAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T18:05:53.065Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 142, + "Title": "Camera.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Graphic\\Camera.cs", + "RelativeDocumentMoniker": "StgSharp\\Math\\Graphic\\Camera.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Graphic\\Camera.cs", + "RelativeToolTip": "StgSharp\\Math\\Graphic\\Camera.cs", + "ViewState": "AgIAAIUAAAAAAAAAAAA0wJEAAAAiAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T17:59:14.403Z" + }, + { + "$type": "Document", + "DocumentIndex": 73, + "Title": "FBO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\FBO.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\FBO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\FBO.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\FBO.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABcAAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T17:58:38.22Z" + }, + { + "$type": "Document", + "DocumentIndex": 74, + "Title": "EBO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\EBO.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\EBO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\EBO.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\EBO.cs", + "ViewState": "AgIAABwAAAAAAAAAAAAYwC8AAAAYAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T17:58:29.9Z" + }, + { + "$type": "Document", + "DocumentIndex": 41, + "Title": "GlobalSuppressions.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\GlobalSuppressions.cs", + "RelativeDocumentMoniker": "StgSharp\\GlobalSuppressions.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\GlobalSuppressions.cs", + "RelativeToolTip": "StgSharp\\GlobalSuppressions.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T17:41:12.94Z" + }, + { + "$type": "Document", + "DocumentIndex": 99, + "Title": "BufferObjectBase.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Define\\BufferObjectBase.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Define\\BufferObjectBase.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Define\\BufferObjectBase.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\Define\\BufferObjectBase.cs", + "ViewState": "AgIAADAAAAAAAAAAAIBgwE4AAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T17:23:55.021Z" + }, + { + "$type": "Document", + "DocumentIndex": 148, + "Title": "glConst.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Define\\glConst.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\Define\\glConst.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Define\\glConst.cs", + "RelativeToolTip": "StgSharp\\Graphics\\Define\\glConst.cs", + "ViewState": "AgIAAB0AAAAAAAAAAAAqwPQSAAAgAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T17:17:12.687Z" + }, + { + "$type": "Document", + "DocumentIndex": 147, + "Title": "VBO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\VBO.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\VBO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\VBO.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\VBO.cs", + "ViewState": "AgIAAIMAAAAAAAAAAAAowJIAAAAwAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T17:16:18.094Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 149, + "Title": "VAO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\VAO.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\VAO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\VAO.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\VAO.cs", + "ViewState": "AgIAADcAAAAAAAAAAAAUwEgAAAA1AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T17:15:13.91Z" + }, + { + "$type": "Document", + "DocumentIndex": 151, + "Title": "FBO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\FBO.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\FBO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\FBO.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\FBO.cs", + "ViewState": "AgIAAA4AAAAAAAAAAAAcwCYAAAAOAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T17:05:59.749Z" + }, + { + "$type": "Document", + "DocumentIndex": 155, + "Title": "InternalIO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\IO\\InternalIO.cs", + "RelativeDocumentMoniker": "StgSharp\\Controlling\\IO\\InternalIO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\IO\\InternalIO.cs", + "RelativeToolTip": "StgSharp\\Controlling\\IO\\InternalIO.cs", + "ViewState": "AgIAAFkAAAAAAAAAAAA0wGoAAAALAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T15:48:23.725Z" + }, + { + "$type": "Document", + "DocumentIndex": 141, + "Title": "Pixels.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Pixels.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\Pixels.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Pixels.cs", + "RelativeToolTip": "StgSharp\\Graphics\\Pixels.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-10T04:12:48.395Z" + }, + { + "$type": "Document", + "DocumentIndex": 160, + "Title": "glException.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glException.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glException.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glException.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glException.cs", + "ViewState": "AgIAABgAAAAAAAAAAAAYwDAAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-08T11:52:05.336Z" + }, + { + "$type": "Document", + "DocumentIndex": 129, + "Title": "StgSharp.csproj", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\StgSharp.csproj", + "RelativeDocumentMoniker": "StgSharp\\StgSharp.csproj", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\StgSharp.csproj", + "RelativeToolTip": "StgSharp\\StgSharp.csproj", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAUAAAAcAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", + "WhenOpened": "2024-07-08T10:39:35.673Z" + }, + { + "$type": "Document", + "DocumentIndex": 150, + "Title": "RBO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\RBO.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\RBO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\RBO.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\RBO.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABYAAAAtAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-07T17:45:11.682Z" + }, + { + "$type": "Document", + "DocumentIndex": 137, + "Title": "GlHandle.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\GlHandle.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\GlHandle.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\GlHandle.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\GlHandle.cs", + "ViewState": "AgIAACYAAAAAAAAAAAAYwDMAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-06T08:38:18.156Z" + }, + { + "$type": "Document", + "DocumentIndex": 152, + "Title": "BufferObjectBase.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Define\\BufferObjectBase.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\Define\\BufferObjectBase.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Define\\BufferObjectBase.cs", + "RelativeToolTip": "StgSharp\\Graphics\\Define\\BufferObjectBase.cs", + "ViewState": "AgIAABgAAAAAAAAAAAAYwCsAAAAqAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-06T06:22:32.666Z" + }, + { + "$type": "Document", + "DocumentIndex": 143, + "Title": "GLBufferObjectBase.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAYAAAAHAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-06T07:31:18.854Z" + }, + { + "$type": "Document", + "DocumentIndex": 153, + "Title": "EBO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\EBO.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\EBO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\EBO.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\EBO.cs", + "ViewState": "AgIAAA0AAAAAAAAAAAAswB4AAAAYAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-06T06:22:23.335Z" + }, + { + "$type": "Document", + "DocumentIndex": 235, + "Title": "MainRenderStream.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Test\\MainRenderStream.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Test\\MainRenderStream.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Test\\MainRenderStream.cs", + "RelativeToolTip": "StgSharpDebug\\Test\\MainRenderStream.cs", + "ViewState": "AgIAABsAAAAAAAAAAAA1wC4AAAAEAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T00:00:36.555Z" + }, + { + "$type": "Document", + "DocumentIndex": 230, + "Title": "RBO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\RBO.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\GL\\Buffer\\RBO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\RBO.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\GL\\Buffer\\RBO.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T00:00:23.15Z" + }, + { + "$type": "Document", + "DocumentIndex": 244, + "Title": "ViewModel.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ViewModel.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\ViewModel\\ViewModel.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ViewModel.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\ViewModel\\ViewModel.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T00:00:20.456Z" + }, + { + "$type": "Document", + "DocumentIndex": 161, + "Title": "ShaderStruct.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\ShaderEdit\\ShaderStruct.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\ShaderEdit\\ShaderStruct.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\ShaderEdit\\ShaderStruct.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\ShaderEdit\\ShaderStruct.cs", + "ViewState": "AgIAABUAAAAAAAAAAAAYwCgAAAAjAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T00:00:17.716Z" + }, + { + "$type": "Document", + "DocumentIndex": 231, + "Title": "EBO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\EBO.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\GL\\Buffer\\EBO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\EBO.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\GL\\Buffer\\EBO.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T00:00:15.821Z" + }, + { + "$type": "Document", + "DocumentIndex": 19, + "Title": "CollisionTexture.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Stg\\CollisionTexture.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Stg\\CollisionTexture.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Stg\\CollisionTexture.cs", + "RelativeToolTip": "StgSharpDebug\\Stg\\CollisionTexture.cs", + "ViewState": "AgIAAA8AAAAAAAAAAAAvwCIAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T00:00:12.581Z" + }, + { + "$type": "Document", + "DocumentIndex": 97, + "Title": "Camera.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Math\\Graphic\\Camera.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Math\\Graphic\\Camera.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Math\\Graphic\\Camera.cs", + "RelativeToolTip": "StgSharpDebug\\Math\\Graphic\\Camera.cs", + "ViewState": "AgIAADkAAAAAAAAAAAAcwEUAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T00:00:11.807Z" + }, + { + "$type": "Document", + "DocumentIndex": 232, + "Title": "Shader.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\ShaderEdit\\Shader.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\GL\\ShaderEdit\\Shader.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\ShaderEdit\\Shader.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\GL\\ShaderEdit\\Shader.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T00:00:06.545Z" + }, + { + "$type": "Document", + "DocumentIndex": 233, + "Title": "VBO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\VBO.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\GL\\Buffer\\VBO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\VBO.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\GL\\Buffer\\VBO.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-27T23:58:09.408Z" + }, + { + "$type": "Document", + "DocumentIndex": 234, + "Title": "glRenderStream.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\glRenderStream.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\GL\\glRenderStream.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\glRenderStream.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\GL\\glRenderStream.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-27T23:55:40.542Z" + }, + { + "$type": "Document", + "DocumentIndex": 145, + "Title": "Uniform.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Uniform.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Uniform.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Uniform.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Uniform.cs", + "ViewState": "AgIAAJEAAAAAAAAAAAAUwCsAAAAFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-27T17:58:58.669Z" + }, + { + "$type": "Document", + "DocumentIndex": 162, + "Title": "IGraphicAPIs.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\IGraphicAPIs.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\IGraphicAPIs.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\IGraphicAPIs.cs", + "RelativeToolTip": "StgSharp\\Graphics\\IGraphicAPIs.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAA2AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-27T17:54:48.427Z" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "Program.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\Program.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\Program.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\Program.cs", + "RelativeToolTip": "StgSharpDebug\\Demo\\Program.cs", + "ViewState": "AgIAAC0AAAAAAAAAAAAvwB4AAAAjAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-26T19:34:28.297Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 42, + "Title": "BpNodeBuilder.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BpNodeBuilder.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\BpNodeBuilder.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BpNodeBuilder.cs", + "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\BpNodeBuilder.cs", + "ViewState": "AgIAAC8AAAAAAAAAAAAvwEIAAAAXAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-26T19:26:13.669Z" + }, + { + "$type": "Document", + "DocumentIndex": 55, + "Title": "IConvertableToBlueprintNode.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\IConvertableToBlueprintNode.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\IConvertableToBlueprintNode.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\IConvertableToBlueprintNode.cs", + "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\IConvertableToBlueprintNode.cs", + "ViewState": "AgIAAA4AAAAAAAAAAAAYwCMAAAAcAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-25T23:11:19.554Z" + }, + { + "$type": "Document", + "DocumentIndex": 56, + "Title": "BpNodeActionAttribute.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BpNodeActionAttribute.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\BpNodeActionAttribute.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BpNodeActionAttribute.cs", + "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\BpNodeActionAttribute.cs", + "ViewState": "AgIAAAkAAAAAAAAAAAAAACIAAAAcAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-25T18:43:08.93Z" + }, + { + "$type": "Document", + "DocumentIndex": 163, + "Title": "glfw3.h", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\glfw3.h", + "RelativeDocumentMoniker": "StgSharpC\\glfw3.h", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\glfw3.h", + "RelativeToolTip": "StgSharpC\\glfw3.h", + "ViewState": "AgIAAAMRAAAAAAAAAAAqwBURAAAXAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", + "WhenOpened": "2024-06-22T23:24:18.461Z" + }, + { + "$type": "Document", + "DocumentIndex": 248, + "Title": "CrossFrameBlueprintNode.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\CrossFrameBlueprintNode.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Blueprint\\CrossFrameBlueprintNode.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\CrossFrameBlueprintNode.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Blueprint\\CrossFrameBlueprintNode.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-17T18:41:24.48Z" + }, + { + "$type": "Document", + "DocumentIndex": 52, + "Title": "PipeLine.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\PipeLine.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\PipeLine.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\PipeLine.cs", + "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\PipeLine.cs", + "ViewState": "AgIAAGMAAAAAAAAAAAAowCgAAAAcAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-16T23:18:28.288Z" + }, + { + "$type": "Document", + "DocumentIndex": 91, + "Title": "InternalData.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\InternalData.cs", + "RelativeDocumentMoniker": "StgSharp\\Data\\InternalData.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\InternalData.cs", + "RelativeToolTip": "StgSharp\\Data\\InternalData.cs", + "ViewState": "AgIAAAAAAAAAAAAAAIBQwBUAAAAMAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-16T20:31:52.702Z" + }, + { + "$type": "Document", + "DocumentIndex": 60, + "Title": "GlobalSetting.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\GlobalSetting.cs", + "RelativeDocumentMoniker": "StgSharp\\Environment\\GlobalSetting.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\GlobalSetting.cs", + "RelativeToolTip": "StgSharp\\Environment\\GlobalSetting.cs", + "ViewState": "AgIAADQAAAAAAAAAAAAvwEkAAAA2AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-16T20:30:52.772Z" + }, + { + "$type": "Document", + "DocumentIndex": 175, + "Title": "globalKeyStat.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\globalKeyStat.cs", + "RelativeDocumentMoniker": "StgSharp\\Environment\\globalKeyStat.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\globalKeyStat.cs", + "RelativeToolTip": "StgSharp\\Environment\\globalKeyStat.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-16T20:30:52.177Z" + }, + { + "$type": "Document", + "DocumentIndex": 176, + "Title": "ErrorDefine.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\ErrorDefine.cs", + "RelativeDocumentMoniker": "StgSharp\\Environment\\ErrorDefine.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\ErrorDefine.cs", + "RelativeToolTip": "StgSharp\\Environment\\ErrorDefine.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-16T20:30:51.103Z" + }, + { + "$type": "Document", + "DocumentIndex": 49, + "Title": "CancellableTask.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\CancellableTask.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\CancellableTask.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\CancellableTask.cs", + "RelativeToolTip": "StgSharp\\Logic\\CancellableTask.cs", + "ViewState": "AgIAACAAAAAAAAAAAAAYwCQAAAAdAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-16T19:05:18.993Z" + }, + { + "$type": "Document", + "DocumentIndex": 46, + "Title": "SizeFixedList.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Collections\\SizeFixedList.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Collections\\SizeFixedList.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Collections\\SizeFixedList.cs", + "RelativeToolTip": "StgSharp\\Logic\\Collections\\SizeFixedList.cs", + "ViewState": "AgIAAAUAAAAAAAAAAAAIwEQAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-15T10:12:43.359Z" + }, + { + "$type": "Document", + "DocumentIndex": 44, + "Title": "BlueprintRunner.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BlueprintRunner.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\BlueprintRunner.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BlueprintRunner.cs", + "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\BlueprintRunner.cs", + "ViewState": "AgIAAGQAAAAAAAAAAAAhwJEAAAAVAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-15T09:28:36.087Z" + }, + { + "$type": "Document", + "DocumentIndex": 50, + "Title": "BlueprintNode.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BlueprintNode.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\BlueprintNode.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BlueprintNode.cs", + "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\BlueprintNode.cs", + "ViewState": "AgIAAGAAAAAAAAAAAAA1wLgAAAAtAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-14T15:52:07.701Z" + }, + { + "$type": "Document", + "DocumentIndex": 54, + "Title": "SideNode.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\SideNode.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\SideNode.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\SideNode.cs", + "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\SideNode.cs", + "ViewState": "AgIAAAsAAAAAAAAAAAAswCgAAAAcAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-14T13:21:31.686Z" + }, + { + "$type": "Document", + "DocumentIndex": 165, + "Title": "Platform.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\Platform.cs", + "RelativeDocumentMoniker": "StgSharp\\Environment\\Platform.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\Platform.cs", + "RelativeToolTip": "StgSharp\\Environment\\Platform.cs", + "ViewState": "AgIAAEYAAAAAAAAAAAAqwFoAAAAeAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-12T18:52:56.596Z" + }, + { + "$type": "Document", + "DocumentIndex": 166, + "Title": "TimeProvider.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\TimeProvider.cs", + "RelativeDocumentMoniker": "StgSharp\\Environment\\TimeProvider.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\TimeProvider.cs", + "RelativeToolTip": "StgSharp\\Environment\\TimeProvider.cs", + "ViewState": "AgIAAG8AAAAAAAAAAAAWwHQAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-12T18:36:15.947Z" + }, + { + "$type": "Document", + "DocumentIndex": 47, + "Title": "TimeSpanProvider.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Timing\\TimeSpanProvider.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Timing\\TimeSpanProvider.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Timing\\TimeSpanProvider.cs", + "RelativeToolTip": "StgSharp\\Logic\\Timing\\TimeSpanProvider.cs", + "ViewState": "AgIAAA8AAAAAAAAAAADwvyQAAAAZAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-12T18:36:02.299Z" + }, + { + "$type": "Document", + "DocumentIndex": 53, + "Title": "RouteSwitch.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\RouteSwitch.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\RouteSwitch.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\RouteSwitch.cs", + "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\RouteSwitch.cs", + "ViewState": "AgIAABgAAAAAAAAAAAAqwCUAAAAcAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-11T08:57:14.896Z" + }, + { + "$type": "Document", + "DocumentIndex": 168, + "Title": "Area.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\Area.cs", + "RelativeDocumentMoniker": "StgSharp\\Data\\SSD\\Area.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\Area.cs", + "RelativeToolTip": "StgSharp\\Data\\SSD\\Area.cs", + "ViewState": "AgIAAAUAAAAAAAAAAAAewBEAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-09T14:42:51.329Z" + }, + { + "$type": "Document", + "DocumentIndex": 172, + "Title": "SSD.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\SSD.cs", + "RelativeDocumentMoniker": "StgSharp\\Data\\SSD\\SSD.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\SSD.cs", + "RelativeToolTip": "StgSharp\\Data\\SSD\\SSD.cs", + "ViewState": "AgIAABsAAAAAAAAAAAAuwD0AAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-09T14:29:46.286Z" + }, + { + "$type": "Document", + "DocumentIndex": 171, + "Title": "SSDVirtualFolder.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\SSDVirtualFolder.cs", + "RelativeDocumentMoniker": "StgSharp\\Data\\SSD\\SSDVirtualFolder.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\SSDVirtualFolder.cs", + "RelativeToolTip": "StgSharp\\Data\\SSD\\SSDVirtualFolder.cs", + "ViewState": "AgIAAC8AAAAAAAAAAAAWwEgAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-09T14:23:14.051Z" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "Image.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Image.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\Image.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Image.cs", + "RelativeToolTip": "StgSharp\\Graphics\\Image.cs", + "ViewState": "AgIAADAAAAAAAAAAAAAWwEIAAAAWAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-09T13:44:55.317Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 188, + "Title": "TouhouBuilder.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\Touhou\\TouhouBuilder.cs", + "RelativeDocumentMoniker": "StgSharp\\Stg\\Touhou\\TouhouBuilder.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\Touhou\\TouhouBuilder.cs", + "RelativeToolTip": "StgSharp\\Stg\\Touhou\\TouhouBuilder.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABYAAAAMAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-07T19:03:41.093Z" + }, + { + "$type": "Document", + "DocumentIndex": 90, + "Title": "TouhouWindow.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\Touhou\\TouhouWindow.cs", + "RelativeDocumentMoniker": "StgSharp\\Stg\\Touhou\\TouhouWindow.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\Touhou\\TouhouWindow.cs", + "RelativeToolTip": "StgSharp\\Stg\\Touhou\\TouhouWindow.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAuwAwAAAA7AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-07T16:57:59.012Z" + }, + { + "$type": "Document", + "DocumentIndex": 189, + "Title": "Program.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgsharpEnvDebug\\Program.cs", + "RelativeDocumentMoniker": "StgsharpEnvDebug\\Program.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgsharpEnvDebug\\Program.cs", + "RelativeToolTip": "StgsharpEnvDebug\\Program.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABsAAAAGAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-06T18:37:51.094Z" + }, + { + "$type": "Document", + "DocumentIndex": 122, + "Title": "ViewManage.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\ViewManage.cs", + "RelativeDocumentMoniker": "StgSharp\\MVVM\\ViewModel\\ViewManage.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\ViewManage.cs", + "RelativeToolTip": "StgSharp\\MVVM\\ViewModel\\ViewManage.cs", + "ViewState": "AgIAACkAAAAAAAAAAAA2wDgAAAAFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-06T08:10:50.451Z" + }, + { + "$type": "Document", + "DocumentIndex": 121, + "Title": "ShowViewPort.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\ShowViewPort.cs", + "RelativeDocumentMoniker": "StgSharp\\MVVM\\ViewModel\\ShowViewPort.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\ShowViewPort.cs", + "RelativeToolTip": "StgSharp\\MVVM\\ViewModel\\ShowViewPort.cs", + "ViewState": "AgIAAC4AAAAAAAAAAAAYwEYAAAANAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-06T07:49:36.575Z" + }, + { + "$type": "Document", + "DocumentIndex": 127, + "Title": "ViewPort.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewPort.cs", + "RelativeDocumentMoniker": "StgSharp\\MVVM\\ViewPort.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewPort.cs", + "RelativeToolTip": "StgSharp\\MVVM\\ViewPort.cs", + "ViewState": "AgIAABUAAAAAAAAAAAAAwCsAAAAZAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-06T06:43:01.237Z" + }, + { + "$type": "Document", + "DocumentIndex": 36, + "Title": "ViewModel.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\ViewModel.cs", + "RelativeDocumentMoniker": "StgSharp\\MVVM\\ViewModel\\ViewModel.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\ViewModel.cs", + "RelativeToolTip": "StgSharp\\MVVM\\ViewModel\\ViewModel.cs", + "ViewState": "AgIAADAAAAAAAAAAAAAvwEMAAAAtAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-05T19:19:57.97Z" + }, + { + "$type": "Document", + "DocumentIndex": 195, + "Title": "Cordinate.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Cordinate.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Cordinate.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Cordinate.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Cordinate.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-04T09:20:55.089Z" + }, + { + "$type": "Document", + "DocumentIndex": 196, + "Title": "Square.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Square.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Square.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Square.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Square.cs", + "ViewState": "AgIAABoAAAAAAAAAAAAtwDMAAAAaAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-03T19:26:11.603Z" + }, + { + "$type": "Document", + "DocumentIndex": 193, + "Title": "Rectangle.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Rectangle.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Rectangle.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Rectangle.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Rectangle.cs", + "ViewState": "AgIAACoAAAAAAAAAAAAawCwAAAASAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-03T18:55:48.318Z" + }, + { + "$type": "Document", + "DocumentIndex": 156, + "Title": "Triangle.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Triangle.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Triangle.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Triangle.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Triangle.cs", + "ViewState": "AgIAAEYAAAAAAAAAAAAYwFwAAAAoAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-03T18:53:18.064Z" + }, + { + "$type": "Document", + "DocumentIndex": 194, + "Title": "Parallelogram.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Parallelogram.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Parallelogram.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Parallelogram.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Parallelogram.cs", + "ViewState": "AgIAACAAAAAAAAAAAAAtwD8AAAAGAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-03T18:45:48.87Z" + }, + { + "$type": "Document", + "DocumentIndex": 159, + "Title": "Polygon5.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Polygon5.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Polygon5.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Polygon5.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Polygon5.cs", + "ViewState": "AgIAADwAAAAAAAAAAAAYwE8AAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-03T12:56:34.052Z" + }, + { + "$type": "Document", + "DocumentIndex": 157, + "Title": "Polygon6.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Polygon6.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Polygon6.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Polygon6.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Polygon6.cs", + "ViewState": "AgIAAC4AAAAAAAAAAAAqwEIAAAAoAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-03T12:53:07.67Z" + }, + { + "$type": "Document", + "DocumentIndex": 200, + "Title": "Class1.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\SpaceGeometry\\Class1.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\SpaceGeometry\\Class1.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\SpaceGeometry\\Class1.cs", + "RelativeToolTip": "StgSharp\\Geometries\\SpaceGeometry\\Class1.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-03T08:05:08.74Z" + }, + { + "$type": "Document", + "DocumentIndex": 199, + "Title": "SpaceCoordinate.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\SpaceCoordinate.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\Coordination\\SpaceCoordinate.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\SpaceCoordinate.cs", + "RelativeToolTip": "StgSharp\\Geometries\\Coordination\\SpaceCoordinate.cs", + "ViewState": "AgIAAA8AAAAAAAAAAIBgwCoAAAAxAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-03T08:04:00.326Z" + }, + { + "$type": "Document", + "DocumentIndex": 158, + "Title": "Polygon4.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Polygon4.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Polygon4.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Polygon4.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Polygon4.cs", + "ViewState": "AgIAABQAAAAAAAAAAAAqwCgAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-03T07:48:31.982Z" + }, + { + "$type": "Document", + "DocumentIndex": 204, + "Title": "Cordination.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Cordination.cs", + "RelativeDocumentMoniker": "StgSharp\\Math\\Linear\\Cordination.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Cordination.cs", + "RelativeToolTip": "StgSharp\\Math\\Linear\\Cordination.cs", + "ViewState": "AgIAAAYAAAAAAAAAAIBgwB8AAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-03T07:16:53.497Z" + }, + { + "$type": "Document", + "DocumentIndex": 198, + "Title": "Point.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Point.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\Point.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Point.cs", + "RelativeToolTip": "StgSharp\\Geometries\\Point.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABUAAAAhAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-03T07:00:50.569Z" + }, + { + "$type": "Document", + "DocumentIndex": 205, + "Title": "Vector.Cross.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Vector.Cross.cs", + "RelativeDocumentMoniker": "StgSharp\\Math\\Linear\\Vector.Cross.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Vector.Cross.cs", + "RelativeToolTip": "StgSharp\\Math\\Linear\\Vector.Cross.cs", + "ViewState": "AgIAABIAAAAAAAAAAIBgwB8AAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-02T18:55:17.351Z" + }, + { + "$type": "Document", + "DocumentIndex": 191, + "Title": "IGeometry.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\IGeometry.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\IGeometry.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\IGeometry.cs", + "RelativeToolTip": "StgSharp\\Geometries\\IGeometry.cs", + "ViewState": "AgIAAB8AAAAAAAAAAAAiwDMAAAAeAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-02T18:32:52.786Z" + }, + { + "$type": "Document", + "DocumentIndex": 211, + "Title": "JoystickTrigger.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\UsrActivity\\JoystickTrigger.cs", + "RelativeDocumentMoniker": "StgSharp\\Controlling\\UsrActivity\\JoystickTrigger.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\UsrActivity\\JoystickTrigger.cs", + "RelativeToolTip": "StgSharp\\Controlling\\UsrActivity\\JoystickTrigger.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACsAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-02T17:59:29.232Z" + }, + { + "$type": "Document", + "DocumentIndex": 212, + "Title": "ITrigger.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\UsrActivity\\ITrigger.cs", + "RelativeDocumentMoniker": "StgSharp\\Controlling\\UsrActivity\\ITrigger.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\UsrActivity\\ITrigger.cs", + "RelativeToolTip": "StgSharp\\Controlling\\UsrActivity\\ITrigger.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAAiAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-02T17:56:15.991Z" + }, + { + "$type": "Document", + "DocumentIndex": 177, + "Title": "KeyTrigger.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\UsrActivity\\KeyTrigger.cs", + "RelativeDocumentMoniker": "StgSharp\\Controlling\\UsrActivity\\KeyTrigger.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\UsrActivity\\KeyTrigger.cs", + "RelativeToolTip": "StgSharp\\Controlling\\UsrActivity\\KeyTrigger.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAmAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-02T17:48:14.248Z" + }, + { + "$type": "Document", + "DocumentIndex": 31, + "Title": "MarkingLable.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\MarkingLable.cs", + "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\MarkingLable.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\MarkingLable.cs", + "RelativeToolTip": "StgSharp\\Controlling\\Controls\\MarkingLable.cs", + "ViewState": "AgIAABwAAAAAAAAAAAAvwDAAAAAUAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-01T19:38:52.786Z" + }, + { + "$type": "Document", + "DocumentIndex": 180, + "Title": "DecorationBox.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\DecorationBox.cs", + "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\DecorationBox.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\DecorationBox.cs", + "RelativeToolTip": "StgSharp\\Controlling\\Controls\\DecorationBox.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABEAAAAqAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-01T19:38:36.894Z" + }, + { + "$type": "Document", + "DocumentIndex": 182, + "Title": "BattleField.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\BattleField.cs", + "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\BattleField.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\BattleField.cs", + "RelativeToolTip": "StgSharp\\Controlling\\Controls\\BattleField.cs", + "ViewState": "AgIAABcAAAAAAAAAAAAtwC8AAAASAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-01T19:37:53.117Z" + }, + { + "$type": "Document", + "DocumentIndex": 224, + "Title": "KeyEvent.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\KeyEvent.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\KeyEvent.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\KeyEvent.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\KeyEvent.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-31T17:44:19.826Z" + }, + { + "$type": "Document", + "DocumentIndex": 181, + "Title": "CharacterIndexImage.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\CharacterIndexImage.cs", + "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\CharacterIndexImage.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\CharacterIndexImage.cs", + "RelativeToolTip": "StgSharp\\Controlling\\Controls\\CharacterIndexImage.cs", + "ViewState": "AgIAAB8AAAAAAAAAAADgvzMAAAAmAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-31T07:27:57.971Z" + }, + { + "$type": "Document", + "DocumentIndex": 187, + "Title": "KeyControl.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\KeyControl.cs", + "RelativeDocumentMoniker": "StgSharp\\Controlling\\KeyControl.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\KeyControl.cs", + "RelativeToolTip": "StgSharp\\Controlling\\KeyControl.cs", + "ViewState": "AgIAAFMAAAAAAAAAAAAtwHIAAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-30T03:47:10.188Z" + }, + { + "$type": "Document", + "DocumentIndex": 130, + "Title": "ButtonGroup.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\ButtonGroup.cs", + "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\ButtonGroup.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\ButtonGroup.cs", + "RelativeToolTip": "StgSharp\\Controlling\\Controls\\ButtonGroup.cs", + "ViewState": "AgIAAHwAAAAAAAAAAAAqwJAAAAAUAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-30T03:07:38.817Z" + }, + { + "$type": "Document", + "DocumentIndex": 178, + "Title": "PlainGeometryMesh.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\PlainGeometryMesh.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\PlainGeometryMesh.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\PlainGeometryMesh.cs", + "RelativeToolTip": "StgSharp\\Graphics\\PlainGeometryMesh.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACoAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-29T18:54:22.53Z" + }, + { + "$type": "Document", + "DocumentIndex": 183, + "Title": "ControllingIntem.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\ControllingIntem.cs", + "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\ControllingIntem.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\ControllingIntem.cs", + "RelativeToolTip": "StgSharp\\Controlling\\Controls\\ControllingIntem.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAuwBgAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-29T18:52:06.895Z" + }, + { + "$type": "Document", + "DocumentIndex": 179, + "Title": "TriggerButton.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\TriggerButton.cs", + "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\TriggerButton.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\TriggerButton.cs", + "RelativeToolTip": "StgSharp\\Controlling\\Controls\\TriggerButton.cs", + "ViewState": "AgIAAFEAAAAAAAAAAAAswG8AAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-29T18:46:16.098Z" + }, + { + "$type": "Document", + "DocumentIndex": 225, + "Title": "KeyboardButton.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\KeyboardButton.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\KeyboardButton.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\KeyboardButton.cs", + "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\KeyboardButton.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-29T18:45:36.72Z" + }, + { + "$type": "Document", + "DocumentIndex": 208, + "Title": "Plain.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Plain.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Plain.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Plain.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Plain.cs", + "ViewState": "AgIAADwAAAAAAAAAAAAUwEsAAAAfAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-29T03:14:59.807Z" + }, + { + "$type": "Document", + "DocumentIndex": 209, + "Title": "IEntity.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Entities\\IEntity.cs", + "RelativeDocumentMoniker": "StgSharp\\Entities\\IEntity.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Entities\\IEntity.cs", + "RelativeToolTip": "StgSharp\\Entities\\IEntity.cs", + "ViewState": "AgIAACIAAAAAAAAAAAAywDkAAAAWAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-29T03:13:32.629Z" + }, + { + "$type": "Document", + "DocumentIndex": 167, + "Title": "DataSegment.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\DataSegment.cs", + "RelativeDocumentMoniker": "StgSharp\\Data\\SSD\\DataSegment.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\DataSegment.cs", + "RelativeToolTip": "StgSharp\\Data\\SSD\\DataSegment.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAC4AAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-29T03:13:13.688Z" + }, + { + "$type": "Document", + "DocumentIndex": 173, + "Title": "SSDraw.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\SSDraw.cs", + "RelativeDocumentMoniker": "StgSharp\\Data\\SSD\\SSDraw.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\SSDraw.cs", + "RelativeToolTip": "StgSharp\\Data\\SSD\\SSDraw.cs", + "ViewState": "AgIAADYAAAAAAAAAAAAcwEYAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-29T03:11:14.919Z" + }, + { + "$type": "Document", + "DocumentIndex": 222, + "Title": "Angle.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\GeometryOperation\\Angle.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\GeometryOperation\\Angle.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\GeometryOperation\\Angle.cs", + "RelativeToolTip": "StgSharpDebug\\Geometries\\GeometryOperation\\Angle.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-29T02:36:43.754Z" + }, + { + "$type": "Document", + "DocumentIndex": 164, + "Title": "framework.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\framework.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\framework.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\framework.cs", + "RelativeToolTip": "StgSharp\\Graphics\\framework.cs", + "ViewState": "AgIAAB4BAAAAAAAAAAAYwC8AAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T12:14:37.475Z" + }, + { + "$type": "Document", + "DocumentIndex": 34, + "Title": "TimeFunction.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Timing\\TimeFunction.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Timing\\TimeFunction.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Timing\\TimeFunction.cs", + "RelativeToolTip": "StgSharp\\Logic\\Timing\\TimeFunction.cs", + "ViewState": "AgIAAAkAAAAAAAAAAAAAAB4AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T12:14:28.529Z" + }, + { + "$type": "Document", + "DocumentIndex": 48, + "Title": "TimeSourceProvider.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Timing\\TimeSourceProvider.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Timing\\TimeSourceProvider.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Timing\\TimeSourceProvider.cs", + "RelativeToolTip": "StgSharp\\Logic\\Timing\\TimeSourceProvider.cs", + "ViewState": "AgIAABQAAAAAAAAAAAAvwCQAAAAZAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T12:14:27.563Z" + }, + { + "$type": "Document", + "DocumentIndex": 206, + "Title": "Vector.Normalize.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Vector.Normalize.cs", + "RelativeDocumentMoniker": "StgSharp\\Math\\Linear\\Vector.Normalize.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Vector.Normalize.cs", + "RelativeToolTip": "StgSharp\\Math\\Linear\\Vector.Normalize.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACcAAAAdAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T12:13:20.051Z" + }, + { + "$type": "Document", + "DocumentIndex": 184, + "Title": "ParticleOnPlain.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\ParticleOnPlain.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Define\\ParticleOnPlain.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\ParticleOnPlain.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Define\\ParticleOnPlain.cs", + "ViewState": "AgIAADkAAAAAAAAAAAAwwCoAAAApAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T12:13:03.322Z" + }, + { + "$type": "Document", + "DocumentIndex": 214, + "Title": "IInstancingBuffer.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\IInstancingBuffer.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\IInstancingBuffer.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\IInstancingBuffer.cs", + "RelativeToolTip": "StgSharp\\Geometries\\IInstancingBuffer.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA8AAAAmAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T12:12:51.691Z" + }, + { + "$type": "Document", + "DocumentIndex": 185, + "Title": "IInstancing.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\IInstancing.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\IInstancing.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\IInstancing.cs", + "RelativeToolTip": "StgSharp\\Geometries\\IInstancing.cs", + "ViewState": "AgIAACkAAAAAAAAAAAAtwDYAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T12:12:47.113Z" + }, + { + "$type": "Document", + "DocumentIndex": 144, + "Title": "ShaderStruct.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\ShaderEdit\\ShaderStruct.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\ShaderEdit\\ShaderStruct.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\ShaderEdit\\ShaderStruct.cs", + "RelativeToolTip": "StgSharp\\Graphics\\ShaderEdit\\ShaderStruct.cs", + "ViewState": "AgIAAAMAAAAAAAAAAIBgwCsAAAApAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T12:06:38.571Z" + }, + { + "$type": "Document", + "DocumentIndex": 215, + "Title": "ShaderGenerator.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\ShaderEdit\\ShaderGenerator.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\ShaderEdit\\ShaderGenerator.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\ShaderEdit\\ShaderGenerator.cs", + "RelativeToolTip": "StgSharp\\Graphics\\ShaderEdit\\ShaderGenerator.cs", + "ViewState": "AgIAAHsAAAAAAAAAAAAowAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T12:06:34.296Z" + }, + { + "$type": "Document", + "DocumentIndex": 216, + "Title": "GLIO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\IO\\GLIO.cs", + "RelativeDocumentMoniker": "StgSharp\\Controlling\\IO\\GLIO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\IO\\GLIO.cs", + "RelativeToolTip": "StgSharp\\Controlling\\IO\\GLIO.cs", + "ViewState": "AgIAAEUAAAAAAAAAAAAcwCoAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T09:53:35.017Z" + }, + { + "$type": "Document", + "DocumentIndex": 63, + "Title": "TextureGL.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", + "ViewState": "AgIAACoAAAAAAAAAAIBQwDsAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T09:52:02.572Z" + }, + { + "$type": "Document", + "DocumentIndex": 134, + "Title": "glEnum.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Define\\glEnum.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\Define\\glEnum.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Define\\glEnum.cs", + "RelativeToolTip": "StgSharp\\Graphics\\Define\\glEnum.cs", + "ViewState": "AgIAACUAAAAAAAAAAAAqwD0AAABLAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T09:51:55.169Z" + }, + { + "$type": "Document", + "DocumentIndex": 217, + "Title": "Angle.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\GeometryScaler\\Angle.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\GeometryScaler\\Angle.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\GeometryScaler\\Angle.cs", + "RelativeToolTip": "StgSharp\\Geometries\\GeometryScaler\\Angle.cs", + "ViewState": "AgIAAHEAAAAAAAAAAEBAwH8AAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T09:50:33.189Z" + }, + { + "$type": "Document", + "DocumentIndex": 64, + "Title": "CollisionTexture.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\CollisionTexture.cs", + "RelativeDocumentMoniker": "StgSharp\\Stg\\CollisionTexture.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\CollisionTexture.cs", + "RelativeToolTip": "StgSharp\\Stg\\CollisionTexture.cs", + "ViewState": "AgIAAIkAAAAAAAAAAAAhwKkAAAAjAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-28T09:47:06.034Z" + }, + { + "$type": "Document", + "DocumentIndex": 169, + "Title": "ISSDSerializable.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\Serialize\\ISSDSerializable.cs", + "RelativeDocumentMoniker": "StgSharp\\Data\\Serialize\\ISSDSerializable.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\Serialize\\ISSDSerializable.cs", + "RelativeToolTip": "StgSharp\\Data\\Serialize\\ISSDSerializable.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABwAAAAkAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-14T02:11:24.157Z" + }, + { + "$type": "Document", + "DocumentIndex": 170, + "Title": "Define.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\Serialize\\Define.cs", + "RelativeDocumentMoniker": "StgSharp\\Data\\Serialize\\Define.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\Serialize\\Define.cs", + "RelativeToolTip": "StgSharp\\Data\\Serialize\\Define.cs", + "ViewState": "AgIAAA8AAAAAAAAAAMBowAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-14T02:11:21.58Z" + }, + { + "$type": "Document", + "DocumentIndex": 218, + "Title": "M128.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\M128.cs", + "RelativeDocumentMoniker": "StgSharp\\Data\\M128.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\M128.cs", + "RelativeToolTip": "StgSharp\\Data\\M128.cs", + "ViewState": "AgIAACcAAAAAAAAAAIBgwD0AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-14T02:06:36.634Z" + }, + { + "$type": "Document", + "DocumentIndex": 174, + "Title": "RandomGenerator.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\RandomGenerator.cs", + "RelativeDocumentMoniker": "StgSharp\\Data\\RandomGenerator.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\RandomGenerator.cs", + "RelativeToolTip": "StgSharp\\Data\\RandomGenerator.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABgAAAAMAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-14T01:44:33.9Z" + }, + { + "$type": "Document", + "DocumentIndex": 213, + "Title": "StgSharpC.h", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\StgSharpC.h", + "RelativeDocumentMoniker": "StgSharpC\\StgSharpC.h", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\StgSharpC.h", + "RelativeToolTip": "StgSharpC\\StgSharpC.h", + "ViewState": "AgIAABgAAAAAAAAAAIAwwCgAAAAoAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", + "WhenOpened": "2024-05-11T21:42:41.09Z" + }, + { + "$type": "Document", + "DocumentIndex": 133, + "Title": "glFunction.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glFunction.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glFunction.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glFunction.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glFunction.cs", + "ViewState": "AgIAAPsAAAAAAAAAAABCwA4BAAArAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-11T21:22:23.016Z" + }, + { + "$type": "Document", + "DocumentIndex": 146, + "Title": "Shader.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Shader.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Shader.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Shader.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Shader.cs", + "ViewState": "AgIAALwAAAAAAAAAAAAcwN4AAAAcAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-11T19:37:12.456Z" + }, + { + "$type": "Document", + "DocumentIndex": 51, + "Title": "Blueprint.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\Blueprint.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\Blueprint.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\Blueprint.cs", + "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\Blueprint.cs", + "ViewState": "AgIAADQAAAAAAAAAAAAYwDQAAAAeAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-11T15:59:06.55Z" + }, + { + "$type": "Document", + "DocumentIndex": 124, + "Title": "ViewBase.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewBase.cs", + "RelativeDocumentMoniker": "StgSharp\\MVVM\\View\\ViewBase.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewBase.cs", + "RelativeToolTip": "StgSharp\\MVVM\\View\\ViewBase.cs", + "ViewState": "AgIAAH0AAAAAAAAAACBlwJoAAAAmAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-11T05:11:47.098Z" + }, + { + "$type": "Document", + "DocumentIndex": 219, + "Title": "GeometryOperation.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\GeometryOperation.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Define\\GeometryOperation.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\GeometryOperation.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Define\\GeometryOperation.cs", + "ViewState": "AgIAABUAAAAAAAAAAIA0wCUAAAAfAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-10T04:35:10.414Z" + }, + { + "$type": "Document", + "DocumentIndex": 35, + "Title": "GeometryOperation.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\GeometryOperation\\GeometryOperation.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\GeometryOperation\\GeometryOperation.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\GeometryOperation\\GeometryOperation.cs", + "RelativeToolTip": "StgSharp\\Geometries\\GeometryOperation\\GeometryOperation.cs", + "ViewState": "AgIAAAYAAAAAAAAAAAAhwD8AAAAzAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-10T04:34:22.843Z" + }, + { + "$type": "Document", + "DocumentIndex": 192, + "Title": "PlainGeometry.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", + "ViewState": "AgIAACUAAAAAAAAAAAAtwDoAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-09T11:36:04.039Z" + }, + { + "$type": "Document", + "DocumentIndex": 186, + "Title": "IPlainEntity.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\IPlainEntity.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Define\\IPlainEntity.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\IPlainEntity.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Define\\IPlainEntity.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAuwBMAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-09T11:36:00.584Z" + }, + { + "$type": "Document", + "DocumentIndex": 154, + "Title": "glResourceGenrator.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glResourceGenrator.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glResourceGenrator.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glResourceGenrator.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glResourceGenrator.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACcAAAAZAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-09T09:44:36.325Z" + }, + { + "$type": "Document", + "DocumentIndex": 38, + "Title": "glRenderStream.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glRenderStream.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glRenderStream.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glRenderStream.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glRenderStream.cs", + "ViewState": "AgIAAAsAAAAAAAAAAAAvwCQAAAAYAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-09T09:42:14.767Z" + }, + { + "$type": "Document", + "DocumentIndex": 126, + "Title": "RenderStream.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\RenderStream.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\RenderStream.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\RenderStream.cs", + "RelativeToolTip": "StgSharp\\Graphics\\RenderStream.cs", + "ViewState": "AgIAABYAAAAAAAAAAAAzwCMAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-09T09:42:08.831Z" + }, + { + "$type": "Document", + "DocumentIndex": 210, + "Title": "StreamLocalCoordinate.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\StreamLocalCoordinate.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\Coordination\\StreamLocalCoordinate.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\StreamLocalCoordinate.cs", + "RelativeToolTip": "StgSharp\\Geometries\\Coordination\\StreamLocalCoordinate.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAGAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-09T03:46:07.408Z" + }, + { + "$type": "Document", + "DocumentIndex": 221, + "Title": "vec3d.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\vec3d.cs", + "RelativeDocumentMoniker": "StgSharp\\Math\\Linear\\vec3d.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\vec3d.cs", + "RelativeToolTip": "StgSharp\\Math\\Linear\\vec3d.cs", + "ViewState": "AgIAACwAAAAAAAAAAAAjwD4AAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-09T03:42:19.181Z" + }, + { + "$type": "Document", + "DocumentIndex": 203, + "Title": "vec4d.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\vec4d.cs", + "RelativeDocumentMoniker": "StgSharp\\Math\\Linear\\vec4d.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\vec4d.cs", + "RelativeToolTip": "StgSharp\\Math\\Linear\\vec4d.cs", + "ViewState": "AgIAAEcAAAAAAAAAAAAAwFcAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-09T03:40:47.919Z" + }, + { + "$type": "Document", + "DocumentIndex": 207, + "Title": "Vector.Orthogonalize.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Vector.Orthogonalize.cs", + "RelativeDocumentMoniker": "StgSharp\\Math\\Linear\\Vector.Orthogonalize.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Vector.Orthogonalize.cs", + "RelativeToolTip": "StgSharp\\Math\\Linear\\Vector.Orthogonalize.cs", + "ViewState": "AgIAACcAAAAAAAAAAAAtwDEAAAArAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-09T03:35:41.246Z" + }, + { + "$type": "Document", + "DocumentIndex": 201, + "Title": "CoordinationBase.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\CoordinationBase.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\Coordination\\CoordinationBase.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\CoordinationBase.cs", + "RelativeToolTip": "StgSharp\\Geometries\\Coordination\\CoordinationBase.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAuwAsAAAAFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-09T03:32:12.398Z" + }, + { + "$type": "Document", + "DocumentIndex": 197, + "Title": "PlainCoordinate.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\PlainCoordinate.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\Coordination\\PlainCoordinate.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\PlainCoordinate.cs", + "RelativeToolTip": "StgSharp\\Geometries\\Coordination\\PlainCoordinate.cs", + "ViewState": "AgIAACMAAAAAAAAAAAAiwD8AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-09T03:29:20.299Z" + }, + { + "$type": "Document", + "DocumentIndex": 202, + "Title": "PlainInstancingBuffer.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\PlainInstancingBuffer.cs", + "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Define\\PlainInstancingBuffer.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\PlainInstancingBuffer.cs", + "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Define\\PlainInstancingBuffer.cs", + "ViewState": "AgIAAB4AAAAAAAAAAIBgwFYAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-09T03:28:11.182Z" + }, + { + "$type": "Document", + "DocumentIndex": 220, + "Title": "Bullet.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\Bullet.cs", + "RelativeDocumentMoniker": "StgSharp\\Stg\\Bullet.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\Bullet.cs", + "RelativeToolTip": "StgSharp\\Stg\\Bullet.cs", + "ViewState": "AgIAAFkAAAAAAAAAAIA1wDUAAAANAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-09T03:22:55.279Z" + }, + { + "$type": "Document", + "DocumentIndex": 223, + "Title": "IInstancing.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\PlainGeometry\\Define\\IInstancing.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\PlainGeometry\\Define\\IInstancing.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\PlainGeometry\\Define\\IInstancing.cs", + "RelativeToolTip": "StgSharpDebug\\Geometries\\PlainGeometry\\Define\\IInstancing.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-08T17:39:31.95Z" + }, + { + "$type": "Document", + "DocumentIndex": 136, + "Title": "StgSharpC.c", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\StgSharpC.c", + "RelativeDocumentMoniker": "StgSharpC\\StgSharpC.c", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\StgSharpC.c", + "RelativeToolTip": "StgSharpC\\StgSharpC.c", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAA3AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000423|", + "WhenOpened": "2024-05-04T08:32:40.265Z" + }, + { + "$type": "Document", + "DocumentIndex": 227, + "Title": "ShowForm.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Form\\ShowForm.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Form\\ShowForm.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Form\\ShowForm.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\Form\\ShowForm.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-05-01T20:46:20.87Z" + }, + { + "$type": "Document", + "DocumentIndex": 190, + "Title": "MainForm.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\OEM\\MainForm.cs", + "RelativeDocumentMoniker": "OEM\\MainForm.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\OEM\\MainForm.cs", + "RelativeToolTip": "OEM\\MainForm.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-26T21:06:53.667Z" + }, + { + "$type": "Document", + "DocumentIndex": 228, + "Title": "FormThreading.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Form\\FormThreading.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Form\\FormThreading.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Form\\FormThreading.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\Form\\FormThreading.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-25T19:29:47.069Z" + }, + { + "$type": "Document", + "DocumentIndex": 226, + "Title": "ICoord.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\Coordination\\ICoord.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\Coordination\\ICoord.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\Coordination\\ICoord.cs", + "RelativeToolTip": "StgSharpDebug\\Geometries\\Coordination\\ICoord.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-25T01:07:46.041Z" + }, + { + "$type": "Document", + "DocumentIndex": 229, + "Title": "Form.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Form\\Form.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Form\\Form.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Form\\Form.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\Form\\Form.cs", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-04-23T09:01:45.978Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/源代码/.vs/StgSharpDevelop/v17/DocumentLayout.json b/源代码/.vs/StgSharpDevelop/v17/DocumentLayout.json index 9476e33c..a4bd49dc 100644 --- a/源代码/.vs/StgSharpDevelop/v17/DocumentLayout.json +++ b/源代码/.vs/StgSharpDevelop/v17/DocumentLayout.json @@ -2,14 +2,333 @@ "Version": 1, "WorkspaceRootPath": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\", "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\cpuanimation\\imagehelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\cpuanimation\\imagehelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\image.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\image.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\cpuanimation\\imagehelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\cpuanimation\\imagehelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\autotexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\autotexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glfunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glfunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\image.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\image.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\cpuanimation\\iimageprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\cpuanimation\\iimageprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\viewmodelmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\viewmodelmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\renderstream\\partical.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\renderstream\\partical.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\texturegl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\texturegl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\triggerbutton.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\triggerbutton.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\buffer\\autotexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\buffer\\autotexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\collections\\bidirectionaldictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\collections\\bidirectionaldictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Youmu\\AppData\\Local\\SourceServer\\60546032f23b31a03685e30ef880f5c48e6df2d00a71d09e625da4e2a208bd88\\Dictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glresourcegenrator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glresourcegenrator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\texturepipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\texturepipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\view\\viewbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\view\\viewbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\view\\viewmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\view\\viewmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\stg\\collisiontexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\stg\\collisiontexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\view\\viewrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\view\\viewrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\blueprint\\sidenode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\blueprint\\sidenode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\battlefield.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\battlefield.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\blueprint\\blueprintactionnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\blueprint\\blueprintactionnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\blueprint\\blueprint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\blueprint\\blueprint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\timing\\timespanprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\timing\\timespanprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\markinglable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\markinglable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\renderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\renderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\viewmodel\\viewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\viewmodel\\viewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\environment\\timeprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\environment\\timeprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\controls\\markinglable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\controls\\markinglable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\timing\\timefunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\timing\\timefunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\geometries\\geometryoperation\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\geometries\\geometryoperation\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\timing\\timefunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\timing\\timefunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\geometryoperation\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\geometryoperation\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\viewmodel\\viewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\viewmodel\\viewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\blueprint\\blueprintrunner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\blueprint\\blueprintrunner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\collections\\sizefixedlist.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\collections\\sizefixedlist.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\collections\\ibidrirectionaldictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\collections\\ibidrirectionaldictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\globalsuppressions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\globalsuppressions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\bpnodebuilder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\bpnodebuilder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\texturepipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\texturepipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\blueprintrunner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\blueprintrunner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\counter.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\counter.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\collections\\sizefixedlist.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\collections\\sizefixedlist.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\timing\\timespanprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\timing\\timespanprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\timing\\timesourceprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\timing\\timesourceprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\cancellabletask.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\cancellabletask.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\blueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\blueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\blueprint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\blueprint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\pipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\pipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\routeswitch.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\routeswitch.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\sidenode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\sidenode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\iconvertabletoblueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\iconvertabletoblueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\bpnodeactionattribute.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\bpnodeactionattribute.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\blueprintactionnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\blueprintactionnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\data\\m128.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\data\\m128.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\environment\\globalsetting.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\environment\\globalsetting.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\environment\\globalsetting.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\environment\\globalsetting.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\stgsharpdebug.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\stgsharpdebug.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glresourcemanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glresourcemanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\buffer\\texturegl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\buffer\\texturegl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\stg\\collisiontexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\stg\\collisiontexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glapimanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glapimanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glexception.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glexception.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glapimanagerconst.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glapimanagerconst.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glresourcemanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glresourcemanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\vbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\vbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\glbufferobjectbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\glbufferobjectbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\vao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\vao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\rbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\rbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\fbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\fbo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\ebo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\ebo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\define\\glenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\define\\glenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glapicalling.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glapicalling.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\view\\viewresponder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\view\\viewresponder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\view\\viewdesigner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\view\\viewdesigner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\shader\\controlitemrender.frag||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\controlitemrender.frag||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\shader\\controlitemrender.vert||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\controlitemrender.vert||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\stg\\touhou\\touhouwindow.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\stg\\touhou\\touhouwindow.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\shader\\fbo.frag||{8B382828-6202-11D1-8870-0000F87579D2}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\fbo.frag||{8B382828-6202-11D1-8870-0000F87579D2}" @@ -19,56 +338,48 @@ "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\fbo.vert||{8B382828-6202-11D1-8870-0000F87579D2}" }, { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\stg\\collisiontexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\stg\\collisiontexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\shader\\main.frag||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\main.frag||{8B382828-6202-11D1-8870-0000F87579D2}" }, { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\stg\\collisiontexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\stg\\collisiontexture.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\data\\internaldata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\data\\internaldata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glfunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glfunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\openglcontrollingitemrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\openglcontrollingitemrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\define\\glenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\define\\glenum.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\geometries\\igeomtrybuffer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\geometries\\igeomtrybuffer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\image.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\image.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\openglcontrollingitemrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\openglcontrollingitemrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\stg\\touhou\\view\\openningview.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\stg\\touhou\\view\\openningview.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\stg\\touhou\\touhouwindow.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\stg\\touhou\\touhouwindow.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\internaldata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\internaldata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\shader\\particle.vert||{8B382828-6202-11D1-8870-0000F87579D2}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\particle.vert||{8B382828-6202-11D1-8870-0000F87579D2}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glapimanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glapimanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\c6a36f44105246e8389794d6b1ff0c946741477e6dd52e219c7f2f689247fedc\\src\\libraries\\System.Private.CoreLib\\src\\System\\Threading\\SemaphoreSlim.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\renderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\renderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glexception.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glexception.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\io\\glio.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\io\\glio.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glapimanagerconst.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glapimanagerconst.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\view\\newrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\view\\newrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -80,14 +391,6 @@ "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\math\\graphic\\camera.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\math\\graphic\\camera.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\view\\viewrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\view\\viewrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\view\\viewmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\view\\viewmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\glhandle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\glhandle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -100,14 +403,6 @@ "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\define\\structdefine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\define\\structdefine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\cpuanimation\\imagehelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\cpuanimation\\imagehelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\shader\\particle.frag||{8B382828-6202-11D1-8870-0000F87579D2}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\shader\\particle.frag||{8B382828-6202-11D1-8870-0000F87579D2}" @@ -116,26 +411,10 @@ "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\view\\design.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\view\\design.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\viewmodelmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\viewmodelmain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\triggerbutton.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\triggerbutton.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\view\\viewbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\view\\viewbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\viewmodel\\showviewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\viewmodel\\showviewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\viewmodel\\viewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\viewmodel\\viewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\plaingeometrymesh.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\plaingeometrymesh.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -144,30 +423,14 @@ "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\demo\\view\\control.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\demo\\view\\control.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\view\\viewdesigner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\view\\viewdesigner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\battlefield.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\battlefield.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\buttongroup.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\buttongroup.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\view\\viewresponder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\view\\viewresponder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\view\\viewrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\view\\viewrender.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\globalsuppressions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\globalsuppressions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\stgsharpdebug.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\stgsharpdebug.csproj||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|" @@ -180,10 +443,6 @@ "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\mvvm\\viewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\mvvm\\viewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\environment\\timeprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\environment\\timeprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\geometries\\plaingeometry\\rectangle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\geometries\\plaingeometry\\rectangle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -192,14 +451,6 @@ "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\geometries\\plaingeometry\\define\\plaingeometry.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\geometries\\plaingeometry\\define\\plaingeometry.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\controls\\markinglable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\controls\\markinglable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\markinglable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\markinglable.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\controls\\decorationbox.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\controls\\decorationbox.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -260,10 +511,6 @@ "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\viewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\viewport.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\viewmodel\\viewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\viewmodel\\viewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\mvvm\\viewmodel\\databinding.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\mvvm\\viewmodel\\databinding.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -276,42 +523,14 @@ "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\controls\\buttongroup.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\controls\\buttongroup.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\texturepipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\texturepipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\controlling\\keyeventattribute.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\controlling\\keyeventattribute.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\stgsharpdebug.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\stgsharpdebug.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" - }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\timefunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\timefunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\math\\linear\\vec3d.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\math\\linear\\vec3d.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\geometries\\geometryoperation\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\geometries\\geometryoperation\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\geometries\\geometryoperation\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\geometries\\geometryoperation\\geometryoperation.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\texturegl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\texturegl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\vao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\vao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glfunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glfunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -327,10 +546,6 @@ "AbsoluteMoniker": "D:0:0:{20CBFF26-6746-402E-992C-7B643E9423EB}|StgSharpC\\StgSharpC.vcxproj|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\StgSharpC.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{20CBFF26-6746-402E-992C-7B643E9423EB}|StgSharpC\\StgSharpC.vcxproj|solutionrelative:StgSharpC\\StgSharpC.c||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\buffer\\texturegl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\buffer\\texturegl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glhandle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glhandle.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -338,10 +553,6 @@ { "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\6c91e49c16b65a4a6086c168a4f34965ffdd867f9cb4d0d10207e862c24f2808\\src\\libraries\\System.Private.CoreLib\\src\\System\\Threading\\Tasks\\Task.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glrenderstream.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glapimanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glapimanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -362,10 +573,6 @@ "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\buffer\\glbufferobjectbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\buffer\\glbufferobjectbase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\opengl\\buffer\\ebo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\opengl\\buffer\\ebo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\shaderedit\\shaderstruct.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\shaderedit\\shaderstruct.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -406,10 +613,6 @@ "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\buffer\\ebo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\buffer\\ebo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\image.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\image.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glresourcegenrator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glresourcegenrator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -438,10 +641,6 @@ "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\glexception.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\glexception.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\opengl\\openglapicalling.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\opengl\\openglapicalling.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\graphics\\shaderedit\\shaderstruct.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\graphics\\shaderedit\\shaderstruct.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -450,30 +649,6 @@ "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\igraphicapis.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\igraphicapis.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\bpnodebuilder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\bpnodebuilder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\bpnodeactionattribute.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\bpnodeactionattribute.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\iconvertabletoblueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\iconvertabletoblueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\blueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\blueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\crossframeblueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\crossframeblueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\pipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\pipeline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{20CBFF26-6746-402E-992C-7B643E9423EB}|StgSharpC\\StgSharpC.vcxproj|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\glfw3.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{20CBFF26-6746-402E-992C-7B643E9423EB}|StgSharpC\\StgSharpC.vcxproj|solutionrelative:StgSharpC\\glfw3.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" @@ -482,34 +657,14 @@ "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\graphics\\framework.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\graphics\\framework.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\blueprint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\blueprint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\environment\\platform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\environment\\platform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\blueprintrunner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\blueprintrunner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\sidenode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\sidenode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\cancellabletask.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\cancellabletask.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\environment\\timeprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\environment\\timeprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\environment\\globalsetting.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\environment\\globalsetting.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\ssd\\datasegment.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\ssd\\datasegment.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -538,10 +693,6 @@ "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\ssd\\ssdraw.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\ssd\\ssdraw.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\internaldata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\internaldata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\data\\randomgenerator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\data\\randomgenerator.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -554,22 +705,6 @@ "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\environment\\errordefine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\environment\\errordefine.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\sizefixedlist.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\sizefixedlist.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\blueprint\\routeswitch.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\blueprint\\routeswitch.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\timespanprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\timespanprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\timesourceprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\timesourceprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\usractivity\\keytrigger.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\usractivity\\keytrigger.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -618,10 +753,6 @@ "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\stg\\touhou\\touhoubuilder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\stg\\touhou\\touhoubuilder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\stg\\touhou\\touhouwindow.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\stg\\touhou\\touhouwindow.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{000EFD45-7F4D-47DB-8F3C-CD26612F0EAB}|StgsharpEnvDebug\\StgsharpEnvDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpenvdebug\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{000EFD45-7F4D-47DB-8F3C-CD26612F0EAB}|StgsharpEnvDebug\\StgsharpEnvDebug.csproj|solutionrelative:stgsharpenvdebug\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -718,10 +849,6 @@ "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\controlling\\usractivity\\itrigger.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\controlling\\usractivity\\itrigger.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharp\\logic\\timefunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}|StgSharp\\StgSharp.csproj|solutionrelative:stgsharp\\logic\\timefunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{20CBFF26-6746-402E-992C-7B643E9423EB}|StgSharpC\\StgSharpC.vcxproj|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\StgSharpC.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{20CBFF26-6746-402E-992C-7B643E9423EB}|StgSharpC\\StgSharpC.vcxproj|solutionrelative:StgSharpC\\StgSharpC.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" @@ -790,10 +917,6 @@ "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Form\\Form.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Graphics\\Form\\Form.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\CrossFrameBlueprintNode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Logic\\Blueprint\\CrossFrameBlueprintNode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\RBO.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Graphics\\GL\\Buffer\\RBO.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -853,6 +976,22 @@ { "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ViewModel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Logic\\ViewModel\\ViewModel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\CrossFrameBlueprintNode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Logic\\CrossFrameBlueprintNode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\MultiKeyDictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Logic\\MultiKeyDictionary.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\TimeFunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:StgSharpDebug\\Logic\\TimeFunction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|d:\\nitloadindustry\\\u7814\u7A76\u9879\u76EE\\1-flagship\\th2020\\projectfile\\\u6E90\u4EE3\u7801\\stgsharpdebug\\logic\\blueprint\\crossframeblueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{610B992B-BB34-49C3-9993-676C595FC12E}|StgSharpDebug\\StgSharpDebug.csproj|solutionrelative:stgsharpdebug\\logic\\blueprint\\crossframeblueprintnode.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" } ], "DocumentGroupContainers": [ @@ -862,228 +1001,668 @@ "DocumentGroups": [ { "DockedWidth": 197, - "SelectedChildIndex": 24, + "SelectedChildIndex": 1, "Children": [ { - "$type": "Document", - "DocumentIndex": 16, - "Title": "glApiManagerConst.cs", - "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glApiManagerConst.cs", - "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glApiManagerConst.cs", - "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glApiManagerConst.cs", - "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glApiManagerConst.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-29T22:56:27.205Z", - "EditorCaption": "" + "$type": "Bookmark", + "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" }, { "$type": "Document", - "DocumentIndex": 18, - "Title": "Object.cs", - "DocumentMoniker": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\3fbd2d3f2a21976ceea22ce6d61d2bfc56abbb0356d59a09e7367042f1d26101\\src\\libraries\\System.Private.CoreLib\\src\\System\\Object.cs", - "ToolTip": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\3fbd2d3f2a21976ceea22ce6d61d2bfc56abbb0356d59a09e7367042f1d26101\\src\\libraries\\System.Private.CoreLib\\src\\System\\Object.cs", - "ViewState": "AQIAABIAAAAAAAAAAIAxwBkAAAAIAAAA", + "DocumentIndex": 0, + "Title": "ImageHelper.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\CPUanimation\\ImageHelper.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\CPUanimation\\ImageHelper.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\CPUanimation\\ImageHelper.cs", + "RelativeToolTip": "StgSharp\\Graphics\\CPUanimation\\ImageHelper.cs", + "ViewState": "AgIAABsAAAAAAAAAAAD4vzQAAAAaAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-29T22:53:04.659Z", + "WhenOpened": "2024-08-28T02:49:25.315Z", "EditorCaption": "" }, { "$type": "Document", "DocumentIndex": 14, - "Title": "GlException.cs", - "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\GlException.cs", - "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\GlException.cs", - "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\GlException.cs", - "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\GlException.cs", - "ViewState": "AQIAAAQAAAAAAAAAAAAuwA8AAAA2AAAA", + "Title": "Dictionary.cs", + "DocumentMoniker": "C:\\Users\\Youmu\\AppData\\Local\\SourceServer\\60546032f23b31a03685e30ef880f5c48e6df2d00a71d09e625da4e2a208bd88\\Dictionary.cs", + "ToolTip": "C:\\Users\\Youmu\\AppData\\Local\\SourceServer\\60546032f23b31a03685e30ef880f5c48e6df2d00a71d09e625da4e2a208bd88\\Dictionary.cs", + "ViewState": "AgIAAFkBAAAAAAAAAIA0wGQBAAAMAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-29T22:18:29.968Z", - "EditorCaption": "" + "WhenOpened": "2024-08-27T21:35:54.107Z" + }, + { + "$type": "Document", + "DocumentIndex": 21, + "Title": "SideNode.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\SideNode.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Blueprint\\SideNode.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\SideNode.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Blueprint\\SideNode.cs", + "ViewState": "AgIAAAsAAAAAAAAAAAAvwB4AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T18:05:45.53Z" + }, + { + "$type": "Document", + "DocumentIndex": 23, + "Title": "BlueprintActionNode.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\BlueprintActionNode.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Blueprint\\BlueprintActionNode.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\BlueprintActionNode.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Blueprint\\BlueprintActionNode.cs", + "ViewState": "AgIAAAsAAAAAAAAAAAAvwB4AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T18:04:09.577Z" }, { "$type": "Document", "DocumentIndex": 24, + "Title": "Blueprint.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\Blueprint.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Blueprint\\Blueprint.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\Blueprint.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Blueprint\\Blueprint.cs", + "ViewState": "AgIAAAwAAAAAAAAAAAAvwB8AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T18:04:06.765Z" + }, + { + "$type": "Document", + "DocumentIndex": 26, + "Title": "TimeSpanProvider.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Timing\\TimeSpanProvider.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Timing\\TimeSpanProvider.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Timing\\TimeSpanProvider.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Timing\\TimeSpanProvider.cs", + "ViewState": "AgIAACYAAAAAAAAAAAAvwB4AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T18:04:00.578Z" + }, + { + "$type": "Document", + "DocumentIndex": 32, + "Title": "TimeFunction.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Timing\\TimeFunction.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Timing\\TimeFunction.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Timing\\TimeFunction.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Timing\\TimeFunction.cs", + "ViewState": "AgIAABsAAAAAAAAAAAAvwC4AAAAMAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T18:02:49.325Z" + }, + { + "$type": "Document", + "DocumentIndex": 37, + "Title": "BlueprintRunner.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\BlueprintRunner.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Blueprint\\BlueprintRunner.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\BlueprintRunner.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Blueprint\\BlueprintRunner.cs", + "ViewState": "AgIAAFwAAAAAAAAAAIA0wCgAAAAZAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T17:53:00.315Z" + }, + { + "$type": "Document", + "DocumentIndex": 39, + "Title": "SizeFixedList.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Collections\\SizeFixedList.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Collections\\SizeFixedList.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Collections\\SizeFixedList.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\Collections\\SizeFixedList.cs", + "ViewState": "AgIAAA0AAAAAAAAAAAAvwH0AAAAEAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-27T17:51:39.457Z" + }, + { + "$type": "Document", + "DocumentIndex": 40, + "Title": "IBidrirectionalDictionary.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Collections\\IBidrirectionalDictionary.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Collections\\IBidrirectionalDictionary.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Collections\\IBidrirectionalDictionary.cs", + "RelativeToolTip": "StgSharp\\Logic\\Collections\\IBidrirectionalDictionary.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAC8AAAA/AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-26T23:33:42.221Z" + }, + { + "$type": "Document", + "DocumentIndex": 43, + "Title": "TexturePipeline.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\TexturePipeline.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\TexturePipeline.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\TexturePipeline.cs", + "RelativeToolTip": "StgSharp\\Graphics\\TexturePipeline.cs", + "ViewState": "AgIAABUAAAAAAAAAAAAvwCgAAAAjAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-26T03:29:30.925Z" + }, + { + "$type": "Document", + "DocumentIndex": 45, + "Title": "Counter.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Counter.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Counter.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Counter.cs", + "RelativeToolTip": "StgSharp\\Logic\\Counter.cs", + "ViewState": "AgIAACQAAAAAAAAAAAAAACYAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-26T03:27:55.46Z" + }, + { + "$type": "Document", + "DocumentIndex": 13, + "Title": "BidirectionalDictionary.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Collections\\BidirectionalDictionary.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Collections\\BidirectionalDictionary.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Collections\\BidirectionalDictionary.cs", + "RelativeToolTip": "StgSharp\\Logic\\Collections\\BidirectionalDictionary.cs", + "ViewState": "AgIAAEMAAAAAAAAAAIAzwFUAAAANAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-26T03:20:40.602Z" + }, + { + "$type": "Document", + "DocumentIndex": 57, + "Title": "BlueprintActionNode.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BlueprintActionNode.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\BlueprintActionNode.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BlueprintActionNode.cs", + "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\BlueprintActionNode.cs", + "ViewState": "AgIAABsAAAAAAAAAAAAAACYAAAAcAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-26T02:58:10.928Z" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "IImageProvider.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\CPUanimation\\IImageProvider.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\CPUanimation\\IImageProvider.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\CPUanimation\\IImageProvider.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\CPUanimation\\IImageProvider.cs", + "ViewState": "AgIAABgAAAAAAAAAAAAAACYAAAAdAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-26T00:21:20.169Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 58, + "Title": "M128.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Data\\M128.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Data\\M128.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Data\\M128.cs", + "RelativeToolTip": "StgSharpDebug\\Data\\M128.cs", + "ViewState": "AgIAABwAAAAAAAAAAAAowC4AAAAbAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-25T23:57:32.075Z" + }, + { + "$type": "Document", + "DocumentIndex": 245, + "Title": "CrossFrameBlueprintNode.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\CrossFrameBlueprintNode.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\CrossFrameBlueprintNode.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\CrossFrameBlueprintNode.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\CrossFrameBlueprintNode.cs", + "ViewState": "AgIAAB0AAAAAAAAAAAAvwDAAAAA/AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-25T22:04:59.351Z" + }, + { + "$type": "Document", + "DocumentIndex": 59, + "Title": "GlobalSetting.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Environment\\GlobalSetting.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Environment\\GlobalSetting.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Environment\\GlobalSetting.cs", + "RelativeToolTip": "StgSharpDebug\\Environment\\GlobalSetting.cs", + "ViewState": "AgIAADUAAAAAAAAAAAAvwEgAAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-25T22:04:46.699Z" + }, + { + "$type": "Document", + "DocumentIndex": 12, + "Title": "AutoTexture.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "ViewState": "AgIAAGwAAAAAAAAAAAAiwH4AAAAQAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-25T21:16:55.239Z" + }, + { + "$type": "Document", + "DocumentIndex": 62, + "Title": "glResourceManager.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glResourceManager.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glResourceManager.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glResourceManager.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glResourceManager.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAEMAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-25T21:16:48.829Z" + }, + { + "$type": "Document", + "DocumentIndex": 70, + "Title": "GLBufferObjectBase.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAADMAAAAFAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-25T20:33:11.097Z" + }, + { + "$type": "Document", + "DocumentIndex": 69, + "Title": "VBO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VBO.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VBO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VBO.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VBO.cs", + "ViewState": "AgIAAH8AAAAAAAAAAAAUwCoAAAAZAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-24T21:48:41.305Z" + }, + { + "$type": "Document", + "DocumentIndex": 72, + "Title": "RBO.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\RBO.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\RBO.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\RBO.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\RBO.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-24T21:48:25.007Z" + }, + { + "$type": "Document", + "DocumentIndex": 76, + "Title": "glAPICalling.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glAPICalling.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glAPICalling.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glAPICalling.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glAPICalling.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-24T19:14:08.969Z" + }, + { + "$type": "Document", + "DocumentIndex": 15, + "Title": "glResourceGenrator.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glResourceGenrator.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glResourceGenrator.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glResourceGenrator.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glResourceGenrator.cs", + "ViewState": "AgIAADYAAAAAAAAAAIAzwFIAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-24T19:13:55.184Z" + }, + { + "$type": "Document", + "DocumentIndex": 68, + "Title": "glResourceManager.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glResourceManager.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glResourceManager.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glResourceManager.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glResourceManager.cs", + "ViewState": "AgIAAEcAAAAAAAAAAAAqwFUAAAAPAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-24T19:13:42.377Z" + }, + { + "$type": "Document", + "DocumentIndex": 246, + "Title": "MultiKeyDictionary.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\MultiKeyDictionary.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\MultiKeyDictionary.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\MultiKeyDictionary.cs", + "RelativeToolTip": "StgSharpDebug\\Logic\\MultiKeyDictionary.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAcAAAA5AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-23T20:00:13.62Z" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "AutoTexture.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\AutoTexture.cs", + "ViewState": "AgIAAHAAAAAAAAAAAAAvwJAAAAA9AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-23T19:22:04.183Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 79, + "Title": "ControlItemRender.frag", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\ControlItemRender.frag", + "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\ControlItemRender.frag", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\ControlItemRender.frag", + "RelativeToolTip": "StgSharpDebug\\Shader\\ControlItemRender.frag", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2024-08-01T11:42:48.589Z" + }, + { + "$type": "Document", + "DocumentIndex": 84, + "Title": "main.frag", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\main.frag", + "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\main.frag", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\main.frag", + "RelativeToolTip": "StgSharpDebug\\Shader\\main.frag", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2024-08-01T11:40:09.913Z" + }, + { + "$type": "Document", + "DocumentIndex": 80, + "Title": "ControlItemRender.vert", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\ControlItemRender.vert", + "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\ControlItemRender.vert", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\ControlItemRender.vert", + "RelativeToolTip": "StgSharpDebug\\Shader\\ControlItemRender.vert", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAWAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", + "WhenOpened": "2024-08-01T11:36:54.425Z" + }, + { + "$type": "Document", + "DocumentIndex": 86, + "Title": "OpenGLControllingItemRenderStream.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\OpenGLControllingItemRenderStream.cs", + "RelativeDocumentMoniker": "StgSharp\\MVVM\\OpenGLControllingItemRenderStream.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\OpenGLControllingItemRenderStream.cs", + "RelativeToolTip": "StgSharp\\MVVM\\OpenGLControllingItemRenderStream.cs", + "ViewState": "AgIAAAAAAAAAAAAAAIBgwBUAAAAwAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-01T11:32:58.353Z" + }, + { + "$type": "Document", + "DocumentIndex": 87, + "Title": "IGeomtryBuffer.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\IGeomtryBuffer.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\IGeomtryBuffer.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\IGeomtryBuffer.cs", + "RelativeToolTip": "StgSharpDebug\\Geometries\\IGeomtryBuffer.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-01T11:26:58.217Z" + }, + { + "$type": "Document", + "DocumentIndex": 88, + "Title": "OpenGLControllingItemRenderStream.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\OpenGLControllingItemRenderStream.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\OpenGLControllingItemRenderStream.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\OpenGLControllingItemRenderStream.cs", + "RelativeToolTip": "StgSharpDebug\\MVVM\\OpenGLControllingItemRenderStream.cs", + "ViewState": "AgIAAAcAAAAAAAAAAAAIwBoAAAAwAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-01T11:23:06.648Z" + }, + { + "$type": "Document", + "DocumentIndex": 89, + "Title": "OpenningView.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Stg\\Touhou\\View\\OpenningView.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Stg\\Touhou\\View\\OpenningView.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Stg\\Touhou\\View\\OpenningView.cs", + "RelativeToolTip": "StgSharpDebug\\Stg\\Touhou\\View\\OpenningView.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-01T11:20:02.653Z" + }, + { + "$type": "Document", + "DocumentIndex": 81, + "Title": "TouhouWindow.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Stg\\Touhou\\TouhouWindow.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Stg\\Touhou\\TouhouWindow.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Stg\\Touhou\\TouhouWindow.cs", + "RelativeToolTip": "StgSharpDebug\\Stg\\Touhou\\TouhouWindow.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-08-01T11:14:18.39Z" + }, + { + "$type": "Document", + "DocumentIndex": 85, + "Title": "InternalData.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Data\\InternalData.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Data\\InternalData.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Data\\InternalData.cs", + "RelativeToolTip": "StgSharpDebug\\Data\\InternalData.cs", + "ViewState": "AgIAAAcAAAAAAAAAAAAuwDMAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-30T23:52:16.105Z" + }, + { + "$type": "Document", + "DocumentIndex": 67, + "Title": "glApiManagerConst.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glApiManagerConst.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glApiManagerConst.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glApiManagerConst.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glApiManagerConst.cs", + "ViewState": "AgIAABgAAAAAAAAAAIBQwAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-29T22:56:27.205Z" + }, + { + "$type": "Document", + "DocumentIndex": 96, + "Title": "Object.cs", + "DocumentMoniker": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\3fbd2d3f2a21976ceea22ce6d61d2bfc56abbb0356d59a09e7367042f1d26101\\src\\libraries\\System.Private.CoreLib\\src\\System\\Object.cs", + "ToolTip": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\3fbd2d3f2a21976ceea22ce6d61d2bfc56abbb0356d59a09e7367042f1d26101\\src\\libraries\\System.Private.CoreLib\\src\\System\\Object.cs", + "ViewState": "AgIAABIAAAAAAAAAAIAxwBkAAAAIAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-29T22:53:04.659Z" + }, + { + "$type": "Document", + "DocumentIndex": 66, + "Title": "glException.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glException.cs", + "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glException.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glException.cs", + "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glException.cs", + "ViewState": "AgIAAEMAAAAAAAAAAAAUwGUAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-29T22:18:29.968Z" + }, + { + "$type": "Document", + "DocumentIndex": 100, "Title": "StructDefine.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Define\\StructDefine.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Define\\StructDefine.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Define\\StructDefine.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\Define\\StructDefine.cs", - "ViewState": "AQIAABgAAAAAAAAAAAAAALsDAAAdAAAA", + "ViewState": "AgIAABIAAAAAAAAAAIBgwC0AAAAEAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-29T22:08:05.513Z", - "EditorCaption": "" + "WhenOpened": "2024-07-29T22:08:05.513Z" }, { "$type": "Document", - "DocumentIndex": 15, + "DocumentIndex": 94, "Title": "GLIO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\IO\\GLIO.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\IO\\GLIO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\IO\\GLIO.cs", "RelativeToolTip": "StgSharpDebug\\Controlling\\IO\\GLIO.cs", - "ViewState": "AQIAAIMBAAAAAAAAAAAqwPACAAAyAAAA", + "ViewState": "AgIAAGgAAAAAAAAAAAAqwGgAAAAIAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-29T22:06:08.827Z", - "EditorCaption": "" + "WhenOpened": "2024-07-29T22:06:08.827Z" }, { "$type": "Document", - "DocumentIndex": 43, + "DocumentIndex": 109, "Title": "ViewManage.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\ViewManage.cs", "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\ViewModel\\ViewManage.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\ViewManage.cs", "RelativeToolTip": "StgSharpDebug\\MVVM\\ViewModel\\ViewManage.cs", - "ViewState": "AQIAABoAAAAAAAAAAAA1wDIAAAAYAAAA", + "ViewState": "AgIAABoAAAAAAAAAAAA1wDIAAAAYAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-28T20:47:56.998Z" }, { "$type": "Document", - "DocumentIndex": 45, + "DocumentIndex": 30, "Title": "TimeProvider.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Environment\\TimeProvider.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Environment\\TimeProvider.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Environment\\TimeProvider.cs", "RelativeToolTip": "StgSharpDebug\\Environment\\TimeProvider.cs", - "ViewState": "AQIAAHkAAAAAAAAAAADwv4cAAAA1AAAA", + "ViewState": "AgIAABkAAAAAAAAAAAAnwDAAAAAlAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-28T20:44:41.918Z" }, { "$type": "Document", - "DocumentIndex": 11, + "DocumentIndex": 93, "Title": "SemaphoreSlim.cs", "DocumentMoniker": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\c6a36f44105246e8389794d6b1ff0c946741477e6dd52e219c7f2f689247fedc\\src\\libraries\\System.Private.CoreLib\\src\\System\\Threading\\SemaphoreSlim.cs", "ToolTip": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\c6a36f44105246e8389794d6b1ff0c946741477e6dd52e219c7f2f689247fedc\\src\\libraries\\System.Private.CoreLib\\src\\System\\Threading\\SemaphoreSlim.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-28T20:44:32.439Z", - "EditorCaption": "" + "WhenOpened": "2024-07-28T20:44:32.439Z" }, { "$type": "Document", - "DocumentIndex": 44, + "DocumentIndex": 110, "Title": "ViewPort.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewPort.cs", "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\ViewPort.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewPort.cs", "RelativeToolTip": "StgSharpDebug\\MVVM\\ViewPort.cs", - "ViewState": "AQIAAB8AAAAAAAAAAAA1wDoAAAAUAAAA", + "ViewState": "AgIAAB8AAAAAAAAAAAA1wDoAAAAUAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-28T20:31:16.196Z" }, { "$type": "Document", - "DocumentIndex": 39, + "DocumentIndex": 77, "Title": "ViewResponder.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewResponder.cs", "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\View\\ViewResponder.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewResponder.cs", "RelativeToolTip": "StgSharpDebug\\MVVM\\View\\ViewResponder.cs", - "ViewState": "AQIAAEgAAAAAAAAAAIBAwFgAAAAjAAAA", + "ViewState": "AgIAAFEAAAAAAAAAAAAWwHQAAAAvAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-28T20:20:17.17Z" }, { "$type": "Document", - "DocumentIndex": 32, + "DocumentIndex": 103, "Title": "ShowViewPort.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\ShowViewPort.cs", "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\ViewModel\\ShowViewPort.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\ShowViewPort.cs", "RelativeToolTip": "StgSharpDebug\\MVVM\\ViewModel\\ShowViewPort.cs", - "ViewState": "AQIAADIAAAAAAAAAAAAtwEgAAAAZAAAA", + "ViewState": "AgIAADIAAAAAAAAAAAAtwEgAAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-28T19:28:00.87Z", - "EditorCaption": "" + "WhenOpened": "2024-07-28T19:28:00.87Z" }, { "$type": "Document", - "DocumentIndex": 33, + "DocumentIndex": 29, "Title": "ViewModel.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\ViewModel.cs", "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\ViewModel\\ViewModel.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\ViewModel.cs", "RelativeToolTip": "StgSharpDebug\\MVVM\\ViewModel\\ViewModel.cs", - "ViewState": "AQIAAHUAAAAAAAAAAADwv00AAAASAAAA", + "ViewState": "AgIAAFMAAAAAAAAAAAAvwGoAAAA5AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-28T19:24:58.03Z", - "EditorCaption": "" + "WhenOpened": "2024-07-28T19:24:58.03Z" }, { "$type": "Document", - "DocumentIndex": 47, + "DocumentIndex": 112, "Title": "PlainGeometry.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", "RelativeToolTip": "StgSharpDebug\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", - "ViewState": "AQIAABsAAAAAAAAAAAAqwC0AAAAAAAAA", + "ViewState": "AgIAABsAAAAAAAAAAAAqwC0AAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-28T19:16:05.323Z" }, { "$type": "Document", - "DocumentIndex": 46, + "DocumentIndex": 111, "Title": "Rectangle.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\PlainGeometry\\Rectangle.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\PlainGeometry\\Rectangle.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\PlainGeometry\\Rectangle.cs", "RelativeToolTip": "StgSharpDebug\\Geometries\\PlainGeometry\\Rectangle.cs", - "ViewState": "AQIAABAAAAAAAAAAAAA1wCUAAAAFAAAA", + "ViewState": "AgIAABAAAAAAAAAAAAA1wCUAAAAFAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-28T19:14:47.657Z" }, { "$type": "Document", - "DocumentIndex": 36, + "DocumentIndex": 78, "Title": "ViewDesigner.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewDesigner.cs", "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\View\\ViewDesigner.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewDesigner.cs", "RelativeToolTip": "StgSharpDebug\\MVVM\\View\\ViewDesigner.cs", - "ViewState": "AQIAAFEAAAAAAAAAAAAmwGUAAAAUAAAA", + "ViewState": "AgIAAFEAAAAAAAAAAAAmwGUAAAAUAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-28T18:02:40.594Z" }, { "$type": "Document", - "DocumentIndex": 54, + "DocumentIndex": 117, "Title": "KeyTrigger.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\UsrActivity\\KeyTrigger.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\UsrActivity\\KeyTrigger.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\UsrActivity\\KeyTrigger.cs", "RelativeToolTip": "StgSharpDebug\\Controlling\\UsrActivity\\KeyTrigger.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-26T22:07:04.226Z" }, { "$type": "Document", - "DocumentIndex": 56, + "DocumentIndex": 119, "Title": "DataBinding.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\DataBinding.cs", "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\ViewModel\\DataBinding.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\ViewModel\\DataBinding.cs", "RelativeToolTip": "StgSharpDebug\\MVVM\\ViewModel\\DataBinding.cs", - "ViewState": "AQIAADgAAAAAAAAAAAA0wC8AAAAAAAAA", + "ViewState": "AgIAADgAAAAAAAAAAAA0wC8AAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-26T21:50:43.739Z" }, { "$type": "Document", - "DocumentIndex": 31, + "DocumentIndex": 17, "Title": "ViewBase.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewBase.cs", "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\View\\ViewBase.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewBase.cs", "RelativeToolTip": "StgSharpDebug\\MVVM\\View\\ViewBase.cs", - "ViewState": "AQIAAKcAAAAAAAAAAAA1wLIAAAANAAAA", + "ViewState": "AgIAABIAAAAAAAAAAAApwH8AAAARAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-26T21:46:52.221Z", - "EditorCaption": "" + "WhenOpened": "2024-07-26T21:46:52.221Z" }, { "$type": "Document", @@ -1093,259 +1672,252 @@ "RelativeDocumentMoniker": "StgSharpDebug\\MVVM\\View\\ViewRender.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\MVVM\\View\\ViewRender.cs", "RelativeToolTip": "StgSharpDebug\\MVVM\\View\\ViewRender.cs", - "ViewState": "AQIAAG4AAAAAAAAAAAAmwHUAAAAQAAAA", + "ViewState": "AgIAAAwAAAAAAAAAAAAvwB8AAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-26T21:02:28.873Z", - "EditorCaption": "" + "WhenOpened": "2024-07-26T21:02:28.873Z" }, { "$type": "Document", - "DocumentIndex": 17, + "DocumentIndex": 95, "Title": "NewRender.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\NewRender.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\View\\NewRender.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\NewRender.cs", "RelativeToolTip": "StgSharpDebug\\Demo\\View\\NewRender.cs", - "ViewState": "AQIAABIAAAAAAAAAAAAcwBgAAAA7AAAA", + "ViewState": "AgIAABIAAAAAAAAAAAAcwBgAAAA7AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-26T21:00:30.407Z", - "EditorCaption": "" + "WhenOpened": "2024-07-26T21:00:30.407Z" }, { "$type": "Document", - "DocumentIndex": 62, + "DocumentIndex": 125, "Title": "ViewResponder.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewResponder.cs", "RelativeDocumentMoniker": "StgSharp\\MVVM\\View\\ViewResponder.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewResponder.cs", "RelativeToolTip": "StgSharp\\MVVM\\View\\ViewResponder.cs", - "ViewState": "AQIAACIAAAAAAAAAAAAAADsAAAAuAAAA", + "ViewState": "AgIAABwAAAAAAAAAAIBgwDsAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-24T14:44:59.912Z" }, { "$type": "Document", - "DocumentIndex": 40, + "DocumentIndex": 107, "Title": "ViewRender.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewRender.cs", "RelativeDocumentMoniker": "StgSharp\\MVVM\\View\\ViewRender.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewRender.cs", "RelativeToolTip": "StgSharp\\MVVM\\View\\ViewRender.cs", - "ViewState": "AQIAAGkAAAAAAAAAAAA8wG0AAAAgAAAA", + "ViewState": "AgIAAGoAAAAAAAAAAAAYwG0AAAAgAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-24T14:44:50.254Z" }, { "$type": "Document", - "DocumentIndex": 60, + "DocumentIndex": 123, "Title": "ViewDesigner.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewDesigner.cs", "RelativeDocumentMoniker": "StgSharp\\MVVM\\View\\ViewDesigner.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewDesigner.cs", "RelativeToolTip": "StgSharp\\MVVM\\View\\ViewDesigner.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAIYAAAABAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAIYAAAABAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-24T14:42:19.45Z" }, { "$type": "Document", - "DocumentIndex": 35, + "DocumentIndex": 105, "Title": "Control.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\Control.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\View\\Control.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\Control.cs", "RelativeToolTip": "StgSharpDebug\\Demo\\View\\Control.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABAAAAAAAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-22T23:13:34.964Z" }, { "$type": "Document", - "DocumentIndex": 0, + "DocumentIndex": 9, "Title": "Partical.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\RenderStream\\Partical.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\RenderStream\\Partical.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\RenderStream\\Partical.cs", "RelativeToolTip": "StgSharpDebug\\Demo\\RenderStream\\Partical.cs", - "ViewState": "AQIAAHEAAAAAAAAAAAAswHYAAAAiAAAA", + "ViewState": "AgIAAFQAAAAAAAAAAAAzwFsAAAANAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-22T18:54:09.535Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 205, + "DocumentIndex": 236, "Title": "Render.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\Render.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\View\\Render.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\Render.cs", "RelativeToolTip": "StgSharpDebug\\Demo\\View\\Render.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABIAAAAAAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-22T18:52:26.586Z" }, { "$type": "Document", - "DocumentIndex": 34, + "DocumentIndex": 104, "Title": "PlainGeometryMesh.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\PlainGeometryMesh.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\PlainGeometryMesh.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\PlainGeometryMesh.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\PlainGeometryMesh.cs", - "ViewState": "AQIAACoAAAAAAAAAAAAwwDoAAAAJAAAA", + "ViewState": "AgIAACsAAAAAAAAAAAAiwDoAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-21T18:21:10.362Z", - "EditorCaption": "" + "WhenOpened": "2024-07-21T18:21:10.362Z" }, { "$type": "Document", - "DocumentIndex": 69, + "DocumentIndex": 16, "Title": "TexturePipeline.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\TexturePipeline.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\TexturePipeline.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\TexturePipeline.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\TexturePipeline.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "ViewState": "AgIAABAAAAAAAAAAAAAhwCoAAAA0AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-21T18:20:56.032Z" }, { "$type": "Document", - "DocumentIndex": 49, + "DocumentIndex": 27, "Title": "MarkingLable.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\MarkingLable.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\MarkingLable.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\MarkingLable.cs", "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\MarkingLable.cs", - "ViewState": "AQIAAAYAAAAAAAAAAAAAAC8AAAAOAAAA", + "ViewState": "AgIAABwAAAAAAAAAAAAvwC8AAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-21T18:08:20.718Z" }, { "$type": "Document", - "DocumentIndex": 50, + "DocumentIndex": 113, "Title": "DecorationBox.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\DecorationBox.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\DecorationBox.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\DecorationBox.cs", "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\DecorationBox.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAuwBMAAAAAAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAuwBMAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-21T18:08:04.698Z" }, { "$type": "Document", - "DocumentIndex": 52, + "DocumentIndex": 115, "Title": "CharacterIndexImage.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\CharacterIndexImage.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\CharacterIndexImage.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\CharacterIndexImage.cs", "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\CharacterIndexImage.cs", - "ViewState": "AQIAAAkAAAAAAAAAAAAAAA0AAAAzAAAA", + "ViewState": "AgIAAAMAAAAAAAAAAIBgwA0AAAArAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-21T18:07:37.453Z" }, { "$type": "Document", - "DocumentIndex": 37, + "DocumentIndex": 22, "Title": "BattleField.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\BattleField.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\BattleField.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\BattleField.cs", "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\BattleField.cs", - "ViewState": "AQIAAB4AAAAAAAAAAAAqwC0AAAAOAAAA", + "ViewState": "AgIAAA0AAAAAAAAAAAAvwCAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-21T18:06:14.126Z" }, { "$type": "Document", - "DocumentIndex": 51, + "DocumentIndex": 114, "Title": "ControllingIntem.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\ControllingIntem.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\ControllingIntem.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\ControllingIntem.cs", "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\ControllingIntem.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAuwA4AAAAXAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAuwA4AAAAHAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-21T18:05:39.942Z" }, { "$type": "Document", - "DocumentIndex": 53, + "DocumentIndex": 116, "Title": "TextureProvider.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\TextureProvider.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\TextureProvider.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\TextureProvider.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\TextureProvider.cs", - "ViewState": "AQIAABIAAAAAAAAAAAAcwCMAAAAjAAAA", + "ViewState": "AgIAABIAAAAAAAAAAAAcwCMAAAASAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-21T17:09:02.036Z" }, { "$type": "Document", - "DocumentIndex": 28, + "DocumentIndex": 102, "Title": "Design.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\Design.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\View\\Design.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\Design.cs", "RelativeToolTip": "StgSharpDebug\\Demo\\View\\Design.cs", - "ViewState": "AQIAABQAAAAAAAAAAAAqwCYAAAAkAAAA", + "ViewState": "AgIAABQAAAAAAAAAAAAqwCYAAAAhAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-21T08:07:56.357Z", - "EditorCaption": "" + "WhenOpened": "2024-07-21T08:07:56.357Z" }, { "$type": "Document", - "DocumentIndex": 21, + "DocumentIndex": 18, "Title": "ViewMain.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\ViewMain.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\View\\ViewMain.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\View\\ViewMain.cs", "RelativeToolTip": "StgSharpDebug\\Demo\\View\\ViewMain.cs", - "ViewState": "AQIAACQAAAAAAAAAAAAYwDkAAAAVAAAA", + "ViewState": "AgIAAAwAAAAAAAAAAAAvwB4AAAAYAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-21T08:06:54.118Z", - "EditorCaption": "" + "WhenOpened": "2024-07-21T08:06:54.118Z" }, { "$type": "Document", - "DocumentIndex": 66, + "DocumentIndex": 128, "Title": "DataBinding.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\DataBinding.cs", "RelativeDocumentMoniker": "StgSharp\\MVVM\\ViewModel\\DataBinding.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\DataBinding.cs", "RelativeToolTip": "StgSharp\\MVVM\\ViewModel\\DataBinding.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAACgAAAAhAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACgAAAAhAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-19T16:41:06.14Z" }, { "$type": "Document", - "DocumentIndex": 70, + "DocumentIndex": 131, "Title": "KeyEventAttribute.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\KeyEventAttribute.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\KeyEventAttribute.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\KeyEventAttribute.cs", "RelativeToolTip": "StgSharpDebug\\Controlling\\KeyEventAttribute.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-19T15:04:20.506Z" }, { "$type": "Document", - "DocumentIndex": 206, + "DocumentIndex": 237, "Title": "DataBinding.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\DataBinding.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\ViewModel\\DataBinding.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\DataBinding.cs", "RelativeToolTip": "StgSharpDebug\\Logic\\ViewModel\\DataBinding.cs", - "ViewState": "AQIAAA4AAAAAAAAAAAAAACwAAAA2AAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-18T17:19:17.458Z" }, { "$type": "Document", - "DocumentIndex": 42, + "DocumentIndex": 108, "Title": "StgSharpDebug", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\StgSharpDebug.csproj", "RelativeDocumentMoniker": "StgSharpDebug\\StgSharpDebug.csproj", @@ -1356,141 +1928,135 @@ }, { "$type": "Document", - "DocumentIndex": 29, + "DocumentIndex": 7, "Title": "ViewModelMain.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\ViewModelMain.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\ViewModelMain.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\ViewModelMain.cs", "RelativeToolTip": "StgSharpDebug\\Demo\\ViewModelMain.cs", - "ViewState": "AQIAAA8AAAAAAAAAAAAuwBEAAAA0AAAA", + "ViewState": "AgIAADAAAAAAAAAAAADgvzAAAAA3AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-16T07:19:49.481Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 71, + "DocumentIndex": 61, "Title": "StgSharpDebug.csproj", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\StgSharpDebug.csproj", "RelativeDocumentMoniker": "StgSharpDebug\\StgSharpDebug.csproj", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\StgSharpDebug.csproj", "RelativeToolTip": "StgSharpDebug\\StgSharpDebug.csproj", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAA0AAAAqAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABUAAAAUAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", "WhenOpened": "2024-07-16T07:19:00.583Z" }, { "$type": "Document", - "DocumentIndex": 72, + "DocumentIndex": 247, "Title": "TimeFunction.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\TimeFunction.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\TimeFunction.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\TimeFunction.cs", "RelativeToolTip": "StgSharpDebug\\Logic\\TimeFunction.cs", - "ViewState": "AQIAABAAAAAAAAAAAAAqwCQAAAAdAAAA", + "ViewState": "AgIAABAAAAAAAAAAAAAqwCQAAAAdAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-15T20:04:24.579Z" }, { "$type": "Document", - "DocumentIndex": 30, + "DocumentIndex": 11, "Title": "TriggerButton.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\TriggerButton.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\TriggerButton.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\TriggerButton.cs", "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\TriggerButton.cs", - "ViewState": "AQIAAK8AAAAAAAAAAAAQwMkAAAAMAAAA", + "ViewState": "AgIAALMAAAAAAAAAAIA0wL4AAAAIAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-15T19:54:09.954Z", - "EditorCaption": "" + "WhenOpened": "2024-07-15T19:54:09.954Z" }, { "$type": "Document", - "DocumentIndex": 38, + "DocumentIndex": 106, "Title": "ButtonGroup.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\ButtonGroup.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\ButtonGroup.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\ButtonGroup.cs", "RelativeToolTip": "StgSharpDebug\\Controlling\\Controls\\ButtonGroup.cs", - "ViewState": "AQIAADAAAAAAAAAAAAAqwEEAAAArAAAA", + "ViewState": "AgIAADAAAAAAAAAAAAAqwEEAAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-15T19:53:42.786Z" }, { "$type": "Document", - "DocumentIndex": 207, + "DocumentIndex": 238, "Title": "ShowViewPort.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ShowViewPort.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\ViewModel\\ShowViewPort.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ShowViewPort.cs", "RelativeToolTip": "StgSharpDebug\\Logic\\ViewModel\\ShowViewPort.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAuwA0AAAASAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-15T19:07:20.391Z" }, { "$type": "Document", - "DocumentIndex": 208, + "DocumentIndex": 239, "Title": "ViewPort.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\ViewPort.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\View\\ViewPort.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\ViewPort.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\View\\ViewPort.cs", - "ViewState": "AQIAABYAAAAAAAAAAAAqwCoAAAAZAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-15T18:55:25.494Z" }, { "$type": "Document", - "DocumentIndex": 55, + "DocumentIndex": 118, "Title": "KeyControl.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\KeyControl.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\KeyControl.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\KeyControl.cs", "RelativeToolTip": "StgSharpDebug\\Controlling\\KeyControl.cs", - "ViewState": "AQIAABAAAAAAAAAAAAAqwCQAAAAbAAAA", + "ViewState": "AgIAABAAAAAAAAAAAAAqwCQAAAAbAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-15T18:23:56.059Z" }, { "$type": "Document", - "DocumentIndex": 209, + "DocumentIndex": 240, "Title": "ViewResponder.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\ViewResponder.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\ViewResponder.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\ViewResponder.cs", "RelativeToolTip": "StgSharpDebug\\Controlling\\ViewResponder.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAuwBYAAABcAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-15T18:00:35.036Z" }, { "$type": "Document", - "DocumentIndex": 210, + "DocumentIndex": 241, "Title": "ViewRender.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\ViewRender.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\View\\ViewRender.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\ViewRender.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\View\\ViewRender.cs", - "ViewState": "AQIAACYAAAAAAAAAAAAAADYAAAAkAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-15T17:27:33.542Z" }, { "$type": "Document", - "DocumentIndex": 211, + "DocumentIndex": 242, "Title": "ViewDesigner.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\ViewDesigner.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\ViewDesigner.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\ViewDesigner.cs", "RelativeToolTip": "StgSharpDebug\\Controlling\\ViewDesigner.cs", - "ViewState": "AQIAABoAAAAAAAAAAAAqwDcAAAAZAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-15T17:21:21.477Z" }, { "$type": "Document", - "DocumentIndex": 57, + "DocumentIndex": 120, "Title": "View.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\View\\View.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\View\\View.cs", @@ -1501,299 +2067,288 @@ }, { "$type": "Document", - "DocumentIndex": 73, + "DocumentIndex": 132, "Title": "vec3d.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Math\\Linear\\vec3d.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Math\\Linear\\vec3d.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Math\\Linear\\vec3d.cs", "RelativeToolTip": "StgSharpDebug\\Math\\Linear\\vec3d.cs", - "ViewState": "AQIAAF0AAAAAAAAAAAAmwEcAAAAZAAAA", + "ViewState": "AgIAAF0AAAAAAAAAAAAmwEcAAAAZAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-14T17:17:29.238Z" }, { "$type": "Document", - "DocumentIndex": 74, + "DocumentIndex": 33, "Title": "GeometryOperation.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\GeometryOperation\\GeometryOperation.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\GeometryOperation\\GeometryOperation.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\GeometryOperation\\GeometryOperation.cs", "RelativeToolTip": "StgSharpDebug\\Geometries\\GeometryOperation\\GeometryOperation.cs", - "ViewState": "AQIAADMAAAAAAAAAAAA1wEMAAAAPAAAA", + "ViewState": "AgIAAB8AAAAAAAAAAAAvwDIAAAAQAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-13T17:37:00.956Z" }, { "$type": "Document", - "DocumentIndex": 27, + "DocumentIndex": 101, "Title": "particle.frag", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\particle.frag", "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\particle.frag", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\particle.frag", "RelativeToolTip": "StgSharpDebug\\Shader\\particle.frag", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAkAAAA4AAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAA4AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", - "WhenOpened": "2024-07-13T05:34:34.109Z", - "EditorCaption": "" + "WhenOpened": "2024-07-13T05:34:34.109Z" }, { "$type": "Document", - "DocumentIndex": 9, + "DocumentIndex": 92, "Title": "particle.vert", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\particle.vert", "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\particle.vert", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\particle.vert", "RelativeToolTip": "StgSharpDebug\\Shader\\particle.vert", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABoAAAAoAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABoAAAAoAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", - "WhenOpened": "2024-07-13T05:34:25.67Z", - "EditorCaption": "" + "WhenOpened": "2024-07-13T05:34:25.67Z" }, { "$type": "Document", - "DocumentIndex": 3, + "DocumentIndex": 83, "Title": "fbo.vert", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\fbo.vert", "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\fbo.vert", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\fbo.vert", "RelativeToolTip": "StgSharpDebug\\Shader\\fbo.vert", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAoAAAAWAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", - "WhenOpened": "2024-07-12T17:46:54.077Z", - "EditorCaption": "" + "WhenOpened": "2024-07-12T17:46:54.077Z" }, { "$type": "Document", - "DocumentIndex": 2, + "DocumentIndex": 82, "Title": "fbo.frag", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\fbo.frag", "RelativeDocumentMoniker": "StgSharpDebug\\Shader\\fbo.frag", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Shader\\fbo.frag", "RelativeToolTip": "StgSharpDebug\\Shader\\fbo.frag", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAoAAAAEAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|", - "WhenOpened": "2024-07-12T17:46:52.616Z", - "EditorCaption": "" + "WhenOpened": "2024-07-12T17:46:52.616Z" }, { "$type": "Document", - "DocumentIndex": 7, + "DocumentIndex": 75, "Title": "glEnum.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Define\\glEnum.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Define\\glEnum.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Define\\glEnum.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\Define\\glEnum.cs", - "ViewState": "AQIAAL8AAAAAAAAAAAAkwGUAAAAFAAAA", + "ViewState": "AgIAAFUAAAAAAAAAAAASwGcAAAAQAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-12T17:36:17.134Z", - "EditorCaption": "" + "WhenOpened": "2024-07-12T17:36:17.134Z" }, { "$type": "Document", - "DocumentIndex": 13, + "DocumentIndex": 28, "Title": "RenderStream.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\RenderStream.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\RenderStream.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\RenderStream.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\RenderStream.cs", - "ViewState": "AQIAALoAAAAAAAAAAAAuwMUAAAAMAAAA", + "ViewState": "AgIAAJoAAAAAAAAAAAAewB8AAAAWAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-12T16:50:10.581Z", - "EditorCaption": "" + "WhenOpened": "2024-07-12T16:50:10.581Z" }, { "$type": "Document", - "DocumentIndex": 77, + "DocumentIndex": 71, "Title": "VAO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VAO.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VAO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VAO.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\VAO.cs", - "ViewState": "AQIAABwAAAAAAAAAAAAqwDIAAAATAAAA", + "ViewState": "AgIAABwAAAAAAAAAAAAqwCcAAAAWAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-12T10:04:44.545Z" }, { "$type": "Document", - "DocumentIndex": 76, + "DocumentIndex": 10, "Title": "TextureGL.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", - "ViewState": "AQIAADsAAAAAAAAAAAAswFYAAAA3AAAA", + "ViewState": "AgIAAFkAAAAAAAAAAAArwGMAAAAIAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-11T18:46:51.043Z" + "WhenOpened": "2024-07-11T18:46:51.043Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 80, + "DocumentIndex": 135, "Title": "SR.cs", "DocumentMoniker": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\74ed84df48c00229a8da75e7d99c26a3409b78c17ddfc863196b29969f1b9863\\src\\libraries\\Common\\src\\System\\SR.cs", "ToolTip": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\74ed84df48c00229a8da75e7d99c26a3409b78c17ddfc863196b29969f1b9863\\src\\libraries\\Common\\src\\System\\SR.cs", - "ViewState": "AQIAABkAAAAAAAAAAADgvyIAAAANAAAA", + "ViewState": "AgIAABkAAAAAAAAAAADgvyIAAAANAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-11T18:09:43.749Z" }, { "$type": "Document", - "DocumentIndex": 26, + "DocumentIndex": 2, "Title": "ImageHelper.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\CPUanimation\\ImageHelper.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\CPUanimation\\ImageHelper.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\CPUanimation\\ImageHelper.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\CPUanimation\\ImageHelper.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABgAAAA3AAAA", + "ViewState": "AgIAABsAAAAAAAAAAAD4vywAAAAkAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-11T13:33:11Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 8, + "DocumentIndex": 5, "Title": "Image.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Image.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Image.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Image.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\Image.cs", - "ViewState": "AQIAAIsAAAAAAAAAAAAYwJ4AAAAfAAAA", + "ViewState": "AgIAADkAAAAAAAAAAIA7wE8AAAAXAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-11T13:30:30.357Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 84, + "DocumentIndex": 138, "Title": "Task.cs", "DocumentMoniker": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\6c91e49c16b65a4a6086c168a4f34965ffdd867f9cb4d0d10207e862c24f2808\\src\\libraries\\System.Private.CoreLib\\src\\System\\Threading\\Tasks\\Task.cs", - "ToolTip": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\6c91e49c16b65a4a6086c168a4f34965ffdd867f9cb4d0d10207e862c24f2808\\src\\libraries\\System.Private.CoreLib\\src\\System\\Threading\\Tasks\\Task.cs [\u53EA\u8BFB]", - "ViewState": "AQIAAD8JAAAAAAAAAAAjwEcJAAAIAAAA", + "ToolTip": "C:\\Users\\Nitlo\\AppData\\Local\\SourceServer\\6c91e49c16b65a4a6086c168a4f34965ffdd867f9cb4d0d10207e862c24f2808\\src\\libraries\\System.Private.CoreLib\\src\\System\\Threading\\Tasks\\Task.cs", + "ViewState": "AgIAAD8JAAAAAAAAAAAjwEcJAAAIAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-11T03:46:13.673Z", - "EditorCaption": " [\u53EA\u8BFB]" + "WhenOpened": "2024-07-11T03:46:13.673Z" }, { "$type": "Document", - "DocumentIndex": 22, + "DocumentIndex": 98, "Title": "GlHandle.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\GlHandle.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\GlHandle.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\GlHandle.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\GlHandle.cs", - "ViewState": "AQIAACQAAAAAAAAAAAAYwDoAAAAJAAAA", + "ViewState": "AgIAACQAAAAAAAAAAAAYwDoAAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-10T18:49:23.76Z", - "EditorCaption": "" + "WhenOpened": "2024-07-10T18:49:23.76Z" }, { "$type": "Document", - "DocumentIndex": 212, + "DocumentIndex": 243, "Title": "ViewManage.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ViewManage.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\ViewModel\\ViewManage.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ViewManage.cs", "RelativeToolTip": "StgSharpDebug\\Logic\\ViewModel\\ViewManage.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABQAAAAjAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-10T18:32:18.12Z" }, { "$type": "Document", - "DocumentIndex": 12, + "DocumentIndex": 25, "Title": "glRenderStream.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glRenderStream.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glRenderStream.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glRenderStream.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glRenderStream.cs", - "ViewState": "AQIAAFoAAAAAAAAAAAAmwGIAAAAIAAAA", + "ViewState": "AgIAAAsAAAAAAAAAAAAvwB4AAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-10T18:31:57.791Z", - "EditorCaption": "" + "WhenOpened": "2024-07-10T18:31:57.791Z" }, { "$type": "Document", - "DocumentIndex": 10, + "DocumentIndex": 65, "Title": "glApiManager.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glApiManager.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glApiManager.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glApiManager.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glApiManager.cs", - "ViewState": "AQIAAIcAAAAAAAAAAAAqwJ4AAAAyAAAA", + "ViewState": "AgIAABUAAAAAAAAAAIBQwLAAAACCAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-10T18:26:52.544Z", - "EditorCaption": "" + "WhenOpened": "2024-07-10T18:26:52.544Z" }, { "$type": "Document", - "DocumentIndex": 86, + "DocumentIndex": 139, "Title": "glApiManager.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glApiManager.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glApiManager.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glApiManager.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glApiManager.cs", - "ViewState": "AQIAACoAAAAAAAAAAAAYwD8AAAAsAAAA", + "ViewState": "AgIAACoAAAAAAAAAAAAYwD8AAAAWAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-10T18:24:34.903Z" }, { "$type": "Document", - "DocumentIndex": 87, + "DocumentIndex": 140, "Title": "glApiManagerConst.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glApiManagerConst.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glApiManagerConst.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glApiManagerConst.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glApiManagerConst.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-10T18:24:33.785Z" }, { "$type": "Document", - "DocumentIndex": 6, + "DocumentIndex": 4, "Title": "glFunction.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glFunction.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\glFunction.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\glFunction.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\glFunction.cs", - "ViewState": "AQIAALIAAAAAAAAAAAAswMYAAABTAAAA", + "ViewState": "AgIAAOMBAAAAAAAAAIAzwPYBAAAWAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-10T18:05:53.065Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 89, + "DocumentIndex": 142, "Title": "Camera.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Graphic\\Camera.cs", "RelativeDocumentMoniker": "StgSharp\\Math\\Graphic\\Camera.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Graphic\\Camera.cs", "RelativeToolTip": "StgSharp\\Math\\Graphic\\Camera.cs", - "ViewState": "AQIAAIUAAAAAAAAAAAA0wJEAAAAiAAAA", + "ViewState": "AgIAAIUAAAAAAAAAAAA0wJEAAAAiAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-10T17:59:14.403Z" }, { "$type": "Document", - "DocumentIndex": 1, + "DocumentIndex": 73, "Title": "FBO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\FBO.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\FBO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\FBO.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\FBO.cs", - "ViewState": "AQIAABAAAAAAAAAAAAAqwCYAAABLAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABcAAAARAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-10T17:58:38.22Z", - "EditorCaption": "" + "WhenOpened": "2024-07-10T17:58:38.22Z" }, { "$type": "Document", - "DocumentIndex": 91, + "DocumentIndex": 74, "Title": "EBO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\EBO.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\EBO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\OpenGL\\Buffer\\EBO.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\OpenGL\\Buffer\\EBO.cs", - "ViewState": "AQIAABwAAAAAAAAAAAAYwC8AAAAoAAAA", + "ViewState": "AgIAABwAAAAAAAAAAAAYwC8AAAAYAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-10T17:58:29.9Z" }, @@ -1805,402 +2360,381 @@ "RelativeDocumentMoniker": "StgSharp\\GlobalSuppressions.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\GlobalSuppressions.cs", "RelativeToolTip": "StgSharp\\GlobalSuppressions.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-10T17:41:12.94Z" }, { "$type": "Document", - "DocumentIndex": 23, + "DocumentIndex": 99, "Title": "BufferObjectBase.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Define\\BufferObjectBase.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Define\\BufferObjectBase.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Define\\BufferObjectBase.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\Define\\BufferObjectBase.cs", - "ViewState": "AQIAADYAAAAAAAAAAAAAAE4AAAAJAAAA", + "ViewState": "AgIAADAAAAAAAAAAAIBgwE4AAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-10T17:23:55.021Z", - "EditorCaption": "" + "WhenOpened": "2024-07-10T17:23:55.021Z" }, { "$type": "Document", - "DocumentIndex": 96, + "DocumentIndex": 148, "Title": "glConst.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Define\\glConst.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\Define\\glConst.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Define\\glConst.cs", "RelativeToolTip": "StgSharp\\Graphics\\Define\\glConst.cs", - "ViewState": "AQIAAB0AAAAAAAAAAAAqwPQSAAAgAAAA", + "ViewState": "AgIAAB0AAAAAAAAAAAAqwPQSAAAgAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-10T17:17:12.687Z" }, { "$type": "Document", - "DocumentIndex": 95, + "DocumentIndex": 147, "Title": "VBO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\VBO.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\VBO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\VBO.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\VBO.cs", - "ViewState": "AQIAAIMAAAAAAAAAAAAowJIAAAAwAAAA", + "ViewState": "AgIAAIMAAAAAAAAAAAAowJIAAAAwAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-07-10T17:16:18.094Z" + "WhenOpened": "2024-07-10T17:16:18.094Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 97, + "DocumentIndex": 149, "Title": "VAO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\VAO.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\VAO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\VAO.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\VAO.cs", - "ViewState": "AQIAADYAAAAAAAAAAAAowEgAAAA1AAAA", + "ViewState": "AgIAADcAAAAAAAAAAAAUwEgAAAA1AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-10T17:15:13.91Z" }, { "$type": "Document", - "DocumentIndex": 99, + "DocumentIndex": 151, "Title": "FBO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\FBO.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\FBO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\FBO.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\FBO.cs", - "ViewState": "AQIAAA4AAAAAAAAAAAAcwCYAAAAOAAAA", + "ViewState": "AgIAAA4AAAAAAAAAAAAcwCYAAAAOAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-10T17:05:59.749Z" }, { "$type": "Document", - "DocumentIndex": 104, + "DocumentIndex": 155, "Title": "InternalIO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\IO\\InternalIO.cs", "RelativeDocumentMoniker": "StgSharp\\Controlling\\IO\\InternalIO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\IO\\InternalIO.cs", "RelativeToolTip": "StgSharp\\Controlling\\IO\\InternalIO.cs", - "ViewState": "AQIAAFkAAAAAAAAAAAA0wGoAAAAgAAAA", + "ViewState": "AgIAAFkAAAAAAAAAAAA0wGoAAAALAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-10T15:48:23.725Z" }, { "$type": "Document", - "DocumentIndex": 88, + "DocumentIndex": 141, "Title": "Pixels.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Pixels.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\Pixels.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Pixels.cs", "RelativeToolTip": "StgSharp\\Graphics\\Pixels.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABAAAAAIAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAAIAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-10T04:12:48.395Z" }, { "$type": "Document", - "DocumentIndex": 109, - "Title": "GlException.cs", - "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\GlException.cs", - "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\GlException.cs", - "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\GlException.cs", - "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\GlException.cs", - "ViewState": "AQIAABgAAAAAAAAAAAAYwDAAAAAVAAAA", + "DocumentIndex": 160, + "Title": "glException.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glException.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glException.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glException.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glException.cs", + "ViewState": "AgIAABgAAAAAAAAAAAAYwDAAAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-08T11:52:05.336Z" }, { "$type": "Document", - "DocumentIndex": 67, + "DocumentIndex": 129, "Title": "StgSharp.csproj", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\StgSharp.csproj", "RelativeDocumentMoniker": "StgSharp\\StgSharp.csproj", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\StgSharp.csproj", "RelativeToolTip": "StgSharp\\StgSharp.csproj", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAUAAAAcAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAUAAAAcAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", "WhenOpened": "2024-07-08T10:39:35.673Z" }, { "$type": "Document", - "DocumentIndex": 98, + "DocumentIndex": 150, "Title": "RBO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\RBO.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\RBO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\RBO.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\RBO.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABYAAAAtAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABYAAAAtAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-07T17:45:11.682Z" }, { "$type": "Document", - "DocumentIndex": 83, + "DocumentIndex": 137, "Title": "GlHandle.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\GlHandle.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\GlHandle.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\GlHandle.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\GlHandle.cs", - "ViewState": "AQIAACYAAAAAAAAAAAAYwDMAAAAmAAAA", + "ViewState": "AgIAACYAAAAAAAAAAAAYwDMAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-06T08:38:18.156Z" }, { "$type": "Document", - "DocumentIndex": 100, + "DocumentIndex": 152, "Title": "BufferObjectBase.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Define\\BufferObjectBase.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\Define\\BufferObjectBase.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Define\\BufferObjectBase.cs", "RelativeToolTip": "StgSharp\\Graphics\\Define\\BufferObjectBase.cs", - "ViewState": "AQIAABgAAAAAAAAAAAAYwCsAAAAqAAAA", + "ViewState": "AgIAABgAAAAAAAAAAAAYwCsAAAAqAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-06T06:22:32.666Z" }, { "$type": "Document", - "DocumentIndex": 90, + "DocumentIndex": 143, "Title": "GLBufferObjectBase.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\GLBufferObjectBase.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAYAAAAiAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAYAAAAHAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-06T07:31:18.854Z" }, { "$type": "Document", - "DocumentIndex": 101, + "DocumentIndex": 153, "Title": "EBO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\EBO.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\EBO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\EBO.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\EBO.cs", - "ViewState": "AQIAAA0AAAAAAAAAAAAswB4AAAAYAAAA", + "ViewState": "AgIAAA0AAAAAAAAAAAAswB4AAAAYAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-07-06T06:22:23.335Z" }, { "$type": "Document", - "DocumentIndex": 110, - "Title": "OpenGLAPICalling.cs", - "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\OpenGLAPICalling.cs", - "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\OpenGLAPICalling.cs", - "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\OpenGLAPICalling.cs", - "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\OpenGLAPICalling.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAsAAAAMAAAA", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-06-28T00:08:47.25Z" - }, - { - "$type": "Document", - "DocumentIndex": 204, + "DocumentIndex": 235, "Title": "MainRenderStream.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Test\\MainRenderStream.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Test\\MainRenderStream.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Test\\MainRenderStream.cs", "RelativeToolTip": "StgSharpDebug\\Test\\MainRenderStream.cs", - "ViewState": "AQIAABsAAAAAAAAAAAA1wC4AAAAEAAAA", + "ViewState": "AgIAABsAAAAAAAAAAAA1wC4AAAAEAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-28T00:00:36.555Z" }, { "$type": "Document", - "DocumentIndex": 199, + "DocumentIndex": 230, "Title": "RBO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\RBO.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\GL\\Buffer\\RBO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\RBO.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\GL\\Buffer\\RBO.cs", - "ViewState": "AQIAAAEAAAAAAAAAAAAqwBUAAAAbAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-28T00:00:23.15Z" }, { "$type": "Document", - "DocumentIndex": 213, + "DocumentIndex": 244, "Title": "ViewModel.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ViewModel.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\ViewModel\\ViewModel.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\ViewModel\\ViewModel.cs", "RelativeToolTip": "StgSharpDebug\\Logic\\ViewModel\\ViewModel.cs", - "ViewState": "AQIAAPAAAAAAAAAAAAAgwEQBAAAzAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-28T00:00:20.456Z" }, { "$type": "Document", - "DocumentIndex": 111, + "DocumentIndex": 161, "Title": "ShaderStruct.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\ShaderEdit\\ShaderStruct.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\ShaderEdit\\ShaderStruct.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\ShaderEdit\\ShaderStruct.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\ShaderEdit\\ShaderStruct.cs", - "ViewState": "AQIAABQAAAAAAAAAAAA8wCgAAAA0AAAA", + "ViewState": "AgIAABUAAAAAAAAAAAAYwCgAAAAjAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-06-28T00:00:17.716Z", - "EditorCaption": "" + "WhenOpened": "2024-06-28T00:00:17.716Z" }, { "$type": "Document", - "DocumentIndex": 200, + "DocumentIndex": 231, "Title": "EBO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\EBO.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\GL\\Buffer\\EBO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\EBO.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\GL\\Buffer\\EBO.cs", - "ViewState": "AQIAACsAAAAAAAAAAAAqwD8AAAAjAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-28T00:00:15.821Z" }, { "$type": "Document", - "DocumentIndex": 4, + "DocumentIndex": 19, "Title": "CollisionTexture.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Stg\\CollisionTexture.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Stg\\CollisionTexture.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Stg\\CollisionTexture.cs", "RelativeToolTip": "StgSharpDebug\\Stg\\CollisionTexture.cs", - "ViewState": "AQIAAGMAAAAAAAAAAAAqwHcAAABKAAAA", + "ViewState": "AgIAAA8AAAAAAAAAAAAvwCIAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-06-28T00:00:12.581Z", - "EditorCaption": "" + "WhenOpened": "2024-06-28T00:00:12.581Z" }, { "$type": "Document", - "DocumentIndex": 19, + "DocumentIndex": 97, "Title": "Camera.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Math\\Graphic\\Camera.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Math\\Graphic\\Camera.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Math\\Graphic\\Camera.cs", "RelativeToolTip": "StgSharpDebug\\Math\\Graphic\\Camera.cs", - "ViewState": "AQIAADkAAAAAAAAAAAAcwEUAAAAIAAAA", + "ViewState": "AgIAADkAAAAAAAAAAAAcwEUAAAAIAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-06-28T00:00:11.807Z", - "EditorCaption": "" + "WhenOpened": "2024-06-28T00:00:11.807Z" }, { "$type": "Document", - "DocumentIndex": 201, + "DocumentIndex": 232, "Title": "Shader.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\ShaderEdit\\Shader.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\GL\\ShaderEdit\\Shader.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\ShaderEdit\\Shader.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\GL\\ShaderEdit\\Shader.cs", - "ViewState": "AQIAALcAAAAAAAAAAAAiwGoAAAAjAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-28T00:00:06.545Z" }, { "$type": "Document", - "DocumentIndex": 202, + "DocumentIndex": 233, "Title": "VBO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\VBO.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\GL\\Buffer\\VBO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\Buffer\\VBO.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\GL\\Buffer\\VBO.cs", - "ViewState": "AQIAAEMAAAAAAAAAAAAqwFcAAAA4AAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-27T23:58:09.408Z" }, { "$type": "Document", - "DocumentIndex": 203, + "DocumentIndex": 234, "Title": "glRenderStream.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\glRenderStream.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\GL\\glRenderStream.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\GL\\glRenderStream.cs", "RelativeToolTip": "StgSharpDebug\\Graphics\\GL\\glRenderStream.cs", - "ViewState": "AQIAABgAAAAAAAAAAAAxwC8AAAAAAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-27T23:55:40.542Z" }, { "$type": "Document", - "DocumentIndex": 93, + "DocumentIndex": 145, "Title": "Uniform.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Uniform.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Uniform.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Uniform.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Uniform.cs", - "ViewState": "AQIAAJEAAAAAAAAAAAAUwCsAAAAFAAAA", + "ViewState": "AgIAAJEAAAAAAAAAAAAUwCsAAAAFAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-27T17:58:58.669Z" }, { "$type": "Document", - "DocumentIndex": 112, + "DocumentIndex": 162, "Title": "IGraphicAPIs.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\IGraphicAPIs.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\IGraphicAPIs.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\IGraphicAPIs.cs", "RelativeToolTip": "StgSharp\\Graphics\\IGraphicAPIs.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAgAAAA2AAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAA2AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-27T17:54:48.427Z" }, { "$type": "Document", - "DocumentIndex": 25, + "DocumentIndex": 8, "Title": "Program.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\Program.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Demo\\Program.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Demo\\Program.cs", "RelativeToolTip": "StgSharpDebug\\Demo\\Program.cs", - "ViewState": "AQIAABEAAAAAAAAAAAA+wCEAAAAjAAAA", + "ViewState": "AgIAAC0AAAAAAAAAAAAvwB4AAAAjAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-26T19:34:28.297Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 113, + "DocumentIndex": 42, "Title": "BpNodeBuilder.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BpNodeBuilder.cs", "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\BpNodeBuilder.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BpNodeBuilder.cs", "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\BpNodeBuilder.cs", - "ViewState": "AQIAAAYAAAAAAAAAAAAAAAgAAABOAAAA", + "ViewState": "AgIAAC8AAAAAAAAAAAAvwEIAAAAXAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-26T19:26:13.669Z" }, { "$type": "Document", - "DocumentIndex": 115, + "DocumentIndex": 55, "Title": "IConvertableToBlueprintNode.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\IConvertableToBlueprintNode.cs", "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\IConvertableToBlueprintNode.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\IConvertableToBlueprintNode.cs", "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\IConvertableToBlueprintNode.cs", - "ViewState": "AQIAAA4AAAAAAAAAAAAYwCYAAABHAAAA", + "ViewState": "AgIAAA4AAAAAAAAAAAAYwCMAAAAcAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-25T23:11:19.554Z" }, { "$type": "Document", - "DocumentIndex": 114, + "DocumentIndex": 56, "Title": "BpNodeActionAttribute.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BpNodeActionAttribute.cs", "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\BpNodeActionAttribute.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BpNodeActionAttribute.cs", "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\BpNodeActionAttribute.cs", - "ViewState": "AQIAAAMAAAAAAAAAAAAAAAMAAAAAAAAA", + "ViewState": "AgIAAAkAAAAAAAAAAAAAACIAAAAcAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-25T18:43:08.93Z" }, { "$type": "Document", - "DocumentIndex": 119, + "DocumentIndex": 163, "Title": "glfw3.h", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\glfw3.h", "RelativeDocumentMoniker": "StgSharpC\\glfw3.h", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\glfw3.h", "RelativeToolTip": "StgSharpC\\glfw3.h", - "ViewState": "AQIAAAMRAAAAAAAAAAAqwBURAAAXAAAA", + "ViewState": "AgIAAAMRAAAAAAAAAAAqwBURAAAXAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", "WhenOpened": "2024-06-22T23:24:18.461Z" }, { "$type": "Document", - "DocumentIndex": 198, + "DocumentIndex": 248, "Title": "CrossFrameBlueprintNode.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Logic\\Blueprint\\CrossFrameBlueprintNode.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Logic\\Blueprint\\CrossFrameBlueprintNode.cs", @@ -2211,559 +2745,548 @@ }, { "$type": "Document", - "DocumentIndex": 117, - "Title": "CrossFrameBlueprintNode.cs", - "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\CrossFrameBlueprintNode.cs", - "RelativeDocumentMoniker": "StgSharp\\Logic\\CrossFrameBlueprintNode.cs", - "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\CrossFrameBlueprintNode.cs", - "RelativeToolTip": "StgSharp\\Logic\\CrossFrameBlueprintNode.cs", - "ViewState": "AQIAABkAAAAAAAAAAAAUwBMAAABaAAAA", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-06-17T17:55:13.465Z" - }, - { - "$type": "Document", - "DocumentIndex": 118, + "DocumentIndex": 52, "Title": "PipeLine.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\PipeLine.cs", "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\PipeLine.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\PipeLine.cs", "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\PipeLine.cs", - "ViewState": "AQIAAEIAAAAAAAAAAAA0wFQAAAAAAAAA", + "ViewState": "AgIAAGMAAAAAAAAAAAAowCgAAAAcAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-16T23:18:28.288Z" }, { "$type": "Document", - "DocumentIndex": 135, + "DocumentIndex": 91, "Title": "InternalData.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\InternalData.cs", "RelativeDocumentMoniker": "StgSharp\\Data\\InternalData.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\InternalData.cs", "RelativeToolTip": "StgSharp\\Data\\InternalData.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAIBQwBUAAAAMAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-16T20:31:52.702Z" }, { "$type": "Document", - "DocumentIndex": 127, + "DocumentIndex": 60, "Title": "GlobalSetting.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\GlobalSetting.cs", "RelativeDocumentMoniker": "StgSharp\\Environment\\GlobalSetting.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\GlobalSetting.cs", "RelativeToolTip": "StgSharp\\Environment\\GlobalSetting.cs", - "ViewState": "AQIAAEgAAAAAAAAAAAA1wGMAAABKAAAA", + "ViewState": "AgIAADQAAAAAAAAAAAAvwEkAAAA2AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-16T20:30:52.772Z" }, { "$type": "Document", - "DocumentIndex": 137, + "DocumentIndex": 175, "Title": "globalKeyStat.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\globalKeyStat.cs", "RelativeDocumentMoniker": "StgSharp\\Environment\\globalKeyStat.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\globalKeyStat.cs", "RelativeToolTip": "StgSharp\\Environment\\globalKeyStat.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-16T20:30:52.177Z" }, { "$type": "Document", - "DocumentIndex": 138, + "DocumentIndex": 176, "Title": "ErrorDefine.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\ErrorDefine.cs", "RelativeDocumentMoniker": "StgSharp\\Environment\\ErrorDefine.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\ErrorDefine.cs", "RelativeToolTip": "StgSharp\\Environment\\ErrorDefine.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-16T20:30:51.103Z" }, { "$type": "Document", - "DocumentIndex": 125, + "DocumentIndex": 49, "Title": "CancellableTask.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\CancellableTask.cs", "RelativeDocumentMoniker": "StgSharp\\Logic\\CancellableTask.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\CancellableTask.cs", "RelativeToolTip": "StgSharp\\Logic\\CancellableTask.cs", - "ViewState": "AQIAAAoAAAAAAAAAAAA8wCEAAAA0AAAA", + "ViewState": "AgIAACAAAAAAAAAAAAAYwCQAAAAdAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-16T19:05:18.993Z" }, { "$type": "Document", - "DocumentIndex": 139, + "DocumentIndex": 46, "Title": "SizeFixedList.cs", - "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\SizeFixedList.cs", - "RelativeDocumentMoniker": "StgSharp\\Logic\\SizeFixedList.cs", - "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\SizeFixedList.cs", - "RelativeToolTip": "StgSharp\\Logic\\SizeFixedList.cs", - "ViewState": "AQIAAHsAAAAAAAAAAAAowIoAAAANAAAA", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Collections\\SizeFixedList.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Collections\\SizeFixedList.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Collections\\SizeFixedList.cs", + "RelativeToolTip": "StgSharp\\Logic\\Collections\\SizeFixedList.cs", + "ViewState": "AgIAAAUAAAAAAAAAAAAIwEQAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-15T10:12:43.359Z" }, { "$type": "Document", - "DocumentIndex": 123, + "DocumentIndex": 44, "Title": "BlueprintRunner.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BlueprintRunner.cs", "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\BlueprintRunner.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BlueprintRunner.cs", "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\BlueprintRunner.cs", - "ViewState": "AQIAACkAAAAAAAAAAAAqwEEAAAApAAAA", + "ViewState": "AgIAAGQAAAAAAAAAAAAhwJEAAAAVAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-15T09:28:36.087Z" }, { "$type": "Document", - "DocumentIndex": 116, + "DocumentIndex": 50, "Title": "BlueprintNode.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BlueprintNode.cs", "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\BlueprintNode.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\BlueprintNode.cs", "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\BlueprintNode.cs", - "ViewState": "AQIAANgAAAAAAAAAAAA1wAsBAAAEAAAA", + "ViewState": "AgIAAGAAAAAAAAAAAAA1wLgAAAAtAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-14T15:52:07.701Z" }, { "$type": "Document", - "DocumentIndex": 124, + "DocumentIndex": 54, "Title": "SideNode.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\SideNode.cs", "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\SideNode.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\SideNode.cs", "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\SideNode.cs", - "ViewState": "AQIAAEIAAAAAAAAAAAAqwFYAAAAPAAAA", + "ViewState": "AgIAAAsAAAAAAAAAAAAswCgAAAAcAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-14T13:21:31.686Z" }, { "$type": "Document", - "DocumentIndex": 122, + "DocumentIndex": 165, "Title": "Platform.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\Platform.cs", "RelativeDocumentMoniker": "StgSharp\\Environment\\Platform.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\Platform.cs", "RelativeToolTip": "StgSharp\\Environment\\Platform.cs", - "ViewState": "AQIAAEYAAAAAAAAAAAAqwFoAAAA/AAAA", + "ViewState": "AgIAAEYAAAAAAAAAAAAqwFoAAAAeAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-12T18:52:56.596Z" }, { "$type": "Document", - "DocumentIndex": 126, + "DocumentIndex": 166, "Title": "TimeProvider.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\TimeProvider.cs", "RelativeDocumentMoniker": "StgSharp\\Environment\\TimeProvider.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Environment\\TimeProvider.cs", "RelativeToolTip": "StgSharp\\Environment\\TimeProvider.cs", - "ViewState": "AQIAAG4AAAAAAAAAAAApwHQAAAANAAAA", + "ViewState": "AgIAAG8AAAAAAAAAAAAWwHQAAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-12T18:36:15.947Z" }, { "$type": "Document", - "DocumentIndex": 141, + "DocumentIndex": 47, "Title": "TimeSpanProvider.cs", - "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\TimeSpanProvider.cs", - "RelativeDocumentMoniker": "StgSharp\\Logic\\TimeSpanProvider.cs", - "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\TimeSpanProvider.cs", - "RelativeToolTip": "StgSharp\\Logic\\TimeSpanProvider.cs", - "ViewState": "AQIAAKgAAAAAAAAAAAAzwMAAAAA1AAAA", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Timing\\TimeSpanProvider.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Timing\\TimeSpanProvider.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Timing\\TimeSpanProvider.cs", + "RelativeToolTip": "StgSharp\\Logic\\Timing\\TimeSpanProvider.cs", + "ViewState": "AgIAAA8AAAAAAAAAAADwvyQAAAAZAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-12T18:36:02.299Z" }, { "$type": "Document", - "DocumentIndex": 140, + "DocumentIndex": 53, "Title": "RouteSwitch.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\RouteSwitch.cs", "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\RouteSwitch.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\RouteSwitch.cs", "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\RouteSwitch.cs", - "ViewState": "AQIAABgAAAAAAAAAAAAqwCwAAAAgAAAA", + "ViewState": "AgIAABgAAAAAAAAAAAAqwCUAAAAcAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-11T08:57:14.896Z" }, { "$type": "Document", - "DocumentIndex": 129, + "DocumentIndex": 168, "Title": "Area.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\Area.cs", "RelativeDocumentMoniker": "StgSharp\\Data\\SSD\\Area.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\Area.cs", "RelativeToolTip": "StgSharp\\Data\\SSD\\Area.cs", - "ViewState": "AQIAAAUAAAAAAAAAAAAewBEAAAAIAAAA", + "ViewState": "AgIAAAUAAAAAAAAAAAAewBEAAAAIAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-09T14:42:51.329Z" }, { "$type": "Document", - "DocumentIndex": 133, + "DocumentIndex": 172, "Title": "SSD.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\SSD.cs", "RelativeDocumentMoniker": "StgSharp\\Data\\SSD\\SSD.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\SSD.cs", "RelativeToolTip": "StgSharp\\Data\\SSD\\SSD.cs", - "ViewState": "AQIAABsAAAAAAAAAAAAuwD0AAAAJAAAA", + "ViewState": "AgIAABsAAAAAAAAAAAAuwD0AAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-09T14:29:46.286Z" }, { "$type": "Document", - "DocumentIndex": 132, + "DocumentIndex": 171, "Title": "SSDVirtualFolder.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\SSDVirtualFolder.cs", "RelativeDocumentMoniker": "StgSharp\\Data\\SSD\\SSDVirtualFolder.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\SSDVirtualFolder.cs", "RelativeToolTip": "StgSharp\\Data\\SSD\\SSDVirtualFolder.cs", - "ViewState": "AQIAAC0AAAAAAAAAAEBBwEgAAAAgAAAA", + "ViewState": "AgIAAC8AAAAAAAAAAAAWwEgAAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-09T14:23:14.051Z" }, { "$type": "Document", - "DocumentIndex": 102, + "DocumentIndex": 1, "Title": "Image.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Image.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\Image.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Image.cs", "RelativeToolTip": "StgSharp\\Graphics\\Image.cs", - "ViewState": "AQIAAH4AAAAAAAAAAAA1wJYAAAAcAAAA", + "ViewState": "AgIAADAAAAAAAAAAAAAWwEIAAAAWAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-06-09T13:44:55.317Z" + "WhenOpened": "2024-06-09T13:44:55.317Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 154, + "DocumentIndex": 188, "Title": "TouhouBuilder.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\Touhou\\TouhouBuilder.cs", "RelativeDocumentMoniker": "StgSharp\\Stg\\Touhou\\TouhouBuilder.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\Touhou\\TouhouBuilder.cs", "RelativeToolTip": "StgSharp\\Stg\\Touhou\\TouhouBuilder.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABYAAAAMAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABYAAAAMAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-07T19:03:41.093Z" }, { "$type": "Document", - "DocumentIndex": 155, + "DocumentIndex": 90, "Title": "TouhouWindow.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\Touhou\\TouhouWindow.cs", "RelativeDocumentMoniker": "StgSharp\\Stg\\Touhou\\TouhouWindow.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\Touhou\\TouhouWindow.cs", "RelativeToolTip": "StgSharp\\Stg\\Touhou\\TouhouWindow.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAgAAAAEAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAuwAwAAAA7AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-07T16:57:59.012Z" }, { "$type": "Document", - "DocumentIndex": 156, + "DocumentIndex": 189, "Title": "Program.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgsharpEnvDebug\\Program.cs", "RelativeDocumentMoniker": "StgsharpEnvDebug\\Program.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgsharpEnvDebug\\Program.cs", "RelativeToolTip": "StgsharpEnvDebug\\Program.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABsAAAAGAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABsAAAAGAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-06T18:37:51.094Z" }, { "$type": "Document", - "DocumentIndex": 59, + "DocumentIndex": 122, "Title": "ViewManage.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\ViewManage.cs", "RelativeDocumentMoniker": "StgSharp\\MVVM\\ViewModel\\ViewManage.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\ViewManage.cs", "RelativeToolTip": "StgSharp\\MVVM\\ViewModel\\ViewManage.cs", - "ViewState": "AQIAACkAAAAAAAAAAAA2wDgAAAAuAAAA", + "ViewState": "AgIAACkAAAAAAAAAAAA2wDgAAAAFAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-06T08:10:50.451Z" }, { "$type": "Document", - "DocumentIndex": 58, + "DocumentIndex": 121, "Title": "ShowViewPort.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\ShowViewPort.cs", "RelativeDocumentMoniker": "StgSharp\\MVVM\\ViewModel\\ShowViewPort.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\ShowViewPort.cs", "RelativeToolTip": "StgSharp\\MVVM\\ViewModel\\ShowViewPort.cs", - "ViewState": "AQIAAC0AAAAAAAAAAAA8wEYAAAA2AAAA", + "ViewState": "AgIAAC4AAAAAAAAAAAAYwEYAAAANAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-06T07:49:36.575Z" }, { "$type": "Document", - "DocumentIndex": 64, + "DocumentIndex": 127, "Title": "ViewPort.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewPort.cs", "RelativeDocumentMoniker": "StgSharp\\MVVM\\ViewPort.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewPort.cs", "RelativeToolTip": "StgSharp\\MVVM\\ViewPort.cs", - "ViewState": "AQIAABUAAAAAAAAAAAAAwCsAAAAZAAAA", + "ViewState": "AgIAABUAAAAAAAAAAAAAwCsAAAAZAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-06T06:43:01.237Z" }, { "$type": "Document", - "DocumentIndex": 65, + "DocumentIndex": 36, "Title": "ViewModel.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\ViewModel.cs", "RelativeDocumentMoniker": "StgSharp\\MVVM\\ViewModel\\ViewModel.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\ViewModel\\ViewModel.cs", "RelativeToolTip": "StgSharp\\MVVM\\ViewModel\\ViewModel.cs", - "ViewState": "AQIAAB0AAAAAAAAAAAAYwC8AAAAhAAAA", + "ViewState": "AgIAADAAAAAAAAAAAAAvwEMAAAAtAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-05T19:19:57.97Z" }, { "$type": "Document", - "DocumentIndex": 162, + "DocumentIndex": 195, "Title": "Cordinate.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Cordinate.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Cordinate.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Cordinate.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Cordinate.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-04T09:20:55.089Z" }, { "$type": "Document", - "DocumentIndex": 163, + "DocumentIndex": 196, "Title": "Square.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Square.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Square.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Square.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Square.cs", - "ViewState": "AQIAABoAAAAAAAAAAAAtwDMAAAAaAAAA", + "ViewState": "AgIAABoAAAAAAAAAAAAtwDMAAAAaAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-03T19:26:11.603Z" }, { "$type": "Document", - "DocumentIndex": 160, + "DocumentIndex": 193, "Title": "Rectangle.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Rectangle.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Rectangle.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Rectangle.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Rectangle.cs", - "ViewState": "AQIAACoAAAAAAAAAAAAawCwAAAASAAAA", + "ViewState": "AgIAACoAAAAAAAAAAAAawCwAAAASAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-03T18:55:48.318Z" }, { "$type": "Document", - "DocumentIndex": 105, + "DocumentIndex": 156, "Title": "Triangle.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Triangle.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Triangle.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Triangle.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Triangle.cs", - "ViewState": "AQIAAEYAAAAAAAAAAAAYwFwAAAAoAAAA", + "ViewState": "AgIAAEYAAAAAAAAAAAAYwFwAAAAoAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-03T18:53:18.064Z" }, { "$type": "Document", - "DocumentIndex": 161, + "DocumentIndex": 194, "Title": "Parallelogram.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Parallelogram.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Parallelogram.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Parallelogram.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Parallelogram.cs", - "ViewState": "AQIAACAAAAAAAAAAAAAtwD8AAAAGAAAA", + "ViewState": "AgIAACAAAAAAAAAAAAAtwD8AAAAGAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-03T18:45:48.87Z" }, { "$type": "Document", - "DocumentIndex": 108, + "DocumentIndex": 159, "Title": "Polygon5.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Polygon5.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Polygon5.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Polygon5.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Polygon5.cs", - "ViewState": "AQIAADwAAAAAAAAAAAAYwE8AAAAoAAAA", + "ViewState": "AgIAADwAAAAAAAAAAAAYwE8AAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-03T12:56:34.052Z" }, { "$type": "Document", - "DocumentIndex": 106, + "DocumentIndex": 157, "Title": "Polygon6.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Polygon6.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Polygon6.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Polygon6.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Polygon6.cs", - "ViewState": "AQIAAC4AAAAAAAAAAAAqwEIAAAAoAAAA", + "ViewState": "AgIAAC4AAAAAAAAAAAAqwEIAAAAoAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-03T12:53:07.67Z" }, { "$type": "Document", - "DocumentIndex": 167, + "DocumentIndex": 200, "Title": "Class1.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\SpaceGeometry\\Class1.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\SpaceGeometry\\Class1.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\SpaceGeometry\\Class1.cs", "RelativeToolTip": "StgSharp\\Geometries\\SpaceGeometry\\Class1.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-03T08:05:08.74Z" }, { "$type": "Document", - "DocumentIndex": 166, + "DocumentIndex": 199, "Title": "SpaceCoordinate.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\SpaceCoordinate.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\Coordination\\SpaceCoordinate.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\SpaceCoordinate.cs", "RelativeToolTip": "StgSharp\\Geometries\\Coordination\\SpaceCoordinate.cs", - "ViewState": "AQIAABUAAAAAAAAAAAAAACoAAAAxAAAA", + "ViewState": "AgIAAA8AAAAAAAAAAIBgwCoAAAAxAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-03T08:04:00.326Z" }, { "$type": "Document", - "DocumentIndex": 107, + "DocumentIndex": 158, "Title": "Polygon4.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Polygon4.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Polygon4.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Polygon4.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Polygon4.cs", - "ViewState": "AQIAABQAAAAAAAAAAAAqwCgAAAApAAAA", + "ViewState": "AgIAABQAAAAAAAAAAAAqwCgAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-03T07:48:31.982Z" }, { "$type": "Document", - "DocumentIndex": 171, + "DocumentIndex": 204, "Title": "Cordination.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Cordination.cs", "RelativeDocumentMoniker": "StgSharp\\Math\\Linear\\Cordination.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Cordination.cs", "RelativeToolTip": "StgSharp\\Math\\Linear\\Cordination.cs", - "ViewState": "AQIAAAwAAAAAAAAAAAAAAB8AAAABAAAA", + "ViewState": "AgIAAAYAAAAAAAAAAIBgwB8AAAABAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-03T07:16:53.497Z" }, { "$type": "Document", - "DocumentIndex": 165, + "DocumentIndex": 198, "Title": "Point.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Point.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\Point.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Point.cs", "RelativeToolTip": "StgSharp\\Geometries\\Point.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABUAAAAhAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABUAAAAhAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-03T07:00:50.569Z" }, { "$type": "Document", - "DocumentIndex": 172, + "DocumentIndex": 205, "Title": "Vector.Cross.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Vector.Cross.cs", "RelativeDocumentMoniker": "StgSharp\\Math\\Linear\\Vector.Cross.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Vector.Cross.cs", "RelativeToolTip": "StgSharp\\Math\\Linear\\Vector.Cross.cs", - "ViewState": "AQIAABgAAAAAAAAAAAAAAB8AAAABAAAA", + "ViewState": "AgIAABIAAAAAAAAAAIBgwB8AAAABAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-02T18:55:17.351Z" }, { "$type": "Document", - "DocumentIndex": 158, + "DocumentIndex": 191, "Title": "IGeometry.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\IGeometry.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\IGeometry.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\IGeometry.cs", "RelativeToolTip": "StgSharp\\Geometries\\IGeometry.cs", - "ViewState": "AQIAAB8AAAAAAAAAAAAiwDMAAAAeAAAA", + "ViewState": "AgIAAB8AAAAAAAAAAAAiwDMAAAAeAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-02T18:32:52.786Z" }, { "$type": "Document", - "DocumentIndex": 178, + "DocumentIndex": 211, "Title": "JoystickTrigger.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\UsrActivity\\JoystickTrigger.cs", "RelativeDocumentMoniker": "StgSharp\\Controlling\\UsrActivity\\JoystickTrigger.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\UsrActivity\\JoystickTrigger.cs", "RelativeToolTip": "StgSharp\\Controlling\\UsrActivity\\JoystickTrigger.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAACsAAAA7AAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACsAAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-02T17:59:29.232Z" }, { "$type": "Document", - "DocumentIndex": 179, + "DocumentIndex": 212, "Title": "ITrigger.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\UsrActivity\\ITrigger.cs", "RelativeDocumentMoniker": "StgSharp\\Controlling\\UsrActivity\\ITrigger.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\UsrActivity\\ITrigger.cs", "RelativeToolTip": "StgSharp\\Controlling\\UsrActivity\\ITrigger.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAkAAAAiAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAAiAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-02T17:56:15.991Z" }, { "$type": "Document", - "DocumentIndex": 143, + "DocumentIndex": 177, "Title": "KeyTrigger.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\UsrActivity\\KeyTrigger.cs", "RelativeDocumentMoniker": "StgSharp\\Controlling\\UsrActivity\\KeyTrigger.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\UsrActivity\\KeyTrigger.cs", "RelativeToolTip": "StgSharp\\Controlling\\UsrActivity\\KeyTrigger.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAoAAAAmAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAmAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-02T17:48:14.248Z" }, { "$type": "Document", - "DocumentIndex": 48, + "DocumentIndex": 31, "Title": "MarkingLable.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\MarkingLable.cs", "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\MarkingLable.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\MarkingLable.cs", "RelativeToolTip": "StgSharp\\Controlling\\Controls\\MarkingLable.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAA4AAAAsAAAA", + "ViewState": "AgIAABwAAAAAAAAAAAAvwDAAAAAUAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-01T19:38:52.786Z" }, { "$type": "Document", - "DocumentIndex": 146, + "DocumentIndex": 180, "Title": "DecorationBox.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\DecorationBox.cs", "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\DecorationBox.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\DecorationBox.cs", "RelativeToolTip": "StgSharp\\Controlling\\Controls\\DecorationBox.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABEAAAAqAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABEAAAAqAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-01T19:38:36.894Z" }, { "$type": "Document", - "DocumentIndex": 148, + "DocumentIndex": 182, "Title": "BattleField.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\BattleField.cs", "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\BattleField.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\BattleField.cs", "RelativeToolTip": "StgSharp\\Controlling\\Controls\\BattleField.cs", - "ViewState": "AQIAABcAAAAAAAAAAAAtwC8AAAASAAAA", + "ViewState": "AgIAABcAAAAAAAAAAAAtwC8AAAASAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-06-01T19:37:53.117Z" }, { "$type": "Document", - "DocumentIndex": 192, + "DocumentIndex": 224, "Title": "KeyEvent.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\KeyEvent.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\KeyEvent.cs", @@ -2774,79 +3297,79 @@ }, { "$type": "Document", - "DocumentIndex": 147, + "DocumentIndex": 181, "Title": "CharacterIndexImage.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\CharacterIndexImage.cs", "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\CharacterIndexImage.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\CharacterIndexImage.cs", "RelativeToolTip": "StgSharp\\Controlling\\Controls\\CharacterIndexImage.cs", - "ViewState": "AQIAAB8AAAAAAAAAAADgvzMAAAAwAAAA", + "ViewState": "AgIAAB8AAAAAAAAAAADgvzMAAAAmAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-31T07:27:57.971Z" }, { "$type": "Document", - "DocumentIndex": 153, + "DocumentIndex": 187, "Title": "KeyControl.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\KeyControl.cs", "RelativeDocumentMoniker": "StgSharp\\Controlling\\KeyControl.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\KeyControl.cs", "RelativeToolTip": "StgSharp\\Controlling\\KeyControl.cs", - "ViewState": "AQIAAFMAAAAAAAAAAAAtwHIAAAARAAAA", + "ViewState": "AgIAAFMAAAAAAAAAAAAtwHIAAAARAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-30T03:47:10.188Z" }, { "$type": "Document", - "DocumentIndex": 68, + "DocumentIndex": 130, "Title": "ButtonGroup.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\ButtonGroup.cs", "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\ButtonGroup.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\ButtonGroup.cs", "RelativeToolTip": "StgSharp\\Controlling\\Controls\\ButtonGroup.cs", - "ViewState": "AQIAAHwAAAAAAAAAAAAqwJAAAAAUAAAA", + "ViewState": "AgIAAHwAAAAAAAAAAAAqwJAAAAAUAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-30T03:07:38.817Z" }, { "$type": "Document", - "DocumentIndex": 144, + "DocumentIndex": 178, "Title": "PlainGeometryMesh.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\PlainGeometryMesh.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\PlainGeometryMesh.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\PlainGeometryMesh.cs", "RelativeToolTip": "StgSharp\\Graphics\\PlainGeometryMesh.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAACoAAAAJAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACoAAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-29T18:54:22.53Z" }, { "$type": "Document", - "DocumentIndex": 149, + "DocumentIndex": 183, "Title": "ControllingIntem.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\ControllingIntem.cs", "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\ControllingIntem.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\ControllingIntem.cs", "RelativeToolTip": "StgSharp\\Controlling\\Controls\\ControllingIntem.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAuwBgAAAAJAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAuwBgAAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-29T18:52:06.895Z" }, { "$type": "Document", - "DocumentIndex": 145, + "DocumentIndex": 179, "Title": "TriggerButton.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\TriggerButton.cs", "RelativeDocumentMoniker": "StgSharp\\Controlling\\Controls\\TriggerButton.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\Controls\\TriggerButton.cs", "RelativeToolTip": "StgSharp\\Controlling\\Controls\\TriggerButton.cs", - "ViewState": "AQIAAFEAAAAAAAAAAAAswG8AAAAfAAAA", + "ViewState": "AgIAAFEAAAAAAAAAAAAswG8AAAARAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-29T18:46:16.098Z" }, { "$type": "Document", - "DocumentIndex": 193, + "DocumentIndex": 225, "Title": "KeyboardButton.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Controlling\\Controls\\KeyboardButton.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Controlling\\Controls\\KeyboardButton.cs", @@ -2857,55 +3380,55 @@ }, { "$type": "Document", - "DocumentIndex": 175, + "DocumentIndex": 208, "Title": "Plain.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Plain.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Plain.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Plain.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Plain.cs", - "ViewState": "AQIAAD0AAAAAAAAAAAAUwEsAAAAfAAAA", + "ViewState": "AgIAADwAAAAAAAAAAAAUwEsAAAAfAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-29T03:14:59.807Z" }, { "$type": "Document", - "DocumentIndex": 176, + "DocumentIndex": 209, "Title": "IEntity.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Entities\\IEntity.cs", "RelativeDocumentMoniker": "StgSharp\\Entities\\IEntity.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Entities\\IEntity.cs", "RelativeToolTip": "StgSharp\\Entities\\IEntity.cs", - "ViewState": "AQIAACIAAAAAAAAAAAAywDkAAAAiAAAA", + "ViewState": "AgIAACIAAAAAAAAAAAAywDkAAAAWAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-29T03:13:32.629Z" }, { "$type": "Document", - "DocumentIndex": 128, + "DocumentIndex": 167, "Title": "DataSegment.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\DataSegment.cs", "RelativeDocumentMoniker": "StgSharp\\Data\\SSD\\DataSegment.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\DataSegment.cs", "RelativeToolTip": "StgSharp\\Data\\SSD\\DataSegment.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAC4AAAAJAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAC4AAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-29T03:13:13.688Z" }, { "$type": "Document", - "DocumentIndex": 134, + "DocumentIndex": 173, "Title": "SSDraw.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\SSDraw.cs", "RelativeDocumentMoniker": "StgSharp\\Data\\SSD\\SSDraw.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\SSD\\SSDraw.cs", "RelativeToolTip": "StgSharp\\Data\\SSD\\SSDraw.cs", - "ViewState": "AQIAADYAAAAAAAAAAAAcwEYAAAAIAAAA", + "ViewState": "AgIAADYAAAAAAAAAAAAcwEYAAAAIAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-29T03:11:14.919Z" }, { "$type": "Document", - "DocumentIndex": 190, + "DocumentIndex": 222, "Title": "Angle.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\GeometryOperation\\Angle.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\GeometryOperation\\Angle.cs", @@ -2916,464 +3439,463 @@ }, { "$type": "Document", - "DocumentIndex": 120, + "DocumentIndex": 164, "Title": "framework.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\framework.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\framework.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\framework.cs", "RelativeToolTip": "StgSharp\\Graphics\\framework.cs", - "ViewState": "AQIAAJkAAAAAAAAAAAA8wK0AAABMAAAA", + "ViewState": "AgIAAB4BAAAAAAAAAAAYwC8AAAAIAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-28T12:14:37.475Z" }, { "$type": "Document", - "DocumentIndex": 180, + "DocumentIndex": 34, "Title": "TimeFunction.cs", - "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\TimeFunction.cs", - "RelativeDocumentMoniker": "StgSharp\\Logic\\TimeFunction.cs", - "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\TimeFunction.cs", - "RelativeToolTip": "StgSharp\\Logic\\TimeFunction.cs", - "ViewState": "AQIAAGoAAAAAAAAAAAAxwH0AAAAnAAAA", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Timing\\TimeFunction.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Timing\\TimeFunction.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Timing\\TimeFunction.cs", + "RelativeToolTip": "StgSharp\\Logic\\Timing\\TimeFunction.cs", + "ViewState": "AgIAAAkAAAAAAAAAAAAAAB4AAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-28T12:14:28.529Z" }, { "$type": "Document", - "DocumentIndex": 142, + "DocumentIndex": 48, "Title": "TimeSourceProvider.cs", - "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\TimeSourceProvider.cs", - "RelativeDocumentMoniker": "StgSharp\\Logic\\TimeSourceProvider.cs", - "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\TimeSourceProvider.cs", - "RelativeToolTip": "StgSharp\\Logic\\TimeSourceProvider.cs", - "ViewState": "AQIAADMAAAAAAAAAAAAtwFUAAAAhAAAA", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Timing\\TimeSourceProvider.cs", + "RelativeDocumentMoniker": "StgSharp\\Logic\\Timing\\TimeSourceProvider.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Timing\\TimeSourceProvider.cs", + "RelativeToolTip": "StgSharp\\Logic\\Timing\\TimeSourceProvider.cs", + "ViewState": "AgIAABQAAAAAAAAAAAAvwCQAAAAZAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-28T12:14:27.563Z" }, { "$type": "Document", - "DocumentIndex": 173, + "DocumentIndex": 206, "Title": "Vector.Normalize.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Vector.Normalize.cs", "RelativeDocumentMoniker": "StgSharp\\Math\\Linear\\Vector.Normalize.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Vector.Normalize.cs", "RelativeToolTip": "StgSharp\\Math\\Linear\\Vector.Normalize.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAACcAAAAlAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACcAAAAdAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-28T12:13:20.051Z" }, { "$type": "Document", - "DocumentIndex": 150, + "DocumentIndex": 184, "Title": "ParticleOnPlain.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\ParticleOnPlain.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Define\\ParticleOnPlain.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\ParticleOnPlain.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Define\\ParticleOnPlain.cs", - "ViewState": "AQIAADkAAAAAAAAAAAAwwCoAAAApAAAA", + "ViewState": "AgIAADkAAAAAAAAAAAAwwCoAAAApAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-28T12:13:03.322Z" }, { "$type": "Document", - "DocumentIndex": 182, + "DocumentIndex": 214, "Title": "IInstancingBuffer.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\IInstancingBuffer.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\IInstancingBuffer.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\IInstancingBuffer.cs", "RelativeToolTip": "StgSharp\\Geometries\\IInstancingBuffer.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAA8AAAA6AAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA8AAAAmAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-28T12:12:51.691Z" }, { "$type": "Document", - "DocumentIndex": 151, + "DocumentIndex": 185, "Title": "IInstancing.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\IInstancing.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\IInstancing.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\IInstancing.cs", "RelativeToolTip": "StgSharp\\Geometries\\IInstancing.cs", - "ViewState": "AQIAACkAAAAAAAAAAAAtwDYAAAAVAAAA", + "ViewState": "AgIAACkAAAAAAAAAAAAtwDYAAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-28T12:12:47.113Z" }, { "$type": "Document", - "DocumentIndex": 92, + "DocumentIndex": 144, "Title": "ShaderStruct.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\ShaderEdit\\ShaderStruct.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\ShaderEdit\\ShaderStruct.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\ShaderEdit\\ShaderStruct.cs", "RelativeToolTip": "StgSharp\\Graphics\\ShaderEdit\\ShaderStruct.cs", - "ViewState": "AQIAAAkAAAAAAAAAAAAAACsAAAArAAAA", + "ViewState": "AgIAAAMAAAAAAAAAAIBgwCsAAAApAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-28T12:06:38.571Z" }, { "$type": "Document", - "DocumentIndex": 183, + "DocumentIndex": 215, "Title": "ShaderGenerator.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\ShaderEdit\\ShaderGenerator.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\ShaderEdit\\ShaderGenerator.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\ShaderEdit\\ShaderGenerator.cs", "RelativeToolTip": "StgSharp\\Graphics\\ShaderEdit\\ShaderGenerator.cs", - "ViewState": "AQIAAHsAAAAAAAAAAAAowAAAAAAAAAAA", + "ViewState": "AgIAAHsAAAAAAAAAAAAowAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-28T12:06:34.296Z" }, { "$type": "Document", - "DocumentIndex": 184, + "DocumentIndex": 216, "Title": "GLIO.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\IO\\GLIO.cs", "RelativeDocumentMoniker": "StgSharp\\Controlling\\IO\\GLIO.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Controlling\\IO\\GLIO.cs", "RelativeToolTip": "StgSharp\\Controlling\\IO\\GLIO.cs", - "ViewState": "AQIAAC4AAAAAAAAAAAA9wDAAAAAYAAAA", + "ViewState": "AgIAAEUAAAAAAAAAAAAcwCoAAAAIAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-28T09:53:35.017Z" }, { "$type": "Document", - "DocumentIndex": 82, + "DocumentIndex": 63, "Title": "TextureGL.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\Buffer\\TextureGL.cs", - "ViewState": "AQIAAFIAAAAAAAAAAAA1wGUAAABgAAAA", + "ViewState": "AgIAACoAAAAAAAAAAIBQwDsAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-28T09:52:02.572Z" }, { "$type": "Document", - "DocumentIndex": 79, + "DocumentIndex": 134, "Title": "glEnum.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Define\\glEnum.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\Define\\glEnum.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\Define\\glEnum.cs", "RelativeToolTip": "StgSharp\\Graphics\\Define\\glEnum.cs", - "ViewState": "AQIAACUAAAAAAAAAAAAqwD0AAABLAAAA", + "ViewState": "AgIAACUAAAAAAAAAAAAqwD0AAABLAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-28T09:51:55.169Z" }, { "$type": "Document", - "DocumentIndex": 185, + "DocumentIndex": 217, "Title": "Angle.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\GeometryScaler\\Angle.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\GeometryScaler\\Angle.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\GeometryScaler\\Angle.cs", "RelativeToolTip": "StgSharp\\Geometries\\GeometryScaler\\Angle.cs", - "ViewState": "AQIAAHEAAAAAAAAAAAAEwH8AAAATAAAA", + "ViewState": "AgIAAHEAAAAAAAAAAEBAwH8AAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-28T09:50:33.189Z" }, { "$type": "Document", - "DocumentIndex": 5, + "DocumentIndex": 64, "Title": "CollisionTexture.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\CollisionTexture.cs", "RelativeDocumentMoniker": "StgSharp\\Stg\\CollisionTexture.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\CollisionTexture.cs", "RelativeToolTip": "StgSharp\\Stg\\CollisionTexture.cs", - "ViewState": "AQIAAGkAAAAAAAAAAAAqwHcAAABJAAAA", + "ViewState": "AgIAAIkAAAAAAAAAAAAhwKkAAAAjAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-05-28T09:47:06.034Z", - "EditorCaption": "" + "WhenOpened": "2024-05-28T09:47:06.034Z" }, { "$type": "Document", - "DocumentIndex": 130, + "DocumentIndex": 169, "Title": "ISSDSerializable.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\Serialize\\ISSDSerializable.cs", "RelativeDocumentMoniker": "StgSharp\\Data\\Serialize\\ISSDSerializable.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\Serialize\\ISSDSerializable.cs", "RelativeToolTip": "StgSharp\\Data\\Serialize\\ISSDSerializable.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABwAAAAkAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABwAAAAkAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-14T02:11:24.157Z" }, { "$type": "Document", - "DocumentIndex": 131, + "DocumentIndex": 170, "Title": "Define.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\Serialize\\Define.cs", "RelativeDocumentMoniker": "StgSharp\\Data\\Serialize\\Define.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\Serialize\\Define.cs", "RelativeToolTip": "StgSharp\\Data\\Serialize\\Define.cs", - "ViewState": "AQIAABUAAAAAAAAAAIBQwAAAAAAAAAAA", + "ViewState": "AgIAAA8AAAAAAAAAAMBowAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-14T02:11:21.58Z" }, { "$type": "Document", - "DocumentIndex": 186, + "DocumentIndex": 218, "Title": "M128.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\M128.cs", "RelativeDocumentMoniker": "StgSharp\\Data\\M128.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\M128.cs", "RelativeToolTip": "StgSharp\\Data\\M128.cs", - "ViewState": "AQIAAC0AAAAAAAAAAAAAAD0AAAAAAAAA", + "ViewState": "AgIAACcAAAAAAAAAAIBgwD0AAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-14T02:06:36.634Z" }, { "$type": "Document", - "DocumentIndex": 136, + "DocumentIndex": 174, "Title": "RandomGenerator.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\RandomGenerator.cs", "RelativeDocumentMoniker": "StgSharp\\Data\\RandomGenerator.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Data\\RandomGenerator.cs", "RelativeToolTip": "StgSharp\\Data\\RandomGenerator.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABgAAAAMAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABgAAAAMAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-14T01:44:33.9Z" }, { "$type": "Document", - "DocumentIndex": 181, + "DocumentIndex": 213, "Title": "StgSharpC.h", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\StgSharpC.h", "RelativeDocumentMoniker": "StgSharpC\\StgSharpC.h", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\StgSharpC.h", "RelativeToolTip": "StgSharpC\\StgSharpC.h", - "ViewState": "AQIAABgAAAAAAAAAAIAwwCgAAAAoAAAA", + "ViewState": "AgIAABgAAAAAAAAAAIAwwCgAAAAoAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", "WhenOpened": "2024-05-11T21:42:41.09Z" }, { "$type": "Document", - "DocumentIndex": 78, + "DocumentIndex": 133, "Title": "glFunction.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glFunction.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glFunction.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glFunction.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glFunction.cs", - "ViewState": "AQIAAPsAAAAAAAAAAAAYwA4BAABwAAAA", + "ViewState": "AgIAAPsAAAAAAAAAAABCwA4BAAArAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-11T21:22:23.016Z" }, { "$type": "Document", - "DocumentIndex": 94, + "DocumentIndex": 146, "Title": "Shader.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Shader.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Shader.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Shader.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\ShaderEdit\\Shader.cs", - "ViewState": "AQIAALwAAAAAAAAAAAAcwN4AAAAcAAAA", + "ViewState": "AgIAALwAAAAAAAAAAAAcwN4AAAAcAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-11T19:37:12.456Z" }, { "$type": "Document", - "DocumentIndex": 121, + "DocumentIndex": 51, "Title": "Blueprint.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\Blueprint.cs", "RelativeDocumentMoniker": "StgSharp\\Logic\\Blueprint\\Blueprint.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Logic\\Blueprint\\Blueprint.cs", "RelativeToolTip": "StgSharp\\Logic\\Blueprint\\Blueprint.cs", - "ViewState": "AQIAAD8AAAAAAAAAAAAqwFgAAAAxAAAA", + "ViewState": "AgIAADQAAAAAAAAAAAAYwDQAAAAeAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-11T15:59:06.55Z" }, { "$type": "Document", - "DocumentIndex": 61, + "DocumentIndex": 124, "Title": "ViewBase.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewBase.cs", "RelativeDocumentMoniker": "StgSharp\\MVVM\\View\\ViewBase.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\MVVM\\View\\ViewBase.cs", "RelativeToolTip": "StgSharp\\MVVM\\View\\ViewBase.cs", - "ViewState": "AQIAAIMAAAAAAAAAAAA2wJoAAAAmAAAA", + "ViewState": "AgIAAH0AAAAAAAAAACBlwJoAAAAmAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-11T05:11:47.098Z" }, { "$type": "Document", - "DocumentIndex": 187, + "DocumentIndex": 219, "Title": "GeometryOperation.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\GeometryOperation.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Define\\GeometryOperation.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\GeometryOperation.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Define\\GeometryOperation.cs", - "ViewState": "AQIAABUAAAAAAAAAAIA0wCUAAAAfAAAA", + "ViewState": "AgIAABUAAAAAAAAAAIA0wCUAAAAfAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-10T04:35:10.414Z" }, { "$type": "Document", - "DocumentIndex": 75, + "DocumentIndex": 35, "Title": "GeometryOperation.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\GeometryOperation\\GeometryOperation.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\GeometryOperation\\GeometryOperation.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\GeometryOperation\\GeometryOperation.cs", "RelativeToolTip": "StgSharp\\Geometries\\GeometryOperation\\GeometryOperation.cs", - "ViewState": "AQIAADYAAAAAAAAAAAAYwFIAAAAQAAAA", + "ViewState": "AgIAAAYAAAAAAAAAAAAhwD8AAAAzAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-10T04:34:22.843Z" }, { "$type": "Document", - "DocumentIndex": 159, + "DocumentIndex": 192, "Title": "PlainGeometry.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Define\\PlainGeometry.cs", - "ViewState": "AQIAACUAAAAAAAAAAAAtwDoAAAA4AAAA", + "ViewState": "AgIAACUAAAAAAAAAAAAtwDoAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-09T11:36:04.039Z" }, { "$type": "Document", - "DocumentIndex": 152, + "DocumentIndex": 186, "Title": "IPlainEntity.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\IPlainEntity.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Define\\IPlainEntity.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\IPlainEntity.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Define\\IPlainEntity.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAuwBMAAAAAAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAuwBMAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-09T11:36:00.584Z" }, { "$type": "Document", - "DocumentIndex": 103, - "Title": "GLresourceGenrator.cs", - "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\GLresourceGenrator.cs", - "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\GLresourceGenrator.cs", - "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\GLresourceGenrator.cs", - "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\GLresourceGenrator.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAACcAAAAZAAAA", + "DocumentIndex": 154, + "Title": "glResourceGenrator.cs", + "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glResourceGenrator.cs", + "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glResourceGenrator.cs", + "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glResourceGenrator.cs", + "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glResourceGenrator.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAACcAAAAZAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-09T09:44:36.325Z" }, { "$type": "Document", - "DocumentIndex": 85, + "DocumentIndex": 38, "Title": "glRenderStream.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glRenderStream.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\OpenGL\\glRenderStream.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\OpenGL\\glRenderStream.cs", "RelativeToolTip": "StgSharp\\Graphics\\OpenGL\\glRenderStream.cs", - "ViewState": "AQIAADIAAAAAAAAAAAA+wEwAAAAqAAAA", + "ViewState": "AgIAAAsAAAAAAAAAAAAvwCQAAAAYAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-09T09:42:14.767Z" }, { "$type": "Document", - "DocumentIndex": 63, + "DocumentIndex": 126, "Title": "RenderStream.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\RenderStream.cs", "RelativeDocumentMoniker": "StgSharp\\Graphics\\RenderStream.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Graphics\\RenderStream.cs", "RelativeToolTip": "StgSharp\\Graphics\\RenderStream.cs", - "ViewState": "AQIAABYAAAAAAAAAAAAzwCMAAAAAAAAA", + "ViewState": "AgIAABYAAAAAAAAAAAAzwCMAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-09T09:42:08.831Z" }, { "$type": "Document", - "DocumentIndex": 177, + "DocumentIndex": 210, "Title": "StreamLocalCoordinate.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\StreamLocalCoordinate.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\Coordination\\StreamLocalCoordinate.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\StreamLocalCoordinate.cs", "RelativeToolTip": "StgSharp\\Geometries\\Coordination\\StreamLocalCoordinate.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAoAAAAGAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAGAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-09T03:46:07.408Z" }, { "$type": "Document", - "DocumentIndex": 189, + "DocumentIndex": 221, "Title": "vec3d.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\vec3d.cs", "RelativeDocumentMoniker": "StgSharp\\Math\\Linear\\vec3d.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\vec3d.cs", "RelativeToolTip": "StgSharp\\Math\\Linear\\vec3d.cs", - "ViewState": "AQIAACwAAAAAAAAAAAAjwD4AAAASAAAA", + "ViewState": "AgIAACwAAAAAAAAAAAAjwD4AAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-09T03:42:19.181Z" }, { "$type": "Document", - "DocumentIndex": 170, + "DocumentIndex": 203, "Title": "vec4d.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\vec4d.cs", "RelativeDocumentMoniker": "StgSharp\\Math\\Linear\\vec4d.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\vec4d.cs", "RelativeToolTip": "StgSharp\\Math\\Linear\\vec4d.cs", - "ViewState": "AQIAAEYAAAAAAAAAAAAiwFcAAAAfAAAA", + "ViewState": "AgIAAEcAAAAAAAAAAAAAwFcAAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-09T03:40:47.919Z" }, { "$type": "Document", - "DocumentIndex": 174, + "DocumentIndex": 207, "Title": "Vector.Orthogonalize.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Vector.Orthogonalize.cs", "RelativeDocumentMoniker": "StgSharp\\Math\\Linear\\Vector.Orthogonalize.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Math\\Linear\\Vector.Orthogonalize.cs", "RelativeToolTip": "StgSharp\\Math\\Linear\\Vector.Orthogonalize.cs", - "ViewState": "AQIAACcAAAAAAAAAAAAtwDEAAAArAAAA", + "ViewState": "AgIAACcAAAAAAAAAAAAtwDEAAAArAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-09T03:35:41.246Z" }, { "$type": "Document", - "DocumentIndex": 168, + "DocumentIndex": 201, "Title": "CoordinationBase.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\CoordinationBase.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\Coordination\\CoordinationBase.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\CoordinationBase.cs", "RelativeToolTip": "StgSharp\\Geometries\\Coordination\\CoordinationBase.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAuwAsAAAAFAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAuwAsAAAAFAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-09T03:32:12.398Z" }, { "$type": "Document", - "DocumentIndex": 164, + "DocumentIndex": 197, "Title": "PlainCoordinate.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\PlainCoordinate.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\Coordination\\PlainCoordinate.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\Coordination\\PlainCoordinate.cs", "RelativeToolTip": "StgSharp\\Geometries\\Coordination\\PlainCoordinate.cs", - "ViewState": "AQIAACMAAAAAAAAAAAAiwD8AAABeAAAA", + "ViewState": "AgIAACMAAAAAAAAAAAAiwD8AAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-09T03:29:20.299Z" }, { "$type": "Document", - "DocumentIndex": 169, + "DocumentIndex": 202, "Title": "PlainInstancingBuffer.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\PlainInstancingBuffer.cs", "RelativeDocumentMoniker": "StgSharp\\Geometries\\PlainGeometry\\Define\\PlainInstancingBuffer.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Geometries\\PlainGeometry\\Define\\PlainInstancingBuffer.cs", "RelativeToolTip": "StgSharp\\Geometries\\PlainGeometry\\Define\\PlainInstancingBuffer.cs", - "ViewState": "AQIAACQAAAAAAAAAAAAAAFYAAAAbAAAA", + "ViewState": "AgIAAB4AAAAAAAAAAIBgwFYAAAAJAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-09T03:28:11.182Z" }, { "$type": "Document", - "DocumentIndex": 188, + "DocumentIndex": 220, "Title": "Bullet.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\Bullet.cs", "RelativeDocumentMoniker": "StgSharp\\Stg\\Bullet.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharp\\Stg\\Bullet.cs", "RelativeToolTip": "StgSharp\\Stg\\Bullet.cs", - "ViewState": "AQIAAFkAAAAAAAAAAIA1wDUAAAAiAAAA", + "ViewState": "AgIAAFkAAAAAAAAAAIA1wDUAAAANAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-05-09T03:22:55.279Z" }, { "$type": "Document", - "DocumentIndex": 191, + "DocumentIndex": 223, "Title": "IInstancing.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\PlainGeometry\\Define\\IInstancing.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\PlainGeometry\\Define\\IInstancing.cs", @@ -3384,19 +3906,19 @@ }, { "$type": "Document", - "DocumentIndex": 81, + "DocumentIndex": 136, "Title": "StgSharpC.c", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\StgSharpC.c", "RelativeDocumentMoniker": "StgSharpC\\StgSharpC.c", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpC\\StgSharpC.c", "RelativeToolTip": "StgSharpC\\StgSharpC.c", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAkAAAA3AAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAA3AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000423|", "WhenOpened": "2024-05-04T08:32:40.265Z" }, { "$type": "Document", - "DocumentIndex": 195, + "DocumentIndex": 227, "Title": "ShowForm.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Form\\ShowForm.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Form\\ShowForm.cs", @@ -3407,19 +3929,19 @@ }, { "$type": "Document", - "DocumentIndex": 157, + "DocumentIndex": 190, "Title": "MainForm.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\OEM\\MainForm.cs", "RelativeDocumentMoniker": "OEM\\MainForm.cs", "ToolTip": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\OEM\\MainForm.cs", "RelativeToolTip": "OEM\\MainForm.cs", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAkAAAABAAAA", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAABAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-04-26T21:06:53.667Z" }, { "$type": "Document", - "DocumentIndex": 196, + "DocumentIndex": 228, "Title": "FormThreading.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Form\\FormThreading.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Form\\FormThreading.cs", @@ -3430,7 +3952,7 @@ }, { "$type": "Document", - "DocumentIndex": 194, + "DocumentIndex": 226, "Title": "ICoord.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Geometries\\Coordination\\ICoord.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Geometries\\Coordination\\ICoord.cs", @@ -3441,7 +3963,7 @@ }, { "$type": "Document", - "DocumentIndex": 197, + "DocumentIndex": 229, "Title": "Form.cs", "DocumentMoniker": "D:\\NitloadIndustry\\\u7814\u7A76\u9879\u76EE\\1-Flagship\\TH2020\\ProjectFile\\\u6E90\u4EE3\u7801\\StgSharpDebug\\Graphics\\Form\\Form.cs", "RelativeDocumentMoniker": "StgSharpDebug\\Graphics\\Form\\Form.cs", diff --git a/源代码/.vs/StgSharpDevelop/v17/Solution.VC.db b/源代码/.vs/StgSharpDevelop/v17/Solution.VC.db index f8c5dc4d..b8883544 100644 Binary files a/源代码/.vs/StgSharpDevelop/v17/Solution.VC.db and b/源代码/.vs/StgSharpDevelop/v17/Solution.VC.db differ diff --git a/源代码/.vs/StgSharpDevelop/v17/fileList.bin b/源代码/.vs/StgSharpDevelop/v17/fileList.bin index 684022b9..e212cdf7 100644 Binary files a/源代码/.vs/StgSharpDevelop/v17/fileList.bin and b/源代码/.vs/StgSharpDevelop/v17/fileList.bin differ diff --git a/源代码/BenchMark/obj/BenchMark.csproj.nuget.dgspec.json b/源代码/BenchMark/obj/BenchMark.csproj.nuget.dgspec.json index 1e03b914..03c87655 100644 --- a/源代码/BenchMark/obj/BenchMark.csproj.nuget.dgspec.json +++ b/源代码/BenchMark/obj/BenchMark.csproj.nuget.dgspec.json @@ -10,14 +10,14 @@ "projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\BenchMark\\BenchMark.csproj", "projectName": "BenchMark", "projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\BenchMark\\BenchMark.csproj", - "packagesPath": "C:\\Users\\Nitlo\\.nuget\\packages\\", + "packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\", "outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\BenchMark\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Nitlo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -71,7 +71,7 @@ "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.205\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json" } } } diff --git a/源代码/BenchMark/obj/BenchMark.csproj.nuget.g.props b/源代码/BenchMark/obj/BenchMark.csproj.nuget.g.props index 0ac68e28..fbb1d63e 100644 --- a/源代码/BenchMark/obj/BenchMark.csproj.nuget.g.props +++ b/源代码/BenchMark/obj/BenchMark.csproj.nuget.g.props @@ -5,18 +5,18 @@ NuGet $(MSBuildThisFileDirectory)project.assets.json $(UserProfile)\.nuget\packages\ - C:\Users\Nitlo\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + C:\Users\Youmu\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages PackageReference - 6.9.2 + 6.11.0 - + - C:\Users\Nitlo\.nuget\packages\microsoft.codeanalysis.analyzers\3.3.3 + C:\Users\Youmu\.nuget\packages\microsoft.codeanalysis.analyzers\3.3.3 \ No newline at end of file diff --git a/源代码/BenchMark/obj/Debug/net6.0/BenchMark.AssemblyInfo.cs b/源代码/BenchMark/obj/Debug/net6.0/BenchMark.AssemblyInfo.cs index 27241e32..a6aa79cb 100644 --- a/源代码/BenchMark/obj/Debug/net6.0/BenchMark.AssemblyInfo.cs +++ b/源代码/BenchMark/obj/Debug/net6.0/BenchMark.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("BenchMark")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+924fe6eef7b6b9441b297f211c82b4684f23d002")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d082071f2d004b4566bd19a1a030cf06b112c3af")] [assembly: System.Reflection.AssemblyProductAttribute("BenchMark")] [assembly: System.Reflection.AssemblyTitleAttribute("BenchMark")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/源代码/BenchMark/obj/Debug/net6.0/BenchMark.AssemblyInfoInputs.cache b/源代码/BenchMark/obj/Debug/net6.0/BenchMark.AssemblyInfoInputs.cache index 39025a5f..43685b8d 100644 --- a/源代码/BenchMark/obj/Debug/net6.0/BenchMark.AssemblyInfoInputs.cache +++ b/源代码/BenchMark/obj/Debug/net6.0/BenchMark.AssemblyInfoInputs.cache @@ -1 +1 @@ -4e2f772e3efb870291921325d240f96f8f7127093b5e0e65dca2f43393dcf94f +00be3bf2bd37e3d2be0d99e63fee18fdaf165340f14c199a0955fb2d4e87fea4 diff --git a/源代码/BenchMark/obj/Debug/net6.0/BenchMark.assets.cache b/源代码/BenchMark/obj/Debug/net6.0/BenchMark.assets.cache index d6d9305d..e011e19a 100644 Binary files a/源代码/BenchMark/obj/Debug/net6.0/BenchMark.assets.cache and b/源代码/BenchMark/obj/Debug/net6.0/BenchMark.assets.cache differ diff --git a/源代码/BenchMark/obj/Debug/net6.0/BenchMark.csproj.AssemblyReference.cache b/源代码/BenchMark/obj/Debug/net6.0/BenchMark.csproj.AssemblyReference.cache index 98e0ad1d..a4b99fb2 100644 Binary files a/源代码/BenchMark/obj/Debug/net6.0/BenchMark.csproj.AssemblyReference.cache and b/源代码/BenchMark/obj/Debug/net6.0/BenchMark.csproj.AssemblyReference.cache differ diff --git a/源代码/BenchMark/obj/Release/net6.0/BenchMark.AssemblyInfoInputs.cache b/源代码/BenchMark/obj/Release/net6.0/BenchMark.AssemblyInfoInputs.cache index 90c5ac6f..8edcc9e7 100644 --- a/源代码/BenchMark/obj/Release/net6.0/BenchMark.AssemblyInfoInputs.cache +++ b/源代码/BenchMark/obj/Release/net6.0/BenchMark.AssemblyInfoInputs.cache @@ -1 +1 @@ -37e23d756ce4575fbf467937553f24d34014d9c297f0c533ffac10c6ae12e798 +ad70b52dee94c1215bd4ebddeb1378c858124326d5ac3e28d9078eb5c0f8f700 diff --git a/源代码/BenchMark/obj/Release/net6.0/apphost.exe b/源代码/BenchMark/obj/Release/net6.0/apphost.exe index ff7682b1..e8beae8d 100644 Binary files a/源代码/BenchMark/obj/Release/net6.0/apphost.exe and b/源代码/BenchMark/obj/Release/net6.0/apphost.exe differ diff --git a/源代码/BenchMark/obj/project.assets.json b/源代码/BenchMark/obj/project.assets.json index b24cb5d0..8398023b 100644 --- a/源代码/BenchMark/obj/project.assets.json +++ b/源代码/BenchMark/obj/project.assets.json @@ -1754,7 +1754,7 @@ ] }, "packageFolders": { - "C:\\Users\\Nitlo\\.nuget\\packages\\": {}, + "C:\\Users\\Youmu\\.nuget\\packages\\": {}, "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} }, "project": { @@ -1763,14 +1763,14 @@ "projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\BenchMark\\BenchMark.csproj", "projectName": "BenchMark", "projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\BenchMark\\BenchMark.csproj", - "packagesPath": "C:\\Users\\Nitlo\\.nuget\\packages\\", + "packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\", "outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\BenchMark\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Nitlo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -1824,7 +1824,7 @@ "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.205\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json" } } } diff --git a/源代码/BenchMark/obj/project.nuget.cache b/源代码/BenchMark/obj/project.nuget.cache index 808228e2..c3559bab 100644 --- a/源代码/BenchMark/obj/project.nuget.cache +++ b/源代码/BenchMark/obj/project.nuget.cache @@ -1,43 +1,43 @@ { "version": 2, - "dgSpecHash": "pN+0KRm1EuqKniTJ321gPZHAydRCvNP+dkmkVcAMOjV5Not5KW22V73A7HB12P5Zye2pfbDx7qebBQIlhZmCqg==", + "dgSpecHash": "sTO1GW3zM6I=", "success": true, "projectFilePath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\BenchMark\\BenchMark.csproj", "expectedPackageFiles": [ - "C:\\Users\\Nitlo\\.nuget\\packages\\benchmarkdotnet\\0.13.12\\benchmarkdotnet.0.13.12.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\benchmarkdotnet.annotations\\0.13.12\\benchmarkdotnet.annotations.0.13.12.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\commandlineparser\\2.9.1\\commandlineparser.2.9.1.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\gee.external.capstone\\2.3.0\\gee.external.capstone.2.3.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\iced\\1.17.0\\iced.1.17.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.bcl.asyncinterfaces\\1.1.0\\microsoft.bcl.asyncinterfaces.1.1.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.codeanalysis.analyzers\\3.3.3\\microsoft.codeanalysis.analyzers.3.3.3.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.codeanalysis.common\\4.1.0\\microsoft.codeanalysis.common.4.1.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.codeanalysis.csharp\\4.1.0\\microsoft.codeanalysis.csharp.4.1.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.diagnostics.netcore.client\\0.2.251802\\microsoft.diagnostics.netcore.client.0.2.251802.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.diagnostics.runtime\\2.2.332302\\microsoft.diagnostics.runtime.2.2.332302.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.diagnostics.tracing.traceevent\\3.0.2\\microsoft.diagnostics.tracing.traceevent.3.0.2.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.dotnet.platformabstractions\\3.1.6\\microsoft.dotnet.platformabstractions.3.1.6.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.extensions.configuration\\2.1.1\\microsoft.extensions.configuration.2.1.1.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\2.1.1\\microsoft.extensions.configuration.abstractions.2.1.1.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.extensions.configuration.binder\\2.1.1\\microsoft.extensions.configuration.binder.2.1.1.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\2.1.1\\microsoft.extensions.dependencyinjection.abstractions.2.1.1.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.extensions.logging\\2.1.1\\microsoft.extensions.logging.2.1.1.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\2.1.1\\microsoft.extensions.logging.abstractions.2.1.1.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.extensions.options\\2.1.1\\microsoft.extensions.options.2.1.1.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.extensions.primitives\\2.1.1\\microsoft.extensions.primitives.2.1.1.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.netcore.platforms\\5.0.0\\microsoft.netcore.platforms.5.0.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.win32.registry\\5.0.0\\microsoft.win32.registry.5.0.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\perfolizer\\0.2.1\\perfolizer.0.2.1.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.codedom\\5.0.0\\system.codedom.5.0.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.collections.immutable\\5.0.0\\system.collections.immutable.5.0.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.management\\5.0.0\\system.management.5.0.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.memory\\4.5.4\\system.memory.4.5.4.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.reflection.metadata\\5.0.0\\system.reflection.metadata.5.0.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\5.0.0\\system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.security.accesscontrol\\5.0.0\\system.security.accesscontrol.5.0.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.security.principal.windows\\5.0.0\\system.security.principal.windows.5.0.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.text.encoding.codepages\\4.5.1\\system.text.encoding.codepages.4.5.1.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.threading.tasks.extensions\\4.5.4\\system.threading.tasks.extensions.4.5.4.nupkg.sha512" + "C:\\Users\\Youmu\\.nuget\\packages\\benchmarkdotnet\\0.13.12\\benchmarkdotnet.0.13.12.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\benchmarkdotnet.annotations\\0.13.12\\benchmarkdotnet.annotations.0.13.12.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\commandlineparser\\2.9.1\\commandlineparser.2.9.1.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\gee.external.capstone\\2.3.0\\gee.external.capstone.2.3.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\iced\\1.17.0\\iced.1.17.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.bcl.asyncinterfaces\\1.1.0\\microsoft.bcl.asyncinterfaces.1.1.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.codeanalysis.analyzers\\3.3.3\\microsoft.codeanalysis.analyzers.3.3.3.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.codeanalysis.common\\4.1.0\\microsoft.codeanalysis.common.4.1.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.codeanalysis.csharp\\4.1.0\\microsoft.codeanalysis.csharp.4.1.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.diagnostics.netcore.client\\0.2.251802\\microsoft.diagnostics.netcore.client.0.2.251802.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.diagnostics.runtime\\2.2.332302\\microsoft.diagnostics.runtime.2.2.332302.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.diagnostics.tracing.traceevent\\3.0.2\\microsoft.diagnostics.tracing.traceevent.3.0.2.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.dotnet.platformabstractions\\3.1.6\\microsoft.dotnet.platformabstractions.3.1.6.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.extensions.configuration\\2.1.1\\microsoft.extensions.configuration.2.1.1.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\2.1.1\\microsoft.extensions.configuration.abstractions.2.1.1.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.extensions.configuration.binder\\2.1.1\\microsoft.extensions.configuration.binder.2.1.1.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\2.1.1\\microsoft.extensions.dependencyinjection.abstractions.2.1.1.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.extensions.logging\\2.1.1\\microsoft.extensions.logging.2.1.1.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\2.1.1\\microsoft.extensions.logging.abstractions.2.1.1.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.extensions.options\\2.1.1\\microsoft.extensions.options.2.1.1.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.extensions.primitives\\2.1.1\\microsoft.extensions.primitives.2.1.1.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.netcore.platforms\\5.0.0\\microsoft.netcore.platforms.5.0.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.win32.registry\\5.0.0\\microsoft.win32.registry.5.0.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\perfolizer\\0.2.1\\perfolizer.0.2.1.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.codedom\\5.0.0\\system.codedom.5.0.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.collections.immutable\\5.0.0\\system.collections.immutable.5.0.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.management\\5.0.0\\system.management.5.0.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.memory\\4.5.4\\system.memory.4.5.4.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.reflection.metadata\\5.0.0\\system.reflection.metadata.5.0.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\5.0.0\\system.runtime.compilerservices.unsafe.5.0.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.security.accesscontrol\\5.0.0\\system.security.accesscontrol.5.0.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.security.principal.windows\\5.0.0\\system.security.principal.windows.5.0.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.text.encoding.codepages\\4.5.1\\system.text.encoding.codepages.4.5.1.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.threading.tasks.extensions\\4.5.4\\system.threading.tasks.extensions.4.5.4.nupkg.sha512" ], "logs": [] } \ No newline at end of file diff --git a/源代码/OEM/obj/Debug/net8.0/OEM.AssemblyInfo.cs b/源代码/OEM/obj/Debug/net8.0/OEM.AssemblyInfo.cs index 1f60ef1b..a7d3affc 100644 --- a/源代码/OEM/obj/Debug/net8.0/OEM.AssemblyInfo.cs +++ b/源代码/OEM/obj/Debug/net8.0/OEM.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("OEM")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+da75200347e2ff7f483c83ff224678d05b0aefd1")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d082071f2d004b4566bd19a1a030cf06b112c3af")] [assembly: System.Reflection.AssemblyProductAttribute("OEM")] [assembly: System.Reflection.AssemblyTitleAttribute("OEM")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/源代码/OEM/obj/Debug/net8.0/OEM.AssemblyInfoInputs.cache b/源代码/OEM/obj/Debug/net8.0/OEM.AssemblyInfoInputs.cache index d7b4b302..57b8a1f3 100644 --- a/源代码/OEM/obj/Debug/net8.0/OEM.AssemblyInfoInputs.cache +++ b/源代码/OEM/obj/Debug/net8.0/OEM.AssemblyInfoInputs.cache @@ -1 +1 @@ -640e9f98257352e84ae37176833512dc5627a4b2d18e9b9603dac0bdaa9c70df +36b6fb0d3b20627c3cc45e4585149aa28b4e8b140ad26b88d5a2e3ca08059ab8 diff --git a/源代码/OEM/obj/Debug/net8.0/OEM.assets.cache b/源代码/OEM/obj/Debug/net8.0/OEM.assets.cache index c6bb7ee1..7a49d759 100644 Binary files a/源代码/OEM/obj/Debug/net8.0/OEM.assets.cache and b/源代码/OEM/obj/Debug/net8.0/OEM.assets.cache differ diff --git a/源代码/OEM/obj/Debug/net8.0/OEM.csproj.AssemblyReference.cache b/源代码/OEM/obj/Debug/net8.0/OEM.csproj.AssemblyReference.cache index eb994780..b932021f 100644 Binary files a/源代码/OEM/obj/Debug/net8.0/OEM.csproj.AssemblyReference.cache and b/源代码/OEM/obj/Debug/net8.0/OEM.csproj.AssemblyReference.cache differ diff --git a/源代码/OEM/obj/OEM.csproj.nuget.dgspec.json b/源代码/OEM/obj/OEM.csproj.nuget.dgspec.json index c5a80d4f..296686a0 100644 --- a/源代码/OEM/obj/OEM.csproj.nuget.dgspec.json +++ b/源代码/OEM/obj/OEM.csproj.nuget.dgspec.json @@ -10,14 +10,14 @@ "projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\OEM\\OEM.csproj", "projectName": "OEM", "projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\OEM\\OEM.csproj", - "packagesPath": "C:\\Users\\Nitlo\\.nuget\\packages\\", + "packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\", "outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\OEM\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Nitlo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -63,7 +63,7 @@ "Microsoft.NET.ILLink.Tasks": { "suppressParent": "All", "target": "Package", - "version": "[8.0.5, )", + "version": "[8.0.8, )", "autoReferenced": true } }, @@ -89,7 +89,7 @@ "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.205/PortableRuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json" } } }, @@ -99,14 +99,14 @@ "projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\StgSharp.csproj", "projectName": "StgSharp", "projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\StgSharp.csproj", - "packagesPath": "C:\\Users\\Nitlo\\.nuget\\packages\\", + "packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\", "outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Nitlo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -165,7 +165,7 @@ "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.205\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json" } } } diff --git a/源代码/OEM/obj/OEM.csproj.nuget.g.props b/源代码/OEM/obj/OEM.csproj.nuget.g.props index ee6cc4dd..4399a56d 100644 --- a/源代码/OEM/obj/OEM.csproj.nuget.g.props +++ b/源代码/OEM/obj/OEM.csproj.nuget.g.props @@ -5,20 +5,20 @@ NuGet $(MSBuildThisFileDirectory)project.assets.json $(UserProfile)\.nuget\packages\ - C:\Users\Nitlo\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + C:\Users\Youmu\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages PackageReference - 6.9.2 + 6.11.0 - + - + - C:\Users\Nitlo\.nuget\packages\microsoft.net.illink.tasks\8.0.5 - C:\Users\Nitlo\.nuget\packages\microsoft.dotnet.ilcompiler\8.0.5 + C:\Users\Youmu\.nuget\packages\microsoft.net.illink.tasks\8.0.8 + C:\Users\Youmu\.nuget\packages\microsoft.dotnet.ilcompiler\8.0.5 \ No newline at end of file diff --git a/源代码/OEM/obj/Release/net8.0/OEM.AssemblyInfoInputs.cache b/源代码/OEM/obj/Release/net8.0/OEM.AssemblyInfoInputs.cache new file mode 100644 index 00000000..e3aaf8d6 --- /dev/null +++ b/源代码/OEM/obj/Release/net8.0/OEM.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +d97122734b91cdcf5781c3873c99079a93d12e480ce6b3c50c504e75c007586a diff --git a/源代码/OEM/obj/Release/net8.0/OEM.GeneratedMSBuildEditorConfig.editorconfig b/源代码/OEM/obj/Release/net8.0/OEM.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 00000000..1c39a368 --- /dev/null +++ b/源代码/OEM/obj/Release/net8.0/OEM.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,17 @@ +is_global = true +build_property.EnableAotAnalyzer = true +build_property.EnableSingleFileAnalyzer = true +build_property.EnableTrimAnalyzer = true +build_property.IncludeAllContentForSelfExtract = +build_property.TargetFramework = net8.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = true +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = OEM +build_property.ProjectDir = D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\OEM\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = false diff --git a/源代码/OEM/obj/Release/net8.0/OEM.assets.cache b/源代码/OEM/obj/Release/net8.0/OEM.assets.cache new file mode 100644 index 00000000..299175a7 Binary files /dev/null and b/源代码/OEM/obj/Release/net8.0/OEM.assets.cache differ diff --git a/源代码/OEM/obj/Release/net8.0/OEM.csproj.AssemblyReference.cache b/源代码/OEM/obj/Release/net8.0/OEM.csproj.AssemblyReference.cache new file mode 100644 index 00000000..e6ad81d6 Binary files /dev/null and b/源代码/OEM/obj/Release/net8.0/OEM.csproj.AssemblyReference.cache differ diff --git a/源代码/OEM/obj/project.assets.json b/源代码/OEM/obj/project.assets.json index 9fac4a0d..d63d4059 100644 --- a/源代码/OEM/obj/project.assets.json +++ b/源代码/OEM/obj/project.assets.json @@ -17,7 +17,7 @@ "build/Microsoft.DotNet.ILCompiler.props": {} } }, - "Microsoft.NET.ILLink.Tasks/8.0.5": { + "Microsoft.NET.ILLink.Tasks/8.0.8": { "type": "package", "build": { "build/Microsoft.NET.ILLink.Tasks.props": {} @@ -138,10 +138,10 @@ "tools/netstandard/ILCompiler.Build.Tasks.pdb" ] }, - "Microsoft.NET.ILLink.Tasks/8.0.5": { - "sha512": "4ISW1Ndgz86FkIbu5rVlMqhhtojdy5rUlxC/N+9kPh9qbYcvHiCvYbHKzAPVIx9OPYIjT9trXt7JI42Y5Ukq6A==", + "Microsoft.NET.ILLink.Tasks/8.0.8": { + "sha512": "P8wR6MUWwYXIjPJuBaZgo5zlI/GWI6QEAo6NyVIbPefa9CCkohYu7dP2rD/mrqnjEqfRHyl+h9VZrDoGpELqYg==", "type": "package", - "path": "microsoft.net.illink.tasks/8.0.5", + "path": "microsoft.net.illink.tasks/8.0.8", "hasTools": true, "files": [ ".nupkg.metadata", @@ -155,7 +155,7 @@ "build/Microsoft.NET.ILLink.Analyzers.props", "build/Microsoft.NET.ILLink.Tasks.props", "build/Microsoft.NET.ILLink.targets", - "microsoft.net.illink.tasks.8.0.5.nupkg.sha512", + "microsoft.net.illink.tasks.8.0.8.nupkg.sha512", "microsoft.net.illink.tasks.nuspec", "tools/net472/ILLink.Tasks.dll", "tools/net472/ILLink.Tasks.dll.config", @@ -198,12 +198,12 @@ "projectFileDependencyGroups": { "net8.0": [ "Microsoft.DotNet.ILCompiler >= 8.0.5", - "Microsoft.NET.ILLink.Tasks >= 8.0.5", + "Microsoft.NET.ILLink.Tasks >= 8.0.8", "StgSharp >= 1.0.0" ] }, "packageFolders": { - "C:\\Users\\Nitlo\\.nuget\\packages\\": {}, + "C:\\Users\\Youmu\\.nuget\\packages\\": {}, "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} }, "project": { @@ -212,14 +212,14 @@ "projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\OEM\\OEM.csproj", "projectName": "OEM", "projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\OEM\\OEM.csproj", - "packagesPath": "C:\\Users\\Nitlo\\.nuget\\packages\\", + "packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\", "outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\OEM\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Nitlo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -265,7 +265,7 @@ "Microsoft.NET.ILLink.Tasks": { "suppressParent": "All", "target": "Package", - "version": "[8.0.5, )", + "version": "[8.0.8, )", "autoReferenced": true } }, @@ -291,7 +291,7 @@ "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.205/PortableRuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json" } } } diff --git a/源代码/OEM/obj/project.nuget.cache b/源代码/OEM/obj/project.nuget.cache index ff401522..aa403bcd 100644 --- a/源代码/OEM/obj/project.nuget.cache +++ b/源代码/OEM/obj/project.nuget.cache @@ -1,13 +1,13 @@ { "version": 2, - "dgSpecHash": "kxXQBFhQdutFjT2gId8hH7v60+roPUePVqxb1y4tNVZireLqsssXpCmL0m//w3iotiwfRwon5DxMxbP2oSqgRA==", + "dgSpecHash": "FaJ3IYRDykY=", "success": true, "projectFilePath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\OEM\\OEM.csproj", "expectedPackageFiles": [ - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.dotnet.ilcompiler\\8.0.5\\microsoft.dotnet.ilcompiler.8.0.5.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.net.illink.tasks\\8.0.5\\microsoft.net.illink.tasks.8.0.5.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\runtime.win-x64.microsoft.dotnet.ilcompiler\\8.0.5\\runtime.win-x64.microsoft.dotnet.ilcompiler.8.0.5.nupkg.sha512" + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.dotnet.ilcompiler\\8.0.5\\microsoft.dotnet.ilcompiler.8.0.5.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.net.illink.tasks\\8.0.8\\microsoft.net.illink.tasks.8.0.8.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\runtime.win-x64.microsoft.dotnet.ilcompiler\\8.0.5\\runtime.win-x64.microsoft.dotnet.ilcompiler.8.0.5.nupkg.sha512" ], "logs": [] } \ No newline at end of file diff --git a/源代码/Output/x64/Debug/net6.0/BidirectionalDict.dll b/源代码/Output/x64/Debug/net6.0/BidirectionalDict.dll new file mode 100644 index 00000000..6eaaa3da Binary files /dev/null and b/源代码/Output/x64/Debug/net6.0/BidirectionalDict.dll differ diff --git a/源代码/Output/x64/Debug/net6.0/SS_errorlog.log b/源代码/Output/x64/Debug/net6.0/SS_errorlog.log index 2ddf3da8..e69de29b 100644 --- a/源代码/Output/x64/Debug/net6.0/SS_errorlog.log +++ b/源代码/Output/x64/Debug/net6.0/SS_errorlog.log @@ -1,232 +0,0 @@ - - - - -Info 2024-06-10T03:51:45.3844560+08:00 -Program StgSharpDebug, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Started. -Info 2024-06-10T03:51:45.5301845+08:00 -Find core OpenGL version. -Successfully load all OpenGL 1.0 APIs -Successfully load all OpenGL 1.1 APIs -Successfully load all OpenGL 1.2 APIs -Successfully load all OpenGL 1.3 APIs -Successfully load all OpenGL 1.4 APIs -Successfully load all OpenGL 1.5 APIs -Successfully load all OpenGL 2.0 APIs -Successfully load all OpenGL 2.1 APIs -Successfully load all OpenGL 3.0 APIs -Successfully load all OpenGL 3.1 APIs -Successfully load all OpenGL 3.2 APIs -Successfully load all OpenGL 3.3 APIs -Successfully load all OpenGL 4.0 APIs -Successfully load all OpenGL 4.1 APIs -Successfully load all OpenGL 4.2 APIs -Successfully load all OpenGL 4.3 APIs -Successfully load all OpenGL 4.4 APIs -Successfully load all OpenGL 4.5 APIs -Successfully load all OpenGL 4.6 APIs -Info 2024-06-10T03:51:45.5394697+08:00 -No supported OpenGL extensions are found. - - - - -Info 2024-06-10T03:53:05.2638737+08:00 -Program StgSharpDebug, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Started. -Info 2024-06-10T03:53:05.3986813+08:00 -Find core OpenGL version. -Successfully load all OpenGL 1.0 APIs -Successfully load all OpenGL 1.1 APIs -Successfully load all OpenGL 1.2 APIs -Successfully load all OpenGL 1.3 APIs -Successfully load all OpenGL 1.4 APIs -Successfully load all OpenGL 1.5 APIs -Successfully load all OpenGL 2.0 APIs -Successfully load all OpenGL 2.1 APIs -Successfully load all OpenGL 3.0 APIs -Successfully load all OpenGL 3.1 APIs -Successfully load all OpenGL 3.2 APIs -Successfully load all OpenGL 3.3 APIs -Successfully load all OpenGL 4.0 APIs -Successfully load all OpenGL 4.1 APIs -Successfully load all OpenGL 4.2 APIs -Successfully load all OpenGL 4.3 APIs -Successfully load all OpenGL 4.4 APIs -Successfully load all OpenGL 4.5 APIs -Successfully load all OpenGL 4.6 APIs -Info 2024-06-10T03:53:05.4074243+08:00 -No supported OpenGL extensions are found. - - - - -Info 2024-06-10T03:53:20.0978686+08:00 -Program StgSharpDebug, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Started. -Info 2024-06-10T03:53:20.2405718+08:00 -Find core OpenGL version. -Successfully load all OpenGL 1.0 APIs -Successfully load all OpenGL 1.1 APIs -Successfully load all OpenGL 1.2 APIs -Successfully load all OpenGL 1.3 APIs -Successfully load all OpenGL 1.4 APIs -Successfully load all OpenGL 1.5 APIs -Successfully load all OpenGL 2.0 APIs -Successfully load all OpenGL 2.1 APIs -Successfully load all OpenGL 3.0 APIs -Successfully load all OpenGL 3.1 APIs -Successfully load all OpenGL 3.2 APIs -Successfully load all OpenGL 3.3 APIs -Successfully load all OpenGL 4.0 APIs -Successfully load all OpenGL 4.1 APIs -Successfully load all OpenGL 4.2 APIs -Successfully load all OpenGL 4.3 APIs -Successfully load all OpenGL 4.4 APIs -Successfully load all OpenGL 4.5 APIs -Successfully load all OpenGL 4.6 APIs -Info 2024-06-10T03:53:20.2486427+08:00 -No supported OpenGL extensions are found. - - - - -Info 2024-06-10T03:58:44.9904084+08:00 -Program StgSharpDebug, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Started. -Info 2024-06-10T03:59:35.5661006+08:00 -Find core OpenGL version. -Successfully load all OpenGL 1.0 APIs -Successfully load all OpenGL 1.1 APIs -Successfully load all OpenGL 1.2 APIs -Successfully load all OpenGL 1.3 APIs -Successfully load all OpenGL 1.4 APIs -Successfully load all OpenGL 1.5 APIs -Successfully load all OpenGL 2.0 APIs -Successfully load all OpenGL 2.1 APIs -Successfully load all OpenGL 3.0 APIs -Successfully load all OpenGL 3.1 APIs -Successfully load all OpenGL 3.2 APIs -Successfully load all OpenGL 3.3 APIs -Successfully load all OpenGL 4.0 APIs -Successfully load all OpenGL 4.1 APIs -Successfully load all OpenGL 4.2 APIs -Successfully load all OpenGL 4.3 APIs -Successfully load all OpenGL 4.4 APIs -Successfully load all OpenGL 4.5 APIs -Successfully load all OpenGL 4.6 APIs -Info 2024-06-10T03:59:35.7041981+08:00 -No supported OpenGL extensions are found. - - - - -Info 2024-06-10T04:02:09.9071531+08:00 -Program StgSharpDebug, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Started. -Info 2024-06-10T04:02:10.7951542+08:00 -Find core OpenGL version. -Successfully load all OpenGL 1.0 APIs -Successfully load all OpenGL 1.1 APIs -Successfully load all OpenGL 1.2 APIs -Successfully load all OpenGL 1.3 APIs -Successfully load all OpenGL 1.4 APIs -Successfully load all OpenGL 1.5 APIs -Successfully load all OpenGL 2.0 APIs -Successfully load all OpenGL 2.1 APIs -Successfully load all OpenGL 3.0 APIs -Successfully load all OpenGL 3.1 APIs -Successfully load all OpenGL 3.2 APIs -Successfully load all OpenGL 3.3 APIs -Successfully load all OpenGL 4.0 APIs -Successfully load all OpenGL 4.1 APIs -Successfully load all OpenGL 4.2 APIs -Successfully load all OpenGL 4.3 APIs -Successfully load all OpenGL 4.4 APIs -Successfully load all OpenGL 4.5 APIs -Successfully load all OpenGL 4.6 APIs -Info 2024-06-10T04:02:10.8047643+08:00 -No supported OpenGL extensions are found. - - - - -Info 2024-06-10T04:05:20.9151190+08:00 -Program StgSharpDebug, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Started. -Info 2024-06-10T04:05:21.0924552+08:00 -Find core OpenGL version. -Successfully load all OpenGL 1.0 APIs -Successfully load all OpenGL 1.1 APIs -Successfully load all OpenGL 1.2 APIs -Successfully load all OpenGL 1.3 APIs -Successfully load all OpenGL 1.4 APIs -Successfully load all OpenGL 1.5 APIs -Successfully load all OpenGL 2.0 APIs -Successfully load all OpenGL 2.1 APIs -Successfully load all OpenGL 3.0 APIs -Successfully load all OpenGL 3.1 APIs -Successfully load all OpenGL 3.2 APIs -Successfully load all OpenGL 3.3 APIs -Successfully load all OpenGL 4.0 APIs -Successfully load all OpenGL 4.1 APIs -Successfully load all OpenGL 4.2 APIs -Successfully load all OpenGL 4.3 APIs -Successfully load all OpenGL 4.4 APIs -Successfully load all OpenGL 4.5 APIs -Successfully load all OpenGL 4.6 APIs -Info 2024-06-10T04:05:21.1020065+08:00 -No supported OpenGL extensions are found. - - - - -Info 2024-06-10T04:05:53.0098837+08:00 -Program StgSharpDebug, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Started. -Info 2024-06-10T04:05:53.1706206+08:00 -Find core OpenGL version. -Successfully load all OpenGL 1.0 APIs -Successfully load all OpenGL 1.1 APIs -Successfully load all OpenGL 1.2 APIs -Successfully load all OpenGL 1.3 APIs -Successfully load all OpenGL 1.4 APIs -Successfully load all OpenGL 1.5 APIs -Successfully load all OpenGL 2.0 APIs -Successfully load all OpenGL 2.1 APIs -Successfully load all OpenGL 3.0 APIs -Successfully load all OpenGL 3.1 APIs -Successfully load all OpenGL 3.2 APIs -Successfully load all OpenGL 3.3 APIs -Successfully load all OpenGL 4.0 APIs -Successfully load all OpenGL 4.1 APIs -Successfully load all OpenGL 4.2 APIs -Successfully load all OpenGL 4.3 APIs -Successfully load all OpenGL 4.4 APIs -Successfully load all OpenGL 4.5 APIs -Successfully load all OpenGL 4.6 APIs -Info 2024-06-10T04:05:53.1809108+08:00 -No supported OpenGL extensions are found. - - - - -Info 2024-06-10T04:22:18.9955029+08:00 -Program StgSharpDebug, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Started. -Info 2024-06-10T04:22:19.1161027+08:00 -Find core OpenGL version. -Successfully load all OpenGL 1.0 APIs -Successfully load all OpenGL 1.1 APIs -Successfully load all OpenGL 1.2 APIs -Successfully load all OpenGL 1.3 APIs -Successfully load all OpenGL 1.4 APIs -Successfully load all OpenGL 1.5 APIs -Successfully load all OpenGL 2.0 APIs -Successfully load all OpenGL 2.1 APIs -Successfully load all OpenGL 3.0 APIs -Successfully load all OpenGL 3.1 APIs -Successfully load all OpenGL 3.2 APIs -Successfully load all OpenGL 3.3 APIs -Successfully load all OpenGL 4.0 APIs -Successfully load all OpenGL 4.1 APIs -Successfully load all OpenGL 4.2 APIs -Successfully load all OpenGL 4.3 APIs -Successfully load all OpenGL 4.4 APIs -Successfully load all OpenGL 4.5 APIs -Successfully load all OpenGL 4.6 APIs -Info 2024-06-10T04:22:19.1243615+08:00 -No supported OpenGL extensions are found. diff --git a/源代码/Output/x64/Debug/net6.0/StgSharpC.dll b/源代码/Output/x64/Debug/net6.0/StgSharpC.dll index 7ebc661a..16028959 100644 Binary files a/源代码/Output/x64/Debug/net6.0/StgSharpC.dll and b/源代码/Output/x64/Debug/net6.0/StgSharpC.dll differ diff --git a/源代码/Output/x64/Debug/net6.0/StgSharpDebug.deps.json b/源代码/Output/x64/Debug/net6.0/StgSharpDebug.deps.json index 3ae4a3fa..421e7b7e 100644 --- a/源代码/Output/x64/Debug/net6.0/StgSharpDebug.deps.json +++ b/源代码/Output/x64/Debug/net6.0/StgSharpDebug.deps.json @@ -8,12 +8,21 @@ ".NETCoreApp,Version=v6.0": { "StgSharpDebug/1.0.0": { "dependencies": { + "BidirectionalDict": "1.2.0", "Microsoft.Windows.CsWin32": "0.3.49-beta" }, "runtime": { "StgSharpDebug.dll": {} } }, + "BidirectionalDict/1.2.0": { + "runtime": { + "lib/netcoreapp3.1/BidirectionalDict.dll": { + "assemblyVersion": "1.2.0.0", + "fileVersion": "1.2.0.0" + } + } + }, "Microsoft.Windows.CsWin32/0.3.49-beta": { "dependencies": { "Microsoft.Windows.SDK.Win32Docs": "0.1.42-alpha", @@ -40,6 +49,13 @@ "serviceable": false, "sha512": "" }, + "BidirectionalDict/1.2.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-hjLTwpPTQBdseFVTVH1vf7Pbaj5ATKIM3DQN8Hup22ixyC14+r1bE4YFjtZmWfcegvJR74zYtatBTwpOHmIMNQ==", + "path": "bidirectionaldict/1.2.0", + "hashPath": "bidirectionaldict.1.2.0.nupkg.sha512" + }, "Microsoft.Windows.CsWin32/0.3.49-beta": { "type": "package", "serviceable": true, diff --git a/源代码/Output/x64/Debug/net6.0/StgSharpDebug.dll b/源代码/Output/x64/Debug/net6.0/StgSharpDebug.dll index 6ea9c0f6..e06d6004 100644 Binary files a/源代码/Output/x64/Debug/net6.0/StgSharpDebug.dll and b/源代码/Output/x64/Debug/net6.0/StgSharpDebug.dll differ diff --git a/源代码/Output/x64/Debug/net6.0/StgSharpDebug.exe b/源代码/Output/x64/Debug/net6.0/StgSharpDebug.exe index ebad299e..b0ff78a1 100644 Binary files a/源代码/Output/x64/Debug/net6.0/StgSharpDebug.exe and b/源代码/Output/x64/Debug/net6.0/StgSharpDebug.exe differ diff --git a/源代码/Output/x64/Debug/net6.0/StgSharpDebug.pdb b/源代码/Output/x64/Debug/net6.0/StgSharpDebug.pdb index 59749b6c..d185fb4f 100644 Binary files a/源代码/Output/x64/Debug/net6.0/StgSharpDebug.pdb and b/源代码/Output/x64/Debug/net6.0/StgSharpDebug.pdb differ diff --git a/源代码/Output/x64/Debug/net6.0/StgSharpDebug.xml b/源代码/Output/x64/Debug/net6.0/StgSharpDebug.xml index 1ca3ac39..091b5b94 100644 --- a/源代码/Output/x64/Debug/net6.0/StgSharpDebug.xml +++ b/源代码/Output/x64/Debug/net6.0/StgSharpDebug.xml @@ -4,62 +4,49 @@ StgSharpDebug - - - - - - - - Get the status of a certain key on the keyboard. - - - - - - - - Function handler to load an opengl function by searching its name. - - the name of the Opengl function - An intptr value representing the pointer to the function - - + Interface of all kinds OpenGL buffer objects - + Get the only handle to one of the Object instance - + Bind a buffer instance to OpenGL Index of handle of the object in this instance to be bind - + - + + + Function handler to load an opengl function by searching its name. + + the name of the Opengl function + An Intptr value representing the pointer to the function + + A collection of handle to Element Buffer Object in OpenglFunc. Each value indexed from instance of this class this is the only handle to one Element Buffer Object. - + Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. will be set as default target. Index of object to be binded in handle set - + Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. Target of this frame buffer should be set manually. @@ -67,139 +54,140 @@ The frame buffer target of the binding operation. Index of object to be binded in handle set - + + Load an to certain texture. - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - Data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - Data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - A of data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - A of data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - A array of data to write in - How OpenGL use these data, defined by - - + - + - Load all supported OpenGL APIs and bind them to given context. + Set _data to current vertex buffer object - The used as current OpenGL context + Type of bufferData + Index to find certain VBO in this instance + Data to write in + How OpenGL use these _data, defined by - + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + Data to write in + How OpenGL use these _data, defined by + + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A of _data to write in + How OpenGL use these _data, defined by + + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A of _data to write in + How OpenGL use these _data, defined by + + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A array of _data to write in + How OpenGL use these _data, defined by + + Get the function pointer of given OpenGL api name ContextName of the OpenGL api The funtion pointer of the api in stream of - + + + Load all supported OpenGL APIs and bind them to given . + + The handle to current OpenGL viewPortDisplay + + Bind a frame buffer to a frame buffer target - Same function as glBindFramebuffer. + Same function as glBindFramebuffer. The frame buffer target of the binding operation. The handle of the frame buffer object to bind. - + - Init an OpenGl context if current form has not been binded to any context. and set the context binded to - current form as current OpenGL context. + Initialize an OpenGl viewPortDisplay if current form has not been binded to any viewPortDisplay. + and set the viewPortDisplay binded to current form as current OpenGL viewPortDisplay. - Something goes wrong and StgSharp fails in creating a new OpenGL context. + Something goes wrong and StgSharp fails in creating a new OpenGL viewPortDisplay. - + - Create a set of . + Create a set of . Amount of EBO to be created. - + - Create a sets of + Create a sets of Amount of textures to be created. - + - Create a set of . + Create a set of . Amount of VAO to be created. - + - Create a set of . + Create a set of . Amount of Object to be created. - + - Create an instance of program + Create an instance of program - New instance of instance. + New instance of instance. - + Attach one shader code to a shader program. Shader program to attach Index of shader code in current shader code set. - + - Init a program with no shader attached. + CustomizeInit a program with no shader attached. - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -207,7 +195,7 @@ ContextName of the Uniform in shader code - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -215,7 +203,7 @@ ContextName of the Uniform in shader code - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -223,7 +211,7 @@ ContextName of the Uniform in shader code - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -231,43 +219,19 @@ ContextName of the Uniform in shader code - + - Link the shader to current context. + Link the shader to current viewPortDisplay. - + - Let the current context use this shader. + Let the current viewPortDisplay use this shader. - + - A handle to an OpenGL object, - must be indexed from a . - Direct call will cause - - - - - A handle to an OpenGL object. - - - - - Release all resource in this handle. - This will release all resource in this . - This will be not usable. - - - - - - - - - - + Hash code of time pixels updated last time. @@ -275,12 +239,22 @@ + + + + + + + + + + Set the size limit of current form @@ -290,9 +264,9 @@ Maximum width of current form Maximum height of current form - + - Get (T is ) uniform from a shader. + Get (TView is ) uniform from a shader. This uniform will be used as projection matrix of this camera. Additionally, for multi-shader rendering, each shader requires a uniform, so do not ignore return value of this method. @@ -300,11 +274,11 @@ Shader using this camera ContextName of projection camera named in shader - (T is ) representing + (TView is ) representing projection matrix in shader program. - + Get all uniform related to this . @@ -317,7 +291,7 @@ - Init an instance of OpenGL program, + CustomizeInit an instance of OpenGL program, This method should be called before any other StgSharp api. @@ -423,16 +397,6 @@ Data is actually stored in s in certain RAID mode. - - - A sensor used for checking out if a bullet hit a player or something else - - - - - A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y - - X position of an enenmy entity @@ -443,6 +407,16 @@ Y position of an enemy entity + + + A sensor used for checking out if a bullet hit a player or something else + + + + + A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y + + 当几何体调用了过多的CalcVec方法时,产生UnusedVertexException异常 @@ -474,7 +448,7 @@ Calculate movement to center - Current time tick + CurrentBlueprint time tick @@ -482,13 +456,14 @@ A square - + - Run all nodes repeatedly until it is instructed to terminate. + A sets of complex logic designed for running in multi threads environment. + Warning: do not run a instance in multi threads more than once. + - Instructor to terminate all tasks. Returns if tasks should terminate - + @@ -497,27 +472,87 @@ in current node, the port on the other node cannot get the change. - + - Init this form and render it on screen, and respond with operation + Determines whether the contains the + specified key. + + The value to locate in the . + + true if the contains an element with the + specified key; otherwise, false. + + + + + Determines whether the contains the + specified key. + + The value to locate in the . + + true if the contains an element with the + specified key; otherwise, false. + + + + + A microsecond-accuracy timer. It will refresh every a certain time span. - + + + Create a new and define the length of time span. Length of a single time span is defined in microseconds. + + + + + + + Create a new and define the length of time span. + Length of a single time span is defined in seconds. + + + + + + + Create a new and define the length of time span. Length of a single time span is defined in microseconds. + + + + + + + + The method this will call every time a new time span started. + + + + + Time source provider provided in internal framework. + + + + + CustomizeInit this form and render it on screen, and respond with operation + + + Height of this form, represent in - + Width of this form, represent in - + Width of this form, represent in - + Resize the current form @@ -525,7 +560,7 @@ A (width,height) representing the new size of current form - + Set the size limit of current form @@ -536,7 +571,7 @@ Maximum size of current form. In form of a of (width,height) - + Set the size limit of current form @@ -545,42 +580,26 @@ Maximum width of current form Maximum height of current form - + - A microsecond-accuracy timer. It will refresh every a certain time span. + ViewBase is the base type for all view types, providing context binding and control element binding. + A complete view should contain one complete , , and , + which provide layout descriptions of control elements, user responses, and rendering implementations in the view. + Data between instances of , , and is shared through . - + - Create a new and define the length of time span. Length of a single time span is defined in microseconds. + Get the status of a certain key on the keyboard. - - + + representing if a key is pressed or released. - + - Create a new and define the length of time span. - Length of a single time span is defined in seconds. - - - - - - - Create a new and define the length of time span. Length of a single time span is defined in microseconds. - - - - - - - - Time source provider provided in internal framework. - - - - - The method this will call every time a new time span started. + ViewDesigner provides descriptions of various controls in the view, + binds the controls to specific user actions and behaviors, + and describes the layout and interactions of each control. diff --git a/源代码/Output/x64/Release/net6.0/SS_errorlog.log b/源代码/Output/x64/Release/net6.0/SS_errorlog.log index 2dd04db6..24cf0c1e 100644 --- a/源代码/Output/x64/Release/net6.0/SS_errorlog.log +++ b/源代码/Output/x64/Release/net6.0/SS_errorlog.log @@ -56,3 +56,32 @@ Successfully load all OpenGL 4.5 APIs Successfully load all OpenGL 4.6 APIs Info @ 2024-03-22T08:07:58.7110859+08:00 No supported OpenGL extensions are found. + + + + +Info 2024-07-13T22:30:02.4941444+08:00 +Program StgSharpDebug, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Started. +Info 2024-07-13T22:30:02.6267133+08:00 +Find core OpenGL version. +Successfully load all OpenGL 1.0 APIs +Successfully load all OpenGL 1.1 APIs +Successfully load all OpenGL 1.2 APIs +Successfully load all OpenGL 1.3 APIs +Successfully load all OpenGL 1.4 APIs +Successfully load all OpenGL 1.5 APIs +Successfully load all OpenGL 2.0 APIs +Successfully load all OpenGL 2.1 APIs +Successfully load all OpenGL 3.0 APIs +Successfully load all OpenGL 3.1 APIs +Successfully load all OpenGL 3.2 APIs +Successfully load all OpenGL 3.3 APIs +Successfully load all OpenGL 4.0 APIs +Successfully load all OpenGL 4.1 APIs +Successfully load all OpenGL 4.2 APIs +Successfully load all OpenGL 4.3 APIs +Successfully load all OpenGL 4.4 APIs +Successfully load all OpenGL 4.5 APIs +Successfully load all OpenGL 4.6 APIs +Info 2024-07-13T22:30:02.6357541+08:00 +No supported OpenGL extensions are found. diff --git a/源代码/Output/x64/Release/net6.0/Shader/fragment.frag b/源代码/Output/x64/Release/net6.0/Shader/fragment.frag deleted file mode 100644 index 8f7c2f89..00000000 --- a/源代码/Output/x64/Release/net6.0/Shader/fragment.frag +++ /dev/null @@ -1,17 +0,0 @@ -#version 330 core - -in vec4 TexColor; -in vec2 TexCoord; - -out vec4 FragColor; - -uniform sampler2D ourTexture; -uniform sampler2D ourTexture2; - -void main() -{ - vec4 tex1 = texture(ourTexture, TexCoord); - vec4 tex2 = texture(ourTexture2,TexCoord); - FragColor = mix(tex1 * vec4( TexColor.xyz, 1.0), tex2, 0.2) /* *vec4( TexColor,1.0) /**/; -} - diff --git a/源代码/Output/x64/Release/net6.0/Shader/vertex.vert b/源代码/Output/x64/Release/net6.0/Shader/vertex.vert deleted file mode 100644 index d9e33113..00000000 --- a/源代码/Output/x64/Release/net6.0/Shader/vertex.vert +++ /dev/null @@ -1,32 +0,0 @@ -#version 330 core - -layout(location = 0) in vec3 aPos; -layout(location = 1) in vec3 aColor; -layout(location = 2) in vec2 aTextCoord; - -out vec4 TexColor; -out vec2 TexCoord; - -uniform vec4 color; -uniform mat4x4 camera; - -void main() -{ - float as = sin( color.w ); - float ac = cos( color.w ); - mat4x4 rotation = mat4x4( - ac,-as,0,0, - as,ac,0,0, - 0,0,1,0, - 0,0,0,1 - ); - TexColor = color; - TexCoord = aTextCoord; - vec4 temp = vec4(aPos.xyz,1.0); - gl_Position = /**/ camera * /**/ temp; -} - -//struct - - - diff --git a/源代码/Output/x64/Release/net6.0/StgSharpC.dll b/源代码/Output/x64/Release/net6.0/StgSharpC.dll index d4bcc832..023cbe8e 100644 Binary files a/源代码/Output/x64/Release/net6.0/StgSharpC.dll and b/源代码/Output/x64/Release/net6.0/StgSharpC.dll differ diff --git a/源代码/Output/x64/Release/net6.0/StgSharpDebug.dll b/源代码/Output/x64/Release/net6.0/StgSharpDebug.dll index 0d32a729..cf395283 100644 Binary files a/源代码/Output/x64/Release/net6.0/StgSharpDebug.dll and b/源代码/Output/x64/Release/net6.0/StgSharpDebug.dll differ diff --git a/源代码/Output/x64/Release/net6.0/StgSharpDebug.exe b/源代码/Output/x64/Release/net6.0/StgSharpDebug.exe index 7ad1cad7..d2d5a29f 100644 Binary files a/源代码/Output/x64/Release/net6.0/StgSharpDebug.exe and b/源代码/Output/x64/Release/net6.0/StgSharpDebug.exe differ diff --git a/源代码/Output/x64/Release/net6.0/StgSharpDebug.pdb b/源代码/Output/x64/Release/net6.0/StgSharpDebug.pdb index b7fc25dd..37eb7a9e 100644 Binary files a/源代码/Output/x64/Release/net6.0/StgSharpDebug.pdb and b/源代码/Output/x64/Release/net6.0/StgSharpDebug.pdb differ diff --git a/源代码/Output/x64/Release/net6.0/StgSharpDebug.xml b/源代码/Output/x64/Release/net6.0/StgSharpDebug.xml index a71aa0d0..a83ac609 100644 --- a/源代码/Output/x64/Release/net6.0/StgSharpDebug.xml +++ b/源代码/Output/x64/Release/net6.0/StgSharpDebug.xml @@ -4,7 +4,12 @@ StgSharpDebug - + + + + + + Get the status of a certain key on the keyboard. @@ -12,161 +17,9 @@ - - - Function handler to load an opengl function by serching its name. - - the name of the Opengl function - An intptr value representing the pointer to the function - - - - - - - - - OpenGL package binded to current form context. - A OpenGL context is only binded to current form. - - - - - Height of this form, represent in - - - - - Representing - - - - - Width of this form, represent in - - - - - Width of this form, represent in - - - - - Necessary operation to init this form. - - - - - - Behaviour of current form when in a frame cycle. - - - - - - Init an OpenGl context if current form has not been binded to any context. and set the context binded to - current form as current OpenGL context. - - - Something goes wrong and StgSharp fails in creating a new OpenGL context. - - - - - Set all necessary metadata to current form instance - - - - - Resize the current form - - - A (width,height) representing the new size of current form - - - - - Resize the current form - - New width of the window - New height of the window - - - - Set the size limit of current form - - - Minimun size of current form. In form of a of (width,height) - - - Maximum size of current form. In form of a of (width,height) - - - - - Set the size limit of current form - - Minimum width of current form - Minimum height of current form - Maximum width of curent form - Maximum height of current form - - - - Init this form and render it on screen, and respond with operation - - - - - Get OpenGL library of this form's context. - - A package contains all opengl APIs - - - - Define how current form render in one frame. - - - Please define this befor calling any OpenGL api and other graphic methods. - - - - - Create a set of . - - Amount of EBO to be created. - - - - - Create a sets of - - Amount of textures to be crated. - - - - - Create a set of . - - Amount of VAO to be crated. - - - - - Create aset of . - - Amount of Object to be created. - - - - - Create an instance of program - - New instance of instance. - - Interface of all kinds OpenGL buffer onjects + Interface of all kinds OpenGL buffer objects @@ -185,415 +38,264 @@ - + - A collecion of handle to Element Buffer Object in OpenGL. + Function handler to load an opengl function by searching its name. + + the name of the Opengl function + An Intptr value representing the pointer to the function + + + + A collection of handle to Element Buffer Object in OpenglFunc. Each value indexed from instance of this class this is the only handle to one Element Buffer Object. - + + Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. + will be set as default target. - - - + Index of object to be binded in handle set - + + + Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. + Target of this frame buffer should be set manually. + + The frame buffer target of the binding operation. + Index of object to be binded in handle set + + + + Load an to certain texture. + + + + + Set data to current vertex buffer object Type of bufferData Index to find certain VBO in this instance Data to write in - How OpenGL use these data, defined by + How OpenGL use these data, defined by - + Set data to current vertex buffer object Type of bufferData Index to find certain VBO in this instance - A array of data to write in - How OpenGL use these data, defined by + Data to write in + How OpenGL use these data, defined by - + + + Set data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A of data to write in + How OpenGL use these data, defined by + + + + Set data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A of data to write in + How OpenGL use these data, defined by + + + + Set data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A array of data to write in + How OpenGL use these data, defined by + + - + - Load all aupportable OpenGL APIs and bind them to given context. + Load all supported OpenGL APIs and bind them to given viewPortDisplay. - The used as current OpenGL context - A delegate to get address of OprnGL api + The used as current OpenGL viewPortDisplay - + Get the function pointer of given OpenGL api name - Name of the OpenGL api - The funtion pointer of the api in form of + ContextName of the OpenGL api + The funtion pointer of the api in stream of - + - A handle to an OpenGL object, - must be indexed from a . - Direct call will cause + Bind a frame buffer to a frame buffer target + Same function as glBindFramebuffer. + + The frame buffer target of the binding operation. + The handle of the frame buffer object to bind. + + + + Init an OpenGl viewPortDisplay if current form has not been binded to any viewPortDisplay. + and set the viewPortDisplay binded to current form as current OpenGL viewPortDisplay. + + + Something goes wrong and StgSharp fails in creating a new OpenGL viewPortDisplay. + + + + + Create a set of . + + Amount of EBO to be created. + + + + + Create a sets of + + Amount of textures to be created. + + + + + Create a set of . + + Amount of VAO to be created. + + + + + Create a set of . + + Amount of Object to be created. + + + + + Create an instance of program + + New instance of instance. + + + + Attach one shader code to a shader program. + + Shader program to attach + Index of shader code in current shader code set. + + + + Init a program with no shader attached. - + - A handle to an OpenGL object. + Get a uniform form current shader, + the value type of the uniform should be provided. + + ContextName of the Uniform in shader code + + + + + Get a uniform form current shader, + the value type of the uniform should be provided. + + ContextName of the Uniform in shader code + + + + + Get a uniform form current shader, + the value type of the uniform should be provided. + + ContextName of the Uniform in shader code + + + + + Get a uniform form current shader, + the value type of the uniform should be provided. + + ContextName of the Uniform in shader code + + + + + Link the shader to current viewPortDisplay. - + - temporarily release the handle of GLhandle sets. - Please call method before indexing. + Let the current viewPortDisplay use this shader. - + - Realse all resource in this handle. - This will release all resource in this . - This will be not usable. - - - - - - - - - - - Inti a shader with no program attached. - + + + + + + + + + + + - Get a uniform form current shader, - the value type of the uniform should be provided. - - Name of the Uniform in shader code - - - - - Get a uniform form current shader, - the value type of the uniform should be provided. - - Name of the Uniform in shader code - - - - - Get a uniform form current shader, - the value type of the uniform should be provided. - - Name of the Uniform in shader code - - - - - Link the shader to current context. - - - - - Let the current context use this shader. - - - - - Same function as OpenGL api glActiveTexture - - type of texture to activate - - - - Operation after alignment by calling . - No calling of this method is acceptable, but it will bring the risk - of that relevant code will not run if it is interrupted by frame overtime. - Please call this method immediately after calling , - too early or sonner may cause . - - The form used as frame update benchmark. - Operation after frame update alignment. - The action binded to a wrong alignment. - - - - Align a sets of code to frame update of a . - Usually, a call of is required. - This method is used as sigle thread method. If more than one - alignment is requested, a will throw. - - The form used as frame update benchmark. - More than one alingment attached to one form timer - - - - Same fucntion as OpenGL api glAttachShader. - Only the first in handle - will be attached to the first in handle. - The rest shader and program will be ignored. - - Shader program to be attachec - A shader part to attach - - - - Bind the indexed buffer object to certain type of buffer - - - - - - - Same function as OpenGL api, glBindTexture. - - Type of texture to bind - Sign of texture - - - - Same function as OpenGL api, glBindVertexArray - - - - - - Clear buffers to preset values - - - - - - Call apiClearColor in OpenGL - specifies the red, green, blue, and alpha values used by apiClear to clear the color buffers. - Values specified by apiClearColor are clamped to the range [0,1] - - Specify the red values used when the color buffers are cleared. - Specify the red values used when the color buffers are cleared. - Specify the red values used when the color buffers are cleared. - Specify the red values used when the color buffers are cleared. - - - - Same function as OpenGL api, glCreateProgram - - A handle representing a single shader program - - - - Same function as OpenGL api, glCreateProgram. - Used for creating multiple shader program. - - A handle representing all shader programs - - - - Creates a form and its associated - - Required width - Required width - Tittle of the window - - - - - - - Same function as OpenGL api, glDeleteBuffer. This method can delete one buffer in one call - - a handle representing the buffer to be deleted - - - - Same function as OpenGL api, glDeleteBuffer. This method can delete a sets of buffers in one call. - - Array of buffers to be deleted - - - - Same function as OpenGL api, glDeleteVertexArrays - - Handle of vertex objects. - - - - - - - - - - - - Same fucntion as the OpenGL api glGenBuffers - - + - Same fucnction as OpenGL api glGenTextures. + Set the size limit of current form - amount of textures to generate + Minimum width of current form + Minimum height of current form + Maximum width of current form + Maximum height of current form - + - Same fucntion as OpenGL api, glGenVertexArray + Get (T is ) uniform from a shader. + This uniform will be used as projection matrix of this camera. + Additionally, for multi-shader rendering, each shader requires a uniform, + so do not ignore return value of this method. - Amount of vao to be generated + Shader using this camera + ContextName of projection camera named in shader + + (T is ) representing + projection matrix in shader program. + - + - Same fucntion as OpenGL api, glGetUniformLocation - - Shader program to find the uniform - Name of the uniform - - - - - Make the OpenGL context of a certain as the activated OpenGL context. - - - - - - Set data value to a float , - all types of parameters are float. - - The target - A packing four parameters of the uniform - - - - Set data value to a float , - all types of parameters are float. - - The target - The value to be set - - - - Set data value to a int , - all types of parameters are int. - - The target - The value to be set - - - - Set data value to a float , - all types of parameters are . - - The target - A value of the uniform - - - - Set data value to a float , - all types of parameters are float. - - The target - The first value to be set - The second value to be set - - - - Set data value to a float , - all types of parameters are float. - - The target - The first value to be set - The second value to be set - The third value to be set - - - - Set data value to a float , - all types of parameters are float. - - The target - The first value to be set - The second value to be set - The third value to be set - The forth value to be set - - - - Set how a shader parameter read data from a VBO. - - Serial number of the parameter - Amount of data each elements contains - Type of data read by shader - - Pixels stride of each sets of data - - - - - Same function as OpenGL api glTexImage2d - - texture target to load image in - level of mipmap, 0 if default - OpenGL's internal color channel format - width of image - height of image - color channels of this image - how this image express each pixel - data array of pixels - - - - Same fucntion as OpenGL api glTexParameteri - - texture target to set parameters - name of parameter - value of parameter - - - - Same fucntion as OpenGL api glUseShader. - - Sign of program to be used - - - - Same function as the OpenGL api, glViewPort - - - - - - - - - A sensor used for cheking out if a bullet hit a player or something else - - - - - A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y - - - - - X position of an enenmy entity - - - - - Y position of an enemy entity + Get all uniform related to this . + Shader program requires this camera. + + ContextName of all related uniforms. + If you fallow form from + + @@ -610,211 +312,11 @@ - Write a log message to log file, and mark the level of this message. + Write a log message to log file, and mark the _level of this message. A string contains information of how current evironment runs. The severity of current message. - - - Part of a circle. All points on a arc has the same distance to their center. - - - - - A collection of all point on the same plain and has the same distance to a point - - - - - The origin of this coordinate. - - - - - The horizontial axis of the coordinate. - Point to the right direction. - - - - - The vertical axis of the coordinate. - Point to the top direction. - - - - - 当几何体调用了过多的CalcVec方法时,产生UnusedVertexException异常 - - - - - Caculate the movement of a point. - - The game tick represent time passed by - A 3d vector representing movement - - - - Move begin side of a line. - It is recommended to override this function rather than - loading an with same function. - - Time passed since current line was created. - - - - Move end side of a line. - It is recommended to override this function rather than - loading an with same function. - - Time passed since current line was created. - - - - - Move the third vertix. this is a useless method for Parallelograms. - - Current time tick - - Geometry overdefined - - - - Move the third vertix. This method is useless for Parallelograms. - - Current time tick - - Geometry overdefined - - - - 平面几何体。包含三角形,对称四边形,自由多边形等。最多可由16个点参数定义。 - - - - - Tick time this geometry eas crested - - - - - Get all sides of this . - - A array contains all straight s of current geometry item. - - - - Get a flat cincide with current geometry. - - - - - - Update the coordinate of the point. If this is a moving point, - (Points on sides or surface if other geometry items) - please do not define any motion here, codes will be ignored by program - - Time passes since the program begin, counted by frames - - - - 计算中心点相对于参考原点的位移 - - 当前游戏刻 - - - - - A square - - - - - A linear data structure with dynamic length. - It contains a of , - each is twice longer than the former one. - - - - - - Init a with a certain amount of elements prepared. - - Amount of elements to be prepared. - - - - Create a new instance of , - and fill the begining ones of elemtns as given instance. - - Amount of beginning elements to be filled - - - - - Length of this - - - - - A pair of value - - - - - A value. - The lower byte is , - and higher byte is . - - - - - The first value. - - - - - The second value. - - - - - A microsecond-accuracy timer. It will refresh every a certain time span. - - - - - Create a new and define the length of time span. Length of a single time span is defined in microseconds. - - - - - - - Create a new and define the length of time span. - Length of a single time span is defined in seconds. - - - - - - - Create a new and define the length of time span. Length of a single time span is defined in microseconds. - - - - - - - Time source provider provided in internal framework. - - - - - The method this will call every time a new time span started. - - OpenGL numeric type. @@ -827,12 +329,20 @@ An IEEE-754 double precision floating-point value, clamped to the range [0,1]. - + A two dimension vector defined by two elements. - Vec2Ds in StgSharp are defaultly usaed as colum vector. + Vec2Ds in StgSharp are default used as colum vector. + + + Orthogonalize two s, let their length be 1 + and perpendicular to each other. + + + + Reurns the value of ArcSin(x) @@ -871,7 +381,7 @@ - + @@ -883,6 +393,184 @@ + + + A class contains a sets of methods to serialize several types + + + + + An independent storage area, used as the only folder type in root folder. + Contains several files reference as virtual disc. + Data is actually stored in s in certain RAID mode. + + + + + A sensor used for checking out if a bullet hit a player or something else + + + + + A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y + + + + + X position of an enenmy entity + + + + + Y position of an enemy entity + + + + + 当几何体调用了过多的CalcVec方法时,产生UnusedVertexException异常 + + + + + The origin of this coordinate. + + + + + The horizontial axis of the coordinate. + Point to the right direction. + + + + + The vertical axis of the coordinate. + Point to the top direction. + + + + + Plain geometry only contains straight sides. + + + + + Calculate movement to center + + CurrentBlueprint time tick + + + + + A square + + + + + A sets of complex logic designed for running in multi threads environment. + Warning: do not run a instance in multi threads more than once. + + + + + + + + + Reset pipeline has risk, this operation is a direct operation to port + in current node, the port on the other node cannot get the change. + + + + + Render logic for every frame with no relation to . + + + + + Init this form and render it on screen, and respond with operation + + + + + Height of this form, represent in + + + + + Width of this form, represent in + + + + + Width of this form, represent in + + + + + Resize the current form + + + A (width,height) representing the new size of current form + + + + + Set the size limit of current form + + + Minimum size of current form. In form of a of (width,height) + + + Maximum size of current form. In form of a of (width,height) + + + + + Set the size limit of current form + + Minimum width of current form + Minimum height of current form + Maximum width of current form + Maximum height of current form + + + + A microsecond-accuracy timer. It will refresh every a certain time span. + + + + + Create a new and define the length of time span. Length of a single time span is defined in microseconds. + + + + + + + Create a new and define the length of time span. + Length of a single time span is defined in seconds. + + + + + + + Create a new and define the length of time span. Length of a single time span is defined in microseconds. + + + + + + + + Time source provider provided in internal framework. + + + + + The method this will call every time a new time span started. + + The COLORREF value is used to specify an RGB color. diff --git a/源代码/StgSharp/Controlling/Controls/BattleField.cs b/源代码/StgSharp/Controlling/Controls/BattleField.cs index 9253a0a5..02f53d54 100644 --- a/源代码/StgSharp/Controlling/Controls/BattleField.cs +++ b/源代码/StgSharp/Controlling/Controls/BattleField.cs @@ -30,7 +30,7 @@ //----------------------------------------------------------------------- using StgSharp.Geometries; using StgSharp.Graphics; -using StgSharp.Logic; + using StgSharp.Math; using System; @@ -43,18 +43,19 @@ namespace StgSharp.Controls { public class BattleField : ControllingItem { - public ReadOnlySpan TextureBox - { - get => throw new NotImplementedException() ; - } - public vec2d Position { get; set; } - public Rectangle BoundingBox { get; set; } public bool IsEntity => true; + public ReadOnlySpan TextureBox + { + get => throw new NotImplementedException(); + } + public Rectangle BoundingBox { get; set; } + public vec2d Position { get; set; } public IEnumerator GetEnumerator() { throw new NotImplementedException(); } + } } diff --git a/源代码/StgSharp/Controlling/Controls/ButtonGroup.cs b/源代码/StgSharp/Controlling/Controls/ButtonGroup.cs index 800ef924..9f065f1a 100644 --- a/源代码/StgSharp/Controlling/Controls/ButtonGroup.cs +++ b/源代码/StgSharp/Controlling/Controls/ButtonGroup.cs @@ -53,11 +53,15 @@ namespace StgSharp.Controls buttonList = new List(); } + public bool IsEntity { get => false; } + public ReadOnlySpan TextureBox { get => throw new NotSupportedException(); } + public Rectangle BoundingBox { get; set; } + public TriggerButton CurrentButton { get => current; @@ -65,10 +69,6 @@ namespace StgSharp.Controls public vec2d Position { get; set; } - public Rectangle BoundingBox { get; set; } - - public bool IsEntity { get => false; } - protected List AllButton { get => buttonList; diff --git a/源代码/StgSharp/Controlling/Controls/CharacterIndexImage.cs b/源代码/StgSharp/Controlling/Controls/CharacterIndexImage.cs index 1b145aff..3757b516 100644 --- a/源代码/StgSharp/Controlling/Controls/CharacterIndexImage.cs +++ b/源代码/StgSharp/Controlling/Controls/CharacterIndexImage.cs @@ -1,4 +1,34 @@ -using StgSharp.Geometries; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="CharacterIndexImage.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Geometries; using StgSharp.Graphics; using StgSharp.Math; @@ -13,13 +43,24 @@ namespace StgSharp.Controls { public class CharacterLineIndexImage : ControllingItem { - private int length; + private char[] displayIndex; private char defaultChar; Dictionary texIndex; + private int length; PlainGeometryMesh _tittleMesh; + public CharacterLineIndexImage( + int length, char defaultChar, PlainGeometryMesh tittleMesh, + IEnumerable<(char, PlainGeometryMesh)> indexEnumeration) + { + this.length = length; + displayIndex = new char[length]; + _tittleMesh = tittleMesh; + texIndex = indexEnumeration.ToDictionary(item => item.Item1, item => item.Item2); + } + public bool IsEntity { get => true; @@ -29,8 +70,8 @@ namespace StgSharp.Controls { get => throw new NotSupportedException(); } - public vec2d Position { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } public Rectangle BoundingBox { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public vec2d Position { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } public void Display(string message) { @@ -39,9 +80,9 @@ namespace StgSharp.Controls message = string.Empty; } - string result = message.Length >= length ? - message.Substring(message.Length - displayIndex.Length) : - message.PadLeft(length,defaultChar); + string result = (message.Length >= length) ? + message.Substring(message.Length - displayIndex.Length) : + message.PadLeft(length, defaultChar); displayIndex = result.ToCharArray(); } @@ -55,15 +96,5 @@ namespace StgSharp.Controls } } - public CharacterLineIndexImage( - int length, char defaultChar, PlainGeometryMesh tittleMesh, - IEnumerable<(char, PlainGeometryMesh)> indexEnumeration) - { - this.length = length; - displayIndex = new char[length]; - _tittleMesh = tittleMesh; - texIndex = indexEnumeration.ToDictionary(item => item.Item1, item => item.Item2); - } - } } diff --git a/源代码/StgSharp/Controlling/Controls/ControllingIntem.cs b/源代码/StgSharp/Controlling/Controls/ControllingIntem.cs index ff3a6ec2..54f77d8f 100644 --- a/源代码/StgSharp/Controlling/Controls/ControllingIntem.cs +++ b/源代码/StgSharp/Controlling/Controls/ControllingIntem.cs @@ -1,4 +1,34 @@ -using StgSharp.Geometries; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ControllingIntem.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Geometries; using StgSharp.Graphics; using StgSharp.Math; @@ -9,18 +39,20 @@ using System.Text; namespace StgSharp.Controls { - public interface ControllingItem: IEnumerable + public interface ControllingItem : IEnumerable { - public abstract vec2d Position { get; set; } - public abstract Rectangle BoundingBox { get; set; } + + public abstract bool IsEntity { get; } public abstract ReadOnlySpan TextureBox { get; } - public abstract bool IsEntity { get; } + public abstract Rectangle BoundingBox { get; set; } + public abstract vec2d Position { get; set; } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } + } } diff --git a/源代码/StgSharp/Controlling/Controls/DecorationBox.cs b/源代码/StgSharp/Controlling/Controls/DecorationBox.cs index 8e043909..bb0807a1 100644 --- a/源代码/StgSharp/Controlling/Controls/DecorationBox.cs +++ b/源代码/StgSharp/Controlling/Controls/DecorationBox.cs @@ -1,4 +1,34 @@ -using StgSharp.Controls; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="DecorationBox.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Controls; using StgSharp.Geometries; using StgSharp.Graphics; using StgSharp.Math; @@ -11,26 +41,28 @@ namespace StgSharp.Controls { public class DecorationBox : ControllingItem { + private PlainGeometryMesh renderMesh; + public DecorationBox(Rectangle bound, Image texture, vec2d[] texCoord) + { + renderMesh = new PlainGeometryMesh(BoundingBox, new TextureProvider(texture, texCoord)); + } + + public bool IsEntity => true; + public ReadOnlySpan TextureBox { get => renderMesh.TextureCoord; } + public Rectangle BoundingBox { get; set; } - public vec2d Position { get ; set ; } - public Rectangle BoundingBox { get ; set ; } - - public bool IsEntity => true; + public vec2d Position { get; set; } public IEnumerator GetEnumerator() { yield return renderMesh; } - public DecorationBox(Rectangle bound, Image texture, vec2d[] texCoord) - { - renderMesh = new PlainGeometryMesh(BoundingBox, new TextureProvider(texture, texCoord)); - } } } diff --git a/源代码/StgSharp/Controlling/Controls/MarkingLable.cs b/源代码/StgSharp/Controlling/Controls/MarkingLable.cs index afe4fb18..43d00e30 100644 --- a/源代码/StgSharp/Controlling/Controls/MarkingLable.cs +++ b/源代码/StgSharp/Controlling/Controls/MarkingLable.cs @@ -1,7 +1,38 @@ -using StgSharp.Controls; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="MarkingLable.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Controls; using StgSharp.Geometries; using StgSharp.Graphics; using StgSharp.Math; +using StgSharp.Timing; using System; using System.Collections.Generic; @@ -12,32 +43,12 @@ namespace StgSharp.Controls { public class MarkingLabel : ControllingItem { - public ReadOnlySpan TextureBox - { - get => marker.TextureCoord; - } - public vec2d Position { get; set; } - public Rectangle BoundingBox { get; set; } - public bool IsEntity => true; - - private vec2d _currentPosition, _movementVec; - - private TimeFunction _movement; private PlainGeometryMesh marker; - public void MoveTo(vec2d target) - { - Move(target - Position); - } + private TimeFunction _movement; - public void Move(vec2d movement) - { - if (!_movement.IsComplete) - { - Position = _currentPosition + _movement.Calculate() * _movementVec; - } - } + private vec2d _currentPosition, _movementVec; public MarkingLabel(PlainGeometryMesh marker, TimeFunction movement) { @@ -45,10 +56,32 @@ namespace StgSharp.Controls _movement = movement; } + public bool IsEntity => true; + public ReadOnlySpan TextureBox + { + get => marker.TextureCoord; + } + public Rectangle BoundingBox { get; set; } + public vec2d Position { get; set; } + public IEnumerator GetEnumerator() { yield return marker; } + + public void Move(vec2d movement) + { + if (!_movement.IsComplete) + { + Position = _currentPosition + (_movement.Calculate() * _movementVec); + } + } + + public void MoveTo(vec2d target) + { + Move(target - Position); + } + } } diff --git a/源代码/StgSharp/Controlling/Controls/TriggerButton.cs b/源代码/StgSharp/Controlling/Controls/TriggerButton.cs index c031a97a..61c09e1a 100644 --- a/源代码/StgSharp/Controlling/Controls/TriggerButton.cs +++ b/源代码/StgSharp/Controlling/Controls/TriggerButton.cs @@ -40,6 +40,9 @@ using System.Text; namespace StgSharp.Controls { + + public delegate void RenderButtonTextureCallback(ButtonStatus status, float beginTime, in TextureProvider texture); + public enum ButtonStatus { Error = 0b0, @@ -57,22 +60,19 @@ namespace StgSharp.Controls HighlightToDisable = -(Highlight | Disable), } - public delegate void RenderButtonTextureCallback(ButtonStatus status, float beginTime, in TextureProvider texture); - public class TriggerButton : ControllingItem { - private TextureProvider _texture; - private float _statusBeginTime; - public TriggerButton Left { get; internal set; } - public TriggerButton Right { get; internal set; } - public TriggerButton Up { get; internal set; } - public TriggerButton Down { get; internal set; } + private Action? confirmCallback; + private Action? disableCallback; #nullable enable private Action? enableCallback; - private Action? disableCallback; - private Action? confirmCallback; + private float _statusBeginTime; + + private RenderButtonTextureCallback _renderButton; + private TextureProvider _texture; + #nullable restore public TriggerButton() @@ -80,11 +80,25 @@ namespace StgSharp.Controls CurrentStatus = ButtonStatus.Disable; } - protected ButtonStatus CurrentStatus { get; set; } + public event Action ConfirmEvent + { + add { confirmCallback += value; } + remove { confirmCallback -= value; } + } - private RenderButtonTextureCallback _renderButton; + public event Action DisableEvent + { + add { disableCallback += value; } + remove { disableCallback -= value; } + } - public event RenderButtonTextureCallback RenderButtonTexture + public event Action EnableEvent + { + add { enableCallback += value; } + remove { enableCallback -= value; } + } + + public event RenderButtonTextureCallback RenderButtonTexture { add { @@ -97,7 +111,7 @@ namespace StgSharp.Controls _renderButton += value; } } - remove + remove { if (_renderButton != null) { @@ -106,48 +120,51 @@ namespace StgSharp.Controls } } + public bool IsHighLighted { get; internal set; } + + public bool IsDisabled { get; internal set; } + + public bool IsEntity => true; + + public ReadOnlySpan TextureBox + { + get => MemoryMarshal.Cast(_texture.TextureCoordinate); + } + public Rectangle BoundingBox { get; set; } + + public TriggerButton Left { get; internal set; } + public TriggerButton Right { get; internal set; } + public TriggerButton Up { get; internal set; } + public TriggerButton Down { get; internal set; } + public vec2d Position { get; set; } + internal TextureProvider Texture { get => _texture; set => _texture = value; } - public ReadOnlySpan TextureBox + protected ButtonStatus CurrentStatus { get; set; } + + public void DeHighlight() { - get => MemoryMarshal.Cast(_texture.TextureCoordinate); - } - - public bool IsHighLighted { get; internal set; } - - public bool IsDisabled { get; internal set; } - public vec2d Position { get; set; } - public Rectangle BoundingBox { get; set; } - - public bool IsEntity => true; - - public event Action EnableEvent - { - add { enableCallback += value; } - remove { enableCallback -= value; } - } - - public event Action DisableEvent - { - add { disableCallback += value; } - remove { disableCallback -= value; } - } - - public event Action ConfirmEvent - { - add { confirmCallback += value; } - remove { confirmCallback -= value; } - } - - internal void Init( ButtonStatus status ) - { - if (CurrentStatus == ButtonStatus.Error) + if (CurrentStatus == ButtonStatus.Highlight) { - CurrentStatus = status; + CurrentStatus = ButtonStatus.HighlightToEnable; + } + } + + public void Disable() + { + CurrentStatus = CurrentStatus switch + { + ButtonStatus.Enable => ButtonStatus.EnableToDisable, + ButtonStatus.Highlight => ButtonStatus.HighlightToDisable, + _ => CurrentStatus, + }; + if (disableCallback != null) + { + disableCallback(); } } @@ -161,18 +178,16 @@ namespace StgSharp.Controls { return; } - if ( enableCallback != null)enableCallback(); + if (enableCallback != null) + { + enableCallback(); + } } - public void Disable() + public IEnumerator GetEnumerator() { - CurrentStatus = CurrentStatus switch - { - ButtonStatus.Enable => ButtonStatus.EnableToDisable, - ButtonStatus.Highlight => ButtonStatus.HighlightToDisable, - _ => CurrentStatus, - }; - if (disableCallback != null) disableCallback(); + _renderButton(CurrentStatus, _statusBeginTime, in _texture); + yield return new PlainGeometryMesh(this.BoundingBox, _texture); } public void Highlight() @@ -185,21 +200,18 @@ namespace StgSharp.Controls { return; } - if (confirmCallback != null) confirmCallback(); - } - - public void DeHighlight() - { - if (CurrentStatus == ButtonStatus.Highlight) + if (confirmCallback != null) { - CurrentStatus = ButtonStatus.HighlightToEnable; + confirmCallback(); } } - public IEnumerator GetEnumerator() + internal void Init(ButtonStatus status) { - _renderButton(CurrentStatus,_statusBeginTime, in _texture); - yield return new PlainGeometryMesh(this.BoundingBox, _texture); + if (CurrentStatus == ButtonStatus.Error) + { + CurrentStatus = status; + } } }//----------------------------------- End of class -------------------------------------------- diff --git a/源代码/StgSharp/Controlling/Designer.cs b/源代码/StgSharp/Controlling/Designer.cs deleted file mode 100644 index 3d05953e..00000000 --- a/源代码/StgSharp/Controlling/Designer.cs +++ /dev/null @@ -1,72 +0,0 @@ -using StgSharp.Geometries; -using StgSharp.Graphics; -using StgSharp.Controls; -using StgSharp.Controlling.UsrActivity; -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Net; -using System.Text; - -namespace StgSharp.Graphics -{ - public class ViewPortDesigner - { - private KeyboardButtonGroup currentButtonGroup; - - private List _controlList; - - public ViewPortDesigner() - { - _controlList = new List(); - } - - public KeyboardButtonGroup CreateKeyboardButtonGroup( - ITrigger leftBidning, - ITrigger rightBinding, - ITrigger upBinding, - ITrigger downBinding, - ITrigger confirmBinding - ) - { - var ret = new KeyboardButtonGroup(); - _controlList.Add(ret); - currentButtonGroup = ret; - return ret; - } - - public TriggerButton CreateKeyboardButton( - Rectangle bonding, AnimationBuilder defaultAnimation, bool isEnable - ) - { - var ret = new TriggerButton(); - ret.BoundingBox = bonding; - if (isEnable) - { - ret.IsDisabled = false; - ret.Enable(defaultAnimation); - } - else - { - ret.IsDisabled = true; - ret.Disable(defaultAnimation); - } - currentButtonGroup.AddButton(ret); - return ret; - } - - - - public CharacterLineIndexImage CreateCharacterLine( - int length, char blankFilling, PlainGeometryMesh tittle, IEnumerable<(char,PlainGeometryMesh)> charList - ) - { - var ret = new CharacterLineIndexImage(length, blankFilling,tittle,charList); - _controlList.Add(ret); - return ret; - } - - }//---------------------------------- End of Class ----------------------------------------- - -} diff --git a/源代码/StgSharp/Controlling/IO/GLIO.cs b/源代码/StgSharp/Controlling/IO/GLIO.cs index c479839f..5ee914fa 100644 --- a/源代码/StgSharp/Controlling/IO/GLIO.cs +++ b/源代码/StgSharp/Controlling/IO/GLIO.cs @@ -78,6 +78,30 @@ namespace StgSharp.Graphics [StructLayout(LayoutKind.Sequential)] public struct OpenglContext { + + public override bool Equals(object obj) + { + return false; + } + + public override unsafe int GetHashCode() + { + fixed (OpenglContext* sptr = &this) + { + return sptr->GetHashCode(); + } + } + + public static bool operator !=(OpenglContext left, OpenglContext right) + { + return !(left == right); + } + + public static bool operator ==(OpenglContext left, OpenglContext right) + { + return left.Equals(right); + } + #region glapi internal unsafe delegate* glAccumxOES; @@ -2615,27 +2639,6 @@ namespace StgSharp.Graphics #endregion glapi - public override bool Equals(object obj) - { - return false; - } - public unsafe override int GetHashCode() - { - fixed (OpenglContext* sptr = &this) - { - return sptr->GetHashCode(); - } - } - - public static bool operator ==(OpenglContext left, OpenglContext right) - { - return left.Equals(right); - } - - public static bool operator !=(OpenglContext left, OpenglContext right) - { - return !(left == right); - } } } \ No newline at end of file diff --git a/源代码/StgSharp/Controlling/IO/InternalIO.cs b/源代码/StgSharp/Controlling/IO/InternalIO.cs index 7d616fc0..57ba53bd 100644 --- a/源代码/StgSharp/Controlling/IO/InternalIO.cs +++ b/源代码/StgSharp/Controlling/IO/InternalIO.cs @@ -53,9 +53,10 @@ namespace StgSharp InfoError, InfoWarning, } - + internal static unsafe partial class InternalIO { + internal const string SS_errorLog = "SS_errorlog.log"; @@ -65,13 +66,13 @@ namespace StgSharp internal static Dictionary GLtype = new Dictionary(); - internal static SemaphoreSlim logSyncSemaphore = new SemaphoreSlim(1, 1); - internal static readonly GCHandle ssc_logHandle = GCHandle.Alloc(new byte[512], GCHandleType.Pinned); internal static IntPtr SSClibPtr = IntPtr.Zero; + internal static SemaphoreSlim logSyncSemaphore = new SemaphoreSlim(1, 1); + static InternalIO() { GLtype.Add(TypeCode.Single, GLconst.FLOAT); diff --git a/源代码/StgSharp/Controlling/KeyEventAttribute.cs b/源代码/StgSharp/Controlling/KeyEventAttribute.cs index 2579998f..f2546dff 100644 --- a/源代码/StgSharp/Controlling/KeyEventAttribute.cs +++ b/源代码/StgSharp/Controlling/KeyEventAttribute.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="KeyEventAttribute.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,14 +36,15 @@ using System.Threading.Tasks; namespace StgSharp { - [AttributeUsage( AttributeTargets.Method)] - public class KeyEventAttribute:Attribute + [AttributeUsage(AttributeTargets.Method)] + public class KeyEventAttribute : Attribute { - internal int _keyTarget; + internal int _equipment; internal int _keyStat; + internal int _keyTarget; - public KeyEventAttribute(KeyboardKey key ,KeyStatus status) + public KeyEventAttribute(KeyboardKey key, KeyStatus status) { _equipment = (int)InputEquipment.Keyboard; _keyTarget = (int)key; diff --git a/源代码/StgSharp/Controlling/UsrActivity/ITrigger.cs b/源代码/StgSharp/Controlling/UsrActivity/ITrigger.cs index 1b9b7aa8..d1944667 100644 --- a/源代码/StgSharp/Controlling/UsrActivity/ITrigger.cs +++ b/源代码/StgSharp/Controlling/UsrActivity/ITrigger.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ITrigger.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Text; @@ -6,7 +36,9 @@ namespace StgSharp.Controlling.UsrActivity { public interface ITrigger { + public int TargetKeyOrButtonID { get; } public KeyStatus TriggeredStatus { get; } + } } diff --git a/源代码/StgSharp/Controlling/UsrActivity/JoystickTrigger.cs b/源代码/StgSharp/Controlling/UsrActivity/JoystickTrigger.cs index fd591bae..621a20a0 100644 --- a/源代码/StgSharp/Controlling/UsrActivity/JoystickTrigger.cs +++ b/源代码/StgSharp/Controlling/UsrActivity/JoystickTrigger.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="JoystickTrigger.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Text; @@ -6,28 +36,18 @@ namespace StgSharp.Controlling.UsrActivity { public struct JoystickTrigger : ITrigger, IEquatable { - public Joystick Stick; private KeyStatus _triggeredStat; - - public int TargetKeyOrButtonID => (int)Stick; - - public KeyStatus TriggeredStatus => _triggeredStat; + public Joystick Stick; public JoystickTrigger(Joystick targetKey) { this.Stick = targetKey; } - public static bool operator ==(JoystickTrigger left, JoystickTrigger right) - { - return left._triggeredStat == right._triggeredStat && left.Stick == right.Stick; - } + public int TargetKeyOrButtonID => (int)Stick; - public static bool operator !=(JoystickTrigger left, JoystickTrigger right) - { - return !(left == right); - } + public KeyStatus TriggeredStatus => _triggeredStat; public override bool Equals(object obj) { @@ -36,7 +56,7 @@ namespace StgSharp.Controlling.UsrActivity public override int GetHashCode() { - return (int)Stick + 17 * (int)_triggeredStat; + return ((int)Stick) + (17 * ((int)_triggeredStat)); } public override string ToString() @@ -44,9 +64,20 @@ namespace StgSharp.Controlling.UsrActivity return $"Key {Stick} triggered when {_triggeredStat}"; } + public static bool operator !=(JoystickTrigger left, JoystickTrigger right) + { + return !(left == right); + } + + public static bool operator ==(JoystickTrigger left, JoystickTrigger right) + { + return (left._triggeredStat == right._triggeredStat) && (left.Stick == right.Stick); + } + bool IEquatable.Equals(JoystickTrigger other) { return other == this; } + } } diff --git a/源代码/StgSharp/Controlling/UsrActivity/KeyTrigger.cs b/源代码/StgSharp/Controlling/UsrActivity/KeyTrigger.cs index ae029cd0..ddf5b257 100644 --- a/源代码/StgSharp/Controlling/UsrActivity/KeyTrigger.cs +++ b/源代码/StgSharp/Controlling/UsrActivity/KeyTrigger.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="KeyTrigger.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Data.Common; using System.Text; @@ -6,30 +36,21 @@ using System.Text; namespace StgSharp.Controlling.UsrActivity { - public struct KeyTrigger: ITrigger,IEquatable + public struct KeyTrigger : ITrigger, IEquatable { + private KeyboardKey _targetKey; private KeyStatus _triggerStat; - public int TargetKeyOrButtonID => (int)_targetKey; - - public KeyStatus TriggeredStatus => _triggerStat; - - public KeyTrigger(KeyboardKey targetKey, KeyStatus targetStat) + public KeyTrigger(KeyboardKey targetKey, KeyStatus targetStat) { this._targetKey = targetKey; this._triggerStat = targetStat; } - public static bool operator ==(KeyTrigger left, KeyTrigger right) - { - return left._triggerStat == right._triggerStat && left._targetKey == right._targetKey; - } + public int TargetKeyOrButtonID => (int)_targetKey; - public static bool operator !=(KeyTrigger left, KeyTrigger right) - { - return !(left == right); - } + public KeyStatus TriggeredStatus => _triggerStat; public override bool Equals(object obj) { @@ -38,7 +59,7 @@ namespace StgSharp.Controlling.UsrActivity public override int GetHashCode() { - return (int)_targetKey + 17 * (int)_triggerStat; + return ((int)_targetKey) + (17 * ((int)_triggerStat)); } public override string ToString() @@ -46,9 +67,20 @@ namespace StgSharp.Controlling.UsrActivity return $"Key {_targetKey} triggered when {_triggerStat}"; } + public static bool operator !=(KeyTrigger left, KeyTrigger right) + { + return !(left == right); + } + + public static bool operator ==(KeyTrigger left, KeyTrigger right) + { + return (left._triggerStat == right._triggerStat) && (left._targetKey == right._targetKey); + } + bool IEquatable.Equals(KeyTrigger other) { return other == this; } + } } diff --git a/源代码/StgSharp/Controlling/ViewDesigner.cs b/源代码/StgSharp/Controlling/ViewDesigner.cs deleted file mode 100644 index 543765ae..00000000 --- a/源代码/StgSharp/Controlling/ViewDesigner.cs +++ /dev/null @@ -1,92 +0,0 @@ -using StgSharp.Geometries; -using StgSharp.Graphics; -using StgSharp.Controls; -using StgSharp.Controlling.UsrActivity; -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Net; -using System.Text; - -namespace StgSharp.Graphics -{ - /// - /// ViewDesigner provides descriptions of various controls in the view, - /// binds the controls to specific user actions and behaviors, - /// and describes the layout and interactions of each control. - /// - public abstract class ViewDesigner where TView:View - { - protected TView _binding; - - private KeyboardButtonGroup currentButtonGroup; - - private List _controlList; - - public ViewDesigner() - { - _controlList = new List(); - } - - protected TView Binding - { - get => _binding; - } - - public TButtonGroup CreateKeyboardButtonGroup( - ITrigger leftBidning, - ITrigger rightBinding, - ITrigger upBinding, - ITrigger downBinding, - ITrigger confirmBinding - ) - where TButtonGroup : KeyboardButtonGroup,new() - { - var ret = new TButtonGroup(); - _controlList.Add(ret); - currentButtonGroup = ret; - _binding.Responder[leftBidning] = ret.MoveLeft; - _binding.Responder[rightBinding] = ret.MoveRight; - _binding.Responder[upBinding] = ret.MoveUp; - _binding.Responder[downBinding] = ret.MoveDown; - _binding.Responder[confirmBinding] = ret.Confirm; - return ret; - } - - public TriggerButton CreateKeyboardButton( - Rectangle bonding, TextureProvider defaultAnimation, bool isEnable - ) - { - var ret = new TriggerButton(); - ret.BoundingBox = bonding; - if (isEnable) - { - ret.IsDisabled = false; - ret.Enable(); - } - else - { - ret.IsDisabled = true; - ret.Disable(); - } - currentButtonGroup.AddButton(ret); - return ret; - } - - public CharacterLineIndexImage CreateCharacterLine( - int length, char blankFilling, PlainGeometryMesh tittle, IEnumerable<(char,PlainGeometryMesh)> charList - ) - { - var ret = new CharacterLineIndexImage(length, blankFilling,tittle,charList); - _controlList.Add(ret); - return ret; - } - - public abstract void CustomizedInitialize(); - - public abstract bool ValidateInitializing(); - - }//---------------------------------- End of Class ----------------------------------------- - -} diff --git a/源代码/StgSharp/Controlling/ViewResponder.cs b/源代码/StgSharp/Controlling/ViewResponder.cs deleted file mode 100644 index ea33bdbb..00000000 --- a/源代码/StgSharp/Controlling/ViewResponder.cs +++ /dev/null @@ -1,92 +0,0 @@ -using StgSharp.Controlling.UsrActivity; -using StgSharp.Graphics; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp -{ - public abstract class ViewResponder where TView: View - { - private View _viewbinding; - private Dictionary keyCallbackIndex; - private Dictionary nameToCallbackMap; - private bool _isInitialized; - - - protected ViewResponder() - { - keyCallbackIndex = new Dictionary(); - nameToCallbackMap = new Dictionary(); - } - - internal void ProcessUserInput() - { - foreach (var pair in keyCallbackIndex) - { - ITrigger t = pair.Key; - if (InternalIO.glfwGetKey(_viewbinding.ViewHandle, t.TargetKeyOrButtonID) == t.TriggeredStatus) - { - pair.Value(); - } - } - } - - public Action this[ITrigger trigger] - { - get => keyCallbackIndex.TryGetValue(trigger, out Action callback) ? callback : null; - set - { - if (keyCallbackIndex.TryGetValue(trigger, out Action callback)) - { - callback += value; - } - else - { - keyCallbackIndex.Add(trigger, value); - } - } - } - - internal void Init(Func keyGetter) - { - if (_isInitialized) - { - return; - } - CustomizedInitialize( - (trigger, name) => - { - if (!nameToCallbackMap.TryGetValue(name, out Action ret)) - { - ret = keyGetter.Invoke(name)?? - throw new InvalidOperationException($"Cannot find method named {name} in binded view model"); - } - this[trigger] = ret; - return ret; - } - ); - } - - public void ProcessInput() - { - foreach (var pair in keyCallbackIndex) - { - if (InternalIO.glfwGetKey(_viewbinding.ViewHandle,(int)pair.Key.TargetKeyOrButtonID) == pair.Key.TriggeredStatus) - { - pair.Value(); - } - } - } - - public abstract void CustomizedInitialize(Func keyRegister); - - public abstract bool ValidateInitializing(); - - } - - -} diff --git a/源代码/StgSharp/Data/GlobalData/root.cs b/源代码/StgSharp/Data/GlobalData/root.cs index 3e78efc6..641997c0 100644 --- a/源代码/StgSharp/Data/GlobalData/root.cs +++ b/源代码/StgSharp/Data/GlobalData/root.cs @@ -1,4 +1,34 @@ -using StgSharp.Data; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="root.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Data; using System; using System.Collections.Generic; @@ -10,10 +40,10 @@ namespace StgSharp { public static unsafe partial class StgSharp { - private static SSD defaultIdProvider = new SSD(); - private static List root = new List(); private static byte leastUnusedArea; + private static List root = new List(); + private static SSD defaultIdProvider = new SSD(); public static byte NewArea() { diff --git a/源代码/StgSharp/Data/InternalData.cs b/源代码/StgSharp/Data/InternalData.cs index cfc94781..d75f956a 100644 --- a/源代码/StgSharp/Data/InternalData.cs +++ b/源代码/StgSharp/Data/InternalData.cs @@ -1,4 +1,34 @@ -using StgSharp; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="InternalData.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp; using System; using System.Collections.Generic; @@ -8,7 +38,66 @@ namespace StgSharp { internal partial class InternalIO { - internal const string CollisionTextureVertexShader ="#version 430 core\r\n\r\nlayout(location = 0) in vec2 localCollisionCoord;\r\nlayout(location = 1) in vec2 spaceCoord;\r\nlayout(location = 2) in float rotation;\r\nlayout(location = 3) in float scaling;\r\n\r\nuniform vec2 target;\r\nuniform mat2 projection;\r\n\r\nvoid main()\r\n{\r\n mat2 scaling = mat2(\r\n scaling,0,\r\n 0,scaling\r\n );\r\n mat2 rotation = mat2(\r\n cos(rotation),-sin(rotation),\r\n sin(rotation),cos(rotation) \r\n );\r\n vec2 realCoord = (rotation * scaling * localCollisionCoord) + spaceCoord - target;\r\n realCoord = projection * realCoord;\r\n\r\n float dist = distance(realCoord, vec2(0,0));\r\n float angle = atan(realCoord.y, realCoord.x);\r\n \r\n gl_Position = vec4(angle, realCoord.y, dist, 1);\r\n}"; - internal const string CollisionTextureFragmentShader = "#version 430 core\r\n\r\nout vec4 Color;\r\n\r\nuniform float range;\r\n\r\nvoid main()\r\n{\r\n float dist = gl_FragCoord.z;\r\n\r\n if(dist > range)\r\n {\r\n discard;\r\n }\r\n dist /= range;\r\n gl_FragDepth = min(dist, gl_FragDepth);\r\n\r\n Color = vec4(dist,0,0,1);\r\n}"; + + #region ControllingItemRender + + internal const string ControlItemRenderVertexShader = """ + + + + """; + + #endregion + + #region CollisionTexture + + internal const string CollisionTextureVertexShader = """ + #version 430 core + layout(location = 0) in vec2 localCollisionCoord; + layout(location = 1) in vec2 spaceCoord; + layout(location = 2) in float rotation; + layout(location = 3) in float scaling; + + uniform vec2 target; + uniform mat2 projection; + + void main() + { + mat2 scaling = mat2( + scaling,0, + 0,scaling ); + + mat2 rotation = mat2( + cos(rotation),-sin(rotation), + sin(rotation),cos(rotation) ); + + vec2 realCoord = (rotation * scaling * localCollisionCoord) + spaceCoord - target; + realCoord = projection * realCoord; + float dist = distance(realCoord, vec2(0,0)); + float angle = atan(realCoord.y, realCoord.x); + gl_Position = vec4(angle, realCoord.y, dist, 1); + } + """; + internal const string CollisionTextureFragmentShader = """ + #version 430 core + out vec4 Color; + + uniform float range; + void main() + { + float dist = gl_FragCoord.z; + if(dist > range) + { + discard; + } + dist /= range; + gl_FragDepth = min(dist, gl_FragDepth); + Color = vec4(dist,0,0,1); + } + """; + + #endregion + + } } diff --git a/源代码/StgSharp/Data/M128.cs b/源代码/StgSharp/Data/M128.cs index 9a720c97..3fdcbeb8 100644 --- a/源代码/StgSharp/Data/M128.cs +++ b/源代码/StgSharp/Data/M128.cs @@ -32,6 +32,7 @@ using StgSharp.Math; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -43,8 +44,9 @@ using System.Text; namespace StgSharp.Data { [StructLayout(LayoutKind.Explicit, Pack = 16)] - public unsafe struct M128:IMemoryType + public unsafe struct M128 : IMemoryType { + [FieldOffset(0)] internal Vector4 vec; internal M128(Vector4 v) @@ -52,6 +54,20 @@ namespace StgSharp.Data vec = v; } + public override bool Equals([NotNullWhen(true)] object obj) + { + if (obj is not M128 other) + { + return false; + } + return this == other; + } + + public override int GetHashCode() + { + return vec.GetHashCode(); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public T Read(int index) where T : struct #if NET8_0_OR_GREATER @@ -89,7 +105,7 @@ namespace StgSharp.Data #if NET8_0_OR_GREATER , INumber #else - ,IConvertible + , IConvertible #endif { fixed (Vector4* p = &vec) @@ -100,7 +116,17 @@ namespace StgSharp.Data } } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(M128 left, M128 right) + { + return left.vec == right.vec; + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(M128 left, M128 right) + { + return left.vec != right.vec; + } #if NET5_0_OR_GREATER @@ -165,5 +191,6 @@ namespace StgSharp.Data } #endif + } } diff --git a/源代码/StgSharp/Data/M256.cs b/源代码/StgSharp/Data/M256.cs index af2d8fb9..f92974f6 100644 --- a/源代码/StgSharp/Data/M256.cs +++ b/源代码/StgSharp/Data/M256.cs @@ -1,4 +1,34 @@ -using StgSharp.Data; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="M256.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Data; using System; using System.Collections.Generic; @@ -12,8 +42,9 @@ namespace StgSharp.Math.HighPrecession { [StructLayout(LayoutKind.Sequential)] - public unsafe struct M256:IMemoryType + public unsafe struct M256 : IMemoryType { + private M128 v0; private M128 v1; @@ -33,5 +64,6 @@ namespace StgSharp.Math.HighPrecession *(((T*)mptr) + index) = value; } } + } } diff --git a/源代码/StgSharp/Data/RandomGenerator.cs b/源代码/StgSharp/Data/RandomGenerator.cs index e1d9acc1..c5e0203f 100644 --- a/源代码/StgSharp/Data/RandomGenerator.cs +++ b/源代码/StgSharp/Data/RandomGenerator.cs @@ -1,4 +1,34 @@ -using StgSharp.Data; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="RandomGenerator.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Data; using System; using System.IO; @@ -14,15 +44,16 @@ namespace StgSharp.Data public class RandomGenerator { + private byte[] currentKey; + private readonly byte[] originKey; - private byte[] currentKey; private int cycleCount; private SHA512 hash; - public RandomGenerator():this(DateTime.UtcNow.ToBinary()) + public RandomGenerator() : this(DateTime.UtcNow.ToBinary()) { - + } public RandomGenerator(object source) @@ -77,28 +108,38 @@ namespace StgSharp.Data return source.Read(cycleCount % 4); } + public byte GenRandomInt8() + { + cycleCount++; + if (cycleCount % 64 == 0) + { + PrivateRand(); + } + return currentKey[cycleCount % 64]; + } + public float GenRandomSingle() { cycleCount++; - + while (true) { M128 source = PrivateRand(); - + uint temp0 = source.Read(0), temp1 = source.Read(2); if (temp0 * temp1 != 0) { - float ret = (temp0 % temp1) * 1.0f / temp1; + float ret = ((temp0 % temp1) * 1.0f) / temp1; if (ret < 0.335f) { - ret = ret * (ret * -0.7811934f + 1.4489113f); + ret = ret * ((ret * (-0.7811934f)) + 1.4489113f); } - else + else { - ret = ret * (ret * -0.1158368f + 1.0580600f) + 0.0590584f; + ret = (ret * ((ret * (-0.1158368f)) + 1.0580600f)) + 0.0590584f; } if (ret > 1) { @@ -111,14 +152,11 @@ namespace StgSharp.Data } - public byte GenRandomInt8() + + public void Reset() { - cycleCount++; - if (cycleCount % 64 == 0) - { - PrivateRand(); - } - return (byte)(currentKey[ cycleCount % 64 ]); + currentKey = originKey; + cycleCount = 0; } private unsafe M128 PrivateRand() @@ -127,16 +165,16 @@ namespace StgSharp.Data M128 ret; fixed (byte* bptr = currentKey) { - switch ((cycleCount % 16) / 4) + switch ((cycleCount % 16) / 4) { case 0: - ret= *((M128*)bptr + 0);break; + ret = *(((M128*)bptr) + 0); break; case 1: - ret= *((M128*)bptr + 1);break; + ret = *(((M128*)bptr) + 1); break; case 2: - ret= *((M128*)bptr + 2);break; + ret = *(((M128*)bptr) + 2); break; case 3: - ret= *((M128*)bptr + 3);break; + ret = *(((M128*)bptr) + 3); break; default: throw new InvalidOperationException(); } @@ -145,12 +183,5 @@ namespace StgSharp.Data return ret; } - - public void Reset() - { - currentKey = originKey; - cycleCount = 0; - } - } } diff --git a/源代码/StgSharp/Data/SSD/Area.cs b/源代码/StgSharp/Data/SSD/Area.cs index eb5b8c5b..ae52916e 100644 --- a/源代码/StgSharp/Data/SSD/Area.cs +++ b/源代码/StgSharp/Data/SSD/Area.cs @@ -1,4 +1,34 @@ -using StgSharp.Data.FileIO; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Area.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Data.FileIO; using System; using System.Collections.Generic; @@ -15,6 +45,6 @@ namespace StgSharp.Data /// public partial class Area { - + } } diff --git a/源代码/StgSharp/Data/SSD/DataHead.cs b/源代码/StgSharp/Data/SSD/DataHead.cs index 0b131bbf..1e839b60 100644 --- a/源代码/StgSharp/Data/SSD/DataHead.cs +++ b/源代码/StgSharp/Data/SSD/DataHead.cs @@ -43,19 +43,19 @@ namespace StgSharp.Data public struct SSDSegmentHead { + + [FieldOffset(12)] internal byte size; + [FieldOffset(0)] internal M128 data; + [FieldOffset(13)] public byte selfDefine_1; + [FieldOffset(14)] public byte selfDefine_2; + [FieldOffset(15)] public byte selfDefine_3; [FieldOffset(0)] public int globalID; [FieldOffset(4)] public int nextID; [FieldOffset(8)] public int previousHash; - [FieldOffset(12)] internal byte size; - [FieldOffset(13)] public byte selfDefine_1; - [FieldOffset(14)] public byte selfDefine_2; - [FieldOffset(15)] public byte selfDefine_3; - - public int Size { get => ((int)size) + 1; diff --git a/源代码/StgSharp/Data/SSD/DataSegment.cs b/源代码/StgSharp/Data/SSD/DataSegment.cs index 649b7ac5..ffa9de1e 100644 --- a/源代码/StgSharp/Data/SSD/DataSegment.cs +++ b/源代码/StgSharp/Data/SSD/DataSegment.cs @@ -54,24 +54,6 @@ namespace StgSharp.Data this.PreviousHash = previousHash; } - public static SSDSegment FromStream(byte[] stream) - { - if (stream.Length != 16 * StgSharp.ssdSegmentLength) - { - throw new ArgumentException(); - } - SSDSegment ret = new SSDSegment(); - fixed (byte* bptr = stream) - { - ret.Head.data = *(M128*)bptr; - for (int i = 1; i < StgSharp.ssdSegmentLength; i++) - { - ret.WriteData(i - 1, *(M128*)(bptr + 16 * i)); - } - } - return ret; - } - public byte this[int index] { get @@ -113,6 +95,24 @@ namespace StgSharp.Data } } + public static SSDSegment FromStream(byte[] stream) + { + if (stream.Length != 16 * StgSharp.ssdSegmentLength) + { + throw new ArgumentException(); + } + SSDSegment ret = new SSDSegment(); + fixed (byte* bptr = stream) + { + ret.Head.data = *(M128*)bptr; + for (int i = 1; i < StgSharp.ssdSegmentLength; i++) + { + ret.WriteData(i - 1, *(M128*)(bptr + (16 * i))); + } + } + return ret; + } + public byte[] GetBytes() { byte[] ret = new byte[16 * StgSharp.ssdSegmentLength]; diff --git a/源代码/StgSharp/Data/SSD/SSD.cs b/源代码/StgSharp/Data/SSD/SSD.cs index f19147c2..b5cc1805 100644 --- a/源代码/StgSharp/Data/SSD/SSD.cs +++ b/源代码/StgSharp/Data/SSD/SSD.cs @@ -39,11 +39,11 @@ namespace StgSharp.Data { public partial class SSD { - private SSDrawHead head; private Dictionary fileList; - + private FileStream file; + private SSDrawHead head; public SSD() { diff --git a/源代码/StgSharp/Data/SSD/SSDVirtualFolder.cs b/源代码/StgSharp/Data/SSD/SSDVirtualFolder.cs index 578ed0bb..24afdc03 100644 --- a/源代码/StgSharp/Data/SSD/SSDVirtualFolder.cs +++ b/源代码/StgSharp/Data/SSD/SSDVirtualFolder.cs @@ -39,9 +39,10 @@ namespace StgSharp.Data { public class SSDFolder : ISSDSerializable { + + internal Dictionary folders; internal int _folderID; internal string _name; - internal Dictionary folders; internal SSDFolder() { @@ -68,6 +69,11 @@ namespace StgSharp.Data public SerializableTypeCode SSDTypeCode => SerializableTypeCode.VirtualFolder; + public void FromBytes(byte[] stream) + { + throw new NotImplementedException(); + } + //TODO 虚拟文件夹的GetBytes好难写 public byte[] GetBytes() @@ -75,10 +81,5 @@ namespace StgSharp.Data throw new NotImplementedException(); } - public void FromBytes(byte[] stream) - { - throw new NotImplementedException(); - } - } } diff --git a/源代码/StgSharp/Data/SSD/SSDraw.cs b/源代码/StgSharp/Data/SSD/SSDraw.cs index 279e14f0..44c6f23c 100644 --- a/源代码/StgSharp/Data/SSD/SSDraw.cs +++ b/源代码/StgSharp/Data/SSD/SSDraw.cs @@ -47,6 +47,7 @@ namespace StgSharp.Data.FileIO { public class SSDraw { + private byte[] data; public SSDraw(string name, Stream streamSource) @@ -62,13 +63,14 @@ namespace StgSharp.Data.FileIO public SSDrawHead Head { get; set; } public string Name { get; set; } + } [StructLayout(LayoutKind.Explicit, Size = 32 * 16)] public unsafe struct SSDrawHead { - + } diff --git a/源代码/StgSharp/Data/Serialize/ISSDSerializable.cs b/源代码/StgSharp/Data/Serialize/ISSDSerializable.cs index d75367a4..70b64c54 100644 --- a/源代码/StgSharp/Data/Serialize/ISSDSerializable.cs +++ b/源代码/StgSharp/Data/Serialize/ISSDSerializable.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ISSDSerializable.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,11 +39,13 @@ namespace StgSharp.Data public interface ISSDSerializable { + public SerializableTypeCode SSDTypeCode { get; } public byte[] GetBytes(); internal void FromBytes(byte[] stream); + } public enum SerializableTypeCode @@ -31,14 +63,10 @@ namespace StgSharp.Data public static partial class Serializer { - public static byte[] Serialize(ISSDSerializable serializableObject) - { - return serializableObject.GetBytes(); - } - public static T Deserialize(byte[] stream)where T : ISSDSerializable + public static T Deserialize(byte[] stream) where T : ISSDSerializable { - T serializableObject = (T)Activator.CreateInstance(); + T serializableObject = Activator.CreateInstance(); serializableObject.FromBytes(stream); return serializableObject; } @@ -67,5 +95,10 @@ namespace StgSharp.Data throw new ArgumentException("Unknown file type"); } } + public static byte[] Serialize(ISSDSerializable serializableObject) + { + return serializableObject.GetBytes(); + } + } } \ No newline at end of file diff --git a/源代码/StgSharp/Entities/EliteEnemy.cs b/源代码/StgSharp/Entities/EliteEnemy.cs index fd0988bc..e2c80638 100644 --- a/源代码/StgSharp/Entities/EliteEnemy.cs +++ b/源代码/StgSharp/Entities/EliteEnemy.cs @@ -39,13 +39,13 @@ namespace StgSharp.Entities { internal Launcher _awardLauncher; - internal LinkedList> _commonBulletLauncher; internal Launcher _dieBulletLauncher; + internal LinkedList> _commonBulletLauncher; public bool _selectalbe; public Launcher AwardLauncher { get; set; } - public LinkedList> CommonBulletLauncher { get; set; } public Launcher DieBulletLauncher { get; set; } + public LinkedList> CommonBulletLauncher { get; set; } public virtual void OnRender() { diff --git a/源代码/StgSharp/Entities/IEntity.cs b/源代码/StgSharp/Entities/IEntity.cs index 651c8067..925e9980 100644 --- a/源代码/StgSharp/Entities/IEntity.cs +++ b/源代码/StgSharp/Entities/IEntity.cs @@ -40,14 +40,24 @@ namespace StgSharp { protected uint _bornTick; - internal Point _basePoint; + internal Func _movHandler; internal LinkedList _collisionBox; - internal Sensor _collisionSensor; - internal Func _movHandler; + internal Point _basePoint; internal Point _pos; internal Point _position; + internal Sensor _collisionSensor; internal string _texture; + /// + /// X position of an enenmy entity + /// + public float X { get; set; } + + /// + /// Y position of an enemy entity + /// + public float Y { get; set; } + public LinkedList CollisionBox { get => _collisionBox; @@ -63,23 +73,13 @@ namespace StgSharp set => _collisionSensor = value; } + public string TextureGL { get; set; } + /// /// A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y /// public vec2d Location { get; } - public string TextureGL { get; set; } - - /// - /// X position of an enenmy entity - /// - public float X { get; set; } - - /// - /// Y position of an enemy entity - /// - public float Y { get; set; } - public abstract void OnRenderFrame(); public void SetLocation(Point p) diff --git a/源代码/StgSharp/Entities/Launcher.cs b/源代码/StgSharp/Entities/Launcher.cs index e2e9f958..49ba47fe 100644 --- a/源代码/StgSharp/Entities/Launcher.cs +++ b/源代码/StgSharp/Entities/Launcher.cs @@ -36,14 +36,15 @@ namespace StgSharp public class Launcher where T : IEntity { + internal uint[] launchtick; //发射子弹的内部计时 + internal Counter _internalParameter; //发射器的内部计时器 + internal EntityPartical _bulletSample; //发射的子弹类型 /* *用于发射其他的实体,主要是子弹 和 掉落物 */ internal vec2d _center; //发射器的参考位置,运动轨迹的方程应当基于这个参考点构建 - internal Counter _internalParameter; //发射器的内部计时器 - internal uint[] launchtick; //发射子弹的内部计时 public EntityPartical Bullet { diff --git a/源代码/StgSharp/Environment/ErrorDefine.cs b/源代码/StgSharp/Environment/ErrorDefine.cs index 2523eeb1..92c5704c 100644 --- a/源代码/StgSharp/Environment/ErrorDefine.cs +++ b/源代码/StgSharp/Environment/ErrorDefine.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ErrorDefine.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,10 +38,12 @@ namespace StgSharp { public class UniformEmptyReferenceException : Exception { - public UniformEmptyReferenceException(string program, string name): + + public UniformEmptyReferenceException(string program, string name) : base($"Location -1 returned when trying to find uniform {name} in shader program {program}") { - + } + } } diff --git a/源代码/StgSharp/Environment/GlobalSetting.cs b/源代码/StgSharp/Environment/GlobalSetting.cs index cc062f58..312c1c7d 100644 --- a/源代码/StgSharp/Environment/GlobalSetting.cs +++ b/源代码/StgSharp/Environment/GlobalSetting.cs @@ -41,19 +41,13 @@ namespace StgSharp { public static unsafe partial class StgSharp { - private static int _mainThreadID = -1; + + internal const int ssdSegmentLength = 16; static byte[] _currentHash; private static bool _inited; - internal const int ssdSegmentLength = 16; - - public static int MainThreadID - { - get => _mainThreadID == -1 ? - throw new InvalidOperationException("StgSharp environment is not inited. " + - "Main thread id is not available") :_mainThreadID; - } + private static int _mainThreadID = -1; public static byte[] CurrentAssemblyHash { @@ -73,6 +67,13 @@ namespace StgSharp } } + public static int MainThreadID + { + get => (_mainThreadID == -1) ? + throw new InvalidOperationException("StgSharp environment is not inited. " + + "Main thread id is not available") : _mainThreadID; + } + /// /// CustomizeInit an instance of OpenGL program, /// This method should be called before any other StgSharp api. @@ -104,6 +105,8 @@ namespace StgSharp vsyncActivated = value; } } + } + }//-------------------------------------- End of Class ---------------------------------------// } \ No newline at end of file diff --git a/源代码/StgSharp/Environment/Monitors.cs b/源代码/StgSharp/Environment/Monitors.cs index 32eb723e..f6f8fe3d 100644 --- a/源代码/StgSharp/Environment/Monitors.cs +++ b/源代码/StgSharp/Environment/Monitors.cs @@ -1,4 +1,34 @@ -using StgSharp.Graphics; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Monitors.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics; using System; using System.Collections.Generic; @@ -11,18 +41,19 @@ namespace StgSharp { public static partial class StgSharp { - private unsafe static IntPtr[] monitorsArray; + + private static unsafe IntPtr[] monitorsArray; public static unsafe IntPtr[] MonitorsHandleArray { - get + get { if (monitorsArray == null) { int count = 0; IntPtr* arrayhandle = InternalIO.glfwGetMonitors(&count); monitorsArray = new IntPtr[count]; - Marshal.Copy((IntPtr)arrayhandle,monitorsArray,0,count); + Marshal.Copy((IntPtr)arrayhandle, monitorsArray, 0, count); Marshal.FreeHGlobal((IntPtr)arrayhandle); } return monitorsArray; @@ -31,11 +62,9 @@ namespace StgSharp public static IntPtr DefaultMonitor { - get - { - return MonitorsHandleArray[0]; - } + get { return MonitorsHandleArray[0]; } } + } diff --git a/源代码/StgSharp/Environment/Platform.cs b/源代码/StgSharp/Environment/Platform.cs index e6fef1ab..9334ce4e 100644 --- a/源代码/StgSharp/Environment/Platform.cs +++ b/源代码/StgSharp/Environment/Platform.cs @@ -75,8 +75,9 @@ namespace StgSharp /// public const long version = 430; - private static uint markCount = 0; private static bool vsyncActivated; + + private static uint markCount = 0; internal static GraphicAPI API = default; public static void Init() @@ -96,6 +97,11 @@ namespace StgSharp InternalIO.InternalWriteLog(ex.Message, LogType.Error); } + public static void LogInfo(string log) + { + InternalIO.InternalWriteLog(log, LogType.Info); + } + public static void LogWarning(string log) { InternalIO.InternalWriteLog(log, LogType.Warning); @@ -105,11 +111,6 @@ namespace StgSharp InternalIO.InternalWriteLog(notVerySeriesException.Message, LogType.Warning); } - public static void LogInfo(string log) - { - InternalIO.InternalWriteLog(log, LogType.Info); - } - public static void Mark(bool needConsole) { markCount++; diff --git a/源代码/StgSharp/Environment/TimeProvider.cs b/源代码/StgSharp/Environment/TimeProvider.cs index 94f3e39c..9fb4c31e 100644 --- a/源代码/StgSharp/Environment/TimeProvider.cs +++ b/源代码/StgSharp/Environment/TimeProvider.cs @@ -28,7 +28,9 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Logic; + + +using StgSharp.Timing; using System; using System.Collections.Generic; @@ -50,9 +52,10 @@ namespace StgSharp public sealed class StgSharpTime : TimeSourceProviderBase { + + private static List subscriberList = new List(); private static long accuracy; private static Stopwatch mainProvider = new Stopwatch(); - private static List subscriberList = new List(); private static Thread timeProvideThread; internal StgSharpTime() @@ -90,6 +93,14 @@ namespace StgSharp timeProvideThread.Start(); } + public override void StopProvidingTime() + { + lock (mainProvider) + { + mainProvider.Stop(); + } + } + public void Terminate() { lock (mainProvider) @@ -109,14 +120,6 @@ namespace StgSharp subscriberList.Remove(subscriber); } - public override void StopProvidingTime() - { - lock (mainProvider) - { - mainProvider.Stop(); - } - } - private void ProvideTime() { long totalMS, internalFrequncy = Stopwatch.Frequency; diff --git a/源代码/StgSharp/Environment/globalKeyStat.cs b/源代码/StgSharp/Environment/globalKeyStat.cs index e7318c70..9ed4c49c 100644 --- a/源代码/StgSharp/Environment/globalKeyStat.cs +++ b/源代码/StgSharp/Environment/globalKeyStat.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="globalKeyStat.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; @@ -10,7 +40,8 @@ namespace StgSharp public static partial class StgSharp { - private static ConcurrentDictionary keyListener + + private static ConcurrentDictionary keyListener = new ConcurrentDictionary(); public static KeyStatus CheckKey(KeyboardKey key) diff --git a/源代码/StgSharp/Geometries/Coordination/CoordinationBase.cs b/源代码/StgSharp/Geometries/Coordination/CoordinationBase.cs index 8dd7fd80..bec389d7 100644 --- a/源代码/StgSharp/Geometries/Coordination/CoordinationBase.cs +++ b/源代码/StgSharp/Geometries/Coordination/CoordinationBase.cs @@ -1,4 +1,34 @@ -using StgSharp.Math; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="CoordinationBase.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Math; using System; using System.Collections.Generic; @@ -10,9 +40,10 @@ namespace StgSharp.Geometries { public abstract class CoordinationBase { + + private bool globalCoordAvailable; private CoordinationBase localCoordination; private Matrix44 coordMat; - private bool globalCoordAvailable; public CoordinationBase( @@ -24,7 +55,7 @@ namespace StgSharp.Geometries public virtual Point LocalOrigin { - get => new Point( coordMat.colum3.XYZ); + get => new Point(coordMat.colum3.XYZ); internal set => coordMat.colum3.XYZ = value.Coord; } @@ -46,7 +77,7 @@ namespace StgSharp.Geometries set => coordMat.colum2.XYZ = value; } - protected ref Matrix44 CoordMat + protected ref Matrix44 CoordMat { get => ref coordMat; } diff --git a/源代码/StgSharp/Geometries/Coordination/PlainCoordinate.cs b/源代码/StgSharp/Geometries/Coordination/PlainCoordinate.cs index 6fd6cba5..1535bdf6 100644 --- a/源代码/StgSharp/Geometries/Coordination/PlainCoordinate.cs +++ b/源代码/StgSharp/Geometries/Coordination/PlainCoordinate.cs @@ -39,6 +39,13 @@ namespace StgSharp.Geometries { public class PlainCoordinate : CoordinationBase { + + private static PlainCoordinate statndardPlainCoordination = new PlainCoordinate( + null, new Point(0, 0, 0), + new vec3d(1, 0, 0), + new vec3d(0, 1, 0) + ); + public PlainCoordinate( CoordinationBase local, Point origin, @@ -55,12 +62,7 @@ namespace StgSharp.Geometries LocalOrigin = origin; } - private static PlainCoordinate statndardPlainCoordination = new PlainCoordinate( - null, new Point(0,0,0), - new vec3d(1,0,0), - new vec3d(0, 1, 0) - ); - public static PlainCoordinate StandardPlainCoordination => statndardPlainCoordination; + } } diff --git a/源代码/StgSharp/Geometries/Coordination/SpaceCoordinate.cs b/源代码/StgSharp/Geometries/Coordination/SpaceCoordinate.cs index 5f3940f2..f6797ffe 100644 --- a/源代码/StgSharp/Geometries/Coordination/SpaceCoordinate.cs +++ b/源代码/StgSharp/Geometries/Coordination/SpaceCoordinate.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="Class1.cs" +// file="SpaceCoordinate.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -38,11 +38,13 @@ namespace StgSharp.Geometries { public class SpaceCoordinate : CoordinationBase { + public SpaceCoordinate( CoordinationBase localCoordination, Point origin, vec3d xAxis, vec3d yAxis, vec3d zAxis ) : base(localCoordination) { } + } } diff --git a/源代码/StgSharp/Geometries/Coordination/StreamLocalCoordinate.cs b/源代码/StgSharp/Geometries/Coordination/StreamLocalCoordinate.cs index e813320e..2f311de4 100644 --- a/源代码/StgSharp/Geometries/Coordination/StreamLocalCoordinate.cs +++ b/源代码/StgSharp/Geometries/Coordination/StreamLocalCoordinate.cs @@ -1,4 +1,34 @@ -using StgSharp.Math; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="StreamLocalCoordinate.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Math; using System; using System.Collections.Generic; diff --git a/源代码/StgSharp/Geometries/GeometryOperation/GeometryOperation.cs b/源代码/StgSharp/Geometries/GeometryOperation/GeometryOperation.cs index ce51d0ea..fc75902d 100644 --- a/源代码/StgSharp/Geometries/GeometryOperation/GeometryOperation.cs +++ b/源代码/StgSharp/Geometries/GeometryOperation/GeometryOperation.cs @@ -1,4 +1,35 @@ -using StgSharp.Math; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="GeometryOperation.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Math; +using StgSharp.Timing; using System; using System.Collections.Generic; @@ -13,22 +44,12 @@ namespace StgSharp.Geometries public class GeometryMotion { + private bool isIncrementMode; private bool sourceIsStatic; - private TimeSpanProvider time; private GeometryMotionDelegate movement; private IntPtr handle; - - public static GeometryMotion DefaultMotion - { - get => new GeometryMotion(true, null, null); - } - - private static vec3d defaultMotion(TimeSpanProvider provider, out float rotation) - { - rotation = 0; - return Vec3d.Zero; - } + private TimeSpanProvider time; public unsafe GeometryMotion( bool isIncreament, @@ -46,7 +67,7 @@ namespace StgSharp.Geometries else if (motionDelegate.Method.IsStatic) { sourceIsStatic = true; - handle = Marshal.GetFunctionPointerForDelegate(motionDelegate); + handle = Marshal.GetFunctionPointerForDelegate(motionDelegate); movement = motionDelegate; } else @@ -58,15 +79,20 @@ namespace StgSharp.Geometries public bool IsIncrement { - get => isIncrementMode; + get => isIncrementMode; } + public static GeometryMotion DefaultMotion + { + get => new GeometryMotion(true, null, null); + } + public unsafe void RunMotion(ref vec3d coord, ref float rotation) { float rot; vec3d vec; - if (sourceIsStatic) + if (sourceIsStatic) { vec = ((delegate* unmanaged[Cdecl])handle)(time, out rot); } @@ -74,7 +100,7 @@ namespace StgSharp.Geometries { vec = movement(time, out rot); } - + if (isIncrementMode) { coord += vec; @@ -86,5 +112,12 @@ namespace StgSharp.Geometries rotation = rot; } } + + private static vec3d defaultMotion(TimeSpanProvider provider, out float rotation) + { + rotation = 0; + return Vec3d.Zero; + } + }//------------------------------- End of Class ------------------------------- } diff --git a/源代码/StgSharp/Geometries/GeometryScaler/Angle.cs b/源代码/StgSharp/Geometries/GeometryScaler/Angle.cs index 1a5d94fc..a1b3ee58 100644 --- a/源代码/StgSharp/Geometries/GeometryScaler/Angle.cs +++ b/源代码/StgSharp/Geometries/GeometryScaler/Angle.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Angle.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; @@ -9,12 +39,19 @@ namespace StgSharp.Math { public static partial class GeometryScaler { + internal const float DegToRad = 180 / Scaler.Pi; [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Degree ToDegree(float value) + public static float Cos(Radius r) { - return new Degree(value); + return MathF.Cos(r._radius); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Cos(Degree r) + { + return MathF.Cos(r._degree / DegToRad); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -23,24 +60,18 @@ namespace StgSharp.Math return MathF.Sin(r._radius); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Sin(Degree r) + { + return MathF.Sin(r._degree / DegToRad); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Tan(Radius r) { return MathF.Tan(r._radius); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float Cos(Radius r) - { - return MathF.Cos(r._radius); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float Sin(Degree r) - { - return MathF.Sin(r._degree/DegToRad); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Tan(Degree r) { @@ -48,18 +79,19 @@ namespace StgSharp.Math } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float Cos(Degree r) + public static Degree ToDegree(float value) { - return MathF.Cos(r._degree / DegToRad); + return new Degree(value); } } public struct Degree { + internal float _degree; - internal Degree(float dgree) + internal Degree(float dgree) { _degree = dgree; } @@ -68,28 +100,25 @@ namespace StgSharp.Math { return new Radius(d._degree / GeometryScaler.DegToRad); } + } public struct Radius { + internal float _radius; + [Obsolete("Unsafe, you may forget this is radius.", true)] + public Radius() { } + + public Radius(float radius) + { + _radius = radius; + } + public static Radius Zero { - get =>new Radius(0); - } - - public Radius(float radius) - { - _radius = radius; - } - - [Obsolete("Unsafe, you may forget this is radius.",true)] - public Radius() { } - - public static implicit operator Degree(Radius r) - { - return new Degree(r._radius * 180 / Scaler.Pi); + get => new Radius(0); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -105,9 +134,9 @@ namespace StgSharp.Math } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Radius operator +(Radius left, Radius Right) + public static bool operator !=(Radius left, Radius right) { - return new Radius(left._radius + Right._radius); + return left._radius != right._radius; } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -128,16 +157,21 @@ namespace StgSharp.Math return left._radius / right._radius; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Radius operator +(Radius left, Radius Right) + { + return new Radius(left._radius + Right._radius); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool operator ==(Radius left, Radius right) { return left._radius == right._radius; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Radius left, Radius right) + public static implicit operator Degree(Radius r) { - return left._radius != right._radius; + return new Degree((r._radius * 180) / Scaler.Pi); } } diff --git a/源代码/StgSharp/Geometries/IGeometry.cs b/源代码/StgSharp/Geometries/IGeometry.cs index 89722d85..5934dc97 100644 --- a/源代码/StgSharp/Geometries/IGeometry.cs +++ b/源代码/StgSharp/Geometries/IGeometry.cs @@ -41,7 +41,6 @@ namespace StgSharp.Geometries { public interface IGeometry { - public CoordinationBase Coordination { get; } public Point this[int index] { @@ -49,19 +48,20 @@ namespace StgSharp.Geometries set; } - public int VertexCount - { - get; - } - #pragma warning disable CA1819 public vec4d[] VertexStream #pragma warning restore CA1819 { get; } + public CoordinationBase Coordination { get; } - public ReadOnlySpan VertexIndices + public int VertexCount + { + get; + } + + public ReadOnlySpan VertexIndices { get; } diff --git a/源代码/StgSharpDebug/Logic/Exception.cs b/源代码/StgSharp/Geometries/IGeomtryBuffer.cs similarity index 93% rename from 源代码/StgSharpDebug/Logic/Exception.cs rename to 源代码/StgSharp/Geometries/IGeomtryBuffer.cs index db94d36d..f43cc279 100644 --- a/源代码/StgSharpDebug/Logic/Exception.cs +++ b/源代码/StgSharp/Geometries/IGeomtryBuffer.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="Exception.cs" +// file="IGeomtryBuffer.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,14 +28,17 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Graphics; - using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace StgSharp.Logic +namespace StgSharp.Geometries { -} \ No newline at end of file + public interface IGeomtryBuffer + { + + + } +} diff --git a/源代码/StgSharp/Geometries/IInstancing.cs b/源代码/StgSharp/Geometries/IInstancing.cs index 9ee9fc76..efb9083c 100644 --- a/源代码/StgSharp/Geometries/IInstancing.cs +++ b/源代码/StgSharp/Geometries/IInstancing.cs @@ -43,30 +43,6 @@ namespace StgSharp.Geometries public interface IInstancing { - public int BufferId - { - get; - internal set; - } - - public vec3d CenterPositionGlobal - { - get; - internal set; - } - - public vec3d Coord - { - get { return GlobalBuffer.CoordAndRotationList[BufferId].XYZ; } - set { GlobalBuffer.CoordAndRotationList[BufferId] = new vec4d(value.vec); } - } - - public IInstancingBuffer GlobalBuffer - { - get; - internal set; - } - public float Rotation { get { return GlobalBuffer.CoordAndRotationList[BufferId].W; } @@ -89,6 +65,30 @@ namespace StgSharp.Geometries get; set; } + public IInstancingBuffer GlobalBuffer + { + get; + internal set; + } + + public int BufferId + { + get; + internal set; + } + + public vec3d CenterPositionGlobal + { + get; + internal set; + } + + public vec3d Coord + { + get { return GlobalBuffer.CoordAndRotationList[BufferId].XYZ; } + set { GlobalBuffer.CoordAndRotationList[BufferId] = new vec4d(value.vec); } + } + public void Move() { (vec3d coord, float rotation) = (Coord, Rotation); diff --git a/源代码/StgSharp/Geometries/IInstancingBuffer.cs b/源代码/StgSharp/Geometries/IInstancingBuffer.cs index 4959a050..23705fc0 100644 --- a/源代码/StgSharp/Geometries/IInstancingBuffer.cs +++ b/源代码/StgSharp/Geometries/IInstancingBuffer.cs @@ -1,4 +1,34 @@ -using StgSharp.Math; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="IInstancingBuffer.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Math; using System; using System.Collections.Generic; @@ -9,6 +39,10 @@ namespace StgSharp.Geometries public interface IInstancingBuffer { + public Span CoordAndRotationSpan { get; } + + public Span ScalingSpan { get; } + internal IGeometry TypicalShape { get; } internal List InstanceList { get; } @@ -17,11 +51,7 @@ namespace StgSharp.Geometries internal List ScalingList { get; } - public Span CoordAndRotationSpan { get; } - public Span ScalingSpan { get; } - - } } diff --git a/源代码/StgSharp/Geometries/PlainGeometry/Define/GeometryOperation.cs b/源代码/StgSharp/Geometries/PlainGeometry/Define/GeometryOperation.cs index be3cb33a..cae7f18c 100644 --- a/源代码/StgSharp/Geometries/PlainGeometry/Define/GeometryOperation.cs +++ b/源代码/StgSharp/Geometries/PlainGeometry/Define/GeometryOperation.cs @@ -37,6 +37,7 @@ namespace StgSharp.Geometries public static unsafe class GeometryOperation { + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static vec3d DefaultMotion(int tick) { diff --git a/源代码/StgSharp/Geometries/PlainGeometry/Define/IPlainEntity.cs b/源代码/StgSharp/Geometries/PlainGeometry/Define/IPlainEntity.cs index 176bd2b7..b79f2ee8 100644 --- a/源代码/StgSharp/Geometries/PlainGeometry/Define/IPlainEntity.cs +++ b/源代码/StgSharp/Geometries/PlainGeometry/Define/IPlainEntity.cs @@ -1,4 +1,34 @@ -using StgSharp.Math; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="IPlainEntity.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Math; using System; using System.Collections.Generic; @@ -11,22 +41,19 @@ namespace StgSharp.Geometries public interface IPlainEntity { + public vec2d CenterPosition { get; set; } public bool CollideWith(IPlainEntity entity); + } - public class PlainEntity:IPlainEntity + public class PlainEntity : IPlainEntity { - private PlainGeometry _shape; - vec2d IPlainEntity.CenterPosition - { - get => _shape.Coordination.LocalOrigin.Coord.XY; - set => throw new InvalidOperationException(); - } + private PlainGeometry _shape; public PlainEntity(PlainGeometry shape) { @@ -37,6 +64,13 @@ namespace StgSharp.Geometries { throw new NotImplementedException(); } + + vec2d IPlainEntity.CenterPosition + { + get => _shape.Coordination.LocalOrigin.Coord.XY; + set => throw new InvalidOperationException(); + } + } } diff --git a/源代码/StgSharp/Geometries/PlainGeometry/Define/ParticleOnPlain.cs b/源代码/StgSharp/Geometries/PlainGeometry/Define/ParticleOnPlain.cs index ab52aa15..44f3a1f6 100644 --- a/源代码/StgSharp/Geometries/PlainGeometry/Define/ParticleOnPlain.cs +++ b/源代码/StgSharp/Geometries/PlainGeometry/Define/ParticleOnPlain.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="IInstancing.cs" +// file="ParticleOnPlain.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -54,7 +54,7 @@ namespace StgSharp.Geometries ((IInstancingBuffer)buffer).InstanceList.Add(this); } - public int BufferId + public GeometryMotion Motion { get; set; @@ -65,9 +65,10 @@ namespace StgSharp.Geometries get; set; } - public GeometryMotion Motion - { - get; + + public int BufferId + { + get; set; } @@ -77,16 +78,17 @@ namespace StgSharp.Geometries set; } - vec2d IPlainEntity.CenterPosition - { - get => GlobalBuffer.CoordAndRotationList[BufferId].XY; - set => throw new NotImplementedException(); - } - bool IPlainEntity.CollideWith(IPlainEntity entity) { throw new NotImplementedException(); } + + vec2d IPlainEntity.CenterPosition + { + get => GlobalBuffer.CoordAndRotationList[BufferId].XY; + set => throw new NotImplementedException(); + } + } } diff --git a/源代码/StgSharp/Geometries/PlainGeometry/Define/PlainGeometry.cs b/源代码/StgSharp/Geometries/PlainGeometry/Define/PlainGeometry.cs index edb8a33e..3b1f7ac7 100644 --- a/源代码/StgSharp/Geometries/PlainGeometry/Define/PlainGeometry.cs +++ b/源代码/StgSharp/Geometries/PlainGeometry/Define/PlainGeometry.cs @@ -41,6 +41,7 @@ namespace StgSharp.Geometries /// public abstract class PlainGeometry : IGeometry { + protected vec4d[] vertexMat; internal CoordinationBase coordinate; diff --git a/源代码/StgSharp/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs b/源代码/StgSharp/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs index c1e4871a..7359fe27 100644 --- a/源代码/StgSharp/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs +++ b/源代码/StgSharp/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs @@ -44,30 +44,24 @@ using System.Threading.Tasks; namespace StgSharp.Geometries { - public class PlainInstancingBuffer : - IDisposable,IEnumerable, IInstancingBuffer - where T : + public class PlainInstancingBuffer : + IDisposable, IEnumerable, IInstancingBuffer + where T : IInstancing { + private bool disposedValue; + private CoordinatePlain globalCorrdinnate; private List coordList; private List instanceList; private List scalingList; private Mutex mutex; - private bool disposedValue; - - #region field of mem opt - - vec4d[] coordArray; - float[] scaleArray; - - #endregion public PlainInstancingBuffer() { coordList = new List(capacity: 100); - instanceList = new List(capacity:100); + instanceList = new List(capacity: 100); scalingList = new List(capacity: 100); coordArray = Array.Empty(); scaleArray = Array.Empty(); @@ -133,8 +127,6 @@ namespace StgSharp.Geometries } } - IGeometry IInstancingBuffer.TypicalShape => throw new NotImplementedException(); - public int CreateInstanceID() { mutex.WaitOne(); @@ -145,13 +137,32 @@ namespace StgSharp.Geometries return ret; } + // ~PlainInstancingBuffer() + // { + // Dispose(disposing: false); + // } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + + public IEnumerator GetEnumerator() + { + foreach (IInstancing item in instanceList) + { + yield return (T)item; + } + } + public void Remove(T instance) { mutex.WaitOne(); if (instance.GlobalBuffer != this) { throw new ArgumentException( - message:"instance does not belong to current Particle Buffer", + message: "instance does not belong to current Particle Buffer", paramName: nameof(instance)); } int index = instance.BufferId; @@ -170,7 +181,7 @@ namespace StgSharp.Geometries public void UpdateAllParticles() { - foreach (var particle in instanceList) + foreach (IInstancing particle in instanceList) { particle.Move(); } @@ -192,31 +203,23 @@ namespace StgSharp.Geometries } } - // ~PlainInstancingBuffer() - // { - // Dispose(disposing: false); - // } - - public void Dispose() - { - Dispose(disposing: true); - GC.SuppressFinalize(this); - } - - public IEnumerator GetEnumerator() - { - foreach (var item in instanceList) - { - yield return (T)item; - } - } - IEnumerator IEnumerable.GetEnumerator() { - foreach (var item in instanceList) + foreach (IInstancing item in instanceList) { yield return (T)item; } } + + IGeometry IInstancingBuffer.TypicalShape => throw new NotImplementedException(); + + #region field of mem opt + + vec4d[] coordArray; + float[] scaleArray; + + #endregion + + } } diff --git a/源代码/StgSharp/Geometries/PlainGeometry/Polygon4.cs b/源代码/StgSharp/Geometries/PlainGeometry/Polygon4.cs index a6fe9b11..a95ab543 100644 --- a/源代码/StgSharp/Geometries/PlainGeometry/Polygon4.cs +++ b/源代码/StgSharp/Geometries/PlainGeometry/Polygon4.cs @@ -38,14 +38,15 @@ namespace StgSharp.Geometries { public class Polygon4 : PlainGeometry { + protected static int[] Indices = [0, 1, 2, 0, 2, 3]; - internal Polygon4():base(PlainCoordinate.StandardPlainCoordination) + internal Polygon4() : base(PlainCoordinate.StandardPlainCoordination) { vertexMat = new vec4d[4]; } - internal Polygon4(vec4d[] rawCoord): + internal Polygon4(vec4d[] rawCoord) : base(PlainCoordinate.StandardPlainCoordination) { if (rawCoord.Length != 4) @@ -60,7 +61,7 @@ namespace StgSharp.Geometries Point topRight, Point bottomRight, Point bottomLeft - ):base(PlainCoordinate.StandardPlainCoordination) + ) : base(PlainCoordinate.StandardPlainCoordination) { this[0] = topLeft; this[1] = topRight; @@ -69,21 +70,6 @@ namespace StgSharp.Geometries } - public Polygon4( - float v0x, float v0y, - float v1x, float v1y, - float v2x, float v2y, - float v3x, float v3y - ):base(PlainCoordinate.StandardPlainCoordination) - { - vertexMat = new vec4d[4]; - - this[0] = new Point(v0x, v0y, 0); - this[1] = new Point(v1x, v1y, 0); - this[2] = new Point(v2x, v2y, 0); - this[3] = new Point(v3x, v3y, 0); - } - public Polygon4(CoordinationBase coordinate, PlainCoordinate coordination, @@ -100,6 +86,21 @@ namespace StgSharp.Geometries } + public Polygon4( + float v0x, float v0y, + float v1x, float v1y, + float v2x, float v2y, + float v3x, float v3y + ) : base(PlainCoordinate.StandardPlainCoordination) + { + vertexMat = new vec4d[4]; + + this[0] = new Point(v0x, v0y, 0); + this[1] = new Point(v1x, v1y, 0); + this[2] = new Point(v2x, v2y, 0); + this[3] = new Point(v3x, v3y, 0); + } + public Polygon4( PlainCoordinate coordination, float v0x, float v0y, diff --git a/源代码/StgSharp/Geometries/PlainGeometry/Polygon5.cs b/源代码/StgSharp/Geometries/PlainGeometry/Polygon5.cs index 4bc1aa0a..87034d28 100644 --- a/源代码/StgSharp/Geometries/PlainGeometry/Polygon5.cs +++ b/源代码/StgSharp/Geometries/PlainGeometry/Polygon5.cs @@ -39,7 +39,9 @@ namespace StgSharp.Geometries public unsafe class Polygon5 : PlainGeometry { - public unsafe Polygon5():base(PlainCoordinate.StandardPlainCoordination) + internal static int[] Indices = [0, 1, 2, 0, 2, 3, 0, 3, 4]; + + public unsafe Polygon5() : base(PlainCoordinate.StandardPlainCoordination) { vertexMat = new vec4d[5]; } @@ -50,7 +52,7 @@ namespace StgSharp.Geometries float v2x, float v2y, float v3x, float v3y, float v4x, float v4y - ):base(PlainCoordinate.StandardPlainCoordination) + ) : base(PlainCoordinate.StandardPlainCoordination) { vertexMat = new vec4d[5]; this[0] = new Point(v0x, v0y, 0); @@ -67,7 +69,7 @@ namespace StgSharp.Geometries float v2x, float v2y, float v3x, float v3y, float v4x, float v4y - ):base(coordination) + ) : base(coordination) { vertexMat = new vec4d[5]; this[0] = new Point(v0x, v0y, 0); @@ -77,8 +79,7 @@ namespace StgSharp.Geometries this[4] = new Point(v4x, v4y, 0); } - internal static int[] Indices = [ 0, 1, 2, 0, 2, 3, 0, 3, 4 ]; - public override ReadOnlySpan VertexIndices => Indices; + } } diff --git a/源代码/StgSharp/Geometries/PlainGeometry/Polygon6.cs b/源代码/StgSharp/Geometries/PlainGeometry/Polygon6.cs index 0c388d03..e6c42dad 100644 --- a/源代码/StgSharp/Geometries/PlainGeometry/Polygon6.cs +++ b/源代码/StgSharp/Geometries/PlainGeometry/Polygon6.cs @@ -38,7 +38,10 @@ namespace StgSharp.Geometries { public class Polygon6 : PlainGeometry { - public Polygon6():base(PlainCoordinate.StandardPlainCoordination) + + internal static int[] Indices = [0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 5]; + + public Polygon6() : base(PlainCoordinate.StandardPlainCoordination) { vertexMat = new vec4d[6]; } @@ -64,8 +67,7 @@ namespace StgSharp.Geometries vertexMat[6].vec = vert6.vec; } - internal static int[] Indices = [ 0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 5 ]; - public override ReadOnlySpan VertexIndices => Indices; + } } \ No newline at end of file diff --git a/源代码/StgSharp/Geometries/PlainGeometry/Triangle.cs b/源代码/StgSharp/Geometries/PlainGeometry/Triangle.cs index 0c97f57f..60d53318 100644 --- a/源代码/StgSharp/Geometries/PlainGeometry/Triangle.cs +++ b/源代码/StgSharp/Geometries/PlainGeometry/Triangle.cs @@ -42,7 +42,9 @@ namespace StgSharp.Geometries public unsafe class Triangle : PlainGeometry { - public Triangle():base(PlainCoordinate.StandardPlainCoordination) + internal static int[] Indices = [0, 1, 2]; + + public Triangle() : base(PlainCoordinate.StandardPlainCoordination) { vertexMat = new vec4d[3]; } @@ -58,6 +60,17 @@ namespace StgSharp.Geometries this[2] = vertex03; } + public Triangle(PlainCoordinate coordination, + Point vertex01, + Point vertex02, + Point vertex03 + ) : base(coordination) + { + this[0] = vertex01; + this[1] = vertex02; + this[2] = vertex03; + } + public Triangle( float v0x, float v0y, float v1x, float v1y, @@ -69,17 +82,6 @@ namespace StgSharp.Geometries this[2] = new Point(v2x, v2y, 0); } - public Triangle(PlainCoordinate coordination, - Point vertex01, - Point vertex02, - Point vertex03 - ) : base(coordination) - { - this[0] = vertex01; - this[1] = vertex02; - this[2] = vertex03; - } - public Triangle(PlainCoordinate coordination, float v0x, float v0y, float v1x, float v1y, @@ -90,7 +92,6 @@ namespace StgSharp.Geometries this[1] = new Point(v1x, v1y, 0); this[2] = new Point(v2x, v2y, 0); } - internal static int[] Indices = [ 0, 1, 2 ]; public override ReadOnlySpan VertexIndices => Indices; diff --git a/源代码/StgSharp/Geometries/Point.cs b/源代码/StgSharp/Geometries/Point.cs index f5ca51ac..0f0f9496 100644 --- a/源代码/StgSharp/Geometries/Point.cs +++ b/源代码/StgSharp/Geometries/Point.cs @@ -1,4 +1,34 @@ -using StgSharp.Math; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Point.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Math; using System; using System.Collections.Generic; @@ -11,12 +41,14 @@ namespace StgSharp.Geometries [StructLayout(LayoutKind.Explicit, Size = 16)] public struct Point { + [FieldOffset(0)] private vec3d coord; [FieldOffset(0)] internal Vector4 coordVec; - public Point(float x, float y, float z) + internal Point(vec4d vector) { - coordVec = new Vector4(x,y,z,1); + coordVec = vector.vec; + coordVec.W = 1; } public Point(vec3d coord) @@ -25,10 +57,9 @@ namespace StgSharp.Geometries coordVec.W = 1; } - internal Point(vec4d vector) + public Point(float x, float y, float z) { - coordVec = vector.vec; - coordVec.W = 1; + coordVec = new Vector4(x, y, z, 1); } public vec3d Coord diff --git a/源代码/StgSharp/GlobalSuppressions.cs b/源代码/StgSharp/GlobalSuppressions.cs index f3eb67cd..e0c95dd5 100644 --- a/源代码/StgSharp/GlobalSuppressions.cs +++ b/源代码/StgSharp/GlobalSuppressions.cs @@ -13,3 +13,5 @@ using System.Diagnostics.CodeAnalysis; [assembly: SuppressMessage("Design", "CA1043:将整型或字符串参数用于索引器", Justification = "<挂起>", Scope = "member", Target = "~P:StgSharp.MVVM.View.ViewBase.IViewResponder`1.Item(StgSharp.Controlling.UsrActivity.ITrigger)")] [assembly: SuppressMessage("Design", "CA1043:将整型或字符串参数用于索引器", Justification = "<挂起>", Scope = "member", Target = "~P:StgSharp.MVVM.View.ViewBase.ViewResponder`1.Item(StgSharp.Controlling.UsrActivity.ITrigger)")] [assembly: SuppressMessage("Performance", "CA1864:首选 \"IDictionary.TryAdd(TKey, TValue)\" 方法", Justification = "<挂起>", Scope = "member", Target = "~P:StgSharp.MVVM.View.ViewBase.ViewRender`1.Item(System.String)")] +[assembly: SuppressMessage("Design", "CA1033:接口方法应可由子类型调用", Justification = "<挂起>", Scope = "member", Target = "~P:StgSharp.Collections.IBidirectionalDictionary`2.System#Collections#Generic#IDictionary#Keys")] +[assembly: SuppressMessage("Design", "CA1033:接口方法应可由子类型调用", Justification = "<挂起>", Scope = "member", Target = "~P:StgSharp.Collections.IBidirectionalDictionary`2.System#Collections#Generic#IDictionary#Values")] diff --git a/源代码/StgSharp/Graphics/CPUanimation/IImageProvider.cs b/源代码/StgSharp/Graphics/CPUanimation/IImageProvider.cs index 88bd1420..b86e8674 100644 --- a/源代码/StgSharp/Graphics/CPUanimation/IImageProvider.cs +++ b/源代码/StgSharp/Graphics/CPUanimation/IImageProvider.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="IImageProvider.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Text; @@ -7,6 +37,5 @@ namespace StgSharp.Graphics public interface IImageProvider { Image ProvideImage(); - } } diff --git a/源代码/StgSharp/Graphics/CPUanimation/ImageHelper.cs b/源代码/StgSharp/Graphics/CPUanimation/ImageHelper.cs index 5bbb2b4e..e7f3fe2d 100644 --- a/源代码/StgSharp/Graphics/CPUanimation/ImageHelper.cs +++ b/源代码/StgSharp/Graphics/CPUanimation/ImageHelper.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ImageHelper.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Text; @@ -12,10 +42,10 @@ namespace StgSharp.Graphics { throw new ArgumentNullException(nameof(i)); } - Array.Resize(ref i.data, width * height * i.PixelSize); + Array.Resize(ref i.Data, width * height * i.PixelSize); i.Height = height; i.Width = width; - switch (move) + switch (move) { case ImageMovement.Discard: break; @@ -24,8 +54,8 @@ namespace StgSharp.Graphics default: throw new NotImplementedException(); } + i.PixelUpdateCount++; } - } [Flags] diff --git a/源代码/StgSharp/Graphics/CPUanimation/ImageProcessor.cs b/源代码/StgSharp/Graphics/CPUanimation/ImageProcessor.cs deleted file mode 100644 index 22aaf8ad..00000000 --- a/源代码/StgSharp/Graphics/CPUanimation/ImageProcessor.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Graphics -{ - public static class ImageProcessor - { - public static void Resize(Image i, int width, int height, ImageMovement move) - { - if (i == null) - { - throw new ArgumentNullException(nameof(i)); - } - Array.Resize(ref i.data, width * height * i.ChannelCount); - i.Height = height; - i.Width = width; - switch (move) - { - case ImageMovement.Discard: - break; - case ImageMovement.Top: - break; - default: - throw new NotSupportedException("Invalid or not supported data remanence"); - } - } - - } - - [Flags] - public enum ImageMovement - { -#pragma warning disable CA1008 - Discard = 0, -#pragma warning restore CA1008 - Top = 1, - Bottom = 2, - Left = 4, - Right = 8, - TopLeft = Top | Left, - BottomLeft = Bottom | Left, - TopRight = Top | Right, - BottomRight = Bottom | Right, - } -} diff --git a/源代码/StgSharp/Graphics/Define/BufferObjectBase.cs b/源代码/StgSharp/Graphics/Define/BufferObjectBase.cs index b0c7920a..cd0d5847 100644 --- a/源代码/StgSharp/Graphics/Define/BufferObjectBase.cs +++ b/源代码/StgSharp/Graphics/Define/BufferObjectBase.cs @@ -43,8 +43,9 @@ namespace StgSharp.Graphics /// public abstract class BufferObjectBase : IDisposable { - protected RenderStream binding; + protected GlHandle[] _bufferHandle; + protected RenderStream binding; /// /// Get the only handle to one of the Object instance diff --git a/源代码/StgSharp/Graphics/Define/StructDefine.cs b/源代码/StgSharp/Graphics/Define/StructDefine.cs index 78c508a8..99506f23 100644 --- a/源代码/StgSharp/Graphics/Define/StructDefine.cs +++ b/源代码/StgSharp/Graphics/Define/StructDefine.cs @@ -49,22 +49,9 @@ namespace StgSharp.Graphics public unsafe struct GLFWcontext { - private int client; - private IntPtr destroy; private delegate* extensionSupported; - private GLFWbool forward, debug, noerror; - - //PFNGLGETINTEGERVPROC GetIntegerv; - private IntPtr GetIntegerv; private delegate*, void> getProcAddress; - //PFNGLGETSTRINGPROC GetString; - private IntPtr GetString; - - //PFNGLGETSTRINGIPROC GetStringi; - private IntPtr GetStringi; - private int major, minor, revision; - /* void (* makeCurrent) (glfwWindow*); void (* swapBuffers) (glfwWindow*); @@ -75,12 +62,26 @@ namespace StgSharp.Graphics */ private delegate* makeCurrent; + private delegate* swapBuffer; + private delegate* swapInterval; + private GLFWbool forward, debug, noerror; + + private int client; + private int major, minor, revision; private int profile; private int release; private int robustness; private int source; - private delegate* swapBuffer; - private delegate* swapInterval; + private IntPtr destroy; + + //PFNGLGETINTEGERVPROC GetIntegerv; + private IntPtr GetIntegerv; + + //PFNGLGETSTRINGPROC GetString; + private IntPtr GetString; + + //PFNGLGETSTRINGIPROC GetStringi; + private IntPtr GetStringi; internal struct egl { @@ -165,15 +166,16 @@ namespace StgSharp.Graphics public unsafe struct GLFWimage { + /*! The pixel _data of this image, arranged left-to-right, top-to-bottom. + */ + private byte* pixels; + /*! The height, in pixels, of this image. */ private int height; /*! The width, in pixels, of this image. */ private int width; - /*! The pixel data of this image, arranged left-to-right, top-to-bottom. - */ - private byte* pixels; } @@ -182,22 +184,24 @@ namespace StgSharp.Graphics public unsafe struct GLFWgamepadstate { - /*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0 - * to 1.0 inclusive. - */ - public fixed float axes[6]; - /*! The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS` * or `GLFW_RELEASE`. */ public fixed byte buttons[15]; + /*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0 + * to 1.0 inclusive. + */ + public fixed float axes[6]; + } [StructLayout(LayoutKind.Sequential)] public unsafe struct GLFWallocator { + private void* user; + //GLFWallocatefun allocate; private IntPtr allocate; @@ -207,34 +211,32 @@ namespace StgSharp.Graphics //GLFWreallocatefun reallocate; private IntPtr reallocate; - private void* user; - } [StructLayout(LayoutKind.Sequential)] public unsafe struct glfwMonitor { - private fixed byte name[128]; - private IntPtr userPointer; - - private int width, height; + private glfwVideomode* modes; private glfwWindow* window; - private glfwVideomode* modes; - private int modeCount; - private glfwVideomode currentMode; + private fixed byte name[128]; + private glfwGammaramp currentRamp; private glfwGammaramp originalRamp; - private glfwGammaramp currentRamp; + private glfwVideomode currentMode; + private int modeCount; + + private int width, height; + private IntPtr userPointer; public glfwMonitor() { } public unsafe string Name { - get + get { fixed (byte* cptr = name) { @@ -242,69 +244,73 @@ namespace StgSharp.Graphics } } } + } [StructLayout(LayoutKind.Sequential)] unsafe struct glfwWindow { + glfwWindow* next; - - // Window settings and state - int resizable; - int decorated; - int autoIconify; - int floating; - int focusOnShow; - int mousePassthrough; - int shouldClose; void* userPointer; - int doublebuffer; - // glfwVideomode videoMode; // 根据GLFWvidmode的定义转换 - IntPtr monitor; // _GLFWmonitor* monitor; - IntPtr cursor; // _GLFWcursor* cursor; - - int minwidth, minheight; - int maxwidth, maxheight; - int numer, denom; - - int stickyKeys; - int stickyMouseButtons; - int lockKeyMods; - int cursorMode; - public fixed byte mouseButtons[GLconst.GLFW_MOUSE_BUTTON_LAST + 1]; - public fixed byte keys[GLconst.GLFW_KEY_LAST + 1]; + bool rawMouseMotion; + Callbacks callbacks; // Virtual cursor position when cursor is disabled double virtualCursorPosX, virtualCursorPosY; - bool rawMouseMotion; + int autoIconify; + int cursorMode; + int decorated; + int doublebuffer; + int floating; + int focusOnShow; + int lockKeyMods; + int maxwidth, maxheight; + + int minwidth, minheight; + int mousePassthrough; + int numer, denom; + + // Window settings and state + int resizable; + int shouldClose; + + int stickyKeys; + int stickyMouseButtons; + IntPtr cursor; // _GLFWcursor* cursor; + // glfwVideomode videoMode; // 根据GLFWvidmode的定义转换 + IntPtr monitor; // _GLFWmonitor* monitor; + public fixed byte keys[GLconst.GLFW_KEY_LAST + 1]; + public fixed byte mouseButtons[GLconst.GLFW_MOUSE_BUTTON_LAST + 1]; // _GLFWcontext viewPortDisplay; // 根据_GLFWcontext的定义转换 // Callbacks are represented as IntPtr since we don't need the actual function pointers in C# internal struct Callbacks { - internal IntPtr pos; - internal IntPtr size; - internal IntPtr close; - internal IntPtr refresh; - internal IntPtr focus; - internal IntPtr iconify; - internal IntPtr maximize; - internal IntPtr fbsize; - internal IntPtr scale; - internal IntPtr mouseButton; - internal IntPtr cursorPos; - internal IntPtr cursorEnter; - internal IntPtr scroll; - internal IntPtr key; + internal IntPtr character; internal IntPtr charmods; + internal IntPtr close; + internal IntPtr cursorEnter; + internal IntPtr cursorPos; internal IntPtr drop; - } - Callbacks callbacks; + internal IntPtr fbsize; + internal IntPtr focus; + internal IntPtr iconify; + internal IntPtr key; + internal IntPtr maximize; + internal IntPtr mouseButton; + internal IntPtr pos; + internal IntPtr refresh; + internal IntPtr scale; + internal IntPtr scroll; + internal IntPtr size; - // GLFW_PLATFORM_WINDOW_STATE platformWindowState; -} + } + + // GLFW_PLATFORM_WINDOW_STATE platformWindowState; + } [StructLayout(LayoutKind.Sequential)] @@ -345,9 +351,9 @@ namespace StgSharp.Graphics public unsafe struct GLFWinitconfig { - private int angleType; - private GLFWbool hatButtons; + + private int angleType; private int platformID; //PFN_vkGetInstanceProcAddr vulkanLoader; @@ -359,19 +365,20 @@ namespace StgSharp.Graphics public unsafe struct GLFWwndconfig { + private byte* title; + private GLFWbool autoIconify; private GLFWbool centerCursor; private GLFWbool decorated; private GLFWbool floating; private GLFWbool focused; private GLFWbool focusOnShow; - private int height; private GLFWbool maximized; private GLFWbool mousePassthrough; private GLFWbool resizable; private GLFWbool scaleToMonitor; - private byte* title; private GLFWbool visible; + private int height; private int width; private int xpos; @@ -437,19 +444,20 @@ namespace StgSharp.Graphics public unsafe struct GLFWctxconfig { - private int client; private GLFWbool debug; private GLFWbool forward; + private GLFWbool noerror; + + private int client; private int major; private int minor; - private GLFWbool noerror; private int profile; private int release; private int robustness; + private int source; //glfwWindow* share; private IntPtr share; - private int source; internal Nsgl nsgl = new Nsgl(); @@ -470,6 +478,11 @@ namespace StgSharp.Graphics public unsafe struct GLFWfbconfig { + private GLFWbool doublebuffer; + private GLFWbool sRGB; + private GLFWbool stereo; + private GLFWbool transparent; + private int accumAlphaBits; private int accumBlueBits; private int accumGreenBits; @@ -478,16 +491,12 @@ namespace StgSharp.Graphics private int auxBuffers; private int blueBits; private int depthBits; - private GLFWbool doublebuffer; private int greenBits; - private uintptr_t handle; private int redBits; private int samples; - private GLFWbool sRGB; private int stencilBits; - private GLFWbool stereo; - private GLFWbool transparent; + private uintptr_t handle; } @@ -495,37 +504,37 @@ namespace StgSharp.Graphics internal unsafe struct GLFWlibrary { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = GLconst.GLFW_JOYSTICK_LAST + 1)] + private GLFWjoystick[] joysticks = new GLFWjoystick[GLconst.GLFW_JOYSTICK_LAST + 1]; + private GLFWallocator allocator; + + private GLFWbool initialized; + + private GLFWbool joysticksInitialized; private GLFWls contextSlot; + private GLFWls errorSlot; + private GLFWmutex errorLock; + + private GLFWplatform platform; + + private int mappingCount; + + private int monitorCount; + //GLFWcursor* cursorListHead; private IntPtr cursorListHead; //GLFWerror* errorListHead; private IntPtr errorListHead; - private GLFWmutex errorLock; - - private GLFWls errorSlot; - - private GLFWbool initialized; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = GLconst.GLFW_JOYSTICK_LAST + 1)] - private GLFWjoystick[] joysticks = new GLFWjoystick[GLconst.GLFW_JOYSTICK_LAST + 1]; - - private GLFWbool joysticksInitialized; - - private int mappingCount; //GLFWmapping* mappings; private IntPtr mappings; - private int monitorCount; - //GLFWmonitor** monitors; private IntPtr monitors; - private GLFWplatform platform; - //glfwWindow* windowListHead; private IntPtr windowListHead; @@ -548,8 +557,8 @@ namespace StgSharp.Graphics private GLFWfbconfig framebuffer; private GLFWinitconfig init; - private int refreshRate; private GLFWwndconfig window; + private int refreshRate; } @@ -566,23 +575,36 @@ namespace StgSharp.Graphics internal unsafe struct Egl { + internal void* display; + + internal void* handle; + internal bool ANGLE_platform_angle; internal bool ANGLE_platform_angle_d3d; internal bool ANGLE_platform_angle_metal; internal bool ANGLE_platform_angle_opengl; internal bool ANGLE_platform_angle_vulkan; + internal bool EXT_client_extensions; + internal bool EXT_platform_base; + internal bool EXT_platform_wayland; + internal bool EXT_platform_x11; + internal bool EXT_present_opaque; + internal bool KHR_colorSpace; + internal bool KHR_context_flush_control; + + internal bool KHR_create_context; + internal bool KHR_create_context_no_error; + internal bool KHR_get_all_proc_addresses; + internal bool prefix; + internal int major, minor; + + internal int platform; internal IntPtr BindAPI; internal IntPtr CreateContext; internal IntPtr CreatePlatformWindowSurfaceEXT; internal IntPtr CreateWindowSurface; internal IntPtr DestroyContext; internal IntPtr DestroySurface; - internal void* display; - internal bool EXT_client_extensions; - internal bool EXT_platform_base; - internal bool EXT_platform_wayland; - internal bool EXT_platform_x11; - internal bool EXT_present_opaque; internal IntPtr GetConfigAttrib; internal IntPtr GetConfigs; @@ -591,20 +613,8 @@ namespace StgSharp.Graphics internal IntPtr GetPlatformDisplayEXT; internal IntPtr GetProcAddress; - - internal void* handle; internal IntPtr Initialize; - internal bool KHR_colorSpace; - internal bool KHR_context_flush_control; - - internal bool KHR_create_context; - internal bool KHR_create_context_no_error; - internal bool KHR_get_all_proc_addresses; - internal int major, minor; internal IntPtr MakeCurrent; - - internal int platform; - internal bool prefix; internal IntPtr QueryString; internal IntPtr SwapBuffers; internal IntPtr SwapInterval; @@ -615,6 +625,8 @@ namespace StgSharp.Graphics internal unsafe struct Osmesa { + private void* handle; + private IntPtr CreateContextAttribs; private IntPtr CreateContextExt; @@ -622,8 +634,6 @@ namespace StgSharp.Graphics private IntPtr GetColorBuffer; private IntPtr GetDepthBuffer; private IntPtr GetProcAddress; - - private void* handle; private IntPtr MakeCurrent; } @@ -631,17 +641,18 @@ namespace StgSharp.Graphics internal unsafe struct vk { + private void* handle; + private GLFWbool available; private GLFWbool EXT_metal_surface; - private fixed ulong extensions[2]; - private IntPtr GetInstanceProcAddr; - private void* handle; private GLFWbool KHR_surface; private GLFWbool KHR_wayland_surface; private GLFWbool KHR_win32_surface; private GLFWbool KHR_xcb_surface; private GLFWbool KHR_xlib_surface; private GLFWbool MVK_macos_surface; + private IntPtr GetInstanceProcAddr; + private fixed ulong extensions[2]; public vk() { @@ -664,12 +675,13 @@ namespace StgSharp.Graphics public unsafe struct GLFWmapelement { - private sbyte axisOffset; - private sbyte axisScale; private byte index; private byte type; + private sbyte axisOffset; + private sbyte axisScale; + } [StructLayout(LayoutKind.Sequential)] @@ -694,20 +706,21 @@ namespace StgSharp.Graphics public unsafe struct GLFWjoystick { - private GLFWbool allocated; private float* axes; + private byte* buttons; + private byte* hats; + private void* userPointer; + private fixed byte guid[33]; + private fixed byte name[128]; + + private GLFWbool allocated; + private GLFWbool connected; private int axisCount; private int buttonCount; - private byte* buttons; - private GLFWbool connected; - private fixed byte guid[33]; private int hatCount; - private byte* hats; //GLFWmapping* mapping; private IntPtr mapping; - private fixed byte name[128]; - private void* userPointer; // This is defined in platform.h // not completed in transforming @@ -730,12 +743,12 @@ namespace StgSharp.Graphics public unsafe struct GLFWplatform { + private int platformID; + // init //GLFWbool(*init)(void); private IntPtr init; - private int platformID; - //void (* terminate) (void); private IntPtr terminate; internal IntPtr createCursor; @@ -953,7 +966,9 @@ namespace StgSharp.Graphics [StructLayout(LayoutKind.Sequential)] internal struct GLsync { + public IntPtr Handle; + } #endregion glad struct diff --git a/源代码/StgSharp/Graphics/Define/glApiDefine.cs b/源代码/StgSharp/Graphics/Define/glApiDefine.cs index 4ad2c9a4..c71f8202 100644 --- a/源代码/StgSharp/Graphics/Define/glApiDefine.cs +++ b/源代码/StgSharp/Graphics/Define/glApiDefine.cs @@ -28,14 +28,6 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -/* - * This file is created to link functions in OpenGL to version in C# - * The name of delegates and organization to init all these delegates - * are refferd from GLAD1 in agreement of MIT license generated from - * https://glad.dav1d.de/ - */ - - using StgSharp.Math; using System; @@ -44,6 +36,13 @@ using System.Runtime.InteropServices; namespace StgSharp.Graphics { + /// + /// Function handler to load an opengl function by searching its name. + /// + /// the name of the Opengl function + /// An Intptr value representing the pointer to the function + public delegate IntPtr glLoader(string name); + #region StgSharpDele public unsafe delegate void FrameBufferSizeHandler(IntPtr window, uint width, uint height); @@ -52,12 +51,6 @@ namespace StgSharp.Graphics #endregion - /// - /// Function handler to load an opengl function by searching its name. - /// - /// the name of the Opengl function - /// An Intptr value representing the pointer to the function - public delegate IntPtr glLoader(string name); #region glDEBUG diff --git a/源代码/StgSharp/Graphics/Define/glConst.cs b/源代码/StgSharp/Graphics/Define/glConst.cs index c9ac569f..0e3c6f3b 100644 --- a/源代码/StgSharp/Graphics/Define/glConst.cs +++ b/源代码/StgSharp/Graphics/Define/glConst.cs @@ -4849,13 +4849,18 @@ namespace StgSharp.Graphics.OpenGL public static class glAttachment { + + public const uint Depth = GLconst.DEPTH_ATTACHMENT; + public const uint DepthAndStencil = GLconst.DEPTH_STENCIL_ATTACHMENT; + public const uint Stencil = GLconst.STENCIL_ATTACHMENT; + private static int colorRange = - GlFunction.CurrentGL.GetMaskInteger((uint)GLconst.MAX_COLOR_ATTACHMENTS); + OpenGLFunction.CurrentGL.GetMaskInteger((uint)GLconst.MAX_COLOR_ATTACHMENTS); public static uint Color(int i) { #if DEBUG - if (i>colorRange||i<0) + if ((i > colorRange) || (i < 0)) { throw new ArgumentOutOfRangeException(); } @@ -4863,8 +4868,5 @@ namespace StgSharp.Graphics.OpenGL return (uint)(GLconst.COLOR_ATTACHMENT0 + i); } - public const uint Depth = GLconst.DEPTH_ATTACHMENT; - public const uint Stencil = GLconst.STENCIL_ATTACHMENT; - public const uint DepthAndStencil = GLconst.DEPTH_STENCIL_ATTACHMENT; } } diff --git a/源代码/StgSharp/Graphics/GL/Buffer/EBO.cs b/源代码/StgSharp/Graphics/GL/Buffer/EBO.cs deleted file mode 100644 index 0ba15f64..00000000 --- a/源代码/StgSharp/Graphics/GL/Buffer/EBO.cs +++ /dev/null @@ -1,84 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="EBO.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; - -namespace StgSharp.Graphics.GL -{ - /// - /// A collection of handle to Element Buffer Object in OpenglFunc. - /// Each value indexed from instance of this class this - /// is the only handle to one Element Buffer Object. - /// - public unsafe class ElementBuffer : BufferObjectBase - { - - internal ElementBuffer(int n, glRenderStream binding) - { - this.binding = binding; - _bufferHandle = glFunc.GenBuffers(n); - } - - public override sealed void Bind(int index) - { - glFunc.BindBuffer(BufferType.ElementArrayBuffer, _bufferHandle[index]); - } - - public void SetValue(int index, T[] bufferArray, BufferUsage usage) - where T : struct, IConvertible - { - glFunc.BindBuffer(BufferType.ElementArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferData(BufferType.ElementArrayBuffer, bufferArray, usage); - } - - public void SetValue(int index, ReadOnlySpan bufferSpan, BufferUsage usage) - where T : struct, IConvertible - { - glFunc.BindBuffer(BufferType.ElementArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferData(BufferType.ElementArrayBuffer, bufferSpan, usage); - } - - protected override sealed void Dispose(bool disposing) - { - if (disposing) - { - glFunc.DeleteBuffers(_bufferHandle); - _bufferHandle.Release(); - } - } - - } -} \ No newline at end of file diff --git a/源代码/StgSharp/Graphics/GL/Buffer/FBO.cs b/源代码/StgSharp/Graphics/GL/Buffer/FBO.cs deleted file mode 100644 index 3e5cd70f..00000000 --- a/源代码/StgSharp/Graphics/GL/Buffer/FBO.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Graphics.GL -{ -#pragma warning disable CA1008 -#pragma warning disable CA1028 - public enum FrameBufferTarget:uint -#pragma warning restore CA1028 -#pragma warning restore CA1008 - { - Read = GLconst.READ_FRAMEBUFFER, - All = GLconst.FRAMEBUFFER, - Draw = GLconst.DRAW_FRAMEBUFFER, - } - - public class FrameBuffer : BufferObjectBase - { - internal unsafe FrameBuffer(int count, glRenderStream contextBinding) - { - binding = contextBinding; - _bufferHandle = new glHandleSet(count); - ((GLcontext*)binding.ContextHandle)->glGenFramebuffers((uint)count,_bufferHandle.handle); - } - - /// - /// Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. - /// will be set as default target. - /// - /// Index of object to be binded in handle set - public unsafe override void Bind(int index) - { - glFunc.BindFrameBuffer(FrameBufferTarget.All,_bufferHandle[index]); - } - - public static void BindNull() - { - glFunc.BindFrameBuffer(FrameBufferTarget.All,glHandle.Zero); - } - - /// - /// Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. - /// Target of this frame buffer should be set manually. - /// - /// The frame buffer target of the binding operation. - /// Index of object to be binded in handle set - public unsafe void Bind(FrameBufferTarget target, int index) - { - ((GLcontext*)binding.ContextHandle)->glBindFramebuffer((uint)target, _bufferHandle[index].Value); - } - - protected override void Dispose(bool disposing) - { - throw new NotImplementedException(); - } - } -} diff --git a/源代码/StgSharp/Graphics/GL/Buffer/RBO.cs b/源代码/StgSharp/Graphics/GL/Buffer/RBO.cs deleted file mode 100644 index 07604119..00000000 --- a/源代码/StgSharp/Graphics/GL/Buffer/RBO.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Security.Principal; -using System.Text; - - -namespace StgSharp.Graphics.GL -{ - - - - public class RenderBuffer : BufferObjectBase - { - public RenderBuffer(int count, glRenderStream binding) - { - this.binding = binding; - _bufferHandle = glFunc.GenRenderBuffer(count); - } - - public override void Bind(int index) - { - glFunc.BindRenderBuffer(this[index]); - } - - protected override void Dispose(bool disposing) - { - throw new NotImplementedException(); - } - - public void Store(RenderBufferInternalFormat format, (int width,int height) size) - { - if (size.width > binding.Width || size.height>binding.Height) - { - StgSharp.LogWarning("FrameBuffer is larger than current canvas binding"); - } - } - } -} diff --git a/源代码/StgSharp/Graphics/GL/Buffer/TextureGL.cs b/源代码/StgSharp/Graphics/GL/Buffer/TextureGL.cs deleted file mode 100644 index 96a55074..00000000 --- a/源代码/StgSharp/Graphics/GL/Buffer/TextureGL.cs +++ /dev/null @@ -1,156 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="texture.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Graphics.GL -{ - public unsafe class TextureGL - { - - internal static bool[] unitActivated = new bool[16]; - private IntPtr binding; - internal glHandleSet _textureHandle; - internal Image[] sourceList; - - public glHandle this[int index] - { - get => _textureHandle[index]; - } - - internal TextureGL(int n, glRenderStream binding) - { - sourceList = new Image[n]; - this.binding = binding.ContextHandle; - _textureHandle = glFunc.GenTextures(n); - } - - public static void Activate(TextureUnit unit) - { - glFunc.ActiveTexture((uint)unit); - } - - public void Bind2D(int index) - { - glFunc.BindTexture(GLconst.TEXTURE_2D, _textureHandle[index]); - } - - /// - /// Load an to certain texture. - /// - /// - /// - public unsafe void LoadTexture(int index, Image i) - { - sourceList[index] = i; - glArrayHandle handle = sourceList[index].GetArrayHandle(); - glFunc.TextureImage2d( - Texture2DTarget.Texture2D, 0, (uint)i.Channel, - (uint)sourceList[index].Width, (uint)sourceList[index].Height, - (uint)i.Channel, ImageChannelLayout.Byte, - pixelArrayHandle: handle - ); - handle.Release(); - } - - - #region texture setting - - public void Set2dFilterProperty( - Filter onMinify, Filter onMagnify) - { - glFunc.TextureParameter(GLconst.TEXTURE_2D, GLconst.TEXTURE_MIN_FILTER, (int)onMinify); - glFunc.TextureParameter(GLconst.TEXTURE_2D, GLconst.TEXTURE_MAG_FILTER, (int)onMagnify); - } - - public void Set2dWrapProperty( - Wrap onHorizontial, Wrap onVertical) - { - glFunc.TextureParameter(GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_S, (int)onHorizontial); - glFunc.TextureParameter(GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_T, (int)onVertical); - } - - #endregion texture setting - - - } - -#pragma warning disable CA1008 - public enum Filter -#pragma warning restore CA1008 - { - Nearest = GLconst.NEAREST, - Linear = GLconst.LINEAR, - NearestLinearMipmap = GLconst.NEAREST_MIPMAP_LINEAR, - LinearLinearMipmap = GLconst.LINEAR_MIPMAP_LINEAR, - NearestNearestMipmap = GLconst.NEAREST_MIPMAP_NEAREST, - LinearNearestMipmap = GLconst.LINEAR_MIPMAP_NEAREST, - } - -#pragma warning disable CA1008 - public enum TextureUnit -#pragma warning restore CA1008 - { - Unit0 = GLconst.TEXTURE0, - Unit1 = GLconst.TEXTURE1, - Unit2 = GLconst.TEXTURE2, - Unit3 = GLconst.TEXTURE3, - Unit4 = GLconst.TEXTURE4, - Unit5 = GLconst.TEXTURE5, - Unit6 = GLconst.TEXTURE6, - Unit7 = GLconst.TEXTURE7, - Unit8 = GLconst.TEXTURE8, - Unit9 = GLconst.TEXTURE9, - Unit10 = GLconst.TEXTURE10, - Unit11 = GLconst.TEXTURE11, - Unit12 = GLconst.TEXTURE12, - Unit13 = GLconst.TEXTURE13, - Unit14 = GLconst.TEXTURE14, - Unit15 = GLconst.TEXTURE15, - } - -#pragma warning disable CA1008 - public enum Wrap -#pragma warning restore CA1008 - { - Repeat = GLconst.REPEAT, - MirroredRepeat = GLconst.MIRRORED_REPEAT, - ClampToEdge = GLconst.CLAMP_TO_EDGE, - ClampToBorder = GLconst.CLAMP_TO_BORDER, - } -} \ No newline at end of file diff --git a/源代码/StgSharp/Graphics/GL/GLhandle.cs b/源代码/StgSharp/Graphics/GL/GLhandle.cs deleted file mode 100644 index 449ac9f7..00000000 --- a/源代码/StgSharp/Graphics/GL/GLhandle.cs +++ /dev/null @@ -1,362 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="GLhandle.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Data.Common; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Versioning; -using System.Security.AccessControl; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Graphics -{ - /// - /// A handle to an OpenGL object, - /// must be indexed from a . - /// Direct call will cause - /// - public unsafe class glHandle: IDisposable - { - private static uint* zeroHandle = (uint*)Marshal.AllocHGlobal(Marshal.SizeOf()); - - internal uint* source; - internal uint* valuePtr; - - private glHandle(IntPtr handle) - { - this.valuePtr = (uint*)handle; - source = (uint*)0; - } - - private glHandle(uint value) - { - source = (uint*)0; - valuePtr = (uint*)Marshal.AllocHGlobal(sizeof(uint)); - *valuePtr = value; - } - - internal glHandle(uint* val, glHandleSet set) - { - source = set!=null ? set!.handle:(uint*)0; - valuePtr = val; - } - - [Obsolete("Cannot init instance of this type", true)] - public glHandle() - { - } - - public IntPtr Handle - { - get=> (IntPtr)valuePtr; - } - - public bool IsIsolated - { - get => source == (uint*)0; - } - - public uint Value - { - get => *valuePtr; - set => *valuePtr = value; - } - - public static glHandle ZeroHandle => FromPtr(IntPtr.Zero); - - public static glHandle Zero => Alloc(0); - - public static glHandle Alloc(uint value) - { - return new glHandle(value); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static glHandle FromPtr(IntPtr p) - { - return new glHandle(p); - } - - ~glHandle() - { - if (valuePtr != zeroHandle && IsIsolated) - { - Marshal.FreeHGlobal((IntPtr)valuePtr); - } - } - - protected virtual void Dispose(bool disposing) - { - if (IsIsolated) - { - GCHandle.FromIntPtr((IntPtr)valuePtr).Free(); - if (disposing) - { - } - - } - } - - // - // ~glHandle() - // { - // Dispose(disposing: false); - // } - - public void Dispose() - { - Dispose(disposing: true); - GC.SuppressFinalize(this); - } - } - - public unsafe class glSHandle - { - private static int* zeroHandle = (int*)Marshal.AllocHGlobal(Marshal.SizeOf()); - - internal int* source; - internal int* valuePtr; - - private glSHandle(IntPtr handle) - { - this.valuePtr = (int*)handle; - source = (int*)0; - } - - private glSHandle(int value) - { - source = (int*)0; - valuePtr = (int*)Marshal.AllocHGlobal(sizeof(int)); - *valuePtr = value; - } - - internal glSHandle(int* val, glHandleSet set) - { - source = set != null ? (int*)set!.handle : (int*)0; - valuePtr = val; - } - - - [Obsolete("Cannot init instance of this type", true)] - public glSHandle() - { - } - - public IntPtr Handle - { - get => (IntPtr)valuePtr; - } - - public bool IsIsolated - { - get => source == (uint*)0; - } - - public int Value - { - get => *valuePtr; - set => *valuePtr = value; - } - - public static glSHandle Zero => Alloc(0); - - public static glSHandle Alloc(int value) - { - return new glSHandle(value); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static glSHandle FromPtr(IntPtr p) - { - return new glSHandle(p); - } - - ~glSHandle() - { - if (valuePtr != zeroHandle && IsIsolated) - { - Marshal.FreeHGlobal((IntPtr)valuePtr); - } - } - - } - - public unsafe class glArrayHandle - { - internal readonly Array a; - internal GCHandle handle; - private bool disposedValue; - - internal glArrayHandle(Array array) - { - this.a = array; - handle = GCHandle.Alloc(array, GCHandleType.Pinned); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public IntPtr AddressOfArray() - { - if (handle != default) - { - return handle.AddrOfPinnedObject(); - } - else - { - throw new InvalidOperationException(); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static glArrayHandle Alloc(T[] array) where T : struct - { - return new glArrayHandle(array); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static glArrayHandle CopyAlloc(T[] array) where T : struct - { - Array copy = new T[array.Length]; - array.CopyTo(copy, 0); - return new glArrayHandle(copy); - } - - public void Release() - { - handle.Free(); - handle = default; - } - } - - /// - /// A handle to an OpenGL object. - /// - public unsafe class glHandleSet - { - - private readonly uint[] _value; - internal uint* handle; - internal int length; - - public glHandleSet(int count) - { - _value = new uint[count]; - length = count; - handle = (uint*)GCHandle.Alloc(_value, GCHandleType.Pinned).AddrOfPinnedObject(); - } - - public IntPtr Handle - { - get => (IntPtr)handle; - } - - public glHandle this[int index] - { - get - { - if (index > length) - { - throw new IndexOutOfRangeException(); - } - return new glHandle(handle + index, this); - } - } - - public glSHandle this[uint index] - { - get - { - if (index > length) - { - throw new IndexOutOfRangeException(); - } - return new glSHandle(((int*)handle) + index, this); - } - } - - public static void Copy(in glHandleSet source, glHandleSet target) - { - if ((source == null) || (target == null)) - { - throw new NullReferenceException(); - } - if (source.length != target.length) - { - throw new Exception($"Lengths of {nameof(source)} and {nameof(target)} are not equal."); - } - for (int i = 0; i < source.length; i++) - { - target._value[i] = source._value[i]; - } - } - - public void Pin() - { - if (_value == null) - { - return; - } - handle = (uint*)GCHandle.Alloc(_value, GCHandleType.Pinned).AddrOfPinnedObject(); - } - - /// - /// Release all resource in this handle. - /// This will release all resource in this . - /// This will be not usable. - /// - public void Release() - { - if (_value == null) - { - return; - } - else - { - GCHandle.FromIntPtr((IntPtr)handle).Free(); - handle = (uint*)IntPtr.Zero; - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void SetValue(int index, uint value) - { - _value[index] = value; - } - - ~glHandleSet() - { - - } - } -} \ No newline at end of file diff --git a/源代码/StgSharp/Graphics/GL/GLpack.cs b/源代码/StgSharp/Graphics/GL/GLpack.cs deleted file mode 100644 index a5d55298..00000000 --- a/源代码/StgSharp/Graphics/GL/GLpack.cs +++ /dev/null @@ -1,621 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="GLpack.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Graphics; -using StgSharp.Logic; -using StgSharp.Math; - -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; - -namespace StgSharp -{ - internal static unsafe partial class InternalIO - { - - [DllImport(SSC_libName, EntryPoint = "glCheckShaderStat", - CallingConvention = CallingConvention.Cdecl)] -#pragma warning disable CA5392 - internal static extern int glCheckShaderStatus(ref GLcontext context, uint shaderHandle, int key, ref IntPtr logPtr); -#pragma warning restore CA5392 - - - } -} -namespace StgSharp.Graphics.GL -{ - internal static unsafe partial class glFunc - { - private static GLcontext* context; - - public static IntPtr CurrentContextHandle - { - get { return (IntPtr)context; } - set { context = (GLcontext*)value; } - } - - private static ref GLcontext Context - { - get - { -#if DEBUG - if ((IntPtr)context==IntPtr.Zero) - { - throw new NullReferenceException(); - } -#endif - return ref (*context); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void ActiveTexture(uint type) - { - Context.glActiveTexture(type); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void AttachShader(glHandle program, glHandle shader) - { - Context.glAttachShader(program.Value, shader.Value); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void BindBuffer(BufferType bufferType, glHandle handle) - { - Context.glBindBuffer((uint)bufferType, handle.Value); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void GetTextureImage(Texture2DTarget target, int level, ImageChannel channel, ImageChannelLayout channelLayout, ref T[] dataStream)where T: struct, -#if NET8_0_OR_GREATER - INumber -#else - IConvertible -#endif - - { -#pragma warning disable CS8500 - fixed (T* tptr = dataStream) - { - Context.glGetTexImage((uint)target, level, (uint)channel, (uint)channelLayout, tptr); - } -#pragma warning restore CS8500 - } - - /// - /// Bind a frame buffer to a frame buffer target - /// Same function as glBindFramebuffer. - /// - /// The frame buffer target of the binding operation. - /// The handle of the frame buffer object to bind. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void BindFrameBuffer(FrameBufferTarget target, glHandle handle) - { - Context.glBindFramebuffer((uint)target, handle.Value); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void BindRenderBuffer(glHandle handle) - { - Context.glBindRenderbuffer(GLconst.RENDERBUFFER, handle.Value); - } - - - public static void WaitAccomplishment() - { - Context.glFinish(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void BindTexture(uint type, glHandle texture) - { - Context.glBindTexture(type, texture.Value); - } - - public static unsafe int GetMaskInteger(uint statusCode) - { - int ret = 0; - Context.glGetIntegerv(statusCode,&ret); - return ret; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void BindVertexArray(glHandle handle) - { - Context.glBindVertexArray(handle.Value); - } - - public static void RereadImage( - this Image i, (int X, int Y) beginPosition, FrameBufferChannel format, ImageChannelLayout dataType) - { - glArrayHandle handle = i.GetArrayHandle(); - Context.glReadPixels( - beginPosition.X, beginPosition.Y, i.Width, i.Height, (uint)format, (uint)dataType, (byte*)handle.AddressOfArray() - ); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void FrameBufferTexture2d(FrameBufferTarget target, uint attachment, Texture2DTarget texTarget,glHandle textureHandle ,int level) - { - Context.glFramebufferTexture2D( - (uint)target, attachment, (uint)texTarget,textureHandle.Value, level - ); - } - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void ReadPixels( - (int X, int Y) beginPosition, (int width, int height) size, FrameBufferChannel format, ImageChannelLayout dataType, ref byte[] stream - ) - { - fixed (byte* bptr = stream) - { - Context.glReadPixels( - beginPosition.X, beginPosition.Y, - size.width, size.height, (uint)format, (uint)dataType, bptr); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void Clear(MaskBufferBit mask) - { - Context.glClear((uint)mask); - } - - public static void CombineFrameBufferRenderBuffer(glHandle fboHandle, glHandle rboHandle) - { - Context.glFramebufferRenderbuffer(GLconst.FRAMEBUFFER,fboHandle.Value,GLconst.RENDERBUFFER, rboHandle.Value); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void ClearColor(float R, float G, float B, float A) - { - Context.glClearColor(R, G, B, A); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void ClearGraphicError() - { - while (Context.glGetError() != 0) { } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void CompileShader(glHandle shaderhandle) - { - Context.glCompileShader(shaderhandle.Value); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe glHandle CreateGraphicProgram() - { - return glHandle.Alloc(Context.glCreateProgram()); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static glHandle CreateProgram() - { - return glHandle.Alloc(Context.glCreateProgram()); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe glHandleSet CreateProgram(int count) - { - glHandleSet h = new glHandleSet(count); - for (int i = 0; i < count; i++) - { - h.SetValue(i, Context.glCreateProgram()); - } - return h; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static glHandleSet CreateShaderSet(int count, ShaderType type) - { - glHandleSet ret = new glHandleSet(count); - uint t = (uint)type; - for (int i = 0; i < count; i++) - { - uint id = Context.glCreateShader(t); - if (id == 0) - { - uint error = Context.glGetError(); - InternalIO.InternalWriteLog($"Failed in creating shader: {error}", LogType.Error); - throw new Exception(); - } - ret.SetValue(i, id); - } - return ret; - } - - - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void DeleteBuffer(glHandle handle) - { - Context.glDeleteBuffers(1, (uint*)handle.Handle); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void DeleteBuffers(glHandleSet handle) - { - Context.glDeleteBuffers(handle.length, (uint*)handle.Handle); - handle.Release(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void DeleteVertexArrays(glHandleSet arrays) - { - Context.glDeleteVertexArrays(arrays.length, (uint*)arrays.Handle); - arrays.Release(); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void DrawElements(GeometryType mode, uint count, TypeCode type, IntPtr ptr) - { - uint a; - switch (type) - { - case TypeCode.UInt32: - a = GLconst.UNSIGNED_INT; - break; - - case TypeCode.UInt16: - a = GLconst.UNSIGNED_SHORT; - break; - - case TypeCode.Byte: - a = GLconst.UNSIGNED_BYTE; - break; - - default: - InternalIO.InternalWriteLog( - $"{$"Parameter error in parameter {nameof(type)} method DrawElements. "}{$"Only {typeof(uint).Name},{typeof(ushort).Name},{typeof(byte).Name} types are supported."}", - LogType.Error); - return; - } - Context.glDrawElements((uint)mode, count, a, (void*)ptr); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void DrawElementsInstanced( - GeometryType mode, uint count, TypeCode type, IntPtr ptr, uint amount - ) - { - uint a; - switch (type) - { - case TypeCode.UInt32: - a = GLconst.UNSIGNED_INT; - break; - - case TypeCode.UInt16: - a = GLconst.UNSIGNED_SHORT; - break; - - case TypeCode.Byte: - a = GLconst.UNSIGNED_BYTE; - break; - - default: - InternalIO.InternalWriteLog( - $"{$"Parameter error in parameter {nameof(type)} method DrawElements. "}{$"Only {typeof(uint).Name},{typeof(ushort).Name},{typeof(byte).Name} types are supported."}", - LogType.Error); - return; - } - Context.glDrawElementsInstanced((uint)mode, count, a, (void*)ptr, amount); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void Enable(GLOperation operation) - { - Context.glEnable((uint)operation); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe glHandleSet GenBuffers(int count) - { - glHandleSet h = new glHandleSet(count); - Context.glGenBuffers(count, (uint*)h.Handle); - return h; - } - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe glHandleSet GenRenderBuffer(int count) - { - glHandleSet h = new glHandleSet(count); - Context.glGenRenderbuffers(count, (uint*)h.Handle); - return h; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe glHandleSet GenTextures(int count) - { - glHandleSet h = new glHandleSet(count); - Context.glGenTextures(count, (uint*)h.Handle); - return h; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetRenderBufferStorage(RenderBufferInternalFormat internalFormat ,(int width, int height) size) - { - Context.glRenderbufferStorage( - GLconst.RENDERBUFFER, (uint)internalFormat,size.width,size.height - ); - } - - - public static unsafe glHandleSet GenVertexArrays(int count) - { - glHandleSet h = new glHandleSet(count); - Context.glGenVertexArrays(count, (uint*)h.Handle); - return h; - } - - public static string GetShaderStatus(Shader s, int index, int key) - { - IntPtr sptr = IntPtr.Zero; - if (InternalIO.glCheckShaderStatus(ref Context, s.handle[index].Value, key, ref sptr) == 0) - { - return Marshal.PtrToStringAnsi(sptr); - } - return string.Empty; - } - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe glSHandle GetUniformLocation(glHandle program, string name) - { - byte[] code = Encoding.UTF8.GetBytes(name); - fixed (byte* ptr = code) - { - int ret = Context.glGetUniformLocation(program.Value, ptr); -#if DEBUG - if (ret == (int)(GLconst.INVALID_OPERATION) || - ret == (int)(GLconst.INVALID_VALUE)) - { - throw new InvalidOperationException(); - } - if (ret == -1 ) - { - throw new UniformEmptyReferenceException(nameof(program), name); - } -#endif - return glSHandle.Alloc(ret); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void LoadShaderSource(glHandle shaderHandle, byte[] codeStream) - { - fixed (byte* streamPtr = codeStream) - { - Context.glShaderSource(shaderHandle.Value, 1, &streamPtr, (void*)0); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetBufferData(BufferType bufferType, T bufferData, BufferUsage usage) - where T : struct - { - int size = Marshal.SizeOf(); -#pragma warning disable CS8500 - T* p = &bufferData; -#pragma warning restore CS8500 - Context.glBufferData( - (uint)bufferType, - (IntPtr)size, - (IntPtr)p, - (uint)usage); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetBufferData(BufferType bufferType, T[] bufferArray, BufferUsage usage) - where T : struct, -#if NET8_0_OR_GREATER - INumber -#else - IConvertible -#endif - { - int size = bufferArray.Length * Marshal.SizeOf(typeof(T)); - if (bufferArray == null) - { - return; - } -#pragma warning disable CS8500 - fixed (void* bufferPtr = bufferArray) -#pragma warning restore CS8500 - { - Context.glBufferData( - (uint)bufferType, - (IntPtr)size, - (IntPtr)bufferPtr, - (uint)usage); - } - } - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetBufferData(BufferType bufferType, ReadOnlySpan bufferArray, BufferUsage usage) - where T : struct, -#if NET8_0_OR_GREATER - INumber -#else - IConvertible -#endif - { - int size = bufferArray.Length * Marshal.SizeOf(typeof(T)); - if (bufferArray == null) - { - return; - } -#pragma warning disable CS8500 - fixed (void* bufferPtr = bufferArray) -#pragma warning restore CS8500 - { - Context.glBufferData( - (uint)bufferType, - (IntPtr)size, - (IntPtr)bufferPtr, - (uint)usage); - } - } - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetBufferData(BufferType bufferType, Span bufferArray, BufferUsage usage) - where T : struct, -#if NET8_0_OR_GREATER - INumber -#else - IConvertible -#endif - { - int size = bufferArray.Length * Marshal.SizeOf(typeof(T)); - if (bufferArray == null) - { - return; - } - -#pragma warning disable CS8500 - fixed (void* bufferPtr = &bufferArray.GetPinnableReference()) -#pragma warning restore CS8500 - { - Context.glBufferData( - (uint)bufferType, - (IntPtr)size, - (IntPtr)bufferPtr, - (uint)usage); - } - } - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetBufferVectorData(BufferType bufferType, ReadOnlySpan bufferArray, BufferUsage usage) - where T : struct, IVector - { - int size = bufferArray.Length * Marshal.SizeOf(typeof(T)); - if (bufferArray == null) - { - return; - } -#pragma warning disable CS8500 - fixed (void* bufferPtr = &bufferArray.GetPinnableReference()) -#pragma warning restore CS8500 - { - Context.glBufferData( - (uint)bufferType, - (IntPtr)size, - (IntPtr)bufferPtr, - (uint)usage); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetBufferVectorData(BufferType bufferType, T[] bufferArray, BufferUsage usage) - where T : struct, IVector - { - int size = bufferArray.Length * Marshal.SizeOf(typeof(T)); - if (bufferArray == null) - { - return; - } -#pragma warning disable CS8500 - fixed (void* bufferPtr = bufferArray) -#pragma warning restore CS8500 - { - Context.glBufferData( - (uint)bufferType, - (IntPtr)size, - (IntPtr)bufferPtr, - (uint)usage); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void SetVertexAttribute(uint index, int size, TypeCode t, bool normalized, uint stride, int pointer) - { - uint type = InternalIO.GLtype[t]; - Context.glVertexAttribPointer(index, size, type, normalized ? 1 : 0, stride, (void*)pointer); - Context.glEnableVertexAttribArray(index); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void TextureImage2d(Texture2DTarget target, int level, uint internalformat, uint width, uint height, - uint format, ImageChannelLayout type, glHandle pixels) - { - Context.glTexImage2D( - (uint)target, level, internalformat, width, height, 0, format, (uint)type, pixels.valuePtr - ); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void TextureImage2d(Texture2DTarget target, int level, uint internalformat, uint width, uint height, - uint format, ImageChannelLayout type, glArrayHandle pixelArrayHandle) - { - Context.glTexImage2D( - (uint)target, level, internalformat, width, height, 0, format, (uint)type, (void*)pixelArrayHandle.handle.AddrOfPinnedObject() - ); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void TextureParameter(int target, uint pname, int param) - { - Context.glTexParameteri((uint)target, pname, param); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void UseProgram(glHandle program) - { - Context.glUseProgram(program.Value); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void VertexAttributeDivisor(uint layoutIndex, uint divisor) - { - Context.glVertexAttribDivisor(layoutIndex, divisor); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void Viewport(int x, int y, uint width, uint height) - { - Context.glViewport(x, y, width, height); - } - - } -} - diff --git a/源代码/StgSharp/Graphics/GL/ShaderEdit/IglConvertable.cs b/源代码/StgSharp/Graphics/GL/ShaderEdit/IglConvertable.cs deleted file mode 100644 index 55c678dc..00000000 --- a/源代码/StgSharp/Graphics/GL/ShaderEdit/IglConvertable.cs +++ /dev/null @@ -1,35 +0,0 @@ -using StgSharp.Graphics.GL; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Graphics.ShaderEdit -{ - public interface IglConvertable - { - /// - /// - /// - public void SetAllUniforms(); - - /// - /// - /// - public void GainAllUniforms(ShaderProgram source, params string[] uniformName); - - /// - /// - /// - public void DisplayGLtypeDefinition(); - - /// - /// - /// - /// - public ShaderStruct GetConvertedGLtype(); - - } -} diff --git a/源代码/StgSharp/Graphics/GL/ShaderEdit/Uniform.cs b/源代码/StgSharp/Graphics/GL/ShaderEdit/Uniform.cs deleted file mode 100644 index b2a2f71d..00000000 --- a/源代码/StgSharp/Graphics/GL/ShaderEdit/Uniform.cs +++ /dev/null @@ -1,257 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="Uniform.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Graphics; -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; - -namespace StgSharp.Graphics.GL -{ - public class Uniform - { - protected IntPtr binding; - internal glSHandle id; - - - public glSHandle Handle - { - get => id; - } - } - - public sealed class Uniform : Uniform - where T : struct - { - - internal unsafe Uniform(glSHandle id) - { - this.id = id; - } - - internal unsafe Uniform( - ShaderProgram program, string name, glRenderStream binding) - { - this.binding = binding.ContextHandle; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal unsafe Uniform( - ShaderProgram program, string name, IntPtr binding) - { - this.binding = binding; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal Uniform() - { - - } - - internal static Uniform FromHandle(glSHandle handle) - { - return new Uniform() { id = handle }; - } - - } - - public sealed class Uniform: Uniform - where T : struct - where U : struct - { - - internal unsafe Uniform(glSHandle id) - { - this.id = id; - } - - internal unsafe Uniform( - ShaderProgram program, string name, glRenderStream binding) - { - this.binding = binding.ContextHandle; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal unsafe Uniform( - ShaderProgram program, string name, IntPtr binding) - { - this.binding = binding; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal Uniform() - { - - } - - internal static Uniform FromHandle(glSHandle handle) - { - return new Uniform() { id = handle }; - } - - } - - public sealed class Uniform:Uniform - where T : struct - where U : struct - where V : struct - { - - internal unsafe Uniform(glSHandle id) - { - this.id = id; - } - - internal unsafe Uniform( - ShaderProgram program, string name) - { - this.binding = glFunc.CurrentContextHandle; - id = glFunc.GetUniformLocation(program.handle, name); - } - - public unsafe Uniform(ShaderProgram program, string name, glRenderStream binding) - { - this.binding = binding.ContextHandle; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal Uniform() - { - - } - - internal static Uniform FromHandle(glSHandle handle) - { - return new Uniform() { id = handle }; - } - - } - - public sealed class Uniform:Uniform - where T : struct - where U : struct - where V : struct - where W : struct - { - - - internal unsafe Uniform(glSHandle id) - { - this.id = id; - } - - internal unsafe Uniform(ShaderProgram program, string name, glRenderStream binding) - { - this.binding = binding.ContextHandle; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal unsafe Uniform( - ShaderProgram program, string name) - { - this.binding = glFunc.CurrentContextHandle; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal Uniform() - { - - } - - internal static Uniform FromHandle(glSHandle handle) - { - return new Uniform() { id = handle }; - } - - } - - internal partial class glFunc - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe static void SetUniformValue - (Uniform uniform, Matrix44 mat) - { - Matrix44 temp = mat; - Context.glUniformMatrix4fv(uniform.id.Value, 1, false, (float*)&temp); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe static void SetUniformValue(Uniform uniform, vec4d vec) - { - vec4d temp = vec; - Context.glUniform1fv(uniform.id.Value , 4, &temp); - } - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe static void SetUniformValue(Uniform uniform, vec4d vec) - { - vec4d temp = vec; - Context.glUniform1fv(uniform.id.Value , 4, &temp); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetUniformValue(Uniform uniform, float v0) - { - Context.glUniform1f(uniform.id.Value , v0); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetUniformValue(Uniform uniform, int i0) - { - Context.glUniform1i(uniform.id.Value , i0); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetUniformValue(Uniform uniform, float v0, float v1) - { - Context.glUniform2f(uniform.id.Value , v0, v1); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetUniformValue(Uniform uniform, float v0, float v1, float v2) - { - Context.glUniform3f(uniform.id.Value , v0, v1, v2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetUniformValue(Uniform uniform, float v0, float v1, float v2, float v3) - { - Context.glUniform4f(uniform.id.Value , v0, v1, v2, v3); - } - - } - -} \ No newline at end of file diff --git a/源代码/StgSharp/Graphics/IGraphicAPIs.cs b/源代码/StgSharp/Graphics/IGraphicAPIs.cs index cc400200..b97068a4 100644 --- a/源代码/StgSharp/Graphics/IGraphicAPIs.cs +++ b/源代码/StgSharp/Graphics/IGraphicAPIs.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="IGraphicAPIs.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Text; @@ -6,7 +36,9 @@ namespace StgSharp.Graphics { public interface IGraphicAPIs { + public IntPtr GraphicApiPackageHandle { get; } + } } diff --git a/源代码/StgSharp/Graphics/Image.cs b/源代码/StgSharp/Graphics/Image.cs index 52e8b1b6..dc8ffd7e 100644 --- a/源代码/StgSharp/Graphics/Image.cs +++ b/源代码/StgSharp/Graphics/Image.cs @@ -46,15 +46,9 @@ namespace StgSharp.Graphics { public class Image : ISSDSerializable, IImageProvider { - - internal byte[] data; - internal ImageInfo info; - - public PixelChannelLayout PixelLayout - { - get => info.pixelLayout; - private set => info.pixelLayout = value; - } + private byte[] _data; + private ImageInfo info; + private int _pixelUpdateCount = 0; internal unsafe Image() { @@ -64,15 +58,42 @@ namespace StgSharp.Graphics internal Image(ImageInfo information) { info = information; - data = Array.Empty(); + _data = Array.Empty(); //int length = info.width * info.height * info.channel; } + internal ref byte[] Data + { + get => ref _data; + } + public (int width, int height) Size { get => (info.Width, info.Height); } + /// + /// Hash code of time pixels updated last time. + /// + public int PixelUpdateCount + { + get => _pixelUpdateCount; + internal set => _pixelUpdateCount = value; + } + + public byte[] PixelBuffer + { + get + { + if ((_data.Length == 0) || (_data == null)) + { + GetBytes(); + return _data!; + } + return _data; + } + } + public ImageChannel Channel => info.Channel; public int ChannelCount => info.ChannelCount; public int Height @@ -89,6 +110,12 @@ namespace StgSharp.Graphics public int PixelSize => GlHelper.GetPixelSize(info.pixelLayout, info.Channel); + public PixelChannelLayout PixelLayout + { + get => info.pixelLayout; + private set => info.pixelLayout = value; + } + public SerializableTypeCode SSDTypeCode => SerializableTypeCode.PixelImage; public void FromBytes(byte[] stream) @@ -106,21 +133,6 @@ namespace StgSharp.Graphics return ret; } - public static Image FromMemory((int width, int height) size, ImageChannel channel, PixelChannelLayout layout, byte[] stream) - { - ImageInfo _info = new ImageInfo - { - Height = size.height, - Width = size.width, - Channel = channel, - StreamPtr = IntPtr.Zero - }; - Image ret = new Image(_info); - ret.PixelLayout = layout; - ret.data = stream; - return ret; - } - public static Image FromMemory((int width, int height) size, ImageChannel channel, byte[] stream) { ImageInfo _info = new ImageInfo @@ -132,35 +144,38 @@ namespace StgSharp.Graphics }; Image ret = new Image(_info); ret.PixelLayout = PixelChannelLayout.Byte; - ret.data = stream; + ret._data = stream; + return ret; + } + + public static Image FromMemory((int width, int height) size, ImageChannel channel, PixelChannelLayout layout, byte[] stream) + { + ImageInfo _info = new ImageInfo + { + Height = size.height, + Width = size.width, + Channel = channel, + StreamPtr = IntPtr.Zero + }; + Image ret = new Image(_info); + ret.PixelLayout = layout; + ret._data = stream; return ret; } public unsafe byte[] GetBytes() { - if (data.Length == 0) + if (_data.Length == 0) + { + int size = Width * Height * GlHelper.GetPixelSize(PixelLayout, Channel); + _data = new Span((byte*)info.StreamPtr, size).ToArray(); + fixed (ImageInfo* pptr = &info) { - int size = Width * Height * GlHelper.GetPixelSize(PixelLayout, Channel); - data = new Span((byte*)info.StreamPtr, size).ToArray(); - fixed (ImageInfo* pptr = &info) - { - InternalIO.InternalUnloadImage(pptr); - } - info.StreamPtr = IntPtr.Zero; + InternalIO.InternalUnloadImage(pptr); } - return data; - } - - public byte[] PixelBuffer - { - get{ - if ((data.Length == 0) || (data == null)) - { - GetBytes(); - return data!; - } - return data; + info.StreamPtr = IntPtr.Zero; } + return _data; } public Image ProvideImage() => this; @@ -168,6 +183,7 @@ namespace StgSharp.Graphics { throw new NotImplementedException(); } + } [StructLayout(LayoutKind.Sequential)] @@ -183,10 +199,7 @@ namespace StgSharp.Graphics public ImageChannel Channel { get => channel; - set - { - channel = value; - } + set { channel = value; } } public int ChannelCount @@ -222,6 +235,14 @@ namespace StgSharp.Graphics return $"{channel}\t{width}\t{height}\t{(ulong)StreamPtr}"; } + public override int GetHashCode() + { + int hash = 17; + hash = hash * 17 + width; + hash = hash * 17 + height; + hash = hash * 17 + (int)channel; + return hash; + } } public enum ImageChannel : uint @@ -276,5 +297,6 @@ namespace StgSharp.Graphics.OpenGL _ => throw new ArgumentException("Unknown layout type"), }; } + } } \ No newline at end of file diff --git a/源代码/StgSharp/Graphics/OpenGL/Buffer/AutoTexture.cs b/源代码/StgSharp/Graphics/OpenGL/Buffer/AutoTexture.cs new file mode 100644 index 00000000..b6656f90 --- /dev/null +++ b/源代码/StgSharp/Graphics/OpenGL/Buffer/AutoTexture.cs @@ -0,0 +1,161 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="AutoTexture.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +using StgSharp.Collections; + +namespace StgSharp.Graphics.OpenGL +{ + public sealed class AutoTextureGL + { + private BidirectionalDictionary imageIndexMap = new BidirectionalDictionary(); + private Dictionary imageUpdateIndex = new Dictionary(); + + private int _size, _currentIndex; + private LinkedList usedTextureIndex; + private Queue unusedTextureUnitIndex; + private TextureProperty[] propertyCache; + private TextureGL texturePackage; + + private TextureProperty _textureProperty; + + private OpenGLFunction GL + { + get => texturePackage.GL; + } + + private AutoTextureGL(TextureGL texture) + { + texturePackage = texture; + _size = texture.Count; + imageIndexMap = new BidirectionalDictionary(); + unusedTextureUnitIndex = new Queue( + Enumerable.Range(0, _size)); + usedTextureIndex = new LinkedList(); + propertyCache = new TextureProperty[_size]; + } + + public AutoTextureGL(int textureObjectSize, [NotNull]glRenderStream binding) + { + this._size = textureObjectSize; + imageIndexMap = new BidirectionalDictionary(); + texturePackage = new TextureGL(textureObjectSize, binding); + unusedTextureUnitIndex = new Queue( + Enumerable.Range(0, _size)); + usedTextureIndex = new LinkedList(); + propertyCache = new TextureProperty[_size]; + } + + public TextureProperty DefaultTextureProperty + { + get => _textureProperty; + set => _textureProperty = value; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SelectTextureAndBind(Image i) + { + TextureProperty property = _textureProperty; + + SelectTextureAndBind(i, property); + } + + public void SelectTextureAndBind([NotNull]Image i, TextureProperty property) + { + //usable texture with image match + if (imageIndexMap.TryGetValue(i, out int index)) + { + //prop setting match + if (propertyCache[index] == property) + { + _currentIndex = index; //GL.Assert(true); + texturePackage.Bind2D(index); //GL.Assert(true); + if (i.PixelUpdateCount != imageUpdateIndex[i]) + { + texturePackage.LoadTexture(index, i); //GL.Assert(true); + } + } + else + { + _currentIndex = index; //GL.Assert(true); + texturePackage.Bind2D(index); //GL.Assert(true); + texturePackage.Set2dProperty(index, property); //GL.Assert(true); + if (i.PixelUpdateCount != imageUpdateIndex[i]) + { + texturePackage.LoadTexture(index, i); //GL.Assert(true); + } + } + } + else + { + if (unusedTextureUnitIndex.TryDequeue(out int newIndex)) + { + //has extra unused texture object + imageIndexMap.Add(i, index); + texturePackage.Bind2D(index); + texturePackage.Set2dProperty(index, property); + texturePackage.LoadTexture(index, i); + usedTextureIndex.AddLast(newIndex); + propertyCache[newIndex] = property; + imageUpdateIndex[i] = i.PixelUpdateCount; + } + else + { + //recycle from current + int reusedIndex = usedTextureIndex.First!.Value; + usedTextureIndex.RemoveFirst(); + usedTextureIndex.AddLast(reusedIndex); + imageIndexMap[i] = reusedIndex; + propertyCache[newIndex] = property; + imageUpdateIndex[i] = i.PixelUpdateCount; + } + } + } + + public static AutoTextureGL ToAuto([NotNull]TextureGL texture) + { + if (texture.IndexOfCurrentTexture != -1) + { + throw new InvalidOperationException("Texture to be converted has been editted."); + } + return new AutoTextureGL(texture); + } + + } + +} diff --git a/源代码/StgSharp/Graphics/OpenGL/Buffer/EBO.cs b/源代码/StgSharp/Graphics/OpenGL/Buffer/EBO.cs index 56d3a361..db6c2af4 100644 --- a/源代码/StgSharp/Graphics/OpenGL/Buffer/EBO.cs +++ b/源代码/StgSharp/Graphics/OpenGL/Buffer/EBO.cs @@ -45,10 +45,10 @@ namespace StgSharp.Graphics.OpenGL /// Each value indexed from instance of this class this /// is the only handle to one Element Buffer Object. /// - public unsafe class ElementBuffer : GlBufferObjectBase + public sealed unsafe class ElementBuffer : GlBufferObjectBase { - internal ElementBuffer(int n, glRenderStream binding):base(binding) + internal ElementBuffer(int n, glRenderStream binding) : base(binding) { _bufferHandle = GL.GenBuffers(n); } diff --git a/源代码/StgSharp/Graphics/OpenGL/Buffer/FBO.cs b/源代码/StgSharp/Graphics/OpenGL/Buffer/FBO.cs index 03f59d0a..e0256dcb 100644 --- a/源代码/StgSharp/Graphics/OpenGL/Buffer/FBO.cs +++ b/源代码/StgSharp/Graphics/OpenGL/Buffer/FBO.cs @@ -1,4 +1,34 @@ -using StgSharp.Graphics.OpenGL; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="FBO.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics.OpenGL; using System; using System.Collections.Generic; @@ -12,7 +42,7 @@ namespace StgSharp.Graphics.OpenGL { #pragma warning disable CA1008 #pragma warning disable CA1028 - public enum FrameBufferTarget:uint + public enum FrameBufferTarget : uint #pragma warning restore CA1028 #pragma warning restore CA1008 { @@ -21,9 +51,10 @@ namespace StgSharp.Graphics.OpenGL Draw = GLconst.DRAW_FRAMEBUFFER, } - public class FrameBuffer : GlBufferObjectBase + public sealed class FrameBuffer : GlBufferObjectBase { - internal unsafe FrameBuffer(int count, glRenderStream binding):base(binding) + + internal unsafe FrameBuffer(int count, glRenderStream binding) : base(binding) { _bufferHandle = GL.GenFrameBuffers(count); } @@ -34,15 +65,9 @@ namespace StgSharp.Graphics.OpenGL /// /// Index of object to be binded in handle set [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe override void Bind(int index) + public override unsafe void Bind(int index) { - GL.BindFrameBuffer(FrameBufferTarget.All,_bufferHandle[index]); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void BindNull() - { - GlFunction.CurrentGL.BindFrameBuffer(FrameBufferTarget.All,GlHandle.Zero); + GL.BindFrameBuffer(FrameBufferTarget.All, _bufferHandle[index]); } /// @@ -57,9 +82,16 @@ namespace StgSharp.Graphics.OpenGL GL.BindFrameBuffer(target, _bufferHandle[index]); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void BindNull() + { + OpenGLFunction.CurrentGL.BindFrameBuffer(FrameBufferTarget.All, GlHandle.Zero); + } + protected override void Dispose(bool disposing) { throw new NotImplementedException(); } + } } diff --git a/源代码/StgSharp/Graphics/OpenGL/Buffer/GLBufferObjectBase.cs b/源代码/StgSharp/Graphics/OpenGL/Buffer/GLBufferObjectBase.cs index cd5ff941..7996b041 100644 --- a/源代码/StgSharp/Graphics/OpenGL/Buffer/GLBufferObjectBase.cs +++ b/源代码/StgSharp/Graphics/OpenGL/Buffer/GLBufferObjectBase.cs @@ -1,4 +1,34 @@ -using StgSharp.Graphics.OpenGL; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="GLBufferObjectBase.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics.OpenGL; using System; using System.Collections.Generic; @@ -8,6 +38,7 @@ namespace StgSharp.Graphics.OpenGL { public abstract class GlBufferObjectBase : BufferObjectBase { + private readonly glRenderStream _contextBinding; protected GlBufferObjectBase(glRenderStream contextBinding) @@ -16,7 +47,7 @@ namespace StgSharp.Graphics.OpenGL _contextBinding = contextBinding; } - protected GlFunction GL => _contextBinding.GL; + protected OpenGLFunction GL => _contextBinding.GL; } } diff --git a/源代码/StgSharp/Graphics/OpenGL/Buffer/RBO.cs b/源代码/StgSharp/Graphics/OpenGL/Buffer/RBO.cs index 91f27c83..7e616ab3 100644 --- a/源代码/StgSharp/Graphics/OpenGL/Buffer/RBO.cs +++ b/源代码/StgSharp/Graphics/OpenGL/Buffer/RBO.cs @@ -1,4 +1,34 @@ -using StgSharp.Graphics.OpenGL; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="RBO.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics.OpenGL; using System; using System.Collections.Generic; @@ -11,9 +41,10 @@ namespace StgSharp.Graphics.OpenGL - public class RenderBuffer : GlBufferObjectBase + public sealed class RenderBuffer : GlBufferObjectBase { - public RenderBuffer(int count, glRenderStream binding):base(binding) + + public RenderBuffer(int count, glRenderStream binding) : base(binding) { _bufferHandle = GL.GenRenderBuffer(count); } @@ -23,17 +54,18 @@ namespace StgSharp.Graphics.OpenGL GL.BindRenderBuffer(this[index]); } + public void Store(RenderBufferInternalFormat format, (int width, int height) size) + { + if ((size.width > binding.Width) || (size.height > binding.Height)) + { + StgSharp.LogWarning("FrameBuffer is larger than current canvas binding"); + } + } + protected override void Dispose(bool disposing) { throw new NotImplementedException(); } - public void Store(RenderBufferInternalFormat format, (int width,int height) size) - { - if (size.width > binding.Width || size.height>binding.Height) - { - StgSharp.LogWarning("FrameBuffer is larger than current canvas binding"); - } - } } } diff --git a/源代码/StgSharp/Graphics/OpenGL/Buffer/TextureGL.cs b/源代码/StgSharp/Graphics/OpenGL/Buffer/TextureGL.cs index 4e72cc91..d5c39eee 100644 --- a/源代码/StgSharp/Graphics/OpenGL/Buffer/TextureGL.cs +++ b/源代码/StgSharp/Graphics/OpenGL/Buffer/TextureGL.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="texture.cs" +// file="TextureGL.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,104 +28,230 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- +using StgSharp.Data; using StgSharp.Math; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Drawing; using System.Linq; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; namespace StgSharp.Graphics.OpenGL { - public unsafe class TextureGL + public sealed unsafe class TextureGL { - private GlFunction GL; - internal static bool[] unitActivated = new bool[16]; + + private int currentEditingTextureIndex; + + private OpenGLFunction _gl; internal GlHandle[] _textureHandle; - internal Image[] sourceList; - public GlHandle this[int index] + internal TextureGL( int count, glRenderStream binding ) { - get => _textureHandle[index]; + //sourceList = new Image[count]; + this._gl = binding.GL; + _textureHandle = _gl.GenTextures( count ); } - internal TextureGL(int n, glRenderStream binding) + internal OpenGLFunction GL => _gl; + + public GlHandle this[ int index ] { - sourceList = new Image[n]; - this.GL = binding.GL; - _textureHandle = GL.GenTextures(n); + get => _textureHandle[ index ]; } - public void ActivateAs(TextureUnit unit) + public int Count { - GL.ActiveTexture((uint)unit); + get => _textureHandle.Length; } - public void Bind2D(int index) + //internal Image[] sourceList; + + public int IndexOfCurrentTexture { - GL.BindTexture(GLconst.TEXTURE_2D, _textureHandle[index]); + get => currentEditingTextureIndex; + } + + public void ActivateAs( TextureUnit unit ) { _gl.ActiveTextureUnit( ( uint )unit ); } + + public void Bind2D( int index ) + { + currentEditingTextureIndex = index; + _gl.BindTexture( GLconst.TEXTURE_2D, _textureHandle[ index ] ); } /// - /// Load an to certain texture. + /// Load an to certain texture. /// /// /// - public unsafe void LoadTexture(int index, Image i) + public unsafe void LoadTexture( int index, Image i ) { - sourceList[index] = i; - var handle = sourceList[index].PixelBuffer; - GL.TextureImage2d( - Texture2DTarget.Texture2D, 0, (uint)i.Channel, - (uint)sourceList[index].Width, (uint)sourceList[index].Height, - (uint)i.Channel, i.PixelLayout, - pixels: handle - ); - GL.GenerateMipmap(Texture2DTarget.Texture2D); + byte[] handle = i.PixelBuffer; + _gl.TextureImage2d( + Texture2DTarget.Texture2D, 0, ( uint )i.Channel, ( uint )i.Width, ( uint )i.Height, + ( uint )i.Channel, i.PixelLayout, pixels: handle ); + _gl.GenerateMipmap( Texture2DTarget.Texture2D ); } - - #region texture setting + [MethodImpl( MethodImplOptions.AggressiveInlining )] public void Set2dFilterProperty( - Filter onMinify, Filter onMagnify) + int index, + TextureFilter onMinify, + TextureFilter onMagnify ) { - GL.TextureParameter(GLconst.TEXTURE_2D, GLconst.TEXTURE_MIN_FILTER, (int)onMinify); - GL.TextureParameter(GLconst.TEXTURE_2D, GLconst.TEXTURE_MAG_FILTER, (int)onMagnify); + #if DEBUG + if( index != currentEditingTextureIndex ) + { + throw new InvalidOperationException( + "Texture to be editted is not the one being activated." ); + } + #endif + _gl.TextureParameter( GLconst.TEXTURE_2D, GLconst.TEXTURE_MIN_FILTER, ( int )onMinify ); + _gl.TextureParameter( GLconst.TEXTURE_2D, GLconst.TEXTURE_MAG_FILTER, ( int )onMagnify ); } + [MethodImpl( MethodImplOptions.AggressiveInlining )] public void Set2dWrapProperty( - Wrap onHorizontial, Wrap onVertical) + int index, + TextureWrap onHorizontial, + TextureWrap onVertical ) { - GL.TextureParameter(GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_S, (int)onHorizontial); - GL.TextureParameter(GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_T, (int)onVertical); + #if DEBUG + if( index != currentEditingTextureIndex ) + { + throw new InvalidOperationException( + "Texture to be editted is not the one being activated." ); + } + #endif + _gl.TextureParameter( GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_S, ( int )onHorizontial ); + _gl.TextureParameter( GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_T, ( int )onVertical ); + } + + [MethodImpl( MethodImplOptions.AggressiveInlining )] + public void Set2dProperty( int index, TextureProperty property ) + { + Set2dFilterProperty( index, property.FilterOnMinify, property.FilterOnMagnify ); + Set2dWrapProperty( index, property.WrapOnHorizontial, property.WrapOnVertical ); } #endregion texture setting - - } -#pragma warning disable CA1008 - public enum Filter -#pragma warning restore CA1008 + [StructLayout( LayoutKind.Explicit )] + public struct TextureProperty { + + [FieldOffset( 0 )] private M128 mask; + [FieldOffset( 0 )] private TextureFilter mag; + [FieldOffset( 4 )] private TextureFilter min; + + [FieldOffset( 8 )] private TextureWrap hori; + [FieldOffset( 12 )] private TextureWrap vert; + + public TextureProperty( + TextureFilter onMagnify, + TextureFilter onMinify, + TextureWrap onHorizontial, + TextureWrap onVertical ) + { + FilterOnMagnify = onMagnify; + FilterOnMinify = onMinify; + WrapOnHorizontial = onHorizontial; + WrapOnVertical = onVertical; + } + + public TextureFilter FilterOnMagnify + { + get => mag; + set => mag = value; + } + + public TextureFilter FilterOnMinify + { + get => min; + set => min = value; + } + + public TextureWrap WrapOnHorizontial + { + get => hori; + set => hori = value; + } + + public TextureWrap WrapOnVertical + { + get => vert; + set => vert = value; + } + + public override int GetHashCode() + { + return HashCode.Combine( + FilterOnMagnify, FilterOnMagnify, WrapOnHorizontial, WrapOnVertical ); + } + + public override bool Equals([NotNullWhen(true)] object obj) + { + return base.Equals(obj); + } + + public override string ToString() + { + return $"FilterOnMagnify:{FilterOnMagnify}, " + + $"FilterOnMagnify:{FilterOnMagnify}, " + + $"WrapOnHorizontial:{WrapOnHorizontial}, " + + $"WrapOnVertical:{WrapOnVertical}"; + } + + public static implicit operator TextureProperty( + ( + TextureFilter onMagnify, TextureFilter onMinify, + TextureWrap onHorizontial, TextureWrap onVertical + ) propertyValueTuple ) + { + return new TextureProperty( + propertyValueTuple.onMagnify, propertyValueTuple.onMinify, + propertyValueTuple.onHorizontial, propertyValueTuple.onVertical ); + } + + public static bool operator ==(TextureProperty left, TextureProperty right) + { + return left.mask == right.mask; + } + + public static bool operator !=(TextureProperty left, TextureProperty right) + { + return left.mask != right.mask; + } + } + + #pragma warning disable CA1008 + public enum TextureFilter + #pragma warning restore CA1008 + { + Nearest = GLconst.NEAREST, Linear = GLconst.LINEAR, NearestLinearMipmap = GLconst.NEAREST_MIPMAP_LINEAR, LinearLinearMipmap = GLconst.LINEAR_MIPMAP_LINEAR, NearestNearestMipmap = GLconst.NEAREST_MIPMAP_NEAREST, LinearNearestMipmap = GLconst.LINEAR_MIPMAP_NEAREST, + } -#pragma warning disable CA1008 + #pragma warning disable CA1008 public enum TextureUnit -#pragma warning restore CA1008 + #pragma warning restore CA1008 { + Unit0 = GLconst.TEXTURE0, Unit1 = GLconst.TEXTURE1, Unit2 = GLconst.TEXTURE2, @@ -142,15 +268,18 @@ namespace StgSharp.Graphics.OpenGL Unit13 = GLconst.TEXTURE13, Unit14 = GLconst.TEXTURE14, Unit15 = GLconst.TEXTURE15, + } -#pragma warning disable CA1008 - public enum Wrap -#pragma warning restore CA1008 + #pragma warning disable CA1008 + public enum TextureWrap + #pragma warning restore CA1008 { + Repeat = GLconst.REPEAT, MirroredRepeat = GLconst.MIRRORED_REPEAT, ClampToEdge = GLconst.CLAMP_TO_EDGE, ClampToBorder = GLconst.CLAMP_TO_BORDER, + } } \ No newline at end of file diff --git a/源代码/StgSharp/Graphics/OpenGL/Buffer/VAO.cs b/源代码/StgSharp/Graphics/OpenGL/Buffer/VAO.cs index 9b780137..8a43e10c 100644 --- a/源代码/StgSharp/Graphics/OpenGL/Buffer/VAO.cs +++ b/源代码/StgSharp/Graphics/OpenGL/Buffer/VAO.cs @@ -37,10 +37,10 @@ using System.Text; namespace StgSharp.Graphics.OpenGL { - public unsafe class VertexArray : GlBufferObjectBase + public sealed unsafe class VertexArray : GlBufferObjectBase { - internal VertexArray(int n, glRenderStream binding):base(binding) + internal VertexArray(int n, glRenderStream binding) : base(binding) { _bufferHandle = GL.GenVertexArrays(n); } @@ -54,7 +54,7 @@ namespace StgSharp.Graphics.OpenGL [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BindNull() { - GlFunction.CurrentGL.BindVertexArray(GlHandle.Zero); + OpenGLFunction.CurrentGL.BindVertexArray(GlHandle.Zero); } [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/源代码/StgSharp/Graphics/OpenGL/Buffer/VBO.cs b/源代码/StgSharp/Graphics/OpenGL/Buffer/VBO.cs index 265a70b8..d3dcb743 100644 --- a/源代码/StgSharp/Graphics/OpenGL/Buffer/VBO.cs +++ b/源代码/StgSharp/Graphics/OpenGL/Buffer/VBO.cs @@ -40,10 +40,10 @@ using System.Text; namespace StgSharp.Graphics.OpenGL { - public unsafe class VertexBuffer : GlBufferObjectBase + public sealed unsafe class VertexBuffer : GlBufferObjectBase { - internal VertexBuffer(int n, glRenderStream binding):base(binding) + internal VertexBuffer(int n, glRenderStream binding) : base(binding) { _bufferHandle = GL.GenBuffers(n); } @@ -54,13 +54,22 @@ namespace StgSharp.Graphics.OpenGL } /// - /// Set data to current vertex buffer object + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Unbind() + { + GL.BindBuffer(BufferType.ArrayBuffer, GlHandle.Zero); + } + + /// + /// Set _data to current vertex buffer object /// /// Type of bufferData /// Index to find certain VBO in this instance /// Data to write in - /// How OpenGL use these data, defined by - public void WriteMatrixData(int index, T bufferData, BufferUsage usage) + /// How OpenGL use these _data, defined by + public void WriteMatrixData(int index, T bufferData, BufferUsage usage) where T : struct, IMat { GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); @@ -68,12 +77,12 @@ namespace StgSharp.Graphics.OpenGL } /// - /// Set data to current vertex buffer object + /// Set _data to current vertex buffer object /// /// Type of bufferData /// Index to find certain VBO in this instance /// Data to write in - /// How OpenGL use these data, defined by + /// How OpenGL use these _data, defined by public void WriteScalerData(int index, T[] bufferArray, BufferUsage usage) where T : struct, #if NET8_0_OR_GREATER @@ -87,12 +96,12 @@ namespace StgSharp.Graphics.OpenGL } /// - /// Set data to current vertex buffer object + /// Set _data to current vertex buffer object /// /// Type of bufferData /// Index to find certain VBO in this instance - /// A of data to write in - /// How OpenGL use these data, defined by + /// A of _data to write in + /// How OpenGL use these _data, defined by public void WriteScalerData(int index, ReadOnlySpan scalerSpan, BufferUsage usage) where T : struct, #if NET8_0_OR_GREATER @@ -106,12 +115,12 @@ namespace StgSharp.Graphics.OpenGL } /// - /// Set data to current vertex buffer object + /// Set _data to current vertex buffer object /// /// Type of bufferData /// Index to find certain VBO in this instance - /// A of data to write in - /// How OpenGL use these data, defined by + /// A of _data to write in + /// How OpenGL use these _data, defined by public void WriteVectorData(int index, ReadOnlySpan vectorSpan, BufferUsage usage) where T : struct, IVector { GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); @@ -119,27 +128,18 @@ namespace StgSharp.Graphics.OpenGL } /// - /// Set data to current vertex buffer object + /// Set _data to current vertex buffer object /// /// Type of bufferData /// Index to find certain VBO in this instance - /// A array of data to write in - /// How OpenGL use these data, defined by + /// A array of _data to write in + /// How OpenGL use these _data, defined by public void WriteVectorData(int index, T[] vectorArray, BufferUsage usage) where T : struct, IVector { GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); GL.SetBufferVectorData(BufferType.ArrayBuffer, vectorArray, usage); } - /// - /// - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Unbind() - { - GL.BindBuffer(BufferType.ArrayBuffer, GlHandle.Zero); - } - protected override sealed void Dispose(bool disposing) { if (disposing) diff --git a/源代码/StgSharp/Graphics/OpenGL/GLresourceGenrator.cs b/源代码/StgSharp/Graphics/OpenGL/GLresourceGenrator.cs index 9dbbceeb..a2fb3f1b 100644 --- a/源代码/StgSharp/Graphics/OpenGL/GLresourceGenrator.cs +++ b/源代码/StgSharp/Graphics/OpenGL/GLresourceGenrator.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="GLresourceGenrator.cs" +// file="glResourceGenrator.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -51,6 +51,12 @@ namespace StgSharp.Graphics.OpenGL return new ElementBuffer(count, this); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + protected FrameBuffer CreateFrameBuffer(int count) + { + return new FrameBuffer(count, this); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] protected RenderBuffer CreateRenderBuffer(int count) @@ -58,12 +64,6 @@ namespace StgSharp.Graphics.OpenGL return new RenderBuffer(count, this); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected FrameBuffer CreateFrameBuffer(int count) - { - return new FrameBuffer(count, this); - } - /// /// Create a sets of /// @@ -75,6 +75,13 @@ namespace StgSharp.Graphics.OpenGL return new TextureGL(count, this); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + protected AutoTextureGL CreateAutoTexture(int count) + { + return new AutoTextureGL(count, this); + } + + /// /// Create a set of . /// @@ -97,6 +104,6 @@ namespace StgSharp.Graphics.OpenGL return new VertexBuffer(count, this); } - + } } \ No newline at end of file diff --git a/源代码/StgSharp/Graphics/OpenGL/GlException.cs b/源代码/StgSharp/Graphics/OpenGL/GlException.cs index 75449385..04dff63b 100644 --- a/源代码/StgSharp/Graphics/OpenGL/GlException.cs +++ b/源代码/StgSharp/Graphics/OpenGL/GlException.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="glException.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.IO; using System.Runtime.CompilerServices; @@ -9,6 +39,7 @@ namespace StgSharp.Graphics.OpenGL { public sealed class GlExecutionException : Exception { + public GlExecutionException() { } @@ -21,10 +52,6 @@ namespace StgSharp.Graphics.OpenGL public sealed class GlArrayFormatException : Exception { - public GlArrayFormatException(PixelChannelLayout layout, string arrayname): - base($"{arrayname} cannot be used as layout of {layout}") - { - } internal GlArrayFormatException(string message) : base(message) { @@ -37,22 +64,28 @@ namespace StgSharp.Graphics.OpenGL internal GlArrayFormatException(string message, Exception innerException) : base(message, innerException) { } + public GlArrayFormatException(PixelChannelLayout layout, string arrayname) : + base($"{arrayname} cannot be used as layout of {layout}") + { + } + } public static partial class GlHelper { + public static bool CheckArrayFormat(this Array array, PixelChannelLayout layout) { return layout switch { PixelChannelLayout.Byte or PixelChannelLayout.UByte332 or PixelChannelLayout.UByte233Rev - => array is byte[] || array is sbyte[], + => (array is byte[]) || (array is sbyte[]), PixelChannelLayout.Short => array is short[], PixelChannelLayout.UShort => array is ushort[], PixelChannelLayout.Int => array is int[], PixelChannelLayout.Float => array is float[], - PixelChannelLayout.UShort4444 => array is ushort[] || array is byte[], - PixelChannelLayout.UByte => array is byte[] || array is sbyte[], + PixelChannelLayout.UShort4444 => (array is ushort[]) || (array is byte[]), + PixelChannelLayout.UByte => (array is byte[]) || (array is sbyte[]), PixelChannelLayout.UInt => array is uint[], PixelChannelLayout.UShort565 or PixelChannelLayout.UShort565Rev or diff --git a/源代码/StgSharp/Graphics/OpenGL/GlHandle.cs b/源代码/StgSharp/Graphics/OpenGL/GlHandle.cs index d64a86de..78583510 100644 --- a/源代码/StgSharp/Graphics/OpenGL/GlHandle.cs +++ b/源代码/StgSharp/Graphics/OpenGL/GlHandle.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="GLhandle.cs" +// file="GlHandle.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -49,24 +49,25 @@ namespace StgSharp.Graphics.OpenGL [StructLayout(LayoutKind.Explicit, Size = 4)] public struct GlHandle { - [FieldOffset(0)] public uint Value; + [FieldOffset(0)] public int SignedValue; + [FieldOffset(0)] public uint Value; + + public static GlHandle Zero + { + get => new GlHandle { Value = 0 }; + } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static GlHandle Alloc(uint value) { - return new GlHandle() { Value = value }; + return new GlHandle { Value = value }; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static GlHandle SignedAlloc(int value) { - return new GlHandle() { SignedValue = value }; - } - - public static GlHandle Zero - { - get => new GlHandle() { Value = 0 }; + return new GlHandle { SignedValue = value }; } } diff --git a/源代码/StgSharp/Graphics/OpenGL/OpenGLAPICalling.cs b/源代码/StgSharp/Graphics/OpenGL/OpenGLAPICalling.cs deleted file mode 100644 index a706fad6..00000000 --- a/源代码/StgSharp/Graphics/OpenGL/OpenGLAPICalling.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Graphics.OpenGL -{ - [AttributeUsage(AttributeTargets.Method)] - public sealed class OpenGLAPICallingAttribute:Attribute - { - public OpenGLAPICallingAttribute() - { - - } - } -} diff --git a/源代码/StgSharp/Graphics/OpenGL/ShaderEdit/IglConvertable.cs b/源代码/StgSharp/Graphics/OpenGL/ShaderEdit/IglConvertable.cs index ffc59834..b8c7f3e3 100644 --- a/源代码/StgSharp/Graphics/OpenGL/ShaderEdit/IglConvertable.cs +++ b/源代码/StgSharp/Graphics/OpenGL/ShaderEdit/IglConvertable.cs @@ -1,4 +1,34 @@ -using StgSharp.Graphics.OpenGL; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="IglConvertable.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics.OpenGL; using System; using System.Collections.Generic; @@ -10,26 +40,26 @@ namespace StgSharp.Graphics.ShaderEdit { public interface IglConvertable { - /// - /// - /// - public void SetAllUniforms(); - - /// - /// - /// - public void GainAllUniforms(ShaderProgram source, params string[] uniformName); /// /// /// public void DisplayGLtypeDefinition(); + /// + /// + /// + public void GainAllUniforms(ShaderProgram source, params string[] uniformName); + /// /// /// /// public ShaderStruct GetConvertedGLtype(); + /// + /// + /// + public void SetAllUniforms(); } } diff --git a/源代码/StgSharp/Graphics/OpenGL/ShaderEdit/Shader.cs b/源代码/StgSharp/Graphics/OpenGL/ShaderEdit/Shader.cs index 478c83ee..12be5420 100644 --- a/源代码/StgSharp/Graphics/OpenGL/ShaderEdit/Shader.cs +++ b/源代码/StgSharp/Graphics/OpenGL/ShaderEdit/Shader.cs @@ -44,30 +44,31 @@ namespace StgSharp.Graphics.OpenGL public abstract partial class glRenderStream : RenderStream { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected sealed override Shader CreateShaderSegment(ShaderType type, int count) - { - return new Shader( GL.CreateShaderSet(count, type), type, this); - } /// /// Create an instance of program /// /// New instance of instance. [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected sealed override ShaderProgram CreateShaderProgram() + protected override sealed ShaderProgram CreateShaderProgram() { return new ShaderProgram(this); } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + protected override sealed Shader CreateShaderSegment(ShaderType type, int count) + { + return new Shader(GL.CreateShaderSet(count, type), type, this); + } + } public class Shader : ISSDSerializable { - private readonly GlFunction GL; + + private readonly OpenGLFunction GL; internal readonly GlHandle[] handle; public readonly ShaderType type; - public SerializableTypeCode SSDTypeCode => SerializableTypeCode.Shader; - internal unsafe Shader(GlHandle[] handle, ShaderType usage, glRenderStream stream) { this.handle = handle; @@ -75,6 +76,8 @@ namespace StgSharp.Graphics.OpenGL type = usage; } + public SerializableTypeCode SSDTypeCode => SerializableTypeCode.Shader; + /// /// Attach one shader code to a shader program. /// @@ -86,14 +89,13 @@ namespace StgSharp.Graphics.OpenGL GL.AttachShader(target.handle, handle[index]); } - public static byte[] FromCodeFile(string fileRoute) + public void CheckStatus(int index, ShaderStatus status) { - string str = File.ReadAllText(fileRoute); - if (string.IsNullOrEmpty(str)) + string log = GL.GetShaderStatus(this, index, (int)status); + if (!string.IsNullOrEmpty(log)) { - throw new InvalidOperationException($"Cannot load and GLSL code from {fileRoute}"); + throw new Exception($"{$"Shader Error \t{status}\n"}{log}"); } - return Encoding.UTF8.GetBytes(str); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -105,7 +107,7 @@ namespace StgSharp.Graphics.OpenGL } GL.LoadShaderSource(handle[index], codeStream); GL.CompileShader(handle[index]); - CheckStatus(index,ShaderStatus.CompileStatus); + CheckStatus(index, ShaderStatus.CompileStatus); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -115,14 +117,24 @@ namespace StgSharp.Graphics.OpenGL { throw new ArgumentNullException(nameof(codeStream)); } - GL.LoadShaderSource(handle[index],Encoding.ASCII.GetBytes( codeStream)); + GL.LoadShaderSource(handle[index], Encoding.ASCII.GetBytes(codeStream)); GL.CompileShader(handle[index]); CheckStatus(index, ShaderStatus.CompileStatus); } - public override string ToString() + public void FromBytes(byte[] stream) { - return $"This is a {type} shader, its shader handles are {handle.ToString()}."; + throw new NotImplementedException(); + } + + public static byte[] FromCodeFile(string fileRoute) + { + string str = File.ReadAllText(fileRoute); + if (string.IsNullOrEmpty(str)) + { + throw new InvalidOperationException($"Cannot load and GLSL code from {fileRoute}"); + } + return Encoding.UTF8.GetBytes(str); } public byte[] GetBytes() @@ -130,24 +142,16 @@ namespace StgSharp.Graphics.OpenGL return Array.Empty(); } - public void CheckStatus(int index, ShaderStatus status) - { - string log = GL.GetShaderStatus(this,index, (int)status); - if (!string.IsNullOrEmpty(log)) - { - throw new Exception($"Shader Error \t{status}\n" + log); - } - } - public byte[] GetBytes(out int length) { throw new NotImplementedException(); } - public void FromBytes(byte[] stream) + public override string ToString() { - throw new NotImplementedException(); + return $"This is a {type} shader, its shader handles are {handle.ToString()}."; } + } public enum ShaderStatus : int @@ -157,7 +161,8 @@ namespace StgSharp.Graphics.OpenGL public class ShaderProgram { - private readonly GlFunction GL; + + private readonly OpenGLFunction GL; internal readonly GlHandle handle; /// @@ -191,7 +196,7 @@ namespace StgSharp.Graphics.OpenGL where T : struct where U : struct { - return new Uniform(GL.GetUniformLocation(this.handle,name)); + return new Uniform(GL.GetUniformLocation(this.handle, name)); } /// diff --git a/源代码/StgSharp/Graphics/OpenGL/ShaderEdit/Uniform.cs b/源代码/StgSharp/Graphics/OpenGL/ShaderEdit/Uniform.cs index 64eafccc..f155b62e 100644 --- a/源代码/StgSharp/Graphics/OpenGL/ShaderEdit/Uniform.cs +++ b/源代码/StgSharp/Graphics/OpenGL/ShaderEdit/Uniform.cs @@ -42,109 +42,112 @@ namespace StgSharp.Graphics.OpenGL { public class Uniform { + internal GlHandle id; public GlHandle Handle { get => id; } + } public sealed class Uniform : Uniform where T : struct { - internal unsafe Uniform(GlHandle id) - { - this.id = id; - } - internal Uniform() { } + internal unsafe Uniform(GlHandle id) + { + this.id = id; + } + internal static Uniform FromHandle(GlHandle handle) { - return new Uniform() { id = handle }; + return new Uniform { id = handle }; } } - public sealed class Uniform: Uniform + public sealed class Uniform : Uniform where T : struct where U : struct { - internal unsafe Uniform(GlHandle id) - { - this.id = id; - } - internal Uniform() { } - internal static Uniform FromHandle(GlHandle handle) + internal unsafe Uniform(GlHandle id) { - return new Uniform() { id = handle }; + this.id = id; + } + + internal static Uniform FromHandle(GlHandle handle) + { + return new Uniform { id = handle }; } } - public sealed class Uniform:Uniform + public sealed class Uniform : Uniform where T : struct where U : struct where V : struct { - internal unsafe Uniform(GlHandle id) - { - this.id = id; - } - internal Uniform() { } - internal static Uniform FromHandle(GlHandle handle) + internal unsafe Uniform(GlHandle id) { - return new Uniform() { id = handle }; + this.id = id; + } + + internal static Uniform FromHandle(GlHandle handle) + { + return new Uniform { id = handle }; } } - public sealed class Uniform:Uniform + public sealed class Uniform : Uniform where T : struct where U : struct where V : struct where W : struct { + internal Uniform() + { + + } + internal unsafe Uniform(GlHandle id) { this.id = id; } - internal Uniform() - { - - } - internal static Uniform FromHandle(GlHandle handle) { - return new Uniform() { id = handle }; + return new Uniform { id = handle }; } } - public unsafe partial class GlFunction + public unsafe partial class OpenGLFunction { + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetUniformValue (Uniform uniform, Matrix44 mat) @@ -157,7 +160,7 @@ namespace StgSharp.Graphics.OpenGL public void SetUniformValue(Uniform uniform, vec4d vec) { vec4d temp = vec; - Context.glUniform1fv(uniform.id.SignedValue , 4, &temp); + Context.glUniform1fv(uniform.id.SignedValue, 4, &temp); } @@ -165,37 +168,37 @@ namespace StgSharp.Graphics.OpenGL public void SetUniformValue(Uniform uniform, vec4d vec) { vec4d temp = vec; - Context.glUniform1fv(uniform.id.SignedValue , 4, &temp); + Context.glUniform1fv(uniform.id.SignedValue, 4, &temp); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetUniformValue(Uniform uniform, float v0) { - Context.glUniform1f(uniform.id.SignedValue , v0); + Context.glUniform1f(uniform.id.SignedValue, v0); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetUniformValue(Uniform uniform, int i0) { - Context.glUniform1i(uniform.id.SignedValue , i0); + Context.glUniform1i(uniform.id.SignedValue, i0); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetUniformValue(Uniform uniform, float v0, float v1) { - Context.glUniform2f(uniform.id.SignedValue , v0, v1); + Context.glUniform2f(uniform.id.SignedValue, v0, v1); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetUniformValue(Uniform uniform, float v0, float v1, float v2) { - Context.glUniform3f(uniform.id.SignedValue , v0, v1, v2); + Context.glUniform3f(uniform.id.SignedValue, v0, v1, v2); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SetUniformValue(Uniform uniform, float v0, float v1, float v2, float v3) { - Context.glUniform4f(uniform.id.SignedValue , v0, v1, v2, v3); + Context.glUniform4f(uniform.id.SignedValue, v0, v1, v2, v3); } } diff --git a/源代码/StgSharpDebug/Controlling/Get.cs b/源代码/StgSharp/Graphics/OpenGL/glAPICalling.cs similarity index 76% rename from 源代码/StgSharpDebug/Controlling/Get.cs rename to 源代码/StgSharp/Graphics/OpenGL/glAPICalling.cs index 3c11f5c9..9677da98 100644 --- a/源代码/StgSharpDebug/Controlling/Get.cs +++ b/源代码/StgSharp/Graphics/OpenGL/glAPICalling.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="Get.cs" +// file="glAPICalling.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,25 +28,19 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- +using System; +using System.Collections.Generic; +using System.Text; -using StgSharp.Graphics; -using StgSharp.Logic; -using StgSharp.Math; - -namespace StgSharp.Graphics +namespace StgSharp.Graphics.OpenGL { - public partial class View + [AttributeUsage(AttributeTargets.Method)] + public sealed class OpenGLAPICallingAttribute : Attribute { - /// - /// Get the status of a certain key on the keyboard. - /// - /// - /// - /// - public static KeyStatus GetKeyStatus(ViewModelBase form, KeyboardKey key) + public OpenGLAPICallingAttribute() { - return InternalIO.glfwGetKey(form.WindowID, (int)key); + } } diff --git a/源代码/StgSharp/Graphics/OpenGL/glApiManager.cs b/源代码/StgSharp/Graphics/OpenGL/glApiManager.cs index db684ad7..415275e0 100644 --- a/源代码/StgSharp/Graphics/OpenGL/glApiManager.cs +++ b/源代码/StgSharp/Graphics/OpenGL/glApiManager.cs @@ -57,6 +57,25 @@ namespace StgSharp.Graphics.OpenGL private static string glExtensionList; + //-------------------------------------------------------------------------------- + + /// + /// Get the function pointer of given OpenGL api name + /// + /// ContextName of the OpenGL api + /// The funtion pointer of the api in stream of + public static IntPtr LoadGLfunc(string name) + { + IntPtr ret = InternalIO.glfwGetProcAddress(name); + if (ret == default) + { + InternalIO.InternalAppendLog( + $"Cannot load OpenGL api called {name}, this api may not exist or supported."); + return ret; + } + return ret; + } + /// /// Load all supported OpenGL APIs and bind them to given . /// @@ -64,7 +83,7 @@ namespace StgSharp.Graphics.OpenGL public static unsafe void LoadOpenGLApiTo(IntPtr contextHandle) { OpenglContext* context = (OpenglContext*)contextHandle; - delegate* loader = &InternalIO.glfwGetProcAddress; + delegate* loader = &InternalIO.glfwGetProcAddress; if ((IntPtr)context->glGetString != IntPtr.Zero) { return; @@ -84,7 +103,7 @@ namespace StgSharp.Graphics.OpenGL { InternalIO.InternalWriteLog("Failed to call glGetString", LogType.Error); } - coreVersion = Marshal.PtrToStringAnsi(context->glGetString(glVersion))??string.Empty; + coreVersion = Marshal.PtrToStringAnsi(context->glGetString(glVersion)) ?? string.Empty; foreach (string branch in glBranch) { @@ -140,7 +159,7 @@ namespace StgSharp.Graphics.OpenGL } int extensionCount; - context->glGetIntegerv(GLconst.NUM_EXTENSIONS,&extensionCount); + context->glGetIntegerv(GLconst.NUM_EXTENSIONS, &extensionCount); if (extensionCount == 0) { InternalIO.InternalWriteLog("No supported OpenGL extensions are found.", LogType.Info); @@ -151,12 +170,11 @@ namespace StgSharp.Graphics.OpenGL for (uint i = 0; i < extensionCount; i++) { - byte* strPtr = context->glGetStringi(GLconst.EXTENSIONS,i); + byte* strPtr = context->glGetStringi(GLconst.EXTENSIONS, i); extensions.Add(Marshal.PtrToStringAnsi((IntPtr)strPtr)); } - InternalIO.InternalWriteLog($"Find OpenGL extensions:" + Environment.NewLine + - $"{string.Join(';', extensions)}", + InternalIO.InternalWriteLog($"{$"Find OpenGL extensions:"}{Environment.NewLine}{($"{string.Join(';', extensions)}")}", LogType.Info); #region checkGLextensions @@ -786,25 +804,6 @@ namespace StgSharp.Graphics.OpenGL } - //-------------------------------------------------------------------------------- - - /// - /// Get the function pointer of given OpenGL api name - /// - /// ContextName of the OpenGL api - /// The funtion pointer of the api in stream of - public static IntPtr LoadGLfunc(string name) - { - IntPtr ret = InternalIO.glfwGetProcAddress(name); - if (ret == default) - { - InternalIO.InternalAppendLog( - $"Cannot load OpenGL api called {name}, this api may not exist or supported."); - return ret; - } - return ret; - } - internal static void CheckCoreVersion(int majorVersion, int minorVersion) { if (majorVersion < 3) @@ -1017,7 +1016,7 @@ namespace StgSharp.Graphics.OpenGL } } - internal static unsafe void LoadGLcore10(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore10(OpenglContext* contextPtr, delegate* load) { if (!core10) { @@ -1081,7 +1080,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 1.0 APIs"); } - internal static unsafe void LoadGLcore11(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore11(OpenglContext* contextPtr, delegate* load) { if (!core11) { @@ -1111,7 +1110,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 1.1 APIs"); } - internal static unsafe void LoadGLcore12(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore12(OpenglContext* contextPtr, delegate* load) { if (!core12) { @@ -1131,7 +1130,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 1.2 APIs"); } - internal static unsafe void LoadGLcore13(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore13(OpenglContext* contextPtr, delegate* load) { if (!core13) { @@ -1156,7 +1155,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 1.3 APIs"); } - internal static unsafe void LoadGLcore14(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore14(OpenglContext* contextPtr, delegate* load) { if (!core14) { @@ -1181,7 +1180,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 1.4 APIs"); } - internal static unsafe void LoadGLcore15(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore15(OpenglContext* contextPtr, delegate* load) { if (!core15) { @@ -1216,7 +1215,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 1.5 APIs"); } - internal static unsafe void LoadGLcore20(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore20(OpenglContext* contextPtr, delegate* load) { if (!core20) { @@ -1325,7 +1324,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 2.0 APIs"); } - internal static unsafe void LoadGLcore21(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore21(OpenglContext* contextPtr, delegate* load) { if (!core21) { @@ -1347,7 +1346,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 2.1 APIs"); } - internal static unsafe void LoadGLcore30(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore30(OpenglContext* contextPtr, delegate* load) { if (!core30) { @@ -1447,7 +1446,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 3.0 APIs"); } - internal static unsafe void LoadGLcore31(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore31(OpenglContext* contextPtr, delegate* load) { if (!core31) { @@ -1478,7 +1477,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 3.1 APIs"); } - internal static unsafe void LoadGLcore32(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore32(OpenglContext* contextPtr, delegate* load) { if (!core32) { @@ -1513,7 +1512,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 3.2 APIs"); } - internal static unsafe void LoadGLcore33(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore33(OpenglContext* contextPtr, delegate* load) { if (!core33) { @@ -1557,7 +1556,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 3.3 APIs"); } - internal static unsafe void LoadGLcore40(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore40(OpenglContext* contextPtr, delegate* load) { if (!core40) { @@ -1619,7 +1618,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 4.0 APIs"); } - internal static unsafe void LoadGLcore41(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore41(OpenglContext* contextPtr, delegate* load) { if (!core41) { @@ -1723,7 +1722,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 4.1 APIs"); } - internal static unsafe void LoadGLcore42(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore42(OpenglContext* contextPtr, delegate* load) { if (!core42) { @@ -1751,7 +1750,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 4.2 APIs"); } - internal static unsafe void LoadGLcore43(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore43(OpenglContext* contextPtr, delegate* load) { if (!core43) { @@ -1811,7 +1810,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 4.3 APIs"); } - internal static unsafe void LoadGLcore44(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore44(OpenglContext* contextPtr, delegate* load) { if (!core44) { @@ -1836,7 +1835,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 4.4 APIs"); } - internal static unsafe void LoadGLcore45(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore45(OpenglContext* contextPtr, delegate* load) { if (!core45) { @@ -1962,7 +1961,7 @@ namespace StgSharp.Graphics.OpenGL InternalIO.InternalAppendLog("Successfully load all OpenGL 4.5 APIs"); } - internal static unsafe void LoadGLcore46(OpenglContext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore46(OpenglContext* contextPtr, delegate* load) { if (!core46) { diff --git a/源代码/StgSharp/Graphics/OpenGL/glFunction.cs b/源代码/StgSharp/Graphics/OpenGL/glFunction.cs index d982765b..175b8a5b 100644 --- a/源代码/StgSharp/Graphics/OpenGL/glFunction.cs +++ b/源代码/StgSharp/Graphics/OpenGL/glFunction.cs @@ -29,7 +29,7 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- using StgSharp.Graphics; -using StgSharp.Logic; + using StgSharp.Math; using System; @@ -58,22 +58,24 @@ namespace StgSharp namespace StgSharp.Graphics.OpenGL { - - public unsafe partial class GlFunction + + public unsafe partial class OpenGLFunction { - private static Dictionary contextToGLMap = new Dictionary(); + private static Dictionary contextToGLMap = new Dictionary(); private OpenglContext* _context; - private GlFunction() + private OpenGLFunction() { + textureUnitCountGetter = new Lazy(() => GetMaskInteger(GLconst.MAX_TEXTURE_IMAGE_UNITS)); + unusedTextureImageUintInitilizing = new Lazy>(InitializeUnusedTextureImageUint); } - internal static GlFunction CurrentGL { get; set; } - internal IntPtr ContextHandle => (IntPtr)_context; + internal static OpenGLFunction CurrentGL { get; set; } + protected ref OpenglContext Context { get @@ -89,11 +91,32 @@ namespace StgSharp.Graphics.OpenGL } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void ActiveTexture(uint type) + public void ActiveTextureUnit(uint type) { Context.glActiveTexture(type); } + [Conditional("DEBUG")] + public void Assert(bool shouldReportWhenNormal) + { + try + { + uint code = Context.glGetError(); + if (code != GLconst.NO_ERROR) + { + throw new GlExecutionException(code); + } + if (shouldReportWhenNormal) + { + Console.WriteLine("OpenGL runs normally"); + } + } + catch (GlExecutionException ex) + { + throw ex; + } + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void AttachShader(GlHandle program, GlHandle shader) { @@ -108,7 +131,7 @@ namespace StgSharp.Graphics.OpenGL /// /// Bind a frame buffer to a frame buffer target - /// Same function as glBindFramebuffer. + /// Same function as glBindFramebuffer. /// /// The frame buffer target of the binding operation. /// The handle of the frame buffer object to bind. @@ -160,33 +183,6 @@ namespace StgSharp.Graphics.OpenGL while (Context.glGetError() != 0) { } } - [Conditional("DEBUG")] - public void Assert(bool shouldReportWhenNormal) - { - try - { - uint code = Context.glGetError(); - if (code != GLconst.NO_ERROR) - { - throw new GlExecutionException(code); - } - if (shouldReportWhenNormal) - { - Console.WriteLine("OpenGL runs normally"); - } - } - catch (GlExecutionException ex) - { - throw ex; - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void GenerateMipmap(Texture2DTarget target) - { - Context.glGenerateMipmap((uint)target); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void ClearGraphicError() { @@ -292,7 +288,7 @@ namespace StgSharp.Graphics.OpenGL TypeCode.UInt16 => GLconst.UNSIGNED_SHORT, TypeCode.Byte => GLconst.UNSIGNED_BYTE, _ => throw new ArgumentException( - $"{($"{$"Parameter error in parameter {nameof(type)} method DrawElements. "}")}{($"{$"Only {typeof(uint).Name},{typeof(ushort).Name},{typeof(byte).Name} types are supported."}")}") + $"{$"{$"Parameter error in parameter {nameof(type)} method DrawElements. "}"}{$"{$"Only {typeof(uint).Name},{typeof(ushort).Name},{typeof(byte).Name} types are supported."}"}") }; Context.glDrawElements((uint)mode, count, a, (void*)ptr); } @@ -354,6 +350,12 @@ namespace StgSharp.Graphics.OpenGL return h; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void GenerateMipmap(Texture2DTarget target) + { + Context.glGenerateMipmap((uint)target); + } + public unsafe GlHandle[] GenFrameBuffers(int count) { GlHandle[] h = new GlHandle[count]; @@ -498,6 +500,7 @@ namespace StgSharp.Graphics.OpenGL Context.glReadPixels( beginPosition.X, beginPosition.Y, i.Width, i.Height, (uint)format, (uint)dataType, bptr); } + i.PixelUpdateCount++; } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -665,7 +668,7 @@ namespace StgSharp.Graphics.OpenGL #endif { #pragma warning disable CS8500 - fixed (T* tptr = ((pixels == null) || (pixels.Length == 0)) ? pixels : null) + fixed (T* tptr = ((pixels == null) || (pixels.Length == 0)) ? null : pixels) { Context.glTexImage2D( (uint)target, level, internalformat, width, height, 0, format, (uint)type, tptr); @@ -697,7 +700,7 @@ namespace StgSharp.Graphics.OpenGL Context.glTexParameteri((uint)target, pname, param); } - public static bool TryGetFunctionPackage(IntPtr handle, out GlFunction functionPackage) + public static bool TryGetFunctionPackage(IntPtr handle, out OpenGLFunction functionPackage) { return contextToGLMap.TryGetValue(handle, out functionPackage); } @@ -726,19 +729,19 @@ namespace StgSharp.Graphics.OpenGL Context.glFinish(); } - internal static GlFunction BuildGlFunctionPackage(IntPtr handle) + internal static OpenGLFunction BuildGlFunctionPackage(IntPtr handle) { - GlFunction pack; + OpenGLFunction pack; if (contextToGLMap.TryGetValue(handle, out pack)) { return pack; } - pack = new GlFunction { _context = (OpenglContext*)handle }; + pack = new OpenGLFunction { _context = (OpenglContext*)handle }; contextToGLMap.Add(handle, pack); return pack; } - ~GlFunction() + ~OpenGLFunction() { contextToGLMap.Remove(ContextHandle); } diff --git a/源代码/StgSharp/Graphics/OpenGL/glRenderStream.cs b/源代码/StgSharp/Graphics/OpenGL/glRenderStream.cs index 04056adf..14c98afc 100644 --- a/源代码/StgSharp/Graphics/OpenGL/glRenderStream.cs +++ b/源代码/StgSharp/Graphics/OpenGL/glRenderStream.cs @@ -28,7 +28,7 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Logic; + using StgSharp.Math; using System; @@ -45,9 +45,10 @@ namespace StgSharp.Graphics.OpenGL public abstract partial class glRenderStream : RenderStream { - private GlFunction _context; - internal protected GlFunction GL + private OpenGLFunction _context; + + protected internal OpenGLFunction GL { get { return _context; } } @@ -69,11 +70,11 @@ namespace StgSharp.Graphics.OpenGL } if (GL == null) { - _context = GlFunction.BuildGlFunctionPackage(ContextHandle); + _context = OpenGLFunction.BuildGlFunctionPackage(ContextHandle); } - if (GlFunction.CurrentGL != GL) + if (OpenGLFunction.CurrentGL != GL) { - GlFunction.CurrentGL = GL; + OpenGLFunction.CurrentGL = GL; InternalIO.glfwMakeContextCurrent(CanvasHandle); } } diff --git a/源代码/StgSharp/Graphics/OpenGL/glResourceManager.cs b/源代码/StgSharp/Graphics/OpenGL/glResourceManager.cs new file mode 100644 index 00000000..c3d8da75 --- /dev/null +++ b/源代码/StgSharp/Graphics/OpenGL/glResourceManager.cs @@ -0,0 +1,99 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="glResourceManager.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the ¡°Software¡±), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED ¡°AS IS¡±, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- + +using StgSharp; + +using System; +using System.Collections.Concurrent; + +using System.Collections.Generic; + +namespace StgSharp.Graphics.OpenGL +{ + public partial class OpenGLFunction + { + + private Lazy textureUnitCountGetter; + private Lazy> unusedTextureImageUintInitilizing; + + public int TextureUnitCount + { + get => textureUnitCountGetter.Value; + } + + private ConcurrentQueue UnusedTextureImageUint + { + get => unusedTextureImageUintInitilizing.Value; + } + + internal void ReturnAvailableUnit(IEnumerable source) + { + int v = GLconst.TEXTURE0 + TextureUnitCount; + foreach (TextureUnit unit in source) + { + if ((int)unit > v) + { + throw new InvalidOperationException("Source contains texture unit beyond context support."); + } + } + } + + internal int TryGetAvailableTextureUnit(int count, out IEnumerable result) + { + result = new Queue(); + for (int i = 0; i < count; i++) + { + if (UnusedTextureImageUint.TryDequeue(out TextureUnit unit)) + { + (result as Queue)!.Enqueue(unit); + } + else + { + return i; + } + } + return count; + } + + private ConcurrentQueue InitializeUnusedTextureImageUint() + { + ConcurrentQueue result = new ConcurrentQueue(); + for (int index = 0; index < TextureUnitCount; index++) + { + result.Enqueue((TextureUnit)(GLconst.TEXTURE0 + index)); + } + return result; + } + + + + } +} \ No newline at end of file diff --git a/源代码/StgSharp/Graphics/Pixels.cs b/源代码/StgSharp/Graphics/Pixels.cs index 3ab94e02..330a94bd 100644 --- a/源代码/StgSharp/Graphics/Pixels.cs +++ b/源代码/StgSharp/Graphics/Pixels.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Pixels.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Text; @@ -7,22 +37,25 @@ namespace StgSharp.Graphics { public interface IPixel { - internal int Size { get; } public float Red { get; set; } public float Green { get; set; } public float Blue { get; set; } public float Alpha { get; set; } - + internal int Size { get; } + + } - [StructLayout(LayoutKind.Explicit,Size = 32)] + [StructLayout(LayoutKind.Explicit, Size = 32)] public unsafe struct Pixel32 { - [FieldOffset(0)]private unsafe fixed byte data[4]; + + [FieldOffset(0)] private unsafe fixed byte data[4]; internal int Size => 4; + } diff --git a/源代码/StgSharp/Graphics/PlainGeometryMesh.cs b/源代码/StgSharp/Graphics/PlainGeometryMesh.cs index 60767c09..a1f24ff5 100644 --- a/源代码/StgSharp/Graphics/PlainGeometryMesh.cs +++ b/源代码/StgSharp/Graphics/PlainGeometryMesh.cs @@ -1,4 +1,34 @@ -using StgSharp.Geometries; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="PlainGeometryMesh.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Geometries; using StgSharp.Math; using System; @@ -12,15 +42,26 @@ namespace StgSharp.Graphics { public class PlainGeometryMesh { + private PlainGeometry _shape; private TextureProvider _texture; + + public PlainGeometryMesh([NotNull] PlainGeometry shape, [NotNull] TextureProvider texture) + { + if (shape.VertexCount > texture.TextureCoordinate.Length) + { + throw new ArgumentException(paramName: nameof(texture), message: "Amount of texture coordination is too less"); + } + _texture = texture; + _shape = shape; + } //private Image _texture; public PlainGeometryMesh( PlainGeometry shape, Image texture, vec2d[] texCoord ) { - if (shape==null) + if (shape == null) { throw new ArgumentNullException(nameof(shape)); } @@ -33,34 +74,25 @@ namespace StgSharp.Graphics { throw new ArgumentException(paramName: nameof(texCoord), message: "Amount of texture coordination is too less"); } - _texture = new TextureProvider(texture,texCoord); + _texture = new TextureProvider(texture, texCoord); } - public PlainGeometryMesh([NotNull]PlainGeometry shape, [NotNull]TextureProvider texture) + public vec4d[] VertexArray => _shape.VertexStream; + + public Image TextureImage { - if (shape.VertexCount > texture.TextureCoordinate.Length) - { - throw new ArgumentException(paramName: nameof(texture), message: "Amount of texture coordination is too less"); - } - _texture = texture; - _shape = shape; + get => _texture.ProvideImage(); + internal set => _texture.ReadImage(value); } + public ReadOnlySpan MeshIndices => _shape.VertexIndices; + + public ReadOnlySpan TextureCoord => MemoryMarshal.Cast(_texture.TextureCoordinate); + public PlainGeometryMesh Resize(PlainGeometry newShape) { return new PlainGeometryMesh(newShape, _texture); } - public ReadOnlySpan MeshIndices => _shape.VertexIndices; - - public vec4d[] VertexArray => _shape.VertexStream; - - public Image TextureImage - { - get => _texture.ProvideImage(); - internal set => _texture.ReadImage( value); - } - - public ReadOnlySpan TextureCoord => MemoryMarshal.Cast( _texture.TextureCoordinate); } } diff --git a/源代码/StgSharp/Graphics/RenderStream.cs b/源代码/StgSharp/Graphics/RenderStream.cs index 4c81033e..df66fdfc 100644 --- a/源代码/StgSharp/Graphics/RenderStream.cs +++ b/源代码/StgSharp/Graphics/RenderStream.cs @@ -29,7 +29,8 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- using StgSharp.Graphics.OpenGL; -using StgSharp.Logic; +using StgSharp.Timing; + using StgSharp.Math; using StgSharp.MVVM; using StgSharp.MVVM.View; @@ -45,13 +46,14 @@ using System.Threading.Tasks; namespace StgSharp.Graphics { - public abstract class RenderStream + public abstract class RenderStream { + private protected (int x, int y, int z) _coordStretch; - private Camera nativeCamera; private protected ViewPort primeArgs; + private Camera nativeCamera; internal TimeSpanProvider _timeProvider; - + public (int width, int height) Size { get => (Width, Height); @@ -63,6 +65,11 @@ namespace StgSharp.Graphics } } + public abstract bool IsContextSharable + { + get; + } + public int Height { get => primeArgs.Height; @@ -81,11 +88,6 @@ namespace StgSharp.Graphics internal set => primeArgs.Monitor = value; } - public abstract bool IsContextSharable - { - get; - } - public string Name { get => primeArgs.Name; @@ -98,6 +100,7 @@ namespace StgSharp.Graphics get => primeArgs; internal set => primeArgs = value; } + internal IntPtr CanvasHandle { get => primeArgs.ViewPortID; } @@ -113,6 +116,11 @@ namespace StgSharp.Graphics internal set => nativeCamera = value; } + protected float FramePassed + { + get => _timeProvider.CurrentSpan; + } + protected int PassedFrames { get => _timeProvider.CurrentSpan; @@ -123,11 +131,6 @@ namespace StgSharp.Graphics get => _timeProvider.CurrentSecond; } - protected float FramePassed - { - get => _timeProvider.CurrentSpan; - } - protected TimeSpanProvider TimeProvider { get => _timeProvider; @@ -148,16 +151,16 @@ namespace StgSharp.Graphics where TTarget : RenderStream, new() { TTarget target = new TTarget(); - target.Initialize(source.Port,source._coordStretch,source._timeProvider); + target.Initialize(source.Port, source._coordStretch, source._timeProvider); return target; } - internal protected static void PollEvents() + protected internal static void PollEvents() { InternalIO.glfwPollEvents(); } - internal protected void SwapBuffers() + protected internal void SwapBuffers() { InternalIO.glfwSwapBuffers(CanvasHandle); } @@ -217,6 +220,7 @@ namespace StgSharp.Graphics #endregion + } } diff --git a/源代码/StgSharp/Graphics/ShaderEdit/ShaderGenerator.cs b/源代码/StgSharp/Graphics/ShaderEdit/ShaderGenerator.cs index 86e8fd0d..ed7e7a97 100644 --- a/源代码/StgSharp/Graphics/ShaderEdit/ShaderGenerator.cs +++ b/源代码/StgSharp/Graphics/ShaderEdit/ShaderGenerator.cs @@ -43,14 +43,15 @@ namespace StgSharp.Graphics.ShaderEdit { public class ShaderGenerator { - private Dictionary uniformDefine; + + private Dictionary uniformDefine; private List codeList; private List usedShaderFunctions; public Uniform DefineUniform(string name, int index) where T : struct { - ShaderParameter p = new ShaderParameter(name,ShaderParameter.TypeMarshal()); - uniformDefine.Add(index,p); + ShaderParameter p = new ShaderParameter(name, ShaderParameter.TypeMarshal()); + uniformDefine.Add(index, p); //return new Uniform(); throw new NotImplementedException(); } @@ -59,10 +60,11 @@ namespace StgSharp.Graphics.ShaderEdit public class ShaderFunction { + private List codeList; private List inputList; - private string name; private ShaderParameter outPut; + private string name; public int ParameterCount => inputList.Count; @@ -104,10 +106,11 @@ namespace StgSharp.Graphics.ShaderEdit public class ShaderParameter { + public static readonly ShaderParameter Void = new ShaderParameter(string.Empty, InternalShaderType.Void); internal readonly bool isReadOnly; - internal readonly string name; internal readonly InternalShaderType type; + internal readonly string name; public ShaderParameter(string name, InternalShaderType type) { diff --git a/源代码/StgSharp/Graphics/ShaderEdit/ShaderStruct.cs b/源代码/StgSharp/Graphics/ShaderEdit/ShaderStruct.cs index 179223e9..cd64c87a 100644 --- a/源代码/StgSharp/Graphics/ShaderEdit/ShaderStruct.cs +++ b/源代码/StgSharp/Graphics/ShaderEdit/ShaderStruct.cs @@ -1,4 +1,34 @@ -using StgSharp.Graphics.OpenGL; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ShaderStruct.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics.OpenGL; using System; using System.Collections.Generic; @@ -10,14 +40,19 @@ namespace StgSharp.Graphics.ShaderEdit { public class ShaderStructMember { + internal InternalShaderType type; internal object value; + } public class ShaderStruct { + internal Dictionary uniformPair; + internal ShaderStruct() { } + public ShaderStruct(params (GlHandle, ShaderStructMember)[] uniformPairs) { uniformPair = new Dictionary(); @@ -26,28 +61,28 @@ namespace StgSharp.Graphics.ShaderEdit return; } - foreach (var item in uniformPairs) + foreach ((GlHandle, ShaderStructMember) item in uniformPairs) { - uniformPair.Add(item.Item1,item.Item2); + uniformPair.Add(item.Item1, item.Item2); } } - internal ShaderStruct() { } - public unsafe void SetAllUniforms() { - OpenglContext* gl = (OpenglContext*)OpenGL.GlFunction.CurrentGL.ContextHandle; - foreach (var uniform in uniformPair) + OpenglContext* gl = (OpenglContext*)OpenGL.OpenGLFunction.CurrentGL.ContextHandle; + foreach (KeyValuePair uniform in uniformPair) { int id = uniform.Key.SignedValue; ShaderStructMember s = uniform.Value; switch (s.type) { - case InternalShaderType.Struct: throw new ArgumentException( + case InternalShaderType.Struct: + throw new ArgumentException( "Incorrect type \"Struct\" defined in this self define type"); - case InternalShaderType.Void:throw new ArgumentException( + case InternalShaderType.Void: + throw new ArgumentException( "Incorrect type \"Void\" defined in this self define type"); case InternalShaderType.Float: gl->glUniform1f(id, (float)s.value); @@ -62,5 +97,6 @@ namespace StgSharp.Graphics.ShaderEdit } } }//------------------------------------ End of Class --------------------------------------- + } } diff --git a/源代码/StgSharp/Graphics/TextureImage.cs b/源代码/StgSharp/Graphics/TextureImage.cs deleted file mode 100644 index d5de83c7..00000000 --- a/源代码/StgSharp/Graphics/TextureImage.cs +++ /dev/null @@ -1,32 +0,0 @@ -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Text; - -namespace StgSharp.Graphics -{ - public class TextureImage : IImageProvider - { - private Image _tex; - private vec2d[] _texCoord; - - Image IImageProvider.ProvideImage() - { - return _tex; - } - - public TextureImage(Image image, vec2d[] coord) - { - _tex = image; - _texCoord = coord; - } - - public ref vec2d this[int index] - { - get => ref _texCoord[index]; - } - - } -} diff --git a/源代码/StgSharp/Graphics/TexturePipeline.cs b/源代码/StgSharp/Graphics/TexturePipeline.cs index 2a340fbb..a205733d 100644 --- a/源代码/StgSharp/Graphics/TexturePipeline.cs +++ b/源代码/StgSharp/Graphics/TexturePipeline.cs @@ -1,4 +1,36 @@ -using StgSharp.Logic; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="TexturePipeline.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- + + +using StgSharp.BluePrint; using System; using System.Collections.Generic; @@ -8,19 +40,21 @@ using System.Threading.Tasks; namespace StgSharp.Graphics { - public class TexturePipeline:BlueprintPipelineArgs + public class TexturePipeline : BlueprintPipelineArgs { + + private Image _value; + public TexturePipeline(Image i) { _value = i; } - private Image _value; - public new Image Value { get => _value; set => _value = value ?? throw new ArgumentNullException(nameof(value)); } + } } diff --git a/源代码/StgSharp/Graphics/TextureProvider.cs b/源代码/StgSharp/Graphics/TextureProvider.cs index a403aa80..47839799 100644 --- a/源代码/StgSharp/Graphics/TextureProvider.cs +++ b/源代码/StgSharp/Graphics/TextureProvider.cs @@ -1,4 +1,34 @@ -using StgSharp.Math; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="TextureProvider.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Math; using System; using System.Collections.Generic; @@ -9,8 +39,20 @@ namespace StgSharp.Graphics { public class TextureProvider : IImageProvider { - private Image _tex; + private vec2d[] _texCoord; + private Image _tex; + + public TextureProvider(Image image, vec2d[] coord) + { + _tex = image; + _texCoord = coord; + } + + public ref vec2d this[int index] + { + get => ref _texCoord[index]; + } public Span TextureCoordinate { @@ -22,15 +64,9 @@ namespace StgSharp.Graphics return _tex; } - public TextureProvider(Image image, vec2d[] coord) + public void ReadImage(IImageProvider provider) { - _tex = image; - _texCoord = coord; - } - - public ref vec2d this[int index] - { - get => ref _texCoord[index]; + _tex = provider.ProvideImage(); } public void UpdateFromImage(Image i) @@ -50,10 +86,5 @@ namespace StgSharp.Graphics } - public void ReadImage(IImageProvider provider) - { - _tex = provider.ProvideImage(); - } - } } diff --git a/源代码/StgSharp/Graphics/View/ViewRender.cs b/源代码/StgSharp/Graphics/View/ViewRender.cs deleted file mode 100644 index 93de5136..00000000 --- a/源代码/StgSharp/Graphics/View/ViewRender.cs +++ /dev/null @@ -1,95 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="FormThreading.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Math; -using StgSharp.Logic; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Security.Cryptography; - -namespace StgSharp.Graphics -{ - - public abstract class ViewRender - where TView:View - { - private TView _binding; - protected ViewModelBase ModelBinding { get; set; } - private Dictionary _render; - - public TView Binding => _binding; - - protected ViewDesigner Design => _binding.Designer as ViewDesigner; - - protected ViewResponder Responder => _binding.Responder as ViewResponder; - - protected Dictionary Render - { - get => _render; - } - - protected ViewPort ContextBinding; - - public T BuildNewRenderStream(ViewPort arg, (int x, int y, int z) unitCubeSize) where T : RenderStream,new() - { - T ret = new T(); - ret.Init(arg, unitCubeSize); - ret.timeProvider = this.Binding.TimeProvider; - return ret; - } - - public RenderStream this[string renderName] - { - get => _render.TryGetValue(renderName, out RenderStream stream) ? stream : null; - internal set - { - if (_render.ContainsKey(renderName)) - { - _render[renderName] = value; - } - else - { - _render.Add(renderName, value); - } - } - } - - public abstract void CustomizedInitialize(); - - public abstract bool ValidateInitializing(); - - } -} diff --git a/源代码/StgSharp/Logic/Blueprint/Blueprint.cs b/源代码/StgSharp/Logic/Blueprint/Blueprint.cs index 452c8830..2f763dce 100644 --- a/源代码/StgSharp/Logic/Blueprint/Blueprint.cs +++ b/源代码/StgSharp/Logic/Blueprint/Blueprint.cs @@ -29,7 +29,7 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- using StgSharp; -using StgSharp.Logic; + using System; using System.Collections.Generic; @@ -43,7 +43,7 @@ using System.Threading; using System.Threading.Tasks; using System.Xml.Serialization; -namespace StgSharp.Logic +namespace StgSharp.BluePrint { /// /// A sets of complex logic designed for running in multi threads environment. @@ -79,11 +79,6 @@ namespace StgSharp.Logic public BlueprintNode BeginLayer => beginNode; public BlueprintNode EndLayer => endNode; - internal SemaphoreSlim RunningStat - { - get => runningStat; - } - public bool IsRunning { get => runningStat.CurrentCount == 0; @@ -95,6 +90,11 @@ namespace StgSharp.Logic get => terminate; set => terminate = value; } + + internal SemaphoreSlim RunningStat + { + get => runningStat; + } /**/ public void AddNode(BlueprintNode node, bool isNative) diff --git a/源代码/StgSharp/Logic/Blueprint/BlueprintActionNode.cs b/源代码/StgSharp/Logic/Blueprint/BlueprintActionNode.cs index c9d77f63..e8004707 100644 --- a/源代码/StgSharp/Logic/Blueprint/BlueprintActionNode.cs +++ b/源代码/StgSharp/Logic/Blueprint/BlueprintActionNode.cs @@ -1,4 +1,34 @@ -using StgSharp.Logic; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="BlueprintActionNode.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- + using System; using System.Collections.Generic; @@ -6,17 +36,18 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace StgSharpDebug.Logic +namespace StgSharp.BluePrint { public class BlueprintActionNode : IConvertableToBlueprintNode { - private Action, Dictionary> mainAction; + private string[] inPorts; private string[] outPorts; + private Action, Dictionary> mainAction; internal BlueprintActionNode() { - + } public string[] InputInterfacesName => inPorts; @@ -27,5 +58,6 @@ namespace StgSharpDebug.Logic { mainAction?.Invoke(input, output); } + } } diff --git a/源代码/StgSharp/Logic/Blueprint/BlueprintNode.cs b/源代码/StgSharp/Logic/Blueprint/BlueprintNode.cs index 21408f32..aab06cbe 100644 --- a/源代码/StgSharp/Logic/Blueprint/BlueprintNode.cs +++ b/源代码/StgSharp/Logic/Blueprint/BlueprintNode.cs @@ -42,7 +42,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -namespace StgSharp.Logic +namespace StgSharp.BluePrint { /// @@ -92,11 +92,11 @@ namespace StgSharp.Logic ) #pragma warning restore CS8618 { - if (inputPorts == null || inputPorts.Length == 0) + if ((inputPorts == null) || (inputPorts.Length == 0)) { throw new ArgumentNullException(nameof(inputPorts)); } - if (outputPorts == null || outputPorts.Length == 0) + if ((outputPorts == null) || (outputPorts.Length == 0)) { throw new ArgumentNullException(nameof(outputPorts)); } @@ -115,11 +115,6 @@ namespace StgSharp.Logic } } - internal IConvertableToBlueprintNode Value - { - get => mainOperation; - } - public bool IsNative { get => nativeRequested; @@ -156,6 +151,11 @@ namespace StgSharp.Logic internal Dictionary InputInterfaces => _inputInterfaces; internal Dictionary OutputInterfaces => _outputInterfaces; + internal IConvertableToBlueprintNode Value + { + get => mainOperation; + } + public void AddAfter( BlueprintNode former, @@ -262,10 +262,10 @@ namespace StgSharp.Logic #endregion - + }//--------------------------------- end of class ----------------------------------- - + public class BlueprintNodeRunException : Exception { diff --git a/源代码/StgSharp/Logic/Blueprint/BlueprintRunner.cs b/源代码/StgSharp/Logic/Blueprint/BlueprintRunner.cs index d1a8f171..9d26ca71 100644 --- a/源代码/StgSharp/Logic/Blueprint/BlueprintRunner.cs +++ b/源代码/StgSharp/Logic/Blueprint/BlueprintRunner.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="BlueprintRunner.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Data; @@ -8,20 +38,57 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -namespace StgSharp.Logic +using StgSharp.Threading; + +namespace StgSharp.BluePrint { public static class BlueprintRunner { - private static int _callingThread; - private static ConcurrentStack blueprintInWaiting = new ConcurrentStack(); - private static NodeRunner[] allAvailableTask = new NodeRunner[1]; - private static SemaphoreSlim bpLock = new SemaphoreSlim(0,1); + + private static NodeRunner[] allAvailableTask = new NodeRunner[1]; private static CancellationTokenSource cts = new CancellationTokenSource(); + private static ConcurrentStack blueprintInWaiting = new ConcurrentStack(); + private static int _callingThread; + private static SemaphoreSlim bpLock = new SemaphoreSlim(0, 1); + + internal static bool IsValidCalling + { + get + { + if ((NodeRunner.CurrentBlueprint == null) || //no bp running at all + ((blueprintInWaiting.Count == 0) && (NodeRunner.CurrentBlueprint.IsRunning == false))) // a bp is quiting + { + //in case no bp is running + return true; + } + int? id = Task.CurrentId; + if (id is null) + { + // in case calling from main thread and current running bp + //Console.WriteLine($"\t{_callingThread}"); + //Console.WriteLine($"\t{Thread.CurrentThread.ManagedThreadId}"); + return _callingThread == Thread.CurrentThread.ManagedThreadId; + } + foreach (NodeRunner item in allAvailableTask) + { + if (item.Id == id) + { + //if calling from any bp running task + return true; + } + } + return false; + } + } public static void Run(Blueprint blueprint, Func terminateInstructor) { //Console.WriteLine(); - if (blueprint == null) return; + if (blueprint == null) + { + return; + } + if (terminateInstructor == null) { throw new ArgumentNullException(nameof(terminateInstructor)); @@ -35,87 +102,23 @@ namespace StgSharp.Logic { //Console.WriteLine("valid and run"); if (InterruptAndRunNewBp(blueprint)) - do { } while(InterruptAndRunNewBp(NodeRunner.CurrentBlueprint)); + { + do { } while (InterruptAndRunNewBp(NodeRunner.CurrentBlueprint)); + } } else { bpLock.Wait(); if (InterruptAndRunNewBp(blueprint)) + { do { } while (InterruptAndRunNewBp(NodeRunner.CurrentBlueprint)); + } + bpLock.Release(); } Interlocked.Exchange(ref _callingThread, -1); } - internal static bool IsValidCalling - { - get - { - if (NodeRunner.CurrentBlueprint == null || //no bp running at all - (blueprintInWaiting.Count == 0 && NodeRunner.CurrentBlueprint.IsRunning == false)) // a bp is quiting - { - //in case no bp is running - return true; - } - int? id = Task.CurrentId; - if (id is null) - { - // in case calling from main thread and current running bp - //Console.WriteLine($"\t{_callingThread}"); - //Console.WriteLine($"\t{Thread.CurrentThread.ManagedThreadId}"); - return _callingThread == Thread.CurrentThread.ManagedThreadId; - } - foreach (var item in allAvailableTask) - { - if (item.Id == id) - { - //if calling from any bp running task - return true; - } - } - return false; - } - } - - internal static bool InterruptAndRunNewBp(Blueprint newBp) - { - Debug.Assert(newBp != null); - if (newBp != NodeRunner.CurrentBlueprint && NodeRunner.CurrentBlueprint != null) - { - //if a running bp exists - blueprintInWaiting.Push(NodeRunner.CurrentBlueprint); - } - //load new bp to current bp - Interlocked.Exchange(ref NodeRunner.CurrentBlueprint!, newBp); - Interlocked.Exchange(ref _callingThread, Thread.CurrentThread.ManagedThreadId); - //run beginning node to init it first. - if (!NodeRunner.CurrentBlueprint.IsRunning) - { - (NodeRunner.CurrentBlueprint.BeginLayer as BeginningNode)!.Run(); - } - //refresh all tasks - for (int i = 0; i < allAvailableTask.Length; i++) - { - var item = allAvailableTask[i]; - if (item is null || item.IsCompleted) - { - allAvailableTask[i] = NodeRunner.Run(); - } - } - BlueprintNode node; - while (!cts.Token.IsCancellationRequested - && NodeRunner.CurrentBlueprint.RequestNextNativeNode(out node)) - { - node.Run(); - if (!NodeRunner.CurrentBlueprint.IsRunning) - { - break; - } - } - (NodeRunner.CurrentBlueprint.EndLayer as EndingNode)!.Run(); - return blueprintInWaiting.TryPeek(out NodeRunner.CurrentBlueprint); - } - public static void SetMaxTaskCount(int size) { @@ -135,41 +138,81 @@ namespace StgSharp.Logic } Array.Resize(ref allAvailableTask, size); } - + public static void Terminate() { cts.Cancel(); NodeRunner.CurrentBlueprint.Terminate(); - foreach (var task in allAvailableTask) + foreach (NodeRunner task in allAvailableTask) { task.Cts.Cancel(); } - foreach (var bp in blueprintInWaiting) + foreach (Blueprint bp in blueprintInWaiting) { bp.Terminate(); } blueprintInWaiting.Clear(); } + internal static bool InterruptAndRunNewBp(Blueprint newBp) + { + Debug.Assert(newBp != null); + if ((newBp != NodeRunner.CurrentBlueprint) && (NodeRunner.CurrentBlueprint != null)) + { + //if a running bp exists + blueprintInWaiting.Push(NodeRunner.CurrentBlueprint); + } + //load new bp to current bp + Interlocked.Exchange(ref NodeRunner.CurrentBlueprint!, newBp); + Interlocked.Exchange(ref _callingThread, Thread.CurrentThread.ManagedThreadId); + //run beginning node to init it first. + if (!NodeRunner.CurrentBlueprint.IsRunning) + { + (NodeRunner.CurrentBlueprint.BeginLayer as BeginningNode)!.Run(); + } + //refresh all tasks + for (int i = 0; i < allAvailableTask.Length; i++) + { + NodeRunner item = allAvailableTask[i]; + if ((item is null) || item.IsCompleted) + { + allAvailableTask[i] = NodeRunner.Run(); + } + } + BlueprintNode node; + while (!cts.Token.IsCancellationRequested + && NodeRunner.CurrentBlueprint.RequestNextNativeNode(out node)) + { + node.Run(); + if (!NodeRunner.CurrentBlueprint.IsRunning) + { + break; + } + } + (NodeRunner.CurrentBlueprint.EndLayer as EndingNode)!.Run(); + return blueprintInWaiting.TryPeek(out NodeRunner.CurrentBlueprint); + } + } - internal class NodeRunner: CancellableTask + internal class NodeRunner : CancellableTask { - private static Blueprint _current; - internal static ref Blueprint CurrentBlueprint - { - get => ref _current; - } + private static Blueprint _current; internal NodeRunner() : base() { _startup = InternalRun; } + internal static ref Blueprint CurrentBlueprint + { + get => ref _current; + } + internal static NodeRunner Run() { - var ret = new NodeRunner() { _startup = InternalRun}; + NodeRunner ret = new NodeRunner { _startup = InternalRun }; ret.taskInternal = Task.Run(ret.InternalAction); return ret; } @@ -178,7 +221,7 @@ namespace StgSharp.Logic { //Console.WriteLine("Task Begin"); BlueprintNode item; - while (CurrentBlueprint != null && CurrentBlueprint.IsRunning && !token.IsCancellationRequested + while ((CurrentBlueprint != null) && CurrentBlueprint.IsRunning && !token.IsCancellationRequested && CurrentBlueprint.RequestNexGlobalNode(out item)) { //Console.WriteLine($"Get node of {item.Name}, going to run."); @@ -186,5 +229,6 @@ namespace StgSharp.Logic } //Console.WriteLine("Task Completed"); } + }//------------------------------------- End of Class ------------------------------------------ } diff --git a/源代码/StgSharp/Logic/Blueprint/BpNodeActionAttribute.cs b/源代码/StgSharp/Logic/Blueprint/BpNodeActionAttribute.cs index 54e696be..0f7bedcf 100644 --- a/源代码/StgSharp/Logic/Blueprint/BpNodeActionAttribute.cs +++ b/源代码/StgSharp/Logic/Blueprint/BpNodeActionAttribute.cs @@ -1,35 +1,48 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="BpNodeActionAttribute.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Text; -namespace StgSharp.Logic +namespace StgSharp.BluePrint { [AttributeUsage(AttributeTargets.Method)] public sealed class BpNodeActionAttribute : Attribute { + private string[] _input; private string[] _output; private int _operationSpan; - public string[] InputPort => _input; - public string[] OutputPort => _output; - public int OperationSpan => _operationSpan; - - public BpNodeActionAttribute(string[] inputPort, string[] outputPort, int operationSpan) - { - _input = inputPort; - _output = outputPort; - this._operationSpan = operationSpan; - } - - public BpNodeActionAttribute(string[] inputPort, string[] outputPort) - { - _input = inputPort; - _output = outputPort; - this._operationSpan = 1; - } - public BpNodeActionAttribute(int operationSpan) { _input = Array.Empty(); @@ -37,5 +50,23 @@ namespace StgSharp.Logic _operationSpan = operationSpan; } + public BpNodeActionAttribute(string[] inputPort, string[] outputPort) + { + _input = inputPort; + _output = outputPort; + this._operationSpan = 1; + } + + public BpNodeActionAttribute(string[] inputPort, string[] outputPort, int operationSpan) + { + _input = inputPort; + _output = outputPort; + this._operationSpan = operationSpan; + } + + public string[] InputPort => _input; + public string[] OutputPort => _output; + public int OperationSpan => _operationSpan; + } } diff --git a/源代码/StgSharp/Logic/Blueprint/BpNodeBuilder.cs b/源代码/StgSharp/Logic/Blueprint/BpNodeBuilder.cs index 66dd6af5..488d7edb 100644 --- a/源代码/StgSharp/Logic/Blueprint/BpNodeBuilder.cs +++ b/源代码/StgSharp/Logic/Blueprint/BpNodeBuilder.cs @@ -1,24 +1,55 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="BpNodeBuilder.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Text; -namespace StgSharp.Logic +namespace StgSharp.BluePrint { public static class BpNodeConverter { + public static IConvertableToBlueprintNode AsBlueprintNodeMainExecution(this BlueprintNodeOperation startUp) { if (startUp == null) { throw new ArgumentNullException(nameof(startUp)); } - var attributeArray = startUp.Method.GetCustomAttributes(typeof(BpNodeActionAttribute), false); - var attri = (BpNodeActionAttribute)attributeArray[0]; - if (attributeArray.Length < 0 || attri == null) + object[] attributeArray = startUp.Method.GetCustomAttributes(typeof(BpNodeActionAttribute), false); + BpNodeActionAttribute attri = (BpNodeActionAttribute)attributeArray[0]; + if ((attributeArray.Length < 0) || (attri == null)) { throw new InvalidCastException($"Delegate {nameof(startUp)} is not marked by {typeof(BpNodeActionAttribute)}"); } - return new DefaultConvertableToBlueprintNode(startUp,attri.InputPort, attri.OutputPort); + return new DefaultConvertableToBlueprintNode(startUp, attri.InputPort, attri.OutputPort); } public static IConvertableToBlueprintNode AsBlueprintNodeMainExecution(this Action startUp) @@ -27,13 +58,13 @@ namespace StgSharp.Logic { throw new ArgumentNullException(nameof(startUp)); } - var attributeArray = startUp.Method.GetCustomAttributes(typeof(BpNodeActionAttribute), false); - var attri = (BpNodeActionAttribute)attributeArray[0]; - if (attributeArray.Length < 0 || attri == null) + object[] attributeArray = startUp.Method.GetCustomAttributes(typeof(BpNodeActionAttribute), false); + BpNodeActionAttribute attri = (BpNodeActionAttribute)attributeArray[0]; + if ((attributeArray.Length < 0) || (attri == null)) { throw new InvalidCastException($"Delegate {nameof(startUp)} is not marked by {typeof(BpNodeActionAttribute)}"); } - return new CrossFrameOperation(startUp,attri.OperationSpan); + return new CrossFrameOperation(startUp, attri.OperationSpan); } } diff --git a/源代码/StgSharp/Logic/Blueprint/CrossCycleProcess.cs b/源代码/StgSharp/Logic/Blueprint/CrossCycleProcess.cs deleted file mode 100644 index 8b7725dc..00000000 --- a/源代码/StgSharp/Logic/Blueprint/CrossCycleProcess.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Logic -{ - /* - public class CrossCycleProcess:BlueprintNode - { - - public CrossCycleProcess(string name, Action operation) - :base() - { - - } - - } - /**/ -} diff --git a/源代码/StgSharp/Graphics/View/FormThreading.cs b/源代码/StgSharp/Logic/Blueprint/CrossFrameBlueprintNode.cs similarity index 54% rename from 源代码/StgSharp/Graphics/View/FormThreading.cs rename to 源代码/StgSharp/Logic/Blueprint/CrossFrameBlueprintNode.cs index be244df9..77c2085a 100644 --- a/源代码/StgSharp/Graphics/View/FormThreading.cs +++ b/源代码/StgSharp/Logic/Blueprint/CrossFrameBlueprintNode.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="FormThreading.cs" +// file="CrossFrameBlueprintNode.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,47 +28,56 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Math; -using StgSharp.Logic; +using StgSharp.BluePrint; using System; using System.Collections.Generic; -using System.Linq; -using System.Reflection; using System.Text; using System.Threading; using System.Threading.Tasks; -namespace StgSharp.Graphics +namespace StgSharp.BluePrint { - public partial class View + public class CrossFrameOperation : IConvertableToBlueprintNode { - internal Blueprint localLogic; - /* - private void GatherSingleFrameAsyncThread(MethodInfo[] methods) + private int currentCount; + + private readonly int cycleCount; + + public CrossFrameOperation(Action startup, int cycleCount) { - if (methods.Length == 0) - { - return; - } - foreach (MethodInfo m in methods) //find all methods decorated by RenderActivityAttribute - { - RenderActivityAttribute attr = m.GetCustomAttribute(false); - if (attr == null) - { - continue; - } - if (!m.IsStatic && (m.GetParameters().Length != 0) && (m.ReturnType != typeof(void))) - { - throw new NotSupportedException("A render activity cannot have parameters, returning value or be static."); - } - ThreadStart s = (ThreadStart)Delegate.CreateDelegate(typeof(ThreadStart), this, m); - FrameAsyncThread thread = new(s, attr._priority); - //singleFrameAsyncThreadList.Add(thread); - } + MainExecution = startup; + this.cycleCount = (cycleCount > 1) ? cycleCount : throw new ArgumentException( + $"{$"The {typeof(CrossFrameOperation).Name} crosses only one cycle, "}{$"please use a {typeof(BlueprintNode).Name} instead."}"); + this.cycleCount = cycleCount; + currentCount = cycleCount; } - /**/ + + public Action MainExecution { get; private protected set; } + + public static string InputInterfacesName => "TaskIn"; + + public static string OutputInterfacesName => "TaskOut"; + + public void ExecuteMain(in Dictionary input, in Dictionary output) + { + if (currentCount < cycleCount) + { + Interlocked.Increment(ref currentCount); + } + else + { + Interlocked.Exchange(ref currentCount, 0); + Task.Run(MainExecution); + } + //Console.WriteLine(currentCount); + BlueprintPipeline.SkipAll(output); + } + + string[] IConvertableToBlueprintNode.InputInterfacesName => [InputInterfacesName]; + + string[] IConvertableToBlueprintNode.OutputInterfacesName => [OutputInterfacesName]; } } diff --git a/源代码/StgSharp/Logic/Blueprint/IConvertableToBlueprintNode.cs b/源代码/StgSharp/Logic/Blueprint/IConvertableToBlueprintNode.cs index f3f6f5d3..0201d8a2 100644 --- a/源代码/StgSharp/Logic/Blueprint/IConvertableToBlueprintNode.cs +++ b/源代码/StgSharp/Logic/Blueprint/IConvertableToBlueprintNode.cs @@ -1,12 +1,46 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="IConvertableToBlueprintNode.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Text; -namespace StgSharp.Logic +namespace StgSharp.BluePrint { + + public delegate void BlueprintNodeOperation(in Dictionary input, in Dictionary output); + public interface IConvertableToBlueprintNode { + #pragma warning disable CA1819 public string[] InputInterfacesName { get; } #pragma warning restore CA1819 @@ -15,34 +49,36 @@ namespace StgSharp.Logic public string[] OutputInterfacesName { get; } #pragma warning restore CA1819 + [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ExecuteMain( in Dictionary input, in Dictionary output); + } internal class DefaultConvertableToBlueprintNode : IConvertableToBlueprintNode { + private string[] _input; private string[] _output; private BlueprintNodeOperation _execution; - string[] IConvertableToBlueprintNode.InputInterfacesName => _input; - - string[] IConvertableToBlueprintNode.OutputInterfacesName => _output; - - void IConvertableToBlueprintNode.ExecuteMain(in Dictionary input, in Dictionary output) - { - _execution(in input, in output); - } - public DefaultConvertableToBlueprintNode(BlueprintNodeOperation execution, string[] input, string[] output) { _input = input; _output = output; _execution = execution; } - } - public delegate void BlueprintNodeOperation(in Dictionary input, in Dictionary output); + void IConvertableToBlueprintNode.ExecuteMain(in Dictionary input, in Dictionary output) + { + _execution(in input, in output); + } + + string[] IConvertableToBlueprintNode.InputInterfacesName => _input; + + string[] IConvertableToBlueprintNode.OutputInterfacesName => _output; + + } } diff --git a/源代码/StgSharp/Logic/Blueprint/PipeLine.cs b/源代码/StgSharp/Logic/Blueprint/PipeLine.cs index 0cfae0df..4f32c541 100644 --- a/源代码/StgSharp/Logic/Blueprint/PipeLine.cs +++ b/源代码/StgSharp/Logic/Blueprint/PipeLine.cs @@ -38,11 +38,12 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -namespace StgSharp.Logic +namespace StgSharp.BluePrint { public class BlueprintPipeline { + private BlueprintNode after; private BlueprintNode former; private BlueprintPipelineArgs args; @@ -59,14 +60,55 @@ namespace StgSharp.Logic public BlueprintNode Former => former; - public int Level => former.Level; - public BlueprintPipelineArgs Args { get => args; set => args = value; } + public int Level => former.Level; + + public static void SkipAll(Dictionary ports) + { + if (ports == null) + { + throw new ArgumentNullException(nameof(ports)); + } + foreach (KeyValuePair item in ports) + { + if (item.Value != null) + { + item.Value.CompleteAndSkip(); + } + } + } + + public static void WaitAll(Dictionary ports) + { + if (ports == null) + { + throw new ArgumentNullException(nameof(ports)); + } + foreach (KeyValuePair item in ports) + { + if (item.Value != null) + { + item.Value.WaitForStart(); + } + } + } + + public void WaitForStart() + { + //Console.WriteLine($"Waiting \t{former.ContextName}\t->\t{after.ContextName}"); + formerCompleteSemaphore.Wait(); + } + + ~BlueprintPipeline() + { + formerCompleteSemaphore.Dispose(); + } + #region pipline op [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -85,52 +127,13 @@ namespace StgSharp.Logic #endregion - public static void SkipAll(Dictionary ports) - { - if (ports == null) - { - throw new ArgumentNullException(nameof(ports)); - } - foreach (var item in ports) - { - if (item.Value!=null) - { - item.Value.CompleteAndSkip(); - } - } - } - - public static void WaitAll(Dictionary ports) - { - if (ports == null) - { - throw new ArgumentNullException(nameof(ports)); - } - foreach (var item in ports) - { - if (item.Value!=null) - { - item.Value.WaitForStart(); - } - } - } - - public void WaitForStart() - { - //Console.WriteLine($"Waiting \t{former.ContextName}\t->\t{after.ContextName}"); - formerCompleteSemaphore.Wait(); - } - - ~BlueprintPipeline() - { - formerCompleteSemaphore.Dispose(); - } } public abstract class BlueprintPipelineArgs { + public object? Value { get; set; } } diff --git a/源代码/StgSharp/Logic/Blueprint/RouteSwitch.cs b/源代码/StgSharp/Logic/Blueprint/RouteSwitch.cs index 1855e1fa..88edae4e 100644 --- a/源代码/StgSharp/Logic/Blueprint/RouteSwitch.cs +++ b/源代码/StgSharp/Logic/Blueprint/RouteSwitch.cs @@ -35,10 +35,11 @@ using System.Reflection.Emit; using System.Security.Cryptography.X509Certificates; using System.Text; -namespace StgSharp.Logic +namespace StgSharp.BluePrint { public class RouteSwitch : BlueprintNode { + private protected Dictionary openingRule)> outputDictionary; public RouteSwitch(string name, bool isNative, string inputPorts) : diff --git a/源代码/StgSharp/Logic/Blueprint/SideNode.cs b/源代码/StgSharp/Logic/Blueprint/SideNode.cs index 69b18b5f..9e580b2c 100644 --- a/源代码/StgSharp/Logic/Blueprint/SideNode.cs +++ b/源代码/StgSharp/Logic/Blueprint/SideNode.cs @@ -1,4 +1,34 @@ -using StgSharp.Logic; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="SideNode.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- + using System; using System.Collections.Generic; @@ -8,13 +38,14 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -namespace StgSharp.Logic +namespace StgSharp.BluePrint { internal sealed class BeginningNode : BlueprintNode { + private Blueprint _bp; - public BeginningNode( Blueprint bp ) : base(name: "BeginningNode",true, ["default"], ["default"] + public BeginningNode(Blueprint bp) : base(name: "BeginningNode", true, ["default"], ["default"] ) { _bp = bp; @@ -28,13 +59,19 @@ namespace StgSharp.Logic { return; } - foreach (var parameter in value) + foreach ((string name, BlueprintPipelineArgs arg) parameter in value) { OutputInterfaces[parameter.name].Args = parameter.arg; } } } + public override void Run() + { + _bp.RunningStat.Wait(); + BlueprintPipeline.SkipAll(_outputInterfaces); + } + public new void SetCertainOutputPort(string name, BlueprintPipeline pipeline) { if (_outputInterfaces.ContainsKey(name)) @@ -44,18 +81,14 @@ namespace StgSharp.Logic _outputInterfaces.Add(name, pipeline); } - public override void Run() - { - _bp.RunningStat.Wait(); - BlueprintPipeline.SkipAll(_outputInterfaces); - } } internal sealed class EndingNode : BlueprintNode { + private Blueprint _bp; - public EndingNode(Blueprint bp) : base(name: "EndingNode",true, ["default"], ["default"] + public EndingNode(Blueprint bp) : base(name: "EndingNode", true, ["default"], ["default"] ) { _bp = bp; @@ -63,12 +96,15 @@ namespace StgSharp.Logic internal (string name, BlueprintPipelineArgs arg)[] OutputData { - get - { - return InputInterfaces.Select( - key => (key.Key, key.Value.Args)). - ToArray(); - } + get { return InputInterfaces.Select(key => (key.Key, key.Value.Args)).ToArray(); } + } + + public override void Run() + { + BlueprintPipeline.WaitAll(_inputInterfaces); + Interlocked.Exchange(ref _bp.currentGlobalNodeIndex, 0); + Interlocked.Exchange(ref _bp.currentNativeNodeIndex, 0); + _bp.RunningStat.Release(); } public new void SetCertainInputPort(string name, BlueprintPipeline pipeline) @@ -80,12 +116,5 @@ namespace StgSharp.Logic _inputInterfaces.Add(name, pipeline); } - public override void Run() - { - BlueprintPipeline.WaitAll(_inputInterfaces); - Interlocked.Exchange(ref _bp.currentGlobalNodeIndex, 0); - Interlocked.Exchange(ref _bp.currentNativeNodeIndex, 0); - _bp.RunningStat.Release(); - } } } \ No newline at end of file diff --git a/源代码/StgSharp/Logic/CancellableTask.cs b/源代码/StgSharp/Logic/CancellableTask.cs index e51c4822..3810711a 100644 --- a/源代码/StgSharp/Logic/CancellableTask.cs +++ b/源代码/StgSharp/Logic/CancellableTask.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="CancellableTask.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; @@ -6,25 +36,16 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -namespace StgSharp.Logic +namespace StgSharp.Threading { internal class CancellableTask { - private CancellationTokenSource cts; - private protected Task taskInternal; + private protected Action _startup; + private protected Task taskInternal; + private CancellationTokenSource cts; - public CancellationTokenSource Cts - { - get => cts; - } - - public int Id - { - get =>taskInternal.Id; - } - - private protected CancellableTask() + private protected CancellableTask() { cts = new CancellationTokenSource(); } @@ -35,16 +56,19 @@ namespace StgSharp.Logic cts = new CancellationTokenSource(); } - public static CancellableTask Run(Action startup) + public bool IsCompleted { - var ret = new CancellableTask() { _startup = startup }; - ret.taskInternal = Task.Run(ret.InternalAction); - return ret; + get => taskInternal.IsCompleted; } - public bool IsCompleted - { - get => taskInternal.IsCompleted; + public CancellationTokenSource Cts + { + get => cts; + } + + public int Id + { + get => taskInternal.Id; } public void Cancel() @@ -52,9 +76,18 @@ namespace StgSharp.Logic Cts.Cancel(); } - ~CancellableTask() + public static CancellableTask Run(Action startup) { - Cts.Dispose(); + CancellableTask ret = new CancellableTask { _startup = startup }; + ret.taskInternal = Task.Run(ret.InternalAction); + return ret; + } + + public static void WaitAll(IEnumerable tasks) + { + IEnumerable convertedTasks = tasks.Select + (ct => ct.taskInternal); + Task.WaitAll(convertedTasks.ToArray()); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -64,17 +97,15 @@ namespace StgSharp.Logic _startup(Cts.Token); } - public static void WaitAll(IEnumerable tasks) - { - IEnumerable convertedTasks = tasks.Select - (ct=>ct.taskInternal); - Task.WaitAll(convertedTasks.ToArray()); - } - - public static implicit operator Task(CancellableTask task) + public static implicit operator Task(CancellableTask task) { return task.taskInternal; } + ~CancellableTask() + { + Cts.Dispose(); + } + } } diff --git a/源代码/StgSharp/Logic/Collections/BidirectionalDictionary.cs b/源代码/StgSharp/Logic/Collections/BidirectionalDictionary.cs new file mode 100644 index 00000000..98846ba6 --- /dev/null +++ b/源代码/StgSharp/Logic/Collections/BidirectionalDictionary.cs @@ -0,0 +1,213 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="BidirectionalDictionary.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics.CodeAnalysis; +using System.Linq; + +namespace StgSharp.Collections +{ + public sealed class BidirectionalDictionary : IBidirectionalDictionary + { + + private readonly Dictionary _forward; + private readonly Dictionary _reverse; + + public BidirectionalDictionary() + { + _forward = new Dictionary(); + _reverse = new Dictionary(); + } + + public TFirst this[TSecond key] + { + get + { + if (_reverse.TryGetValue(key,out TFirst value)) + { + return value; + } + throw new ArgumentException($"Cannot find key {key!.ToString()} in dictionary."); + } + set + { + if (_reverse.TryGetValue(key,out TFirst origin)) + { + _reverse[key] = value; + _forward.Remove(origin); + } + else + { + _reverse.Add(key, value); + } + _forward.Add(value, key); + } + } + + public TSecond this[TFirst key] + { + get + { + if (_forward.TryGetValue(key, out TSecond value)) + { + return value; + } + throw new ArgumentException($"Cannot find key {key!.ToString()} in dictionary."); + } + set + { + if (_forward.TryGetValue(key, out TSecond origin)) + { + _forward[key] = value; + _reverse.Remove(origin); + } + else + { + _forward.Add(key, value); + } + _reverse.Add(value, key); + } + } + + public bool IsReadOnly => false; + + public ICollection FirstIndex => _forward.Keys; + + public ICollection SecondIndex => _reverse.Keys; + + public int Count => _forward.Count; + + public IReadOnlyDictionary Forward => new ReadOnlyDictionary(_forward); + + public IReadOnlyDictionary Reverse => new ReadOnlyDictionary(_reverse); + + public void Add( KeyValuePair item ) + { + if (_forward.ContainsKey(item.Key) || _reverse.ContainsKey(item.Value)) + { + throw new ArgumentException("Duplicate key or value."); + } + _forward.Add(item.Key,item.Value); + _reverse.Add(item.Value, item.Key); + } + + public void Add( TFirst key, TSecond value ) + { + if (_forward.ContainsKey(key) || _reverse.ContainsKey(value)) + { + throw new ArgumentException("Duplicate key or value."); + } + _forward.Add(key, value); + _reverse.Add(value, key); + } + + public void Clear() + { + _forward.Clear(); + _reverse.Clear(); + } + + public bool Contains( KeyValuePair item ) + { + return _forward.Contains(item) && _reverse.TryGetValue(item.Value, out TFirst var) && var!.Equals(item.Key) ; + } + + public bool Contains(TSecond key) + { + return _reverse.ContainsKey(key); + } + + public bool Contains(TFirst key) + { + return _forward.ContainsKey(key); + } + + public void CopyTo( KeyValuePair[] array, int arrayIndex ) + { + if (array == null) + { + throw new ArgumentNullException(nameof(array)); + } + if (arrayIndex < 0 || arrayIndex > array.Length) + { + throw new ArgumentOutOfRangeException(nameof(arrayIndex)); + } + if (array.Length - arrayIndex < _forward.Count) + { + throw new ArgumentException("The array is too small to copy the elements."); + } + + foreach (var pair in _forward) + { + array[arrayIndex ++] = pair; + } + } + + public IEnumerator> GetEnumerator() + { + foreach (var pair in _forward) + { + yield return pair; + } + } + + public bool Remove( TFirst key ) { throw new NotImplementedException(); } + + public bool Remove( KeyValuePair item ) + { + if (_forward.Remove(item.Key)) + { + return _reverse.Remove(item.Value); + } + return false; + + } + + public bool TryGetValue( TFirst key, out TSecond value ) + { + return _forward.TryGetValue(key, out value); + } + + public bool TryGetValue(TSecond key, out TFirst value) + { + return _reverse.TryGetValue(key, out value); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + } + +} \ No newline at end of file diff --git a/源代码/StgSharp/Logic/Collections/IBidrirectionalDictionary.cs b/源代码/StgSharp/Logic/Collections/IBidrirectionalDictionary.cs new file mode 100644 index 00000000..418497c0 --- /dev/null +++ b/源代码/StgSharp/Logic/Collections/IBidrirectionalDictionary.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace StgSharp.Collections +{ + public interface IBidirectionalDictionary : + IDictionary + { +#pragma warning disable CA1033 + ICollection IDictionary.Keys => FirstIndex; + ICollection IDictionary.Values => SecondIndex; + bool IDictionary.ContainsKey(TFirst key) => Contains(key); +#pragma warning restore CA1033 + + public IReadOnlyDictionary Forward { get; } + public IReadOnlyDictionary Reverse { get; } + + public ICollection FirstIndex { get;} + + public ICollection SecondIndex { get; } + + public TFirst this[TSecond key] { get;set; } + + /// + /// Determines whether the contains the + /// specified key. + /// + /// The value to locate in the . + /// + /// true if the contains an element with the + /// specified key; otherwise, false. + /// + public bool Contains(TSecond key); + + /// + /// Determines whether the contains the + /// specified key. + /// + /// The value to locate in the . + /// + /// true if the contains an element with the + /// specified key; otherwise, false. + /// + public bool Contains(TFirst key); + + public bool TryGetValue(TSecond key, out TFirst value); + } +} \ No newline at end of file diff --git a/源代码/StgSharp/Logic/SizeFixedList.cs b/源代码/StgSharp/Logic/Collections/SizeFixedList.cs similarity index 60% rename from 源代码/StgSharp/Logic/SizeFixedList.cs rename to 源代码/StgSharp/Logic/Collections/SizeFixedList.cs index 46ae7565..fd53c866 100644 --- a/源代码/StgSharp/Logic/SizeFixedList.cs +++ b/源代码/StgSharp/Logic/Collections/SizeFixedList.cs @@ -1,29 +1,60 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="SizeFixedList.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections; using System.Collections.Generic; using System.Reflection; using System.Text; -namespace StgSharp.Logic +namespace StgSharp.Collections { internal class SizeFixedList : IList { - private int capacity, _index; + private T[] values; + private int capacity, _index; public SizeFixedList(int size) { values = new T[size]; } - public T this[int index] + public T this[int index] { - get => index<_index ? values[index] : throw new ArgumentOutOfRangeException(nameof(index)); - set + get => (index < _index) ? values[index] : throw new ArgumentOutOfRangeException(nameof(index)); + set { - if (true) + if (index < _index) { - values[index] = value ; + values[index] = value; } else { @@ -32,10 +63,10 @@ namespace StgSharp.Logic } } - public int Count => _index + 1; - public bool IsReadOnly => false; + public int Count => _index + 1; + public void Add(T item) { if (_index < capacity - 1) @@ -88,11 +119,11 @@ namespace StgSharp.Logic return -1; } - public void Insert(int index, T item) + void IList.Insert(int index, T item) { throw new NotSupportedException(); } - + public bool Remove(T item) { @@ -108,25 +139,6 @@ namespace StgSharp.Logic return false; } - public void RemoveAt(int index) - { - if (index <= _index) - { - values[index] = values[_index]; - _index--; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - yield return GetEnumerator(); - } - - public void Resize(int newSize) - { - Array.Resize(ref values, newSize); - } - public void RemoveAll(Predicate predicate) { for (int i = _index; i > 0; i--) @@ -138,5 +150,25 @@ namespace StgSharp.Logic } } } + + public void RemoveAt(int index) + { + if (index <= _index) + { + values[index] = values[_index]; + _index--; + } + } + + public void Resize(int newSize) + { + Array.Resize(ref values, newSize); + } + + IEnumerator IEnumerable.GetEnumerator() + { + yield return GetEnumerator(); + } + }//------------------------------------- End of Class ------------------------------------------ } diff --git a/源代码/StgSharp/Logic/Counter.cs b/源代码/StgSharp/Logic/Counter.cs index eadd526b..a70d5731 100644 --- a/源代码/StgSharp/Logic/Counter.cs +++ b/源代码/StgSharp/Logic/Counter.cs @@ -35,17 +35,21 @@ namespace StgSharp { public class Counter where T : struct, IConvertible, IFormattable, IComparable +#if NET8_OR_GREATER + ,INumber +#endif + { + internal dynamic _value; + internal readonly T _defualtAddValue; internal readonly T _defualtSubValue; internal readonly T _defualtValue; - internal dynamic _value; - public Counter(T defualtValue, T defualtAddValue, T defualtSubValue) { - var type = Type.GetTypeCode(defualtValue.GetType()); + TypeCode type = Type.GetTypeCode(defualtValue.GetType()); switch (type) { case TypeCode.Byte: diff --git a/源代码/StgSharp/Logic/CrossFrameBlueprintNode.cs b/源代码/StgSharp/Logic/CrossFrameBlueprintNode.cs deleted file mode 100644 index 260368df..00000000 --- a/源代码/StgSharp/Logic/CrossFrameBlueprintNode.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace StgSharp.Logic -{ - public class CrossFrameOperation : IConvertableToBlueprintNode - { - public Action MainExecution { get; private protected set; } - - private readonly int cycleCount; - private int currentCount; - - public static string InputInterfacesName => "TaskIn"; - - public static string OutputInterfacesName => "TaskOut"; - - string[] IConvertableToBlueprintNode.InputInterfacesName => [InputInterfacesName]; - - string[] IConvertableToBlueprintNode.OutputInterfacesName => [OutputInterfacesName]; - - public void ExecuteMain(in Dictionary input, in Dictionary output) - { - if (currentCount < cycleCount) - { - Interlocked.Increment(ref currentCount); - } - else - { - Interlocked.Exchange(ref currentCount, 0); - Task.Run(MainExecution); - } - //Console.WriteLine(currentCount); - BlueprintPipeline.SkipAll(output); - } - - public CrossFrameOperation(Action startup, int cycleCount) - { - MainExecution = startup; - this.cycleCount = cycleCount > 1 ? cycleCount : throw new ArgumentException( - $"The {typeof(CrossFrameOperation).Name} crosses only one cycle, " + - $"please use a {typeof(BlueprintNode).Name} instead."); - this.cycleCount = cycleCount; - currentCount = cycleCount; - } - - } -} diff --git a/源代码/StgSharp/Logic/Sensor.cs b/源代码/StgSharp/Logic/Sensor.cs index 1bad6f77..e247f31f 100644 --- a/源代码/StgSharp/Logic/Sensor.cs +++ b/源代码/StgSharp/Logic/Sensor.cs @@ -39,24 +39,24 @@ namespace StgSharp { internal PlainGeometry _boarder; - internal SensorRuleHandler _rule; internal PlainGeometry _target; + internal SensorRuleHandler _rule; public PlainGeometry boarder => _boarder; - public SensorRuleHandler Rule - { - get => _rule; - set => _rule = value; - } - public PlainGeometry target { get => _target; set => _target = value; } + public SensorRuleHandler Rule + { + get => _rule; + set => _rule = value; + } + public static Sensor operator -(Sensor sensor, SensorRuleHandler rule) { sensor._rule -= rule; diff --git a/源代码/StgSharp/Logic/TimeFunction.cs b/源代码/StgSharp/Logic/Timing/TimeFunction.cs similarity index 98% rename from 源代码/StgSharp/Logic/TimeFunction.cs rename to 源代码/StgSharp/Logic/Timing/TimeFunction.cs index ef4343bd..d96fb40d 100644 --- a/源代码/StgSharp/Logic/TimeFunction.cs +++ b/源代码/StgSharp/Logic/Timing/TimeFunction.cs @@ -32,10 +32,11 @@ using System; using System.Collections.Generic; using System.Text; -namespace StgSharp +namespace StgSharp.Timing { public class TimeFunction { + private float _beginning, _ending; private Func _timeRelatedCalculation; private TimeSpanProvider _timeProvider; @@ -62,17 +63,17 @@ namespace StgSharp get => _timeProvider.CurrentSecond > _ending; } - public static TimeFunction One - { - get => new TimeFunctionOne(); - } - public Func TimeRelatedCalculation { get { return _timeRelatedCalculation; } set { _timeRelatedCalculation = value; } } + public static TimeFunction One + { + get => new TimeFunctionOne(); + } + public TimeSpanProvider TimeSpanProvider { get { return _timeProvider; } @@ -105,12 +106,6 @@ namespace StgSharp return new TimeFunction(_timeProvider, func, range); } - public virtual TimeFunction Reverse() - { - float range = _ending - _beginning; - return new TimeFunction(_timeProvider, p => _timeRelatedCalculation(range - p) ,range); - } - public void Reset() { float range = _ending - _beginning; @@ -118,6 +113,12 @@ namespace StgSharp _ending = _beginning + range; } + public virtual TimeFunction Reverse() + { + float range = _ending - _beginning; + return new TimeFunction(_timeProvider, p => _timeRelatedCalculation(range - p), range); + } + } @@ -152,7 +153,7 @@ namespace StgSharp public new void Reset() #pragma warning restore CA1822 { - + } } diff --git a/源代码/StgSharp/Logic/TimeSourceProvider.cs b/源代码/StgSharp/Logic/Timing/TimeSourceProvider.cs similarity index 98% rename from 源代码/StgSharp/Logic/TimeSourceProvider.cs rename to 源代码/StgSharp/Logic/Timing/TimeSourceProvider.cs index c11fddd1..a8ba8b56 100644 --- a/源代码/StgSharp/Logic/TimeSourceProvider.cs +++ b/源代码/StgSharp/Logic/Timing/TimeSourceProvider.cs @@ -34,17 +34,15 @@ using System; using System.Linq; using System.Threading; -namespace StgSharp.Logic +namespace StgSharp.Timing { - - public abstract class TimeSourceProviderBase { private SemaphoreSlim _addSubscriberSemaphore = new SemaphoreSlim(1, 1); protected SemaphoreSlim CheckSubscriberSemaphore - { + { get => _addSubscriberSemaphore; } diff --git a/源代码/StgSharp/Logic/TimeSpanProvider.cs b/源代码/StgSharp/Logic/Timing/TimeSpanProvider.cs similarity index 98% rename from 源代码/StgSharp/Logic/TimeSpanProvider.cs rename to 源代码/StgSharp/Logic/Timing/TimeSpanProvider.cs index a8a509fe..96e57b9e 100644 --- a/源代码/StgSharp/Logic/TimeSpanProvider.cs +++ b/源代码/StgSharp/Logic/Timing/TimeSpanProvider.cs @@ -28,13 +28,13 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Logic; + using System; using System.Linq; using System.Threading; -namespace StgSharp +namespace StgSharp.Timing { /// @@ -53,7 +53,7 @@ namespace StgSharp private SemaphoreSlim _refreshSemaphore = new SemaphoreSlim(0, 1); private readonly TimeSourceProviderBase _timeSource; - + /// /// Create a new and define the length of time span. Length of a single time span is defined in microseconds. @@ -115,31 +115,6 @@ namespace StgSharp _subscribed = true; } - public int CurrentSpan - { - get => timeSpanCount.Value; - } - - public float CurrentSecond - { - get => timeSpanCount.Value * SpanLengthLowPrecession; - } - - /// - /// Time source provider provided in internal framework. - /// - public static TimeSourceProviderBase DefaultProvider => StgSharpTime.OnlyInstance; - - public double SpanLength - { - get => (_spanLength * 1.0) / (1000L * 1000L); - } - - public float SpanLengthLowPrecession - { - get => (_spanLength * 1.0f) / (1000 * 1000); - } - /// /// The method this will call every time a new time span started. /// @@ -149,6 +124,31 @@ namespace StgSharp set => _refreshCallback = value; } + public double SpanLength + { + get => (_spanLength * 1.0) / (1000L * 1000L); + } + + public float CurrentSecond + { + get => timeSpanCount.Value * SpanLengthLowPrecession; + } + + public float SpanLengthLowPrecession + { + get => (_spanLength * 1.0f) / (1000 * 1000); + } + + public int CurrentSpan + { + get => timeSpanCount.Value; + } + + /// + /// Time source provider provided in internal framework. + /// + public static TimeSourceProviderBase DefaultProvider => StgSharpTime.OnlyInstance; + public void SubscribeToTimeSource(TimeSourceProviderBase serviceHandler) { if (serviceHandler == null) @@ -163,6 +163,11 @@ namespace StgSharp serviceHandler.AddSubscriber(this); } + public int ToInt32() + { + return timeSpanCount.Value; + } + public void WaitNextSpan() { _refreshSemaphore.Wait(); @@ -209,9 +214,5 @@ namespace StgSharp return provider.ToInt32(); } - public int ToInt32() - { - return (int)timeSpanCount.Value; - } } } \ No newline at end of file diff --git a/源代码/StgSharp/Logic/ViewModel/DataBinding.cs b/源代码/StgSharp/Logic/ViewModel/DataBinding.cs deleted file mode 100644 index 685912fa..00000000 --- a/源代码/StgSharp/Logic/ViewModel/DataBinding.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Common; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Runtime.InteropServices; -using System.Security.Cryptography.X509Certificates; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharpDebug.Logic -{ -#nullable enable - - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate ref object BindingDataGetter(); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void BindingDataSetter(ref object value); - - public unsafe struct DataBindingEntry - { - private IntPtr getterPtr, setterPtr; - - public DataBindingEntry( - [NotNull] BindingDataGetter gettingCallback, - [NotNull] BindingDataSetter settingCallback) - { - getterPtr = Marshal.GetFunctionPointerForDelegate(gettingCallback); - setterPtr = Marshal.GetFunctionPointerForDelegate(settingCallback); - } - - public ref object GetValue() - { - return ref ((delegate* unmanaged[Cdecl])getterPtr)(); - } - - public void SetData(ref object value) - { - ((delegate* unmanaged[Cdecl])setterPtr)(ref value); - } - - public static DataBindingEntry NullBinding - { - get => new DataBindingEntry(); - } - - public bool ExactEqual(DataBindingEntry other) - { - return getterPtr == other.getterPtr && setterPtr == other.setterPtr; - } - } - -#nullable restore -} diff --git a/源代码/StgSharp/Logic/ViewModel/ShowViewPort.cs b/源代码/StgSharp/Logic/ViewModel/ShowViewPort.cs deleted file mode 100644 index 9879964c..00000000 --- a/源代码/StgSharp/Logic/ViewModel/ShowViewPort.cs +++ /dev/null @@ -1,57 +0,0 @@ -using StgSharp.Graphics; - -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; - -namespace StgSharp.Logic -{ - public abstract partial class ViewModelBase - { - private View _nextView, _currentView; - - protected View CurrentView - { - get => _currentView; - set => _nextView = value; - } - - protected void UseViewInNextFrame(string name) - { - if (allView.TryGetValue(name, out View v)) - { - throw new KeyNotFoundException($"Cannot find View named {name} " + - $"in current View Model of {this.GetType().FullName}"); - } - CurrentView = v; - } - - /// - /// CustomizeInit this form and render it on screen, and respond with operation - /// - public unsafe void Show() - { - CustomizeInitialize(); - //BuildGlobalKeyControl(); - while(0 == InternalIO.glfwWindowShouldClose(this.viewPortDisplay.ViewPortID)) - { - viewPortDisplay.FlushSize(); - CurrentView.Use(); - RenderStream.PollEvents(); - frameTimeProvider.WaitNextSpan(); - Interlocked.Add(ref _frameCount, 1); - } - } - - private unsafe void PrivateShow() - { - if(0 == InternalIO.glfwWindowShouldClose(this.viewPortDisplay.ViewPortID)) - { - CurrentView.Use(); - RenderStream.PollEvents(); - } - } - - } -} diff --git a/源代码/StgSharp/Logic/ViewModel/ViewManage.cs b/源代码/StgSharp/Logic/ViewModel/ViewManage.cs deleted file mode 100644 index 250eced3..00000000 --- a/源代码/StgSharp/Logic/ViewModel/ViewManage.cs +++ /dev/null @@ -1,41 +0,0 @@ -using StgSharp.Graphics; -using StgSharp.Graphics.OpenGL; - -using System; -using System.Collections.Generic; -using System.ComponentModel.Design; -using System.Text; - -namespace StgSharp.Logic -{ - public partial class ViewModelBase - { - private Dictionary allView; - - public T BuildNewView(string name,(int x, int y, int z) unitCubeSize) - where T : View,new() - { - var ret = new T(); - ret.SelfName = name; - ret.InternalInitialize(this); - allView.Add(name, ret); - return ret; - } - - public T BuildRenderStream(View view) where T : RenderStream - { -#nullable enable - T? ret = Activator.CreateInstance(typeof(T), view.Port, view.UnitCubeSize) as T; -#nullable restore - if (ret == null) - { - throw new InvalidOperationException( - $"Failed in creating a new {typeof(T).Name} instance when calling ShareContextWith." - ); - } - ret.timeProvider = this.frameTimeProvider; - ret.PlatformSpecifiedInit(); - return ret; - } - } -} diff --git a/源代码/StgSharp/MVVM/OpenGLControllingItemRenderStream.cs b/源代码/StgSharp/MVVM/OpenGLControllingItemRenderStream.cs new file mode 100644 index 00000000..e59ba3e8 --- /dev/null +++ b/源代码/StgSharp/MVVM/OpenGLControllingItemRenderStream.cs @@ -0,0 +1,62 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="OpenGLControllingItemRenderStream.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics.OpenGL; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.MVVM +{ + public class OpenGLControllingItemRenderStream : glRenderStream + { + + public override bool IsContextSharable => true; + + protected override void CustomizeDeinit() + { + throw new NotImplementedException(); + } + + protected override void CustomizeInit() + { + throw new NotImplementedException(); + } + + protected override void Main() + { + throw new NotImplementedException(); + } + + } +} diff --git a/源代码/StgSharp/MVVM/View/ViewBase.cs b/源代码/StgSharp/MVVM/View/ViewBase.cs index 255a7d59..87adb3e3 100644 --- a/源代码/StgSharp/MVVM/View/ViewBase.cs +++ b/源代码/StgSharp/MVVM/View/ViewBase.cs @@ -29,7 +29,7 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- using StgSharp.Graphics; -using StgSharp.Logic; +using StgSharp.Timing; using StgSharp.Math; using StgSharp.MVVM.ViewModel; @@ -155,7 +155,7 @@ namespace StgSharp.MVVM.View return InternalIO.glfwGetKey(context.ViewPortID, (int)key); } - public void InternalInitialize(string name,(int,int,int) cubeSize, ViewModelBase viewModelBinding) + public void InternalInitialize(string name, (int, int, int) cubeSize, ViewModelBase viewModelBinding) { SelfName = name; unitCubeSize = cubeSize; @@ -175,7 +175,7 @@ namespace StgSharp.MVVM.View if (!ValidateInitialization()) { throw new InvalidOperationException("This view is not correctly initialized before rendering."); - } + } } Show(); } @@ -183,7 +183,7 @@ namespace StgSharp.MVVM.View public bool ValidateInitialization() { return (_design != null) && (_render != null) && (getDataBindingEntry != null) && (_responder != null) - && (_design.ValidateInitializing()) && (_responder.ValidateInitializing()) && (_render.ValidateInitializing()) + && _design.ValidateInitializing() && _responder.ValidateInitializing() && _render.ValidateInitializing() ; } diff --git a/源代码/StgSharp/MVVM/View/ViewDesigner.cs b/源代码/StgSharp/MVVM/View/ViewDesigner.cs index 63ae75c2..6e681253 100644 --- a/源代码/StgSharp/MVVM/View/ViewDesigner.cs +++ b/源代码/StgSharp/MVVM/View/ViewDesigner.cs @@ -46,9 +46,9 @@ namespace StgSharp.MVVM.View { public interface IViewDesigner where TView : ViewBase { - abstract void Initialize(); abstract void CustomizedInitialize(); + abstract void Initialize(); abstract bool ValidateInitializing(); @@ -128,13 +128,13 @@ namespace StgSharp.MVVM.View return ret; } + public abstract void CustomizedInitialize(); + public void Initialize() { CustomizedInitialize(); } - public abstract void CustomizedInitialize(); - public abstract bool ValidateInitializing(); }//---------------------------------- End of Class ----------------------------------------- diff --git a/源代码/StgSharp/MVVM/View/ViewRender.cs b/源代码/StgSharp/MVVM/View/ViewRender.cs index 3254e834..0e44093b 100644 --- a/源代码/StgSharp/MVVM/View/ViewRender.cs +++ b/源代码/StgSharp/MVVM/View/ViewRender.cs @@ -29,7 +29,7 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- using StgSharp.Graphics; -using StgSharp.Logic; + using StgSharp.Math; using StgSharp.MVVM.ViewModel; @@ -65,11 +65,6 @@ namespace StgSharp.MVVM.View where TView : ViewBase { -#pragma warning disable CS8618 - private Dictionary _render; - private TView _binding; -#pragma warning restore CS8618 - protected ViewRender(TView binding) { _binding = binding; @@ -77,7 +72,7 @@ namespace StgSharp.MVVM.View public RenderStream this[string renderName] { - get => _render.TryGetValue(renderName, out RenderStream stream) ? stream : null!; + get => _render.TryGetValue(renderName, out RenderStream stream) ? stream : (null!); protected set { @@ -105,13 +100,6 @@ namespace StgSharp.MVVM.View protected ViewResponder Responder => (_binding.Responder as ViewResponder)!; - public T CreateRenderStream(ViewPort vp, (int x, int y, int z) unitCubeSize) where T : RenderStream, new() - { - T ret = new T(); - ret.Initialize(vp, unitCubeSize, Binding.TimeProvider); - return ret; - } - public T CreateRenderStream((int x, int y, int z) unitCubeSize) where T : RenderStream, new() { T ret = new T(); @@ -119,6 +107,13 @@ namespace StgSharp.MVVM.View return ret; } + public T CreateRenderStream(ViewPort vp, (int x, int y, int z) unitCubeSize) where T : RenderStream, new() + { + T ret = new T(); + ret.Initialize(vp, unitCubeSize, Binding.TimeProvider); + return ret; + } + public abstract void CustomizedInitialize(); public void Initialize() @@ -128,6 +123,12 @@ namespace StgSharp.MVVM.View public abstract bool ValidateInitializing(); +#pragma warning disable CS8618 + private Dictionary _render; + private TView _binding; +#pragma warning restore CS8618 + + } } } diff --git a/源代码/StgSharp/MVVM/View/ViewResponder.cs b/源代码/StgSharp/MVVM/View/ViewResponder.cs index d6c35af8..19c1f0de 100644 --- a/源代码/StgSharp/MVVM/View/ViewResponder.cs +++ b/源代码/StgSharp/MVVM/View/ViewResponder.cs @@ -47,12 +47,12 @@ namespace StgSharp.MVVM.View void CustomizedInitialize(Func keyRegister); + void Initialize(Func keyGetter); + void ProcessUserInput(); bool ValidateInitializing(); - void Initialize(Func keyGetter); - } protected abstract class ViewResponder : IViewResponder where TView : ViewBase @@ -90,19 +90,6 @@ namespace StgSharp.MVVM.View public abstract void CustomizedInitialize(Func keyRegister); - public void ProcessUserInput() - { - foreach (KeyValuePair pair in keyCallbackIndex) - { - if (InternalIO.glfwGetKey(_binding.ViewHandle, pair.Key.TargetKeyOrButtonID) == pair.Key.TriggeredStatus) - { - pair.Value(); - } - } - } - - public abstract bool ValidateInitializing(); - public void Initialize(Func keyGetter) { if (_isInitialized) @@ -123,6 +110,19 @@ namespace StgSharp.MVVM.View ); } + public void ProcessUserInput() + { + foreach (KeyValuePair pair in keyCallbackIndex) + { + if (InternalIO.glfwGetKey(_binding.ViewHandle, pair.Key.TargetKeyOrButtonID) == pair.Key.TriggeredStatus) + { + pair.Value(); + } + } + } + + public abstract bool ValidateInitializing(); + } } diff --git a/源代码/StgSharp/MVVM/ViewModel/DataBinding.cs b/源代码/StgSharp/MVVM/ViewModel/DataBinding.cs index cb04642c..32b1b56d 100644 --- a/源代码/StgSharp/MVVM/ViewModel/DataBinding.cs +++ b/源代码/StgSharp/MVVM/ViewModel/DataBinding.cs @@ -47,6 +47,7 @@ namespace StgSharp.MVVM.ViewModel public unsafe struct DataBindingEntry { + private IntPtr getterPtr, setterPtr; public DataBindingEntry( diff --git a/源代码/StgSharp/MVVM/ViewModel/ShowViewPort.cs b/源代码/StgSharp/MVVM/ViewModel/ShowViewPort.cs index f46fe01b..a93d4cb7 100644 --- a/源代码/StgSharp/MVVM/ViewModel/ShowViewPort.cs +++ b/源代码/StgSharp/MVVM/ViewModel/ShowViewPort.cs @@ -63,24 +63,11 @@ namespace StgSharp.MVVM.ViewModel } } - private void ShowFrameOnce() - { - viewPortDisplay.FlushSize(); - if (_nextView != _currentView) - { - Interlocked.Exchange(ref _currentView, _nextView); - } - CurrentView.Use(); - RenderStream.PollEvents(); - frameTimeProvider.WaitNextSpan(); - Interlocked.Add(ref _frameCount, 1); - } - protected void UseViewInNextFrame(string name) { if (!allView.TryGetValue(name, out ViewBase v)) { - throw new KeyNotFoundException($"{($"Cannot find View named {name} ")}{($"in current View Model of {GetType().FullName}")}"); + throw new KeyNotFoundException($"{$"Cannot find View named {name} "}{$"in current View Model of {GetType().FullName}"}"); } CurrentView = v; } @@ -94,5 +81,18 @@ namespace StgSharp.MVVM.ViewModel } } + private void ShowFrameOnce() + { + viewPortDisplay.FlushSize(); + if (_nextView != _currentView) + { + Interlocked.Exchange(ref _currentView, _nextView); + } + CurrentView.Use(); + RenderStream.PollEvents(); + frameTimeProvider.WaitNextSpan(); + Interlocked.Add(ref _frameCount, 1); + } + } } diff --git a/源代码/StgSharp/MVVM/ViewModel/ViewManage.cs b/源代码/StgSharp/MVVM/ViewModel/ViewManage.cs index ec7e26e0..dc77d997 100644 --- a/源代码/StgSharp/MVVM/ViewModel/ViewManage.cs +++ b/源代码/StgSharp/MVVM/ViewModel/ViewManage.cs @@ -41,6 +41,7 @@ namespace StgSharp.MVVM.ViewModel { public partial class ViewModelBase { + private Dictionary allView; public T CreateAndBindView(string name, (int x, int y, int z) unitCubeSize) @@ -48,7 +49,7 @@ namespace StgSharp.MVVM.ViewModel { T ret = new T(); ret.SelfName = name; - ret.InternalInitialize(name,unitCubeSize,this); + ret.InternalInitialize(name, unitCubeSize, this); allView.Add(name, ret); return ret; } diff --git a/源代码/StgSharp/MVVM/ViewModel/ViewModel.cs b/源代码/StgSharp/MVVM/ViewModel/ViewModel.cs index cf480e40..6bda32b3 100644 --- a/源代码/StgSharp/MVVM/ViewModel/ViewModel.cs +++ b/源代码/StgSharp/MVVM/ViewModel/ViewModel.cs @@ -34,6 +34,7 @@ using StgSharp.Graphics.OpenGL; using StgSharp.Math; using StgSharp.MVVM.View; using StgSharp.MVVM.ViewModel; +using StgSharp.Timing; using System; using System.Collections.Generic; @@ -116,7 +117,7 @@ namespace StgSharp.MVVM.ViewModel => { InternalIO.glfwMakeContextCurrent(viewPortDisplay.ViewPortID); - GlFunction.CurrentGL.Viewport(0, 0, width, height); + OpenGLFunction.CurrentGL.Viewport(0, 0, width, height); PrivateShow(); }; viewPortDisplay.FramePostionCallback = (handle, xpos, ypos) @@ -147,7 +148,7 @@ namespace StgSharp.MVVM.ViewModel => { InternalIO.glfwMakeContextCurrent(viewPortDisplay.ViewPortID); - GlFunction.CurrentGL.Viewport(0, 0, width, height); + OpenGLFunction.CurrentGL.Viewport(0, 0, width, height); PrivateShow(); }; viewPortDisplay.FramePostionCallback = (handle, xpos, ypos) diff --git a/源代码/StgSharp/Math/Graphic/Camera.cs b/源代码/StgSharp/Math/Graphic/Camera.cs index f4f53e1c..c4277b90 100644 --- a/源代码/StgSharp/Math/Graphic/Camera.cs +++ b/源代码/StgSharp/Math/Graphic/Camera.cs @@ -143,7 +143,7 @@ namespace StgSharp.Graphics public unsafe void SetAllUniforms() { //Console.WriteLine(Projection * ViewBase); - OpenGL.GlFunction.CurrentGL.SetUniformValue(convertedUniform, Projection * View); + OpenGL.OpenGLFunction.CurrentGL.SetUniformValue(convertedUniform, Projection * View); } public void SetViewDirection(vec3d position, vec3d target, vec3d up) diff --git a/源代码/StgSharp/Math/Linear/IVector.cs b/源代码/StgSharp/Math/Linear/IVector.cs index eb261e86..a97cf3de 100644 --- a/源代码/StgSharp/Math/Linear/IVector.cs +++ b/源代码/StgSharp/Math/Linear/IVector.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="IVector.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/源代码/StgSharp/Math/Linear/Vector.Normalize.cs b/源代码/StgSharp/Math/Linear/Vector.Normalize.cs index 101e51b4..0b5c7599 100644 --- a/源代码/StgSharp/Math/Linear/Vector.Normalize.cs +++ b/源代码/StgSharp/Math/Linear/Vector.Normalize.cs @@ -1,4 +1,34 @@ -using StgSharp.Data; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Vector.Normalize.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Data; using StgSharp.Math; using System; @@ -13,6 +43,15 @@ namespace StgSharp.Math { public static partial class Linear { + + public static vec4d Normalize(vec4d vec) + { + return new vec4d { vec = Vector4.Normalize(vec.vec) }; + } + public static vec3d Normalize(vec3d vec) + { + return new vec3d { vec = Vector4.Normalize(vec.vec) }; + } public static unsafe void Normalize(ref vec4d source, ref vec4d target) { Vector4 s = source.vec; @@ -35,7 +74,7 @@ namespace StgSharp.Math Vector3 t = target.v; s = Vector3.Normalize(s); - Vector3 projection = Vector3.Dot(t, s) / Vector3.Dot(s, s) * s; + Vector3 projection = (Vector3.Dot(t, s) / Vector3.Dot(s, s)) * s; t -= projection; t = Vector3.Normalize(t); @@ -43,13 +82,5 @@ namespace StgSharp.Math target.v = t; } - public static vec4d Normalize(vec4d vec) - { - return new vec4d() { vec = Vector4.Normalize(vec.vec) }; - } - public static vec3d Normalize(vec3d vec) - { - return new vec3d() { vec = Vector4.Normalize(vec.vec) }; - } } } diff --git a/源代码/StgSharp/Math/Linear/vec2d.cs b/源代码/StgSharp/Math/Linear/vec2d.cs index c0842b81..a5aa80c3 100644 --- a/源代码/StgSharp/Math/Linear/vec2d.cs +++ b/源代码/StgSharp/Math/Linear/vec2d.cs @@ -39,7 +39,7 @@ namespace StgSharp.Math /// Vec2Ds in StgSharp are default used as colum vector. /// [StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)] - public struct vec2d:IVector + public struct vec2d : IVector { [FieldOffset(0)] internal unsafe fixed float num[2]; @@ -97,15 +97,15 @@ namespace StgSharp.Math { return new vec2d(vec.v * value); } + public static vec2d operator *(float value, vec2d vec) + { + return new vec2d(vec.v * value); + } public static vec2d operator /(vec2d vec, float value) { return new vec2d(vec.v / value); } - public static vec2d operator *(float value, vec2d vec) - { - return new vec2d(vec.v * value); - } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static vec2d operator +(vec2d left, vec2d right) diff --git a/源代码/StgSharp/Math/Linear/vec3d.cs b/源代码/StgSharp/Math/Linear/vec3d.cs index 0913f400..1e11dd27 100644 --- a/源代码/StgSharp/Math/Linear/vec3d.cs +++ b/源代码/StgSharp/Math/Linear/vec3d.cs @@ -82,6 +82,18 @@ namespace StgSharp.Math v = new Vector3(x, y, z); } + public unsafe vec2d XY + { + get => new vec2d(this.vec); + set + { + fixed (Vector3* vptr = &v) + { + *(Vector2*)vptr = value.v; + } + } + } + public vec3d XYZ { get { return new vec3d(v); } @@ -200,18 +212,6 @@ namespace StgSharp.Math return v; } - public unsafe vec2d XY - { - get => new vec2d(this.vec); - set - { - fixed (Vector3* vptr = &v) - { - *(Vector2*)vptr = value.v; - } - } - } - } public static class Vec3d diff --git a/源代码/StgSharp/Math/Linear/vec4d.cs b/源代码/StgSharp/Math/Linear/vec4d.cs index 256d19e0..b9eb8851 100644 --- a/源代码/StgSharp/Math/Linear/vec4d.cs +++ b/源代码/StgSharp/Math/Linear/vec4d.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="Vec4d.cs" +// file="vec4d.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,7 +28,6 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- - using StgSharp.Data; using StgSharp.Math; @@ -85,6 +84,16 @@ namespace StgSharp.Math vec = new Vector4(x, y, z, w); } + public unsafe vec2d XY + { + get => new vec2d(vec); + set + { + X = value.X; + Y = value.Y; + } + } + public unsafe vec3d XYZ { get => new vec3d(vec); @@ -95,14 +104,11 @@ namespace StgSharp.Math W = w; } } - public unsafe vec2d XY + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static vec4d Add(vec4d left, vec4d right) { - get => new vec2d(vec); - set - { - X = value.X; - Y = value.Y; - } + return left + right; } public override bool Equals(object obj) @@ -115,11 +121,23 @@ namespace StgSharp.Math return vec.GetHashCode(); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static vec4d Subtract(vec4d left, vec4d right) + { + return left - right; + } + public override string ToString() { return vec.ToString(); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static vec4d operator -(vec4d left, vec4d right) + { + return new vec4d(left.vec - right.vec); + } + public static bool operator !=(vec4d left, vec4d right) { return !(left == right); @@ -143,12 +161,6 @@ namespace StgSharp.Math return new vec4d(left.vec + right.vec); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static vec4d operator -(vec4d left, vec4d right) - { - return new vec4d(left.vec - right.vec); - } - public static bool operator ==(vec4d left, vec4d right) { return left.vec == right.vec; @@ -164,16 +176,5 @@ namespace StgSharp.Math return vec == other.vec; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static vec4d Subtract(vec4d left, vec4d right) - { - return left - right; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static vec4d Add(vec4d left, vec4d right) - { - return left + right; - } } } \ No newline at end of file diff --git a/源代码/StgSharp/Math/Scalar/Compare.cs b/源代码/StgSharp/Math/Scalar/Compare.cs index 4644403c..09c580fe 100644 --- a/源代码/StgSharp/Math/Scalar/Compare.cs +++ b/源代码/StgSharp/Math/Scalar/Compare.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Compare.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,10 +38,11 @@ namespace StgSharp.Math { public static partial class Scaler { + public static float MaxOf(params float[] stream) { float ret = stream[0]; - foreach (var num in stream) + foreach (float num in stream) { if (ret < num) { @@ -23,7 +54,7 @@ namespace StgSharp.Math public static float MinOf(params float[] stream) { float ret = stream[0]; - foreach (var num in stream) + foreach (float num in stream) { if (ret > num) { diff --git a/源代码/StgSharp/Math/Scalar/Random.cs b/源代码/StgSharp/Math/Scalar/Random.cs index 5567870d..b0d14251 100644 --- a/源代码/StgSharp/Math/Scalar/Random.cs +++ b/源代码/StgSharp/Math/Scalar/Random.cs @@ -46,6 +46,14 @@ namespace StgSharp.Math private static byte[] randomSeed; + internal static float currentSeed +#if DEBUG + = 0.5f; +#else + = Abs(System.DateTime.UtcNow.GetHashCode()); +#endif + + /// /// returns a random float number between 0 and 1. /// @@ -123,13 +131,5 @@ namespace StgSharp.Math return *(int*)&seedValue; } - internal static float currentSeed -#if DEBUG - = 0.5f; -#else - = Abs(System.DateTime.UtcNow.GetHashCode()); -#endif - - } } diff --git a/源代码/StgSharp/Stg/Bullet.cs b/源代码/StgSharp/Stg/Bullet.cs index ea082de0..ba172b17 100644 --- a/源代码/StgSharp/Stg/Bullet.cs +++ b/源代码/StgSharp/Stg/Bullet.cs @@ -38,6 +38,7 @@ namespace StgSharp.Gaming { public abstract class Bullet : IInstancing, IPlainEntity { + protected Bullet ( PlainInstancingBuffer buffer, @@ -54,11 +55,23 @@ namespace StgSharp.Gaming GlobalBuffer = buffer; BufferId = buffer.CreateInstanceID(); ((IInstancing)this).Scale = scale; - ((IInstancing)this).Coord = new vec3d( beginPosition,0); + ((IInstancing)this).Coord = new vec3d(beginPosition, 0); ((IInstancing)this).Rotation = angle; Motion = movement; } + public GeometryMotion Motion + { + get; + set; + } + + public IInstancingBuffer GlobalBuffer + { + get; + set; + } + public int BufferId { get; @@ -71,28 +84,16 @@ namespace StgSharp.Gaming set; } - public IInstancingBuffer GlobalBuffer - { - get; - set; - } - - public GeometryMotion Motion - { - get; - set; - } - - vec3d IInstancing.CenterPositionGlobal - { - get; - set; - } - public bool CollideWith(IPlainEntity entity) { throw new System.NotImplementedException(); } + vec3d IInstancing.CenterPositionGlobal + { + get; + set; + } + } } \ No newline at end of file diff --git a/源代码/StgSharp/Stg/CollisionTexture.cs b/源代码/StgSharp/Stg/CollisionTexture.cs index 6170d950..eb9d1529 100644 --- a/源代码/StgSharp/Stg/CollisionTexture.cs +++ b/源代码/StgSharp/Stg/CollisionTexture.cs @@ -32,7 +32,7 @@ using StgSharp.Data; using StgSharp.Geometries; using StgSharp.Graphics; using StgSharp.Graphics.OpenGL; -using StgSharp.Logic; + using StgSharp.Math; using StgSharp.MVVM; @@ -48,32 +48,88 @@ namespace StgSharp.Stg { public interface IOneDimensionalCollisionTexture2D { + public void Init(Radius angleStride, string name); + } - public sealed class OneDimensionalCollisionTexture2D_GL :glRenderStream, IOneDimensionalCollisionTexture2D + public sealed class OneDimensionalCollisionTexture2D_GL : glRenderStream, IOneDimensionalCollisionTexture2D { - private const string inputName = "InstanceBufferList"; - private const string outputName = "CollisionTextureOutput"; - + float[] textureOutput; + ElementBuffer ebo; private FrameBuffer fbo; + RenderBuffer rbo; ShaderProgram generatingShader; + TextureGL t; + VertexArray vao; VertexBuffer vbo; - ElementBuffer ebo; public OneDimensionalCollisionTexture2D_GL() { - + } public override bool IsContextSharable => false; -#pragma warning disable CS8618 + public void GenerateCollisionTexture(IEnumerable bufferEnumeration) + { + fbo.Bind(0); + GL.ClearColor(0, 0, 0, 1); + GL.Clear(MaskBufferBit.DEPTH | MaskBufferBit.COLOR); + generatingShader.Use(); + vao.Bind(0); + foreach (IInstancingBuffer item in bufferEnumeration) + { + IGeometry g = item.TypicalShape; + + if (!(g is PlainGeometry)) + { + throw new InvalidOperationException("The current particle buffer contains non-planar geometry,"); + } + + ebo.Bind(0); + ebo.SetValue(0, g.VertexIndices, BufferUsage.StreamDraw); + + vbo.WriteVectorData(0, item.CoordAndRotationSpan, BufferUsage.StreamDraw); + vao.SetVertexAttribute(1, 3, TypeCode.Single, false, 4 * sizeof(float), 0); + vao.SetVertexAttribute(2, 1, TypeCode.Single, false, 4 * sizeof(float), 3 * sizeof(float)); + + vbo.WriteScalerData(2, item.ScalingSpan, BufferUsage.StreamDraw); + vao.SetVertexAttribute(3, 1, TypeCode.Single, false, sizeof(float), 0); + + vbo.WriteVectorData(1, g.VertexStream, BufferUsage.StreamDraw); + vao.SetVertexAttribute(0, 3, TypeCode.Single, false, 4 * sizeof(float), 0); + + GL.DrawElementsInstanced(GeometryType.TRIANGLES, ((uint)g.VertexIndices.Length) / 3, + TypeCode.UInt32, IntPtr.Zero, (uint)item.ScalingSpan.Length); + } + + t.Bind2D(0); + GL.GetTextureImage(Texture2DTarget.Texture2D, 0, ImageChannel.SingleColor, PixelChannelLayout.Float, textureOutput); + VertexArray.BindNull(); + } + + public void Init(Radius angleStride, string name) + { + primeArgs = new ViewPort + { + Height = 1, + Width = (int)((new Radius(Scaler.Pi)) / angleStride), + Name = name, + }; + + _coordStretch = (1, 1, 1); + + PlatformSpecifiedInitialize(); + CustomizeInit(); + } + +#pragma warning disable CS8618 protected override void CustomizeDeinit() { @@ -111,8 +167,8 @@ namespace StgSharp.Stg GL.TextureImage2d(Texture2DTarget.Texture2D, 0, (int)ImageChannel.WithAlphaChannel, (uint)Width, (uint)Height, (int)ImageChannel.WithAlphaChannel, PixelChannelLayout.Byte, Array.Empty()); - t.Set2dWrapProperty(Wrap.Repeat, Wrap.Repeat); - t.Set2dFilterProperty(Filter.Nearest, Filter.Nearest); + t.Set2dWrapProperty(0, TextureWrap.Repeat, TextureWrap.Repeat); + t.Set2dFilterProperty(0, TextureFilter.Nearest, TextureFilter.Nearest); GL.FrameBufferTexture2d(FrameBufferTarget.All, glAttachment.Color(0), Texture2DTarget.Texture2D, t[0], 0); @@ -122,67 +178,10 @@ namespace StgSharp.Stg textureOutput = new float[this.Width]; } - TextureGL t; - RenderBuffer rbo; - float[] textureOutput; - protected override void Main() { throw new NotSupportedException(); } - public void GenerateCollisionTexture(IEnumerable bufferEnumeration) - { - fbo.Bind(0); - GL.ClearColor(0, 0, 0, 1); - GL.Clear(MaskBufferBit.DEPTH | MaskBufferBit.COLOR); - generatingShader.Use(); - vao.Bind(0); - - foreach (IInstancingBuffer item in bufferEnumeration) - { - IGeometry g = item.TypicalShape; - - if (!(g is PlainGeometry)) - { - throw new InvalidOperationException("The current particle buffer contains non-planar geometry,"); - } - - ebo.Bind(0); - ebo.SetValue(0, g.VertexIndices, BufferUsage.StreamDraw); - - vbo.WriteVectorData(0, item.CoordAndRotationSpan, BufferUsage.StreamDraw); - vao.SetVertexAttribute(1, 3, TypeCode.Single, false, 4 * sizeof(float), 0); - vao.SetVertexAttribute(2, 1, TypeCode.Single, false, 4 * sizeof(float), 3 * sizeof(float)); - - vbo.WriteScalerData(2, item.ScalingSpan, BufferUsage.StreamDraw); - vao.SetVertexAttribute(3, 1, TypeCode.Single, false, sizeof(float), 0); - - vbo.WriteVectorData(1, g.VertexStream, BufferUsage.StreamDraw); - vao.SetVertexAttribute(0, 3, TypeCode.Single, false, 4 * sizeof(float), 0); - - GL.DrawElementsInstanced(GeometryType.TRIANGLES, (uint)g.VertexIndices.Length / 3, - TypeCode.UInt32, IntPtr.Zero, (uint)item.ScalingSpan.Length); - } - - t.Bind2D(0); - GL.GetTextureImage(Texture2DTarget.Texture2D, 0, ImageChannel.SingleColor, PixelChannelLayout.Float, textureOutput); - VertexArray.BindNull(); - } - - public void Init(Radius angleStride, string name) - { - primeArgs = new ViewPort() - { - Height = 1, - Width = (int)((new Radius(Scaler.Pi)) / angleStride), - Name = name, - }; - - _coordStretch = (1, 1, 1); - - PlatformSpecifiedInitialize(); - CustomizeInit(); - } } } diff --git a/源代码/StgSharp/Stg/TimeLine.cs b/源代码/StgSharp/Stg/TimeLine.cs index ed3ce54c..67d49584 100644 --- a/源代码/StgSharp/Stg/TimeLine.cs +++ b/源代码/StgSharp/Stg/TimeLine.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="TimeLine.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Text; diff --git a/源代码/StgSharp/Stg/Touhou/TouhouBuilder.cs b/源代码/StgSharp/Stg/Touhou/TouhouBuilder.cs index 7439fb4e..5bcc081a 100644 --- a/源代码/StgSharp/Stg/Touhou/TouhouBuilder.cs +++ b/源代码/StgSharp/Stg/Touhou/TouhouBuilder.cs @@ -1,4 +1,34 @@ -using StgSharp.Graphics; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="TouhouBuilder.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics; using StgSharp.Touhou; using System; diff --git a/源代码/StgSharp/Stg/Touhou/TouhouWindow.cs b/源代码/StgSharp/Stg/Touhou/TouhouWindow.cs index 06b3cc6c..4558c200 100644 --- a/源代码/StgSharp/Stg/Touhou/TouhouWindow.cs +++ b/源代码/StgSharp/Stg/Touhou/TouhouWindow.cs @@ -1,4 +1,36 @@ -using StgSharp.Graphics; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="TouhouWindow.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics; +using StgSharp.MVVM; +using StgSharp.MVVM.ViewModel; using System; using System.Collections.Generic; @@ -6,5 +38,14 @@ using System.Text; namespace StgSharp.Touhou { - + public abstract class TouhouWindowMain : ViewModelBase + { + + protected TouhouWindowMain(ViewPort vp) : base(vp, 60) + { + } + + + + } } diff --git a/源代码/StgSharp/Stg/Touhou/View/OpenningView.cs b/源代码/StgSharp/Stg/Touhou/View/OpenningView.cs new file mode 100644 index 00000000..53897cbc --- /dev/null +++ b/源代码/StgSharp/Stg/Touhou/View/OpenningView.cs @@ -0,0 +1,53 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="OpenningView.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.MVVM.View; +using StgSharp.MVVM.ViewModel; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Stg.Touhou +{ + public abstract class OpenningView : ViewBase + { + + public override void CustomizedInitialize(ViewModelBase viewModelBinding) + { + throw new NotImplementedException(); + } + + } + + +} diff --git a/源代码/StgSharp/bin/x64/Release/netstandard2.1/StgSharp.dll b/源代码/StgSharp/bin/x64/Release/netstandard2.1/StgSharp.dll index f7441a71..d54fa7b5 100644 Binary files a/源代码/StgSharp/bin/x64/Release/netstandard2.1/StgSharp.dll and b/源代码/StgSharp/bin/x64/Release/netstandard2.1/StgSharp.dll differ diff --git a/源代码/StgSharp/bin/x64/Release/netstandard2.1/StgSharp.xml b/源代码/StgSharp/bin/x64/Release/netstandard2.1/StgSharp.xml index 83fc7379..22f50aa5 100644 --- a/源代码/StgSharp/bin/x64/Release/netstandard2.1/StgSharp.xml +++ b/源代码/StgSharp/bin/x64/Release/netstandard2.1/StgSharp.xml @@ -4,62 +4,49 @@ StgSharp - - - - - - - - Get the status of a certain key on the keyboard. - - - - - - - - Function handler to load an opengl function by searching its name. - - the name of the Opengl function - An intptr value representing the pointer to the function - - + Interface of all kinds OpenGL buffer objects - + Get the only handle to one of the Object instance - + Bind a buffer instance to OpenGL Index of handle of the object in this instance to be bind - + - + + + Function handler to load an opengl function by searching its name. + + the name of the Opengl function + An Intptr value representing the pointer to the function + + A collection of handle to Element Buffer Object in OpenglFunc. Each value indexed from instance of this class this is the only handle to one Element Buffer Object. - + Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. will be set as default target. Index of object to be binded in handle set - + Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. Target of this frame buffer should be set manually. @@ -67,139 +54,140 @@ The frame buffer target of the binding operation. Index of object to be binded in handle set - + + Load an to certain texture. - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - Data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - Data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - A of data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - A of data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - A array of data to write in - How OpenGL use these data, defined by - - + - + - Load all supported OpenGL APIs and bind them to given context. + Set _data to current vertex buffer object - The used as current OpenGL context + Type of bufferData + Index to find certain VBO in this instance + Data to write in + How OpenGL use these _data, defined by - + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + Data to write in + How OpenGL use these _data, defined by + + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A of _data to write in + How OpenGL use these _data, defined by + + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A of _data to write in + How OpenGL use these _data, defined by + + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A array of _data to write in + How OpenGL use these _data, defined by + + Get the function pointer of given OpenGL api name ContextName of the OpenGL api The funtion pointer of the api in stream of - + + + Load all supported OpenGL APIs and bind them to given . + + The handle to current OpenGL viewPortDisplay + + Bind a frame buffer to a frame buffer target - Same function as glBindFramebuffer. + Same function as glBindFramebuffer. The frame buffer target of the binding operation. The handle of the frame buffer object to bind. - + - Init an OpenGl context if current form has not been binded to any context. and set the context binded to - current form as current OpenGL context. + Initialize an OpenGl viewPortDisplay if current form has not been binded to any viewPortDisplay. + and set the viewPortDisplay binded to current form as current OpenGL viewPortDisplay. - Something goes wrong and StgSharp fails in creating a new OpenGL context. + Something goes wrong and StgSharp fails in creating a new OpenGL viewPortDisplay. - + - Create a set of . + Create a set of . Amount of EBO to be created. - + - Create a sets of + Create a sets of Amount of textures to be created. - + - Create a set of . + Create a set of . Amount of VAO to be created. - + - Create a set of . + Create a set of . Amount of Object to be created. - + - Create an instance of program + Create an instance of program - New instance of instance. + New instance of instance. - + Attach one shader code to a shader program. Shader program to attach Index of shader code in current shader code set. - + - Init a program with no shader attached. + CustomizeInit a program with no shader attached. - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -207,7 +195,7 @@ ContextName of the Uniform in shader code - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -215,7 +203,7 @@ ContextName of the Uniform in shader code - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -223,7 +211,7 @@ ContextName of the Uniform in shader code - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -231,43 +219,19 @@ ContextName of the Uniform in shader code - + - Link the shader to current context. + Link the shader to current viewPortDisplay. - + - Let the current context use this shader. + Let the current viewPortDisplay use this shader. - + - A handle to an OpenGL object, - must be indexed from a . - Direct call will cause - - - - - A handle to an OpenGL object. - - - - - Release all resource in this handle. - This will release all resource in this . - This will be not usable. - - - - - - - - - - + Hash code of time pixels updated last time. @@ -275,12 +239,22 @@ + + + + + + + + + + Set the size limit of current form @@ -290,9 +264,9 @@ Maximum width of current form Maximum height of current form - + - Get (T is ) uniform from a shader. + Get (TView is ) uniform from a shader. This uniform will be used as projection matrix of this camera. Additionally, for multi-shader rendering, each shader requires a uniform, so do not ignore return value of this method. @@ -300,11 +274,11 @@ Shader using this camera ContextName of projection camera named in shader - (T is ) representing + (TView is ) representing projection matrix in shader program. - + Get all uniform related to this . @@ -317,7 +291,7 @@ - Init an instance of OpenGL program, + CustomizeInit an instance of OpenGL program, This method should be called before any other StgSharp api. @@ -423,16 +397,6 @@ Data is actually stored in s in certain RAID mode. - - - A sensor used for checking out if a bullet hit a player or something else - - - - - A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y - - X position of an enenmy entity @@ -443,6 +407,16 @@ Y position of an enemy entity + + + A sensor used for checking out if a bullet hit a player or something else + + + + + A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y + + 当几何体调用了过多的CalcVec方法时,产生UnusedVertexException异常 @@ -474,7 +448,7 @@ Calculate movement to center - Current time tick + CurrentBlueprint time tick @@ -482,13 +456,14 @@ A square - + - Run all nodes repeatedly until it is instructed to terminate. + A sets of complex logic designed for running in multi threads environment. + Warning: do not run a instance in multi threads more than once. + - Instructor to terminate all tasks. Returns if tasks should terminate - + @@ -497,27 +472,87 @@ in current node, the port on the other node cannot get the change. - + - Init this form and render it on screen, and respond with operation + Determines whether the contains the + specified key. + + The value to locate in the . + + true if the contains an element with the + specified key; otherwise, false. + + + + + Determines whether the contains the + specified key. + + The value to locate in the . + + true if the contains an element with the + specified key; otherwise, false. + + + + + A microsecond-accuracy timer. It will refresh every a certain time span. - + + + Create a new and define the length of time span. Length of a single time span is defined in microseconds. + + + + + + + Create a new and define the length of time span. + Length of a single time span is defined in seconds. + + + + + + + Create a new and define the length of time span. Length of a single time span is defined in microseconds. + + + + + + + + The method this will call every time a new time span started. + + + + + Time source provider provided in internal framework. + + + + + CustomizeInit this form and render it on screen, and respond with operation + + + Height of this form, represent in - + Width of this form, represent in - + Width of this form, represent in - + Resize the current form @@ -525,7 +560,7 @@ A (width,height) representing the new size of current form - + Set the size limit of current form @@ -536,7 +571,7 @@ Maximum size of current form. In form of a of (width,height) - + Set the size limit of current form @@ -545,42 +580,26 @@ Maximum width of current form Maximum height of current form - + - A microsecond-accuracy timer. It will refresh every a certain time span. + ViewBase is the base type for all view types, providing context binding and control element binding. + A complete view should contain one complete , , and , + which provide layout descriptions of control elements, user responses, and rendering implementations in the view. + Data between instances of , , and is shared through . - + - Create a new and define the length of time span. Length of a single time span is defined in microseconds. + Get the status of a certain key on the keyboard. - - + + representing if a key is pressed or released. - + - Create a new and define the length of time span. - Length of a single time span is defined in seconds. - - - - - - - Create a new and define the length of time span. Length of a single time span is defined in microseconds. - - - - - - - - Time source provider provided in internal framework. - - - - - The method this will call every time a new time span started. + ViewDesigner provides descriptions of various controls in the view, + binds the controls to specific user actions and behaviors, + and describes the layout and interactions of each control. diff --git a/源代码/StgSharp/obj/StgSharp.csproj.nuget.dgspec.json b/源代码/StgSharp/obj/StgSharp.csproj.nuget.dgspec.json index dea25730..7d4501ab 100644 --- a/源代码/StgSharp/obj/StgSharp.csproj.nuget.dgspec.json +++ b/源代码/StgSharp/obj/StgSharp.csproj.nuget.dgspec.json @@ -10,14 +10,14 @@ "projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\StgSharp.csproj", "projectName": "StgSharp", "projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\StgSharp.csproj", - "packagesPath": "C:\\Users\\Nitlo\\.nuget\\packages\\", + "packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\", "outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Nitlo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -76,7 +76,7 @@ "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.205\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json" } } } diff --git a/源代码/StgSharp/obj/StgSharp.csproj.nuget.g.props b/源代码/StgSharp/obj/StgSharp.csproj.nuget.g.props index d4f32cf7..9bb49262 100644 --- a/源代码/StgSharp/obj/StgSharp.csproj.nuget.g.props +++ b/源代码/StgSharp/obj/StgSharp.csproj.nuget.g.props @@ -5,12 +5,12 @@ NuGet $(MSBuildThisFileDirectory)project.assets.json $(UserProfile)\.nuget\packages\ - C:\Users\Nitlo\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + C:\Users\Youmu\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages PackageReference - 6.9.2 + 6.11.0 - + @@ -20,6 +20,6 @@ - C:\Users\Nitlo\.nuget\packages\microsoft.windows.cswin32\0.3.49-beta + C:\Users\Youmu\.nuget\packages\microsoft.windows.cswin32\0.3.49-beta \ No newline at end of file diff --git a/源代码/StgSharp/obj/project.assets.json b/源代码/StgSharp/obj/project.assets.json index 7c9c5ab7..f922ea2f 100644 --- a/源代码/StgSharp/obj/project.assets.json +++ b/源代码/StgSharp/obj/project.assets.json @@ -403,7 +403,7 @@ ] }, "packageFolders": { - "C:\\Users\\Nitlo\\.nuget\\packages\\": {}, + "C:\\Users\\Youmu\\.nuget\\packages\\": {}, "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} }, "project": { @@ -412,14 +412,14 @@ "projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\StgSharp.csproj", "projectName": "StgSharp", "projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\StgSharp.csproj", - "packagesPath": "C:\\Users\\Nitlo\\.nuget\\packages\\", + "packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\", "outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Nitlo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -478,7 +478,7 @@ "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.205\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json" } } } diff --git a/源代码/StgSharp/obj/project.nuget.cache b/源代码/StgSharp/obj/project.nuget.cache index df8b2ebe..783d8302 100644 --- a/源代码/StgSharp/obj/project.nuget.cache +++ b/源代码/StgSharp/obj/project.nuget.cache @@ -1,18 +1,18 @@ { "version": 2, - "dgSpecHash": "6vH7gozY3nlutAvycQCQBpFugaBd+eT4Uj5P/nMDlmS2xt5e7Cw17gX8+p3vXVTBjKgDitDDnucb2v8GcacRcw==", + "dgSpecHash": "72QZtNaxxF0=", "success": true, "projectFilePath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\StgSharp.csproj", "expectedPackageFiles": [ - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windows.cswin32\\0.3.49-beta\\microsoft.windows.cswin32.0.3.49-beta.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windows.sdk.win32docs\\0.1.42-alpha\\microsoft.windows.sdk.win32docs.0.1.42-alpha.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windows.sdk.win32metadata\\55.0.45-preview\\microsoft.windows.sdk.win32metadata.55.0.45-preview.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windows.wdk.win32metadata\\0.9.9-experimental\\microsoft.windows.wdk.win32metadata.0.9.9-experimental.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.buffers\\4.5.1\\system.buffers.4.5.1.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.memory\\4.5.5\\system.memory.4.5.5.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.numerics.vectors\\4.4.0\\system.numerics.vectors.4.4.0.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\6.0.0\\system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512" + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.windows.cswin32\\0.3.49-beta\\microsoft.windows.cswin32.0.3.49-beta.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.windows.sdk.win32docs\\0.1.42-alpha\\microsoft.windows.sdk.win32docs.0.1.42-alpha.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.windows.sdk.win32metadata\\55.0.45-preview\\microsoft.windows.sdk.win32metadata.55.0.45-preview.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.windows.wdk.win32metadata\\0.9.9-experimental\\microsoft.windows.wdk.win32metadata.0.9.9-experimental.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.buffers\\4.5.1\\system.buffers.4.5.1.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.memory\\4.5.5\\system.memory.4.5.5.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.numerics.vectors\\4.4.0\\system.numerics.vectors.4.4.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\6.0.0\\system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512" ], "logs": [] } \ No newline at end of file diff --git a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.AssemblyInfo.cs b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.AssemblyInfo.cs index 8f464e31..dccefbcc 100644 --- a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.AssemblyInfo.cs +++ b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+da75200347e2ff7f483c83ff224678d05b0aefd1")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d082071f2d004b4566bd19a1a030cf06b112c3af")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharp")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharp")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.AssemblyInfoInputs.cache b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.AssemblyInfoInputs.cache index d86cb2e0..7fe544b0 100644 --- a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.AssemblyInfoInputs.cache +++ b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.AssemblyInfoInputs.cache @@ -1 +1 @@ -ce2864c500078b726caaf79382f20f5fe8c787b07bda81dd387eddbce2a0954f +3c8ddff66653236d112493cf8df45a456316000b88fce8097758a4716b05e29d diff --git a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.GeneratedMSBuildEditorConfig.editorconfig b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.GeneratedMSBuildEditorConfig.editorconfig index 44183f7b..b934f62e 100644 --- a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.GeneratedMSBuildEditorConfig.editorconfig +++ b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.GeneratedMSBuildEditorConfig.editorconfig @@ -1,6 +1,6 @@ is_global = true -build_property.CsWin32InputMetadataPaths = C:\Users\Nitlo\.nuget\packages\microsoft.windows.sdk.win32metadata\55.0.45-preview\Windows.Win32.winmd|C:\Users\Nitlo\.nuget\packages\microsoft.windows.wdk.win32metadata\0.9.9-experimental\Windows.Wdk.winmd -build_property.CsWin32InputDocPaths = C:\Users\Nitlo\.nuget\packages\microsoft.windows.sdk.win32docs\0.1.42-alpha\apidocs.msgpack +build_property.CsWin32InputMetadataPaths = C:\Users\Youmu\.nuget\packages\microsoft.windows.sdk.win32metadata\55.0.45-preview\Windows.Win32.winmd|C:\Users\Youmu\.nuget\packages\microsoft.windows.wdk.win32metadata\0.9.9-experimental\Windows.Wdk.winmd +build_property.CsWin32InputDocPaths = C:\Users\Youmu\.nuget\packages\microsoft.windows.sdk.win32docs\0.1.42-alpha\apidocs.msgpack build_property.TargetFramework = netstandard2.1 build_property.TargetPlatformMinVersion = 7.0 build_property.UsingMicrosoftNETSdkWeb = diff --git a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.assets.cache b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.assets.cache index b4e0cbd2..6bcdd3b1 100644 Binary files a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.assets.cache and b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.assets.cache differ diff --git a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.csproj.AssemblyReference.cache b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.csproj.AssemblyReference.cache index 950133b6..9bd780ec 100644 Binary files a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.csproj.AssemblyReference.cache and b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.csproj.AssemblyReference.cache differ diff --git a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.csproj.CoreCompileInputs.cache b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.csproj.CoreCompileInputs.cache index 368b3930..d7f9aafe 100644 --- a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.csproj.CoreCompileInputs.cache +++ b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -28f63d3bc726f046f56812aba0ce94432bcf3fa0d93682df4908bad19488c21c +4138e7144963a5b1ef18c71e8d45fbb4bc8c47506ad6fba97668687bbef54805 diff --git a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.dll b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.dll index f7441a71..d54fa7b5 100644 Binary files a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.dll and b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.dll differ diff --git a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.xml b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.xml index 83fc7379..22f50aa5 100644 --- a/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.xml +++ b/源代码/StgSharp/obj/x64/Release/netstandard2.1/StgSharp.xml @@ -4,62 +4,49 @@ StgSharp - - - - - - - - Get the status of a certain key on the keyboard. - - - - - - - - Function handler to load an opengl function by searching its name. - - the name of the Opengl function - An intptr value representing the pointer to the function - - + Interface of all kinds OpenGL buffer objects - + Get the only handle to one of the Object instance - + Bind a buffer instance to OpenGL Index of handle of the object in this instance to be bind - + - + + + Function handler to load an opengl function by searching its name. + + the name of the Opengl function + An Intptr value representing the pointer to the function + + A collection of handle to Element Buffer Object in OpenglFunc. Each value indexed from instance of this class this is the only handle to one Element Buffer Object. - + Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. will be set as default target. Index of object to be binded in handle set - + Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. Target of this frame buffer should be set manually. @@ -67,139 +54,140 @@ The frame buffer target of the binding operation. Index of object to be binded in handle set - + + Load an to certain texture. - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - Data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - Data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - A of data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - A of data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - A array of data to write in - How OpenGL use these data, defined by - - + - + - Load all supported OpenGL APIs and bind them to given context. + Set _data to current vertex buffer object - The used as current OpenGL context + Type of bufferData + Index to find certain VBO in this instance + Data to write in + How OpenGL use these _data, defined by - + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + Data to write in + How OpenGL use these _data, defined by + + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A of _data to write in + How OpenGL use these _data, defined by + + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A of _data to write in + How OpenGL use these _data, defined by + + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A array of _data to write in + How OpenGL use these _data, defined by + + Get the function pointer of given OpenGL api name ContextName of the OpenGL api The funtion pointer of the api in stream of - + + + Load all supported OpenGL APIs and bind them to given . + + The handle to current OpenGL viewPortDisplay + + Bind a frame buffer to a frame buffer target - Same function as glBindFramebuffer. + Same function as glBindFramebuffer. The frame buffer target of the binding operation. The handle of the frame buffer object to bind. - + - Init an OpenGl context if current form has not been binded to any context. and set the context binded to - current form as current OpenGL context. + Initialize an OpenGl viewPortDisplay if current form has not been binded to any viewPortDisplay. + and set the viewPortDisplay binded to current form as current OpenGL viewPortDisplay. - Something goes wrong and StgSharp fails in creating a new OpenGL context. + Something goes wrong and StgSharp fails in creating a new OpenGL viewPortDisplay. - + - Create a set of . + Create a set of . Amount of EBO to be created. - + - Create a sets of + Create a sets of Amount of textures to be created. - + - Create a set of . + Create a set of . Amount of VAO to be created. - + - Create a set of . + Create a set of . Amount of Object to be created. - + - Create an instance of program + Create an instance of program - New instance of instance. + New instance of instance. - + Attach one shader code to a shader program. Shader program to attach Index of shader code in current shader code set. - + - Init a program with no shader attached. + CustomizeInit a program with no shader attached. - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -207,7 +195,7 @@ ContextName of the Uniform in shader code - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -215,7 +203,7 @@ ContextName of the Uniform in shader code - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -223,7 +211,7 @@ ContextName of the Uniform in shader code - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -231,43 +219,19 @@ ContextName of the Uniform in shader code - + - Link the shader to current context. + Link the shader to current viewPortDisplay. - + - Let the current context use this shader. + Let the current viewPortDisplay use this shader. - + - A handle to an OpenGL object, - must be indexed from a . - Direct call will cause - - - - - A handle to an OpenGL object. - - - - - Release all resource in this handle. - This will release all resource in this . - This will be not usable. - - - - - - - - - - + Hash code of time pixels updated last time. @@ -275,12 +239,22 @@ + + + + + + + + + + Set the size limit of current form @@ -290,9 +264,9 @@ Maximum width of current form Maximum height of current form - + - Get (T is ) uniform from a shader. + Get (TView is ) uniform from a shader. This uniform will be used as projection matrix of this camera. Additionally, for multi-shader rendering, each shader requires a uniform, so do not ignore return value of this method. @@ -300,11 +274,11 @@ Shader using this camera ContextName of projection camera named in shader - (T is ) representing + (TView is ) representing projection matrix in shader program. - + Get all uniform related to this . @@ -317,7 +291,7 @@ - Init an instance of OpenGL program, + CustomizeInit an instance of OpenGL program, This method should be called before any other StgSharp api. @@ -423,16 +397,6 @@ Data is actually stored in s in certain RAID mode. - - - A sensor used for checking out if a bullet hit a player or something else - - - - - A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y - - X position of an enenmy entity @@ -443,6 +407,16 @@ Y position of an enemy entity + + + A sensor used for checking out if a bullet hit a player or something else + + + + + A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y + + 当几何体调用了过多的CalcVec方法时,产生UnusedVertexException异常 @@ -474,7 +448,7 @@ Calculate movement to center - Current time tick + CurrentBlueprint time tick @@ -482,13 +456,14 @@ A square - + - Run all nodes repeatedly until it is instructed to terminate. + A sets of complex logic designed for running in multi threads environment. + Warning: do not run a instance in multi threads more than once. + - Instructor to terminate all tasks. Returns if tasks should terminate - + @@ -497,27 +472,87 @@ in current node, the port on the other node cannot get the change. - + - Init this form and render it on screen, and respond with operation + Determines whether the contains the + specified key. + + The value to locate in the . + + true if the contains an element with the + specified key; otherwise, false. + + + + + Determines whether the contains the + specified key. + + The value to locate in the . + + true if the contains an element with the + specified key; otherwise, false. + + + + + A microsecond-accuracy timer. It will refresh every a certain time span. - + + + Create a new and define the length of time span. Length of a single time span is defined in microseconds. + + + + + + + Create a new and define the length of time span. + Length of a single time span is defined in seconds. + + + + + + + Create a new and define the length of time span. Length of a single time span is defined in microseconds. + + + + + + + + The method this will call every time a new time span started. + + + + + Time source provider provided in internal framework. + + + + + CustomizeInit this form and render it on screen, and respond with operation + + + Height of this form, represent in - + Width of this form, represent in - + Width of this form, represent in - + Resize the current form @@ -525,7 +560,7 @@ A (width,height) representing the new size of current form - + Set the size limit of current form @@ -536,7 +571,7 @@ Maximum size of current form. In form of a of (width,height) - + Set the size limit of current form @@ -545,42 +580,26 @@ Maximum width of current form Maximum height of current form - + - A microsecond-accuracy timer. It will refresh every a certain time span. + ViewBase is the base type for all view types, providing context binding and control element binding. + A complete view should contain one complete , , and , + which provide layout descriptions of control elements, user responses, and rendering implementations in the view. + Data between instances of , , and is shared through . - + - Create a new and define the length of time span. Length of a single time span is defined in microseconds. + Get the status of a certain key on the keyboard. - - + + representing if a key is pressed or released. - + - Create a new and define the length of time span. - Length of a single time span is defined in seconds. - - - - - - - Create a new and define the length of time span. Length of a single time span is defined in microseconds. - - - - - - - - Time source provider provided in internal framework. - - - - - The method this will call every time a new time span started. + ViewDesigner provides descriptions of various controls in the view, + binds the controls to specific user actions and behaviors, + and describes the layout and interactions of each control. diff --git a/源代码/StgSharp/obj/x64/Release/netstandard2.1/ref/StgSharp.dll b/源代码/StgSharp/obj/x64/Release/netstandard2.1/ref/StgSharp.dll index 122ffd03..35234a14 100644 Binary files a/源代码/StgSharp/obj/x64/Release/netstandard2.1/ref/StgSharp.dll and b/源代码/StgSharp/obj/x64/Release/netstandard2.1/ref/StgSharp.dll differ diff --git a/源代码/StgSharp/obj/x64/Release/netstandard2.1/refint/StgSharp.dll b/源代码/StgSharp/obj/x64/Release/netstandard2.1/refint/StgSharp.dll index 122ffd03..35234a14 100644 Binary files a/源代码/StgSharp/obj/x64/Release/netstandard2.1/refint/StgSharp.dll and b/源代码/StgSharp/obj/x64/Release/netstandard2.1/refint/StgSharp.dll differ diff --git a/源代码/StgSharpC.bsc b/源代码/StgSharpC.bsc index 88703244..871df098 100644 Binary files a/源代码/StgSharpC.bsc and b/源代码/StgSharpC.bsc differ diff --git a/源代码/StgSharpC.dll b/源代码/StgSharpC.dll index 7ebc661a..16028959 100644 Binary files a/源代码/StgSharpC.dll and b/源代码/StgSharpC.dll differ diff --git a/源代码/StgSharpC.exp b/源代码/StgSharpC.exp index d973038f..8f179dfe 100644 Binary files a/源代码/StgSharpC.exp and b/源代码/StgSharpC.exp differ diff --git a/源代码/StgSharpC.lib b/源代码/StgSharpC.lib index 79aed3a2..22c7e74f 100644 Binary files a/源代码/StgSharpC.lib and b/源代码/StgSharpC.lib differ diff --git a/源代码/StgSharpC.pdb b/源代码/StgSharpC.pdb index f2013b6c..097bab7d 100644 Binary files a/源代码/StgSharpC.pdb and b/源代码/StgSharpC.pdb differ diff --git a/源代码/StgSharpC/x64/Debug/NativeCodeAnalysis.read.1.tlog b/源代码/StgSharpC/x64/Debug/NativeCodeAnalysis.read.1.tlog deleted file mode 100644 index 024f685a..00000000 --- a/源代码/StgSharpC/x64/Debug/NativeCodeAnalysis.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\ENTERPRISE\TEAM TOOLS\STATIC ANALYSIS TOOLS\\RULE SETS\NATIVERECOMMENDEDRULES.RULESET diff --git a/源代码/StgSharpC/x64/Debug/StgSharpC.Build.CppClean.log b/源代码/StgSharpC/x64/Debug/StgSharpC.Build.CppClean.log index ca6584ad..4045c342 100644 --- a/源代码/StgSharpC/x64/Debug/StgSharpC.Build.CppClean.log +++ b/源代码/StgSharpC/x64/Debug/StgSharpC.Build.CppClean.log @@ -27,6 +27,14 @@ d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharp d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc.lib d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc.exp d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.ilk +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\dllmain.nativecodeanalysis.xml +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\mat2.nativecodeanalysis.xml +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\mat3.nativecodeanalysis.xml +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\mat4.nativecodeanalysis.xml +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stb_image.nativecodeanalysis.xml +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.nativecodeanalysis.xml +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\vc.nativecodeanalysis.all.xml +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\vector.nativecodeanalysis.xml d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\bscmake.command.1.tlog d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\bscmake.read.1.tlog d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\源代码\stgsharpc\x64\debug\stgsharpc.tlog\bscmake.write.1.tlog diff --git a/源代码/StgSharpC/x64/Debug/StgSharpC.cod b/源代码/StgSharpC/x64/Debug/StgSharpC.cod index 7419c2b6..640d33bc 100644 --- a/源代码/StgSharpC/x64/Debug/StgSharpC.cod +++ b/源代码/StgSharpC/x64/Debug/StgSharpC.cod @@ -1,4 +1,4 @@ -; Listing generated by Microsoft (R) Optimizing Compiler Version 19.39.33523.0 +; Listing generated by Microsoft (R) Optimizing Compiler Version 19.41.34120.0 include listing.inc @@ -16,22 +16,22 @@ msvcjmc SEGMENT __A19B9DB6_ssgc_framework@h DB 01H __0ED14FEE_winpackagefamily@h DB 01H __F92EF742_winapifamily@h DB 01H -__4B783B3C_concurrencysal@h DB 01H -__137BB1BE_sal@h DB 01H -__805F4069_vadefs@h DB 01H -__1EAACA9B_vcruntime@h DB 01H -__F8522E0F_stdint@h DB 01H +__DDA0A690_concurrencysal@h DB 01H +__9ECC08BE_sal@h DB 01H +__E05D733A_vadefs@h DB 01H +__6A355E0E_vcruntime@h DB 01H +__98501D5C_stdint@h DB 01H __874AB8BA_khrplatform@h DB 01H __8DCB230D_gl@h DB 01H __1B0272D9_corecrt@h DB 01H __13F5961F_stddef@h DB 01H -__5BC5AF51_mmintrin@h DB 01H +__7583A0D2_mmintrin@h DB 01H __45DED006_corecrt_malloc@h DB 01H __FA77ED4C_malloc@h DB 01H -__9E7FA6CF_xmmintrin@h DB 01H +__EAE0325A_xmmintrin@h DB 01H __22E515EB_sdkddkver@h DB 01H -__1227BCE2_excpt@h DB 01H -__CC8D90C0_stdarg@h DB 01H +__A09A3A7D_excpt@h DB 01H +__AC8FA393_stdarg@h DB 01H __29F49F40_specstrings_undef@h DB 01H __D0F42932_specstrings_strict@h DB 01H __F00405FD_sdv_driverspecs@h DB 01H @@ -42,7 +42,7 @@ __1EC467ED_ctype@h DB 01H __98517906_kernelspecs@h DB 01H __D3497022_basetsd@h DB 01H __61CC25A1_errno@h DB 01H -__0504B279_vcruntime_string@h DB 01H +__890838BD_vcruntime_string@h DB 01H __E4C945B4_corecrt_memcpy_s@h DB 01H __8EAFF484_corecrt_memory@h DB 01H __6490AEC5_corecrt_wstring@h DB 01H @@ -120,20 +120,20 @@ __E15BF856_windows@h DB 01H __61B03275_ssgc_internal@h DB 01H __B47D1049_glfw3@h DB 01H __5F89FF5A_wgl@h DB 01H -__FB1D2F03_emmintrin@h DB 01H -__24BC478A_pmmintrin@h DB 01H -__94653408_tmmintrin@h DB 01H -__BD5E218B_smmintrin@h DB 01H -__D83CA847_nmmintrin@h DB 01H -__0D875209_wmmintrin@h DB 01H -__C6131F0E_zmmintrin@h DB 01H -__F107BDC4_immintrin@h DB 01H +__8F82BB96_emmintrin@h DB 01H +__5023D31F_pmmintrin@h DB 01H +__E0FAA09D_tmmintrin@h DB 01H +__C9C1B51E_smmintrin@h DB 01H +__ACA33CD2_nmmintrin@h DB 01H +__7918C69C_wmmintrin@h DB 01H +__B28C8B9B_zmmintrin@h DB 01H +__85982951_immintrin@h DB 01H __44420885_corecrt_stdio_config@h DB 01H __AB601D8D_corecrt_wstdio@h DB 01H __C1EC35D3_stdio@h DB 01H __FD6DBD68_corecrt_search@h DB 01H __E2E33A61_corecrt_wstdlib@h DB 01H -__46240030_limits@h DB 01H +__26263363_limits@h DB 01H __6E5ACABA_stdlib@h DB 01H __5274102E_stb_image@h DB 01H __CE2BBC10_StgSharpC@h DB 01H @@ -172,61 +172,61 @@ _DATA ENDS ; COMDAT pdata pdata SEGMENT $pdata$__local_stdio_printf_options DD imagerel $LN3 - DD imagerel $LN3+44 + DD imagerel $LN3+45 DD imagerel $unwind$__local_stdio_printf_options pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$_vfprintf_l DD imagerel $LN3 - DD imagerel $LN3+103 + DD imagerel $LN3+104 DD imagerel $unwind$_vfprintf_l pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$printf DD imagerel $LN3 - DD imagerel $LN3+191 + DD imagerel $LN3+192 DD imagerel $unwind$printf pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$glCheckShaderStat DD imagerel $LN4 - DD imagerel $LN4+229 + DD imagerel $LN4+232 DD imagerel $unwind$glCheckShaderStat pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$initGL DD imagerel $LN3 - DD imagerel $LN3+91 + DD imagerel $LN3+111 DD imagerel $unwind$initGL pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$linkShaderProgram DD imagerel $LN5 - DD imagerel $LN5+223 + DD imagerel $LN5+227 DD imagerel $unwind$linkShaderProgram pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$loadImageData DD imagerel $LN4 - DD imagerel $LN4+142 + DD imagerel $LN4+143 DD imagerel $unwind$loadImageData pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$loadGlfuncDefault DD imagerel $LN7 - DD imagerel $LN7+186 + DD imagerel $LN7+188 DD imagerel $unwind$loadGlfuncDefault pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$unloadImageData DD imagerel $LN3 - DD imagerel $LN3+58 + DD imagerel $LN3+60 DD imagerel $unwind$unloadImageData pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$readLog DD imagerel $LN5 - DD imagerel $LN5+101 + DD imagerel $LN5+103 DD imagerel $unwind$readLog pdata ENDS ; COMDAT rtc$TMZ @@ -277,7 +277,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 03aH - DB 0c6H + DB 0caH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -317,7 +317,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 045H - DB 0ccH + DB 0cfH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -347,7 +347,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 045H - DB 0a6H + DB 0a7H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -406,7 +406,7 @@ _TEXT SEGMENT $T1 = 200 readLog PROC ; COMDAT -; 77 : { +; 78 : { $LN5: 00000 40 55 push rbp @@ -417,41 +417,43 @@ $LN5: 0000f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c 00016 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001b 90 npad 1 -; 78 : infolog[511] = '\0'; +; 79 : infolog[511] = '\0'; - 0001b b8 01 00 00 00 mov eax, 1 - 00020 48 69 c0 ff 01 + 0001c b8 01 00 00 00 mov eax, 1 + 00021 48 69 c0 ff 01 00 00 imul rax, rax, 511 ; 000001ffH - 00027 48 89 85 c8 00 + 00028 48 89 85 c8 00 00 00 mov QWORD PTR $T1[rbp], rax - 0002e 48 81 bd c8 00 + 0002f 48 81 bd c8 00 00 00 00 02 00 00 cmp QWORD PTR $T1[rbp], 512 ; 00000200H - 00039 73 02 jae SHORT $LN3@readLog - 0003b eb 05 jmp SHORT $LN4@readLog + 0003a 73 02 jae SHORT $LN3@readLog + 0003c eb 06 jmp SHORT $LN4@readLog $LN3@readLog: - 0003d e8 00 00 00 00 call __report_rangecheckfailure + 0003e e8 00 00 00 00 call __report_rangecheckfailure + 00043 90 npad 1 $LN4@readLog: - 00042 48 8d 05 00 00 + 00044 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:infolog - 00049 48 8b 8d c8 00 + 0004b 48 8b 8d c8 00 00 00 mov rcx, QWORD PTR $T1[rbp] - 00050 c6 04 08 00 mov BYTE PTR [rax+rcx], 0 + 00052 c6 04 08 00 mov BYTE PTR [rax+rcx], 0 -; 79 : return &infolog; +; 80 : return &infolog; - 00054 48 8d 05 00 00 + 00056 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:infolog $LN2@readLog: -; 80 : } +; 81 : } - 0005b 48 8d a5 e8 00 + 0005d 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00062 5f pop rdi - 00063 5d pop rbp - 00064 c3 ret 0 + 00064 5f pop rdi + 00065 5d pop rbp + 00066 c3 ret 0 readLog ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -461,7 +463,7 @@ _TEXT SEGMENT out$ = 224 unloadImageData PROC ; COMDAT -; 72 : { +; 73 : { $LN3: 00000 48 89 4c 24 08 mov QWORD PTR [rsp+8], rcx @@ -473,22 +475,24 @@ $LN3: 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 -; 73 : free(out->pixelPtr); +; 74 : free(out->pixelPtr); - 0001f 48 8b 85 e0 00 + 00020 48 8b 85 e0 00 00 00 mov rax, QWORD PTR out$[rbp] - 00026 48 8b 48 10 mov rcx, QWORD PTR [rax+16] - 0002a ff 15 00 00 00 + 00027 48 8b 48 10 mov rcx, QWORD PTR [rax+16] + 0002b ff 15 00 00 00 00 call QWORD PTR __imp_free + 00031 90 npad 1 -; 74 : } +; 75 : } - 00030 48 8d a5 c8 00 + 00032 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00037 5f pop rdi - 00038 5d pop rbp - 00039 c3 ret 0 + 00039 5f pop rdi + 0003a 5d pop rbp + 0003b c3 ret 0 unloadImageData ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -500,7 +504,7 @@ i$1 = 40 procName$ = 288 loadGlfuncDefault PROC ; COMDAT -; 30 : { +; 31 : { $LN7: 00000 48 89 4c 24 08 mov QWORD PTR [rsp+8], rcx @@ -512,86 +516,88 @@ $LN7: 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 -; 31 : void* ret = glfwGetProcAddress(procName); +; 32 : void* ret = glfwGetProcAddress(procName); - 0001f 48 8b 8d 20 01 + 00020 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR procName$[rbp] - 00026 e8 00 00 00 00 call glfwGetProcAddress - 0002b 48 89 45 08 mov QWORD PTR ret$[rbp], rax + 00027 e8 00 00 00 00 call glfwGetProcAddress + 0002c 48 89 45 08 mov QWORD PTR ret$[rbp], rax -; 32 : //printf("%llu\n", (uint64_t)ret); -; 33 : if (ret = NULL) +; 33 : //printf("%llu\n", (uint64_t)ret); +; 34 : if (ret = NULL) - 0002f 48 c7 45 08 00 + 00030 48 c7 45 08 00 00 00 00 mov QWORD PTR ret$[rbp], 0 - 00037 48 83 7d 08 00 cmp QWORD PTR ret$[rbp], 0 - 0003c 74 6e je SHORT $LN5@loadGlfunc + 00038 48 83 7d 08 00 cmp QWORD PTR ret$[rbp], 0 + 0003d 74 6f je SHORT $LN5@loadGlfunc -; 34 : { -; 35 : *infolog = "Failed to load OpenGL api:"; +; 35 : { +; 36 : *infolog = "Failed to load OpenGL api:"; - 0003e b8 01 00 00 00 mov eax, 1 - 00043 48 6b c0 00 imul rax, rax, 0 - 00047 48 8d 0d 00 00 + 0003f b8 01 00 00 00 mov eax, 1 + 00044 48 6b c0 00 imul rax, rax, 0 + 00048 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:infolog - 0004e 48 8d 15 00 00 + 0004f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BL@MOJGOJJP@Failed?5to?5load?5OpenGL?5api?3@ - 00055 88 14 01 mov BYTE PTR [rcx+rax], dl + 00056 88 14 01 mov BYTE PTR [rcx+rax], dl -; 36 : for (size_t i = 0; i < sizeof(procName); i++) +; 37 : for (size_t i = 0; i < sizeof(procName); i++) - 00058 48 c7 45 28 00 + 00059 48 c7 45 28 00 00 00 00 mov QWORD PTR i$1[rbp], 0 - 00060 eb 0b jmp SHORT $LN4@loadGlfunc + 00061 eb 0b jmp SHORT $LN4@loadGlfunc $LN2@loadGlfunc: - 00062 48 8b 45 28 mov rax, QWORD PTR i$1[rbp] - 00066 48 ff c0 inc rax - 00069 48 89 45 28 mov QWORD PTR i$1[rbp], rax + 00063 48 8b 45 28 mov rax, QWORD PTR i$1[rbp] + 00067 48 ff c0 inc rax + 0006a 48 89 45 28 mov QWORD PTR i$1[rbp], rax $LN4@loadGlfunc: - 0006d 48 83 7d 28 08 cmp QWORD PTR i$1[rbp], 8 - 00072 73 25 jae SHORT $LN3@loadGlfunc + 0006e 48 83 7d 28 08 cmp QWORD PTR i$1[rbp], 8 + 00073 73 25 jae SHORT $LN3@loadGlfunc -; 37 : { -; 38 : infolog[30 + i] = procName[i]; +; 38 : { +; 39 : infolog[30 + i] = procName[i]; - 00074 48 8d 05 00 00 + 00075 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:infolog - 0007b 48 8b 4d 28 mov rcx, QWORD PTR i$1[rbp] - 0007f 48 8b 95 20 01 + 0007c 48 8b 4d 28 mov rcx, QWORD PTR i$1[rbp] + 00080 48 8b 95 20 01 00 00 mov rdx, QWORD PTR procName$[rbp] - 00086 48 03 d1 add rdx, rcx - 00089 48 8b ca mov rcx, rdx - 0008c 48 8b 55 28 mov rdx, QWORD PTR i$1[rbp] - 00090 0f b6 09 movzx ecx, BYTE PTR [rcx] - 00093 88 4c 10 1e mov BYTE PTR [rax+rdx+30], cl + 00087 48 03 d1 add rdx, rcx + 0008a 48 8b ca mov rcx, rdx + 0008d 48 8b 55 28 mov rdx, QWORD PTR i$1[rbp] + 00091 0f b6 09 movzx ecx, BYTE PTR [rcx] + 00094 88 4c 10 1e mov BYTE PTR [rax+rdx+30], cl -; 39 : } +; 40 : } - 00097 eb c9 jmp SHORT $LN2@loadGlfunc + 00098 eb c9 jmp SHORT $LN2@loadGlfunc $LN3@loadGlfunc: -; 40 : printf("%s\n", infolog); +; 41 : printf("%s\n", infolog); - 00099 48 8d 15 00 00 + 0009a 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:infolog - 000a0 48 8d 0d 00 00 + 000a1 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_03OFAPEBGM@?$CFs?6@ - 000a7 e8 00 00 00 00 call printf + 000a8 e8 00 00 00 00 call printf + 000ad 90 npad 1 $LN5@loadGlfunc: -; 41 : } -; 42 : return (GLFWglproc)ret; +; 42 : } +; 43 : return (GLFWglproc)ret; - 000ac 48 8b 45 08 mov rax, QWORD PTR ret$[rbp] + 000ae 48 8b 45 08 mov rax, QWORD PTR ret$[rbp] -; 43 : } +; 44 : } - 000b0 48 8d a5 08 01 + 000b2 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000b7 5f pop rdi - 000b8 5d pop rbp - 000b9 c3 ret 0 + 000b9 5f pop rdi + 000ba 5d pop rbp + 000bb c3 ret 0 loadGlfuncDefault ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -603,7 +609,7 @@ out$ = 232 loader$ = 240 loadImageData PROC ; COMDAT -; 63 : { +; 64 : { $LN4: 00000 4c 89 44 24 18 mov QWORD PTR [rsp+24], r8 @@ -617,52 +623,53 @@ $LN4: 0001d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c 00024 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00029 90 npad 1 -; 64 : if (loader == NULL) +; 65 : if (loader == NULL) - 00029 48 83 bd f0 00 + 0002a 48 83 bd f0 00 00 00 00 cmp QWORD PTR loader$[rbp], 0 - 00031 75 0e jne SHORT $LN2@loadImageD + 00032 75 0e jne SHORT $LN2@loadImageD -; 65 : { -; 66 : loader = stbi_load; +; 66 : { +; 67 : loader = stbi_load; - 00033 48 8d 05 00 00 + 00034 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:stbi_load - 0003a 48 89 85 f0 00 + 0003b 48 89 85 f0 00 00 00 mov QWORD PTR loader$[rbp], rax $LN2@loadImageD: -; 67 : } -; 68 : out->pixelPtr = loader(location, &(out->width), &(out->height), &(out->channel), 0); +; 68 : } +; 69 : out->pixelPtr = loader(location, &(out->width), &(out->height), &(out->channel), 0); - 00041 48 8b 85 e8 00 + 00042 48 8b 85 e8 00 00 00 mov rax, QWORD PTR out$[rbp] - 00048 48 83 c0 08 add rax, 8 - 0004c 48 8b 8d e8 00 + 00049 48 83 c0 08 add rax, 8 + 0004d 48 8b 8d e8 00 00 00 mov rcx, QWORD PTR out$[rbp] - 00053 48 83 c1 04 add rcx, 4 - 00057 48 8b 95 e8 00 + 00054 48 83 c1 04 add rcx, 4 + 00058 48 8b 95 e8 00 00 00 mov rdx, QWORD PTR out$[rbp] - 0005e c7 44 24 20 00 + 0005f c7 44 24 20 00 00 00 00 mov DWORD PTR [rsp+32], 0 - 00066 4c 8b c8 mov r9, rax - 00069 4c 8b c1 mov r8, rcx - 0006c 48 8b 8d e0 00 + 00067 4c 8b c8 mov r9, rax + 0006a 4c 8b c1 mov r8, rcx + 0006d 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR location$[rbp] - 00073 ff 95 f0 00 00 + 00074 ff 95 f0 00 00 00 call QWORD PTR loader$[rbp] - 00079 48 8b 8d e8 00 + 0007a 48 8b 8d e8 00 00 00 mov rcx, QWORD PTR out$[rbp] - 00080 48 89 41 10 mov QWORD PTR [rcx+16], rax + 00081 48 89 41 10 mov QWORD PTR [rcx+16], rax -; 69 : } +; 70 : } - 00084 48 8d a5 c8 00 + 00085 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0008b 5f pop rdi - 0008c 5d pop rbp - 0008d c3 ret 0 + 0008c 5f pop rdi + 0008d 5d pop rbp + 0008e c3 ret 0 loadImageData ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -675,7 +682,7 @@ context$ = 256 shaderProgram$ = 264 linkShaderProgram PROC ; COMDAT -; 46 : { +; 47 : { $LN5: 00000 89 54 24 10 mov DWORD PTR [rsp+16], edx @@ -699,85 +706,89 @@ $LN5: 00041 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c 00048 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0004d 90 npad 1 -; 47 : context->LinkProgram(shaderProgram); +; 48 : context->LinkProgram(shaderProgram); - 0004d 8b 8d 08 01 00 + 0004e 8b 8d 08 01 00 00 mov ecx, DWORD PTR shaderProgram$[rbp] - 00053 48 8b 85 00 01 + 00054 48 8b 85 00 01 00 00 mov rax, QWORD PTR context$[rbp] - 0005a ff 90 80 22 00 + 0005b ff 90 80 22 00 00 call QWORD PTR [rax+8832] + 00061 90 npad 1 -; 48 : -; 49 : int success; -; 50 : context->GetProgramiv(shaderProgram, GL_LINK_STATUS, &success); +; 49 : +; 50 : int success; +; 51 : context->GetProgramiv(shaderProgram, GL_LINK_STATUS, &success); - 00060 4c 8d 45 04 lea r8, QWORD PTR success$[rbp] - 00064 ba 82 8b 00 00 mov edx, 35714 ; 00008b82H - 00069 8b 8d 08 01 00 + 00062 4c 8d 45 04 lea r8, QWORD PTR success$[rbp] + 00066 ba 82 8b 00 00 mov edx, 35714 ; 00008b82H + 0006b 8b 8d 08 01 00 00 mov ecx, DWORD PTR shaderProgram$[rbp] - 0006f 48 8b 85 00 01 + 00071 48 8b 85 00 01 00 00 mov rax, QWORD PTR context$[rbp] - 00076 ff 90 48 1a 00 + 00078 ff 90 48 1a 00 00 call QWORD PTR [rax+6728] + 0007e 90 npad 1 -; 51 : if (!success) +; 52 : if (!success) - 0007c 83 7d 04 00 cmp DWORD PTR success$[rbp], 0 - 00080 75 28 jne SHORT $LN2@linkShader + 0007f 83 7d 04 00 cmp DWORD PTR success$[rbp], 0 + 00083 75 29 jne SHORT $LN2@linkShader -; 52 : { -; 53 : context->GetProgramInfoLog(shaderProgram, 512, NULL, infolog); +; 53 : { +; 54 : context->GetProgramInfoLog(shaderProgram, 512, NULL, infolog); - 00082 4c 8d 0d 00 00 + 00085 4c 8d 0d 00 00 00 00 lea r9, OFFSET FLAT:infolog - 00089 45 33 c0 xor r8d, r8d - 0008c ba 00 02 00 00 mov edx, 512 ; 00000200H - 00091 8b 8d 08 01 00 + 0008c 45 33 c0 xor r8d, r8d + 0008f ba 00 02 00 00 mov edx, 512 ; 00000200H + 00094 8b 8d 08 01 00 00 mov ecx, DWORD PTR shaderProgram$[rbp] - 00097 48 8b 85 00 01 + 0009a 48 8b 85 00 01 00 00 mov rax, QWORD PTR context$[rbp] - 0009e ff 90 98 19 00 + 000a1 ff 90 98 19 00 00 call QWORD PTR [rax+6552] + 000a7 90 npad 1 -; 54 : return 0; +; 55 : return 0; - 000a4 33 c0 xor eax, eax - 000a6 eb 08 jmp SHORT $LN1@linkShader + 000a8 33 c0 xor eax, eax + 000aa eb 08 jmp SHORT $LN1@linkShader -; 55 : } +; 56 : } - 000a8 eb 06 jmp SHORT $LN3@linkShader + 000ac eb 06 jmp SHORT $LN3@linkShader $LN2@linkShader: -; 56 : else -; 57 : { -; 58 : return shaderProgram; +; 57 : else +; 58 : { +; 59 : return shaderProgram; - 000aa 8b 85 08 01 00 + 000ae 8b 85 08 01 00 00 mov eax, DWORD PTR shaderProgram$[rbp] $LN3@linkShader: $LN1@linkShader: -; 59 : } -; 60 : } +; 60 : } +; 61 : } - 000b0 48 8b f8 mov rdi, rax - 000b3 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 000b7 48 8d 15 00 00 + 000b4 48 8b f8 mov rdi, rax + 000b7 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 000bb 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:linkShaderProgram$rtcFrameData - 000be e8 00 00 00 00 call _RTC_CheckStackVars - 000c3 48 8b c7 mov rax, rdi - 000c6 48 8b 8d d8 00 + 000c2 e8 00 00 00 00 call _RTC_CheckStackVars + 000c7 48 8b c7 mov rax, rdi + 000ca 48 8b 8d d8 00 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000cd 48 33 cd xor rcx, rbp - 000d0 e8 00 00 00 00 call __security_check_cookie - 000d5 48 8d a5 e8 00 + 000d1 48 33 cd xor rcx, rbp + 000d4 e8 00 00 00 00 call __security_check_cookie + 000d9 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 000dc 5f pop rdi - 000dd 5d pop rbp - 000de c3 ret 0 + 000e0 5f pop rdi + 000e1 5d pop rbp + 000e2 c3 ret 0 linkShaderProgram ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -801,34 +812,45 @@ $LN3: 00016 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c 0001d e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00022 90 npad 1 ; 24 : glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion); - 00022 8b 95 e0 00 00 + 00023 8b 95 e0 00 00 00 mov edx, DWORD PTR majorVersion$[rbp] - 00028 b9 02 20 02 00 mov ecx, 139266 ; 00022002H - 0002d e8 00 00 00 00 call glfwWindowHint + 00029 b9 02 20 02 00 mov ecx, 139266 ; 00022002H + 0002e e8 00 00 00 00 call glfwWindowHint + 00033 90 npad 1 ; 25 : glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minorVersion); - 00032 8b 95 e8 00 00 + 00034 8b 95 e8 00 00 00 mov edx, DWORD PTR minorVersion$[rbp] - 00038 b9 03 20 02 00 mov ecx, 139267 ; 00022003H - 0003d e8 00 00 00 00 call glfwWindowHint + 0003a b9 03 20 02 00 mov ecx, 139267 ; 00022003H + 0003f e8 00 00 00 00 call glfwWindowHint + 00044 90 npad 1 ; 26 : glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - 00042 ba 01 20 03 00 mov edx, 204801 ; 00032001H - 00047 b9 08 20 02 00 mov ecx, 139272 ; 00022008H - 0004c e8 00 00 00 00 call glfwWindowHint + 00045 ba 01 20 03 00 mov edx, 204801 ; 00032001H + 0004a b9 08 20 02 00 mov ecx, 139272 ; 00022008H + 0004f e8 00 00 00 00 call glfwWindowHint + 00054 90 npad 1 -; 27 : } +; 27 : glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); - 00051 48 8d a5 c8 00 + 00055 ba 01 00 00 00 mov edx, 1 + 0005a b9 03 00 02 00 mov ecx, 131075 ; 00020003H + 0005f e8 00 00 00 00 call glfwWindowHint + 00064 90 npad 1 + +; 28 : } + + 00065 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00058 5f pop rdi - 00059 5d pop rbp - 0005a c3 ret 0 + 0006c 5f pop rdi + 0006d 5d pop rbp + 0006e c3 ret 0 initGL ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -869,74 +891,77 @@ $LN4: 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__59F96598_StgSharpC@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 12 : int stat = 0; - 00058 c7 45 04 00 00 + 00059 c7 45 04 00 00 00 00 mov DWORD PTR stat$[rbp], 0 ; 13 : context->GetShaderiv(shaderHandle, key, &stat); - 0005f 4c 8d 45 04 lea r8, QWORD PTR stat$[rbp] - 00063 8b 95 10 01 00 + 00060 4c 8d 45 04 lea r8, QWORD PTR stat$[rbp] + 00064 8b 95 10 01 00 00 mov edx, DWORD PTR key$[rbp] - 00069 8b 8d 08 01 00 + 0006a 8b 8d 08 01 00 00 mov ecx, DWORD PTR shaderHandle$[rbp] - 0006f 48 8b 85 00 01 + 00070 48 8b 85 00 01 00 00 mov rax, QWORD PTR context$[rbp] - 00076 ff 90 40 1b 00 + 00077 ff 90 40 1b 00 00 call QWORD PTR [rax+6976] + 0007d 90 npad 1 ; 14 : if (!stat) - 0007c 83 7d 04 00 cmp DWORD PTR stat$[rbp], 0 - 00080 75 22 jne SHORT $LN2@glCheckSha + 0007e 83 7d 04 00 cmp DWORD PTR stat$[rbp], 0 + 00082 75 23 jne SHORT $LN2@glCheckSha ; 15 : { ; 16 : context->GetShaderInfoLog(shaderHandle, 512, NULL, infolog); - 00082 4c 8d 0d 00 00 + 00084 4c 8d 0d 00 00 00 00 lea r9, OFFSET FLAT:infolog - 00089 45 33 c0 xor r8d, r8d - 0008c ba 00 02 00 00 mov edx, 512 ; 00000200H - 00091 8b 8d 08 01 00 + 0008b 45 33 c0 xor r8d, r8d + 0008e ba 00 02 00 00 mov edx, 512 ; 00000200H + 00093 8b 8d 08 01 00 00 mov ecx, DWORD PTR shaderHandle$[rbp] - 00097 48 8b 85 00 01 + 00099 48 8b 85 00 01 00 00 mov rax, QWORD PTR context$[rbp] - 0009e ff 90 20 1b 00 + 000a0 ff 90 20 1b 00 00 call QWORD PTR [rax+6944] + 000a6 90 npad 1 $LN2@glCheckSha: ; 17 : } ; 18 : *logRef = infolog; - 000a4 48 8b 85 18 01 + 000a7 48 8b 85 18 01 00 00 mov rax, QWORD PTR logRef$[rbp] - 000ab 48 8d 0d 00 00 + 000ae 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:infolog - 000b2 48 89 08 mov QWORD PTR [rax], rcx + 000b5 48 89 08 mov QWORD PTR [rax], rcx ; 19 : return stat; - 000b5 8b 45 04 mov eax, DWORD PTR stat$[rbp] + 000b8 8b 45 04 mov eax, DWORD PTR stat$[rbp] ; 20 : } - 000b8 8b f8 mov edi, eax - 000ba 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 000be 48 8d 15 00 00 + 000bb 8b f8 mov edi, eax + 000bd 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 000c1 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:glCheckShaderStat$rtcFrameData - 000c5 e8 00 00 00 00 call _RTC_CheckStackVars - 000ca 8b c7 mov eax, edi - 000cc 48 8b 8d d8 00 + 000c8 e8 00 00 00 00 call _RTC_CheckStackVars + 000cd 8b c7 mov eax, edi + 000cf 48 8b 8d d8 00 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000d3 48 33 cd xor rcx, rbp - 000d6 e8 00 00 00 00 call __security_check_cookie - 000db 48 8d a5 e8 00 + 000d6 48 33 cd xor rcx, rbp + 000d9 e8 00 00 00 00 call __security_check_cookie + 000de 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 000e2 5f pop rdi - 000e3 5d pop rbp - 000e4 c3 ret 0 + 000e5 5f pop rdi + 000e6 5d pop rbp + 000e7 c3 ret 0 glCheckShaderStat ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -975,54 +1000,55 @@ $LN3: 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C1EC35D3_stdio@h 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 957 : int _Result; ; 958 : va_list _ArgList; ; 959 : __crt_va_start(_ArgList, _Format); - 00058 48 8d 85 28 01 + 00059 48 8d 85 28 01 00 00 lea rax, QWORD PTR _Format$[rbp+8] - 0005f 48 89 45 28 mov QWORD PTR _ArgList$[rbp], rax + 00060 48 89 45 28 mov QWORD PTR _ArgList$[rbp], rax ; 960 : _Result = _vfprintf_l(stdout, _Format, NULL, _ArgList); - 00063 b9 01 00 00 00 mov ecx, 1 - 00068 ff 15 00 00 00 + 00064 b9 01 00 00 00 mov ecx, 1 + 00069 ff 15 00 00 00 00 call QWORD PTR __imp___acrt_iob_func - 0006e 4c 8b 4d 28 mov r9, QWORD PTR _ArgList$[rbp] - 00072 45 33 c0 xor r8d, r8d - 00075 48 8b 95 20 01 + 0006f 4c 8b 4d 28 mov r9, QWORD PTR _ArgList$[rbp] + 00073 45 33 c0 xor r8d, r8d + 00076 48 8b 95 20 01 00 00 mov rdx, QWORD PTR _Format$[rbp] - 0007c 48 8b c8 mov rcx, rax - 0007f e8 00 00 00 00 call _vfprintf_l - 00084 89 45 04 mov DWORD PTR _Result$[rbp], eax + 0007d 48 8b c8 mov rcx, rax + 00080 e8 00 00 00 00 call _vfprintf_l + 00085 89 45 04 mov DWORD PTR _Result$[rbp], eax ; 961 : __crt_va_end(_ArgList); - 00087 48 c7 45 28 00 + 00088 48 c7 45 28 00 00 00 00 mov QWORD PTR _ArgList$[rbp], 0 ; 962 : return _Result; - 0008f 8b 45 04 mov eax, DWORD PTR _Result$[rbp] + 00090 8b 45 04 mov eax, DWORD PTR _Result$[rbp] ; 963 : } - 00092 8b f8 mov edi, eax - 00094 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00098 48 8d 15 00 00 + 00093 8b f8 mov edi, eax + 00095 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00099 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:printf$rtcFrameData - 0009f e8 00 00 00 00 call _RTC_CheckStackVars - 000a4 8b c7 mov eax, edi - 000a6 48 8b 8d f8 00 + 000a0 e8 00 00 00 00 call _RTC_CheckStackVars + 000a5 8b c7 mov eax, edi + 000a7 48 8b 8d f8 00 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000ad 48 33 cd xor rcx, rbp - 000b0 e8 00 00 00 00 call __security_check_cookie - 000b5 48 8d a5 08 01 + 000ae 48 33 cd xor rcx, rbp + 000b1 e8 00 00 00 00 call __security_check_cookie + 000b6 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000bc 5f pop rdi - 000bd 5d pop rbp - 000be c3 ret 0 + 000bd 5f pop rdi + 000be 5d pop rbp + 000bf c3 ret 0 printf ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -1050,30 +1076,31 @@ $LN3: 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C1EC35D3_stdio@h 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 645 : return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Stream, _Format, _Locale, _ArgList); - 0002e e8 00 00 00 00 call __local_stdio_printf_options - 00033 48 8b 8d f8 00 + 0002f e8 00 00 00 00 call __local_stdio_printf_options + 00034 48 8b 8d f8 00 00 00 mov rcx, QWORD PTR _ArgList$[rbp] - 0003a 48 89 4c 24 20 mov QWORD PTR [rsp+32], rcx - 0003f 4c 8b 8d f0 00 + 0003b 48 89 4c 24 20 mov QWORD PTR [rsp+32], rcx + 00040 4c 8b 8d f0 00 00 00 mov r9, QWORD PTR _Locale$[rbp] - 00046 4c 8b 85 e8 00 + 00047 4c 8b 85 e8 00 00 00 mov r8, QWORD PTR _Format$[rbp] - 0004d 48 8b 95 e0 00 + 0004e 48 8b 95 e0 00 00 00 mov rdx, QWORD PTR _Stream$[rbp] - 00054 48 8b 08 mov rcx, QWORD PTR [rax] - 00057 ff 15 00 00 00 + 00055 48 8b 08 mov rcx, QWORD PTR [rax] + 00058 ff 15 00 00 00 00 call QWORD PTR __imp___stdio_common_vfprintf ; 646 : } - 0005d 48 8d a5 c8 00 + 0005e 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00064 5f pop rdi - 00065 5d pop rbp - 00066 c3 ret 0 + 00065 5f pop rdi + 00066 5d pop rbp + 00067 c3 ret 0 _vfprintf_l ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -1093,20 +1120,21 @@ $LN3: 0000f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__44420885_corecrt_stdio_config@h 00016 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001b 90 npad 1 ; 91 : static unsigned __int64 _OptionsStorage; ; 92 : return &_OptionsStorage; - 0001b 48 8d 05 00 00 + 0001c 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:?_OptionsStorage@?1??__local_stdio_printf_options@@9@9 ; `__local_stdio_printf_options'::`2'::_OptionsStorage ; 93 : } - 00022 48 8d a5 c8 00 + 00023 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00029 5f pop rdi - 0002a 5d pop rbp - 0002b c3 ret 0 + 0002a 5f pop rdi + 0002b 5d pop rbp + 0002c c3 ret 0 __local_stdio_printf_options ENDP _TEXT ENDS END diff --git a/源代码/StgSharpC/x64/Debug/StgSharpC.ilk b/源代码/StgSharpC/x64/Debug/StgSharpC.ilk index 1bbbb424..342632e5 100644 Binary files a/源代码/StgSharpC/x64/Debug/StgSharpC.ilk and b/源代码/StgSharpC/x64/Debug/StgSharpC.ilk differ diff --git a/源代码/StgSharpC/x64/Debug/StgSharpC.log b/源代码/StgSharpC/x64/Debug/StgSharpC.log index df116f83..b3bbea32 100644 --- a/源代码/StgSharpC/x64/Debug/StgSharpC.log +++ b/源代码/StgSharpC/x64/Debug/StgSharpC.log @@ -53,29 +53,25 @@ D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp stb_image.c D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\stb_image.c(832,17): warning C4047: “=”:“stbi_uc”与“char [33]”的间接级别不同 StgSharpC.c -C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared\minwindef.h(130,1): warning C4005: “APIENTRY”: 宏重定义 +C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared\minwindef.h(130,9): warning C4005: “APIENTRY”: 宏重定义 (编译源文件“StgSharpC.c”) - D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\glfw3.h(123,1): - 参见“APIENTRY”的前一个定义 + D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\glfw3.h(123,9): + 参见“APIENTRY”的前一个定义 -C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\wingdi.h(36,1): warning C4005: “WINGDIAPI”: 宏重定义 +C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\wingdi.h(36,9): warning C4005: “WINGDIAPI”: 宏重定义 (编译源文件“StgSharpC.c”) - D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\glfw3.h(133,1): - 参见“WINGDIAPI”的前一个定义 + D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\glfw3.h(133,9): + 参见“WINGDIAPI”的前一个定义 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(10,70): warning C4028: 形参 2 与声明不同 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(10,89): warning C4028: 形参 3 与声明不同 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(11,1): warning C4029: 声明的形参表不同于定义 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(10,20): warning C4029: 声明的形参表不同于定义 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(13,26): warning C4244: “函数”: 从“uint64_t”转换到“GLuint”,可能丢失数据 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(16,35): warning C4244: “函数”: 从“uint64_t”转换到“GLuint”,可能丢失数据 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(35,18): warning C4047: “=”:“char”与“char [27]”的间接级别不同 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(79,5): warning C4047: “return”:“char *”与“char (*)[512]”的间接级别不同 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(36,18): warning C4047: “=”:“char”与“char [27]”的间接级别不同 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(80,5): warning C4047: “return”:“char *”与“char (*)[512]”的间接级别不同 vector.c - 正在运行 C/C++ 代码分析... 正在生成代码... 正在创建库 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC.lib 和对象 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC.exp LINK : warning LNK4098: 默认库“MSVCRT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library StgSharpC.vcxproj -> D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC.dll -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\stb_image.c(6525): warning C6262: 函数使用堆叠的 "35036" 字节。请考虑将一些数据移动到堆。 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\stb_image.c(6612): warning C6262: 函数使用堆叠的 "34980" 字节。请考虑将一些数据移动到堆。 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(33): warning C6282: 运算符不正确。 diff --git a/源代码/StgSharpC/x64/Debug/StgSharpC.nativecodeanalysis.xml b/源代码/StgSharpC/x64/Debug/StgSharpC.nativecodeanalysis.xml deleted file mode 100644 index 15d0a226..00000000 --- a/源代码/StgSharpC/x64/Debug/StgSharpC.nativecodeanalysis.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\ - StgSharpC.c - 33 - 12 - - 6282 - 运算符不正确。 - loadGlfuncDefault - loadGlfuncDefault - 29 - - - \ No newline at end of file diff --git a/源代码/StgSharpC/x64/Debug/StgSharpC.obj b/源代码/StgSharpC/x64/Debug/StgSharpC.obj index fa596070..d02d0204 100644 Binary files a/源代码/StgSharpC/x64/Debug/StgSharpC.obj and b/源代码/StgSharpC/x64/Debug/StgSharpC.obj differ diff --git a/源代码/StgSharpC/x64/Debug/StgSharpC.sbr b/源代码/StgSharpC/x64/Debug/StgSharpC.sbr index b8f2a0b8..edf5f919 100644 Binary files a/源代码/StgSharpC/x64/Debug/StgSharpC.sbr and b/源代码/StgSharpC/x64/Debug/StgSharpC.sbr differ diff --git a/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/CL.command.1.tlog b/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/CL.command.1.tlog index 49219445..c4b4000b 100644 Binary files a/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/CL.command.1.tlog and b/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/CL.command.1.tlog differ diff --git a/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/CL.read.1.tlog b/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/CL.read.1.tlog index d02cd116..ffa8edb5 100644 Binary files a/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/CL.read.1.tlog and b/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/CL.read.1.tlog differ diff --git a/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/CL.write.1.tlog b/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/CL.write.1.tlog index 4f779d36..09472a04 100644 Binary files a/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/CL.write.1.tlog and b/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/CL.write.1.tlog differ diff --git a/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/StgSharpC.lastbuildstate b/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/StgSharpC.lastbuildstate index 45308a8a..1ae19507 100644 --- a/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/StgSharpC.lastbuildstate +++ b/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/StgSharpC.lastbuildstate @@ -1,2 +1,2 @@ -PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.39.33519:TargetPlatformVersion=10.0.22621.0: +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.41.34120:TargetPlatformVersion=10.0.22621.0: Debug|x64|D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\| diff --git a/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/bscmake.read.1.tlog b/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/bscmake.read.1.tlog index 264c92fb..09874510 100644 Binary files a/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/bscmake.read.1.tlog and b/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/bscmake.read.1.tlog differ diff --git a/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/link.read.1.tlog b/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/link.read.1.tlog index 2ccf42a8..865eb7e6 100644 Binary files a/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/link.read.1.tlog and b/源代码/StgSharpC/x64/Debug/StgSharpC.tlog/link.read.1.tlog differ diff --git a/源代码/StgSharpC/x64/Debug/dllmain.cod b/源代码/StgSharpC/x64/Debug/dllmain.cod index 5481d461..8469c494 100644 --- a/源代码/StgSharpC/x64/Debug/dllmain.cod +++ b/源代码/StgSharpC/x64/Debug/dllmain.cod @@ -1,4 +1,4 @@ -; Listing generated by Microsoft (R) Optimizing Compiler Version 19.39.33523.0 +; Listing generated by Microsoft (R) Optimizing Compiler Version 19.41.34120.0 include listing.inc @@ -10,20 +10,20 @@ COMM infolog:BYTE:0200H _DATA ENDS msvcjmc SEGMENT __A19B9DB6_ssgc_framework@h DB 01H -__5BC5AF51_mmintrin@h DB 01H -__4B783B3C_concurrencysal@h DB 01H -__137BB1BE_sal@h DB 01H -__805F4069_vadefs@h DB 01H -__1EAACA9B_vcruntime@h DB 01H +__7583A0D2_mmintrin@h DB 01H +__DDA0A690_concurrencysal@h DB 01H +__9ECC08BE_sal@h DB 01H +__E05D733A_vadefs@h DB 01H +__6A355E0E_vcruntime@h DB 01H __1B0272D9_corecrt@h DB 01H __45DED006_corecrt_malloc@h DB 01H __FA77ED4C_malloc@h DB 01H -__9E7FA6CF_xmmintrin@h DB 01H +__EAE0325A_xmmintrin@h DB 01H __0ED14FEE_winpackagefamily@h DB 01H __F92EF742_winapifamily@h DB 01H __22E515EB_sdkddkver@h DB 01H -__1227BCE2_excpt@h DB 01H -__CC8D90C0_stdarg@h DB 01H +__A09A3A7D_excpt@h DB 01H +__AC8FA393_stdarg@h DB 01H __29F49F40_specstrings_undef@h DB 01H __D0F42932_specstrings_strict@h DB 01H __F00405FD_sdv_driverspecs@h DB 01H @@ -34,7 +34,7 @@ __1EC467ED_ctype@h DB 01H __98517906_kernelspecs@h DB 01H __D3497022_basetsd@h DB 01H __61CC25A1_errno@h DB 01H -__0504B279_vcruntime_string@h DB 01H +__890838BD_vcruntime_string@h DB 01H __E4C945B4_corecrt_memcpy_s@h DB 01H __8EAFF484_corecrt_memory@h DB 01H __6490AEC5_corecrt_wstring@h DB 01H @@ -110,26 +110,26 @@ __577CE3E7_ime_cmodes@h DB 01H __1E72C31E_imm@h DB 01H __E15BF856_windows@h DB 01H __61B03275_ssgc_internal@h DB 01H -__F8522E0F_stdint@h DB 01H +__98501D5C_stdint@h DB 01H __874AB8BA_khrplatform@h DB 01H __8DCB230D_gl@h DB 01H __5F89FF5A_wgl@h DB 01H __13F5961F_stddef@h DB 01H __B47D1049_glfw3@h DB 01H -__FB1D2F03_emmintrin@h DB 01H -__24BC478A_pmmintrin@h DB 01H -__94653408_tmmintrin@h DB 01H -__BD5E218B_smmintrin@h DB 01H -__D83CA847_nmmintrin@h DB 01H -__0D875209_wmmintrin@h DB 01H -__C6131F0E_zmmintrin@h DB 01H -__F107BDC4_immintrin@h DB 01H +__8F82BB96_emmintrin@h DB 01H +__5023D31F_pmmintrin@h DB 01H +__E0FAA09D_tmmintrin@h DB 01H +__C9C1B51E_smmintrin@h DB 01H +__ACA33CD2_nmmintrin@h DB 01H +__7918C69C_wmmintrin@h DB 01H +__B28C8B9B_zmmintrin@h DB 01H +__85982951_immintrin@h DB 01H __44420885_corecrt_stdio_config@h DB 01H __AB601D8D_corecrt_wstdio@h DB 01H __C1EC35D3_stdio@h DB 01H __FD6DBD68_corecrt_search@h DB 01H __E2E33A61_corecrt_wstdlib@h DB 01H -__46240030_limits@h DB 01H +__26263363_limits@h DB 01H __6E5ACABA_stdlib@h DB 01H __5274102E_stb_image@h DB 01H __CE2BBC10_StgSharpC@h DB 01H @@ -143,7 +143,7 @@ EXTRN __CheckForDebuggerJustMyCode:PROC ; COMDAT pdata pdata SEGMENT $pdata$DllMain DD imagerel $LN9 - DD imagerel $LN9+133 + DD imagerel $LN9+134 DD imagerel $unwind$DllMain pdata ENDS ; COMDAT rtc$TMZ @@ -192,26 +192,27 @@ $LN9: 0001c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__9C9DAB70_dllmain@c 00023 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00028 90 npad 1 ; 15 : switch (ul_reason_for_call) - 00028 8b 85 f8 00 00 + 00029 8b 85 f8 00 00 00 mov eax, DWORD PTR ul_reason_for_call$[rbp] - 0002e 89 85 c0 00 00 + 0002f 89 85 c0 00 00 00 mov DWORD PTR tv64[rbp], eax - 00034 83 bd c0 00 00 + 00035 83 bd c0 00 00 00 00 cmp DWORD PTR tv64[rbp], 0 - 0003b 74 32 je SHORT $LN7@DllMain - 0003d 83 bd c0 00 00 + 0003c 74 32 je SHORT $LN7@DllMain + 0003e 83 bd c0 00 00 00 01 cmp DWORD PTR tv64[rbp], 1 - 00044 74 14 je SHORT $LN4@DllMain - 00046 83 bd c0 00 00 + 00045 74 14 je SHORT $LN4@DllMain + 00047 83 bd c0 00 00 00 02 cmp DWORD PTR tv64[rbp], 2 - 0004d 74 12 je SHORT $LN5@DllMain - 0004f 83 bd c0 00 00 + 0004e 74 12 je SHORT $LN5@DllMain + 00050 83 bd c0 00 00 00 03 cmp DWORD PTR tv64[rbp], 3 - 00056 74 10 je SHORT $LN6@DllMain - 00058 eb 1c jmp SHORT $LN2@DllMain + 00057 74 10 je SHORT $LN6@DllMain + 00059 eb 1c jmp SHORT $LN2@DllMain $LN4@DllMain: ; 16 : { @@ -219,32 +220,32 @@ $LN4@DllMain: ; 18 : ; 19 : return 1; - 0005a b8 01 00 00 00 mov eax, 1 - 0005f eb 1a jmp SHORT $LN1@DllMain + 0005b b8 01 00 00 00 mov eax, 1 + 00060 eb 1a jmp SHORT $LN1@DllMain $LN5@DllMain: ; 20 : ; 21 : case DLL_THREAD_ATTACH: ; 22 : return 1; - 00061 b8 01 00 00 00 mov eax, 1 - 00066 eb 13 jmp SHORT $LN1@DllMain + 00062 b8 01 00 00 00 mov eax, 1 + 00067 eb 13 jmp SHORT $LN1@DllMain $LN6@DllMain: ; 23 : ; 24 : case DLL_THREAD_DETACH: ; 25 : return 1; - 00068 b8 01 00 00 00 mov eax, 1 - 0006d eb 0c jmp SHORT $LN1@DllMain + 00069 b8 01 00 00 00 mov eax, 1 + 0006e eb 0c jmp SHORT $LN1@DllMain $LN7@DllMain: ; 26 : ; 27 : case DLL_PROCESS_DETACH: ; 28 : return 1; - 0006f b8 01 00 00 00 mov eax, 1 - 00074 eb 05 jmp SHORT $LN1@DllMain + 00070 b8 01 00 00 00 mov eax, 1 + 00075 eb 05 jmp SHORT $LN1@DllMain $LN2@DllMain: ; 29 : @@ -252,16 +253,16 @@ $LN2@DllMain: ; 31 : } ; 32 : return TRUE; - 00076 b8 01 00 00 00 mov eax, 1 + 00077 b8 01 00 00 00 mov eax, 1 $LN1@DllMain: ; 33 : } - 0007b 48 8d a5 d8 00 + 0007c 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 00082 5f pop rdi - 00083 5d pop rbp - 00084 c3 ret 0 + 00083 5f pop rdi + 00084 5d pop rbp + 00085 c3 ret 0 DllMain ENDP _TEXT ENDS END diff --git a/源代码/StgSharpC/x64/Debug/dllmain.nativecodeanalysis.xml b/源代码/StgSharpC/x64/Debug/dllmain.nativecodeanalysis.xml deleted file mode 100644 index dcdf0885..00000000 --- a/源代码/StgSharpC/x64/Debug/dllmain.nativecodeanalysis.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/源代码/StgSharpC/x64/Debug/dllmain.obj b/源代码/StgSharpC/x64/Debug/dllmain.obj index 63967de6..46be1b4e 100644 Binary files a/源代码/StgSharpC/x64/Debug/dllmain.obj and b/源代码/StgSharpC/x64/Debug/dllmain.obj differ diff --git a/源代码/StgSharpC/x64/Debug/dllmain.sbr b/源代码/StgSharpC/x64/Debug/dllmain.sbr index 6a04eb52..8682ac82 100644 Binary files a/源代码/StgSharpC/x64/Debug/dllmain.sbr and b/源代码/StgSharpC/x64/Debug/dllmain.sbr differ diff --git a/源代码/StgSharpC/x64/Debug/mat2.cod b/源代码/StgSharpC/x64/Debug/mat2.cod index eff9c4b3..d9f1ec81 100644 --- a/源代码/StgSharpC/x64/Debug/mat2.cod +++ b/源代码/StgSharpC/x64/Debug/mat2.cod @@ -1,4 +1,4 @@ -; Listing generated by Microsoft (R) Optimizing Compiler Version 19.39.33523.0 +; Listing generated by Microsoft (R) Optimizing Compiler Version 19.41.34120.0 include listing.inc @@ -10,20 +10,20 @@ COMM infolog:BYTE:0200H _DATA ENDS msvcjmc SEGMENT __A19B9DB6_ssgc_framework@h DB 01H -__5BC5AF51_mmintrin@h DB 01H -__4B783B3C_concurrencysal@h DB 01H -__137BB1BE_sal@h DB 01H -__805F4069_vadefs@h DB 01H -__1EAACA9B_vcruntime@h DB 01H +__7583A0D2_mmintrin@h DB 01H +__DDA0A690_concurrencysal@h DB 01H +__9ECC08BE_sal@h DB 01H +__E05D733A_vadefs@h DB 01H +__6A355E0E_vcruntime@h DB 01H __1B0272D9_corecrt@h DB 01H __45DED006_corecrt_malloc@h DB 01H __FA77ED4C_malloc@h DB 01H -__9E7FA6CF_xmmintrin@h DB 01H +__EAE0325A_xmmintrin@h DB 01H __0ED14FEE_winpackagefamily@h DB 01H __F92EF742_winapifamily@h DB 01H __22E515EB_sdkddkver@h DB 01H -__1227BCE2_excpt@h DB 01H -__CC8D90C0_stdarg@h DB 01H +__A09A3A7D_excpt@h DB 01H +__AC8FA393_stdarg@h DB 01H __29F49F40_specstrings_undef@h DB 01H __D0F42932_specstrings_strict@h DB 01H __F00405FD_sdv_driverspecs@h DB 01H @@ -34,7 +34,7 @@ __1EC467ED_ctype@h DB 01H __98517906_kernelspecs@h DB 01H __D3497022_basetsd@h DB 01H __61CC25A1_errno@h DB 01H -__0504B279_vcruntime_string@h DB 01H +__890838BD_vcruntime_string@h DB 01H __E4C945B4_corecrt_memcpy_s@h DB 01H __8EAFF484_corecrt_memory@h DB 01H __6490AEC5_corecrt_wstring@h DB 01H @@ -110,26 +110,26 @@ __577CE3E7_ime_cmodes@h DB 01H __1E72C31E_imm@h DB 01H __E15BF856_windows@h DB 01H __61B03275_ssgc_internal@h DB 01H -__F8522E0F_stdint@h DB 01H +__98501D5C_stdint@h DB 01H __874AB8BA_khrplatform@h DB 01H __8DCB230D_gl@h DB 01H __5F89FF5A_wgl@h DB 01H __13F5961F_stddef@h DB 01H __B47D1049_glfw3@h DB 01H -__FB1D2F03_emmintrin@h DB 01H -__24BC478A_pmmintrin@h DB 01H -__94653408_tmmintrin@h DB 01H -__BD5E218B_smmintrin@h DB 01H -__D83CA847_nmmintrin@h DB 01H -__0D875209_wmmintrin@h DB 01H -__C6131F0E_zmmintrin@h DB 01H -__F107BDC4_immintrin@h DB 01H +__8F82BB96_emmintrin@h DB 01H +__5023D31F_pmmintrin@h DB 01H +__E0FAA09D_tmmintrin@h DB 01H +__C9C1B51E_smmintrin@h DB 01H +__ACA33CD2_nmmintrin@h DB 01H +__7918C69C_wmmintrin@h DB 01H +__B28C8B9B_zmmintrin@h DB 01H +__85982951_immintrin@h DB 01H __44420885_corecrt_stdio_config@h DB 01H __AB601D8D_corecrt_wstdio@h DB 01H __C1EC35D3_stdio@h DB 01H __FD6DBD68_corecrt_search@h DB 01H __E2E33A61_corecrt_wstdlib@h DB 01H -__46240030_limits@h DB 01H +__26263363_limits@h DB 01H __6E5ACABA_stdlib@h DB 01H __5274102E_stb_image@h DB 01H __CE2BBC10_StgSharpC@h DB 01H @@ -146,19 +146,19 @@ EXTRN __CheckForDebuggerJustMyCode:PROC ; COMDAT pdata pdata SEGMENT $pdata$transpose2to3 DD imagerel $LN3 - DD imagerel $LN3+270 + DD imagerel $LN3+271 DD imagerel $unwind$transpose2to3 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$transpose2to4 DD imagerel $LN3 - DD imagerel $LN3+304 + DD imagerel $LN3+305 DD imagerel $unwind$transpose2to4 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$deinit_mat2 DD imagerel $LN3 - DD imagerel $LN3+54 + DD imagerel $LN3+56 DD imagerel $unwind$deinit_mat2 pdata ENDS ; COMDAT rtc$TMZ @@ -216,21 +216,23 @@ $LN3: 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__54E5184D_mat2@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 27 : _aligned_free(mat); - 0001f 48 8b 8d e0 00 + 00020 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR mat$[rbp] - 00026 ff 15 00 00 00 + 00027 ff 15 00 00 00 00 call QWORD PTR __imp__aligned_free + 0002d 90 npad 1 ; 28 : } - 0002c 48 8d a5 c8 00 + 0002e 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00033 5f pop rdi - 00034 5d pop rbp - 00035 c3 ret 0 + 00035 5f pop rdi + 00036 5d pop rbp + 00037 c3 ret 0 deinit_mat2 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -256,103 +258,104 @@ $LN3: 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__54E5184D_mat2@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 16 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0)); - 00024 b8 10 00 00 00 mov eax, 16 - 00029 48 6b c0 01 imul rax, rax, 1 - 0002d 48 8b 8d 40 01 + 00025 b8 10 00 00 00 mov eax, 16 + 0002a 48 6b c0 01 imul rax, rax, 1 + 0002e 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00034 48 03 c8 add rcx, rax - 00037 48 8b c1 mov rax, rcx - 0003a 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0003d b8 10 00 00 00 mov eax, 16 - 00042 48 6b c0 00 imul rax, rax, 0 - 00046 48 8b 8d 40 01 + 00035 48 03 c8 add rcx, rax + 00038 48 8b c1 mov rax, rcx + 0003b 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0003e b8 10 00 00 00 mov eax, 16 + 00043 48 6b c0 00 imul rax, rax, 0 + 00047 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0004d 48 03 c8 add rcx, rax - 00050 48 8b c1 mov rax, rcx - 00053 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00056 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 0005a 0f 28 c1 movaps xmm0, xmm1 - 0005d 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 + 0004e 48 03 c8 add rcx, rax + 00051 48 8b c1 mov rax, rcx + 00054 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00057 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 0005b 0f 28 c1 movaps xmm0, xmm1 + 0005e 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 ; 17 : __m128 t1 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(3, 2, 3, 2)); - 00061 b8 10 00 00 00 mov eax, 16 - 00066 48 6b c0 01 imul rax, rax, 1 - 0006a 48 8b 8d 40 01 + 00062 b8 10 00 00 00 mov eax, 16 + 00067 48 6b c0 01 imul rax, rax, 1 + 0006b 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00071 48 03 c8 add rcx, rax - 00074 48 8b c1 mov rax, rcx - 00077 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0007a b8 10 00 00 00 mov eax, 16 - 0007f 48 6b c0 00 imul rax, rax, 0 - 00083 48 8b 8d 40 01 + 00072 48 03 c8 add rcx, rax + 00075 48 8b c1 mov rax, rcx + 00078 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0007b b8 10 00 00 00 mov eax, 16 + 00080 48 6b c0 00 imul rax, rax, 0 + 00084 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0008a 48 03 c8 add rcx, rax - 0008d 48 8b c1 mov rax, rcx - 00090 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00093 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH - 00097 0f 28 c1 movaps xmm0, xmm1 - 0009a 0f 29 45 40 movaps XMMWORD PTR t1$[rbp], xmm0 + 0008b 48 03 c8 add rcx, rax + 0008e 48 8b c1 mov rax, rcx + 00091 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00094 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH + 00098 0f 28 c1 movaps xmm0, xmm1 + 0009b 0f 29 45 40 movaps XMMWORD PTR t1$[rbp], xmm0 ; 18 : ; 19 : target->colum[0] = _mm_shuffle_ps(t0, zeroVec, _MM_SHUFFLE(2, 0, 2, 0)); - 0009e 0f 57 c0 xorps xmm0, xmm0 - 000a1 0f 28 4d 10 movaps xmm1, XMMWORD PTR t0$[rbp] - 000a5 0f c6 c8 88 shufps xmm1, xmm0, 136 ; 00000088H - 000a9 0f 28 c1 movaps xmm0, xmm1 - 000ac b8 10 00 00 00 mov eax, 16 - 000b1 48 6b c0 00 imul rax, rax, 0 - 000b5 48 8b 8d 48 01 + 0009f 0f 57 c0 xorps xmm0, xmm0 + 000a2 0f 28 4d 10 movaps xmm1, XMMWORD PTR t0$[rbp] + 000a6 0f c6 c8 88 shufps xmm1, xmm0, 136 ; 00000088H + 000aa 0f 28 c1 movaps xmm0, xmm1 + 000ad b8 10 00 00 00 mov eax, 16 + 000b2 48 6b c0 00 imul rax, rax, 0 + 000b6 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR target$[rbp] - 000bc 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 000bd 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 20 : target->colum[1] = _mm_shuffle_ps(t0, zeroVec, _MM_SHUFFLE(3, 1, 3, 1)); - 000c0 0f 57 c0 xorps xmm0, xmm0 - 000c3 0f 28 4d 10 movaps xmm1, XMMWORD PTR t0$[rbp] - 000c7 0f c6 c8 dd shufps xmm1, xmm0, 221 ; 000000ddH - 000cb 0f 28 c1 movaps xmm0, xmm1 - 000ce b8 10 00 00 00 mov eax, 16 - 000d3 48 6b c0 01 imul rax, rax, 1 - 000d7 48 8b 8d 48 01 + 000c1 0f 57 c0 xorps xmm0, xmm0 + 000c4 0f 28 4d 10 movaps xmm1, XMMWORD PTR t0$[rbp] + 000c8 0f c6 c8 dd shufps xmm1, xmm0, 221 ; 000000ddH + 000cc 0f 28 c1 movaps xmm0, xmm1 + 000cf b8 10 00 00 00 mov eax, 16 + 000d4 48 6b c0 01 imul rax, rax, 1 + 000d8 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR target$[rbp] - 000de 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 000df 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 21 : target->colum[2] = _mm_shuffle_ps(t1, zeroVec, _MM_SHUFFLE(2, 0, 2, 0)); - 000e2 0f 57 c0 xorps xmm0, xmm0 - 000e5 0f 28 4d 40 movaps xmm1, XMMWORD PTR t1$[rbp] - 000e9 0f c6 c8 88 shufps xmm1, xmm0, 136 ; 00000088H - 000ed 0f 28 c1 movaps xmm0, xmm1 - 000f0 b8 10 00 00 00 mov eax, 16 - 000f5 48 6b c0 02 imul rax, rax, 2 - 000f9 48 8b 8d 48 01 + 000e3 0f 57 c0 xorps xmm0, xmm0 + 000e6 0f 28 4d 40 movaps xmm1, XMMWORD PTR t1$[rbp] + 000ea 0f c6 c8 88 shufps xmm1, xmm0, 136 ; 00000088H + 000ee 0f 28 c1 movaps xmm0, xmm1 + 000f1 b8 10 00 00 00 mov eax, 16 + 000f6 48 6b c0 02 imul rax, rax, 2 + 000fa 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00100 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00101 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 22 : target->colum[3] = _mm_shuffle_ps(t1, zeroVec, _MM_SHUFFLE(3, 1, 3, 1)); - 00104 0f 57 c0 xorps xmm0, xmm0 - 00107 0f 28 4d 40 movaps xmm1, XMMWORD PTR t1$[rbp] - 0010b 0f c6 c8 dd shufps xmm1, xmm0, 221 ; 000000ddH - 0010f 0f 28 c1 movaps xmm0, xmm1 - 00112 b8 10 00 00 00 mov eax, 16 - 00117 48 6b c0 03 imul rax, rax, 3 - 0011b 48 8b 8d 48 01 + 00105 0f 57 c0 xorps xmm0, xmm0 + 00108 0f 28 4d 40 movaps xmm1, XMMWORD PTR t1$[rbp] + 0010c 0f c6 c8 dd shufps xmm1, xmm0, 221 ; 000000ddH + 00110 0f 28 c1 movaps xmm0, xmm1 + 00113 b8 10 00 00 00 mov eax, 16 + 00118 48 6b c0 03 imul rax, rax, 3 + 0011c 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00122 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00123 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 23 : } - 00126 48 8d a5 28 01 + 00127 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 0012d 5f pop rdi - 0012e 5d pop rbp - 0012f c3 ret 0 + 0012e 5f pop rdi + 0012f 5d pop rbp + 00130 c3 ret 0 transpose2to4 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -378,91 +381,92 @@ $LN3: 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__54E5184D_mat2@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 6 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0)); - 00024 b8 10 00 00 00 mov eax, 16 - 00029 48 6b c0 01 imul rax, rax, 1 - 0002d 48 8b 8d 40 01 + 00025 b8 10 00 00 00 mov eax, 16 + 0002a 48 6b c0 01 imul rax, rax, 1 + 0002e 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00034 48 03 c8 add rcx, rax - 00037 48 8b c1 mov rax, rcx - 0003a 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0003d b8 10 00 00 00 mov eax, 16 - 00042 48 6b c0 00 imul rax, rax, 0 - 00046 48 8b 8d 40 01 + 00035 48 03 c8 add rcx, rax + 00038 48 8b c1 mov rax, rcx + 0003b 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0003e b8 10 00 00 00 mov eax, 16 + 00043 48 6b c0 00 imul rax, rax, 0 + 00047 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0004d 48 03 c8 add rcx, rax - 00050 48 8b c1 mov rax, rcx - 00053 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00056 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 0005a 0f 28 c1 movaps xmm0, xmm1 - 0005d 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 + 0004e 48 03 c8 add rcx, rax + 00051 48 8b c1 mov rax, rcx + 00054 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00057 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 0005b 0f 28 c1 movaps xmm0, xmm1 + 0005e 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 ; 7 : __m128 t1 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(3, 2, 3, 2)); - 00061 b8 10 00 00 00 mov eax, 16 - 00066 48 6b c0 01 imul rax, rax, 1 - 0006a 48 8b 8d 40 01 + 00062 b8 10 00 00 00 mov eax, 16 + 00067 48 6b c0 01 imul rax, rax, 1 + 0006b 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00071 48 03 c8 add rcx, rax - 00074 48 8b c1 mov rax, rcx - 00077 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0007a b8 10 00 00 00 mov eax, 16 - 0007f 48 6b c0 00 imul rax, rax, 0 - 00083 48 8b 8d 40 01 + 00072 48 03 c8 add rcx, rax + 00075 48 8b c1 mov rax, rcx + 00078 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0007b b8 10 00 00 00 mov eax, 16 + 00080 48 6b c0 00 imul rax, rax, 0 + 00084 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0008a 48 03 c8 add rcx, rax - 0008d 48 8b c1 mov rax, rcx - 00090 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00093 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH - 00097 0f 28 c1 movaps xmm0, xmm1 - 0009a 0f 29 45 40 movaps XMMWORD PTR t1$[rbp], xmm0 + 0008b 48 03 c8 add rcx, rax + 0008e 48 8b c1 mov rax, rcx + 00091 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00094 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH + 00098 0f 28 c1 movaps xmm0, xmm1 + 0009b 0f 29 45 40 movaps XMMWORD PTR t1$[rbp], xmm0 ; 8 : ; 9 : target->colum[0] = _mm_shuffle_ps(t0, zeroVec, _MM_SHUFFLE(2, 0, 2, 0)); - 0009e 0f 57 c0 xorps xmm0, xmm0 - 000a1 0f 28 4d 10 movaps xmm1, XMMWORD PTR t0$[rbp] - 000a5 0f c6 c8 88 shufps xmm1, xmm0, 136 ; 00000088H - 000a9 0f 28 c1 movaps xmm0, xmm1 - 000ac b8 10 00 00 00 mov eax, 16 - 000b1 48 6b c0 00 imul rax, rax, 0 - 000b5 48 8b 8d 48 01 + 0009f 0f 57 c0 xorps xmm0, xmm0 + 000a2 0f 28 4d 10 movaps xmm1, XMMWORD PTR t0$[rbp] + 000a6 0f c6 c8 88 shufps xmm1, xmm0, 136 ; 00000088H + 000aa 0f 28 c1 movaps xmm0, xmm1 + 000ad b8 10 00 00 00 mov eax, 16 + 000b2 48 6b c0 00 imul rax, rax, 0 + 000b6 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR target$[rbp] - 000bc 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 000bd 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 10 : target->colum[1] = _mm_shuffle_ps(t0, zeroVec, _MM_SHUFFLE(3, 1, 3, 1)); - 000c0 0f 57 c0 xorps xmm0, xmm0 - 000c3 0f 28 4d 10 movaps xmm1, XMMWORD PTR t0$[rbp] - 000c7 0f c6 c8 dd shufps xmm1, xmm0, 221 ; 000000ddH - 000cb 0f 28 c1 movaps xmm0, xmm1 - 000ce b8 10 00 00 00 mov eax, 16 - 000d3 48 6b c0 01 imul rax, rax, 1 - 000d7 48 8b 8d 48 01 + 000c1 0f 57 c0 xorps xmm0, xmm0 + 000c4 0f 28 4d 10 movaps xmm1, XMMWORD PTR t0$[rbp] + 000c8 0f c6 c8 dd shufps xmm1, xmm0, 221 ; 000000ddH + 000cc 0f 28 c1 movaps xmm0, xmm1 + 000cf b8 10 00 00 00 mov eax, 16 + 000d4 48 6b c0 01 imul rax, rax, 1 + 000d8 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR target$[rbp] - 000de 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 000df 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 11 : target->colum[2] = _mm_shuffle_ps(t1, zeroVec, _MM_SHUFFLE(2, 0, 2, 0)); - 000e2 0f 57 c0 xorps xmm0, xmm0 - 000e5 0f 28 4d 40 movaps xmm1, XMMWORD PTR t1$[rbp] - 000e9 0f c6 c8 88 shufps xmm1, xmm0, 136 ; 00000088H - 000ed 0f 28 c1 movaps xmm0, xmm1 - 000f0 b8 10 00 00 00 mov eax, 16 - 000f5 48 6b c0 02 imul rax, rax, 2 - 000f9 48 8b 8d 48 01 + 000e3 0f 57 c0 xorps xmm0, xmm0 + 000e6 0f 28 4d 40 movaps xmm1, XMMWORD PTR t1$[rbp] + 000ea 0f c6 c8 88 shufps xmm1, xmm0, 136 ; 00000088H + 000ee 0f 28 c1 movaps xmm0, xmm1 + 000f1 b8 10 00 00 00 mov eax, 16 + 000f6 48 6b c0 02 imul rax, rax, 2 + 000fa 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00100 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00101 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 12 : } - 00104 48 8d a5 28 01 + 00105 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 0010b 5f pop rdi - 0010c 5d pop rbp - 0010d c3 ret 0 + 0010c 5f pop rdi + 0010d 5d pop rbp + 0010e c3 ret 0 transpose2to3 ENDP _TEXT ENDS END diff --git a/源代码/StgSharpC/x64/Debug/mat2.nativecodeanalysis.xml b/源代码/StgSharpC/x64/Debug/mat2.nativecodeanalysis.xml deleted file mode 100644 index dcdf0885..00000000 --- a/源代码/StgSharpC/x64/Debug/mat2.nativecodeanalysis.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/源代码/StgSharpC/x64/Debug/mat2.obj b/源代码/StgSharpC/x64/Debug/mat2.obj index dd82fb8f..9a951cda 100644 Binary files a/源代码/StgSharpC/x64/Debug/mat2.obj and b/源代码/StgSharpC/x64/Debug/mat2.obj differ diff --git a/源代码/StgSharpC/x64/Debug/mat2.sbr b/源代码/StgSharpC/x64/Debug/mat2.sbr index 4d110c80..2d7fceb9 100644 Binary files a/源代码/StgSharpC/x64/Debug/mat2.sbr and b/源代码/StgSharpC/x64/Debug/mat2.sbr differ diff --git a/源代码/StgSharpC/x64/Debug/mat3.cod b/源代码/StgSharpC/x64/Debug/mat3.cod index d0dd4b8d..889aad86 100644 --- a/源代码/StgSharpC/x64/Debug/mat3.cod +++ b/源代码/StgSharpC/x64/Debug/mat3.cod @@ -1,4 +1,4 @@ -; Listing generated by Microsoft (R) Optimizing Compiler Version 19.39.33523.0 +; Listing generated by Microsoft (R) Optimizing Compiler Version 19.41.34120.0 include listing.inc @@ -10,20 +10,20 @@ COMM infolog:BYTE:0200H _DATA ENDS msvcjmc SEGMENT __A19B9DB6_ssgc_framework@h DB 01H -__5BC5AF51_mmintrin@h DB 01H -__4B783B3C_concurrencysal@h DB 01H -__137BB1BE_sal@h DB 01H -__805F4069_vadefs@h DB 01H -__1EAACA9B_vcruntime@h DB 01H +__7583A0D2_mmintrin@h DB 01H +__DDA0A690_concurrencysal@h DB 01H +__9ECC08BE_sal@h DB 01H +__E05D733A_vadefs@h DB 01H +__6A355E0E_vcruntime@h DB 01H __1B0272D9_corecrt@h DB 01H __45DED006_corecrt_malloc@h DB 01H __FA77ED4C_malloc@h DB 01H -__9E7FA6CF_xmmintrin@h DB 01H +__EAE0325A_xmmintrin@h DB 01H __0ED14FEE_winpackagefamily@h DB 01H __F92EF742_winapifamily@h DB 01H __22E515EB_sdkddkver@h DB 01H -__1227BCE2_excpt@h DB 01H -__CC8D90C0_stdarg@h DB 01H +__A09A3A7D_excpt@h DB 01H +__AC8FA393_stdarg@h DB 01H __29F49F40_specstrings_undef@h DB 01H __D0F42932_specstrings_strict@h DB 01H __F00405FD_sdv_driverspecs@h DB 01H @@ -34,7 +34,7 @@ __1EC467ED_ctype@h DB 01H __98517906_kernelspecs@h DB 01H __D3497022_basetsd@h DB 01H __61CC25A1_errno@h DB 01H -__0504B279_vcruntime_string@h DB 01H +__890838BD_vcruntime_string@h DB 01H __E4C945B4_corecrt_memcpy_s@h DB 01H __8EAFF484_corecrt_memory@h DB 01H __6490AEC5_corecrt_wstring@h DB 01H @@ -110,26 +110,26 @@ __577CE3E7_ime_cmodes@h DB 01H __1E72C31E_imm@h DB 01H __E15BF856_windows@h DB 01H __61B03275_ssgc_internal@h DB 01H -__F8522E0F_stdint@h DB 01H +__98501D5C_stdint@h DB 01H __874AB8BA_khrplatform@h DB 01H __8DCB230D_gl@h DB 01H __5F89FF5A_wgl@h DB 01H __13F5961F_stddef@h DB 01H __B47D1049_glfw3@h DB 01H -__FB1D2F03_emmintrin@h DB 01H -__24BC478A_pmmintrin@h DB 01H -__94653408_tmmintrin@h DB 01H -__BD5E218B_smmintrin@h DB 01H -__D83CA847_nmmintrin@h DB 01H -__0D875209_wmmintrin@h DB 01H -__C6131F0E_zmmintrin@h DB 01H -__F107BDC4_immintrin@h DB 01H +__8F82BB96_emmintrin@h DB 01H +__5023D31F_pmmintrin@h DB 01H +__E0FAA09D_tmmintrin@h DB 01H +__C9C1B51E_smmintrin@h DB 01H +__ACA33CD2_nmmintrin@h DB 01H +__7918C69C_wmmintrin@h DB 01H +__B28C8B9B_zmmintrin@h DB 01H +__85982951_immintrin@h DB 01H __44420885_corecrt_stdio_config@h DB 01H __AB601D8D_corecrt_wstdio@h DB 01H __C1EC35D3_stdio@h DB 01H __FD6DBD68_corecrt_search@h DB 01H __E2E33A61_corecrt_wstdlib@h DB 01H -__46240030_limits@h DB 01H +__26263363_limits@h DB 01H __6E5ACABA_stdlib@h DB 01H __5274102E_stb_image@h DB 01H __CE2BBC10_StgSharpC@h DB 01H @@ -149,31 +149,31 @@ EXTRN _fltused:DWORD ; COMDAT pdata pdata SEGMENT $pdata$transpose3to2 DD imagerel $LN3 - DD imagerel $LN3+204 + DD imagerel $LN3+205 DD imagerel $unwind$transpose3to2 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$transpose3to3 DD imagerel $LN3 - DD imagerel $LN3+339 + DD imagerel $LN3+340 DD imagerel $unwind$transpose3to3 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$transpose3to4 DD imagerel $LN3 - DD imagerel $LN3+371 + DD imagerel $LN3+372 DD imagerel $unwind$transpose3to4 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$det_mat3 DD imagerel $LN3 - DD imagerel $LN3+148 + DD imagerel $LN3+149 DD imagerel $unwind$det_mat3 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$det_mat3_internal DD imagerel $LN3 - DD imagerel $LN3+370 + DD imagerel $LN3+371 DD imagerel $unwind$det_mat3_internal pdata ENDS ; COMDAT rtc$TMZ @@ -277,143 +277,144 @@ $LN3: 00036 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__5527727A_mat3@c 0003d e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00042 90 npad 1 ; 41 : //let adding row aligned ; 42 : __m128 addc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 0, 2, 1)); - 00042 48 8b 85 38 02 + 00043 48 8b 85 38 02 00 00 mov rax, QWORD PTR c1$[rbp] - 00049 48 8b 8d 38 02 + 0004a 48 8b 8d 38 02 00 00 mov rcx, QWORD PTR c1$[rbp] - 00050 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 00053 0f c6 01 c9 shufps xmm0, XMMWORD PTR [rcx], 201 ; 000000c9H - 00057 0f 29 45 10 movaps XMMWORD PTR addc1$[rbp], xmm0 + 00051 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 00054 0f c6 01 c9 shufps xmm0, XMMWORD PTR [rcx], 201 ; 000000c9H + 00058 0f 29 45 10 movaps XMMWORD PTR addc1$[rbp], xmm0 ; 43 : __m128 addc2 = _mm_shuffle_ps(c2, c2, _MM_SHUFFLE(3, 1, 0, 2)); - 0005b 48 8b 85 40 02 + 0005c 48 8b 85 40 02 00 00 mov rax, QWORD PTR c2$[rbp] - 00062 48 8b 8d 40 02 + 00063 48 8b 8d 40 02 00 00 mov rcx, QWORD PTR c2$[rbp] - 00069 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0006c 0f c6 01 d2 shufps xmm0, XMMWORD PTR [rcx], 210 ; 000000d2H - 00070 0f 29 45 40 movaps XMMWORD PTR addc2$[rbp], xmm0 + 0006a 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0006d 0f c6 01 d2 shufps xmm0, XMMWORD PTR [rcx], 210 ; 000000d2H + 00071 0f 29 45 40 movaps XMMWORD PTR addc2$[rbp], xmm0 ; 44 : ; 45 : //let sub row aligned ; 46 : __m128 subc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 1, 0, 2)); - 00074 48 8b 85 38 02 + 00075 48 8b 85 38 02 00 00 mov rax, QWORD PTR c1$[rbp] - 0007b 48 8b 8d 38 02 + 0007c 48 8b 8d 38 02 00 00 mov rcx, QWORD PTR c1$[rbp] - 00082 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 00085 0f c6 01 d2 shufps xmm0, XMMWORD PTR [rcx], 210 ; 000000d2H - 00089 0f 29 45 70 movaps XMMWORD PTR subc1$[rbp], xmm0 + 00083 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 00086 0f c6 01 d2 shufps xmm0, XMMWORD PTR [rcx], 210 ; 000000d2H + 0008a 0f 29 45 70 movaps XMMWORD PTR subc1$[rbp], xmm0 ; 47 : __m128 subc2 = _mm_shuffle_ps(c2, c2, _MM_SHUFFLE(3, 0, 2, 1)); - 0008d 48 8b 85 40 02 + 0008e 48 8b 85 40 02 00 00 mov rax, QWORD PTR c2$[rbp] - 00094 48 8b 8d 40 02 + 00095 48 8b 8d 40 02 00 00 mov rcx, QWORD PTR c2$[rbp] - 0009b 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0009e 0f c6 01 c9 shufps xmm0, XMMWORD PTR [rcx], 201 ; 000000c9H - 000a2 0f 29 85 a0 00 + 0009c 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0009f 0f c6 01 c9 shufps xmm0, XMMWORD PTR [rcx], 201 ; 000000c9H + 000a3 0f 29 85 a0 00 00 00 movaps XMMWORD PTR subc2$[rbp], xmm0 ; 48 : ; 49 : //multple all add row ; 50 : __m128 cache = _mm_mul_ps(c0, addc1); - 000a9 48 8b 85 30 02 + 000aa 48 8b 85 30 02 00 00 mov rax, QWORD PTR c0$[rbp] - 000b0 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 000b3 0f 59 45 10 mulps xmm0, XMMWORD PTR addc1$[rbp] - 000b7 0f 29 85 d0 00 + 000b1 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 000b4 0f 59 45 10 mulps xmm0, XMMWORD PTR addc1$[rbp] + 000b8 0f 29 85 d0 00 00 00 movaps XMMWORD PTR cache$[rbp], xmm0 ; 51 : cache = _mm_mul_ps(cache, addc2); - 000be 0f 28 85 d0 00 + 000bf 0f 28 85 d0 00 00 00 movaps xmm0, XMMWORD PTR cache$[rbp] - 000c5 0f 59 45 40 mulps xmm0, XMMWORD PTR addc2$[rbp] - 000c9 0f 29 85 d0 00 + 000c6 0f 59 45 40 mulps xmm0, XMMWORD PTR addc2$[rbp] + 000ca 0f 29 85 d0 00 00 00 movaps XMMWORD PTR cache$[rbp], xmm0 ; 52 : ; 53 : //multiple all sub row ; 54 : __m128 sub = _mm_mul_ps(c0, subc1); - 000d0 48 8b 85 30 02 + 000d1 48 8b 85 30 02 00 00 mov rax, QWORD PTR c0$[rbp] - 000d7 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 000da 0f 59 45 70 mulps xmm0, XMMWORD PTR subc1$[rbp] - 000de 0f 29 85 00 01 + 000d8 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 000db 0f 59 45 70 mulps xmm0, XMMWORD PTR subc1$[rbp] + 000df 0f 29 85 00 01 00 00 movaps XMMWORD PTR sub$[rbp], xmm0 ; 55 : sub = _mm_mul_ps(sub, subc2); - 000e5 0f 28 85 00 01 + 000e6 0f 28 85 00 01 00 00 movaps xmm0, XMMWORD PTR sub$[rbp] - 000ec 0f 59 85 a0 00 + 000ed 0f 59 85 a0 00 00 00 mulps xmm0, XMMWORD PTR subc2$[rbp] - 000f3 0f 29 85 00 01 + 000f4 0f 29 85 00 01 00 00 movaps XMMWORD PTR sub$[rbp], xmm0 ; 56 : ; 57 : //main-corner sub sub-corner ; 58 : cache = _mm_sub_ps(cache, sub); - 000fa 0f 28 85 d0 00 + 000fb 0f 28 85 d0 00 00 00 movaps xmm0, XMMWORD PTR cache$[rbp] - 00101 0f 5c 85 00 01 + 00102 0f 5c 85 00 01 00 00 subps xmm0, XMMWORD PTR sub$[rbp] - 00108 0f 29 85 d0 00 + 00109 0f 29 85 d0 00 00 00 movaps XMMWORD PTR cache$[rbp], xmm0 ; 59 : ; 60 : __m128 ret = _mm_hadd_ps(cache, cache); //element 1 add element 2 - 0010f 0f 28 85 d0 00 + 00110 0f 28 85 d0 00 00 00 movaps xmm0, XMMWORD PTR cache$[rbp] - 00116 f2 0f 7c 85 d0 + 00117 f2 0f 7c 85 d0 00 00 00 haddps xmm0, XMMWORD PTR cache$[rbp] - 0011e 0f 29 85 30 01 + 0011f 0f 29 85 30 01 00 00 movaps XMMWORD PTR ret$[rbp], xmm0 ; 61 : ret = _mm_add_ps(ret, cache); //(e1 add e2) add element 3 - 00125 0f 28 85 30 01 + 00126 0f 28 85 30 01 00 00 movaps xmm0, XMMWORD PTR ret$[rbp] - 0012c 0f 58 85 d0 00 + 0012d 0f 58 85 d0 00 00 00 addps xmm0, XMMWORD PTR cache$[rbp] - 00133 0f 29 85 30 01 + 00134 0f 29 85 30 01 00 00 movaps XMMWORD PTR ret$[rbp], xmm0 ; 62 : ; 63 : return ret.m128_f32[2]; - 0013a b8 04 00 00 00 mov eax, 4 - 0013f 48 6b c0 02 imul rax, rax, 2 - 00143 f3 0f 10 84 05 + 0013b b8 04 00 00 00 mov eax, 4 + 00140 48 6b c0 02 imul rax, rax, 2 + 00144 f3 0f 10 84 05 30 01 00 00 movss xmm0, DWORD PTR ret$[rbp+rax] ; 64 : } - 0014c f3 0f 7f 44 24 + 0014d f3 0f 7f 44 24 20 movdqu XMMWORD PTR [rsp+32], xmm0 - 00152 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 00156 48 8d 15 00 00 + 00153 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 00157 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:det_mat3_internal$rtcFrameData - 0015d e8 00 00 00 00 call _RTC_CheckStackVars - 00162 f3 0f 6f 44 24 + 0015e e8 00 00 00 00 call _RTC_CheckStackVars + 00163 f3 0f 6f 44 24 20 movdqu xmm0, XMMWORD PTR [rsp+32] - 00168 48 8d a5 18 02 + 00169 48 8d a5 18 02 00 00 lea rsp, QWORD PTR [rbp+536] - 0016f 5f pop rdi - 00170 5d pop rbp - 00171 c3 ret 0 + 00170 5f pop rdi + 00171 5d pop rbp + 00172 c3 ret 0 det_mat3_internal ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -438,37 +439,38 @@ $LN3: 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__5527727A_mat3@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 68 : return det_mat3_internal( - 0001f b8 10 00 00 00 mov eax, 16 - 00024 48 6b c0 02 imul rax, rax, 2 - 00028 48 8b 8d 70 01 + 00020 b8 10 00 00 00 mov eax, 16 + 00025 48 6b c0 02 imul rax, rax, 2 + 00029 48 8b 8d 70 01 00 00 mov rcx, QWORD PTR mat$[rbp] - 0002f 0f 10 04 01 movups xmm0, XMMWORD PTR [rcx+rax] - 00033 0f 11 85 30 01 + 00030 0f 10 04 01 movups xmm0, XMMWORD PTR [rcx+rax] + 00034 0f 11 85 30 01 00 00 movups XMMWORD PTR $T3[rbp], xmm0 - 0003a b8 10 00 00 00 mov eax, 16 - 0003f 48 6b c0 01 imul rax, rax, 1 - 00043 48 8b 8d 70 01 + 0003b b8 10 00 00 00 mov eax, 16 + 00040 48 6b c0 01 imul rax, rax, 1 + 00044 48 8b 8d 70 01 00 00 mov rcx, QWORD PTR mat$[rbp] - 0004a 0f 10 04 01 movups xmm0, XMMWORD PTR [rcx+rax] - 0004e 0f 11 85 00 01 + 0004b 0f 10 04 01 movups xmm0, XMMWORD PTR [rcx+rax] + 0004f 0f 11 85 00 01 00 00 movups XMMWORD PTR $T2[rbp], xmm0 - 00055 b8 10 00 00 00 mov eax, 16 - 0005a 48 6b c0 00 imul rax, rax, 0 - 0005e 48 8b 8d 70 01 + 00056 b8 10 00 00 00 mov eax, 16 + 0005b 48 6b c0 00 imul rax, rax, 0 + 0005f 48 8b 8d 70 01 00 00 mov rcx, QWORD PTR mat$[rbp] - 00065 0f 10 04 01 movups xmm0, XMMWORD PTR [rcx+rax] - 00069 0f 11 85 d0 00 + 00066 0f 10 04 01 movups xmm0, XMMWORD PTR [rcx+rax] + 0006a 0f 11 85 d0 00 00 00 movups XMMWORD PTR $T1[rbp], xmm0 - 00070 4c 8d 85 30 01 + 00071 4c 8d 85 30 01 00 00 lea r8, QWORD PTR $T3[rbp] - 00077 48 8d 95 00 01 + 00078 48 8d 95 00 01 00 00 lea rdx, QWORD PTR $T2[rbp] - 0007e 48 8d 8d d0 00 + 0007f 48 8d 8d d0 00 00 00 lea rcx, QWORD PTR $T1[rbp] - 00085 e8 00 00 00 00 call det_mat3_internal + 00086 e8 00 00 00 00 call det_mat3_internal ; 69 : mat->colum[0], ; 70 : mat->colum[1], @@ -476,11 +478,11 @@ $LN3: ; 72 : ); ; 73 : } - 0008a 48 8d a5 58 01 + 0008b 48 8d a5 58 01 00 00 lea rsp, QWORD PTR [rbp+344] - 00091 5f pop rdi - 00092 5d pop rbp - 00093 c3 ret 0 + 00092 5f pop rdi + 00093 5d pop rbp + 00094 c3 ret 0 det_mat3 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -508,126 +510,127 @@ $LN3: 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__5527727A_mat3@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 28 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0)); - 00024 b8 10 00 00 00 mov eax, 16 - 00029 48 6b c0 01 imul rax, rax, 1 - 0002d 48 8b 8d a0 01 + 00025 b8 10 00 00 00 mov eax, 16 + 0002a 48 6b c0 01 imul rax, rax, 1 + 0002e 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00034 48 03 c8 add rcx, rax - 00037 48 8b c1 mov rax, rcx - 0003a 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0003d b8 10 00 00 00 mov eax, 16 - 00042 48 6b c0 00 imul rax, rax, 0 - 00046 48 8b 8d a0 01 + 00035 48 03 c8 add rcx, rax + 00038 48 8b c1 mov rax, rcx + 0003b 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0003e b8 10 00 00 00 mov eax, 16 + 00043 48 6b c0 00 imul rax, rax, 0 + 00047 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0004d 48 03 c8 add rcx, rax - 00050 48 8b c1 mov rax, rcx - 00053 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00056 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 0005a 0f 28 c1 movaps xmm0, xmm1 - 0005d 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 + 0004e 48 03 c8 add rcx, rax + 00051 48 8b c1 mov rax, rcx + 00054 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00057 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 0005b 0f 28 c1 movaps xmm0, xmm1 + 0005e 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 ; 29 : __m128 t1 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(3, 2, 3, 2)); - 00061 b8 10 00 00 00 mov eax, 16 - 00066 48 6b c0 01 imul rax, rax, 1 - 0006a 48 8b 8d a0 01 + 00062 b8 10 00 00 00 mov eax, 16 + 00067 48 6b c0 01 imul rax, rax, 1 + 0006b 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00071 48 03 c8 add rcx, rax - 00074 48 8b c1 mov rax, rcx - 00077 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0007a b8 10 00 00 00 mov eax, 16 - 0007f 48 6b c0 00 imul rax, rax, 0 - 00083 48 8b 8d a0 01 + 00072 48 03 c8 add rcx, rax + 00075 48 8b c1 mov rax, rcx + 00078 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0007b b8 10 00 00 00 mov eax, 16 + 00080 48 6b c0 00 imul rax, rax, 0 + 00084 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0008a 48 03 c8 add rcx, rax - 0008d 48 8b c1 mov rax, rcx - 00090 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00093 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH - 00097 0f 28 c1 movaps xmm0, xmm1 - 0009a 0f 29 45 40 movaps XMMWORD PTR t1$[rbp], xmm0 + 0008b 48 03 c8 add rcx, rax + 0008e 48 8b c1 mov rax, rcx + 00091 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00094 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH + 00098 0f 28 c1 movaps xmm0, xmm1 + 0009b 0f 29 45 40 movaps XMMWORD PTR t1$[rbp], xmm0 ; 30 : __m128 t2 = _mm_shuffle_ps(ALIGN(source->colum[2]), zeroVec, _MM_SHUFFLE(1, 0, 1, 0)); - 0009e 0f 57 c0 xorps xmm0, xmm0 - 000a1 b8 10 00 00 00 mov eax, 16 - 000a6 48 6b c0 02 imul rax, rax, 2 - 000aa 48 8b 8d a0 01 + 0009f 0f 57 c0 xorps xmm0, xmm0 + 000a2 b8 10 00 00 00 mov eax, 16 + 000a7 48 6b c0 02 imul rax, rax, 2 + 000ab 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 000b1 48 03 c8 add rcx, rax - 000b4 48 8b c1 mov rax, rcx - 000b7 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 000ba 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 000be 0f 28 c1 movaps xmm0, xmm1 - 000c1 0f 29 45 70 movaps XMMWORD PTR t2$[rbp], xmm0 + 000b2 48 03 c8 add rcx, rax + 000b5 48 8b c1 mov rax, rcx + 000b8 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 000bb 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 000bf 0f 28 c1 movaps xmm0, xmm1 + 000c2 0f 29 45 70 movaps XMMWORD PTR t2$[rbp], xmm0 ; 31 : __m128 t3 = _mm_shuffle_ps(ALIGN(source->colum[2]), zeroVec, _MM_SHUFFLE(3, 2, 3, 2)); - 000c5 0f 57 c0 xorps xmm0, xmm0 - 000c8 b8 10 00 00 00 mov eax, 16 - 000cd 48 6b c0 02 imul rax, rax, 2 - 000d1 48 8b 8d a0 01 + 000c6 0f 57 c0 xorps xmm0, xmm0 + 000c9 b8 10 00 00 00 mov eax, 16 + 000ce 48 6b c0 02 imul rax, rax, 2 + 000d2 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 000d8 48 03 c8 add rcx, rax - 000db 48 8b c1 mov rax, rcx - 000de 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 000e1 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH - 000e5 0f 28 c1 movaps xmm0, xmm1 - 000e8 0f 29 85 a0 00 + 000d9 48 03 c8 add rcx, rax + 000dc 48 8b c1 mov rax, rcx + 000df 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 000e2 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH + 000e6 0f 28 c1 movaps xmm0, xmm1 + 000e9 0f 29 85 a0 00 00 00 movaps XMMWORD PTR t3$[rbp], xmm0 ; 32 : ; 33 : target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0)); - 000ef 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] - 000f3 0f c6 45 70 88 shufps xmm0, XMMWORD PTR t2$[rbp], 136 ; 00000088H - 000f8 b8 10 00 00 00 mov eax, 16 - 000fd 48 6b c0 00 imul rax, rax, 0 - 00101 48 8b 8d a8 01 + 000f0 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] + 000f4 0f c6 45 70 88 shufps xmm0, XMMWORD PTR t2$[rbp], 136 ; 00000088H + 000f9 b8 10 00 00 00 mov eax, 16 + 000fe 48 6b c0 00 imul rax, rax, 0 + 00102 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00108 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00109 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 34 : target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1)); - 0010c 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] - 00110 0f c6 45 70 dd shufps xmm0, XMMWORD PTR t2$[rbp], 221 ; 000000ddH - 00115 b8 10 00 00 00 mov eax, 16 - 0011a 48 6b c0 01 imul rax, rax, 1 - 0011e 48 8b 8d a8 01 + 0010d 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] + 00111 0f c6 45 70 dd shufps xmm0, XMMWORD PTR t2$[rbp], 221 ; 000000ddH + 00116 b8 10 00 00 00 mov eax, 16 + 0011b 48 6b c0 01 imul rax, rax, 1 + 0011f 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00125 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00126 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 35 : target->colum[2] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(2, 0, 2, 0)); - 00129 0f 28 45 40 movaps xmm0, XMMWORD PTR t1$[rbp] - 0012d 0f c6 85 a0 00 + 0012a 0f 28 45 40 movaps xmm0, XMMWORD PTR t1$[rbp] + 0012e 0f c6 85 a0 00 00 00 88 shufps xmm0, XMMWORD PTR t3$[rbp], 136 ; 00000088H - 00135 b8 10 00 00 00 mov eax, 16 - 0013a 48 6b c0 02 imul rax, rax, 2 - 0013e 48 8b 8d a8 01 + 00136 b8 10 00 00 00 mov eax, 16 + 0013b 48 6b c0 02 imul rax, rax, 2 + 0013f 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00145 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00146 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 36 : target->colum[3] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(3, 1, 3, 1)); - 00149 0f 28 45 40 movaps xmm0, XMMWORD PTR t1$[rbp] - 0014d 0f c6 85 a0 00 + 0014a 0f 28 45 40 movaps xmm0, XMMWORD PTR t1$[rbp] + 0014e 0f c6 85 a0 00 00 00 dd shufps xmm0, XMMWORD PTR t3$[rbp], 221 ; 000000ddH - 00155 b8 10 00 00 00 mov eax, 16 - 0015a 48 6b c0 03 imul rax, rax, 3 - 0015e 48 8b 8d a8 01 + 00156 b8 10 00 00 00 mov eax, 16 + 0015b 48 6b c0 03 imul rax, rax, 3 + 0015f 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00165 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00166 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 37 : } - 00169 48 8d a5 88 01 + 0016a 48 8d a5 88 01 00 00 lea rsp, QWORD PTR [rbp+392] - 00170 5f pop rdi - 00171 5d pop rbp - 00172 c3 ret 0 + 00171 5f pop rdi + 00172 5d pop rbp + 00173 c3 ret 0 transpose3to4 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -655,115 +658,116 @@ $LN3: 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__5527727A_mat3@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 16 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0)); - 00024 b8 10 00 00 00 mov eax, 16 - 00029 48 6b c0 01 imul rax, rax, 1 - 0002d 48 8b 8d a0 01 + 00025 b8 10 00 00 00 mov eax, 16 + 0002a 48 6b c0 01 imul rax, rax, 1 + 0002e 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00034 48 03 c8 add rcx, rax - 00037 48 8b c1 mov rax, rcx - 0003a 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0003d b8 10 00 00 00 mov eax, 16 - 00042 48 6b c0 00 imul rax, rax, 0 - 00046 48 8b 8d a0 01 + 00035 48 03 c8 add rcx, rax + 00038 48 8b c1 mov rax, rcx + 0003b 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0003e b8 10 00 00 00 mov eax, 16 + 00043 48 6b c0 00 imul rax, rax, 0 + 00047 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0004d 48 03 c8 add rcx, rax - 00050 48 8b c1 mov rax, rcx - 00053 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00056 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 0005a 0f 28 c1 movaps xmm0, xmm1 - 0005d 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 + 0004e 48 03 c8 add rcx, rax + 00051 48 8b c1 mov rax, rcx + 00054 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00057 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 0005b 0f 28 c1 movaps xmm0, xmm1 + 0005e 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 ; 17 : __m128 t1 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(3, 2, 3, 2)); - 00061 b8 10 00 00 00 mov eax, 16 - 00066 48 6b c0 01 imul rax, rax, 1 - 0006a 48 8b 8d a0 01 + 00062 b8 10 00 00 00 mov eax, 16 + 00067 48 6b c0 01 imul rax, rax, 1 + 0006b 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00071 48 03 c8 add rcx, rax - 00074 48 8b c1 mov rax, rcx - 00077 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0007a b8 10 00 00 00 mov eax, 16 - 0007f 48 6b c0 00 imul rax, rax, 0 - 00083 48 8b 8d a0 01 + 00072 48 03 c8 add rcx, rax + 00075 48 8b c1 mov rax, rcx + 00078 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0007b b8 10 00 00 00 mov eax, 16 + 00080 48 6b c0 00 imul rax, rax, 0 + 00084 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0008a 48 03 c8 add rcx, rax - 0008d 48 8b c1 mov rax, rcx - 00090 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00093 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH - 00097 0f 28 c1 movaps xmm0, xmm1 - 0009a 0f 29 45 40 movaps XMMWORD PTR t1$[rbp], xmm0 + 0008b 48 03 c8 add rcx, rax + 0008e 48 8b c1 mov rax, rcx + 00091 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00094 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH + 00098 0f 28 c1 movaps xmm0, xmm1 + 0009b 0f 29 45 40 movaps XMMWORD PTR t1$[rbp], xmm0 ; 18 : __m128 t2 = _mm_shuffle_ps(ALIGN(source->colum[2]), zeroVec, _MM_SHUFFLE(1, 0, 1, 0)); - 0009e 0f 57 c0 xorps xmm0, xmm0 - 000a1 b8 10 00 00 00 mov eax, 16 - 000a6 48 6b c0 02 imul rax, rax, 2 - 000aa 48 8b 8d a0 01 + 0009f 0f 57 c0 xorps xmm0, xmm0 + 000a2 b8 10 00 00 00 mov eax, 16 + 000a7 48 6b c0 02 imul rax, rax, 2 + 000ab 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 000b1 48 03 c8 add rcx, rax - 000b4 48 8b c1 mov rax, rcx - 000b7 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 000ba 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 000be 0f 28 c1 movaps xmm0, xmm1 - 000c1 0f 29 45 70 movaps XMMWORD PTR t2$[rbp], xmm0 + 000b2 48 03 c8 add rcx, rax + 000b5 48 8b c1 mov rax, rcx + 000b8 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 000bb 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 000bf 0f 28 c1 movaps xmm0, xmm1 + 000c2 0f 29 45 70 movaps XMMWORD PTR t2$[rbp], xmm0 ; 19 : __m128 t3 = _mm_shuffle_ps(ALIGN(source->colum[2]), zeroVec, _MM_SHUFFLE(3, 2, 3, 2)); - 000c5 0f 57 c0 xorps xmm0, xmm0 - 000c8 b8 10 00 00 00 mov eax, 16 - 000cd 48 6b c0 02 imul rax, rax, 2 - 000d1 48 8b 8d a0 01 + 000c6 0f 57 c0 xorps xmm0, xmm0 + 000c9 b8 10 00 00 00 mov eax, 16 + 000ce 48 6b c0 02 imul rax, rax, 2 + 000d2 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 000d8 48 03 c8 add rcx, rax - 000db 48 8b c1 mov rax, rcx - 000de 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 000e1 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH - 000e5 0f 28 c1 movaps xmm0, xmm1 - 000e8 0f 29 85 a0 00 + 000d9 48 03 c8 add rcx, rax + 000dc 48 8b c1 mov rax, rcx + 000df 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 000e2 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH + 000e6 0f 28 c1 movaps xmm0, xmm1 + 000e9 0f 29 85 a0 00 00 00 movaps XMMWORD PTR t3$[rbp], xmm0 ; 20 : ; 21 : target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0)); - 000ef 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] - 000f3 0f c6 45 70 88 shufps xmm0, XMMWORD PTR t2$[rbp], 136 ; 00000088H - 000f8 b8 10 00 00 00 mov eax, 16 - 000fd 48 6b c0 00 imul rax, rax, 0 - 00101 48 8b 8d a8 01 + 000f0 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] + 000f4 0f c6 45 70 88 shufps xmm0, XMMWORD PTR t2$[rbp], 136 ; 00000088H + 000f9 b8 10 00 00 00 mov eax, 16 + 000fe 48 6b c0 00 imul rax, rax, 0 + 00102 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00108 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00109 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 22 : target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1)); - 0010c 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] - 00110 0f c6 45 70 dd shufps xmm0, XMMWORD PTR t2$[rbp], 221 ; 000000ddH - 00115 b8 10 00 00 00 mov eax, 16 - 0011a 48 6b c0 01 imul rax, rax, 1 - 0011e 48 8b 8d a8 01 + 0010d 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] + 00111 0f c6 45 70 dd shufps xmm0, XMMWORD PTR t2$[rbp], 221 ; 000000ddH + 00116 b8 10 00 00 00 mov eax, 16 + 0011b 48 6b c0 01 imul rax, rax, 1 + 0011f 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00125 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00126 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 23 : target->colum[2] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(2, 0, 2, 0)); - 00129 0f 28 45 40 movaps xmm0, XMMWORD PTR t1$[rbp] - 0012d 0f c6 85 a0 00 + 0012a 0f 28 45 40 movaps xmm0, XMMWORD PTR t1$[rbp] + 0012e 0f c6 85 a0 00 00 00 88 shufps xmm0, XMMWORD PTR t3$[rbp], 136 ; 00000088H - 00135 b8 10 00 00 00 mov eax, 16 - 0013a 48 6b c0 02 imul rax, rax, 2 - 0013e 48 8b 8d a8 01 + 00136 b8 10 00 00 00 mov eax, 16 + 0013b 48 6b c0 02 imul rax, rax, 2 + 0013f 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00145 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00146 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 24 : } - 00149 48 8d a5 88 01 + 0014a 48 8d a5 88 01 00 00 lea rsp, QWORD PTR [rbp+392] - 00150 5f pop rdi - 00151 5d pop rbp - 00152 c3 ret 0 + 00151 5f pop rdi + 00152 5d pop rbp + 00153 c3 ret 0 transpose3to3 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -789,69 +793,70 @@ $LN3: 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__5527727A_mat3@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 7 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0)); - 00024 b8 10 00 00 00 mov eax, 16 - 00029 48 6b c0 01 imul rax, rax, 1 - 0002d 48 8b 8d 40 01 + 00025 b8 10 00 00 00 mov eax, 16 + 0002a 48 6b c0 01 imul rax, rax, 1 + 0002e 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00034 48 03 c8 add rcx, rax - 00037 48 8b c1 mov rax, rcx - 0003a 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0003d b8 10 00 00 00 mov eax, 16 - 00042 48 6b c0 00 imul rax, rax, 0 - 00046 48 8b 8d 40 01 + 00035 48 03 c8 add rcx, rax + 00038 48 8b c1 mov rax, rcx + 0003b 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0003e b8 10 00 00 00 mov eax, 16 + 00043 48 6b c0 00 imul rax, rax, 0 + 00047 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0004d 48 03 c8 add rcx, rax - 00050 48 8b c1 mov rax, rcx - 00053 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00056 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 0005a 0f 28 c1 movaps xmm0, xmm1 - 0005d 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 + 0004e 48 03 c8 add rcx, rax + 00051 48 8b c1 mov rax, rcx + 00054 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00057 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 0005b 0f 28 c1 movaps xmm0, xmm1 + 0005e 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 ; 8 : __m128 t2 = _mm_shuffle_ps(ALIGN(source->colum[2]), zeroVec, _MM_SHUFFLE(1, 0, 1, 0)); - 00061 0f 57 c0 xorps xmm0, xmm0 - 00064 b8 10 00 00 00 mov eax, 16 - 00069 48 6b c0 02 imul rax, rax, 2 - 0006d 48 8b 8d 40 01 + 00062 0f 57 c0 xorps xmm0, xmm0 + 00065 b8 10 00 00 00 mov eax, 16 + 0006a 48 6b c0 02 imul rax, rax, 2 + 0006e 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00074 48 03 c8 add rcx, rax - 00077 48 8b c1 mov rax, rcx - 0007a 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 0007d 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 00081 0f 28 c1 movaps xmm0, xmm1 - 00084 0f 29 45 40 movaps XMMWORD PTR t2$[rbp], xmm0 + 00075 48 03 c8 add rcx, rax + 00078 48 8b c1 mov rax, rcx + 0007b 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 0007e 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 00082 0f 28 c1 movaps xmm0, xmm1 + 00085 0f 29 45 40 movaps XMMWORD PTR t2$[rbp], xmm0 ; 9 : ; 10 : target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0)); - 00088 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] - 0008c 0f c6 45 40 88 shufps xmm0, XMMWORD PTR t2$[rbp], 136 ; 00000088H - 00091 b8 10 00 00 00 mov eax, 16 - 00096 48 6b c0 00 imul rax, rax, 0 - 0009a 48 8b 8d 48 01 + 00089 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] + 0008d 0f c6 45 40 88 shufps xmm0, XMMWORD PTR t2$[rbp], 136 ; 00000088H + 00092 b8 10 00 00 00 mov eax, 16 + 00097 48 6b c0 00 imul rax, rax, 0 + 0009b 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR target$[rbp] - 000a1 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 000a2 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 11 : target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1)); - 000a5 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] - 000a9 0f c6 45 40 dd shufps xmm0, XMMWORD PTR t2$[rbp], 221 ; 000000ddH - 000ae b8 10 00 00 00 mov eax, 16 - 000b3 48 6b c0 01 imul rax, rax, 1 - 000b7 48 8b 8d 48 01 + 000a6 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] + 000aa 0f c6 45 40 dd shufps xmm0, XMMWORD PTR t2$[rbp], 221 ; 000000ddH + 000af b8 10 00 00 00 mov eax, 16 + 000b4 48 6b c0 01 imul rax, rax, 1 + 000b8 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR target$[rbp] - 000be 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 000bf 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 12 : } - 000c2 48 8d a5 28 01 + 000c3 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 000c9 5f pop rdi - 000ca 5d pop rbp - 000cb c3 ret 0 + 000ca 5f pop rdi + 000cb 5d pop rbp + 000cc c3 ret 0 transpose3to2 ENDP _TEXT ENDS END diff --git a/源代码/StgSharpC/x64/Debug/mat3.nativecodeanalysis.xml b/源代码/StgSharpC/x64/Debug/mat3.nativecodeanalysis.xml deleted file mode 100644 index dcdf0885..00000000 --- a/源代码/StgSharpC/x64/Debug/mat3.nativecodeanalysis.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/源代码/StgSharpC/x64/Debug/mat3.obj b/源代码/StgSharpC/x64/Debug/mat3.obj index 1149a52d..bff639a8 100644 Binary files a/源代码/StgSharpC/x64/Debug/mat3.obj and b/源代码/StgSharpC/x64/Debug/mat3.obj differ diff --git a/源代码/StgSharpC/x64/Debug/mat3.sbr b/源代码/StgSharpC/x64/Debug/mat3.sbr index ace52265..9917b948 100644 Binary files a/源代码/StgSharpC/x64/Debug/mat3.sbr and b/源代码/StgSharpC/x64/Debug/mat3.sbr differ diff --git a/源代码/StgSharpC/x64/Debug/mat4.cod b/源代码/StgSharpC/x64/Debug/mat4.cod index 6e677ec3..a66bba71 100644 --- a/源代码/StgSharpC/x64/Debug/mat4.cod +++ b/源代码/StgSharpC/x64/Debug/mat4.cod @@ -1,4 +1,4 @@ -; Listing generated by Microsoft (R) Optimizing Compiler Version 19.39.33523.0 +; Listing generated by Microsoft (R) Optimizing Compiler Version 19.41.34120.0 include listing.inc @@ -10,20 +10,20 @@ COMM infolog:BYTE:0200H _DATA ENDS msvcjmc SEGMENT __A19B9DB6_ssgc_framework@h DB 01H -__5BC5AF51_mmintrin@h DB 01H -__4B783B3C_concurrencysal@h DB 01H -__137BB1BE_sal@h DB 01H -__805F4069_vadefs@h DB 01H -__1EAACA9B_vcruntime@h DB 01H +__7583A0D2_mmintrin@h DB 01H +__DDA0A690_concurrencysal@h DB 01H +__9ECC08BE_sal@h DB 01H +__E05D733A_vadefs@h DB 01H +__6A355E0E_vcruntime@h DB 01H __1B0272D9_corecrt@h DB 01H __45DED006_corecrt_malloc@h DB 01H __FA77ED4C_malloc@h DB 01H -__9E7FA6CF_xmmintrin@h DB 01H +__EAE0325A_xmmintrin@h DB 01H __0ED14FEE_winpackagefamily@h DB 01H __F92EF742_winapifamily@h DB 01H __22E515EB_sdkddkver@h DB 01H -__1227BCE2_excpt@h DB 01H -__CC8D90C0_stdarg@h DB 01H +__A09A3A7D_excpt@h DB 01H +__AC8FA393_stdarg@h DB 01H __29F49F40_specstrings_undef@h DB 01H __D0F42932_specstrings_strict@h DB 01H __F00405FD_sdv_driverspecs@h DB 01H @@ -34,7 +34,7 @@ __1EC467ED_ctype@h DB 01H __98517906_kernelspecs@h DB 01H __D3497022_basetsd@h DB 01H __61CC25A1_errno@h DB 01H -__0504B279_vcruntime_string@h DB 01H +__890838BD_vcruntime_string@h DB 01H __E4C945B4_corecrt_memcpy_s@h DB 01H __8EAFF484_corecrt_memory@h DB 01H __6490AEC5_corecrt_wstring@h DB 01H @@ -110,26 +110,26 @@ __577CE3E7_ime_cmodes@h DB 01H __1E72C31E_imm@h DB 01H __E15BF856_windows@h DB 01H __61B03275_ssgc_internal@h DB 01H -__F8522E0F_stdint@h DB 01H +__98501D5C_stdint@h DB 01H __874AB8BA_khrplatform@h DB 01H __8DCB230D_gl@h DB 01H __5F89FF5A_wgl@h DB 01H __13F5961F_stddef@h DB 01H __B47D1049_glfw3@h DB 01H -__FB1D2F03_emmintrin@h DB 01H -__24BC478A_pmmintrin@h DB 01H -__94653408_tmmintrin@h DB 01H -__BD5E218B_smmintrin@h DB 01H -__D83CA847_nmmintrin@h DB 01H -__0D875209_wmmintrin@h DB 01H -__C6131F0E_zmmintrin@h DB 01H -__F107BDC4_immintrin@h DB 01H +__8F82BB96_emmintrin@h DB 01H +__5023D31F_pmmintrin@h DB 01H +__E0FAA09D_tmmintrin@h DB 01H +__C9C1B51E_smmintrin@h DB 01H +__ACA33CD2_nmmintrin@h DB 01H +__7918C69C_wmmintrin@h DB 01H +__B28C8B9B_zmmintrin@h DB 01H +__85982951_immintrin@h DB 01H __44420885_corecrt_stdio_config@h DB 01H __AB601D8D_corecrt_wstdio@h DB 01H __C1EC35D3_stdio@h DB 01H __FD6DBD68_corecrt_search@h DB 01H __E2E33A61_corecrt_wstdlib@h DB 01H -__46240030_limits@h DB 01H +__26263363_limits@h DB 01H __6E5ACABA_stdlib@h DB 01H __5274102E_stb_image@h DB 01H __CE2BBC10_StgSharpC@h DB 01H @@ -152,31 +152,31 @@ EXTRN _fltused:DWORD ; COMDAT pdata pdata SEGMENT $pdata$transpose4to2 DD imagerel $LN3 - DD imagerel $LN3+226 + DD imagerel $LN3+227 DD imagerel $unwind$transpose4to2 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$transpose4to4 DD imagerel $LN3 - DD imagerel $LN3+415 + DD imagerel $LN3+416 DD imagerel $unwind$transpose4to4 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$det_mat4 DD imagerel $LN3 - DD imagerel $LN3+638 + DD imagerel $LN3+639 DD imagerel $unwind$det_mat4 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$deinit_mat4 DD imagerel $LN3 - DD imagerel $LN3+54 + DD imagerel $LN3+56 DD imagerel $unwind$deinit_mat4 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$transpose4to3 DD imagerel $LN3 - DD imagerel $LN3+383 + DD imagerel $LN3+384 DD imagerel $unwind$transpose4to3 pdata ENDS ; COMDAT __xmm@80000000800000008000000080000000 @@ -277,127 +277,128 @@ $LN3: 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__506864FF_mat4@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 30 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0)); - 00024 b8 10 00 00 00 mov eax, 16 - 00029 48 6b c0 01 imul rax, rax, 1 - 0002d 48 8b 8d a0 01 + 00025 b8 10 00 00 00 mov eax, 16 + 0002a 48 6b c0 01 imul rax, rax, 1 + 0002e 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00034 48 03 c8 add rcx, rax - 00037 48 8b c1 mov rax, rcx - 0003a 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0003d b8 10 00 00 00 mov eax, 16 - 00042 48 6b c0 00 imul rax, rax, 0 - 00046 48 8b 8d a0 01 + 00035 48 03 c8 add rcx, rax + 00038 48 8b c1 mov rax, rcx + 0003b 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0003e b8 10 00 00 00 mov eax, 16 + 00043 48 6b c0 00 imul rax, rax, 0 + 00047 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0004d 48 03 c8 add rcx, rax - 00050 48 8b c1 mov rax, rcx - 00053 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00056 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 0005a 0f 28 c1 movaps xmm0, xmm1 - 0005d 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 + 0004e 48 03 c8 add rcx, rax + 00051 48 8b c1 mov rax, rcx + 00054 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00057 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 0005b 0f 28 c1 movaps xmm0, xmm1 + 0005e 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 ; 31 : __m128 t1 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(3, 2, 3, 2)); - 00061 b8 10 00 00 00 mov eax, 16 - 00066 48 6b c0 01 imul rax, rax, 1 - 0006a 48 8b 8d a0 01 + 00062 b8 10 00 00 00 mov eax, 16 + 00067 48 6b c0 01 imul rax, rax, 1 + 0006b 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00071 48 03 c8 add rcx, rax - 00074 48 8b c1 mov rax, rcx - 00077 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0007a b8 10 00 00 00 mov eax, 16 - 0007f 48 6b c0 00 imul rax, rax, 0 - 00083 48 8b 8d a0 01 + 00072 48 03 c8 add rcx, rax + 00075 48 8b c1 mov rax, rcx + 00078 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0007b b8 10 00 00 00 mov eax, 16 + 00080 48 6b c0 00 imul rax, rax, 0 + 00084 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0008a 48 03 c8 add rcx, rax - 0008d 48 8b c1 mov rax, rcx - 00090 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00093 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH - 00097 0f 28 c1 movaps xmm0, xmm1 - 0009a 0f 29 45 40 movaps XMMWORD PTR t1$[rbp], xmm0 + 0008b 48 03 c8 add rcx, rax + 0008e 48 8b c1 mov rax, rcx + 00091 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00094 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH + 00098 0f 28 c1 movaps xmm0, xmm1 + 0009b 0f 29 45 40 movaps XMMWORD PTR t1$[rbp], xmm0 ; 32 : __m128 t2 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(1, 0, 1, 0)); - 0009e b8 10 00 00 00 mov eax, 16 - 000a3 48 6b c0 03 imul rax, rax, 3 - 000a7 48 8b 8d a0 01 + 0009f b8 10 00 00 00 mov eax, 16 + 000a4 48 6b c0 03 imul rax, rax, 3 + 000a8 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 000ae 48 03 c8 add rcx, rax - 000b1 48 8b c1 mov rax, rcx - 000b4 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 000b7 b8 10 00 00 00 mov eax, 16 - 000bc 48 6b c0 02 imul rax, rax, 2 - 000c0 48 8b 8d a0 01 + 000af 48 03 c8 add rcx, rax + 000b2 48 8b c1 mov rax, rcx + 000b5 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 000b8 b8 10 00 00 00 mov eax, 16 + 000bd 48 6b c0 02 imul rax, rax, 2 + 000c1 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 000c7 48 03 c8 add rcx, rax - 000ca 48 8b c1 mov rax, rcx - 000cd 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 000d0 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 000d4 0f 28 c1 movaps xmm0, xmm1 - 000d7 0f 29 45 70 movaps XMMWORD PTR t2$[rbp], xmm0 + 000c8 48 03 c8 add rcx, rax + 000cb 48 8b c1 mov rax, rcx + 000ce 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 000d1 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 000d5 0f 28 c1 movaps xmm0, xmm1 + 000d8 0f 29 45 70 movaps XMMWORD PTR t2$[rbp], xmm0 ; 33 : __m128 t3 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(3, 2, 3, 2)); - 000db b8 10 00 00 00 mov eax, 16 - 000e0 48 6b c0 03 imul rax, rax, 3 - 000e4 48 8b 8d a0 01 + 000dc b8 10 00 00 00 mov eax, 16 + 000e1 48 6b c0 03 imul rax, rax, 3 + 000e5 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 000eb 48 03 c8 add rcx, rax - 000ee 48 8b c1 mov rax, rcx - 000f1 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 000f4 b8 10 00 00 00 mov eax, 16 - 000f9 48 6b c0 02 imul rax, rax, 2 - 000fd 48 8b 8d a0 01 + 000ec 48 03 c8 add rcx, rax + 000ef 48 8b c1 mov rax, rcx + 000f2 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 000f5 b8 10 00 00 00 mov eax, 16 + 000fa 48 6b c0 02 imul rax, rax, 2 + 000fe 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00104 48 03 c8 add rcx, rax - 00107 48 8b c1 mov rax, rcx - 0010a 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 0010d 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH - 00111 0f 28 c1 movaps xmm0, xmm1 - 00114 0f 29 85 a0 00 + 00105 48 03 c8 add rcx, rax + 00108 48 8b c1 mov rax, rcx + 0010b 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 0010e 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH + 00112 0f 28 c1 movaps xmm0, xmm1 + 00115 0f 29 85 a0 00 00 00 movaps XMMWORD PTR t3$[rbp], xmm0 ; 34 : ; 35 : target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0)); - 0011b 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] - 0011f 0f c6 45 70 88 shufps xmm0, XMMWORD PTR t2$[rbp], 136 ; 00000088H - 00124 b8 10 00 00 00 mov eax, 16 - 00129 48 6b c0 00 imul rax, rax, 0 - 0012d 48 8b 8d a8 01 + 0011c 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] + 00120 0f c6 45 70 88 shufps xmm0, XMMWORD PTR t2$[rbp], 136 ; 00000088H + 00125 b8 10 00 00 00 mov eax, 16 + 0012a 48 6b c0 00 imul rax, rax, 0 + 0012e 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00134 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00135 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 36 : target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1)); - 00138 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] - 0013c 0f c6 45 70 dd shufps xmm0, XMMWORD PTR t2$[rbp], 221 ; 000000ddH - 00141 b8 10 00 00 00 mov eax, 16 - 00146 48 6b c0 01 imul rax, rax, 1 - 0014a 48 8b 8d a8 01 + 00139 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] + 0013d 0f c6 45 70 dd shufps xmm0, XMMWORD PTR t2$[rbp], 221 ; 000000ddH + 00142 b8 10 00 00 00 mov eax, 16 + 00147 48 6b c0 01 imul rax, rax, 1 + 0014b 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00151 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00152 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 37 : target->colum[2] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(2, 0, 2, 0)); - 00155 0f 28 45 40 movaps xmm0, XMMWORD PTR t1$[rbp] - 00159 0f c6 85 a0 00 + 00156 0f 28 45 40 movaps xmm0, XMMWORD PTR t1$[rbp] + 0015a 0f c6 85 a0 00 00 00 88 shufps xmm0, XMMWORD PTR t3$[rbp], 136 ; 00000088H - 00161 b8 10 00 00 00 mov eax, 16 - 00166 48 6b c0 02 imul rax, rax, 2 - 0016a 48 8b 8d a8 01 + 00162 b8 10 00 00 00 mov eax, 16 + 00167 48 6b c0 02 imul rax, rax, 2 + 0016b 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00171 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00172 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 38 : } - 00175 48 8d a5 88 01 + 00176 48 8d a5 88 01 00 00 lea rsp, QWORD PTR [rbp+392] - 0017c 5f pop rdi - 0017d 5d pop rbp - 0017e c3 ret 0 + 0017d 5f pop rdi + 0017e 5d pop rbp + 0017f c3 ret 0 transpose4to3 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -419,21 +420,23 @@ $LN3: 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__506864FF_mat4@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 61 : _aligned_free(matPtr); - 0001f 48 8b 8d e0 00 + 00020 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR matPtr$[rbp] - 00026 ff 15 00 00 00 + 00027 ff 15 00 00 00 00 call QWORD PTR __imp__aligned_free + 0002d 90 npad 1 ; 62 : } - 0002c 48 8d a5 c8 00 + 0002e 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00033 5f pop rdi - 00034 5d pop rbp - 00035 c3 ret 0 + 00035 5f pop rdi + 00036 5d pop rbp + 00037 c3 ret 0 deinit_mat4 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -484,139 +487,140 @@ $LN3: 00031 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__506864FF_mat4@c 00038 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0003d 90 npad 1 ; 42 : __m128 mc0 = ALIGN(matPtr->colum[0]); - 0003d b8 10 00 00 00 mov eax, 16 - 00042 48 6b c0 00 imul rax, rax, 0 - 00046 48 8b 8d 00 05 + 0003e b8 10 00 00 00 mov eax, 16 + 00043 48 6b c0 00 imul rax, rax, 0 + 00047 48 8b 8d 00 05 00 00 mov rcx, QWORD PTR matPtr$[rbp] - 0004d 48 03 c8 add rcx, rax - 00050 48 8b c1 mov rax, rcx - 00053 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 00056 0f 29 45 10 movaps XMMWORD PTR mc0$[rbp], xmm0 + 0004e 48 03 c8 add rcx, rax + 00051 48 8b c1 mov rax, rcx + 00054 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 00057 0f 29 45 10 movaps XMMWORD PTR mc0$[rbp], xmm0 ; 43 : __m128 mc1 = ALIGN(matPtr->colum[1]); - 0005a b8 10 00 00 00 mov eax, 16 - 0005f 48 6b c0 01 imul rax, rax, 1 - 00063 48 8b 8d 00 05 + 0005b b8 10 00 00 00 mov eax, 16 + 00060 48 6b c0 01 imul rax, rax, 1 + 00064 48 8b 8d 00 05 00 00 mov rcx, QWORD PTR matPtr$[rbp] - 0006a 48 03 c8 add rcx, rax - 0006d 48 8b c1 mov rax, rcx - 00070 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 00073 0f 29 45 40 movaps XMMWORD PTR mc1$[rbp], xmm0 + 0006b 48 03 c8 add rcx, rax + 0006e 48 8b c1 mov rax, rcx + 00071 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 00074 0f 29 45 40 movaps XMMWORD PTR mc1$[rbp], xmm0 ; 44 : __m128 mc2 = ALIGN(matPtr->colum[2]); - 00077 b8 10 00 00 00 mov eax, 16 - 0007c 48 6b c0 02 imul rax, rax, 2 - 00080 48 8b 8d 00 05 + 00078 b8 10 00 00 00 mov eax, 16 + 0007d 48 6b c0 02 imul rax, rax, 2 + 00081 48 8b 8d 00 05 00 00 mov rcx, QWORD PTR matPtr$[rbp] - 00087 48 03 c8 add rcx, rax - 0008a 48 8b c1 mov rax, rcx - 0008d 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 00090 0f 29 45 70 movaps XMMWORD PTR mc2$[rbp], xmm0 + 00088 48 03 c8 add rcx, rax + 0008b 48 8b c1 mov rax, rcx + 0008e 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 00091 0f 29 45 70 movaps XMMWORD PTR mc2$[rbp], xmm0 ; 45 : __m128 mc3 = ALIGN(matPtr->colum[3]); - 00094 b8 10 00 00 00 mov eax, 16 - 00099 48 6b c0 03 imul rax, rax, 3 - 0009d 48 8b 8d 00 05 + 00095 b8 10 00 00 00 mov eax, 16 + 0009a 48 6b c0 03 imul rax, rax, 3 + 0009e 48 8b 8d 00 05 00 00 mov rcx, QWORD PTR matPtr$[rbp] - 000a4 48 03 c8 add rcx, rax - 000a7 48 8b c1 mov rax, rcx - 000aa 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 000ad 0f 29 85 a0 00 + 000a5 48 03 c8 add rcx, rax + 000a8 48 8b c1 mov rax, rcx + 000ab 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 000ae 0f 29 85 a0 00 00 00 movaps XMMWORD PTR mc3$[rbp], xmm0 ; 46 : ; 47 : __m128 cogeneration = _mm_set_ps( - 000b4 0f 28 85 a0 00 + 000b5 0f 28 85 a0 00 00 00 movaps xmm0, XMMWORD PTR mc3$[rbp] - 000bb 0f 29 85 10 03 + 000bc 0f 29 85 10 03 00 00 movaps XMMWORD PTR $T6[rbp], xmm0 - 000c2 0f 28 45 70 movaps xmm0, XMMWORD PTR mc2$[rbp] - 000c6 0f 29 85 e0 02 + 000c3 0f 28 45 70 movaps xmm0, XMMWORD PTR mc2$[rbp] + 000c7 0f 29 85 e0 02 00 00 movaps XMMWORD PTR $T5[rbp], xmm0 - 000cd 0f 28 45 40 movaps xmm0, XMMWORD PTR mc1$[rbp] - 000d1 0f 29 85 b0 02 + 000ce 0f 28 45 40 movaps xmm0, XMMWORD PTR mc1$[rbp] + 000d2 0f 29 85 b0 02 00 00 movaps XMMWORD PTR $T4[rbp], xmm0 - 000d8 4c 8d 85 10 03 + 000d9 4c 8d 85 10 03 00 00 lea r8, QWORD PTR $T6[rbp] - 000df 48 8d 95 e0 02 + 000e0 48 8d 95 e0 02 00 00 lea rdx, QWORD PTR $T5[rbp] - 000e6 48 8d 8d b0 02 + 000e7 48 8d 8d b0 02 00 00 lea rcx, QWORD PTR $T4[rbp] - 000ed e8 00 00 00 00 call det_mat3_internal - 000f2 f3 0f 11 85 d4 + 000ee e8 00 00 00 00 call det_mat3_internal + 000f3 f3 0f 11 85 d4 04 00 00 movss DWORD PTR tv85[rbp], xmm0 - 000fa 0f 28 8d a0 00 + 000fb 0f 28 8d a0 00 00 00 movaps xmm1, XMMWORD PTR mc3$[rbp] - 00101 0f 29 8d a0 03 + 00102 0f 29 8d a0 03 00 00 movaps XMMWORD PTR $T9[rbp], xmm1 - 00108 0f 28 4d 70 movaps xmm1, XMMWORD PTR mc2$[rbp] - 0010c 0f 29 8d 70 03 + 00109 0f 28 4d 70 movaps xmm1, XMMWORD PTR mc2$[rbp] + 0010d 0f 29 8d 70 03 00 00 movaps XMMWORD PTR $T8[rbp], xmm1 - 00113 0f 28 4d 10 movaps xmm1, XMMWORD PTR mc0$[rbp] - 00117 0f 29 8d 40 03 + 00114 0f 28 4d 10 movaps xmm1, XMMWORD PTR mc0$[rbp] + 00118 0f 29 8d 40 03 00 00 movaps XMMWORD PTR $T7[rbp], xmm1 - 0011e 4c 8d 85 a0 03 + 0011f 4c 8d 85 a0 03 00 00 lea r8, QWORD PTR $T9[rbp] - 00125 48 8d 95 70 03 + 00126 48 8d 95 70 03 00 00 lea rdx, QWORD PTR $T8[rbp] - 0012c 48 8d 8d 40 03 + 0012d 48 8d 8d 40 03 00 00 lea rcx, QWORD PTR $T7[rbp] - 00133 e8 00 00 00 00 call det_mat3_internal - 00138 f3 0f 11 85 d8 + 00134 e8 00 00 00 00 call det_mat3_internal + 00139 f3 0f 11 85 d8 04 00 00 movss DWORD PTR tv90[rbp], xmm0 - 00140 0f 28 8d a0 00 + 00141 0f 28 8d a0 00 00 00 movaps xmm1, XMMWORD PTR mc3$[rbp] - 00147 0f 29 8d 30 04 + 00148 0f 29 8d 30 04 00 00 movaps XMMWORD PTR $T12[rbp], xmm1 - 0014e 0f 28 4d 40 movaps xmm1, XMMWORD PTR mc1$[rbp] - 00152 0f 29 8d 00 04 + 0014f 0f 28 4d 40 movaps xmm1, XMMWORD PTR mc1$[rbp] + 00153 0f 29 8d 00 04 00 00 movaps XMMWORD PTR $T11[rbp], xmm1 - 00159 0f 28 4d 10 movaps xmm1, XMMWORD PTR mc0$[rbp] - 0015d 0f 29 8d d0 03 + 0015a 0f 28 4d 10 movaps xmm1, XMMWORD PTR mc0$[rbp] + 0015e 0f 29 8d d0 03 00 00 movaps XMMWORD PTR $T10[rbp], xmm1 - 00164 4c 8d 85 30 04 + 00165 4c 8d 85 30 04 00 00 lea r8, QWORD PTR $T12[rbp] - 0016b 48 8d 95 00 04 + 0016c 48 8d 95 00 04 00 00 lea rdx, QWORD PTR $T11[rbp] - 00172 48 8d 8d d0 03 + 00173 48 8d 8d d0 03 00 00 lea rcx, QWORD PTR $T10[rbp] - 00179 e8 00 00 00 00 call det_mat3_internal - 0017e f3 0f 11 85 dc + 0017a e8 00 00 00 00 call det_mat3_internal + 0017f f3 0f 11 85 dc 04 00 00 movss DWORD PTR tv95[rbp], xmm0 - 00186 0f 28 4d 70 movaps xmm1, XMMWORD PTR mc2$[rbp] - 0018a 0f 29 8d c0 04 + 00187 0f 28 4d 70 movaps xmm1, XMMWORD PTR mc2$[rbp] + 0018b 0f 29 8d c0 04 00 00 movaps XMMWORD PTR $T15[rbp], xmm1 - 00191 0f 28 4d 40 movaps xmm1, XMMWORD PTR mc1$[rbp] - 00195 0f 29 8d 90 04 + 00192 0f 28 4d 40 movaps xmm1, XMMWORD PTR mc1$[rbp] + 00196 0f 29 8d 90 04 00 00 movaps XMMWORD PTR $T14[rbp], xmm1 - 0019c 0f 28 4d 10 movaps xmm1, XMMWORD PTR mc0$[rbp] - 001a0 0f 29 8d 60 04 + 0019d 0f 28 4d 10 movaps xmm1, XMMWORD PTR mc0$[rbp] + 001a1 0f 29 8d 60 04 00 00 movaps XMMWORD PTR $T13[rbp], xmm1 - 001a7 4c 8d 85 c0 04 + 001a8 4c 8d 85 c0 04 00 00 lea r8, QWORD PTR $T15[rbp] - 001ae 48 8d 95 90 04 + 001af 48 8d 95 90 04 00 00 lea rdx, QWORD PTR $T14[rbp] - 001b5 48 8d 8d 60 04 + 001b6 48 8d 8d 60 04 00 00 lea rcx, QWORD PTR $T13[rbp] - 001bc e8 00 00 00 00 call det_mat3_internal - 001c1 f3 0f 10 8d dc + 001bd e8 00 00 00 00 call det_mat3_internal + 001c2 f3 0f 10 8d dc 04 00 00 movss xmm1, DWORD PTR tv95[rbp] - 001c9 f3 0f 10 95 d8 + 001ca f3 0f 10 95 d8 04 00 00 movss xmm2, DWORD PTR tv90[rbp] - 001d1 f3 0f 10 9d d4 + 001d2 f3 0f 10 9d d4 04 00 00 movss xmm3, DWORD PTR tv85[rbp] - 001d9 0f 14 c8 unpcklps xmm1, xmm0 - 001dc 0f 14 da unpcklps xmm3, xmm2 - 001df 0f 28 c3 movaps xmm0, xmm3 - 001e2 0f 16 c1 movlhps xmm0, xmm1 - 001e5 0f 29 85 d0 00 + 001da 0f 14 c8 unpcklps xmm1, xmm0 + 001dd 0f 14 da unpcklps xmm3, xmm2 + 001e0 0f 28 c3 movaps xmm0, xmm3 + 001e3 0f 16 c1 movlhps xmm0, xmm1 + 001e6 0f 29 85 d0 00 00 00 movaps XMMWORD PTR cogeneration$[rbp], xmm0 ; 48 : det_mat3_internal(mc0, mc1, mc2), @@ -626,60 +630,60 @@ $LN3: ; 52 : ); ; 53 : __m128 retvec = _mm_mul_ps(ALIGN(transpose->colum[3]), cogeneration); - 001ec b8 10 00 00 00 mov eax, 16 - 001f1 48 6b c0 03 imul rax, rax, 3 - 001f5 48 8b 8d 08 05 + 001ed b8 10 00 00 00 mov eax, 16 + 001f2 48 6b c0 03 imul rax, rax, 3 + 001f6 48 8b 8d 08 05 00 00 mov rcx, QWORD PTR transpose$[rbp] - 001fc 48 03 c8 add rcx, rax - 001ff 48 8b c1 mov rax, rcx - 00202 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 00205 0f 59 85 d0 00 + 001fd 48 03 c8 add rcx, rax + 00200 48 8b c1 mov rax, rcx + 00203 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 00206 0f 59 85 d0 00 00 00 mulps xmm0, XMMWORD PTR cogeneration$[rbp] - 0020c 0f 29 85 00 01 + 0020d 0f 29 85 00 01 00 00 movaps XMMWORD PTR retvec$[rbp], xmm0 ; 54 : retvec = _mm_hsub_ps(retvec, retvec); - 00213 0f 28 85 00 01 + 00214 0f 28 85 00 01 00 00 movaps xmm0, XMMWORD PTR retvec$[rbp] - 0021a f2 0f 7d 85 00 + 0021b f2 0f 7d 85 00 01 00 00 hsubps xmm0, XMMWORD PTR retvec$[rbp] - 00222 0f 29 85 00 01 + 00223 0f 29 85 00 01 00 00 movaps XMMWORD PTR retvec$[rbp], xmm0 ; 55 : retvec = _mm_hadd_ps(retvec, retvec); - 00229 0f 28 85 00 01 + 0022a 0f 28 85 00 01 00 00 movaps xmm0, XMMWORD PTR retvec$[rbp] - 00230 f2 0f 7c 85 00 + 00231 f2 0f 7c 85 00 01 00 00 haddps xmm0, XMMWORD PTR retvec$[rbp] - 00238 0f 29 85 00 01 + 00239 0f 29 85 00 01 00 00 movaps XMMWORD PTR retvec$[rbp], xmm0 ; 56 : return -retvec.m128_f32[0]; - 0023f b8 04 00 00 00 mov eax, 4 - 00244 48 6b c0 00 imul rax, rax, 0 - 00248 f3 0f 10 84 05 + 00240 b8 04 00 00 00 mov eax, 4 + 00245 48 6b c0 00 imul rax, rax, 0 + 00249 f3 0f 10 84 05 00 01 00 00 movss xmm0, DWORD PTR retvec$[rbp+rax] - 00251 0f 57 05 00 00 + 00252 0f 57 05 00 00 00 00 xorps xmm0, DWORD PTR __xmm@80000000800000008000000080000000 ; 57 : } - 00258 f3 0f 7f 44 24 + 00259 f3 0f 7f 44 24 20 movdqu XMMWORD PTR [rsp+32], xmm0 - 0025e 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 00262 48 8d 15 00 00 + 0025f 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 00263 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:det_mat4$rtcFrameData - 00269 e8 00 00 00 00 call _RTC_CheckStackVars - 0026e f3 0f 6f 44 24 + 0026a e8 00 00 00 00 call _RTC_CheckStackVars + 0026f f3 0f 6f 44 24 20 movdqu xmm0, XMMWORD PTR [rsp+32] - 00274 48 8d a5 e8 04 + 00275 48 8d a5 e8 04 00 00 lea rsp, QWORD PTR [rbp+1256] - 0027b 5f pop rdi - 0027c 5d pop rbp - 0027d c3 ret 0 + 0027c 5f pop rdi + 0027d 5d pop rbp + 0027e c3 ret 0 det_mat4 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -707,138 +711,139 @@ $LN3: 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__506864FF_mat4@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 17 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0)); - 00024 b8 10 00 00 00 mov eax, 16 - 00029 48 6b c0 01 imul rax, rax, 1 - 0002d 48 8b 8d a0 01 + 00025 b8 10 00 00 00 mov eax, 16 + 0002a 48 6b c0 01 imul rax, rax, 1 + 0002e 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00034 48 03 c8 add rcx, rax - 00037 48 8b c1 mov rax, rcx - 0003a 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0003d b8 10 00 00 00 mov eax, 16 - 00042 48 6b c0 00 imul rax, rax, 0 - 00046 48 8b 8d a0 01 + 00035 48 03 c8 add rcx, rax + 00038 48 8b c1 mov rax, rcx + 0003b 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0003e b8 10 00 00 00 mov eax, 16 + 00043 48 6b c0 00 imul rax, rax, 0 + 00047 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0004d 48 03 c8 add rcx, rax - 00050 48 8b c1 mov rax, rcx - 00053 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00056 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 0005a 0f 28 c1 movaps xmm0, xmm1 - 0005d 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 + 0004e 48 03 c8 add rcx, rax + 00051 48 8b c1 mov rax, rcx + 00054 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00057 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 0005b 0f 28 c1 movaps xmm0, xmm1 + 0005e 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 ; 18 : __m128 t1 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(3, 2, 3, 2)); - 00061 b8 10 00 00 00 mov eax, 16 - 00066 48 6b c0 01 imul rax, rax, 1 - 0006a 48 8b 8d a0 01 + 00062 b8 10 00 00 00 mov eax, 16 + 00067 48 6b c0 01 imul rax, rax, 1 + 0006b 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00071 48 03 c8 add rcx, rax - 00074 48 8b c1 mov rax, rcx - 00077 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0007a b8 10 00 00 00 mov eax, 16 - 0007f 48 6b c0 00 imul rax, rax, 0 - 00083 48 8b 8d a0 01 + 00072 48 03 c8 add rcx, rax + 00075 48 8b c1 mov rax, rcx + 00078 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0007b b8 10 00 00 00 mov eax, 16 + 00080 48 6b c0 00 imul rax, rax, 0 + 00084 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0008a 48 03 c8 add rcx, rax - 0008d 48 8b c1 mov rax, rcx - 00090 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00093 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH - 00097 0f 28 c1 movaps xmm0, xmm1 - 0009a 0f 29 45 40 movaps XMMWORD PTR t1$[rbp], xmm0 + 0008b 48 03 c8 add rcx, rax + 0008e 48 8b c1 mov rax, rcx + 00091 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00094 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH + 00098 0f 28 c1 movaps xmm0, xmm1 + 0009b 0f 29 45 40 movaps XMMWORD PTR t1$[rbp], xmm0 ; 19 : __m128 t2 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(1, 0, 1, 0)); - 0009e b8 10 00 00 00 mov eax, 16 - 000a3 48 6b c0 03 imul rax, rax, 3 - 000a7 48 8b 8d a0 01 + 0009f b8 10 00 00 00 mov eax, 16 + 000a4 48 6b c0 03 imul rax, rax, 3 + 000a8 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 000ae 48 03 c8 add rcx, rax - 000b1 48 8b c1 mov rax, rcx - 000b4 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 000b7 b8 10 00 00 00 mov eax, 16 - 000bc 48 6b c0 02 imul rax, rax, 2 - 000c0 48 8b 8d a0 01 + 000af 48 03 c8 add rcx, rax + 000b2 48 8b c1 mov rax, rcx + 000b5 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 000b8 b8 10 00 00 00 mov eax, 16 + 000bd 48 6b c0 02 imul rax, rax, 2 + 000c1 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 000c7 48 03 c8 add rcx, rax - 000ca 48 8b c1 mov rax, rcx - 000cd 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 000d0 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 000d4 0f 28 c1 movaps xmm0, xmm1 - 000d7 0f 29 45 70 movaps XMMWORD PTR t2$[rbp], xmm0 + 000c8 48 03 c8 add rcx, rax + 000cb 48 8b c1 mov rax, rcx + 000ce 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 000d1 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 000d5 0f 28 c1 movaps xmm0, xmm1 + 000d8 0f 29 45 70 movaps XMMWORD PTR t2$[rbp], xmm0 ; 20 : __m128 t3 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(3, 2, 3, 2)); - 000db b8 10 00 00 00 mov eax, 16 - 000e0 48 6b c0 03 imul rax, rax, 3 - 000e4 48 8b 8d a0 01 + 000dc b8 10 00 00 00 mov eax, 16 + 000e1 48 6b c0 03 imul rax, rax, 3 + 000e5 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 000eb 48 03 c8 add rcx, rax - 000ee 48 8b c1 mov rax, rcx - 000f1 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 000f4 b8 10 00 00 00 mov eax, 16 - 000f9 48 6b c0 02 imul rax, rax, 2 - 000fd 48 8b 8d a0 01 + 000ec 48 03 c8 add rcx, rax + 000ef 48 8b c1 mov rax, rcx + 000f2 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 000f5 b8 10 00 00 00 mov eax, 16 + 000fa 48 6b c0 02 imul rax, rax, 2 + 000fe 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00104 48 03 c8 add rcx, rax - 00107 48 8b c1 mov rax, rcx - 0010a 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 0010d 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH - 00111 0f 28 c1 movaps xmm0, xmm1 - 00114 0f 29 85 a0 00 + 00105 48 03 c8 add rcx, rax + 00108 48 8b c1 mov rax, rcx + 0010b 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 0010e 0f c6 c8 ee shufps xmm1, xmm0, 238 ; 000000eeH + 00112 0f 28 c1 movaps xmm0, xmm1 + 00115 0f 29 85 a0 00 00 00 movaps XMMWORD PTR t3$[rbp], xmm0 ; 21 : ; 22 : target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0)); - 0011b 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] - 0011f 0f c6 45 70 88 shufps xmm0, XMMWORD PTR t2$[rbp], 136 ; 00000088H - 00124 b8 10 00 00 00 mov eax, 16 - 00129 48 6b c0 00 imul rax, rax, 0 - 0012d 48 8b 8d a8 01 + 0011c 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] + 00120 0f c6 45 70 88 shufps xmm0, XMMWORD PTR t2$[rbp], 136 ; 00000088H + 00125 b8 10 00 00 00 mov eax, 16 + 0012a 48 6b c0 00 imul rax, rax, 0 + 0012e 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00134 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00135 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 23 : target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1)); - 00138 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] - 0013c 0f c6 45 70 dd shufps xmm0, XMMWORD PTR t2$[rbp], 221 ; 000000ddH - 00141 b8 10 00 00 00 mov eax, 16 - 00146 48 6b c0 01 imul rax, rax, 1 - 0014a 48 8b 8d a8 01 + 00139 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] + 0013d 0f c6 45 70 dd shufps xmm0, XMMWORD PTR t2$[rbp], 221 ; 000000ddH + 00142 b8 10 00 00 00 mov eax, 16 + 00147 48 6b c0 01 imul rax, rax, 1 + 0014b 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00151 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00152 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 24 : target->colum[2] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(2, 0, 2, 0)); - 00155 0f 28 45 40 movaps xmm0, XMMWORD PTR t1$[rbp] - 00159 0f c6 85 a0 00 + 00156 0f 28 45 40 movaps xmm0, XMMWORD PTR t1$[rbp] + 0015a 0f c6 85 a0 00 00 00 88 shufps xmm0, XMMWORD PTR t3$[rbp], 136 ; 00000088H - 00161 b8 10 00 00 00 mov eax, 16 - 00166 48 6b c0 02 imul rax, rax, 2 - 0016a 48 8b 8d a8 01 + 00162 b8 10 00 00 00 mov eax, 16 + 00167 48 6b c0 02 imul rax, rax, 2 + 0016b 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00171 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00172 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 25 : target->colum[3] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(3, 1, 3, 1)); - 00175 0f 28 45 40 movaps xmm0, XMMWORD PTR t1$[rbp] - 00179 0f c6 85 a0 00 + 00176 0f 28 45 40 movaps xmm0, XMMWORD PTR t1$[rbp] + 0017a 0f c6 85 a0 00 00 00 dd shufps xmm0, XMMWORD PTR t3$[rbp], 221 ; 000000ddH - 00181 b8 10 00 00 00 mov eax, 16 - 00186 48 6b c0 03 imul rax, rax, 3 - 0018a 48 8b 8d a8 01 + 00182 b8 10 00 00 00 mov eax, 16 + 00187 48 6b c0 03 imul rax, rax, 3 + 0018b 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR target$[rbp] - 00191 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 00192 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 26 : } - 00195 48 8d a5 88 01 + 00196 48 8d a5 88 01 00 00 lea rsp, QWORD PTR [rbp+392] - 0019c 5f pop rdi - 0019d 5d pop rbp - 0019e c3 ret 0 + 0019d 5f pop rdi + 0019e 5d pop rbp + 0019f c3 ret 0 transpose4to4 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -864,75 +869,76 @@ $LN3: 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__506864FF_mat4@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 8 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0)); - 00024 b8 10 00 00 00 mov eax, 16 - 00029 48 6b c0 01 imul rax, rax, 1 - 0002d 48 8b 8d 40 01 + 00025 b8 10 00 00 00 mov eax, 16 + 0002a 48 6b c0 01 imul rax, rax, 1 + 0002e 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00034 48 03 c8 add rcx, rax - 00037 48 8b c1 mov rax, rcx - 0003a 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0003d b8 10 00 00 00 mov eax, 16 - 00042 48 6b c0 00 imul rax, rax, 0 - 00046 48 8b 8d 40 01 + 00035 48 03 c8 add rcx, rax + 00038 48 8b c1 mov rax, rcx + 0003b 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0003e b8 10 00 00 00 mov eax, 16 + 00043 48 6b c0 00 imul rax, rax, 0 + 00047 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0004d 48 03 c8 add rcx, rax - 00050 48 8b c1 mov rax, rcx - 00053 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00056 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 0005a 0f 28 c1 movaps xmm0, xmm1 - 0005d 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 + 0004e 48 03 c8 add rcx, rax + 00051 48 8b c1 mov rax, rcx + 00054 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00057 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 0005b 0f 28 c1 movaps xmm0, xmm1 + 0005e 0f 29 45 10 movaps XMMWORD PTR t0$[rbp], xmm0 ; 9 : __m128 t2 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(1, 0, 1, 0)); - 00061 b8 10 00 00 00 mov eax, 16 - 00066 48 6b c0 03 imul rax, rax, 3 - 0006a 48 8b 8d 40 01 + 00062 b8 10 00 00 00 mov eax, 16 + 00067 48 6b c0 03 imul rax, rax, 3 + 0006b 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 00071 48 03 c8 add rcx, rax - 00074 48 8b c1 mov rax, rcx - 00077 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0007a b8 10 00 00 00 mov eax, 16 - 0007f 48 6b c0 02 imul rax, rax, 2 - 00083 48 8b 8d 40 01 + 00072 48 03 c8 add rcx, rax + 00075 48 8b c1 mov rax, rcx + 00078 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0007b b8 10 00 00 00 mov eax, 16 + 00080 48 6b c0 02 imul rax, rax, 2 + 00084 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR source$[rbp] - 0008a 48 03 c8 add rcx, rax - 0008d 48 8b c1 mov rax, rcx - 00090 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 00093 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 00097 0f 28 c1 movaps xmm0, xmm1 - 0009a 0f 29 45 40 movaps XMMWORD PTR t2$[rbp], xmm0 + 0008b 48 03 c8 add rcx, rax + 0008e 48 8b c1 mov rax, rcx + 00091 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 00094 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H + 00098 0f 28 c1 movaps xmm0, xmm1 + 0009b 0f 29 45 40 movaps XMMWORD PTR t2$[rbp], xmm0 ; 10 : ; 11 : target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0)); - 0009e 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] - 000a2 0f c6 45 40 88 shufps xmm0, XMMWORD PTR t2$[rbp], 136 ; 00000088H - 000a7 b8 10 00 00 00 mov eax, 16 - 000ac 48 6b c0 00 imul rax, rax, 0 - 000b0 48 8b 8d 48 01 + 0009f 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] + 000a3 0f c6 45 40 88 shufps xmm0, XMMWORD PTR t2$[rbp], 136 ; 00000088H + 000a8 b8 10 00 00 00 mov eax, 16 + 000ad 48 6b c0 00 imul rax, rax, 0 + 000b1 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR target$[rbp] - 000b7 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 000b8 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 12 : target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1)); - 000bb 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] - 000bf 0f c6 45 40 dd shufps xmm0, XMMWORD PTR t2$[rbp], 221 ; 000000ddH - 000c4 b8 10 00 00 00 mov eax, 16 - 000c9 48 6b c0 01 imul rax, rax, 1 - 000cd 48 8b 8d 48 01 + 000bc 0f 28 45 10 movaps xmm0, XMMWORD PTR t0$[rbp] + 000c0 0f c6 45 40 dd shufps xmm0, XMMWORD PTR t2$[rbp], 221 ; 000000ddH + 000c5 b8 10 00 00 00 mov eax, 16 + 000ca 48 6b c0 01 imul rax, rax, 1 + 000ce 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR target$[rbp] - 000d4 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 + 000d5 0f 11 04 01 movups XMMWORD PTR [rcx+rax], xmm0 ; 13 : } - 000d8 48 8d a5 28 01 + 000d9 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 000df 5f pop rdi - 000e0 5d pop rbp - 000e1 c3 ret 0 + 000e0 5f pop rdi + 000e1 5d pop rbp + 000e2 c3 ret 0 transpose4to2 ENDP _TEXT ENDS END diff --git a/源代码/StgSharpC/x64/Debug/mat4.nativecodeanalysis.xml b/源代码/StgSharpC/x64/Debug/mat4.nativecodeanalysis.xml deleted file mode 100644 index dcdf0885..00000000 --- a/源代码/StgSharpC/x64/Debug/mat4.nativecodeanalysis.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/源代码/StgSharpC/x64/Debug/mat4.obj b/源代码/StgSharpC/x64/Debug/mat4.obj index 536d7225..3b23809c 100644 Binary files a/源代码/StgSharpC/x64/Debug/mat4.obj and b/源代码/StgSharpC/x64/Debug/mat4.obj differ diff --git a/源代码/StgSharpC/x64/Debug/mat4.sbr b/源代码/StgSharpC/x64/Debug/mat4.sbr index 8c7409bb..91354590 100644 Binary files a/源代码/StgSharpC/x64/Debug/mat4.sbr and b/源代码/StgSharpC/x64/Debug/mat4.sbr differ diff --git a/源代码/StgSharpC/x64/Debug/stb_image.cod b/源代码/StgSharpC/x64/Debug/stb_image.cod index 3535a7f8..52554603 100644 --- a/源代码/StgSharpC/x64/Debug/stb_image.cod +++ b/源代码/StgSharpC/x64/Debug/stb_image.cod @@ -1,4 +1,4 @@ -; Listing generated by Microsoft (R) Optimizing Compiler Version 19.39.33523.0 +; Listing generated by Microsoft (R) Optimizing Compiler Version 19.41.34120.0 include listing.inc @@ -6,10 +6,10 @@ INCLUDELIB MSVCRTD INCLUDELIB OLDNAMES msvcjmc SEGMENT -__4B783B3C_concurrencysal@h DB 01H -__137BB1BE_sal@h DB 01H -__805F4069_vadefs@h DB 01H -__1EAACA9B_vcruntime@h DB 01H +__DDA0A690_concurrencysal@h DB 01H +__9ECC08BE_sal@h DB 01H +__E05D733A_vadefs@h DB 01H +__6A355E0E_vcruntime@h DB 01H __1B0272D9_corecrt@h DB 01H __44420885_corecrt_stdio_config@h DB 01H __AB601D8D_corecrt_wstdio@h DB 01H @@ -18,12 +18,12 @@ __45DED006_corecrt_malloc@h DB 01H __13F5961F_stddef@h DB 01H __FD6DBD68_corecrt_search@h DB 01H __E2E33A61_corecrt_wstdlib@h DB 01H -__46240030_limits@h DB 01H +__26263363_limits@h DB 01H __6E5ACABA_stdlib@h DB 01H __5274102E_stb_image@h DB 01H -__CC8D90C0_stdarg@h DB 01H +__AC8FA393_stdarg@h DB 01H __61CC25A1_errno@h DB 01H -__0504B279_vcruntime_string@h DB 01H +__890838BD_vcruntime_string@h DB 01H __E4C945B4_corecrt_memcpy_s@h DB 01H __8EAFF484_corecrt_memory@h DB 01H __6490AEC5_corecrt_wstring@h DB 01H @@ -31,21 +31,21 @@ __E8295E1E_string@h DB 01H __BB16330F_corecrt_math@h DB 01H __3BF2A406_math@h DB 01H __19139D6C_assert@h DB 01H -__5BC5AF51_mmintrin@h DB 01H +__7583A0D2_mmintrin@h DB 01H __FA77ED4C_malloc@h DB 01H -__9E7FA6CF_xmmintrin@h DB 01H -__FB1D2F03_emmintrin@h DB 01H -__49ADACC4_intrin0@inl@h DB 01H -__6831C60C_setjmp@h DB 01H -__24BC478A_pmmintrin@h DB 01H -__94653408_tmmintrin@h DB 01H -__BD5E218B_smmintrin@h DB 01H -__D83CA847_nmmintrin@h DB 01H -__0D875209_wmmintrin@h DB 01H -__C6131F0E_zmmintrin@h DB 01H -__F107BDC4_immintrin@h DB 01H -__4BC45C81_ammintrin@h DB 01H -__4E077A7B_intrin@h DB 01H +__EAE0325A_xmmintrin@h DB 01H +__8F82BB96_emmintrin@h DB 01H +__B2F9F159_intrin0@inl@h DB 01H +__0833F55F_setjmp@h DB 01H +__5023D31F_pmmintrin@h DB 01H +__E0FAA09D_tmmintrin@h DB 01H +__C9C1B51E_smmintrin@h DB 01H +__ACA33CD2_nmmintrin@h DB 01H +__7918C69C_wmmintrin@h DB 01H +__B28C8B9B_zmmintrin@h DB 01H +__85982951_immintrin@h DB 01H +__3F5BC814_ammintrin@h DB 01H +__2E054928_intrin@h DB 01H __C5A6C9A6_stb_image@c DB 01H msvcjmc ENDS CONST SEGMENT @@ -915,1309 +915,1309 @@ _TLS ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_load_from_memory DD imagerel $LN3 - DD imagerel $LN3+197 + DD imagerel $LN3+199 DD imagerel $unwind$stbi_load_from_memory pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_load_from_callbacks DD imagerel $LN3 - DD imagerel $LN3+198 + DD imagerel $LN3+200 DD imagerel $unwind$stbi_load_from_callbacks pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_load DD imagerel $LN6 - DD imagerel $LN6+193 + DD imagerel $LN6+195 DD imagerel $unwind$stbi_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_load_to_target DD imagerel $LN4 - DD imagerel $LN4+158 + DD imagerel $LN4+160 DD imagerel $unwind$stbi_load_to_target pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_load_from_file DD imagerel $LN4 - DD imagerel $LN4+249 + DD imagerel $LN4+252 DD imagerel $unwind$stbi_load_from_file pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_load_gif_from_memory DD imagerel $LN6 - DD imagerel $LN6+370 + DD imagerel $LN6+373 DD imagerel $unwind$stbi_load_gif_from_memory pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_load_16_from_memory DD imagerel $LN3 - DD imagerel $LN3+197 + DD imagerel $LN3+199 DD imagerel $unwind$stbi_load_16_from_memory pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_load_16_from_callbacks DD imagerel $LN3 - DD imagerel $LN3+198 + DD imagerel $LN3+200 DD imagerel $unwind$stbi_load_16_from_callbacks pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_load_16 DD imagerel $LN6 - DD imagerel $LN6+193 + DD imagerel $LN6+195 DD imagerel $unwind$stbi_load_16 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_load_from_file_16 DD imagerel $LN4 - DD imagerel $LN4+249 + DD imagerel $LN4+252 DD imagerel $unwind$stbi_load_from_file_16 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_loadf_from_memory DD imagerel $LN3 - DD imagerel $LN3+197 + DD imagerel $LN3+199 DD imagerel $unwind$stbi_loadf_from_memory pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_loadf_from_callbacks DD imagerel $LN3 - DD imagerel $LN3+198 + DD imagerel $LN3+200 DD imagerel $unwind$stbi_loadf_from_callbacks pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_loadf DD imagerel $LN6 - DD imagerel $LN6+193 + DD imagerel $LN6+195 DD imagerel $unwind$stbi_loadf pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_loadf_from_file DD imagerel $LN3 - DD imagerel $LN3+191 + DD imagerel $LN3+193 DD imagerel $unwind$stbi_loadf_from_file pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_hdr_to_ldr_gamma DD imagerel $LN3 - DD imagerel $LN3+66 + DD imagerel $LN3+67 DD imagerel $unwind$stbi_hdr_to_ldr_gamma pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_hdr_to_ldr_scale DD imagerel $LN3 - DD imagerel $LN3+66 + DD imagerel $LN3+67 DD imagerel $unwind$stbi_hdr_to_ldr_scale pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_ldr_to_hdr_gamma DD imagerel $LN3 - DD imagerel $LN3+58 + DD imagerel $LN3+59 DD imagerel $unwind$stbi_ldr_to_hdr_gamma pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_ldr_to_hdr_scale DD imagerel $LN3 - DD imagerel $LN3+58 + DD imagerel $LN3+59 DD imagerel $unwind$stbi_ldr_to_hdr_scale pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_is_hdr_from_callbacks DD imagerel $LN3 - DD imagerel $LN3+157 + DD imagerel $LN3+159 DD imagerel $unwind$stbi_is_hdr_from_callbacks pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_is_hdr_from_memory DD imagerel $LN3 - DD imagerel $LN3+156 + DD imagerel $LN3+158 DD imagerel $unwind$stbi_is_hdr_from_memory pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_is_hdr DD imagerel $LN4 - DD imagerel $LN4+103 + DD imagerel $LN4+105 DD imagerel $unwind$stbi_is_hdr pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_is_hdr_from_file DD imagerel $LN3 - DD imagerel $LN3+184 + DD imagerel $LN3+187 DD imagerel $unwind$stbi_is_hdr_from_file pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_failure_reason DD imagerel $LN3 - DD imagerel $LN3+67 + DD imagerel $LN3+68 DD imagerel $unwind$stbi_failure_reason pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_image_free DD imagerel $LN3 - DD imagerel $LN3+54 + DD imagerel $LN3+56 DD imagerel $unwind$stbi_image_free pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_info_from_memory DD imagerel $LN3 - DD imagerel $LN3+187 + DD imagerel $LN3+189 DD imagerel $unwind$stbi_info_from_memory pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_info_from_callbacks DD imagerel $LN3 - DD imagerel $LN3+188 + DD imagerel $LN3+190 DD imagerel $unwind$stbi_info_from_callbacks pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_is_16_bit_from_memory DD imagerel $LN3 - DD imagerel $LN3+156 + DD imagerel $LN3+158 DD imagerel $unwind$stbi_is_16_bit_from_memory pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_is_16_bit_from_callbacks DD imagerel $LN3 - DD imagerel $LN3+157 + DD imagerel $LN3+159 DD imagerel $unwind$stbi_is_16_bit_from_callbacks pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_info DD imagerel $LN4 - DD imagerel $LN4+146 + DD imagerel $LN4+148 DD imagerel $unwind$stbi_info pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_info_from_file DD imagerel $LN3 - DD imagerel $LN3+226 + DD imagerel $LN3+229 DD imagerel $unwind$stbi_info_from_file pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_is_16_bit DD imagerel $LN4 - DD imagerel $LN4+110 + DD imagerel $LN4+112 DD imagerel $unwind$stbi_is_16_bit pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_is_16_bit_from_file DD imagerel $LN3 - DD imagerel $LN3+190 + DD imagerel $LN3+193 DD imagerel $unwind$stbi_is_16_bit_from_file pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_set_unpremultiply_on_load DD imagerel $LN3 - DD imagerel $LN3+52 + DD imagerel $LN3+53 DD imagerel $unwind$stbi_set_unpremultiply_on_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_convert_iphone_png_to_rgb DD imagerel $LN3 - DD imagerel $LN3+52 + DD imagerel $LN3+53 DD imagerel $unwind$stbi_convert_iphone_png_to_rgb pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_set_flip_vertically_on_load DD imagerel $LN3 - DD imagerel $LN3+52 + DD imagerel $LN3+53 DD imagerel $unwind$stbi_set_flip_vertically_on_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_set_unpremultiply_on_load_thread DD imagerel $LN3 - DD imagerel $LN3+108 + DD imagerel $LN3+109 DD imagerel $unwind$stbi_set_unpremultiply_on_load_thread pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_convert_iphone_png_to_rgb_thread DD imagerel $LN3 - DD imagerel $LN3+108 + DD imagerel $LN3+109 DD imagerel $unwind$stbi_convert_iphone_png_to_rgb_thread pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_set_flip_vertically_on_load_thread DD imagerel $LN3 - DD imagerel $LN3+108 + DD imagerel $LN3+109 DD imagerel $unwind$stbi_set_flip_vertically_on_load_thread pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_zlib_decode_malloc_guesssize DD imagerel $LN7 - DD imagerel $LN7+308 + DD imagerel $LN7+310 DD imagerel $unwind$stbi_zlib_decode_malloc_guesssize pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_zlib_decode_malloc_guesssize_headerflag DD imagerel $LN7 - DD imagerel $LN7+310 + DD imagerel $LN7+312 DD imagerel $unwind$stbi_zlib_decode_malloc_guesssize_headerflag pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_zlib_decode_malloc DD imagerel $LN3 - DD imagerel $LN3+81 + DD imagerel $LN3+82 DD imagerel $unwind$stbi_zlib_decode_malloc pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_zlib_decode_buffer DD imagerel $LN5 - DD imagerel $LN5+236 + DD imagerel $LN5+237 DD imagerel $unwind$stbi_zlib_decode_buffer pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_zlib_decode_noheader_malloc DD imagerel $LN7 - DD imagerel $LN7+297 + DD imagerel $LN7+299 DD imagerel $unwind$stbi_zlib_decode_noheader_malloc pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi_zlib_decode_noheader_buffer DD imagerel $LN5 - DD imagerel $LN5+236 + DD imagerel $LN5+237 DD imagerel $unwind$stbi_zlib_decode_noheader_buffer pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__cpuid3 DD imagerel stbi__cpuid3 - DD imagerel stbi__cpuid3+149 + DD imagerel stbi__cpuid3+150 DD imagerel $unwind$stbi__cpuid3 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__sse2_available DD imagerel stbi__sse2_available - DD imagerel stbi__sse2_available+86 + DD imagerel stbi__sse2_available+87 DD imagerel $unwind$stbi__sse2_available pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__refill_buffer DD imagerel stbi__refill_buffer - DD imagerel stbi__refill_buffer+291 + DD imagerel stbi__refill_buffer+292 DD imagerel $unwind$stbi__refill_buffer pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__start_mem DD imagerel stbi__start_mem - DD imagerel stbi__start_mem+205 + DD imagerel stbi__start_mem+206 DD imagerel $unwind$stbi__start_mem pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__start_callbacks DD imagerel stbi__start_callbacks - DD imagerel stbi__start_callbacks+241 + DD imagerel stbi__start_callbacks+243 DD imagerel $unwind$stbi__start_callbacks pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__stdio_read DD imagerel stbi__stdio_read - DD imagerel stbi__stdio_read+86 + DD imagerel stbi__stdio_read+87 DD imagerel $unwind$stbi__stdio_read pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__stdio_skip DD imagerel stbi__stdio_skip - DD imagerel stbi__stdio_skip+108 + DD imagerel stbi__stdio_skip+111 DD imagerel $unwind$stbi__stdio_skip pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__stdio_eof DD imagerel stbi__stdio_eof - DD imagerel stbi__stdio_eof+103 + DD imagerel stbi__stdio_eof+104 DD imagerel $unwind$stbi__stdio_eof pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__start_file DD imagerel stbi__start_file - DD imagerel stbi__start_file+72 + DD imagerel stbi__start_file+74 DD imagerel $unwind$stbi__start_file pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__rewind DD imagerel stbi__rewind - DD imagerel stbi__rewind+97 + DD imagerel stbi__rewind+98 DD imagerel $unwind$stbi__rewind pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_test DD imagerel stbi__jpeg_test - DD imagerel stbi__jpeg_test+158 + DD imagerel stbi__jpeg_test+163 DD imagerel $unwind$stbi__jpeg_test pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_load DD imagerel stbi__jpeg_load - DD imagerel stbi__jpeg_load+224 + DD imagerel stbi__jpeg_load+228 DD imagerel $unwind$stbi__jpeg_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_info DD imagerel stbi__jpeg_info - DD imagerel stbi__jpeg_info+168 + DD imagerel stbi__jpeg_info+171 DD imagerel $unwind$stbi__jpeg_info pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__png_test DD imagerel stbi__png_test - DD imagerel stbi__png_test+71 + DD imagerel stbi__png_test+73 DD imagerel $unwind$stbi__png_test pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__png_load DD imagerel stbi__png_load - DD imagerel stbi__png_load+198 + DD imagerel stbi__png_load+199 DD imagerel $unwind$stbi__png_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__png_info DD imagerel stbi__png_info - DD imagerel stbi__png_info+176 + DD imagerel stbi__png_info+177 DD imagerel $unwind$stbi__png_info pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__png_is16 DD imagerel stbi__png_is16 - DD imagerel stbi__png_is16+180 + DD imagerel stbi__png_is16+182 DD imagerel $unwind$stbi__png_is16 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__bmp_test DD imagerel stbi__bmp_test - DD imagerel stbi__bmp_test+71 + DD imagerel stbi__bmp_test+73 DD imagerel $unwind$stbi__bmp_test pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__bmp_load DD imagerel stbi__bmp_load - DD imagerel stbi__bmp_load+4917 + DD imagerel stbi__bmp_load+4929 DD imagerel $unwind$stbi__bmp_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__bmp_info DD imagerel stbi__bmp_info - DD imagerel stbi__bmp_info+333 + DD imagerel stbi__bmp_info+335 DD imagerel $unwind$stbi__bmp_info pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__tga_test DD imagerel stbi__tga_test - DD imagerel stbi__tga_test+395 + DD imagerel stbi__tga_test+401 DD imagerel $unwind$stbi__tga_test pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__tga_load DD imagerel stbi__tga_load - DD imagerel stbi__tga_load+3001 + DD imagerel stbi__tga_load+3012 DD imagerel $unwind$stbi__tga_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__tga_info DD imagerel stbi__tga_info - DD imagerel stbi__tga_info+712 + DD imagerel stbi__tga_info+726 DD imagerel $unwind$stbi__tga_info pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__psd_test DD imagerel stbi__psd_test - DD imagerel stbi__psd_test+106 + DD imagerel stbi__psd_test+108 DD imagerel $unwind$stbi__psd_test pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__psd_load DD imagerel stbi__psd_load - DD imagerel stbi__psd_load+3120 + DD imagerel stbi__psd_load+3127 DD imagerel $unwind$stbi__psd_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__psd_info DD imagerel stbi__psd_info - DD imagerel stbi__psd_info+471 + DD imagerel stbi__psd_info+478 DD imagerel $unwind$stbi__psd_info pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__psd_is16 DD imagerel stbi__psd_is16 - DD imagerel stbi__psd_is16+238 + DD imagerel stbi__psd_is16+249 DD imagerel $unwind$stbi__psd_is16 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__hdr_test DD imagerel stbi__hdr_test - DD imagerel stbi__hdr_test+118 + DD imagerel stbi__hdr_test+121 DD imagerel $unwind$stbi__hdr_test pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__hdr_load DD imagerel stbi__hdr_load - DD imagerel stbi__hdr_load+2640 + DD imagerel stbi__hdr_load+2654 DD imagerel $unwind$stbi__hdr_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__hdr_info DD imagerel stbi__hdr_info - DD imagerel stbi__hdr_info+635 + DD imagerel stbi__hdr_info+640 DD imagerel $unwind$stbi__hdr_info pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pic_test DD imagerel stbi__pic_test - DD imagerel stbi__pic_test+71 + DD imagerel stbi__pic_test+73 DD imagerel $unwind$stbi__pic_test pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pic_load DD imagerel stbi__pic_load - DD imagerel stbi__pic_load+786 + DD imagerel stbi__pic_load+793 DD imagerel $unwind$stbi__pic_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pic_info DD imagerel stbi__pic_info - DD imagerel stbi__pic_info+699 + DD imagerel stbi__pic_info+707 DD imagerel $unwind$stbi__pic_info pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__gif_test DD imagerel stbi__gif_test - DD imagerel stbi__gif_test+71 + DD imagerel stbi__gif_test+73 DD imagerel $unwind$stbi__gif_test pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__gif_load DD imagerel stbi__gif_load - DD imagerel stbi__gif_load+358 + DD imagerel stbi__gif_load+363 DD imagerel $unwind$stbi__gif_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__load_gif_main DD imagerel stbi__load_gif_main - DD imagerel stbi__load_gif_main+1124 + DD imagerel stbi__load_gif_main+1131 DD imagerel $unwind$stbi__load_gif_main pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__gif_info DD imagerel stbi__gif_info - DD imagerel stbi__gif_info+89 + DD imagerel stbi__gif_info+90 DD imagerel $unwind$stbi__gif_info pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pnm_test DD imagerel stbi__pnm_test - DD imagerel stbi__pnm_test+119 + DD imagerel stbi__pnm_test+121 DD imagerel $unwind$stbi__pnm_test pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pnm_load DD imagerel stbi__pnm_load - DD imagerel stbi__pnm_load+904 + DD imagerel stbi__pnm_load+906 DD imagerel $unwind$stbi__pnm_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pnm_info DD imagerel stbi__pnm_info - DD imagerel stbi__pnm_info+579 + DD imagerel stbi__pnm_info+585 DD imagerel $unwind$stbi__pnm_info pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pnm_is16 DD imagerel stbi__pnm_is16 - DD imagerel stbi__pnm_is16+75 + DD imagerel stbi__pnm_is16+76 DD imagerel $unwind$stbi__pnm_is16 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__err DD imagerel stbi__err - DD imagerel stbi__err+80 + DD imagerel stbi__err+81 DD imagerel $unwind$stbi__err pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__malloc DD imagerel stbi__malloc - DD imagerel stbi__malloc+54 + DD imagerel stbi__malloc+55 DD imagerel $unwind$stbi__malloc pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__addsizes_valid DD imagerel stbi__addsizes_valid - DD imagerel stbi__addsizes_valid+104 + DD imagerel stbi__addsizes_valid+105 DD imagerel $unwind$stbi__addsizes_valid pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__mul2sizes_valid DD imagerel stbi__mul2sizes_valid - DD imagerel stbi__mul2sizes_valid+130 + DD imagerel stbi__mul2sizes_valid+131 DD imagerel $unwind$stbi__mul2sizes_valid pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__mad2sizes_valid DD imagerel stbi__mad2sizes_valid - DD imagerel stbi__mad2sizes_valid+128 + DD imagerel stbi__mad2sizes_valid+129 DD imagerel $unwind$stbi__mad2sizes_valid pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__mad3sizes_valid DD imagerel stbi__mad3sizes_valid - DD imagerel stbi__mad3sizes_valid+170 + DD imagerel stbi__mad3sizes_valid+171 DD imagerel $unwind$stbi__mad3sizes_valid pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__mad4sizes_valid DD imagerel stbi__mad4sizes_valid - DD imagerel stbi__mad4sizes_valid+214 + DD imagerel stbi__mad4sizes_valid+215 DD imagerel $unwind$stbi__mad4sizes_valid pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__malloc_mad2 DD imagerel stbi__malloc_mad2 - DD imagerel stbi__malloc_mad2+110 + DD imagerel stbi__malloc_mad2+111 DD imagerel $unwind$stbi__malloc_mad2 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__malloc_mad3 DD imagerel stbi__malloc_mad3 - DD imagerel stbi__malloc_mad3+129 + DD imagerel stbi__malloc_mad3+130 DD imagerel $unwind$stbi__malloc_mad3 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__malloc_mad4 DD imagerel stbi__malloc_mad4 - DD imagerel stbi__malloc_mad4+146 + DD imagerel stbi__malloc_mad4+147 DD imagerel $unwind$stbi__malloc_mad4 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__addints_valid DD imagerel stbi__addints_valid - DD imagerel stbi__addints_valid+241 + DD imagerel stbi__addints_valid+242 DD imagerel $unwind$stbi__addints_valid pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__mul2shorts_valid DD imagerel stbi__mul2shorts_valid - DD imagerel stbi__mul2shorts_valid+375 + DD imagerel stbi__mul2shorts_valid+376 DD imagerel $unwind$stbi__mul2shorts_valid pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__ldr_to_hdr DD imagerel stbi__ldr_to_hdr - DD imagerel stbi__ldr_to_hdr+536 + DD imagerel stbi__ldr_to_hdr+539 DD imagerel $unwind$stbi__ldr_to_hdr pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__hdr_to_ldr DD imagerel stbi__hdr_to_ldr - DD imagerel stbi__hdr_to_ldr+644 + DD imagerel stbi__hdr_to_ldr+647 DD imagerel $unwind$stbi__hdr_to_ldr pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__load_main DD imagerel stbi__load_main - DD imagerel stbi__load_main+933 + DD imagerel stbi__load_main+935 DD imagerel $unwind$stbi__load_main pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__convert_16_to_8 DD imagerel stbi__convert_16_to_8 - DD imagerel stbi__convert_16_to_8+228 + DD imagerel stbi__convert_16_to_8+230 DD imagerel $unwind$stbi__convert_16_to_8 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__convert_8_to_16 DD imagerel stbi__convert_8_to_16 - DD imagerel stbi__convert_8_to_16+244 + DD imagerel stbi__convert_8_to_16+246 DD imagerel $unwind$stbi__convert_8_to_16 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__vertical_flip DD imagerel stbi__vertical_flip - DD imagerel stbi__vertical_flip+511 + DD imagerel stbi__vertical_flip+515 DD imagerel $unwind$stbi__vertical_flip pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__vertical_flip_slices DD imagerel stbi__vertical_flip_slices - DD imagerel stbi__vertical_flip_slices+166 + DD imagerel stbi__vertical_flip_slices+168 DD imagerel $unwind$stbi__vertical_flip_slices pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__load_and_postprocess_8bit DD imagerel stbi__load_and_postprocess_8bit - DD imagerel stbi__load_and_postprocess_8bit+516 + DD imagerel stbi__load_and_postprocess_8bit+518 DD imagerel $unwind$stbi__load_and_postprocess_8bit pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__load_and_postprocess_16bit DD imagerel stbi__load_and_postprocess_16bit - DD imagerel stbi__load_and_postprocess_16bit+522 + DD imagerel stbi__load_and_postprocess_16bit+524 DD imagerel $unwind$stbi__load_and_postprocess_16bit pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__float_postprocess DD imagerel stbi__float_postprocess - DD imagerel stbi__float_postprocess+245 + DD imagerel stbi__float_postprocess+247 DD imagerel $unwind$stbi__float_postprocess pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__fopen DD imagerel stbi__fopen - DD imagerel stbi__fopen+165 + DD imagerel stbi__fopen+166 DD imagerel $unwind$stbi__fopen pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__loadf_main DD imagerel stbi__loadf_main - DD imagerel stbi__loadf_main+439 + DD imagerel stbi__loadf_main+441 DD imagerel $unwind$stbi__loadf_main pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__get8 DD imagerel stbi__get8 - DD imagerel stbi__get8+224 + DD imagerel stbi__get8+226 DD imagerel $unwind$stbi__get8 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__at_eof DD imagerel stbi__at_eof - DD imagerel stbi__at_eof+162 + DD imagerel stbi__at_eof+163 DD imagerel $unwind$stbi__at_eof pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__skip DD imagerel stbi__skip - DD imagerel stbi__skip+261 + DD imagerel stbi__skip+263 DD imagerel $unwind$stbi__skip pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__getn DD imagerel stbi__getn - DD imagerel stbi__getn+412 + DD imagerel stbi__getn+415 DD imagerel $unwind$stbi__getn pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__get16be DD imagerel stbi__get16be - DD imagerel stbi__get16be+96 + DD imagerel stbi__get16be+97 DD imagerel $unwind$stbi__get16be pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__get32be DD imagerel stbi__get32be - DD imagerel stbi__get32be+90 + DD imagerel stbi__get32be+91 DD imagerel $unwind$stbi__get32be pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__get16le DD imagerel stbi__get16le - DD imagerel stbi__get16le+84 + DD imagerel stbi__get16le+85 DD imagerel $unwind$stbi__get16le pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__get32le DD imagerel stbi__get32le - DD imagerel stbi__get32le+84 + DD imagerel stbi__get32le+85 DD imagerel $unwind$stbi__get32le pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__compute_y DD imagerel stbi__compute_y - DD imagerel stbi__compute_y+80 + DD imagerel stbi__compute_y+81 DD imagerel $unwind$stbi__compute_y pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__convert_format DD imagerel stbi__convert_format - DD imagerel stbi__convert_format+2744 + DD imagerel stbi__convert_format+2752 DD imagerel $unwind$stbi__convert_format pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__compute_y_16 DD imagerel stbi__compute_y_16 - DD imagerel stbi__compute_y_16+80 + DD imagerel stbi__compute_y_16+81 DD imagerel $unwind$stbi__compute_y_16 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__convert_format16 DD imagerel stbi__convert_format16 - DD imagerel stbi__convert_format16+2796 + DD imagerel stbi__convert_format16+2804 DD imagerel $unwind$stbi__convert_format16 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__build_huffman DD imagerel stbi__build_huffman - DD imagerel stbi__build_huffman+696 + DD imagerel stbi__build_huffman+698 DD imagerel $unwind$stbi__build_huffman pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__build_fast_ac DD imagerel stbi__build_fast_ac - DD imagerel stbi__build_fast_ac+439 + DD imagerel stbi__build_fast_ac+440 DD imagerel $unwind$stbi__build_fast_ac pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__grow_buffer_unsafe DD imagerel stbi__grow_buffer_unsafe - DD imagerel stbi__grow_buffer_unsafe+313 + DD imagerel stbi__grow_buffer_unsafe+314 DD imagerel $unwind$stbi__grow_buffer_unsafe pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_huff_decode DD imagerel stbi__jpeg_huff_decode - DD imagerel stbi__jpeg_huff_decode+756 + DD imagerel stbi__jpeg_huff_decode+758 DD imagerel $unwind$stbi__jpeg_huff_decode pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__extend_receive DD imagerel stbi__extend_receive - DD imagerel stbi__extend_receive+283 + DD imagerel stbi__extend_receive+285 DD imagerel $unwind$stbi__extend_receive pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_get_bits DD imagerel stbi__jpeg_get_bits - DD imagerel stbi__jpeg_get_bits+236 + DD imagerel stbi__jpeg_get_bits+238 DD imagerel $unwind$stbi__jpeg_get_bits pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_get_bit DD imagerel stbi__jpeg_get_bit - DD imagerel stbi__jpeg_get_bit+169 + DD imagerel stbi__jpeg_get_bit+171 DD imagerel $unwind$stbi__jpeg_get_bit pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_decode_block DD imagerel stbi__jpeg_decode_block - DD imagerel stbi__jpeg_decode_block+983 + DD imagerel stbi__jpeg_decode_block+987 DD imagerel $unwind$stbi__jpeg_decode_block pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_decode_block_prog_dc DD imagerel stbi__jpeg_decode_block_prog_dc - DD imagerel stbi__jpeg_decode_block_prog_dc+590 + DD imagerel stbi__jpeg_decode_block_prog_dc+593 DD imagerel $unwind$stbi__jpeg_decode_block_prog_dc pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_decode_block_prog_ac DD imagerel stbi__jpeg_decode_block_prog_ac - DD imagerel stbi__jpeg_decode_block_prog_ac+1741 + DD imagerel stbi__jpeg_decode_block_prog_ac+1743 DD imagerel $unwind$stbi__jpeg_decode_block_prog_ac pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__clamp DD imagerel stbi__clamp - DD imagerel stbi__clamp+88 + DD imagerel stbi__clamp+89 DD imagerel $unwind$stbi__clamp pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__idct_block DD imagerel stbi__idct_block - DD imagerel stbi__idct_block+3188 + DD imagerel stbi__idct_block+3189 DD imagerel $unwind$stbi__idct_block pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__idct_simd DD imagerel stbi__idct_simd - DD imagerel stbi__idct_simd+5982 + DD imagerel stbi__idct_simd+5983 DD imagerel $unwind$stbi__idct_simd pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__get_marker DD imagerel stbi__get_marker - DD imagerel stbi__get_marker+167 + DD imagerel stbi__get_marker+168 DD imagerel $unwind$stbi__get_marker pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_reset DD imagerel stbi__jpeg_reset - DD imagerel stbi__jpeg_reset+297 + DD imagerel stbi__jpeg_reset+298 DD imagerel $unwind$stbi__jpeg_reset pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__parse_entropy_coded_data DD imagerel stbi__parse_entropy_coded_data - DD imagerel stbi__parse_entropy_coded_data+3232 + DD imagerel stbi__parse_entropy_coded_data+3244 DD imagerel $unwind$stbi__parse_entropy_coded_data pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_dequantize DD imagerel stbi__jpeg_dequantize - DD imagerel stbi__jpeg_dequantize+119 + DD imagerel stbi__jpeg_dequantize+120 DD imagerel $unwind$stbi__jpeg_dequantize pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_finish DD imagerel stbi__jpeg_finish - DD imagerel stbi__jpeg_finish+492 + DD imagerel stbi__jpeg_finish+495 DD imagerel $unwind$stbi__jpeg_finish pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__process_marker DD imagerel stbi__process_marker - DD imagerel stbi__process_marker+1902 + DD imagerel stbi__process_marker+1908 DD imagerel $unwind$stbi__process_marker pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__process_scan_header DD imagerel stbi__process_scan_header - DD imagerel stbi__process_scan_header+905 + DD imagerel stbi__process_scan_header+906 DD imagerel $unwind$stbi__process_scan_header pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__free_jpeg_components DD imagerel stbi__free_jpeg_components - DD imagerel stbi__free_jpeg_components+393 + DD imagerel stbi__free_jpeg_components+397 DD imagerel $unwind$stbi__free_jpeg_components pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__process_frame_header DD imagerel stbi__process_frame_header - DD imagerel stbi__process_frame_header+2435 + DD imagerel stbi__process_frame_header+2436 DD imagerel $unwind$stbi__process_frame_header pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__decode_jpeg_header DD imagerel stbi__decode_jpeg_header - DD imagerel stbi__decode_jpeg_header+397 + DD imagerel stbi__decode_jpeg_header+398 DD imagerel $unwind$stbi__decode_jpeg_header pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__skip_jpeg_junk_at_end DD imagerel stbi__skip_jpeg_junk_at_end - DD imagerel stbi__skip_jpeg_junk_at_end+166 + DD imagerel stbi__skip_jpeg_junk_at_end+167 DD imagerel $unwind$stbi__skip_jpeg_junk_at_end pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__decode_jpeg_image DD imagerel stbi__decode_jpeg_image - DD imagerel stbi__decode_jpeg_image+559 + DD imagerel stbi__decode_jpeg_image+561 DD imagerel $unwind$stbi__decode_jpeg_image pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$resample_row_1 DD imagerel resample_row_1 - DD imagerel resample_row_1+63 + DD imagerel resample_row_1+64 DD imagerel $unwind$resample_row_1 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__resample_row_v_2 DD imagerel stbi__resample_row_v_2 - DD imagerel stbi__resample_row_v_2+147 + DD imagerel stbi__resample_row_v_2+148 DD imagerel $unwind$stbi__resample_row_v_2 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__resample_row_h_2 DD imagerel stbi__resample_row_h_2 - DD imagerel stbi__resample_row_h_2+521 + DD imagerel stbi__resample_row_h_2+522 DD imagerel $unwind$stbi__resample_row_h_2 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__resample_row_hv_2 DD imagerel stbi__resample_row_hv_2 - DD imagerel stbi__resample_row_hv_2+443 + DD imagerel stbi__resample_row_hv_2+444 DD imagerel $unwind$stbi__resample_row_hv_2 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__resample_row_hv_2_simd DD imagerel stbi__resample_row_hv_2_simd - DD imagerel stbi__resample_row_hv_2_simd+1192 + DD imagerel stbi__resample_row_hv_2_simd+1193 DD imagerel $unwind$stbi__resample_row_hv_2_simd pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__resample_row_generic DD imagerel stbi__resample_row_generic - DD imagerel stbi__resample_row_generic+165 + DD imagerel stbi__resample_row_generic+166 DD imagerel $unwind$stbi__resample_row_generic pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__YCbCr_to_RGB_row DD imagerel stbi__YCbCr_to_RGB_row - DD imagerel stbi__YCbCr_to_RGB_row+509 + DD imagerel stbi__YCbCr_to_RGB_row+510 DD imagerel $unwind$stbi__YCbCr_to_RGB_row pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__YCbCr_to_RGB_simd DD imagerel stbi__YCbCr_to_RGB_simd - DD imagerel stbi__YCbCr_to_RGB_simd+1390 + DD imagerel stbi__YCbCr_to_RGB_simd+1391 DD imagerel $unwind$stbi__YCbCr_to_RGB_simd pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__setup_jpeg DD imagerel stbi__setup_jpeg - DD imagerel stbi__setup_jpeg+176 + DD imagerel stbi__setup_jpeg+177 DD imagerel $unwind$stbi__setup_jpeg pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__cleanup_jpeg DD imagerel stbi__cleanup_jpeg - DD imagerel stbi__cleanup_jpeg+69 + DD imagerel stbi__cleanup_jpeg+71 DD imagerel $unwind$stbi__cleanup_jpeg pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__blinn_8x8 DD imagerel stbi__blinn_8x8 - DD imagerel stbi__blinn_8x8+85 + DD imagerel stbi__blinn_8x8+86 DD imagerel $unwind$stbi__blinn_8x8 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$load_jpeg_image DD imagerel load_jpeg_image - DD imagerel load_jpeg_image+4816 + DD imagerel load_jpeg_image+4825 DD imagerel $unwind$load_jpeg_image pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_info_raw DD imagerel stbi__jpeg_info_raw - DD imagerel stbi__jpeg_info_raw+230 + DD imagerel stbi__jpeg_info_raw+232 DD imagerel $unwind$stbi__jpeg_info_raw pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__bitreverse16 DD imagerel stbi__bitreverse16 - DD imagerel stbi__bitreverse16+192 + DD imagerel stbi__bitreverse16+193 DD imagerel $unwind$stbi__bitreverse16 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__bit_reverse DD imagerel stbi__bit_reverse - DD imagerel stbi__bit_reverse+105 + DD imagerel stbi__bit_reverse+106 DD imagerel $unwind$stbi__bit_reverse pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__zbuild_huffman DD imagerel stbi__zbuild_huffman - DD imagerel stbi__zbuild_huffman+960 + DD imagerel stbi__zbuild_huffman+963 DD imagerel $unwind$stbi__zbuild_huffman pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__zeof DD imagerel stbi__zeof - DD imagerel stbi__zeof+92 + DD imagerel stbi__zeof+93 DD imagerel $unwind$stbi__zeof pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__zget8 DD imagerel stbi__zget8 - DD imagerel stbi__zget8+118 + DD imagerel stbi__zget8+119 DD imagerel $unwind$stbi__zget8 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__fill_bits DD imagerel stbi__fill_bits - DD imagerel stbi__fill_bits+199 + DD imagerel stbi__fill_bits+200 DD imagerel $unwind$stbi__fill_bits pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__zreceive DD imagerel stbi__zreceive - DD imagerel stbi__zreceive+198 + DD imagerel stbi__zreceive+200 DD imagerel $unwind$stbi__zreceive pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__zhuffman_decode_slowpath DD imagerel stbi__zhuffman_decode_slowpath - DD imagerel stbi__zhuffman_decode_slowpath+323 + DD imagerel stbi__zhuffman_decode_slowpath+324 DD imagerel $unwind$stbi__zhuffman_decode_slowpath pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__zhuffman_decode DD imagerel stbi__zhuffman_decode - DD imagerel stbi__zhuffman_decode+239 + DD imagerel stbi__zhuffman_decode+241 DD imagerel $unwind$stbi__zhuffman_decode pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__zexpand DD imagerel stbi__zexpand - DD imagerel stbi__zexpand+360 + DD imagerel stbi__zexpand+361 DD imagerel $unwind$stbi__zexpand pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__parse_huffman_block DD imagerel stbi__parse_huffman_block - DD imagerel stbi__parse_huffman_block+760 + DD imagerel stbi__parse_huffman_block+761 DD imagerel $unwind$stbi__parse_huffman_block pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__compute_huffman_codes DD imagerel stbi__compute_huffman_codes - DD imagerel stbi__compute_huffman_codes+946 + DD imagerel stbi__compute_huffman_codes+949 DD imagerel $unwind$stbi__compute_huffman_codes pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__parse_uncompressed_block DD imagerel stbi__parse_uncompressed_block - DD imagerel stbi__parse_uncompressed_block+600 + DD imagerel stbi__parse_uncompressed_block+603 DD imagerel $unwind$stbi__parse_uncompressed_block pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__parse_zlib_header DD imagerel stbi__parse_zlib_header - DD imagerel stbi__parse_zlib_header+203 + DD imagerel stbi__parse_zlib_header+204 DD imagerel $unwind$stbi__parse_zlib_header pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__parse_zlib DD imagerel stbi__parse_zlib - DD imagerel stbi__parse_zlib+342 + DD imagerel stbi__parse_zlib+343 DD imagerel $unwind$stbi__parse_zlib pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__do_zlib DD imagerel stbi__do_zlib - DD imagerel stbi__do_zlib+157 + DD imagerel stbi__do_zlib+158 DD imagerel $unwind$stbi__do_zlib pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__get_chunk_header DD imagerel stbi__get_chunk_header - DD imagerel stbi__get_chunk_header+122 + DD imagerel stbi__get_chunk_header+123 DD imagerel $unwind$stbi__get_chunk_header pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__check_png_header DD imagerel stbi__check_png_header - DD imagerel stbi__check_png_header+119 + DD imagerel stbi__check_png_header+120 DD imagerel $unwind$stbi__check_png_header pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__paeth DD imagerel stbi__paeth - DD imagerel stbi__paeth+189 + DD imagerel stbi__paeth+190 DD imagerel $unwind$stbi__paeth pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__create_png_image_raw DD imagerel stbi__create_png_image_raw - DD imagerel stbi__create_png_image_raw+7144 + DD imagerel stbi__create_png_image_raw+7148 DD imagerel $unwind$stbi__create_png_image_raw pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__create_png_image DD imagerel stbi__create_png_image - DD imagerel stbi__create_png_image+1304 + DD imagerel stbi__create_png_image+1308 DD imagerel $unwind$stbi__create_png_image pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__compute_transparency DD imagerel stbi__compute_transparency - DD imagerel stbi__compute_transparency+477 + DD imagerel stbi__compute_transparency+478 DD imagerel $unwind$stbi__compute_transparency pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__compute_transparency16 DD imagerel stbi__compute_transparency16 - DD imagerel stbi__compute_transparency16+480 + DD imagerel stbi__compute_transparency16+481 DD imagerel $unwind$stbi__compute_transparency16 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__expand_png_palette DD imagerel stbi__expand_png_palette - DD imagerel stbi__expand_png_palette+612 + DD imagerel stbi__expand_png_palette+614 DD imagerel $unwind$stbi__expand_png_palette pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__de_iphone DD imagerel stbi__de_iphone - DD imagerel stbi__de_iphone+822 + DD imagerel stbi__de_iphone+823 DD imagerel $unwind$stbi__de_iphone pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__parse_png_file DD imagerel stbi__parse_png_file - DD imagerel stbi__parse_png_file+3790 + DD imagerel stbi__parse_png_file+3798 DD imagerel $unwind$stbi__parse_png_file pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__do_png DD imagerel stbi__do_png - DD imagerel stbi__do_png+689 + DD imagerel stbi__do_png+693 DD imagerel $unwind$stbi__do_png pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__png_info_raw DD imagerel stbi__png_info_raw - DD imagerel stbi__png_info_raw+199 + DD imagerel stbi__png_info_raw+201 DD imagerel $unwind$stbi__png_info_raw pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__bmp_test_raw DD imagerel stbi__bmp_test_raw - DD imagerel stbi__bmp_test_raw+219 + DD imagerel stbi__bmp_test_raw+227 DD imagerel $unwind$stbi__bmp_test_raw pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__high_bit DD imagerel stbi__high_bit - DD imagerel stbi__high_bit+224 + DD imagerel stbi__high_bit+225 DD imagerel $unwind$stbi__high_bit pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__bitcount DD imagerel stbi__bitcount - DD imagerel stbi__bitcount+198 + DD imagerel stbi__bitcount+199 DD imagerel $unwind$stbi__bitcount pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__shiftsigned DD imagerel stbi__shiftsigned - DD imagerel stbi__shiftsigned+267 + DD imagerel stbi__shiftsigned+268 DD imagerel $unwind$stbi__shiftsigned pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__bmp_set_mask_defaults DD imagerel stbi__bmp_set_mask_defaults - DD imagerel stbi__bmp_set_mask_defaults+285 + DD imagerel stbi__bmp_set_mask_defaults+286 DD imagerel $unwind$stbi__bmp_set_mask_defaults pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__bmp_parse_header DD imagerel stbi__bmp_parse_header - DD imagerel stbi__bmp_parse_header+1573 + DD imagerel stbi__bmp_parse_header+1594 DD imagerel $unwind$stbi__bmp_parse_header pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__tga_get_comp DD imagerel stbi__tga_get_comp - DD imagerel stbi__tga_get_comp+203 + DD imagerel stbi__tga_get_comp+204 DD imagerel $unwind$stbi__tga_get_comp pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__tga_read_rgb16 DD imagerel stbi__tga_read_rgb16 - DD imagerel stbi__tga_read_rgb16+224 + DD imagerel stbi__tga_read_rgb16+225 DD imagerel $unwind$stbi__tga_read_rgb16 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__psd_decode_rle DD imagerel stbi__psd_decode_rle - DD imagerel stbi__psd_decode_rle+335 + DD imagerel stbi__psd_decode_rle+336 DD imagerel $unwind$stbi__psd_decode_rle pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pic_is4 DD imagerel stbi__pic_is4 - DD imagerel stbi__pic_is4+114 + DD imagerel stbi__pic_is4+115 DD imagerel $unwind$stbi__pic_is4 pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pic_test_core DD imagerel stbi__pic_test_core - DD imagerel stbi__pic_test_core+137 + DD imagerel stbi__pic_test_core+139 DD imagerel $unwind$stbi__pic_test_core pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__readval DD imagerel stbi__readval - DD imagerel stbi__readval+208 + DD imagerel stbi__readval+209 DD imagerel $unwind$stbi__readval pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__copyval DD imagerel stbi__copyval - DD imagerel stbi__copyval+137 + DD imagerel stbi__copyval+138 DD imagerel $unwind$stbi__copyval pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pic_load_core DD imagerel stbi__pic_load_core - DD imagerel stbi__pic_load_core+1802 + DD imagerel stbi__pic_load_core+1805 DD imagerel $unwind$stbi__pic_load_core pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__gif_test_raw DD imagerel stbi__gif_test_raw - DD imagerel stbi__gif_test_raw+188 + DD imagerel stbi__gif_test_raw+189 DD imagerel $unwind$stbi__gif_test_raw pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__gif_parse_colortable DD imagerel stbi__gif_parse_colortable - DD imagerel stbi__gif_parse_colortable+277 + DD imagerel stbi__gif_parse_colortable+278 DD imagerel $unwind$stbi__gif_parse_colortable pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__gif_header DD imagerel stbi__gif_header - DD imagerel stbi__gif_header+607 + DD imagerel stbi__gif_header+609 DD imagerel $unwind$stbi__gif_header pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__gif_info_raw DD imagerel stbi__gif_info_raw - DD imagerel stbi__gif_info_raw+216 + DD imagerel stbi__gif_info_raw+223 DD imagerel $unwind$stbi__gif_info_raw pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__out_gif_code DD imagerel stbi__out_gif_code - DD imagerel stbi__out_gif_code+751 + DD imagerel stbi__out_gif_code+753 DD imagerel $unwind$stbi__out_gif_code pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__process_gif_raster DD imagerel stbi__process_gif_raster - DD imagerel stbi__process_gif_raster+1260 + DD imagerel stbi__process_gif_raster+1264 DD imagerel $unwind$stbi__process_gif_raster pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__gif_load_next DD imagerel stbi__gif_load_next - DD imagerel stbi__gif_load_next+2511 + DD imagerel stbi__gif_load_next+2528 DD imagerel $unwind$stbi__gif_load_next pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__load_gif_main_outofmem DD imagerel stbi__load_gif_main_outofmem - DD imagerel stbi__load_gif_main_outofmem+211 + DD imagerel stbi__load_gif_main_outofmem+217 DD imagerel $unwind$stbi__load_gif_main_outofmem pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__hdr_test_core DD imagerel stbi__hdr_test_core - DD imagerel stbi__hdr_test_core+139 + DD imagerel stbi__hdr_test_core+141 DD imagerel $unwind$stbi__hdr_test_core pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__hdr_gettoken DD imagerel stbi__hdr_gettoken - DD imagerel stbi__hdr_gettoken+211 + DD imagerel stbi__hdr_gettoken+212 DD imagerel $unwind$stbi__hdr_gettoken pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__hdr_convert DD imagerel stbi__hdr_convert - DD imagerel stbi__hdr_convert+689 + DD imagerel stbi__hdr_convert+690 DD imagerel $unwind$stbi__hdr_convert pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pnm_isspace DD imagerel stbi__pnm_isspace - DD imagerel stbi__pnm_isspace+140 + DD imagerel stbi__pnm_isspace+141 DD imagerel $unwind$stbi__pnm_isspace pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pnm_skip_whitespace DD imagerel stbi__pnm_skip_whitespace - DD imagerel stbi__pnm_skip_whitespace+211 + DD imagerel stbi__pnm_skip_whitespace+212 DD imagerel $unwind$stbi__pnm_skip_whitespace pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pnm_isdigit DD imagerel stbi__pnm_isdigit - DD imagerel stbi__pnm_isdigit+92 + DD imagerel stbi__pnm_isdigit+93 DD imagerel $unwind$stbi__pnm_isdigit pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pnm_getinteger DD imagerel stbi__pnm_getinteger - DD imagerel stbi__pnm_getinteger+182 + DD imagerel stbi__pnm_getinteger+183 DD imagerel $unwind$stbi__pnm_getinteger pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__info_main DD imagerel stbi__info_main - DD imagerel stbi__info_main+482 + DD imagerel stbi__info_main+483 DD imagerel $unwind$stbi__info_main pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__is_16_main DD imagerel stbi__is_16_main - DD imagerel stbi__is_16_main+112 + DD imagerel stbi__is_16_main+113 DD imagerel $unwind$stbi__is_16_main pdata ENDS ; COMDAT __xmm@fa7efa7efa7efa7efa7efa7efa7efa7e @@ -3079,7 +3079,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 044H - DW 06f1H + DW 06f4H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -3236,7 +3236,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 03fH - DW 0eb5H + DW 0ebdH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -3468,7 +3468,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 03cH - DW 0399H + DW 039cH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -3596,7 +3596,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 040H - DW 03a7H + DW 03aaH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -3662,7 +3662,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 012b7H + DW 012c0H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -3826,7 +3826,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 03aH - DW 0755H + DW 075bH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -3871,7 +3871,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 036H - DW 0c87H + DW 0c93H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -3931,7 +3931,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 03fH - DW 0c5bH + DW 0c5cH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4121,7 +4121,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 019eH + DW 01a0H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4149,7 +4149,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 03bH - DB 08cH + DB 08dH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4183,7 +4183,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 01f1H + DW 01f3H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4211,7 +4211,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 01ebH + DW 01edH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4246,7 +4246,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 044H - DW 01e6H + DW 01eaH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4402,7 +4402,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 022aH + DW 0230H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4460,7 +4460,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 04bH - DW 044bH + DW 0452H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4487,7 +4487,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 04bH - DW 014dH + DW 0152H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4521,7 +4521,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 02a2H + DW 02aaH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4563,7 +4563,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 02f9H + DW 0300H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4609,7 +4609,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 0262H + DW 0267H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4661,7 +4661,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 0a37H + DW 0a45H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4735,7 +4735,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 01beH + DW 01c5H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4787,7 +4787,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 0ba0H + DW 0babH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4842,7 +4842,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 0134H + DW 0136H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4872,7 +4872,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 0131cH + DW 01328H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4916,7 +4916,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 036H - DB 09bH + DB 09dH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4943,7 +4943,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 045H - DB 097H + DB 098H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -4970,7 +4970,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 045H - DB 0adH + DB 0aeH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5088,7 +5088,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 02bH - DB 07bH + DB 07cH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5118,7 +5118,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 04aH - DB 0d3H + DB 0d4H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5145,7 +5145,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 045H - DW 0110H + DW 0112H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5172,7 +5172,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 04aH - DB 0d3H + DB 0d4H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5206,7 +5206,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 04aH - DW 011dH + DW 011fH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5233,7 +5233,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 04aH - DW 011bH + DW 011dH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5302,7 +5302,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 036H - DB 0a5H + DB 0a8H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5336,7 +5336,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 045H - DB 0c9H + DB 0ccH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5370,7 +5370,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 03bH - DB 084H + DB 086H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5397,7 +5397,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 03aH - DB 083H + DB 085H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5424,7 +5424,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 045H - DB 0a3H + DB 0a5H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5451,7 +5451,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 044H - DB 0a2H + DB 0a4H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5492,7 +5492,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 036H - DB 09fH + DB 0a2H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5526,7 +5526,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 03aH - DB 083H + DB 085H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5553,7 +5553,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 03bH - DB 084H + DB 086H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5608,7 +5608,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 045H - DB 0a6H + DB 0a8H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5642,7 +5642,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 045H - DB 0adH + DB 0afH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5669,7 +5669,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 044H - DB 0acH + DB 0aeH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5696,7 +5696,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 045H - DB 0e0H + DB 0e3H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5730,7 +5730,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 045H - DB 0adH + DB 0afH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5757,7 +5757,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 044H - DB 0acH + DB 0aeH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5784,7 +5784,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DW 044H - DW 0159H + DW 015cH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5811,7 +5811,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 045H - DB 0e0H + DB 0e3H voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5852,7 +5852,7 @@ xdata ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 045H - DB 0adH + DB 0afH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5879,7 +5879,7 @@ CONST ENDS ; COMDAT voltbl voltbl SEGMENT _volmd DB 044H - DB 0acH + DB 0aeH voltbl ENDS ; COMDAT xdata xdata SEGMENT @@ -5928,17 +5928,18 @@ stbi__is_16_main PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 7245 : #ifndef STBI_NO_PNG ; 7246 : if (stbi__png_is16(s)) return 1; - 0001f 48 8b 8d e0 00 + 00020 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__png_is16 - 0002b 85 c0 test eax, eax - 0002d 74 07 je SHORT $LN2@stbi__is_1 - 0002f b8 01 00 00 00 mov eax, 1 - 00034 eb 30 jmp SHORT $LN1@stbi__is_1 + 00027 e8 00 00 00 00 call stbi__png_is16 + 0002c 85 c0 test eax, eax + 0002e 74 07 je SHORT $LN2@stbi__is_1 + 00030 b8 01 00 00 00 mov eax, 1 + 00035 eb 30 jmp SHORT $LN1@stbi__is_1 $LN2@stbi__is_1: ; 7247 : #endif @@ -5946,13 +5947,13 @@ $LN2@stbi__is_1: ; 7249 : #ifndef STBI_NO_PSD ; 7250 : if (stbi__psd_is16(s)) return 1; - 00036 48 8b 8d e0 00 + 00037 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 0003d e8 00 00 00 00 call stbi__psd_is16 - 00042 85 c0 test eax, eax - 00044 74 07 je SHORT $LN3@stbi__is_1 - 00046 b8 01 00 00 00 mov eax, 1 - 0004b eb 19 jmp SHORT $LN1@stbi__is_1 + 0003e e8 00 00 00 00 call stbi__psd_is16 + 00043 85 c0 test eax, eax + 00045 74 07 je SHORT $LN3@stbi__is_1 + 00047 b8 01 00 00 00 mov eax, 1 + 0004c eb 19 jmp SHORT $LN1@stbi__is_1 $LN3@stbi__is_1: ; 7251 : #endif @@ -5960,28 +5961,28 @@ $LN3@stbi__is_1: ; 7253 : #ifndef STBI_NO_PNM ; 7254 : if (stbi__pnm_is16(s)) return 1; - 0004d 48 8b 8d e0 00 + 0004e 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 00054 e8 00 00 00 00 call stbi__pnm_is16 - 00059 85 c0 test eax, eax - 0005b 74 07 je SHORT $LN4@stbi__is_1 - 0005d b8 01 00 00 00 mov eax, 1 - 00062 eb 02 jmp SHORT $LN1@stbi__is_1 + 00055 e8 00 00 00 00 call stbi__pnm_is16 + 0005a 85 c0 test eax, eax + 0005c 74 07 je SHORT $LN4@stbi__is_1 + 0005e b8 01 00 00 00 mov eax, 1 + 00063 eb 02 jmp SHORT $LN1@stbi__is_1 $LN4@stbi__is_1: ; 7255 : #endif ; 7256 : return 0; - 00064 33 c0 xor eax, eax + 00065 33 c0 xor eax, eax $LN1@stbi__is_1: ; 7257 : } - 00066 48 8d a5 c8 00 + 00067 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0006d 5f pop rdi - 0006e 5d pop rbp - 0006f c3 ret 0 + 0006e 5f pop rdi + 0006f 5d pop rbp + 00070 c3 ret 0 stbi__is_16_main ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -6008,23 +6009,24 @@ stbi__info_main PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 7203 : #ifndef STBI_NO_JPEG ; 7204 : if (stbi__jpeg_info(s, x, y, comp)) return 1; - 0002e 4c 8b 8d f8 00 + 0002f 4c 8b 8d f8 00 00 00 mov r9, QWORD PTR comp$[rbp] - 00035 4c 8b 85 f0 00 + 00036 4c 8b 85 f0 00 00 00 mov r8, QWORD PTR y$[rbp] - 0003c 48 8b 95 e8 00 + 0003d 48 8b 95 e8 00 00 00 mov rdx, QWORD PTR x$[rbp] - 00043 48 8b 8d e0 00 + 00044 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 0004a e8 00 00 00 00 call stbi__jpeg_info - 0004f 85 c0 test eax, eax - 00051 74 0a je SHORT $LN2@stbi__info - 00053 b8 01 00 00 00 mov eax, 1 - 00058 e9 7b 01 00 00 jmp $LN1@stbi__info + 0004b e8 00 00 00 00 call stbi__jpeg_info + 00050 85 c0 test eax, eax + 00052 74 0a je SHORT $LN2@stbi__info + 00054 b8 01 00 00 00 mov eax, 1 + 00059 e9 7b 01 00 00 jmp $LN1@stbi__info $LN2@stbi__info: ; 7205 : #endif @@ -6032,19 +6034,19 @@ $LN2@stbi__info: ; 7207 : #ifndef STBI_NO_PNG ; 7208 : if (stbi__png_info(s, x, y, comp)) return 1; - 0005d 4c 8b 8d f8 00 + 0005e 4c 8b 8d f8 00 00 00 mov r9, QWORD PTR comp$[rbp] - 00064 4c 8b 85 f0 00 + 00065 4c 8b 85 f0 00 00 00 mov r8, QWORD PTR y$[rbp] - 0006b 48 8b 95 e8 00 + 0006c 48 8b 95 e8 00 00 00 mov rdx, QWORD PTR x$[rbp] - 00072 48 8b 8d e0 00 + 00073 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 00079 e8 00 00 00 00 call stbi__png_info - 0007e 85 c0 test eax, eax - 00080 74 0a je SHORT $LN3@stbi__info - 00082 b8 01 00 00 00 mov eax, 1 - 00087 e9 4c 01 00 00 jmp $LN1@stbi__info + 0007a e8 00 00 00 00 call stbi__png_info + 0007f 85 c0 test eax, eax + 00081 74 0a je SHORT $LN3@stbi__info + 00083 b8 01 00 00 00 mov eax, 1 + 00088 e9 4c 01 00 00 jmp $LN1@stbi__info $LN3@stbi__info: ; 7209 : #endif @@ -6052,19 +6054,19 @@ $LN3@stbi__info: ; 7211 : #ifndef STBI_NO_GIF ; 7212 : if (stbi__gif_info(s, x, y, comp)) return 1; - 0008c 4c 8b 8d f8 00 + 0008d 4c 8b 8d f8 00 00 00 mov r9, QWORD PTR comp$[rbp] - 00093 4c 8b 85 f0 00 + 00094 4c 8b 85 f0 00 00 00 mov r8, QWORD PTR y$[rbp] - 0009a 48 8b 95 e8 00 + 0009b 48 8b 95 e8 00 00 00 mov rdx, QWORD PTR x$[rbp] - 000a1 48 8b 8d e0 00 + 000a2 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 000a8 e8 00 00 00 00 call stbi__gif_info - 000ad 85 c0 test eax, eax - 000af 74 0a je SHORT $LN4@stbi__info - 000b1 b8 01 00 00 00 mov eax, 1 - 000b6 e9 1d 01 00 00 jmp $LN1@stbi__info + 000a9 e8 00 00 00 00 call stbi__gif_info + 000ae 85 c0 test eax, eax + 000b0 74 0a je SHORT $LN4@stbi__info + 000b2 b8 01 00 00 00 mov eax, 1 + 000b7 e9 1d 01 00 00 jmp $LN1@stbi__info $LN4@stbi__info: ; 7213 : #endif @@ -6072,19 +6074,19 @@ $LN4@stbi__info: ; 7215 : #ifndef STBI_NO_BMP ; 7216 : if (stbi__bmp_info(s, x, y, comp)) return 1; - 000bb 4c 8b 8d f8 00 + 000bc 4c 8b 8d f8 00 00 00 mov r9, QWORD PTR comp$[rbp] - 000c2 4c 8b 85 f0 00 + 000c3 4c 8b 85 f0 00 00 00 mov r8, QWORD PTR y$[rbp] - 000c9 48 8b 95 e8 00 + 000ca 48 8b 95 e8 00 00 00 mov rdx, QWORD PTR x$[rbp] - 000d0 48 8b 8d e0 00 + 000d1 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 000d7 e8 00 00 00 00 call stbi__bmp_info - 000dc 85 c0 test eax, eax - 000de 74 0a je SHORT $LN5@stbi__info - 000e0 b8 01 00 00 00 mov eax, 1 - 000e5 e9 ee 00 00 00 jmp $LN1@stbi__info + 000d8 e8 00 00 00 00 call stbi__bmp_info + 000dd 85 c0 test eax, eax + 000df 74 0a je SHORT $LN5@stbi__info + 000e1 b8 01 00 00 00 mov eax, 1 + 000e6 e9 ee 00 00 00 jmp $LN1@stbi__info $LN5@stbi__info: ; 7217 : #endif @@ -6092,19 +6094,19 @@ $LN5@stbi__info: ; 7219 : #ifndef STBI_NO_PSD ; 7220 : if (stbi__psd_info(s, x, y, comp)) return 1; - 000ea 4c 8b 8d f8 00 + 000eb 4c 8b 8d f8 00 00 00 mov r9, QWORD PTR comp$[rbp] - 000f1 4c 8b 85 f0 00 + 000f2 4c 8b 85 f0 00 00 00 mov r8, QWORD PTR y$[rbp] - 000f8 48 8b 95 e8 00 + 000f9 48 8b 95 e8 00 00 00 mov rdx, QWORD PTR x$[rbp] - 000ff 48 8b 8d e0 00 + 00100 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 00106 e8 00 00 00 00 call stbi__psd_info - 0010b 85 c0 test eax, eax - 0010d 74 0a je SHORT $LN6@stbi__info - 0010f b8 01 00 00 00 mov eax, 1 - 00114 e9 bf 00 00 00 jmp $LN1@stbi__info + 00107 e8 00 00 00 00 call stbi__psd_info + 0010c 85 c0 test eax, eax + 0010e 74 0a je SHORT $LN6@stbi__info + 00110 b8 01 00 00 00 mov eax, 1 + 00115 e9 bf 00 00 00 jmp $LN1@stbi__info $LN6@stbi__info: ; 7221 : #endif @@ -6112,19 +6114,19 @@ $LN6@stbi__info: ; 7223 : #ifndef STBI_NO_PIC ; 7224 : if (stbi__pic_info(s, x, y, comp)) return 1; - 00119 4c 8b 8d f8 00 + 0011a 4c 8b 8d f8 00 00 00 mov r9, QWORD PTR comp$[rbp] - 00120 4c 8b 85 f0 00 + 00121 4c 8b 85 f0 00 00 00 mov r8, QWORD PTR y$[rbp] - 00127 48 8b 95 e8 00 + 00128 48 8b 95 e8 00 00 00 mov rdx, QWORD PTR x$[rbp] - 0012e 48 8b 8d e0 00 + 0012f 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 00135 e8 00 00 00 00 call stbi__pic_info - 0013a 85 c0 test eax, eax - 0013c 74 0a je SHORT $LN7@stbi__info - 0013e b8 01 00 00 00 mov eax, 1 - 00143 e9 90 00 00 00 jmp $LN1@stbi__info + 00136 e8 00 00 00 00 call stbi__pic_info + 0013b 85 c0 test eax, eax + 0013d 74 0a je SHORT $LN7@stbi__info + 0013f b8 01 00 00 00 mov eax, 1 + 00144 e9 90 00 00 00 jmp $LN1@stbi__info $LN7@stbi__info: ; 7225 : #endif @@ -6132,19 +6134,19 @@ $LN7@stbi__info: ; 7227 : #ifndef STBI_NO_PNM ; 7228 : if (stbi__pnm_info(s, x, y, comp)) return 1; - 00148 4c 8b 8d f8 00 + 00149 4c 8b 8d f8 00 00 00 mov r9, QWORD PTR comp$[rbp] - 0014f 4c 8b 85 f0 00 + 00150 4c 8b 85 f0 00 00 00 mov r8, QWORD PTR y$[rbp] - 00156 48 8b 95 e8 00 + 00157 48 8b 95 e8 00 00 00 mov rdx, QWORD PTR x$[rbp] - 0015d 48 8b 8d e0 00 + 0015e 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 00164 e8 00 00 00 00 call stbi__pnm_info - 00169 85 c0 test eax, eax - 0016b 74 07 je SHORT $LN8@stbi__info - 0016d b8 01 00 00 00 mov eax, 1 - 00172 eb 64 jmp SHORT $LN1@stbi__info + 00165 e8 00 00 00 00 call stbi__pnm_info + 0016a 85 c0 test eax, eax + 0016c 74 07 je SHORT $LN8@stbi__info + 0016e b8 01 00 00 00 mov eax, 1 + 00173 eb 64 jmp SHORT $LN1@stbi__info $LN8@stbi__info: ; 7229 : #endif @@ -6152,19 +6154,19 @@ $LN8@stbi__info: ; 7231 : #ifndef STBI_NO_HDR ; 7232 : if (stbi__hdr_info(s, x, y, comp)) return 1; - 00174 4c 8b 8d f8 00 + 00175 4c 8b 8d f8 00 00 00 mov r9, QWORD PTR comp$[rbp] - 0017b 4c 8b 85 f0 00 + 0017c 4c 8b 85 f0 00 00 00 mov r8, QWORD PTR y$[rbp] - 00182 48 8b 95 e8 00 + 00183 48 8b 95 e8 00 00 00 mov rdx, QWORD PTR x$[rbp] - 00189 48 8b 8d e0 00 + 0018a 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 00190 e8 00 00 00 00 call stbi__hdr_info - 00195 85 c0 test eax, eax - 00197 74 07 je SHORT $LN9@stbi__info - 00199 b8 01 00 00 00 mov eax, 1 - 0019e eb 38 jmp SHORT $LN1@stbi__info + 00191 e8 00 00 00 00 call stbi__hdr_info + 00196 85 c0 test eax, eax + 00198 74 07 je SHORT $LN9@stbi__info + 0019a b8 01 00 00 00 mov eax, 1 + 0019f eb 38 jmp SHORT $LN1@stbi__info $LN9@stbi__info: ; 7233 : #endif @@ -6173,39 +6175,39 @@ $LN9@stbi__info: ; 7236 : #ifndef STBI_NO_TGA ; 7237 : if (stbi__tga_info(s, x, y, comp)) - 001a0 4c 8b 8d f8 00 + 001a1 4c 8b 8d f8 00 00 00 mov r9, QWORD PTR comp$[rbp] - 001a7 4c 8b 85 f0 00 + 001a8 4c 8b 85 f0 00 00 00 mov r8, QWORD PTR y$[rbp] - 001ae 48 8b 95 e8 00 + 001af 48 8b 95 e8 00 00 00 mov rdx, QWORD PTR x$[rbp] - 001b5 48 8b 8d e0 00 + 001b6 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 001bc e8 00 00 00 00 call stbi__tga_info - 001c1 85 c0 test eax, eax - 001c3 74 07 je SHORT $LN10@stbi__info + 001bd e8 00 00 00 00 call stbi__tga_info + 001c2 85 c0 test eax, eax + 001c4 74 07 je SHORT $LN10@stbi__info ; 7238 : return 1; - 001c5 b8 01 00 00 00 mov eax, 1 - 001ca eb 0c jmp SHORT $LN1@stbi__info + 001c6 b8 01 00 00 00 mov eax, 1 + 001cb eb 0c jmp SHORT $LN1@stbi__info $LN10@stbi__info: ; 7239 : #endif ; 7240 : return stbi__err("unknown image type", "Image not of any known type, or corrupt"); - 001cc 48 8d 0d 00 00 + 001cd 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BD@CBEDEJPH@unknown?5image?5type@ - 001d3 e8 00 00 00 00 call stbi__err + 001d4 e8 00 00 00 00 call stbi__err $LN1@stbi__info: ; 7241 : } - 001d8 48 8d a5 c8 00 + 001d9 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 001df 5f pop rdi - 001e0 5d pop rbp - 001e1 c3 ret 0 + 001e0 5f pop rdi + 001e1 5d pop rbp + 001e2 c3 ret 0 stbi__info_main ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -6229,87 +6231,88 @@ stbi__pnm_getinteger PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 7138 : int value = 0; - 00024 c7 45 04 00 00 + 00025 c7 45 04 00 00 00 00 mov DWORD PTR value$[rbp], 0 $LN2@stbi__pnm_: ; 7139 : ; 7140 : while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { - 0002b 48 8b 8d 00 01 + 0002c 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00032 e8 00 00 00 00 call stbi__at_eof - 00037 85 c0 test eax, eax - 00039 75 6e jne SHORT $LN3@stbi__pnm_ - 0003b 48 8b 85 08 01 + 00033 e8 00 00 00 00 call stbi__at_eof + 00038 85 c0 test eax, eax + 0003a 75 6e jne SHORT $LN3@stbi__pnm_ + 0003c 48 8b 85 08 01 00 00 mov rax, QWORD PTR c$[rbp] - 00042 0f b6 08 movzx ecx, BYTE PTR [rax] - 00045 e8 00 00 00 00 call stbi__pnm_isdigit - 0004a 85 c0 test eax, eax - 0004c 74 5b je SHORT $LN3@stbi__pnm_ + 00043 0f b6 08 movzx ecx, BYTE PTR [rax] + 00046 e8 00 00 00 00 call stbi__pnm_isdigit + 0004b 85 c0 test eax, eax + 0004d 74 5b je SHORT $LN3@stbi__pnm_ ; 7141 : value = value * 10 + (*c - '0'); - 0004e 6b 45 04 0a imul eax, DWORD PTR value$[rbp], 10 - 00052 48 8b 8d 08 01 + 0004f 6b 45 04 0a imul eax, DWORD PTR value$[rbp], 10 + 00053 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR c$[rbp] - 00059 0f be 09 movsx ecx, BYTE PTR [rcx] - 0005c 8d 44 08 d0 lea eax, DWORD PTR [rax+rcx-48] - 00060 89 45 04 mov DWORD PTR value$[rbp], eax + 0005a 0f be 09 movsx ecx, BYTE PTR [rcx] + 0005d 8d 44 08 d0 lea eax, DWORD PTR [rax+rcx-48] + 00061 89 45 04 mov DWORD PTR value$[rbp], eax ; 7142 : *c = (char)stbi__get8(s); - 00063 48 8b 8d 00 01 + 00064 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0006a e8 00 00 00 00 call stbi__get8 - 0006f 48 8b 8d 08 01 + 0006b e8 00 00 00 00 call stbi__get8 + 00070 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR c$[rbp] - 00076 88 01 mov BYTE PTR [rcx], al + 00077 88 01 mov BYTE PTR [rcx], al ; 7143 : if ((value > 214748364) || (value == 214748364 && *c > '7')) - 00078 81 7d 04 cc cc + 00079 81 7d 04 cc cc cc 0c cmp DWORD PTR value$[rbp], 214748364 ; 0cccccccH - 0007f 7f 18 jg SHORT $LN5@stbi__pnm_ - 00081 81 7d 04 cc cc + 00080 7f 18 jg SHORT $LN5@stbi__pnm_ + 00082 81 7d 04 cc cc cc 0c cmp DWORD PTR value$[rbp], 214748364 ; 0cccccccH - 00088 75 1d jne SHORT $LN4@stbi__pnm_ - 0008a 48 8b 85 08 01 + 00089 75 1d jne SHORT $LN4@stbi__pnm_ + 0008b 48 8b 85 08 01 00 00 mov rax, QWORD PTR c$[rbp] - 00091 0f be 00 movsx eax, BYTE PTR [rax] - 00094 83 f8 37 cmp eax, 55 ; 00000037H - 00097 7e 0e jle SHORT $LN4@stbi__pnm_ + 00092 0f be 00 movsx eax, BYTE PTR [rax] + 00095 83 f8 37 cmp eax, 55 ; 00000037H + 00098 7e 0e jle SHORT $LN4@stbi__pnm_ $LN5@stbi__pnm_: ; 7144 : return stbi__err("integer parse overflow", "Parsing an integer in the PPM header overflowed a 32-bit int"); - 00099 48 8d 0d 00 00 + 0009a 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BH@OBINMOBC@integer?5parse?5overflow@ - 000a0 e8 00 00 00 00 call stbi__err - 000a5 eb 05 jmp SHORT $LN1@stbi__pnm_ + 000a1 e8 00 00 00 00 call stbi__err + 000a6 eb 05 jmp SHORT $LN1@stbi__pnm_ $LN4@stbi__pnm_: ; 7145 : } - 000a7 eb 82 jmp SHORT $LN2@stbi__pnm_ + 000a8 eb 82 jmp SHORT $LN2@stbi__pnm_ $LN3@stbi__pnm_: ; 7146 : ; 7147 : return value; - 000a9 8b 45 04 mov eax, DWORD PTR value$[rbp] + 000aa 8b 45 04 mov eax, DWORD PTR value$[rbp] $LN1@stbi__pnm_: ; 7148 : } - 000ac 48 8d a5 e8 00 + 000ad 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 000b3 5f pop rdi - 000b4 5d pop rbp - 000b5 c3 ret 0 + 000b4 5f pop rdi + 000b5 5d pop rbp + 000b6 c3 ret 0 stbi__pnm_getinteger ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -6331,34 +6334,35 @@ stbi__pnm_isdigit PROC ; COMDAT 00012 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00019 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001e 90 npad 1 ; 7133 : return c >= '0' && c <= '9'; - 0001e 0f be 85 f0 00 + 0001f 0f be 85 f0 00 00 00 movsx eax, BYTE PTR c$[rbp] - 00025 83 f8 30 cmp eax, 48 ; 00000030H - 00028 7c 18 jl SHORT $LN3@stbi__pnm_ - 0002a 0f be 85 f0 00 + 00026 83 f8 30 cmp eax, 48 ; 00000030H + 00029 7c 18 jl SHORT $LN3@stbi__pnm_ + 0002b 0f be 85 f0 00 00 00 movsx eax, BYTE PTR c$[rbp] - 00031 83 f8 39 cmp eax, 57 ; 00000039H - 00034 7f 0c jg SHORT $LN3@stbi__pnm_ - 00036 c7 85 c0 00 00 + 00032 83 f8 39 cmp eax, 57 ; 00000039H + 00035 7f 0c jg SHORT $LN3@stbi__pnm_ + 00037 c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv68[rbp], 1 - 00040 eb 0a jmp SHORT $LN4@stbi__pnm_ + 00041 eb 0a jmp SHORT $LN4@stbi__pnm_ $LN3@stbi__pnm_: - 00042 c7 85 c0 00 00 + 00043 c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv68[rbp], 0 $LN4@stbi__pnm_: - 0004c 8b 85 c0 00 00 + 0004d 8b 85 c0 00 00 00 mov eax, DWORD PTR tv68[rbp] ; 7134 : } - 00052 48 8d a5 d8 00 + 00053 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 00059 5f pop rdi - 0005a 5d pop rbp - 0005b c3 ret 0 + 0005a 5f pop rdi + 0005b 5d pop rbp + 0005c c3 ret 0 stbi__pnm_isdigit ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -6381,98 +6385,99 @@ stbi__pnm_skip_whitespace PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 $LN2@stbi__pnm_: $LN5@stbi__pnm_: ; 7119 : for (;;) { ; 7120 : while (!stbi__at_eof(s) && stbi__pnm_isspace(*c)) - 00024 48 8b 8d e0 00 + 00025 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 0002b e8 00 00 00 00 call stbi__at_eof - 00030 85 c0 test eax, eax - 00032 75 2a jne SHORT $LN6@stbi__pnm_ - 00034 48 8b 85 e8 00 + 0002c e8 00 00 00 00 call stbi__at_eof + 00031 85 c0 test eax, eax + 00033 75 2a jne SHORT $LN6@stbi__pnm_ + 00035 48 8b 85 e8 00 00 00 mov rax, QWORD PTR c$[rbp] - 0003b 0f b6 08 movzx ecx, BYTE PTR [rax] - 0003e e8 00 00 00 00 call stbi__pnm_isspace - 00043 85 c0 test eax, eax - 00045 74 17 je SHORT $LN6@stbi__pnm_ + 0003c 0f b6 08 movzx ecx, BYTE PTR [rax] + 0003f e8 00 00 00 00 call stbi__pnm_isspace + 00044 85 c0 test eax, eax + 00046 74 17 je SHORT $LN6@stbi__pnm_ ; 7121 : *c = (char)stbi__get8(s); - 00047 48 8b 8d e0 00 + 00048 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 0004e e8 00 00 00 00 call stbi__get8 - 00053 48 8b 8d e8 00 + 0004f e8 00 00 00 00 call stbi__get8 + 00054 48 8b 8d e8 00 00 00 mov rcx, QWORD PTR c$[rbp] - 0005a 88 01 mov BYTE PTR [rcx], al - 0005c eb c6 jmp SHORT $LN5@stbi__pnm_ + 0005b 88 01 mov BYTE PTR [rcx], al + 0005d eb c6 jmp SHORT $LN5@stbi__pnm_ $LN6@stbi__pnm_: ; 7122 : ; 7123 : if (stbi__at_eof(s) || *c != '#') - 0005e 48 8b 8d e0 00 + 0005f 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 00065 e8 00 00 00 00 call stbi__at_eof - 0006a 85 c0 test eax, eax - 0006c 75 0f jne SHORT $LN10@stbi__pnm_ - 0006e 48 8b 85 e8 00 + 00066 e8 00 00 00 00 call stbi__at_eof + 0006b 85 c0 test eax, eax + 0006d 75 0f jne SHORT $LN10@stbi__pnm_ + 0006f 48 8b 85 e8 00 00 00 mov rax, QWORD PTR c$[rbp] - 00075 0f be 00 movsx eax, BYTE PTR [rax] - 00078 83 f8 23 cmp eax, 35 ; 00000023H - 0007b 74 02 je SHORT $LN9@stbi__pnm_ + 00076 0f be 00 movsx eax, BYTE PTR [rax] + 00079 83 f8 23 cmp eax, 35 ; 00000023H + 0007c 74 02 je SHORT $LN9@stbi__pnm_ $LN10@stbi__pnm_: ; 7124 : break; - 0007d eb 4a jmp SHORT $LN3@stbi__pnm_ + 0007e eb 4a jmp SHORT $LN3@stbi__pnm_ $LN9@stbi__pnm_: $LN7@stbi__pnm_: ; 7125 : ; 7126 : while (!stbi__at_eof(s) && *c != '\n' && *c != '\r') - 0007f 48 8b 8d e0 00 + 00080 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 00086 e8 00 00 00 00 call stbi__at_eof - 0008b 85 c0 test eax, eax - 0008d 75 35 jne SHORT $LN8@stbi__pnm_ - 0008f 48 8b 85 e8 00 + 00087 e8 00 00 00 00 call stbi__at_eof + 0008c 85 c0 test eax, eax + 0008e 75 35 jne SHORT $LN8@stbi__pnm_ + 00090 48 8b 85 e8 00 00 00 mov rax, QWORD PTR c$[rbp] - 00096 0f be 00 movsx eax, BYTE PTR [rax] - 00099 83 f8 0a cmp eax, 10 - 0009c 74 26 je SHORT $LN8@stbi__pnm_ - 0009e 48 8b 85 e8 00 + 00097 0f be 00 movsx eax, BYTE PTR [rax] + 0009a 83 f8 0a cmp eax, 10 + 0009d 74 26 je SHORT $LN8@stbi__pnm_ + 0009f 48 8b 85 e8 00 00 00 mov rax, QWORD PTR c$[rbp] - 000a5 0f be 00 movsx eax, BYTE PTR [rax] - 000a8 83 f8 0d cmp eax, 13 - 000ab 74 17 je SHORT $LN8@stbi__pnm_ + 000a6 0f be 00 movsx eax, BYTE PTR [rax] + 000a9 83 f8 0d cmp eax, 13 + 000ac 74 17 je SHORT $LN8@stbi__pnm_ ; 7127 : *c = (char)stbi__get8(s); - 000ad 48 8b 8d e0 00 + 000ae 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 000b4 e8 00 00 00 00 call stbi__get8 - 000b9 48 8b 8d e8 00 + 000b5 e8 00 00 00 00 call stbi__get8 + 000ba 48 8b 8d e8 00 00 00 mov rcx, QWORD PTR c$[rbp] - 000c0 88 01 mov BYTE PTR [rcx], al - 000c2 eb bb jmp SHORT $LN7@stbi__pnm_ + 000c1 88 01 mov BYTE PTR [rcx], al + 000c3 eb bb jmp SHORT $LN7@stbi__pnm_ $LN8@stbi__pnm_: ; 7128 : } - 000c4 e9 5b ff ff ff jmp $LN2@stbi__pnm_ + 000c5 e9 5b ff ff ff jmp $LN2@stbi__pnm_ $LN3@stbi__pnm_: ; 7129 : } - 000c9 48 8d a5 c8 00 + 000ca 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 000d0 5f pop rdi - 000d1 5d pop rbp - 000d2 c3 ret 0 + 000d1 5f pop rdi + 000d2 5d pop rbp + 000d3 c3 ret 0 stbi__pnm_skip_whitespace ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -6494,50 +6499,51 @@ stbi__pnm_isspace PROC ; COMDAT 00012 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00019 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001e 90 npad 1 ; 7114 : return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'; - 0001e 0f be 85 f0 00 + 0001f 0f be 85 f0 00 00 00 movsx eax, BYTE PTR c$[rbp] - 00025 83 f8 20 cmp eax, 32 ; 00000020H - 00028 74 48 je SHORT $LN3@stbi__pnm_ - 0002a 0f be 85 f0 00 + 00026 83 f8 20 cmp eax, 32 ; 00000020H + 00029 74 48 je SHORT $LN3@stbi__pnm_ + 0002b 0f be 85 f0 00 00 00 movsx eax, BYTE PTR c$[rbp] - 00031 83 f8 09 cmp eax, 9 - 00034 74 3c je SHORT $LN3@stbi__pnm_ - 00036 0f be 85 f0 00 + 00032 83 f8 09 cmp eax, 9 + 00035 74 3c je SHORT $LN3@stbi__pnm_ + 00037 0f be 85 f0 00 00 00 movsx eax, BYTE PTR c$[rbp] - 0003d 83 f8 0a cmp eax, 10 - 00040 74 30 je SHORT $LN3@stbi__pnm_ - 00042 0f be 85 f0 00 + 0003e 83 f8 0a cmp eax, 10 + 00041 74 30 je SHORT $LN3@stbi__pnm_ + 00043 0f be 85 f0 00 00 00 movsx eax, BYTE PTR c$[rbp] - 00049 83 f8 0b cmp eax, 11 - 0004c 74 24 je SHORT $LN3@stbi__pnm_ - 0004e 0f be 85 f0 00 + 0004a 83 f8 0b cmp eax, 11 + 0004d 74 24 je SHORT $LN3@stbi__pnm_ + 0004f 0f be 85 f0 00 00 00 movsx eax, BYTE PTR c$[rbp] - 00055 83 f8 0c cmp eax, 12 - 00058 74 18 je SHORT $LN3@stbi__pnm_ - 0005a 0f be 85 f0 00 + 00056 83 f8 0c cmp eax, 12 + 00059 74 18 je SHORT $LN3@stbi__pnm_ + 0005b 0f be 85 f0 00 00 00 movsx eax, BYTE PTR c$[rbp] - 00061 83 f8 0d cmp eax, 13 - 00064 74 0c je SHORT $LN3@stbi__pnm_ - 00066 c7 85 c0 00 00 + 00062 83 f8 0d cmp eax, 13 + 00065 74 0c je SHORT $LN3@stbi__pnm_ + 00067 c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv76[rbp], 0 - 00070 eb 0a jmp SHORT $LN4@stbi__pnm_ + 00071 eb 0a jmp SHORT $LN4@stbi__pnm_ $LN3@stbi__pnm_: - 00072 c7 85 c0 00 00 + 00073 c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv76[rbp], 1 $LN4@stbi__pnm_: - 0007c 8b 85 c0 00 00 + 0007d 8b 85 c0 00 00 00 mov eax, DWORD PTR tv76[rbp] ; 7115 : } - 00082 48 8d a5 d8 00 + 00083 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 00089 5f pop rdi - 0008a 5d pop rbp - 0008b c3 ret 0 + 0008a 5f pop rdi + 0008b 5d pop rbp + 0008c c3 ret 0 stbi__pnm_isspace ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -6564,233 +6570,234 @@ stbi__hdr_convert PROC ; COMDAT 0001d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00024 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00029 90 npad 1 ; 6698 : if (input[3] != 0) { - 00029 b8 01 00 00 00 mov eax, 1 - 0002e 48 6b c0 03 imul rax, rax, 3 - 00032 48 8b 8d 08 01 + 0002a b8 01 00 00 00 mov eax, 1 + 0002f 48 6b c0 03 imul rax, rax, 3 + 00033 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR input$[rbp] - 00039 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0003d 85 c0 test eax, eax - 0003f 0f 84 8d 01 00 + 0003a 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0003e 85 c0 test eax, eax + 00040 0f 84 8d 01 00 00 je $LN4@stbi__hdr_ ; 6699 : float f1; ; 6700 : // Exponent ; 6701 : f1 = (float)ldexp(1.0f, input[3] - (int)(128 + 8)); - 00045 b8 01 00 00 00 mov eax, 1 - 0004a 48 6b c0 03 imul rax, rax, 3 - 0004e 48 8b 8d 08 01 + 00046 b8 01 00 00 00 mov eax, 1 + 0004b 48 6b c0 03 imul rax, rax, 3 + 0004f 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR input$[rbp] - 00055 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00059 2d 88 00 00 00 sub eax, 136 ; 00000088H - 0005e 8b d0 mov edx, eax - 00060 f2 0f 10 05 00 + 00056 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0005a 2d 88 00 00 00 sub eax, 136 ; 00000088H + 0005f 8b d0 mov edx, eax + 00061 f2 0f 10 05 00 00 00 00 movsd xmm0, QWORD PTR __real@3ff0000000000000 - 00068 ff 15 00 00 00 + 00069 ff 15 00 00 00 00 call QWORD PTR __imp_ldexp - 0006e f2 0f 5a c0 cvtsd2ss xmm0, xmm0 - 00072 f3 0f 11 45 04 movss DWORD PTR f1$1[rbp], xmm0 + 0006f f2 0f 5a c0 cvtsd2ss xmm0, xmm0 + 00073 f3 0f 11 45 04 movss DWORD PTR f1$1[rbp], xmm0 ; 6702 : if (req_comp <= 2) - 00077 83 bd 10 01 00 + 00078 83 bd 10 01 00 00 02 cmp DWORD PTR req_comp$[rbp], 2 - 0007e 7f 6b jg SHORT $LN6@stbi__hdr_ + 0007f 7f 6b jg SHORT $LN6@stbi__hdr_ ; 6703 : output[0] = (input[0] + input[1] + input[2]) * f1 / 3; - 00080 b8 01 00 00 00 mov eax, 1 - 00085 48 6b c0 00 imul rax, rax, 0 - 00089 48 8b 8d 08 01 + 00081 b8 01 00 00 00 mov eax, 1 + 00086 48 6b c0 00 imul rax, rax, 0 + 0008a 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR input$[rbp] - 00090 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00094 b9 01 00 00 00 mov ecx, 1 - 00099 48 6b c9 01 imul rcx, rcx, 1 - 0009d 48 8b 95 08 01 + 00091 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00095 b9 01 00 00 00 mov ecx, 1 + 0009a 48 6b c9 01 imul rcx, rcx, 1 + 0009e 48 8b 95 08 01 00 00 mov rdx, QWORD PTR input$[rbp] - 000a4 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 000a8 03 c1 add eax, ecx - 000aa b9 01 00 00 00 mov ecx, 1 - 000af 48 6b c9 02 imul rcx, rcx, 2 - 000b3 48 8b 95 08 01 + 000a5 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 000a9 03 c1 add eax, ecx + 000ab b9 01 00 00 00 mov ecx, 1 + 000b0 48 6b c9 02 imul rcx, rcx, 2 + 000b4 48 8b 95 08 01 00 00 mov rdx, QWORD PTR input$[rbp] - 000ba 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 000be 03 c1 add eax, ecx - 000c0 f3 0f 2a c0 cvtsi2ss xmm0, eax - 000c4 f3 0f 59 45 04 mulss xmm0, DWORD PTR f1$1[rbp] - 000c9 f3 0f 5e 05 00 + 000bb 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 000bf 03 c1 add eax, ecx + 000c1 f3 0f 2a c0 cvtsi2ss xmm0, eax + 000c5 f3 0f 59 45 04 mulss xmm0, DWORD PTR f1$1[rbp] + 000ca f3 0f 5e 05 00 00 00 00 divss xmm0, DWORD PTR __real@40400000 - 000d1 b8 04 00 00 00 mov eax, 4 - 000d6 48 6b c0 00 imul rax, rax, 0 - 000da 48 8b 8d 00 01 + 000d2 b8 04 00 00 00 mov eax, 4 + 000d7 48 6b c0 00 imul rax, rax, 0 + 000db 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR output$[rbp] - 000e1 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 - 000e6 e9 96 00 00 00 jmp $LN7@stbi__hdr_ + 000e2 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 + 000e7 e9 96 00 00 00 jmp $LN7@stbi__hdr_ $LN6@stbi__hdr_: ; 6704 : else { ; 6705 : output[0] = input[0] * f1; - 000eb b8 01 00 00 00 mov eax, 1 - 000f0 48 6b c0 00 imul rax, rax, 0 - 000f4 48 8b 8d 08 01 + 000ec b8 01 00 00 00 mov eax, 1 + 000f1 48 6b c0 00 imul rax, rax, 0 + 000f5 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR input$[rbp] - 000fb 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 000ff f3 0f 2a c0 cvtsi2ss xmm0, eax - 00103 f3 0f 59 45 04 mulss xmm0, DWORD PTR f1$1[rbp] - 00108 b8 04 00 00 00 mov eax, 4 - 0010d 48 6b c0 00 imul rax, rax, 0 - 00111 48 8b 8d 00 01 + 000fc 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00100 f3 0f 2a c0 cvtsi2ss xmm0, eax + 00104 f3 0f 59 45 04 mulss xmm0, DWORD PTR f1$1[rbp] + 00109 b8 04 00 00 00 mov eax, 4 + 0010e 48 6b c0 00 imul rax, rax, 0 + 00112 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR output$[rbp] - 00118 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 + 00119 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 ; 6706 : output[1] = input[1] * f1; - 0011d b8 01 00 00 00 mov eax, 1 - 00122 48 6b c0 01 imul rax, rax, 1 - 00126 48 8b 8d 08 01 + 0011e b8 01 00 00 00 mov eax, 1 + 00123 48 6b c0 01 imul rax, rax, 1 + 00127 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR input$[rbp] - 0012d 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00131 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00135 f3 0f 59 45 04 mulss xmm0, DWORD PTR f1$1[rbp] - 0013a b8 04 00 00 00 mov eax, 4 - 0013f 48 6b c0 01 imul rax, rax, 1 - 00143 48 8b 8d 00 01 + 0012e 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00132 f3 0f 2a c0 cvtsi2ss xmm0, eax + 00136 f3 0f 59 45 04 mulss xmm0, DWORD PTR f1$1[rbp] + 0013b b8 04 00 00 00 mov eax, 4 + 00140 48 6b c0 01 imul rax, rax, 1 + 00144 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR output$[rbp] - 0014a f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 + 0014b f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 ; 6707 : output[2] = input[2] * f1; - 0014f b8 01 00 00 00 mov eax, 1 - 00154 48 6b c0 02 imul rax, rax, 2 - 00158 48 8b 8d 08 01 + 00150 b8 01 00 00 00 mov eax, 1 + 00155 48 6b c0 02 imul rax, rax, 2 + 00159 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR input$[rbp] - 0015f 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00163 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00167 f3 0f 59 45 04 mulss xmm0, DWORD PTR f1$1[rbp] - 0016c b8 04 00 00 00 mov eax, 4 - 00171 48 6b c0 02 imul rax, rax, 2 - 00175 48 8b 8d 00 01 + 00160 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00164 f3 0f 2a c0 cvtsi2ss xmm0, eax + 00168 f3 0f 59 45 04 mulss xmm0, DWORD PTR f1$1[rbp] + 0016d b8 04 00 00 00 mov eax, 4 + 00172 48 6b c0 02 imul rax, rax, 2 + 00176 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR output$[rbp] - 0017c f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 + 0017d f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 $LN7@stbi__hdr_: ; 6708 : } ; 6709 : if (req_comp == 2) output[1] = 1; - 00181 83 bd 10 01 00 + 00182 83 bd 10 01 00 00 02 cmp DWORD PTR req_comp$[rbp], 2 - 00188 75 1d jne SHORT $LN8@stbi__hdr_ - 0018a b8 04 00 00 00 mov eax, 4 - 0018f 48 6b c0 01 imul rax, rax, 1 - 00193 48 8b 8d 00 01 + 00189 75 1d jne SHORT $LN8@stbi__hdr_ + 0018b b8 04 00 00 00 mov eax, 4 + 00190 48 6b c0 01 imul rax, rax, 1 + 00194 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR output$[rbp] - 0019a f3 0f 10 05 00 + 0019b f3 0f 10 05 00 00 00 00 movss xmm0, DWORD PTR __real@3f800000 - 001a2 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 + 001a3 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 $LN8@stbi__hdr_: ; 6710 : if (req_comp == 4) output[3] = 1; - 001a7 83 bd 10 01 00 + 001a8 83 bd 10 01 00 00 04 cmp DWORD PTR req_comp$[rbp], 4 - 001ae 75 1d jne SHORT $LN9@stbi__hdr_ - 001b0 b8 04 00 00 00 mov eax, 4 - 001b5 48 6b c0 03 imul rax, rax, 3 - 001b9 48 8b 8d 00 01 + 001af 75 1d jne SHORT $LN9@stbi__hdr_ + 001b1 b8 04 00 00 00 mov eax, 4 + 001b6 48 6b c0 03 imul rax, rax, 3 + 001ba 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR output$[rbp] - 001c0 f3 0f 10 05 00 + 001c1 f3 0f 10 05 00 00 00 00 movss xmm0, DWORD PTR __real@3f800000 - 001c8 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 + 001c9 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 $LN9@stbi__hdr_: ; 6711 : } - 001cd e9 d5 00 00 00 jmp $LN5@stbi__hdr_ + 001ce e9 d5 00 00 00 jmp $LN5@stbi__hdr_ $LN4@stbi__hdr_: ; 6712 : else { ; 6713 : switch (req_comp) { - 001d2 8b 85 10 01 00 + 001d3 8b 85 10 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 001d8 89 85 d4 00 00 + 001d9 89 85 d4 00 00 00 mov DWORD PTR tv152[rbp], eax - 001de 83 bd d4 00 00 + 001df 83 bd d4 00 00 00 01 cmp DWORD PTR tv152[rbp], 1 - 001e5 0f 84 a4 00 00 + 001e6 0f 84 a4 00 00 00 je $LN13@stbi__hdr_ - 001eb 83 bd d4 00 00 + 001ec 83 bd d4 00 00 00 02 cmp DWORD PTR tv152[rbp], 2 - 001f2 74 7e je SHORT $LN12@stbi__hdr_ - 001f4 83 bd d4 00 00 + 001f3 74 7e je SHORT $LN12@stbi__hdr_ + 001f5 83 bd d4 00 00 00 03 cmp DWORD PTR tv152[rbp], 3 - 001fb 74 2b je SHORT $LN11@stbi__hdr_ - 001fd 83 bd d4 00 00 + 001fc 74 2b je SHORT $LN11@stbi__hdr_ + 001fe 83 bd d4 00 00 00 04 cmp DWORD PTR tv152[rbp], 4 - 00204 74 05 je SHORT $LN10@stbi__hdr_ - 00206 e9 9c 00 00 00 jmp $LN2@stbi__hdr_ + 00205 74 05 je SHORT $LN10@stbi__hdr_ + 00207 e9 9c 00 00 00 jmp $LN2@stbi__hdr_ $LN10@stbi__hdr_: ; 6714 : case 4: output[3] = 1; /* fallthrough */ - 0020b b8 04 00 00 00 mov eax, 4 - 00210 48 6b c0 03 imul rax, rax, 3 - 00214 48 8b 8d 00 01 + 0020c b8 04 00 00 00 mov eax, 4 + 00211 48 6b c0 03 imul rax, rax, 3 + 00215 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR output$[rbp] - 0021b f3 0f 10 05 00 + 0021c f3 0f 10 05 00 00 00 00 movss xmm0, DWORD PTR __real@3f800000 - 00223 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 + 00224 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 $LN11@stbi__hdr_: ; 6715 : case 3: output[0] = output[1] = output[2] = 0; - 00228 b8 04 00 00 00 mov eax, 4 - 0022d 48 6b c0 02 imul rax, rax, 2 - 00231 48 8b 8d 00 01 + 00229 b8 04 00 00 00 mov eax, 4 + 0022e 48 6b c0 02 imul rax, rax, 2 + 00232 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR output$[rbp] - 00238 0f 57 c0 xorps xmm0, xmm0 - 0023b f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 - 00240 b8 04 00 00 00 mov eax, 4 - 00245 48 6b c0 01 imul rax, rax, 1 - 00249 48 8b 8d 00 01 + 00239 0f 57 c0 xorps xmm0, xmm0 + 0023c f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 + 00241 b8 04 00 00 00 mov eax, 4 + 00246 48 6b c0 01 imul rax, rax, 1 + 0024a 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR output$[rbp] - 00250 0f 57 c0 xorps xmm0, xmm0 - 00253 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 - 00258 b8 04 00 00 00 mov eax, 4 - 0025d 48 6b c0 00 imul rax, rax, 0 - 00261 48 8b 8d 00 01 + 00251 0f 57 c0 xorps xmm0, xmm0 + 00254 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 + 00259 b8 04 00 00 00 mov eax, 4 + 0025e 48 6b c0 00 imul rax, rax, 0 + 00262 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR output$[rbp] - 00268 0f 57 c0 xorps xmm0, xmm0 - 0026b f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 + 00269 0f 57 c0 xorps xmm0, xmm0 + 0026c f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 ; 6716 : break; - 00270 eb 35 jmp SHORT $LN2@stbi__hdr_ + 00271 eb 35 jmp SHORT $LN2@stbi__hdr_ $LN12@stbi__hdr_: ; 6717 : case 2: output[1] = 1; /* fallthrough */ - 00272 b8 04 00 00 00 mov eax, 4 - 00277 48 6b c0 01 imul rax, rax, 1 - 0027b 48 8b 8d 00 01 + 00273 b8 04 00 00 00 mov eax, 4 + 00278 48 6b c0 01 imul rax, rax, 1 + 0027c 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR output$[rbp] - 00282 f3 0f 10 05 00 + 00283 f3 0f 10 05 00 00 00 00 movss xmm0, DWORD PTR __real@3f800000 - 0028a f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 + 0028b f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 $LN13@stbi__hdr_: ; 6718 : case 1: output[0] = 0; - 0028f b8 04 00 00 00 mov eax, 4 - 00294 48 6b c0 00 imul rax, rax, 0 - 00298 48 8b 8d 00 01 + 00290 b8 04 00 00 00 mov eax, 4 + 00295 48 6b c0 00 imul rax, rax, 0 + 00299 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR output$[rbp] - 0029f 0f 57 c0 xorps xmm0, xmm0 - 002a2 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 + 002a0 0f 57 c0 xorps xmm0, xmm0 + 002a3 f3 0f 11 04 01 movss DWORD PTR [rcx+rax], xmm0 $LN2@stbi__hdr_: $LN5@stbi__hdr_: @@ -6799,11 +6806,11 @@ $LN5@stbi__hdr_: ; 6721 : } ; 6722 : } - 002a7 48 8d a5 e8 00 + 002a8 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 002ae 5f pop rdi - 002af 5d pop rbp - 002b0 c3 ret 0 + 002af 5f pop rdi + 002b0 5d pop rbp + 002b1 c3 ret 0 stbi__hdr_convert ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -6828,113 +6835,114 @@ stbi__hdr_gettoken PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 6676 : int len = 0; - 00024 c7 45 04 00 00 + 00025 c7 45 04 00 00 00 00 mov DWORD PTR len$[rbp], 0 ; 6677 : char c = '\0'; - 0002b c6 45 24 00 mov BYTE PTR c$[rbp], 0 + 0002c c6 45 24 00 mov BYTE PTR c$[rbp], 0 ; 6678 : ; 6679 : c = (char)stbi__get8(z); - 0002f 48 8b 8d 20 01 + 00030 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00036 e8 00 00 00 00 call stbi__get8 - 0003b 88 45 24 mov BYTE PTR c$[rbp], al + 00037 e8 00 00 00 00 call stbi__get8 + 0003c 88 45 24 mov BYTE PTR c$[rbp], al $LN2@stbi__hdr_: ; 6680 : ; 6681 : while (!stbi__at_eof(z) && c != '\n') { - 0003e 48 8b 8d 20 01 + 0003f 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00045 e8 00 00 00 00 call stbi__at_eof - 0004a 85 c0 test eax, eax - 0004c 75 65 jne SHORT $LN3@stbi__hdr_ - 0004e 0f be 45 24 movsx eax, BYTE PTR c$[rbp] - 00052 83 f8 0a cmp eax, 10 - 00055 74 5c je SHORT $LN3@stbi__hdr_ + 00046 e8 00 00 00 00 call stbi__at_eof + 0004b 85 c0 test eax, eax + 0004d 75 65 jne SHORT $LN3@stbi__hdr_ + 0004f 0f be 45 24 movsx eax, BYTE PTR c$[rbp] + 00053 83 f8 0a cmp eax, 10 + 00056 74 5c je SHORT $LN3@stbi__hdr_ ; 6682 : buffer[len++] = c; - 00057 48 63 45 04 movsxd rax, DWORD PTR len$[rbp] - 0005b 48 8b 8d 28 01 + 00058 48 63 45 04 movsxd rax, DWORD PTR len$[rbp] + 0005c 48 8b 8d 28 01 00 00 mov rcx, QWORD PTR buffer$[rbp] - 00062 0f b6 55 24 movzx edx, BYTE PTR c$[rbp] - 00066 88 14 01 mov BYTE PTR [rcx+rax], dl - 00069 8b 45 04 mov eax, DWORD PTR len$[rbp] - 0006c ff c0 inc eax - 0006e 89 45 04 mov DWORD PTR len$[rbp], eax + 00063 0f b6 55 24 movzx edx, BYTE PTR c$[rbp] + 00067 88 14 01 mov BYTE PTR [rcx+rax], dl + 0006a 8b 45 04 mov eax, DWORD PTR len$[rbp] + 0006d ff c0 inc eax + 0006f 89 45 04 mov DWORD PTR len$[rbp], eax ; 6683 : if (len == STBI__HDR_BUFLEN - 1) { - 00071 81 7d 04 ff 03 + 00072 81 7d 04 ff 03 00 00 cmp DWORD PTR len$[rbp], 1023 ; 000003ffH - 00078 75 28 jne SHORT $LN6@stbi__hdr_ + 00079 75 28 jne SHORT $LN6@stbi__hdr_ $LN4@stbi__hdr_: ; 6684 : // flush to end of line ; 6685 : while (!stbi__at_eof(z) && stbi__get8(z) != '\n') - 0007a 48 8b 8d 20 01 + 0007b 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00081 e8 00 00 00 00 call stbi__at_eof - 00086 85 c0 test eax, eax - 00088 75 16 jne SHORT $LN5@stbi__hdr_ - 0008a 48 8b 8d 20 01 + 00082 e8 00 00 00 00 call stbi__at_eof + 00087 85 c0 test eax, eax + 00089 75 16 jne SHORT $LN5@stbi__hdr_ + 0008b 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00091 e8 00 00 00 00 call stbi__get8 - 00096 0f b6 c0 movzx eax, al - 00099 83 f8 0a cmp eax, 10 - 0009c 74 02 je SHORT $LN5@stbi__hdr_ + 00092 e8 00 00 00 00 call stbi__get8 + 00097 0f b6 c0 movzx eax, al + 0009a 83 f8 0a cmp eax, 10 + 0009d 74 02 je SHORT $LN5@stbi__hdr_ ; 6686 : ; - 0009e eb da jmp SHORT $LN4@stbi__hdr_ + 0009f eb da jmp SHORT $LN4@stbi__hdr_ $LN5@stbi__hdr_: ; 6687 : break; - 000a0 eb 11 jmp SHORT $LN3@stbi__hdr_ + 000a1 eb 11 jmp SHORT $LN3@stbi__hdr_ $LN6@stbi__hdr_: ; 6688 : } ; 6689 : c = (char)stbi__get8(z); - 000a2 48 8b 8d 20 01 + 000a3 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR z$[rbp] - 000a9 e8 00 00 00 00 call stbi__get8 - 000ae 88 45 24 mov BYTE PTR c$[rbp], al + 000aa e8 00 00 00 00 call stbi__get8 + 000af 88 45 24 mov BYTE PTR c$[rbp], al ; 6690 : } - 000b1 eb 8b jmp SHORT $LN2@stbi__hdr_ + 000b2 eb 8b jmp SHORT $LN2@stbi__hdr_ $LN3@stbi__hdr_: ; 6691 : ; 6692 : buffer[len] = 0; - 000b3 48 63 45 04 movsxd rax, DWORD PTR len$[rbp] - 000b7 48 8b 8d 28 01 + 000b4 48 63 45 04 movsxd rax, DWORD PTR len$[rbp] + 000b8 48 8b 8d 28 01 00 00 mov rcx, QWORD PTR buffer$[rbp] - 000be c6 04 01 00 mov BYTE PTR [rcx+rax], 0 + 000bf c6 04 01 00 mov BYTE PTR [rcx+rax], 0 ; 6693 : return buffer; - 000c2 48 8b 85 28 01 + 000c3 48 8b 85 28 01 00 00 mov rax, QWORD PTR buffer$[rbp] ; 6694 : } - 000c9 48 8d a5 08 01 + 000ca 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000d0 5f pop rdi - 000d1 5d pop rbp - 000d2 c3 ret 0 + 000d1 5f pop rdi + 000d2 5d pop rbp + 000d3 c3 ret 0 stbi__hdr_gettoken ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -6958,64 +6966,66 @@ stbi__hdr_test_core PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 6654 : int i; ; 6655 : for (i = 0; signature[i]; ++i) - 00024 c7 45 04 00 00 + 00025 c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0002b eb 08 jmp SHORT $LN4@stbi__hdr_ + 0002c eb 08 jmp SHORT $LN4@stbi__hdr_ $LN2@stbi__hdr_: - 0002d 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00030 ff c0 inc eax - 00032 89 45 04 mov DWORD PTR i$[rbp], eax + 0002e 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00031 ff c0 inc eax + 00033 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__hdr_: - 00035 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00039 48 8b 8d 08 01 + 00036 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 0003a 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR signature$[rbp] - 00040 0f be 04 01 movsx eax, BYTE PTR [rcx+rax] - 00044 85 c0 test eax, eax - 00046 74 28 je SHORT $LN3@stbi__hdr_ + 00041 0f be 04 01 movsx eax, BYTE PTR [rcx+rax] + 00045 85 c0 test eax, eax + 00047 74 28 je SHORT $LN3@stbi__hdr_ ; 6656 : if (stbi__get8(s) != signature[i]) - 00048 48 8b 8d 00 01 + 00049 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0004f e8 00 00 00 00 call stbi__get8 - 00054 0f b6 c0 movzx eax, al - 00057 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 0005b 48 8b 95 08 01 + 00050 e8 00 00 00 00 call stbi__get8 + 00055 0f b6 c0 movzx eax, al + 00058 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 0005c 48 8b 95 08 01 00 00 mov rdx, QWORD PTR signature$[rbp] - 00062 0f be 0c 0a movsx ecx, BYTE PTR [rdx+rcx] - 00066 3b c1 cmp eax, ecx - 00068 74 04 je SHORT $LN5@stbi__hdr_ + 00063 0f be 0c 0a movsx ecx, BYTE PTR [rdx+rcx] + 00067 3b c1 cmp eax, ecx + 00069 74 04 je SHORT $LN5@stbi__hdr_ ; 6657 : return 0; - 0006a 33 c0 xor eax, eax - 0006c eb 13 jmp SHORT $LN1@stbi__hdr_ + 0006b 33 c0 xor eax, eax + 0006d eb 14 jmp SHORT $LN1@stbi__hdr_ $LN5@stbi__hdr_: - 0006e eb bd jmp SHORT $LN2@stbi__hdr_ + 0006f eb bd jmp SHORT $LN2@stbi__hdr_ $LN3@stbi__hdr_: ; 6658 : stbi__rewind(s); - 00070 48 8b 8d 00 01 + 00071 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00077 e8 00 00 00 00 call stbi__rewind + 00078 e8 00 00 00 00 call stbi__rewind + 0007d 90 npad 1 ; 6659 : return 1; - 0007c b8 01 00 00 00 mov eax, 1 + 0007e b8 01 00 00 00 mov eax, 1 $LN1@stbi__hdr_: ; 6660 : } - 00081 48 8d a5 e8 00 + 00083 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00088 5f pop rdi - 00089 5d pop rbp - 0008a c3 ret 0 + 0008a 5f pop rdi + 0008b 5d pop rbp + 0008c c3 ret 0 stbi__hdr_test_core ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -7041,85 +7051,91 @@ stbi__load_gif_main_outofmem PROC ; COMDAT 0001d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00024 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00029 90 npad 1 ; 6516 : STBI_FREE(g->out); - 00029 48 8b 85 f0 00 + 0002a 48 8b 85 f0 00 00 00 mov rax, QWORD PTR g$[rbp] - 00030 48 8b 48 08 mov rcx, QWORD PTR [rax+8] - 00034 ff 15 00 00 00 + 00031 48 8b 48 08 mov rcx, QWORD PTR [rax+8] + 00035 ff 15 00 00 00 00 call QWORD PTR __imp_free + 0003b 90 npad 1 ; 6517 : STBI_FREE(g->history); - 0003a 48 8b 85 f0 00 + 0003c 48 8b 85 f0 00 00 00 mov rax, QWORD PTR g$[rbp] - 00041 48 8b 48 18 mov rcx, QWORD PTR [rax+24] - 00045 ff 15 00 00 00 + 00043 48 8b 48 18 mov rcx, QWORD PTR [rax+24] + 00047 ff 15 00 00 00 00 call QWORD PTR __imp_free + 0004d 90 npad 1 ; 6518 : STBI_FREE(g->background); - 0004b 48 8b 85 f0 00 + 0004e 48 8b 85 f0 00 00 00 mov rax, QWORD PTR g$[rbp] - 00052 48 8b 48 10 mov rcx, QWORD PTR [rax+16] - 00056 ff 15 00 00 00 + 00055 48 8b 48 10 mov rcx, QWORD PTR [rax+16] + 00059 ff 15 00 00 00 00 call QWORD PTR __imp_free + 0005f 90 npad 1 ; 6519 : ; 6520 : if (out) STBI_FREE(out); - 0005c 48 83 bd f8 00 + 00060 48 83 bd f8 00 00 00 00 cmp QWORD PTR out$[rbp], 0 - 00064 74 0d je SHORT $LN2@stbi__load - 00066 48 8b 8d f8 00 + 00068 74 0e je SHORT $LN2@stbi__load + 0006a 48 8b 8d f8 00 00 00 mov rcx, QWORD PTR out$[rbp] - 0006d ff 15 00 00 00 + 00071 ff 15 00 00 00 00 call QWORD PTR __imp_free + 00077 90 npad 1 $LN2@stbi__load: ; 6521 : if (delays && *delays) STBI_FREE(*delays); - 00073 48 83 bd 00 01 + 00078 48 83 bd 00 01 00 00 00 cmp QWORD PTR delays$[rbp], 0 - 0007b 74 1d je SHORT $LN3@stbi__load - 0007d 48 8b 85 00 01 + 00080 74 1e je SHORT $LN3@stbi__load + 00082 48 8b 85 00 01 00 00 mov rax, QWORD PTR delays$[rbp] - 00084 48 83 38 00 cmp QWORD PTR [rax], 0 - 00088 74 10 je SHORT $LN3@stbi__load - 0008a 48 8b 85 00 01 + 00089 48 83 38 00 cmp QWORD PTR [rax], 0 + 0008d 74 11 je SHORT $LN3@stbi__load + 0008f 48 8b 85 00 01 00 00 mov rax, QWORD PTR delays$[rbp] - 00091 48 8b 08 mov rcx, QWORD PTR [rax] - 00094 ff 15 00 00 00 + 00096 48 8b 08 mov rcx, QWORD PTR [rax] + 00099 ff 15 00 00 00 00 call QWORD PTR __imp_free + 0009f 90 npad 1 $LN3@stbi__load: ; 6522 : return stbi__errpuc("outofmem", "Out of memory"); - 0009a 48 8d 0d 00 00 + 000a0 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 000a1 e8 00 00 00 00 call stbi__err - 000a6 85 c0 test eax, eax - 000a8 74 0d je SHORT $LN5@stbi__load - 000aa 48 c7 85 c0 00 + 000a7 e8 00 00 00 00 call stbi__err + 000ac 85 c0 test eax, eax + 000ae 74 0d je SHORT $LN5@stbi__load + 000b0 48 c7 85 c0 00 00 00 00 00 00 00 mov QWORD PTR tv78[rbp], 0 - 000b5 eb 0b jmp SHORT $LN6@stbi__load + 000bb eb 0b jmp SHORT $LN6@stbi__load $LN5@stbi__load: - 000b7 48 c7 85 c0 00 + 000bd 48 c7 85 c0 00 00 00 00 00 00 00 mov QWORD PTR tv78[rbp], 0 $LN6@stbi__load: - 000c2 48 8b 85 c0 00 + 000c8 48 8b 85 c0 00 00 00 mov rax, QWORD PTR tv78[rbp] ; 6523 : } - 000c9 48 8d a5 d8 00 + 000cf 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 000d0 5f pop rdi - 000d1 5d pop rbp - 000d2 c3 ret 0 + 000d6 5f pop rdi + 000d7 5d pop rbp + 000d8 c3 ret 0 stbi__load_gif_main_outofmem ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -7138,14 +7154,14 @@ h$5 = 260 o$6 = 296 len$7 = 324 ext$8 = 356 -tv296 = 564 tv232 = 564 -tv578 = 568 -tv409 = 568 -tv315 = 568 -tv250 = 568 -tv142 = 568 +tv296 = 564 tv83 = 568 +tv142 = 568 +tv250 = 568 +tv315 = 568 +tv409 = 568 +tv578 = 568 s$ = 608 g$ = 616 comp$ = 624 @@ -7167,6 +7183,7 @@ stbi__gif_load_next PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 6334 : int dispose; ; 6335 : int first_frame; @@ -7177,144 +7194,144 @@ stbi__gif_load_next PROC ; COMDAT ; 6340 : // on first frame, any non-written pixels get the background colour (non-transparent) ; 6341 : first_frame = 0; - 0002e c7 45 24 00 00 + 0002f c7 45 24 00 00 00 00 mov DWORD PTR first_frame$[rbp], 0 ; 6342 : if (g->out == 0) { - 00035 48 8b 85 68 02 + 00036 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 0003c 48 83 78 08 00 cmp QWORD PTR [rax+8], 0 - 00041 0f 85 a2 01 00 + 0003d 48 83 78 08 00 cmp QWORD PTR [rax+8], 0 + 00042 0f 85 a5 01 00 00 jne $LN18@stbi__gif_ ; 6343 : if (!stbi__gif_header(s, g, comp, 0)) return 0; // stbi__g_failure_reason set by stbi__gif_header - 00047 45 33 c9 xor r9d, r9d - 0004a 4c 8b 85 70 02 + 00048 45 33 c9 xor r9d, r9d + 0004b 4c 8b 85 70 02 00 00 mov r8, QWORD PTR comp$[rbp] - 00051 48 8b 95 68 02 + 00052 48 8b 95 68 02 00 00 mov rdx, QWORD PTR g$[rbp] - 00058 48 8b 8d 60 02 + 00059 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 0005f e8 00 00 00 00 call stbi__gif_header - 00064 85 c0 test eax, eax - 00066 75 07 jne SHORT $LN20@stbi__gif_ - 00068 33 c0 xor eax, eax - 0006a e9 56 09 00 00 jmp $LN1@stbi__gif_ + 00060 e8 00 00 00 00 call stbi__gif_header + 00065 85 c0 test eax, eax + 00067 75 07 jne SHORT $LN20@stbi__gif_ + 00069 33 c0 xor eax, eax + 0006b e9 66 09 00 00 jmp $LN1@stbi__gif_ $LN20@stbi__gif_: ; 6344 : if (!stbi__mad3sizes_valid(4, g->w, g->h, 0)) - 0006f 45 33 c9 xor r9d, r9d - 00072 48 8b 85 68 02 + 00070 45 33 c9 xor r9d, r9d + 00073 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00079 44 8b 40 04 mov r8d, DWORD PTR [rax+4] - 0007d 48 8b 85 68 02 + 0007a 44 8b 40 04 mov r8d, DWORD PTR [rax+4] + 0007e 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00084 8b 10 mov edx, DWORD PTR [rax] - 00086 b9 04 00 00 00 mov ecx, 4 - 0008b e8 00 00 00 00 call stbi__mad3sizes_valid - 00090 85 c0 test eax, eax - 00092 75 34 jne SHORT $LN21@stbi__gif_ + 00085 8b 10 mov edx, DWORD PTR [rax] + 00087 b9 04 00 00 00 mov ecx, 4 + 0008c e8 00 00 00 00 call stbi__mad3sizes_valid + 00091 85 c0 test eax, eax + 00093 75 34 jne SHORT $LN21@stbi__gif_ ; 6345 : return stbi__errpuc("too large", "GIF image is too large"); - 00094 48 8d 0d 00 00 + 00095 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 0009b e8 00 00 00 00 call stbi__err - 000a0 85 c0 test eax, eax - 000a2 74 0d je SHORT $LN55@stbi__gif_ - 000a4 48 c7 85 38 02 + 0009c e8 00 00 00 00 call stbi__err + 000a1 85 c0 test eax, eax + 000a3 74 0d je SHORT $LN55@stbi__gif_ + 000a5 48 c7 85 38 02 00 00 00 00 00 00 mov QWORD PTR tv83[rbp], 0 - 000af eb 0b jmp SHORT $LN56@stbi__gif_ + 000b0 eb 0b jmp SHORT $LN56@stbi__gif_ $LN55@stbi__gif_: - 000b1 48 c7 85 38 02 + 000b2 48 c7 85 38 02 00 00 00 00 00 00 mov QWORD PTR tv83[rbp], 0 $LN56@stbi__gif_: - 000bc 48 8b 85 38 02 + 000bd 48 8b 85 38 02 00 00 mov rax, QWORD PTR tv83[rbp] - 000c3 e9 fd 08 00 00 jmp $LN1@stbi__gif_ + 000c4 e9 0d 09 00 00 jmp $LN1@stbi__gif_ $LN21@stbi__gif_: ; 6346 : pcount = g->w * g->h; - 000c8 48 8b 85 68 02 + 000c9 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 000cf 48 8b 8d 68 02 + 000d0 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 000d6 8b 00 mov eax, DWORD PTR [rax] - 000d8 0f af 41 04 imul eax, DWORD PTR [rcx+4] - 000dc 89 45 64 mov DWORD PTR pcount$[rbp], eax + 000d7 8b 00 mov eax, DWORD PTR [rax] + 000d9 0f af 41 04 imul eax, DWORD PTR [rcx+4] + 000dd 89 45 64 mov DWORD PTR pcount$[rbp], eax ; 6347 : g->out = (stbi_uc*)stbi__malloc(4 * pcount); - 000df 8b 45 64 mov eax, DWORD PTR pcount$[rbp] - 000e2 c1 e0 02 shl eax, 2 - 000e5 48 98 cdqe - 000e7 48 8b c8 mov rcx, rax - 000ea e8 00 00 00 00 call stbi__malloc - 000ef 48 8b 8d 68 02 + 000e0 8b 45 64 mov eax, DWORD PTR pcount$[rbp] + 000e3 c1 e0 02 shl eax, 2 + 000e6 48 98 cdqe + 000e8 48 8b c8 mov rcx, rax + 000eb e8 00 00 00 00 call stbi__malloc + 000f0 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 000f6 48 89 41 08 mov QWORD PTR [rcx+8], rax + 000f7 48 89 41 08 mov QWORD PTR [rcx+8], rax ; 6348 : g->background = (stbi_uc*)stbi__malloc(4 * pcount); - 000fa 8b 45 64 mov eax, DWORD PTR pcount$[rbp] - 000fd c1 e0 02 shl eax, 2 - 00100 48 98 cdqe - 00102 48 8b c8 mov rcx, rax - 00105 e8 00 00 00 00 call stbi__malloc - 0010a 48 8b 8d 68 02 + 000fb 8b 45 64 mov eax, DWORD PTR pcount$[rbp] + 000fe c1 e0 02 shl eax, 2 + 00101 48 98 cdqe + 00103 48 8b c8 mov rcx, rax + 00106 e8 00 00 00 00 call stbi__malloc + 0010b 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00111 48 89 41 10 mov QWORD PTR [rcx+16], rax + 00112 48 89 41 10 mov QWORD PTR [rcx+16], rax ; 6349 : g->history = (stbi_uc*)stbi__malloc(pcount); - 00115 48 63 45 64 movsxd rax, DWORD PTR pcount$[rbp] - 00119 48 8b c8 mov rcx, rax - 0011c e8 00 00 00 00 call stbi__malloc - 00121 48 8b 8d 68 02 + 00116 48 63 45 64 movsxd rax, DWORD PTR pcount$[rbp] + 0011a 48 8b c8 mov rcx, rax + 0011d e8 00 00 00 00 call stbi__malloc + 00122 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00128 48 89 41 18 mov QWORD PTR [rcx+24], rax + 00129 48 89 41 18 mov QWORD PTR [rcx+24], rax ; 6350 : if (!g->out || !g->background || !g->history) - 0012c 48 8b 85 68 02 + 0012d 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00133 48 83 78 08 00 cmp QWORD PTR [rax+8], 0 - 00138 74 1c je SHORT $LN23@stbi__gif_ - 0013a 48 8b 85 68 02 + 00134 48 83 78 08 00 cmp QWORD PTR [rax+8], 0 + 00139 74 1c je SHORT $LN23@stbi__gif_ + 0013b 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00141 48 83 78 10 00 cmp QWORD PTR [rax+16], 0 - 00146 74 0e je SHORT $LN23@stbi__gif_ - 00148 48 8b 85 68 02 + 00142 48 83 78 10 00 cmp QWORD PTR [rax+16], 0 + 00147 74 0e je SHORT $LN23@stbi__gif_ + 00149 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 0014f 48 83 78 18 00 cmp QWORD PTR [rax+24], 0 - 00154 75 34 jne SHORT $LN22@stbi__gif_ + 00150 48 83 78 18 00 cmp QWORD PTR [rax+24], 0 + 00155 75 34 jne SHORT $LN22@stbi__gif_ $LN23@stbi__gif_: ; 6351 : return stbi__errpuc("outofmem", "Out of memory"); - 00156 48 8d 0d 00 00 + 00157 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 0015d e8 00 00 00 00 call stbi__err - 00162 85 c0 test eax, eax - 00164 74 0d je SHORT $LN57@stbi__gif_ - 00166 48 c7 85 38 02 + 0015e e8 00 00 00 00 call stbi__err + 00163 85 c0 test eax, eax + 00165 74 0d je SHORT $LN57@stbi__gif_ + 00167 48 c7 85 38 02 00 00 00 00 00 00 mov QWORD PTR tv142[rbp], 0 - 00171 eb 0b jmp SHORT $LN58@stbi__gif_ + 00172 eb 0b jmp SHORT $LN58@stbi__gif_ $LN57@stbi__gif_: - 00173 48 c7 85 38 02 + 00174 48 c7 85 38 02 00 00 00 00 00 00 mov QWORD PTR tv142[rbp], 0 $LN58@stbi__gif_: - 0017e 48 8b 85 38 02 + 0017f 48 8b 85 38 02 00 00 mov rax, QWORD PTR tv142[rbp] - 00185 e9 3b 08 00 00 jmp $LN1@stbi__gif_ + 00186 e9 4b 08 00 00 jmp $LN1@stbi__gif_ $LN22@stbi__gif_: ; 6352 : @@ -7323,81 +7340,84 @@ $LN22@stbi__gif_: ; 6355 : // color refers to the color that was there the previous frame. ; 6356 : memset(g->out, 0x00, 4 * pcount); - 0018a 8b 45 64 mov eax, DWORD PTR pcount$[rbp] - 0018d c1 e0 02 shl eax, 2 - 00190 48 98 cdqe - 00192 4c 8b c0 mov r8, rax - 00195 33 d2 xor edx, edx - 00197 48 8b 85 68 02 + 0018b 8b 45 64 mov eax, DWORD PTR pcount$[rbp] + 0018e c1 e0 02 shl eax, 2 + 00191 48 98 cdqe + 00193 4c 8b c0 mov r8, rax + 00196 33 d2 xor edx, edx + 00198 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 0019e 48 8b 48 08 mov rcx, QWORD PTR [rax+8] - 001a2 e8 00 00 00 00 call memset + 0019f 48 8b 48 08 mov rcx, QWORD PTR [rax+8] + 001a3 e8 00 00 00 00 call memset + 001a8 90 npad 1 ; 6357 : memset(g->background, 0x00, 4 * pcount); // state of the background (starts transparent) - 001a7 8b 45 64 mov eax, DWORD PTR pcount$[rbp] - 001aa c1 e0 02 shl eax, 2 - 001ad 48 98 cdqe - 001af 4c 8b c0 mov r8, rax - 001b2 33 d2 xor edx, edx - 001b4 48 8b 85 68 02 + 001a9 8b 45 64 mov eax, DWORD PTR pcount$[rbp] + 001ac c1 e0 02 shl eax, 2 + 001af 48 98 cdqe + 001b1 4c 8b c0 mov r8, rax + 001b4 33 d2 xor edx, edx + 001b6 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 001bb 48 8b 48 10 mov rcx, QWORD PTR [rax+16] - 001bf e8 00 00 00 00 call memset + 001bd 48 8b 48 10 mov rcx, QWORD PTR [rax+16] + 001c1 e8 00 00 00 00 call memset + 001c6 90 npad 1 ; 6358 : memset(g->history, 0x00, pcount); // pixels that were affected previous frame - 001c4 48 63 45 64 movsxd rax, DWORD PTR pcount$[rbp] - 001c8 4c 8b c0 mov r8, rax - 001cb 33 d2 xor edx, edx - 001cd 48 8b 85 68 02 + 001c7 48 63 45 64 movsxd rax, DWORD PTR pcount$[rbp] + 001cb 4c 8b c0 mov r8, rax + 001ce 33 d2 xor edx, edx + 001d0 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 001d4 48 8b 48 18 mov rcx, QWORD PTR [rax+24] - 001d8 e8 00 00 00 00 call memset + 001d7 48 8b 48 18 mov rcx, QWORD PTR [rax+24] + 001db e8 00 00 00 00 call memset + 001e0 90 npad 1 ; 6359 : first_frame = 1; - 001dd c7 45 24 01 00 + 001e1 c7 45 24 01 00 00 00 mov DWORD PTR first_frame$[rbp], 1 ; 6360 : } - 001e4 e9 68 01 00 00 jmp $LN19@stbi__gif_ + 001e8 e9 6b 01 00 00 jmp $LN19@stbi__gif_ $LN18@stbi__gif_: ; 6361 : else { ; 6362 : // second frame - how do we dispose of the previous one? ; 6363 : dispose = (g->eflags & 0x1C) >> 2; - 001e9 48 8b 85 68 02 + 001ed 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 001f0 8b 40 30 mov eax, DWORD PTR [rax+48] - 001f3 83 e0 1c and eax, 28 - 001f6 c1 f8 02 sar eax, 2 - 001f9 89 45 04 mov DWORD PTR dispose$[rbp], eax + 001f4 8b 40 30 mov eax, DWORD PTR [rax+48] + 001f7 83 e0 1c and eax, 28 + 001fa c1 f8 02 sar eax, 2 + 001fd 89 45 04 mov DWORD PTR dispose$[rbp], eax ; 6364 : pcount = g->w * g->h; - 001fc 48 8b 85 68 02 + 00200 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00203 48 8b 8d 68 02 + 00207 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 0020a 8b 00 mov eax, DWORD PTR [rax] - 0020c 0f af 41 04 imul eax, DWORD PTR [rcx+4] - 00210 89 45 64 mov DWORD PTR pcount$[rbp], eax + 0020e 8b 00 mov eax, DWORD PTR [rax] + 00210 0f af 41 04 imul eax, DWORD PTR [rcx+4] + 00214 89 45 64 mov DWORD PTR pcount$[rbp], eax ; 6365 : ; 6366 : if ((dispose == 3) && (two_back == 0)) { - 00213 83 7d 04 03 cmp DWORD PTR dispose$[rbp], 3 - 00217 75 11 jne SHORT $LN24@stbi__gif_ - 00219 48 83 bd 80 02 + 00217 83 7d 04 03 cmp DWORD PTR dispose$[rbp], 3 + 0021b 75 11 jne SHORT $LN24@stbi__gif_ + 0021d 48 83 bd 80 02 00 00 00 cmp QWORD PTR two_back$[rbp], 0 - 00221 75 07 jne SHORT $LN24@stbi__gif_ + 00225 75 07 jne SHORT $LN24@stbi__gif_ ; 6367 : dispose = 2; // if I don't have an image to revert back to, default to the old background - 00223 c7 45 04 02 00 + 00227 c7 45 04 02 00 00 00 mov DWORD PTR dispose$[rbp], 2 $LN24@stbi__gif_: @@ -7405,125 +7425,127 @@ $LN24@stbi__gif_: ; 6369 : ; 6370 : if (dispose == 3) { // use previous graphic - 0022a 83 7d 04 03 cmp DWORD PTR dispose$[rbp], 3 - 0022e 75 71 jne SHORT $LN25@stbi__gif_ + 0022e 83 7d 04 03 cmp DWORD PTR dispose$[rbp], 3 + 00232 75 72 jne SHORT $LN25@stbi__gif_ ; 6371 : for (pi = 0; pi < pcount; ++pi) { - 00230 c7 45 44 00 00 + 00234 c7 45 44 00 00 00 00 mov DWORD PTR pi$[rbp], 0 - 00237 eb 08 jmp SHORT $LN4@stbi__gif_ + 0023b eb 08 jmp SHORT $LN4@stbi__gif_ $LN2@stbi__gif_: - 00239 8b 45 44 mov eax, DWORD PTR pi$[rbp] - 0023c ff c0 inc eax - 0023e 89 45 44 mov DWORD PTR pi$[rbp], eax + 0023d 8b 45 44 mov eax, DWORD PTR pi$[rbp] + 00240 ff c0 inc eax + 00242 89 45 44 mov DWORD PTR pi$[rbp], eax $LN4@stbi__gif_: - 00241 8b 45 64 mov eax, DWORD PTR pcount$[rbp] - 00244 39 45 44 cmp DWORD PTR pi$[rbp], eax - 00247 7d 56 jge SHORT $LN3@stbi__gif_ + 00245 8b 45 64 mov eax, DWORD PTR pcount$[rbp] + 00248 39 45 44 cmp DWORD PTR pi$[rbp], eax + 0024b 7d 57 jge SHORT $LN3@stbi__gif_ ; 6372 : if (g->history[pi]) { - 00249 48 63 45 44 movsxd rax, DWORD PTR pi$[rbp] - 0024d 48 8b 8d 68 02 + 0024d 48 63 45 44 movsxd rax, DWORD PTR pi$[rbp] + 00251 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00254 48 8b 49 18 mov rcx, QWORD PTR [rcx+24] - 00258 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0025c 85 c0 test eax, eax - 0025e 74 3d je SHORT $LN27@stbi__gif_ + 00258 48 8b 49 18 mov rcx, QWORD PTR [rcx+24] + 0025c 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00260 85 c0 test eax, eax + 00262 74 3e je SHORT $LN27@stbi__gif_ ; 6373 : memcpy(&g->out[pi * 4], &two_back[pi * 4], 4); - 00260 8b 45 44 mov eax, DWORD PTR pi$[rbp] - 00263 c1 e0 02 shl eax, 2 - 00266 48 98 cdqe - 00268 48 8b 8d 80 02 + 00264 8b 45 44 mov eax, DWORD PTR pi$[rbp] + 00267 c1 e0 02 shl eax, 2 + 0026a 48 98 cdqe + 0026c 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR two_back$[rbp] - 0026f 48 03 c8 add rcx, rax - 00272 48 8b c1 mov rax, rcx - 00275 8b 4d 44 mov ecx, DWORD PTR pi$[rbp] - 00278 c1 e1 02 shl ecx, 2 - 0027b 48 63 c9 movsxd rcx, ecx - 0027e 48 8b 95 68 02 + 00273 48 03 c8 add rcx, rax + 00276 48 8b c1 mov rax, rcx + 00279 8b 4d 44 mov ecx, DWORD PTR pi$[rbp] + 0027c c1 e1 02 shl ecx, 2 + 0027f 48 63 c9 movsxd rcx, ecx + 00282 48 8b 95 68 02 00 00 mov rdx, QWORD PTR g$[rbp] - 00285 48 8b 52 08 mov rdx, QWORD PTR [rdx+8] - 00289 48 03 d1 add rdx, rcx - 0028c 48 8b ca mov rcx, rdx - 0028f 41 b8 04 00 00 + 00289 48 8b 52 08 mov rdx, QWORD PTR [rdx+8] + 0028d 48 03 d1 add rdx, rcx + 00290 48 8b ca mov rcx, rdx + 00293 41 b8 04 00 00 00 mov r8d, 4 - 00295 48 8b d0 mov rdx, rax - 00298 e8 00 00 00 00 call memcpy + 00299 48 8b d0 mov rdx, rax + 0029c e8 00 00 00 00 call memcpy + 002a1 90 npad 1 $LN27@stbi__gif_: ; 6374 : } ; 6375 : } - 0029d eb 9a jmp SHORT $LN2@stbi__gif_ + 002a2 eb 99 jmp SHORT $LN2@stbi__gif_ $LN3@stbi__gif_: ; 6376 : } - 0029f eb 79 jmp SHORT $LN26@stbi__gif_ + 002a4 eb 7a jmp SHORT $LN26@stbi__gif_ $LN25@stbi__gif_: ; 6377 : else if (dispose == 2) { - 002a1 83 7d 04 02 cmp DWORD PTR dispose$[rbp], 2 - 002a5 75 73 jne SHORT $LN28@stbi__gif_ + 002a6 83 7d 04 02 cmp DWORD PTR dispose$[rbp], 2 + 002aa 75 74 jne SHORT $LN28@stbi__gif_ ; 6378 : // restore what was changed last frame to background before that frame; ; 6379 : for (pi = 0; pi < pcount; ++pi) { - 002a7 c7 45 44 00 00 + 002ac c7 45 44 00 00 00 00 mov DWORD PTR pi$[rbp], 0 - 002ae eb 08 jmp SHORT $LN7@stbi__gif_ + 002b3 eb 08 jmp SHORT $LN7@stbi__gif_ $LN5@stbi__gif_: - 002b0 8b 45 44 mov eax, DWORD PTR pi$[rbp] - 002b3 ff c0 inc eax - 002b5 89 45 44 mov DWORD PTR pi$[rbp], eax + 002b5 8b 45 44 mov eax, DWORD PTR pi$[rbp] + 002b8 ff c0 inc eax + 002ba 89 45 44 mov DWORD PTR pi$[rbp], eax $LN7@stbi__gif_: - 002b8 8b 45 64 mov eax, DWORD PTR pcount$[rbp] - 002bb 39 45 44 cmp DWORD PTR pi$[rbp], eax - 002be 7d 5a jge SHORT $LN6@stbi__gif_ + 002bd 8b 45 64 mov eax, DWORD PTR pcount$[rbp] + 002c0 39 45 44 cmp DWORD PTR pi$[rbp], eax + 002c3 7d 5b jge SHORT $LN6@stbi__gif_ ; 6380 : if (g->history[pi]) { - 002c0 48 63 45 44 movsxd rax, DWORD PTR pi$[rbp] - 002c4 48 8b 8d 68 02 + 002c5 48 63 45 44 movsxd rax, DWORD PTR pi$[rbp] + 002c9 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 002cb 48 8b 49 18 mov rcx, QWORD PTR [rcx+24] - 002cf 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 002d3 85 c0 test eax, eax - 002d5 74 41 je SHORT $LN30@stbi__gif_ + 002d0 48 8b 49 18 mov rcx, QWORD PTR [rcx+24] + 002d4 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 002d8 85 c0 test eax, eax + 002da 74 42 je SHORT $LN30@stbi__gif_ ; 6381 : memcpy(&g->out[pi * 4], &g->background[pi * 4], 4); - 002d7 8b 45 44 mov eax, DWORD PTR pi$[rbp] - 002da c1 e0 02 shl eax, 2 - 002dd 48 98 cdqe - 002df 48 8b 8d 68 02 + 002dc 8b 45 44 mov eax, DWORD PTR pi$[rbp] + 002df c1 e0 02 shl eax, 2 + 002e2 48 98 cdqe + 002e4 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 002e6 48 8b 49 10 mov rcx, QWORD PTR [rcx+16] - 002ea 48 03 c8 add rcx, rax - 002ed 48 8b c1 mov rax, rcx - 002f0 8b 4d 44 mov ecx, DWORD PTR pi$[rbp] - 002f3 c1 e1 02 shl ecx, 2 - 002f6 48 63 c9 movsxd rcx, ecx - 002f9 48 8b 95 68 02 + 002eb 48 8b 49 10 mov rcx, QWORD PTR [rcx+16] + 002ef 48 03 c8 add rcx, rax + 002f2 48 8b c1 mov rax, rcx + 002f5 8b 4d 44 mov ecx, DWORD PTR pi$[rbp] + 002f8 c1 e1 02 shl ecx, 2 + 002fb 48 63 c9 movsxd rcx, ecx + 002fe 48 8b 95 68 02 00 00 mov rdx, QWORD PTR g$[rbp] - 00300 48 8b 52 08 mov rdx, QWORD PTR [rdx+8] - 00304 48 03 d1 add rdx, rcx - 00307 48 8b ca mov rcx, rdx - 0030a 41 b8 04 00 00 + 00305 48 8b 52 08 mov rdx, QWORD PTR [rdx+8] + 00309 48 03 d1 add rdx, rcx + 0030c 48 8b ca mov rcx, rdx + 0030f 41 b8 04 00 00 00 mov r8d, 4 - 00310 48 8b d0 mov rdx, rax - 00313 e8 00 00 00 00 call memcpy + 00315 48 8b d0 mov rdx, rax + 00318 e8 00 00 00 00 call memcpy + 0031d 90 npad 1 $LN30@stbi__gif_: ; 6382 : } ; 6383 : } - 00318 eb 96 jmp SHORT $LN5@stbi__gif_ + 0031e eb 95 jmp SHORT $LN5@stbi__gif_ $LN6@stbi__gif_: $LN28@stbi__gif_: $LN26@stbi__gif_: @@ -7539,22 +7561,23 @@ $LN26@stbi__gif_: ; 6392 : // background is what out is after the undoing of the previou frame; ; 6393 : memcpy(g->background, g->out, 4 * g->w * g->h); - 0031a 48 8b 85 68 02 + 00320 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00321 8b 00 mov eax, DWORD PTR [rax] - 00323 c1 e0 02 shl eax, 2 - 00326 48 8b 8d 68 02 + 00327 8b 00 mov eax, DWORD PTR [rax] + 00329 c1 e0 02 shl eax, 2 + 0032c 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 0032d 0f af 41 04 imul eax, DWORD PTR [rcx+4] - 00331 48 98 cdqe - 00333 4c 8b c0 mov r8, rax - 00336 48 8b 85 68 02 + 00333 0f af 41 04 imul eax, DWORD PTR [rcx+4] + 00337 48 98 cdqe + 00339 4c 8b c0 mov r8, rax + 0033c 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 0033d 48 8b 50 08 mov rdx, QWORD PTR [rax+8] - 00341 48 8b 85 68 02 + 00343 48 8b 50 08 mov rdx, QWORD PTR [rax+8] + 00347 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00348 48 8b 48 10 mov rcx, QWORD PTR [rax+16] - 0034c e8 00 00 00 00 call memcpy + 0034e 48 8b 48 10 mov rcx, QWORD PTR [rax+16] + 00352 e8 00 00 00 00 call memcpy + 00357 90 npad 1 $LN19@stbi__gif_: ; 6394 : } @@ -7562,50 +7585,51 @@ $LN19@stbi__gif_: ; 6396 : // clear my history; ; 6397 : memset(g->history, 0x00, g->w * g->h); // pixels that were affected previous frame - 00351 48 8b 85 68 02 + 00358 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00358 48 8b 8d 68 02 + 0035f 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 0035f 8b 00 mov eax, DWORD PTR [rax] - 00361 0f af 41 04 imul eax, DWORD PTR [rcx+4] - 00365 48 98 cdqe - 00367 4c 8b c0 mov r8, rax - 0036a 33 d2 xor edx, edx - 0036c 48 8b 85 68 02 + 00366 8b 00 mov eax, DWORD PTR [rax] + 00368 0f af 41 04 imul eax, DWORD PTR [rcx+4] + 0036c 48 98 cdqe + 0036e 4c 8b c0 mov r8, rax + 00371 33 d2 xor edx, edx + 00373 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00373 48 8b 48 18 mov rcx, QWORD PTR [rax+24] - 00377 e8 00 00 00 00 call memset + 0037a 48 8b 48 18 mov rcx, QWORD PTR [rax+24] + 0037e e8 00 00 00 00 call memset + 00383 90 npad 1 $LN8@stbi__gif_: ; 6398 : ; 6399 : for (;;) { ; 6400 : int tag = stbi__get8(s); - 0037c 48 8b 8d 60 02 + 00384 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 00383 e8 00 00 00 00 call stbi__get8 - 00388 0f b6 c0 movzx eax, al - 0038b 89 85 84 00 00 + 0038b e8 00 00 00 00 call stbi__get8 + 00390 0f b6 c0 movzx eax, al + 00393 89 85 84 00 00 00 mov DWORD PTR tag$1[rbp], eax ; 6401 : switch (tag) { - 00391 8b 85 84 00 00 + 00399 8b 85 84 00 00 00 mov eax, DWORD PTR tag$1[rbp] - 00397 89 85 34 02 00 + 0039f 89 85 34 02 00 00 mov DWORD PTR tv232[rbp], eax - 0039d 83 bd 34 02 00 + 003a5 83 bd 34 02 00 00 21 cmp DWORD PTR tv232[rbp], 33 ; 00000021H - 003a4 0f 84 69 04 00 + 003ac 0f 84 6f 04 00 00 je $LN44@stbi__gif_ - 003aa 83 bd 34 02 00 + 003b2 83 bd 34 02 00 00 2c cmp DWORD PTR tv232[rbp], 44 ; 0000002cH - 003b1 74 12 je SHORT $LN31@stbi__gif_ - 003b3 83 bd 34 02 00 + 003b9 74 12 je SHORT $LN31@stbi__gif_ + 003bb 83 bd 34 02 00 00 3b cmp DWORD PTR tv232[rbp], 59 ; 0000003bH - 003ba 0f 84 c6 05 00 + 003c2 0f 84 cf 05 00 00 je $LN52@stbi__gif_ - 003c0 e9 ca 05 00 00 jmp $LN53@stbi__gif_ + 003c8 e9 d3 05 00 00 jmp $LN53@stbi__gif_ $LN31@stbi__gif_: ; 6402 : case 0x2C: /* Image Descriptor */ @@ -7615,169 +7639,169 @@ $LN31@stbi__gif_: ; 6406 : ; 6407 : x = stbi__get16le(s); - 003c5 48 8b 8d 60 02 + 003cd 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 003cc e8 00 00 00 00 call stbi__get16le - 003d1 89 85 a4 00 00 + 003d4 e8 00 00 00 00 call stbi__get16le + 003d9 89 85 a4 00 00 00 mov DWORD PTR x$2[rbp], eax ; 6408 : y = stbi__get16le(s); - 003d7 48 8b 8d 60 02 + 003df 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 003de e8 00 00 00 00 call stbi__get16le - 003e3 89 85 c4 00 00 + 003e6 e8 00 00 00 00 call stbi__get16le + 003eb 89 85 c4 00 00 00 mov DWORD PTR y$3[rbp], eax ; 6409 : w = stbi__get16le(s); - 003e9 48 8b 8d 60 02 + 003f1 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 003f0 e8 00 00 00 00 call stbi__get16le - 003f5 89 85 e4 00 00 + 003f8 e8 00 00 00 00 call stbi__get16le + 003fd 89 85 e4 00 00 00 mov DWORD PTR w$4[rbp], eax ; 6410 : h = stbi__get16le(s); - 003fb 48 8b 8d 60 02 + 00403 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 00402 e8 00 00 00 00 call stbi__get16le - 00407 89 85 04 01 00 + 0040a e8 00 00 00 00 call stbi__get16le + 0040f 89 85 04 01 00 00 mov DWORD PTR h$5[rbp], eax ; 6411 : if (((x + w) > (g->w)) || ((y + h) > (g->h))) - 0040d 8b 85 e4 00 00 + 00415 8b 85 e4 00 00 00 mov eax, DWORD PTR w$4[rbp] - 00413 8b 8d a4 00 00 + 0041b 8b 8d a4 00 00 00 mov ecx, DWORD PTR x$2[rbp] - 00419 03 c8 add ecx, eax - 0041b 8b c1 mov eax, ecx - 0041d 48 8b 8d 68 02 + 00421 03 c8 add ecx, eax + 00423 8b c1 mov eax, ecx + 00425 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00424 3b 01 cmp eax, DWORD PTR [rcx] - 00426 7f 1c jg SHORT $LN33@stbi__gif_ - 00428 8b 85 04 01 00 + 0042c 3b 01 cmp eax, DWORD PTR [rcx] + 0042e 7f 1c jg SHORT $LN33@stbi__gif_ + 00430 8b 85 04 01 00 00 mov eax, DWORD PTR h$5[rbp] - 0042e 8b 8d c4 00 00 + 00436 8b 8d c4 00 00 00 mov ecx, DWORD PTR y$3[rbp] - 00434 03 c8 add ecx, eax - 00436 8b c1 mov eax, ecx - 00438 48 8b 8d 68 02 + 0043c 03 c8 add ecx, eax + 0043e 8b c1 mov eax, ecx + 00440 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 0043f 3b 41 04 cmp eax, DWORD PTR [rcx+4] - 00442 7e 34 jle SHORT $LN32@stbi__gif_ + 00447 3b 41 04 cmp eax, DWORD PTR [rcx+4] + 0044a 7e 34 jle SHORT $LN32@stbi__gif_ $LN33@stbi__gif_: ; 6412 : return stbi__errpuc("bad Image Descriptor", "Corrupt GIF"); - 00444 48 8d 0d 00 00 + 0044c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BF@GIAALCNJ@bad?5Image?5Descriptor@ - 0044b e8 00 00 00 00 call stbi__err - 00450 85 c0 test eax, eax - 00452 74 0d je SHORT $LN59@stbi__gif_ - 00454 48 c7 85 38 02 + 00453 e8 00 00 00 00 call stbi__err + 00458 85 c0 test eax, eax + 0045a 74 0d je SHORT $LN59@stbi__gif_ + 0045c 48 c7 85 38 02 00 00 00 00 00 00 mov QWORD PTR tv250[rbp], 0 - 0045f eb 0b jmp SHORT $LN60@stbi__gif_ + 00467 eb 0b jmp SHORT $LN60@stbi__gif_ $LN59@stbi__gif_: - 00461 48 c7 85 38 02 + 00469 48 c7 85 38 02 00 00 00 00 00 00 mov QWORD PTR tv250[rbp], 0 $LN60@stbi__gif_: - 0046c 48 8b 85 38 02 + 00474 48 8b 85 38 02 00 00 mov rax, QWORD PTR tv250[rbp] - 00473 e9 4d 05 00 00 jmp $LN1@stbi__gif_ + 0047b e9 56 05 00 00 jmp $LN1@stbi__gif_ $LN32@stbi__gif_: ; 6413 : ; 6414 : g->line_size = g->w * 4; - 00478 48 8b 85 68 02 + 00480 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 0047f 8b 00 mov eax, DWORD PTR [rax] - 00481 c1 e0 02 shl eax, 2 - 00484 48 8b 8d 68 02 + 00487 8b 00 mov eax, DWORD PTR [rax] + 00489 c1 e0 02 shl eax, 2 + 0048c 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 0048b 89 81 64 88 00 + 00493 89 81 64 88 00 00 mov DWORD PTR [rcx+34916], eax ; 6415 : g->start_x = x * 4; - 00491 8b 85 a4 00 00 + 00499 8b 85 a4 00 00 00 mov eax, DWORD PTR x$2[rbp] - 00497 c1 e0 02 shl eax, 2 - 0049a 48 8b 8d 68 02 + 0049f c1 e0 02 shl eax, 2 + 004a2 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 004a1 89 81 4c 88 00 + 004a9 89 81 4c 88 00 00 mov DWORD PTR [rcx+34892], eax ; 6416 : g->start_y = y * g->line_size; - 004a7 48 8b 85 68 02 + 004af 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 004ae 8b 8d c4 00 00 + 004b6 8b 8d c4 00 00 00 mov ecx, DWORD PTR y$3[rbp] - 004b4 0f af 88 64 88 + 004bc 0f af 88 64 88 00 00 imul ecx, DWORD PTR [rax+34916] - 004bb 8b c1 mov eax, ecx - 004bd 48 8b 8d 68 02 + 004c3 8b c1 mov eax, ecx + 004c5 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 004c4 89 81 50 88 00 + 004cc 89 81 50 88 00 00 mov DWORD PTR [rcx+34896], eax ; 6417 : g->max_x = g->start_x + w * 4; - 004ca 48 8b 85 68 02 + 004d2 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 004d1 8b 80 4c 88 00 + 004d9 8b 80 4c 88 00 00 mov eax, DWORD PTR [rax+34892] - 004d7 8b 8d e4 00 00 + 004df 8b 8d e4 00 00 00 mov ecx, DWORD PTR w$4[rbp] - 004dd 8d 04 88 lea eax, DWORD PTR [rax+rcx*4] - 004e0 48 8b 8d 68 02 + 004e5 8d 04 88 lea eax, DWORD PTR [rax+rcx*4] + 004e8 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 004e7 89 81 54 88 00 + 004ef 89 81 54 88 00 00 mov DWORD PTR [rcx+34900], eax ; 6418 : g->max_y = g->start_y + h * g->line_size; - 004ed 48 8b 85 68 02 + 004f5 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 004f4 8b 8d 04 01 00 + 004fc 8b 8d 04 01 00 00 mov ecx, DWORD PTR h$5[rbp] - 004fa 0f af 88 64 88 + 00502 0f af 88 64 88 00 00 imul ecx, DWORD PTR [rax+34916] - 00501 8b c1 mov eax, ecx - 00503 48 8b 8d 68 02 + 00509 8b c1 mov eax, ecx + 0050b 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 0050a 03 81 50 88 00 + 00512 03 81 50 88 00 00 add eax, DWORD PTR [rcx+34896] - 00510 48 8b 8d 68 02 + 00518 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00517 89 81 58 88 00 + 0051f 89 81 58 88 00 00 mov DWORD PTR [rcx+34904], eax ; 6419 : g->cur_x = g->start_x; - 0051d 48 8b 85 68 02 + 00525 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00524 48 8b 8d 68 02 + 0052c 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 0052b 8b 89 4c 88 00 + 00533 8b 89 4c 88 00 00 mov ecx, DWORD PTR [rcx+34892] - 00531 89 88 5c 88 00 + 00539 89 88 5c 88 00 00 mov DWORD PTR [rax+34908], ecx ; 6420 : g->cur_y = g->start_y; - 00537 48 8b 85 68 02 + 0053f 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 0053e 48 8b 8d 68 02 + 00546 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00545 8b 89 50 88 00 + 0054d 8b 89 50 88 00 00 mov ecx, DWORD PTR [rcx+34896] - 0054b 89 88 60 88 00 + 00553 89 88 60 88 00 00 mov DWORD PTR [rax+34912], ecx ; 6421 : @@ -7787,86 +7811,86 @@ $LN32@stbi__gif_: ; 6425 : // max_y (which is what out_gif_code checks). ; 6426 : if (w == 0) - 00551 83 bd e4 00 00 + 00559 83 bd e4 00 00 00 00 cmp DWORD PTR w$4[rbp], 0 - 00558 75 1a jne SHORT $LN34@stbi__gif_ + 00560 75 1a jne SHORT $LN34@stbi__gif_ ; 6427 : g->cur_y = g->max_y; - 0055a 48 8b 85 68 02 + 00562 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00561 48 8b 8d 68 02 + 00569 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00568 8b 89 58 88 00 + 00570 8b 89 58 88 00 00 mov ecx, DWORD PTR [rcx+34904] - 0056e 89 88 60 88 00 + 00576 89 88 60 88 00 00 mov DWORD PTR [rax+34912], ecx $LN34@stbi__gif_: ; 6428 : ; 6429 : g->lflags = stbi__get8(s); - 00574 48 8b 8d 60 02 + 0057c 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 0057b e8 00 00 00 00 call stbi__get8 - 00580 0f b6 c0 movzx eax, al - 00583 48 8b 8d 68 02 + 00583 e8 00 00 00 00 call stbi__get8 + 00588 0f b6 c0 movzx eax, al + 0058b 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 0058a 89 81 48 88 00 + 00592 89 81 48 88 00 00 mov DWORD PTR [rcx+34888], eax ; 6430 : ; 6431 : if (g->lflags & 0x40) { - 00590 48 8b 85 68 02 + 00598 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00597 8b 80 48 88 00 + 0059f 8b 80 48 88 00 00 mov eax, DWORD PTR [rax+34888] - 0059d 83 e0 40 and eax, 64 ; 00000040H - 005a0 85 c0 test eax, eax - 005a2 74 30 je SHORT $LN35@stbi__gif_ + 005a5 83 e0 40 and eax, 64 ; 00000040H + 005a8 85 c0 test eax, eax + 005aa 74 30 je SHORT $LN35@stbi__gif_ ; 6432 : g->step = 8 * g->line_size; // first interlaced spacing - 005a4 48 8b 85 68 02 + 005ac 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 005ab 8b 80 64 88 00 + 005b3 8b 80 64 88 00 00 mov eax, DWORD PTR [rax+34916] - 005b1 c1 e0 03 shl eax, 3 - 005b4 48 8b 8d 68 02 + 005b9 c1 e0 03 shl eax, 3 + 005bc 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 005bb 89 81 44 88 00 + 005c3 89 81 44 88 00 00 mov DWORD PTR [rcx+34884], eax ; 6433 : g->parse = 3; - 005c1 48 8b 85 68 02 + 005c9 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 005c8 c7 80 40 88 00 + 005d0 c7 80 40 88 00 00 03 00 00 00 mov DWORD PTR [rax+34880], 3 ; 6434 : } - 005d2 eb 2b jmp SHORT $LN36@stbi__gif_ + 005da eb 2b jmp SHORT $LN36@stbi__gif_ $LN35@stbi__gif_: ; 6435 : else { ; 6436 : g->step = g->line_size; - 005d4 48 8b 85 68 02 + 005dc 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 005db 48 8b 8d 68 02 + 005e3 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 005e2 8b 89 64 88 00 + 005ea 8b 89 64 88 00 00 mov ecx, DWORD PTR [rcx+34916] - 005e8 89 88 44 88 00 + 005f0 89 88 44 88 00 00 mov DWORD PTR [rax+34884], ecx ; 6437 : g->parse = 0; - 005ee 48 8b 85 68 02 + 005f6 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 005f5 c7 80 40 88 00 + 005fd c7 80 40 88 00 00 00 00 00 00 mov DWORD PTR [rax+34880], 0 $LN36@stbi__gif_: @@ -7874,226 +7898,229 @@ $LN36@stbi__gif_: ; 6439 : ; 6440 : if (g->lflags & 0x80) { - 005ff 48 8b 85 68 02 + 00607 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00606 8b 80 48 88 00 + 0060e 8b 80 48 88 00 00 mov eax, DWORD PTR [rax+34888] - 0060c 25 80 00 00 00 and eax, 128 ; 00000080H - 00611 85 c0 test eax, eax - 00613 0f 84 97 00 00 + 00614 25 80 00 00 00 and eax, 128 ; 00000080H + 00619 85 c0 test eax, eax + 0061b 0f 84 98 00 00 00 je $LN37@stbi__gif_ ; 6441 : stbi__gif_parse_colortable(s, g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1); - 00619 48 8b 85 68 02 + 00621 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00620 8b 40 30 mov eax, DWORD PTR [rax+48] - 00623 83 e0 01 and eax, 1 - 00626 85 c0 test eax, eax - 00628 74 12 je SHORT $LN61@stbi__gif_ - 0062a 48 8b 85 68 02 + 00628 8b 40 30 mov eax, DWORD PTR [rax+48] + 0062b 83 e0 01 and eax, 1 + 0062e 85 c0 test eax, eax + 00630 74 12 je SHORT $LN61@stbi__gif_ + 00632 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00631 8b 40 2c mov eax, DWORD PTR [rax+44] - 00634 89 85 34 02 00 + 00639 8b 40 2c mov eax, DWORD PTR [rax+44] + 0063c 89 85 34 02 00 00 mov DWORD PTR tv296[rbp], eax - 0063a eb 0a jmp SHORT $LN62@stbi__gif_ + 00642 eb 0a jmp SHORT $LN62@stbi__gif_ $LN61@stbi__gif_: - 0063c c7 85 34 02 00 + 00644 c7 85 34 02 00 00 ff ff ff ff mov DWORD PTR tv296[rbp], -1 $LN62@stbi__gif_: - 00646 48 8b 85 68 02 + 0064e 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 0064d 8b 80 48 88 00 + 00655 8b 80 48 88 00 00 mov eax, DWORD PTR [rax+34888] - 00653 83 e0 07 and eax, 7 - 00656 b9 02 00 00 00 mov ecx, 2 - 0065b 89 8d 38 02 00 + 0065b 83 e0 07 and eax, 7 + 0065e b9 02 00 00 00 mov ecx, 2 + 00663 89 8d 38 02 00 00 mov DWORD PTR tv578[rbp], ecx - 00661 0f b6 c8 movzx ecx, al - 00664 8b 85 38 02 00 + 00669 0f b6 c8 movzx ecx, al + 0066c 8b 85 38 02 00 00 mov eax, DWORD PTR tv578[rbp] - 0066a d3 e0 shl eax, cl - 0066c 48 8b 8d 68 02 + 00672 d3 e0 shl eax, cl + 00674 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00673 48 81 c1 34 04 + 0067b 48 81 c1 34 04 00 00 add rcx, 1076 ; 00000434H - 0067a 44 8b 8d 34 02 + 00682 44 8b 8d 34 02 00 00 mov r9d, DWORD PTR tv296[rbp] - 00681 44 8b c0 mov r8d, eax - 00684 48 8b d1 mov rdx, rcx - 00687 48 8b 8d 60 02 + 00689 44 8b c0 mov r8d, eax + 0068c 48 8b d1 mov rdx, rcx + 0068f 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 0068e e8 00 00 00 00 call stbi__gif_parse_colortable + 00696 e8 00 00 00 00 call stbi__gif_parse_colortable + 0069b 90 npad 1 ; 6442 : g->color_table = (stbi_uc*)g->lpal; - 00693 48 8b 85 68 02 + 0069c 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 0069a 48 05 34 04 00 + 006a3 48 05 34 04 00 00 add rax, 1076 ; 00000434H - 006a0 48 8b 8d 68 02 + 006a9 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 006a7 48 89 81 38 88 + 006b0 48 89 81 38 88 00 00 mov QWORD PTR [rcx+34872], rax ; 6443 : } - 006ae eb 62 jmp SHORT $LN38@stbi__gif_ + 006b7 eb 62 jmp SHORT $LN38@stbi__gif_ $LN37@stbi__gif_: ; 6444 : else if (g->flags & 0x80) { - 006b0 48 8b 85 68 02 + 006b9 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 006b7 8b 40 20 mov eax, DWORD PTR [rax+32] - 006ba 25 80 00 00 00 and eax, 128 ; 00000080H - 006bf 85 c0 test eax, eax - 006c1 74 1b je SHORT $LN39@stbi__gif_ + 006c0 8b 40 20 mov eax, DWORD PTR [rax+32] + 006c3 25 80 00 00 00 and eax, 128 ; 00000080H + 006c8 85 c0 test eax, eax + 006ca 74 1b je SHORT $LN39@stbi__gif_ ; 6445 : g->color_table = (stbi_uc*)g->pal; - 006c3 48 8b 85 68 02 + 006cc 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 006ca 48 83 c0 34 add rax, 52 ; 00000034H - 006ce 48 8b 8d 68 02 + 006d3 48 83 c0 34 add rax, 52 ; 00000034H + 006d7 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 006d5 48 89 81 38 88 + 006de 48 89 81 38 88 00 00 mov QWORD PTR [rcx+34872], rax ; 6446 : } - 006dc eb 34 jmp SHORT $LN40@stbi__gif_ + 006e5 eb 34 jmp SHORT $LN40@stbi__gif_ $LN39@stbi__gif_: ; 6447 : else ; 6448 : return stbi__errpuc("missing color table", "Corrupt GIF"); - 006de 48 8d 0d 00 00 + 006e7 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BE@NAMJKDNF@missing?5color?5table@ - 006e5 e8 00 00 00 00 call stbi__err - 006ea 85 c0 test eax, eax - 006ec 74 0d je SHORT $LN63@stbi__gif_ - 006ee 48 c7 85 38 02 + 006ee e8 00 00 00 00 call stbi__err + 006f3 85 c0 test eax, eax + 006f5 74 0d je SHORT $LN63@stbi__gif_ + 006f7 48 c7 85 38 02 00 00 00 00 00 00 mov QWORD PTR tv315[rbp], 0 - 006f9 eb 0b jmp SHORT $LN64@stbi__gif_ + 00702 eb 0b jmp SHORT $LN64@stbi__gif_ $LN63@stbi__gif_: - 006fb 48 c7 85 38 02 + 00704 48 c7 85 38 02 00 00 00 00 00 00 mov QWORD PTR tv315[rbp], 0 $LN64@stbi__gif_: - 00706 48 8b 85 38 02 + 0070f 48 8b 85 38 02 00 00 mov rax, QWORD PTR tv315[rbp] - 0070d e9 b3 02 00 00 jmp $LN1@stbi__gif_ + 00716 e9 bb 02 00 00 jmp $LN1@stbi__gif_ $LN40@stbi__gif_: $LN38@stbi__gif_: ; 6449 : ; 6450 : o = stbi__process_gif_raster(s, g); - 00712 48 8b 95 68 02 + 0071b 48 8b 95 68 02 00 00 mov rdx, QWORD PTR g$[rbp] - 00719 48 8b 8d 60 02 + 00722 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 00720 e8 00 00 00 00 call stbi__process_gif_raster - 00725 48 89 85 28 01 + 00729 e8 00 00 00 00 call stbi__process_gif_raster + 0072e 48 89 85 28 01 00 00 mov QWORD PTR o$6[rbp], rax ; 6451 : if (!o) return NULL; - 0072c 48 83 bd 28 01 + 00735 48 83 bd 28 01 00 00 00 cmp QWORD PTR o$6[rbp], 0 - 00734 75 07 jne SHORT $LN41@stbi__gif_ - 00736 33 c0 xor eax, eax - 00738 e9 88 02 00 00 jmp $LN1@stbi__gif_ + 0073d 75 07 jne SHORT $LN41@stbi__gif_ + 0073f 33 c0 xor eax, eax + 00741 e9 90 02 00 00 jmp $LN1@stbi__gif_ $LN41@stbi__gif_: ; 6452 : ; 6453 : // if this was the first frame, ; 6454 : pcount = g->w * g->h; - 0073d 48 8b 85 68 02 + 00746 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00744 48 8b 8d 68 02 + 0074d 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 0074b 8b 00 mov eax, DWORD PTR [rax] - 0074d 0f af 41 04 imul eax, DWORD PTR [rcx+4] - 00751 89 45 64 mov DWORD PTR pcount$[rbp], eax + 00754 8b 00 mov eax, DWORD PTR [rax] + 00756 0f af 41 04 imul eax, DWORD PTR [rcx+4] + 0075a 89 45 64 mov DWORD PTR pcount$[rbp], eax ; 6455 : if (first_frame && (g->bgindex > 0)) { - 00754 83 7d 24 00 cmp DWORD PTR first_frame$[rbp], 0 - 00758 0f 84 a9 00 00 + 0075d 83 7d 24 00 cmp DWORD PTR first_frame$[rbp], 0 + 00761 0f 84 ae 00 00 00 je $LN42@stbi__gif_ - 0075e 48 8b 85 68 02 + 00767 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00765 83 78 24 00 cmp DWORD PTR [rax+36], 0 - 00769 0f 8e 98 00 00 + 0076e 83 78 24 00 cmp DWORD PTR [rax+36], 0 + 00772 0f 8e 9d 00 00 00 jle $LN42@stbi__gif_ ; 6456 : // if first frame, any pixel not drawn to gets the background color ; 6457 : for (pi = 0; pi < pcount; ++pi) { - 0076f c7 45 44 00 00 + 00778 c7 45 44 00 00 00 00 mov DWORD PTR pi$[rbp], 0 - 00776 eb 08 jmp SHORT $LN15@stbi__gif_ + 0077f eb 08 jmp SHORT $LN15@stbi__gif_ $LN13@stbi__gif_: - 00778 8b 45 44 mov eax, DWORD PTR pi$[rbp] - 0077b ff c0 inc eax - 0077d 89 45 44 mov DWORD PTR pi$[rbp], eax + 00781 8b 45 44 mov eax, DWORD PTR pi$[rbp] + 00784 ff c0 inc eax + 00786 89 45 44 mov DWORD PTR pi$[rbp], eax $LN15@stbi__gif_: - 00780 8b 45 64 mov eax, DWORD PTR pcount$[rbp] - 00783 39 45 44 cmp DWORD PTR pi$[rbp], eax - 00786 7d 7f jge SHORT $LN14@stbi__gif_ + 00789 8b 45 64 mov eax, DWORD PTR pcount$[rbp] + 0078c 39 45 44 cmp DWORD PTR pi$[rbp], eax + 0078f 0f 8d 80 00 00 + 00 jge $LN14@stbi__gif_ ; 6458 : if (g->history[pi] == 0) { - 00788 48 63 45 44 movsxd rax, DWORD PTR pi$[rbp] - 0078c 48 8b 8d 68 02 + 00795 48 63 45 44 movsxd rax, DWORD PTR pi$[rbp] + 00799 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00793 48 8b 49 18 mov rcx, QWORD PTR [rcx+24] - 00797 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0079b 85 c0 test eax, eax - 0079d 75 63 jne SHORT $LN43@stbi__gif_ + 007a0 48 8b 49 18 mov rcx, QWORD PTR [rcx+24] + 007a4 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 007a8 85 c0 test eax, eax + 007aa 75 64 jne SHORT $LN43@stbi__gif_ ; 6459 : g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; - 0079f 48 8b 85 68 02 + 007ac 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 007a6 48 63 40 24 movsxd rax, DWORD PTR [rax+36] - 007aa 48 8b 8d 68 02 + 007b3 48 63 40 24 movsxd rax, DWORD PTR [rax+36] + 007b7 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 007b1 48 8d 44 81 34 lea rax, QWORD PTR [rcx+rax*4+52] - 007b6 b9 01 00 00 00 mov ecx, 1 - 007bb 48 6b c9 03 imul rcx, rcx, 3 - 007bf c6 04 08 ff mov BYTE PTR [rax+rcx], 255 ; 000000ffH + 007be 48 8d 44 81 34 lea rax, QWORD PTR [rcx+rax*4+52] + 007c3 b9 01 00 00 00 mov ecx, 1 + 007c8 48 6b c9 03 imul rcx, rcx, 3 + 007cc c6 04 08 ff mov BYTE PTR [rax+rcx], 255 ; 000000ffH ; 6460 : memcpy(&g->out[pi * 4], &g->pal[g->bgindex], 4); - 007c3 48 8b 85 68 02 + 007d0 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 007ca 48 63 40 24 movsxd rax, DWORD PTR [rax+36] - 007ce 48 8b 8d 68 02 + 007d7 48 63 40 24 movsxd rax, DWORD PTR [rax+36] + 007db 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 007d5 48 8d 44 81 34 lea rax, QWORD PTR [rcx+rax*4+52] - 007da 8b 4d 44 mov ecx, DWORD PTR pi$[rbp] - 007dd c1 e1 02 shl ecx, 2 - 007e0 48 63 c9 movsxd rcx, ecx - 007e3 48 8b 95 68 02 + 007e2 48 8d 44 81 34 lea rax, QWORD PTR [rcx+rax*4+52] + 007e7 8b 4d 44 mov ecx, DWORD PTR pi$[rbp] + 007ea c1 e1 02 shl ecx, 2 + 007ed 48 63 c9 movsxd rcx, ecx + 007f0 48 8b 95 68 02 00 00 mov rdx, QWORD PTR g$[rbp] - 007ea 48 8b 52 08 mov rdx, QWORD PTR [rdx+8] - 007ee 48 03 d1 add rdx, rcx - 007f1 48 8b ca mov rcx, rdx - 007f4 41 b8 04 00 00 + 007f7 48 8b 52 08 mov rdx, QWORD PTR [rdx+8] + 007fb 48 03 d1 add rdx, rcx + 007fe 48 8b ca mov rcx, rdx + 00801 41 b8 04 00 00 00 mov r8d, 4 - 007fa 48 8b d0 mov rdx, rax - 007fd e8 00 00 00 00 call memcpy + 00807 48 8b d0 mov rdx, rax + 0080a e8 00 00 00 00 call memcpy + 0080f 90 npad 1 $LN43@stbi__gif_: ; 6461 : } ; 6462 : } - 00802 e9 71 ff ff ff jmp $LN13@stbi__gif_ + 00810 e9 6c ff ff ff jmp $LN13@stbi__gif_ $LN14@stbi__gif_: $LN42@stbi__gif_: @@ -8101,9 +8128,9 @@ $LN42@stbi__gif_: ; 6464 : ; 6465 : return o; - 00807 48 8b 85 28 01 + 00815 48 8b 85 28 01 00 00 mov rax, QWORD PTR o$6[rbp] - 0080e e9 b2 01 00 00 jmp $LN1@stbi__gif_ + 0081c e9 b5 01 00 00 jmp $LN1@stbi__gif_ $LN44@stbi__gif_: ; 6466 : } @@ -8113,160 +8140,162 @@ $LN44@stbi__gif_: ; 6470 : int len; ; 6471 : int ext = stbi__get8(s); - 00813 48 8b 8d 60 02 + 00821 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 0081a e8 00 00 00 00 call stbi__get8 - 0081f 0f b6 c0 movzx eax, al - 00822 89 85 64 01 00 + 00828 e8 00 00 00 00 call stbi__get8 + 0082d 0f b6 c0 movzx eax, al + 00830 89 85 64 01 00 00 mov DWORD PTR ext$8[rbp], eax ; 6472 : if (ext == 0xF9) { // Graphic Control Extension. - 00828 81 bd 64 01 00 + 00836 81 bd 64 01 00 00 f9 00 00 00 cmp DWORD PTR ext$8[rbp], 249 ; 000000f9H - 00832 0f 85 1a 01 00 + 00840 0f 85 1c 01 00 00 jne $LN45@stbi__gif_ ; 6473 : len = stbi__get8(s); - 00838 48 8b 8d 60 02 + 00846 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 0083f e8 00 00 00 00 call stbi__get8 - 00844 0f b6 c0 movzx eax, al - 00847 89 85 44 01 00 + 0084d e8 00 00 00 00 call stbi__get8 + 00852 0f b6 c0 movzx eax, al + 00855 89 85 44 01 00 00 mov DWORD PTR len$7[rbp], eax ; 6474 : if (len == 4) { - 0084d 83 bd 44 01 00 + 0085b 83 bd 44 01 00 00 04 cmp DWORD PTR len$7[rbp], 4 - 00854 0f 85 e4 00 00 + 00862 0f 85 e5 00 00 00 jne $LN46@stbi__gif_ ; 6475 : g->eflags = stbi__get8(s); - 0085a 48 8b 8d 60 02 + 00868 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 00861 e8 00 00 00 00 call stbi__get8 - 00866 0f b6 c0 movzx eax, al - 00869 48 8b 8d 68 02 + 0086f e8 00 00 00 00 call stbi__get8 + 00874 0f b6 c0 movzx eax, al + 00877 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00870 89 41 30 mov DWORD PTR [rcx+48], eax + 0087e 89 41 30 mov DWORD PTR [rcx+48], eax ; 6476 : g->delay = 10 * stbi__get16le(s); // delay - 1/100th of a second, saving as 1/1000ths. - 00873 48 8b 8d 60 02 + 00881 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 0087a e8 00 00 00 00 call stbi__get16le - 0087f 6b c0 0a imul eax, eax, 10 - 00882 48 8b 8d 68 02 + 00888 e8 00 00 00 00 call stbi__get16le + 0088d 6b c0 0a imul eax, eax, 10 + 00890 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00889 89 81 68 88 00 + 00897 89 81 68 88 00 00 mov DWORD PTR [rcx+34920], eax ; 6477 : ; 6478 : // unset old transparent ; 6479 : if (g->transparent >= 0) { - 0088f 48 8b 85 68 02 + 0089d 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00896 83 78 2c 00 cmp DWORD PTR [rax+44], 0 - 0089a 7c 24 jl SHORT $LN48@stbi__gif_ + 008a4 83 78 2c 00 cmp DWORD PTR [rax+44], 0 + 008a8 7c 24 jl SHORT $LN48@stbi__gif_ ; 6480 : g->pal[g->transparent][3] = 255; - 0089c 48 8b 85 68 02 + 008aa 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 008a3 48 63 40 2c movsxd rax, DWORD PTR [rax+44] - 008a7 48 8b 8d 68 02 + 008b1 48 63 40 2c movsxd rax, DWORD PTR [rax+44] + 008b5 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 008ae 48 8d 44 81 34 lea rax, QWORD PTR [rcx+rax*4+52] - 008b3 b9 01 00 00 00 mov ecx, 1 - 008b8 48 6b c9 03 imul rcx, rcx, 3 - 008bc c6 04 08 ff mov BYTE PTR [rax+rcx], 255 ; 000000ffH + 008bc 48 8d 44 81 34 lea rax, QWORD PTR [rcx+rax*4+52] + 008c1 b9 01 00 00 00 mov ecx, 1 + 008c6 48 6b c9 03 imul rcx, rcx, 3 + 008ca c6 04 08 ff mov BYTE PTR [rax+rcx], 255 ; 000000ffH $LN48@stbi__gif_: ; 6481 : } ; 6482 : if (g->eflags & 0x01) { - 008c0 48 8b 85 68 02 + 008ce 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 008c7 8b 40 30 mov eax, DWORD PTR [rax+48] - 008ca 83 e0 01 and eax, 1 - 008cd 85 c0 test eax, eax - 008cf 74 4c je SHORT $LN49@stbi__gif_ + 008d5 8b 40 30 mov eax, DWORD PTR [rax+48] + 008d8 83 e0 01 and eax, 1 + 008db 85 c0 test eax, eax + 008dd 74 4c je SHORT $LN49@stbi__gif_ ; 6483 : g->transparent = stbi__get8(s); - 008d1 48 8b 8d 60 02 + 008df 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 008d8 e8 00 00 00 00 call stbi__get8 - 008dd 0f b6 c0 movzx eax, al - 008e0 48 8b 8d 68 02 + 008e6 e8 00 00 00 00 call stbi__get8 + 008eb 0f b6 c0 movzx eax, al + 008ee 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 008e7 89 41 2c mov DWORD PTR [rcx+44], eax + 008f5 89 41 2c mov DWORD PTR [rcx+44], eax ; 6484 : if (g->transparent >= 0) { - 008ea 48 8b 85 68 02 + 008f8 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 008f1 83 78 2c 00 cmp DWORD PTR [rax+44], 0 - 008f5 7c 24 jl SHORT $LN51@stbi__gif_ + 008ff 83 78 2c 00 cmp DWORD PTR [rax+44], 0 + 00903 7c 24 jl SHORT $LN51@stbi__gif_ ; 6485 : g->pal[g->transparent][3] = 0; - 008f7 48 8b 85 68 02 + 00905 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 008fe 48 63 40 2c movsxd rax, DWORD PTR [rax+44] - 00902 48 8b 8d 68 02 + 0090c 48 63 40 2c movsxd rax, DWORD PTR [rax+44] + 00910 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00909 48 8d 44 81 34 lea rax, QWORD PTR [rcx+rax*4+52] - 0090e b9 01 00 00 00 mov ecx, 1 - 00913 48 6b c9 03 imul rcx, rcx, 3 - 00917 c6 04 08 00 mov BYTE PTR [rax+rcx], 0 + 00917 48 8d 44 81 34 lea rax, QWORD PTR [rcx+rax*4+52] + 0091c b9 01 00 00 00 mov ecx, 1 + 00921 48 6b c9 03 imul rcx, rcx, 3 + 00925 c6 04 08 00 mov BYTE PTR [rax+rcx], 0 $LN51@stbi__gif_: ; 6486 : } ; 6487 : } - 0091b eb 1f jmp SHORT $LN50@stbi__gif_ + 00929 eb 20 jmp SHORT $LN50@stbi__gif_ $LN49@stbi__gif_: ; 6488 : else { ; 6489 : // don't need transparent ; 6490 : stbi__skip(s, 1); - 0091d ba 01 00 00 00 mov edx, 1 - 00922 48 8b 8d 60 02 + 0092b ba 01 00 00 00 mov edx, 1 + 00930 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 00929 e8 00 00 00 00 call stbi__skip + 00937 e8 00 00 00 00 call stbi__skip + 0093c 90 npad 1 ; 6491 : g->transparent = -1; - 0092e 48 8b 85 68 02 + 0093d 48 8b 85 68 02 00 00 mov rax, QWORD PTR g$[rbp] - 00935 c7 40 2c ff ff + 00944 c7 40 2c ff ff ff ff mov DWORD PTR [rax+44], -1 $LN50@stbi__gif_: ; 6492 : } ; 6493 : } - 0093c eb 14 jmp SHORT $LN47@stbi__gif_ + 0094b eb 15 jmp SHORT $LN47@stbi__gif_ $LN46@stbi__gif_: ; 6494 : else { ; 6495 : stbi__skip(s, len); - 0093e 8b 95 44 01 00 + 0094d 8b 95 44 01 00 00 mov edx, DWORD PTR len$7[rbp] - 00944 48 8b 8d 60 02 + 00953 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 0094b e8 00 00 00 00 call stbi__skip + 0095a e8 00 00 00 00 call stbi__skip + 0095f 90 npad 1 ; 6496 : break; - 00950 eb 6e jmp SHORT $LN11@stbi__gif_ + 00960 eb 6f jmp SHORT $LN11@stbi__gif_ $LN47@stbi__gif_: $LN45@stbi__gif_: $LN16@stbi__gif_: @@ -8275,32 +8304,33 @@ $LN16@stbi__gif_: ; 6498 : } ; 6499 : while ((len = stbi__get8(s)) != 0) { - 00952 48 8b 8d 60 02 + 00962 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 00959 e8 00 00 00 00 call stbi__get8 - 0095e 0f b6 c0 movzx eax, al - 00961 89 85 44 01 00 + 00969 e8 00 00 00 00 call stbi__get8 + 0096e 0f b6 c0 movzx eax, al + 00971 89 85 44 01 00 00 mov DWORD PTR len$7[rbp], eax - 00967 83 bd 44 01 00 + 00977 83 bd 44 01 00 00 00 cmp DWORD PTR len$7[rbp], 0 - 0096e 74 14 je SHORT $LN17@stbi__gif_ + 0097e 74 15 je SHORT $LN17@stbi__gif_ ; 6500 : stbi__skip(s, len); - 00970 8b 95 44 01 00 + 00980 8b 95 44 01 00 00 mov edx, DWORD PTR len$7[rbp] - 00976 48 8b 8d 60 02 + 00986 48 8b 8d 60 02 00 00 mov rcx, QWORD PTR s$[rbp] - 0097d e8 00 00 00 00 call stbi__skip + 0098d e8 00 00 00 00 call stbi__skip + 00992 90 npad 1 ; 6501 : } - 00982 eb ce jmp SHORT $LN16@stbi__gif_ + 00993 eb cd jmp SHORT $LN16@stbi__gif_ $LN17@stbi__gif_: ; 6502 : break; - 00984 eb 3a jmp SHORT $LN11@stbi__gif_ + 00995 eb 3a jmp SHORT $LN11@stbi__gif_ $LN52@stbi__gif_: ; 6503 : } @@ -8308,47 +8338,47 @@ $LN52@stbi__gif_: ; 6505 : case 0x3B: // gif stream termination code ; 6506 : return (stbi_uc*)s; // using '1' causes warning on some compilers - 00986 48 8b 85 60 02 + 00997 48 8b 85 60 02 00 00 mov rax, QWORD PTR s$[rbp] - 0098d eb 36 jmp SHORT $LN1@stbi__gif_ + 0099e eb 36 jmp SHORT $LN1@stbi__gif_ $LN53@stbi__gif_: ; 6507 : ; 6508 : default: ; 6509 : return stbi__errpuc("unknown code", "Corrupt GIF"); - 0098f 48 8d 0d 00 00 + 009a0 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0N@DJABBOOH@unknown?5code@ - 00996 e8 00 00 00 00 call stbi__err - 0099b 85 c0 test eax, eax - 0099d 74 0d je SHORT $LN65@stbi__gif_ - 0099f 48 c7 85 38 02 + 009a7 e8 00 00 00 00 call stbi__err + 009ac 85 c0 test eax, eax + 009ae 74 0d je SHORT $LN65@stbi__gif_ + 009b0 48 c7 85 38 02 00 00 00 00 00 00 mov QWORD PTR tv409[rbp], 0 - 009aa eb 0b jmp SHORT $LN66@stbi__gif_ + 009bb eb 0b jmp SHORT $LN66@stbi__gif_ $LN65@stbi__gif_: - 009ac 48 c7 85 38 02 + 009bd 48 c7 85 38 02 00 00 00 00 00 00 mov QWORD PTR tv409[rbp], 0 $LN66@stbi__gif_: - 009b7 48 8b 85 38 02 + 009c8 48 8b 85 38 02 00 00 mov rax, QWORD PTR tv409[rbp] - 009be eb 05 jmp SHORT $LN1@stbi__gif_ + 009cf eb 05 jmp SHORT $LN1@stbi__gif_ $LN11@stbi__gif_: ; 6510 : } ; 6511 : } - 009c0 e9 b7 f9 ff ff jmp $LN8@stbi__gif_ + 009d1 e9 ae f9 ff ff jmp $LN8@stbi__gif_ $LN1@stbi__gif_: ; 6512 : } - 009c5 48 8d a5 48 02 + 009d6 48 8d a5 48 02 00 00 lea rsp, QWORD PTR [rbp+584] - 009cc 5f pop rdi - 009cd 5d pop rbp - 009ce c3 ret 0 + 009dd 5f pop rdi + 009de 5d pop rbp + 009df c3 ret 0 stbi__gif_load_next ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -8368,15 +8398,15 @@ valid_bits$ = 292 clear$ = 324 p$ = 360 code$1 = 388 -tv297 = 596 -tv273 = 596 -tv246 = 596 -tv242 = 596 tv192 = 596 -tv210 = 600 -tv198 = 600 -tv174 = 600 +tv242 = 596 +tv246 = 596 +tv273 = 596 +tv297 = 596 tv163 = 600 +tv174 = 600 +tv198 = 600 +tv210 = 600 s$ = 640 g$ = 648 stbi__process_gif_raster PROC ; COMDAT @@ -8393,6 +8423,7 @@ stbi__process_gif_raster PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 6242 : stbi_uc lzw_cs; ; 6243 : stbi__int32 len, init_code; @@ -8402,565 +8433,568 @@ stbi__process_gif_raster PROC ; COMDAT ; 6247 : ; 6248 : lzw_cs = stbi__get8(s); - 00024 48 8b 8d 80 02 + 00025 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR s$[rbp] - 0002b e8 00 00 00 00 call stbi__get8 - 00030 88 45 04 mov BYTE PTR lzw_cs$[rbp], al + 0002c e8 00 00 00 00 call stbi__get8 + 00031 88 45 04 mov BYTE PTR lzw_cs$[rbp], al ; 6249 : if (lzw_cs > 12) return NULL; - 00033 0f b6 45 04 movzx eax, BYTE PTR lzw_cs$[rbp] - 00037 83 f8 0c cmp eax, 12 - 0003a 7e 07 jle SHORT $LN10@stbi__proc - 0003c 33 c0 xor eax, eax - 0003e e9 9f 04 00 00 jmp $LN1@stbi__proc + 00034 0f b6 45 04 movzx eax, BYTE PTR lzw_cs$[rbp] + 00038 83 f8 0c cmp eax, 12 + 0003b 7e 07 jle SHORT $LN10@stbi__proc + 0003d 33 c0 xor eax, eax + 0003f e9 a2 04 00 00 jmp $LN1@stbi__proc $LN10@stbi__proc: ; 6250 : clear = 1 << lzw_cs; - 00043 0f b6 45 04 movzx eax, BYTE PTR lzw_cs$[rbp] - 00047 b9 01 00 00 00 mov ecx, 1 - 0004c 89 8d 54 02 00 + 00044 0f b6 45 04 movzx eax, BYTE PTR lzw_cs$[rbp] + 00048 b9 01 00 00 00 mov ecx, 1 + 0004d 89 8d 54 02 00 00 mov DWORD PTR tv242[rbp], ecx - 00052 0f b6 c8 movzx ecx, al - 00055 8b 85 54 02 00 + 00053 0f b6 c8 movzx ecx, al + 00056 8b 85 54 02 00 00 mov eax, DWORD PTR tv242[rbp] - 0005b d3 e0 shl eax, cl - 0005d 89 85 44 01 00 + 0005c d3 e0 shl eax, cl + 0005e 89 85 44 01 00 00 mov DWORD PTR clear$[rbp], eax ; 6251 : first = 1; - 00063 c7 45 64 01 00 + 00064 c7 45 64 01 00 00 00 mov DWORD PTR first$[rbp], 1 ; 6252 : codesize = lzw_cs + 1; - 0006a 0f b6 45 04 movzx eax, BYTE PTR lzw_cs$[rbp] - 0006e ff c0 inc eax - 00070 89 85 84 00 00 + 0006b 0f b6 45 04 movzx eax, BYTE PTR lzw_cs$[rbp] + 0006f ff c0 inc eax + 00071 89 85 84 00 00 00 mov DWORD PTR codesize$[rbp], eax ; 6253 : codemask = (1 << codesize) - 1; - 00076 8b 85 84 00 00 + 00077 8b 85 84 00 00 00 mov eax, DWORD PTR codesize$[rbp] - 0007c b9 01 00 00 00 mov ecx, 1 - 00081 89 8d 54 02 00 + 0007d b9 01 00 00 00 mov ecx, 1 + 00082 89 8d 54 02 00 00 mov DWORD PTR tv246[rbp], ecx - 00087 0f b6 c8 movzx ecx, al - 0008a 8b 85 54 02 00 + 00088 0f b6 c8 movzx ecx, al + 0008b 8b 85 54 02 00 00 mov eax, DWORD PTR tv246[rbp] - 00090 d3 e0 shl eax, cl - 00092 ff c8 dec eax - 00094 89 85 a4 00 00 + 00091 d3 e0 shl eax, cl + 00093 ff c8 dec eax + 00095 89 85 a4 00 00 00 mov DWORD PTR codemask$[rbp], eax ; 6254 : bits = 0; - 0009a c7 85 04 01 00 + 0009b c7 85 04 01 00 00 00 00 00 00 mov DWORD PTR bits$[rbp], 0 ; 6255 : valid_bits = 0; - 000a4 c7 85 24 01 00 + 000a5 c7 85 24 01 00 00 00 00 00 00 mov DWORD PTR valid_bits$[rbp], 0 ; 6256 : for (init_code = 0; init_code < clear; init_code++) { - 000ae c7 45 44 00 00 + 000af c7 45 44 00 00 00 00 mov DWORD PTR init_code$[rbp], 0 - 000b5 eb 08 jmp SHORT $LN4@stbi__proc + 000b6 eb 08 jmp SHORT $LN4@stbi__proc $LN2@stbi__proc: - 000b7 8b 45 44 mov eax, DWORD PTR init_code$[rbp] - 000ba ff c0 inc eax - 000bc 89 45 44 mov DWORD PTR init_code$[rbp], eax + 000b8 8b 45 44 mov eax, DWORD PTR init_code$[rbp] + 000bb ff c0 inc eax + 000bd 89 45 44 mov DWORD PTR init_code$[rbp], eax $LN4@stbi__proc: - 000bf 8b 85 44 01 00 + 000c0 8b 85 44 01 00 00 mov eax, DWORD PTR clear$[rbp] - 000c5 39 45 44 cmp DWORD PTR init_code$[rbp], eax - 000c8 7d 46 jge SHORT $LN3@stbi__proc + 000c6 39 45 44 cmp DWORD PTR init_code$[rbp], eax + 000c9 7d 46 jge SHORT $LN3@stbi__proc ; 6257 : g->codes[init_code].prefix = -1; - 000ca 48 63 45 44 movsxd rax, DWORD PTR init_code$[rbp] - 000ce b9 ff ff ff ff mov ecx, -1 - 000d3 48 8b 95 88 02 + 000cb 48 63 45 44 movsxd rax, DWORD PTR init_code$[rbp] + 000cf b9 ff ff ff ff mov ecx, -1 + 000d4 48 8b 95 88 02 00 00 mov rdx, QWORD PTR g$[rbp] - 000da 66 89 8c 82 34 + 000db 66 89 8c 82 34 08 00 00 mov WORD PTR [rdx+rax*4+2100], cx ; 6258 : g->codes[init_code].first = (stbi_uc)init_code; - 000e2 48 63 45 44 movsxd rax, DWORD PTR init_code$[rbp] - 000e6 48 8b 8d 88 02 + 000e3 48 63 45 44 movsxd rax, DWORD PTR init_code$[rbp] + 000e7 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR g$[rbp] - 000ed 0f b6 55 44 movzx edx, BYTE PTR init_code$[rbp] - 000f1 88 94 81 36 08 + 000ee 0f b6 55 44 movzx edx, BYTE PTR init_code$[rbp] + 000f2 88 94 81 36 08 00 00 mov BYTE PTR [rcx+rax*4+2102], dl ; 6259 : g->codes[init_code].suffix = (stbi_uc)init_code; - 000f8 48 63 45 44 movsxd rax, DWORD PTR init_code$[rbp] - 000fc 48 8b 8d 88 02 + 000f9 48 63 45 44 movsxd rax, DWORD PTR init_code$[rbp] + 000fd 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00103 0f b6 55 44 movzx edx, BYTE PTR init_code$[rbp] - 00107 88 94 81 37 08 + 00104 0f b6 55 44 movzx edx, BYTE PTR init_code$[rbp] + 00108 88 94 81 37 08 00 00 mov BYTE PTR [rcx+rax*4+2103], dl ; 6260 : } - 0010e eb a7 jmp SHORT $LN2@stbi__proc + 0010f eb a7 jmp SHORT $LN2@stbi__proc $LN3@stbi__proc: ; 6261 : ; 6262 : // support no starting clear code ; 6263 : avail = clear + 2; - 00110 8b 85 44 01 00 + 00111 8b 85 44 01 00 00 mov eax, DWORD PTR clear$[rbp] - 00116 83 c0 02 add eax, 2 - 00119 89 85 c4 00 00 + 00117 83 c0 02 add eax, 2 + 0011a 89 85 c4 00 00 00 mov DWORD PTR avail$[rbp], eax ; 6264 : oldcode = -1; - 0011f c7 85 e4 00 00 + 00120 c7 85 e4 00 00 00 ff ff ff ff mov DWORD PTR oldcode$[rbp], -1 ; 6265 : ; 6266 : len = 0; - 00129 c7 45 24 00 00 + 0012a c7 45 24 00 00 00 00 mov DWORD PTR len$[rbp], 0 $LN5@stbi__proc: ; 6267 : for (;;) { ; 6268 : if (valid_bits < codesize) { - 00130 8b 85 84 00 00 + 00131 8b 85 84 00 00 00 mov eax, DWORD PTR codesize$[rbp] - 00136 39 85 24 01 00 + 00137 39 85 24 01 00 00 cmp DWORD PTR valid_bits$[rbp], eax - 0013c 7d 71 jge SHORT $LN11@stbi__proc + 0013d 7d 71 jge SHORT $LN11@stbi__proc ; 6269 : if (len == 0) { - 0013e 83 7d 24 00 cmp DWORD PTR len$[rbp], 0 - 00142 75 28 jne SHORT $LN13@stbi__proc + 0013f 83 7d 24 00 cmp DWORD PTR len$[rbp], 0 + 00143 75 28 jne SHORT $LN13@stbi__proc ; 6270 : len = stbi__get8(s); // start new block - 00144 48 8b 8d 80 02 + 00145 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR s$[rbp] - 0014b e8 00 00 00 00 call stbi__get8 - 00150 0f b6 c0 movzx eax, al - 00153 89 45 24 mov DWORD PTR len$[rbp], eax + 0014c e8 00 00 00 00 call stbi__get8 + 00151 0f b6 c0 movzx eax, al + 00154 89 45 24 mov DWORD PTR len$[rbp], eax ; 6271 : if (len == 0) - 00156 83 7d 24 00 cmp DWORD PTR len$[rbp], 0 - 0015a 75 10 jne SHORT $LN14@stbi__proc + 00157 83 7d 24 00 cmp DWORD PTR len$[rbp], 0 + 0015b 75 10 jne SHORT $LN14@stbi__proc ; 6272 : return g->out; - 0015c 48 8b 85 88 02 + 0015d 48 8b 85 88 02 00 00 mov rax, QWORD PTR g$[rbp] - 00163 48 8b 40 08 mov rax, QWORD PTR [rax+8] - 00167 e9 76 03 00 00 jmp $LN1@stbi__proc + 00164 48 8b 40 08 mov rax, QWORD PTR [rax+8] + 00168 e9 79 03 00 00 jmp $LN1@stbi__proc $LN14@stbi__proc: $LN13@stbi__proc: ; 6273 : } ; 6274 : --len; - 0016c 8b 45 24 mov eax, DWORD PTR len$[rbp] - 0016f ff c8 dec eax - 00171 89 45 24 mov DWORD PTR len$[rbp], eax + 0016d 8b 45 24 mov eax, DWORD PTR len$[rbp] + 00170 ff c8 dec eax + 00172 89 45 24 mov DWORD PTR len$[rbp], eax ; 6275 : bits |= (stbi__int32)stbi__get8(s) << valid_bits; - 00174 48 8b 8d 80 02 + 00175 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR s$[rbp] - 0017b e8 00 00 00 00 call stbi__get8 - 00180 0f b6 c0 movzx eax, al - 00183 8b 8d 24 01 00 + 0017c e8 00 00 00 00 call stbi__get8 + 00181 0f b6 c0 movzx eax, al + 00184 8b 8d 24 01 00 00 mov ecx, DWORD PTR valid_bits$[rbp] - 00189 d3 e0 shl eax, cl - 0018b 8b 8d 04 01 00 + 0018a d3 e0 shl eax, cl + 0018c 8b 8d 04 01 00 00 mov ecx, DWORD PTR bits$[rbp] - 00191 0b c8 or ecx, eax - 00193 8b c1 mov eax, ecx - 00195 89 85 04 01 00 + 00192 0b c8 or ecx, eax + 00194 8b c1 mov eax, ecx + 00196 89 85 04 01 00 00 mov DWORD PTR bits$[rbp], eax ; 6276 : valid_bits += 8; - 0019b 8b 85 24 01 00 + 0019c 8b 85 24 01 00 00 mov eax, DWORD PTR valid_bits$[rbp] - 001a1 83 c0 08 add eax, 8 - 001a4 89 85 24 01 00 + 001a2 83 c0 08 add eax, 8 + 001a5 89 85 24 01 00 00 mov DWORD PTR valid_bits$[rbp], eax ; 6277 : } - 001aa e9 2e 03 00 00 jmp $LN12@stbi__proc + 001ab e9 31 03 00 00 jmp $LN12@stbi__proc $LN11@stbi__proc: ; 6278 : else { ; 6279 : stbi__int32 code = bits & codemask; - 001af 8b 85 a4 00 00 + 001b0 8b 85 a4 00 00 00 mov eax, DWORD PTR codemask$[rbp] - 001b5 8b 8d 04 01 00 + 001b6 8b 8d 04 01 00 00 mov ecx, DWORD PTR bits$[rbp] - 001bb 23 c8 and ecx, eax - 001bd 8b c1 mov eax, ecx - 001bf 89 85 84 01 00 + 001bc 23 c8 and ecx, eax + 001be 8b c1 mov eax, ecx + 001c0 89 85 84 01 00 00 mov DWORD PTR code$1[rbp], eax ; 6280 : bits >>= codesize; - 001c5 8b 85 84 00 00 + 001c6 8b 85 84 00 00 00 mov eax, DWORD PTR codesize$[rbp] - 001cb 0f b6 c8 movzx ecx, al - 001ce 8b 85 04 01 00 + 001cc 0f b6 c8 movzx ecx, al + 001cf 8b 85 04 01 00 00 mov eax, DWORD PTR bits$[rbp] - 001d4 d3 f8 sar eax, cl - 001d6 89 85 04 01 00 + 001d5 d3 f8 sar eax, cl + 001d7 89 85 04 01 00 00 mov DWORD PTR bits$[rbp], eax ; 6281 : valid_bits -= codesize; - 001dc 8b 85 84 00 00 + 001dd 8b 85 84 00 00 00 mov eax, DWORD PTR codesize$[rbp] - 001e2 8b 8d 24 01 00 + 001e3 8b 8d 24 01 00 00 mov ecx, DWORD PTR valid_bits$[rbp] - 001e8 2b c8 sub ecx, eax - 001ea 8b c1 mov eax, ecx - 001ec 89 85 24 01 00 + 001e9 2b c8 sub ecx, eax + 001eb 8b c1 mov eax, ecx + 001ed 89 85 24 01 00 00 mov DWORD PTR valid_bits$[rbp], eax ; 6282 : // @OPTIMIZE: is there some way we can accelerate the non-clear path? ; 6283 : if (code == clear) { // clear code - 001f2 8b 85 44 01 00 + 001f3 8b 85 44 01 00 00 mov eax, DWORD PTR clear$[rbp] - 001f8 39 85 84 01 00 + 001f9 39 85 84 01 00 00 cmp DWORD PTR code$1[rbp], eax - 001fe 75 55 jne SHORT $LN15@stbi__proc + 001ff 75 55 jne SHORT $LN15@stbi__proc ; 6284 : codesize = lzw_cs + 1; - 00200 0f b6 45 04 movzx eax, BYTE PTR lzw_cs$[rbp] - 00204 ff c0 inc eax - 00206 89 85 84 00 00 + 00201 0f b6 45 04 movzx eax, BYTE PTR lzw_cs$[rbp] + 00205 ff c0 inc eax + 00207 89 85 84 00 00 00 mov DWORD PTR codesize$[rbp], eax ; 6285 : codemask = (1 << codesize) - 1; - 0020c 8b 85 84 00 00 + 0020d 8b 85 84 00 00 00 mov eax, DWORD PTR codesize$[rbp] - 00212 b9 01 00 00 00 mov ecx, 1 - 00217 89 8d 54 02 00 + 00213 b9 01 00 00 00 mov ecx, 1 + 00218 89 8d 54 02 00 00 mov DWORD PTR tv273[rbp], ecx - 0021d 0f b6 c8 movzx ecx, al - 00220 8b 85 54 02 00 + 0021e 0f b6 c8 movzx ecx, al + 00221 8b 85 54 02 00 00 mov eax, DWORD PTR tv273[rbp] - 00226 d3 e0 shl eax, cl - 00228 ff c8 dec eax - 0022a 89 85 a4 00 00 + 00227 d3 e0 shl eax, cl + 00229 ff c8 dec eax + 0022b 89 85 a4 00 00 00 mov DWORD PTR codemask$[rbp], eax ; 6286 : avail = clear + 2; - 00230 8b 85 44 01 00 + 00231 8b 85 44 01 00 00 mov eax, DWORD PTR clear$[rbp] - 00236 83 c0 02 add eax, 2 - 00239 89 85 c4 00 00 + 00237 83 c0 02 add eax, 2 + 0023a 89 85 c4 00 00 00 mov DWORD PTR avail$[rbp], eax ; 6287 : oldcode = -1; - 0023f c7 85 e4 00 00 + 00240 c7 85 e4 00 00 00 ff ff ff ff mov DWORD PTR oldcode$[rbp], -1 ; 6288 : first = 0; - 00249 c7 45 64 00 00 + 0024a c7 45 64 00 00 00 00 mov DWORD PTR first$[rbp], 0 ; 6289 : } - 00250 e9 88 02 00 00 jmp $LN16@stbi__proc + 00251 e9 8b 02 00 00 jmp $LN16@stbi__proc $LN15@stbi__proc: ; 6290 : else if (code == clear + 1) { // end of stream code - 00255 8b 85 44 01 00 + 00256 8b 85 44 01 00 00 mov eax, DWORD PTR clear$[rbp] - 0025b ff c0 inc eax - 0025d 39 85 84 01 00 + 0025c ff c0 inc eax + 0025e 39 85 84 01 00 00 cmp DWORD PTR code$1[rbp], eax - 00263 75 4d jne SHORT $LN17@stbi__proc + 00264 75 4f jne SHORT $LN17@stbi__proc ; 6291 : stbi__skip(s, len); - 00265 8b 55 24 mov edx, DWORD PTR len$[rbp] - 00268 48 8b 8d 80 02 + 00266 8b 55 24 mov edx, DWORD PTR len$[rbp] + 00269 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR s$[rbp] - 0026f e8 00 00 00 00 call stbi__skip + 00270 e8 00 00 00 00 call stbi__skip + 00275 90 npad 1 $LN8@stbi__proc: ; 6292 : while ((len = stbi__get8(s)) > 0) - 00274 48 8b 8d 80 02 + 00276 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR s$[rbp] - 0027b e8 00 00 00 00 call stbi__get8 - 00280 0f b6 c0 movzx eax, al - 00283 89 45 24 mov DWORD PTR len$[rbp], eax - 00286 83 7d 24 00 cmp DWORD PTR len$[rbp], 0 - 0028a 7e 11 jle SHORT $LN9@stbi__proc + 0027d e8 00 00 00 00 call stbi__get8 + 00282 0f b6 c0 movzx eax, al + 00285 89 45 24 mov DWORD PTR len$[rbp], eax + 00288 83 7d 24 00 cmp DWORD PTR len$[rbp], 0 + 0028c 7e 12 jle SHORT $LN9@stbi__proc ; 6293 : stbi__skip(s, len); - 0028c 8b 55 24 mov edx, DWORD PTR len$[rbp] - 0028f 48 8b 8d 80 02 + 0028e 8b 55 24 mov edx, DWORD PTR len$[rbp] + 00291 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR s$[rbp] - 00296 e8 00 00 00 00 call stbi__skip - 0029b eb d7 jmp SHORT $LN8@stbi__proc + 00298 e8 00 00 00 00 call stbi__skip + 0029d 90 npad 1 + 0029e eb d6 jmp SHORT $LN8@stbi__proc $LN9@stbi__proc: ; 6294 : return g->out; - 0029d 48 8b 85 88 02 + 002a0 48 8b 85 88 02 00 00 mov rax, QWORD PTR g$[rbp] - 002a4 48 8b 40 08 mov rax, QWORD PTR [rax+8] - 002a8 e9 35 02 00 00 jmp $LN1@stbi__proc + 002a7 48 8b 40 08 mov rax, QWORD PTR [rax+8] + 002ab e9 36 02 00 00 jmp $LN1@stbi__proc ; 6295 : } - 002ad e9 2b 02 00 00 jmp $LN18@stbi__proc + 002b0 e9 2c 02 00 00 jmp $LN18@stbi__proc $LN17@stbi__proc: ; 6296 : else if (code <= avail) { - 002b2 8b 85 c4 00 00 + 002b5 8b 85 c4 00 00 00 mov eax, DWORD PTR avail$[rbp] - 002b8 39 85 84 01 00 + 002bb 39 85 84 01 00 00 cmp DWORD PTR code$1[rbp], eax - 002be 0f 8f e8 01 00 + 002c1 0f 8f e9 01 00 00 jg $LN19@stbi__proc ; 6297 : if (first) { - 002c4 83 7d 64 00 cmp DWORD PTR first$[rbp], 0 - 002c8 74 34 je SHORT $LN21@stbi__proc + 002c7 83 7d 64 00 cmp DWORD PTR first$[rbp], 0 + 002cb 74 34 je SHORT $LN21@stbi__proc ; 6298 : return stbi__errpuc("no clear code", "Corrupt GIF"); - 002ca 48 8d 0d 00 00 + 002cd 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0O@MGDACKOJ@no?5clear?5code@ - 002d1 e8 00 00 00 00 call stbi__err - 002d6 85 c0 test eax, eax - 002d8 74 0d je SHORT $LN28@stbi__proc - 002da 48 c7 85 58 02 + 002d4 e8 00 00 00 00 call stbi__err + 002d9 85 c0 test eax, eax + 002db 74 0d je SHORT $LN28@stbi__proc + 002dd 48 c7 85 58 02 00 00 00 00 00 00 mov QWORD PTR tv163[rbp], 0 - 002e5 eb 0b jmp SHORT $LN29@stbi__proc + 002e8 eb 0b jmp SHORT $LN29@stbi__proc $LN28@stbi__proc: - 002e7 48 c7 85 58 02 + 002ea 48 c7 85 58 02 00 00 00 00 00 00 mov QWORD PTR tv163[rbp], 0 $LN29@stbi__proc: - 002f2 48 8b 85 58 02 + 002f5 48 8b 85 58 02 00 00 mov rax, QWORD PTR tv163[rbp] - 002f9 e9 e4 01 00 00 jmp $LN1@stbi__proc + 002fc e9 e5 01 00 00 jmp $LN1@stbi__proc $LN21@stbi__proc: ; 6299 : } ; 6300 : ; 6301 : if (oldcode >= 0) { - 002fe 83 bd e4 00 00 + 00301 83 bd e4 00 00 00 00 cmp DWORD PTR oldcode$[rbp], 0 - 00305 0f 8c ec 00 00 + 00308 0f 8c ec 00 00 00 jl $LN22@stbi__proc ; 6302 : p = &g->codes[avail++]; - 0030b 48 63 85 c4 00 + 0030e 48 63 85 c4 00 00 00 movsxd rax, DWORD PTR avail$[rbp] - 00312 48 8b 8d 88 02 + 00315 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00319 48 8d 84 81 34 + 0031c 48 8d 84 81 34 08 00 00 lea rax, QWORD PTR [rcx+rax*4+2100] - 00321 48 89 85 68 01 + 00324 48 89 85 68 01 00 00 mov QWORD PTR p$[rbp], rax - 00328 8b 85 c4 00 00 + 0032b 8b 85 c4 00 00 00 mov eax, DWORD PTR avail$[rbp] - 0032e ff c0 inc eax - 00330 89 85 c4 00 00 + 00331 ff c0 inc eax + 00333 89 85 c4 00 00 00 mov DWORD PTR avail$[rbp], eax ; 6303 : if (avail > 8192) { - 00336 81 bd c4 00 00 + 00339 81 bd c4 00 00 00 00 20 00 00 cmp DWORD PTR avail$[rbp], 8192 ; 00002000H - 00340 7e 34 jle SHORT $LN24@stbi__proc + 00343 7e 34 jle SHORT $LN24@stbi__proc ; 6304 : return stbi__errpuc("too many codes", "Corrupt GIF"); - 00342 48 8d 0d 00 00 + 00345 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0P@GJNJCPDJ@too?5many?5codes@ - 00349 e8 00 00 00 00 call stbi__err - 0034e 85 c0 test eax, eax - 00350 74 0d je SHORT $LN30@stbi__proc - 00352 48 c7 85 58 02 + 0034c e8 00 00 00 00 call stbi__err + 00351 85 c0 test eax, eax + 00353 74 0d je SHORT $LN30@stbi__proc + 00355 48 c7 85 58 02 00 00 00 00 00 00 mov QWORD PTR tv174[rbp], 0 - 0035d eb 0b jmp SHORT $LN31@stbi__proc + 00360 eb 0b jmp SHORT $LN31@stbi__proc $LN30@stbi__proc: - 0035f 48 c7 85 58 02 + 00362 48 c7 85 58 02 00 00 00 00 00 00 mov QWORD PTR tv174[rbp], 0 $LN31@stbi__proc: - 0036a 48 8b 85 58 02 + 0036d 48 8b 85 58 02 00 00 mov rax, QWORD PTR tv174[rbp] - 00371 e9 6c 01 00 00 jmp $LN1@stbi__proc + 00374 e9 6d 01 00 00 jmp $LN1@stbi__proc $LN24@stbi__proc: ; 6305 : } ; 6306 : ; 6307 : p->prefix = (stbi__int16)oldcode; - 00376 48 8b 85 68 01 + 00379 48 8b 85 68 01 00 00 mov rax, QWORD PTR p$[rbp] - 0037d 0f b7 8d e4 00 + 00380 0f b7 8d e4 00 00 00 movzx ecx, WORD PTR oldcode$[rbp] - 00384 66 89 08 mov WORD PTR [rax], cx + 00387 66 89 08 mov WORD PTR [rax], cx ; 6308 : p->first = g->codes[oldcode].first; - 00387 48 63 85 e4 00 + 0038a 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR oldcode$[rbp] - 0038e 48 8b 8d 68 01 + 00391 48 8b 8d 68 01 00 00 mov rcx, QWORD PTR p$[rbp] - 00395 48 8b 95 88 02 + 00398 48 8b 95 88 02 00 00 mov rdx, QWORD PTR g$[rbp] - 0039c 0f b6 84 82 36 + 0039f 0f b6 84 82 36 08 00 00 movzx eax, BYTE PTR [rdx+rax*4+2102] - 003a4 88 41 02 mov BYTE PTR [rcx+2], al + 003a7 88 41 02 mov BYTE PTR [rcx+2], al ; 6309 : p->suffix = (code == avail) ? p->first : g->codes[code].first; - 003a7 8b 85 c4 00 00 + 003aa 8b 85 c4 00 00 00 mov eax, DWORD PTR avail$[rbp] - 003ad 39 85 84 01 00 + 003b0 39 85 84 01 00 00 cmp DWORD PTR code$1[rbp], eax - 003b3 75 13 jne SHORT $LN32@stbi__proc - 003b5 48 8b 85 68 01 + 003b6 75 13 jne SHORT $LN32@stbi__proc + 003b8 48 8b 85 68 01 00 00 mov rax, QWORD PTR p$[rbp] - 003bc 0f b6 40 02 movzx eax, BYTE PTR [rax+2] - 003c0 89 85 54 02 00 + 003bf 0f b6 40 02 movzx eax, BYTE PTR [rax+2] + 003c3 89 85 54 02 00 00 mov DWORD PTR tv192[rbp], eax - 003c6 eb 1c jmp SHORT $LN33@stbi__proc + 003c9 eb 1c jmp SHORT $LN33@stbi__proc $LN32@stbi__proc: - 003c8 48 63 85 84 01 + 003cb 48 63 85 84 01 00 00 movsxd rax, DWORD PTR code$1[rbp] - 003cf 48 8b 8d 88 02 + 003d2 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR g$[rbp] - 003d6 0f b6 84 81 36 + 003d9 0f b6 84 81 36 08 00 00 movzx eax, BYTE PTR [rcx+rax*4+2102] - 003de 89 85 54 02 00 + 003e1 89 85 54 02 00 00 mov DWORD PTR tv192[rbp], eax $LN33@stbi__proc: - 003e4 48 8b 85 68 01 + 003e7 48 8b 85 68 01 00 00 mov rax, QWORD PTR p$[rbp] - 003eb 0f b6 8d 54 02 + 003ee 0f b6 8d 54 02 00 00 movzx ecx, BYTE PTR tv192[rbp] - 003f2 88 48 03 mov BYTE PTR [rax+3], cl + 003f5 88 48 03 mov BYTE PTR [rax+3], cl ; 6310 : } - 003f5 eb 42 jmp SHORT $LN23@stbi__proc + 003f8 eb 42 jmp SHORT $LN23@stbi__proc $LN22@stbi__proc: ; 6311 : else if (code == avail) - 003f7 8b 85 c4 00 00 + 003fa 8b 85 c4 00 00 00 mov eax, DWORD PTR avail$[rbp] - 003fd 39 85 84 01 00 + 00400 39 85 84 01 00 00 cmp DWORD PTR code$1[rbp], eax - 00403 75 34 jne SHORT $LN25@stbi__proc + 00406 75 34 jne SHORT $LN25@stbi__proc ; 6312 : return stbi__errpuc("illegal code in raster", "Corrupt GIF"); - 00405 48 8d 0d 00 00 + 00408 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BH@LOKBIIOJ@illegal?5code?5in?5raster@ - 0040c e8 00 00 00 00 call stbi__err - 00411 85 c0 test eax, eax - 00413 74 0d je SHORT $LN34@stbi__proc - 00415 48 c7 85 58 02 + 0040f e8 00 00 00 00 call stbi__err + 00414 85 c0 test eax, eax + 00416 74 0d je SHORT $LN34@stbi__proc + 00418 48 c7 85 58 02 00 00 00 00 00 00 mov QWORD PTR tv198[rbp], 0 - 00420 eb 0b jmp SHORT $LN35@stbi__proc + 00423 eb 0b jmp SHORT $LN35@stbi__proc $LN34@stbi__proc: - 00422 48 c7 85 58 02 + 00425 48 c7 85 58 02 00 00 00 00 00 00 mov QWORD PTR tv198[rbp], 0 $LN35@stbi__proc: - 0042d 48 8b 85 58 02 + 00430 48 8b 85 58 02 00 00 mov rax, QWORD PTR tv198[rbp] - 00434 e9 a9 00 00 00 jmp $LN1@stbi__proc + 00437 e9 aa 00 00 00 jmp $LN1@stbi__proc $LN25@stbi__proc: $LN23@stbi__proc: ; 6313 : ; 6314 : stbi__out_gif_code(g, (stbi__uint16)code); - 00439 0f b7 95 84 01 + 0043c 0f b7 95 84 01 00 00 movzx edx, WORD PTR code$1[rbp] - 00440 48 8b 8d 88 02 + 00443 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR g$[rbp] - 00447 e8 00 00 00 00 call stbi__out_gif_code + 0044a e8 00 00 00 00 call stbi__out_gif_code + 0044f 90 npad 1 ; 6315 : ; 6316 : if ((avail & codemask) == 0 && avail <= 0x0FFF) { - 0044c 8b 85 a4 00 00 + 00450 8b 85 a4 00 00 00 mov eax, DWORD PTR codemask$[rbp] - 00452 8b 8d c4 00 00 + 00456 8b 8d c4 00 00 00 mov ecx, DWORD PTR avail$[rbp] - 00458 23 c8 and ecx, eax - 0045a 8b c1 mov eax, ecx - 0045c 85 c0 test eax, eax - 0045e 75 3e jne SHORT $LN26@stbi__proc - 00460 81 bd c4 00 00 + 0045c 23 c8 and ecx, eax + 0045e 8b c1 mov eax, ecx + 00460 85 c0 test eax, eax + 00462 75 3e jne SHORT $LN26@stbi__proc + 00464 81 bd c4 00 00 00 ff 0f 00 00 cmp DWORD PTR avail$[rbp], 4095 ; 00000fffH - 0046a 7f 32 jg SHORT $LN26@stbi__proc + 0046e 7f 32 jg SHORT $LN26@stbi__proc ; 6317 : codesize++; - 0046c 8b 85 84 00 00 + 00470 8b 85 84 00 00 00 mov eax, DWORD PTR codesize$[rbp] - 00472 ff c0 inc eax - 00474 89 85 84 00 00 + 00476 ff c0 inc eax + 00478 89 85 84 00 00 00 mov DWORD PTR codesize$[rbp], eax ; 6318 : codemask = (1 << codesize) - 1; - 0047a 8b 85 84 00 00 + 0047e 8b 85 84 00 00 00 mov eax, DWORD PTR codesize$[rbp] - 00480 b9 01 00 00 00 mov ecx, 1 - 00485 89 8d 54 02 00 + 00484 b9 01 00 00 00 mov ecx, 1 + 00489 89 8d 54 02 00 00 mov DWORD PTR tv297[rbp], ecx - 0048b 0f b6 c8 movzx ecx, al - 0048e 8b 85 54 02 00 + 0048f 0f b6 c8 movzx ecx, al + 00492 8b 85 54 02 00 00 mov eax, DWORD PTR tv297[rbp] - 00494 d3 e0 shl eax, cl - 00496 ff c8 dec eax - 00498 89 85 a4 00 00 + 00498 d3 e0 shl eax, cl + 0049a ff c8 dec eax + 0049c 89 85 a4 00 00 00 mov DWORD PTR codemask$[rbp], eax $LN26@stbi__proc: @@ -8968,36 +9002,36 @@ $LN26@stbi__proc: ; 6320 : ; 6321 : oldcode = code; - 0049e 8b 85 84 01 00 + 004a2 8b 85 84 01 00 00 mov eax, DWORD PTR code$1[rbp] - 004a4 89 85 e4 00 00 + 004a8 89 85 e4 00 00 00 mov DWORD PTR oldcode$[rbp], eax ; 6322 : } - 004aa eb 31 jmp SHORT $LN20@stbi__proc + 004ae eb 31 jmp SHORT $LN20@stbi__proc $LN19@stbi__proc: ; 6323 : else { ; 6324 : return stbi__errpuc("illegal code in raster", "Corrupt GIF"); - 004ac 48 8d 0d 00 00 + 004b0 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BH@LOKBIIOJ@illegal?5code?5in?5raster@ - 004b3 e8 00 00 00 00 call stbi__err - 004b8 85 c0 test eax, eax - 004ba 74 0d je SHORT $LN36@stbi__proc - 004bc 48 c7 85 58 02 + 004b7 e8 00 00 00 00 call stbi__err + 004bc 85 c0 test eax, eax + 004be 74 0d je SHORT $LN36@stbi__proc + 004c0 48 c7 85 58 02 00 00 00 00 00 00 mov QWORD PTR tv210[rbp], 0 - 004c7 eb 0b jmp SHORT $LN37@stbi__proc + 004cb eb 0b jmp SHORT $LN37@stbi__proc $LN36@stbi__proc: - 004c9 48 c7 85 58 02 + 004cd 48 c7 85 58 02 00 00 00 00 00 00 mov QWORD PTR tv210[rbp], 0 $LN37@stbi__proc: - 004d4 48 8b 85 58 02 + 004d8 48 8b 85 58 02 00 00 mov rax, QWORD PTR tv210[rbp] - 004db eb 05 jmp SHORT $LN1@stbi__proc + 004df eb 05 jmp SHORT $LN1@stbi__proc $LN20@stbi__proc: $LN18@stbi__proc: $LN16@stbi__proc: @@ -9007,16 +9041,16 @@ $LN12@stbi__proc: ; 6326 : } ; 6327 : } - 004dd e9 4e fc ff ff jmp $LN5@stbi__proc + 004e1 e9 4b fc ff ff jmp $LN5@stbi__proc $LN1@stbi__proc: ; 6328 : } - 004e2 48 8d a5 68 02 + 004e6 48 8d a5 68 02 00 00 lea rsp, QWORD PTR [rbp+616] - 004e9 5f pop rdi - 004ea 5d pop rbp - 004eb c3 ret 0 + 004ed 5f pop rdi + 004ee 5d pop rbp + 004ef c3 ret 0 stbi__process_gif_raster ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -9043,6 +9077,7 @@ stbi__out_gif_code PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 6205 : stbi_uc* p, * c; ; 6206 : int idx; @@ -9051,280 +9086,281 @@ stbi__out_gif_code PROC ; COMDAT ; 6209 : // and working backwards through an interleaved image would be nasty ; 6210 : if (g->codes[code].prefix >= 0) - 00024 0f b7 85 48 01 + 00025 0f b7 85 48 01 00 00 movzx eax, WORD PTR code$[rbp] - 0002b 48 8b 8d 40 01 + 0002c 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 00032 0f bf 84 81 34 + 00033 0f bf 84 81 34 08 00 00 movsx eax, WORD PTR [rcx+rax*4+2100] - 0003a 85 c0 test eax, eax - 0003c 7c 22 jl SHORT $LN4@stbi__out_ + 0003b 85 c0 test eax, eax + 0003d 7c 23 jl SHORT $LN4@stbi__out_ ; 6211 : stbi__out_gif_code(g, g->codes[code].prefix); - 0003e 0f b7 85 48 01 + 0003f 0f b7 85 48 01 00 00 movzx eax, WORD PTR code$[rbp] - 00045 48 8b 8d 40 01 + 00046 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 0004c 0f b7 94 81 34 + 0004d 0f b7 94 81 34 08 00 00 movzx edx, WORD PTR [rcx+rax*4+2100] - 00054 48 8b 8d 40 01 + 00055 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 0005b e8 00 00 00 00 call stbi__out_gif_code + 0005c e8 00 00 00 00 call stbi__out_gif_code + 00061 90 npad 1 $LN4@stbi__out_: ; 6212 : ; 6213 : if (g->cur_y >= g->max_y) return; - 00060 48 8b 85 40 01 + 00062 48 8b 85 40 01 00 00 mov rax, QWORD PTR g$[rbp] - 00067 48 8b 8d 40 01 + 00069 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 0006e 8b 89 58 88 00 + 00070 8b 89 58 88 00 00 mov ecx, DWORD PTR [rcx+34904] - 00074 39 88 60 88 00 + 00076 39 88 60 88 00 00 cmp DWORD PTR [rax+34912], ecx - 0007a 7c 05 jl SHORT $LN5@stbi__out_ - 0007c e9 64 02 00 00 jmp $LN1@stbi__out_ + 0007c 7c 05 jl SHORT $LN5@stbi__out_ + 0007e e9 64 02 00 00 jmp $LN1@stbi__out_ $LN5@stbi__out_: ; 6214 : ; 6215 : idx = g->cur_x + g->cur_y; - 00081 48 8b 85 40 01 + 00083 48 8b 85 40 01 00 00 mov rax, QWORD PTR g$[rbp] - 00088 8b 80 5c 88 00 + 0008a 8b 80 5c 88 00 00 mov eax, DWORD PTR [rax+34908] - 0008e 48 8b 8d 40 01 + 00090 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 00095 03 81 60 88 00 + 00097 03 81 60 88 00 00 add eax, DWORD PTR [rcx+34912] - 0009b 89 45 44 mov DWORD PTR idx$[rbp], eax + 0009d 89 45 44 mov DWORD PTR idx$[rbp], eax ; 6216 : p = &g->out[idx]; - 0009e 48 63 45 44 movsxd rax, DWORD PTR idx$[rbp] - 000a2 48 8b 8d 40 01 + 000a0 48 63 45 44 movsxd rax, DWORD PTR idx$[rbp] + 000a4 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 000a9 48 8b 49 08 mov rcx, QWORD PTR [rcx+8] - 000ad 48 03 c8 add rcx, rax - 000b0 48 8b c1 mov rax, rcx - 000b3 48 89 45 08 mov QWORD PTR p$[rbp], rax + 000ab 48 8b 49 08 mov rcx, QWORD PTR [rcx+8] + 000af 48 03 c8 add rcx, rax + 000b2 48 8b c1 mov rax, rcx + 000b5 48 89 45 08 mov QWORD PTR p$[rbp], rax ; 6217 : g->history[idx / 4] = 1; - 000b7 8b 45 44 mov eax, DWORD PTR idx$[rbp] - 000ba 99 cdq - 000bb 83 e2 03 and edx, 3 - 000be 03 c2 add eax, edx - 000c0 c1 f8 02 sar eax, 2 - 000c3 48 98 cdqe - 000c5 48 8b 8d 40 01 + 000b9 8b 45 44 mov eax, DWORD PTR idx$[rbp] + 000bc 99 cdq + 000bd 83 e2 03 and edx, 3 + 000c0 03 c2 add eax, edx + 000c2 c1 f8 02 sar eax, 2 + 000c5 48 98 cdqe + 000c7 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 000cc 48 8b 49 18 mov rcx, QWORD PTR [rcx+24] - 000d0 c6 04 01 01 mov BYTE PTR [rcx+rax], 1 + 000ce 48 8b 49 18 mov rcx, QWORD PTR [rcx+24] + 000d2 c6 04 01 01 mov BYTE PTR [rcx+rax], 1 ; 6218 : ; 6219 : c = &g->color_table[g->codes[code].suffix * 4]; - 000d4 0f b7 85 48 01 + 000d6 0f b7 85 48 01 00 00 movzx eax, WORD PTR code$[rbp] - 000db 48 8b 8d 40 01 + 000dd 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 000e2 0f b6 84 81 37 + 000e4 0f b6 84 81 37 08 00 00 movzx eax, BYTE PTR [rcx+rax*4+2103] - 000ea c1 e0 02 shl eax, 2 - 000ed 48 98 cdqe - 000ef 48 8b 8d 40 01 + 000ec c1 e0 02 shl eax, 2 + 000ef 48 98 cdqe + 000f1 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 000f6 48 8b 89 38 88 + 000f8 48 8b 89 38 88 00 00 mov rcx, QWORD PTR [rcx+34872] - 000fd 48 03 c8 add rcx, rax - 00100 48 8b c1 mov rax, rcx - 00103 48 89 45 28 mov QWORD PTR c$[rbp], rax + 000ff 48 03 c8 add rcx, rax + 00102 48 8b c1 mov rax, rcx + 00105 48 89 45 28 mov QWORD PTR c$[rbp], rax ; 6220 : if (c[3] > 128) { // don't render transparent pixels; - 00107 b8 01 00 00 00 mov eax, 1 - 0010c 48 6b c0 03 imul rax, rax, 3 - 00110 48 8b 4d 28 mov rcx, QWORD PTR c$[rbp] - 00114 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00118 3d 80 00 00 00 cmp eax, 128 ; 00000080H - 0011d 0f 8e 88 00 00 + 00109 b8 01 00 00 00 mov eax, 1 + 0010e 48 6b c0 03 imul rax, rax, 3 + 00112 48 8b 4d 28 mov rcx, QWORD PTR c$[rbp] + 00116 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0011a 3d 80 00 00 00 cmp eax, 128 ; 00000080H + 0011f 0f 8e 88 00 00 00 jle $LN6@stbi__out_ ; 6221 : p[0] = c[2]; - 00123 b8 01 00 00 00 mov eax, 1 - 00128 48 6b c0 02 imul rax, rax, 2 - 0012c b9 01 00 00 00 mov ecx, 1 - 00131 48 6b c9 00 imul rcx, rcx, 0 - 00135 48 8b 55 08 mov rdx, QWORD PTR p$[rbp] - 00139 4c 8b 45 28 mov r8, QWORD PTR c$[rbp] - 0013d 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00142 88 04 0a mov BYTE PTR [rdx+rcx], al + 00125 b8 01 00 00 00 mov eax, 1 + 0012a 48 6b c0 02 imul rax, rax, 2 + 0012e b9 01 00 00 00 mov ecx, 1 + 00133 48 6b c9 00 imul rcx, rcx, 0 + 00137 48 8b 55 08 mov rdx, QWORD PTR p$[rbp] + 0013b 4c 8b 45 28 mov r8, QWORD PTR c$[rbp] + 0013f 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00144 88 04 0a mov BYTE PTR [rdx+rcx], al ; 6222 : p[1] = c[1]; - 00145 b8 01 00 00 00 mov eax, 1 - 0014a 48 6b c0 01 imul rax, rax, 1 - 0014e b9 01 00 00 00 mov ecx, 1 - 00153 48 6b c9 01 imul rcx, rcx, 1 - 00157 48 8b 55 08 mov rdx, QWORD PTR p$[rbp] - 0015b 4c 8b 45 28 mov r8, QWORD PTR c$[rbp] - 0015f 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00164 88 04 0a mov BYTE PTR [rdx+rcx], al + 00147 b8 01 00 00 00 mov eax, 1 + 0014c 48 6b c0 01 imul rax, rax, 1 + 00150 b9 01 00 00 00 mov ecx, 1 + 00155 48 6b c9 01 imul rcx, rcx, 1 + 00159 48 8b 55 08 mov rdx, QWORD PTR p$[rbp] + 0015d 4c 8b 45 28 mov r8, QWORD PTR c$[rbp] + 00161 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00166 88 04 0a mov BYTE PTR [rdx+rcx], al ; 6223 : p[2] = c[0]; - 00167 b8 01 00 00 00 mov eax, 1 - 0016c 48 6b c0 00 imul rax, rax, 0 - 00170 b9 01 00 00 00 mov ecx, 1 - 00175 48 6b c9 02 imul rcx, rcx, 2 - 00179 48 8b 55 08 mov rdx, QWORD PTR p$[rbp] - 0017d 4c 8b 45 28 mov r8, QWORD PTR c$[rbp] - 00181 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00186 88 04 0a mov BYTE PTR [rdx+rcx], al + 00169 b8 01 00 00 00 mov eax, 1 + 0016e 48 6b c0 00 imul rax, rax, 0 + 00172 b9 01 00 00 00 mov ecx, 1 + 00177 48 6b c9 02 imul rcx, rcx, 2 + 0017b 48 8b 55 08 mov rdx, QWORD PTR p$[rbp] + 0017f 4c 8b 45 28 mov r8, QWORD PTR c$[rbp] + 00183 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00188 88 04 0a mov BYTE PTR [rdx+rcx], al ; 6224 : p[3] = c[3]; - 00189 b8 01 00 00 00 mov eax, 1 - 0018e 48 6b c0 03 imul rax, rax, 3 - 00192 b9 01 00 00 00 mov ecx, 1 - 00197 48 6b c9 03 imul rcx, rcx, 3 - 0019b 48 8b 55 08 mov rdx, QWORD PTR p$[rbp] - 0019f 4c 8b 45 28 mov r8, QWORD PTR c$[rbp] - 001a3 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 001a8 88 04 0a mov BYTE PTR [rdx+rcx], al + 0018b b8 01 00 00 00 mov eax, 1 + 00190 48 6b c0 03 imul rax, rax, 3 + 00194 b9 01 00 00 00 mov ecx, 1 + 00199 48 6b c9 03 imul rcx, rcx, 3 + 0019d 48 8b 55 08 mov rdx, QWORD PTR p$[rbp] + 001a1 4c 8b 45 28 mov r8, QWORD PTR c$[rbp] + 001a5 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 001aa 88 04 0a mov BYTE PTR [rdx+rcx], al $LN6@stbi__out_: ; 6225 : } ; 6226 : g->cur_x += 4; - 001ab 48 8b 85 40 01 + 001ad 48 8b 85 40 01 00 00 mov rax, QWORD PTR g$[rbp] - 001b2 8b 80 5c 88 00 + 001b4 8b 80 5c 88 00 00 mov eax, DWORD PTR [rax+34908] - 001b8 83 c0 04 add eax, 4 - 001bb 48 8b 8d 40 01 + 001ba 83 c0 04 add eax, 4 + 001bd 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 001c2 89 81 5c 88 00 + 001c4 89 81 5c 88 00 00 mov DWORD PTR [rcx+34908], eax ; 6227 : ; 6228 : if (g->cur_x >= g->max_x) { - 001c8 48 8b 85 40 01 + 001ca 48 8b 85 40 01 00 00 mov rax, QWORD PTR g$[rbp] - 001cf 48 8b 8d 40 01 + 001d1 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 001d6 8b 89 54 88 00 + 001d8 8b 89 54 88 00 00 mov ecx, DWORD PTR [rcx+34900] - 001dc 39 88 5c 88 00 + 001de 39 88 5c 88 00 00 cmp DWORD PTR [rax+34908], ecx - 001e2 0f 8c fd 00 00 + 001e4 0f 8c fd 00 00 00 jl $LN7@stbi__out_ ; 6229 : g->cur_x = g->start_x; - 001e8 48 8b 85 40 01 + 001ea 48 8b 85 40 01 00 00 mov rax, QWORD PTR g$[rbp] - 001ef 48 8b 8d 40 01 + 001f1 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 001f6 8b 89 4c 88 00 + 001f8 8b 89 4c 88 00 00 mov ecx, DWORD PTR [rcx+34892] - 001fc 89 88 5c 88 00 + 001fe 89 88 5c 88 00 00 mov DWORD PTR [rax+34908], ecx ; 6230 : g->cur_y += g->step; - 00202 48 8b 85 40 01 + 00204 48 8b 85 40 01 00 00 mov rax, QWORD PTR g$[rbp] - 00209 8b 80 60 88 00 + 0020b 8b 80 60 88 00 00 mov eax, DWORD PTR [rax+34912] - 0020f 48 8b 8d 40 01 + 00211 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 00216 03 81 44 88 00 + 00218 03 81 44 88 00 00 add eax, DWORD PTR [rcx+34884] - 0021c 48 8b 8d 40 01 + 0021e 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 00223 89 81 60 88 00 + 00225 89 81 60 88 00 00 mov DWORD PTR [rcx+34912], eax $LN2@stbi__out_: ; 6231 : ; 6232 : while (g->cur_y >= g->max_y && g->parse > 0) { - 00229 48 8b 85 40 01 + 0022b 48 8b 85 40 01 00 00 mov rax, QWORD PTR g$[rbp] - 00230 48 8b 8d 40 01 + 00232 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 00237 8b 89 58 88 00 + 00239 8b 89 58 88 00 00 mov ecx, DWORD PTR [rcx+34904] - 0023d 39 88 60 88 00 + 0023f 39 88 60 88 00 00 cmp DWORD PTR [rax+34912], ecx - 00243 0f 8c 9c 00 00 + 00245 0f 8c 9c 00 00 00 jl $LN3@stbi__out_ - 00249 48 8b 85 40 01 + 0024b 48 8b 85 40 01 00 00 mov rax, QWORD PTR g$[rbp] - 00250 83 b8 40 88 00 + 00252 83 b8 40 88 00 00 00 cmp DWORD PTR [rax+34880], 0 - 00257 0f 8e 88 00 00 + 00259 0f 8e 88 00 00 00 jle $LN3@stbi__out_ ; 6233 : g->step = (1 << g->parse) * g->line_size; - 0025d 48 8b 85 40 01 + 0025f 48 8b 85 40 01 00 00 mov rax, QWORD PTR g$[rbp] - 00264 8b 80 40 88 00 + 00266 8b 80 40 88 00 00 mov eax, DWORD PTR [rax+34880] - 0026a b9 01 00 00 00 mov ecx, 1 - 0026f 89 8d 14 01 00 + 0026c b9 01 00 00 00 mov ecx, 1 + 00271 89 8d 14 01 00 00 mov DWORD PTR tv257[rbp], ecx - 00275 0f b6 c8 movzx ecx, al - 00278 8b 85 14 01 00 + 00277 0f b6 c8 movzx ecx, al + 0027a 8b 85 14 01 00 00 mov eax, DWORD PTR tv257[rbp] - 0027e d3 e0 shl eax, cl - 00280 48 8b 8d 40 01 + 00280 d3 e0 shl eax, cl + 00282 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 00287 0f af 81 64 88 + 00289 0f af 81 64 88 00 00 imul eax, DWORD PTR [rcx+34916] - 0028e 48 8b 8d 40 01 + 00290 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 00295 89 81 44 88 00 + 00297 89 81 44 88 00 00 mov DWORD PTR [rcx+34884], eax ; 6234 : g->cur_y = g->start_y + (g->step >> 1); - 0029b 48 8b 85 40 01 + 0029d 48 8b 85 40 01 00 00 mov rax, QWORD PTR g$[rbp] - 002a2 8b 80 44 88 00 + 002a4 8b 80 44 88 00 00 mov eax, DWORD PTR [rax+34884] - 002a8 d1 f8 sar eax, 1 - 002aa 48 8b 8d 40 01 + 002aa d1 f8 sar eax, 1 + 002ac 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 002b1 03 81 50 88 00 + 002b3 03 81 50 88 00 00 add eax, DWORD PTR [rcx+34896] - 002b7 48 8b 8d 40 01 + 002b9 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 002be 89 81 60 88 00 + 002c0 89 81 60 88 00 00 mov DWORD PTR [rcx+34912], eax ; 6235 : --g->parse; - 002c4 48 8b 85 40 01 + 002c6 48 8b 85 40 01 00 00 mov rax, QWORD PTR g$[rbp] - 002cb 8b 80 40 88 00 + 002cd 8b 80 40 88 00 00 mov eax, DWORD PTR [rax+34880] - 002d1 ff c8 dec eax - 002d3 48 8b 8d 40 01 + 002d3 ff c8 dec eax + 002d5 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR g$[rbp] - 002da 89 81 40 88 00 + 002dc 89 81 40 88 00 00 mov DWORD PTR [rcx+34880], eax ; 6236 : } - 002e0 e9 44 ff ff ff jmp $LN2@stbi__out_ + 002e2 e9 44 ff ff ff jmp $LN2@stbi__out_ $LN3@stbi__out_: $LN7@stbi__out_: $LN1@stbi__out_: @@ -9332,11 +9368,11 @@ $LN1@stbi__out_: ; 6237 : } ; 6238 : } - 002e5 48 8d a5 28 01 + 002e7 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 002ec 5f pop rdi - 002ed 5d pop rbp - 002ee c3 ret 0 + 002ee 5f pop rdi + 002ef 5d pop rbp + 002f0 c3 ret 0 stbi__out_gif_code ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -9364,97 +9400,101 @@ stbi__gif_info_raw PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 6190 : stbi__gif* g = (stbi__gif*)stbi__malloc(sizeof(stbi__gif)); - 0002e b9 70 88 00 00 mov ecx, 34928 ; 00008870H - 00033 e8 00 00 00 00 call stbi__malloc - 00038 48 89 45 08 mov QWORD PTR g$[rbp], rax + 0002f b9 70 88 00 00 mov ecx, 34928 ; 00008870H + 00034 e8 00 00 00 00 call stbi__malloc + 00039 48 89 45 08 mov QWORD PTR g$[rbp], rax ; 6191 : if (!g) return stbi__err("outofmem", "Out of memory"); - 0003c 48 83 7d 08 00 cmp QWORD PTR g$[rbp], 0 - 00041 75 0e jne SHORT $LN2@stbi__gif_ - 00043 48 8d 0d 00 00 + 0003d 48 83 7d 08 00 cmp QWORD PTR g$[rbp], 0 + 00042 75 11 jne SHORT $LN2@stbi__gif_ + 00044 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 0004a e8 00 00 00 00 call stbi__err - 0004f eb 7d jmp SHORT $LN1@stbi__gif_ + 0004b e8 00 00 00 00 call stbi__err + 00050 e9 80 00 00 00 jmp $LN1@stbi__gif_ $LN2@stbi__gif_: ; 6192 : if (!stbi__gif_header(s, g, comp, 1)) { - 00051 41 b9 01 00 00 + 00055 41 b9 01 00 00 00 mov r9d, 1 - 00057 4c 8b 85 18 01 + 0005b 4c 8b 85 18 01 00 00 mov r8, QWORD PTR comp$[rbp] - 0005e 48 8b 55 08 mov rdx, QWORD PTR g$[rbp] - 00062 48 8b 8d 00 01 + 00062 48 8b 55 08 mov rdx, QWORD PTR g$[rbp] + 00066 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00069 e8 00 00 00 00 call stbi__gif_header - 0006e 85 c0 test eax, eax - 00070 75 1a jne SHORT $LN3@stbi__gif_ + 0006d e8 00 00 00 00 call stbi__gif_header + 00072 85 c0 test eax, eax + 00074 75 1c jne SHORT $LN3@stbi__gif_ ; 6193 : STBI_FREE(g); - 00072 48 8b 4d 08 mov rcx, QWORD PTR g$[rbp] - 00076 ff 15 00 00 00 + 00076 48 8b 4d 08 mov rcx, QWORD PTR g$[rbp] + 0007a ff 15 00 00 00 00 call QWORD PTR __imp_free + 00080 90 npad 1 ; 6194 : stbi__rewind(s); - 0007c 48 8b 8d 00 01 + 00081 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00083 e8 00 00 00 00 call stbi__rewind + 00088 e8 00 00 00 00 call stbi__rewind + 0008d 90 npad 1 ; 6195 : return 0; - 00088 33 c0 xor eax, eax - 0008a eb 42 jmp SHORT $LN1@stbi__gif_ + 0008e 33 c0 xor eax, eax + 00090 eb 43 jmp SHORT $LN1@stbi__gif_ $LN3@stbi__gif_: ; 6196 : } ; 6197 : if (x) *x = g->w; - 0008c 48 83 bd 08 01 + 00092 48 83 bd 08 01 00 00 00 cmp QWORD PTR x$[rbp], 0 - 00094 74 0f je SHORT $LN4@stbi__gif_ - 00096 48 8b 85 08 01 + 0009a 74 0f je SHORT $LN4@stbi__gif_ + 0009c 48 8b 85 08 01 00 00 mov rax, QWORD PTR x$[rbp] - 0009d 48 8b 4d 08 mov rcx, QWORD PTR g$[rbp] - 000a1 8b 09 mov ecx, DWORD PTR [rcx] - 000a3 89 08 mov DWORD PTR [rax], ecx + 000a3 48 8b 4d 08 mov rcx, QWORD PTR g$[rbp] + 000a7 8b 09 mov ecx, DWORD PTR [rcx] + 000a9 89 08 mov DWORD PTR [rax], ecx $LN4@stbi__gif_: ; 6198 : if (y) *y = g->h; - 000a5 48 83 bd 10 01 + 000ab 48 83 bd 10 01 00 00 00 cmp QWORD PTR y$[rbp], 0 - 000ad 74 10 je SHORT $LN5@stbi__gif_ - 000af 48 8b 85 10 01 + 000b3 74 10 je SHORT $LN5@stbi__gif_ + 000b5 48 8b 85 10 01 00 00 mov rax, QWORD PTR y$[rbp] - 000b6 48 8b 4d 08 mov rcx, QWORD PTR g$[rbp] - 000ba 8b 49 04 mov ecx, DWORD PTR [rcx+4] - 000bd 89 08 mov DWORD PTR [rax], ecx + 000bc 48 8b 4d 08 mov rcx, QWORD PTR g$[rbp] + 000c0 8b 49 04 mov ecx, DWORD PTR [rcx+4] + 000c3 89 08 mov DWORD PTR [rax], ecx $LN5@stbi__gif_: ; 6199 : STBI_FREE(g); - 000bf 48 8b 4d 08 mov rcx, QWORD PTR g$[rbp] - 000c3 ff 15 00 00 00 + 000c5 48 8b 4d 08 mov rcx, QWORD PTR g$[rbp] + 000c9 ff 15 00 00 00 00 call QWORD PTR __imp_free + 000cf 90 npad 1 ; 6200 : return 1; - 000c9 b8 01 00 00 00 mov eax, 1 + 000d0 b8 01 00 00 00 mov eax, 1 $LN1@stbi__gif_: ; 6201 : } - 000ce 48 8d a5 e8 00 + 000d5 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 000d5 5f pop rdi - 000d6 5d pop rbp - 000d7 c3 ret 0 + 000dc 5f pop rdi + 000dd 5d pop rbp + 000de c3 ret 0 stbi__gif_info_raw ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -9483,246 +9523,248 @@ stbi__gif_header PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 6159 : stbi_uc version; ; 6160 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') - 0002e 48 8b 8d 00 01 + 0002f 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00035 e8 00 00 00 00 call stbi__get8 - 0003a 0f b6 c0 movzx eax, al - 0003d 83 f8 47 cmp eax, 71 ; 00000047H - 00040 75 3c jne SHORT $LN3@stbi__gif_ - 00042 48 8b 8d 00 01 + 00036 e8 00 00 00 00 call stbi__get8 + 0003b 0f b6 c0 movzx eax, al + 0003e 83 f8 47 cmp eax, 71 ; 00000047H + 00041 75 3c jne SHORT $LN3@stbi__gif_ + 00043 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00049 e8 00 00 00 00 call stbi__get8 - 0004e 0f b6 c0 movzx eax, al - 00051 83 f8 49 cmp eax, 73 ; 00000049H - 00054 75 28 jne SHORT $LN3@stbi__gif_ - 00056 48 8b 8d 00 01 + 0004a e8 00 00 00 00 call stbi__get8 + 0004f 0f b6 c0 movzx eax, al + 00052 83 f8 49 cmp eax, 73 ; 00000049H + 00055 75 28 jne SHORT $LN3@stbi__gif_ + 00057 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0005d e8 00 00 00 00 call stbi__get8 - 00062 0f b6 c0 movzx eax, al - 00065 83 f8 46 cmp eax, 70 ; 00000046H - 00068 75 14 jne SHORT $LN3@stbi__gif_ - 0006a 48 8b 8d 00 01 + 0005e e8 00 00 00 00 call stbi__get8 + 00063 0f b6 c0 movzx eax, al + 00066 83 f8 46 cmp eax, 70 ; 00000046H + 00069 75 14 jne SHORT $LN3@stbi__gif_ + 0006b 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00071 e8 00 00 00 00 call stbi__get8 - 00076 0f b6 c0 movzx eax, al - 00079 83 f8 38 cmp eax, 56 ; 00000038H - 0007c 74 11 je SHORT $LN2@stbi__gif_ + 00072 e8 00 00 00 00 call stbi__get8 + 00077 0f b6 c0 movzx eax, al + 0007a 83 f8 38 cmp eax, 56 ; 00000038H + 0007d 74 11 je SHORT $LN2@stbi__gif_ $LN3@stbi__gif_: ; 6161 : return stbi__err("not GIF", "Corrupt GIF"); - 0007e 48 8d 0d 00 00 + 0007f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07KMJLPAII@not?5GIF@ - 00085 e8 00 00 00 00 call stbi__err - 0008a e9 c6 01 00 00 jmp $LN1@stbi__gif_ + 00086 e8 00 00 00 00 call stbi__err + 0008b e9 c7 01 00 00 jmp $LN1@stbi__gif_ $LN2@stbi__gif_: ; 6162 : ; 6163 : version = stbi__get8(s); - 0008f 48 8b 8d 00 01 + 00090 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00096 e8 00 00 00 00 call stbi__get8 - 0009b 88 45 04 mov BYTE PTR version$[rbp], al + 00097 e8 00 00 00 00 call stbi__get8 + 0009c 88 45 04 mov BYTE PTR version$[rbp], al ; 6164 : if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF"); - 0009e 0f b6 45 04 movzx eax, BYTE PTR version$[rbp] - 000a2 83 f8 37 cmp eax, 55 ; 00000037H - 000a5 74 1a je SHORT $LN4@stbi__gif_ - 000a7 0f b6 45 04 movzx eax, BYTE PTR version$[rbp] - 000ab 83 f8 39 cmp eax, 57 ; 00000039H - 000ae 74 11 je SHORT $LN4@stbi__gif_ - 000b0 48 8d 0d 00 00 + 0009f 0f b6 45 04 movzx eax, BYTE PTR version$[rbp] + 000a3 83 f8 37 cmp eax, 55 ; 00000037H + 000a6 74 1a je SHORT $LN4@stbi__gif_ + 000a8 0f b6 45 04 movzx eax, BYTE PTR version$[rbp] + 000ac 83 f8 39 cmp eax, 57 ; 00000039H + 000af 74 11 je SHORT $LN4@stbi__gif_ + 000b1 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07KMJLPAII@not?5GIF@ - 000b7 e8 00 00 00 00 call stbi__err - 000bc e9 94 01 00 00 jmp $LN1@stbi__gif_ + 000b8 e8 00 00 00 00 call stbi__err + 000bd e9 95 01 00 00 jmp $LN1@stbi__gif_ $LN4@stbi__gif_: ; 6165 : if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF"); - 000c1 48 8b 8d 00 01 + 000c2 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000c8 e8 00 00 00 00 call stbi__get8 - 000cd 0f b6 c0 movzx eax, al - 000d0 83 f8 61 cmp eax, 97 ; 00000061H - 000d3 74 11 je SHORT $LN5@stbi__gif_ - 000d5 48 8d 0d 00 00 + 000c9 e8 00 00 00 00 call stbi__get8 + 000ce 0f b6 c0 movzx eax, al + 000d1 83 f8 61 cmp eax, 97 ; 00000061H + 000d4 74 11 je SHORT $LN5@stbi__gif_ + 000d6 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07KMJLPAII@not?5GIF@ - 000dc e8 00 00 00 00 call stbi__err - 000e1 e9 6f 01 00 00 jmp $LN1@stbi__gif_ + 000dd e8 00 00 00 00 call stbi__err + 000e2 e9 70 01 00 00 jmp $LN1@stbi__gif_ $LN5@stbi__gif_: ; 6166 : ; 6167 : stbi__g_failure_reason = ""; - 000e6 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__g_failure_reason - 000eb 8b c0 mov eax, eax - 000ed 8b 0d 00 00 00 + 000e7 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__g_failure_reason + 000ec 8b c0 mov eax, eax + 000ee 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 000f3 65 48 8b 14 25 + 000f4 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 000fc 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00100 48 8d 15 00 00 + 000fd 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00101 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_00CNPNBAHC@@ - 00107 48 89 14 08 mov QWORD PTR [rax+rcx], rdx + 00108 48 89 14 08 mov QWORD PTR [rax+rcx], rdx ; 6168 : g->w = stbi__get16le(s); - 0010b 48 8b 8d 00 01 + 0010c 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00112 e8 00 00 00 00 call stbi__get16le - 00117 48 8b 8d 08 01 + 00113 e8 00 00 00 00 call stbi__get16le + 00118 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR g$[rbp] - 0011e 89 01 mov DWORD PTR [rcx], eax + 0011f 89 01 mov DWORD PTR [rcx], eax ; 6169 : g->h = stbi__get16le(s); - 00120 48 8b 8d 00 01 + 00121 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00127 e8 00 00 00 00 call stbi__get16le - 0012c 48 8b 8d 08 01 + 00128 e8 00 00 00 00 call stbi__get16le + 0012d 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR g$[rbp] - 00133 89 41 04 mov DWORD PTR [rcx+4], eax + 00134 89 41 04 mov DWORD PTR [rcx+4], eax ; 6170 : g->flags = stbi__get8(s); - 00136 48 8b 8d 00 01 + 00137 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0013d e8 00 00 00 00 call stbi__get8 - 00142 0f b6 c0 movzx eax, al - 00145 48 8b 8d 08 01 + 0013e e8 00 00 00 00 call stbi__get8 + 00143 0f b6 c0 movzx eax, al + 00146 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR g$[rbp] - 0014c 89 41 20 mov DWORD PTR [rcx+32], eax + 0014d 89 41 20 mov DWORD PTR [rcx+32], eax ; 6171 : g->bgindex = stbi__get8(s); - 0014f 48 8b 8d 00 01 + 00150 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00156 e8 00 00 00 00 call stbi__get8 - 0015b 0f b6 c0 movzx eax, al - 0015e 48 8b 8d 08 01 + 00157 e8 00 00 00 00 call stbi__get8 + 0015c 0f b6 c0 movzx eax, al + 0015f 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR g$[rbp] - 00165 89 41 24 mov DWORD PTR [rcx+36], eax + 00166 89 41 24 mov DWORD PTR [rcx+36], eax ; 6172 : g->ratio = stbi__get8(s); - 00168 48 8b 8d 00 01 + 00169 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0016f e8 00 00 00 00 call stbi__get8 - 00174 0f b6 c0 movzx eax, al - 00177 48 8b 8d 08 01 + 00170 e8 00 00 00 00 call stbi__get8 + 00175 0f b6 c0 movzx eax, al + 00178 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR g$[rbp] - 0017e 89 41 28 mov DWORD PTR [rcx+40], eax + 0017f 89 41 28 mov DWORD PTR [rcx+40], eax ; 6173 : g->transparent = -1; - 00181 48 8b 85 08 01 + 00182 48 8b 85 08 01 00 00 mov rax, QWORD PTR g$[rbp] - 00188 c7 40 2c ff ff + 00189 c7 40 2c ff ff ff ff mov DWORD PTR [rax+44], -1 ; 6174 : ; 6175 : if (g->w > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); - 0018f 48 8b 85 08 01 + 00190 48 8b 85 08 01 00 00 mov rax, QWORD PTR g$[rbp] - 00196 81 38 00 00 00 + 00197 81 38 00 00 00 01 cmp DWORD PTR [rax], 16777216 ; 01000000H - 0019c 7e 11 jle SHORT $LN6@stbi__gif_ - 0019e 48 8d 0d 00 00 + 0019d 7e 11 jle SHORT $LN6@stbi__gif_ + 0019f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 001a5 e8 00 00 00 00 call stbi__err - 001aa e9 a6 00 00 00 jmp $LN1@stbi__gif_ + 001a6 e8 00 00 00 00 call stbi__err + 001ab e9 a7 00 00 00 jmp $LN1@stbi__gif_ $LN6@stbi__gif_: ; 6176 : if (g->h > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); - 001af 48 8b 85 08 01 + 001b0 48 8b 85 08 01 00 00 mov rax, QWORD PTR g$[rbp] - 001b6 81 78 04 00 00 + 001b7 81 78 04 00 00 00 01 cmp DWORD PTR [rax+4], 16777216 ; 01000000H - 001bd 7e 11 jle SHORT $LN7@stbi__gif_ - 001bf 48 8d 0d 00 00 + 001be 7e 11 jle SHORT $LN7@stbi__gif_ + 001c0 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 001c6 e8 00 00 00 00 call stbi__err - 001cb e9 85 00 00 00 jmp $LN1@stbi__gif_ + 001c7 e8 00 00 00 00 call stbi__err + 001cc e9 86 00 00 00 jmp $LN1@stbi__gif_ $LN7@stbi__gif_: ; 6177 : ; 6178 : if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments - 001d0 48 83 bd 10 01 + 001d1 48 83 bd 10 01 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 001d8 74 0d je SHORT $LN8@stbi__gif_ - 001da 48 8b 85 10 01 + 001d9 74 0d je SHORT $LN8@stbi__gif_ + 001db 48 8b 85 10 01 00 00 mov rax, QWORD PTR comp$[rbp] - 001e1 c7 00 04 00 00 + 001e2 c7 00 04 00 00 00 mov DWORD PTR [rax], 4 $LN8@stbi__gif_: ; 6179 : ; 6180 : if (is_info) return 1; - 001e7 83 bd 18 01 00 + 001e8 83 bd 18 01 00 00 00 cmp DWORD PTR is_info$[rbp], 0 - 001ee 74 07 je SHORT $LN9@stbi__gif_ - 001f0 b8 01 00 00 00 mov eax, 1 - 001f5 eb 5e jmp SHORT $LN1@stbi__gif_ + 001ef 74 07 je SHORT $LN9@stbi__gif_ + 001f1 b8 01 00 00 00 mov eax, 1 + 001f6 eb 5f jmp SHORT $LN1@stbi__gif_ $LN9@stbi__gif_: ; 6181 : ; 6182 : if (g->flags & 0x80) - 001f7 48 8b 85 08 01 + 001f8 48 8b 85 08 01 00 00 mov rax, QWORD PTR g$[rbp] - 001fe 8b 40 20 mov eax, DWORD PTR [rax+32] - 00201 25 80 00 00 00 and eax, 128 ; 00000080H - 00206 85 c0 test eax, eax - 00208 74 46 je SHORT $LN10@stbi__gif_ + 001ff 8b 40 20 mov eax, DWORD PTR [rax+32] + 00202 25 80 00 00 00 and eax, 128 ; 00000080H + 00207 85 c0 test eax, eax + 00209 74 47 je SHORT $LN10@stbi__gif_ ; 6183 : stbi__gif_parse_colortable(s, g->pal, 2 << (g->flags & 7), -1); - 0020a 48 8b 85 08 01 + 0020b 48 8b 85 08 01 00 00 mov rax, QWORD PTR g$[rbp] - 00211 8b 40 20 mov eax, DWORD PTR [rax+32] - 00214 83 e0 07 and eax, 7 - 00217 b9 02 00 00 00 mov ecx, 2 - 0021c 89 8d d4 00 00 + 00212 8b 40 20 mov eax, DWORD PTR [rax+32] + 00215 83 e0 07 and eax, 7 + 00218 b9 02 00 00 00 mov ecx, 2 + 0021d 89 8d d4 00 00 00 mov DWORD PTR tv225[rbp], ecx - 00222 0f b6 c8 movzx ecx, al - 00225 8b 85 d4 00 00 + 00223 0f b6 c8 movzx ecx, al + 00226 8b 85 d4 00 00 00 mov eax, DWORD PTR tv225[rbp] - 0022b d3 e0 shl eax, cl - 0022d 48 8b 8d 08 01 + 0022c d3 e0 shl eax, cl + 0022e 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR g$[rbp] - 00234 48 83 c1 34 add rcx, 52 ; 00000034H - 00238 41 b9 ff ff ff + 00235 48 83 c1 34 add rcx, 52 ; 00000034H + 00239 41 b9 ff ff ff ff mov r9d, -1 - 0023e 44 8b c0 mov r8d, eax - 00241 48 8b d1 mov rdx, rcx - 00244 48 8b 8d 00 01 + 0023f 44 8b c0 mov r8d, eax + 00242 48 8b d1 mov rdx, rcx + 00245 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0024b e8 00 00 00 00 call stbi__gif_parse_colortable + 0024c e8 00 00 00 00 call stbi__gif_parse_colortable + 00251 90 npad 1 $LN10@stbi__gif_: ; 6184 : ; 6185 : return 1; - 00250 b8 01 00 00 00 mov eax, 1 + 00252 b8 01 00 00 00 mov eax, 1 $LN1@stbi__gif_: ; 6186 : } - 00255 48 8d a5 e8 00 + 00257 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 0025c 5f pop rdi - 0025d 5d pop rbp - 0025e c3 ret 0 + 0025e 5f pop rdi + 0025f 5d pop rbp + 00260 c3 ret 0 stbi__gif_header ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -9751,98 +9793,99 @@ stbi__gif_parse_colortable PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 6148 : int i; ; 6149 : for (i = 0; i < num_entries; ++i) { - 0002e c7 45 04 00 00 + 0002f c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00035 eb 08 jmp SHORT $LN4@stbi__gif_ + 00036 eb 08 jmp SHORT $LN4@stbi__gif_ $LN2@stbi__gif_: - 00037 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0003a ff c0 inc eax - 0003c 89 45 04 mov DWORD PTR i$[rbp], eax + 00038 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0003b ff c0 inc eax + 0003d 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__gif_: - 0003f 8b 85 10 01 00 + 00040 8b 85 10 01 00 00 mov eax, DWORD PTR num_entries$[rbp] - 00045 39 45 04 cmp DWORD PTR i$[rbp], eax - 00048 0f 8d bd 00 00 + 00046 39 45 04 cmp DWORD PTR i$[rbp], eax + 00049 0f 8d bd 00 00 00 jge $LN3@stbi__gif_ ; 6150 : pal[i][2] = stbi__get8(s); - 0004e 48 8b 8d 00 01 + 0004f 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00055 e8 00 00 00 00 call stbi__get8 - 0005a 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 0005e 48 8b 95 08 01 + 00056 e8 00 00 00 00 call stbi__get8 + 0005b 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 0005f 48 8b 95 08 01 00 00 mov rdx, QWORD PTR pal$[rbp] - 00065 48 8d 0c 8a lea rcx, QWORD PTR [rdx+rcx*4] - 00069 ba 01 00 00 00 mov edx, 1 - 0006e 48 6b d2 02 imul rdx, rdx, 2 - 00072 88 04 11 mov BYTE PTR [rcx+rdx], al + 00066 48 8d 0c 8a lea rcx, QWORD PTR [rdx+rcx*4] + 0006a ba 01 00 00 00 mov edx, 1 + 0006f 48 6b d2 02 imul rdx, rdx, 2 + 00073 88 04 11 mov BYTE PTR [rcx+rdx], al ; 6151 : pal[i][1] = stbi__get8(s); - 00075 48 8b 8d 00 01 + 00076 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0007c e8 00 00 00 00 call stbi__get8 - 00081 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 00085 48 8b 95 08 01 + 0007d e8 00 00 00 00 call stbi__get8 + 00082 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 00086 48 8b 95 08 01 00 00 mov rdx, QWORD PTR pal$[rbp] - 0008c 48 8d 0c 8a lea rcx, QWORD PTR [rdx+rcx*4] - 00090 ba 01 00 00 00 mov edx, 1 - 00095 48 6b d2 01 imul rdx, rdx, 1 - 00099 88 04 11 mov BYTE PTR [rcx+rdx], al + 0008d 48 8d 0c 8a lea rcx, QWORD PTR [rdx+rcx*4] + 00091 ba 01 00 00 00 mov edx, 1 + 00096 48 6b d2 01 imul rdx, rdx, 1 + 0009a 88 04 11 mov BYTE PTR [rcx+rdx], al ; 6152 : pal[i][0] = stbi__get8(s); - 0009c 48 8b 8d 00 01 + 0009d 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000a3 e8 00 00 00 00 call stbi__get8 - 000a8 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 000ac 48 8b 95 08 01 + 000a4 e8 00 00 00 00 call stbi__get8 + 000a9 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 000ad 48 8b 95 08 01 00 00 mov rdx, QWORD PTR pal$[rbp] - 000b3 48 8d 0c 8a lea rcx, QWORD PTR [rdx+rcx*4] - 000b7 ba 01 00 00 00 mov edx, 1 - 000bc 48 6b d2 00 imul rdx, rdx, 0 - 000c0 88 04 11 mov BYTE PTR [rcx+rdx], al + 000b4 48 8d 0c 8a lea rcx, QWORD PTR [rdx+rcx*4] + 000b8 ba 01 00 00 00 mov edx, 1 + 000bd 48 6b d2 00 imul rdx, rdx, 0 + 000c1 88 04 11 mov BYTE PTR [rcx+rdx], al ; 6153 : pal[i][3] = transp == i ? 0 : 255; - 000c3 8b 45 04 mov eax, DWORD PTR i$[rbp] - 000c6 39 85 18 01 00 + 000c4 8b 45 04 mov eax, DWORD PTR i$[rbp] + 000c7 39 85 18 01 00 00 cmp DWORD PTR transp$[rbp], eax - 000cc 75 0c jne SHORT $LN6@stbi__gif_ - 000ce c7 85 d4 00 00 + 000cd 75 0c jne SHORT $LN6@stbi__gif_ + 000cf c7 85 d4 00 00 00 00 00 00 00 mov DWORD PTR tv93[rbp], 0 - 000d8 eb 0a jmp SHORT $LN7@stbi__gif_ + 000d9 eb 0a jmp SHORT $LN7@stbi__gif_ $LN6@stbi__gif_: - 000da c7 85 d4 00 00 + 000db c7 85 d4 00 00 00 ff 00 00 00 mov DWORD PTR tv93[rbp], 255 ; 000000ffH $LN7@stbi__gif_: - 000e4 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 000e8 48 8b 8d 08 01 + 000e5 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 000e9 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR pal$[rbp] - 000ef 48 8d 04 81 lea rax, QWORD PTR [rcx+rax*4] - 000f3 b9 01 00 00 00 mov ecx, 1 - 000f8 48 6b c9 03 imul rcx, rcx, 3 - 000fc 0f b6 95 d4 00 + 000f0 48 8d 04 81 lea rax, QWORD PTR [rcx+rax*4] + 000f4 b9 01 00 00 00 mov ecx, 1 + 000f9 48 6b c9 03 imul rcx, rcx, 3 + 000fd 0f b6 95 d4 00 00 00 movzx edx, BYTE PTR tv93[rbp] - 00103 88 14 08 mov BYTE PTR [rax+rcx], dl + 00104 88 14 08 mov BYTE PTR [rax+rcx], dl ; 6154 : } - 00106 e9 2c ff ff ff jmp $LN2@stbi__gif_ + 00107 e9 2c ff ff ff jmp $LN2@stbi__gif_ $LN3@stbi__gif_: ; 6155 : } - 0010b 48 8d a5 e8 00 + 0010c 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00112 5f pop rdi - 00113 5d pop rbp - 00114 c3 ret 0 + 00113 5f pop rdi + 00114 5d pop rbp + 00115 c3 ret 0 stbi__gif_parse_colortable ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -9864,81 +9907,82 @@ stbi__gif_test_raw PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 6131 : int sz; ; 6132 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0; - 0001f 48 8b 8d 00 01 + 00020 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__get8 - 0002b 0f b6 c0 movzx eax, al - 0002e 83 f8 47 cmp eax, 71 ; 00000047H - 00031 75 3c jne SHORT $LN3@stbi__gif_ - 00033 48 8b 8d 00 01 + 00027 e8 00 00 00 00 call stbi__get8 + 0002c 0f b6 c0 movzx eax, al + 0002f 83 f8 47 cmp eax, 71 ; 00000047H + 00032 75 3c jne SHORT $LN3@stbi__gif_ + 00034 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0003a e8 00 00 00 00 call stbi__get8 - 0003f 0f b6 c0 movzx eax, al - 00042 83 f8 49 cmp eax, 73 ; 00000049H - 00045 75 28 jne SHORT $LN3@stbi__gif_ - 00047 48 8b 8d 00 01 + 0003b e8 00 00 00 00 call stbi__get8 + 00040 0f b6 c0 movzx eax, al + 00043 83 f8 49 cmp eax, 73 ; 00000049H + 00046 75 28 jne SHORT $LN3@stbi__gif_ + 00048 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0004e e8 00 00 00 00 call stbi__get8 - 00053 0f b6 c0 movzx eax, al - 00056 83 f8 46 cmp eax, 70 ; 00000046H - 00059 75 14 jne SHORT $LN3@stbi__gif_ - 0005b 48 8b 8d 00 01 + 0004f e8 00 00 00 00 call stbi__get8 + 00054 0f b6 c0 movzx eax, al + 00057 83 f8 46 cmp eax, 70 ; 00000046H + 0005a 75 14 jne SHORT $LN3@stbi__gif_ + 0005c 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00062 e8 00 00 00 00 call stbi__get8 - 00067 0f b6 c0 movzx eax, al - 0006a 83 f8 38 cmp eax, 56 ; 00000038H - 0006d 74 04 je SHORT $LN2@stbi__gif_ + 00063 e8 00 00 00 00 call stbi__get8 + 00068 0f b6 c0 movzx eax, al + 0006b 83 f8 38 cmp eax, 56 ; 00000038H + 0006e 74 04 je SHORT $LN2@stbi__gif_ $LN3@stbi__gif_: - 0006f 33 c0 xor eax, eax - 00071 eb 3f jmp SHORT $LN1@stbi__gif_ + 00070 33 c0 xor eax, eax + 00072 eb 3f jmp SHORT $LN1@stbi__gif_ $LN2@stbi__gif_: ; 6133 : sz = stbi__get8(s); - 00073 48 8b 8d 00 01 + 00074 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0007a e8 00 00 00 00 call stbi__get8 - 0007f 0f b6 c0 movzx eax, al - 00082 89 45 04 mov DWORD PTR sz$[rbp], eax + 0007b e8 00 00 00 00 call stbi__get8 + 00080 0f b6 c0 movzx eax, al + 00083 89 45 04 mov DWORD PTR sz$[rbp], eax ; 6134 : if (sz != '9' && sz != '7') return 0; - 00085 83 7d 04 39 cmp DWORD PTR sz$[rbp], 57 ; 00000039H - 00089 74 0a je SHORT $LN4@stbi__gif_ - 0008b 83 7d 04 37 cmp DWORD PTR sz$[rbp], 55 ; 00000037H - 0008f 74 04 je SHORT $LN4@stbi__gif_ - 00091 33 c0 xor eax, eax - 00093 eb 1d jmp SHORT $LN1@stbi__gif_ + 00086 83 7d 04 39 cmp DWORD PTR sz$[rbp], 57 ; 00000039H + 0008a 74 0a je SHORT $LN4@stbi__gif_ + 0008c 83 7d 04 37 cmp DWORD PTR sz$[rbp], 55 ; 00000037H + 00090 74 04 je SHORT $LN4@stbi__gif_ + 00092 33 c0 xor eax, eax + 00094 eb 1d jmp SHORT $LN1@stbi__gif_ $LN4@stbi__gif_: ; 6135 : if (stbi__get8(s) != 'a') return 0; - 00095 48 8b 8d 00 01 + 00096 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0009c e8 00 00 00 00 call stbi__get8 - 000a1 0f b6 c0 movzx eax, al - 000a4 83 f8 61 cmp eax, 97 ; 00000061H - 000a7 74 04 je SHORT $LN5@stbi__gif_ - 000a9 33 c0 xor eax, eax - 000ab eb 05 jmp SHORT $LN1@stbi__gif_ + 0009d e8 00 00 00 00 call stbi__get8 + 000a2 0f b6 c0 movzx eax, al + 000a5 83 f8 61 cmp eax, 97 ; 00000061H + 000a8 74 04 je SHORT $LN5@stbi__gif_ + 000aa 33 c0 xor eax, eax + 000ac eb 05 jmp SHORT $LN1@stbi__gif_ $LN5@stbi__gif_: ; 6136 : return 1; - 000ad b8 01 00 00 00 mov eax, 1 + 000ae b8 01 00 00 00 mov eax, 1 $LN1@stbi__gif_: ; 6137 : } - 000b2 48 8d a5 e8 00 + 000b3 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 000b9 5f pop rdi - 000ba 5d pop rbp - 000bb c3 ret 0 + 000ba 5f pop rdi + 000bb 5d pop rbp + 000bc c3 ret 0 stbi__gif_test_raw ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -9963,16 +10007,16 @@ left$15 = 484 count$16 = 516 i$17 = 548 value$18 = 580 -tv152 = 980 tv138 = 980 -tv238 = 984 -tv217 = 984 -tv207 = 984 -tv176 = 984 -tv156 = 984 -tv134 = 984 +tv152 = 980 tv95 = 984 +tv134 = 984 +tv238 = 984 tv69 = 984 +tv156 = 984 +tv176 = 984 +tv207 = 984 +tv217 = 984 __$ArrayPad$ = 992 s$ = 1040 width$ = 1048 @@ -10006,12 +10050,13 @@ stbi__pic_load_core PROC ; COMDAT 0004b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00052 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00057 90 npad 1 ; 5940 : int act_comp = 0, num_packets = 0, y, chained; - 00057 c7 45 04 00 00 + 00058 c7 45 04 00 00 00 00 mov DWORD PTR act_comp$[rbp], 0 - 0005e c7 45 24 00 00 + 0005f c7 45 24 00 00 00 00 mov DWORD PTR num_packets$[rbp], 0 $LN4@stbi__pic_: @@ -10024,271 +10069,271 @@ $LN4@stbi__pic_: ; 5947 : ; 5948 : if (num_packets == sizeof(packets) / sizeof(packets[0])) - 00065 48 63 45 24 movsxd rax, DWORD PTR num_packets$[rbp] - 00069 48 83 f8 0a cmp rax, 10 - 0006d 75 34 jne SHORT $LN29@stbi__pic_ + 00066 48 63 45 24 movsxd rax, DWORD PTR num_packets$[rbp] + 0006a 48 83 f8 0a cmp rax, 10 + 0006e 75 34 jne SHORT $LN29@stbi__pic_ ; 5949 : return stbi__errpuc("bad format", "too many packets"); - 0006f 48 8d 0d 00 00 + 00070 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0L@DMAPJJO@bad?5format@ - 00076 e8 00 00 00 00 call stbi__err - 0007b 85 c0 test eax, eax - 0007d 74 0d je SHORT $LN50@stbi__pic_ - 0007f 48 c7 85 d8 03 + 00077 e8 00 00 00 00 call stbi__err + 0007c 85 c0 test eax, eax + 0007e 74 0d je SHORT $LN50@stbi__pic_ + 00080 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv69[rbp], 0 - 0008a eb 0b jmp SHORT $LN51@stbi__pic_ + 0008b eb 0b jmp SHORT $LN51@stbi__pic_ $LN50@stbi__pic_: - 0008c 48 c7 85 d8 03 + 0008d 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv69[rbp], 0 $LN51@stbi__pic_: - 00097 48 8b 85 d8 03 + 00098 48 8b 85 d8 03 00 00 mov rax, QWORD PTR tv69[rbp] - 0009e e9 38 06 00 00 jmp $LN1@stbi__pic_ + 0009f e9 3a 06 00 00 jmp $LN1@stbi__pic_ $LN29@stbi__pic_: ; 5950 : ; 5951 : packet = &packets[num_packets++]; - 000a3 48 63 45 24 movsxd rax, DWORD PTR num_packets$[rbp] - 000a7 48 6b c0 03 imul rax, rax, 3 - 000ab 48 8d 84 05 88 + 000a4 48 63 45 24 movsxd rax, DWORD PTR num_packets$[rbp] + 000a8 48 6b c0 03 imul rax, rax, 3 + 000ac 48 8d 84 05 88 00 00 00 lea rax, QWORD PTR packets$[rbp+rax] - 000b3 48 89 85 c8 00 + 000b4 48 89 85 c8 00 00 00 mov QWORD PTR packet$6[rbp], rax - 000ba 8b 45 24 mov eax, DWORD PTR num_packets$[rbp] - 000bd ff c0 inc eax - 000bf 89 45 24 mov DWORD PTR num_packets$[rbp], eax + 000bb 8b 45 24 mov eax, DWORD PTR num_packets$[rbp] + 000be ff c0 inc eax + 000c0 89 45 24 mov DWORD PTR num_packets$[rbp], eax ; 5952 : ; 5953 : chained = stbi__get8(s); - 000c2 48 8b 8d 10 04 + 000c3 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 000c9 e8 00 00 00 00 call stbi__get8 - 000ce 0f b6 c0 movzx eax, al - 000d1 89 45 64 mov DWORD PTR chained$[rbp], eax + 000ca e8 00 00 00 00 call stbi__get8 + 000cf 0f b6 c0 movzx eax, al + 000d2 89 45 64 mov DWORD PTR chained$[rbp], eax ; 5954 : packet->size = stbi__get8(s); - 000d4 48 8b 8d 10 04 + 000d5 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 000db e8 00 00 00 00 call stbi__get8 - 000e0 48 8b 8d c8 00 + 000dc e8 00 00 00 00 call stbi__get8 + 000e1 48 8b 8d c8 00 00 00 mov rcx, QWORD PTR packet$6[rbp] - 000e7 88 01 mov BYTE PTR [rcx], al + 000e8 88 01 mov BYTE PTR [rcx], al ; 5955 : packet->type = stbi__get8(s); - 000e9 48 8b 8d 10 04 + 000ea 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 000f0 e8 00 00 00 00 call stbi__get8 - 000f5 48 8b 8d c8 00 + 000f1 e8 00 00 00 00 call stbi__get8 + 000f6 48 8b 8d c8 00 00 00 mov rcx, QWORD PTR packet$6[rbp] - 000fc 88 41 01 mov BYTE PTR [rcx+1], al + 000fd 88 41 01 mov BYTE PTR [rcx+1], al ; 5956 : packet->channel = stbi__get8(s); - 000ff 48 8b 8d 10 04 + 00100 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 00106 e8 00 00 00 00 call stbi__get8 - 0010b 48 8b 8d c8 00 + 00107 e8 00 00 00 00 call stbi__get8 + 0010c 48 8b 8d c8 00 00 00 mov rcx, QWORD PTR packet$6[rbp] - 00112 88 41 02 mov BYTE PTR [rcx+2], al + 00113 88 41 02 mov BYTE PTR [rcx+2], al ; 5957 : ; 5958 : act_comp |= packet->channel; - 00115 48 8b 85 c8 00 + 00116 48 8b 85 c8 00 00 00 mov rax, QWORD PTR packet$6[rbp] - 0011c 0f b6 40 02 movzx eax, BYTE PTR [rax+2] - 00120 8b 4d 04 mov ecx, DWORD PTR act_comp$[rbp] - 00123 0b c8 or ecx, eax - 00125 8b c1 mov eax, ecx - 00127 89 45 04 mov DWORD PTR act_comp$[rbp], eax + 0011d 0f b6 40 02 movzx eax, BYTE PTR [rax+2] + 00121 8b 4d 04 mov ecx, DWORD PTR act_comp$[rbp] + 00124 0b c8 or ecx, eax + 00126 8b c1 mov eax, ecx + 00128 89 45 04 mov DWORD PTR act_comp$[rbp], eax ; 5959 : ; 5960 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (reading packets)"); - 0012a 48 8b 8d 10 04 + 0012b 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 00131 e8 00 00 00 00 call stbi__at_eof - 00136 85 c0 test eax, eax - 00138 74 34 je SHORT $LN30@stbi__pic_ - 0013a 48 8d 0d 00 00 + 00132 e8 00 00 00 00 call stbi__at_eof + 00137 85 c0 test eax, eax + 00139 74 34 je SHORT $LN30@stbi__pic_ + 0013b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08GGMBIFE@bad?5file@ - 00141 e8 00 00 00 00 call stbi__err - 00146 85 c0 test eax, eax - 00148 74 0d je SHORT $LN52@stbi__pic_ - 0014a 48 c7 85 d8 03 + 00142 e8 00 00 00 00 call stbi__err + 00147 85 c0 test eax, eax + 00149 74 0d je SHORT $LN52@stbi__pic_ + 0014b 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv95[rbp], 0 - 00155 eb 0b jmp SHORT $LN53@stbi__pic_ + 00156 eb 0b jmp SHORT $LN53@stbi__pic_ $LN52@stbi__pic_: - 00157 48 c7 85 d8 03 + 00158 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv95[rbp], 0 $LN53@stbi__pic_: - 00162 48 8b 85 d8 03 + 00163 48 8b 85 d8 03 00 00 mov rax, QWORD PTR tv95[rbp] - 00169 e9 6d 05 00 00 jmp $LN1@stbi__pic_ + 0016a e9 6f 05 00 00 jmp $LN1@stbi__pic_ $LN30@stbi__pic_: ; 5961 : if (packet->size != 8) return stbi__errpuc("bad format", "packet isn't 8bpp"); - 0016e 48 8b 85 c8 00 + 0016f 48 8b 85 c8 00 00 00 mov rax, QWORD PTR packet$6[rbp] - 00175 0f b6 00 movzx eax, BYTE PTR [rax] - 00178 83 f8 08 cmp eax, 8 - 0017b 74 34 je SHORT $LN31@stbi__pic_ - 0017d 48 8d 0d 00 00 + 00176 0f b6 00 movzx eax, BYTE PTR [rax] + 00179 83 f8 08 cmp eax, 8 + 0017c 74 34 je SHORT $LN31@stbi__pic_ + 0017e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0L@DMAPJJO@bad?5format@ - 00184 e8 00 00 00 00 call stbi__err - 00189 85 c0 test eax, eax - 0018b 74 0d je SHORT $LN54@stbi__pic_ - 0018d 48 c7 85 d8 03 + 00185 e8 00 00 00 00 call stbi__err + 0018a 85 c0 test eax, eax + 0018c 74 0d je SHORT $LN54@stbi__pic_ + 0018e 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv134[rbp], 0 - 00198 eb 0b jmp SHORT $LN55@stbi__pic_ + 00199 eb 0b jmp SHORT $LN55@stbi__pic_ $LN54@stbi__pic_: - 0019a 48 c7 85 d8 03 + 0019b 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv134[rbp], 0 $LN55@stbi__pic_: - 001a5 48 8b 85 d8 03 + 001a6 48 8b 85 d8 03 00 00 mov rax, QWORD PTR tv134[rbp] - 001ac e9 2a 05 00 00 jmp $LN1@stbi__pic_ + 001ad e9 2c 05 00 00 jmp $LN1@stbi__pic_ $LN31@stbi__pic_: ; 5962 : } while (chained); - 001b1 83 7d 64 00 cmp DWORD PTR chained$[rbp], 0 - 001b5 0f 85 aa fe ff + 001b2 83 7d 64 00 cmp DWORD PTR chained$[rbp], 0 + 001b6 0f 85 aa fe ff ff jne $LN4@stbi__pic_ ; 5963 : ; 5964 : *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel? - 001bb 8b 45 04 mov eax, DWORD PTR act_comp$[rbp] - 001be 83 e0 10 and eax, 16 - 001c1 85 c0 test eax, eax - 001c3 74 0c je SHORT $LN56@stbi__pic_ - 001c5 c7 85 d4 03 00 + 001bc 8b 45 04 mov eax, DWORD PTR act_comp$[rbp] + 001bf 83 e0 10 and eax, 16 + 001c2 85 c0 test eax, eax + 001c4 74 0c je SHORT $LN56@stbi__pic_ + 001c6 c7 85 d4 03 00 00 04 00 00 00 mov DWORD PTR tv138[rbp], 4 - 001cf eb 0a jmp SHORT $LN57@stbi__pic_ + 001d0 eb 0a jmp SHORT $LN57@stbi__pic_ $LN56@stbi__pic_: - 001d1 c7 85 d4 03 00 + 001d2 c7 85 d4 03 00 00 03 00 00 00 mov DWORD PTR tv138[rbp], 3 $LN57@stbi__pic_: - 001db 48 8b 85 28 04 + 001dc 48 8b 85 28 04 00 00 mov rax, QWORD PTR comp$[rbp] - 001e2 8b 8d d4 03 00 + 001e3 8b 8d d4 03 00 00 mov ecx, DWORD PTR tv138[rbp] - 001e8 89 08 mov DWORD PTR [rax], ecx + 001e9 89 08 mov DWORD PTR [rax], ecx ; 5965 : ; 5966 : for (y = 0; y < height; ++y) { - 001ea c7 45 44 00 00 + 001eb c7 45 44 00 00 00 00 mov DWORD PTR y$[rbp], 0 - 001f1 eb 08 jmp SHORT $LN7@stbi__pic_ + 001f2 eb 08 jmp SHORT $LN7@stbi__pic_ $LN5@stbi__pic_: - 001f3 8b 45 44 mov eax, DWORD PTR y$[rbp] - 001f6 ff c0 inc eax - 001f8 89 45 44 mov DWORD PTR y$[rbp], eax + 001f4 8b 45 44 mov eax, DWORD PTR y$[rbp] + 001f7 ff c0 inc eax + 001f9 89 45 44 mov DWORD PTR y$[rbp], eax $LN7@stbi__pic_: - 001fb 8b 85 20 04 00 + 001fc 8b 85 20 04 00 00 mov eax, DWORD PTR height$[rbp] - 00201 39 45 44 cmp DWORD PTR y$[rbp], eax - 00204 0f 8d ca 04 00 + 00202 39 45 44 cmp DWORD PTR y$[rbp], eax + 00205 0f 8d cc 04 00 00 jge $LN6@stbi__pic_ ; 5967 : int packet_idx; ; 5968 : ; 5969 : for (packet_idx = 0; packet_idx < num_packets; ++packet_idx) { - 0020a c7 85 e4 00 00 + 0020b c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR packet_idx$7[rbp], 0 - 00214 eb 0e jmp SHORT $LN10@stbi__pic_ + 00215 eb 0e jmp SHORT $LN10@stbi__pic_ $LN8@stbi__pic_: - 00216 8b 85 e4 00 00 + 00217 8b 85 e4 00 00 00 mov eax, DWORD PTR packet_idx$7[rbp] - 0021c ff c0 inc eax - 0021e 89 85 e4 00 00 + 0021d ff c0 inc eax + 0021f 89 85 e4 00 00 00 mov DWORD PTR packet_idx$7[rbp], eax $LN10@stbi__pic_: - 00224 8b 45 24 mov eax, DWORD PTR num_packets$[rbp] - 00227 39 85 e4 00 00 + 00225 8b 45 24 mov eax, DWORD PTR num_packets$[rbp] + 00228 39 85 e4 00 00 00 cmp DWORD PTR packet_idx$7[rbp], eax - 0022d 0f 8d 9c 04 00 + 0022e 0f 8d 9e 04 00 00 jge $LN9@stbi__pic_ ; 5970 : stbi__pic_packet* packet = &packets[packet_idx]; - 00233 48 63 85 e4 00 + 00234 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR packet_idx$7[rbp] - 0023a 48 6b c0 03 imul rax, rax, 3 - 0023e 48 8d 84 05 88 + 0023b 48 6b c0 03 imul rax, rax, 3 + 0023f 48 8d 84 05 88 00 00 00 lea rax, QWORD PTR packets$[rbp+rax] - 00246 48 89 85 08 01 + 00247 48 89 85 08 01 00 00 mov QWORD PTR packet$8[rbp], rax ; 5971 : stbi_uc* dest = result + y * width * 4; - 0024d 8b 45 44 mov eax, DWORD PTR y$[rbp] - 00250 0f af 85 18 04 + 0024e 8b 45 44 mov eax, DWORD PTR y$[rbp] + 00251 0f af 85 18 04 00 00 imul eax, DWORD PTR width$[rbp] - 00257 c1 e0 02 shl eax, 2 - 0025a 48 98 cdqe - 0025c 48 8b 8d 30 04 + 00258 c1 e0 02 shl eax, 2 + 0025b 48 98 cdqe + 0025d 48 8b 8d 30 04 00 00 mov rcx, QWORD PTR result$[rbp] - 00263 48 03 c8 add rcx, rax - 00266 48 8b c1 mov rax, rcx - 00269 48 89 85 28 01 + 00264 48 03 c8 add rcx, rax + 00267 48 8b c1 mov rax, rcx + 0026a 48 89 85 28 01 00 00 mov QWORD PTR dest$9[rbp], rax ; 5972 : ; 5973 : switch (packet->type) { - 00270 48 8b 85 08 01 + 00271 48 8b 85 08 01 00 00 mov rax, QWORD PTR packet$8[rbp] - 00277 0f b6 40 01 movzx eax, BYTE PTR [rax+1] - 0027b 88 85 d4 03 00 + 00278 0f b6 40 01 movzx eax, BYTE PTR [rax+1] + 0027c 88 85 d4 03 00 00 mov BYTE PTR tv152[rbp], al - 00281 80 bd d4 03 00 + 00282 80 bd d4 03 00 00 00 cmp BYTE PTR tv152[rbp], 0 - 00288 74 4e je SHORT $LN33@stbi__pic_ - 0028a 80 bd d4 03 00 + 00289 74 4e je SHORT $LN33@stbi__pic_ + 0028b 80 bd d4 03 00 00 01 cmp BYTE PTR tv152[rbp], 1 - 00291 0f 84 ae 00 00 + 00292 0f 84 ae 00 00 00 je $LN35@stbi__pic_ - 00297 80 bd d4 03 00 + 00298 80 bd d4 03 00 00 02 cmp BYTE PTR tv152[rbp], 2 - 0029e 0f 84 d6 01 00 + 0029f 0f 84 d7 01 00 00 je $LN39@stbi__pic_ ; 5974 : default: ; 5975 : return stbi__errpuc("bad format", "packet has bad compression type"); - 002a4 48 8d 0d 00 00 + 002a5 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0L@DMAPJJO@bad?5format@ - 002ab e8 00 00 00 00 call stbi__err - 002b0 85 c0 test eax, eax - 002b2 74 0d je SHORT $LN58@stbi__pic_ - 002b4 48 c7 85 d8 03 + 002ac e8 00 00 00 00 call stbi__err + 002b1 85 c0 test eax, eax + 002b3 74 0d je SHORT $LN58@stbi__pic_ + 002b5 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv156[rbp], 0 - 002bf eb 0b jmp SHORT $LN59@stbi__pic_ + 002c0 eb 0b jmp SHORT $LN59@stbi__pic_ $LN58@stbi__pic_: - 002c1 48 c7 85 d8 03 + 002c2 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv156[rbp], 0 $LN59@stbi__pic_: - 002cc 48 8b 85 d8 03 + 002cd 48 8b 85 d8 03 00 00 mov rax, QWORD PTR tv156[rbp] - 002d3 e9 03 04 00 00 jmp $LN1@stbi__pic_ + 002d4 e9 05 04 00 00 jmp $LN1@stbi__pic_ $LN33@stbi__pic_: ; 5976 : @@ -10297,52 +10342,52 @@ $LN33@stbi__pic_: ; 5979 : ; 5980 : for (x = 0; x < width; ++x, dest += 4) - 002d8 c7 85 44 01 00 + 002d9 c7 85 44 01 00 00 00 00 00 00 mov DWORD PTR x$10[rbp], 0 - 002e2 eb 20 jmp SHORT $LN15@stbi__pic_ + 002e3 eb 20 jmp SHORT $LN15@stbi__pic_ $LN13@stbi__pic_: - 002e4 8b 85 44 01 00 + 002e5 8b 85 44 01 00 00 mov eax, DWORD PTR x$10[rbp] - 002ea ff c0 inc eax - 002ec 89 85 44 01 00 + 002eb ff c0 inc eax + 002ed 89 85 44 01 00 00 mov DWORD PTR x$10[rbp], eax - 002f2 48 8b 85 28 01 + 002f3 48 8b 85 28 01 00 00 mov rax, QWORD PTR dest$9[rbp] - 002f9 48 83 c0 04 add rax, 4 - 002fd 48 89 85 28 01 + 002fa 48 83 c0 04 add rax, 4 + 002fe 48 89 85 28 01 00 00 mov QWORD PTR dest$9[rbp], rax $LN15@stbi__pic_: - 00304 8b 85 18 04 00 + 00305 8b 85 18 04 00 00 mov eax, DWORD PTR width$[rbp] - 0030a 39 85 44 01 00 + 0030b 39 85 44 01 00 00 cmp DWORD PTR x$10[rbp], eax - 00310 7d 2e jge SHORT $LN14@stbi__pic_ + 00311 7d 2e jge SHORT $LN14@stbi__pic_ ; 5981 : if (!stbi__readval(s, packet->channel, dest)) - 00312 48 8b 85 08 01 + 00313 48 8b 85 08 01 00 00 mov rax, QWORD PTR packet$8[rbp] - 00319 0f b6 40 02 movzx eax, BYTE PTR [rax+2] - 0031d 4c 8b 85 28 01 + 0031a 0f b6 40 02 movzx eax, BYTE PTR [rax+2] + 0031e 4c 8b 85 28 01 00 00 mov r8, QWORD PTR dest$9[rbp] - 00324 8b d0 mov edx, eax - 00326 48 8b 8d 10 04 + 00325 8b d0 mov edx, eax + 00327 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 0032d e8 00 00 00 00 call stbi__readval - 00332 48 85 c0 test rax, rax - 00335 75 07 jne SHORT $LN34@stbi__pic_ + 0032e e8 00 00 00 00 call stbi__readval + 00333 48 85 c0 test rax, rax + 00336 75 07 jne SHORT $LN34@stbi__pic_ ; 5982 : return 0; - 00337 33 c0 xor eax, eax - 00339 e9 9d 03 00 00 jmp $LN1@stbi__pic_ + 00338 33 c0 xor eax, eax + 0033a e9 9f 03 00 00 jmp $LN1@stbi__pic_ $LN34@stbi__pic_: - 0033e eb a4 jmp SHORT $LN13@stbi__pic_ + 0033f eb a4 jmp SHORT $LN13@stbi__pic_ $LN14@stbi__pic_: ; 5983 : break; - 00340 e9 85 03 00 00 jmp $LN11@stbi__pic_ + 00341 e9 87 03 00 00 jmp $LN11@stbi__pic_ $LN35@stbi__pic_: ; 5984 : } @@ -10351,429 +10396,431 @@ $LN35@stbi__pic_: ; 5987 : { ; 5988 : int left = width, i; - 00345 8b 85 18 04 00 + 00346 8b 85 18 04 00 00 mov eax, DWORD PTR width$[rbp] - 0034b 89 85 64 01 00 + 0034c 89 85 64 01 00 00 mov DWORD PTR left$11[rbp], eax $LN16@stbi__pic_: ; 5989 : ; 5990 : while (left > 0) { - 00351 83 bd 64 01 00 + 00352 83 bd 64 01 00 00 00 cmp DWORD PTR left$11[rbp], 0 - 00358 0f 8e 17 01 00 + 00359 0f 8e 18 01 00 00 jle $LN17@stbi__pic_ ; 5991 : stbi_uc count, value[4]; ; 5992 : ; 5993 : count = stbi__get8(s); - 0035e 48 8b 8d 10 04 + 0035f 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 00365 e8 00 00 00 00 call stbi__get8 - 0036a 88 85 a4 01 00 + 00366 e8 00 00 00 00 call stbi__get8 + 0036b 88 85 a4 01 00 00 mov BYTE PTR count$13[rbp], al ; 5994 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (pure read count)"); - 00370 48 8b 8d 10 04 + 00371 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 00377 e8 00 00 00 00 call stbi__at_eof - 0037c 85 c0 test eax, eax - 0037e 74 34 je SHORT $LN36@stbi__pic_ - 00380 48 8d 0d 00 00 + 00378 e8 00 00 00 00 call stbi__at_eof + 0037d 85 c0 test eax, eax + 0037f 74 34 je SHORT $LN36@stbi__pic_ + 00381 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08GGMBIFE@bad?5file@ - 00387 e8 00 00 00 00 call stbi__err - 0038c 85 c0 test eax, eax - 0038e 74 0d je SHORT $LN60@stbi__pic_ - 00390 48 c7 85 d8 03 + 00388 e8 00 00 00 00 call stbi__err + 0038d 85 c0 test eax, eax + 0038f 74 0d je SHORT $LN60@stbi__pic_ + 00391 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv176[rbp], 0 - 0039b eb 0b jmp SHORT $LN61@stbi__pic_ + 0039c eb 0b jmp SHORT $LN61@stbi__pic_ $LN60@stbi__pic_: - 0039d 48 c7 85 d8 03 + 0039e 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv176[rbp], 0 $LN61@stbi__pic_: - 003a8 48 8b 85 d8 03 + 003a9 48 8b 85 d8 03 00 00 mov rax, QWORD PTR tv176[rbp] - 003af e9 27 03 00 00 jmp $LN1@stbi__pic_ + 003b0 e9 29 03 00 00 jmp $LN1@stbi__pic_ $LN36@stbi__pic_: ; 5995 : ; 5996 : if (count > left) - 003b4 0f b6 85 a4 01 + 003b5 0f b6 85 a4 01 00 00 movzx eax, BYTE PTR count$13[rbp] - 003bb 3b 85 64 01 00 + 003bc 3b 85 64 01 00 00 cmp eax, DWORD PTR left$11[rbp] - 003c1 7e 0d jle SHORT $LN37@stbi__pic_ + 003c2 7e 0d jle SHORT $LN37@stbi__pic_ ; 5997 : count = (stbi_uc)left; - 003c3 0f b6 85 64 01 + 003c4 0f b6 85 64 01 00 00 movzx eax, BYTE PTR left$11[rbp] - 003ca 88 85 a4 01 00 + 003cb 88 85 a4 01 00 00 mov BYTE PTR count$13[rbp], al $LN37@stbi__pic_: ; 5998 : ; 5999 : if (!stbi__readval(s, packet->channel, value)) return 0; - 003d0 48 8b 85 08 01 + 003d1 48 8b 85 08 01 00 00 mov rax, QWORD PTR packet$8[rbp] - 003d7 0f b6 40 02 movzx eax, BYTE PTR [rax+2] - 003db 4c 8d 85 c4 01 + 003d8 0f b6 40 02 movzx eax, BYTE PTR [rax+2] + 003dc 4c 8d 85 c4 01 00 00 lea r8, QWORD PTR value$14[rbp] - 003e2 8b d0 mov edx, eax - 003e4 48 8b 8d 10 04 + 003e3 8b d0 mov edx, eax + 003e5 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 003eb e8 00 00 00 00 call stbi__readval - 003f0 48 85 c0 test rax, rax - 003f3 75 07 jne SHORT $LN38@stbi__pic_ - 003f5 33 c0 xor eax, eax - 003f7 e9 df 02 00 00 jmp $LN1@stbi__pic_ + 003ec e8 00 00 00 00 call stbi__readval + 003f1 48 85 c0 test rax, rax + 003f4 75 07 jne SHORT $LN38@stbi__pic_ + 003f6 33 c0 xor eax, eax + 003f8 e9 e1 02 00 00 jmp $LN1@stbi__pic_ $LN38@stbi__pic_: ; 6000 : ; 6001 : for (i = 0; i < count; ++i, dest += 4) - 003fc c7 85 84 01 00 + 003fd c7 85 84 01 00 00 00 00 00 00 mov DWORD PTR i$12[rbp], 0 - 00406 eb 20 jmp SHORT $LN20@stbi__pic_ + 00407 eb 20 jmp SHORT $LN20@stbi__pic_ $LN18@stbi__pic_: - 00408 8b 85 84 01 00 + 00409 8b 85 84 01 00 00 mov eax, DWORD PTR i$12[rbp] - 0040e ff c0 inc eax - 00410 89 85 84 01 00 + 0040f ff c0 inc eax + 00411 89 85 84 01 00 00 mov DWORD PTR i$12[rbp], eax - 00416 48 8b 85 28 01 + 00417 48 8b 85 28 01 00 00 mov rax, QWORD PTR dest$9[rbp] - 0041d 48 83 c0 04 add rax, 4 - 00421 48 89 85 28 01 + 0041e 48 83 c0 04 add rax, 4 + 00422 48 89 85 28 01 00 00 mov QWORD PTR dest$9[rbp], rax $LN20@stbi__pic_: - 00428 0f b6 85 a4 01 + 00429 0f b6 85 a4 01 00 00 movzx eax, BYTE PTR count$13[rbp] - 0042f 39 85 84 01 00 + 00430 39 85 84 01 00 00 cmp DWORD PTR i$12[rbp], eax - 00435 7d 22 jge SHORT $LN19@stbi__pic_ + 00436 7d 23 jge SHORT $LN19@stbi__pic_ ; 6002 : stbi__copyval(packet->channel, dest, value); - 00437 48 8b 85 08 01 + 00438 48 8b 85 08 01 00 00 mov rax, QWORD PTR packet$8[rbp] - 0043e 0f b6 40 02 movzx eax, BYTE PTR [rax+2] - 00442 4c 8d 85 c4 01 + 0043f 0f b6 40 02 movzx eax, BYTE PTR [rax+2] + 00443 4c 8d 85 c4 01 00 00 lea r8, QWORD PTR value$14[rbp] - 00449 48 8b 95 28 01 + 0044a 48 8b 95 28 01 00 00 mov rdx, QWORD PTR dest$9[rbp] - 00450 8b c8 mov ecx, eax - 00452 e8 00 00 00 00 call stbi__copyval - 00457 eb af jmp SHORT $LN18@stbi__pic_ + 00451 8b c8 mov ecx, eax + 00453 e8 00 00 00 00 call stbi__copyval + 00458 90 npad 1 + 00459 eb ae jmp SHORT $LN18@stbi__pic_ $LN19@stbi__pic_: ; 6003 : left -= count; - 00459 0f b6 85 a4 01 + 0045b 0f b6 85 a4 01 00 00 movzx eax, BYTE PTR count$13[rbp] - 00460 8b 8d 64 01 00 + 00462 8b 8d 64 01 00 00 mov ecx, DWORD PTR left$11[rbp] - 00466 2b c8 sub ecx, eax - 00468 8b c1 mov eax, ecx - 0046a 89 85 64 01 00 + 00468 2b c8 sub ecx, eax + 0046a 8b c1 mov eax, ecx + 0046c 89 85 64 01 00 00 mov DWORD PTR left$11[rbp], eax ; 6004 : } - 00470 e9 dc fe ff ff jmp $LN16@stbi__pic_ + 00472 e9 db fe ff ff jmp $LN16@stbi__pic_ $LN17@stbi__pic_: ; 6005 : } ; 6006 : break; - 00475 e9 50 02 00 00 jmp $LN11@stbi__pic_ + 00477 e9 51 02 00 00 jmp $LN11@stbi__pic_ $LN39@stbi__pic_: ; 6007 : ; 6008 : case 2: {//Mixed RLE ; 6009 : int left = width; - 0047a 8b 85 18 04 00 + 0047c 8b 85 18 04 00 00 mov eax, DWORD PTR width$[rbp] - 00480 89 85 e4 01 00 + 00482 89 85 e4 01 00 00 mov DWORD PTR left$15[rbp], eax $LN21@stbi__pic_: ; 6010 : while (left > 0) { - 00486 83 bd e4 01 00 + 00488 83 bd e4 01 00 00 00 cmp DWORD PTR left$15[rbp], 0 - 0048d 0f 8e 37 02 00 + 0048f 0f 8e 38 02 00 00 jle $LN22@stbi__pic_ ; 6011 : int count = stbi__get8(s), i; - 00493 48 8b 8d 10 04 + 00495 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 0049a e8 00 00 00 00 call stbi__get8 - 0049f 0f b6 c0 movzx eax, al - 004a2 89 85 04 02 00 + 0049c e8 00 00 00 00 call stbi__get8 + 004a1 0f b6 c0 movzx eax, al + 004a4 89 85 04 02 00 00 mov DWORD PTR count$16[rbp], eax ; 6012 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (mixed read count)"); - 004a8 48 8b 8d 10 04 + 004aa 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 004af e8 00 00 00 00 call stbi__at_eof - 004b4 85 c0 test eax, eax - 004b6 74 34 je SHORT $LN40@stbi__pic_ - 004b8 48 8d 0d 00 00 + 004b1 e8 00 00 00 00 call stbi__at_eof + 004b6 85 c0 test eax, eax + 004b8 74 34 je SHORT $LN40@stbi__pic_ + 004ba 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08GGMBIFE@bad?5file@ - 004bf e8 00 00 00 00 call stbi__err - 004c4 85 c0 test eax, eax - 004c6 74 0d je SHORT $LN62@stbi__pic_ - 004c8 48 c7 85 d8 03 + 004c1 e8 00 00 00 00 call stbi__err + 004c6 85 c0 test eax, eax + 004c8 74 0d je SHORT $LN62@stbi__pic_ + 004ca 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv207[rbp], 0 - 004d3 eb 0b jmp SHORT $LN63@stbi__pic_ + 004d5 eb 0b jmp SHORT $LN63@stbi__pic_ $LN62@stbi__pic_: - 004d5 48 c7 85 d8 03 + 004d7 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv207[rbp], 0 $LN63@stbi__pic_: - 004e0 48 8b 85 d8 03 + 004e2 48 8b 85 d8 03 00 00 mov rax, QWORD PTR tv207[rbp] - 004e7 e9 ef 01 00 00 jmp $LN1@stbi__pic_ + 004e9 e9 f0 01 00 00 jmp $LN1@stbi__pic_ $LN40@stbi__pic_: ; 6013 : ; 6014 : if (count >= 128) { // Repeated - 004ec 81 bd 04 02 00 + 004ee 81 bd 04 02 00 00 80 00 00 00 cmp DWORD PTR count$16[rbp], 128 ; 00000080H - 004f6 0f 8c fe 00 00 + 004f8 0f 8c ff 00 00 00 jl $LN41@stbi__pic_ ; 6015 : stbi_uc value[4]; ; 6016 : ; 6017 : if (count == 128) - 004fc 81 bd 04 02 00 + 004fe 81 bd 04 02 00 00 80 00 00 00 cmp DWORD PTR count$16[rbp], 128 ; 00000080H - 00506 75 14 jne SHORT $LN43@stbi__pic_ + 00508 75 14 jne SHORT $LN43@stbi__pic_ ; 6018 : count = stbi__get16be(s); - 00508 48 8b 8d 10 04 + 0050a 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 0050f e8 00 00 00 00 call stbi__get16be - 00514 89 85 04 02 00 + 00511 e8 00 00 00 00 call stbi__get16be + 00516 89 85 04 02 00 00 mov DWORD PTR count$16[rbp], eax - 0051a eb 0f jmp SHORT $LN44@stbi__pic_ + 0051c eb 0f jmp SHORT $LN44@stbi__pic_ $LN43@stbi__pic_: ; 6019 : else ; 6020 : count -= 127; - 0051c 8b 85 04 02 00 + 0051e 8b 85 04 02 00 00 mov eax, DWORD PTR count$16[rbp] - 00522 83 e8 7f sub eax, 127 ; 0000007fH - 00525 89 85 04 02 00 + 00524 83 e8 7f sub eax, 127 ; 0000007fH + 00527 89 85 04 02 00 00 mov DWORD PTR count$16[rbp], eax $LN44@stbi__pic_: ; 6021 : if (count > left) - 0052b 8b 85 e4 01 00 + 0052d 8b 85 e4 01 00 00 mov eax, DWORD PTR left$15[rbp] - 00531 39 85 04 02 00 + 00533 39 85 04 02 00 00 cmp DWORD PTR count$16[rbp], eax - 00537 7e 34 jle SHORT $LN45@stbi__pic_ + 00539 7e 34 jle SHORT $LN45@stbi__pic_ ; 6022 : return stbi__errpuc("bad file", "scanline overrun"); - 00539 48 8d 0d 00 00 + 0053b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08GGMBIFE@bad?5file@ - 00540 e8 00 00 00 00 call stbi__err - 00545 85 c0 test eax, eax - 00547 74 0d je SHORT $LN64@stbi__pic_ - 00549 48 c7 85 d8 03 + 00542 e8 00 00 00 00 call stbi__err + 00547 85 c0 test eax, eax + 00549 74 0d je SHORT $LN64@stbi__pic_ + 0054b 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv217[rbp], 0 - 00554 eb 0b jmp SHORT $LN65@stbi__pic_ + 00556 eb 0b jmp SHORT $LN65@stbi__pic_ $LN64@stbi__pic_: - 00556 48 c7 85 d8 03 + 00558 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv217[rbp], 0 $LN65@stbi__pic_: - 00561 48 8b 85 d8 03 + 00563 48 8b 85 d8 03 00 00 mov rax, QWORD PTR tv217[rbp] - 00568 e9 6e 01 00 00 jmp $LN1@stbi__pic_ + 0056a e9 6f 01 00 00 jmp $LN1@stbi__pic_ $LN45@stbi__pic_: ; 6023 : ; 6024 : if (!stbi__readval(s, packet->channel, value)) - 0056d 48 8b 85 08 01 + 0056f 48 8b 85 08 01 00 00 mov rax, QWORD PTR packet$8[rbp] - 00574 0f b6 40 02 movzx eax, BYTE PTR [rax+2] - 00578 4c 8d 85 44 02 + 00576 0f b6 40 02 movzx eax, BYTE PTR [rax+2] + 0057a 4c 8d 85 44 02 00 00 lea r8, QWORD PTR value$18[rbp] - 0057f 8b d0 mov edx, eax - 00581 48 8b 8d 10 04 + 00581 8b d0 mov edx, eax + 00583 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 00588 e8 00 00 00 00 call stbi__readval - 0058d 48 85 c0 test rax, rax - 00590 75 07 jne SHORT $LN46@stbi__pic_ + 0058a e8 00 00 00 00 call stbi__readval + 0058f 48 85 c0 test rax, rax + 00592 75 07 jne SHORT $LN46@stbi__pic_ ; 6025 : return 0; - 00592 33 c0 xor eax, eax - 00594 e9 42 01 00 00 jmp $LN1@stbi__pic_ + 00594 33 c0 xor eax, eax + 00596 e9 43 01 00 00 jmp $LN1@stbi__pic_ $LN46@stbi__pic_: ; 6026 : ; 6027 : for (i = 0; i < count; ++i, dest += 4) - 00599 c7 85 24 02 00 + 0059b c7 85 24 02 00 00 00 00 00 00 mov DWORD PTR i$17[rbp], 0 - 005a3 eb 20 jmp SHORT $LN25@stbi__pic_ + 005a5 eb 20 jmp SHORT $LN25@stbi__pic_ $LN23@stbi__pic_: - 005a5 8b 85 24 02 00 + 005a7 8b 85 24 02 00 00 mov eax, DWORD PTR i$17[rbp] - 005ab ff c0 inc eax - 005ad 89 85 24 02 00 + 005ad ff c0 inc eax + 005af 89 85 24 02 00 00 mov DWORD PTR i$17[rbp], eax - 005b3 48 8b 85 28 01 + 005b5 48 8b 85 28 01 00 00 mov rax, QWORD PTR dest$9[rbp] - 005ba 48 83 c0 04 add rax, 4 - 005be 48 89 85 28 01 + 005bc 48 83 c0 04 add rax, 4 + 005c0 48 89 85 28 01 00 00 mov QWORD PTR dest$9[rbp], rax $LN25@stbi__pic_: - 005c5 8b 85 04 02 00 + 005c7 8b 85 04 02 00 00 mov eax, DWORD PTR count$16[rbp] - 005cb 39 85 24 02 00 + 005cd 39 85 24 02 00 00 cmp DWORD PTR i$17[rbp], eax - 005d1 7d 22 jge SHORT $LN24@stbi__pic_ + 005d3 7d 23 jge SHORT $LN24@stbi__pic_ ; 6028 : stbi__copyval(packet->channel, dest, value); - 005d3 48 8b 85 08 01 + 005d5 48 8b 85 08 01 00 00 mov rax, QWORD PTR packet$8[rbp] - 005da 0f b6 40 02 movzx eax, BYTE PTR [rax+2] - 005de 4c 8d 85 44 02 + 005dc 0f b6 40 02 movzx eax, BYTE PTR [rax+2] + 005e0 4c 8d 85 44 02 00 00 lea r8, QWORD PTR value$18[rbp] - 005e5 48 8b 95 28 01 + 005e7 48 8b 95 28 01 00 00 mov rdx, QWORD PTR dest$9[rbp] - 005ec 8b c8 mov ecx, eax - 005ee e8 00 00 00 00 call stbi__copyval - 005f3 eb b0 jmp SHORT $LN23@stbi__pic_ + 005ee 8b c8 mov ecx, eax + 005f0 e8 00 00 00 00 call stbi__copyval + 005f5 90 npad 1 + 005f6 eb af jmp SHORT $LN23@stbi__pic_ $LN24@stbi__pic_: ; 6029 : } - 005f5 e9 b5 00 00 00 jmp $LN42@stbi__pic_ + 005f8 e9 b5 00 00 00 jmp $LN42@stbi__pic_ $LN41@stbi__pic_: ; 6030 : else { // Raw ; 6031 : ++count; - 005fa 8b 85 04 02 00 + 005fd 8b 85 04 02 00 00 mov eax, DWORD PTR count$16[rbp] - 00600 ff c0 inc eax - 00602 89 85 04 02 00 + 00603 ff c0 inc eax + 00605 89 85 04 02 00 00 mov DWORD PTR count$16[rbp], eax ; 6032 : if (count > left) return stbi__errpuc("bad file", "scanline overrun"); - 00608 8b 85 e4 01 00 + 0060b 8b 85 e4 01 00 00 mov eax, DWORD PTR left$15[rbp] - 0060e 39 85 04 02 00 + 00611 39 85 04 02 00 00 cmp DWORD PTR count$16[rbp], eax - 00614 7e 34 jle SHORT $LN47@stbi__pic_ - 00616 48 8d 0d 00 00 + 00617 7e 34 jle SHORT $LN47@stbi__pic_ + 00619 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08GGMBIFE@bad?5file@ - 0061d e8 00 00 00 00 call stbi__err - 00622 85 c0 test eax, eax - 00624 74 0d je SHORT $LN66@stbi__pic_ - 00626 48 c7 85 d8 03 + 00620 e8 00 00 00 00 call stbi__err + 00625 85 c0 test eax, eax + 00627 74 0d je SHORT $LN66@stbi__pic_ + 00629 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv238[rbp], 0 - 00631 eb 0b jmp SHORT $LN67@stbi__pic_ + 00634 eb 0b jmp SHORT $LN67@stbi__pic_ $LN66@stbi__pic_: - 00633 48 c7 85 d8 03 + 00636 48 c7 85 d8 03 00 00 00 00 00 00 mov QWORD PTR tv238[rbp], 0 $LN67@stbi__pic_: - 0063e 48 8b 85 d8 03 + 00641 48 8b 85 d8 03 00 00 mov rax, QWORD PTR tv238[rbp] - 00645 e9 91 00 00 00 jmp $LN1@stbi__pic_ + 00648 e9 91 00 00 00 jmp $LN1@stbi__pic_ $LN47@stbi__pic_: ; 6033 : ; 6034 : for (i = 0; i < count; ++i, dest += 4) - 0064a c7 85 24 02 00 + 0064d c7 85 24 02 00 00 00 00 00 00 mov DWORD PTR i$17[rbp], 0 - 00654 eb 20 jmp SHORT $LN28@stbi__pic_ + 00657 eb 20 jmp SHORT $LN28@stbi__pic_ $LN26@stbi__pic_: - 00656 8b 85 24 02 00 + 00659 8b 85 24 02 00 00 mov eax, DWORD PTR i$17[rbp] - 0065c ff c0 inc eax - 0065e 89 85 24 02 00 + 0065f ff c0 inc eax + 00661 89 85 24 02 00 00 mov DWORD PTR i$17[rbp], eax - 00664 48 8b 85 28 01 + 00667 48 8b 85 28 01 00 00 mov rax, QWORD PTR dest$9[rbp] - 0066b 48 83 c0 04 add rax, 4 - 0066f 48 89 85 28 01 + 0066e 48 83 c0 04 add rax, 4 + 00672 48 89 85 28 01 00 00 mov QWORD PTR dest$9[rbp], rax $LN28@stbi__pic_: - 00676 8b 85 04 02 00 + 00679 8b 85 04 02 00 00 mov eax, DWORD PTR count$16[rbp] - 0067c 39 85 24 02 00 + 0067f 39 85 24 02 00 00 cmp DWORD PTR i$17[rbp], eax - 00682 7d 2b jge SHORT $LN27@stbi__pic_ + 00685 7d 2b jge SHORT $LN27@stbi__pic_ ; 6035 : if (!stbi__readval(s, packet->channel, dest)) - 00684 48 8b 85 08 01 + 00687 48 8b 85 08 01 00 00 mov rax, QWORD PTR packet$8[rbp] - 0068b 0f b6 40 02 movzx eax, BYTE PTR [rax+2] - 0068f 4c 8b 85 28 01 + 0068e 0f b6 40 02 movzx eax, BYTE PTR [rax+2] + 00692 4c 8b 85 28 01 00 00 mov r8, QWORD PTR dest$9[rbp] - 00696 8b d0 mov edx, eax - 00698 48 8b 8d 10 04 + 00699 8b d0 mov edx, eax + 0069b 48 8b 8d 10 04 00 00 mov rcx, QWORD PTR s$[rbp] - 0069f e8 00 00 00 00 call stbi__readval - 006a4 48 85 c0 test rax, rax - 006a7 75 04 jne SHORT $LN48@stbi__pic_ + 006a2 e8 00 00 00 00 call stbi__readval + 006a7 48 85 c0 test rax, rax + 006aa 75 04 jne SHORT $LN48@stbi__pic_ ; 6036 : return 0; - 006a9 33 c0 xor eax, eax - 006ab eb 2e jmp SHORT $LN1@stbi__pic_ + 006ac 33 c0 xor eax, eax + 006ae eb 2e jmp SHORT $LN1@stbi__pic_ $LN48@stbi__pic_: - 006ad eb a7 jmp SHORT $LN26@stbi__pic_ + 006b0 eb a7 jmp SHORT $LN26@stbi__pic_ $LN27@stbi__pic_: $LN42@stbi__pic_: ; 6037 : } ; 6038 : left -= count; - 006af 8b 85 04 02 00 + 006b2 8b 85 04 02 00 00 mov eax, DWORD PTR count$16[rbp] - 006b5 8b 8d e4 01 00 + 006b8 8b 8d e4 01 00 00 mov ecx, DWORD PTR left$15[rbp] - 006bb 2b c8 sub ecx, eax - 006bd 8b c1 mov eax, ecx - 006bf 89 85 e4 01 00 + 006be 2b c8 sub ecx, eax + 006c0 8b c1 mov eax, ecx + 006c2 89 85 e4 01 00 00 mov DWORD PTR left$15[rbp], eax ; 6039 : } - 006c5 e9 bc fd ff ff jmp $LN21@stbi__pic_ + 006c8 e9 bb fd ff ff jmp $LN21@stbi__pic_ $LN22@stbi__pic_: $LN11@stbi__pic_: @@ -10782,38 +10829,38 @@ $LN11@stbi__pic_: ; 6042 : } ; 6043 : } - 006ca e9 47 fb ff ff jmp $LN8@stbi__pic_ + 006cd e9 45 fb ff ff jmp $LN8@stbi__pic_ $LN9@stbi__pic_: ; 6044 : } - 006cf e9 1f fb ff ff jmp $LN5@stbi__pic_ + 006d2 e9 1d fb ff ff jmp $LN5@stbi__pic_ $LN6@stbi__pic_: ; 6045 : ; 6046 : return result; - 006d4 48 8b 85 30 04 + 006d7 48 8b 85 30 04 00 00 mov rax, QWORD PTR result$[rbp] $LN1@stbi__pic_: ; 6047 : } - 006db 48 8b f8 mov rdi, rax - 006de 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 006e2 48 8d 15 00 00 + 006de 48 8b f8 mov rdi, rax + 006e1 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 006e5 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__pic_load_core$rtcFrameData - 006e9 e8 00 00 00 00 call _RTC_CheckStackVars - 006ee 48 8b c7 mov rax, rdi - 006f1 48 8b 8d e0 03 + 006ec e8 00 00 00 00 call _RTC_CheckStackVars + 006f1 48 8b c7 mov rax, rdi + 006f4 48 8b 8d e0 03 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 006f8 48 33 cd xor rcx, rbp - 006fb e8 00 00 00 00 call __security_check_cookie - 00700 48 8d a5 f8 03 + 006fb 48 33 cd xor rcx, rbp + 006fe e8 00 00 00 00 call __security_check_cookie + 00703 48 8d a5 f8 03 00 00 lea rsp, QWORD PTR [rbp+1016] - 00707 5f pop rdi - 00708 5d pop rbp - 00709 c3 ret 0 + 0070a 5f pop rdi + 0070b 5d pop rbp + 0070c c3 ret 0 stbi__pic_load_core ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -10840,60 +10887,61 @@ stbi__copyval PROC ; COMDAT 0001c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00023 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00028 90 npad 1 ; 5931 : int mask = 0x80, i; - 00028 c7 45 04 80 00 + 00029 c7 45 04 80 00 00 00 mov DWORD PTR mask$[rbp], 128 ; 00000080H ; 5932 : ; 5933 : for (i = 0; i < 4; ++i, mask >>= 1) - 0002f c7 45 24 00 00 + 00030 c7 45 24 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00036 eb 10 jmp SHORT $LN4@stbi__copy + 00037 eb 10 jmp SHORT $LN4@stbi__copy $LN2@stbi__copy: - 00038 8b 45 24 mov eax, DWORD PTR i$[rbp] - 0003b ff c0 inc eax - 0003d 89 45 24 mov DWORD PTR i$[rbp], eax - 00040 8b 45 04 mov eax, DWORD PTR mask$[rbp] - 00043 d1 f8 sar eax, 1 - 00045 89 45 04 mov DWORD PTR mask$[rbp], eax + 00039 8b 45 24 mov eax, DWORD PTR i$[rbp] + 0003c ff c0 inc eax + 0003e 89 45 24 mov DWORD PTR i$[rbp], eax + 00041 8b 45 04 mov eax, DWORD PTR mask$[rbp] + 00044 d1 f8 sar eax, 1 + 00046 89 45 04 mov DWORD PTR mask$[rbp], eax $LN4@stbi__copy: - 00048 83 7d 24 04 cmp DWORD PTR i$[rbp], 4 - 0004c 7d 31 jge SHORT $LN3@stbi__copy + 00049 83 7d 24 04 cmp DWORD PTR i$[rbp], 4 + 0004d 7d 31 jge SHORT $LN3@stbi__copy ; 5934 : if (channel & mask) - 0004e 8b 45 04 mov eax, DWORD PTR mask$[rbp] - 00051 8b 8d 20 01 00 + 0004f 8b 45 04 mov eax, DWORD PTR mask$[rbp] + 00052 8b 8d 20 01 00 00 mov ecx, DWORD PTR channel$[rbp] - 00057 23 c8 and ecx, eax - 00059 8b c1 mov eax, ecx - 0005b 85 c0 test eax, eax - 0005d 74 1e je SHORT $LN5@stbi__copy + 00058 23 c8 and ecx, eax + 0005a 8b c1 mov eax, ecx + 0005c 85 c0 test eax, eax + 0005e 74 1e je SHORT $LN5@stbi__copy ; 5935 : dest[i] = src[i]; - 0005f 48 63 45 24 movsxd rax, DWORD PTR i$[rbp] - 00063 48 63 4d 24 movsxd rcx, DWORD PTR i$[rbp] - 00067 48 8b 95 28 01 + 00060 48 63 45 24 movsxd rax, DWORD PTR i$[rbp] + 00064 48 63 4d 24 movsxd rcx, DWORD PTR i$[rbp] + 00068 48 8b 95 28 01 00 00 mov rdx, QWORD PTR dest$[rbp] - 0006e 4c 8b 85 30 01 + 0006f 4c 8b 85 30 01 00 00 mov r8, QWORD PTR src$[rbp] - 00075 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 0007a 88 04 0a mov BYTE PTR [rdx+rcx], al + 00076 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0007b 88 04 0a mov BYTE PTR [rdx+rcx], al $LN5@stbi__copy: - 0007d eb b9 jmp SHORT $LN2@stbi__copy + 0007e eb b9 jmp SHORT $LN2@stbi__copy $LN3@stbi__copy: ; 5936 : } - 0007f 48 8d a5 08 01 + 00080 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 00086 5f pop rdi - 00087 5d pop rbp - 00088 c3 ret 0 + 00087 5f pop rdi + 00088 5d pop rbp + 00089 c3 ret 0 stbi__copyval ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -10921,96 +10969,97 @@ stbi__readval PROC ; COMDAT 0001c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00023 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00028 90 npad 1 ; 5917 : int mask = 0x80, i; - 00028 c7 45 04 80 00 + 00029 c7 45 04 80 00 00 00 mov DWORD PTR mask$[rbp], 128 ; 00000080H ; 5918 : ; 5919 : for (i = 0; i < 4; ++i, mask >>= 1) { - 0002f c7 45 24 00 00 + 00030 c7 45 24 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00036 eb 10 jmp SHORT $LN4@stbi__read + 00037 eb 10 jmp SHORT $LN4@stbi__read $LN2@stbi__read: - 00038 8b 45 24 mov eax, DWORD PTR i$[rbp] - 0003b ff c0 inc eax - 0003d 89 45 24 mov DWORD PTR i$[rbp], eax - 00040 8b 45 04 mov eax, DWORD PTR mask$[rbp] - 00043 d1 f8 sar eax, 1 - 00045 89 45 04 mov DWORD PTR mask$[rbp], eax + 00039 8b 45 24 mov eax, DWORD PTR i$[rbp] + 0003c ff c0 inc eax + 0003e 89 45 24 mov DWORD PTR i$[rbp], eax + 00041 8b 45 04 mov eax, DWORD PTR mask$[rbp] + 00044 d1 f8 sar eax, 1 + 00046 89 45 04 mov DWORD PTR mask$[rbp], eax $LN4@stbi__read: - 00048 83 7d 24 04 cmp DWORD PTR i$[rbp], 4 - 0004c 7d 71 jge SHORT $LN3@stbi__read + 00049 83 7d 24 04 cmp DWORD PTR i$[rbp], 4 + 0004d 7d 71 jge SHORT $LN3@stbi__read ; 5920 : if (channel & mask) { - 0004e 8b 45 04 mov eax, DWORD PTR mask$[rbp] - 00051 8b 8d 28 01 00 + 0004f 8b 45 04 mov eax, DWORD PTR mask$[rbp] + 00052 8b 8d 28 01 00 00 mov ecx, DWORD PTR channel$[rbp] - 00057 23 c8 and ecx, eax - 00059 8b c1 mov eax, ecx - 0005b 85 c0 test eax, eax - 0005d 74 5b je SHORT $LN5@stbi__read + 00058 23 c8 and ecx, eax + 0005a 8b c1 mov eax, ecx + 0005c 85 c0 test eax, eax + 0005e 74 5b je SHORT $LN5@stbi__read ; 5921 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "PIC file too short"); - 0005f 48 8b 8d 20 01 + 00060 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00066 e8 00 00 00 00 call stbi__at_eof - 0006b 85 c0 test eax, eax - 0006d 74 31 je SHORT $LN6@stbi__read - 0006f 48 8d 0d 00 00 + 00067 e8 00 00 00 00 call stbi__at_eof + 0006c 85 c0 test eax, eax + 0006e 74 31 je SHORT $LN6@stbi__read + 00070 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08GGMBIFE@bad?5file@ - 00076 e8 00 00 00 00 call stbi__err - 0007b 85 c0 test eax, eax - 0007d 74 0d je SHORT $LN8@stbi__read - 0007f 48 c7 85 f8 00 + 00077 e8 00 00 00 00 call stbi__err + 0007c 85 c0 test eax, eax + 0007e 74 0d je SHORT $LN8@stbi__read + 00080 48 c7 85 f8 00 00 00 00 00 00 00 mov QWORD PTR tv75[rbp], 0 - 0008a eb 0b jmp SHORT $LN9@stbi__read + 0008b eb 0b jmp SHORT $LN9@stbi__read $LN8@stbi__read: - 0008c 48 c7 85 f8 00 + 0008d 48 c7 85 f8 00 00 00 00 00 00 00 mov QWORD PTR tv75[rbp], 0 $LN9@stbi__read: - 00097 48 8b 85 f8 00 + 00098 48 8b 85 f8 00 00 00 mov rax, QWORD PTR tv75[rbp] - 0009e eb 26 jmp SHORT $LN1@stbi__read + 0009f eb 26 jmp SHORT $LN1@stbi__read $LN6@stbi__read: ; 5922 : dest[i] = stbi__get8(s); - 000a0 48 8b 8d 20 01 + 000a1 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000a7 e8 00 00 00 00 call stbi__get8 - 000ac 48 63 4d 24 movsxd rcx, DWORD PTR i$[rbp] - 000b0 48 8b 95 30 01 + 000a8 e8 00 00 00 00 call stbi__get8 + 000ad 48 63 4d 24 movsxd rcx, DWORD PTR i$[rbp] + 000b1 48 8b 95 30 01 00 00 mov rdx, QWORD PTR dest$[rbp] - 000b7 88 04 0a mov BYTE PTR [rdx+rcx], al + 000b8 88 04 0a mov BYTE PTR [rdx+rcx], al $LN5@stbi__read: ; 5923 : } ; 5924 : } - 000ba e9 79 ff ff ff jmp $LN2@stbi__read + 000bb e9 79 ff ff ff jmp $LN2@stbi__read $LN3@stbi__read: ; 5925 : ; 5926 : return dest; - 000bf 48 8b 85 30 01 + 000c0 48 8b 85 30 01 00 00 mov rax, QWORD PTR dest$[rbp] $LN1@stbi__read: ; 5927 : } - 000c6 48 8d a5 08 01 + 000c7 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000cd 5f pop rdi - 000ce 5d pop rbp - 000cf c3 ret 0 + 000ce 5f pop rdi + 000cf 5d pop rbp + 000d0 c3 ret 0 stbi__readval ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -11032,77 +11081,79 @@ stbi__pic_test_core PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 5896 : int i; ; 5897 : ; 5898 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) - 0001f 48 8d 15 00 00 + 00020 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_04KBFEPHFH@S?$IA?v4@ - 00026 48 8b 8d 00 01 + 00027 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0002d e8 00 00 00 00 call stbi__pic_is4 - 00032 85 c0 test eax, eax - 00034 75 04 jne SHORT $LN5@stbi__pic_ + 0002e e8 00 00 00 00 call stbi__pic_is4 + 00033 85 c0 test eax, eax + 00035 75 04 jne SHORT $LN5@stbi__pic_ ; 5899 : return 0; - 00036 33 c0 xor eax, eax - 00038 eb 45 jmp SHORT $LN1@stbi__pic_ + 00037 33 c0 xor eax, eax + 00039 eb 46 jmp SHORT $LN1@stbi__pic_ $LN5@stbi__pic_: ; 5900 : ; 5901 : for (i = 0; i < 84; ++i) - 0003a c7 45 04 00 00 + 0003b c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00041 eb 08 jmp SHORT $LN4@stbi__pic_ + 00042 eb 08 jmp SHORT $LN4@stbi__pic_ $LN2@stbi__pic_: - 00043 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00046 ff c0 inc eax - 00048 89 45 04 mov DWORD PTR i$[rbp], eax + 00044 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00047 ff c0 inc eax + 00049 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__pic_: - 0004b 83 7d 04 54 cmp DWORD PTR i$[rbp], 84 ; 00000054H - 0004f 7d 0e jge SHORT $LN3@stbi__pic_ + 0004c 83 7d 04 54 cmp DWORD PTR i$[rbp], 84 ; 00000054H + 00050 7d 0f jge SHORT $LN3@stbi__pic_ ; 5902 : stbi__get8(s); - 00051 48 8b 8d 00 01 + 00052 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00058 e8 00 00 00 00 call stbi__get8 - 0005d eb e4 jmp SHORT $LN2@stbi__pic_ + 00059 e8 00 00 00 00 call stbi__get8 + 0005e 90 npad 1 + 0005f eb e3 jmp SHORT $LN2@stbi__pic_ $LN3@stbi__pic_: ; 5903 : ; 5904 : if (!stbi__pic_is4(s, "PICT")) - 0005f 48 8d 15 00 00 + 00061 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_04ELNJHLFH@PICT@ - 00066 48 8b 8d 00 01 + 00068 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0006d e8 00 00 00 00 call stbi__pic_is4 - 00072 85 c0 test eax, eax - 00074 75 04 jne SHORT $LN6@stbi__pic_ + 0006f e8 00 00 00 00 call stbi__pic_is4 + 00074 85 c0 test eax, eax + 00076 75 04 jne SHORT $LN6@stbi__pic_ ; 5905 : return 0; - 00076 33 c0 xor eax, eax - 00078 eb 05 jmp SHORT $LN1@stbi__pic_ + 00078 33 c0 xor eax, eax + 0007a eb 05 jmp SHORT $LN1@stbi__pic_ $LN6@stbi__pic_: ; 5906 : ; 5907 : return 1; - 0007a b8 01 00 00 00 mov eax, 1 + 0007c b8 01 00 00 00 mov eax, 1 $LN1@stbi__pic_: ; 5908 : } - 0007f 48 8d a5 e8 00 + 00081 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00086 5f pop rdi - 00087 5d pop rbp - 00088 c3 ret 0 + 00088 5f pop rdi + 00089 5d pop rbp + 0008a c3 ret 0 stbi__pic_test_core ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -11126,55 +11177,56 @@ stbi__pic_is4 PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 5886 : int i; ; 5887 : for (i = 0; i < 4; ++i) - 00024 c7 45 04 00 00 + 00025 c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0002b eb 08 jmp SHORT $LN4@stbi__pic_ + 0002c eb 08 jmp SHORT $LN4@stbi__pic_ $LN2@stbi__pic_: - 0002d 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00030 ff c0 inc eax - 00032 89 45 04 mov DWORD PTR i$[rbp], eax + 0002e 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00031 ff c0 inc eax + 00033 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__pic_: - 00035 83 7d 04 04 cmp DWORD PTR i$[rbp], 4 - 00039 7d 28 jge SHORT $LN3@stbi__pic_ + 00036 83 7d 04 04 cmp DWORD PTR i$[rbp], 4 + 0003a 7d 28 jge SHORT $LN3@stbi__pic_ ; 5888 : if (stbi__get8(s) != (stbi_uc)str[i]) - 0003b 48 8b 8d 00 01 + 0003c 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00042 e8 00 00 00 00 call stbi__get8 - 00047 0f b6 c0 movzx eax, al - 0004a 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 0004e 48 8b 95 08 01 + 00043 e8 00 00 00 00 call stbi__get8 + 00048 0f b6 c0 movzx eax, al + 0004b 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 0004f 48 8b 95 08 01 00 00 mov rdx, QWORD PTR str$[rbp] - 00055 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00059 3b c1 cmp eax, ecx - 0005b 74 04 je SHORT $LN5@stbi__pic_ + 00056 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 0005a 3b c1 cmp eax, ecx + 0005c 74 04 je SHORT $LN5@stbi__pic_ ; 5889 : return 0; - 0005d 33 c0 xor eax, eax - 0005f eb 07 jmp SHORT $LN1@stbi__pic_ + 0005e 33 c0 xor eax, eax + 00060 eb 07 jmp SHORT $LN1@stbi__pic_ $LN5@stbi__pic_: - 00061 eb ca jmp SHORT $LN2@stbi__pic_ + 00062 eb ca jmp SHORT $LN2@stbi__pic_ $LN3@stbi__pic_: ; 5890 : ; 5891 : return 1; - 00063 b8 01 00 00 00 mov eax, 1 + 00064 b8 01 00 00 00 mov eax, 1 $LN1@stbi__pic_: ; 5892 : } - 00068 48 8d a5 e8 00 + 00069 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 0006f 5f pop rdi - 00070 5d pop rbp - 00071 c3 ret 0 + 00070 5f pop rdi + 00071 5d pop rbp + 00072 c3 ret 0 stbi__pic_is4 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -11203,185 +11255,186 @@ stbi__psd_decode_rle PROC ; COMDAT 0001d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00024 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00029 90 npad 1 ; 5629 : int count, nleft, len; ; 5630 : ; 5631 : count = 0; - 00029 c7 45 04 00 00 + 0002a c7 45 04 00 00 00 00 mov DWORD PTR count$[rbp], 0 $LN2@stbi__psd_: ; 5632 : while ((nleft = pixelCount - count) > 0) { - 00030 8b 45 04 mov eax, DWORD PTR count$[rbp] - 00033 8b 8d 70 01 00 + 00031 8b 45 04 mov eax, DWORD PTR count$[rbp] + 00034 8b 8d 70 01 00 00 mov ecx, DWORD PTR pixelCount$[rbp] - 00039 2b c8 sub ecx, eax - 0003b 8b c1 mov eax, ecx - 0003d 89 45 24 mov DWORD PTR nleft$[rbp], eax - 00040 83 7d 24 00 cmp DWORD PTR nleft$[rbp], 0 - 00044 0f 8e f6 00 00 + 0003a 2b c8 sub ecx, eax + 0003c 8b c1 mov eax, ecx + 0003e 89 45 24 mov DWORD PTR nleft$[rbp], eax + 00041 83 7d 24 00 cmp DWORD PTR nleft$[rbp], 0 + 00045 0f 8e f6 00 00 00 jle $LN3@stbi__psd_ ; 5633 : len = stbi__get8(s); - 0004a 48 8b 8d 60 01 + 0004b 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00051 e8 00 00 00 00 call stbi__get8 - 00056 0f b6 c0 movzx eax, al - 00059 89 45 44 mov DWORD PTR len$[rbp], eax + 00052 e8 00 00 00 00 call stbi__get8 + 00057 0f b6 c0 movzx eax, al + 0005a 89 45 44 mov DWORD PTR len$[rbp], eax ; 5634 : if (len == 128) { - 0005c 81 7d 44 80 00 + 0005d 81 7d 44 80 00 00 00 cmp DWORD PTR len$[rbp], 128 ; 00000080H - 00063 75 05 jne SHORT $LN8@stbi__psd_ + 00064 75 05 jne SHORT $LN8@stbi__psd_ ; 5635 : // No-op. ; 5636 : } - 00065 e9 d1 00 00 00 jmp $LN9@stbi__psd_ + 00066 e9 d1 00 00 00 jmp $LN9@stbi__psd_ $LN8@stbi__psd_: ; 5637 : else if (len < 128) { - 0006a 81 7d 44 80 00 + 0006b 81 7d 44 80 00 00 00 cmp DWORD PTR len$[rbp], 128 ; 00000080H - 00071 7d 5d jge SHORT $LN10@stbi__psd_ + 00072 7d 5d jge SHORT $LN10@stbi__psd_ ; 5638 : // Copy next len+1 bytes literally. ; 5639 : len++; - 00073 8b 45 44 mov eax, DWORD PTR len$[rbp] - 00076 ff c0 inc eax - 00078 89 45 44 mov DWORD PTR len$[rbp], eax + 00074 8b 45 44 mov eax, DWORD PTR len$[rbp] + 00077 ff c0 inc eax + 00079 89 45 44 mov DWORD PTR len$[rbp], eax ; 5640 : if (len > nleft) return 0; // corrupt data - 0007b 8b 45 24 mov eax, DWORD PTR nleft$[rbp] - 0007e 39 45 44 cmp DWORD PTR len$[rbp], eax - 00081 7e 07 jle SHORT $LN12@stbi__psd_ - 00083 33 c0 xor eax, eax - 00085 e9 bb 00 00 00 jmp $LN1@stbi__psd_ + 0007c 8b 45 24 mov eax, DWORD PTR nleft$[rbp] + 0007f 39 45 44 cmp DWORD PTR len$[rbp], eax + 00082 7e 07 jle SHORT $LN12@stbi__psd_ + 00084 33 c0 xor eax, eax + 00086 e9 bb 00 00 00 jmp $LN1@stbi__psd_ $LN12@stbi__psd_: ; 5641 : count += len; - 0008a 8b 45 44 mov eax, DWORD PTR len$[rbp] - 0008d 8b 4d 04 mov ecx, DWORD PTR count$[rbp] - 00090 03 c8 add ecx, eax - 00092 8b c1 mov eax, ecx - 00094 89 45 04 mov DWORD PTR count$[rbp], eax + 0008b 8b 45 44 mov eax, DWORD PTR len$[rbp] + 0008e 8b 4d 04 mov ecx, DWORD PTR count$[rbp] + 00091 03 c8 add ecx, eax + 00093 8b c1 mov eax, ecx + 00095 89 45 04 mov DWORD PTR count$[rbp], eax $LN4@stbi__psd_: ; 5642 : while (len) { - 00097 83 7d 44 00 cmp DWORD PTR len$[rbp], 0 - 0009b 74 31 je SHORT $LN5@stbi__psd_ + 00098 83 7d 44 00 cmp DWORD PTR len$[rbp], 0 + 0009c 74 31 je SHORT $LN5@stbi__psd_ ; 5643 : *p = stbi__get8(s); - 0009d 48 8b 8d 60 01 + 0009e 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000a4 e8 00 00 00 00 call stbi__get8 - 000a9 48 8b 8d 68 01 + 000a5 e8 00 00 00 00 call stbi__get8 + 000aa 48 8b 8d 68 01 00 00 mov rcx, QWORD PTR p$[rbp] - 000b0 88 01 mov BYTE PTR [rcx], al + 000b1 88 01 mov BYTE PTR [rcx], al ; 5644 : p += 4; - 000b2 48 8b 85 68 01 + 000b3 48 8b 85 68 01 00 00 mov rax, QWORD PTR p$[rbp] - 000b9 48 83 c0 04 add rax, 4 - 000bd 48 89 85 68 01 + 000ba 48 83 c0 04 add rax, 4 + 000be 48 89 85 68 01 00 00 mov QWORD PTR p$[rbp], rax ; 5645 : len--; - 000c4 8b 45 44 mov eax, DWORD PTR len$[rbp] - 000c7 ff c8 dec eax - 000c9 89 45 44 mov DWORD PTR len$[rbp], eax + 000c5 8b 45 44 mov eax, DWORD PTR len$[rbp] + 000c8 ff c8 dec eax + 000ca 89 45 44 mov DWORD PTR len$[rbp], eax ; 5646 : } - 000cc eb c9 jmp SHORT $LN4@stbi__psd_ + 000cd eb c9 jmp SHORT $LN4@stbi__psd_ $LN5@stbi__psd_: ; 5647 : } - 000ce eb 6b jmp SHORT $LN11@stbi__psd_ + 000cf eb 6b jmp SHORT $LN11@stbi__psd_ $LN10@stbi__psd_: ; 5648 : else if (len > 128) { - 000d0 81 7d 44 80 00 + 000d1 81 7d 44 80 00 00 00 cmp DWORD PTR len$[rbp], 128 ; 00000080H - 000d7 7e 62 jle SHORT $LN13@stbi__psd_ + 000d8 7e 62 jle SHORT $LN13@stbi__psd_ ; 5649 : stbi_uc val; ; 5650 : // Next -len+1 bytes in the dest are replicated from next source byte. ; 5651 : // (Interpret len as a negative 8-bit int.) ; 5652 : len = 257 - len; - 000d9 b8 01 01 00 00 mov eax, 257 ; 00000101H - 000de 2b 45 44 sub eax, DWORD PTR len$[rbp] - 000e1 89 45 44 mov DWORD PTR len$[rbp], eax + 000da b8 01 01 00 00 mov eax, 257 ; 00000101H + 000df 2b 45 44 sub eax, DWORD PTR len$[rbp] + 000e2 89 45 44 mov DWORD PTR len$[rbp], eax ; 5653 : if (len > nleft) return 0; // corrupt data - 000e4 8b 45 24 mov eax, DWORD PTR nleft$[rbp] - 000e7 39 45 44 cmp DWORD PTR len$[rbp], eax - 000ea 7e 04 jle SHORT $LN14@stbi__psd_ - 000ec 33 c0 xor eax, eax - 000ee eb 55 jmp SHORT $LN1@stbi__psd_ + 000e5 8b 45 24 mov eax, DWORD PTR nleft$[rbp] + 000e8 39 45 44 cmp DWORD PTR len$[rbp], eax + 000eb 7e 04 jle SHORT $LN14@stbi__psd_ + 000ed 33 c0 xor eax, eax + 000ef eb 55 jmp SHORT $LN1@stbi__psd_ $LN14@stbi__psd_: ; 5654 : val = stbi__get8(s); - 000f0 48 8b 8d 60 01 + 000f1 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000f7 e8 00 00 00 00 call stbi__get8 - 000fc 88 45 64 mov BYTE PTR val$1[rbp], al + 000f8 e8 00 00 00 00 call stbi__get8 + 000fd 88 45 64 mov BYTE PTR val$1[rbp], al ; 5655 : count += len; - 000ff 8b 45 44 mov eax, DWORD PTR len$[rbp] - 00102 8b 4d 04 mov ecx, DWORD PTR count$[rbp] - 00105 03 c8 add ecx, eax - 00107 8b c1 mov eax, ecx - 00109 89 45 04 mov DWORD PTR count$[rbp], eax + 00100 8b 45 44 mov eax, DWORD PTR len$[rbp] + 00103 8b 4d 04 mov ecx, DWORD PTR count$[rbp] + 00106 03 c8 add ecx, eax + 00108 8b c1 mov eax, ecx + 0010a 89 45 04 mov DWORD PTR count$[rbp], eax $LN6@stbi__psd_: ; 5656 : while (len) { - 0010c 83 7d 44 00 cmp DWORD PTR len$[rbp], 0 - 00110 74 29 je SHORT $LN7@stbi__psd_ + 0010d 83 7d 44 00 cmp DWORD PTR len$[rbp], 0 + 00111 74 29 je SHORT $LN7@stbi__psd_ ; 5657 : *p = val; - 00112 48 8b 85 68 01 + 00113 48 8b 85 68 01 00 00 mov rax, QWORD PTR p$[rbp] - 00119 0f b6 4d 64 movzx ecx, BYTE PTR val$1[rbp] - 0011d 88 08 mov BYTE PTR [rax], cl + 0011a 0f b6 4d 64 movzx ecx, BYTE PTR val$1[rbp] + 0011e 88 08 mov BYTE PTR [rax], cl ; 5658 : p += 4; - 0011f 48 8b 85 68 01 + 00120 48 8b 85 68 01 00 00 mov rax, QWORD PTR p$[rbp] - 00126 48 83 c0 04 add rax, 4 - 0012a 48 89 85 68 01 + 00127 48 83 c0 04 add rax, 4 + 0012b 48 89 85 68 01 00 00 mov QWORD PTR p$[rbp], rax ; 5659 : len--; - 00131 8b 45 44 mov eax, DWORD PTR len$[rbp] - 00134 ff c8 dec eax - 00136 89 45 44 mov DWORD PTR len$[rbp], eax + 00132 8b 45 44 mov eax, DWORD PTR len$[rbp] + 00135 ff c8 dec eax + 00137 89 45 44 mov DWORD PTR len$[rbp], eax ; 5660 : } - 00139 eb d1 jmp SHORT $LN6@stbi__psd_ + 0013a eb d1 jmp SHORT $LN6@stbi__psd_ $LN7@stbi__psd_: $LN13@stbi__psd_: $LN11@stbi__psd_: @@ -11390,22 +11443,22 @@ $LN9@stbi__psd_: ; 5661 : } ; 5662 : } - 0013b e9 f0 fe ff ff jmp $LN2@stbi__psd_ + 0013c e9 f0 fe ff ff jmp $LN2@stbi__psd_ $LN3@stbi__psd_: ; 5663 : ; 5664 : return 1; - 00140 b8 01 00 00 00 mov eax, 1 + 00141 b8 01 00 00 00 mov eax, 1 $LN1@stbi__psd_: ; 5665 : } - 00145 48 8d a5 48 01 + 00146 48 8d a5 48 01 00 00 lea rsp, QWORD PTR [rbp+328] - 0014c 5f pop rdi - 0014d 5d pop rbp - 0014e c3 ret 0 + 0014d 5f pop rdi + 0014e 5d pop rbp + 0014f c3 ret 0 stbi__psd_decode_rle ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -11433,83 +11486,84 @@ stbi__tga_read_rgb16 PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); - 00024 48 8b 8d 80 01 + 00025 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0002b e8 00 00 00 00 call stbi__get16le - 00030 66 89 45 04 mov WORD PTR px$[rbp], ax + 0002c e8 00 00 00 00 call stbi__get16le + 00031 66 89 45 04 mov WORD PTR px$[rbp], ax ; 5388 : stbi__uint16 fiveBitMask = 31; - 00034 b8 1f 00 00 00 mov eax, 31 - 00039 66 89 45 24 mov WORD PTR fiveBitMask$[rbp], ax + 00035 b8 1f 00 00 00 mov eax, 31 + 0003a 66 89 45 24 mov WORD PTR fiveBitMask$[rbp], ax ; 5389 : // we have 3 channels with 5bits each ; 5390 : int r = (px >> 10) & fiveBitMask; - 0003d 0f b7 45 04 movzx eax, WORD PTR px$[rbp] - 00041 c1 f8 0a sar eax, 10 - 00044 0f b7 4d 24 movzx ecx, WORD PTR fiveBitMask$[rbp] - 00048 23 c1 and eax, ecx - 0004a 89 45 44 mov DWORD PTR r$[rbp], eax + 0003e 0f b7 45 04 movzx eax, WORD PTR px$[rbp] + 00042 c1 f8 0a sar eax, 10 + 00045 0f b7 4d 24 movzx ecx, WORD PTR fiveBitMask$[rbp] + 00049 23 c1 and eax, ecx + 0004b 89 45 44 mov DWORD PTR r$[rbp], eax ; 5391 : int g = (px >> 5) & fiveBitMask; - 0004d 0f b7 45 04 movzx eax, WORD PTR px$[rbp] - 00051 c1 f8 05 sar eax, 5 - 00054 0f b7 4d 24 movzx ecx, WORD PTR fiveBitMask$[rbp] - 00058 23 c1 and eax, ecx - 0005a 89 45 64 mov DWORD PTR g$[rbp], eax + 0004e 0f b7 45 04 movzx eax, WORD PTR px$[rbp] + 00052 c1 f8 05 sar eax, 5 + 00055 0f b7 4d 24 movzx ecx, WORD PTR fiveBitMask$[rbp] + 00059 23 c1 and eax, ecx + 0005b 89 45 64 mov DWORD PTR g$[rbp], eax ; 5392 : int b = px & fiveBitMask; - 0005d 0f b7 45 04 movzx eax, WORD PTR px$[rbp] - 00061 0f b7 4d 24 movzx ecx, WORD PTR fiveBitMask$[rbp] - 00065 23 c1 and eax, ecx - 00067 89 85 84 00 00 + 0005e 0f b7 45 04 movzx eax, WORD PTR px$[rbp] + 00062 0f b7 4d 24 movzx ecx, WORD PTR fiveBitMask$[rbp] + 00066 23 c1 and eax, ecx + 00068 89 85 84 00 00 00 mov DWORD PTR b$[rbp], eax ; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later ; 5394 : out[0] = (stbi_uc)((r * 255) / 31); - 0006d 69 45 44 ff 00 + 0006e 69 45 44 ff 00 00 00 imul eax, DWORD PTR r$[rbp], 255 ; 000000ffH - 00074 99 cdq - 00075 b9 1f 00 00 00 mov ecx, 31 - 0007a f7 f9 idiv ecx - 0007c b9 01 00 00 00 mov ecx, 1 - 00081 48 6b c9 00 imul rcx, rcx, 0 - 00085 48 8b 95 88 01 + 00075 99 cdq + 00076 b9 1f 00 00 00 mov ecx, 31 + 0007b f7 f9 idiv ecx + 0007d b9 01 00 00 00 mov ecx, 1 + 00082 48 6b c9 00 imul rcx, rcx, 0 + 00086 48 8b 95 88 01 00 00 mov rdx, QWORD PTR out$[rbp] - 0008c 88 04 0a mov BYTE PTR [rdx+rcx], al + 0008d 88 04 0a mov BYTE PTR [rdx+rcx], al ; 5395 : out[1] = (stbi_uc)((g * 255) / 31); - 0008f 69 45 64 ff 00 + 00090 69 45 64 ff 00 00 00 imul eax, DWORD PTR g$[rbp], 255 ; 000000ffH - 00096 99 cdq - 00097 b9 1f 00 00 00 mov ecx, 31 - 0009c f7 f9 idiv ecx - 0009e b9 01 00 00 00 mov ecx, 1 - 000a3 48 6b c9 01 imul rcx, rcx, 1 - 000a7 48 8b 95 88 01 + 00097 99 cdq + 00098 b9 1f 00 00 00 mov ecx, 31 + 0009d f7 f9 idiv ecx + 0009f b9 01 00 00 00 mov ecx, 1 + 000a4 48 6b c9 01 imul rcx, rcx, 1 + 000a8 48 8b 95 88 01 00 00 mov rdx, QWORD PTR out$[rbp] - 000ae 88 04 0a mov BYTE PTR [rdx+rcx], al + 000af 88 04 0a mov BYTE PTR [rdx+rcx], al ; 5396 : out[2] = (stbi_uc)((b * 255) / 31); - 000b1 69 85 84 00 00 + 000b2 69 85 84 00 00 00 ff 00 00 00 imul eax, DWORD PTR b$[rbp], 255 ; 000000ffH - 000bb 99 cdq - 000bc b9 1f 00 00 00 mov ecx, 31 - 000c1 f7 f9 idiv ecx - 000c3 b9 01 00 00 00 mov ecx, 1 - 000c8 48 6b c9 02 imul rcx, rcx, 2 - 000cc 48 8b 95 88 01 + 000bc 99 cdq + 000bd b9 1f 00 00 00 mov ecx, 31 + 000c2 f7 f9 idiv ecx + 000c4 b9 01 00 00 00 mov ecx, 1 + 000c9 48 6b c9 02 imul rcx, rcx, 2 + 000cd 48 8b 95 88 01 00 00 mov rdx, QWORD PTR out$[rbp] - 000d3 88 04 0a mov BYTE PTR [rdx+rcx], al + 000d4 88 04 0a mov BYTE PTR [rdx+rcx], al ; 5397 : ; 5398 : // some people claim that the most significant bit might be used for alpha @@ -11518,11 +11572,11 @@ stbi__tga_read_rgb16 PROC ; COMDAT ; 5401 : // so let's treat all 15 and 16bit TGAs as RGB with no alpha. ; 5402 : } - 000d6 48 8d a5 68 01 + 000d7 48 8d a5 68 01 00 00 lea rsp, QWORD PTR [rbp+360] - 000dd 5f pop rdi - 000de 5d pop rbp - 000df c3 ret 0 + 000de 5f pop rdi + 000df 5d pop rbp + 000e0 c3 ret 0 stbi__tga_read_rgb16 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -11548,103 +11602,104 @@ stbi__tga_get_comp PROC ; COMDAT 0001b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00022 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00027 90 npad 1 ; 5271 : // only RGB or RGBA (incl. 16bit) or grey allowed ; 5272 : if (is_rgb16) *is_rgb16 = 0; - 00027 48 83 bd 00 01 + 00028 48 83 bd 00 01 00 00 00 cmp QWORD PTR is_rgb16$[rbp], 0 - 0002f 74 0d je SHORT $LN4@stbi__tga_ - 00031 48 8b 85 00 01 + 00030 74 0d je SHORT $LN4@stbi__tga_ + 00032 48 8b 85 00 01 00 00 mov rax, QWORD PTR is_rgb16$[rbp] - 00038 c7 00 00 00 00 + 00039 c7 00 00 00 00 00 mov DWORD PTR [rax], 0 $LN4@stbi__tga_: ; 5273 : switch (bits_per_pixel) { - 0003e 8b 85 f0 00 00 + 0003f 8b 85 f0 00 00 00 mov eax, DWORD PTR bits_per_pixel$[rbp] - 00044 89 85 c0 00 00 + 00045 89 85 c0 00 00 00 mov DWORD PTR tv65[rbp], eax - 0004a 83 bd c0 00 00 + 0004b 83 bd c0 00 00 00 08 cmp DWORD PTR tv65[rbp], 8 - 00051 74 26 je SHORT $LN5@stbi__tga_ - 00053 83 bd c0 00 00 + 00052 74 26 je SHORT $LN5@stbi__tga_ + 00054 83 bd c0 00 00 00 0f cmp DWORD PTR tv65[rbp], 15 - 0005a 74 34 je SHORT $LN8@stbi__tga_ - 0005c 83 bd c0 00 00 + 0005b 74 34 je SHORT $LN8@stbi__tga_ + 0005d 83 bd c0 00 00 00 10 cmp DWORD PTR tv65[rbp], 16 - 00063 74 1b je SHORT $LN6@stbi__tga_ - 00065 83 bd c0 00 00 + 00064 74 1b je SHORT $LN6@stbi__tga_ + 00066 83 bd c0 00 00 00 18 cmp DWORD PTR tv65[rbp], 24 - 0006c 74 40 je SHORT $LN10@stbi__tga_ - 0006e 83 bd c0 00 00 + 0006d 74 40 je SHORT $LN10@stbi__tga_ + 0006f 83 bd c0 00 00 00 20 cmp DWORD PTR tv65[rbp], 32 ; 00000020H - 00075 74 37 je SHORT $LN11@stbi__tga_ - 00077 eb 46 jmp SHORT $LN12@stbi__tga_ + 00076 74 37 je SHORT $LN11@stbi__tga_ + 00078 eb 46 jmp SHORT $LN12@stbi__tga_ $LN5@stbi__tga_: ; 5274 : case 8: return STBI_grey; - 00079 b8 01 00 00 00 mov eax, 1 - 0007e eb 41 jmp SHORT $LN1@stbi__tga_ + 0007a b8 01 00 00 00 mov eax, 1 + 0007f eb 41 jmp SHORT $LN1@stbi__tga_ $LN6@stbi__tga_: ; 5275 : case 16: if (is_grey) return STBI_grey_alpha; - 00080 83 bd f8 00 00 + 00081 83 bd f8 00 00 00 00 cmp DWORD PTR is_grey$[rbp], 0 - 00087 74 07 je SHORT $LN7@stbi__tga_ - 00089 b8 02 00 00 00 mov eax, 2 - 0008e eb 31 jmp SHORT $LN1@stbi__tga_ + 00088 74 07 je SHORT $LN7@stbi__tga_ + 0008a b8 02 00 00 00 mov eax, 2 + 0008f eb 31 jmp SHORT $LN1@stbi__tga_ $LN7@stbi__tga_: $LN8@stbi__tga_: ; 5276 : // fallthrough ; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; - 00090 48 83 bd 00 01 + 00091 48 83 bd 00 01 00 00 00 cmp QWORD PTR is_rgb16$[rbp], 0 - 00098 74 0d je SHORT $LN9@stbi__tga_ - 0009a 48 8b 85 00 01 + 00099 74 0d je SHORT $LN9@stbi__tga_ + 0009b 48 8b 85 00 01 00 00 mov rax, QWORD PTR is_rgb16$[rbp] - 000a1 c7 00 01 00 00 + 000a2 c7 00 01 00 00 00 mov DWORD PTR [rax], 1 $LN9@stbi__tga_: ; 5278 : return STBI_rgb; - 000a7 b8 03 00 00 00 mov eax, 3 - 000ac eb 13 jmp SHORT $LN1@stbi__tga_ + 000a8 b8 03 00 00 00 mov eax, 3 + 000ad eb 13 jmp SHORT $LN1@stbi__tga_ $LN10@stbi__tga_: $LN11@stbi__tga_: ; 5279 : case 24: // fallthrough ; 5280 : case 32: return bits_per_pixel / 8; - 000ae 8b 85 f0 00 00 + 000af 8b 85 f0 00 00 00 mov eax, DWORD PTR bits_per_pixel$[rbp] - 000b4 99 cdq - 000b5 83 e2 07 and edx, 7 - 000b8 03 c2 add eax, edx - 000ba c1 f8 03 sar eax, 3 - 000bd eb 02 jmp SHORT $LN1@stbi__tga_ + 000b5 99 cdq + 000b6 83 e2 07 and edx, 7 + 000b9 03 c2 add eax, edx + 000bb c1 f8 03 sar eax, 3 + 000be eb 02 jmp SHORT $LN1@stbi__tga_ $LN12@stbi__tga_: ; 5281 : default: return 0; - 000bf 33 c0 xor eax, eax + 000c0 33 c0 xor eax, eax $LN1@stbi__tga_: ; 5282 : } ; 5283 : } - 000c1 48 8d a5 d8 00 + 000c2 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 000c8 5f pop rdi - 000c9 5d pop rbp - 000ca c3 ret 0 + 000c9 5f pop rdi + 000ca 5d pop rbp + 000cb c3 ret 0 stbi__tga_get_comp ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -11654,16 +11709,16 @@ _TEXT SEGMENT hsz$ = 4 compress$1 = 36 i$2 = 68 -tv234 = 280 -tv228 = 280 -tv224 = 280 -tv182 = 280 -tv173 = 280 -tv168 = 280 -tv156 = 280 -tv136 = 280 -tv95 = 280 tv75 = 280 +tv95 = 280 +tv136 = 280 +tv156 = 280 +tv168 = 280 +tv173 = 280 +tv182 = 280 +tv224 = 280 +tv228 = 280 +tv234 = 280 s$ = 320 info$ = 328 stbi__bmp_parse_header PROC ; COMDAT @@ -11680,550 +11735,564 @@ stbi__bmp_parse_header PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 4971 : int hsz; ; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); - 00024 48 8b 8d 40 01 + 00025 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0002b e8 00 00 00 00 call stbi__get8 - 00030 0f b6 c0 movzx eax, al - 00033 83 f8 42 cmp eax, 66 ; 00000042H - 00036 75 14 jne SHORT $LN6@stbi__bmp_ - 00038 48 8b 8d 40 01 + 0002c e8 00 00 00 00 call stbi__get8 + 00031 0f b6 c0 movzx eax, al + 00034 83 f8 42 cmp eax, 66 ; 00000042H + 00037 75 14 jne SHORT $LN6@stbi__bmp_ + 00039 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0003f e8 00 00 00 00 call stbi__get8 - 00044 0f b6 c0 movzx eax, al - 00047 83 f8 4d cmp eax, 77 ; 0000004dH - 0004a 74 34 je SHORT $LN5@stbi__bmp_ + 00040 e8 00 00 00 00 call stbi__get8 + 00045 0f b6 c0 movzx eax, al + 00048 83 f8 4d cmp eax, 77 ; 0000004dH + 0004b 74 34 je SHORT $LN5@stbi__bmp_ $LN6@stbi__bmp_: - 0004c 48 8d 0d 00 00 + 0004d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07IANEBNLB@not?5BMP@ - 00053 e8 00 00 00 00 call stbi__err - 00058 85 c0 test eax, eax - 0005a 74 0d je SHORT $LN32@stbi__bmp_ - 0005c 48 c7 85 18 01 + 00054 e8 00 00 00 00 call stbi__err + 00059 85 c0 test eax, eax + 0005b 74 0d je SHORT $LN32@stbi__bmp_ + 0005d 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv75[rbp], 0 - 00067 eb 0b jmp SHORT $LN33@stbi__bmp_ + 00068 eb 0b jmp SHORT $LN33@stbi__bmp_ $LN32@stbi__bmp_: - 00069 48 c7 85 18 01 + 0006a 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv75[rbp], 0 $LN33@stbi__bmp_: - 00074 48 8b 85 18 01 + 00075 48 8b 85 18 01 00 00 mov rax, QWORD PTR tv75[rbp] - 0007b e9 9b 05 00 00 jmp $LN1@stbi__bmp_ + 0007c e9 af 05 00 00 jmp $LN1@stbi__bmp_ $LN5@stbi__bmp_: ; 4973 : stbi__get32le(s); // discard filesize - 00080 48 8b 8d 40 01 + 00081 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00087 e8 00 00 00 00 call stbi__get32le + 00088 e8 00 00 00 00 call stbi__get32le + 0008d 90 npad 1 ; 4974 : stbi__get16le(s); // discard reserved - 0008c 48 8b 8d 40 01 + 0008e 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00093 e8 00 00 00 00 call stbi__get16le + 00095 e8 00 00 00 00 call stbi__get16le + 0009a 90 npad 1 ; 4975 : stbi__get16le(s); // discard reserved - 00098 48 8b 8d 40 01 + 0009b 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0009f e8 00 00 00 00 call stbi__get16le + 000a2 e8 00 00 00 00 call stbi__get16le + 000a7 90 npad 1 ; 4976 : info->offset = stbi__get32le(s); - 000a4 48 8b 8d 40 01 + 000a8 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000ab e8 00 00 00 00 call stbi__get32le - 000b0 48 8b 8d 48 01 + 000af e8 00 00 00 00 call stbi__get32le + 000b4 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 000b7 89 41 04 mov DWORD PTR [rcx+4], eax + 000bb 89 41 04 mov DWORD PTR [rcx+4], eax ; 4977 : info->hsz = hsz = stbi__get32le(s); - 000ba 48 8b 8d 40 01 + 000be 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000c1 e8 00 00 00 00 call stbi__get32le - 000c6 89 45 04 mov DWORD PTR hsz$[rbp], eax - 000c9 48 8b 85 48 01 + 000c5 e8 00 00 00 00 call stbi__get32le + 000ca 89 45 04 mov DWORD PTR hsz$[rbp], eax + 000cd 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 000d0 8b 4d 04 mov ecx, DWORD PTR hsz$[rbp] - 000d3 89 48 08 mov DWORD PTR [rax+8], ecx + 000d4 8b 4d 04 mov ecx, DWORD PTR hsz$[rbp] + 000d7 89 48 08 mov DWORD PTR [rax+8], ecx ; 4978 : info->mr = info->mg = info->mb = info->ma = 0; - 000d6 48 8b 85 48 01 + 000da 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 000dd c7 40 18 00 00 + 000e1 c7 40 18 00 00 00 00 mov DWORD PTR [rax+24], 0 - 000e4 48 8b 85 48 01 + 000e8 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 000eb c7 40 14 00 00 + 000ef c7 40 14 00 00 00 00 mov DWORD PTR [rax+20], 0 - 000f2 48 8b 85 48 01 + 000f6 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 000f9 c7 40 10 00 00 + 000fd c7 40 10 00 00 00 00 mov DWORD PTR [rax+16], 0 - 00100 48 8b 85 48 01 + 00104 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 00107 c7 40 0c 00 00 + 0010b c7 40 0c 00 00 00 00 mov DWORD PTR [rax+12], 0 ; 4979 : info->extra_read = 14; - 0010e 48 8b 85 48 01 + 00112 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 00115 c7 40 20 0e 00 + 00119 c7 40 20 0e 00 00 00 mov DWORD PTR [rax+32], 14 ; 4980 : ; 4981 : if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); - 0011c 48 8b 85 48 01 + 00120 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 00123 83 78 04 00 cmp DWORD PTR [rax+4], 0 - 00127 7d 34 jge SHORT $LN7@stbi__bmp_ - 00129 48 8d 0d 00 00 + 00127 83 78 04 00 cmp DWORD PTR [rax+4], 0 + 0012b 7d 34 jge SHORT $LN7@stbi__bmp_ + 0012d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07IEJCHBDI@bad?5BMP@ - 00130 e8 00 00 00 00 call stbi__err - 00135 85 c0 test eax, eax - 00137 74 0d je SHORT $LN34@stbi__bmp_ - 00139 48 c7 85 18 01 + 00134 e8 00 00 00 00 call stbi__err + 00139 85 c0 test eax, eax + 0013b 74 0d je SHORT $LN34@stbi__bmp_ + 0013d 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv95[rbp], 0 - 00144 eb 0b jmp SHORT $LN35@stbi__bmp_ + 00148 eb 0b jmp SHORT $LN35@stbi__bmp_ $LN34@stbi__bmp_: - 00146 48 c7 85 18 01 + 0014a 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv95[rbp], 0 $LN35@stbi__bmp_: - 00151 48 8b 85 18 01 + 00155 48 8b 85 18 01 00 00 mov rax, QWORD PTR tv95[rbp] - 00158 e9 be 04 00 00 jmp $LN1@stbi__bmp_ + 0015c e9 cf 04 00 00 jmp $LN1@stbi__bmp_ $LN7@stbi__bmp_: ; 4982 : ; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); - 0015d 83 7d 04 0c cmp DWORD PTR hsz$[rbp], 12 - 00161 74 4c je SHORT $LN8@stbi__bmp_ - 00163 83 7d 04 28 cmp DWORD PTR hsz$[rbp], 40 ; 00000028H - 00167 74 46 je SHORT $LN8@stbi__bmp_ - 00169 83 7d 04 38 cmp DWORD PTR hsz$[rbp], 56 ; 00000038H - 0016d 74 40 je SHORT $LN8@stbi__bmp_ - 0016f 83 7d 04 6c cmp DWORD PTR hsz$[rbp], 108 ; 0000006cH - 00173 74 3a je SHORT $LN8@stbi__bmp_ - 00175 83 7d 04 7c cmp DWORD PTR hsz$[rbp], 124 ; 0000007cH - 00179 74 34 je SHORT $LN8@stbi__bmp_ - 0017b 48 8d 0d 00 00 + 00161 83 7d 04 0c cmp DWORD PTR hsz$[rbp], 12 + 00165 74 4c je SHORT $LN8@stbi__bmp_ + 00167 83 7d 04 28 cmp DWORD PTR hsz$[rbp], 40 ; 00000028H + 0016b 74 46 je SHORT $LN8@stbi__bmp_ + 0016d 83 7d 04 38 cmp DWORD PTR hsz$[rbp], 56 ; 00000038H + 00171 74 40 je SHORT $LN8@stbi__bmp_ + 00173 83 7d 04 6c cmp DWORD PTR hsz$[rbp], 108 ; 0000006cH + 00177 74 3a je SHORT $LN8@stbi__bmp_ + 00179 83 7d 04 7c cmp DWORD PTR hsz$[rbp], 124 ; 0000007cH + 0017d 74 34 je SHORT $LN8@stbi__bmp_ + 0017f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@KHBIBJBG@unknown?5BMP@ - 00182 e8 00 00 00 00 call stbi__err - 00187 85 c0 test eax, eax - 00189 74 0d je SHORT $LN36@stbi__bmp_ - 0018b 48 c7 85 18 01 + 00186 e8 00 00 00 00 call stbi__err + 0018b 85 c0 test eax, eax + 0018d 74 0d je SHORT $LN36@stbi__bmp_ + 0018f 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv136[rbp], 0 - 00196 eb 0b jmp SHORT $LN37@stbi__bmp_ + 0019a eb 0b jmp SHORT $LN37@stbi__bmp_ $LN36@stbi__bmp_: - 00198 48 c7 85 18 01 + 0019c 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv136[rbp], 0 $LN37@stbi__bmp_: - 001a3 48 8b 85 18 01 + 001a7 48 8b 85 18 01 00 00 mov rax, QWORD PTR tv136[rbp] - 001aa e9 6c 04 00 00 jmp $LN1@stbi__bmp_ + 001ae e9 7d 04 00 00 jmp $LN1@stbi__bmp_ $LN8@stbi__bmp_: ; 4984 : if (hsz == 12) { - 001af 83 7d 04 0c cmp DWORD PTR hsz$[rbp], 12 - 001b3 75 2d jne SHORT $LN9@stbi__bmp_ + 001b3 83 7d 04 0c cmp DWORD PTR hsz$[rbp], 12 + 001b7 75 2d jne SHORT $LN9@stbi__bmp_ ; 4985 : s->img_x = stbi__get16le(s); - 001b5 48 8b 8d 40 01 + 001b9 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001bc e8 00 00 00 00 call stbi__get16le - 001c1 48 8b 8d 40 01 + 001c0 e8 00 00 00 00 call stbi__get16le + 001c5 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001c8 89 01 mov DWORD PTR [rcx], eax + 001cc 89 01 mov DWORD PTR [rcx], eax ; 4986 : s->img_y = stbi__get16le(s); - 001ca 48 8b 8d 40 01 + 001ce 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001d1 e8 00 00 00 00 call stbi__get16le - 001d6 48 8b 8d 40 01 + 001d5 e8 00 00 00 00 call stbi__get16le + 001da 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001dd 89 41 04 mov DWORD PTR [rcx+4], eax + 001e1 89 41 04 mov DWORD PTR [rcx+4], eax ; 4987 : } - 001e0 eb 2b jmp SHORT $LN10@stbi__bmp_ + 001e4 eb 2b jmp SHORT $LN10@stbi__bmp_ $LN9@stbi__bmp_: ; 4988 : else { ; 4989 : s->img_x = stbi__get32le(s); - 001e2 48 8b 8d 40 01 + 001e6 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001e9 e8 00 00 00 00 call stbi__get32le - 001ee 48 8b 8d 40 01 + 001ed e8 00 00 00 00 call stbi__get32le + 001f2 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001f5 89 01 mov DWORD PTR [rcx], eax + 001f9 89 01 mov DWORD PTR [rcx], eax ; 4990 : s->img_y = stbi__get32le(s); - 001f7 48 8b 8d 40 01 + 001fb 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001fe e8 00 00 00 00 call stbi__get32le - 00203 48 8b 8d 40 01 + 00202 e8 00 00 00 00 call stbi__get32le + 00207 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0020a 89 41 04 mov DWORD PTR [rcx+4], eax + 0020e 89 41 04 mov DWORD PTR [rcx+4], eax $LN10@stbi__bmp_: ; 4991 : } ; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); - 0020d 48 8b 8d 40 01 + 00211 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00214 e8 00 00 00 00 call stbi__get16le - 00219 83 f8 01 cmp eax, 1 - 0021c 74 34 je SHORT $LN11@stbi__bmp_ - 0021e 48 8d 0d 00 00 + 00218 e8 00 00 00 00 call stbi__get16le + 0021d 83 f8 01 cmp eax, 1 + 00220 74 34 je SHORT $LN11@stbi__bmp_ + 00222 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07IEJCHBDI@bad?5BMP@ - 00225 e8 00 00 00 00 call stbi__err - 0022a 85 c0 test eax, eax - 0022c 74 0d je SHORT $LN38@stbi__bmp_ - 0022e 48 c7 85 18 01 + 00229 e8 00 00 00 00 call stbi__err + 0022e 85 c0 test eax, eax + 00230 74 0d je SHORT $LN38@stbi__bmp_ + 00232 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv156[rbp], 0 - 00239 eb 0b jmp SHORT $LN39@stbi__bmp_ + 0023d eb 0b jmp SHORT $LN39@stbi__bmp_ $LN38@stbi__bmp_: - 0023b 48 c7 85 18 01 + 0023f 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv156[rbp], 0 $LN39@stbi__bmp_: - 00246 48 8b 85 18 01 + 0024a 48 8b 85 18 01 00 00 mov rax, QWORD PTR tv156[rbp] - 0024d e9 c9 03 00 00 jmp $LN1@stbi__bmp_ + 00251 e9 da 03 00 00 jmp $LN1@stbi__bmp_ $LN11@stbi__bmp_: ; 4993 : info->bpp = stbi__get16le(s); - 00252 48 8b 8d 40 01 + 00256 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00259 e8 00 00 00 00 call stbi__get16le - 0025e 48 8b 8d 48 01 + 0025d e8 00 00 00 00 call stbi__get16le + 00262 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 00265 89 01 mov DWORD PTR [rcx], eax + 00269 89 01 mov DWORD PTR [rcx], eax ; 4994 : if (hsz != 12) { - 00267 83 7d 04 0c cmp DWORD PTR hsz$[rbp], 12 - 0026b 0f 84 a5 03 00 + 0026b 83 7d 04 0c cmp DWORD PTR hsz$[rbp], 12 + 0026f 0f 84 b6 03 00 00 je $LN12@stbi__bmp_ ; 4995 : int compress = stbi__get32le(s); - 00271 48 8b 8d 40 01 + 00275 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00278 e8 00 00 00 00 call stbi__get32le - 0027d 89 45 24 mov DWORD PTR compress$1[rbp], eax + 0027c e8 00 00 00 00 call stbi__get32le + 00281 89 45 24 mov DWORD PTR compress$1[rbp], eax ; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); - 00280 83 7d 24 01 cmp DWORD PTR compress$1[rbp], 1 - 00284 74 06 je SHORT $LN14@stbi__bmp_ - 00286 83 7d 24 02 cmp DWORD PTR compress$1[rbp], 2 - 0028a 75 34 jne SHORT $LN13@stbi__bmp_ + 00284 83 7d 24 01 cmp DWORD PTR compress$1[rbp], 1 + 00288 74 06 je SHORT $LN14@stbi__bmp_ + 0028a 83 7d 24 02 cmp DWORD PTR compress$1[rbp], 2 + 0028e 75 34 jne SHORT $LN13@stbi__bmp_ $LN14@stbi__bmp_: - 0028c 48 8d 0d 00 00 + 00290 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07IMHMNOIB@BMP?5RLE@ - 00293 e8 00 00 00 00 call stbi__err - 00298 85 c0 test eax, eax - 0029a 74 0d je SHORT $LN40@stbi__bmp_ - 0029c 48 c7 85 18 01 + 00297 e8 00 00 00 00 call stbi__err + 0029c 85 c0 test eax, eax + 0029e 74 0d je SHORT $LN40@stbi__bmp_ + 002a0 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv168[rbp], 0 - 002a7 eb 0b jmp SHORT $LN41@stbi__bmp_ + 002ab eb 0b jmp SHORT $LN41@stbi__bmp_ $LN40@stbi__bmp_: - 002a9 48 c7 85 18 01 + 002ad 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv168[rbp], 0 $LN41@stbi__bmp_: - 002b4 48 8b 85 18 01 + 002b8 48 8b 85 18 01 00 00 mov rax, QWORD PTR tv168[rbp] - 002bb e9 5b 03 00 00 jmp $LN1@stbi__bmp_ + 002bf e9 6c 03 00 00 jmp $LN1@stbi__bmp_ $LN13@stbi__bmp_: ; 4997 : if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes - 002c0 83 7d 24 04 cmp DWORD PTR compress$1[rbp], 4 - 002c4 7c 34 jl SHORT $LN15@stbi__bmp_ - 002c6 48 8d 0d 00 00 + 002c4 83 7d 24 04 cmp DWORD PTR compress$1[rbp], 4 + 002c8 7c 34 jl SHORT $LN15@stbi__bmp_ + 002ca 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0N@ODCBCBFN@BMP?5JPEG?1PNG@ - 002cd e8 00 00 00 00 call stbi__err - 002d2 85 c0 test eax, eax - 002d4 74 0d je SHORT $LN42@stbi__bmp_ - 002d6 48 c7 85 18 01 + 002d1 e8 00 00 00 00 call stbi__err + 002d6 85 c0 test eax, eax + 002d8 74 0d je SHORT $LN42@stbi__bmp_ + 002da 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv173[rbp], 0 - 002e1 eb 0b jmp SHORT $LN43@stbi__bmp_ + 002e5 eb 0b jmp SHORT $LN43@stbi__bmp_ $LN42@stbi__bmp_: - 002e3 48 c7 85 18 01 + 002e7 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv173[rbp], 0 $LN43@stbi__bmp_: - 002ee 48 8b 85 18 01 + 002f2 48 8b 85 18 01 00 00 mov rax, QWORD PTR tv173[rbp] - 002f5 e9 21 03 00 00 jmp $LN1@stbi__bmp_ + 002f9 e9 32 03 00 00 jmp $LN1@stbi__bmp_ $LN15@stbi__bmp_: ; 4998 : if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel - 002fa 83 7d 24 03 cmp DWORD PTR compress$1[rbp], 3 - 002fe 75 4c jne SHORT $LN16@stbi__bmp_ - 00300 48 8b 85 48 01 + 002fe 83 7d 24 03 cmp DWORD PTR compress$1[rbp], 3 + 00302 75 4c jne SHORT $LN16@stbi__bmp_ + 00304 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 00307 83 38 10 cmp DWORD PTR [rax], 16 - 0030a 74 40 je SHORT $LN16@stbi__bmp_ - 0030c 48 8b 85 48 01 + 0030b 83 38 10 cmp DWORD PTR [rax], 16 + 0030e 74 40 je SHORT $LN16@stbi__bmp_ + 00310 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 00313 83 38 20 cmp DWORD PTR [rax], 32 ; 00000020H - 00316 74 34 je SHORT $LN16@stbi__bmp_ - 00318 48 8d 0d 00 00 + 00317 83 38 20 cmp DWORD PTR [rax], 32 ; 00000020H + 0031a 74 34 je SHORT $LN16@stbi__bmp_ + 0031c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07IEJCHBDI@bad?5BMP@ - 0031f e8 00 00 00 00 call stbi__err - 00324 85 c0 test eax, eax - 00326 74 0d je SHORT $LN44@stbi__bmp_ - 00328 48 c7 85 18 01 + 00323 e8 00 00 00 00 call stbi__err + 00328 85 c0 test eax, eax + 0032a 74 0d je SHORT $LN44@stbi__bmp_ + 0032c 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv182[rbp], 0 - 00333 eb 0b jmp SHORT $LN45@stbi__bmp_ + 00337 eb 0b jmp SHORT $LN45@stbi__bmp_ $LN44@stbi__bmp_: - 00335 48 c7 85 18 01 + 00339 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv182[rbp], 0 $LN45@stbi__bmp_: - 00340 48 8b 85 18 01 + 00344 48 8b 85 18 01 00 00 mov rax, QWORD PTR tv182[rbp] - 00347 e9 cf 02 00 00 jmp $LN1@stbi__bmp_ + 0034b e9 e0 02 00 00 jmp $LN1@stbi__bmp_ $LN16@stbi__bmp_: ; 4999 : stbi__get32le(s); // discard sizeof - 0034c 48 8b 8d 40 01 + 00350 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00353 e8 00 00 00 00 call stbi__get32le + 00357 e8 00 00 00 00 call stbi__get32le + 0035c 90 npad 1 ; 5000 : stbi__get32le(s); // discard hres - 00358 48 8b 8d 40 01 + 0035d 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0035f e8 00 00 00 00 call stbi__get32le + 00364 e8 00 00 00 00 call stbi__get32le + 00369 90 npad 1 ; 5001 : stbi__get32le(s); // discard vres - 00364 48 8b 8d 40 01 + 0036a 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0036b e8 00 00 00 00 call stbi__get32le + 00371 e8 00 00 00 00 call stbi__get32le + 00376 90 npad 1 ; 5002 : stbi__get32le(s); // discard colorsused - 00370 48 8b 8d 40 01 + 00377 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00377 e8 00 00 00 00 call stbi__get32le + 0037e e8 00 00 00 00 call stbi__get32le + 00383 90 npad 1 ; 5003 : stbi__get32le(s); // discard max important - 0037c 48 8b 8d 40 01 + 00384 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00383 e8 00 00 00 00 call stbi__get32le + 0038b e8 00 00 00 00 call stbi__get32le + 00390 90 npad 1 ; 5004 : if (hsz == 40 || hsz == 56) { - 00388 83 7d 04 28 cmp DWORD PTR hsz$[rbp], 40 ; 00000028H - 0038c 74 0a je SHORT $LN19@stbi__bmp_ - 0038e 83 7d 04 38 cmp DWORD PTR hsz$[rbp], 56 ; 00000038H - 00392 0f 85 6a 01 00 + 00391 83 7d 04 28 cmp DWORD PTR hsz$[rbp], 40 ; 00000028H + 00395 74 0a je SHORT $LN19@stbi__bmp_ + 00397 83 7d 04 38 cmp DWORD PTR hsz$[rbp], 56 ; 00000038H + 0039b 0f 85 6f 01 00 00 jne $LN17@stbi__bmp_ $LN19@stbi__bmp_: ; 5005 : if (hsz == 56) { - 00398 83 7d 04 38 cmp DWORD PTR hsz$[rbp], 56 ; 00000038H - 0039c 75 30 jne SHORT $LN20@stbi__bmp_ + 003a1 83 7d 04 38 cmp DWORD PTR hsz$[rbp], 56 ; 00000038H + 003a5 75 34 jne SHORT $LN20@stbi__bmp_ ; 5006 : stbi__get32le(s); - 0039e 48 8b 8d 40 01 + 003a7 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 003a5 e8 00 00 00 00 call stbi__get32le + 003ae e8 00 00 00 00 call stbi__get32le + 003b3 90 npad 1 ; 5007 : stbi__get32le(s); - 003aa 48 8b 8d 40 01 + 003b4 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 003b1 e8 00 00 00 00 call stbi__get32le + 003bb e8 00 00 00 00 call stbi__get32le + 003c0 90 npad 1 ; 5008 : stbi__get32le(s); - 003b6 48 8b 8d 40 01 + 003c1 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 003bd e8 00 00 00 00 call stbi__get32le + 003c8 e8 00 00 00 00 call stbi__get32le + 003cd 90 npad 1 ; 5009 : stbi__get32le(s); - 003c2 48 8b 8d 40 01 + 003ce 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 003c9 e8 00 00 00 00 call stbi__get32le + 003d5 e8 00 00 00 00 call stbi__get32le + 003da 90 npad 1 $LN20@stbi__bmp_: ; 5010 : } ; 5011 : if (info->bpp == 16 || info->bpp == 32) { - 003ce 48 8b 85 48 01 + 003db 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 003d5 83 38 10 cmp DWORD PTR [rax], 16 - 003d8 74 10 je SHORT $LN22@stbi__bmp_ - 003da 48 8b 85 48 01 + 003e2 83 38 10 cmp DWORD PTR [rax], 16 + 003e5 74 10 je SHORT $LN22@stbi__bmp_ + 003e7 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 003e1 83 38 20 cmp DWORD PTR [rax], 32 ; 00000020H - 003e4 0f 85 13 01 00 + 003ee 83 38 20 cmp DWORD PTR [rax], 32 ; 00000020H + 003f1 0f 85 14 01 00 00 jne $LN21@stbi__bmp_ $LN22@stbi__bmp_: ; 5012 : if (compress == 0) { - 003ea 83 7d 24 00 cmp DWORD PTR compress$1[rbp], 0 - 003ee 75 14 jne SHORT $LN23@stbi__bmp_ + 003f7 83 7d 24 00 cmp DWORD PTR compress$1[rbp], 0 + 003fb 75 15 jne SHORT $LN23@stbi__bmp_ ; 5013 : stbi__bmp_set_mask_defaults(info, compress); - 003f0 8b 55 24 mov edx, DWORD PTR compress$1[rbp] - 003f3 48 8b 8d 48 01 + 003fd 8b 55 24 mov edx, DWORD PTR compress$1[rbp] + 00400 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 003fa e8 00 00 00 00 call stbi__bmp_set_mask_defaults + 00407 e8 00 00 00 00 call stbi__bmp_set_mask_defaults + 0040c 90 npad 1 ; 5014 : } - 003ff e9 f9 00 00 00 jmp $LN24@stbi__bmp_ + 0040d e9 f9 00 00 00 jmp $LN24@stbi__bmp_ $LN23@stbi__bmp_: ; 5015 : else if (compress == 3) { - 00404 83 7d 24 03 cmp DWORD PTR compress$1[rbp], 3 - 00408 0f 85 bb 00 00 + 00412 83 7d 24 03 cmp DWORD PTR compress$1[rbp], 3 + 00416 0f 85 bb 00 00 00 jne $LN25@stbi__bmp_ ; 5016 : info->mr = stbi__get32le(s); - 0040e 48 8b 8d 40 01 + 0041c 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00415 e8 00 00 00 00 call stbi__get32le - 0041a 48 8b 8d 48 01 + 00423 e8 00 00 00 00 call stbi__get32le + 00428 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 00421 89 41 0c mov DWORD PTR [rcx+12], eax + 0042f 89 41 0c mov DWORD PTR [rcx+12], eax ; 5017 : info->mg = stbi__get32le(s); - 00424 48 8b 8d 40 01 + 00432 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0042b e8 00 00 00 00 call stbi__get32le - 00430 48 8b 8d 48 01 + 00439 e8 00 00 00 00 call stbi__get32le + 0043e 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 00437 89 41 10 mov DWORD PTR [rcx+16], eax + 00445 89 41 10 mov DWORD PTR [rcx+16], eax ; 5018 : info->mb = stbi__get32le(s); - 0043a 48 8b 8d 40 01 + 00448 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00441 e8 00 00 00 00 call stbi__get32le - 00446 48 8b 8d 48 01 + 0044f e8 00 00 00 00 call stbi__get32le + 00454 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 0044d 89 41 14 mov DWORD PTR [rcx+20], eax + 0045b 89 41 14 mov DWORD PTR [rcx+20], eax ; 5019 : info->extra_read += 12; - 00450 48 8b 85 48 01 + 0045e 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 00457 8b 40 20 mov eax, DWORD PTR [rax+32] - 0045a 83 c0 0c add eax, 12 - 0045d 48 8b 8d 48 01 + 00465 8b 40 20 mov eax, DWORD PTR [rax+32] + 00468 83 c0 0c add eax, 12 + 0046b 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 00464 89 41 20 mov DWORD PTR [rcx+32], eax + 00472 89 41 20 mov DWORD PTR [rcx+32], eax ; 5020 : // not documented, but generated by photoshop and handled by mspaint ; 5021 : if (info->mr == info->mg && info->mg == info->mb) { - 00467 48 8b 85 48 01 + 00475 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 0046e 48 8b 8d 48 01 + 0047c 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 00475 8b 49 10 mov ecx, DWORD PTR [rcx+16] - 00478 39 48 0c cmp DWORD PTR [rax+12], ecx - 0047b 75 4a jne SHORT $LN27@stbi__bmp_ - 0047d 48 8b 85 48 01 + 00483 8b 49 10 mov ecx, DWORD PTR [rcx+16] + 00486 39 48 0c cmp DWORD PTR [rax+12], ecx + 00489 75 4a jne SHORT $LN27@stbi__bmp_ + 0048b 48 8b 85 48 01 00 00 mov rax, QWORD PTR info$[rbp] - 00484 48 8b 8d 48 01 + 00492 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 0048b 8b 49 14 mov ecx, DWORD PTR [rcx+20] - 0048e 39 48 10 cmp DWORD PTR [rax+16], ecx - 00491 75 34 jne SHORT $LN27@stbi__bmp_ + 00499 8b 49 14 mov ecx, DWORD PTR [rcx+20] + 0049c 39 48 10 cmp DWORD PTR [rax+16], ecx + 0049f 75 34 jne SHORT $LN27@stbi__bmp_ ; 5022 : // ?!?!? ; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); - 00493 48 8d 0d 00 00 + 004a1 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07IEJCHBDI@bad?5BMP@ - 0049a e8 00 00 00 00 call stbi__err - 0049f 85 c0 test eax, eax - 004a1 74 0d je SHORT $LN46@stbi__bmp_ - 004a3 48 c7 85 18 01 + 004a8 e8 00 00 00 00 call stbi__err + 004ad 85 c0 test eax, eax + 004af 74 0d je SHORT $LN46@stbi__bmp_ + 004b1 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv224[rbp], 0 - 004ae eb 0b jmp SHORT $LN47@stbi__bmp_ + 004bc eb 0b jmp SHORT $LN47@stbi__bmp_ $LN46@stbi__bmp_: - 004b0 48 c7 85 18 01 + 004be 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv224[rbp], 0 $LN47@stbi__bmp_: - 004bb 48 8b 85 18 01 + 004c9 48 8b 85 18 01 00 00 mov rax, QWORD PTR tv224[rbp] - 004c2 e9 54 01 00 00 jmp $LN1@stbi__bmp_ + 004d0 e9 5b 01 00 00 jmp $LN1@stbi__bmp_ $LN27@stbi__bmp_: ; 5024 : } ; 5025 : } - 004c7 eb 34 jmp SHORT $LN26@stbi__bmp_ + 004d5 eb 34 jmp SHORT $LN26@stbi__bmp_ $LN25@stbi__bmp_: ; 5026 : else ; 5027 : return stbi__errpuc("bad BMP", "bad BMP"); - 004c9 48 8d 0d 00 00 + 004d7 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07IEJCHBDI@bad?5BMP@ - 004d0 e8 00 00 00 00 call stbi__err - 004d5 85 c0 test eax, eax - 004d7 74 0d je SHORT $LN48@stbi__bmp_ - 004d9 48 c7 85 18 01 + 004de e8 00 00 00 00 call stbi__err + 004e3 85 c0 test eax, eax + 004e5 74 0d je SHORT $LN48@stbi__bmp_ + 004e7 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv228[rbp], 0 - 004e4 eb 0b jmp SHORT $LN49@stbi__bmp_ + 004f2 eb 0b jmp SHORT $LN49@stbi__bmp_ $LN48@stbi__bmp_: - 004e6 48 c7 85 18 01 + 004f4 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv228[rbp], 0 $LN49@stbi__bmp_: - 004f1 48 8b 85 18 01 + 004ff 48 8b 85 18 01 00 00 mov rax, QWORD PTR tv228[rbp] - 004f8 e9 1e 01 00 00 jmp $LN1@stbi__bmp_ + 00506 e9 25 01 00 00 jmp $LN1@stbi__bmp_ $LN26@stbi__bmp_: $LN24@stbi__bmp_: $LN21@stbi__bmp_: @@ -12231,7 +12300,7 @@ $LN21@stbi__bmp_: ; 5028 : } ; 5029 : } - 004fd e9 14 01 00 00 jmp $LN18@stbi__bmp_ + 0050b e9 1b 01 00 00 jmp $LN18@stbi__bmp_ $LN17@stbi__bmp_: ; 5030 : else { @@ -12239,136 +12308,143 @@ $LN17@stbi__bmp_: ; 5032 : int i; ; 5033 : if (hsz != 108 && hsz != 124) - 00502 83 7d 04 6c cmp DWORD PTR hsz$[rbp], 108 ; 0000006cH - 00506 74 3a je SHORT $LN28@stbi__bmp_ - 00508 83 7d 04 7c cmp DWORD PTR hsz$[rbp], 124 ; 0000007cH - 0050c 74 34 je SHORT $LN28@stbi__bmp_ + 00510 83 7d 04 6c cmp DWORD PTR hsz$[rbp], 108 ; 0000006cH + 00514 74 3a je SHORT $LN28@stbi__bmp_ + 00516 83 7d 04 7c cmp DWORD PTR hsz$[rbp], 124 ; 0000007cH + 0051a 74 34 je SHORT $LN28@stbi__bmp_ ; 5034 : return stbi__errpuc("bad BMP", "bad BMP"); - 0050e 48 8d 0d 00 00 + 0051c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07IEJCHBDI@bad?5BMP@ - 00515 e8 00 00 00 00 call stbi__err - 0051a 85 c0 test eax, eax - 0051c 74 0d je SHORT $LN50@stbi__bmp_ - 0051e 48 c7 85 18 01 + 00523 e8 00 00 00 00 call stbi__err + 00528 85 c0 test eax, eax + 0052a 74 0d je SHORT $LN50@stbi__bmp_ + 0052c 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv234[rbp], 0 - 00529 eb 0b jmp SHORT $LN51@stbi__bmp_ + 00537 eb 0b jmp SHORT $LN51@stbi__bmp_ $LN50@stbi__bmp_: - 0052b 48 c7 85 18 01 + 00539 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv234[rbp], 0 $LN51@stbi__bmp_: - 00536 48 8b 85 18 01 + 00544 48 8b 85 18 01 00 00 mov rax, QWORD PTR tv234[rbp] - 0053d e9 d9 00 00 00 jmp $LN1@stbi__bmp_ + 0054b e9 e0 00 00 00 jmp $LN1@stbi__bmp_ $LN28@stbi__bmp_: ; 5035 : info->mr = stbi__get32le(s); - 00542 48 8b 8d 40 01 + 00550 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00549 e8 00 00 00 00 call stbi__get32le - 0054e 48 8b 8d 48 01 + 00557 e8 00 00 00 00 call stbi__get32le + 0055c 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 00555 89 41 0c mov DWORD PTR [rcx+12], eax + 00563 89 41 0c mov DWORD PTR [rcx+12], eax ; 5036 : info->mg = stbi__get32le(s); - 00558 48 8b 8d 40 01 + 00566 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0055f e8 00 00 00 00 call stbi__get32le - 00564 48 8b 8d 48 01 + 0056d e8 00 00 00 00 call stbi__get32le + 00572 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 0056b 89 41 10 mov DWORD PTR [rcx+16], eax + 00579 89 41 10 mov DWORD PTR [rcx+16], eax ; 5037 : info->mb = stbi__get32le(s); - 0056e 48 8b 8d 40 01 + 0057c 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00575 e8 00 00 00 00 call stbi__get32le - 0057a 48 8b 8d 48 01 + 00583 e8 00 00 00 00 call stbi__get32le + 00588 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 00581 89 41 14 mov DWORD PTR [rcx+20], eax + 0058f 89 41 14 mov DWORD PTR [rcx+20], eax ; 5038 : info->ma = stbi__get32le(s); - 00584 48 8b 8d 40 01 + 00592 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0058b e8 00 00 00 00 call stbi__get32le - 00590 48 8b 8d 48 01 + 00599 e8 00 00 00 00 call stbi__get32le + 0059e 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 00597 89 41 18 mov DWORD PTR [rcx+24], eax + 005a5 89 41 18 mov DWORD PTR [rcx+24], eax ; 5039 : if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs - 0059a 83 7d 24 03 cmp DWORD PTR compress$1[rbp], 3 - 0059e 74 0f je SHORT $LN29@stbi__bmp_ + 005a8 83 7d 24 03 cmp DWORD PTR compress$1[rbp], 3 + 005ac 74 10 je SHORT $LN29@stbi__bmp_ ; 5040 : stbi__bmp_set_mask_defaults(info, compress); - 005a0 8b 55 24 mov edx, DWORD PTR compress$1[rbp] - 005a3 48 8b 8d 48 01 + 005ae 8b 55 24 mov edx, DWORD PTR compress$1[rbp] + 005b1 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR info$[rbp] - 005aa e8 00 00 00 00 call stbi__bmp_set_mask_defaults + 005b8 e8 00 00 00 00 call stbi__bmp_set_mask_defaults + 005bd 90 npad 1 $LN29@stbi__bmp_: ; 5041 : stbi__get32le(s); // discard color space - 005af 48 8b 8d 40 01 + 005be 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 005b6 e8 00 00 00 00 call stbi__get32le + 005c5 e8 00 00 00 00 call stbi__get32le + 005ca 90 npad 1 ; 5042 : for (i = 0; i < 12; ++i) - 005bb c7 45 44 00 00 + 005cb c7 45 44 00 00 00 00 mov DWORD PTR i$2[rbp], 0 - 005c2 eb 08 jmp SHORT $LN4@stbi__bmp_ + 005d2 eb 08 jmp SHORT $LN4@stbi__bmp_ $LN2@stbi__bmp_: - 005c4 8b 45 44 mov eax, DWORD PTR i$2[rbp] - 005c7 ff c0 inc eax - 005c9 89 45 44 mov DWORD PTR i$2[rbp], eax + 005d4 8b 45 44 mov eax, DWORD PTR i$2[rbp] + 005d7 ff c0 inc eax + 005d9 89 45 44 mov DWORD PTR i$2[rbp], eax $LN4@stbi__bmp_: - 005cc 83 7d 44 0c cmp DWORD PTR i$2[rbp], 12 - 005d0 7d 0e jge SHORT $LN3@stbi__bmp_ + 005dc 83 7d 44 0c cmp DWORD PTR i$2[rbp], 12 + 005e0 7d 0f jge SHORT $LN3@stbi__bmp_ ; 5043 : stbi__get32le(s); // discard color space parameters - 005d2 48 8b 8d 40 01 + 005e2 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 005d9 e8 00 00 00 00 call stbi__get32le - 005de eb e4 jmp SHORT $LN2@stbi__bmp_ + 005e9 e8 00 00 00 00 call stbi__get32le + 005ee 90 npad 1 + 005ef eb e3 jmp SHORT $LN2@stbi__bmp_ $LN3@stbi__bmp_: ; 5044 : if (hsz == 124) { - 005e0 83 7d 04 7c cmp DWORD PTR hsz$[rbp], 124 ; 0000007cH - 005e4 75 30 jne SHORT $LN30@stbi__bmp_ + 005f1 83 7d 04 7c cmp DWORD PTR hsz$[rbp], 124 ; 0000007cH + 005f5 75 34 jne SHORT $LN30@stbi__bmp_ ; 5045 : stbi__get32le(s); // discard rendering intent - 005e6 48 8b 8d 40 01 + 005f7 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 005ed e8 00 00 00 00 call stbi__get32le + 005fe e8 00 00 00 00 call stbi__get32le + 00603 90 npad 1 ; 5046 : stbi__get32le(s); // discard offset of profile data - 005f2 48 8b 8d 40 01 + 00604 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 005f9 e8 00 00 00 00 call stbi__get32le + 0060b e8 00 00 00 00 call stbi__get32le + 00610 90 npad 1 ; 5047 : stbi__get32le(s); // discard size of profile data - 005fe 48 8b 8d 40 01 + 00611 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00605 e8 00 00 00 00 call stbi__get32le + 00618 e8 00 00 00 00 call stbi__get32le + 0061d 90 npad 1 ; 5048 : stbi__get32le(s); // discard reserved - 0060a 48 8b 8d 40 01 + 0061e 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00611 e8 00 00 00 00 call stbi__get32le + 00625 e8 00 00 00 00 call stbi__get32le + 0062a 90 npad 1 $LN30@stbi__bmp_: $LN18@stbi__bmp_: $LN12@stbi__bmp_: @@ -12378,16 +12454,16 @@ $LN12@stbi__bmp_: ; 5051 : } ; 5052 : return (void*)1; - 00616 b8 01 00 00 00 mov eax, 1 + 0062b b8 01 00 00 00 mov eax, 1 $LN1@stbi__bmp_: ; 5053 : } - 0061b 48 8d a5 28 01 + 00630 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 00622 5f pop rdi - 00623 5d pop rbp - 00624 c3 ret 0 + 00637 5f pop rdi + 00638 5d pop rbp + 00639 c3 ret 0 stbi__bmp_parse_header ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -12410,127 +12486,128 @@ stbi__bmp_set_mask_defaults PROC ; COMDAT 00017 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001e e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00023 90 npad 1 ; 4943 : // BI_BITFIELDS specifies masks explicitly, don't override ; 4944 : if (compress == 3) - 00023 83 bd e8 00 00 + 00024 83 bd e8 00 00 00 03 cmp DWORD PTR compress$[rbp], 3 - 0002a 75 0a jne SHORT $LN2@stbi__bmp_ + 0002b 75 0a jne SHORT $LN2@stbi__bmp_ ; 4945 : return 1; - 0002c b8 01 00 00 00 mov eax, 1 - 00031 e9 dd 00 00 00 jmp $LN1@stbi__bmp_ + 0002d b8 01 00 00 00 mov eax, 1 + 00032 e9 dd 00 00 00 jmp $LN1@stbi__bmp_ $LN2@stbi__bmp_: ; 4946 : ; 4947 : if (compress == 0) { - 00036 83 bd e8 00 00 + 00037 83 bd e8 00 00 00 00 cmp DWORD PTR compress$[rbp], 0 - 0003d 0f 85 ce 00 00 + 0003e 0f 85 ce 00 00 00 jne $LN3@stbi__bmp_ ; 4948 : if (info->bpp == 16) { - 00043 48 8b 85 e0 00 + 00044 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 0004a 83 38 10 cmp DWORD PTR [rax], 16 - 0004d 75 2f jne SHORT $LN4@stbi__bmp_ + 0004b 83 38 10 cmp DWORD PTR [rax], 16 + 0004e 75 2f jne SHORT $LN4@stbi__bmp_ ; 4949 : info->mr = 31u << 10; - 0004f 48 8b 85 e0 00 + 00050 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 00056 c7 40 0c 00 7c + 00057 c7 40 0c 00 7c 00 00 mov DWORD PTR [rax+12], 31744 ; 00007c00H ; 4950 : info->mg = 31u << 5; - 0005d 48 8b 85 e0 00 + 0005e 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 00064 c7 40 10 e0 03 + 00065 c7 40 10 e0 03 00 00 mov DWORD PTR [rax+16], 992 ; 000003e0H ; 4951 : info->mb = 31u << 0; - 0006b 48 8b 85 e0 00 + 0006c 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 00072 c7 40 14 1f 00 + 00073 c7 40 14 1f 00 00 00 mov DWORD PTR [rax+20], 31 ; 4952 : } - 00079 e9 8c 00 00 00 jmp $LN5@stbi__bmp_ + 0007a e9 8c 00 00 00 jmp $LN5@stbi__bmp_ $LN4@stbi__bmp_: ; 4953 : else if (info->bpp == 32) { - 0007e 48 8b 85 e0 00 + 0007f 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 00085 83 38 20 cmp DWORD PTR [rax], 32 ; 00000020H - 00088 75 48 jne SHORT $LN6@stbi__bmp_ + 00086 83 38 20 cmp DWORD PTR [rax], 32 ; 00000020H + 00089 75 48 jne SHORT $LN6@stbi__bmp_ ; 4954 : info->mr = 0xffu << 16; - 0008a 48 8b 85 e0 00 + 0008b 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 00091 c7 40 0c 00 00 + 00092 c7 40 0c 00 00 ff 00 mov DWORD PTR [rax+12], 16711680 ; 00ff0000H ; 4955 : info->mg = 0xffu << 8; - 00098 48 8b 85 e0 00 + 00099 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 0009f c7 40 10 00 ff + 000a0 c7 40 10 00 ff 00 00 mov DWORD PTR [rax+16], 65280 ; 0000ff00H ; 4956 : info->mb = 0xffu << 0; - 000a6 48 8b 85 e0 00 + 000a7 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 000ad c7 40 14 ff 00 + 000ae c7 40 14 ff 00 00 00 mov DWORD PTR [rax+20], 255 ; 000000ffH ; 4957 : info->ma = 0xffu << 24; - 000b4 48 8b 85 e0 00 + 000b5 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 000bb c7 40 18 00 00 + 000bc c7 40 18 00 00 00 ff mov DWORD PTR [rax+24], -16777216 ; ff000000H ; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 - 000c2 48 8b 85 e0 00 + 000c3 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 000c9 c7 40 1c 00 00 + 000ca c7 40 1c 00 00 00 00 mov DWORD PTR [rax+28], 0 ; 4959 : } - 000d0 eb 38 jmp SHORT $LN7@stbi__bmp_ + 000d1 eb 38 jmp SHORT $LN7@stbi__bmp_ $LN6@stbi__bmp_: ; 4960 : else { ; 4961 : // otherwise, use defaults, which is all-0 ; 4962 : info->mr = info->mg = info->mb = info->ma = 0; - 000d2 48 8b 85 e0 00 + 000d3 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 000d9 c7 40 18 00 00 + 000da c7 40 18 00 00 00 00 mov DWORD PTR [rax+24], 0 - 000e0 48 8b 85 e0 00 + 000e1 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 000e7 c7 40 14 00 00 + 000e8 c7 40 14 00 00 00 00 mov DWORD PTR [rax+20], 0 - 000ee 48 8b 85 e0 00 + 000ef 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 000f5 c7 40 10 00 00 + 000f6 c7 40 10 00 00 00 00 mov DWORD PTR [rax+16], 0 - 000fc 48 8b 85 e0 00 + 000fd 48 8b 85 e0 00 00 00 mov rax, QWORD PTR info$[rbp] - 00103 c7 40 0c 00 00 + 00104 c7 40 0c 00 00 00 00 mov DWORD PTR [rax+12], 0 $LN7@stbi__bmp_: $LN5@stbi__bmp_: @@ -12538,23 +12615,23 @@ $LN5@stbi__bmp_: ; 4963 : } ; 4964 : return 1; - 0010a b8 01 00 00 00 mov eax, 1 - 0010f eb 02 jmp SHORT $LN1@stbi__bmp_ + 0010b b8 01 00 00 00 mov eax, 1 + 00110 eb 02 jmp SHORT $LN1@stbi__bmp_ $LN3@stbi__bmp_: ; 4965 : } ; 4966 : return 0; // error - 00111 33 c0 xor eax, eax + 00112 33 c0 xor eax, eax $LN1@stbi__bmp_: ; 4967 : } - 00113 48 8d a5 c8 00 + 00114 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0011a 5f pop rdi - 0011b 5d pop rbp - 0011c c3 ret 0 + 0011b 5f pop rdi + 0011c 5d pop rbp + 0011d c3 ret 0 stbi__bmp_set_mask_defaults ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -12579,6 +12656,7 @@ stbi__shiftsigned PROC ; COMDAT 0001b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00022 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00027 90 npad 1 ; 4916 : static unsigned int mul_table[9] = { ; 4917 : 0, @@ -12590,109 +12668,109 @@ stbi__shiftsigned PROC ; COMDAT ; 4923 : }; ; 4924 : if (shift < 0) - 00027 83 bd e8 00 00 + 00028 83 bd e8 00 00 00 00 cmp DWORD PTR shift$[rbp], 0 - 0002e 7d 1b jge SHORT $LN2@stbi__shif + 0002f 7d 1b jge SHORT $LN2@stbi__shif ; 4925 : v <<= -shift; - 00030 8b 85 e8 00 00 + 00031 8b 85 e8 00 00 00 mov eax, DWORD PTR shift$[rbp] - 00036 f7 d8 neg eax - 00038 0f b6 c8 movzx ecx, al - 0003b 8b 85 e0 00 00 + 00037 f7 d8 neg eax + 00039 0f b6 c8 movzx ecx, al + 0003c 8b 85 e0 00 00 00 mov eax, DWORD PTR v$[rbp] - 00041 d3 e0 shl eax, cl - 00043 89 85 e0 00 00 + 00042 d3 e0 shl eax, cl + 00044 89 85 e0 00 00 00 mov DWORD PTR v$[rbp], eax - 00049 eb 17 jmp SHORT $LN3@stbi__shif + 0004a eb 17 jmp SHORT $LN3@stbi__shif $LN2@stbi__shif: ; 4926 : else ; 4927 : v >>= shift; - 0004b 8b 85 e8 00 00 + 0004c 8b 85 e8 00 00 00 mov eax, DWORD PTR shift$[rbp] - 00051 0f b6 c8 movzx ecx, al - 00054 8b 85 e0 00 00 + 00052 0f b6 c8 movzx ecx, al + 00055 8b 85 e0 00 00 00 mov eax, DWORD PTR v$[rbp] - 0005a d3 e8 shr eax, cl - 0005c 89 85 e0 00 00 + 0005b d3 e8 shr eax, cl + 0005d 89 85 e0 00 00 00 mov DWORD PTR v$[rbp], eax $LN3@stbi__shif: ; 4928 : STBI_ASSERT(v < 256); - 00062 81 bd e0 00 00 + 00063 81 bd e0 00 00 00 00 01 00 00 cmp DWORD PTR v$[rbp], 256 ; 00000100H - 0006c 72 1c jb SHORT $LN5@stbi__shif - 0006e 41 b8 40 13 00 + 0006d 72 1c jb SHORT $LN5@stbi__shif + 0006f 41 b8 40 13 00 00 mov r8d, 4928 ; 00001340H - 00074 48 8d 15 00 00 + 00075 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 0007b 48 8d 0d 00 00 + 0007c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1BA@EKLGALLJ@?$AAv?$AA?5?$AA?$DM?$AA?5?$AA2?$AA5?$AA6@ - 00082 ff 15 00 00 00 + 00083 ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 00088 33 c0 xor eax, eax + 00089 33 c0 xor eax, eax $LN5@stbi__shif: ; 4929 : v >>= (8 - bits); - 0008a b8 08 00 00 00 mov eax, 8 - 0008f 2b 85 f0 00 00 + 0008b b8 08 00 00 00 mov eax, 8 + 00090 2b 85 f0 00 00 00 sub eax, DWORD PTR bits$[rbp] - 00095 0f b6 c8 movzx ecx, al - 00098 8b 85 e0 00 00 + 00096 0f b6 c8 movzx ecx, al + 00099 8b 85 e0 00 00 00 mov eax, DWORD PTR v$[rbp] - 0009e d3 e8 shr eax, cl - 000a0 89 85 e0 00 00 + 0009f d3 e8 shr eax, cl + 000a1 89 85 e0 00 00 00 mov DWORD PTR v$[rbp], eax ; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); - 000a6 83 bd f0 00 00 + 000a7 83 bd f0 00 00 00 00 cmp DWORD PTR bits$[rbp], 0 - 000ad 7c 09 jl SHORT $LN6@stbi__shif - 000af 83 bd f0 00 00 + 000ae 7c 09 jl SHORT $LN6@stbi__shif + 000b0 83 bd f0 00 00 00 08 cmp DWORD PTR bits$[rbp], 8 - 000b6 7e 1c jle SHORT $LN7@stbi__shif + 000b7 7e 1c jle SHORT $LN7@stbi__shif $LN6@stbi__shif: - 000b8 41 b8 42 13 00 + 000b9 41 b8 42 13 00 00 mov r8d, 4930 ; 00001342H - 000be 48 8d 15 00 00 + 000bf 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 000c5 48 8d 0d 00 00 + 000c6 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1CO@LIFEKNEP@?$AAb?$AAi?$AAt?$AAs?$AA?5?$AA?$DO?$AA?$DN?$AA?5?$AA0?$AA?5?$AA?$CG?$AA?$CG?$AA?5?$AAb?$AAi@ - 000cc ff 15 00 00 00 + 000cd ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 000d2 33 c0 xor eax, eax + 000d3 33 c0 xor eax, eax $LN7@stbi__shif: ; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; - 000d4 48 63 85 f0 00 + 000d5 48 63 85 f0 00 00 00 movsxd rax, DWORD PTR bits$[rbp] - 000db 48 8d 0d 00 00 + 000dc 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:?mul_table@?1??stbi__shiftsigned@@9@9 - 000e2 8b 95 e0 00 00 + 000e3 8b 95 e0 00 00 00 mov edx, DWORD PTR v$[rbp] - 000e8 0f af 14 81 imul edx, DWORD PTR [rcx+rax*4] - 000ec 8b c2 mov eax, edx - 000ee 48 63 8d f0 00 + 000e9 0f af 14 81 imul edx, DWORD PTR [rcx+rax*4] + 000ed 8b c2 mov eax, edx + 000ef 48 63 8d f0 00 00 00 movsxd rcx, DWORD PTR bits$[rbp] - 000f5 48 8d 15 00 00 + 000f6 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:?shift_table@?1??stbi__shiftsigned@@9@9 - 000fc 8b 0c 8a mov ecx, DWORD PTR [rdx+rcx*4] - 000ff d3 f8 sar eax, cl + 000fd 8b 0c 8a mov ecx, DWORD PTR [rdx+rcx*4] + 00100 d3 f8 sar eax, cl ; 4932 : } - 00101 48 8d a5 c8 00 + 00102 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00108 5f pop rdi - 00109 5d pop rbp - 0010a c3 ret 0 + 00109 5f pop rdi + 0010a 5d pop rbp + 0010b c3 ret 0 stbi__shiftsigned ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -12713,85 +12791,86 @@ stbi__bitcount PROC ; COMDAT 00012 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00019 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001e 90 npad 1 ; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - 0001e 8b 85 e0 00 00 + 0001f 8b 85 e0 00 00 00 mov eax, DWORD PTR a$[rbp] - 00024 25 55 55 55 55 and eax, 1431655765 ; 55555555H - 00029 8b 8d e0 00 00 + 00025 25 55 55 55 55 and eax, 1431655765 ; 55555555H + 0002a 8b 8d e0 00 00 00 mov ecx, DWORD PTR a$[rbp] - 0002f d1 e9 shr ecx, 1 - 00031 81 e1 55 55 55 + 00030 d1 e9 shr ecx, 1 + 00032 81 e1 55 55 55 55 and ecx, 1431655765 ; 55555555H - 00037 03 c1 add eax, ecx - 00039 89 85 e0 00 00 + 00038 03 c1 add eax, ecx + 0003a 89 85 e0 00 00 00 mov DWORD PTR a$[rbp], eax ; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 - 0003f 8b 85 e0 00 00 + 00040 8b 85 e0 00 00 00 mov eax, DWORD PTR a$[rbp] - 00045 25 33 33 33 33 and eax, 858993459 ; 33333333H - 0004a 8b 8d e0 00 00 + 00046 25 33 33 33 33 and eax, 858993459 ; 33333333H + 0004b 8b 8d e0 00 00 00 mov ecx, DWORD PTR a$[rbp] - 00050 c1 e9 02 shr ecx, 2 - 00053 81 e1 33 33 33 + 00051 c1 e9 02 shr ecx, 2 + 00054 81 e1 33 33 33 33 and ecx, 858993459 ; 33333333H - 00059 03 c1 add eax, ecx - 0005b 89 85 e0 00 00 + 0005a 03 c1 add eax, ecx + 0005c 89 85 e0 00 00 00 mov DWORD PTR a$[rbp], eax ; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits - 00061 8b 85 e0 00 00 + 00062 8b 85 e0 00 00 00 mov eax, DWORD PTR a$[rbp] - 00067 c1 e8 04 shr eax, 4 - 0006a 8b 8d e0 00 00 + 00068 c1 e8 04 shr eax, 4 + 0006b 8b 8d e0 00 00 00 mov ecx, DWORD PTR a$[rbp] - 00070 03 c8 add ecx, eax - 00072 8b c1 mov eax, ecx - 00074 25 0f 0f 0f 0f and eax, 252645135 ; 0f0f0f0fH - 00079 89 85 e0 00 00 + 00071 03 c8 add ecx, eax + 00073 8b c1 mov eax, ecx + 00075 25 0f 0f 0f 0f and eax, 252645135 ; 0f0f0f0fH + 0007a 89 85 e0 00 00 00 mov DWORD PTR a$[rbp], eax ; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits - 0007f 8b 85 e0 00 00 + 00080 8b 85 e0 00 00 00 mov eax, DWORD PTR a$[rbp] - 00085 c1 e8 08 shr eax, 8 - 00088 8b 8d e0 00 00 + 00086 c1 e8 08 shr eax, 8 + 00089 8b 8d e0 00 00 00 mov ecx, DWORD PTR a$[rbp] - 0008e 03 c8 add ecx, eax - 00090 8b c1 mov eax, ecx - 00092 89 85 e0 00 00 + 0008f 03 c8 add ecx, eax + 00091 8b c1 mov eax, ecx + 00093 89 85 e0 00 00 00 mov DWORD PTR a$[rbp], eax ; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits - 00098 8b 85 e0 00 00 + 00099 8b 85 e0 00 00 00 mov eax, DWORD PTR a$[rbp] - 0009e c1 e8 10 shr eax, 16 - 000a1 8b 8d e0 00 00 + 0009f c1 e8 10 shr eax, 16 + 000a2 8b 8d e0 00 00 00 mov ecx, DWORD PTR a$[rbp] - 000a7 03 c8 add ecx, eax - 000a9 8b c1 mov eax, ecx - 000ab 89 85 e0 00 00 + 000a8 03 c8 add ecx, eax + 000aa 8b c1 mov eax, ecx + 000ac 89 85 e0 00 00 00 mov DWORD PTR a$[rbp], eax ; 4908 : return a & 0xff; - 000b1 8b 85 e0 00 00 + 000b2 8b 85 e0 00 00 00 mov eax, DWORD PTR a$[rbp] - 000b7 25 ff 00 00 00 and eax, 255 ; 000000ffH + 000b8 25 ff 00 00 00 and eax, 255 ; 000000ffH ; 4909 : } - 000bc 48 8d a5 c8 00 + 000bd 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 000c3 5f pop rdi - 000c4 5d pop rbp - 000c5 c3 ret 0 + 000c4 5f pop rdi + 000c5 5d pop rbp + 000c6 c3 ret 0 stbi__bitcount ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -12813,103 +12892,104 @@ stbi__high_bit PROC ; COMDAT 00012 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00019 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001e 90 npad 1 ; 4891 : int n = 0; - 0001e c7 45 04 00 00 + 0001f c7 45 04 00 00 00 00 mov DWORD PTR n$[rbp], 0 ; 4892 : if (z == 0) return -1; - 00025 83 bd 00 01 00 + 00026 83 bd 00 01 00 00 00 cmp DWORD PTR z$[rbp], 0 - 0002c 75 0a jne SHORT $LN2@stbi__high - 0002e b8 ff ff ff ff mov eax, -1 - 00033 e9 9e 00 00 00 jmp $LN1@stbi__high + 0002d 75 0a jne SHORT $LN2@stbi__high + 0002f b8 ff ff ff ff mov eax, -1 + 00034 e9 9e 00 00 00 jmp $LN1@stbi__high $LN2@stbi__high: ; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } - 00038 81 bd 00 01 00 + 00039 81 bd 00 01 00 00 00 00 01 00 cmp DWORD PTR z$[rbp], 65536 ; 00010000H - 00042 72 18 jb SHORT $LN3@stbi__high - 00044 8b 45 04 mov eax, DWORD PTR n$[rbp] - 00047 83 c0 10 add eax, 16 - 0004a 89 45 04 mov DWORD PTR n$[rbp], eax - 0004d 8b 85 00 01 00 + 00043 72 18 jb SHORT $LN3@stbi__high + 00045 8b 45 04 mov eax, DWORD PTR n$[rbp] + 00048 83 c0 10 add eax, 16 + 0004b 89 45 04 mov DWORD PTR n$[rbp], eax + 0004e 8b 85 00 01 00 00 mov eax, DWORD PTR z$[rbp] - 00053 c1 e8 10 shr eax, 16 - 00056 89 85 00 01 00 + 00054 c1 e8 10 shr eax, 16 + 00057 89 85 00 01 00 00 mov DWORD PTR z$[rbp], eax $LN3@stbi__high: ; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } - 0005c 81 bd 00 01 00 + 0005d 81 bd 00 01 00 00 00 01 00 00 cmp DWORD PTR z$[rbp], 256 ; 00000100H - 00066 72 18 jb SHORT $LN4@stbi__high - 00068 8b 45 04 mov eax, DWORD PTR n$[rbp] - 0006b 83 c0 08 add eax, 8 - 0006e 89 45 04 mov DWORD PTR n$[rbp], eax - 00071 8b 85 00 01 00 + 00067 72 18 jb SHORT $LN4@stbi__high + 00069 8b 45 04 mov eax, DWORD PTR n$[rbp] + 0006c 83 c0 08 add eax, 8 + 0006f 89 45 04 mov DWORD PTR n$[rbp], eax + 00072 8b 85 00 01 00 00 mov eax, DWORD PTR z$[rbp] - 00077 c1 e8 08 shr eax, 8 - 0007a 89 85 00 01 00 + 00078 c1 e8 08 shr eax, 8 + 0007b 89 85 00 01 00 00 mov DWORD PTR z$[rbp], eax $LN4@stbi__high: ; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } - 00080 83 bd 00 01 00 + 00081 83 bd 00 01 00 00 10 cmp DWORD PTR z$[rbp], 16 - 00087 72 18 jb SHORT $LN5@stbi__high - 00089 8b 45 04 mov eax, DWORD PTR n$[rbp] - 0008c 83 c0 04 add eax, 4 - 0008f 89 45 04 mov DWORD PTR n$[rbp], eax - 00092 8b 85 00 01 00 + 00088 72 18 jb SHORT $LN5@stbi__high + 0008a 8b 45 04 mov eax, DWORD PTR n$[rbp] + 0008d 83 c0 04 add eax, 4 + 00090 89 45 04 mov DWORD PTR n$[rbp], eax + 00093 8b 85 00 01 00 00 mov eax, DWORD PTR z$[rbp] - 00098 c1 e8 04 shr eax, 4 - 0009b 89 85 00 01 00 + 00099 c1 e8 04 shr eax, 4 + 0009c 89 85 00 01 00 00 mov DWORD PTR z$[rbp], eax $LN5@stbi__high: ; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } - 000a1 83 bd 00 01 00 + 000a2 83 bd 00 01 00 00 04 cmp DWORD PTR z$[rbp], 4 - 000a8 72 18 jb SHORT $LN6@stbi__high - 000aa 8b 45 04 mov eax, DWORD PTR n$[rbp] - 000ad 83 c0 02 add eax, 2 - 000b0 89 45 04 mov DWORD PTR n$[rbp], eax - 000b3 8b 85 00 01 00 + 000a9 72 18 jb SHORT $LN6@stbi__high + 000ab 8b 45 04 mov eax, DWORD PTR n$[rbp] + 000ae 83 c0 02 add eax, 2 + 000b1 89 45 04 mov DWORD PTR n$[rbp], eax + 000b4 8b 85 00 01 00 00 mov eax, DWORD PTR z$[rbp] - 000b9 c1 e8 02 shr eax, 2 - 000bc 89 85 00 01 00 + 000ba c1 e8 02 shr eax, 2 + 000bd 89 85 00 01 00 00 mov DWORD PTR z$[rbp], eax $LN6@stbi__high: ; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } - 000c2 83 bd 00 01 00 + 000c3 83 bd 00 01 00 00 02 cmp DWORD PTR z$[rbp], 2 - 000c9 72 08 jb SHORT $LN7@stbi__high - 000cb 8b 45 04 mov eax, DWORD PTR n$[rbp] - 000ce ff c0 inc eax - 000d0 89 45 04 mov DWORD PTR n$[rbp], eax + 000ca 72 08 jb SHORT $LN7@stbi__high + 000cc 8b 45 04 mov eax, DWORD PTR n$[rbp] + 000cf ff c0 inc eax + 000d1 89 45 04 mov DWORD PTR n$[rbp], eax $LN7@stbi__high: ; 4898 : return n; - 000d3 8b 45 04 mov eax, DWORD PTR n$[rbp] + 000d4 8b 45 04 mov eax, DWORD PTR n$[rbp] $LN1@stbi__high: ; 4899 : } - 000d6 48 8d a5 e8 00 + 000d7 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 000dd 5f pop rdi - 000de 5d pop rbp - 000df c3 ret 0 + 000de 5f pop rdi + 000df 5d pop rbp + 000e0 c3 ret 0 stbi__high_bit ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -12933,99 +13013,104 @@ stbi__bmp_test_raw PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 4868 : int r; ; 4869 : int sz; ; 4870 : if (stbi__get8(s) != 'B') return 0; - 0001f 48 8b 8d 20 01 + 00020 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__get8 - 0002b 0f b6 c0 movzx eax, al - 0002e 83 f8 42 cmp eax, 66 ; 00000042H - 00031 74 07 je SHORT $LN2@stbi__bmp_ - 00033 33 c0 xor eax, eax - 00035 e9 97 00 00 00 jmp $LN1@stbi__bmp_ + 00027 e8 00 00 00 00 call stbi__get8 + 0002c 0f b6 c0 movzx eax, al + 0002f 83 f8 42 cmp eax, 66 ; 00000042H + 00032 74 07 je SHORT $LN2@stbi__bmp_ + 00034 33 c0 xor eax, eax + 00036 e9 9e 00 00 00 jmp $LN1@stbi__bmp_ $LN2@stbi__bmp_: ; 4871 : if (stbi__get8(s) != 'M') return 0; - 0003a 48 8b 8d 20 01 + 0003b 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00041 e8 00 00 00 00 call stbi__get8 - 00046 0f b6 c0 movzx eax, al - 00049 83 f8 4d cmp eax, 77 ; 0000004dH - 0004c 74 04 je SHORT $LN3@stbi__bmp_ - 0004e 33 c0 xor eax, eax - 00050 eb 7f jmp SHORT $LN1@stbi__bmp_ + 00042 e8 00 00 00 00 call stbi__get8 + 00047 0f b6 c0 movzx eax, al + 0004a 83 f8 4d cmp eax, 77 ; 0000004dH + 0004d 74 07 je SHORT $LN3@stbi__bmp_ + 0004f 33 c0 xor eax, eax + 00051 e9 83 00 00 00 jmp $LN1@stbi__bmp_ $LN3@stbi__bmp_: ; 4872 : stbi__get32le(s); // discard filesize - 00052 48 8b 8d 20 01 + 00056 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00059 e8 00 00 00 00 call stbi__get32le + 0005d e8 00 00 00 00 call stbi__get32le + 00062 90 npad 1 ; 4873 : stbi__get16le(s); // discard reserved - 0005e 48 8b 8d 20 01 + 00063 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00065 e8 00 00 00 00 call stbi__get16le + 0006a e8 00 00 00 00 call stbi__get16le + 0006f 90 npad 1 ; 4874 : stbi__get16le(s); // discard reserved - 0006a 48 8b 8d 20 01 + 00070 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00071 e8 00 00 00 00 call stbi__get16le + 00077 e8 00 00 00 00 call stbi__get16le + 0007c 90 npad 1 ; 4875 : stbi__get32le(s); // discard data offset - 00076 48 8b 8d 20 01 + 0007d 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0007d e8 00 00 00 00 call stbi__get32le + 00084 e8 00 00 00 00 call stbi__get32le + 00089 90 npad 1 ; 4876 : sz = stbi__get32le(s); - 00082 48 8b 8d 20 01 + 0008a 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00089 e8 00 00 00 00 call stbi__get32le - 0008e 89 45 24 mov DWORD PTR sz$[rbp], eax + 00091 e8 00 00 00 00 call stbi__get32le + 00096 89 45 24 mov DWORD PTR sz$[rbp], eax ; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); - 00091 83 7d 24 0c cmp DWORD PTR sz$[rbp], 12 - 00095 74 24 je SHORT $LN5@stbi__bmp_ - 00097 83 7d 24 28 cmp DWORD PTR sz$[rbp], 40 ; 00000028H - 0009b 74 1e je SHORT $LN5@stbi__bmp_ - 0009d 83 7d 24 38 cmp DWORD PTR sz$[rbp], 56 ; 00000038H - 000a1 74 18 je SHORT $LN5@stbi__bmp_ - 000a3 83 7d 24 6c cmp DWORD PTR sz$[rbp], 108 ; 0000006cH - 000a7 74 12 je SHORT $LN5@stbi__bmp_ - 000a9 83 7d 24 7c cmp DWORD PTR sz$[rbp], 124 ; 0000007cH - 000ad 74 0c je SHORT $LN5@stbi__bmp_ - 000af c7 85 f4 00 00 + 00099 83 7d 24 0c cmp DWORD PTR sz$[rbp], 12 + 0009d 74 24 je SHORT $LN5@stbi__bmp_ + 0009f 83 7d 24 28 cmp DWORD PTR sz$[rbp], 40 ; 00000028H + 000a3 74 1e je SHORT $LN5@stbi__bmp_ + 000a5 83 7d 24 38 cmp DWORD PTR sz$[rbp], 56 ; 00000038H + 000a9 74 18 je SHORT $LN5@stbi__bmp_ + 000ab 83 7d 24 6c cmp DWORD PTR sz$[rbp], 108 ; 0000006cH + 000af 74 12 je SHORT $LN5@stbi__bmp_ + 000b1 83 7d 24 7c cmp DWORD PTR sz$[rbp], 124 ; 0000007cH + 000b5 74 0c je SHORT $LN5@stbi__bmp_ + 000b7 c7 85 f4 00 00 00 00 00 00 00 mov DWORD PTR tv83[rbp], 0 - 000b9 eb 0a jmp SHORT $LN6@stbi__bmp_ + 000c1 eb 0a jmp SHORT $LN6@stbi__bmp_ $LN5@stbi__bmp_: - 000bb c7 85 f4 00 00 + 000c3 c7 85 f4 00 00 00 01 00 00 00 mov DWORD PTR tv83[rbp], 1 $LN6@stbi__bmp_: - 000c5 8b 85 f4 00 00 + 000cd 8b 85 f4 00 00 00 mov eax, DWORD PTR tv83[rbp] - 000cb 89 45 04 mov DWORD PTR r$[rbp], eax + 000d3 89 45 04 mov DWORD PTR r$[rbp], eax ; 4878 : return r; - 000ce 8b 45 04 mov eax, DWORD PTR r$[rbp] + 000d6 8b 45 04 mov eax, DWORD PTR r$[rbp] $LN1@stbi__bmp_: ; 4879 : } - 000d1 48 8d a5 08 01 + 000d9 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000d8 5f pop rdi - 000d9 5d pop rbp - 000da c3 ret 0 + 000e0 5f pop rdi + 000e1 5d pop rbp + 000e2 c3 ret 0 stbi__bmp_test_raw ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -13052,85 +13137,87 @@ stbi__png_info_raw PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 4832 : if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { - 0002e 45 33 c0 xor r8d, r8d - 00031 ba 02 00 00 00 mov edx, 2 - 00036 48 8b 8d e0 00 + 0002f 45 33 c0 xor r8d, r8d + 00032 ba 02 00 00 00 mov edx, 2 + 00037 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR p$[rbp] - 0003d e8 00 00 00 00 call stbi__parse_png_file - 00042 85 c0 test eax, eax - 00044 75 13 jne SHORT $LN2@stbi__png_ + 0003e e8 00 00 00 00 call stbi__parse_png_file + 00043 85 c0 test eax, eax + 00045 75 14 jne SHORT $LN2@stbi__png_ ; 4833 : stbi__rewind(p->s); - 00046 48 8b 85 e0 00 + 00047 48 8b 85 e0 00 00 00 mov rax, QWORD PTR p$[rbp] - 0004d 48 8b 08 mov rcx, QWORD PTR [rax] - 00050 e8 00 00 00 00 call stbi__rewind + 0004e 48 8b 08 mov rcx, QWORD PTR [rax] + 00051 e8 00 00 00 00 call stbi__rewind + 00056 90 npad 1 ; 4834 : return 0; - 00055 33 c0 xor eax, eax - 00057 eb 64 jmp SHORT $LN1@stbi__png_ + 00057 33 c0 xor eax, eax + 00059 eb 64 jmp SHORT $LN1@stbi__png_ $LN2@stbi__png_: ; 4835 : } ; 4836 : if (x) *x = p->s->img_x; - 00059 48 83 bd e8 00 + 0005b 48 83 bd e8 00 00 00 00 cmp QWORD PTR x$[rbp], 0 - 00061 74 15 je SHORT $LN3@stbi__png_ - 00063 48 8b 85 e0 00 + 00063 74 15 je SHORT $LN3@stbi__png_ + 00065 48 8b 85 e0 00 00 00 mov rax, QWORD PTR p$[rbp] - 0006a 48 8b 00 mov rax, QWORD PTR [rax] - 0006d 48 8b 8d e8 00 + 0006c 48 8b 00 mov rax, QWORD PTR [rax] + 0006f 48 8b 8d e8 00 00 00 mov rcx, QWORD PTR x$[rbp] - 00074 8b 00 mov eax, DWORD PTR [rax] - 00076 89 01 mov DWORD PTR [rcx], eax + 00076 8b 00 mov eax, DWORD PTR [rax] + 00078 89 01 mov DWORD PTR [rcx], eax $LN3@stbi__png_: ; 4837 : if (y) *y = p->s->img_y; - 00078 48 83 bd f0 00 + 0007a 48 83 bd f0 00 00 00 00 cmp QWORD PTR y$[rbp], 0 - 00080 74 16 je SHORT $LN4@stbi__png_ - 00082 48 8b 85 e0 00 + 00082 74 16 je SHORT $LN4@stbi__png_ + 00084 48 8b 85 e0 00 00 00 mov rax, QWORD PTR p$[rbp] - 00089 48 8b 00 mov rax, QWORD PTR [rax] - 0008c 48 8b 8d f0 00 + 0008b 48 8b 00 mov rax, QWORD PTR [rax] + 0008e 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR y$[rbp] - 00093 8b 40 04 mov eax, DWORD PTR [rax+4] - 00096 89 01 mov DWORD PTR [rcx], eax + 00095 8b 40 04 mov eax, DWORD PTR [rax+4] + 00098 89 01 mov DWORD PTR [rcx], eax $LN4@stbi__png_: ; 4838 : if (comp) *comp = p->s->img_n; - 00098 48 83 bd f8 00 + 0009a 48 83 bd f8 00 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 000a0 74 16 je SHORT $LN5@stbi__png_ - 000a2 48 8b 85 e0 00 + 000a2 74 16 je SHORT $LN5@stbi__png_ + 000a4 48 8b 85 e0 00 00 00 mov rax, QWORD PTR p$[rbp] - 000a9 48 8b 00 mov rax, QWORD PTR [rax] - 000ac 48 8b 8d f8 00 + 000ab 48 8b 00 mov rax, QWORD PTR [rax] + 000ae 48 8b 8d f8 00 00 00 mov rcx, QWORD PTR comp$[rbp] - 000b3 8b 40 08 mov eax, DWORD PTR [rax+8] - 000b6 89 01 mov DWORD PTR [rcx], eax + 000b5 8b 40 08 mov eax, DWORD PTR [rax+8] + 000b8 89 01 mov DWORD PTR [rcx], eax $LN5@stbi__png_: ; 4839 : return 1; - 000b8 b8 01 00 00 00 mov eax, 1 + 000ba b8 01 00 00 00 mov eax, 1 $LN1@stbi__png_: ; 4840 : } - 000bd 48 8d a5 c8 00 + 000bf 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 000c4 5f pop rdi - 000c5 5d pop rbp - 000c6 c3 ret 0 + 000c6 5f pop rdi + 000c7 5d pop rbp + 000c8 c3 ret 0 stbi__png_info_raw ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -13138,8 +13225,8 @@ _TEXT ENDS ; COMDAT stbi__do_png _TEXT SEGMENT result$ = 8 -tv84 = 216 tv69 = 216 +tv84 = 216 p$ = 256 x$ = 264 y$ = 272 @@ -13162,293 +13249,297 @@ stbi__do_png PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 4785 : void* result = NULL; - 0002e 48 c7 45 08 00 + 0002f 48 c7 45 08 00 00 00 00 mov QWORD PTR result$[rbp], 0 ; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); - 00036 83 bd 20 01 00 + 00037 83 bd 20 01 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 0003d 7c 09 jl SHORT $LN3@stbi__do_p - 0003f 83 bd 20 01 00 + 0003e 7c 09 jl SHORT $LN3@stbi__do_p + 00040 83 bd 20 01 00 00 04 cmp DWORD PTR req_comp$[rbp], 4 - 00046 7e 34 jle SHORT $LN2@stbi__do_p + 00047 7e 34 jle SHORT $LN2@stbi__do_p $LN3@stbi__do_p: - 00048 48 8d 0d 00 00 + 00049 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0N@KBPNPPBJ@bad?5req_comp@ - 0004f e8 00 00 00 00 call stbi__err - 00054 85 c0 test eax, eax - 00056 74 0d je SHORT $LN15@stbi__do_p - 00058 48 c7 85 d8 00 + 00050 e8 00 00 00 00 call stbi__err + 00055 85 c0 test eax, eax + 00057 74 0d je SHORT $LN15@stbi__do_p + 00059 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv69[rbp], 0 - 00063 eb 0b jmp SHORT $LN16@stbi__do_p + 00064 eb 0b jmp SHORT $LN16@stbi__do_p $LN15@stbi__do_p: - 00065 48 c7 85 d8 00 + 00066 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv69[rbp], 0 $LN16@stbi__do_p: - 00070 48 8b 85 d8 00 + 00071 48 8b 85 d8 00 00 00 mov rax, QWORD PTR tv69[rbp] - 00077 e9 2b 02 00 00 jmp $LN1@stbi__do_p + 00078 e9 2e 02 00 00 jmp $LN1@stbi__do_p $LN2@stbi__do_p: ; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { - 0007c 44 8b 85 20 01 + 0007d 44 8b 85 20 01 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 00083 33 d2 xor edx, edx - 00085 48 8b 8d 00 01 + 00084 33 d2 xor edx, edx + 00086 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR p$[rbp] - 0008c e8 00 00 00 00 call stbi__parse_png_file - 00091 85 c0 test eax, eax - 00093 0f 84 aa 01 00 + 0008d e8 00 00 00 00 call stbi__parse_png_file + 00092 85 c0 test eax, eax + 00094 0f 84 aa 01 00 00 je $LN4@stbi__do_p ; 4788 : if (p->depth <= 8) - 00099 48 8b 85 00 01 + 0009a 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 000a0 83 78 20 08 cmp DWORD PTR [rax+32], 8 - 000a4 7f 0f jg SHORT $LN5@stbi__do_p + 000a1 83 78 20 08 cmp DWORD PTR [rax+32], 8 + 000a5 7f 0f jg SHORT $LN5@stbi__do_p ; 4789 : ri->bits_per_channel = 8; - 000a6 48 8b 85 28 01 + 000a7 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 000ad c7 00 08 00 00 + 000ae c7 00 08 00 00 00 mov DWORD PTR [rax], 8 - 000b3 eb 50 jmp SHORT $LN6@stbi__do_p + 000b4 eb 50 jmp SHORT $LN6@stbi__do_p $LN5@stbi__do_p: ; 4790 : else if (p->depth == 16) - 000b5 48 8b 85 00 01 + 000b6 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 000bc 83 78 20 10 cmp DWORD PTR [rax+32], 16 - 000c0 75 0f jne SHORT $LN7@stbi__do_p + 000bd 83 78 20 10 cmp DWORD PTR [rax+32], 16 + 000c1 75 0f jne SHORT $LN7@stbi__do_p ; 4791 : ri->bits_per_channel = 16; - 000c2 48 8b 85 28 01 + 000c3 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 000c9 c7 00 10 00 00 + 000ca c7 00 10 00 00 00 mov DWORD PTR [rax], 16 - 000cf eb 34 jmp SHORT $LN8@stbi__do_p + 000d0 eb 34 jmp SHORT $LN8@stbi__do_p $LN7@stbi__do_p: ; 4792 : else ; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); - 000d1 48 8d 0d 00 00 + 000d2 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BF@NOEEEFMF@bad?5bits_per_channel@ - 000d8 e8 00 00 00 00 call stbi__err - 000dd 85 c0 test eax, eax - 000df 74 0d je SHORT $LN17@stbi__do_p - 000e1 48 c7 85 d8 00 + 000d9 e8 00 00 00 00 call stbi__err + 000de 85 c0 test eax, eax + 000e0 74 0d je SHORT $LN17@stbi__do_p + 000e2 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv84[rbp], 0 - 000ec eb 0b jmp SHORT $LN18@stbi__do_p + 000ed eb 0b jmp SHORT $LN18@stbi__do_p $LN17@stbi__do_p: - 000ee 48 c7 85 d8 00 + 000ef 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv84[rbp], 0 $LN18@stbi__do_p: - 000f9 48 8b 85 d8 00 + 000fa 48 8b 85 d8 00 00 00 mov rax, QWORD PTR tv84[rbp] - 00100 e9 a2 01 00 00 jmp $LN1@stbi__do_p + 00101 e9 a5 01 00 00 jmp $LN1@stbi__do_p $LN8@stbi__do_p: $LN6@stbi__do_p: ; 4794 : result = p->out; - 00105 48 8b 85 00 01 + 00106 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 0010c 48 8b 40 18 mov rax, QWORD PTR [rax+24] - 00110 48 89 45 08 mov QWORD PTR result$[rbp], rax + 0010d 48 8b 40 18 mov rax, QWORD PTR [rax+24] + 00111 48 89 45 08 mov QWORD PTR result$[rbp], rax ; 4795 : p->out = NULL; - 00114 48 8b 85 00 01 + 00115 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 0011b 48 c7 40 18 00 + 0011c 48 c7 40 18 00 00 00 00 mov QWORD PTR [rax+24], 0 ; 4796 : if (req_comp && req_comp != p->s->img_out_n) { - 00123 83 bd 20 01 00 + 00124 83 bd 20 01 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 0012a 0f 84 c8 00 00 + 0012b 0f 84 c8 00 00 00 je $LN9@stbi__do_p - 00130 48 8b 85 00 01 + 00131 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 00137 48 8b 00 mov rax, QWORD PTR [rax] - 0013a 8b 40 0c mov eax, DWORD PTR [rax+12] - 0013d 39 85 20 01 00 + 00138 48 8b 00 mov rax, QWORD PTR [rax] + 0013b 8b 40 0c mov eax, DWORD PTR [rax+12] + 0013e 39 85 20 01 00 00 cmp DWORD PTR req_comp$[rbp], eax - 00143 0f 84 af 00 00 + 00144 0f 84 af 00 00 00 je $LN9@stbi__do_p ; 4797 : if (ri->bits_per_channel == 8) - 00149 48 8b 85 28 01 + 0014a 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 00150 83 38 08 cmp DWORD PTR [rax], 8 - 00153 75 41 jne SHORT $LN10@stbi__do_p + 00151 83 38 08 cmp DWORD PTR [rax], 8 + 00154 75 41 jne SHORT $LN10@stbi__do_p ; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); - 00155 48 8b 85 00 01 + 00156 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 0015c 48 8b 00 mov rax, QWORD PTR [rax] - 0015f 48 8b 8d 00 01 + 0015d 48 8b 00 mov rax, QWORD PTR [rax] + 00160 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR p$[rbp] - 00166 48 8b 09 mov rcx, QWORD PTR [rcx] - 00169 48 8b 95 00 01 + 00167 48 8b 09 mov rcx, QWORD PTR [rcx] + 0016a 48 8b 95 00 01 00 00 mov rdx, QWORD PTR p$[rbp] - 00170 48 8b 12 mov rdx, QWORD PTR [rdx] - 00173 8b 40 04 mov eax, DWORD PTR [rax+4] - 00176 89 44 24 20 mov DWORD PTR [rsp+32], eax - 0017a 44 8b 09 mov r9d, DWORD PTR [rcx] - 0017d 44 8b 85 20 01 + 00171 48 8b 12 mov rdx, QWORD PTR [rdx] + 00174 8b 40 04 mov eax, DWORD PTR [rax+4] + 00177 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0017b 44 8b 09 mov r9d, DWORD PTR [rcx] + 0017e 44 8b 85 20 01 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 00184 8b 52 0c mov edx, DWORD PTR [rdx+12] - 00187 48 8b 4d 08 mov rcx, QWORD PTR result$[rbp] - 0018b e8 00 00 00 00 call stbi__convert_format - 00190 48 89 45 08 mov QWORD PTR result$[rbp], rax - 00194 eb 3f jmp SHORT $LN11@stbi__do_p + 00185 8b 52 0c mov edx, DWORD PTR [rdx+12] + 00188 48 8b 4d 08 mov rcx, QWORD PTR result$[rbp] + 0018c e8 00 00 00 00 call stbi__convert_format + 00191 48 89 45 08 mov QWORD PTR result$[rbp], rax + 00195 eb 3f jmp SHORT $LN11@stbi__do_p $LN10@stbi__do_p: ; 4799 : else ; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); - 00196 48 8b 85 00 01 + 00197 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 0019d 48 8b 00 mov rax, QWORD PTR [rax] - 001a0 48 8b 8d 00 01 + 0019e 48 8b 00 mov rax, QWORD PTR [rax] + 001a1 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR p$[rbp] - 001a7 48 8b 09 mov rcx, QWORD PTR [rcx] - 001aa 48 8b 95 00 01 + 001a8 48 8b 09 mov rcx, QWORD PTR [rcx] + 001ab 48 8b 95 00 01 00 00 mov rdx, QWORD PTR p$[rbp] - 001b1 48 8b 12 mov rdx, QWORD PTR [rdx] - 001b4 8b 40 04 mov eax, DWORD PTR [rax+4] - 001b7 89 44 24 20 mov DWORD PTR [rsp+32], eax - 001bb 44 8b 09 mov r9d, DWORD PTR [rcx] - 001be 44 8b 85 20 01 + 001b2 48 8b 12 mov rdx, QWORD PTR [rdx] + 001b5 8b 40 04 mov eax, DWORD PTR [rax+4] + 001b8 89 44 24 20 mov DWORD PTR [rsp+32], eax + 001bc 44 8b 09 mov r9d, DWORD PTR [rcx] + 001bf 44 8b 85 20 01 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 001c5 8b 52 0c mov edx, DWORD PTR [rdx+12] - 001c8 48 8b 4d 08 mov rcx, QWORD PTR result$[rbp] - 001cc e8 00 00 00 00 call stbi__convert_format16 - 001d1 48 89 45 08 mov QWORD PTR result$[rbp], rax + 001c6 8b 52 0c mov edx, DWORD PTR [rdx+12] + 001c9 48 8b 4d 08 mov rcx, QWORD PTR result$[rbp] + 001cd e8 00 00 00 00 call stbi__convert_format16 + 001d2 48 89 45 08 mov QWORD PTR result$[rbp], rax $LN11@stbi__do_p: ; 4801 : p->s->img_out_n = req_comp; - 001d5 48 8b 85 00 01 + 001d6 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 001dc 48 8b 00 mov rax, QWORD PTR [rax] - 001df 8b 8d 20 01 00 + 001dd 48 8b 00 mov rax, QWORD PTR [rax] + 001e0 8b 8d 20 01 00 00 mov ecx, DWORD PTR req_comp$[rbp] - 001e5 89 48 0c mov DWORD PTR [rax+12], ecx + 001e6 89 48 0c mov DWORD PTR [rax+12], ecx ; 4802 : if (result == NULL) return result; - 001e8 48 83 7d 08 00 cmp QWORD PTR result$[rbp], 0 - 001ed 75 09 jne SHORT $LN12@stbi__do_p - 001ef 48 8b 45 08 mov rax, QWORD PTR result$[rbp] - 001f3 e9 af 00 00 00 jmp $LN1@stbi__do_p + 001e9 48 83 7d 08 00 cmp QWORD PTR result$[rbp], 0 + 001ee 75 09 jne SHORT $LN12@stbi__do_p + 001f0 48 8b 45 08 mov rax, QWORD PTR result$[rbp] + 001f4 e9 b2 00 00 00 jmp $LN1@stbi__do_p $LN12@stbi__do_p: $LN9@stbi__do_p: ; 4803 : } ; 4804 : *x = p->s->img_x; - 001f8 48 8b 85 00 01 + 001f9 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 001ff 48 8b 00 mov rax, QWORD PTR [rax] - 00202 48 8b 8d 08 01 + 00200 48 8b 00 mov rax, QWORD PTR [rax] + 00203 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR x$[rbp] - 00209 8b 00 mov eax, DWORD PTR [rax] - 0020b 89 01 mov DWORD PTR [rcx], eax + 0020a 8b 00 mov eax, DWORD PTR [rax] + 0020c 89 01 mov DWORD PTR [rcx], eax ; 4805 : *y = p->s->img_y; - 0020d 48 8b 85 00 01 + 0020e 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 00214 48 8b 00 mov rax, QWORD PTR [rax] - 00217 48 8b 8d 10 01 + 00215 48 8b 00 mov rax, QWORD PTR [rax] + 00218 48 8b 8d 10 01 00 00 mov rcx, QWORD PTR y$[rbp] - 0021e 8b 40 04 mov eax, DWORD PTR [rax+4] - 00221 89 01 mov DWORD PTR [rcx], eax + 0021f 8b 40 04 mov eax, DWORD PTR [rax+4] + 00222 89 01 mov DWORD PTR [rcx], eax ; 4806 : if (n) *n = p->s->img_n; - 00223 48 83 bd 18 01 + 00224 48 83 bd 18 01 00 00 00 cmp QWORD PTR n$[rbp], 0 - 0022b 74 16 je SHORT $LN13@stbi__do_p - 0022d 48 8b 85 00 01 + 0022c 74 16 je SHORT $LN13@stbi__do_p + 0022e 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 00234 48 8b 00 mov rax, QWORD PTR [rax] - 00237 48 8b 8d 18 01 + 00235 48 8b 00 mov rax, QWORD PTR [rax] + 00238 48 8b 8d 18 01 00 00 mov rcx, QWORD PTR n$[rbp] - 0023e 8b 40 08 mov eax, DWORD PTR [rax+8] - 00241 89 01 mov DWORD PTR [rcx], eax + 0023f 8b 40 08 mov eax, DWORD PTR [rax+8] + 00242 89 01 mov DWORD PTR [rcx], eax $LN13@stbi__do_p: $LN4@stbi__do_p: ; 4807 : } ; 4808 : STBI_FREE(p->out); p->out = NULL; - 00243 48 8b 85 00 01 + 00244 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 0024a 48 8b 48 18 mov rcx, QWORD PTR [rax+24] - 0024e ff 15 00 00 00 + 0024b 48 8b 48 18 mov rcx, QWORD PTR [rax+24] + 0024f ff 15 00 00 00 00 call QWORD PTR __imp_free - 00254 48 8b 85 00 01 + 00255 90 npad 1 + 00256 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 0025b 48 c7 40 18 00 + 0025d 48 c7 40 18 00 00 00 00 mov QWORD PTR [rax+24], 0 ; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; - 00263 48 8b 85 00 01 + 00265 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 0026a 48 8b 48 10 mov rcx, QWORD PTR [rax+16] - 0026e ff 15 00 00 00 + 0026c 48 8b 48 10 mov rcx, QWORD PTR [rax+16] + 00270 ff 15 00 00 00 00 call QWORD PTR __imp_free - 00274 48 8b 85 00 01 + 00276 90 npad 1 + 00277 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 0027b 48 c7 40 10 00 + 0027e 48 c7 40 10 00 00 00 00 mov QWORD PTR [rax+16], 0 ; 4810 : STBI_FREE(p->idata); p->idata = NULL; - 00283 48 8b 85 00 01 + 00286 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 0028a 48 8b 48 08 mov rcx, QWORD PTR [rax+8] - 0028e ff 15 00 00 00 + 0028d 48 8b 48 08 mov rcx, QWORD PTR [rax+8] + 00291 ff 15 00 00 00 00 call QWORD PTR __imp_free - 00294 48 8b 85 00 01 + 00297 90 npad 1 + 00298 48 8b 85 00 01 00 00 mov rax, QWORD PTR p$[rbp] - 0029b 48 c7 40 08 00 + 0029f 48 c7 40 08 00 00 00 00 mov QWORD PTR [rax+8], 0 ; 4811 : ; 4812 : return result; - 002a3 48 8b 45 08 mov rax, QWORD PTR result$[rbp] + 002a7 48 8b 45 08 mov rax, QWORD PTR result$[rbp] $LN1@stbi__do_p: ; 4813 : } - 002a7 48 8d a5 e8 00 + 002ab 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 002ae 5f pop rdi - 002af 5d pop rbp - 002b0 c3 ret 0 + 002b2 5f pop rdi + 002b3 5d pop rbp + 002b4 c3 ret 0 stbi__do_png ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -13477,11 +13568,11 @@ idata_limit_old$11 = 1604 p$12 = 1640 raw_len$13 = 1668 bpl$14 = 1700 -tv461 = 2484 -tv394 = 2484 -tv345 = 2484 -tv194 = 2484 tv78 = 2484 +tv194 = 2484 +tv345 = 2484 +tv394 = 2484 +tv461 = 2484 tv197 = 2488 __$ArrayPad$ = 2496 z$ = 2544 @@ -13513,94 +13604,95 @@ stbi__parse_png_file PROC ; COMDAT 00046 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0004d e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00052 90 npad 1 ; 4597 : stbi_uc palette[1024], pal_img_n = 0; - 00052 c6 85 24 04 00 + 00053 c6 85 24 04 00 00 00 mov BYTE PTR pal_img_n$[rbp], 0 ; 4598 : stbi_uc has_trans = 0, tc[3] = { 0 }; - 00059 c6 85 44 04 00 + 0005a c6 85 44 04 00 00 00 mov BYTE PTR has_trans$[rbp], 0 - 00060 48 8d 85 64 04 + 00061 48 8d 85 64 04 00 00 lea rax, QWORD PTR tc$[rbp] - 00067 48 8b f8 mov rdi, rax - 0006a 33 c0 xor eax, eax - 0006c b9 03 00 00 00 mov ecx, 3 - 00071 f3 aa rep stosb + 00068 48 8b f8 mov rdi, rax + 0006b 33 c0 xor eax, eax + 0006d b9 03 00 00 00 mov ecx, 3 + 00072 f3 aa rep stosb ; 4599 : stbi__uint16 tc16[3]; ; 4600 : stbi__uint32 ioff = 0, idata_limit = 0, i, pal_len = 0; - 00073 c7 85 a4 04 00 + 00074 c7 85 a4 04 00 00 00 00 00 00 mov DWORD PTR ioff$[rbp], 0 - 0007d c7 85 c4 04 00 + 0007e c7 85 c4 04 00 00 00 00 00 00 mov DWORD PTR idata_limit$[rbp], 0 - 00087 c7 85 04 05 00 + 00088 c7 85 04 05 00 00 00 00 00 00 mov DWORD PTR pal_len$[rbp], 0 ; 4601 : int first = 1, k, interlace = 0, color = 0, is_iphone = 0; - 00091 c7 85 24 05 00 + 00092 c7 85 24 05 00 00 01 00 00 00 mov DWORD PTR first$[rbp], 1 - 0009b c7 85 64 05 00 + 0009c c7 85 64 05 00 00 00 00 00 00 mov DWORD PTR interlace$[rbp], 0 - 000a5 c7 85 84 05 00 + 000a6 c7 85 84 05 00 00 00 00 00 00 mov DWORD PTR color$[rbp], 0 - 000af c7 85 a4 05 00 + 000b0 c7 85 a4 05 00 00 00 00 00 00 mov DWORD PTR is_iphone$[rbp], 0 ; 4602 : stbi__context* s = z->s; - 000b9 48 8b 85 f0 09 + 000ba 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 000c0 48 8b 00 mov rax, QWORD PTR [rax] - 000c3 48 89 85 c8 05 + 000c1 48 8b 00 mov rax, QWORD PTR [rax] + 000c4 48 89 85 c8 05 00 00 mov QWORD PTR s$[rbp], rax ; 4603 : ; 4604 : z->expanded = NULL; - 000ca 48 8b 85 f0 09 + 000cb 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 000d1 48 c7 40 10 00 + 000d2 48 c7 40 10 00 00 00 00 mov QWORD PTR [rax+16], 0 ; 4605 : z->idata = NULL; - 000d9 48 8b 85 f0 09 + 000da 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 000e0 48 c7 40 08 00 + 000e1 48 c7 40 08 00 00 00 00 mov QWORD PTR [rax+8], 0 ; 4606 : z->out = NULL; - 000e8 48 8b 85 f0 09 + 000e9 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 000ef 48 c7 40 18 00 + 000f0 48 c7 40 18 00 00 00 00 mov QWORD PTR [rax+24], 0 ; 4607 : ; 4608 : if (!stbi__check_png_header(s)) return 0; - 000f7 48 8b 8d c8 05 + 000f8 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 000fe e8 00 00 00 00 call stbi__check_png_header - 00103 85 c0 test eax, eax - 00105 75 07 jne SHORT $LN21@stbi__pars - 00107 33 c0 xor eax, eax - 00109 e9 91 0d 00 00 jmp $LN1@stbi__pars + 000ff e8 00 00 00 00 call stbi__check_png_header + 00104 85 c0 test eax, eax + 00106 75 07 jne SHORT $LN21@stbi__pars + 00108 33 c0 xor eax, eax + 0010a e9 98 0d 00 00 jmp $LN1@stbi__pars $LN21@stbi__pars: ; 4609 : ; 4610 : if (scan == STBI__SCAN_type) return 1; - 0010e 83 bd f8 09 00 + 0010f 83 bd f8 09 00 00 01 cmp DWORD PTR scan$[rbp], 1 - 00115 75 0a jne SHORT $LN22@stbi__pars - 00117 b8 01 00 00 00 mov eax, 1 - 0011c e9 7e 0d 00 00 jmp $LN1@stbi__pars + 00116 75 0a jne SHORT $LN22@stbi__pars + 00118 b8 01 00 00 00 mov eax, 1 + 0011d e9 85 0d 00 00 jmp $LN1@stbi__pars $LN22@stbi__pars: $LN2@stbi__pars: @@ -13608,364 +13700,365 @@ $LN2@stbi__pars: ; 4612 : for (;;) { ; 4613 : stbi__pngchunk c = stbi__get_chunk_header(s); - 00121 48 8b 8d c8 05 + 00122 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00128 e8 00 00 00 00 call stbi__get_chunk_header - 0012d 48 89 85 e8 05 + 00129 e8 00 00 00 00 call stbi__get_chunk_header + 0012e 48 89 85 e8 05 00 00 mov QWORD PTR c$8[rbp], rax ; 4614 : switch (c.type) { - 00134 8b 85 ec 05 00 + 00135 8b 85 ec 05 00 00 mov eax, DWORD PTR c$8[rbp+4] - 0013a 89 85 b4 09 00 + 0013b 89 85 b4 09 00 00 mov DWORD PTR tv78[rbp], eax - 00140 81 bd b4 09 00 + 00141 81 bd b4 09 00 00 52 44 48 49 cmp DWORD PTR tv78[rbp], 1229472850 ; 49484452H - 0014a 77 3d ja SHORT $LN107@stbi__pars - 0014c 81 bd b4 09 00 + 0014b 77 3d ja SHORT $LN107@stbi__pars + 0014d 81 bd b4 09 00 00 52 44 48 49 cmp DWORD PTR tv78[rbp], 1229472850 ; 49484452H - 00156 74 77 je SHORT $LN24@stbi__pars - 00158 81 bd b4 09 00 + 00157 74 78 je SHORT $LN24@stbi__pars + 00159 81 bd b4 09 00 00 49 42 67 43 cmp DWORD PTR tv78[rbp], 1130840649 ; 43674249H - 00162 74 4a je SHORT $LN23@stbi__pars - 00164 81 bd b4 09 00 + 00163 74 4a je SHORT $LN23@stbi__pars + 00165 81 bd b4 09 00 00 54 41 44 49 cmp DWORD PTR tv78[rbp], 1229209940 ; 49444154H - 0016e 0f 84 df 06 00 + 0016f 0f 84 e0 06 00 00 je $LN61@stbi__pars - 00174 81 bd b4 09 00 + 00175 81 bd b4 09 00 00 44 4e 45 49 cmp DWORD PTR tv78[rbp], 1229278788 ; 49454e44H - 0017e 0f 84 a6 08 00 + 0017f 0f 84 a7 08 00 00 je $LN72@stbi__pars - 00184 e9 37 0c 00 00 jmp $LN93@stbi__pars + 00185 e9 3c 0c 00 00 jmp $LN93@stbi__pars $LN107@stbi__pars: - 00189 81 bd b4 09 00 + 0018a 81 bd b4 09 00 00 45 54 4c 50 cmp DWORD PTR tv78[rbp], 1347179589 ; 504c5445H - 00193 0f 84 7b 03 00 + 00194 0f 84 7c 03 00 00 je $LN44@stbi__pars - 00199 81 bd b4 09 00 + 0019a 81 bd b4 09 00 00 53 4e 52 74 cmp DWORD PTR tv78[rbp], 1951551059 ; 74524e53H - 001a3 0f 84 76 04 00 + 001a4 0f 84 77 04 00 00 je $LN48@stbi__pars - 001a9 e9 12 0c 00 00 jmp $LN93@stbi__pars + 001aa e9 17 0c 00 00 jmp $LN93@stbi__pars $LN23@stbi__pars: ; 4615 : case STBI__PNG_TYPE('C', 'g', 'B', 'I'): ; 4616 : is_iphone = 1; - 001ae c7 85 a4 05 00 + 001af c7 85 a4 05 00 00 01 00 00 00 mov DWORD PTR is_iphone$[rbp], 1 ; 4617 : stbi__skip(s, c.length); - 001b8 8b 95 e8 05 00 + 001b9 8b 95 e8 05 00 00 mov edx, DWORD PTR c$8[rbp] - 001be 48 8b 8d c8 05 + 001bf 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 001c5 e8 00 00 00 00 call stbi__skip + 001c6 e8 00 00 00 00 call stbi__skip + 001cb 90 npad 1 ; 4618 : break; - 001ca e9 bf 0c 00 00 jmp $LN5@stbi__pars + 001cc e9 c4 0c 00 00 jmp $LN5@stbi__pars $LN24@stbi__pars: ; 4619 : case STBI__PNG_TYPE('I', 'H', 'D', 'R'): { ; 4620 : int comp, filter; ; 4621 : if (!first) return stbi__err("multiple IHDR", "Corrupt PNG"); - 001cf 83 bd 24 05 00 + 001d1 83 bd 24 05 00 00 00 cmp DWORD PTR first$[rbp], 0 - 001d6 75 11 jne SHORT $LN25@stbi__pars - 001d8 48 8d 0d 00 00 + 001d8 75 11 jne SHORT $LN25@stbi__pars + 001da 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0O@KBHBNJOK@multiple?5IHDR@ - 001df e8 00 00 00 00 call stbi__err - 001e4 e9 b6 0c 00 00 jmp $LN1@stbi__pars + 001e1 e8 00 00 00 00 call stbi__err + 001e6 e9 bc 0c 00 00 jmp $LN1@stbi__pars $LN25@stbi__pars: ; 4622 : first = 0; - 001e9 c7 85 24 05 00 + 001eb c7 85 24 05 00 00 00 00 00 00 mov DWORD PTR first$[rbp], 0 ; 4623 : if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG"); - 001f3 83 bd e8 05 00 + 001f5 83 bd e8 05 00 00 0d cmp DWORD PTR c$8[rbp], 13 - 001fa 74 11 je SHORT $LN26@stbi__pars - 001fc 48 8d 0d 00 00 + 001fc 74 11 je SHORT $LN26@stbi__pars + 001fe 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0N@POJLKMKK@bad?5IHDR?5len@ - 00203 e8 00 00 00 00 call stbi__err - 00208 e9 92 0c 00 00 jmp $LN1@stbi__pars + 00205 e8 00 00 00 00 call stbi__err + 0020a e9 98 0c 00 00 jmp $LN1@stbi__pars $LN26@stbi__pars: ; 4624 : s->img_x = stbi__get32be(s); - 0020d 48 8b 8d c8 05 + 0020f 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00214 e8 00 00 00 00 call stbi__get32be - 00219 48 8b 8d c8 05 + 00216 e8 00 00 00 00 call stbi__get32be + 0021b 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00220 89 01 mov DWORD PTR [rcx], eax + 00222 89 01 mov DWORD PTR [rcx], eax ; 4625 : s->img_y = stbi__get32be(s); - 00222 48 8b 8d c8 05 + 00224 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00229 e8 00 00 00 00 call stbi__get32be - 0022e 48 8b 8d c8 05 + 0022b e8 00 00 00 00 call stbi__get32be + 00230 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00235 89 41 04 mov DWORD PTR [rcx+4], eax + 00237 89 41 04 mov DWORD PTR [rcx+4], eax ; 4626 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); - 00238 48 8b 85 c8 05 + 0023a 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 0023f 81 78 04 00 00 + 00241 81 78 04 00 00 00 01 cmp DWORD PTR [rax+4], 16777216 ; 01000000H - 00246 76 11 jbe SHORT $LN27@stbi__pars - 00248 48 8d 0d 00 00 + 00248 76 11 jbe SHORT $LN27@stbi__pars + 0024a 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 0024f e8 00 00 00 00 call stbi__err - 00254 e9 46 0c 00 00 jmp $LN1@stbi__pars + 00251 e8 00 00 00 00 call stbi__err + 00256 e9 4c 0c 00 00 jmp $LN1@stbi__pars $LN27@stbi__pars: ; 4627 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); - 00259 48 8b 85 c8 05 + 0025b 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00260 81 38 00 00 00 + 00262 81 38 00 00 00 01 cmp DWORD PTR [rax], 16777216 ; 01000000H - 00266 76 11 jbe SHORT $LN28@stbi__pars - 00268 48 8d 0d 00 00 + 00268 76 11 jbe SHORT $LN28@stbi__pars + 0026a 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 0026f e8 00 00 00 00 call stbi__err - 00274 e9 26 0c 00 00 jmp $LN1@stbi__pars + 00271 e8 00 00 00 00 call stbi__err + 00276 e9 2c 0c 00 00 jmp $LN1@stbi__pars $LN28@stbi__pars: ; 4628 : z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only"); - 00279 48 8b 8d c8 05 + 0027b 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00280 e8 00 00 00 00 call stbi__get8 - 00285 0f b6 c0 movzx eax, al - 00288 48 8b 8d f0 09 + 00282 e8 00 00 00 00 call stbi__get8 + 00287 0f b6 c0 movzx eax, al + 0028a 48 8b 8d f0 09 00 00 mov rcx, QWORD PTR z$[rbp] - 0028f 89 41 20 mov DWORD PTR [rcx+32], eax - 00292 48 8b 85 f0 09 + 00291 89 41 20 mov DWORD PTR [rcx+32], eax + 00294 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00299 83 78 20 01 cmp DWORD PTR [rax+32], 1 - 0029d 74 45 je SHORT $LN29@stbi__pars - 0029f 48 8b 85 f0 09 + 0029b 83 78 20 01 cmp DWORD PTR [rax+32], 1 + 0029f 74 45 je SHORT $LN29@stbi__pars + 002a1 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 002a6 83 78 20 02 cmp DWORD PTR [rax+32], 2 - 002aa 74 38 je SHORT $LN29@stbi__pars - 002ac 48 8b 85 f0 09 + 002a8 83 78 20 02 cmp DWORD PTR [rax+32], 2 + 002ac 74 38 je SHORT $LN29@stbi__pars + 002ae 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 002b3 83 78 20 04 cmp DWORD PTR [rax+32], 4 - 002b7 74 2b je SHORT $LN29@stbi__pars - 002b9 48 8b 85 f0 09 + 002b5 83 78 20 04 cmp DWORD PTR [rax+32], 4 + 002b9 74 2b je SHORT $LN29@stbi__pars + 002bb 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 002c0 83 78 20 08 cmp DWORD PTR [rax+32], 8 - 002c4 74 1e je SHORT $LN29@stbi__pars - 002c6 48 8b 85 f0 09 + 002c2 83 78 20 08 cmp DWORD PTR [rax+32], 8 + 002c6 74 1e je SHORT $LN29@stbi__pars + 002c8 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 002cd 83 78 20 10 cmp DWORD PTR [rax+32], 16 - 002d1 74 11 je SHORT $LN29@stbi__pars - 002d3 48 8d 0d 00 00 + 002cf 83 78 20 10 cmp DWORD PTR [rax+32], 16 + 002d3 74 11 je SHORT $LN29@stbi__pars + 002d5 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BE@EJHIPKNO@1?12?14?18?116?9bit?5only@ - 002da e8 00 00 00 00 call stbi__err - 002df e9 bb 0b 00 00 jmp $LN1@stbi__pars + 002dc e8 00 00 00 00 call stbi__err + 002e1 e9 c1 0b 00 00 jmp $LN1@stbi__pars $LN29@stbi__pars: ; 4629 : color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype", "Corrupt PNG"); - 002e4 48 8b 8d c8 05 + 002e6 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 002eb e8 00 00 00 00 call stbi__get8 - 002f0 0f b6 c0 movzx eax, al - 002f3 89 85 84 05 00 + 002ed e8 00 00 00 00 call stbi__get8 + 002f2 0f b6 c0 movzx eax, al + 002f5 89 85 84 05 00 00 mov DWORD PTR color$[rbp], eax - 002f9 83 bd 84 05 00 + 002fb 83 bd 84 05 00 00 06 cmp DWORD PTR color$[rbp], 6 - 00300 7e 11 jle SHORT $LN30@stbi__pars - 00302 48 8d 0d 00 00 + 00302 7e 11 jle SHORT $LN30@stbi__pars + 00304 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09MBBNGCKB@bad?5ctype@ - 00309 e8 00 00 00 00 call stbi__err - 0030e e9 8c 0b 00 00 jmp $LN1@stbi__pars + 0030b e8 00 00 00 00 call stbi__err + 00310 e9 92 0b 00 00 jmp $LN1@stbi__pars $LN30@stbi__pars: ; 4630 : if (color == 3 && z->depth == 16) return stbi__err("bad ctype", "Corrupt PNG"); - 00313 83 bd 84 05 00 + 00315 83 bd 84 05 00 00 03 cmp DWORD PTR color$[rbp], 3 - 0031a 75 1e jne SHORT $LN31@stbi__pars - 0031c 48 8b 85 f0 09 + 0031c 75 1e jne SHORT $LN31@stbi__pars + 0031e 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00323 83 78 20 10 cmp DWORD PTR [rax+32], 16 - 00327 75 11 jne SHORT $LN31@stbi__pars - 00329 48 8d 0d 00 00 + 00325 83 78 20 10 cmp DWORD PTR [rax+32], 16 + 00329 75 11 jne SHORT $LN31@stbi__pars + 0032b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09MBBNGCKB@bad?5ctype@ - 00330 e8 00 00 00 00 call stbi__err - 00335 e9 65 0b 00 00 jmp $LN1@stbi__pars + 00332 e8 00 00 00 00 call stbi__err + 00337 e9 6b 0b 00 00 jmp $LN1@stbi__pars $LN31@stbi__pars: ; 4631 : if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype", "Corrupt PNG"); - 0033a 83 bd 84 05 00 + 0033c 83 bd 84 05 00 00 03 cmp DWORD PTR color$[rbp], 3 - 00341 75 09 jne SHORT $LN32@stbi__pars - 00343 c6 85 24 04 00 + 00343 75 09 jne SHORT $LN32@stbi__pars + 00345 c6 85 24 04 00 00 03 mov BYTE PTR pal_img_n$[rbp], 3 - 0034a eb 1e jmp SHORT $LN33@stbi__pars + 0034c eb 1e jmp SHORT $LN33@stbi__pars $LN32@stbi__pars: - 0034c 8b 85 84 05 00 + 0034e 8b 85 84 05 00 00 mov eax, DWORD PTR color$[rbp] - 00352 83 e0 01 and eax, 1 - 00355 85 c0 test eax, eax - 00357 74 11 je SHORT $LN34@stbi__pars - 00359 48 8d 0d 00 00 + 00354 83 e0 01 and eax, 1 + 00357 85 c0 test eax, eax + 00359 74 11 je SHORT $LN34@stbi__pars + 0035b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09MBBNGCKB@bad?5ctype@ - 00360 e8 00 00 00 00 call stbi__err - 00365 e9 35 0b 00 00 jmp $LN1@stbi__pars + 00362 e8 00 00 00 00 call stbi__err + 00367 e9 3b 0b 00 00 jmp $LN1@stbi__pars $LN34@stbi__pars: $LN33@stbi__pars: ; 4632 : comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG"); - 0036a 48 8b 8d c8 05 + 0036c 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00371 e8 00 00 00 00 call stbi__get8 - 00376 0f b6 c0 movzx eax, al - 00379 89 85 04 06 00 + 00373 e8 00 00 00 00 call stbi__get8 + 00378 0f b6 c0 movzx eax, al + 0037b 89 85 04 06 00 00 mov DWORD PTR comp$9[rbp], eax - 0037f 83 bd 04 06 00 + 00381 83 bd 04 06 00 00 00 cmp DWORD PTR comp$9[rbp], 0 - 00386 74 11 je SHORT $LN35@stbi__pars - 00388 48 8d 0d 00 00 + 00388 74 11 je SHORT $LN35@stbi__pars + 0038a 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@MDMBDDFG@bad?5comp?5method@ - 0038f e8 00 00 00 00 call stbi__err - 00394 e9 06 0b 00 00 jmp $LN1@stbi__pars + 00391 e8 00 00 00 00 call stbi__err + 00396 e9 0c 0b 00 00 jmp $LN1@stbi__pars $LN35@stbi__pars: ; 4633 : filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG"); - 00399 48 8b 8d c8 05 + 0039b 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 003a0 e8 00 00 00 00 call stbi__get8 - 003a5 0f b6 c0 movzx eax, al - 003a8 89 85 24 06 00 + 003a2 e8 00 00 00 00 call stbi__get8 + 003a7 0f b6 c0 movzx eax, al + 003aa 89 85 24 06 00 00 mov DWORD PTR filter$10[rbp], eax - 003ae 83 bd 24 06 00 + 003b0 83 bd 24 06 00 00 00 cmp DWORD PTR filter$10[rbp], 0 - 003b5 74 11 je SHORT $LN36@stbi__pars - 003b7 48 8d 0d 00 00 + 003b7 74 11 je SHORT $LN36@stbi__pars + 003b9 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BC@GHLIKKMD@bad?5filter?5method@ - 003be e8 00 00 00 00 call stbi__err - 003c3 e9 d7 0a 00 00 jmp $LN1@stbi__pars + 003c0 e8 00 00 00 00 call stbi__err + 003c5 e9 dd 0a 00 00 jmp $LN1@stbi__pars $LN36@stbi__pars: ; 4634 : interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG"); - 003c8 48 8b 8d c8 05 + 003ca 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 003cf e8 00 00 00 00 call stbi__get8 - 003d4 0f b6 c0 movzx eax, al - 003d7 89 85 64 05 00 + 003d1 e8 00 00 00 00 call stbi__get8 + 003d6 0f b6 c0 movzx eax, al + 003d9 89 85 64 05 00 00 mov DWORD PTR interlace$[rbp], eax - 003dd 83 bd 64 05 00 + 003df 83 bd 64 05 00 00 01 cmp DWORD PTR interlace$[rbp], 1 - 003e4 7e 11 jle SHORT $LN37@stbi__pars - 003e6 48 8d 0d 00 00 + 003e6 7e 11 jle SHORT $LN37@stbi__pars + 003e8 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BF@JCGDPBAA@bad?5interlace?5method@ - 003ed e8 00 00 00 00 call stbi__err - 003f2 e9 a8 0a 00 00 jmp $LN1@stbi__pars + 003ef e8 00 00 00 00 call stbi__err + 003f4 e9 ae 0a 00 00 jmp $LN1@stbi__pars $LN37@stbi__pars: ; 4635 : if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG"); - 003f7 48 8b 85 c8 05 + 003f9 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 003fe 83 38 00 cmp DWORD PTR [rax], 0 - 00401 74 0d je SHORT $LN39@stbi__pars - 00403 48 8b 85 c8 05 + 00400 83 38 00 cmp DWORD PTR [rax], 0 + 00403 74 0d je SHORT $LN39@stbi__pars + 00405 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 0040a 83 78 04 00 cmp DWORD PTR [rax+4], 0 - 0040e 75 11 jne SHORT $LN38@stbi__pars + 0040c 83 78 04 00 cmp DWORD PTR [rax+4], 0 + 00410 75 11 jne SHORT $LN38@stbi__pars $LN39@stbi__pars: - 00410 48 8d 0d 00 00 + 00412 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0O@FNFBHCOO@0?9pixel?5image@ - 00417 e8 00 00 00 00 call stbi__err - 0041c e9 7e 0a 00 00 jmp $LN1@stbi__pars + 00419 e8 00 00 00 00 call stbi__err + 0041e e9 84 0a 00 00 jmp $LN1@stbi__pars $LN38@stbi__pars: ; 4636 : if (!pal_img_n) { - 00421 0f b6 85 24 04 + 00423 0f b6 85 24 04 00 00 movzx eax, BYTE PTR pal_img_n$[rbp] - 00428 85 c0 test eax, eax - 0042a 0f 85 9b 00 00 + 0042a 85 c0 test eax, eax + 0042c 0f 85 9b 00 00 00 jne $LN40@stbi__pars ; 4637 : s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); - 00430 8b 85 84 05 00 + 00432 8b 85 84 05 00 00 mov eax, DWORD PTR color$[rbp] - 00436 83 e0 02 and eax, 2 - 00439 85 c0 test eax, eax - 0043b 74 0c je SHORT $LN97@stbi__pars - 0043d c7 85 b4 09 00 + 00438 83 e0 02 and eax, 2 + 0043b 85 c0 test eax, eax + 0043d 74 0c je SHORT $LN97@stbi__pars + 0043f c7 85 b4 09 00 00 03 00 00 00 mov DWORD PTR tv194[rbp], 3 - 00447 eb 0a jmp SHORT $LN98@stbi__pars + 00449 eb 0a jmp SHORT $LN98@stbi__pars $LN97@stbi__pars: - 00449 c7 85 b4 09 00 + 0044b c7 85 b4 09 00 00 01 00 00 00 mov DWORD PTR tv194[rbp], 1 $LN98@stbi__pars: - 00453 8b 85 84 05 00 + 00455 8b 85 84 05 00 00 mov eax, DWORD PTR color$[rbp] - 00459 83 e0 04 and eax, 4 - 0045c 85 c0 test eax, eax - 0045e 74 0c je SHORT $LN99@stbi__pars - 00460 c7 85 b8 09 00 + 0045b 83 e0 04 and eax, 4 + 0045e 85 c0 test eax, eax + 00460 74 0c je SHORT $LN99@stbi__pars + 00462 c7 85 b8 09 00 00 01 00 00 00 mov DWORD PTR tv197[rbp], 1 - 0046a eb 0a jmp SHORT $LN100@stbi__pars + 0046c eb 0a jmp SHORT $LN100@stbi__pars $LN99@stbi__pars: - 0046c c7 85 b8 09 00 + 0046e c7 85 b8 09 00 00 00 00 00 00 mov DWORD PTR tv197[rbp], 0 $LN100@stbi__pars: - 00476 8b 85 b8 09 00 + 00478 8b 85 b8 09 00 00 mov eax, DWORD PTR tv197[rbp] - 0047c 8b 8d b4 09 00 + 0047e 8b 8d b4 09 00 00 mov ecx, DWORD PTR tv194[rbp] - 00482 03 c8 add ecx, eax - 00484 8b c1 mov eax, ecx - 00486 48 8b 8d c8 05 + 00484 03 c8 add ecx, eax + 00486 8b c1 mov eax, ecx + 00488 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 0048d 89 41 08 mov DWORD PTR [rcx+8], eax + 0048f 89 41 08 mov DWORD PTR [rcx+8], eax ; 4638 : if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); - 00490 33 d2 xor edx, edx - 00492 b8 00 00 00 40 mov eax, 1073741824 ; 40000000H - 00497 48 8b 8d c8 05 + 00492 33 d2 xor edx, edx + 00494 b8 00 00 00 40 mov eax, 1073741824 ; 40000000H + 00499 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 0049e f7 31 div DWORD PTR [rcx] - 004a0 33 d2 xor edx, edx - 004a2 48 8b 8d c8 05 + 004a0 f7 31 div DWORD PTR [rcx] + 004a2 33 d2 xor edx, edx + 004a4 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 004a9 f7 71 08 div DWORD PTR [rcx+8] - 004ac 48 8b 8d c8 05 + 004ab f7 71 08 div DWORD PTR [rcx+8] + 004ae 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 004b3 3b 41 04 cmp eax, DWORD PTR [rcx+4] - 004b6 73 11 jae SHORT $LN42@stbi__pars - 004b8 48 8d 0d 00 00 + 004b5 3b 41 04 cmp eax, DWORD PTR [rcx+4] + 004b8 73 11 jae SHORT $LN42@stbi__pars + 004ba 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 004bf e8 00 00 00 00 call stbi__err - 004c4 e9 d6 09 00 00 jmp $LN1@stbi__pars + 004c1 e8 00 00 00 00 call stbi__err + 004c6 e9 dc 09 00 00 jmp $LN1@stbi__pars $LN42@stbi__pars: ; 4639 : } - 004c9 eb 44 jmp SHORT $LN41@stbi__pars + 004cb eb 44 jmp SHORT $LN41@stbi__pars $LN40@stbi__pars: ; 4640 : else { @@ -13973,29 +14066,29 @@ $LN40@stbi__pars: ; 4642 : // img_n is # components to decompress/filter. ; 4643 : s->img_n = 1; - 004cb 48 8b 85 c8 05 + 004cd 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 004d2 c7 40 08 01 00 + 004d4 c7 40 08 01 00 00 00 mov DWORD PTR [rax+8], 1 ; 4644 : if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large", "Corrupt PNG"); - 004d9 33 d2 xor edx, edx - 004db b8 00 00 00 40 mov eax, 1073741824 ; 40000000H - 004e0 48 8b 8d c8 05 + 004db 33 d2 xor edx, edx + 004dd b8 00 00 00 40 mov eax, 1073741824 ; 40000000H + 004e2 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 004e7 f7 31 div DWORD PTR [rcx] - 004e9 33 d2 xor edx, edx - 004eb b9 04 00 00 00 mov ecx, 4 - 004f0 f7 f1 div ecx - 004f2 48 8b 8d c8 05 + 004e9 f7 31 div DWORD PTR [rcx] + 004eb 33 d2 xor edx, edx + 004ed b9 04 00 00 00 mov ecx, 4 + 004f2 f7 f1 div ecx + 004f4 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 004f9 3b 41 04 cmp eax, DWORD PTR [rcx+4] - 004fc 73 11 jae SHORT $LN43@stbi__pars - 004fe 48 8d 0d 00 00 + 004fb 3b 41 04 cmp eax, DWORD PTR [rcx+4] + 004fe 73 11 jae SHORT $LN43@stbi__pars + 00500 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 00505 e8 00 00 00 00 call stbi__err - 0050a e9 90 09 00 00 jmp $LN1@stbi__pars + 00507 e8 00 00 00 00 call stbi__err + 0050c e9 96 09 00 00 jmp $LN1@stbi__pars $LN43@stbi__pars: $LN41@stbi__pars: @@ -14003,7 +14096,7 @@ $LN41@stbi__pars: ; 4646 : // even with SCAN_header, have to scan to see if we have a tRNS ; 4647 : break; - 0050f e9 7a 09 00 00 jmp $LN5@stbi__pars + 00511 e9 7f 09 00 00 jmp $LN5@stbi__pars $LN44@stbi__pars: ; 4648 : } @@ -14011,119 +14104,119 @@ $LN44@stbi__pars: ; 4650 : case STBI__PNG_TYPE('P', 'L', 'T', 'E'): { ; 4651 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - 00514 83 bd 24 05 00 + 00516 83 bd 24 05 00 00 00 cmp DWORD PTR first$[rbp], 0 - 0051b 74 11 je SHORT $LN45@stbi__pars - 0051d 48 8d 0d 00 00 + 0051d 74 11 je SHORT $LN45@stbi__pars + 0051f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0P@JEAFOMAF@first?5not?5IHDR@ - 00524 e8 00 00 00 00 call stbi__err - 00529 e9 71 09 00 00 jmp $LN1@stbi__pars + 00526 e8 00 00 00 00 call stbi__err + 0052b e9 77 09 00 00 jmp $LN1@stbi__pars $LN45@stbi__pars: ; 4652 : if (c.length > 256 * 3) return stbi__err("invalid PLTE", "Corrupt PNG"); - 0052e 81 bd e8 05 00 + 00530 81 bd e8 05 00 00 00 03 00 00 cmp DWORD PTR c$8[rbp], 768 ; 00000300H - 00538 76 11 jbe SHORT $LN46@stbi__pars - 0053a 48 8d 0d 00 00 + 0053a 76 11 jbe SHORT $LN46@stbi__pars + 0053c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0N@JCPAJAKB@invalid?5PLTE@ - 00541 e8 00 00 00 00 call stbi__err - 00546 e9 54 09 00 00 jmp $LN1@stbi__pars + 00543 e8 00 00 00 00 call stbi__err + 00548 e9 5a 09 00 00 jmp $LN1@stbi__pars $LN46@stbi__pars: ; 4653 : pal_len = c.length / 3; - 0054b 33 d2 xor edx, edx - 0054d 8b 85 e8 05 00 + 0054d 33 d2 xor edx, edx + 0054f 8b 85 e8 05 00 00 mov eax, DWORD PTR c$8[rbp] - 00553 b9 03 00 00 00 mov ecx, 3 - 00558 f7 f1 div ecx - 0055a 89 85 04 05 00 + 00555 b9 03 00 00 00 mov ecx, 3 + 0055a f7 f1 div ecx + 0055c 89 85 04 05 00 00 mov DWORD PTR pal_len$[rbp], eax ; 4654 : if (pal_len * 3 != c.length) return stbi__err("invalid PLTE", "Corrupt PNG"); - 00560 6b 85 04 05 00 + 00562 6b 85 04 05 00 00 03 imul eax, DWORD PTR pal_len$[rbp], 3 - 00567 3b 85 e8 05 00 + 00569 3b 85 e8 05 00 00 cmp eax, DWORD PTR c$8[rbp] - 0056d 74 11 je SHORT $LN47@stbi__pars - 0056f 48 8d 0d 00 00 + 0056f 74 11 je SHORT $LN47@stbi__pars + 00571 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0N@JCPAJAKB@invalid?5PLTE@ - 00576 e8 00 00 00 00 call stbi__err - 0057b e9 1f 09 00 00 jmp $LN1@stbi__pars + 00578 e8 00 00 00 00 call stbi__err + 0057d e9 25 09 00 00 jmp $LN1@stbi__pars $LN47@stbi__pars: ; 4655 : for (i = 0; i < pal_len; ++i) { - 00580 c7 85 e4 04 00 + 00582 c7 85 e4 04 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0058a eb 0e jmp SHORT $LN9@stbi__pars + 0058c eb 0e jmp SHORT $LN9@stbi__pars $LN7@stbi__pars: - 0058c 8b 85 e4 04 00 + 0058e 8b 85 e4 04 00 00 mov eax, DWORD PTR i$[rbp] - 00592 ff c0 inc eax - 00594 89 85 e4 04 00 + 00594 ff c0 inc eax + 00596 89 85 e4 04 00 00 mov DWORD PTR i$[rbp], eax $LN9@stbi__pars: - 0059a 8b 85 04 05 00 + 0059c 8b 85 04 05 00 00 mov eax, DWORD PTR pal_len$[rbp] - 005a0 39 85 e4 04 00 + 005a2 39 85 e4 04 00 00 cmp DWORD PTR i$[rbp], eax - 005a6 73 72 jae SHORT $LN8@stbi__pars + 005a8 73 72 jae SHORT $LN8@stbi__pars ; 4656 : palette[i * 4 + 0] = stbi__get8(s); - 005a8 48 8b 8d c8 05 + 005aa 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 005af e8 00 00 00 00 call stbi__get8 - 005b4 8b 8d e4 04 00 + 005b1 e8 00 00 00 00 call stbi__get8 + 005b6 8b 8d e4 04 00 00 mov ecx, DWORD PTR i$[rbp] - 005ba c1 e1 02 shl ecx, 2 - 005bd 8b c9 mov ecx, ecx - 005bf 88 44 0d 10 mov BYTE PTR palette$[rbp+rcx], al + 005bc c1 e1 02 shl ecx, 2 + 005bf 8b c9 mov ecx, ecx + 005c1 88 44 0d 10 mov BYTE PTR palette$[rbp+rcx], al ; 4657 : palette[i * 4 + 1] = stbi__get8(s); - 005c3 48 8b 8d c8 05 + 005c5 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 005ca e8 00 00 00 00 call stbi__get8 - 005cf 8b 8d e4 04 00 + 005cc e8 00 00 00 00 call stbi__get8 + 005d1 8b 8d e4 04 00 00 mov ecx, DWORD PTR i$[rbp] - 005d5 8d 0c 8d 01 00 + 005d7 8d 0c 8d 01 00 00 00 lea ecx, DWORD PTR [rcx*4+1] - 005dc 8b c9 mov ecx, ecx - 005de 88 44 0d 10 mov BYTE PTR palette$[rbp+rcx], al + 005de 8b c9 mov ecx, ecx + 005e0 88 44 0d 10 mov BYTE PTR palette$[rbp+rcx], al ; 4658 : palette[i * 4 + 2] = stbi__get8(s); - 005e2 48 8b 8d c8 05 + 005e4 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 005e9 e8 00 00 00 00 call stbi__get8 - 005ee 8b 8d e4 04 00 + 005eb e8 00 00 00 00 call stbi__get8 + 005f0 8b 8d e4 04 00 00 mov ecx, DWORD PTR i$[rbp] - 005f4 8d 0c 8d 02 00 + 005f6 8d 0c 8d 02 00 00 00 lea ecx, DWORD PTR [rcx*4+2] - 005fb 8b c9 mov ecx, ecx - 005fd 88 44 0d 10 mov BYTE PTR palette$[rbp+rcx], al + 005fd 8b c9 mov ecx, ecx + 005ff 88 44 0d 10 mov BYTE PTR palette$[rbp+rcx], al ; 4659 : palette[i * 4 + 3] = 255; - 00601 8b 85 e4 04 00 + 00603 8b 85 e4 04 00 00 mov eax, DWORD PTR i$[rbp] - 00607 8d 04 85 03 00 + 00609 8d 04 85 03 00 00 00 lea eax, DWORD PTR [rax*4+3] - 0060e 8b c0 mov eax, eax - 00610 c6 44 05 10 ff mov BYTE PTR palette$[rbp+rax], 255 ; 000000ffH + 00610 8b c0 mov eax, eax + 00612 c6 44 05 10 ff mov BYTE PTR palette$[rbp+rax], 255 ; 000000ffH ; 4660 : } - 00615 e9 72 ff ff ff jmp $LN7@stbi__pars + 00617 e9 72 ff ff ff jmp $LN7@stbi__pars $LN8@stbi__pars: ; 4661 : break; - 0061a e9 6f 08 00 00 jmp $LN5@stbi__pars + 0061c e9 74 08 00 00 jmp $LN5@stbi__pars $LN48@stbi__pars: ; 4662 : } @@ -14131,242 +14224,242 @@ $LN48@stbi__pars: ; 4664 : case STBI__PNG_TYPE('t', 'R', 'N', 'S'): { ; 4665 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - 0061f 83 bd 24 05 00 + 00621 83 bd 24 05 00 00 00 cmp DWORD PTR first$[rbp], 0 - 00626 74 11 je SHORT $LN49@stbi__pars - 00628 48 8d 0d 00 00 + 00628 74 11 je SHORT $LN49@stbi__pars + 0062a 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0P@JEAFOMAF@first?5not?5IHDR@ - 0062f e8 00 00 00 00 call stbi__err - 00634 e9 66 08 00 00 jmp $LN1@stbi__pars + 00631 e8 00 00 00 00 call stbi__err + 00636 e9 6c 08 00 00 jmp $LN1@stbi__pars $LN49@stbi__pars: ; 4666 : if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG"); - 00639 48 8b 85 f0 09 + 0063b 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00640 48 83 78 08 00 cmp QWORD PTR [rax+8], 0 - 00645 74 11 je SHORT $LN50@stbi__pars - 00647 48 8d 0d 00 00 + 00642 48 83 78 08 00 cmp QWORD PTR [rax+8], 0 + 00647 74 11 je SHORT $LN50@stbi__pars + 00649 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@PCPJHDKJ@tRNS?5after?5IDAT@ - 0064e e8 00 00 00 00 call stbi__err - 00653 e9 47 08 00 00 jmp $LN1@stbi__pars + 00650 e8 00 00 00 00 call stbi__err + 00655 e9 4d 08 00 00 jmp $LN1@stbi__pars $LN50@stbi__pars: ; 4667 : if (pal_img_n) { - 00658 0f b6 85 24 04 + 0065a 0f b6 85 24 04 00 00 movzx eax, BYTE PTR pal_img_n$[rbp] - 0065f 85 c0 test eax, eax - 00661 0f 84 af 00 00 + 00661 85 c0 test eax, eax + 00663 0f 84 af 00 00 00 je $LN51@stbi__pars ; 4668 : if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } - 00667 83 bd f8 09 00 + 00669 83 bd f8 09 00 00 02 cmp DWORD PTR scan$[rbp], 2 - 0066e 75 18 jne SHORT $LN53@stbi__pars - 00670 48 8b 85 c8 05 + 00670 75 18 jne SHORT $LN53@stbi__pars + 00672 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00677 c7 40 08 04 00 + 00679 c7 40 08 04 00 00 00 mov DWORD PTR [rax+8], 4 - 0067e b8 01 00 00 00 mov eax, 1 - 00683 e9 17 08 00 00 jmp $LN1@stbi__pars + 00680 b8 01 00 00 00 mov eax, 1 + 00685 e9 1d 08 00 00 jmp $LN1@stbi__pars $LN53@stbi__pars: ; 4669 : if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG"); - 00688 83 bd 04 05 00 + 0068a 83 bd 04 05 00 00 00 cmp DWORD PTR pal_len$[rbp], 0 - 0068f 75 11 jne SHORT $LN54@stbi__pars - 00691 48 8d 0d 00 00 + 00691 75 11 jne SHORT $LN54@stbi__pars + 00693 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@CEDNNLBG@tRNS?5before?5PLTE@ - 00698 e8 00 00 00 00 call stbi__err - 0069d e9 fd 07 00 00 jmp $LN1@stbi__pars + 0069a e8 00 00 00 00 call stbi__err + 0069f e9 03 08 00 00 jmp $LN1@stbi__pars $LN54@stbi__pars: ; 4670 : if (c.length > pal_len) return stbi__err("bad tRNS len", "Corrupt PNG"); - 006a2 8b 85 04 05 00 + 006a4 8b 85 04 05 00 00 mov eax, DWORD PTR pal_len$[rbp] - 006a8 39 85 e8 05 00 + 006aa 39 85 e8 05 00 00 cmp DWORD PTR c$8[rbp], eax - 006ae 76 11 jbe SHORT $LN55@stbi__pars - 006b0 48 8d 0d 00 00 + 006b0 76 11 jbe SHORT $LN55@stbi__pars + 006b2 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0N@KDLCCKCH@bad?5tRNS?5len@ - 006b7 e8 00 00 00 00 call stbi__err - 006bc e9 de 07 00 00 jmp $LN1@stbi__pars + 006b9 e8 00 00 00 00 call stbi__err + 006be e9 e4 07 00 00 jmp $LN1@stbi__pars $LN55@stbi__pars: ; 4671 : pal_img_n = 4; - 006c1 c6 85 24 04 00 + 006c3 c6 85 24 04 00 00 04 mov BYTE PTR pal_img_n$[rbp], 4 ; 4672 : for (i = 0; i < c.length; ++i) - 006c8 c7 85 e4 04 00 + 006ca c7 85 e4 04 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 006d2 eb 0e jmp SHORT $LN12@stbi__pars + 006d4 eb 0e jmp SHORT $LN12@stbi__pars $LN10@stbi__pars: - 006d4 8b 85 e4 04 00 + 006d6 8b 85 e4 04 00 00 mov eax, DWORD PTR i$[rbp] - 006da ff c0 inc eax - 006dc 89 85 e4 04 00 + 006dc ff c0 inc eax + 006de 89 85 e4 04 00 00 mov DWORD PTR i$[rbp], eax $LN12@stbi__pars: - 006e2 8b 85 e8 05 00 + 006e4 8b 85 e8 05 00 00 mov eax, DWORD PTR c$8[rbp] - 006e8 39 85 e4 04 00 + 006ea 39 85 e4 04 00 00 cmp DWORD PTR i$[rbp], eax - 006ee 73 21 jae SHORT $LN11@stbi__pars + 006f0 73 21 jae SHORT $LN11@stbi__pars ; 4673 : palette[i * 4 + 3] = stbi__get8(s); - 006f0 48 8b 8d c8 05 + 006f2 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 006f7 e8 00 00 00 00 call stbi__get8 - 006fc 8b 8d e4 04 00 + 006f9 e8 00 00 00 00 call stbi__get8 + 006fe 8b 8d e4 04 00 00 mov ecx, DWORD PTR i$[rbp] - 00702 8d 0c 8d 03 00 + 00704 8d 0c 8d 03 00 00 00 lea ecx, DWORD PTR [rcx*4+3] - 00709 8b c9 mov ecx, ecx - 0070b 88 44 0d 10 mov BYTE PTR palette$[rbp+rcx], al - 0070f eb c3 jmp SHORT $LN10@stbi__pars + 0070b 8b c9 mov ecx, ecx + 0070d 88 44 0d 10 mov BYTE PTR palette$[rbp+rcx], al + 00711 eb c3 jmp SHORT $LN10@stbi__pars $LN11@stbi__pars: ; 4674 : } - 00711 e9 38 01 00 00 jmp $LN52@stbi__pars + 00713 e9 38 01 00 00 jmp $LN52@stbi__pars $LN51@stbi__pars: ; 4675 : else { ; 4676 : if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG"); - 00716 48 8b 85 c8 05 + 00718 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 0071d 8b 40 08 mov eax, DWORD PTR [rax+8] - 00720 83 e0 01 and eax, 1 - 00723 85 c0 test eax, eax - 00725 75 11 jne SHORT $LN56@stbi__pars - 00727 48 8d 0d 00 00 + 0071f 8b 40 08 mov eax, DWORD PTR [rax+8] + 00722 83 e0 01 and eax, 1 + 00725 85 c0 test eax, eax + 00727 75 11 jne SHORT $LN56@stbi__pars + 00729 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@ENDPGCHB@tRNS?5with?5alpha@ - 0072e e8 00 00 00 00 call stbi__err - 00733 e9 67 07 00 00 jmp $LN1@stbi__pars + 00730 e8 00 00 00 00 call stbi__err + 00735 e9 6d 07 00 00 jmp $LN1@stbi__pars $LN56@stbi__pars: ; 4677 : if (c.length != (stbi__uint32)s->img_n * 2) return stbi__err("bad tRNS len", "Corrupt PNG"); - 00738 48 8b 85 c8 05 + 0073a 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 0073f 8b 40 08 mov eax, DWORD PTR [rax+8] - 00742 d1 e0 shl eax, 1 - 00744 39 85 e8 05 00 + 00741 8b 40 08 mov eax, DWORD PTR [rax+8] + 00744 d1 e0 shl eax, 1 + 00746 39 85 e8 05 00 00 cmp DWORD PTR c$8[rbp], eax - 0074a 74 11 je SHORT $LN57@stbi__pars - 0074c 48 8d 0d 00 00 + 0074c 74 11 je SHORT $LN57@stbi__pars + 0074e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0N@KDLCCKCH@bad?5tRNS?5len@ - 00753 e8 00 00 00 00 call stbi__err - 00758 e9 42 07 00 00 jmp $LN1@stbi__pars + 00755 e8 00 00 00 00 call stbi__err + 0075a e9 48 07 00 00 jmp $LN1@stbi__pars $LN57@stbi__pars: ; 4678 : has_trans = 1; - 0075d c6 85 44 04 00 + 0075f c6 85 44 04 00 00 01 mov BYTE PTR has_trans$[rbp], 1 ; 4679 : // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. ; 4680 : if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } - 00764 83 bd f8 09 00 + 00766 83 bd f8 09 00 00 02 cmp DWORD PTR scan$[rbp], 2 - 0076b 75 20 jne SHORT $LN58@stbi__pars - 0076d 48 8b 85 c8 05 + 0076d 75 20 jne SHORT $LN58@stbi__pars + 0076f 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00774 8b 40 08 mov eax, DWORD PTR [rax+8] - 00777 ff c0 inc eax - 00779 48 8b 8d c8 05 + 00776 8b 40 08 mov eax, DWORD PTR [rax+8] + 00779 ff c0 inc eax + 0077b 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00780 89 41 08 mov DWORD PTR [rcx+8], eax - 00783 b8 01 00 00 00 mov eax, 1 - 00788 e9 12 07 00 00 jmp $LN1@stbi__pars + 00782 89 41 08 mov DWORD PTR [rcx+8], eax + 00785 b8 01 00 00 00 mov eax, 1 + 0078a e9 18 07 00 00 jmp $LN1@stbi__pars $LN58@stbi__pars: ; 4681 : if (z->depth == 16) { - 0078d 48 8b 85 f0 09 + 0078f 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00794 83 78 20 10 cmp DWORD PTR [rax+32], 16 - 00798 75 4b jne SHORT $LN59@stbi__pars + 00796 83 78 20 10 cmp DWORD PTR [rax+32], 16 + 0079a 75 4b jne SHORT $LN59@stbi__pars ; 4682 : for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is - 0079a c7 85 44 05 00 + 0079c c7 85 44 05 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 007a4 eb 0e jmp SHORT $LN15@stbi__pars + 007a6 eb 0e jmp SHORT $LN15@stbi__pars $LN13@stbi__pars: - 007a6 8b 85 44 05 00 + 007a8 8b 85 44 05 00 00 mov eax, DWORD PTR k$[rbp] - 007ac ff c0 inc eax - 007ae 89 85 44 05 00 + 007ae ff c0 inc eax + 007b0 89 85 44 05 00 00 mov DWORD PTR k$[rbp], eax $LN15@stbi__pars: - 007b4 48 8b 85 c8 05 + 007b6 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 007bb 8b 40 08 mov eax, DWORD PTR [rax+8] - 007be 39 85 44 05 00 + 007bd 8b 40 08 mov eax, DWORD PTR [rax+8] + 007c0 39 85 44 05 00 00 cmp DWORD PTR k$[rbp], eax - 007c4 7d 1d jge SHORT $LN14@stbi__pars - 007c6 48 8b 8d c8 05 + 007c6 7d 1d jge SHORT $LN14@stbi__pars + 007c8 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 007cd e8 00 00 00 00 call stbi__get16be - 007d2 48 63 8d 44 05 + 007cf e8 00 00 00 00 call stbi__get16be + 007d4 48 63 8d 44 05 00 00 movsxd rcx, DWORD PTR k$[rbp] - 007d9 66 89 84 4d 84 + 007db 66 89 84 4d 84 04 00 00 mov WORD PTR tc16$[rbp+rcx*2], ax - 007e1 eb c3 jmp SHORT $LN13@stbi__pars + 007e3 eb c3 jmp SHORT $LN13@stbi__pars $LN14@stbi__pars: ; 4683 : } - 007e3 eb 69 jmp SHORT $LN60@stbi__pars + 007e5 eb 69 jmp SHORT $LN60@stbi__pars $LN59@stbi__pars: ; 4684 : else { ; 4685 : for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger - 007e5 c7 85 44 05 00 + 007e7 c7 85 44 05 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 007ef eb 0e jmp SHORT $LN18@stbi__pars + 007f1 eb 0e jmp SHORT $LN18@stbi__pars $LN16@stbi__pars: - 007f1 8b 85 44 05 00 + 007f3 8b 85 44 05 00 00 mov eax, DWORD PTR k$[rbp] - 007f7 ff c0 inc eax - 007f9 89 85 44 05 00 + 007f9 ff c0 inc eax + 007fb 89 85 44 05 00 00 mov DWORD PTR k$[rbp], eax $LN18@stbi__pars: - 007ff 48 8b 85 c8 05 + 00801 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00806 8b 40 08 mov eax, DWORD PTR [rax+8] - 00809 39 85 44 05 00 + 00808 8b 40 08 mov eax, DWORD PTR [rax+8] + 0080b 39 85 44 05 00 00 cmp DWORD PTR k$[rbp], eax - 0080f 7d 3d jge SHORT $LN17@stbi__pars - 00811 48 8b 8d c8 05 + 00811 7d 3d jge SHORT $LN17@stbi__pars + 00813 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00818 e8 00 00 00 00 call stbi__get16be - 0081d 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00822 0f b6 c0 movzx eax, al - 00825 48 8b 8d f0 09 + 0081a e8 00 00 00 00 call stbi__get16be + 0081f 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00824 0f b6 c0 movzx eax, al + 00827 48 8b 8d f0 09 00 00 mov rcx, QWORD PTR z$[rbp] - 0082c 48 63 49 20 movsxd rcx, DWORD PTR [rcx+32] - 00830 48 8d 15 00 00 + 0082e 48 63 49 20 movsxd rcx, DWORD PTR [rcx+32] + 00832 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__depth_scale_table - 00837 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 0083b 0f af c1 imul eax, ecx - 0083e 48 63 8d 44 05 + 00839 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 0083d 0f af c1 imul eax, ecx + 00840 48 63 8d 44 05 00 00 movsxd rcx, DWORD PTR k$[rbp] - 00845 88 84 0d 64 04 + 00847 88 84 0d 64 04 00 00 mov BYTE PTR tc$[rbp+rcx], al - 0084c eb a3 jmp SHORT $LN16@stbi__pars + 0084e eb a3 jmp SHORT $LN16@stbi__pars $LN17@stbi__pars: $LN60@stbi__pars: $LN52@stbi__pars: @@ -14375,7 +14468,7 @@ $LN52@stbi__pars: ; 4687 : } ; 4688 : break; - 0084e e9 3b 06 00 00 jmp $LN5@stbi__pars + 00850 e9 40 06 00 00 jmp $LN5@stbi__pars $LN61@stbi__pars: ; 4689 : } @@ -14383,220 +14476,220 @@ $LN61@stbi__pars: ; 4691 : case STBI__PNG_TYPE('I', 'D', 'A', 'T'): { ; 4692 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - 00853 83 bd 24 05 00 + 00855 83 bd 24 05 00 00 00 cmp DWORD PTR first$[rbp], 0 - 0085a 74 11 je SHORT $LN62@stbi__pars - 0085c 48 8d 0d 00 00 + 0085c 74 11 je SHORT $LN62@stbi__pars + 0085e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0P@JEAFOMAF@first?5not?5IHDR@ - 00863 e8 00 00 00 00 call stbi__err - 00868 e9 32 06 00 00 jmp $LN1@stbi__pars + 00865 e8 00 00 00 00 call stbi__err + 0086a e9 38 06 00 00 jmp $LN1@stbi__pars $LN62@stbi__pars: ; 4693 : if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG"); - 0086d 0f b6 85 24 04 + 0086f 0f b6 85 24 04 00 00 movzx eax, BYTE PTR pal_img_n$[rbp] - 00874 85 c0 test eax, eax - 00876 74 1a je SHORT $LN63@stbi__pars - 00878 83 bd 04 05 00 + 00876 85 c0 test eax, eax + 00878 74 1a je SHORT $LN63@stbi__pars + 0087a 83 bd 04 05 00 00 00 cmp DWORD PTR pal_len$[rbp], 0 - 0087f 75 11 jne SHORT $LN63@stbi__pars - 00881 48 8d 0d 00 00 + 00881 75 11 jne SHORT $LN63@stbi__pars + 00883 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07CKIELOEH@no?5PLTE@ - 00888 e8 00 00 00 00 call stbi__err - 0088d e9 0d 06 00 00 jmp $LN1@stbi__pars + 0088a e8 00 00 00 00 call stbi__err + 0088f e9 13 06 00 00 jmp $LN1@stbi__pars $LN63@stbi__pars: ; 4694 : if (scan == STBI__SCAN_header) { - 00892 83 bd f8 09 00 + 00894 83 bd f8 09 00 00 02 cmp DWORD PTR scan$[rbp], 2 - 00899 75 26 jne SHORT $LN64@stbi__pars + 0089b 75 26 jne SHORT $LN64@stbi__pars ; 4695 : // header scan definitely stops at first IDAT ; 4696 : if (pal_img_n) - 0089b 0f b6 85 24 04 + 0089d 0f b6 85 24 04 00 00 movzx eax, BYTE PTR pal_img_n$[rbp] - 008a2 85 c0 test eax, eax - 008a4 74 11 je SHORT $LN65@stbi__pars + 008a4 85 c0 test eax, eax + 008a6 74 11 je SHORT $LN65@stbi__pars ; 4697 : s->img_n = pal_img_n; - 008a6 0f b6 85 24 04 + 008a8 0f b6 85 24 04 00 00 movzx eax, BYTE PTR pal_img_n$[rbp] - 008ad 48 8b 8d c8 05 + 008af 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 008b4 89 41 08 mov DWORD PTR [rcx+8], eax + 008b6 89 41 08 mov DWORD PTR [rcx+8], eax $LN65@stbi__pars: ; 4698 : return 1; - 008b7 b8 01 00 00 00 mov eax, 1 - 008bc e9 de 05 00 00 jmp $LN1@stbi__pars + 008b9 b8 01 00 00 00 mov eax, 1 + 008be e9 e4 05 00 00 jmp $LN1@stbi__pars $LN64@stbi__pars: ; 4699 : } ; 4700 : if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); - 008c1 81 bd e8 05 00 + 008c3 81 bd e8 05 00 00 00 00 00 40 cmp DWORD PTR c$8[rbp], 1073741824 ; 40000000H - 008cb 76 11 jbe SHORT $LN66@stbi__pars - 008cd 48 8d 0d 00 00 + 008cd 76 11 jbe SHORT $LN66@stbi__pars + 008cf 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@PLHGLONG@IDAT?5size?5limit@ - 008d4 e8 00 00 00 00 call stbi__err - 008d9 e9 c1 05 00 00 jmp $LN1@stbi__pars + 008d6 e8 00 00 00 00 call stbi__err + 008db e9 c7 05 00 00 jmp $LN1@stbi__pars $LN66@stbi__pars: ; 4701 : if ((int)(ioff + c.length) < (int)ioff) return 0; - 008de 8b 85 e8 05 00 + 008e0 8b 85 e8 05 00 00 mov eax, DWORD PTR c$8[rbp] - 008e4 8b 8d a4 04 00 + 008e6 8b 8d a4 04 00 00 mov ecx, DWORD PTR ioff$[rbp] - 008ea 03 c8 add ecx, eax - 008ec 8b c1 mov eax, ecx - 008ee 3b 85 a4 04 00 + 008ec 03 c8 add ecx, eax + 008ee 8b c1 mov eax, ecx + 008f0 3b 85 a4 04 00 00 cmp eax, DWORD PTR ioff$[rbp] - 008f4 7d 07 jge SHORT $LN67@stbi__pars - 008f6 33 c0 xor eax, eax - 008f8 e9 a2 05 00 00 jmp $LN1@stbi__pars + 008f6 7d 07 jge SHORT $LN67@stbi__pars + 008f8 33 c0 xor eax, eax + 008fa e9 a8 05 00 00 jmp $LN1@stbi__pars $LN67@stbi__pars: ; 4702 : if (ioff + c.length > idata_limit) { - 008fd 8b 85 e8 05 00 + 008ff 8b 85 e8 05 00 00 mov eax, DWORD PTR c$8[rbp] - 00903 8b 8d a4 04 00 + 00905 8b 8d a4 04 00 00 mov ecx, DWORD PTR ioff$[rbp] - 00909 03 c8 add ecx, eax - 0090b 8b c1 mov eax, ecx - 0090d 3b 85 c4 04 00 + 0090b 03 c8 add ecx, eax + 0090d 8b c1 mov eax, ecx + 0090f 3b 85 c4 04 00 00 cmp eax, DWORD PTR idata_limit$[rbp] - 00913 0f 86 ba 00 00 + 00915 0f 86 ba 00 00 00 jbe $LN68@stbi__pars ; 4703 : stbi__uint32 idata_limit_old = idata_limit; - 00919 8b 85 c4 04 00 + 0091b 8b 85 c4 04 00 00 mov eax, DWORD PTR idata_limit$[rbp] - 0091f 89 85 44 06 00 + 00921 89 85 44 06 00 00 mov DWORD PTR idata_limit_old$11[rbp], eax ; 4704 : stbi_uc* p; ; 4705 : if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; - 00925 83 bd c4 04 00 + 00927 83 bd c4 04 00 00 00 cmp DWORD PTR idata_limit$[rbp], 0 - 0092c 75 30 jne SHORT $LN69@stbi__pars - 0092e 81 bd e8 05 00 + 0092e 75 30 jne SHORT $LN69@stbi__pars + 00930 81 bd e8 05 00 00 00 10 00 00 cmp DWORD PTR c$8[rbp], 4096 ; 00001000H - 00938 76 0e jbe SHORT $LN101@stbi__pars - 0093a 8b 85 e8 05 00 + 0093a 76 0e jbe SHORT $LN101@stbi__pars + 0093c 8b 85 e8 05 00 00 mov eax, DWORD PTR c$8[rbp] - 00940 89 85 b4 09 00 + 00942 89 85 b4 09 00 00 mov DWORD PTR tv345[rbp], eax - 00946 eb 0a jmp SHORT $LN102@stbi__pars + 00948 eb 0a jmp SHORT $LN102@stbi__pars $LN101@stbi__pars: - 00948 c7 85 b4 09 00 + 0094a c7 85 b4 09 00 00 00 10 00 00 mov DWORD PTR tv345[rbp], 4096 ; 00001000H $LN102@stbi__pars: - 00952 8b 85 b4 09 00 + 00954 8b 85 b4 09 00 00 mov eax, DWORD PTR tv345[rbp] - 00958 89 85 c4 04 00 + 0095a 89 85 c4 04 00 00 mov DWORD PTR idata_limit$[rbp], eax $LN69@stbi__pars: $LN19@stbi__pars: ; 4706 : while (ioff + c.length > idata_limit) - 0095e 8b 85 e8 05 00 + 00960 8b 85 e8 05 00 00 mov eax, DWORD PTR c$8[rbp] - 00964 8b 8d a4 04 00 + 00966 8b 8d a4 04 00 00 mov ecx, DWORD PTR ioff$[rbp] - 0096a 03 c8 add ecx, eax - 0096c 8b c1 mov eax, ecx - 0096e 3b 85 c4 04 00 + 0096c 03 c8 add ecx, eax + 0096e 8b c1 mov eax, ecx + 00970 3b 85 c4 04 00 00 cmp eax, DWORD PTR idata_limit$[rbp] - 00974 76 10 jbe SHORT $LN20@stbi__pars + 00976 76 10 jbe SHORT $LN20@stbi__pars ; 4707 : idata_limit *= 2; - 00976 8b 85 c4 04 00 + 00978 8b 85 c4 04 00 00 mov eax, DWORD PTR idata_limit$[rbp] - 0097c d1 e0 shl eax, 1 - 0097e 89 85 c4 04 00 + 0097e d1 e0 shl eax, 1 + 00980 89 85 c4 04 00 00 mov DWORD PTR idata_limit$[rbp], eax - 00984 eb d8 jmp SHORT $LN19@stbi__pars + 00986 eb d8 jmp SHORT $LN19@stbi__pars $LN20@stbi__pars: ; 4708 : STBI_NOTUSED(idata_limit_old); ; 4709 : p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); - 00986 8b 85 c4 04 00 + 00988 8b 85 c4 04 00 00 mov eax, DWORD PTR idata_limit$[rbp] - 0098c 8b d0 mov edx, eax - 0098e 48 8b 85 f0 09 + 0098e 8b d0 mov edx, eax + 00990 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00995 48 8b 48 08 mov rcx, QWORD PTR [rax+8] - 00999 ff 15 00 00 00 + 00997 48 8b 48 08 mov rcx, QWORD PTR [rax+8] + 0099b ff 15 00 00 00 00 call QWORD PTR __imp_realloc - 0099f 48 89 85 68 06 + 009a1 48 89 85 68 06 00 00 mov QWORD PTR p$12[rbp], rax - 009a6 48 83 bd 68 06 + 009a8 48 83 bd 68 06 00 00 00 cmp QWORD PTR p$12[rbp], 0 - 009ae 75 11 jne SHORT $LN70@stbi__pars - 009b0 48 8d 0d 00 00 + 009b0 75 11 jne SHORT $LN70@stbi__pars + 009b2 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 009b7 e8 00 00 00 00 call stbi__err - 009bc e9 de 04 00 00 jmp $LN1@stbi__pars + 009b9 e8 00 00 00 00 call stbi__err + 009be e9 e4 04 00 00 jmp $LN1@stbi__pars $LN70@stbi__pars: ; 4710 : z->idata = p; - 009c1 48 8b 85 f0 09 + 009c3 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 009c8 48 8b 8d 68 06 + 009ca 48 8b 8d 68 06 00 00 mov rcx, QWORD PTR p$12[rbp] - 009cf 48 89 48 08 mov QWORD PTR [rax+8], rcx + 009d1 48 89 48 08 mov QWORD PTR [rax+8], rcx $LN68@stbi__pars: ; 4711 : } ; 4712 : if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG"); - 009d3 8b 85 a4 04 00 + 009d5 8b 85 a4 04 00 00 mov eax, DWORD PTR ioff$[rbp] - 009d9 48 8b 8d f0 09 + 009db 48 8b 8d f0 09 00 00 mov rcx, QWORD PTR z$[rbp] - 009e0 48 03 41 08 add rax, QWORD PTR [rcx+8] - 009e4 44 8b 85 e8 05 + 009e2 48 03 41 08 add rax, QWORD PTR [rcx+8] + 009e6 44 8b 85 e8 05 00 00 mov r8d, DWORD PTR c$8[rbp] - 009eb 48 8b d0 mov rdx, rax - 009ee 48 8b 8d c8 05 + 009ed 48 8b d0 mov rdx, rax + 009f0 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 009f5 e8 00 00 00 00 call stbi__getn - 009fa 85 c0 test eax, eax - 009fc 75 11 jne SHORT $LN71@stbi__pars - 009fe 48 8d 0d 00 00 + 009f7 e8 00 00 00 00 call stbi__getn + 009fc 85 c0 test eax, eax + 009fe 75 11 jne SHORT $LN71@stbi__pars + 00a00 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09MNNCNKEO@outofdata@ - 00a05 e8 00 00 00 00 call stbi__err - 00a0a e9 90 04 00 00 jmp $LN1@stbi__pars + 00a07 e8 00 00 00 00 call stbi__err + 00a0c e9 96 04 00 00 jmp $LN1@stbi__pars $LN71@stbi__pars: ; 4713 : ioff += c.length; - 00a0f 8b 85 e8 05 00 + 00a11 8b 85 e8 05 00 00 mov eax, DWORD PTR c$8[rbp] - 00a15 8b 8d a4 04 00 + 00a17 8b 8d a4 04 00 00 mov ecx, DWORD PTR ioff$[rbp] - 00a1b 03 c8 add ecx, eax - 00a1d 8b c1 mov eax, ecx - 00a1f 89 85 a4 04 00 + 00a1d 03 c8 add ecx, eax + 00a1f 8b c1 mov eax, ecx + 00a21 89 85 a4 04 00 00 mov DWORD PTR ioff$[rbp], eax ; 4714 : break; - 00a25 e9 64 04 00 00 jmp $LN5@stbi__pars + 00a27 e9 69 04 00 00 jmp $LN5@stbi__pars $LN72@stbi__pars: ; 4715 : } @@ -14605,245 +14698,246 @@ $LN72@stbi__pars: ; 4718 : stbi__uint32 raw_len, bpl; ; 4719 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - 00a2a 83 bd 24 05 00 + 00a2c 83 bd 24 05 00 00 00 cmp DWORD PTR first$[rbp], 0 - 00a31 74 11 je SHORT $LN73@stbi__pars - 00a33 48 8d 0d 00 00 + 00a33 74 11 je SHORT $LN73@stbi__pars + 00a35 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0P@JEAFOMAF@first?5not?5IHDR@ - 00a3a e8 00 00 00 00 call stbi__err - 00a3f e9 5b 04 00 00 jmp $LN1@stbi__pars + 00a3c e8 00 00 00 00 call stbi__err + 00a41 e9 61 04 00 00 jmp $LN1@stbi__pars $LN73@stbi__pars: ; 4720 : if (scan != STBI__SCAN_load) return 1; - 00a44 83 bd f8 09 00 + 00a46 83 bd f8 09 00 00 00 cmp DWORD PTR scan$[rbp], 0 - 00a4b 74 0a je SHORT $LN74@stbi__pars - 00a4d b8 01 00 00 00 mov eax, 1 - 00a52 e9 48 04 00 00 jmp $LN1@stbi__pars + 00a4d 74 0a je SHORT $LN74@stbi__pars + 00a4f b8 01 00 00 00 mov eax, 1 + 00a54 e9 4e 04 00 00 jmp $LN1@stbi__pars $LN74@stbi__pars: ; 4721 : if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG"); - 00a57 48 8b 85 f0 09 + 00a59 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00a5e 48 83 78 08 00 cmp QWORD PTR [rax+8], 0 - 00a63 75 11 jne SHORT $LN75@stbi__pars - 00a65 48 8d 0d 00 00 + 00a60 48 83 78 08 00 cmp QWORD PTR [rax+8], 0 + 00a65 75 11 jne SHORT $LN75@stbi__pars + 00a67 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07MLPECBNA@no?5IDAT@ - 00a6c e8 00 00 00 00 call stbi__err - 00a71 e9 29 04 00 00 jmp $LN1@stbi__pars + 00a6e e8 00 00 00 00 call stbi__err + 00a73 e9 2f 04 00 00 jmp $LN1@stbi__pars $LN75@stbi__pars: ; 4722 : // initial guess for decoded data size to avoid unnecessary reallocs ; 4723 : bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component - 00a76 48 8b 85 c8 05 + 00a78 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00a7d 48 8b 8d f0 09 + 00a7f 48 8b 8d f0 09 00 00 mov rcx, QWORD PTR z$[rbp] - 00a84 8b 00 mov eax, DWORD PTR [rax] - 00a86 0f af 41 20 imul eax, DWORD PTR [rcx+32] - 00a8a 83 c0 07 add eax, 7 - 00a8d 33 d2 xor edx, edx - 00a8f b9 08 00 00 00 mov ecx, 8 - 00a94 f7 f1 div ecx - 00a96 89 85 a4 06 00 + 00a86 8b 00 mov eax, DWORD PTR [rax] + 00a88 0f af 41 20 imul eax, DWORD PTR [rcx+32] + 00a8c 83 c0 07 add eax, 7 + 00a8f 33 d2 xor edx, edx + 00a91 b9 08 00 00 00 mov ecx, 8 + 00a96 f7 f1 div ecx + 00a98 89 85 a4 06 00 00 mov DWORD PTR bpl$14[rbp], eax ; 4724 : raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; - 00a9c 48 8b 85 c8 05 + 00a9e 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00aa3 8b 8d a4 06 00 + 00aa5 8b 8d a4 06 00 00 mov ecx, DWORD PTR bpl$14[rbp] - 00aa9 0f af 48 04 imul ecx, DWORD PTR [rax+4] - 00aad 8b c1 mov eax, ecx - 00aaf 48 8b 8d c8 05 + 00aab 0f af 48 04 imul ecx, DWORD PTR [rax+4] + 00aaf 8b c1 mov eax, ecx + 00ab1 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00ab6 0f af 41 08 imul eax, DWORD PTR [rcx+8] - 00aba 48 8b 8d c8 05 + 00ab8 0f af 41 08 imul eax, DWORD PTR [rcx+8] + 00abc 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00ac1 03 41 04 add eax, DWORD PTR [rcx+4] - 00ac4 89 85 84 06 00 + 00ac3 03 41 04 add eax, DWORD PTR [rcx+4] + 00ac6 89 85 84 06 00 00 mov DWORD PTR raw_len$13[rbp], eax ; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); - 00aca 83 bd a4 05 00 + 00acc 83 bd a4 05 00 00 00 cmp DWORD PTR is_iphone$[rbp], 0 - 00ad1 75 0c jne SHORT $LN103@stbi__pars - 00ad3 c7 85 b4 09 00 + 00ad3 75 0c jne SHORT $LN103@stbi__pars + 00ad5 c7 85 b4 09 00 00 01 00 00 00 mov DWORD PTR tv394[rbp], 1 - 00add eb 0a jmp SHORT $LN104@stbi__pars + 00adf eb 0a jmp SHORT $LN104@stbi__pars $LN103@stbi__pars: - 00adf c7 85 b4 09 00 + 00ae1 c7 85 b4 09 00 00 00 00 00 00 mov DWORD PTR tv394[rbp], 0 $LN104@stbi__pars: - 00ae9 8b 85 b4 09 00 + 00aeb 8b 85 b4 09 00 00 mov eax, DWORD PTR tv394[rbp] - 00aef 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00af3 4c 8d 8d 84 06 + 00af1 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00af5 4c 8d 8d 84 06 00 00 lea r9, QWORD PTR raw_len$13[rbp] - 00afa 44 8b 85 84 06 + 00afc 44 8b 85 84 06 00 00 mov r8d, DWORD PTR raw_len$13[rbp] - 00b01 8b 95 a4 04 00 + 00b03 8b 95 a4 04 00 00 mov edx, DWORD PTR ioff$[rbp] - 00b07 48 8b 85 f0 09 + 00b09 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00b0e 48 8b 48 08 mov rcx, QWORD PTR [rax+8] - 00b12 e8 00 00 00 00 call stbi_zlib_decode_malloc_guesssize_headerflag - 00b17 48 8b 8d f0 09 + 00b10 48 8b 48 08 mov rcx, QWORD PTR [rax+8] + 00b14 e8 00 00 00 00 call stbi_zlib_decode_malloc_guesssize_headerflag + 00b19 48 8b 8d f0 09 00 00 mov rcx, QWORD PTR z$[rbp] - 00b1e 48 89 41 10 mov QWORD PTR [rcx+16], rax + 00b20 48 89 41 10 mov QWORD PTR [rcx+16], rax ; 4726 : if (z->expanded == NULL) return 0; // zlib should set error - 00b22 48 8b 85 f0 09 + 00b24 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00b29 48 83 78 10 00 cmp QWORD PTR [rax+16], 0 - 00b2e 75 07 jne SHORT $LN76@stbi__pars - 00b30 33 c0 xor eax, eax - 00b32 e9 68 03 00 00 jmp $LN1@stbi__pars + 00b2b 48 83 78 10 00 cmp QWORD PTR [rax+16], 0 + 00b30 75 07 jne SHORT $LN76@stbi__pars + 00b32 33 c0 xor eax, eax + 00b34 e9 6e 03 00 00 jmp $LN1@stbi__pars $LN76@stbi__pars: ; 4727 : STBI_FREE(z->idata); z->idata = NULL; - 00b37 48 8b 85 f0 09 + 00b39 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00b3e 48 8b 48 08 mov rcx, QWORD PTR [rax+8] - 00b42 ff 15 00 00 00 + 00b40 48 8b 48 08 mov rcx, QWORD PTR [rax+8] + 00b44 ff 15 00 00 00 00 call QWORD PTR __imp_free - 00b48 48 8b 85 f0 09 + 00b4a 90 npad 1 + 00b4b 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00b4f 48 c7 40 08 00 + 00b52 48 c7 40 08 00 00 00 00 mov QWORD PTR [rax+8], 0 ; 4728 : if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans) - 00b57 48 8b 85 c8 05 + 00b5a 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00b5e 8b 40 08 mov eax, DWORD PTR [rax+8] - 00b61 ff c0 inc eax - 00b63 39 85 00 0a 00 + 00b61 8b 40 08 mov eax, DWORD PTR [rax+8] + 00b64 ff c0 inc eax + 00b66 39 85 00 0a 00 00 cmp DWORD PTR req_comp$[rbp], eax - 00b69 75 14 jne SHORT $LN80@stbi__pars - 00b6b 83 bd 00 0a 00 + 00b6c 75 14 jne SHORT $LN80@stbi__pars + 00b6e 83 bd 00 0a 00 00 03 cmp DWORD PTR req_comp$[rbp], 3 - 00b72 74 0b je SHORT $LN80@stbi__pars - 00b74 0f b6 85 24 04 + 00b75 74 0b je SHORT $LN80@stbi__pars + 00b77 0f b6 85 24 04 00 00 movzx eax, BYTE PTR pal_img_n$[rbp] - 00b7b 85 c0 test eax, eax - 00b7d 74 0b je SHORT $LN79@stbi__pars + 00b7e 85 c0 test eax, eax + 00b80 74 0b je SHORT $LN79@stbi__pars $LN80@stbi__pars: - 00b7f 0f b6 85 44 04 + 00b82 0f b6 85 44 04 00 00 movzx eax, BYTE PTR has_trans$[rbp] - 00b86 85 c0 test eax, eax - 00b88 74 18 je SHORT $LN77@stbi__pars + 00b89 85 c0 test eax, eax + 00b8b 74 18 je SHORT $LN77@stbi__pars $LN79@stbi__pars: ; 4729 : s->img_out_n = s->img_n + 1; - 00b8a 48 8b 85 c8 05 + 00b8d 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00b91 8b 40 08 mov eax, DWORD PTR [rax+8] - 00b94 ff c0 inc eax - 00b96 48 8b 8d c8 05 + 00b94 8b 40 08 mov eax, DWORD PTR [rax+8] + 00b97 ff c0 inc eax + 00b99 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00b9d 89 41 0c mov DWORD PTR [rcx+12], eax - 00ba0 eb 14 jmp SHORT $LN78@stbi__pars + 00ba0 89 41 0c mov DWORD PTR [rcx+12], eax + 00ba3 eb 14 jmp SHORT $LN78@stbi__pars $LN77@stbi__pars: ; 4730 : else ; 4731 : s->img_out_n = s->img_n; - 00ba2 48 8b 85 c8 05 + 00ba5 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00ba9 48 8b 8d c8 05 + 00bac 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00bb0 8b 49 08 mov ecx, DWORD PTR [rcx+8] - 00bb3 89 48 0c mov DWORD PTR [rax+12], ecx + 00bb3 8b 49 08 mov ecx, DWORD PTR [rcx+8] + 00bb6 89 48 0c mov DWORD PTR [rax+12], ecx $LN78@stbi__pars: ; 4732 : if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; - 00bb6 8b 85 64 05 00 + 00bb9 8b 85 64 05 00 00 mov eax, DWORD PTR interlace$[rbp] - 00bbc 89 44 24 30 mov DWORD PTR [rsp+48], eax - 00bc0 8b 85 84 05 00 + 00bbf 89 44 24 30 mov DWORD PTR [rsp+48], eax + 00bc3 8b 85 84 05 00 00 mov eax, DWORD PTR color$[rbp] - 00bc6 89 44 24 28 mov DWORD PTR [rsp+40], eax - 00bca 48 8b 85 f0 09 + 00bc9 89 44 24 28 mov DWORD PTR [rsp+40], eax + 00bcd 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00bd1 8b 40 20 mov eax, DWORD PTR [rax+32] - 00bd4 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00bd8 48 8b 85 c8 05 + 00bd4 8b 40 20 mov eax, DWORD PTR [rax+32] + 00bd7 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00bdb 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00bdf 44 8b 48 0c mov r9d, DWORD PTR [rax+12] - 00be3 44 8b 85 84 06 + 00be2 44 8b 48 0c mov r9d, DWORD PTR [rax+12] + 00be6 44 8b 85 84 06 00 00 mov r8d, DWORD PTR raw_len$13[rbp] - 00bea 48 8b 85 f0 09 + 00bed 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00bf1 48 8b 50 10 mov rdx, QWORD PTR [rax+16] - 00bf5 48 8b 8d f0 09 + 00bf4 48 8b 50 10 mov rdx, QWORD PTR [rax+16] + 00bf8 48 8b 8d f0 09 00 00 mov rcx, QWORD PTR z$[rbp] - 00bfc e8 00 00 00 00 call stbi__create_png_image - 00c01 85 c0 test eax, eax - 00c03 75 07 jne SHORT $LN81@stbi__pars - 00c05 33 c0 xor eax, eax - 00c07 e9 93 02 00 00 jmp $LN1@stbi__pars + 00bff e8 00 00 00 00 call stbi__create_png_image + 00c04 85 c0 test eax, eax + 00c06 75 07 jne SHORT $LN81@stbi__pars + 00c08 33 c0 xor eax, eax + 00c0a e9 98 02 00 00 jmp $LN1@stbi__pars $LN81@stbi__pars: ; 4733 : if (has_trans) { - 00c0c 0f b6 85 44 04 + 00c0f 0f b6 85 44 04 00 00 movzx eax, BYTE PTR has_trans$[rbp] - 00c13 85 c0 test eax, eax - 00c15 74 61 je SHORT $LN82@stbi__pars + 00c16 85 c0 test eax, eax + 00c18 74 61 je SHORT $LN82@stbi__pars ; 4734 : if (z->depth == 16) { - 00c17 48 8b 85 f0 09 + 00c1a 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00c1e 83 78 20 10 cmp DWORD PTR [rax+32], 16 - 00c22 75 2b jne SHORT $LN83@stbi__pars + 00c21 83 78 20 10 cmp DWORD PTR [rax+32], 16 + 00c25 75 2b jne SHORT $LN83@stbi__pars ; 4735 : if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; - 00c24 48 8b 85 c8 05 + 00c27 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00c2b 44 8b 40 0c mov r8d, DWORD PTR [rax+12] - 00c2f 48 8d 95 84 04 + 00c2e 44 8b 40 0c mov r8d, DWORD PTR [rax+12] + 00c32 48 8d 95 84 04 00 00 lea rdx, QWORD PTR tc16$[rbp] - 00c36 48 8b 8d f0 09 + 00c39 48 8b 8d f0 09 00 00 mov rcx, QWORD PTR z$[rbp] - 00c3d e8 00 00 00 00 call stbi__compute_transparency16 - 00c42 85 c0 test eax, eax - 00c44 75 07 jne SHORT $LN85@stbi__pars - 00c46 33 c0 xor eax, eax - 00c48 e9 52 02 00 00 jmp $LN1@stbi__pars + 00c40 e8 00 00 00 00 call stbi__compute_transparency16 + 00c45 85 c0 test eax, eax + 00c47 75 07 jne SHORT $LN85@stbi__pars + 00c49 33 c0 xor eax, eax + 00c4b e9 57 02 00 00 jmp $LN1@stbi__pars $LN85@stbi__pars: ; 4736 : } - 00c4d eb 29 jmp SHORT $LN84@stbi__pars + 00c50 eb 29 jmp SHORT $LN84@stbi__pars $LN83@stbi__pars: ; 4737 : else { ; 4738 : if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; - 00c4f 48 8b 85 c8 05 + 00c52 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00c56 44 8b 40 0c mov r8d, DWORD PTR [rax+12] - 00c5a 48 8d 95 64 04 + 00c59 44 8b 40 0c mov r8d, DWORD PTR [rax+12] + 00c5d 48 8d 95 64 04 00 00 lea rdx, QWORD PTR tc$[rbp] - 00c61 48 8b 8d f0 09 + 00c64 48 8b 8d f0 09 00 00 mov rcx, QWORD PTR z$[rbp] - 00c68 e8 00 00 00 00 call stbi__compute_transparency - 00c6d 85 c0 test eax, eax - 00c6f 75 07 jne SHORT $LN86@stbi__pars - 00c71 33 c0 xor eax, eax - 00c73 e9 27 02 00 00 jmp $LN1@stbi__pars + 00c6b e8 00 00 00 00 call stbi__compute_transparency + 00c70 85 c0 test eax, eax + 00c72 75 07 jne SHORT $LN86@stbi__pars + 00c74 33 c0 xor eax, eax + 00c76 e9 2c 02 00 00 jmp $LN1@stbi__pars $LN86@stbi__pars: $LN84@stbi__pars: $LN82@stbi__pars: @@ -14852,155 +14946,158 @@ $LN82@stbi__pars: ; 4740 : } ; 4741 : if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) - 00c78 83 bd a4 05 00 + 00c7b 83 bd a4 05 00 00 00 cmp DWORD PTR is_iphone$[rbp], 0 - 00c7f 74 73 je SHORT $LN87@stbi__pars - 00c81 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__de_iphone_flag_set - 00c86 8b c0 mov eax, eax - 00c88 8b 0d 00 00 00 + 00c82 74 74 je SHORT $LN87@stbi__pars + 00c84 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__de_iphone_flag_set + 00c89 8b c0 mov eax, eax + 00c8b 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 00c8e 65 48 8b 14 25 + 00c91 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 00c97 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00c9b 83 3c 08 00 cmp DWORD PTR [rax+rcx], 0 - 00c9f 74 25 je SHORT $LN105@stbi__pars - 00ca1 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__de_iphone_flag_local - 00ca6 8b c0 mov eax, eax - 00ca8 8b 0d 00 00 00 + 00c9a 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00c9e 83 3c 08 00 cmp DWORD PTR [rax+rcx], 0 + 00ca2 74 25 je SHORT $LN105@stbi__pars + 00ca4 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__de_iphone_flag_local + 00ca9 8b c0 mov eax, eax + 00cab 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 00cae 65 48 8b 14 25 + 00cb1 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 00cb7 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00cbb 8b 04 08 mov eax, DWORD PTR [rax+rcx] - 00cbe 89 85 b4 09 00 + 00cba 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00cbe 8b 04 08 mov eax, DWORD PTR [rax+rcx] + 00cc1 89 85 b4 09 00 00 mov DWORD PTR tv461[rbp], eax - 00cc4 eb 0c jmp SHORT $LN106@stbi__pars + 00cc7 eb 0c jmp SHORT $LN106@stbi__pars $LN105@stbi__pars: - 00cc6 8b 05 00 00 00 + 00cc9 8b 05 00 00 00 00 mov eax, DWORD PTR stbi__de_iphone_flag_global - 00ccc 89 85 b4 09 00 + 00ccf 89 85 b4 09 00 00 mov DWORD PTR tv461[rbp], eax $LN106@stbi__pars: - 00cd2 83 bd b4 09 00 + 00cd5 83 bd b4 09 00 00 00 cmp DWORD PTR tv461[rbp], 0 - 00cd9 74 19 je SHORT $LN87@stbi__pars - 00cdb 48 8b 85 c8 05 + 00cdc 74 1a je SHORT $LN87@stbi__pars + 00cde 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00ce2 83 78 0c 02 cmp DWORD PTR [rax+12], 2 - 00ce6 7e 0c jle SHORT $LN87@stbi__pars + 00ce5 83 78 0c 02 cmp DWORD PTR [rax+12], 2 + 00ce9 7e 0d jle SHORT $LN87@stbi__pars ; 4742 : stbi__de_iphone(z); - 00ce8 48 8b 8d f0 09 + 00ceb 48 8b 8d f0 09 00 00 mov rcx, QWORD PTR z$[rbp] - 00cef e8 00 00 00 00 call stbi__de_iphone + 00cf2 e8 00 00 00 00 call stbi__de_iphone + 00cf7 90 npad 1 $LN87@stbi__pars: ; 4743 : if (pal_img_n) { - 00cf4 0f b6 85 24 04 + 00cf8 0f b6 85 24 04 00 00 movzx eax, BYTE PTR pal_img_n$[rbp] - 00cfb 85 c0 test eax, eax - 00cfd 74 6a je SHORT $LN88@stbi__pars + 00cff 85 c0 test eax, eax + 00d01 74 6a je SHORT $LN88@stbi__pars ; 4744 : // pal_img_n == 3 or 4 ; 4745 : s->img_n = pal_img_n; // record the actual colors we had - 00cff 0f b6 85 24 04 + 00d03 0f b6 85 24 04 00 00 movzx eax, BYTE PTR pal_img_n$[rbp] - 00d06 48 8b 8d c8 05 + 00d0a 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00d0d 89 41 08 mov DWORD PTR [rcx+8], eax + 00d11 89 41 08 mov DWORD PTR [rcx+8], eax ; 4746 : s->img_out_n = pal_img_n; - 00d10 0f b6 85 24 04 + 00d14 0f b6 85 24 04 00 00 movzx eax, BYTE PTR pal_img_n$[rbp] - 00d17 48 8b 8d c8 05 + 00d1b 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00d1e 89 41 0c mov DWORD PTR [rcx+12], eax + 00d22 89 41 0c mov DWORD PTR [rcx+12], eax ; 4747 : if (req_comp >= 3) s->img_out_n = req_comp; - 00d21 83 bd 00 0a 00 + 00d25 83 bd 00 0a 00 00 03 cmp DWORD PTR req_comp$[rbp], 3 - 00d28 7c 10 jl SHORT $LN90@stbi__pars - 00d2a 48 8b 85 c8 05 + 00d2c 7c 10 jl SHORT $LN90@stbi__pars + 00d2e 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00d31 8b 8d 00 0a 00 + 00d35 8b 8d 00 0a 00 00 mov ecx, DWORD PTR req_comp$[rbp] - 00d37 89 48 0c mov DWORD PTR [rax+12], ecx + 00d3b 89 48 0c mov DWORD PTR [rax+12], ecx $LN90@stbi__pars: ; 4748 : if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) - 00d3a 48 8b 85 c8 05 + 00d3e 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00d41 44 8b 48 0c mov r9d, DWORD PTR [rax+12] - 00d45 44 8b 85 04 05 + 00d45 44 8b 48 0c mov r9d, DWORD PTR [rax+12] + 00d49 44 8b 85 04 05 00 00 mov r8d, DWORD PTR pal_len$[rbp] - 00d4c 48 8d 55 10 lea rdx, QWORD PTR palette$[rbp] - 00d50 48 8b 8d f0 09 + 00d50 48 8d 55 10 lea rdx, QWORD PTR palette$[rbp] + 00d54 48 8b 8d f0 09 00 00 mov rcx, QWORD PTR z$[rbp] - 00d57 e8 00 00 00 00 call stbi__expand_png_palette - 00d5c 85 c0 test eax, eax - 00d5e 75 07 jne SHORT $LN91@stbi__pars + 00d5b e8 00 00 00 00 call stbi__expand_png_palette + 00d60 85 c0 test eax, eax + 00d62 75 07 jne SHORT $LN91@stbi__pars ; 4749 : return 0; - 00d60 33 c0 xor eax, eax - 00d62 e9 38 01 00 00 jmp $LN1@stbi__pars + 00d64 33 c0 xor eax, eax + 00d66 e9 3c 01 00 00 jmp $LN1@stbi__pars $LN91@stbi__pars: ; 4750 : } - 00d67 eb 21 jmp SHORT $LN89@stbi__pars + 00d6b eb 21 jmp SHORT $LN89@stbi__pars $LN88@stbi__pars: ; 4751 : else if (has_trans) { - 00d69 0f b6 85 44 04 + 00d6d 0f b6 85 44 04 00 00 movzx eax, BYTE PTR has_trans$[rbp] - 00d70 85 c0 test eax, eax - 00d72 74 16 je SHORT $LN92@stbi__pars + 00d74 85 c0 test eax, eax + 00d76 74 16 je SHORT $LN92@stbi__pars ; 4752 : // non-paletted image with tRNS -> source image has (constant) alpha ; 4753 : ++s->img_n; - 00d74 48 8b 85 c8 05 + 00d78 48 8b 85 c8 05 00 00 mov rax, QWORD PTR s$[rbp] - 00d7b 8b 40 08 mov eax, DWORD PTR [rax+8] - 00d7e ff c0 inc eax - 00d80 48 8b 8d c8 05 + 00d7f 8b 40 08 mov eax, DWORD PTR [rax+8] + 00d82 ff c0 inc eax + 00d84 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00d87 89 41 08 mov DWORD PTR [rcx+8], eax + 00d8b 89 41 08 mov DWORD PTR [rcx+8], eax $LN92@stbi__pars: $LN89@stbi__pars: ; 4754 : } ; 4755 : STBI_FREE(z->expanded); z->expanded = NULL; - 00d8a 48 8b 85 f0 09 + 00d8e 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00d91 48 8b 48 10 mov rcx, QWORD PTR [rax+16] - 00d95 ff 15 00 00 00 + 00d95 48 8b 48 10 mov rcx, QWORD PTR [rax+16] + 00d99 ff 15 00 00 00 00 call QWORD PTR __imp_free - 00d9b 48 8b 85 f0 09 + 00d9f 90 npad 1 + 00da0 48 8b 85 f0 09 00 00 mov rax, QWORD PTR z$[rbp] - 00da2 48 c7 40 10 00 + 00da7 48 c7 40 10 00 00 00 00 mov QWORD PTR [rax+16], 0 ; 4756 : // end of PNG chunk, read and skip CRC ; 4757 : stbi__get32be(s); - 00daa 48 8b 8d c8 05 + 00daf 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00db1 e8 00 00 00 00 call stbi__get32be + 00db6 e8 00 00 00 00 call stbi__get32be + 00dbb 90 npad 1 ; 4758 : return 1; - 00db6 b8 01 00 00 00 mov eax, 1 - 00dbb e9 df 00 00 00 jmp $LN1@stbi__pars + 00dbc b8 01 00 00 00 mov eax, 1 + 00dc1 e9 e1 00 00 00 jmp $LN1@stbi__pars $LN93@stbi__pars: ; 4759 : } @@ -15009,22 +15106,22 @@ $LN93@stbi__pars: ; 4762 : // if critical, fail ; 4763 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - 00dc0 83 bd 24 05 00 + 00dc6 83 bd 24 05 00 00 00 cmp DWORD PTR first$[rbp], 0 - 00dc7 74 11 je SHORT $LN94@stbi__pars - 00dc9 48 8d 0d 00 00 + 00dcd 74 11 je SHORT $LN94@stbi__pars + 00dcf 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0P@JEAFOMAF@first?5not?5IHDR@ - 00dd0 e8 00 00 00 00 call stbi__err - 00dd5 e9 c5 00 00 00 jmp $LN1@stbi__pars + 00dd6 e8 00 00 00 00 call stbi__err + 00ddb e9 c7 00 00 00 jmp $LN1@stbi__pars $LN94@stbi__pars: ; 4764 : if ((c.type & (1 << 29)) == 0) { - 00dda 8b 85 ec 05 00 + 00de0 8b 85 ec 05 00 00 mov eax, DWORD PTR c$8[rbp+4] - 00de0 25 00 00 00 20 and eax, 536870912 ; 20000000H - 00de5 85 c0 test eax, eax - 00de7 0f 85 8f 00 00 + 00de6 25 00 00 00 20 and eax, 536870912 ; 20000000H + 00deb 85 c0 test eax, eax + 00ded 0f 85 8f 00 00 00 jne $LN95@stbi__pars ; 4765 : #ifndef STBI_NO_FAILURE_STRINGS @@ -15032,68 +15129,69 @@ $LN94@stbi__pars: ; 4767 : static char invalid_chunk[] = "XXXX PNG chunk not known"; ; 4768 : invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); - 00ded 8b 85 ec 05 00 + 00df3 8b 85 ec 05 00 00 mov eax, DWORD PTR c$8[rbp+4] - 00df3 c1 e8 18 shr eax, 24 - 00df6 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00dfb b9 01 00 00 00 mov ecx, 1 - 00e00 48 6b c9 00 imul rcx, rcx, 0 - 00e04 48 8d 15 00 00 + 00df9 c1 e8 18 shr eax, 24 + 00dfc 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00e01 b9 01 00 00 00 mov ecx, 1 + 00e06 48 6b c9 00 imul rcx, rcx, 0 + 00e0a 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:?invalid_chunk@?BP@??stbi__parse_png_file@@9@9 - 00e0b 88 04 0a mov BYTE PTR [rdx+rcx], al + 00e11 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4769 : invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); - 00e0e 8b 85 ec 05 00 + 00e14 8b 85 ec 05 00 00 mov eax, DWORD PTR c$8[rbp+4] - 00e14 c1 e8 10 shr eax, 16 - 00e17 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00e1c b9 01 00 00 00 mov ecx, 1 - 00e21 48 6b c9 01 imul rcx, rcx, 1 - 00e25 48 8d 15 00 00 + 00e1a c1 e8 10 shr eax, 16 + 00e1d 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00e22 b9 01 00 00 00 mov ecx, 1 + 00e27 48 6b c9 01 imul rcx, rcx, 1 + 00e2b 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:?invalid_chunk@?BP@??stbi__parse_png_file@@9@9 - 00e2c 88 04 0a mov BYTE PTR [rdx+rcx], al + 00e32 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4770 : invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); - 00e2f 8b 85 ec 05 00 + 00e35 8b 85 ec 05 00 00 mov eax, DWORD PTR c$8[rbp+4] - 00e35 c1 e8 08 shr eax, 8 - 00e38 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00e3d b9 01 00 00 00 mov ecx, 1 - 00e42 48 6b c9 02 imul rcx, rcx, 2 - 00e46 48 8d 15 00 00 + 00e3b c1 e8 08 shr eax, 8 + 00e3e 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00e43 b9 01 00 00 00 mov ecx, 1 + 00e48 48 6b c9 02 imul rcx, rcx, 2 + 00e4c 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:?invalid_chunk@?BP@??stbi__parse_png_file@@9@9 - 00e4d 88 04 0a mov BYTE PTR [rdx+rcx], al + 00e53 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4771 : invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); - 00e50 8b 85 ec 05 00 + 00e56 8b 85 ec 05 00 00 mov eax, DWORD PTR c$8[rbp+4] - 00e56 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00e5b b9 01 00 00 00 mov ecx, 1 - 00e60 48 6b c9 03 imul rcx, rcx, 3 - 00e64 48 8d 15 00 00 + 00e5c 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00e61 b9 01 00 00 00 mov ecx, 1 + 00e66 48 6b c9 03 imul rcx, rcx, 3 + 00e6a 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:?invalid_chunk@?BP@??stbi__parse_png_file@@9@9 - 00e6b 88 04 0a mov BYTE PTR [rdx+rcx], al + 00e71 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4772 : #endif ; 4773 : return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); - 00e6e 48 8d 0d 00 00 + 00e74 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:?invalid_chunk@?BP@??stbi__parse_png_file@@9@9 - 00e75 e8 00 00 00 00 call stbi__err - 00e7a eb 23 jmp SHORT $LN1@stbi__pars + 00e7b e8 00 00 00 00 call stbi__err + 00e80 eb 25 jmp SHORT $LN1@stbi__pars $LN95@stbi__pars: ; 4774 : } ; 4775 : stbi__skip(s, c.length); - 00e7c 8b 95 e8 05 00 + 00e82 8b 95 e8 05 00 00 mov edx, DWORD PTR c$8[rbp] - 00e82 48 8b 8d c8 05 + 00e88 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00e89 e8 00 00 00 00 call stbi__skip + 00e8f e8 00 00 00 00 call stbi__skip + 00e94 90 npad 1 $LN5@stbi__pars: ; 4776 : break; @@ -15101,32 +15199,33 @@ $LN5@stbi__pars: ; 4778 : // end of PNG chunk, read and skip CRC ; 4779 : stbi__get32be(s); - 00e8e 48 8b 8d c8 05 + 00e95 48 8b 8d c8 05 00 00 mov rcx, QWORD PTR s$[rbp] - 00e95 e8 00 00 00 00 call stbi__get32be + 00e9c e8 00 00 00 00 call stbi__get32be + 00ea1 90 npad 1 ; 4780 : } - 00e9a e9 82 f2 ff ff jmp $LN2@stbi__pars + 00ea2 e9 7b f2 ff ff jmp $LN2@stbi__pars $LN1@stbi__pars: ; 4781 : } - 00e9f 48 8b f8 mov rdi, rax - 00ea2 48 8d 4d c0 lea rcx, QWORD PTR [rbp-64] - 00ea6 48 8d 15 00 00 + 00ea7 48 8b f8 mov rdi, rax + 00eaa 48 8d 4d c0 lea rcx, QWORD PTR [rbp-64] + 00eae 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__parse_png_file$rtcFrameData - 00ead e8 00 00 00 00 call _RTC_CheckStackVars - 00eb2 48 8b c7 mov rax, rdi - 00eb5 48 8b 8d c0 09 + 00eb5 e8 00 00 00 00 call _RTC_CheckStackVars + 00eba 48 8b c7 mov rax, rdi + 00ebd 48 8b 8d c0 09 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00ebc 48 33 cd xor rcx, rbp - 00ebf e8 00 00 00 00 call __security_check_cookie - 00ec4 48 8d a5 d8 09 + 00ec4 48 33 cd xor rcx, rbp + 00ec7 e8 00 00 00 00 call __security_check_cookie + 00ecc 48 8d a5 d8 09 00 00 lea rsp, QWORD PTR [rbp+2520] - 00ecb 5f pop rdi - 00ecc 5d pop rbp - 00ecd c3 ret 0 + 00ed3 5f pop rdi + 00ed4 5d pop rbp + 00ed5 c3 ret 0 stbi__parse_png_file ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -15157,353 +15256,354 @@ stbi__de_iphone PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 4549 : stbi__context* s = z->s; - 0001f 48 8b 85 00 02 + 00020 48 8b 85 00 02 00 00 mov rax, QWORD PTR z$[rbp] - 00026 48 8b 00 mov rax, QWORD PTR [rax] - 00029 48 89 45 08 mov QWORD PTR s$[rbp], rax + 00027 48 8b 00 mov rax, QWORD PTR [rax] + 0002a 48 89 45 08 mov QWORD PTR s$[rbp], rax ; 4550 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; - 0002d 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 00031 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 00035 8b 00 mov eax, DWORD PTR [rax] - 00037 0f af 41 04 imul eax, DWORD PTR [rcx+4] - 0003b 89 45 44 mov DWORD PTR pixel_count$[rbp], eax + 0002e 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 00032 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 00036 8b 00 mov eax, DWORD PTR [rax] + 00038 0f af 41 04 imul eax, DWORD PTR [rcx+4] + 0003c 89 45 44 mov DWORD PTR pixel_count$[rbp], eax ; 4551 : stbi_uc* p = z->out; - 0003e 48 8b 85 00 02 + 0003f 48 8b 85 00 02 00 00 mov rax, QWORD PTR z$[rbp] - 00045 48 8b 40 18 mov rax, QWORD PTR [rax+24] - 00049 48 89 45 68 mov QWORD PTR p$[rbp], rax + 00046 48 8b 40 18 mov rax, QWORD PTR [rax+24] + 0004a 48 89 45 68 mov QWORD PTR p$[rbp], rax ; 4552 : ; 4553 : if (s->img_out_n == 3) { // convert bgr to rgb - 0004d 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 00051 83 78 0c 03 cmp DWORD PTR [rax+12], 3 - 00055 75 7c jne SHORT $LN11@stbi__de_i + 0004e 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 00052 83 78 0c 03 cmp DWORD PTR [rax+12], 3 + 00056 75 7c jne SHORT $LN11@stbi__de_i ; 4554 : for (i = 0; i < pixel_count; ++i) { - 00057 c7 45 24 00 00 + 00058 c7 45 24 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0005e eb 08 jmp SHORT $LN4@stbi__de_i + 0005f eb 08 jmp SHORT $LN4@stbi__de_i $LN2@stbi__de_i: - 00060 8b 45 24 mov eax, DWORD PTR i$[rbp] - 00063 ff c0 inc eax - 00065 89 45 24 mov DWORD PTR i$[rbp], eax + 00061 8b 45 24 mov eax, DWORD PTR i$[rbp] + 00064 ff c0 inc eax + 00066 89 45 24 mov DWORD PTR i$[rbp], eax $LN4@stbi__de_i: - 00068 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] - 0006b 39 45 24 cmp DWORD PTR i$[rbp], eax - 0006e 73 5e jae SHORT $LN3@stbi__de_i + 00069 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] + 0006c 39 45 24 cmp DWORD PTR i$[rbp], eax + 0006f 73 5e jae SHORT $LN3@stbi__de_i ; 4555 : stbi_uc t = p[0]; - 00070 b8 01 00 00 00 mov eax, 1 - 00075 48 6b c0 00 imul rax, rax, 0 - 00079 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 0007d 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00081 88 85 84 00 00 + 00071 b8 01 00 00 00 mov eax, 1 + 00076 48 6b c0 00 imul rax, rax, 0 + 0007a 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 0007e 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00082 88 85 84 00 00 00 mov BYTE PTR t$1[rbp], al ; 4556 : p[0] = p[2]; - 00087 b8 01 00 00 00 mov eax, 1 - 0008c 48 6b c0 02 imul rax, rax, 2 - 00090 b9 01 00 00 00 mov ecx, 1 - 00095 48 6b c9 00 imul rcx, rcx, 0 - 00099 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] - 0009d 4c 8b 45 68 mov r8, QWORD PTR p$[rbp] - 000a1 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 000a6 88 04 0a mov BYTE PTR [rdx+rcx], al + 00088 b8 01 00 00 00 mov eax, 1 + 0008d 48 6b c0 02 imul rax, rax, 2 + 00091 b9 01 00 00 00 mov ecx, 1 + 00096 48 6b c9 00 imul rcx, rcx, 0 + 0009a 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] + 0009e 4c 8b 45 68 mov r8, QWORD PTR p$[rbp] + 000a2 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 000a7 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4557 : p[2] = t; - 000a9 b8 01 00 00 00 mov eax, 1 - 000ae 48 6b c0 02 imul rax, rax, 2 - 000b2 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 000b6 0f b6 95 84 00 + 000aa b8 01 00 00 00 mov eax, 1 + 000af 48 6b c0 02 imul rax, rax, 2 + 000b3 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 000b7 0f b6 95 84 00 00 00 movzx edx, BYTE PTR t$1[rbp] - 000bd 88 14 01 mov BYTE PTR [rcx+rax], dl + 000be 88 14 01 mov BYTE PTR [rcx+rax], dl ; 4558 : p += 3; - 000c0 48 8b 45 68 mov rax, QWORD PTR p$[rbp] - 000c4 48 83 c0 03 add rax, 3 - 000c8 48 89 45 68 mov QWORD PTR p$[rbp], rax + 000c1 48 8b 45 68 mov rax, QWORD PTR p$[rbp] + 000c5 48 83 c0 03 add rax, 3 + 000c9 48 89 45 68 mov QWORD PTR p$[rbp], rax ; 4559 : } - 000cc eb 92 jmp SHORT $LN2@stbi__de_i + 000cd eb 92 jmp SHORT $LN2@stbi__de_i $LN3@stbi__de_i: ; 4560 : } - 000ce e9 59 02 00 00 jmp $LN12@stbi__de_i + 000cf e9 59 02 00 00 jmp $LN12@stbi__de_i $LN11@stbi__de_i: ; 4561 : else { ; 4562 : STBI_ASSERT(s->img_out_n == 4); - 000d3 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 000d7 83 78 0c 04 cmp DWORD PTR [rax+12], 4 - 000db 74 1c je SHORT $LN18@stbi__de_i - 000dd 41 b8 d2 11 00 + 000d4 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 000d8 83 78 0c 04 cmp DWORD PTR [rax+12], 4 + 000dc 74 1c je SHORT $LN18@stbi__de_i + 000de 41 b8 d2 11 00 00 mov r8d, 4562 ; 000011d2H - 000e3 48 8d 15 00 00 + 000e4 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 000ea 48 8d 0d 00 00 + 000eb 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1CE@GKIDJEJM@?$AAs?$AA?9?$AA?$DO?$AAi?$AAm?$AAg?$AA_?$AAo?$AAu?$AAt?$AA_?$AAn?$AA?5?$AA?$DN?$AA?$DN@ - 000f1 ff 15 00 00 00 + 000f2 ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 000f7 33 c0 xor eax, eax + 000f8 33 c0 xor eax, eax $LN18@stbi__de_i: ; 4563 : if (stbi__unpremultiply_on_load) { - 000f9 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__unpremultiply_on_load_set - 000fe 8b c0 mov eax, eax - 00100 8b 0d 00 00 00 + 000fa b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__unpremultiply_on_load_set + 000ff 8b c0 mov eax, eax + 00101 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 00106 65 48 8b 14 25 + 00107 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 0010f 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00113 83 3c 08 00 cmp DWORD PTR [rax+rcx], 0 - 00117 74 25 je SHORT $LN19@stbi__de_i - 00119 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__unpremultiply_on_load_local - 0011e 8b c0 mov eax, eax - 00120 8b 0d 00 00 00 + 00110 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00114 83 3c 08 00 cmp DWORD PTR [rax+rcx], 0 + 00118 74 25 je SHORT $LN19@stbi__de_i + 0011a b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__unpremultiply_on_load_local + 0011f 8b c0 mov eax, eax + 00121 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 00126 65 48 8b 14 25 + 00127 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 0012f 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00133 8b 04 08 mov eax, DWORD PTR [rax+rcx] - 00136 89 85 d4 01 00 + 00130 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00134 8b 04 08 mov eax, DWORD PTR [rax+rcx] + 00137 89 85 d4 01 00 00 mov DWORD PTR tv133[rbp], eax - 0013c eb 0c jmp SHORT $LN20@stbi__de_i + 0013d eb 0c jmp SHORT $LN20@stbi__de_i $LN19@stbi__de_i: - 0013e 8b 05 00 00 00 + 0013f 8b 05 00 00 00 00 mov eax, DWORD PTR stbi__unpremultiply_on_load_global - 00144 89 85 d4 01 00 + 00145 89 85 d4 01 00 00 mov DWORD PTR tv133[rbp], eax $LN20@stbi__de_i: - 0014a 83 bd d4 01 00 + 0014b 83 bd d4 01 00 00 00 cmp DWORD PTR tv133[rbp], 0 - 00151 0f 84 5e 01 00 + 00152 0f 84 5e 01 00 00 je $LN13@stbi__de_i ; 4564 : // convert bgr to rgb and unpremultiply ; 4565 : for (i = 0; i < pixel_count; ++i) { - 00157 c7 45 24 00 00 + 00158 c7 45 24 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0015e eb 08 jmp SHORT $LN7@stbi__de_i + 0015f eb 08 jmp SHORT $LN7@stbi__de_i $LN5@stbi__de_i: - 00160 8b 45 24 mov eax, DWORD PTR i$[rbp] - 00163 ff c0 inc eax - 00165 89 45 24 mov DWORD PTR i$[rbp], eax + 00161 8b 45 24 mov eax, DWORD PTR i$[rbp] + 00164 ff c0 inc eax + 00166 89 45 24 mov DWORD PTR i$[rbp], eax $LN7@stbi__de_i: - 00168 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] - 0016b 39 45 24 cmp DWORD PTR i$[rbp], eax - 0016e 0f 83 3f 01 00 + 00169 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] + 0016c 39 45 24 cmp DWORD PTR i$[rbp], eax + 0016f 0f 83 3f 01 00 00 jae $LN6@stbi__de_i ; 4566 : stbi_uc a = p[3]; - 00174 b8 01 00 00 00 mov eax, 1 - 00179 48 6b c0 03 imul rax, rax, 3 - 0017d 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 00181 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00185 88 85 a4 00 00 + 00175 b8 01 00 00 00 mov eax, 1 + 0017a 48 6b c0 03 imul rax, rax, 3 + 0017e 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 00182 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00186 88 85 a4 00 00 00 mov BYTE PTR a$2[rbp], al ; 4567 : stbi_uc t = p[0]; - 0018b b8 01 00 00 00 mov eax, 1 - 00190 48 6b c0 00 imul rax, rax, 0 - 00194 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 00198 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0019c 88 85 c4 00 00 + 0018c b8 01 00 00 00 mov eax, 1 + 00191 48 6b c0 00 imul rax, rax, 0 + 00195 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 00199 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0019d 88 85 c4 00 00 00 mov BYTE PTR t$3[rbp], al ; 4568 : if (a) { - 001a2 0f b6 85 a4 00 + 001a3 0f b6 85 a4 00 00 00 movzx eax, BYTE PTR a$2[rbp] - 001a9 85 c0 test eax, eax - 001ab 0f 84 b8 00 00 + 001aa 85 c0 test eax, eax + 001ac 0f 84 b8 00 00 00 je $LN15@stbi__de_i ; 4569 : stbi_uc half = a / 2; - 001b1 0f b6 85 a4 00 + 001b2 0f b6 85 a4 00 00 00 movzx eax, BYTE PTR a$2[rbp] - 001b8 99 cdq - 001b9 2b c2 sub eax, edx - 001bb d1 f8 sar eax, 1 - 001bd 88 85 e4 00 00 + 001b9 99 cdq + 001ba 2b c2 sub eax, edx + 001bc d1 f8 sar eax, 1 + 001be 88 85 e4 00 00 00 mov BYTE PTR half$4[rbp], al ; 4570 : p[0] = (p[2] * 255 + half) / a; - 001c3 b8 01 00 00 00 mov eax, 1 - 001c8 48 6b c0 02 imul rax, rax, 2 - 001cc 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 001d0 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 001d4 69 c0 ff 00 00 + 001c4 b8 01 00 00 00 mov eax, 1 + 001c9 48 6b c0 02 imul rax, rax, 2 + 001cd 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 001d1 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 001d5 69 c0 ff 00 00 00 imul eax, eax, 255 ; 000000ffH - 001da 0f b6 8d e4 00 + 001db 0f b6 8d e4 00 00 00 movzx ecx, BYTE PTR half$4[rbp] - 001e1 03 c1 add eax, ecx - 001e3 0f b6 8d a4 00 + 001e2 03 c1 add eax, ecx + 001e4 0f b6 8d a4 00 00 00 movzx ecx, BYTE PTR a$2[rbp] - 001ea 99 cdq - 001eb f7 f9 idiv ecx - 001ed b9 01 00 00 00 mov ecx, 1 - 001f2 48 6b c9 00 imul rcx, rcx, 0 - 001f6 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] - 001fa 88 04 0a mov BYTE PTR [rdx+rcx], al + 001eb 99 cdq + 001ec f7 f9 idiv ecx + 001ee b9 01 00 00 00 mov ecx, 1 + 001f3 48 6b c9 00 imul rcx, rcx, 0 + 001f7 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] + 001fb 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4571 : p[1] = (p[1] * 255 + half) / a; - 001fd b8 01 00 00 00 mov eax, 1 - 00202 48 6b c0 01 imul rax, rax, 1 - 00206 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 0020a 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0020e 69 c0 ff 00 00 + 001fe b8 01 00 00 00 mov eax, 1 + 00203 48 6b c0 01 imul rax, rax, 1 + 00207 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 0020b 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0020f 69 c0 ff 00 00 00 imul eax, eax, 255 ; 000000ffH - 00214 0f b6 8d e4 00 + 00215 0f b6 8d e4 00 00 00 movzx ecx, BYTE PTR half$4[rbp] - 0021b 03 c1 add eax, ecx - 0021d 0f b6 8d a4 00 + 0021c 03 c1 add eax, ecx + 0021e 0f b6 8d a4 00 00 00 movzx ecx, BYTE PTR a$2[rbp] - 00224 99 cdq - 00225 f7 f9 idiv ecx - 00227 b9 01 00 00 00 mov ecx, 1 - 0022c 48 6b c9 01 imul rcx, rcx, 1 - 00230 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] - 00234 88 04 0a mov BYTE PTR [rdx+rcx], al + 00225 99 cdq + 00226 f7 f9 idiv ecx + 00228 b9 01 00 00 00 mov ecx, 1 + 0022d 48 6b c9 01 imul rcx, rcx, 1 + 00231 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] + 00235 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4572 : p[2] = (t * 255 + half) / a; - 00237 0f b6 85 c4 00 + 00238 0f b6 85 c4 00 00 00 movzx eax, BYTE PTR t$3[rbp] - 0023e 69 c0 ff 00 00 + 0023f 69 c0 ff 00 00 00 imul eax, eax, 255 ; 000000ffH - 00244 0f b6 8d e4 00 + 00245 0f b6 8d e4 00 00 00 movzx ecx, BYTE PTR half$4[rbp] - 0024b 03 c1 add eax, ecx - 0024d 0f b6 8d a4 00 + 0024c 03 c1 add eax, ecx + 0024e 0f b6 8d a4 00 00 00 movzx ecx, BYTE PTR a$2[rbp] - 00254 99 cdq - 00255 f7 f9 idiv ecx - 00257 b9 01 00 00 00 mov ecx, 1 - 0025c 48 6b c9 02 imul rcx, rcx, 2 - 00260 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] - 00264 88 04 0a mov BYTE PTR [rdx+rcx], al + 00255 99 cdq + 00256 f7 f9 idiv ecx + 00258 b9 01 00 00 00 mov ecx, 1 + 0025d 48 6b c9 02 imul rcx, rcx, 2 + 00261 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] + 00265 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4573 : } - 00267 eb 39 jmp SHORT $LN16@stbi__de_i + 00268 eb 39 jmp SHORT $LN16@stbi__de_i $LN15@stbi__de_i: ; 4574 : else { ; 4575 : p[0] = p[2]; - 00269 b8 01 00 00 00 mov eax, 1 - 0026e 48 6b c0 02 imul rax, rax, 2 - 00272 b9 01 00 00 00 mov ecx, 1 - 00277 48 6b c9 00 imul rcx, rcx, 0 - 0027b 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] - 0027f 4c 8b 45 68 mov r8, QWORD PTR p$[rbp] - 00283 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00288 88 04 0a mov BYTE PTR [rdx+rcx], al + 0026a b8 01 00 00 00 mov eax, 1 + 0026f 48 6b c0 02 imul rax, rax, 2 + 00273 b9 01 00 00 00 mov ecx, 1 + 00278 48 6b c9 00 imul rcx, rcx, 0 + 0027c 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] + 00280 4c 8b 45 68 mov r8, QWORD PTR p$[rbp] + 00284 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00289 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4576 : p[2] = t; - 0028b b8 01 00 00 00 mov eax, 1 - 00290 48 6b c0 02 imul rax, rax, 2 - 00294 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 00298 0f b6 95 c4 00 + 0028c b8 01 00 00 00 mov eax, 1 + 00291 48 6b c0 02 imul rax, rax, 2 + 00295 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 00299 0f b6 95 c4 00 00 00 movzx edx, BYTE PTR t$3[rbp] - 0029f 88 14 01 mov BYTE PTR [rcx+rax], dl + 002a0 88 14 01 mov BYTE PTR [rcx+rax], dl $LN16@stbi__de_i: ; 4577 : } ; 4578 : p += 4; - 002a2 48 8b 45 68 mov rax, QWORD PTR p$[rbp] - 002a6 48 83 c0 04 add rax, 4 - 002aa 48 89 45 68 mov QWORD PTR p$[rbp], rax + 002a3 48 8b 45 68 mov rax, QWORD PTR p$[rbp] + 002a7 48 83 c0 04 add rax, 4 + 002ab 48 89 45 68 mov QWORD PTR p$[rbp], rax ; 4579 : } - 002ae e9 ad fe ff ff jmp $LN5@stbi__de_i + 002af e9 ad fe ff ff jmp $LN5@stbi__de_i $LN6@stbi__de_i: ; 4580 : } - 002b3 eb 77 jmp SHORT $LN14@stbi__de_i + 002b4 eb 77 jmp SHORT $LN14@stbi__de_i $LN13@stbi__de_i: ; 4581 : else { ; 4582 : // convert bgr to rgb ; 4583 : for (i = 0; i < pixel_count; ++i) { - 002b5 c7 45 24 00 00 + 002b6 c7 45 24 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 002bc eb 08 jmp SHORT $LN10@stbi__de_i + 002bd eb 08 jmp SHORT $LN10@stbi__de_i $LN8@stbi__de_i: - 002be 8b 45 24 mov eax, DWORD PTR i$[rbp] - 002c1 ff c0 inc eax - 002c3 89 45 24 mov DWORD PTR i$[rbp], eax + 002bf 8b 45 24 mov eax, DWORD PTR i$[rbp] + 002c2 ff c0 inc eax + 002c4 89 45 24 mov DWORD PTR i$[rbp], eax $LN10@stbi__de_i: - 002c6 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] - 002c9 39 45 24 cmp DWORD PTR i$[rbp], eax - 002cc 73 5e jae SHORT $LN9@stbi__de_i + 002c7 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] + 002ca 39 45 24 cmp DWORD PTR i$[rbp], eax + 002cd 73 5e jae SHORT $LN9@stbi__de_i ; 4584 : stbi_uc t = p[0]; - 002ce b8 01 00 00 00 mov eax, 1 - 002d3 48 6b c0 00 imul rax, rax, 0 - 002d7 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 002db 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 002df 88 85 04 01 00 + 002cf b8 01 00 00 00 mov eax, 1 + 002d4 48 6b c0 00 imul rax, rax, 0 + 002d8 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 002dc 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 002e0 88 85 04 01 00 00 mov BYTE PTR t$5[rbp], al ; 4585 : p[0] = p[2]; - 002e5 b8 01 00 00 00 mov eax, 1 - 002ea 48 6b c0 02 imul rax, rax, 2 - 002ee b9 01 00 00 00 mov ecx, 1 - 002f3 48 6b c9 00 imul rcx, rcx, 0 - 002f7 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] - 002fb 4c 8b 45 68 mov r8, QWORD PTR p$[rbp] - 002ff 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00304 88 04 0a mov BYTE PTR [rdx+rcx], al + 002e6 b8 01 00 00 00 mov eax, 1 + 002eb 48 6b c0 02 imul rax, rax, 2 + 002ef b9 01 00 00 00 mov ecx, 1 + 002f4 48 6b c9 00 imul rcx, rcx, 0 + 002f8 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] + 002fc 4c 8b 45 68 mov r8, QWORD PTR p$[rbp] + 00300 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00305 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4586 : p[2] = t; - 00307 b8 01 00 00 00 mov eax, 1 - 0030c 48 6b c0 02 imul rax, rax, 2 - 00310 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 00314 0f b6 95 04 01 + 00308 b8 01 00 00 00 mov eax, 1 + 0030d 48 6b c0 02 imul rax, rax, 2 + 00311 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 00315 0f b6 95 04 01 00 00 movzx edx, BYTE PTR t$5[rbp] - 0031b 88 14 01 mov BYTE PTR [rcx+rax], dl + 0031c 88 14 01 mov BYTE PTR [rcx+rax], dl ; 4587 : p += 4; - 0031e 48 8b 45 68 mov rax, QWORD PTR p$[rbp] - 00322 48 83 c0 04 add rax, 4 - 00326 48 89 45 68 mov QWORD PTR p$[rbp], rax + 0031f 48 8b 45 68 mov rax, QWORD PTR p$[rbp] + 00323 48 83 c0 04 add rax, 4 + 00327 48 89 45 68 mov QWORD PTR p$[rbp], rax ; 4588 : } - 0032a eb 92 jmp SHORT $LN8@stbi__de_i + 0032b eb 92 jmp SHORT $LN8@stbi__de_i $LN9@stbi__de_i: $LN14@stbi__de_i: $LN12@stbi__de_i: @@ -15512,11 +15612,11 @@ $LN12@stbi__de_i: ; 4590 : } ; 4591 : } - 0032c 48 8d a5 e8 01 + 0032d 48 8d a5 e8 01 00 00 lea rsp, QWORD PTR [rbp+488] - 00333 5f pop rdi - 00334 5d pop rbp - 00335 c3 ret 0 + 00334 5f pop rdi + 00335 5d pop rbp + 00336 c3 ret 0 stbi__de_iphone ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -15550,266 +15650,268 @@ stbi__expand_png_palette PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 4471 : stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; - 0002e 48 8b 85 c0 01 + 0002f 48 8b 85 c0 01 00 00 mov rax, QWORD PTR a$[rbp] - 00035 48 8b 00 mov rax, QWORD PTR [rax] - 00038 48 8b 8d c0 01 + 00036 48 8b 00 mov rax, QWORD PTR [rax] + 00039 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR a$[rbp] - 0003f 48 8b 09 mov rcx, QWORD PTR [rcx] - 00042 8b 00 mov eax, DWORD PTR [rax] - 00044 0f af 41 04 imul eax, DWORD PTR [rcx+4] - 00048 89 45 24 mov DWORD PTR pixel_count$[rbp], eax + 00040 48 8b 09 mov rcx, QWORD PTR [rcx] + 00043 8b 00 mov eax, DWORD PTR [rax] + 00045 0f af 41 04 imul eax, DWORD PTR [rcx+4] + 00049 89 45 24 mov DWORD PTR pixel_count$[rbp], eax ; 4472 : stbi_uc* p, * temp_out, * orig = a->out; - 0004b 48 8b 85 c0 01 + 0004c 48 8b 85 c0 01 00 00 mov rax, QWORD PTR a$[rbp] - 00052 48 8b 40 18 mov rax, QWORD PTR [rax+24] - 00056 48 89 85 88 00 + 00053 48 8b 40 18 mov rax, QWORD PTR [rax+24] + 00057 48 89 85 88 00 00 00 mov QWORD PTR orig$[rbp], rax ; 4473 : ; 4474 : p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0); - 0005d 45 33 c0 xor r8d, r8d - 00060 8b 95 d8 01 00 + 0005e 45 33 c0 xor r8d, r8d + 00061 8b 95 d8 01 00 00 mov edx, DWORD PTR pal_img_n$[rbp] - 00066 8b 4d 24 mov ecx, DWORD PTR pixel_count$[rbp] - 00069 e8 00 00 00 00 call stbi__malloc_mad2 - 0006e 48 89 45 48 mov QWORD PTR p$[rbp], rax + 00067 8b 4d 24 mov ecx, DWORD PTR pixel_count$[rbp] + 0006a e8 00 00 00 00 call stbi__malloc_mad2 + 0006f 48 89 45 48 mov QWORD PTR p$[rbp], rax ; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); - 00072 48 83 7d 48 00 cmp QWORD PTR p$[rbp], 0 - 00077 75 11 jne SHORT $LN8@stbi__expa - 00079 48 8d 0d 00 00 + 00073 48 83 7d 48 00 cmp QWORD PTR p$[rbp], 0 + 00078 75 11 jne SHORT $LN8@stbi__expa + 0007a 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 00080 e8 00 00 00 00 call stbi__err - 00085 e9 d0 01 00 00 jmp $LN1@stbi__expa + 00081 e8 00 00 00 00 call stbi__err + 00086 e9 d1 01 00 00 jmp $LN1@stbi__expa $LN8@stbi__expa: ; 4476 : ; 4477 : // between here and free(out) below, exitting would leak ; 4478 : temp_out = p; - 0008a 48 8b 45 48 mov rax, QWORD PTR p$[rbp] - 0008e 48 89 45 68 mov QWORD PTR temp_out$[rbp], rax + 0008b 48 8b 45 48 mov rax, QWORD PTR p$[rbp] + 0008f 48 89 45 68 mov QWORD PTR temp_out$[rbp], rax ; 4479 : ; 4480 : if (pal_img_n == 3) { - 00092 83 bd d8 01 00 + 00093 83 bd d8 01 00 00 03 cmp DWORD PTR pal_img_n$[rbp], 3 - 00099 0f 85 ba 00 00 + 0009a 0f 85 ba 00 00 00 jne $LN9@stbi__expa ; 4481 : for (i = 0; i < pixel_count; ++i) { - 0009f c7 45 04 00 00 + 000a0 c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 000a6 eb 08 jmp SHORT $LN4@stbi__expa + 000a7 eb 08 jmp SHORT $LN4@stbi__expa $LN2@stbi__expa: - 000a8 8b 45 04 mov eax, DWORD PTR i$[rbp] - 000ab ff c0 inc eax - 000ad 89 45 04 mov DWORD PTR i$[rbp], eax + 000a9 8b 45 04 mov eax, DWORD PTR i$[rbp] + 000ac ff c0 inc eax + 000ae 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__expa: - 000b0 8b 45 24 mov eax, DWORD PTR pixel_count$[rbp] - 000b3 39 45 04 cmp DWORD PTR i$[rbp], eax - 000b6 0f 83 98 00 00 + 000b1 8b 45 24 mov eax, DWORD PTR pixel_count$[rbp] + 000b4 39 45 04 cmp DWORD PTR i$[rbp], eax + 000b7 0f 83 98 00 00 00 jae $LN3@stbi__expa ; 4482 : int n = orig[i] * 4; - 000bc 8b 45 04 mov eax, DWORD PTR i$[rbp] - 000bf 48 8b 8d 88 00 + 000bd 8b 45 04 mov eax, DWORD PTR i$[rbp] + 000c0 48 8b 8d 88 00 00 00 mov rcx, QWORD PTR orig$[rbp] - 000c6 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 000ca c1 e0 02 shl eax, 2 - 000cd 89 85 a4 00 00 + 000c7 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 000cb c1 e0 02 shl eax, 2 + 000ce 89 85 a4 00 00 00 mov DWORD PTR n$1[rbp], eax ; 4483 : p[0] = palette[n]; - 000d3 48 63 85 a4 00 + 000d4 48 63 85 a4 00 00 00 movsxd rax, DWORD PTR n$1[rbp] - 000da b9 01 00 00 00 mov ecx, 1 - 000df 48 6b c9 00 imul rcx, rcx, 0 - 000e3 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] - 000e7 4c 8b 85 c8 01 + 000db b9 01 00 00 00 mov ecx, 1 + 000e0 48 6b c9 00 imul rcx, rcx, 0 + 000e4 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] + 000e8 4c 8b 85 c8 01 00 00 mov r8, QWORD PTR palette$[rbp] - 000ee 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 000f3 88 04 0a mov BYTE PTR [rdx+rcx], al + 000ef 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 000f4 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4484 : p[1] = palette[n + 1]; - 000f6 8b 85 a4 00 00 + 000f7 8b 85 a4 00 00 00 mov eax, DWORD PTR n$1[rbp] - 000fc ff c0 inc eax - 000fe 48 98 cdqe - 00100 b9 01 00 00 00 mov ecx, 1 - 00105 48 6b c9 01 imul rcx, rcx, 1 - 00109 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] - 0010d 4c 8b 85 c8 01 + 000fd ff c0 inc eax + 000ff 48 98 cdqe + 00101 b9 01 00 00 00 mov ecx, 1 + 00106 48 6b c9 01 imul rcx, rcx, 1 + 0010a 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] + 0010e 4c 8b 85 c8 01 00 00 mov r8, QWORD PTR palette$[rbp] - 00114 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00119 88 04 0a mov BYTE PTR [rdx+rcx], al + 00115 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0011a 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4485 : p[2] = palette[n + 2]; - 0011c 8b 85 a4 00 00 + 0011d 8b 85 a4 00 00 00 mov eax, DWORD PTR n$1[rbp] - 00122 83 c0 02 add eax, 2 - 00125 48 98 cdqe - 00127 b9 01 00 00 00 mov ecx, 1 - 0012c 48 6b c9 02 imul rcx, rcx, 2 - 00130 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] - 00134 4c 8b 85 c8 01 + 00123 83 c0 02 add eax, 2 + 00126 48 98 cdqe + 00128 b9 01 00 00 00 mov ecx, 1 + 0012d 48 6b c9 02 imul rcx, rcx, 2 + 00131 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] + 00135 4c 8b 85 c8 01 00 00 mov r8, QWORD PTR palette$[rbp] - 0013b 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00140 88 04 0a mov BYTE PTR [rdx+rcx], al + 0013c 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00141 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4486 : p += 3; - 00143 48 8b 45 48 mov rax, QWORD PTR p$[rbp] - 00147 48 83 c0 03 add rax, 3 - 0014b 48 89 45 48 mov QWORD PTR p$[rbp], rax + 00144 48 8b 45 48 mov rax, QWORD PTR p$[rbp] + 00148 48 83 c0 03 add rax, 3 + 0014c 48 89 45 48 mov QWORD PTR p$[rbp], rax ; 4487 : } - 0014f e9 54 ff ff ff jmp $LN2@stbi__expa + 00150 e9 54 ff ff ff jmp $LN2@stbi__expa $LN3@stbi__expa: ; 4488 : } - 00154 e9 dc 00 00 00 jmp $LN10@stbi__expa + 00155 e9 dc 00 00 00 jmp $LN10@stbi__expa $LN9@stbi__expa: ; 4489 : else { ; 4490 : for (i = 0; i < pixel_count; ++i) { - 00159 c7 45 04 00 00 + 0015a c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00160 eb 08 jmp SHORT $LN7@stbi__expa + 00161 eb 08 jmp SHORT $LN7@stbi__expa $LN5@stbi__expa: - 00162 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00165 ff c0 inc eax - 00167 89 45 04 mov DWORD PTR i$[rbp], eax + 00163 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00166 ff c0 inc eax + 00168 89 45 04 mov DWORD PTR i$[rbp], eax $LN7@stbi__expa: - 0016a 8b 45 24 mov eax, DWORD PTR pixel_count$[rbp] - 0016d 39 45 04 cmp DWORD PTR i$[rbp], eax - 00170 0f 83 bf 00 00 + 0016b 8b 45 24 mov eax, DWORD PTR pixel_count$[rbp] + 0016e 39 45 04 cmp DWORD PTR i$[rbp], eax + 00171 0f 83 bf 00 00 00 jae $LN6@stbi__expa ; 4491 : int n = orig[i] * 4; - 00176 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00179 48 8b 8d 88 00 + 00177 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0017a 48 8b 8d 88 00 00 00 mov rcx, QWORD PTR orig$[rbp] - 00180 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00184 c1 e0 02 shl eax, 2 - 00187 89 85 c4 00 00 + 00181 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00185 c1 e0 02 shl eax, 2 + 00188 89 85 c4 00 00 00 mov DWORD PTR n$2[rbp], eax ; 4492 : p[0] = palette[n]; - 0018d 48 63 85 c4 00 + 0018e 48 63 85 c4 00 00 00 movsxd rax, DWORD PTR n$2[rbp] - 00194 b9 01 00 00 00 mov ecx, 1 - 00199 48 6b c9 00 imul rcx, rcx, 0 - 0019d 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] - 001a1 4c 8b 85 c8 01 + 00195 b9 01 00 00 00 mov ecx, 1 + 0019a 48 6b c9 00 imul rcx, rcx, 0 + 0019e 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] + 001a2 4c 8b 85 c8 01 00 00 mov r8, QWORD PTR palette$[rbp] - 001a8 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 001ad 88 04 0a mov BYTE PTR [rdx+rcx], al + 001a9 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 001ae 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4493 : p[1] = palette[n + 1]; - 001b0 8b 85 c4 00 00 + 001b1 8b 85 c4 00 00 00 mov eax, DWORD PTR n$2[rbp] - 001b6 ff c0 inc eax - 001b8 48 98 cdqe - 001ba b9 01 00 00 00 mov ecx, 1 - 001bf 48 6b c9 01 imul rcx, rcx, 1 - 001c3 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] - 001c7 4c 8b 85 c8 01 + 001b7 ff c0 inc eax + 001b9 48 98 cdqe + 001bb b9 01 00 00 00 mov ecx, 1 + 001c0 48 6b c9 01 imul rcx, rcx, 1 + 001c4 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] + 001c8 4c 8b 85 c8 01 00 00 mov r8, QWORD PTR palette$[rbp] - 001ce 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 001d3 88 04 0a mov BYTE PTR [rdx+rcx], al + 001cf 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 001d4 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4494 : p[2] = palette[n + 2]; - 001d6 8b 85 c4 00 00 + 001d7 8b 85 c4 00 00 00 mov eax, DWORD PTR n$2[rbp] - 001dc 83 c0 02 add eax, 2 - 001df 48 98 cdqe - 001e1 b9 01 00 00 00 mov ecx, 1 - 001e6 48 6b c9 02 imul rcx, rcx, 2 - 001ea 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] - 001ee 4c 8b 85 c8 01 + 001dd 83 c0 02 add eax, 2 + 001e0 48 98 cdqe + 001e2 b9 01 00 00 00 mov ecx, 1 + 001e7 48 6b c9 02 imul rcx, rcx, 2 + 001eb 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] + 001ef 4c 8b 85 c8 01 00 00 mov r8, QWORD PTR palette$[rbp] - 001f5 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 001fa 88 04 0a mov BYTE PTR [rdx+rcx], al + 001f6 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 001fb 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4495 : p[3] = palette[n + 3]; - 001fd 8b 85 c4 00 00 + 001fe 8b 85 c4 00 00 00 mov eax, DWORD PTR n$2[rbp] - 00203 83 c0 03 add eax, 3 - 00206 48 98 cdqe - 00208 b9 01 00 00 00 mov ecx, 1 - 0020d 48 6b c9 03 imul rcx, rcx, 3 - 00211 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] - 00215 4c 8b 85 c8 01 + 00204 83 c0 03 add eax, 3 + 00207 48 98 cdqe + 00209 b9 01 00 00 00 mov ecx, 1 + 0020e 48 6b c9 03 imul rcx, rcx, 3 + 00212 48 8b 55 48 mov rdx, QWORD PTR p$[rbp] + 00216 4c 8b 85 c8 01 00 00 mov r8, QWORD PTR palette$[rbp] - 0021c 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00221 88 04 0a mov BYTE PTR [rdx+rcx], al + 0021d 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00222 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4496 : p += 4; - 00224 48 8b 45 48 mov rax, QWORD PTR p$[rbp] - 00228 48 83 c0 04 add rax, 4 - 0022c 48 89 45 48 mov QWORD PTR p$[rbp], rax + 00225 48 8b 45 48 mov rax, QWORD PTR p$[rbp] + 00229 48 83 c0 04 add rax, 4 + 0022d 48 89 45 48 mov QWORD PTR p$[rbp], rax ; 4497 : } - 00230 e9 2d ff ff ff jmp $LN5@stbi__expa + 00231 e9 2d ff ff ff jmp $LN5@stbi__expa $LN6@stbi__expa: $LN10@stbi__expa: ; 4498 : } ; 4499 : STBI_FREE(a->out); - 00235 48 8b 85 c0 01 + 00236 48 8b 85 c0 01 00 00 mov rax, QWORD PTR a$[rbp] - 0023c 48 8b 48 18 mov rcx, QWORD PTR [rax+24] - 00240 ff 15 00 00 00 + 0023d 48 8b 48 18 mov rcx, QWORD PTR [rax+24] + 00241 ff 15 00 00 00 00 call QWORD PTR __imp_free + 00247 90 npad 1 ; 4500 : a->out = temp_out; - 00246 48 8b 85 c0 01 + 00248 48 8b 85 c0 01 00 00 mov rax, QWORD PTR a$[rbp] - 0024d 48 8b 4d 68 mov rcx, QWORD PTR temp_out$[rbp] - 00251 48 89 48 18 mov QWORD PTR [rax+24], rcx + 0024f 48 8b 4d 68 mov rcx, QWORD PTR temp_out$[rbp] + 00253 48 89 48 18 mov QWORD PTR [rax+24], rcx ; 4501 : ; 4502 : STBI_NOTUSED(len); ; 4503 : ; 4504 : return 1; - 00255 b8 01 00 00 00 mov eax, 1 + 00257 b8 01 00 00 00 mov eax, 1 $LN1@stbi__expa: ; 4505 : } - 0025a 48 8d a5 a8 01 + 0025c 48 8d a5 a8 01 00 00 lea rsp, QWORD PTR [rbp+424] - 00261 5f pop rdi - 00262 5d pop rbp - 00263 c3 ret 0 + 00263 5f pop rdi + 00264 5d pop rbp + 00265 c3 ret 0 stbi__expand_png_palette ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -15839,201 +15941,202 @@ stbi__compute_transparency16 PROC ; COMDAT 0001d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00024 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00029 90 npad 1 ; 4445 : stbi__context* s = z->s; - 00029 48 8b 85 60 01 + 0002a 48 8b 85 60 01 00 00 mov rax, QWORD PTR z$[rbp] - 00030 48 8b 00 mov rax, QWORD PTR [rax] - 00033 48 89 45 08 mov QWORD PTR s$[rbp], rax + 00031 48 8b 00 mov rax, QWORD PTR [rax] + 00034 48 89 45 08 mov QWORD PTR s$[rbp], rax ; 4446 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; - 00037 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 0003b 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 0003f 8b 00 mov eax, DWORD PTR [rax] - 00041 0f af 41 04 imul eax, DWORD PTR [rcx+4] - 00045 89 45 44 mov DWORD PTR pixel_count$[rbp], eax + 00038 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 0003c 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 00040 8b 00 mov eax, DWORD PTR [rax] + 00042 0f af 41 04 imul eax, DWORD PTR [rcx+4] + 00046 89 45 44 mov DWORD PTR pixel_count$[rbp], eax ; 4447 : stbi__uint16* p = (stbi__uint16*)z->out; - 00048 48 8b 85 60 01 + 00049 48 8b 85 60 01 00 00 mov rax, QWORD PTR z$[rbp] - 0004f 48 8b 40 18 mov rax, QWORD PTR [rax+24] - 00053 48 89 45 68 mov QWORD PTR p$[rbp], rax + 00050 48 8b 40 18 mov rax, QWORD PTR [rax+24] + 00054 48 89 45 68 mov QWORD PTR p$[rbp], rax ; 4448 : ; 4449 : // compute color-based transparency, assuming we've ; 4450 : // already got 65535 as the alpha value in the output ; 4451 : STBI_ASSERT(out_n == 2 || out_n == 4); - 00057 83 bd 70 01 00 + 00058 83 bd 70 01 00 00 02 cmp DWORD PTR out_n$[rbp], 2 - 0005e 74 25 je SHORT $LN12@stbi__comp - 00060 83 bd 70 01 00 + 0005f 74 25 je SHORT $LN12@stbi__comp + 00061 83 bd 70 01 00 00 04 cmp DWORD PTR out_n$[rbp], 4 - 00067 74 1c je SHORT $LN12@stbi__comp - 00069 41 b8 63 11 00 + 00068 74 1c je SHORT $LN12@stbi__comp + 0006a 41 b8 63 11 00 00 mov r8d, 4451 ; 00001163H - 0006f 48 8d 15 00 00 + 00070 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 00076 48 8d 0d 00 00 + 00077 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1DC@BMIDKOPK@?$AAo?$AAu?$AAt?$AA_?$AAn?$AA?5?$AA?$DN?$AA?$DN?$AA?5?$AA2?$AA?5?$AA?$HM?$AA?$HM?$AA?5?$AAo@ - 0007d ff 15 00 00 00 + 0007e ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 00083 33 c0 xor eax, eax + 00084 33 c0 xor eax, eax $LN12@stbi__comp: ; 4452 : ; 4453 : if (out_n == 2) { - 00085 83 bd 70 01 00 + 00086 83 bd 70 01 00 00 02 cmp DWORD PTR out_n$[rbp], 2 - 0008c 0f 85 83 00 00 + 0008d 0f 85 83 00 00 00 jne $LN8@stbi__comp ; 4454 : for (i = 0; i < pixel_count; ++i) { - 00092 c7 45 24 00 00 + 00093 c7 45 24 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00099 eb 08 jmp SHORT $LN4@stbi__comp + 0009a eb 08 jmp SHORT $LN4@stbi__comp $LN2@stbi__comp: - 0009b 8b 45 24 mov eax, DWORD PTR i$[rbp] - 0009e ff c0 inc eax - 000a0 89 45 24 mov DWORD PTR i$[rbp], eax + 0009c 8b 45 24 mov eax, DWORD PTR i$[rbp] + 0009f ff c0 inc eax + 000a1 89 45 24 mov DWORD PTR i$[rbp], eax $LN4@stbi__comp: - 000a3 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] - 000a6 39 45 24 cmp DWORD PTR i$[rbp], eax - 000a9 73 65 jae SHORT $LN3@stbi__comp + 000a4 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] + 000a7 39 45 24 cmp DWORD PTR i$[rbp], eax + 000aa 73 65 jae SHORT $LN3@stbi__comp ; 4455 : p[1] = (p[0] == tc[0] ? 0 : 65535); - 000ab b8 02 00 00 00 mov eax, 2 - 000b0 48 6b c0 00 imul rax, rax, 0 - 000b4 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 000b8 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 000bc b9 02 00 00 00 mov ecx, 2 - 000c1 48 6b c9 00 imul rcx, rcx, 0 - 000c5 48 8b 95 68 01 + 000ac b8 02 00 00 00 mov eax, 2 + 000b1 48 6b c0 00 imul rax, rax, 0 + 000b5 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 000b9 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 000bd b9 02 00 00 00 mov ecx, 2 + 000c2 48 6b c9 00 imul rcx, rcx, 0 + 000c6 48 8b 95 68 01 00 00 mov rdx, QWORD PTR tc$[rbp] - 000cc 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] - 000d0 3b c1 cmp eax, ecx - 000d2 75 0c jne SHORT $LN13@stbi__comp - 000d4 c7 85 34 01 00 + 000cd 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] + 000d1 3b c1 cmp eax, ecx + 000d3 75 0c jne SHORT $LN13@stbi__comp + 000d5 c7 85 34 01 00 00 00 00 00 00 mov DWORD PTR tv87[rbp], 0 - 000de eb 0a jmp SHORT $LN14@stbi__comp + 000df eb 0a jmp SHORT $LN14@stbi__comp $LN13@stbi__comp: - 000e0 c7 85 34 01 00 + 000e1 c7 85 34 01 00 00 ff ff 00 00 mov DWORD PTR tv87[rbp], 65535 ; 0000ffffH $LN14@stbi__comp: - 000ea b8 02 00 00 00 mov eax, 2 - 000ef 48 6b c0 01 imul rax, rax, 1 - 000f3 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 000f7 0f b7 95 34 01 + 000eb b8 02 00 00 00 mov eax, 2 + 000f0 48 6b c0 01 imul rax, rax, 1 + 000f4 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 000f8 0f b7 95 34 01 00 00 movzx edx, WORD PTR tv87[rbp] - 000fe 66 89 14 01 mov WORD PTR [rcx+rax], dx + 000ff 66 89 14 01 mov WORD PTR [rcx+rax], dx ; 4456 : p += 2; - 00102 48 8b 45 68 mov rax, QWORD PTR p$[rbp] - 00106 48 83 c0 04 add rax, 4 - 0010a 48 89 45 68 mov QWORD PTR p$[rbp], rax + 00103 48 8b 45 68 mov rax, QWORD PTR p$[rbp] + 00107 48 83 c0 04 add rax, 4 + 0010b 48 89 45 68 mov QWORD PTR p$[rbp], rax ; 4457 : } - 0010e eb 8b jmp SHORT $LN2@stbi__comp + 0010f eb 8b jmp SHORT $LN2@stbi__comp $LN3@stbi__comp: ; 4458 : } - 00110 e9 bc 00 00 00 jmp $LN9@stbi__comp + 00111 e9 bc 00 00 00 jmp $LN9@stbi__comp $LN8@stbi__comp: ; 4459 : else { ; 4460 : for (i = 0; i < pixel_count; ++i) { - 00115 c7 45 24 00 00 + 00116 c7 45 24 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0011c eb 08 jmp SHORT $LN7@stbi__comp + 0011d eb 08 jmp SHORT $LN7@stbi__comp $LN5@stbi__comp: - 0011e 8b 45 24 mov eax, DWORD PTR i$[rbp] - 00121 ff c0 inc eax - 00123 89 45 24 mov DWORD PTR i$[rbp], eax + 0011f 8b 45 24 mov eax, DWORD PTR i$[rbp] + 00122 ff c0 inc eax + 00124 89 45 24 mov DWORD PTR i$[rbp], eax $LN7@stbi__comp: - 00126 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] - 00129 39 45 24 cmp DWORD PTR i$[rbp], eax - 0012c 0f 83 9f 00 00 + 00127 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] + 0012a 39 45 24 cmp DWORD PTR i$[rbp], eax + 0012d 0f 83 9f 00 00 00 jae $LN6@stbi__comp ; 4461 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) - 00132 b8 02 00 00 00 mov eax, 2 - 00137 48 6b c0 00 imul rax, rax, 0 - 0013b 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 0013f 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 00143 b9 02 00 00 00 mov ecx, 2 - 00148 48 6b c9 00 imul rcx, rcx, 0 - 0014c 48 8b 95 68 01 + 00133 b8 02 00 00 00 mov eax, 2 + 00138 48 6b c0 00 imul rax, rax, 0 + 0013c 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 00140 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 00144 b9 02 00 00 00 mov ecx, 2 + 00149 48 6b c9 00 imul rcx, rcx, 0 + 0014d 48 8b 95 68 01 00 00 mov rdx, QWORD PTR tc$[rbp] - 00153 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] - 00157 3b c1 cmp eax, ecx - 00159 75 65 jne SHORT $LN10@stbi__comp - 0015b b8 02 00 00 00 mov eax, 2 - 00160 48 6b c0 01 imul rax, rax, 1 - 00164 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 00168 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 0016c b9 02 00 00 00 mov ecx, 2 - 00171 48 6b c9 01 imul rcx, rcx, 1 - 00175 48 8b 95 68 01 + 00154 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] + 00158 3b c1 cmp eax, ecx + 0015a 75 65 jne SHORT $LN10@stbi__comp + 0015c b8 02 00 00 00 mov eax, 2 + 00161 48 6b c0 01 imul rax, rax, 1 + 00165 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 00169 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 0016d b9 02 00 00 00 mov ecx, 2 + 00172 48 6b c9 01 imul rcx, rcx, 1 + 00176 48 8b 95 68 01 00 00 mov rdx, QWORD PTR tc$[rbp] - 0017c 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] - 00180 3b c1 cmp eax, ecx - 00182 75 3c jne SHORT $LN10@stbi__comp - 00184 b8 02 00 00 00 mov eax, 2 - 00189 48 6b c0 02 imul rax, rax, 2 - 0018d 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 00191 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 00195 b9 02 00 00 00 mov ecx, 2 - 0019a 48 6b c9 02 imul rcx, rcx, 2 - 0019e 48 8b 95 68 01 + 0017d 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] + 00181 3b c1 cmp eax, ecx + 00183 75 3c jne SHORT $LN10@stbi__comp + 00185 b8 02 00 00 00 mov eax, 2 + 0018a 48 6b c0 02 imul rax, rax, 2 + 0018e 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 00192 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 00196 b9 02 00 00 00 mov ecx, 2 + 0019b 48 6b c9 02 imul rcx, rcx, 2 + 0019f 48 8b 95 68 01 00 00 mov rdx, QWORD PTR tc$[rbp] - 001a5 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] - 001a9 3b c1 cmp eax, ecx - 001ab 75 13 jne SHORT $LN10@stbi__comp + 001a6 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] + 001aa 3b c1 cmp eax, ecx + 001ac 75 13 jne SHORT $LN10@stbi__comp ; 4462 : p[3] = 0; - 001ad b8 02 00 00 00 mov eax, 2 - 001b2 48 6b c0 03 imul rax, rax, 3 - 001b6 33 c9 xor ecx, ecx - 001b8 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] - 001bc 66 89 0c 02 mov WORD PTR [rdx+rax], cx + 001ae b8 02 00 00 00 mov eax, 2 + 001b3 48 6b c0 03 imul rax, rax, 3 + 001b7 33 c9 xor ecx, ecx + 001b9 48 8b 55 68 mov rdx, QWORD PTR p$[rbp] + 001bd 66 89 0c 02 mov WORD PTR [rdx+rax], cx $LN10@stbi__comp: ; 4463 : p += 4; - 001c0 48 8b 45 68 mov rax, QWORD PTR p$[rbp] - 001c4 48 83 c0 08 add rax, 8 - 001c8 48 89 45 68 mov QWORD PTR p$[rbp], rax + 001c1 48 8b 45 68 mov rax, QWORD PTR p$[rbp] + 001c5 48 83 c0 08 add rax, 8 + 001c9 48 89 45 68 mov QWORD PTR p$[rbp], rax ; 4464 : } - 001cc e9 4d ff ff ff jmp $LN5@stbi__comp + 001cd e9 4d ff ff ff jmp $LN5@stbi__comp $LN6@stbi__comp: $LN9@stbi__comp: ; 4465 : } ; 4466 : return 1; - 001d1 b8 01 00 00 00 mov eax, 1 + 001d2 b8 01 00 00 00 mov eax, 1 ; 4467 : } - 001d6 48 8d a5 48 01 + 001d7 48 8d a5 48 01 00 00 lea rsp, QWORD PTR [rbp+328] - 001dd 5f pop rdi - 001de 5d pop rbp - 001df c3 ret 0 + 001de 5f pop rdi + 001df 5d pop rbp + 001e0 c3 ret 0 stbi__compute_transparency16 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -16063,200 +16166,201 @@ stbi__compute_transparency PROC ; COMDAT 0001d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00024 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00029 90 npad 1 ; 4419 : stbi__context* s = z->s; - 00029 48 8b 85 60 01 + 0002a 48 8b 85 60 01 00 00 mov rax, QWORD PTR z$[rbp] - 00030 48 8b 00 mov rax, QWORD PTR [rax] - 00033 48 89 45 08 mov QWORD PTR s$[rbp], rax + 00031 48 8b 00 mov rax, QWORD PTR [rax] + 00034 48 89 45 08 mov QWORD PTR s$[rbp], rax ; 4420 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; - 00037 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 0003b 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 0003f 8b 00 mov eax, DWORD PTR [rax] - 00041 0f af 41 04 imul eax, DWORD PTR [rcx+4] - 00045 89 45 44 mov DWORD PTR pixel_count$[rbp], eax + 00038 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 0003c 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 00040 8b 00 mov eax, DWORD PTR [rax] + 00042 0f af 41 04 imul eax, DWORD PTR [rcx+4] + 00046 89 45 44 mov DWORD PTR pixel_count$[rbp], eax ; 4421 : stbi_uc* p = z->out; - 00048 48 8b 85 60 01 + 00049 48 8b 85 60 01 00 00 mov rax, QWORD PTR z$[rbp] - 0004f 48 8b 40 18 mov rax, QWORD PTR [rax+24] - 00053 48 89 45 68 mov QWORD PTR p$[rbp], rax + 00050 48 8b 40 18 mov rax, QWORD PTR [rax+24] + 00054 48 89 45 68 mov QWORD PTR p$[rbp], rax ; 4422 : ; 4423 : // compute color-based transparency, assuming we've ; 4424 : // already got 255 as the alpha value in the output ; 4425 : STBI_ASSERT(out_n == 2 || out_n == 4); - 00057 83 bd 70 01 00 + 00058 83 bd 70 01 00 00 02 cmp DWORD PTR out_n$[rbp], 2 - 0005e 74 25 je SHORT $LN12@stbi__comp - 00060 83 bd 70 01 00 + 0005f 74 25 je SHORT $LN12@stbi__comp + 00061 83 bd 70 01 00 00 04 cmp DWORD PTR out_n$[rbp], 4 - 00067 74 1c je SHORT $LN12@stbi__comp - 00069 41 b8 49 11 00 + 00068 74 1c je SHORT $LN12@stbi__comp + 0006a 41 b8 49 11 00 00 mov r8d, 4425 ; 00001149H - 0006f 48 8d 15 00 00 + 00070 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 00076 48 8d 0d 00 00 + 00077 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1DC@BMIDKOPK@?$AAo?$AAu?$AAt?$AA_?$AAn?$AA?5?$AA?$DN?$AA?$DN?$AA?5?$AA2?$AA?5?$AA?$HM?$AA?$HM?$AA?5?$AAo@ - 0007d ff 15 00 00 00 + 0007e ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 00083 33 c0 xor eax, eax + 00084 33 c0 xor eax, eax $LN12@stbi__comp: ; 4426 : ; 4427 : if (out_n == 2) { - 00085 83 bd 70 01 00 + 00086 83 bd 70 01 00 00 02 cmp DWORD PTR out_n$[rbp], 2 - 0008c 0f 85 82 00 00 + 0008d 0f 85 82 00 00 00 jne $LN8@stbi__comp ; 4428 : for (i = 0; i < pixel_count; ++i) { - 00092 c7 45 24 00 00 + 00093 c7 45 24 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00099 eb 08 jmp SHORT $LN4@stbi__comp + 0009a eb 08 jmp SHORT $LN4@stbi__comp $LN2@stbi__comp: - 0009b 8b 45 24 mov eax, DWORD PTR i$[rbp] - 0009e ff c0 inc eax - 000a0 89 45 24 mov DWORD PTR i$[rbp], eax + 0009c 8b 45 24 mov eax, DWORD PTR i$[rbp] + 0009f ff c0 inc eax + 000a1 89 45 24 mov DWORD PTR i$[rbp], eax $LN4@stbi__comp: - 000a3 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] - 000a6 39 45 24 cmp DWORD PTR i$[rbp], eax - 000a9 73 64 jae SHORT $LN3@stbi__comp + 000a4 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] + 000a7 39 45 24 cmp DWORD PTR i$[rbp], eax + 000aa 73 64 jae SHORT $LN3@stbi__comp ; 4429 : p[1] = (p[0] == tc[0] ? 0 : 255); - 000ab b8 01 00 00 00 mov eax, 1 - 000b0 48 6b c0 00 imul rax, rax, 0 - 000b4 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 000b8 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 000bc b9 01 00 00 00 mov ecx, 1 - 000c1 48 6b c9 00 imul rcx, rcx, 0 - 000c5 48 8b 95 68 01 + 000ac b8 01 00 00 00 mov eax, 1 + 000b1 48 6b c0 00 imul rax, rax, 0 + 000b5 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 000b9 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 000bd b9 01 00 00 00 mov ecx, 1 + 000c2 48 6b c9 00 imul rcx, rcx, 0 + 000c6 48 8b 95 68 01 00 00 mov rdx, QWORD PTR tc$[rbp] - 000cc 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 000d0 3b c1 cmp eax, ecx - 000d2 75 0c jne SHORT $LN13@stbi__comp - 000d4 c7 85 34 01 00 + 000cd 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 000d1 3b c1 cmp eax, ecx + 000d3 75 0c jne SHORT $LN13@stbi__comp + 000d5 c7 85 34 01 00 00 00 00 00 00 mov DWORD PTR tv87[rbp], 0 - 000de eb 0a jmp SHORT $LN14@stbi__comp + 000df eb 0a jmp SHORT $LN14@stbi__comp $LN13@stbi__comp: - 000e0 c7 85 34 01 00 + 000e1 c7 85 34 01 00 00 ff 00 00 00 mov DWORD PTR tv87[rbp], 255 ; 000000ffH $LN14@stbi__comp: - 000ea b8 01 00 00 00 mov eax, 1 - 000ef 48 6b c0 01 imul rax, rax, 1 - 000f3 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 000f7 0f b6 95 34 01 + 000eb b8 01 00 00 00 mov eax, 1 + 000f0 48 6b c0 01 imul rax, rax, 1 + 000f4 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 000f8 0f b6 95 34 01 00 00 movzx edx, BYTE PTR tv87[rbp] - 000fe 88 14 01 mov BYTE PTR [rcx+rax], dl + 000ff 88 14 01 mov BYTE PTR [rcx+rax], dl ; 4430 : p += 2; - 00101 48 8b 45 68 mov rax, QWORD PTR p$[rbp] - 00105 48 83 c0 02 add rax, 2 - 00109 48 89 45 68 mov QWORD PTR p$[rbp], rax + 00102 48 8b 45 68 mov rax, QWORD PTR p$[rbp] + 00106 48 83 c0 02 add rax, 2 + 0010a 48 89 45 68 mov QWORD PTR p$[rbp], rax ; 4431 : } - 0010d eb 8c jmp SHORT $LN2@stbi__comp + 0010e eb 8c jmp SHORT $LN2@stbi__comp $LN3@stbi__comp: ; 4432 : } - 0010f e9 ba 00 00 00 jmp $LN9@stbi__comp + 00110 e9 ba 00 00 00 jmp $LN9@stbi__comp $LN8@stbi__comp: ; 4433 : else { ; 4434 : for (i = 0; i < pixel_count; ++i) { - 00114 c7 45 24 00 00 + 00115 c7 45 24 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0011b eb 08 jmp SHORT $LN7@stbi__comp + 0011c eb 08 jmp SHORT $LN7@stbi__comp $LN5@stbi__comp: - 0011d 8b 45 24 mov eax, DWORD PTR i$[rbp] - 00120 ff c0 inc eax - 00122 89 45 24 mov DWORD PTR i$[rbp], eax + 0011e 8b 45 24 mov eax, DWORD PTR i$[rbp] + 00121 ff c0 inc eax + 00123 89 45 24 mov DWORD PTR i$[rbp], eax $LN7@stbi__comp: - 00125 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] - 00128 39 45 24 cmp DWORD PTR i$[rbp], eax - 0012b 0f 83 9d 00 00 + 00126 8b 45 44 mov eax, DWORD PTR pixel_count$[rbp] + 00129 39 45 24 cmp DWORD PTR i$[rbp], eax + 0012c 0f 83 9d 00 00 00 jae $LN6@stbi__comp ; 4435 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) - 00131 b8 01 00 00 00 mov eax, 1 - 00136 48 6b c0 00 imul rax, rax, 0 - 0013a 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 0013e 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00142 b9 01 00 00 00 mov ecx, 1 - 00147 48 6b c9 00 imul rcx, rcx, 0 - 0014b 48 8b 95 68 01 + 00132 b8 01 00 00 00 mov eax, 1 + 00137 48 6b c0 00 imul rax, rax, 0 + 0013b 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 0013f 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00143 b9 01 00 00 00 mov ecx, 1 + 00148 48 6b c9 00 imul rcx, rcx, 0 + 0014c 48 8b 95 68 01 00 00 mov rdx, QWORD PTR tc$[rbp] - 00152 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00156 3b c1 cmp eax, ecx - 00158 75 63 jne SHORT $LN10@stbi__comp - 0015a b8 01 00 00 00 mov eax, 1 - 0015f 48 6b c0 01 imul rax, rax, 1 - 00163 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 00167 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0016b b9 01 00 00 00 mov ecx, 1 - 00170 48 6b c9 01 imul rcx, rcx, 1 - 00174 48 8b 95 68 01 + 00153 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00157 3b c1 cmp eax, ecx + 00159 75 63 jne SHORT $LN10@stbi__comp + 0015b b8 01 00 00 00 mov eax, 1 + 00160 48 6b c0 01 imul rax, rax, 1 + 00164 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 00168 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0016c b9 01 00 00 00 mov ecx, 1 + 00171 48 6b c9 01 imul rcx, rcx, 1 + 00175 48 8b 95 68 01 00 00 mov rdx, QWORD PTR tc$[rbp] - 0017b 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 0017f 3b c1 cmp eax, ecx - 00181 75 3a jne SHORT $LN10@stbi__comp - 00183 b8 01 00 00 00 mov eax, 1 - 00188 48 6b c0 02 imul rax, rax, 2 - 0018c 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 00190 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00194 b9 01 00 00 00 mov ecx, 1 - 00199 48 6b c9 02 imul rcx, rcx, 2 - 0019d 48 8b 95 68 01 + 0017c 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00180 3b c1 cmp eax, ecx + 00182 75 3a jne SHORT $LN10@stbi__comp + 00184 b8 01 00 00 00 mov eax, 1 + 00189 48 6b c0 02 imul rax, rax, 2 + 0018d 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 00191 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00195 b9 01 00 00 00 mov ecx, 1 + 0019a 48 6b c9 02 imul rcx, rcx, 2 + 0019e 48 8b 95 68 01 00 00 mov rdx, QWORD PTR tc$[rbp] - 001a4 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 001a8 3b c1 cmp eax, ecx - 001aa 75 11 jne SHORT $LN10@stbi__comp + 001a5 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 001a9 3b c1 cmp eax, ecx + 001ab 75 11 jne SHORT $LN10@stbi__comp ; 4436 : p[3] = 0; - 001ac b8 01 00 00 00 mov eax, 1 - 001b1 48 6b c0 03 imul rax, rax, 3 - 001b5 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] - 001b9 c6 04 01 00 mov BYTE PTR [rcx+rax], 0 + 001ad b8 01 00 00 00 mov eax, 1 + 001b2 48 6b c0 03 imul rax, rax, 3 + 001b6 48 8b 4d 68 mov rcx, QWORD PTR p$[rbp] + 001ba c6 04 01 00 mov BYTE PTR [rcx+rax], 0 $LN10@stbi__comp: ; 4437 : p += 4; - 001bd 48 8b 45 68 mov rax, QWORD PTR p$[rbp] - 001c1 48 83 c0 04 add rax, 4 - 001c5 48 89 45 68 mov QWORD PTR p$[rbp], rax + 001be 48 8b 45 68 mov rax, QWORD PTR p$[rbp] + 001c2 48 83 c0 04 add rax, 4 + 001c6 48 89 45 68 mov QWORD PTR p$[rbp], rax ; 4438 : } - 001c9 e9 4f ff ff ff jmp $LN5@stbi__comp + 001ca e9 4f ff ff ff jmp $LN5@stbi__comp $LN6@stbi__comp: $LN9@stbi__comp: ; 4439 : } ; 4440 : return 1; - 001ce b8 01 00 00 00 mov eax, 1 + 001cf b8 01 00 00 00 mov eax, 1 ; 4441 : } - 001d3 48 8d a5 48 01 + 001d4 48 8d a5 48 01 00 00 lea rsp, QWORD PTR [rbp+328] - 001da 5f pop rdi - 001db 5d pop rbp - 001dc c3 ret 0 + 001db 5f pop rdi + 001dc 5d pop rbp + 001dd c3 ret 0 stbi__compute_transparency ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -16309,469 +16413,473 @@ stbi__create_png_image PROC ; COMDAT 0003b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00042 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00047 90 npad 1 ; 4374 : int bytes = (depth == 16 ? 2 : 1); - 00047 83 bd 20 04 00 + 00048 83 bd 20 04 00 00 10 cmp DWORD PTR depth$[rbp], 16 - 0004e 75 0c jne SHORT $LN16@stbi__crea - 00050 c7 85 d4 03 00 + 0004f 75 0c jne SHORT $LN16@stbi__crea + 00051 c7 85 d4 03 00 00 02 00 00 00 mov DWORD PTR tv65[rbp], 2 - 0005a eb 0a jmp SHORT $LN17@stbi__crea + 0005b eb 0a jmp SHORT $LN17@stbi__crea $LN16@stbi__crea: - 0005c c7 85 d4 03 00 + 0005d c7 85 d4 03 00 00 01 00 00 00 mov DWORD PTR tv65[rbp], 1 $LN17@stbi__crea: - 00066 8b 85 d4 03 00 + 00067 8b 85 d4 03 00 00 mov eax, DWORD PTR tv65[rbp] - 0006c 89 45 04 mov DWORD PTR bytes$[rbp], eax + 0006d 89 45 04 mov DWORD PTR bytes$[rbp], eax ; 4375 : int out_bytes = out_n * bytes; - 0006f 8b 85 18 04 00 + 00070 8b 85 18 04 00 00 mov eax, DWORD PTR out_n$[rbp] - 00075 0f af 45 04 imul eax, DWORD PTR bytes$[rbp] - 00079 89 45 24 mov DWORD PTR out_bytes$[rbp], eax + 00076 0f af 45 04 imul eax, DWORD PTR bytes$[rbp] + 0007a 89 45 24 mov DWORD PTR out_bytes$[rbp], eax ; 4376 : stbi_uc* final; ; 4377 : int p; ; 4378 : if (!interlaced) - 0007c 83 bd 30 04 00 + 0007d 83 bd 30 04 00 00 00 cmp DWORD PTR interlaced$[rbp], 0 - 00083 75 5b jne SHORT $LN11@stbi__crea + 00084 75 5b jne SHORT $LN11@stbi__crea ; 4379 : return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); - 00085 48 8b 85 00 04 + 00086 48 8b 85 00 04 00 00 mov rax, QWORD PTR a$[rbp] - 0008c 48 8b 00 mov rax, QWORD PTR [rax] - 0008f 48 8b 8d 00 04 + 0008d 48 8b 00 mov rax, QWORD PTR [rax] + 00090 48 8b 8d 00 04 00 00 mov rcx, QWORD PTR a$[rbp] - 00096 48 8b 09 mov rcx, QWORD PTR [rcx] - 00099 8b 95 28 04 00 + 00097 48 8b 09 mov rcx, QWORD PTR [rcx] + 0009a 8b 95 28 04 00 00 mov edx, DWORD PTR color$[rbp] - 0009f 89 54 24 38 mov DWORD PTR [rsp+56], edx - 000a3 8b 95 20 04 00 + 000a0 89 54 24 38 mov DWORD PTR [rsp+56], edx + 000a4 8b 95 20 04 00 00 mov edx, DWORD PTR depth$[rbp] - 000a9 89 54 24 30 mov DWORD PTR [rsp+48], edx - 000ad 8b 40 04 mov eax, DWORD PTR [rax+4] - 000b0 89 44 24 28 mov DWORD PTR [rsp+40], eax - 000b4 8b 01 mov eax, DWORD PTR [rcx] - 000b6 89 44 24 20 mov DWORD PTR [rsp+32], eax - 000ba 44 8b 8d 18 04 + 000aa 89 54 24 30 mov DWORD PTR [rsp+48], edx + 000ae 8b 40 04 mov eax, DWORD PTR [rax+4] + 000b1 89 44 24 28 mov DWORD PTR [rsp+40], eax + 000b5 8b 01 mov eax, DWORD PTR [rcx] + 000b7 89 44 24 20 mov DWORD PTR [rsp+32], eax + 000bb 44 8b 8d 18 04 00 00 mov r9d, DWORD PTR out_n$[rbp] - 000c1 44 8b 85 10 04 + 000c2 44 8b 85 10 04 00 00 mov r8d, DWORD PTR image_data_len$[rbp] - 000c8 48 8b 95 08 04 + 000c9 48 8b 95 08 04 00 00 mov rdx, QWORD PTR image_data$[rbp] - 000cf 48 8b 8d 00 04 + 000d0 48 8b 8d 00 04 00 00 mov rcx, QWORD PTR a$[rbp] - 000d6 e8 00 00 00 00 call stbi__create_png_image_raw - 000db e9 18 04 00 00 jmp $LN1@stbi__crea + 000d7 e8 00 00 00 00 call stbi__create_png_image_raw + 000dc e9 1b 04 00 00 jmp $LN1@stbi__crea $LN11@stbi__crea: ; 4380 : ; 4381 : // de-interlacing ; 4382 : final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); - 000e0 48 8b 85 00 04 + 000e1 48 8b 85 00 04 00 00 mov rax, QWORD PTR a$[rbp] - 000e7 48 8b 00 mov rax, QWORD PTR [rax] - 000ea 48 8b 8d 00 04 + 000e8 48 8b 00 mov rax, QWORD PTR [rax] + 000eb 48 8b 8d 00 04 00 00 mov rcx, QWORD PTR a$[rbp] - 000f1 48 8b 09 mov rcx, QWORD PTR [rcx] - 000f4 45 33 c9 xor r9d, r9d - 000f7 44 8b 45 24 mov r8d, DWORD PTR out_bytes$[rbp] - 000fb 8b 50 04 mov edx, DWORD PTR [rax+4] - 000fe 8b 09 mov ecx, DWORD PTR [rcx] - 00100 e8 00 00 00 00 call stbi__malloc_mad3 - 00105 48 89 45 48 mov QWORD PTR final$[rbp], rax + 000f2 48 8b 09 mov rcx, QWORD PTR [rcx] + 000f5 45 33 c9 xor r9d, r9d + 000f8 44 8b 45 24 mov r8d, DWORD PTR out_bytes$[rbp] + 000fc 8b 50 04 mov edx, DWORD PTR [rax+4] + 000ff 8b 09 mov ecx, DWORD PTR [rcx] + 00101 e8 00 00 00 00 call stbi__malloc_mad3 + 00106 48 89 45 48 mov QWORD PTR final$[rbp], rax ; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); - 00109 48 83 7d 48 00 cmp QWORD PTR final$[rbp], 0 - 0010e 75 11 jne SHORT $LN12@stbi__crea - 00110 48 8d 0d 00 00 + 0010a 48 83 7d 48 00 cmp QWORD PTR final$[rbp], 0 + 0010f 75 11 jne SHORT $LN12@stbi__crea + 00111 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 00117 e8 00 00 00 00 call stbi__err - 0011c e9 d7 03 00 00 jmp $LN1@stbi__crea + 00118 e8 00 00 00 00 call stbi__err + 0011d e9 da 03 00 00 jmp $LN1@stbi__crea $LN12@stbi__crea: ; 4384 : for (p = 0; p < 7; ++p) { - 00121 c7 45 64 00 00 + 00122 c7 45 64 00 00 00 00 mov DWORD PTR p$[rbp], 0 - 00128 eb 08 jmp SHORT $LN4@stbi__crea + 00129 eb 08 jmp SHORT $LN4@stbi__crea $LN2@stbi__crea: - 0012a 8b 45 64 mov eax, DWORD PTR p$[rbp] - 0012d ff c0 inc eax - 0012f 89 45 64 mov DWORD PTR p$[rbp], eax + 0012b 8b 45 64 mov eax, DWORD PTR p$[rbp] + 0012e ff c0 inc eax + 00130 89 45 64 mov DWORD PTR p$[rbp], eax $LN4@stbi__crea: - 00132 83 7d 64 07 cmp DWORD PTR p$[rbp], 7 - 00136 0f 8d a8 03 00 + 00133 83 7d 64 07 cmp DWORD PTR p$[rbp], 7 + 00137 0f 8d ab 03 00 00 jge $LN3@stbi__crea ; 4385 : int xorig[] = { 0,4,0,2,0,1,0 }; - 0013c c7 85 88 00 00 + 0013d c7 85 88 00 00 00 00 00 00 00 mov DWORD PTR xorig$7[rbp], 0 - 00146 c7 85 8c 00 00 + 00147 c7 85 8c 00 00 00 04 00 00 00 mov DWORD PTR xorig$7[rbp+4], 4 - 00150 c7 85 90 00 00 + 00151 c7 85 90 00 00 00 00 00 00 00 mov DWORD PTR xorig$7[rbp+8], 0 - 0015a c7 85 94 00 00 + 0015b c7 85 94 00 00 00 02 00 00 00 mov DWORD PTR xorig$7[rbp+12], 2 - 00164 c7 85 98 00 00 + 00165 c7 85 98 00 00 00 00 00 00 00 mov DWORD PTR xorig$7[rbp+16], 0 - 0016e c7 85 9c 00 00 + 0016f c7 85 9c 00 00 00 01 00 00 00 mov DWORD PTR xorig$7[rbp+20], 1 - 00178 c7 85 a0 00 00 + 00179 c7 85 a0 00 00 00 00 00 00 00 mov DWORD PTR xorig$7[rbp+24], 0 ; 4386 : int yorig[] = { 0,0,4,0,2,0,1 }; - 00182 c7 85 c8 00 00 + 00183 c7 85 c8 00 00 00 00 00 00 00 mov DWORD PTR yorig$8[rbp], 0 - 0018c c7 85 cc 00 00 + 0018d c7 85 cc 00 00 00 00 00 00 00 mov DWORD PTR yorig$8[rbp+4], 0 - 00196 c7 85 d0 00 00 + 00197 c7 85 d0 00 00 00 04 00 00 00 mov DWORD PTR yorig$8[rbp+8], 4 - 001a0 c7 85 d4 00 00 + 001a1 c7 85 d4 00 00 00 00 00 00 00 mov DWORD PTR yorig$8[rbp+12], 0 - 001aa c7 85 d8 00 00 + 001ab c7 85 d8 00 00 00 02 00 00 00 mov DWORD PTR yorig$8[rbp+16], 2 - 001b4 c7 85 dc 00 00 + 001b5 c7 85 dc 00 00 00 00 00 00 00 mov DWORD PTR yorig$8[rbp+20], 0 - 001be c7 85 e0 00 00 + 001bf c7 85 e0 00 00 00 01 00 00 00 mov DWORD PTR yorig$8[rbp+24], 1 ; 4387 : int xspc[] = { 8,8,4,4,2,2,1 }; - 001c8 c7 85 08 01 00 + 001c9 c7 85 08 01 00 00 08 00 00 00 mov DWORD PTR xspc$9[rbp], 8 - 001d2 c7 85 0c 01 00 + 001d3 c7 85 0c 01 00 00 08 00 00 00 mov DWORD PTR xspc$9[rbp+4], 8 - 001dc c7 85 10 01 00 + 001dd c7 85 10 01 00 00 04 00 00 00 mov DWORD PTR xspc$9[rbp+8], 4 - 001e6 c7 85 14 01 00 + 001e7 c7 85 14 01 00 00 04 00 00 00 mov DWORD PTR xspc$9[rbp+12], 4 - 001f0 c7 85 18 01 00 + 001f1 c7 85 18 01 00 00 02 00 00 00 mov DWORD PTR xspc$9[rbp+16], 2 - 001fa c7 85 1c 01 00 + 001fb c7 85 1c 01 00 00 02 00 00 00 mov DWORD PTR xspc$9[rbp+20], 2 - 00204 c7 85 20 01 00 + 00205 c7 85 20 01 00 00 01 00 00 00 mov DWORD PTR xspc$9[rbp+24], 1 ; 4388 : int yspc[] = { 8,8,8,4,4,2,2 }; - 0020e c7 85 48 01 00 + 0020f c7 85 48 01 00 00 08 00 00 00 mov DWORD PTR yspc$10[rbp], 8 - 00218 c7 85 4c 01 00 + 00219 c7 85 4c 01 00 00 08 00 00 00 mov DWORD PTR yspc$10[rbp+4], 8 - 00222 c7 85 50 01 00 + 00223 c7 85 50 01 00 00 08 00 00 00 mov DWORD PTR yspc$10[rbp+8], 8 - 0022c c7 85 54 01 00 + 0022d c7 85 54 01 00 00 04 00 00 00 mov DWORD PTR yspc$10[rbp+12], 4 - 00236 c7 85 58 01 00 + 00237 c7 85 58 01 00 00 04 00 00 00 mov DWORD PTR yspc$10[rbp+16], 4 - 00240 c7 85 5c 01 00 + 00241 c7 85 5c 01 00 00 02 00 00 00 mov DWORD PTR yspc$10[rbp+20], 2 - 0024a c7 85 60 01 00 + 0024b c7 85 60 01 00 00 02 00 00 00 mov DWORD PTR yspc$10[rbp+24], 2 ; 4389 : int i, j, x, y; ; 4390 : // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 ; 4391 : x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p]; - 00254 48 8b 85 00 04 + 00255 48 8b 85 00 04 00 00 mov rax, QWORD PTR a$[rbp] - 0025b 48 8b 00 mov rax, QWORD PTR [rax] - 0025e 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] - 00262 8b 8c 8d 88 00 + 0025c 48 8b 00 mov rax, QWORD PTR [rax] + 0025f 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] + 00263 8b 8c 8d 88 00 00 00 mov ecx, DWORD PTR xorig$7[rbp+rcx*4] - 00269 8b 00 mov eax, DWORD PTR [rax] - 0026b 2b c1 sub eax, ecx - 0026d 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] - 00271 8b 8c 8d 08 01 + 0026a 8b 00 mov eax, DWORD PTR [rax] + 0026c 2b c1 sub eax, ecx + 0026e 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] + 00272 8b 8c 8d 08 01 00 00 mov ecx, DWORD PTR xspc$9[rbp+rcx*4] - 00278 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] - 0027c 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] - 00280 33 d2 xor edx, edx - 00282 f7 b4 8d 08 01 + 00279 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] + 0027d 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] + 00281 33 d2 xor edx, edx + 00283 f7 b4 8d 08 01 00 00 div DWORD PTR xspc$9[rbp+rcx*4] - 00289 89 85 c4 01 00 + 0028a 89 85 c4 01 00 00 mov DWORD PTR x$13[rbp], eax ; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; - 0028f 48 8b 85 00 04 + 00290 48 8b 85 00 04 00 00 mov rax, QWORD PTR a$[rbp] - 00296 48 8b 00 mov rax, QWORD PTR [rax] - 00299 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] - 0029d 8b 8c 8d c8 00 + 00297 48 8b 00 mov rax, QWORD PTR [rax] + 0029a 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] + 0029e 8b 8c 8d c8 00 00 00 mov ecx, DWORD PTR yorig$8[rbp+rcx*4] - 002a4 8b 40 04 mov eax, DWORD PTR [rax+4] - 002a7 2b c1 sub eax, ecx - 002a9 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] - 002ad 8b 8c 8d 48 01 + 002a5 8b 40 04 mov eax, DWORD PTR [rax+4] + 002a8 2b c1 sub eax, ecx + 002aa 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] + 002ae 8b 8c 8d 48 01 00 00 mov ecx, DWORD PTR yspc$10[rbp+rcx*4] - 002b4 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] - 002b8 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] - 002bc 33 d2 xor edx, edx - 002be f7 b4 8d 48 01 + 002b5 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] + 002b9 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] + 002bd 33 d2 xor edx, edx + 002bf f7 b4 8d 48 01 00 00 div DWORD PTR yspc$10[rbp+rcx*4] - 002c5 89 85 e4 01 00 + 002c6 89 85 e4 01 00 00 mov DWORD PTR y$14[rbp], eax ; 4393 : if (x && y) { - 002cb 83 bd c4 01 00 + 002cc 83 bd c4 01 00 00 00 cmp DWORD PTR x$13[rbp], 0 - 002d2 0f 84 07 02 00 + 002d3 0f 84 0a 02 00 00 je $LN13@stbi__crea - 002d8 83 bd e4 01 00 + 002d9 83 bd e4 01 00 00 00 cmp DWORD PTR y$14[rbp], 0 - 002df 0f 84 fa 01 00 + 002e0 0f 84 fd 01 00 00 je $LN13@stbi__crea ; 4394 : stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; - 002e5 48 8b 85 00 04 + 002e6 48 8b 85 00 04 00 00 mov rax, QWORD PTR a$[rbp] - 002ec 48 8b 00 mov rax, QWORD PTR [rax] - 002ef 8b 40 08 mov eax, DWORD PTR [rax+8] - 002f2 0f af 85 c4 01 + 002ed 48 8b 00 mov rax, QWORD PTR [rax] + 002f0 8b 40 08 mov eax, DWORD PTR [rax+8] + 002f3 0f af 85 c4 01 00 00 imul eax, DWORD PTR x$13[rbp] - 002f9 0f af 85 20 04 + 002fa 0f af 85 20 04 00 00 imul eax, DWORD PTR depth$[rbp] - 00300 83 c0 07 add eax, 7 - 00303 c1 f8 03 sar eax, 3 - 00306 ff c0 inc eax - 00308 0f af 85 e4 01 + 00301 83 c0 07 add eax, 7 + 00304 c1 f8 03 sar eax, 3 + 00307 ff c0 inc eax + 00309 0f af 85 e4 01 00 00 imul eax, DWORD PTR y$14[rbp] - 0030f 89 85 04 02 00 + 00310 89 85 04 02 00 00 mov DWORD PTR img_len$15[rbp], eax ; 4395 : if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { - 00315 8b 85 28 04 00 + 00316 8b 85 28 04 00 00 mov eax, DWORD PTR color$[rbp] - 0031b 89 44 24 38 mov DWORD PTR [rsp+56], eax - 0031f 8b 85 20 04 00 + 0031c 89 44 24 38 mov DWORD PTR [rsp+56], eax + 00320 8b 85 20 04 00 00 mov eax, DWORD PTR depth$[rbp] - 00325 89 44 24 30 mov DWORD PTR [rsp+48], eax - 00329 8b 85 e4 01 00 + 00326 89 44 24 30 mov DWORD PTR [rsp+48], eax + 0032a 8b 85 e4 01 00 00 mov eax, DWORD PTR y$14[rbp] - 0032f 89 44 24 28 mov DWORD PTR [rsp+40], eax - 00333 8b 85 c4 01 00 + 00330 89 44 24 28 mov DWORD PTR [rsp+40], eax + 00334 8b 85 c4 01 00 00 mov eax, DWORD PTR x$13[rbp] - 00339 89 44 24 20 mov DWORD PTR [rsp+32], eax - 0033d 44 8b 8d 18 04 + 0033a 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0033e 44 8b 8d 18 04 00 00 mov r9d, DWORD PTR out_n$[rbp] - 00344 44 8b 85 10 04 + 00345 44 8b 85 10 04 00 00 mov r8d, DWORD PTR image_data_len$[rbp] - 0034b 48 8b 95 08 04 + 0034c 48 8b 95 08 04 00 00 mov rdx, QWORD PTR image_data$[rbp] - 00352 48 8b 8d 00 04 + 00353 48 8b 8d 00 04 00 00 mov rcx, QWORD PTR a$[rbp] - 00359 e8 00 00 00 00 call stbi__create_png_image_raw - 0035e 85 c0 test eax, eax - 00360 75 11 jne SHORT $LN14@stbi__crea + 0035a e8 00 00 00 00 call stbi__create_png_image_raw + 0035f 85 c0 test eax, eax + 00361 75 12 jne SHORT $LN14@stbi__crea ; 4396 : STBI_FREE(final); - 00362 48 8b 4d 48 mov rcx, QWORD PTR final$[rbp] - 00366 ff 15 00 00 00 + 00363 48 8b 4d 48 mov rcx, QWORD PTR final$[rbp] + 00367 ff 15 00 00 00 00 call QWORD PTR __imp_free + 0036d 90 npad 1 ; 4397 : return 0; - 0036c 33 c0 xor eax, eax - 0036e e9 85 01 00 00 jmp $LN1@stbi__crea + 0036e 33 c0 xor eax, eax + 00370 e9 87 01 00 00 jmp $LN1@stbi__crea $LN14@stbi__crea: ; 4398 : } ; 4399 : for (j = 0; j < y; ++j) { - 00373 c7 85 a4 01 00 + 00375 c7 85 a4 01 00 00 00 00 00 00 mov DWORD PTR j$12[rbp], 0 - 0037d eb 0e jmp SHORT $LN7@stbi__crea + 0037f eb 0e jmp SHORT $LN7@stbi__crea $LN5@stbi__crea: - 0037f 8b 85 a4 01 00 + 00381 8b 85 a4 01 00 00 mov eax, DWORD PTR j$12[rbp] - 00385 ff c0 inc eax - 00387 89 85 a4 01 00 + 00387 ff c0 inc eax + 00389 89 85 a4 01 00 00 mov DWORD PTR j$12[rbp], eax $LN7@stbi__crea: - 0038d 8b 85 e4 01 00 + 0038f 8b 85 e4 01 00 00 mov eax, DWORD PTR y$14[rbp] - 00393 39 85 a4 01 00 + 00395 39 85 a4 01 00 00 cmp DWORD PTR j$12[rbp], eax - 00399 0f 8d ff 00 00 + 0039b 0f 8d 00 01 00 00 jge $LN6@stbi__crea ; 4400 : for (i = 0; i < x; ++i) { - 0039f c7 85 84 01 00 + 003a1 c7 85 84 01 00 00 00 00 00 00 mov DWORD PTR i$11[rbp], 0 - 003a9 eb 0e jmp SHORT $LN10@stbi__crea + 003ab eb 0e jmp SHORT $LN10@stbi__crea $LN8@stbi__crea: - 003ab 8b 85 84 01 00 + 003ad 8b 85 84 01 00 00 mov eax, DWORD PTR i$11[rbp] - 003b1 ff c0 inc eax - 003b3 89 85 84 01 00 + 003b3 ff c0 inc eax + 003b5 89 85 84 01 00 00 mov DWORD PTR i$11[rbp], eax $LN10@stbi__crea: - 003b9 8b 85 c4 01 00 + 003bb 8b 85 c4 01 00 00 mov eax, DWORD PTR x$13[rbp] - 003bf 39 85 84 01 00 + 003c1 39 85 84 01 00 00 cmp DWORD PTR i$11[rbp], eax - 003c5 0f 8d ce 00 00 + 003c7 0f 8d cf 00 00 00 jge $LN9@stbi__crea ; 4401 : int out_y = j * yspc[p] + yorig[p]; - 003cb 48 63 45 64 movsxd rax, DWORD PTR p$[rbp] - 003cf 8b 8d a4 01 00 + 003cd 48 63 45 64 movsxd rax, DWORD PTR p$[rbp] + 003d1 8b 8d a4 01 00 00 mov ecx, DWORD PTR j$12[rbp] - 003d5 0f af 8c 85 48 + 003d7 0f af 8c 85 48 01 00 00 imul ecx, DWORD PTR yspc$10[rbp+rax*4] - 003dd 8b c1 mov eax, ecx - 003df 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] - 003e3 03 84 8d c8 00 + 003df 8b c1 mov eax, ecx + 003e1 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] + 003e5 03 84 8d c8 00 00 00 add eax, DWORD PTR yorig$8[rbp+rcx*4] - 003ea 89 85 24 02 00 + 003ec 89 85 24 02 00 00 mov DWORD PTR out_y$16[rbp], eax ; 4402 : int out_x = i * xspc[p] + xorig[p]; - 003f0 48 63 45 64 movsxd rax, DWORD PTR p$[rbp] - 003f4 8b 8d 84 01 00 + 003f2 48 63 45 64 movsxd rax, DWORD PTR p$[rbp] + 003f6 8b 8d 84 01 00 00 mov ecx, DWORD PTR i$11[rbp] - 003fa 0f af 8c 85 08 + 003fc 0f af 8c 85 08 01 00 00 imul ecx, DWORD PTR xspc$9[rbp+rax*4] - 00402 8b c1 mov eax, ecx - 00404 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] - 00408 03 84 8d 88 00 + 00404 8b c1 mov eax, ecx + 00406 48 63 4d 64 movsxd rcx, DWORD PTR p$[rbp] + 0040a 03 84 8d 88 00 00 00 add eax, DWORD PTR xorig$7[rbp+rcx*4] - 0040f 89 85 44 02 00 + 00411 89 85 44 02 00 00 mov DWORD PTR out_x$17[rbp], eax ; 4403 : memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, - 00415 48 63 45 24 movsxd rax, DWORD PTR out_bytes$[rbp] - 00419 8b 8d a4 01 00 + 00417 48 63 45 24 movsxd rax, DWORD PTR out_bytes$[rbp] + 0041b 8b 8d a4 01 00 00 mov ecx, DWORD PTR j$12[rbp] - 0041f 0f af 8d c4 01 + 00421 0f af 8d c4 01 00 00 imul ecx, DWORD PTR x$13[rbp] - 00426 03 8d 84 01 00 + 00428 03 8d 84 01 00 00 add ecx, DWORD PTR i$11[rbp] - 0042c 0f af 4d 24 imul ecx, DWORD PTR out_bytes$[rbp] - 00430 48 63 c9 movsxd rcx, ecx - 00433 48 8b 95 00 04 + 0042e 0f af 4d 24 imul ecx, DWORD PTR out_bytes$[rbp] + 00432 48 63 c9 movsxd rcx, ecx + 00435 48 8b 95 00 04 00 00 mov rdx, QWORD PTR a$[rbp] - 0043a 48 03 4a 18 add rcx, QWORD PTR [rdx+24] - 0043e 48 8b 95 00 04 + 0043c 48 03 4a 18 add rcx, QWORD PTR [rdx+24] + 00440 48 8b 95 00 04 00 00 mov rdx, QWORD PTR a$[rbp] - 00445 48 8b 12 mov rdx, QWORD PTR [rdx] - 00448 44 8b 85 24 02 + 00447 48 8b 12 mov rdx, QWORD PTR [rdx] + 0044a 44 8b 85 24 02 00 00 mov r8d, DWORD PTR out_y$16[rbp] - 0044f 44 0f af 02 imul r8d, DWORD PTR [rdx] - 00453 41 8b d0 mov edx, r8d - 00456 0f af 55 24 imul edx, DWORD PTR out_bytes$[rbp] - 0045a 8b d2 mov edx, edx - 0045c 4c 8b 45 48 mov r8, QWORD PTR final$[rbp] - 00460 4c 03 c2 add r8, rdx - 00463 49 8b d0 mov rdx, r8 - 00466 44 8b 85 44 02 + 00451 44 0f af 02 imul r8d, DWORD PTR [rdx] + 00455 41 8b d0 mov edx, r8d + 00458 0f af 55 24 imul edx, DWORD PTR out_bytes$[rbp] + 0045c 8b d2 mov edx, edx + 0045e 4c 8b 45 48 mov r8, QWORD PTR final$[rbp] + 00462 4c 03 c2 add r8, rdx + 00465 49 8b d0 mov rdx, r8 + 00468 44 8b 85 44 02 00 00 mov r8d, DWORD PTR out_x$17[rbp] - 0046d 44 0f af 45 24 imul r8d, DWORD PTR out_bytes$[rbp] - 00472 4d 63 c0 movsxd r8, r8d - 00475 49 03 d0 add rdx, r8 - 00478 48 89 95 d8 03 + 0046f 44 0f af 45 24 imul r8d, DWORD PTR out_bytes$[rbp] + 00474 4d 63 c0 movsxd r8, r8d + 00477 49 03 d0 add rdx, r8 + 0047a 48 89 95 d8 03 00 00 mov QWORD PTR tv280[rbp], rdx - 0047f 4c 8b c0 mov r8, rax - 00482 48 8b d1 mov rdx, rcx - 00485 48 8b 85 d8 03 + 00481 4c 8b c0 mov r8, rax + 00484 48 8b d1 mov rdx, rcx + 00487 48 8b 85 d8 03 00 00 mov rax, QWORD PTR tv280[rbp] - 0048c 48 8b c8 mov rcx, rax - 0048f e8 00 00 00 00 call memcpy + 0048e 48 8b c8 mov rcx, rax + 00491 e8 00 00 00 00 call memcpy + 00496 90 npad 1 ; 4404 : a->out + (j * x + i) * out_bytes, out_bytes); ; 4405 : } - 00494 e9 12 ff ff ff jmp $LN8@stbi__crea + 00497 e9 11 ff ff ff jmp $LN8@stbi__crea $LN9@stbi__crea: ; 4406 : } - 00499 e9 e1 fe ff ff jmp $LN5@stbi__crea + 0049c e9 e0 fe ff ff jmp $LN5@stbi__crea $LN6@stbi__crea: ; 4407 : STBI_FREE(a->out); - 0049e 48 8b 85 00 04 + 004a1 48 8b 85 00 04 00 00 mov rax, QWORD PTR a$[rbp] - 004a5 48 8b 48 18 mov rcx, QWORD PTR [rax+24] - 004a9 ff 15 00 00 00 + 004a8 48 8b 48 18 mov rcx, QWORD PTR [rax+24] + 004ac ff 15 00 00 00 00 call QWORD PTR __imp_free + 004b2 90 npad 1 ; 4408 : image_data += img_len; - 004af 8b 85 04 02 00 + 004b3 8b 85 04 02 00 00 mov eax, DWORD PTR img_len$15[rbp] - 004b5 48 8b 8d 08 04 + 004b9 48 8b 8d 08 04 00 00 mov rcx, QWORD PTR image_data$[rbp] - 004bc 48 03 c8 add rcx, rax - 004bf 48 8b c1 mov rax, rcx - 004c2 48 89 85 08 04 + 004c0 48 03 c8 add rcx, rax + 004c3 48 8b c1 mov rax, rcx + 004c6 48 89 85 08 04 00 00 mov QWORD PTR image_data$[rbp], rax ; 4409 : image_data_len -= img_len; - 004c9 8b 85 04 02 00 + 004cd 8b 85 04 02 00 00 mov eax, DWORD PTR img_len$15[rbp] - 004cf 8b 8d 10 04 00 + 004d3 8b 8d 10 04 00 00 mov ecx, DWORD PTR image_data_len$[rbp] - 004d5 2b c8 sub ecx, eax - 004d7 8b c1 mov eax, ecx - 004d9 89 85 10 04 00 + 004d9 2b c8 sub ecx, eax + 004db 8b c1 mov eax, ecx + 004dd 89 85 10 04 00 00 mov DWORD PTR image_data_len$[rbp], eax $LN13@stbi__crea: ; 4410 : } ; 4411 : } - 004df e9 46 fc ff ff jmp $LN2@stbi__crea + 004e3 e9 43 fc ff ff jmp $LN2@stbi__crea $LN3@stbi__crea: ; 4412 : a->out = final; - 004e4 48 8b 85 00 04 + 004e8 48 8b 85 00 04 00 00 mov rax, QWORD PTR a$[rbp] - 004eb 48 8b 4d 48 mov rcx, QWORD PTR final$[rbp] - 004ef 48 89 48 18 mov QWORD PTR [rax+24], rcx + 004ef 48 8b 4d 48 mov rcx, QWORD PTR final$[rbp] + 004f3 48 89 48 18 mov QWORD PTR [rax+24], rcx ; 4413 : ; 4414 : return 1; - 004f3 b8 01 00 00 00 mov eax, 1 + 004f7 b8 01 00 00 00 mov eax, 1 $LN1@stbi__crea: ; 4415 : } - 004f8 48 8b f8 mov rdi, rax - 004fb 48 8d 4d c0 lea rcx, QWORD PTR [rbp-64] - 004ff 48 8d 15 00 00 + 004fc 48 8b f8 mov rdi, rax + 004ff 48 8d 4d c0 lea rcx, QWORD PTR [rbp-64] + 00503 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__create_png_image$rtcFrameData - 00506 e8 00 00 00 00 call _RTC_CheckStackVars - 0050b 48 8b c7 mov rax, rdi - 0050e 48 8d a5 e8 03 + 0050a e8 00 00 00 00 call _RTC_CheckStackVars + 0050f 48 8b c7 mov rax, rdi + 00512 48 8d a5 e8 03 00 00 lea rsp, QWORD PTR [rbp+1000] - 00515 5f pop rdi - 00516 5d pop rbp - 00517 c3 ret 0 + 00519 5f pop rdi + 0051a 5d pop rbp + 0051b c3 ret 0 stbi__create_png_image ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -16800,18 +16908,18 @@ scale$7 = 580 q$8 = 612 cur$9 = 648 cur16$10 = 680 -tv666 = 1076 -tv618 = 1076 -tv546 = 1076 -tv413 = 1076 tv391 = 1076 -tv343 = 1076 -tv274 = 1076 -tv216 = 1076 -tv168 = 1076 tv65 = 1076 -tv563 = 1080 +tv168 = 1076 +tv216 = 1076 +tv274 = 1076 +tv343 = 1076 +tv413 = 1076 +tv546 = 1076 +tv618 = 1076 +tv666 = 1076 tv360 = 1080 +tv563 = 1080 a$ = 1120 raw$ = 1128 raw_len$ = 1136 @@ -16836,165 +16944,166 @@ stbi__create_png_image_raw PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 4155 : int bytes = (depth == 16 ? 2 : 1); - 0002e 83 bd 90 04 00 + 0002f 83 bd 90 04 00 00 10 cmp DWORD PTR depth$[rbp], 16 - 00035 75 0c jne SHORT $LN159@stbi__crea - 00037 c7 85 34 04 00 + 00036 75 0c jne SHORT $LN159@stbi__crea + 00038 c7 85 34 04 00 00 02 00 00 00 mov DWORD PTR tv65[rbp], 2 - 00041 eb 0a jmp SHORT $LN160@stbi__crea + 00042 eb 0a jmp SHORT $LN160@stbi__crea $LN159@stbi__crea: - 00043 c7 85 34 04 00 + 00044 c7 85 34 04 00 00 01 00 00 00 mov DWORD PTR tv65[rbp], 1 $LN160@stbi__crea: - 0004d 8b 85 34 04 00 + 0004e 8b 85 34 04 00 00 mov eax, DWORD PTR tv65[rbp] - 00053 89 45 04 mov DWORD PTR bytes$[rbp], eax + 00054 89 45 04 mov DWORD PTR bytes$[rbp], eax ; 4156 : stbi__context* s = a->s; - 00056 48 8b 85 60 04 + 00057 48 8b 85 60 04 00 00 mov rax, QWORD PTR a$[rbp] - 0005d 48 8b 00 mov rax, QWORD PTR [rax] - 00060 48 89 45 28 mov QWORD PTR s$[rbp], rax + 0005e 48 8b 00 mov rax, QWORD PTR [rax] + 00061 48 89 45 28 mov QWORD PTR s$[rbp], rax ; 4157 : stbi__uint32 i, j, stride = x * out_n * bytes; - 00064 8b 85 80 04 00 + 00065 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 0006a 0f af 85 78 04 + 0006b 0f af 85 78 04 00 00 imul eax, DWORD PTR out_n$[rbp] - 00071 0f af 45 04 imul eax, DWORD PTR bytes$[rbp] - 00075 89 85 84 00 00 + 00072 0f af 45 04 imul eax, DWORD PTR bytes$[rbp] + 00076 89 85 84 00 00 00 mov DWORD PTR stride$[rbp], eax ; 4158 : stbi__uint32 img_len, img_width_bytes; ; 4159 : int k; ; 4160 : int img_n = s->img_n; // copy it into a local for later - 0007b 48 8b 45 28 mov rax, QWORD PTR s$[rbp] - 0007f 8b 40 08 mov eax, DWORD PTR [rax+8] - 00082 89 85 04 01 00 + 0007c 48 8b 45 28 mov rax, QWORD PTR s$[rbp] + 00080 8b 40 08 mov eax, DWORD PTR [rax+8] + 00083 89 85 04 01 00 00 mov DWORD PTR img_n$[rbp], eax ; 4161 : ; 4162 : int output_bytes = out_n * bytes; - 00088 8b 85 78 04 00 + 00089 8b 85 78 04 00 00 mov eax, DWORD PTR out_n$[rbp] - 0008e 0f af 45 04 imul eax, DWORD PTR bytes$[rbp] - 00092 89 85 24 01 00 + 0008f 0f af 45 04 imul eax, DWORD PTR bytes$[rbp] + 00093 89 85 24 01 00 00 mov DWORD PTR output_bytes$[rbp], eax ; 4163 : int filter_bytes = img_n * bytes; - 00098 8b 85 04 01 00 + 00099 8b 85 04 01 00 00 mov eax, DWORD PTR img_n$[rbp] - 0009e 0f af 45 04 imul eax, DWORD PTR bytes$[rbp] - 000a2 89 85 44 01 00 + 0009f 0f af 45 04 imul eax, DWORD PTR bytes$[rbp] + 000a3 89 85 44 01 00 00 mov DWORD PTR filter_bytes$[rbp], eax ; 4164 : int width = x; - 000a8 8b 85 80 04 00 + 000a9 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 000ae 89 85 64 01 00 + 000af 89 85 64 01 00 00 mov DWORD PTR width$[rbp], eax ; 4165 : ; 4166 : STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1); - 000b4 48 8b 45 28 mov rax, QWORD PTR s$[rbp] - 000b8 8b 40 08 mov eax, DWORD PTR [rax+8] - 000bb 39 85 78 04 00 + 000b5 48 8b 45 28 mov rax, QWORD PTR s$[rbp] + 000b9 8b 40 08 mov eax, DWORD PTR [rax+8] + 000bc 39 85 78 04 00 00 cmp DWORD PTR out_n$[rbp], eax - 000c1 74 2d je SHORT $LN161@stbi__crea - 000c3 48 8b 45 28 mov rax, QWORD PTR s$[rbp] - 000c7 8b 40 08 mov eax, DWORD PTR [rax+8] - 000ca ff c0 inc eax - 000cc 39 85 78 04 00 + 000c2 74 2d je SHORT $LN161@stbi__crea + 000c4 48 8b 45 28 mov rax, QWORD PTR s$[rbp] + 000c8 8b 40 08 mov eax, DWORD PTR [rax+8] + 000cb ff c0 inc eax + 000cd 39 85 78 04 00 00 cmp DWORD PTR out_n$[rbp], eax - 000d2 74 1c je SHORT $LN161@stbi__crea - 000d4 41 b8 46 10 00 + 000d3 74 1c je SHORT $LN161@stbi__crea + 000d5 41 b8 46 10 00 00 mov r8d, 4166 ; 00001046H - 000da 48 8d 15 00 00 + 000db 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 000e1 48 8d 0d 00 00 + 000e2 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1FG@LGPEHEPM@?$AAo?$AAu?$AAt?$AA_?$AAn?$AA?5?$AA?$DN?$AA?$DN?$AA?5?$AAs?$AA?9?$AA?$DO?$AAi?$AAm?$AAg@ - 000e8 ff 15 00 00 00 + 000e9 ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 000ee 33 c0 xor eax, eax + 000ef 33 c0 xor eax, eax $LN161@stbi__crea: ; 4167 : a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into - 000f0 45 33 c9 xor r9d, r9d - 000f3 44 8b 85 24 01 + 000f1 45 33 c9 xor r9d, r9d + 000f4 44 8b 85 24 01 00 00 mov r8d, DWORD PTR output_bytes$[rbp] - 000fa 8b 95 88 04 00 + 000fb 8b 95 88 04 00 00 mov edx, DWORD PTR y$[rbp] - 00100 8b 8d 80 04 00 + 00101 8b 8d 80 04 00 00 mov ecx, DWORD PTR x$[rbp] - 00106 e8 00 00 00 00 call stbi__malloc_mad3 - 0010b 48 8b 8d 60 04 + 00107 e8 00 00 00 00 call stbi__malloc_mad3 + 0010c 48 8b 8d 60 04 00 00 mov rcx, QWORD PTR a$[rbp] - 00112 48 89 41 18 mov QWORD PTR [rcx+24], rax + 00113 48 89 41 18 mov QWORD PTR [rcx+24], rax ; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); - 00116 48 8b 85 60 04 + 00117 48 8b 85 60 04 00 00 mov rax, QWORD PTR a$[rbp] - 0011d 48 83 78 18 00 cmp QWORD PTR [rax+24], 0 - 00122 75 11 jne SHORT $LN98@stbi__crea - 00124 48 8d 0d 00 00 + 0011e 48 83 78 18 00 cmp QWORD PTR [rax+24], 0 + 00123 75 11 jne SHORT $LN98@stbi__crea + 00125 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 0012b e8 00 00 00 00 call stbi__err - 00130 e9 54 1a 00 00 jmp $LN1@stbi__crea + 0012c e8 00 00 00 00 call stbi__err + 00131 e9 55 1a 00 00 jmp $LN1@stbi__crea $LN98@stbi__crea: ; 4169 : ; 4170 : if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); - 00135 41 b9 07 00 00 + 00136 41 b9 07 00 00 00 mov r9d, 7 - 0013b 44 8b 85 90 04 + 0013c 44 8b 85 90 04 00 00 mov r8d, DWORD PTR depth$[rbp] - 00142 8b 95 80 04 00 + 00143 8b 95 80 04 00 00 mov edx, DWORD PTR x$[rbp] - 00148 8b 8d 04 01 00 + 00149 8b 8d 04 01 00 00 mov ecx, DWORD PTR img_n$[rbp] - 0014e e8 00 00 00 00 call stbi__mad3sizes_valid - 00153 85 c0 test eax, eax - 00155 75 11 jne SHORT $LN99@stbi__crea - 00157 48 8d 0d 00 00 + 0014f e8 00 00 00 00 call stbi__mad3sizes_valid + 00154 85 c0 test eax, eax + 00156 75 11 jne SHORT $LN99@stbi__crea + 00158 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 0015e e8 00 00 00 00 call stbi__err - 00163 e9 21 1a 00 00 jmp $LN1@stbi__crea + 0015f e8 00 00 00 00 call stbi__err + 00164 e9 22 1a 00 00 jmp $LN1@stbi__crea $LN99@stbi__crea: ; 4171 : img_width_bytes = (((img_n * x * depth) + 7) >> 3); - 00168 8b 85 04 01 00 + 00169 8b 85 04 01 00 00 mov eax, DWORD PTR img_n$[rbp] - 0016e 0f af 85 80 04 + 0016f 0f af 85 80 04 00 00 imul eax, DWORD PTR x$[rbp] - 00175 0f af 85 90 04 + 00176 0f af 85 90 04 00 00 imul eax, DWORD PTR depth$[rbp] - 0017c 83 c0 07 add eax, 7 - 0017f c1 e8 03 shr eax, 3 - 00182 89 85 c4 00 00 + 0017d 83 c0 07 add eax, 7 + 00180 c1 e8 03 shr eax, 3 + 00183 89 85 c4 00 00 00 mov DWORD PTR img_width_bytes$[rbp], eax ; 4172 : img_len = (img_width_bytes + 1) * y; - 00188 8b 85 c4 00 00 + 00189 8b 85 c4 00 00 00 mov eax, DWORD PTR img_width_bytes$[rbp] - 0018e ff c0 inc eax - 00190 0f af 85 88 04 + 0018f ff c0 inc eax + 00191 0f af 85 88 04 00 00 imul eax, DWORD PTR y$[rbp] - 00197 89 85 a4 00 00 + 00198 89 85 a4 00 00 00 mov DWORD PTR img_len$[rbp], eax ; 4173 : @@ -17003,148 +17112,148 @@ $LN99@stbi__crea: ; 4176 : // so just check for raw_len < img_len always. ; 4177 : if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG"); - 0019d 8b 85 a4 00 00 + 0019e 8b 85 a4 00 00 00 mov eax, DWORD PTR img_len$[rbp] - 001a3 39 85 70 04 00 + 001a4 39 85 70 04 00 00 cmp DWORD PTR raw_len$[rbp], eax - 001a9 73 11 jae SHORT $LN100@stbi__crea - 001ab 48 8d 0d 00 00 + 001aa 73 11 jae SHORT $LN100@stbi__crea + 001ac 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BC@BHMPBBMG@not?5enough?5pixels@ - 001b2 e8 00 00 00 00 call stbi__err - 001b7 e9 cd 19 00 00 jmp $LN1@stbi__crea + 001b3 e8 00 00 00 00 call stbi__err + 001b8 e9 ce 19 00 00 jmp $LN1@stbi__crea $LN100@stbi__crea: ; 4178 : ; 4179 : for (j = 0; j < y; ++j) { - 001bc c7 45 64 00 00 + 001bd c7 45 64 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 001c3 eb 08 jmp SHORT $LN4@stbi__crea + 001c4 eb 08 jmp SHORT $LN4@stbi__crea $LN2@stbi__crea: - 001c5 8b 45 64 mov eax, DWORD PTR j$[rbp] - 001c8 ff c0 inc eax - 001ca 89 45 64 mov DWORD PTR j$[rbp], eax + 001c6 8b 45 64 mov eax, DWORD PTR j$[rbp] + 001c9 ff c0 inc eax + 001cb 89 45 64 mov DWORD PTR j$[rbp], eax $LN4@stbi__crea: - 001cd 8b 85 88 04 00 + 001ce 8b 85 88 04 00 00 mov eax, DWORD PTR y$[rbp] - 001d3 39 45 64 cmp DWORD PTR j$[rbp], eax - 001d6 0f 83 27 10 00 + 001d4 39 45 64 cmp DWORD PTR j$[rbp], eax + 001d7 0f 83 28 10 00 00 jae $LN3@stbi__crea ; 4180 : stbi_uc* cur = a->out + stride * j; - 001dc 8b 85 84 00 00 + 001dd 8b 85 84 00 00 00 mov eax, DWORD PTR stride$[rbp] - 001e2 0f af 45 64 imul eax, DWORD PTR j$[rbp] - 001e6 8b c0 mov eax, eax - 001e8 48 8b 8d 60 04 + 001e3 0f af 45 64 imul eax, DWORD PTR j$[rbp] + 001e7 8b c0 mov eax, eax + 001e9 48 8b 8d 60 04 00 00 mov rcx, QWORD PTR a$[rbp] - 001ef 48 03 41 18 add rax, QWORD PTR [rcx+24] - 001f3 48 89 85 88 01 + 001f0 48 03 41 18 add rax, QWORD PTR [rcx+24] + 001f4 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax ; 4181 : stbi_uc* prior; ; 4182 : int filter = *raw++; - 001fa 48 8b 85 68 04 + 001fb 48 8b 85 68 04 00 00 mov rax, QWORD PTR raw$[rbp] - 00201 0f b6 00 movzx eax, BYTE PTR [rax] - 00204 89 85 c4 01 00 + 00202 0f b6 00 movzx eax, BYTE PTR [rax] + 00205 89 85 c4 01 00 00 mov DWORD PTR filter$3[rbp], eax - 0020a 48 8b 85 68 04 + 0020b 48 8b 85 68 04 00 00 mov rax, QWORD PTR raw$[rbp] - 00211 48 ff c0 inc rax - 00214 48 89 85 68 04 + 00212 48 ff c0 inc rax + 00215 48 89 85 68 04 00 00 mov QWORD PTR raw$[rbp], rax ; 4183 : ; 4184 : if (filter > 4) - 0021b 83 bd c4 01 00 + 0021c 83 bd c4 01 00 00 04 cmp DWORD PTR filter$3[rbp], 4 - 00222 7e 11 jle SHORT $LN101@stbi__crea + 00223 7e 11 jle SHORT $LN101@stbi__crea ; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); - 00224 48 8d 0d 00 00 + 00225 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0P@FBBCPGMN@invalid?5filter@ - 0022b e8 00 00 00 00 call stbi__err - 00230 e9 54 19 00 00 jmp $LN1@stbi__crea + 0022c e8 00 00 00 00 call stbi__err + 00231 e9 55 19 00 00 jmp $LN1@stbi__crea $LN101@stbi__crea: ; 4186 : ; 4187 : if (depth < 8) { - 00235 83 bd 90 04 00 + 00236 83 bd 90 04 00 00 08 cmp DWORD PTR depth$[rbp], 8 - 0023c 7d 5e jge SHORT $LN102@stbi__crea + 0023d 7d 5e jge SHORT $LN102@stbi__crea ; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); - 0023e 8b 85 80 04 00 + 0023f 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 00244 39 85 c4 00 00 + 00245 39 85 c4 00 00 00 cmp DWORD PTR img_width_bytes$[rbp], eax - 0024a 76 11 jbe SHORT $LN103@stbi__crea - 0024c 48 8d 0d 00 00 + 0024b 76 11 jbe SHORT $LN103@stbi__crea + 0024d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0O@MKGNGALN@invalid?5width@ - 00253 e8 00 00 00 00 call stbi__err - 00258 e9 2c 19 00 00 jmp $LN1@stbi__crea + 00254 e8 00 00 00 00 call stbi__err + 00259 e9 2d 19 00 00 jmp $LN1@stbi__crea $LN103@stbi__crea: ; 4189 : cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place - 0025d 8b 85 80 04 00 + 0025e 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 00263 0f af 85 78 04 + 00264 0f af 85 78 04 00 00 imul eax, DWORD PTR out_n$[rbp] - 0026a 2b 85 c4 00 00 + 0026b 2b 85 c4 00 00 00 sub eax, DWORD PTR img_width_bytes$[rbp] - 00270 8b c0 mov eax, eax - 00272 48 8b 8d 88 01 + 00271 8b c0 mov eax, eax + 00273 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00279 48 03 c8 add rcx, rax - 0027c 48 8b c1 mov rax, rcx - 0027f 48 89 85 88 01 + 0027a 48 03 c8 add rcx, rax + 0027d 48 8b c1 mov rax, rcx + 00280 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax ; 4190 : filter_bytes = 1; - 00286 c7 85 44 01 00 + 00287 c7 85 44 01 00 00 01 00 00 00 mov DWORD PTR filter_bytes$[rbp], 1 ; 4191 : width = img_width_bytes; - 00290 8b 85 c4 00 00 + 00291 8b 85 c4 00 00 00 mov eax, DWORD PTR img_width_bytes$[rbp] - 00296 89 85 64 01 00 + 00297 89 85 64 01 00 00 mov DWORD PTR width$[rbp], eax $LN102@stbi__crea: ; 4192 : } ; 4193 : prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above - 0029c 8b 85 84 00 00 + 0029d 8b 85 84 00 00 00 mov eax, DWORD PTR stride$[rbp] - 002a2 48 8b 8d 88 01 + 002a3 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 002a9 48 2b c8 sub rcx, rax - 002ac 48 8b c1 mov rax, rcx - 002af 48 89 85 a8 01 + 002aa 48 2b c8 sub rcx, rax + 002ad 48 8b c1 mov rax, rcx + 002b0 48 89 85 a8 01 00 00 mov QWORD PTR prior$2[rbp], rax ; 4194 : ; 4195 : // if first row, use special filter that doesn't sample previous row ; 4196 : if (j == 0) filter = first_row_filter[filter]; - 002b6 83 7d 64 00 cmp DWORD PTR j$[rbp], 0 - 002ba 75 18 jne SHORT $LN104@stbi__crea - 002bc 48 63 85 c4 01 + 002b7 83 7d 64 00 cmp DWORD PTR j$[rbp], 0 + 002bb 75 18 jne SHORT $LN104@stbi__crea + 002bd 48 63 85 c4 01 00 00 movsxd rax, DWORD PTR filter$3[rbp] - 002c3 48 8d 0d 00 00 + 002c4 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:first_row_filter - 002ca 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 002ce 89 85 c4 01 00 + 002cb 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 002cf 89 85 c4 01 00 00 mov DWORD PTR filter$3[rbp], eax $LN104@stbi__crea: @@ -17152,342 +17261,342 @@ $LN104@stbi__crea: ; 4198 : // handle first byte explicitly ; 4199 : for (k = 0; k < filter_bytes; ++k) { - 002d4 c7 85 e4 00 00 + 002d5 c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 002de eb 0e jmp SHORT $LN7@stbi__crea + 002df eb 0e jmp SHORT $LN7@stbi__crea $LN5@stbi__crea: - 002e0 8b 85 e4 00 00 + 002e1 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 002e6 ff c0 inc eax - 002e8 89 85 e4 00 00 + 002e7 ff c0 inc eax + 002e9 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN7@stbi__crea: - 002ee 8b 85 44 01 00 + 002ef 8b 85 44 01 00 00 mov eax, DWORD PTR filter_bytes$[rbp] - 002f4 39 85 e4 00 00 + 002f5 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 002fa 0f 8d b0 01 00 + 002fb 0f 8d b0 01 00 00 jge $LN6@stbi__crea ; 4200 : switch (filter) { - 00300 8b 85 c4 01 00 + 00301 8b 85 c4 01 00 00 mov eax, DWORD PTR filter$3[rbp] - 00306 89 85 34 04 00 + 00307 89 85 34 04 00 00 mov DWORD PTR tv168[rbp], eax - 0030c 83 bd 34 04 00 + 0030d 83 bd 34 04 00 00 06 cmp DWORD PTR tv168[rbp], 6 - 00313 0f 87 92 01 00 + 00314 0f 87 92 01 00 00 ja $LN8@stbi__crea - 00319 48 63 85 34 04 + 0031a 48 63 85 34 04 00 00 movsxd rax, DWORD PTR tv168[rbp] - 00320 48 8d 0d 00 00 + 00321 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__ImageBase - 00327 8b 84 81 00 00 + 00328 8b 84 81 00 00 00 00 mov eax, DWORD PTR $LN168@stbi__crea[rcx+rax*4] - 0032e 48 03 c1 add rax, rcx - 00331 ff e0 jmp rax + 0032f 48 03 c1 add rax, rcx + 00332 ff e0 jmp rax $LN105@stbi__crea: ; 4201 : case STBI__F_none: cur[k] = raw[k]; break; - 00333 48 63 85 e4 00 + 00334 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 0033a 48 63 8d e4 00 + 0033b 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 00341 48 8b 95 88 01 + 00342 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 00348 4c 8b 85 68 04 + 00349 4c 8b 85 68 04 00 00 mov r8, QWORD PTR raw$[rbp] - 0034f 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00354 88 04 0a mov BYTE PTR [rdx+rcx], al - 00357 e9 4f 01 00 00 jmp $LN8@stbi__crea + 00350 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00355 88 04 0a mov BYTE PTR [rdx+rcx], al + 00358 e9 4f 01 00 00 jmp $LN8@stbi__crea $LN106@stbi__crea: ; 4202 : case STBI__F_sub: cur[k] = raw[k]; break; - 0035c 48 63 85 e4 00 + 0035d 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 00363 48 63 8d e4 00 + 00364 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 0036a 48 8b 95 88 01 + 0036b 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 00371 4c 8b 85 68 04 + 00372 4c 8b 85 68 04 00 00 mov r8, QWORD PTR raw$[rbp] - 00378 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 0037d 88 04 0a mov BYTE PTR [rdx+rcx], al - 00380 e9 26 01 00 00 jmp $LN8@stbi__crea + 00379 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0037e 88 04 0a mov BYTE PTR [rdx+rcx], al + 00381 e9 26 01 00 00 jmp $LN8@stbi__crea $LN107@stbi__crea: ; 4203 : case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; - 00385 48 63 85 e4 00 + 00386 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 0038c 48 8b 8d 68 04 + 0038d 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00393 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00397 48 63 8d e4 00 + 00394 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00398 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 0039e 48 8b 95 a8 01 + 0039f 48 8b 95 a8 01 00 00 mov rdx, QWORD PTR prior$2[rbp] - 003a5 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 003a9 03 c1 add eax, ecx - 003ab 25 ff 00 00 00 and eax, 255 ; 000000ffH - 003b0 48 63 8d e4 00 + 003a6 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 003aa 03 c1 add eax, ecx + 003ac 25 ff 00 00 00 and eax, 255 ; 000000ffH + 003b1 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 003b7 48 8b 95 88 01 + 003b8 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 003be 88 04 0a mov BYTE PTR [rdx+rcx], al - 003c1 e9 e5 00 00 00 jmp $LN8@stbi__crea + 003bf 88 04 0a mov BYTE PTR [rdx+rcx], al + 003c2 e9 e5 00 00 00 jmp $LN8@stbi__crea $LN108@stbi__crea: ; 4204 : case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break; - 003c6 48 63 85 e4 00 + 003c7 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 003cd 48 8b 8d 68 04 + 003ce 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 003d4 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 003d8 48 63 8d e4 00 + 003d5 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 003d9 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 003df 48 8b 95 a8 01 + 003e0 48 8b 95 a8 01 00 00 mov rdx, QWORD PTR prior$2[rbp] - 003e6 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 003ea d1 f9 sar ecx, 1 - 003ec 03 c1 add eax, ecx - 003ee 25 ff 00 00 00 and eax, 255 ; 000000ffH - 003f3 48 63 8d e4 00 + 003e7 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 003eb d1 f9 sar ecx, 1 + 003ed 03 c1 add eax, ecx + 003ef 25 ff 00 00 00 and eax, 255 ; 000000ffH + 003f4 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 003fa 48 8b 95 88 01 + 003fb 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 00401 88 04 0a mov BYTE PTR [rdx+rcx], al - 00404 e9 a2 00 00 00 jmp $LN8@stbi__crea + 00402 88 04 0a mov BYTE PTR [rdx+rcx], al + 00405 e9 a2 00 00 00 jmp $LN8@stbi__crea $LN109@stbi__crea: ; 4205 : case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break; - 00409 48 63 85 e4 00 + 0040a 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 00410 48 8b 8d 68 04 + 00411 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00417 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0041b 89 85 34 04 00 + 00418 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0041c 89 85 34 04 00 00 mov DWORD PTR tv216[rbp], eax - 00421 48 63 8d e4 00 + 00422 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 00428 48 8b 95 a8 01 + 00429 48 8b 95 a8 01 00 00 mov rdx, QWORD PTR prior$2[rbp] - 0042f 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00433 45 33 c0 xor r8d, r8d - 00436 8b d1 mov edx, ecx - 00438 33 c9 xor ecx, ecx - 0043a e8 00 00 00 00 call stbi__paeth - 0043f 8b 8d 34 04 00 + 00430 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00434 45 33 c0 xor r8d, r8d + 00437 8b d1 mov edx, ecx + 00439 33 c9 xor ecx, ecx + 0043b e8 00 00 00 00 call stbi__paeth + 00440 8b 8d 34 04 00 00 mov ecx, DWORD PTR tv216[rbp] - 00445 03 c8 add ecx, eax - 00447 8b c1 mov eax, ecx - 00449 25 ff 00 00 00 and eax, 255 ; 000000ffH - 0044e 48 63 8d e4 00 + 00446 03 c8 add ecx, eax + 00448 8b c1 mov eax, ecx + 0044a 25 ff 00 00 00 and eax, 255 ; 000000ffH + 0044f 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 00455 48 8b 95 88 01 + 00456 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 0045c 88 04 0a mov BYTE PTR [rdx+rcx], al - 0045f eb 4a jmp SHORT $LN8@stbi__crea + 0045d 88 04 0a mov BYTE PTR [rdx+rcx], al + 00460 eb 4a jmp SHORT $LN8@stbi__crea $LN110@stbi__crea: ; 4206 : case STBI__F_avg_first: cur[k] = raw[k]; break; - 00461 48 63 85 e4 00 + 00462 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 00468 48 63 8d e4 00 + 00469 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 0046f 48 8b 95 88 01 + 00470 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 00476 4c 8b 85 68 04 + 00477 4c 8b 85 68 04 00 00 mov r8, QWORD PTR raw$[rbp] - 0047d 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00482 88 04 0a mov BYTE PTR [rdx+rcx], al - 00485 eb 24 jmp SHORT $LN8@stbi__crea + 0047e 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00483 88 04 0a mov BYTE PTR [rdx+rcx], al + 00486 eb 24 jmp SHORT $LN8@stbi__crea $LN111@stbi__crea: ; 4207 : case STBI__F_paeth_first: cur[k] = raw[k]; break; - 00487 48 63 85 e4 00 + 00488 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 0048e 48 63 8d e4 00 + 0048f 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 00495 48 8b 95 88 01 + 00496 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 0049c 4c 8b 85 68 04 + 0049d 4c 8b 85 68 04 00 00 mov r8, QWORD PTR raw$[rbp] - 004a3 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 004a8 88 04 0a mov BYTE PTR [rdx+rcx], al + 004a4 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 004a9 88 04 0a mov BYTE PTR [rdx+rcx], al $LN8@stbi__crea: ; 4208 : } ; 4209 : } - 004ab e9 30 fe ff ff jmp $LN5@stbi__crea + 004ac e9 30 fe ff ff jmp $LN5@stbi__crea $LN6@stbi__crea: ; 4210 : ; 4211 : if (depth == 8) { - 004b0 83 bd 90 04 00 + 004b1 83 bd 90 04 00 00 08 cmp DWORD PTR depth$[rbp], 8 - 004b7 75 76 jne SHORT $LN112@stbi__crea + 004b8 75 76 jne SHORT $LN112@stbi__crea ; 4212 : if (img_n != out_n) - 004b9 8b 85 78 04 00 + 004ba 8b 85 78 04 00 00 mov eax, DWORD PTR out_n$[rbp] - 004bf 39 85 04 01 00 + 004c0 39 85 04 01 00 00 cmp DWORD PTR img_n$[rbp], eax - 004c5 74 12 je SHORT $LN114@stbi__crea + 004c6 74 12 je SHORT $LN114@stbi__crea ; 4213 : cur[img_n] = 255; // first pixel - 004c7 48 63 85 04 01 + 004c8 48 63 85 04 01 00 00 movsxd rax, DWORD PTR img_n$[rbp] - 004ce 48 8b 8d 88 01 + 004cf 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 004d5 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 004d6 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH $LN114@stbi__crea: ; 4214 : raw += img_n; - 004d9 48 63 85 04 01 + 004da 48 63 85 04 01 00 00 movsxd rax, DWORD PTR img_n$[rbp] - 004e0 48 8b 8d 68 04 + 004e1 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 004e7 48 03 c8 add rcx, rax - 004ea 48 8b c1 mov rax, rcx - 004ed 48 89 85 68 04 + 004e8 48 03 c8 add rcx, rax + 004eb 48 8b c1 mov rax, rcx + 004ee 48 89 85 68 04 00 00 mov QWORD PTR raw$[rbp], rax ; 4215 : cur += out_n; - 004f4 48 63 85 78 04 + 004f5 48 63 85 78 04 00 00 movsxd rax, DWORD PTR out_n$[rbp] - 004fb 48 8b 8d 88 01 + 004fc 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00502 48 03 c8 add rcx, rax - 00505 48 8b c1 mov rax, rcx - 00508 48 89 85 88 01 + 00503 48 03 c8 add rcx, rax + 00506 48 8b c1 mov rax, rcx + 00509 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax ; 4216 : prior += out_n; - 0050f 48 63 85 78 04 + 00510 48 63 85 78 04 00 00 movsxd rax, DWORD PTR out_n$[rbp] - 00516 48 8b 8d a8 01 + 00517 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR prior$2[rbp] - 0051d 48 03 c8 add rcx, rax - 00520 48 8b c1 mov rax, rcx - 00523 48 89 85 a8 01 + 0051e 48 03 c8 add rcx, rax + 00521 48 8b c1 mov rax, rcx + 00524 48 89 85 a8 01 00 00 mov QWORD PTR prior$2[rbp], rax ; 4217 : } - 0052a e9 c8 00 00 00 jmp $LN113@stbi__crea + 0052b e9 c8 00 00 00 jmp $LN113@stbi__crea $LN112@stbi__crea: ; 4218 : else if (depth == 16) { - 0052f 83 bd 90 04 00 + 00530 83 bd 90 04 00 00 10 cmp DWORD PTR depth$[rbp], 16 - 00536 0f 85 88 00 00 + 00537 0f 85 88 00 00 00 jne $LN115@stbi__crea ; 4219 : if (img_n != out_n) { - 0053c 8b 85 78 04 00 + 0053d 8b 85 78 04 00 00 mov eax, DWORD PTR out_n$[rbp] - 00542 39 85 04 01 00 + 00543 39 85 04 01 00 00 cmp DWORD PTR img_n$[rbp], eax - 00548 74 27 je SHORT $LN117@stbi__crea + 00549 74 27 je SHORT $LN117@stbi__crea ; 4220 : cur[filter_bytes] = 255; // first pixel top byte - 0054a 48 63 85 44 01 + 0054b 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00551 48 8b 8d 88 01 + 00552 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00558 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00559 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH ; 4221 : cur[filter_bytes + 1] = 255; // first pixel bottom byte - 0055c 8b 85 44 01 00 + 0055d 8b 85 44 01 00 00 mov eax, DWORD PTR filter_bytes$[rbp] - 00562 ff c0 inc eax - 00564 48 98 cdqe - 00566 48 8b 8d 88 01 + 00563 ff c0 inc eax + 00565 48 98 cdqe + 00567 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 0056d c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 0056e c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH $LN117@stbi__crea: ; 4222 : } ; 4223 : raw += filter_bytes; - 00571 48 63 85 44 01 + 00572 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00578 48 8b 8d 68 04 + 00579 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 0057f 48 03 c8 add rcx, rax - 00582 48 8b c1 mov rax, rcx - 00585 48 89 85 68 04 + 00580 48 03 c8 add rcx, rax + 00583 48 8b c1 mov rax, rcx + 00586 48 89 85 68 04 00 00 mov QWORD PTR raw$[rbp], rax ; 4224 : cur += output_bytes; - 0058c 48 63 85 24 01 + 0058d 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 00593 48 8b 8d 88 01 + 00594 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 0059a 48 03 c8 add rcx, rax - 0059d 48 8b c1 mov rax, rcx - 005a0 48 89 85 88 01 + 0059b 48 03 c8 add rcx, rax + 0059e 48 8b c1 mov rax, rcx + 005a1 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax ; 4225 : prior += output_bytes; - 005a7 48 63 85 24 01 + 005a8 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 005ae 48 8b 8d a8 01 + 005af 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR prior$2[rbp] - 005b5 48 03 c8 add rcx, rax - 005b8 48 8b c1 mov rax, rcx - 005bb 48 89 85 a8 01 + 005b6 48 03 c8 add rcx, rax + 005b9 48 8b c1 mov rax, rcx + 005bc 48 89 85 a8 01 00 00 mov QWORD PTR prior$2[rbp], rax ; 4226 : } - 005c2 eb 33 jmp SHORT $LN116@stbi__crea + 005c3 eb 33 jmp SHORT $LN116@stbi__crea $LN115@stbi__crea: ; 4227 : else { ; 4228 : raw += 1; - 005c4 48 8b 85 68 04 + 005c5 48 8b 85 68 04 00 00 mov rax, QWORD PTR raw$[rbp] - 005cb 48 ff c0 inc rax - 005ce 48 89 85 68 04 + 005cc 48 ff c0 inc rax + 005cf 48 89 85 68 04 00 00 mov QWORD PTR raw$[rbp], rax ; 4229 : cur += 1; - 005d5 48 8b 85 88 01 + 005d6 48 8b 85 88 01 00 00 mov rax, QWORD PTR cur$1[rbp] - 005dc 48 ff c0 inc rax - 005df 48 89 85 88 01 + 005dd 48 ff c0 inc rax + 005e0 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax ; 4230 : prior += 1; - 005e6 48 8b 85 a8 01 + 005e7 48 8b 85 a8 01 00 00 mov rax, QWORD PTR prior$2[rbp] - 005ed 48 ff c0 inc rax - 005f0 48 89 85 a8 01 + 005ee 48 ff c0 inc rax + 005f1 48 89 85 a8 01 00 00 mov QWORD PTR prior$2[rbp], rax $LN116@stbi__crea: $LN113@stbi__crea: @@ -17497,25 +17606,25 @@ $LN113@stbi__crea: ; 4233 : // this is a little gross, so that we don't switch per-pixel or per-component ; 4234 : if (depth < 8 || img_n == out_n) { - 005f7 83 bd 90 04 00 + 005f8 83 bd 90 04 00 00 08 cmp DWORD PTR depth$[rbp], 8 - 005fe 7c 12 jl SHORT $LN120@stbi__crea - 00600 8b 85 78 04 00 + 005ff 7c 12 jl SHORT $LN120@stbi__crea + 00601 8b 85 78 04 00 00 mov eax, DWORD PTR out_n$[rbp] - 00606 39 85 04 01 00 + 00607 39 85 04 01 00 00 cmp DWORD PTR img_n$[rbp], eax - 0060c 0f 85 d7 03 00 + 0060d 0f 85 d8 03 00 00 jne $LN118@stbi__crea $LN120@stbi__crea: ; 4235 : int nk = (width - 1) * filter_bytes; - 00612 8b 85 64 01 00 + 00613 8b 85 64 01 00 00 mov eax, DWORD PTR width$[rbp] - 00618 ff c8 dec eax - 0061a 0f af 85 44 01 + 00619 ff c8 dec eax + 0061b 0f af 85 44 01 00 00 imul eax, DWORD PTR filter_bytes$[rbp] - 00621 89 85 e4 01 00 + 00622 89 85 e4 01 00 00 mov DWORD PTR nk$4[rbp], eax ; 4236 : #define STBI__CASE(f) \ @@ -17523,336 +17632,337 @@ $LN120@stbi__crea: ; 4238 : for (k=0; k < nk; ++k) ; 4239 : switch (filter) { - 00627 8b 85 c4 01 00 + 00628 8b 85 c4 01 00 00 mov eax, DWORD PTR filter$3[rbp] - 0062d 89 85 34 04 00 + 0062e 89 85 34 04 00 00 mov DWORD PTR tv274[rbp], eax - 00633 83 bd 34 04 00 + 00634 83 bd 34 04 00 00 06 cmp DWORD PTR tv274[rbp], 6 - 0063a 0f 87 89 03 00 + 0063b 0f 87 8a 03 00 00 ja $LN10@stbi__crea - 00640 48 63 85 34 04 + 00641 48 63 85 34 04 00 00 movsxd rax, DWORD PTR tv274[rbp] - 00647 48 8d 0d 00 00 + 00648 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__ImageBase - 0064e 8b 84 81 00 00 + 0064f 8b 84 81 00 00 00 00 mov eax, DWORD PTR $LN167@stbi__crea[rcx+rax*4] - 00655 48 03 c1 add rax, rcx - 00658 ff e0 jmp rax + 00656 48 03 c1 add rax, rcx + 00659 ff e0 jmp rax $LN121@stbi__crea: ; 4240 : // "none" filter turns into a memcpy here; make that explicit. ; 4241 : case STBI__F_none: memcpy(cur, raw, nk); break; - 0065a 48 63 85 e4 01 + 0065b 48 63 85 e4 01 00 00 movsxd rax, DWORD PTR nk$4[rbp] - 00661 4c 8b c0 mov r8, rax - 00664 48 8b 95 68 04 + 00662 4c 8b c0 mov r8, rax + 00665 48 8b 95 68 04 00 00 mov rdx, QWORD PTR raw$[rbp] - 0066b 48 8b 8d 88 01 + 0066c 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00672 e8 00 00 00 00 call memcpy - 00677 e9 4d 03 00 00 jmp $LN10@stbi__crea + 00673 e8 00 00 00 00 call memcpy + 00678 90 npad 1 + 00679 e9 4d 03 00 00 jmp $LN10@stbi__crea $LN122@stbi__crea: ; 4242 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break; - 0067c c7 85 e4 00 00 + 0067e c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 00686 eb 0e jmp SHORT $LN14@stbi__crea + 00688 eb 0e jmp SHORT $LN14@stbi__crea $LN12@stbi__crea: - 00688 8b 85 e4 00 00 + 0068a 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 0068e ff c0 inc eax - 00690 89 85 e4 00 00 + 00690 ff c0 inc eax + 00692 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN14@stbi__crea: - 00696 8b 85 e4 01 00 + 00698 8b 85 e4 01 00 00 mov eax, DWORD PTR nk$4[rbp] - 0069c 39 85 e4 00 00 + 0069e 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 006a2 7d 4a jge SHORT $LN13@stbi__crea - 006a4 48 63 85 e4 00 + 006a4 7d 4a jge SHORT $LN13@stbi__crea + 006a6 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 006ab 48 8b 8d 68 04 + 006ad 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 006b2 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 006b6 8b 8d 44 01 00 + 006b4 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 006b8 8b 8d 44 01 00 00 mov ecx, DWORD PTR filter_bytes$[rbp] - 006bc 8b 95 e4 00 00 + 006be 8b 95 e4 00 00 00 mov edx, DWORD PTR k$[rbp] - 006c2 2b d1 sub edx, ecx - 006c4 8b ca mov ecx, edx - 006c6 48 63 c9 movsxd rcx, ecx - 006c9 48 8b 95 88 01 + 006c4 2b d1 sub edx, ecx + 006c6 8b ca mov ecx, edx + 006c8 48 63 c9 movsxd rcx, ecx + 006cb 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 006d0 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 006d4 03 c1 add eax, ecx - 006d6 25 ff 00 00 00 and eax, 255 ; 000000ffH - 006db 48 63 8d e4 00 + 006d2 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 006d6 03 c1 add eax, ecx + 006d8 25 ff 00 00 00 and eax, 255 ; 000000ffH + 006dd 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 006e2 48 8b 95 88 01 + 006e4 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 006e9 88 04 0a mov BYTE PTR [rdx+rcx], al - 006ec eb 9a jmp SHORT $LN12@stbi__crea + 006eb 88 04 0a mov BYTE PTR [rdx+rcx], al + 006ee eb 9a jmp SHORT $LN12@stbi__crea $LN13@stbi__crea: - 006ee e9 d6 02 00 00 jmp $LN10@stbi__crea + 006f0 e9 d6 02 00 00 jmp $LN10@stbi__crea $LN123@stbi__crea: ; 4243 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; - 006f3 c7 85 e4 00 00 + 006f5 c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 006fd eb 0e jmp SHORT $LN17@stbi__crea + 006ff eb 0e jmp SHORT $LN17@stbi__crea $LN15@stbi__crea: - 006ff 8b 85 e4 00 00 + 00701 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 00705 ff c0 inc eax - 00707 89 85 e4 00 00 + 00707 ff c0 inc eax + 00709 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN17@stbi__crea: - 0070d 8b 85 e4 01 00 + 0070f 8b 85 e4 01 00 00 mov eax, DWORD PTR nk$4[rbp] - 00713 39 85 e4 00 00 + 00715 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 00719 7d 3e jge SHORT $LN16@stbi__crea - 0071b 48 63 85 e4 00 + 0071b 7d 3e jge SHORT $LN16@stbi__crea + 0071d 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 00722 48 8b 8d 68 04 + 00724 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00729 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0072d 48 63 8d e4 00 + 0072b 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0072f 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 00734 48 8b 95 a8 01 + 00736 48 8b 95 a8 01 00 00 mov rdx, QWORD PTR prior$2[rbp] - 0073b 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 0073f 03 c1 add eax, ecx - 00741 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00746 48 63 8d e4 00 + 0073d 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00741 03 c1 add eax, ecx + 00743 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00748 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 0074d 48 8b 95 88 01 + 0074f 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 00754 88 04 0a mov BYTE PTR [rdx+rcx], al - 00757 eb a6 jmp SHORT $LN15@stbi__crea + 00756 88 04 0a mov BYTE PTR [rdx+rcx], al + 00759 eb a6 jmp SHORT $LN15@stbi__crea $LN16@stbi__crea: - 00759 e9 6b 02 00 00 jmp $LN10@stbi__crea + 0075b e9 6b 02 00 00 jmp $LN10@stbi__crea $LN124@stbi__crea: ; 4244 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break; - 0075e c7 85 e4 00 00 + 00760 c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 00768 eb 0e jmp SHORT $LN20@stbi__crea + 0076a eb 0e jmp SHORT $LN20@stbi__crea $LN18@stbi__crea: - 0076a 8b 85 e4 00 00 + 0076c 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 00770 ff c0 inc eax - 00772 89 85 e4 00 00 + 00772 ff c0 inc eax + 00774 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN20@stbi__crea: - 00778 8b 85 e4 01 00 + 0077a 8b 85 e4 01 00 00 mov eax, DWORD PTR nk$4[rbp] - 0077e 39 85 e4 00 00 + 00780 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 00784 7d 64 jge SHORT $LN19@stbi__crea - 00786 48 63 85 e4 00 + 00786 7d 64 jge SHORT $LN19@stbi__crea + 00788 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 0078d 48 8b 8d 68 04 + 0078f 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00794 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00798 48 63 8d e4 00 + 00796 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0079a 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 0079f 48 8b 95 a8 01 + 007a1 48 8b 95 a8 01 00 00 mov rdx, QWORD PTR prior$2[rbp] - 007a6 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 007aa 8b 95 44 01 00 + 007a8 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 007ac 8b 95 44 01 00 00 mov edx, DWORD PTR filter_bytes$[rbp] - 007b0 44 8b 85 e4 00 + 007b2 44 8b 85 e4 00 00 00 mov r8d, DWORD PTR k$[rbp] - 007b7 44 2b c2 sub r8d, edx - 007ba 41 8b d0 mov edx, r8d - 007bd 48 63 d2 movsxd rdx, edx - 007c0 4c 8b 85 88 01 + 007b9 44 2b c2 sub r8d, edx + 007bc 41 8b d0 mov edx, r8d + 007bf 48 63 d2 movsxd rdx, edx + 007c2 4c 8b 85 88 01 00 00 mov r8, QWORD PTR cur$1[rbp] - 007c7 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] - 007cc 03 ca add ecx, edx - 007ce d1 f9 sar ecx, 1 - 007d0 03 c1 add eax, ecx - 007d2 25 ff 00 00 00 and eax, 255 ; 000000ffH - 007d7 48 63 8d e4 00 + 007c9 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] + 007ce 03 ca add ecx, edx + 007d0 d1 f9 sar ecx, 1 + 007d2 03 c1 add eax, ecx + 007d4 25 ff 00 00 00 and eax, 255 ; 000000ffH + 007d9 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 007de 48 8b 95 88 01 + 007e0 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 007e5 88 04 0a mov BYTE PTR [rdx+rcx], al - 007e8 eb 80 jmp SHORT $LN18@stbi__crea + 007e7 88 04 0a mov BYTE PTR [rdx+rcx], al + 007ea eb 80 jmp SHORT $LN18@stbi__crea $LN19@stbi__crea: - 007ea e9 da 01 00 00 jmp $LN10@stbi__crea + 007ec e9 da 01 00 00 jmp $LN10@stbi__crea $LN125@stbi__crea: ; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; - 007ef c7 85 e4 00 00 + 007f1 c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 007f9 eb 0e jmp SHORT $LN23@stbi__crea + 007fb eb 0e jmp SHORT $LN23@stbi__crea $LN21@stbi__crea: - 007fb 8b 85 e4 00 00 + 007fd 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 00801 ff c0 inc eax - 00803 89 85 e4 00 00 + 00803 ff c0 inc eax + 00805 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN23@stbi__crea: - 00809 8b 85 e4 01 00 + 0080b 8b 85 e4 01 00 00 mov eax, DWORD PTR nk$4[rbp] - 0080f 39 85 e4 00 00 + 00811 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 00815 0f 8d a6 00 00 + 00817 0f 8d a6 00 00 00 jge $LN22@stbi__crea - 0081b 48 63 85 e4 00 + 0081d 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 00822 48 8b 8d 68 04 + 00824 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00829 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0082d 89 85 34 04 00 + 0082b 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0082f 89 85 34 04 00 00 mov DWORD PTR tv343[rbp], eax - 00833 8b 8d 44 01 00 + 00835 8b 8d 44 01 00 00 mov ecx, DWORD PTR filter_bytes$[rbp] - 00839 8b 95 e4 00 00 + 0083b 8b 95 e4 00 00 00 mov edx, DWORD PTR k$[rbp] - 0083f 2b d1 sub edx, ecx - 00841 8b ca mov ecx, edx - 00843 48 63 c9 movsxd rcx, ecx - 00846 48 8b 95 a8 01 + 00841 2b d1 sub edx, ecx + 00843 8b ca mov ecx, edx + 00845 48 63 c9 movsxd rcx, ecx + 00848 48 8b 95 a8 01 00 00 mov rdx, QWORD PTR prior$2[rbp] - 0084d 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00851 48 63 95 e4 00 + 0084f 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00853 48 63 95 e4 00 00 00 movsxd rdx, DWORD PTR k$[rbp] - 00858 4c 8b 85 a8 01 + 0085a 4c 8b 85 a8 01 00 00 mov r8, QWORD PTR prior$2[rbp] - 0085f 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] - 00864 44 8b 85 44 01 + 00861 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] + 00866 44 8b 85 44 01 00 00 mov r8d, DWORD PTR filter_bytes$[rbp] - 0086b 44 8b 8d e4 00 + 0086d 44 8b 8d e4 00 00 00 mov r9d, DWORD PTR k$[rbp] - 00872 45 2b c8 sub r9d, r8d - 00875 45 8b c1 mov r8d, r9d - 00878 4d 63 c0 movsxd r8, r8d - 0087b 4c 8b 8d 88 01 + 00874 45 2b c8 sub r9d, r8d + 00877 45 8b c1 mov r8d, r9d + 0087a 4d 63 c0 movsxd r8, r8d + 0087d 4c 8b 8d 88 01 00 00 mov r9, QWORD PTR cur$1[rbp] - 00882 47 0f b6 04 01 movzx r8d, BYTE PTR [r9+r8] - 00887 44 89 85 38 04 + 00884 47 0f b6 04 01 movzx r8d, BYTE PTR [r9+r8] + 00889 44 89 85 38 04 00 00 mov DWORD PTR tv360[rbp], r8d - 0088e 44 8b c1 mov r8d, ecx - 00891 8b 8d 38 04 00 + 00890 44 8b c1 mov r8d, ecx + 00893 8b 8d 38 04 00 00 mov ecx, DWORD PTR tv360[rbp] - 00897 e8 00 00 00 00 call stbi__paeth - 0089c 8b 8d 34 04 00 + 00899 e8 00 00 00 00 call stbi__paeth + 0089e 8b 8d 34 04 00 00 mov ecx, DWORD PTR tv343[rbp] - 008a2 03 c8 add ecx, eax - 008a4 8b c1 mov eax, ecx - 008a6 25 ff 00 00 00 and eax, 255 ; 000000ffH - 008ab 48 63 8d e4 00 + 008a4 03 c8 add ecx, eax + 008a6 8b c1 mov eax, ecx + 008a8 25 ff 00 00 00 and eax, 255 ; 000000ffH + 008ad 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 008b2 48 8b 95 88 01 + 008b4 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 008b9 88 04 0a mov BYTE PTR [rdx+rcx], al - 008bc e9 3a ff ff ff jmp $LN21@stbi__crea + 008bb 88 04 0a mov BYTE PTR [rdx+rcx], al + 008be e9 3a ff ff ff jmp $LN21@stbi__crea $LN22@stbi__crea: - 008c1 e9 03 01 00 00 jmp $LN10@stbi__crea + 008c3 e9 03 01 00 00 jmp $LN10@stbi__crea $LN126@stbi__crea: ; 4246 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break; - 008c6 c7 85 e4 00 00 + 008c8 c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 008d0 eb 0e jmp SHORT $LN26@stbi__crea + 008d2 eb 0e jmp SHORT $LN26@stbi__crea $LN24@stbi__crea: - 008d2 8b 85 e4 00 00 + 008d4 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 008d8 ff c0 inc eax - 008da 89 85 e4 00 00 + 008da ff c0 inc eax + 008dc 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN26@stbi__crea: - 008e0 8b 85 e4 01 00 + 008e2 8b 85 e4 01 00 00 mov eax, DWORD PTR nk$4[rbp] - 008e6 39 85 e4 00 00 + 008e8 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 008ec 7d 4c jge SHORT $LN25@stbi__crea - 008ee 48 63 85 e4 00 + 008ee 7d 4c jge SHORT $LN25@stbi__crea + 008f0 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 008f5 48 8b 8d 68 04 + 008f7 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 008fc 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00900 8b 8d 44 01 00 + 008fe 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00902 8b 8d 44 01 00 00 mov ecx, DWORD PTR filter_bytes$[rbp] - 00906 8b 95 e4 00 00 + 00908 8b 95 e4 00 00 00 mov edx, DWORD PTR k$[rbp] - 0090c 2b d1 sub edx, ecx - 0090e 8b ca mov ecx, edx - 00910 48 63 c9 movsxd rcx, ecx - 00913 48 8b 95 88 01 + 0090e 2b d1 sub edx, ecx + 00910 8b ca mov ecx, edx + 00912 48 63 c9 movsxd rcx, ecx + 00915 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 0091a 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 0091e d1 f9 sar ecx, 1 - 00920 03 c1 add eax, ecx - 00922 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00927 48 63 8d e4 00 + 0091c 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00920 d1 f9 sar ecx, 1 + 00922 03 c1 add eax, ecx + 00924 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00929 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 0092e 48 8b 95 88 01 + 00930 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 00935 88 04 0a mov BYTE PTR [rdx+rcx], al - 00938 eb 98 jmp SHORT $LN24@stbi__crea + 00937 88 04 0a mov BYTE PTR [rdx+rcx], al + 0093a eb 98 jmp SHORT $LN24@stbi__crea $LN25@stbi__crea: - 0093a e9 8a 00 00 00 jmp $LN10@stbi__crea + 0093c e9 8a 00 00 00 jmp $LN10@stbi__crea $LN127@stbi__crea: ; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; - 0093f c7 85 e4 00 00 + 00941 c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 00949 eb 0e jmp SHORT $LN29@stbi__crea + 0094b eb 0e jmp SHORT $LN29@stbi__crea $LN27@stbi__crea: - 0094b 8b 85 e4 00 00 + 0094d 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 00951 ff c0 inc eax - 00953 89 85 e4 00 00 + 00953 ff c0 inc eax + 00955 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN29@stbi__crea: - 00959 8b 85 e4 01 00 + 0095b 8b 85 e4 01 00 00 mov eax, DWORD PTR nk$4[rbp] - 0095f 39 85 e4 00 00 + 00961 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 00965 7d 62 jge SHORT $LN28@stbi__crea - 00967 48 63 85 e4 00 + 00967 7d 62 jge SHORT $LN28@stbi__crea + 00969 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 0096e 48 8b 8d 68 04 + 00970 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00975 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00979 89 85 34 04 00 + 00977 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0097b 89 85 34 04 00 00 mov DWORD PTR tv391[rbp], eax - 0097f 8b 8d 44 01 00 + 00981 8b 8d 44 01 00 00 mov ecx, DWORD PTR filter_bytes$[rbp] - 00985 8b 95 e4 00 00 + 00987 8b 95 e4 00 00 00 mov edx, DWORD PTR k$[rbp] - 0098b 2b d1 sub edx, ecx - 0098d 8b ca mov ecx, edx - 0098f 48 63 c9 movsxd rcx, ecx - 00992 48 8b 95 88 01 + 0098d 2b d1 sub edx, ecx + 0098f 8b ca mov ecx, edx + 00991 48 63 c9 movsxd rcx, ecx + 00994 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 00999 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 0099d 45 33 c0 xor r8d, r8d - 009a0 33 d2 xor edx, edx - 009a2 e8 00 00 00 00 call stbi__paeth - 009a7 8b 8d 34 04 00 + 0099b 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 0099f 45 33 c0 xor r8d, r8d + 009a2 33 d2 xor edx, edx + 009a4 e8 00 00 00 00 call stbi__paeth + 009a9 8b 8d 34 04 00 00 mov ecx, DWORD PTR tv391[rbp] - 009ad 03 c8 add ecx, eax - 009af 8b c1 mov eax, ecx - 009b1 25 ff 00 00 00 and eax, 255 ; 000000ffH - 009b6 48 63 8d e4 00 + 009af 03 c8 add ecx, eax + 009b1 8b c1 mov eax, ecx + 009b3 25 ff 00 00 00 and eax, 255 ; 000000ffH + 009b8 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 009bd 48 8b 95 88 01 + 009bf 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 009c4 88 04 0a mov BYTE PTR [rdx+rcx], al - 009c7 eb 82 jmp SHORT $LN27@stbi__crea + 009c6 88 04 0a mov BYTE PTR [rdx+rcx], al + 009c9 eb 82 jmp SHORT $LN27@stbi__crea $LN28@stbi__crea: $LN10@stbi__crea: @@ -17860,38 +17970,38 @@ $LN10@stbi__crea: ; 4249 : #undef STBI__CASE ; 4250 : raw += nk; - 009c9 48 63 85 e4 01 + 009cb 48 63 85 e4 01 00 00 movsxd rax, DWORD PTR nk$4[rbp] - 009d0 48 8b 8d 68 04 + 009d2 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 009d7 48 03 c8 add rcx, rax - 009da 48 8b c1 mov rax, rcx - 009dd 48 89 85 68 04 + 009d9 48 03 c8 add rcx, rax + 009dc 48 8b c1 mov rax, rcx + 009df 48 89 85 68 04 00 00 mov QWORD PTR raw$[rbp], rax ; 4251 : } - 009e4 e9 15 08 00 00 jmp $LN119@stbi__crea + 009e6 e9 15 08 00 00 jmp $LN119@stbi__crea $LN118@stbi__crea: ; 4252 : else { ; 4253 : STBI_ASSERT(img_n + 1 == out_n); - 009e9 8b 85 04 01 00 + 009eb 8b 85 04 01 00 00 mov eax, DWORD PTR img_n$[rbp] - 009ef ff c0 inc eax - 009f1 3b 85 78 04 00 + 009f1 ff c0 inc eax + 009f3 3b 85 78 04 00 00 cmp eax, DWORD PTR out_n$[rbp] - 009f7 74 1c je SHORT $LN162@stbi__crea - 009f9 41 b8 9d 10 00 + 009f9 74 1c je SHORT $LN162@stbi__crea + 009fb 41 b8 9d 10 00 00 mov r8d, 4253 ; 0000109dH - 009ff 48 8d 15 00 00 + 00a01 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 00a06 48 8d 0d 00 00 + 00a08 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1CG@MFAHHIFB@?$AAi?$AAm?$AAg?$AA_?$AAn?$AA?5?$AA?$CL?$AA?5?$AA1?$AA?5?$AA?$DN?$AA?$DN?$AA?5?$AAo?$AAu@ - 00a0d ff 15 00 00 00 + 00a0f ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 00a13 33 c0 xor eax, eax + 00a15 33 c0 xor eax, eax $LN162@stbi__crea: ; 4254 : #define STBI__CASE(f) \ @@ -17900,658 +18010,658 @@ $LN162@stbi__crea: ; 4257 : for (k=0; k < filter_bytes; ++k) ; 4258 : switch (filter) { - 00a15 8b 85 c4 01 00 + 00a17 8b 85 c4 01 00 00 mov eax, DWORD PTR filter$3[rbp] - 00a1b 89 85 34 04 00 + 00a1d 89 85 34 04 00 00 mov DWORD PTR tv413[rbp], eax - 00a21 83 bd 34 04 00 + 00a23 83 bd 34 04 00 00 06 cmp DWORD PTR tv413[rbp], 6 - 00a28 0f 87 5b 07 00 + 00a2a 0f 87 5b 07 00 00 ja $LN30@stbi__crea - 00a2e 48 63 85 34 04 + 00a30 48 63 85 34 04 00 00 movsxd rax, DWORD PTR tv413[rbp] - 00a35 48 8d 0d 00 00 + 00a37 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__ImageBase - 00a3c 8b 84 81 00 00 + 00a3e 8b 84 81 00 00 00 00 mov eax, DWORD PTR $LN166@stbi__crea[rcx+rax*4] - 00a43 48 03 c1 add rax, rcx - 00a46 ff e0 jmp rax + 00a45 48 03 c1 add rax, rcx + 00a48 ff e0 jmp rax $LN128@stbi__crea: ; 4259 : STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; - 00a48 8b 85 80 04 00 + 00a4a 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 00a4e ff c8 dec eax - 00a50 89 45 44 mov DWORD PTR i$[rbp], eax - 00a53 eb 6b jmp SHORT $LN34@stbi__crea + 00a50 ff c8 dec eax + 00a52 89 45 44 mov DWORD PTR i$[rbp], eax + 00a55 eb 6b jmp SHORT $LN34@stbi__crea $LN32@stbi__crea: - 00a55 8b 45 44 mov eax, DWORD PTR i$[rbp] - 00a58 ff c8 dec eax - 00a5a 89 45 44 mov DWORD PTR i$[rbp], eax - 00a5d 48 63 85 44 01 + 00a57 8b 45 44 mov eax, DWORD PTR i$[rbp] + 00a5a ff c8 dec eax + 00a5c 89 45 44 mov DWORD PTR i$[rbp], eax + 00a5f 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00a64 48 8b 8d 88 01 + 00a66 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00a6b c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 00a6f 48 63 85 44 01 + 00a6d c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00a71 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00a76 48 8b 8d 68 04 + 00a78 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00a7d 48 03 c8 add rcx, rax - 00a80 48 8b c1 mov rax, rcx - 00a83 48 89 85 68 04 + 00a7f 48 03 c8 add rcx, rax + 00a82 48 8b c1 mov rax, rcx + 00a85 48 89 85 68 04 00 00 mov QWORD PTR raw$[rbp], rax - 00a8a 48 63 85 24 01 + 00a8c 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 00a91 48 8b 8d 88 01 + 00a93 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00a98 48 03 c8 add rcx, rax - 00a9b 48 8b c1 mov rax, rcx - 00a9e 48 89 85 88 01 + 00a9a 48 03 c8 add rcx, rax + 00a9d 48 8b c1 mov rax, rcx + 00aa0 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax - 00aa5 48 63 85 24 01 + 00aa7 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 00aac 48 8b 8d a8 01 + 00aae 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR prior$2[rbp] - 00ab3 48 03 c8 add rcx, rax - 00ab6 48 8b c1 mov rax, rcx - 00ab9 48 89 85 a8 01 + 00ab5 48 03 c8 add rcx, rax + 00ab8 48 8b c1 mov rax, rcx + 00abb 48 89 85 a8 01 00 00 mov QWORD PTR prior$2[rbp], rax $LN34@stbi__crea: - 00ac0 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 - 00ac4 72 53 jb SHORT $LN33@stbi__crea - 00ac6 c7 85 e4 00 00 + 00ac2 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 + 00ac6 72 53 jb SHORT $LN33@stbi__crea + 00ac8 c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 00ad0 eb 0e jmp SHORT $LN37@stbi__crea + 00ad2 eb 0e jmp SHORT $LN37@stbi__crea $LN35@stbi__crea: - 00ad2 8b 85 e4 00 00 + 00ad4 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 00ad8 ff c0 inc eax - 00ada 89 85 e4 00 00 + 00ada ff c0 inc eax + 00adc 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN37@stbi__crea: - 00ae0 8b 85 44 01 00 + 00ae2 8b 85 44 01 00 00 mov eax, DWORD PTR filter_bytes$[rbp] - 00ae6 39 85 e4 00 00 + 00ae8 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 00aec 7d 26 jge SHORT $LN36@stbi__crea - 00aee 48 63 85 e4 00 + 00aee 7d 26 jge SHORT $LN36@stbi__crea + 00af0 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 00af5 48 63 8d e4 00 + 00af7 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 00afc 48 8b 95 88 01 + 00afe 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 00b03 4c 8b 85 68 04 + 00b05 4c 8b 85 68 04 00 00 mov r8, QWORD PTR raw$[rbp] - 00b0a 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00b0f 88 04 0a mov BYTE PTR [rdx+rcx], al - 00b12 eb be jmp SHORT $LN35@stbi__crea + 00b0c 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00b11 88 04 0a mov BYTE PTR [rdx+rcx], al + 00b14 eb be jmp SHORT $LN35@stbi__crea $LN36@stbi__crea: - 00b14 e9 3c ff ff ff jmp $LN32@stbi__crea + 00b16 e9 3c ff ff ff jmp $LN32@stbi__crea $LN33@stbi__crea: - 00b19 e9 6b 06 00 00 jmp $LN30@stbi__crea + 00b1b e9 6b 06 00 00 jmp $LN30@stbi__crea $LN129@stbi__crea: ; 4260 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break; - 00b1e 8b 85 80 04 00 + 00b20 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 00b24 ff c8 dec eax - 00b26 89 45 44 mov DWORD PTR i$[rbp], eax - 00b29 eb 6b jmp SHORT $LN40@stbi__crea + 00b26 ff c8 dec eax + 00b28 89 45 44 mov DWORD PTR i$[rbp], eax + 00b2b eb 6b jmp SHORT $LN40@stbi__crea $LN38@stbi__crea: - 00b2b 8b 45 44 mov eax, DWORD PTR i$[rbp] - 00b2e ff c8 dec eax - 00b30 89 45 44 mov DWORD PTR i$[rbp], eax - 00b33 48 63 85 44 01 + 00b2d 8b 45 44 mov eax, DWORD PTR i$[rbp] + 00b30 ff c8 dec eax + 00b32 89 45 44 mov DWORD PTR i$[rbp], eax + 00b35 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00b3a 48 8b 8d 88 01 + 00b3c 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00b41 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 00b45 48 63 85 44 01 + 00b43 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00b47 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00b4c 48 8b 8d 68 04 + 00b4e 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00b53 48 03 c8 add rcx, rax - 00b56 48 8b c1 mov rax, rcx - 00b59 48 89 85 68 04 + 00b55 48 03 c8 add rcx, rax + 00b58 48 8b c1 mov rax, rcx + 00b5b 48 89 85 68 04 00 00 mov QWORD PTR raw$[rbp], rax - 00b60 48 63 85 24 01 + 00b62 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 00b67 48 8b 8d 88 01 + 00b69 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00b6e 48 03 c8 add rcx, rax - 00b71 48 8b c1 mov rax, rcx - 00b74 48 89 85 88 01 + 00b70 48 03 c8 add rcx, rax + 00b73 48 8b c1 mov rax, rcx + 00b76 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax - 00b7b 48 63 85 24 01 + 00b7d 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 00b82 48 8b 8d a8 01 + 00b84 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR prior$2[rbp] - 00b89 48 03 c8 add rcx, rax - 00b8c 48 8b c1 mov rax, rcx - 00b8f 48 89 85 a8 01 + 00b8b 48 03 c8 add rcx, rax + 00b8e 48 8b c1 mov rax, rcx + 00b91 48 89 85 a8 01 00 00 mov QWORD PTR prior$2[rbp], rax $LN40@stbi__crea: - 00b96 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 - 00b9a 72 77 jb SHORT $LN39@stbi__crea - 00b9c c7 85 e4 00 00 + 00b98 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 + 00b9c 72 77 jb SHORT $LN39@stbi__crea + 00b9e c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 00ba6 eb 0e jmp SHORT $LN43@stbi__crea + 00ba8 eb 0e jmp SHORT $LN43@stbi__crea $LN41@stbi__crea: - 00ba8 8b 85 e4 00 00 + 00baa 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 00bae ff c0 inc eax - 00bb0 89 85 e4 00 00 + 00bb0 ff c0 inc eax + 00bb2 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN43@stbi__crea: - 00bb6 8b 85 44 01 00 + 00bb8 8b 85 44 01 00 00 mov eax, DWORD PTR filter_bytes$[rbp] - 00bbc 39 85 e4 00 00 + 00bbe 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 00bc2 7d 4a jge SHORT $LN42@stbi__crea - 00bc4 48 63 85 e4 00 + 00bc4 7d 4a jge SHORT $LN42@stbi__crea + 00bc6 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 00bcb 48 8b 8d 68 04 + 00bcd 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00bd2 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00bd6 8b 8d 24 01 00 + 00bd4 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00bd8 8b 8d 24 01 00 00 mov ecx, DWORD PTR output_bytes$[rbp] - 00bdc 8b 95 e4 00 00 + 00bde 8b 95 e4 00 00 00 mov edx, DWORD PTR k$[rbp] - 00be2 2b d1 sub edx, ecx - 00be4 8b ca mov ecx, edx - 00be6 48 63 c9 movsxd rcx, ecx - 00be9 48 8b 95 88 01 + 00be4 2b d1 sub edx, ecx + 00be6 8b ca mov ecx, edx + 00be8 48 63 c9 movsxd rcx, ecx + 00beb 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 00bf0 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00bf4 03 c1 add eax, ecx - 00bf6 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00bfb 48 63 8d e4 00 + 00bf2 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00bf6 03 c1 add eax, ecx + 00bf8 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00bfd 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 00c02 48 8b 95 88 01 + 00c04 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 00c09 88 04 0a mov BYTE PTR [rdx+rcx], al - 00c0c eb 9a jmp SHORT $LN41@stbi__crea + 00c0b 88 04 0a mov BYTE PTR [rdx+rcx], al + 00c0e eb 9a jmp SHORT $LN41@stbi__crea $LN42@stbi__crea: - 00c0e e9 18 ff ff ff jmp $LN38@stbi__crea + 00c10 e9 18 ff ff ff jmp $LN38@stbi__crea $LN39@stbi__crea: - 00c13 e9 71 05 00 00 jmp $LN30@stbi__crea + 00c15 e9 71 05 00 00 jmp $LN30@stbi__crea $LN130@stbi__crea: ; 4261 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; - 00c18 8b 85 80 04 00 + 00c1a 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 00c1e ff c8 dec eax - 00c20 89 45 44 mov DWORD PTR i$[rbp], eax - 00c23 eb 6b jmp SHORT $LN46@stbi__crea + 00c20 ff c8 dec eax + 00c22 89 45 44 mov DWORD PTR i$[rbp], eax + 00c25 eb 6b jmp SHORT $LN46@stbi__crea $LN44@stbi__crea: - 00c25 8b 45 44 mov eax, DWORD PTR i$[rbp] - 00c28 ff c8 dec eax - 00c2a 89 45 44 mov DWORD PTR i$[rbp], eax - 00c2d 48 63 85 44 01 + 00c27 8b 45 44 mov eax, DWORD PTR i$[rbp] + 00c2a ff c8 dec eax + 00c2c 89 45 44 mov DWORD PTR i$[rbp], eax + 00c2f 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00c34 48 8b 8d 88 01 + 00c36 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00c3b c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 00c3f 48 63 85 44 01 + 00c3d c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00c41 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00c46 48 8b 8d 68 04 + 00c48 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00c4d 48 03 c8 add rcx, rax - 00c50 48 8b c1 mov rax, rcx - 00c53 48 89 85 68 04 + 00c4f 48 03 c8 add rcx, rax + 00c52 48 8b c1 mov rax, rcx + 00c55 48 89 85 68 04 00 00 mov QWORD PTR raw$[rbp], rax - 00c5a 48 63 85 24 01 + 00c5c 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 00c61 48 8b 8d 88 01 + 00c63 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00c68 48 03 c8 add rcx, rax - 00c6b 48 8b c1 mov rax, rcx - 00c6e 48 89 85 88 01 + 00c6a 48 03 c8 add rcx, rax + 00c6d 48 8b c1 mov rax, rcx + 00c70 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax - 00c75 48 63 85 24 01 + 00c77 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 00c7c 48 8b 8d a8 01 + 00c7e 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR prior$2[rbp] - 00c83 48 03 c8 add rcx, rax - 00c86 48 8b c1 mov rax, rcx - 00c89 48 89 85 a8 01 + 00c85 48 03 c8 add rcx, rax + 00c88 48 8b c1 mov rax, rcx + 00c8b 48 89 85 a8 01 00 00 mov QWORD PTR prior$2[rbp], rax $LN46@stbi__crea: - 00c90 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 - 00c94 72 6b jb SHORT $LN45@stbi__crea - 00c96 c7 85 e4 00 00 + 00c92 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 + 00c96 72 6b jb SHORT $LN45@stbi__crea + 00c98 c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 00ca0 eb 0e jmp SHORT $LN49@stbi__crea + 00ca2 eb 0e jmp SHORT $LN49@stbi__crea $LN47@stbi__crea: - 00ca2 8b 85 e4 00 00 + 00ca4 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 00ca8 ff c0 inc eax - 00caa 89 85 e4 00 00 + 00caa ff c0 inc eax + 00cac 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN49@stbi__crea: - 00cb0 8b 85 44 01 00 + 00cb2 8b 85 44 01 00 00 mov eax, DWORD PTR filter_bytes$[rbp] - 00cb6 39 85 e4 00 00 + 00cb8 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 00cbc 7d 3e jge SHORT $LN48@stbi__crea - 00cbe 48 63 85 e4 00 + 00cbe 7d 3e jge SHORT $LN48@stbi__crea + 00cc0 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 00cc5 48 8b 8d 68 04 + 00cc7 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00ccc 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00cd0 48 63 8d e4 00 + 00cce 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00cd2 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 00cd7 48 8b 95 a8 01 + 00cd9 48 8b 95 a8 01 00 00 mov rdx, QWORD PTR prior$2[rbp] - 00cde 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00ce2 03 c1 add eax, ecx - 00ce4 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00ce9 48 63 8d e4 00 + 00ce0 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00ce4 03 c1 add eax, ecx + 00ce6 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00ceb 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 00cf0 48 8b 95 88 01 + 00cf2 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 00cf7 88 04 0a mov BYTE PTR [rdx+rcx], al - 00cfa eb a6 jmp SHORT $LN47@stbi__crea + 00cf9 88 04 0a mov BYTE PTR [rdx+rcx], al + 00cfc eb a6 jmp SHORT $LN47@stbi__crea $LN48@stbi__crea: - 00cfc e9 24 ff ff ff jmp $LN44@stbi__crea + 00cfe e9 24 ff ff ff jmp $LN44@stbi__crea $LN45@stbi__crea: - 00d01 e9 83 04 00 00 jmp $LN30@stbi__crea + 00d03 e9 83 04 00 00 jmp $LN30@stbi__crea $LN131@stbi__crea: ; 4262 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break; - 00d06 8b 85 80 04 00 + 00d08 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 00d0c ff c8 dec eax - 00d0e 89 45 44 mov DWORD PTR i$[rbp], eax - 00d11 eb 6b jmp SHORT $LN52@stbi__crea + 00d0e ff c8 dec eax + 00d10 89 45 44 mov DWORD PTR i$[rbp], eax + 00d13 eb 6b jmp SHORT $LN52@stbi__crea $LN50@stbi__crea: - 00d13 8b 45 44 mov eax, DWORD PTR i$[rbp] - 00d16 ff c8 dec eax - 00d18 89 45 44 mov DWORD PTR i$[rbp], eax - 00d1b 48 63 85 44 01 + 00d15 8b 45 44 mov eax, DWORD PTR i$[rbp] + 00d18 ff c8 dec eax + 00d1a 89 45 44 mov DWORD PTR i$[rbp], eax + 00d1d 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00d22 48 8b 8d 88 01 + 00d24 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00d29 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 00d2d 48 63 85 44 01 + 00d2b c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00d2f 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00d34 48 8b 8d 68 04 + 00d36 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00d3b 48 03 c8 add rcx, rax - 00d3e 48 8b c1 mov rax, rcx - 00d41 48 89 85 68 04 + 00d3d 48 03 c8 add rcx, rax + 00d40 48 8b c1 mov rax, rcx + 00d43 48 89 85 68 04 00 00 mov QWORD PTR raw$[rbp], rax - 00d48 48 63 85 24 01 + 00d4a 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 00d4f 48 8b 8d 88 01 + 00d51 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00d56 48 03 c8 add rcx, rax - 00d59 48 8b c1 mov rax, rcx - 00d5c 48 89 85 88 01 + 00d58 48 03 c8 add rcx, rax + 00d5b 48 8b c1 mov rax, rcx + 00d5e 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax - 00d63 48 63 85 24 01 + 00d65 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 00d6a 48 8b 8d a8 01 + 00d6c 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR prior$2[rbp] - 00d71 48 03 c8 add rcx, rax - 00d74 48 8b c1 mov rax, rcx - 00d77 48 89 85 a8 01 + 00d73 48 03 c8 add rcx, rax + 00d76 48 8b c1 mov rax, rcx + 00d79 48 89 85 a8 01 00 00 mov QWORD PTR prior$2[rbp], rax $LN52@stbi__crea: - 00d7e 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 - 00d82 0f 82 91 00 00 + 00d80 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 + 00d84 0f 82 91 00 00 00 jb $LN51@stbi__crea - 00d88 c7 85 e4 00 00 + 00d8a c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 00d92 eb 0e jmp SHORT $LN55@stbi__crea + 00d94 eb 0e jmp SHORT $LN55@stbi__crea $LN53@stbi__crea: - 00d94 8b 85 e4 00 00 + 00d96 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 00d9a ff c0 inc eax - 00d9c 89 85 e4 00 00 + 00d9c ff c0 inc eax + 00d9e 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN55@stbi__crea: - 00da2 8b 85 44 01 00 + 00da4 8b 85 44 01 00 00 mov eax, DWORD PTR filter_bytes$[rbp] - 00da8 39 85 e4 00 00 + 00daa 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 00dae 7d 64 jge SHORT $LN54@stbi__crea - 00db0 48 63 85 e4 00 + 00db0 7d 64 jge SHORT $LN54@stbi__crea + 00db2 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 00db7 48 8b 8d 68 04 + 00db9 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00dbe 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00dc2 48 63 8d e4 00 + 00dc0 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00dc4 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 00dc9 48 8b 95 a8 01 + 00dcb 48 8b 95 a8 01 00 00 mov rdx, QWORD PTR prior$2[rbp] - 00dd0 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00dd4 8b 95 24 01 00 + 00dd2 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00dd6 8b 95 24 01 00 00 mov edx, DWORD PTR output_bytes$[rbp] - 00dda 44 8b 85 e4 00 + 00ddc 44 8b 85 e4 00 00 00 mov r8d, DWORD PTR k$[rbp] - 00de1 44 2b c2 sub r8d, edx - 00de4 41 8b d0 mov edx, r8d - 00de7 48 63 d2 movsxd rdx, edx - 00dea 4c 8b 85 88 01 + 00de3 44 2b c2 sub r8d, edx + 00de6 41 8b d0 mov edx, r8d + 00de9 48 63 d2 movsxd rdx, edx + 00dec 4c 8b 85 88 01 00 00 mov r8, QWORD PTR cur$1[rbp] - 00df1 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] - 00df6 03 ca add ecx, edx - 00df8 d1 f9 sar ecx, 1 - 00dfa 03 c1 add eax, ecx - 00dfc 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00e01 48 63 8d e4 00 + 00df3 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] + 00df8 03 ca add ecx, edx + 00dfa d1 f9 sar ecx, 1 + 00dfc 03 c1 add eax, ecx + 00dfe 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00e03 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 00e08 48 8b 95 88 01 + 00e0a 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 00e0f 88 04 0a mov BYTE PTR [rdx+rcx], al - 00e12 eb 80 jmp SHORT $LN53@stbi__crea + 00e11 88 04 0a mov BYTE PTR [rdx+rcx], al + 00e14 eb 80 jmp SHORT $LN53@stbi__crea $LN54@stbi__crea: - 00e14 e9 fa fe ff ff jmp $LN50@stbi__crea + 00e16 e9 fa fe ff ff jmp $LN50@stbi__crea $LN51@stbi__crea: - 00e19 e9 6b 03 00 00 jmp $LN30@stbi__crea + 00e1b e9 6b 03 00 00 jmp $LN30@stbi__crea $LN132@stbi__crea: ; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; - 00e1e 8b 85 80 04 00 + 00e20 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 00e24 ff c8 dec eax - 00e26 89 45 44 mov DWORD PTR i$[rbp], eax - 00e29 eb 6b jmp SHORT $LN58@stbi__crea + 00e26 ff c8 dec eax + 00e28 89 45 44 mov DWORD PTR i$[rbp], eax + 00e2b eb 6b jmp SHORT $LN58@stbi__crea $LN56@stbi__crea: - 00e2b 8b 45 44 mov eax, DWORD PTR i$[rbp] - 00e2e ff c8 dec eax - 00e30 89 45 44 mov DWORD PTR i$[rbp], eax - 00e33 48 63 85 44 01 + 00e2d 8b 45 44 mov eax, DWORD PTR i$[rbp] + 00e30 ff c8 dec eax + 00e32 89 45 44 mov DWORD PTR i$[rbp], eax + 00e35 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00e3a 48 8b 8d 88 01 + 00e3c 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00e41 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 00e45 48 63 85 44 01 + 00e43 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00e47 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00e4c 48 8b 8d 68 04 + 00e4e 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00e53 48 03 c8 add rcx, rax - 00e56 48 8b c1 mov rax, rcx - 00e59 48 89 85 68 04 + 00e55 48 03 c8 add rcx, rax + 00e58 48 8b c1 mov rax, rcx + 00e5b 48 89 85 68 04 00 00 mov QWORD PTR raw$[rbp], rax - 00e60 48 63 85 24 01 + 00e62 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 00e67 48 8b 8d 88 01 + 00e69 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00e6e 48 03 c8 add rcx, rax - 00e71 48 8b c1 mov rax, rcx - 00e74 48 89 85 88 01 + 00e70 48 03 c8 add rcx, rax + 00e73 48 8b c1 mov rax, rcx + 00e76 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax - 00e7b 48 63 85 24 01 + 00e7d 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 00e82 48 8b 8d a8 01 + 00e84 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR prior$2[rbp] - 00e89 48 03 c8 add rcx, rax - 00e8c 48 8b c1 mov rax, rcx - 00e8f 48 89 85 a8 01 + 00e8b 48 03 c8 add rcx, rax + 00e8e 48 8b c1 mov rax, rcx + 00e91 48 89 85 a8 01 00 00 mov QWORD PTR prior$2[rbp], rax $LN58@stbi__crea: - 00e96 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 - 00e9a 0f 82 d7 00 00 + 00e98 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 + 00e9c 0f 82 d7 00 00 00 jb $LN57@stbi__crea - 00ea0 c7 85 e4 00 00 + 00ea2 c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 00eaa eb 0e jmp SHORT $LN61@stbi__crea + 00eac eb 0e jmp SHORT $LN61@stbi__crea $LN59@stbi__crea: - 00eac 8b 85 e4 00 00 + 00eae 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 00eb2 ff c0 inc eax - 00eb4 89 85 e4 00 00 + 00eb4 ff c0 inc eax + 00eb6 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN61@stbi__crea: - 00eba 8b 85 44 01 00 + 00ebc 8b 85 44 01 00 00 mov eax, DWORD PTR filter_bytes$[rbp] - 00ec0 39 85 e4 00 00 + 00ec2 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 00ec6 0f 8d a6 00 00 + 00ec8 0f 8d a6 00 00 00 jge $LN60@stbi__crea - 00ecc 48 63 85 e4 00 + 00ece 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 00ed3 48 8b 8d 68 04 + 00ed5 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00eda 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00ede 89 85 34 04 00 + 00edc 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00ee0 89 85 34 04 00 00 mov DWORD PTR tv546[rbp], eax - 00ee4 8b 8d 24 01 00 + 00ee6 8b 8d 24 01 00 00 mov ecx, DWORD PTR output_bytes$[rbp] - 00eea 8b 95 e4 00 00 + 00eec 8b 95 e4 00 00 00 mov edx, DWORD PTR k$[rbp] - 00ef0 2b d1 sub edx, ecx - 00ef2 8b ca mov ecx, edx - 00ef4 48 63 c9 movsxd rcx, ecx - 00ef7 48 8b 95 a8 01 + 00ef2 2b d1 sub edx, ecx + 00ef4 8b ca mov ecx, edx + 00ef6 48 63 c9 movsxd rcx, ecx + 00ef9 48 8b 95 a8 01 00 00 mov rdx, QWORD PTR prior$2[rbp] - 00efe 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00f02 48 63 95 e4 00 + 00f00 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00f04 48 63 95 e4 00 00 00 movsxd rdx, DWORD PTR k$[rbp] - 00f09 4c 8b 85 a8 01 + 00f0b 4c 8b 85 a8 01 00 00 mov r8, QWORD PTR prior$2[rbp] - 00f10 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] - 00f15 44 8b 85 24 01 + 00f12 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] + 00f17 44 8b 85 24 01 00 00 mov r8d, DWORD PTR output_bytes$[rbp] - 00f1c 44 8b 8d e4 00 + 00f1e 44 8b 8d e4 00 00 00 mov r9d, DWORD PTR k$[rbp] - 00f23 45 2b c8 sub r9d, r8d - 00f26 45 8b c1 mov r8d, r9d - 00f29 4d 63 c0 movsxd r8, r8d - 00f2c 4c 8b 8d 88 01 + 00f25 45 2b c8 sub r9d, r8d + 00f28 45 8b c1 mov r8d, r9d + 00f2b 4d 63 c0 movsxd r8, r8d + 00f2e 4c 8b 8d 88 01 00 00 mov r9, QWORD PTR cur$1[rbp] - 00f33 47 0f b6 04 01 movzx r8d, BYTE PTR [r9+r8] - 00f38 44 89 85 38 04 + 00f35 47 0f b6 04 01 movzx r8d, BYTE PTR [r9+r8] + 00f3a 44 89 85 38 04 00 00 mov DWORD PTR tv563[rbp], r8d - 00f3f 44 8b c1 mov r8d, ecx - 00f42 8b 8d 38 04 00 + 00f41 44 8b c1 mov r8d, ecx + 00f44 8b 8d 38 04 00 00 mov ecx, DWORD PTR tv563[rbp] - 00f48 e8 00 00 00 00 call stbi__paeth - 00f4d 8b 8d 34 04 00 + 00f4a e8 00 00 00 00 call stbi__paeth + 00f4f 8b 8d 34 04 00 00 mov ecx, DWORD PTR tv546[rbp] - 00f53 03 c8 add ecx, eax - 00f55 8b c1 mov eax, ecx - 00f57 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00f5c 48 63 8d e4 00 + 00f55 03 c8 add ecx, eax + 00f57 8b c1 mov eax, ecx + 00f59 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00f5e 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 00f63 48 8b 95 88 01 + 00f65 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 00f6a 88 04 0a mov BYTE PTR [rdx+rcx], al - 00f6d e9 3a ff ff ff jmp $LN59@stbi__crea + 00f6c 88 04 0a mov BYTE PTR [rdx+rcx], al + 00f6f e9 3a ff ff ff jmp $LN59@stbi__crea $LN60@stbi__crea: - 00f72 e9 b4 fe ff ff jmp $LN56@stbi__crea + 00f74 e9 b4 fe ff ff jmp $LN56@stbi__crea $LN57@stbi__crea: - 00f77 e9 0d 02 00 00 jmp $LN30@stbi__crea + 00f79 e9 0d 02 00 00 jmp $LN30@stbi__crea $LN133@stbi__crea: ; 4264 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break; - 00f7c 8b 85 80 04 00 + 00f7e 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 00f82 ff c8 dec eax - 00f84 89 45 44 mov DWORD PTR i$[rbp], eax - 00f87 eb 6b jmp SHORT $LN64@stbi__crea + 00f84 ff c8 dec eax + 00f86 89 45 44 mov DWORD PTR i$[rbp], eax + 00f89 eb 6b jmp SHORT $LN64@stbi__crea $LN62@stbi__crea: - 00f89 8b 45 44 mov eax, DWORD PTR i$[rbp] - 00f8c ff c8 dec eax - 00f8e 89 45 44 mov DWORD PTR i$[rbp], eax - 00f91 48 63 85 44 01 + 00f8b 8b 45 44 mov eax, DWORD PTR i$[rbp] + 00f8e ff c8 dec eax + 00f90 89 45 44 mov DWORD PTR i$[rbp], eax + 00f93 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00f98 48 8b 8d 88 01 + 00f9a 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00f9f c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 00fa3 48 63 85 44 01 + 00fa1 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00fa5 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 00faa 48 8b 8d 68 04 + 00fac 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 00fb1 48 03 c8 add rcx, rax - 00fb4 48 8b c1 mov rax, rcx - 00fb7 48 89 85 68 04 + 00fb3 48 03 c8 add rcx, rax + 00fb6 48 8b c1 mov rax, rcx + 00fb9 48 89 85 68 04 00 00 mov QWORD PTR raw$[rbp], rax - 00fbe 48 63 85 24 01 + 00fc0 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 00fc5 48 8b 8d 88 01 + 00fc7 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 00fcc 48 03 c8 add rcx, rax - 00fcf 48 8b c1 mov rax, rcx - 00fd2 48 89 85 88 01 + 00fce 48 03 c8 add rcx, rax + 00fd1 48 8b c1 mov rax, rcx + 00fd4 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax - 00fd9 48 63 85 24 01 + 00fdb 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 00fe0 48 8b 8d a8 01 + 00fe2 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR prior$2[rbp] - 00fe7 48 03 c8 add rcx, rax - 00fea 48 8b c1 mov rax, rcx - 00fed 48 89 85 a8 01 + 00fe9 48 03 c8 add rcx, rax + 00fec 48 8b c1 mov rax, rcx + 00fef 48 89 85 a8 01 00 00 mov QWORD PTR prior$2[rbp], rax $LN64@stbi__crea: - 00ff4 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 - 00ff8 72 79 jb SHORT $LN63@stbi__crea - 00ffa c7 85 e4 00 00 + 00ff6 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 + 00ffa 72 79 jb SHORT $LN63@stbi__crea + 00ffc c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 01004 eb 0e jmp SHORT $LN67@stbi__crea + 01006 eb 0e jmp SHORT $LN67@stbi__crea $LN65@stbi__crea: - 01006 8b 85 e4 00 00 + 01008 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 0100c ff c0 inc eax - 0100e 89 85 e4 00 00 + 0100e ff c0 inc eax + 01010 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN67@stbi__crea: - 01014 8b 85 44 01 00 + 01016 8b 85 44 01 00 00 mov eax, DWORD PTR filter_bytes$[rbp] - 0101a 39 85 e4 00 00 + 0101c 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 01020 7d 4c jge SHORT $LN66@stbi__crea - 01022 48 63 85 e4 00 + 01022 7d 4c jge SHORT $LN66@stbi__crea + 01024 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 01029 48 8b 8d 68 04 + 0102b 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 01030 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 01034 8b 8d 24 01 00 + 01032 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 01036 8b 8d 24 01 00 00 mov ecx, DWORD PTR output_bytes$[rbp] - 0103a 8b 95 e4 00 00 + 0103c 8b 95 e4 00 00 00 mov edx, DWORD PTR k$[rbp] - 01040 2b d1 sub edx, ecx - 01042 8b ca mov ecx, edx - 01044 48 63 c9 movsxd rcx, ecx - 01047 48 8b 95 88 01 + 01042 2b d1 sub edx, ecx + 01044 8b ca mov ecx, edx + 01046 48 63 c9 movsxd rcx, ecx + 01049 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 0104e 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 01052 d1 f9 sar ecx, 1 - 01054 03 c1 add eax, ecx - 01056 25 ff 00 00 00 and eax, 255 ; 000000ffH - 0105b 48 63 8d e4 00 + 01050 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 01054 d1 f9 sar ecx, 1 + 01056 03 c1 add eax, ecx + 01058 25 ff 00 00 00 and eax, 255 ; 000000ffH + 0105d 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 01062 48 8b 95 88 01 + 01064 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 01069 88 04 0a mov BYTE PTR [rdx+rcx], al - 0106c eb 98 jmp SHORT $LN65@stbi__crea + 0106b 88 04 0a mov BYTE PTR [rdx+rcx], al + 0106e eb 98 jmp SHORT $LN65@stbi__crea $LN66@stbi__crea: - 0106e e9 16 ff ff ff jmp $LN62@stbi__crea + 01070 e9 16 ff ff ff jmp $LN62@stbi__crea $LN63@stbi__crea: - 01073 e9 11 01 00 00 jmp $LN30@stbi__crea + 01075 e9 11 01 00 00 jmp $LN30@stbi__crea $LN134@stbi__crea: ; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; - 01078 8b 85 80 04 00 + 0107a 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 0107e ff c8 dec eax - 01080 89 45 44 mov DWORD PTR i$[rbp], eax - 01083 eb 6b jmp SHORT $LN70@stbi__crea + 01080 ff c8 dec eax + 01082 89 45 44 mov DWORD PTR i$[rbp], eax + 01085 eb 6b jmp SHORT $LN70@stbi__crea $LN68@stbi__crea: - 01085 8b 45 44 mov eax, DWORD PTR i$[rbp] - 01088 ff c8 dec eax - 0108a 89 45 44 mov DWORD PTR i$[rbp], eax - 0108d 48 63 85 44 01 + 01087 8b 45 44 mov eax, DWORD PTR i$[rbp] + 0108a ff c8 dec eax + 0108c 89 45 44 mov DWORD PTR i$[rbp], eax + 0108f 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 01094 48 8b 8d 88 01 + 01096 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 0109b c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 0109f 48 63 85 44 01 + 0109d c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 010a1 48 63 85 44 01 00 00 movsxd rax, DWORD PTR filter_bytes$[rbp] - 010a6 48 8b 8d 68 04 + 010a8 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 010ad 48 03 c8 add rcx, rax - 010b0 48 8b c1 mov rax, rcx - 010b3 48 89 85 68 04 + 010af 48 03 c8 add rcx, rax + 010b2 48 8b c1 mov rax, rcx + 010b5 48 89 85 68 04 00 00 mov QWORD PTR raw$[rbp], rax - 010ba 48 63 85 24 01 + 010bc 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 010c1 48 8b 8d 88 01 + 010c3 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 010c8 48 03 c8 add rcx, rax - 010cb 48 8b c1 mov rax, rcx - 010ce 48 89 85 88 01 + 010ca 48 03 c8 add rcx, rax + 010cd 48 8b c1 mov rax, rcx + 010d0 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax - 010d5 48 63 85 24 01 + 010d7 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 010dc 48 8b 8d a8 01 + 010de 48 8b 8d a8 01 00 00 mov rcx, QWORD PTR prior$2[rbp] - 010e3 48 03 c8 add rcx, rax - 010e6 48 8b c1 mov rax, rcx - 010e9 48 89 85 a8 01 + 010e5 48 03 c8 add rcx, rax + 010e8 48 8b c1 mov rax, rcx + 010eb 48 89 85 a8 01 00 00 mov QWORD PTR prior$2[rbp], rax $LN70@stbi__crea: - 010f0 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 - 010f4 0f 82 8f 00 00 + 010f2 83 7d 44 01 cmp DWORD PTR i$[rbp], 1 + 010f6 0f 82 8f 00 00 00 jb $LN69@stbi__crea - 010fa c7 85 e4 00 00 + 010fc c7 85 e4 00 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 01104 eb 0e jmp SHORT $LN73@stbi__crea + 01106 eb 0e jmp SHORT $LN73@stbi__crea $LN71@stbi__crea: - 01106 8b 85 e4 00 00 + 01108 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 0110c ff c0 inc eax - 0110e 89 85 e4 00 00 + 0110e ff c0 inc eax + 01110 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax $LN73@stbi__crea: - 01114 8b 85 44 01 00 + 01116 8b 85 44 01 00 00 mov eax, DWORD PTR filter_bytes$[rbp] - 0111a 39 85 e4 00 00 + 0111c 39 85 e4 00 00 00 cmp DWORD PTR k$[rbp], eax - 01120 7d 62 jge SHORT $LN72@stbi__crea - 01122 48 63 85 e4 00 + 01122 7d 62 jge SHORT $LN72@stbi__crea + 01124 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR k$[rbp] - 01129 48 8b 8d 68 04 + 0112b 48 8b 8d 68 04 00 00 mov rcx, QWORD PTR raw$[rbp] - 01130 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 01134 89 85 34 04 00 + 01132 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 01136 89 85 34 04 00 00 mov DWORD PTR tv618[rbp], eax - 0113a 8b 8d 24 01 00 + 0113c 8b 8d 24 01 00 00 mov ecx, DWORD PTR output_bytes$[rbp] - 01140 8b 95 e4 00 00 + 01142 8b 95 e4 00 00 00 mov edx, DWORD PTR k$[rbp] - 01146 2b d1 sub edx, ecx - 01148 8b ca mov ecx, edx - 0114a 48 63 c9 movsxd rcx, ecx - 0114d 48 8b 95 88 01 + 01148 2b d1 sub edx, ecx + 0114a 8b ca mov ecx, edx + 0114c 48 63 c9 movsxd rcx, ecx + 0114f 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 01154 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 01158 45 33 c0 xor r8d, r8d - 0115b 33 d2 xor edx, edx - 0115d e8 00 00 00 00 call stbi__paeth - 01162 8b 8d 34 04 00 + 01156 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 0115a 45 33 c0 xor r8d, r8d + 0115d 33 d2 xor edx, edx + 0115f e8 00 00 00 00 call stbi__paeth + 01164 8b 8d 34 04 00 00 mov ecx, DWORD PTR tv618[rbp] - 01168 03 c8 add ecx, eax - 0116a 8b c1 mov eax, ecx - 0116c 25 ff 00 00 00 and eax, 255 ; 000000ffH - 01171 48 63 8d e4 00 + 0116a 03 c8 add ecx, eax + 0116c 8b c1 mov eax, ecx + 0116e 25 ff 00 00 00 and eax, 255 ; 000000ffH + 01173 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR k$[rbp] - 01178 48 8b 95 88 01 + 0117a 48 8b 95 88 01 00 00 mov rdx, QWORD PTR cur$1[rbp] - 0117f 88 04 0a mov BYTE PTR [rdx+rcx], al - 01182 eb 82 jmp SHORT $LN71@stbi__crea + 01181 88 04 0a mov BYTE PTR [rdx+rcx], al + 01184 eb 82 jmp SHORT $LN71@stbi__crea $LN72@stbi__crea: - 01184 e9 fc fe ff ff jmp $LN68@stbi__crea + 01186 e9 fc fe ff ff jmp $LN68@stbi__crea $LN69@stbi__crea: $LN30@stbi__crea: @@ -18562,58 +18672,58 @@ $LN30@stbi__crea: ; 4270 : // 16 bit png files we also need the low byte set. we'll do that here. ; 4271 : if (depth == 16) { - 01189 83 bd 90 04 00 + 0118b 83 bd 90 04 00 00 10 cmp DWORD PTR depth$[rbp], 16 - 01190 75 6c jne SHORT $LN135@stbi__crea + 01192 75 6c jne SHORT $LN135@stbi__crea ; 4272 : cur = a->out + stride * j; // start at the beginning of the row again - 01192 8b 85 84 00 00 + 01194 8b 85 84 00 00 00 mov eax, DWORD PTR stride$[rbp] - 01198 0f af 45 64 imul eax, DWORD PTR j$[rbp] - 0119c 8b c0 mov eax, eax - 0119e 48 8b 8d 60 04 + 0119a 0f af 45 64 imul eax, DWORD PTR j$[rbp] + 0119e 8b c0 mov eax, eax + 011a0 48 8b 8d 60 04 00 00 mov rcx, QWORD PTR a$[rbp] - 011a5 48 03 41 18 add rax, QWORD PTR [rcx+24] - 011a9 48 89 85 88 01 + 011a7 48 03 41 18 add rax, QWORD PTR [rcx+24] + 011ab 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax ; 4273 : for (i = 0; i < x; ++i, cur += output_bytes) { - 011b0 c7 45 44 00 00 + 011b2 c7 45 44 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 011b7 eb 23 jmp SHORT $LN76@stbi__crea + 011b9 eb 23 jmp SHORT $LN76@stbi__crea $LN74@stbi__crea: - 011b9 8b 45 44 mov eax, DWORD PTR i$[rbp] - 011bc ff c0 inc eax - 011be 89 45 44 mov DWORD PTR i$[rbp], eax - 011c1 48 63 85 24 01 + 011bb 8b 45 44 mov eax, DWORD PTR i$[rbp] + 011be ff c0 inc eax + 011c0 89 45 44 mov DWORD PTR i$[rbp], eax + 011c3 48 63 85 24 01 00 00 movsxd rax, DWORD PTR output_bytes$[rbp] - 011c8 48 8b 8d 88 01 + 011ca 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 011cf 48 03 c8 add rcx, rax - 011d2 48 8b c1 mov rax, rcx - 011d5 48 89 85 88 01 + 011d1 48 03 c8 add rcx, rax + 011d4 48 8b c1 mov rax, rcx + 011d7 48 89 85 88 01 00 00 mov QWORD PTR cur$1[rbp], rax $LN76@stbi__crea: - 011dc 8b 85 80 04 00 + 011de 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 011e2 39 45 44 cmp DWORD PTR i$[rbp], eax - 011e5 73 17 jae SHORT $LN75@stbi__crea + 011e4 39 45 44 cmp DWORD PTR i$[rbp], eax + 011e7 73 17 jae SHORT $LN75@stbi__crea ; 4274 : cur[filter_bytes + 1] = 255; - 011e7 8b 85 44 01 00 + 011e9 8b 85 44 01 00 00 mov eax, DWORD PTR filter_bytes$[rbp] - 011ed ff c0 inc eax - 011ef 48 98 cdqe - 011f1 48 8b 8d 88 01 + 011ef ff c0 inc eax + 011f1 48 98 cdqe + 011f3 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR cur$1[rbp] - 011f8 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 011fa c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH ; 4275 : } - 011fc eb bb jmp SHORT $LN74@stbi__crea + 011fe eb bb jmp SHORT $LN74@stbi__crea $LN75@stbi__crea: $LN135@stbi__crea: $LN119@stbi__crea: @@ -18622,7 +18732,7 @@ $LN119@stbi__crea: ; 4277 : } ; 4278 : } - 011fe e9 c2 ef ff ff jmp $LN2@stbi__crea + 01200 e9 c1 ef ff ff jmp $LN2@stbi__crea $LN3@stbi__crea: ; 4279 : @@ -18631,84 +18741,84 @@ $LN3@stbi__crea: ; 4282 : // intefere with filtering but will still be in the cache. ; 4283 : if (depth < 8) { - 01203 83 bd 90 04 00 + 01205 83 bd 90 04 00 00 08 cmp DWORD PTR depth$[rbp], 8 - 0120a 0f 8d c0 08 00 + 0120c 0f 8d c0 08 00 00 jge $LN136@stbi__crea ; 4284 : for (j = 0; j < y; ++j) { - 01210 c7 45 64 00 00 + 01212 c7 45 64 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 01217 eb 08 jmp SHORT $LN79@stbi__crea + 01219 eb 08 jmp SHORT $LN79@stbi__crea $LN77@stbi__crea: - 01219 8b 45 64 mov eax, DWORD PTR j$[rbp] - 0121c ff c0 inc eax - 0121e 89 45 64 mov DWORD PTR j$[rbp], eax + 0121b 8b 45 64 mov eax, DWORD PTR j$[rbp] + 0121e ff c0 inc eax + 01220 89 45 64 mov DWORD PTR j$[rbp], eax $LN79@stbi__crea: - 01221 8b 85 88 04 00 + 01223 8b 85 88 04 00 00 mov eax, DWORD PTR y$[rbp] - 01227 39 45 64 cmp DWORD PTR j$[rbp], eax - 0122a 0f 83 9b 08 00 + 01229 39 45 64 cmp DWORD PTR j$[rbp], eax + 0122c 0f 83 9b 08 00 00 jae $LN78@stbi__crea ; 4285 : stbi_uc* cur = a->out + stride * j; - 01230 8b 85 84 00 00 + 01232 8b 85 84 00 00 00 mov eax, DWORD PTR stride$[rbp] - 01236 0f af 45 64 imul eax, DWORD PTR j$[rbp] - 0123a 8b c0 mov eax, eax - 0123c 48 8b 8d 60 04 + 01238 0f af 45 64 imul eax, DWORD PTR j$[rbp] + 0123c 8b c0 mov eax, eax + 0123e 48 8b 8d 60 04 00 00 mov rcx, QWORD PTR a$[rbp] - 01243 48 03 41 18 add rax, QWORD PTR [rcx+24] - 01247 48 89 85 08 02 + 01245 48 03 41 18 add rax, QWORD PTR [rcx+24] + 01249 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4286 : stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes; - 0124e 8b 85 84 00 00 + 01250 8b 85 84 00 00 00 mov eax, DWORD PTR stride$[rbp] - 01254 0f af 45 64 imul eax, DWORD PTR j$[rbp] - 01258 8b c0 mov eax, eax - 0125a 48 8b 8d 60 04 + 01256 0f af 45 64 imul eax, DWORD PTR j$[rbp] + 0125a 8b c0 mov eax, eax + 0125c 48 8b 8d 60 04 00 00 mov rcx, QWORD PTR a$[rbp] - 01261 48 8b 49 18 mov rcx, QWORD PTR [rcx+24] - 01265 48 03 c8 add rcx, rax - 01268 48 8b c1 mov rax, rcx - 0126b 8b 8d 80 04 00 + 01263 48 8b 49 18 mov rcx, QWORD PTR [rcx+24] + 01267 48 03 c8 add rcx, rax + 0126a 48 8b c1 mov rax, rcx + 0126d 8b 8d 80 04 00 00 mov ecx, DWORD PTR x$[rbp] - 01271 0f af 8d 78 04 + 01273 0f af 8d 78 04 00 00 imul ecx, DWORD PTR out_n$[rbp] - 01278 8b c9 mov ecx, ecx - 0127a 48 03 c1 add rax, rcx - 0127d 8b 8d c4 00 00 + 0127a 8b c9 mov ecx, ecx + 0127c 48 03 c1 add rax, rcx + 0127f 8b 8d c4 00 00 00 mov ecx, DWORD PTR img_width_bytes$[rbp] - 01283 48 2b c1 sub rax, rcx - 01286 48 89 85 28 02 + 01285 48 2b c1 sub rax, rcx + 01288 48 89 85 28 02 00 00 mov QWORD PTR in$6[rbp], rax ; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit ; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop ; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range - 0128d 83 bd 98 04 00 + 0128f 83 bd 98 04 00 00 00 cmp DWORD PTR color$[rbp], 0 - 01294 75 1a jne SHORT $LN163@stbi__crea - 01296 48 63 85 90 04 + 01296 75 1a jne SHORT $LN163@stbi__crea + 01298 48 63 85 90 04 00 00 movsxd rax, DWORD PTR depth$[rbp] - 0129d 48 8d 0d 00 00 + 0129f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__depth_scale_table - 012a4 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 012a8 89 85 34 04 00 + 012a6 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 012aa 89 85 34 04 00 00 mov DWORD PTR tv666[rbp], eax - 012ae eb 0a jmp SHORT $LN164@stbi__crea + 012b0 eb 0a jmp SHORT $LN164@stbi__crea $LN163@stbi__crea: - 012b0 c7 85 34 04 00 + 012b2 c7 85 34 04 00 00 01 00 00 00 mov DWORD PTR tv666[rbp], 1 $LN164@stbi__crea: - 012ba 0f b6 85 34 04 + 012bc 0f b6 85 34 04 00 00 movzx eax, BYTE PTR tv666[rbp] - 012c1 88 85 44 02 00 + 012c3 88 85 44 02 00 00 mov BYTE PTR scale$7[rbp], al ; 4290 : @@ -18720,634 +18830,634 @@ $LN164@stbi__crea: ; 4296 : ; 4297 : if (depth == 4) { - 012c7 83 bd 90 04 00 + 012c9 83 bd 90 04 00 00 04 cmp DWORD PTR depth$[rbp], 4 - 012ce 0f 85 e4 00 00 + 012d0 0f 85 e4 00 00 00 jne $LN138@stbi__crea ; 4298 : for (k = x * img_n; k >= 2; k -= 2, ++in) { - 012d4 8b 85 80 04 00 + 012d6 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 012da 0f af 85 04 01 + 012dc 0f af 85 04 01 00 00 imul eax, DWORD PTR img_n$[rbp] - 012e1 89 85 e4 00 00 + 012e3 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax - 012e7 eb 20 jmp SHORT $LN82@stbi__crea + 012e9 eb 20 jmp SHORT $LN82@stbi__crea $LN80@stbi__crea: - 012e9 8b 85 e4 00 00 + 012eb 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 012ef 83 e8 02 sub eax, 2 - 012f2 89 85 e4 00 00 + 012f1 83 e8 02 sub eax, 2 + 012f4 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax - 012f8 48 8b 85 28 02 + 012fa 48 8b 85 28 02 00 00 mov rax, QWORD PTR in$6[rbp] - 012ff 48 ff c0 inc rax - 01302 48 89 85 28 02 + 01301 48 ff c0 inc rax + 01304 48 89 85 28 02 00 00 mov QWORD PTR in$6[rbp], rax $LN82@stbi__crea: - 01309 83 bd e4 00 00 + 0130b 83 bd e4 00 00 00 02 cmp DWORD PTR k$[rbp], 2 - 01310 7c 67 jl SHORT $LN81@stbi__crea + 01312 7c 67 jl SHORT $LN81@stbi__crea ; 4299 : *cur++ = scale * ((*in >> 4)); - 01312 0f b6 85 44 02 + 01314 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 01319 48 8b 8d 28 02 + 0131b 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01320 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01323 c1 f9 04 sar ecx, 4 - 01326 0f af c1 imul eax, ecx - 01329 48 8b 8d 08 02 + 01322 0f b6 09 movzx ecx, BYTE PTR [rcx] + 01325 c1 f9 04 sar ecx, 4 + 01328 0f af c1 imul eax, ecx + 0132b 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01330 88 01 mov BYTE PTR [rcx], al - 01332 48 8b 85 08 02 + 01332 88 01 mov BYTE PTR [rcx], al + 01334 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 01339 48 ff c0 inc rax - 0133c 48 89 85 08 02 + 0133b 48 ff c0 inc rax + 0133e 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4300 : *cur++ = scale * ((*in) & 0x0f); - 01343 0f b6 85 44 02 + 01345 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 0134a 48 8b 8d 28 02 + 0134c 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01351 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01354 83 e1 0f and ecx, 15 - 01357 0f af c1 imul eax, ecx - 0135a 48 8b 8d 08 02 + 01353 0f b6 09 movzx ecx, BYTE PTR [rcx] + 01356 83 e1 0f and ecx, 15 + 01359 0f af c1 imul eax, ecx + 0135c 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01361 88 01 mov BYTE PTR [rcx], al - 01363 48 8b 85 08 02 + 01363 88 01 mov BYTE PTR [rcx], al + 01365 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 0136a 48 ff c0 inc rax - 0136d 48 89 85 08 02 + 0136c 48 ff c0 inc rax + 0136f 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4301 : } - 01374 e9 70 ff ff ff jmp $LN80@stbi__crea + 01376 e9 70 ff ff ff jmp $LN80@stbi__crea $LN81@stbi__crea: ; 4302 : if (k > 0) *cur++ = scale * ((*in >> 4)); - 01379 83 bd e4 00 00 + 0137b 83 bd e4 00 00 00 00 cmp DWORD PTR k$[rbp], 0 - 01380 7e 31 jle SHORT $LN140@stbi__crea - 01382 0f b6 85 44 02 + 01382 7e 31 jle SHORT $LN140@stbi__crea + 01384 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 01389 48 8b 8d 28 02 + 0138b 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01390 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01393 c1 f9 04 sar ecx, 4 - 01396 0f af c1 imul eax, ecx - 01399 48 8b 8d 08 02 + 01392 0f b6 09 movzx ecx, BYTE PTR [rcx] + 01395 c1 f9 04 sar ecx, 4 + 01398 0f af c1 imul eax, ecx + 0139b 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 013a0 88 01 mov BYTE PTR [rcx], al - 013a2 48 8b 85 08 02 + 013a2 88 01 mov BYTE PTR [rcx], al + 013a4 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 013a9 48 ff c0 inc rax - 013ac 48 89 85 08 02 + 013ab 48 ff c0 inc rax + 013ae 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax $LN140@stbi__crea: ; 4303 : } - 013b3 e9 6b 05 00 00 jmp $LN139@stbi__crea + 013b5 e9 6b 05 00 00 jmp $LN139@stbi__crea $LN138@stbi__crea: ; 4304 : else if (depth == 2) { - 013b8 83 bd 90 04 00 + 013ba 83 bd 90 04 00 00 02 cmp DWORD PTR depth$[rbp], 2 - 013bf 0f 85 ca 01 00 + 013c1 0f 85 ca 01 00 00 jne $LN141@stbi__crea ; 4305 : for (k = x * img_n; k >= 4; k -= 4, ++in) { - 013c5 8b 85 80 04 00 + 013c7 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 013cb 0f af 85 04 01 + 013cd 0f af 85 04 01 00 00 imul eax, DWORD PTR img_n$[rbp] - 013d2 89 85 e4 00 00 + 013d4 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax - 013d8 eb 20 jmp SHORT $LN85@stbi__crea + 013da eb 20 jmp SHORT $LN85@stbi__crea $LN83@stbi__crea: - 013da 8b 85 e4 00 00 + 013dc 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 013e0 83 e8 04 sub eax, 4 - 013e3 89 85 e4 00 00 + 013e2 83 e8 04 sub eax, 4 + 013e5 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax - 013e9 48 8b 85 28 02 + 013eb 48 8b 85 28 02 00 00 mov rax, QWORD PTR in$6[rbp] - 013f0 48 ff c0 inc rax - 013f3 48 89 85 28 02 + 013f2 48 ff c0 inc rax + 013f5 48 89 85 28 02 00 00 mov QWORD PTR in$6[rbp], rax $LN85@stbi__crea: - 013fa 83 bd e4 00 00 + 013fc 83 bd e4 00 00 00 04 cmp DWORD PTR k$[rbp], 4 - 01401 0f 8c cf 00 00 + 01403 0f 8c cf 00 00 00 jl $LN84@stbi__crea ; 4306 : *cur++ = scale * ((*in >> 6)); - 01407 0f b6 85 44 02 + 01409 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 0140e 48 8b 8d 28 02 + 01410 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01415 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01418 c1 f9 06 sar ecx, 6 - 0141b 0f af c1 imul eax, ecx - 0141e 48 8b 8d 08 02 + 01417 0f b6 09 movzx ecx, BYTE PTR [rcx] + 0141a c1 f9 06 sar ecx, 6 + 0141d 0f af c1 imul eax, ecx + 01420 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01425 88 01 mov BYTE PTR [rcx], al - 01427 48 8b 85 08 02 + 01427 88 01 mov BYTE PTR [rcx], al + 01429 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 0142e 48 ff c0 inc rax - 01431 48 89 85 08 02 + 01430 48 ff c0 inc rax + 01433 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4307 : *cur++ = scale * ((*in >> 4) & 0x03); - 01438 0f b6 85 44 02 + 0143a 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 0143f 48 8b 8d 28 02 + 01441 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01446 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01449 c1 f9 04 sar ecx, 4 - 0144c 83 e1 03 and ecx, 3 - 0144f 0f af c1 imul eax, ecx - 01452 48 8b 8d 08 02 + 01448 0f b6 09 movzx ecx, BYTE PTR [rcx] + 0144b c1 f9 04 sar ecx, 4 + 0144e 83 e1 03 and ecx, 3 + 01451 0f af c1 imul eax, ecx + 01454 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01459 88 01 mov BYTE PTR [rcx], al - 0145b 48 8b 85 08 02 + 0145b 88 01 mov BYTE PTR [rcx], al + 0145d 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 01462 48 ff c0 inc rax - 01465 48 89 85 08 02 + 01464 48 ff c0 inc rax + 01467 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4308 : *cur++ = scale * ((*in >> 2) & 0x03); - 0146c 0f b6 85 44 02 + 0146e 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 01473 48 8b 8d 28 02 + 01475 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 0147a 0f b6 09 movzx ecx, BYTE PTR [rcx] - 0147d c1 f9 02 sar ecx, 2 - 01480 83 e1 03 and ecx, 3 - 01483 0f af c1 imul eax, ecx - 01486 48 8b 8d 08 02 + 0147c 0f b6 09 movzx ecx, BYTE PTR [rcx] + 0147f c1 f9 02 sar ecx, 2 + 01482 83 e1 03 and ecx, 3 + 01485 0f af c1 imul eax, ecx + 01488 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 0148d 88 01 mov BYTE PTR [rcx], al - 0148f 48 8b 85 08 02 + 0148f 88 01 mov BYTE PTR [rcx], al + 01491 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 01496 48 ff c0 inc rax - 01499 48 89 85 08 02 + 01498 48 ff c0 inc rax + 0149b 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4309 : *cur++ = scale * ((*in) & 0x03); - 014a0 0f b6 85 44 02 + 014a2 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 014a7 48 8b 8d 28 02 + 014a9 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 014ae 0f b6 09 movzx ecx, BYTE PTR [rcx] - 014b1 83 e1 03 and ecx, 3 - 014b4 0f af c1 imul eax, ecx - 014b7 48 8b 8d 08 02 + 014b0 0f b6 09 movzx ecx, BYTE PTR [rcx] + 014b3 83 e1 03 and ecx, 3 + 014b6 0f af c1 imul eax, ecx + 014b9 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 014be 88 01 mov BYTE PTR [rcx], al - 014c0 48 8b 85 08 02 + 014c0 88 01 mov BYTE PTR [rcx], al + 014c2 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 014c7 48 ff c0 inc rax - 014ca 48 89 85 08 02 + 014c9 48 ff c0 inc rax + 014cc 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4310 : } - 014d1 e9 04 ff ff ff jmp $LN83@stbi__crea + 014d3 e9 04 ff ff ff jmp $LN83@stbi__crea $LN84@stbi__crea: ; 4311 : if (k > 0) *cur++ = scale * ((*in >> 6)); - 014d6 83 bd e4 00 00 + 014d8 83 bd e4 00 00 00 00 cmp DWORD PTR k$[rbp], 0 - 014dd 7e 31 jle SHORT $LN143@stbi__crea - 014df 0f b6 85 44 02 + 014df 7e 31 jle SHORT $LN143@stbi__crea + 014e1 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 014e6 48 8b 8d 28 02 + 014e8 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 014ed 0f b6 09 movzx ecx, BYTE PTR [rcx] - 014f0 c1 f9 06 sar ecx, 6 - 014f3 0f af c1 imul eax, ecx - 014f6 48 8b 8d 08 02 + 014ef 0f b6 09 movzx ecx, BYTE PTR [rcx] + 014f2 c1 f9 06 sar ecx, 6 + 014f5 0f af c1 imul eax, ecx + 014f8 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 014fd 88 01 mov BYTE PTR [rcx], al - 014ff 48 8b 85 08 02 + 014ff 88 01 mov BYTE PTR [rcx], al + 01501 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 01506 48 ff c0 inc rax - 01509 48 89 85 08 02 + 01508 48 ff c0 inc rax + 0150b 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax $LN143@stbi__crea: ; 4312 : if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); - 01510 83 bd e4 00 00 + 01512 83 bd e4 00 00 00 01 cmp DWORD PTR k$[rbp], 1 - 01517 7e 34 jle SHORT $LN144@stbi__crea - 01519 0f b6 85 44 02 + 01519 7e 34 jle SHORT $LN144@stbi__crea + 0151b 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 01520 48 8b 8d 28 02 + 01522 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01527 0f b6 09 movzx ecx, BYTE PTR [rcx] - 0152a c1 f9 04 sar ecx, 4 - 0152d 83 e1 03 and ecx, 3 - 01530 0f af c1 imul eax, ecx - 01533 48 8b 8d 08 02 + 01529 0f b6 09 movzx ecx, BYTE PTR [rcx] + 0152c c1 f9 04 sar ecx, 4 + 0152f 83 e1 03 and ecx, 3 + 01532 0f af c1 imul eax, ecx + 01535 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 0153a 88 01 mov BYTE PTR [rcx], al - 0153c 48 8b 85 08 02 + 0153c 88 01 mov BYTE PTR [rcx], al + 0153e 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 01543 48 ff c0 inc rax - 01546 48 89 85 08 02 + 01545 48 ff c0 inc rax + 01548 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax $LN144@stbi__crea: ; 4313 : if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); - 0154d 83 bd e4 00 00 + 0154f 83 bd e4 00 00 00 02 cmp DWORD PTR k$[rbp], 2 - 01554 7e 34 jle SHORT $LN145@stbi__crea - 01556 0f b6 85 44 02 + 01556 7e 34 jle SHORT $LN145@stbi__crea + 01558 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 0155d 48 8b 8d 28 02 + 0155f 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01564 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01567 c1 f9 02 sar ecx, 2 - 0156a 83 e1 03 and ecx, 3 - 0156d 0f af c1 imul eax, ecx - 01570 48 8b 8d 08 02 + 01566 0f b6 09 movzx ecx, BYTE PTR [rcx] + 01569 c1 f9 02 sar ecx, 2 + 0156c 83 e1 03 and ecx, 3 + 0156f 0f af c1 imul eax, ecx + 01572 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01577 88 01 mov BYTE PTR [rcx], al - 01579 48 8b 85 08 02 + 01579 88 01 mov BYTE PTR [rcx], al + 0157b 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 01580 48 ff c0 inc rax - 01583 48 89 85 08 02 + 01582 48 ff c0 inc rax + 01585 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax $LN145@stbi__crea: ; 4314 : } - 0158a e9 94 03 00 00 jmp $LN142@stbi__crea + 0158c e9 94 03 00 00 jmp $LN142@stbi__crea $LN141@stbi__crea: ; 4315 : else if (depth == 1) { - 0158f 83 bd 90 04 00 + 01591 83 bd 90 04 00 00 01 cmp DWORD PTR depth$[rbp], 1 - 01596 0f 85 87 03 00 + 01598 0f 85 87 03 00 00 jne $LN146@stbi__crea ; 4316 : for (k = x * img_n; k >= 8; k -= 8, ++in) { - 0159c 8b 85 80 04 00 + 0159e 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 015a2 0f af 85 04 01 + 015a4 0f af 85 04 01 00 00 imul eax, DWORD PTR img_n$[rbp] - 015a9 89 85 e4 00 00 + 015ab 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax - 015af eb 20 jmp SHORT $LN88@stbi__crea + 015b1 eb 20 jmp SHORT $LN88@stbi__crea $LN86@stbi__crea: - 015b1 8b 85 e4 00 00 + 015b3 8b 85 e4 00 00 00 mov eax, DWORD PTR k$[rbp] - 015b7 83 e8 08 sub eax, 8 - 015ba 89 85 e4 00 00 + 015b9 83 e8 08 sub eax, 8 + 015bc 89 85 e4 00 00 00 mov DWORD PTR k$[rbp], eax - 015c0 48 8b 85 28 02 + 015c2 48 8b 85 28 02 00 00 mov rax, QWORD PTR in$6[rbp] - 015c7 48 ff c0 inc rax - 015ca 48 89 85 28 02 + 015c9 48 ff c0 inc rax + 015cc 48 89 85 28 02 00 00 mov QWORD PTR in$6[rbp], rax $LN88@stbi__crea: - 015d1 83 bd e4 00 00 + 015d3 83 bd e4 00 00 00 08 cmp DWORD PTR k$[rbp], 8 - 015d8 0f 8c 9e 01 00 + 015da 0f 8c 9e 01 00 00 jl $LN87@stbi__crea ; 4317 : *cur++ = scale * ((*in >> 7)); - 015de 0f b6 85 44 02 + 015e0 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 015e5 48 8b 8d 28 02 + 015e7 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 015ec 0f b6 09 movzx ecx, BYTE PTR [rcx] - 015ef c1 f9 07 sar ecx, 7 - 015f2 0f af c1 imul eax, ecx - 015f5 48 8b 8d 08 02 + 015ee 0f b6 09 movzx ecx, BYTE PTR [rcx] + 015f1 c1 f9 07 sar ecx, 7 + 015f4 0f af c1 imul eax, ecx + 015f7 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 015fc 88 01 mov BYTE PTR [rcx], al - 015fe 48 8b 85 08 02 + 015fe 88 01 mov BYTE PTR [rcx], al + 01600 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 01605 48 ff c0 inc rax - 01608 48 89 85 08 02 + 01607 48 ff c0 inc rax + 0160a 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4318 : *cur++ = scale * ((*in >> 6) & 0x01); - 0160f 0f b6 85 44 02 + 01611 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 01616 48 8b 8d 28 02 + 01618 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 0161d 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01620 c1 f9 06 sar ecx, 6 - 01623 83 e1 01 and ecx, 1 - 01626 0f af c1 imul eax, ecx - 01629 48 8b 8d 08 02 + 0161f 0f b6 09 movzx ecx, BYTE PTR [rcx] + 01622 c1 f9 06 sar ecx, 6 + 01625 83 e1 01 and ecx, 1 + 01628 0f af c1 imul eax, ecx + 0162b 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01630 88 01 mov BYTE PTR [rcx], al - 01632 48 8b 85 08 02 + 01632 88 01 mov BYTE PTR [rcx], al + 01634 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 01639 48 ff c0 inc rax - 0163c 48 89 85 08 02 + 0163b 48 ff c0 inc rax + 0163e 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4319 : *cur++ = scale * ((*in >> 5) & 0x01); - 01643 0f b6 85 44 02 + 01645 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 0164a 48 8b 8d 28 02 + 0164c 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01651 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01654 c1 f9 05 sar ecx, 5 - 01657 83 e1 01 and ecx, 1 - 0165a 0f af c1 imul eax, ecx - 0165d 48 8b 8d 08 02 + 01653 0f b6 09 movzx ecx, BYTE PTR [rcx] + 01656 c1 f9 05 sar ecx, 5 + 01659 83 e1 01 and ecx, 1 + 0165c 0f af c1 imul eax, ecx + 0165f 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01664 88 01 mov BYTE PTR [rcx], al - 01666 48 8b 85 08 02 + 01666 88 01 mov BYTE PTR [rcx], al + 01668 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 0166d 48 ff c0 inc rax - 01670 48 89 85 08 02 + 0166f 48 ff c0 inc rax + 01672 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4320 : *cur++ = scale * ((*in >> 4) & 0x01); - 01677 0f b6 85 44 02 + 01679 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 0167e 48 8b 8d 28 02 + 01680 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01685 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01688 c1 f9 04 sar ecx, 4 - 0168b 83 e1 01 and ecx, 1 - 0168e 0f af c1 imul eax, ecx - 01691 48 8b 8d 08 02 + 01687 0f b6 09 movzx ecx, BYTE PTR [rcx] + 0168a c1 f9 04 sar ecx, 4 + 0168d 83 e1 01 and ecx, 1 + 01690 0f af c1 imul eax, ecx + 01693 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01698 88 01 mov BYTE PTR [rcx], al - 0169a 48 8b 85 08 02 + 0169a 88 01 mov BYTE PTR [rcx], al + 0169c 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 016a1 48 ff c0 inc rax - 016a4 48 89 85 08 02 + 016a3 48 ff c0 inc rax + 016a6 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4321 : *cur++ = scale * ((*in >> 3) & 0x01); - 016ab 0f b6 85 44 02 + 016ad 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 016b2 48 8b 8d 28 02 + 016b4 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 016b9 0f b6 09 movzx ecx, BYTE PTR [rcx] - 016bc c1 f9 03 sar ecx, 3 - 016bf 83 e1 01 and ecx, 1 - 016c2 0f af c1 imul eax, ecx - 016c5 48 8b 8d 08 02 + 016bb 0f b6 09 movzx ecx, BYTE PTR [rcx] + 016be c1 f9 03 sar ecx, 3 + 016c1 83 e1 01 and ecx, 1 + 016c4 0f af c1 imul eax, ecx + 016c7 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 016cc 88 01 mov BYTE PTR [rcx], al - 016ce 48 8b 85 08 02 + 016ce 88 01 mov BYTE PTR [rcx], al + 016d0 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 016d5 48 ff c0 inc rax - 016d8 48 89 85 08 02 + 016d7 48 ff c0 inc rax + 016da 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4322 : *cur++ = scale * ((*in >> 2) & 0x01); - 016df 0f b6 85 44 02 + 016e1 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 016e6 48 8b 8d 28 02 + 016e8 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 016ed 0f b6 09 movzx ecx, BYTE PTR [rcx] - 016f0 c1 f9 02 sar ecx, 2 - 016f3 83 e1 01 and ecx, 1 - 016f6 0f af c1 imul eax, ecx - 016f9 48 8b 8d 08 02 + 016ef 0f b6 09 movzx ecx, BYTE PTR [rcx] + 016f2 c1 f9 02 sar ecx, 2 + 016f5 83 e1 01 and ecx, 1 + 016f8 0f af c1 imul eax, ecx + 016fb 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01700 88 01 mov BYTE PTR [rcx], al - 01702 48 8b 85 08 02 + 01702 88 01 mov BYTE PTR [rcx], al + 01704 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 01709 48 ff c0 inc rax - 0170c 48 89 85 08 02 + 0170b 48 ff c0 inc rax + 0170e 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4323 : *cur++ = scale * ((*in >> 1) & 0x01); - 01713 0f b6 85 44 02 + 01715 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 0171a 48 8b 8d 28 02 + 0171c 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01721 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01724 d1 f9 sar ecx, 1 - 01726 83 e1 01 and ecx, 1 - 01729 0f af c1 imul eax, ecx - 0172c 48 8b 8d 08 02 + 01723 0f b6 09 movzx ecx, BYTE PTR [rcx] + 01726 d1 f9 sar ecx, 1 + 01728 83 e1 01 and ecx, 1 + 0172b 0f af c1 imul eax, ecx + 0172e 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01733 88 01 mov BYTE PTR [rcx], al - 01735 48 8b 85 08 02 + 01735 88 01 mov BYTE PTR [rcx], al + 01737 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 0173c 48 ff c0 inc rax - 0173f 48 89 85 08 02 + 0173e 48 ff c0 inc rax + 01741 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4324 : *cur++ = scale * ((*in) & 0x01); - 01746 0f b6 85 44 02 + 01748 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 0174d 48 8b 8d 28 02 + 0174f 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01754 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01757 83 e1 01 and ecx, 1 - 0175a 0f af c1 imul eax, ecx - 0175d 48 8b 8d 08 02 + 01756 0f b6 09 movzx ecx, BYTE PTR [rcx] + 01759 83 e1 01 and ecx, 1 + 0175c 0f af c1 imul eax, ecx + 0175f 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01764 88 01 mov BYTE PTR [rcx], al - 01766 48 8b 85 08 02 + 01766 88 01 mov BYTE PTR [rcx], al + 01768 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 0176d 48 ff c0 inc rax - 01770 48 89 85 08 02 + 0176f 48 ff c0 inc rax + 01772 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4325 : } - 01777 e9 35 fe ff ff jmp $LN86@stbi__crea + 01779 e9 35 fe ff ff jmp $LN86@stbi__crea $LN87@stbi__crea: ; 4326 : if (k > 0) *cur++ = scale * ((*in >> 7)); - 0177c 83 bd e4 00 00 + 0177e 83 bd e4 00 00 00 00 cmp DWORD PTR k$[rbp], 0 - 01783 7e 31 jle SHORT $LN147@stbi__crea - 01785 0f b6 85 44 02 + 01785 7e 31 jle SHORT $LN147@stbi__crea + 01787 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 0178c 48 8b 8d 28 02 + 0178e 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01793 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01796 c1 f9 07 sar ecx, 7 - 01799 0f af c1 imul eax, ecx - 0179c 48 8b 8d 08 02 + 01795 0f b6 09 movzx ecx, BYTE PTR [rcx] + 01798 c1 f9 07 sar ecx, 7 + 0179b 0f af c1 imul eax, ecx + 0179e 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 017a3 88 01 mov BYTE PTR [rcx], al - 017a5 48 8b 85 08 02 + 017a5 88 01 mov BYTE PTR [rcx], al + 017a7 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 017ac 48 ff c0 inc rax - 017af 48 89 85 08 02 + 017ae 48 ff c0 inc rax + 017b1 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax $LN147@stbi__crea: ; 4327 : if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); - 017b6 83 bd e4 00 00 + 017b8 83 bd e4 00 00 00 01 cmp DWORD PTR k$[rbp], 1 - 017bd 7e 34 jle SHORT $LN148@stbi__crea - 017bf 0f b6 85 44 02 + 017bf 7e 34 jle SHORT $LN148@stbi__crea + 017c1 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 017c6 48 8b 8d 28 02 + 017c8 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 017cd 0f b6 09 movzx ecx, BYTE PTR [rcx] - 017d0 c1 f9 06 sar ecx, 6 - 017d3 83 e1 01 and ecx, 1 - 017d6 0f af c1 imul eax, ecx - 017d9 48 8b 8d 08 02 + 017cf 0f b6 09 movzx ecx, BYTE PTR [rcx] + 017d2 c1 f9 06 sar ecx, 6 + 017d5 83 e1 01 and ecx, 1 + 017d8 0f af c1 imul eax, ecx + 017db 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 017e0 88 01 mov BYTE PTR [rcx], al - 017e2 48 8b 85 08 02 + 017e2 88 01 mov BYTE PTR [rcx], al + 017e4 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 017e9 48 ff c0 inc rax - 017ec 48 89 85 08 02 + 017eb 48 ff c0 inc rax + 017ee 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax $LN148@stbi__crea: ; 4328 : if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); - 017f3 83 bd e4 00 00 + 017f5 83 bd e4 00 00 00 02 cmp DWORD PTR k$[rbp], 2 - 017fa 7e 34 jle SHORT $LN149@stbi__crea - 017fc 0f b6 85 44 02 + 017fc 7e 34 jle SHORT $LN149@stbi__crea + 017fe 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 01803 48 8b 8d 28 02 + 01805 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 0180a 0f b6 09 movzx ecx, BYTE PTR [rcx] - 0180d c1 f9 05 sar ecx, 5 - 01810 83 e1 01 and ecx, 1 - 01813 0f af c1 imul eax, ecx - 01816 48 8b 8d 08 02 + 0180c 0f b6 09 movzx ecx, BYTE PTR [rcx] + 0180f c1 f9 05 sar ecx, 5 + 01812 83 e1 01 and ecx, 1 + 01815 0f af c1 imul eax, ecx + 01818 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 0181d 88 01 mov BYTE PTR [rcx], al - 0181f 48 8b 85 08 02 + 0181f 88 01 mov BYTE PTR [rcx], al + 01821 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 01826 48 ff c0 inc rax - 01829 48 89 85 08 02 + 01828 48 ff c0 inc rax + 0182b 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax $LN149@stbi__crea: ; 4329 : if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); - 01830 83 bd e4 00 00 + 01832 83 bd e4 00 00 00 03 cmp DWORD PTR k$[rbp], 3 - 01837 7e 34 jle SHORT $LN150@stbi__crea - 01839 0f b6 85 44 02 + 01839 7e 34 jle SHORT $LN150@stbi__crea + 0183b 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 01840 48 8b 8d 28 02 + 01842 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01847 0f b6 09 movzx ecx, BYTE PTR [rcx] - 0184a c1 f9 04 sar ecx, 4 - 0184d 83 e1 01 and ecx, 1 - 01850 0f af c1 imul eax, ecx - 01853 48 8b 8d 08 02 + 01849 0f b6 09 movzx ecx, BYTE PTR [rcx] + 0184c c1 f9 04 sar ecx, 4 + 0184f 83 e1 01 and ecx, 1 + 01852 0f af c1 imul eax, ecx + 01855 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 0185a 88 01 mov BYTE PTR [rcx], al - 0185c 48 8b 85 08 02 + 0185c 88 01 mov BYTE PTR [rcx], al + 0185e 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 01863 48 ff c0 inc rax - 01866 48 89 85 08 02 + 01865 48 ff c0 inc rax + 01868 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax $LN150@stbi__crea: ; 4330 : if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); - 0186d 83 bd e4 00 00 + 0186f 83 bd e4 00 00 00 04 cmp DWORD PTR k$[rbp], 4 - 01874 7e 34 jle SHORT $LN151@stbi__crea - 01876 0f b6 85 44 02 + 01876 7e 34 jle SHORT $LN151@stbi__crea + 01878 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 0187d 48 8b 8d 28 02 + 0187f 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 01884 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01887 c1 f9 03 sar ecx, 3 - 0188a 83 e1 01 and ecx, 1 - 0188d 0f af c1 imul eax, ecx - 01890 48 8b 8d 08 02 + 01886 0f b6 09 movzx ecx, BYTE PTR [rcx] + 01889 c1 f9 03 sar ecx, 3 + 0188c 83 e1 01 and ecx, 1 + 0188f 0f af c1 imul eax, ecx + 01892 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01897 88 01 mov BYTE PTR [rcx], al - 01899 48 8b 85 08 02 + 01899 88 01 mov BYTE PTR [rcx], al + 0189b 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 018a0 48 ff c0 inc rax - 018a3 48 89 85 08 02 + 018a2 48 ff c0 inc rax + 018a5 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax $LN151@stbi__crea: ; 4331 : if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); - 018aa 83 bd e4 00 00 + 018ac 83 bd e4 00 00 00 05 cmp DWORD PTR k$[rbp], 5 - 018b1 7e 34 jle SHORT $LN152@stbi__crea - 018b3 0f b6 85 44 02 + 018b3 7e 34 jle SHORT $LN152@stbi__crea + 018b5 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 018ba 48 8b 8d 28 02 + 018bc 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 018c1 0f b6 09 movzx ecx, BYTE PTR [rcx] - 018c4 c1 f9 02 sar ecx, 2 - 018c7 83 e1 01 and ecx, 1 - 018ca 0f af c1 imul eax, ecx - 018cd 48 8b 8d 08 02 + 018c3 0f b6 09 movzx ecx, BYTE PTR [rcx] + 018c6 c1 f9 02 sar ecx, 2 + 018c9 83 e1 01 and ecx, 1 + 018cc 0f af c1 imul eax, ecx + 018cf 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 018d4 88 01 mov BYTE PTR [rcx], al - 018d6 48 8b 85 08 02 + 018d6 88 01 mov BYTE PTR [rcx], al + 018d8 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 018dd 48 ff c0 inc rax - 018e0 48 89 85 08 02 + 018df 48 ff c0 inc rax + 018e2 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax $LN152@stbi__crea: ; 4332 : if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); - 018e7 83 bd e4 00 00 + 018e9 83 bd e4 00 00 00 06 cmp DWORD PTR k$[rbp], 6 - 018ee 7e 33 jle SHORT $LN153@stbi__crea - 018f0 0f b6 85 44 02 + 018f0 7e 33 jle SHORT $LN153@stbi__crea + 018f2 0f b6 85 44 02 00 00 movzx eax, BYTE PTR scale$7[rbp] - 018f7 48 8b 8d 28 02 + 018f9 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR in$6[rbp] - 018fe 0f b6 09 movzx ecx, BYTE PTR [rcx] - 01901 d1 f9 sar ecx, 1 - 01903 83 e1 01 and ecx, 1 - 01906 0f af c1 imul eax, ecx - 01909 48 8b 8d 08 02 + 01900 0f b6 09 movzx ecx, BYTE PTR [rcx] + 01903 d1 f9 sar ecx, 1 + 01905 83 e1 01 and ecx, 1 + 01908 0f af c1 imul eax, ecx + 0190b 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01910 88 01 mov BYTE PTR [rcx], al - 01912 48 8b 85 08 02 + 01912 88 01 mov BYTE PTR [rcx], al + 01914 48 8b 85 08 02 00 00 mov rax, QWORD PTR cur$5[rbp] - 01919 48 ff c0 inc rax - 0191c 48 89 85 08 02 + 0191b 48 ff c0 inc rax + 0191e 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax $LN153@stbi__crea: $LN146@stbi__crea: @@ -19357,190 +19467,190 @@ $LN139@stbi__crea: ; 4333 : } ; 4334 : if (img_n != out_n) { - 01923 8b 85 78 04 00 + 01925 8b 85 78 04 00 00 mov eax, DWORD PTR out_n$[rbp] - 01929 39 85 04 01 00 + 0192b 39 85 04 01 00 00 cmp DWORD PTR img_n$[rbp], eax - 0192f 0f 84 91 01 00 + 01931 0f 84 91 01 00 00 je $LN154@stbi__crea ; 4335 : int q; ; 4336 : // insert alpha = 255 ; 4337 : cur = a->out + stride * j; - 01935 8b 85 84 00 00 + 01937 8b 85 84 00 00 00 mov eax, DWORD PTR stride$[rbp] - 0193b 0f af 45 64 imul eax, DWORD PTR j$[rbp] - 0193f 8b c0 mov eax, eax - 01941 48 8b 8d 60 04 + 0193d 0f af 45 64 imul eax, DWORD PTR j$[rbp] + 01941 8b c0 mov eax, eax + 01943 48 8b 8d 60 04 00 00 mov rcx, QWORD PTR a$[rbp] - 01948 48 03 41 18 add rax, QWORD PTR [rcx+24] - 0194c 48 89 85 08 02 + 0194a 48 03 41 18 add rax, QWORD PTR [rcx+24] + 0194e 48 89 85 08 02 00 00 mov QWORD PTR cur$5[rbp], rax ; 4338 : if (img_n == 1) { - 01953 83 bd 04 01 00 + 01955 83 bd 04 01 00 00 01 cmp DWORD PTR img_n$[rbp], 1 - 0195a 75 6d jne SHORT $LN155@stbi__crea + 0195c 75 6d jne SHORT $LN155@stbi__crea ; 4339 : for (q = x - 1; q >= 0; --q) { - 0195c 8b 85 80 04 00 + 0195e 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 01962 ff c8 dec eax - 01964 89 85 64 02 00 + 01964 ff c8 dec eax + 01966 89 85 64 02 00 00 mov DWORD PTR q$8[rbp], eax - 0196a eb 0e jmp SHORT $LN91@stbi__crea + 0196c eb 0e jmp SHORT $LN91@stbi__crea $LN89@stbi__crea: - 0196c 8b 85 64 02 00 + 0196e 8b 85 64 02 00 00 mov eax, DWORD PTR q$8[rbp] - 01972 ff c8 dec eax - 01974 89 85 64 02 00 + 01974 ff c8 dec eax + 01976 89 85 64 02 00 00 mov DWORD PTR q$8[rbp], eax $LN91@stbi__crea: - 0197a 83 bd 64 02 00 + 0197c 83 bd 64 02 00 00 00 cmp DWORD PTR q$8[rbp], 0 - 01981 7c 41 jl SHORT $LN90@stbi__crea + 01983 7c 41 jl SHORT $LN90@stbi__crea ; 4340 : cur[q * 2 + 1] = 255; - 01983 8b 85 64 02 00 + 01985 8b 85 64 02 00 00 mov eax, DWORD PTR q$8[rbp] - 01989 8d 44 00 01 lea eax, DWORD PTR [rax+rax+1] - 0198d 48 98 cdqe - 0198f 48 8b 8d 08 02 + 0198b 8d 44 00 01 lea eax, DWORD PTR [rax+rax+1] + 0198f 48 98 cdqe + 01991 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01996 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 01998 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH ; 4341 : cur[q * 2 + 0] = cur[q]; - 0199a 48 63 85 64 02 + 0199c 48 63 85 64 02 00 00 movsxd rax, DWORD PTR q$8[rbp] - 019a1 8b 8d 64 02 00 + 019a3 8b 8d 64 02 00 00 mov ecx, DWORD PTR q$8[rbp] - 019a7 03 c9 add ecx, ecx - 019a9 48 63 c9 movsxd rcx, ecx - 019ac 48 8b 95 08 02 + 019a9 03 c9 add ecx, ecx + 019ab 48 63 c9 movsxd rcx, ecx + 019ae 48 8b 95 08 02 00 00 mov rdx, QWORD PTR cur$5[rbp] - 019b3 4c 8b 85 08 02 + 019b5 4c 8b 85 08 02 00 00 mov r8, QWORD PTR cur$5[rbp] - 019ba 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 019bf 88 04 0a mov BYTE PTR [rdx+rcx], al + 019bc 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 019c1 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4342 : } - 019c2 eb a8 jmp SHORT $LN89@stbi__crea + 019c4 eb a8 jmp SHORT $LN89@stbi__crea $LN90@stbi__crea: ; 4343 : } - 019c4 e9 fd 00 00 00 jmp $LN156@stbi__crea + 019c6 e9 fd 00 00 00 jmp $LN156@stbi__crea $LN155@stbi__crea: ; 4344 : else { ; 4345 : STBI_ASSERT(img_n == 3); - 019c9 83 bd 04 01 00 + 019cb 83 bd 04 01 00 00 03 cmp DWORD PTR img_n$[rbp], 3 - 019d0 74 1c je SHORT $LN165@stbi__crea - 019d2 41 b8 f9 10 00 + 019d2 74 1c je SHORT $LN165@stbi__crea + 019d4 41 b8 f9 10 00 00 mov r8d, 4345 ; 000010f9H - 019d8 48 8d 15 00 00 + 019da 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 019df 48 8d 0d 00 00 + 019e1 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1BG@FLOPDKAN@?$AAi?$AAm?$AAg?$AA_?$AAn?$AA?5?$AA?$DN?$AA?$DN?$AA?5?$AA3@ - 019e6 ff 15 00 00 00 + 019e8 ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 019ec 33 c0 xor eax, eax + 019ee 33 c0 xor eax, eax $LN165@stbi__crea: ; 4346 : for (q = x - 1; q >= 0; --q) { - 019ee 8b 85 80 04 00 + 019f0 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 019f4 ff c8 dec eax - 019f6 89 85 64 02 00 + 019f6 ff c8 dec eax + 019f8 89 85 64 02 00 00 mov DWORD PTR q$8[rbp], eax - 019fc eb 0e jmp SHORT $LN94@stbi__crea + 019fe eb 0e jmp SHORT $LN94@stbi__crea $LN92@stbi__crea: - 019fe 8b 85 64 02 00 + 01a00 8b 85 64 02 00 00 mov eax, DWORD PTR q$8[rbp] - 01a04 ff c8 dec eax - 01a06 89 85 64 02 00 + 01a06 ff c8 dec eax + 01a08 89 85 64 02 00 00 mov DWORD PTR q$8[rbp], eax $LN94@stbi__crea: - 01a0c 83 bd 64 02 00 + 01a0e 83 bd 64 02 00 00 00 cmp DWORD PTR q$8[rbp], 0 - 01a13 0f 8c ad 00 00 + 01a15 0f 8c ad 00 00 00 jl $LN93@stbi__crea ; 4347 : cur[q * 4 + 3] = 255; - 01a19 8b 85 64 02 00 + 01a1b 8b 85 64 02 00 00 mov eax, DWORD PTR q$8[rbp] - 01a1f 8d 04 85 03 00 + 01a21 8d 04 85 03 00 00 00 lea eax, DWORD PTR [rax*4+3] - 01a26 48 98 cdqe - 01a28 48 8b 8d 08 02 + 01a28 48 98 cdqe + 01a2a 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR cur$5[rbp] - 01a2f c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 01a31 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH ; 4348 : cur[q * 4 + 2] = cur[q * 3 + 2]; - 01a33 6b 85 64 02 00 + 01a35 6b 85 64 02 00 00 03 imul eax, DWORD PTR q$8[rbp], 3 - 01a3a 83 c0 02 add eax, 2 - 01a3d 48 98 cdqe - 01a3f 8b 8d 64 02 00 + 01a3c 83 c0 02 add eax, 2 + 01a3f 48 98 cdqe + 01a41 8b 8d 64 02 00 00 mov ecx, DWORD PTR q$8[rbp] - 01a45 8d 0c 8d 02 00 + 01a47 8d 0c 8d 02 00 00 00 lea ecx, DWORD PTR [rcx*4+2] - 01a4c 48 63 c9 movsxd rcx, ecx - 01a4f 48 8b 95 08 02 + 01a4e 48 63 c9 movsxd rcx, ecx + 01a51 48 8b 95 08 02 00 00 mov rdx, QWORD PTR cur$5[rbp] - 01a56 4c 8b 85 08 02 + 01a58 4c 8b 85 08 02 00 00 mov r8, QWORD PTR cur$5[rbp] - 01a5d 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 01a62 88 04 0a mov BYTE PTR [rdx+rcx], al + 01a5f 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 01a64 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4349 : cur[q * 4 + 1] = cur[q * 3 + 1]; - 01a65 6b 85 64 02 00 + 01a67 6b 85 64 02 00 00 03 imul eax, DWORD PTR q$8[rbp], 3 - 01a6c ff c0 inc eax - 01a6e 48 98 cdqe - 01a70 8b 8d 64 02 00 + 01a6e ff c0 inc eax + 01a70 48 98 cdqe + 01a72 8b 8d 64 02 00 00 mov ecx, DWORD PTR q$8[rbp] - 01a76 8d 0c 8d 01 00 + 01a78 8d 0c 8d 01 00 00 00 lea ecx, DWORD PTR [rcx*4+1] - 01a7d 48 63 c9 movsxd rcx, ecx - 01a80 48 8b 95 08 02 + 01a7f 48 63 c9 movsxd rcx, ecx + 01a82 48 8b 95 08 02 00 00 mov rdx, QWORD PTR cur$5[rbp] - 01a87 4c 8b 85 08 02 + 01a89 4c 8b 85 08 02 00 00 mov r8, QWORD PTR cur$5[rbp] - 01a8e 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 01a93 88 04 0a mov BYTE PTR [rdx+rcx], al + 01a90 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 01a95 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4350 : cur[q * 4 + 0] = cur[q * 3 + 0]; - 01a96 6b 85 64 02 00 + 01a98 6b 85 64 02 00 00 03 imul eax, DWORD PTR q$8[rbp], 3 - 01a9d 48 98 cdqe - 01a9f 8b 8d 64 02 00 + 01a9f 48 98 cdqe + 01aa1 8b 8d 64 02 00 00 mov ecx, DWORD PTR q$8[rbp] - 01aa5 c1 e1 02 shl ecx, 2 - 01aa8 48 63 c9 movsxd rcx, ecx - 01aab 48 8b 95 08 02 + 01aa7 c1 e1 02 shl ecx, 2 + 01aaa 48 63 c9 movsxd rcx, ecx + 01aad 48 8b 95 08 02 00 00 mov rdx, QWORD PTR cur$5[rbp] - 01ab2 4c 8b 85 08 02 + 01ab4 4c 8b 85 08 02 00 00 mov r8, QWORD PTR cur$5[rbp] - 01ab9 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 01abe 88 04 0a mov BYTE PTR [rdx+rcx], al + 01abb 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 01ac0 88 04 0a mov BYTE PTR [rdx+rcx], al ; 4351 : } - 01ac1 e9 38 ff ff ff jmp $LN92@stbi__crea + 01ac3 e9 38 ff ff ff jmp $LN92@stbi__crea $LN93@stbi__crea: $LN156@stbi__crea: $LN154@stbi__crea: @@ -19549,19 +19659,19 @@ $LN154@stbi__crea: ; 4353 : } ; 4354 : } - 01ac6 e9 4e f7 ff ff jmp $LN77@stbi__crea + 01ac8 e9 4e f7 ff ff jmp $LN77@stbi__crea $LN78@stbi__crea: ; 4355 : } - 01acb e9 b4 00 00 00 jmp $LN137@stbi__crea + 01acd e9 b4 00 00 00 jmp $LN137@stbi__crea $LN136@stbi__crea: ; 4356 : else if (depth == 16) { - 01ad0 83 bd 90 04 00 + 01ad2 83 bd 90 04 00 00 10 cmp DWORD PTR depth$[rbp], 16 - 01ad7 0f 85 a7 00 00 + 01ad9 0f 85 a7 00 00 00 jne $LN157@stbi__crea ; 4357 : // force the image data from big-endian to platform-native. @@ -19570,70 +19680,70 @@ $LN136@stbi__crea: ; 4360 : // per-line during decode if care is taken. ; 4361 : stbi_uc* cur = a->out; - 01add 48 8b 85 60 04 + 01adf 48 8b 85 60 04 00 00 mov rax, QWORD PTR a$[rbp] - 01ae4 48 8b 40 18 mov rax, QWORD PTR [rax+24] - 01ae8 48 89 85 88 02 + 01ae6 48 8b 40 18 mov rax, QWORD PTR [rax+24] + 01aea 48 89 85 88 02 00 00 mov QWORD PTR cur$9[rbp], rax ; 4362 : stbi__uint16* cur16 = (stbi__uint16*)cur; - 01aef 48 8b 85 88 02 + 01af1 48 8b 85 88 02 00 00 mov rax, QWORD PTR cur$9[rbp] - 01af6 48 89 85 a8 02 + 01af8 48 89 85 a8 02 00 00 mov QWORD PTR cur16$10[rbp], rax ; 4363 : ; 4364 : for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) { - 01afd c7 45 44 00 00 + 01aff c7 45 44 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 01b04 eb 2c jmp SHORT $LN97@stbi__crea + 01b06 eb 2c jmp SHORT $LN97@stbi__crea $LN95@stbi__crea: - 01b06 8b 45 44 mov eax, DWORD PTR i$[rbp] - 01b09 ff c0 inc eax - 01b0b 89 45 44 mov DWORD PTR i$[rbp], eax - 01b0e 48 8b 85 a8 02 + 01b08 8b 45 44 mov eax, DWORD PTR i$[rbp] + 01b0b ff c0 inc eax + 01b0d 89 45 44 mov DWORD PTR i$[rbp], eax + 01b10 48 8b 85 a8 02 00 00 mov rax, QWORD PTR cur16$10[rbp] - 01b15 48 83 c0 02 add rax, 2 - 01b19 48 89 85 a8 02 + 01b17 48 83 c0 02 add rax, 2 + 01b1b 48 89 85 a8 02 00 00 mov QWORD PTR cur16$10[rbp], rax - 01b20 48 8b 85 88 02 + 01b22 48 8b 85 88 02 00 00 mov rax, QWORD PTR cur$9[rbp] - 01b27 48 83 c0 02 add rax, 2 - 01b2b 48 89 85 88 02 + 01b29 48 83 c0 02 add rax, 2 + 01b2d 48 89 85 88 02 00 00 mov QWORD PTR cur$9[rbp], rax $LN97@stbi__crea: - 01b32 8b 85 80 04 00 + 01b34 8b 85 80 04 00 00 mov eax, DWORD PTR x$[rbp] - 01b38 0f af 85 88 04 + 01b3a 0f af 85 88 04 00 00 imul eax, DWORD PTR y$[rbp] - 01b3f 0f af 85 78 04 + 01b41 0f af 85 78 04 00 00 imul eax, DWORD PTR out_n$[rbp] - 01b46 39 45 44 cmp DWORD PTR i$[rbp], eax - 01b49 73 39 jae SHORT $LN96@stbi__crea + 01b48 39 45 44 cmp DWORD PTR i$[rbp], eax + 01b4b 73 39 jae SHORT $LN96@stbi__crea ; 4365 : *cur16 = (cur[0] << 8) | cur[1]; - 01b4b b8 01 00 00 00 mov eax, 1 - 01b50 48 6b c0 00 imul rax, rax, 0 - 01b54 48 8b 8d 88 02 + 01b4d b8 01 00 00 00 mov eax, 1 + 01b52 48 6b c0 00 imul rax, rax, 0 + 01b56 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR cur$9[rbp] - 01b5b 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 01b5f c1 e0 08 shl eax, 8 - 01b62 b9 01 00 00 00 mov ecx, 1 - 01b67 48 6b c9 01 imul rcx, rcx, 1 - 01b6b 48 8b 95 88 02 + 01b5d 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 01b61 c1 e0 08 shl eax, 8 + 01b64 b9 01 00 00 00 mov ecx, 1 + 01b69 48 6b c9 01 imul rcx, rcx, 1 + 01b6d 48 8b 95 88 02 00 00 mov rdx, QWORD PTR cur$9[rbp] - 01b72 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 01b76 0b c1 or eax, ecx - 01b78 48 8b 8d a8 02 + 01b74 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 01b78 0b c1 or eax, ecx + 01b7a 48 8b 8d a8 02 00 00 mov rcx, QWORD PTR cur16$10[rbp] - 01b7f 66 89 01 mov WORD PTR [rcx], ax + 01b81 66 89 01 mov WORD PTR [rcx], ax ; 4366 : } - 01b82 eb 82 jmp SHORT $LN95@stbi__crea + 01b84 eb 82 jmp SHORT $LN95@stbi__crea $LN96@stbi__crea: $LN157@stbi__crea: $LN137@stbi__crea: @@ -19642,41 +19752,41 @@ $LN137@stbi__crea: ; 4368 : ; 4369 : return 1; - 01b84 b8 01 00 00 00 mov eax, 1 + 01b86 b8 01 00 00 00 mov eax, 1 $LN1@stbi__crea: ; 4370 : } - 01b89 48 8d a5 48 04 + 01b8b 48 8d a5 48 04 00 00 lea rsp, QWORD PTR [rbp+1096] - 01b90 5f pop rdi - 01b91 5d pop rbp - 01b92 c3 ret 0 - 01b93 90 npad 1 + 01b92 5f pop rdi + 01b93 5d pop rbp + 01b94 c3 ret 0 + 01b95 0f 1f 00 npad 3 $LN168@stbi__crea: - 01b94 00 00 00 00 DD $LN105@stbi__crea - 01b98 00 00 00 00 DD $LN106@stbi__crea - 01b9c 00 00 00 00 DD $LN107@stbi__crea - 01ba0 00 00 00 00 DD $LN108@stbi__crea - 01ba4 00 00 00 00 DD $LN109@stbi__crea - 01ba8 00 00 00 00 DD $LN110@stbi__crea - 01bac 00 00 00 00 DD $LN111@stbi__crea + 01b98 00 00 00 00 DD $LN105@stbi__crea + 01b9c 00 00 00 00 DD $LN106@stbi__crea + 01ba0 00 00 00 00 DD $LN107@stbi__crea + 01ba4 00 00 00 00 DD $LN108@stbi__crea + 01ba8 00 00 00 00 DD $LN109@stbi__crea + 01bac 00 00 00 00 DD $LN110@stbi__crea + 01bb0 00 00 00 00 DD $LN111@stbi__crea $LN167@stbi__crea: - 01bb0 00 00 00 00 DD $LN121@stbi__crea - 01bb4 00 00 00 00 DD $LN122@stbi__crea - 01bb8 00 00 00 00 DD $LN123@stbi__crea - 01bbc 00 00 00 00 DD $LN124@stbi__crea - 01bc0 00 00 00 00 DD $LN125@stbi__crea - 01bc4 00 00 00 00 DD $LN126@stbi__crea - 01bc8 00 00 00 00 DD $LN127@stbi__crea + 01bb4 00 00 00 00 DD $LN121@stbi__crea + 01bb8 00 00 00 00 DD $LN122@stbi__crea + 01bbc 00 00 00 00 DD $LN123@stbi__crea + 01bc0 00 00 00 00 DD $LN124@stbi__crea + 01bc4 00 00 00 00 DD $LN125@stbi__crea + 01bc8 00 00 00 00 DD $LN126@stbi__crea + 01bcc 00 00 00 00 DD $LN127@stbi__crea $LN166@stbi__crea: - 01bcc 00 00 00 00 DD $LN128@stbi__crea - 01bd0 00 00 00 00 DD $LN129@stbi__crea - 01bd4 00 00 00 00 DD $LN130@stbi__crea - 01bd8 00 00 00 00 DD $LN131@stbi__crea - 01bdc 00 00 00 00 DD $LN132@stbi__crea - 01be0 00 00 00 00 DD $LN133@stbi__crea - 01be4 00 00 00 00 DD $LN134@stbi__crea + 01bd0 00 00 00 00 DD $LN128@stbi__crea + 01bd4 00 00 00 00 DD $LN129@stbi__crea + 01bd8 00 00 00 00 DD $LN130@stbi__crea + 01bdc 00 00 00 00 DD $LN131@stbi__crea + 01be0 00 00 00 00 DD $LN132@stbi__crea + 01be4 00 00 00 00 DD $LN133@stbi__crea + 01be8 00 00 00 00 DD $LN134@stbi__crea stbi__create_png_image_raw ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -19705,88 +19815,89 @@ stbi__paeth PROC ; COMDAT 0001b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00022 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00027 90 npad 1 ; 4141 : int p = a + b - c; - 00027 8b 85 68 01 00 + 00028 8b 85 68 01 00 00 mov eax, DWORD PTR b$[rbp] - 0002d 8b 8d 60 01 00 + 0002e 8b 8d 60 01 00 00 mov ecx, DWORD PTR a$[rbp] - 00033 03 c8 add ecx, eax - 00035 8b c1 mov eax, ecx - 00037 2b 85 70 01 00 + 00034 03 c8 add ecx, eax + 00036 8b c1 mov eax, ecx + 00038 2b 85 70 01 00 00 sub eax, DWORD PTR c$[rbp] - 0003d 89 45 04 mov DWORD PTR p$[rbp], eax + 0003e 89 45 04 mov DWORD PTR p$[rbp], eax ; 4142 : int pa = abs(p - a); - 00040 8b 85 60 01 00 + 00041 8b 85 60 01 00 00 mov eax, DWORD PTR a$[rbp] - 00046 8b 4d 04 mov ecx, DWORD PTR p$[rbp] - 00049 2b c8 sub ecx, eax - 0004b 8b c1 mov eax, ecx - 0004d 8b c8 mov ecx, eax - 0004f e8 00 00 00 00 call abs - 00054 89 45 24 mov DWORD PTR pa$[rbp], eax + 00047 8b 4d 04 mov ecx, DWORD PTR p$[rbp] + 0004a 2b c8 sub ecx, eax + 0004c 8b c1 mov eax, ecx + 0004e 8b c8 mov ecx, eax + 00050 e8 00 00 00 00 call abs + 00055 89 45 24 mov DWORD PTR pa$[rbp], eax ; 4143 : int pb = abs(p - b); - 00057 8b 85 68 01 00 + 00058 8b 85 68 01 00 00 mov eax, DWORD PTR b$[rbp] - 0005d 8b 4d 04 mov ecx, DWORD PTR p$[rbp] - 00060 2b c8 sub ecx, eax - 00062 8b c1 mov eax, ecx - 00064 8b c8 mov ecx, eax - 00066 e8 00 00 00 00 call abs - 0006b 89 45 44 mov DWORD PTR pb$[rbp], eax + 0005e 8b 4d 04 mov ecx, DWORD PTR p$[rbp] + 00061 2b c8 sub ecx, eax + 00063 8b c1 mov eax, ecx + 00065 8b c8 mov ecx, eax + 00067 e8 00 00 00 00 call abs + 0006c 89 45 44 mov DWORD PTR pb$[rbp], eax ; 4144 : int pc = abs(p - c); - 0006e 8b 85 70 01 00 + 0006f 8b 85 70 01 00 00 mov eax, DWORD PTR c$[rbp] - 00074 8b 4d 04 mov ecx, DWORD PTR p$[rbp] - 00077 2b c8 sub ecx, eax - 00079 8b c1 mov eax, ecx - 0007b 8b c8 mov ecx, eax - 0007d e8 00 00 00 00 call abs - 00082 89 45 64 mov DWORD PTR pc$[rbp], eax + 00075 8b 4d 04 mov ecx, DWORD PTR p$[rbp] + 00078 2b c8 sub ecx, eax + 0007a 8b c1 mov eax, ecx + 0007c 8b c8 mov ecx, eax + 0007e e8 00 00 00 00 call abs + 00083 89 45 64 mov DWORD PTR pc$[rbp], eax ; 4145 : if (pa <= pb && pa <= pc) return a; - 00085 8b 45 44 mov eax, DWORD PTR pb$[rbp] - 00088 39 45 24 cmp DWORD PTR pa$[rbp], eax - 0008b 7f 10 jg SHORT $LN2@stbi__paet - 0008d 8b 45 64 mov eax, DWORD PTR pc$[rbp] - 00090 39 45 24 cmp DWORD PTR pa$[rbp], eax - 00093 7f 08 jg SHORT $LN2@stbi__paet - 00095 8b 85 60 01 00 + 00086 8b 45 44 mov eax, DWORD PTR pb$[rbp] + 00089 39 45 24 cmp DWORD PTR pa$[rbp], eax + 0008c 7f 10 jg SHORT $LN2@stbi__paet + 0008e 8b 45 64 mov eax, DWORD PTR pc$[rbp] + 00091 39 45 24 cmp DWORD PTR pa$[rbp], eax + 00094 7f 08 jg SHORT $LN2@stbi__paet + 00096 8b 85 60 01 00 00 mov eax, DWORD PTR a$[rbp] - 0009b eb 16 jmp SHORT $LN1@stbi__paet + 0009c eb 16 jmp SHORT $LN1@stbi__paet $LN2@stbi__paet: ; 4146 : if (pb <= pc) return b; - 0009d 8b 45 64 mov eax, DWORD PTR pc$[rbp] - 000a0 39 45 44 cmp DWORD PTR pb$[rbp], eax - 000a3 7f 08 jg SHORT $LN3@stbi__paet - 000a5 8b 85 68 01 00 + 0009e 8b 45 64 mov eax, DWORD PTR pc$[rbp] + 000a1 39 45 44 cmp DWORD PTR pb$[rbp], eax + 000a4 7f 08 jg SHORT $LN3@stbi__paet + 000a6 8b 85 68 01 00 00 mov eax, DWORD PTR b$[rbp] - 000ab eb 06 jmp SHORT $LN1@stbi__paet + 000ac eb 06 jmp SHORT $LN1@stbi__paet $LN3@stbi__paet: ; 4147 : return c; - 000ad 8b 85 70 01 00 + 000ae 8b 85 70 01 00 00 mov eax, DWORD PTR c$[rbp] $LN1@stbi__paet: ; 4148 : } - 000b3 48 8d a5 48 01 + 000b4 48 8d a5 48 01 00 00 lea rsp, QWORD PTR [rbp+328] - 000ba 5f pop rdi - 000bb 5d pop rbp - 000bc c3 ret 0 + 000bb 5f pop rdi + 000bc 5d pop rbp + 000bd c3 ret 0 stbi__paeth ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -19808,54 +19919,55 @@ stbi__check_png_header PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 4105 : static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; ; 4106 : int i; ; 4107 : for (i = 0; i < 8; ++i) - 0001f c7 45 04 00 00 + 00020 c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00026 eb 08 jmp SHORT $LN4@stbi__chec + 00027 eb 08 jmp SHORT $LN4@stbi__chec $LN2@stbi__chec: - 00028 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0002b ff c0 inc eax - 0002d 89 45 04 mov DWORD PTR i$[rbp], eax + 00029 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0002c ff c0 inc eax + 0002e 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__chec: - 00030 83 7d 04 08 cmp DWORD PTR i$[rbp], 8 - 00034 7d 32 jge SHORT $LN3@stbi__chec + 00031 83 7d 04 08 cmp DWORD PTR i$[rbp], 8 + 00035 7d 32 jge SHORT $LN3@stbi__chec ; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); - 00036 48 8b 8d 00 01 + 00037 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0003d e8 00 00 00 00 call stbi__get8 - 00042 0f b6 c0 movzx eax, al - 00045 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 00049 48 8d 15 00 00 + 0003e e8 00 00 00 00 call stbi__get8 + 00043 0f b6 c0 movzx eax, al + 00046 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 0004a 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:?png_sig@?1??stbi__check_png_header@@9@9 - 00050 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00054 3b c1 cmp eax, ecx - 00056 74 0e je SHORT $LN5@stbi__chec - 00058 48 8d 0d 00 00 + 00051 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00055 3b c1 cmp eax, ecx + 00057 74 0e je SHORT $LN5@stbi__chec + 00059 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@DMDNBACF@bad?5png?5sig@ - 0005f e8 00 00 00 00 call stbi__err - 00064 eb 07 jmp SHORT $LN1@stbi__chec + 00060 e8 00 00 00 00 call stbi__err + 00065 eb 07 jmp SHORT $LN1@stbi__chec $LN5@stbi__chec: - 00066 eb c0 jmp SHORT $LN2@stbi__chec + 00067 eb c0 jmp SHORT $LN2@stbi__chec $LN3@stbi__chec: ; 4109 : return 1; - 00068 b8 01 00 00 00 mov eax, 1 + 00069 b8 01 00 00 00 mov eax, 1 $LN1@stbi__chec: ; 4110 : } - 0006d 48 8d a5 e8 00 + 0006e 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00074 5f pop rdi - 00075 5d pop rbp - 00076 c3 ret 0 + 00075 5f pop rdi + 00076 5d pop rbp + 00077 c3 ret 0 stbi__check_png_header ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -19883,39 +19995,40 @@ stbi__get_chunk_header PROC ; COMDAT 0002c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00033 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00038 90 npad 1 ; 4097 : stbi__pngchunk c; ; 4098 : c.length = stbi__get32be(s); - 00038 48 8b 8d 00 01 + 00039 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0003f e8 00 00 00 00 call stbi__get32be - 00044 89 45 08 mov DWORD PTR c$[rbp], eax + 00040 e8 00 00 00 00 call stbi__get32be + 00045 89 45 08 mov DWORD PTR c$[rbp], eax ; 4099 : c.type = stbi__get32be(s); - 00047 48 8b 8d 00 01 + 00048 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0004e e8 00 00 00 00 call stbi__get32be - 00053 89 45 0c mov DWORD PTR c$[rbp+4], eax + 0004f e8 00 00 00 00 call stbi__get32be + 00054 89 45 0c mov DWORD PTR c$[rbp+4], eax ; 4100 : return c; - 00056 48 8b 45 08 mov rax, QWORD PTR c$[rbp] + 00057 48 8b 45 08 mov rax, QWORD PTR c$[rbp] ; 4101 : } - 0005a 48 8b f8 mov rdi, rax - 0005d 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00061 48 8d 15 00 00 + 0005b 48 8b f8 mov rdi, rax + 0005e 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00062 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__get_chunk_header$rtcFrameData - 00068 e8 00 00 00 00 call _RTC_CheckStackVars - 0006d 48 8b c7 mov rax, rdi - 00070 48 8d a5 e8 00 + 00069 e8 00 00 00 00 call _RTC_CheckStackVars + 0006e 48 8b c7 mov rax, rdi + 00071 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00077 5f pop rdi - 00078 5d pop rbp - 00079 c3 ret 0 + 00078 5f pop rdi + 00079 5d pop rbp + 0007a c3 ret 0 stbi__get_chunk_header ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -19943,59 +20056,60 @@ stbi__do_zlib PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 3991 : a->zout_start = obuf; - 0002e 48 8b 85 e0 00 + 0002f 48 8b 85 e0 00 00 00 mov rax, QWORD PTR a$[rbp] - 00035 48 8b 8d e8 00 + 00036 48 8b 8d e8 00 00 00 mov rcx, QWORD PTR obuf$[rbp] - 0003c 48 89 48 20 mov QWORD PTR [rax+32], rcx + 0003d 48 89 48 20 mov QWORD PTR [rax+32], rcx ; 3992 : a->zout = obuf; - 00040 48 8b 85 e0 00 + 00041 48 8b 85 e0 00 00 00 mov rax, QWORD PTR a$[rbp] - 00047 48 8b 8d e8 00 + 00048 48 8b 8d e8 00 00 00 mov rcx, QWORD PTR obuf$[rbp] - 0004e 48 89 48 18 mov QWORD PTR [rax+24], rcx + 0004f 48 89 48 18 mov QWORD PTR [rax+24], rcx ; 3993 : a->zout_end = obuf + olen; - 00052 48 63 85 f0 00 + 00053 48 63 85 f0 00 00 00 movsxd rax, DWORD PTR olen$[rbp] - 00059 48 8b 8d e8 00 + 0005a 48 8b 8d e8 00 00 00 mov rcx, QWORD PTR obuf$[rbp] - 00060 48 03 c8 add rcx, rax - 00063 48 8b c1 mov rax, rcx - 00066 48 8b 8d e0 00 + 00061 48 03 c8 add rcx, rax + 00064 48 8b c1 mov rax, rcx + 00067 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR a$[rbp] - 0006d 48 89 41 28 mov QWORD PTR [rcx+40], rax + 0006e 48 89 41 28 mov QWORD PTR [rcx+40], rax ; 3994 : a->z_expandable = exp; - 00071 48 8b 85 e0 00 + 00072 48 8b 85 e0 00 00 00 mov rax, QWORD PTR a$[rbp] - 00078 8b 8d f8 00 00 + 00079 8b 8d f8 00 00 00 mov ecx, DWORD PTR exp$[rbp] - 0007e 89 48 30 mov DWORD PTR [rax+48], ecx + 0007f 89 48 30 mov DWORD PTR [rax+48], ecx ; 3995 : ; 3996 : return stbi__parse_zlib(a, parse_header); - 00081 8b 95 00 01 00 + 00082 8b 95 00 01 00 00 mov edx, DWORD PTR parse_header$[rbp] - 00087 48 8b 8d e0 00 + 00088 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR a$[rbp] - 0008e e8 00 00 00 00 call stbi__parse_zlib + 0008f e8 00 00 00 00 call stbi__parse_zlib ; 3997 : } - 00093 48 8d a5 c8 00 + 00094 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0009a 5f pop rdi - 0009b 5d pop rbp - 0009c c3 ret 0 + 0009b 5f pop rdi + 0009c 5d pop rbp + 0009d c3 ret 0 stbi__do_zlib ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -20020,164 +20134,165 @@ stbi__parse_zlib PROC ; COMDAT 00017 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001e e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00023 90 npad 1 ; 3960 : int final, type; ; 3961 : if (parse_header) - 00023 83 bd 28 01 00 + 00024 83 bd 28 01 00 00 00 cmp DWORD PTR parse_header$[rbp], 0 - 0002a 74 17 je SHORT $LN5@stbi__pars + 0002b 74 17 je SHORT $LN5@stbi__pars ; 3962 : if (!stbi__parse_zlib_header(a)) return 0; - 0002c 48 8b 8d 20 01 + 0002d 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00033 e8 00 00 00 00 call stbi__parse_zlib_header - 00038 85 c0 test eax, eax - 0003a 75 07 jne SHORT $LN6@stbi__pars - 0003c 33 c0 xor eax, eax - 0003e e9 09 01 00 00 jmp $LN1@stbi__pars + 00034 e8 00 00 00 00 call stbi__parse_zlib_header + 00039 85 c0 test eax, eax + 0003b 75 07 jne SHORT $LN6@stbi__pars + 0003d 33 c0 xor eax, eax + 0003f e9 09 01 00 00 jmp $LN1@stbi__pars $LN6@stbi__pars: $LN5@stbi__pars: ; 3963 : a->num_bits = 0; - 00043 48 8b 85 20 01 + 00044 48 8b 85 20 01 00 00 mov rax, QWORD PTR a$[rbp] - 0004a c7 40 10 00 00 + 0004b c7 40 10 00 00 00 00 mov DWORD PTR [rax+16], 0 ; 3964 : a->code_buffer = 0; - 00051 48 8b 85 20 01 + 00052 48 8b 85 20 01 00 00 mov rax, QWORD PTR a$[rbp] - 00058 c7 40 14 00 00 + 00059 c7 40 14 00 00 00 00 mov DWORD PTR [rax+20], 0 $LN4@stbi__pars: ; 3965 : do { ; 3966 : final = stbi__zreceive(a, 1); - 0005f ba 01 00 00 00 mov edx, 1 - 00064 48 8b 8d 20 01 + 00060 ba 01 00 00 00 mov edx, 1 + 00065 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR a$[rbp] - 0006b e8 00 00 00 00 call stbi__zreceive - 00070 89 45 04 mov DWORD PTR final$[rbp], eax + 0006c e8 00 00 00 00 call stbi__zreceive + 00071 89 45 04 mov DWORD PTR final$[rbp], eax ; 3967 : type = stbi__zreceive(a, 2); - 00073 ba 02 00 00 00 mov edx, 2 - 00078 48 8b 8d 20 01 + 00074 ba 02 00 00 00 mov edx, 2 + 00079 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR a$[rbp] - 0007f e8 00 00 00 00 call stbi__zreceive - 00084 89 45 24 mov DWORD PTR type$[rbp], eax + 00080 e8 00 00 00 00 call stbi__zreceive + 00085 89 45 24 mov DWORD PTR type$[rbp], eax ; 3968 : if (type == 0) { - 00087 83 7d 24 00 cmp DWORD PTR type$[rbp], 0 - 0008b 75 1c jne SHORT $LN7@stbi__pars + 00088 83 7d 24 00 cmp DWORD PTR type$[rbp], 0 + 0008c 75 1c jne SHORT $LN7@stbi__pars ; 3969 : if (!stbi__parse_uncompressed_block(a)) return 0; - 0008d 48 8b 8d 20 01 + 0008e 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00094 e8 00 00 00 00 call stbi__parse_uncompressed_block - 00099 85 c0 test eax, eax - 0009b 75 07 jne SHORT $LN9@stbi__pars - 0009d 33 c0 xor eax, eax - 0009f e9 a8 00 00 00 jmp $LN1@stbi__pars + 00095 e8 00 00 00 00 call stbi__parse_uncompressed_block + 0009a 85 c0 test eax, eax + 0009c 75 07 jne SHORT $LN9@stbi__pars + 0009e 33 c0 xor eax, eax + 000a0 e9 a8 00 00 00 jmp $LN1@stbi__pars $LN9@stbi__pars: ; 3970 : } - 000a4 e9 94 00 00 00 jmp $LN8@stbi__pars + 000a5 e9 94 00 00 00 jmp $LN8@stbi__pars $LN7@stbi__pars: ; 3971 : else if (type == 3) { - 000a9 83 7d 24 03 cmp DWORD PTR type$[rbp], 3 - 000ad 75 0c jne SHORT $LN10@stbi__pars + 000aa 83 7d 24 03 cmp DWORD PTR type$[rbp], 3 + 000ae 75 0c jne SHORT $LN10@stbi__pars ; 3972 : return 0; - 000af 33 c0 xor eax, eax - 000b1 e9 96 00 00 00 jmp $LN1@stbi__pars + 000b0 33 c0 xor eax, eax + 000b2 e9 96 00 00 00 jmp $LN1@stbi__pars ; 3973 : } - 000b6 e9 82 00 00 00 jmp $LN11@stbi__pars + 000b7 e9 82 00 00 00 jmp $LN11@stbi__pars $LN10@stbi__pars: ; 3974 : else { ; 3975 : if (type == 1) { - 000bb 83 7d 24 01 cmp DWORD PTR type$[rbp], 1 - 000bf 75 54 jne SHORT $LN12@stbi__pars + 000bc 83 7d 24 01 cmp DWORD PTR type$[rbp], 1 + 000c0 75 54 jne SHORT $LN12@stbi__pars ; 3976 : // use fixed code lengths ; 3977 : if (!stbi__zbuild_huffman(&a->z_length, stbi__zdefault_length, STBI__ZNSYMS)) return 0; - 000c1 48 8b 85 20 01 + 000c2 48 8b 85 20 01 00 00 mov rax, QWORD PTR a$[rbp] - 000c8 48 83 c0 34 add rax, 52 ; 00000034H - 000cc 41 b8 20 01 00 + 000c9 48 83 c0 34 add rax, 52 ; 00000034H + 000cd 41 b8 20 01 00 00 mov r8d, 288 ; 00000120H - 000d2 48 8d 15 00 00 + 000d3 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__zdefault_length - 000d9 48 8b c8 mov rcx, rax - 000dc e8 00 00 00 00 call stbi__zbuild_huffman - 000e1 85 c0 test eax, eax - 000e3 75 04 jne SHORT $LN14@stbi__pars - 000e5 33 c0 xor eax, eax - 000e7 eb 63 jmp SHORT $LN1@stbi__pars + 000da 48 8b c8 mov rcx, rax + 000dd e8 00 00 00 00 call stbi__zbuild_huffman + 000e2 85 c0 test eax, eax + 000e4 75 04 jne SHORT $LN14@stbi__pars + 000e6 33 c0 xor eax, eax + 000e8 eb 63 jmp SHORT $LN1@stbi__pars $LN14@stbi__pars: ; 3978 : if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; - 000e9 48 8b 85 20 01 + 000ea 48 8b 85 20 01 00 00 mov rax, QWORD PTR a$[rbp] - 000f0 48 05 18 08 00 + 000f1 48 05 18 08 00 00 add rax, 2072 ; 00000818H - 000f6 41 b8 20 00 00 + 000f7 41 b8 20 00 00 00 mov r8d, 32 ; 00000020H - 000fc 48 8d 15 00 00 + 000fd 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__zdefault_distance - 00103 48 8b c8 mov rcx, rax - 00106 e8 00 00 00 00 call stbi__zbuild_huffman - 0010b 85 c0 test eax, eax - 0010d 75 04 jne SHORT $LN15@stbi__pars - 0010f 33 c0 xor eax, eax - 00111 eb 39 jmp SHORT $LN1@stbi__pars + 00104 48 8b c8 mov rcx, rax + 00107 e8 00 00 00 00 call stbi__zbuild_huffman + 0010c 85 c0 test eax, eax + 0010e 75 04 jne SHORT $LN15@stbi__pars + 00110 33 c0 xor eax, eax + 00112 eb 39 jmp SHORT $LN1@stbi__pars $LN15@stbi__pars: ; 3979 : } - 00113 eb 14 jmp SHORT $LN13@stbi__pars + 00114 eb 14 jmp SHORT $LN13@stbi__pars $LN12@stbi__pars: ; 3980 : else { ; 3981 : if (!stbi__compute_huffman_codes(a)) return 0; - 00115 48 8b 8d 20 01 + 00116 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR a$[rbp] - 0011c e8 00 00 00 00 call stbi__compute_huffman_codes - 00121 85 c0 test eax, eax - 00123 75 04 jne SHORT $LN16@stbi__pars - 00125 33 c0 xor eax, eax - 00127 eb 23 jmp SHORT $LN1@stbi__pars + 0011d e8 00 00 00 00 call stbi__compute_huffman_codes + 00122 85 c0 test eax, eax + 00124 75 04 jne SHORT $LN16@stbi__pars + 00126 33 c0 xor eax, eax + 00128 eb 23 jmp SHORT $LN1@stbi__pars $LN16@stbi__pars: $LN13@stbi__pars: ; 3982 : } ; 3983 : if (!stbi__parse_huffman_block(a)) return 0; - 00129 48 8b 8d 20 01 + 0012a 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00130 e8 00 00 00 00 call stbi__parse_huffman_block - 00135 85 c0 test eax, eax - 00137 75 04 jne SHORT $LN17@stbi__pars - 00139 33 c0 xor eax, eax - 0013b eb 0f jmp SHORT $LN1@stbi__pars + 00131 e8 00 00 00 00 call stbi__parse_huffman_block + 00136 85 c0 test eax, eax + 00138 75 04 jne SHORT $LN17@stbi__pars + 0013a 33 c0 xor eax, eax + 0013c eb 0f jmp SHORT $LN1@stbi__pars $LN17@stbi__pars: $LN11@stbi__pars: $LN8@stbi__pars: @@ -20185,22 +20300,22 @@ $LN8@stbi__pars: ; 3984 : } ; 3985 : } while (!final); - 0013d 83 7d 04 00 cmp DWORD PTR final$[rbp], 0 - 00141 0f 84 18 ff ff + 0013e 83 7d 04 00 cmp DWORD PTR final$[rbp], 0 + 00142 0f 84 18 ff ff ff je $LN4@stbi__pars ; 3986 : return 1; - 00147 b8 01 00 00 00 mov eax, 1 + 00148 b8 01 00 00 00 mov eax, 1 $LN1@stbi__pars: ; 3987 : } - 0014c 48 8d a5 08 01 + 0014d 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 00153 5f pop rdi - 00154 5d pop rbp - 00155 c3 ret 0 + 00154 5f pop rdi + 00155 5d pop rbp + 00156 c3 ret 0 stbi__parse_zlib ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -20224,95 +20339,96 @@ stbi__parse_zlib_header PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 3917 : int cmf = stbi__zget8(a); - 0001f 48 8b 8d 40 01 + 00020 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00026 e8 00 00 00 00 call stbi__zget8 - 0002b 0f b6 c0 movzx eax, al - 0002e 89 45 04 mov DWORD PTR cmf$[rbp], eax + 00027 e8 00 00 00 00 call stbi__zget8 + 0002c 0f b6 c0 movzx eax, al + 0002f 89 45 04 mov DWORD PTR cmf$[rbp], eax ; 3918 : int cm = cmf & 15; - 00031 8b 45 04 mov eax, DWORD PTR cmf$[rbp] - 00034 83 e0 0f and eax, 15 - 00037 89 45 24 mov DWORD PTR cm$[rbp], eax + 00032 8b 45 04 mov eax, DWORD PTR cmf$[rbp] + 00035 83 e0 0f and eax, 15 + 00038 89 45 24 mov DWORD PTR cm$[rbp], eax ; 3919 : /* int cinfo = cmf >> 4; */ ; 3920 : int flg = stbi__zget8(a); - 0003a 48 8b 8d 40 01 + 0003b 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00041 e8 00 00 00 00 call stbi__zget8 - 00046 0f b6 c0 movzx eax, al - 00049 89 45 44 mov DWORD PTR flg$[rbp], eax + 00042 e8 00 00 00 00 call stbi__zget8 + 00047 0f b6 c0 movzx eax, al + 0004a 89 45 44 mov DWORD PTR flg$[rbp], eax ; 3921 : if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec - 0004c 48 8b 8d 40 01 + 0004d 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00053 e8 00 00 00 00 call stbi__zeof - 00058 85 c0 test eax, eax - 0005a 74 0e je SHORT $LN2@stbi__pars - 0005c 48 8d 0d 00 00 + 00054 e8 00 00 00 00 call stbi__zeof + 00059 85 c0 test eax, eax + 0005b 74 0e je SHORT $LN2@stbi__pars + 0005d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@OBKOPAFL@bad?5zlib?5header@ - 00063 e8 00 00 00 00 call stbi__err - 00068 eb 57 jmp SHORT $LN1@stbi__pars + 00064 e8 00 00 00 00 call stbi__err + 00069 eb 57 jmp SHORT $LN1@stbi__pars $LN2@stbi__pars: ; 3922 : if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec - 0006a 69 45 04 00 01 + 0006b 69 45 04 00 01 00 00 imul eax, DWORD PTR cmf$[rbp], 256 ; 00000100H - 00071 03 45 44 add eax, DWORD PTR flg$[rbp] - 00074 99 cdq - 00075 b9 1f 00 00 00 mov ecx, 31 - 0007a f7 f9 idiv ecx - 0007c 8b c2 mov eax, edx - 0007e 85 c0 test eax, eax - 00080 74 0e je SHORT $LN3@stbi__pars - 00082 48 8d 0d 00 00 + 00072 03 45 44 add eax, DWORD PTR flg$[rbp] + 00075 99 cdq + 00076 b9 1f 00 00 00 mov ecx, 31 + 0007b f7 f9 idiv ecx + 0007d 8b c2 mov eax, edx + 0007f 85 c0 test eax, eax + 00081 74 0e je SHORT $LN3@stbi__pars + 00083 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@OBKOPAFL@bad?5zlib?5header@ - 00089 e8 00 00 00 00 call stbi__err - 0008e eb 31 jmp SHORT $LN1@stbi__pars + 0008a e8 00 00 00 00 call stbi__err + 0008f eb 31 jmp SHORT $LN1@stbi__pars $LN3@stbi__pars: ; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png - 00090 8b 45 44 mov eax, DWORD PTR flg$[rbp] - 00093 83 e0 20 and eax, 32 ; 00000020H - 00096 85 c0 test eax, eax - 00098 74 0e je SHORT $LN4@stbi__pars - 0009a 48 8d 0d 00 00 + 00091 8b 45 44 mov eax, DWORD PTR flg$[rbp] + 00094 83 e0 20 and eax, 32 ; 00000020H + 00097 85 c0 test eax, eax + 00099 74 0e je SHORT $LN4@stbi__pars + 0009b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0P@DOGMHEBI@no?5preset?5dict@ - 000a1 e8 00 00 00 00 call stbi__err - 000a6 eb 19 jmp SHORT $LN1@stbi__pars + 000a2 e8 00 00 00 00 call stbi__err + 000a7 eb 19 jmp SHORT $LN1@stbi__pars $LN4@stbi__pars: ; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png - 000a8 83 7d 24 08 cmp DWORD PTR cm$[rbp], 8 - 000ac 74 0e je SHORT $LN5@stbi__pars - 000ae 48 8d 0d 00 00 + 000a9 83 7d 24 08 cmp DWORD PTR cm$[rbp], 8 + 000ad 74 0e je SHORT $LN5@stbi__pars + 000af 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@MCNBDLPD@bad?5compression@ - 000b5 e8 00 00 00 00 call stbi__err - 000ba eb 05 jmp SHORT $LN1@stbi__pars + 000b6 e8 00 00 00 00 call stbi__err + 000bb eb 05 jmp SHORT $LN1@stbi__pars $LN5@stbi__pars: ; 3925 : // window = 1 << (8 + cinfo)... but who cares, we fully buffer output ; 3926 : return 1; - 000bc b8 01 00 00 00 mov eax, 1 + 000bd b8 01 00 00 00 mov eax, 1 $LN1@stbi__pars: ; 3927 : } - 000c1 48 8d a5 28 01 + 000c2 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 000c8 5f pop rdi - 000c9 5d pop rbp - 000ca c3 ret 0 + 000c9 5f pop rdi + 000ca 5d pop rbp + 000cb c3 ret 0 stbi__parse_zlib_header ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -20343,244 +20459,247 @@ stbi__parse_uncompressed_block PROC ; COMDAT 0002c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00033 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00038 90 npad 1 ; 3888 : stbi_uc header[4]; ; 3889 : int len, nlen, k; ; 3890 : if (a->num_bits & 7) - 00038 48 8b 85 60 01 + 00039 48 8b 85 60 01 00 00 mov rax, QWORD PTR a$[rbp] - 0003f 8b 40 10 mov eax, DWORD PTR [rax+16] - 00042 83 e0 07 and eax, 7 - 00045 85 c0 test eax, eax - 00047 74 1b je SHORT $LN6@stbi__pars + 00040 8b 40 10 mov eax, DWORD PTR [rax+16] + 00043 83 e0 07 and eax, 7 + 00046 85 c0 test eax, eax + 00048 74 1c je SHORT $LN6@stbi__pars ; 3891 : stbi__zreceive(a, a->num_bits & 7); // discard - 00049 48 8b 85 60 01 + 0004a 48 8b 85 60 01 00 00 mov rax, QWORD PTR a$[rbp] - 00050 8b 40 10 mov eax, DWORD PTR [rax+16] - 00053 83 e0 07 and eax, 7 - 00056 8b d0 mov edx, eax - 00058 48 8b 8d 60 01 + 00051 8b 40 10 mov eax, DWORD PTR [rax+16] + 00054 83 e0 07 and eax, 7 + 00057 8b d0 mov edx, eax + 00059 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR a$[rbp] - 0005f e8 00 00 00 00 call stbi__zreceive + 00060 e8 00 00 00 00 call stbi__zreceive + 00065 90 npad 1 $LN6@stbi__pars: ; 3892 : // drain the bit-packed data into header ; 3893 : k = 0; - 00064 c7 45 64 00 00 + 00066 c7 45 64 00 00 00 00 mov DWORD PTR k$[rbp], 0 $LN2@stbi__pars: ; 3894 : while (a->num_bits > 0) { - 0006b 48 8b 85 60 01 + 0006d 48 8b 85 60 01 00 00 mov rax, QWORD PTR a$[rbp] - 00072 83 78 10 00 cmp DWORD PTR [rax+16], 0 - 00076 7e 4f jle SHORT $LN3@stbi__pars + 00074 83 78 10 00 cmp DWORD PTR [rax+16], 0 + 00078 7e 4f jle SHORT $LN3@stbi__pars ; 3895 : header[k++] = (stbi_uc)(a->code_buffer & 255); // suppress MSVC run-time check - 00078 48 8b 85 60 01 + 0007a 48 8b 85 60 01 00 00 mov rax, QWORD PTR a$[rbp] - 0007f 8b 40 14 mov eax, DWORD PTR [rax+20] - 00082 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00087 48 63 4d 64 movsxd rcx, DWORD PTR k$[rbp] - 0008b 88 44 0d 04 mov BYTE PTR header$[rbp+rcx], al - 0008f 8b 45 64 mov eax, DWORD PTR k$[rbp] - 00092 ff c0 inc eax - 00094 89 45 64 mov DWORD PTR k$[rbp], eax + 00081 8b 40 14 mov eax, DWORD PTR [rax+20] + 00084 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00089 48 63 4d 64 movsxd rcx, DWORD PTR k$[rbp] + 0008d 88 44 0d 04 mov BYTE PTR header$[rbp+rcx], al + 00091 8b 45 64 mov eax, DWORD PTR k$[rbp] + 00094 ff c0 inc eax + 00096 89 45 64 mov DWORD PTR k$[rbp], eax ; 3896 : a->code_buffer >>= 8; - 00097 48 8b 85 60 01 + 00099 48 8b 85 60 01 00 00 mov rax, QWORD PTR a$[rbp] - 0009e 8b 40 14 mov eax, DWORD PTR [rax+20] - 000a1 c1 e8 08 shr eax, 8 - 000a4 48 8b 8d 60 01 + 000a0 8b 40 14 mov eax, DWORD PTR [rax+20] + 000a3 c1 e8 08 shr eax, 8 + 000a6 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR a$[rbp] - 000ab 89 41 14 mov DWORD PTR [rcx+20], eax + 000ad 89 41 14 mov DWORD PTR [rcx+20], eax ; 3897 : a->num_bits -= 8; - 000ae 48 8b 85 60 01 + 000b0 48 8b 85 60 01 00 00 mov rax, QWORD PTR a$[rbp] - 000b5 8b 40 10 mov eax, DWORD PTR [rax+16] - 000b8 83 e8 08 sub eax, 8 - 000bb 48 8b 8d 60 01 + 000b7 8b 40 10 mov eax, DWORD PTR [rax+16] + 000ba 83 e8 08 sub eax, 8 + 000bd 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR a$[rbp] - 000c2 89 41 10 mov DWORD PTR [rcx+16], eax + 000c4 89 41 10 mov DWORD PTR [rcx+16], eax ; 3898 : } - 000c5 eb a4 jmp SHORT $LN2@stbi__pars + 000c7 eb a4 jmp SHORT $LN2@stbi__pars $LN3@stbi__pars: ; 3899 : if (a->num_bits < 0) return stbi__err("zlib corrupt", "Corrupt PNG"); - 000c7 48 8b 85 60 01 + 000c9 48 8b 85 60 01 00 00 mov rax, QWORD PTR a$[rbp] - 000ce 83 78 10 00 cmp DWORD PTR [rax+16], 0 - 000d2 7d 11 jge SHORT $LN7@stbi__pars - 000d4 48 8d 0d 00 00 + 000d0 83 78 10 00 cmp DWORD PTR [rax+16], 0 + 000d4 7d 11 jge SHORT $LN7@stbi__pars + 000d6 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0N@IECDHMDI@zlib?5corrupt@ - 000db e8 00 00 00 00 call stbi__err - 000e0 e9 53 01 00 00 jmp $LN1@stbi__pars + 000dd e8 00 00 00 00 call stbi__err + 000e2 e9 54 01 00 00 jmp $LN1@stbi__pars $LN7@stbi__pars: $LN4@stbi__pars: ; 3900 : // now fill header the normal way ; 3901 : while (k < 4) - 000e5 83 7d 64 04 cmp DWORD PTR k$[rbp], 4 - 000e9 7d 1e jge SHORT $LN5@stbi__pars + 000e7 83 7d 64 04 cmp DWORD PTR k$[rbp], 4 + 000eb 7d 1e jge SHORT $LN5@stbi__pars ; 3902 : header[k++] = stbi__zget8(a); - 000eb 48 8b 8d 60 01 + 000ed 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR a$[rbp] - 000f2 e8 00 00 00 00 call stbi__zget8 - 000f7 48 63 4d 64 movsxd rcx, DWORD PTR k$[rbp] - 000fb 88 44 0d 04 mov BYTE PTR header$[rbp+rcx], al - 000ff 8b 45 64 mov eax, DWORD PTR k$[rbp] - 00102 ff c0 inc eax - 00104 89 45 64 mov DWORD PTR k$[rbp], eax - 00107 eb dc jmp SHORT $LN4@stbi__pars + 000f4 e8 00 00 00 00 call stbi__zget8 + 000f9 48 63 4d 64 movsxd rcx, DWORD PTR k$[rbp] + 000fd 88 44 0d 04 mov BYTE PTR header$[rbp+rcx], al + 00101 8b 45 64 mov eax, DWORD PTR k$[rbp] + 00104 ff c0 inc eax + 00106 89 45 64 mov DWORD PTR k$[rbp], eax + 00109 eb dc jmp SHORT $LN4@stbi__pars $LN5@stbi__pars: ; 3903 : len = header[1] * 256 + header[0]; - 00109 b8 01 00 00 00 mov eax, 1 - 0010e 48 6b c0 01 imul rax, rax, 1 - 00112 0f b6 44 05 04 movzx eax, BYTE PTR header$[rbp+rax] - 00117 69 c0 00 01 00 + 0010b b8 01 00 00 00 mov eax, 1 + 00110 48 6b c0 01 imul rax, rax, 1 + 00114 0f b6 44 05 04 movzx eax, BYTE PTR header$[rbp+rax] + 00119 69 c0 00 01 00 00 imul eax, eax, 256 ; 00000100H - 0011d b9 01 00 00 00 mov ecx, 1 - 00122 48 6b c9 00 imul rcx, rcx, 0 - 00126 0f b6 4c 0d 04 movzx ecx, BYTE PTR header$[rbp+rcx] - 0012b 03 c1 add eax, ecx - 0012d 89 45 24 mov DWORD PTR len$[rbp], eax + 0011f b9 01 00 00 00 mov ecx, 1 + 00124 48 6b c9 00 imul rcx, rcx, 0 + 00128 0f b6 4c 0d 04 movzx ecx, BYTE PTR header$[rbp+rcx] + 0012d 03 c1 add eax, ecx + 0012f 89 45 24 mov DWORD PTR len$[rbp], eax ; 3904 : nlen = header[3] * 256 + header[2]; - 00130 b8 01 00 00 00 mov eax, 1 - 00135 48 6b c0 03 imul rax, rax, 3 - 00139 0f b6 44 05 04 movzx eax, BYTE PTR header$[rbp+rax] - 0013e 69 c0 00 01 00 + 00132 b8 01 00 00 00 mov eax, 1 + 00137 48 6b c0 03 imul rax, rax, 3 + 0013b 0f b6 44 05 04 movzx eax, BYTE PTR header$[rbp+rax] + 00140 69 c0 00 01 00 00 imul eax, eax, 256 ; 00000100H - 00144 b9 01 00 00 00 mov ecx, 1 - 00149 48 6b c9 02 imul rcx, rcx, 2 - 0014d 0f b6 4c 0d 04 movzx ecx, BYTE PTR header$[rbp+rcx] - 00152 03 c1 add eax, ecx - 00154 89 45 44 mov DWORD PTR nlen$[rbp], eax + 00146 b9 01 00 00 00 mov ecx, 1 + 0014b 48 6b c9 02 imul rcx, rcx, 2 + 0014f 0f b6 4c 0d 04 movzx ecx, BYTE PTR header$[rbp+rcx] + 00154 03 c1 add eax, ecx + 00156 89 45 44 mov DWORD PTR nlen$[rbp], eax ; 3905 : if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt", "Corrupt PNG"); - 00157 8b 45 24 mov eax, DWORD PTR len$[rbp] - 0015a 35 ff ff 00 00 xor eax, 65535 ; 0000ffffH - 0015f 39 45 44 cmp DWORD PTR nlen$[rbp], eax - 00162 74 11 je SHORT $LN8@stbi__pars - 00164 48 8d 0d 00 00 + 00159 8b 45 24 mov eax, DWORD PTR len$[rbp] + 0015c 35 ff ff 00 00 xor eax, 65535 ; 0000ffffH + 00161 39 45 44 cmp DWORD PTR nlen$[rbp], eax + 00164 74 11 je SHORT $LN8@stbi__pars + 00166 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0N@IECDHMDI@zlib?5corrupt@ - 0016b e8 00 00 00 00 call stbi__err - 00170 e9 c3 00 00 00 jmp $LN1@stbi__pars + 0016d e8 00 00 00 00 call stbi__err + 00172 e9 c4 00 00 00 jmp $LN1@stbi__pars $LN8@stbi__pars: ; 3906 : if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG"); - 00175 48 63 45 24 movsxd rax, DWORD PTR len$[rbp] - 00179 48 8b 8d 60 01 + 00177 48 63 45 24 movsxd rax, DWORD PTR len$[rbp] + 0017b 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00180 48 03 01 add rax, QWORD PTR [rcx] - 00183 48 8b 8d 60 01 + 00182 48 03 01 add rax, QWORD PTR [rcx] + 00185 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR a$[rbp] - 0018a 48 3b 41 08 cmp rax, QWORD PTR [rcx+8] - 0018e 76 11 jbe SHORT $LN9@stbi__pars - 00190 48 8d 0d 00 00 + 0018c 48 3b 41 08 cmp rax, QWORD PTR [rcx+8] + 00190 76 11 jbe SHORT $LN9@stbi__pars + 00192 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@PIPBCKIA@read?5past?5buffer@ - 00197 e8 00 00 00 00 call stbi__err - 0019c e9 97 00 00 00 jmp $LN1@stbi__pars + 00199 e8 00 00 00 00 call stbi__err + 0019e e9 98 00 00 00 jmp $LN1@stbi__pars $LN9@stbi__pars: ; 3907 : if (a->zout + len > a->zout_end) - 001a1 48 63 45 24 movsxd rax, DWORD PTR len$[rbp] - 001a5 48 8b 8d 60 01 + 001a3 48 63 45 24 movsxd rax, DWORD PTR len$[rbp] + 001a7 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR a$[rbp] - 001ac 48 03 41 18 add rax, QWORD PTR [rcx+24] - 001b0 48 8b 8d 60 01 + 001ae 48 03 41 18 add rax, QWORD PTR [rcx+24] + 001b2 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR a$[rbp] - 001b7 48 3b 41 28 cmp rax, QWORD PTR [rcx+40] - 001bb 76 23 jbe SHORT $LN10@stbi__pars + 001b9 48 3b 41 28 cmp rax, QWORD PTR [rcx+40] + 001bd 76 23 jbe SHORT $LN10@stbi__pars ; 3908 : if (!stbi__zexpand(a, a->zout, len)) return 0; - 001bd 44 8b 45 24 mov r8d, DWORD PTR len$[rbp] - 001c1 48 8b 85 60 01 + 001bf 44 8b 45 24 mov r8d, DWORD PTR len$[rbp] + 001c3 48 8b 85 60 01 00 00 mov rax, QWORD PTR a$[rbp] - 001c8 48 8b 50 18 mov rdx, QWORD PTR [rax+24] - 001cc 48 8b 8d 60 01 + 001ca 48 8b 50 18 mov rdx, QWORD PTR [rax+24] + 001ce 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR a$[rbp] - 001d3 e8 00 00 00 00 call stbi__zexpand - 001d8 85 c0 test eax, eax - 001da 75 04 jne SHORT $LN11@stbi__pars - 001dc 33 c0 xor eax, eax - 001de eb 58 jmp SHORT $LN1@stbi__pars + 001d5 e8 00 00 00 00 call stbi__zexpand + 001da 85 c0 test eax, eax + 001dc 75 04 jne SHORT $LN11@stbi__pars + 001de 33 c0 xor eax, eax + 001e0 eb 59 jmp SHORT $LN1@stbi__pars $LN11@stbi__pars: $LN10@stbi__pars: ; 3909 : memcpy(a->zout, a->zbuffer, len); - 001e0 48 63 45 24 movsxd rax, DWORD PTR len$[rbp] - 001e4 4c 8b c0 mov r8, rax - 001e7 48 8b 85 60 01 + 001e2 48 63 45 24 movsxd rax, DWORD PTR len$[rbp] + 001e6 4c 8b c0 mov r8, rax + 001e9 48 8b 85 60 01 00 00 mov rax, QWORD PTR a$[rbp] - 001ee 48 8b 10 mov rdx, QWORD PTR [rax] - 001f1 48 8b 85 60 01 + 001f0 48 8b 10 mov rdx, QWORD PTR [rax] + 001f3 48 8b 85 60 01 00 00 mov rax, QWORD PTR a$[rbp] - 001f8 48 8b 48 18 mov rcx, QWORD PTR [rax+24] - 001fc e8 00 00 00 00 call memcpy + 001fa 48 8b 48 18 mov rcx, QWORD PTR [rax+24] + 001fe e8 00 00 00 00 call memcpy + 00203 90 npad 1 ; 3910 : a->zbuffer += len; - 00201 48 63 45 24 movsxd rax, DWORD PTR len$[rbp] - 00205 48 8b 8d 60 01 + 00204 48 63 45 24 movsxd rax, DWORD PTR len$[rbp] + 00208 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR a$[rbp] - 0020c 48 03 01 add rax, QWORD PTR [rcx] - 0020f 48 8b 8d 60 01 + 0020f 48 03 01 add rax, QWORD PTR [rcx] + 00212 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00216 48 89 01 mov QWORD PTR [rcx], rax + 00219 48 89 01 mov QWORD PTR [rcx], rax ; 3911 : a->zout += len; - 00219 48 63 45 24 movsxd rax, DWORD PTR len$[rbp] - 0021d 48 8b 8d 60 01 + 0021c 48 63 45 24 movsxd rax, DWORD PTR len$[rbp] + 00220 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00224 48 03 41 18 add rax, QWORD PTR [rcx+24] - 00228 48 8b 8d 60 01 + 00227 48 03 41 18 add rax, QWORD PTR [rcx+24] + 0022b 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR a$[rbp] - 0022f 48 89 41 18 mov QWORD PTR [rcx+24], rax + 00232 48 89 41 18 mov QWORD PTR [rcx+24], rax ; 3912 : return 1; - 00233 b8 01 00 00 00 mov eax, 1 + 00236 b8 01 00 00 00 mov eax, 1 $LN1@stbi__pars: ; 3913 : } - 00238 48 8b f8 mov rdi, rax - 0023b 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 0023f 48 8d 15 00 00 + 0023b 48 8b f8 mov rdi, rax + 0023e 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00242 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__parse_uncompressed_block$rtcFrameData - 00246 e8 00 00 00 00 call _RTC_CheckStackVars - 0024b 48 8b c7 mov rax, rdi - 0024e 48 8d a5 48 01 + 00249 e8 00 00 00 00 call _RTC_CheckStackVars + 0024e 48 8b c7 mov rax, rdi + 00251 48 8d a5 48 01 00 00 lea rsp, QWORD PTR [rbp+328] - 00255 5f pop rdi - 00256 5d pop rbp - 00257 c3 ret 0 + 00258 5f pop rdi + 00259 5d pop rbp + 0025a c3 ret 0 stbi__parse_uncompressed_block ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -20627,6 +20746,7 @@ stbi__compute_huffman_codes PROC ; COMDAT 00043 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0004a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0004f 90 npad 1 ; 3835 : static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; ; 3836 : stbi__zhuffman z_codelength; @@ -20636,273 +20756,274 @@ stbi__compute_huffman_codes PROC ; COMDAT ; 3840 : ; 3841 : int hlit = stbi__zreceive(a, 5) + 257; - 0004f ba 05 00 00 00 mov edx, 5 - 00054 48 8b 8d 00 10 + 00050 ba 05 00 00 00 mov edx, 5 + 00055 48 8b 8d 00 10 00 00 mov rcx, QWORD PTR a$[rbp] - 0005b e8 00 00 00 00 call stbi__zreceive - 00060 05 01 01 00 00 add eax, 257 ; 00000101H - 00065 89 85 74 0a 00 + 0005c e8 00 00 00 00 call stbi__zreceive + 00061 05 01 01 00 00 add eax, 257 ; 00000101H + 00066 89 85 74 0a 00 00 mov DWORD PTR hlit$[rbp], eax ; 3842 : int hdist = stbi__zreceive(a, 5) + 1; - 0006b ba 05 00 00 00 mov edx, 5 - 00070 48 8b 8d 00 10 + 0006c ba 05 00 00 00 mov edx, 5 + 00071 48 8b 8d 00 10 00 00 mov rcx, QWORD PTR a$[rbp] - 00077 e8 00 00 00 00 call stbi__zreceive - 0007c ff c0 inc eax - 0007e 89 85 94 0a 00 + 00078 e8 00 00 00 00 call stbi__zreceive + 0007d ff c0 inc eax + 0007f 89 85 94 0a 00 00 mov DWORD PTR hdist$[rbp], eax ; 3843 : int hclen = stbi__zreceive(a, 4) + 4; - 00084 ba 04 00 00 00 mov edx, 4 - 00089 48 8b 8d 00 10 + 00085 ba 04 00 00 00 mov edx, 4 + 0008a 48 8b 8d 00 10 00 00 mov rcx, QWORD PTR a$[rbp] - 00090 e8 00 00 00 00 call stbi__zreceive - 00095 83 c0 04 add eax, 4 - 00098 89 85 b4 0a 00 + 00091 e8 00 00 00 00 call stbi__zreceive + 00096 83 c0 04 add eax, 4 + 00099 89 85 b4 0a 00 00 mov DWORD PTR hclen$[rbp], eax ; 3844 : int ntot = hlit + hdist; - 0009e 8b 85 94 0a 00 + 0009f 8b 85 94 0a 00 00 mov eax, DWORD PTR hdist$[rbp] - 000a4 8b 8d 74 0a 00 + 000a5 8b 8d 74 0a 00 00 mov ecx, DWORD PTR hlit$[rbp] - 000aa 03 c8 add ecx, eax - 000ac 8b c1 mov eax, ecx - 000ae 89 85 d4 0a 00 + 000ab 03 c8 add ecx, eax + 000ad 8b c1 mov eax, ecx + 000af 89 85 d4 0a 00 00 mov DWORD PTR ntot$[rbp], eax ; 3845 : ; 3846 : memset(codelength_sizes, 0, sizeof(codelength_sizes)); - 000b4 41 b8 13 00 00 + 000b5 41 b8 13 00 00 00 mov r8d, 19 - 000ba 33 d2 xor edx, edx - 000bc 48 8d 8d 08 0a + 000bb 33 d2 xor edx, edx + 000bd 48 8d 8d 08 0a 00 00 lea rcx, QWORD PTR codelength_sizes$[rbp] - 000c3 e8 00 00 00 00 call memset + 000c4 e8 00 00 00 00 call memset + 000c9 90 npad 1 ; 3847 : for (i = 0; i < hclen; ++i) { - 000c8 c7 85 34 0a 00 + 000ca c7 85 34 0a 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 000d2 eb 0e jmp SHORT $LN4@stbi__comp + 000d4 eb 0e jmp SHORT $LN4@stbi__comp $LN2@stbi__comp: - 000d4 8b 85 34 0a 00 + 000d6 8b 85 34 0a 00 00 mov eax, DWORD PTR i$[rbp] - 000da ff c0 inc eax - 000dc 89 85 34 0a 00 + 000dc ff c0 inc eax + 000de 89 85 34 0a 00 00 mov DWORD PTR i$[rbp], eax $LN4@stbi__comp: - 000e2 8b 85 b4 0a 00 + 000e4 8b 85 b4 0a 00 00 mov eax, DWORD PTR hclen$[rbp] - 000e8 39 85 34 0a 00 + 000ea 39 85 34 0a 00 00 cmp DWORD PTR i$[rbp], eax - 000ee 7d 39 jge SHORT $LN3@stbi__comp + 000f0 7d 39 jge SHORT $LN3@stbi__comp ; 3848 : int s = stbi__zreceive(a, 3); - 000f0 ba 03 00 00 00 mov edx, 3 - 000f5 48 8b 8d 00 10 + 000f2 ba 03 00 00 00 mov edx, 3 + 000f7 48 8b 8d 00 10 00 00 mov rcx, QWORD PTR a$[rbp] - 000fc e8 00 00 00 00 call stbi__zreceive - 00101 89 85 f4 0a 00 + 000fe e8 00 00 00 00 call stbi__zreceive + 00103 89 85 f4 0a 00 00 mov DWORD PTR s$6[rbp], eax ; 3849 : codelength_sizes[length_dezigzag[i]] = (stbi_uc)s; - 00107 48 63 85 34 0a + 00109 48 63 85 34 0a 00 00 movsxd rax, DWORD PTR i$[rbp] - 0010e 48 8d 0d 00 00 + 00110 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:?length_dezigzag@?1??stbi__compute_huffman_codes@@9@9 - 00115 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00119 0f b6 8d f4 0a + 00117 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0011b 0f b6 8d f4 0a 00 00 movzx ecx, BYTE PTR s$6[rbp] - 00120 88 8c 05 08 0a + 00122 88 8c 05 08 0a 00 00 mov BYTE PTR codelength_sizes$[rbp+rax], cl ; 3850 : } - 00127 eb ab jmp SHORT $LN2@stbi__comp + 00129 eb ab jmp SHORT $LN2@stbi__comp $LN3@stbi__comp: ; 3851 : if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; - 00129 41 b8 13 00 00 + 0012b 41 b8 13 00 00 00 mov r8d, 19 - 0012f 48 8d 95 08 0a + 00131 48 8d 95 08 0a 00 00 lea rdx, QWORD PTR codelength_sizes$[rbp] - 00136 48 8d 4d 10 lea rcx, QWORD PTR z_codelength$[rbp] - 0013a e8 00 00 00 00 call stbi__zbuild_huffman - 0013f 85 c0 test eax, eax - 00141 75 07 jne SHORT $LN7@stbi__comp - 00143 33 c0 xor eax, eax - 00145 e9 39 02 00 00 jmp $LN1@stbi__comp + 00138 48 8d 4d 10 lea rcx, QWORD PTR z_codelength$[rbp] + 0013c e8 00 00 00 00 call stbi__zbuild_huffman + 00141 85 c0 test eax, eax + 00143 75 07 jne SHORT $LN7@stbi__comp + 00145 33 c0 xor eax, eax + 00147 e9 3a 02 00 00 jmp $LN1@stbi__comp $LN7@stbi__comp: ; 3852 : ; 3853 : n = 0; - 0014a c7 85 54 0a 00 + 0014c c7 85 54 0a 00 00 00 00 00 00 mov DWORD PTR n$[rbp], 0 $LN5@stbi__comp: ; 3854 : while (n < ntot) { - 00154 8b 85 d4 0a 00 + 00156 8b 85 d4 0a 00 00 mov eax, DWORD PTR ntot$[rbp] - 0015a 39 85 54 0a 00 + 0015c 39 85 54 0a 00 00 cmp DWORD PTR n$[rbp], eax - 00160 0f 8d 9f 01 00 + 00162 0f 8d a0 01 00 00 jge $LN6@stbi__comp ; 3855 : int c = stbi__zhuffman_decode(a, &z_codelength); - 00166 48 8d 55 10 lea rdx, QWORD PTR z_codelength$[rbp] - 0016a 48 8b 8d 00 10 + 00168 48 8d 55 10 lea rdx, QWORD PTR z_codelength$[rbp] + 0016c 48 8b 8d 00 10 00 00 mov rcx, QWORD PTR a$[rbp] - 00171 e8 00 00 00 00 call stbi__zhuffman_decode - 00176 89 85 14 0b 00 + 00173 e8 00 00 00 00 call stbi__zhuffman_decode + 00178 89 85 14 0b 00 00 mov DWORD PTR c$7[rbp], eax ; 3856 : if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); - 0017c 83 bd 14 0b 00 + 0017e 83 bd 14 0b 00 00 00 cmp DWORD PTR c$7[rbp], 0 - 00183 7c 09 jl SHORT $LN9@stbi__comp - 00185 83 bd 14 0b 00 + 00185 7c 09 jl SHORT $LN9@stbi__comp + 00187 83 bd 14 0b 00 00 13 cmp DWORD PTR c$7[rbp], 19 - 0018c 7c 11 jl SHORT $LN8@stbi__comp + 0018e 7c 11 jl SHORT $LN8@stbi__comp $LN9@stbi__comp: - 0018e 48 8d 0d 00 00 + 00190 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@MDNKOBMC@bad?5codelengths@ - 00195 e8 00 00 00 00 call stbi__err - 0019a e9 e4 01 00 00 jmp $LN1@stbi__comp + 00197 e8 00 00 00 00 call stbi__err + 0019c e9 e5 01 00 00 jmp $LN1@stbi__comp $LN8@stbi__comp: ; 3857 : if (c < 16) - 0019f 83 bd 14 0b 00 + 001a1 83 bd 14 0b 00 00 10 cmp DWORD PTR c$7[rbp], 16 - 001a6 7d 28 jge SHORT $LN10@stbi__comp + 001a8 7d 28 jge SHORT $LN10@stbi__comp ; 3858 : lencodes[n++] = (stbi_uc)c; - 001a8 48 63 85 54 0a + 001aa 48 63 85 54 0a 00 00 movsxd rax, DWORD PTR n$[rbp] - 001af 0f b6 8d 14 0b + 001b1 0f b6 8d 14 0b 00 00 movzx ecx, BYTE PTR c$7[rbp] - 001b6 88 8c 05 20 08 + 001b8 88 8c 05 20 08 00 00 mov BYTE PTR lencodes$[rbp+rax], cl - 001bd 8b 85 54 0a 00 + 001bf 8b 85 54 0a 00 00 mov eax, DWORD PTR n$[rbp] - 001c3 ff c0 inc eax - 001c5 89 85 54 0a 00 + 001c5 ff c0 inc eax + 001c7 89 85 54 0a 00 00 mov DWORD PTR n$[rbp], eax - 001cb e9 30 01 00 00 jmp $LN11@stbi__comp + 001cd e9 31 01 00 00 jmp $LN11@stbi__comp $LN10@stbi__comp: ; 3859 : else { ; 3860 : stbi_uc fill = 0; - 001d0 c6 85 34 0b 00 + 001d2 c6 85 34 0b 00 00 00 mov BYTE PTR fill$8[rbp], 0 ; 3861 : if (c == 16) { - 001d7 83 bd 14 0b 00 + 001d9 83 bd 14 0b 00 00 10 cmp DWORD PTR c$7[rbp], 16 - 001de 75 4e jne SHORT $LN12@stbi__comp + 001e0 75 4e jne SHORT $LN12@stbi__comp ; 3862 : c = stbi__zreceive(a, 2) + 3; - 001e0 ba 02 00 00 00 mov edx, 2 - 001e5 48 8b 8d 00 10 + 001e2 ba 02 00 00 00 mov edx, 2 + 001e7 48 8b 8d 00 10 00 00 mov rcx, QWORD PTR a$[rbp] - 001ec e8 00 00 00 00 call stbi__zreceive - 001f1 83 c0 03 add eax, 3 - 001f4 89 85 14 0b 00 + 001ee e8 00 00 00 00 call stbi__zreceive + 001f3 83 c0 03 add eax, 3 + 001f6 89 85 14 0b 00 00 mov DWORD PTR c$7[rbp], eax ; 3863 : if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); - 001fa 83 bd 54 0a 00 + 001fc 83 bd 54 0a 00 00 00 cmp DWORD PTR n$[rbp], 0 - 00201 75 11 jne SHORT $LN14@stbi__comp - 00203 48 8d 0d 00 00 + 00203 75 11 jne SHORT $LN14@stbi__comp + 00205 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@MDNKOBMC@bad?5codelengths@ - 0020a e8 00 00 00 00 call stbi__err - 0020f e9 6f 01 00 00 jmp $LN1@stbi__comp + 0020c e8 00 00 00 00 call stbi__err + 00211 e9 70 01 00 00 jmp $LN1@stbi__comp $LN14@stbi__comp: ; 3864 : fill = lencodes[n - 1]; - 00214 8b 85 54 0a 00 + 00216 8b 85 54 0a 00 00 mov eax, DWORD PTR n$[rbp] - 0021a ff c8 dec eax - 0021c 48 98 cdqe - 0021e 0f b6 84 05 20 + 0021c ff c8 dec eax + 0021e 48 98 cdqe + 00220 0f b6 84 05 20 08 00 00 movzx eax, BYTE PTR lencodes$[rbp+rax] - 00226 88 85 34 0b 00 + 00228 88 85 34 0b 00 00 mov BYTE PTR fill$8[rbp], al ; 3865 : } - 0022c eb 5b jmp SHORT $LN13@stbi__comp + 0022e eb 5b jmp SHORT $LN13@stbi__comp $LN12@stbi__comp: ; 3866 : else if (c == 17) { - 0022e 83 bd 14 0b 00 + 00230 83 bd 14 0b 00 00 11 cmp DWORD PTR c$7[rbp], 17 - 00235 75 1c jne SHORT $LN15@stbi__comp + 00237 75 1c jne SHORT $LN15@stbi__comp ; 3867 : c = stbi__zreceive(a, 3) + 3; - 00237 ba 03 00 00 00 mov edx, 3 - 0023c 48 8b 8d 00 10 + 00239 ba 03 00 00 00 mov edx, 3 + 0023e 48 8b 8d 00 10 00 00 mov rcx, QWORD PTR a$[rbp] - 00243 e8 00 00 00 00 call stbi__zreceive - 00248 83 c0 03 add eax, 3 - 0024b 89 85 14 0b 00 + 00245 e8 00 00 00 00 call stbi__zreceive + 0024a 83 c0 03 add eax, 3 + 0024d 89 85 14 0b 00 00 mov DWORD PTR c$7[rbp], eax ; 3868 : } - 00251 eb 36 jmp SHORT $LN16@stbi__comp + 00253 eb 36 jmp SHORT $LN16@stbi__comp $LN15@stbi__comp: ; 3869 : else if (c == 18) { - 00253 83 bd 14 0b 00 + 00255 83 bd 14 0b 00 00 12 cmp DWORD PTR c$7[rbp], 18 - 0025a 75 1c jne SHORT $LN17@stbi__comp + 0025c 75 1c jne SHORT $LN17@stbi__comp ; 3870 : c = stbi__zreceive(a, 7) + 11; - 0025c ba 07 00 00 00 mov edx, 7 - 00261 48 8b 8d 00 10 + 0025e ba 07 00 00 00 mov edx, 7 + 00263 48 8b 8d 00 10 00 00 mov rcx, QWORD PTR a$[rbp] - 00268 e8 00 00 00 00 call stbi__zreceive - 0026d 83 c0 0b add eax, 11 - 00270 89 85 14 0b 00 + 0026a e8 00 00 00 00 call stbi__zreceive + 0026f 83 c0 0b add eax, 11 + 00272 89 85 14 0b 00 00 mov DWORD PTR c$7[rbp], eax ; 3871 : } - 00276 eb 11 jmp SHORT $LN18@stbi__comp + 00278 eb 11 jmp SHORT $LN18@stbi__comp $LN17@stbi__comp: ; 3872 : else { ; 3873 : return stbi__err("bad codelengths", "Corrupt PNG"); - 00278 48 8d 0d 00 00 + 0027a 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@MDNKOBMC@bad?5codelengths@ - 0027f e8 00 00 00 00 call stbi__err - 00284 e9 fa 00 00 00 jmp $LN1@stbi__comp + 00281 e8 00 00 00 00 call stbi__err + 00286 e9 fb 00 00 00 jmp $LN1@stbi__comp $LN18@stbi__comp: $LN16@stbi__comp: $LN13@stbi__comp: @@ -20910,130 +21031,131 @@ $LN13@stbi__comp: ; 3874 : } ; 3875 : if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); - 00289 8b 85 54 0a 00 + 0028b 8b 85 54 0a 00 00 mov eax, DWORD PTR n$[rbp] - 0028f 8b 8d d4 0a 00 + 00291 8b 8d d4 0a 00 00 mov ecx, DWORD PTR ntot$[rbp] - 00295 2b c8 sub ecx, eax - 00297 8b c1 mov eax, ecx - 00299 3b 85 14 0b 00 + 00297 2b c8 sub ecx, eax + 00299 8b c1 mov eax, ecx + 0029b 3b 85 14 0b 00 00 cmp eax, DWORD PTR c$7[rbp] - 0029f 7d 11 jge SHORT $LN19@stbi__comp - 002a1 48 8d 0d 00 00 + 002a1 7d 11 jge SHORT $LN19@stbi__comp + 002a3 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@MDNKOBMC@bad?5codelengths@ - 002a8 e8 00 00 00 00 call stbi__err - 002ad e9 d1 00 00 00 jmp $LN1@stbi__comp + 002aa e8 00 00 00 00 call stbi__err + 002af e9 d2 00 00 00 jmp $LN1@stbi__comp $LN19@stbi__comp: ; 3876 : memset(lencodes + n, fill, c); - 002b2 48 63 85 14 0b + 002b4 48 63 85 14 0b 00 00 movsxd rax, DWORD PTR c$7[rbp] - 002b9 0f b6 8d 34 0b + 002bb 0f b6 8d 34 0b 00 00 movzx ecx, BYTE PTR fill$8[rbp] - 002c0 48 63 95 54 0a + 002c2 48 63 95 54 0a 00 00 movsxd rdx, DWORD PTR n$[rbp] - 002c7 48 8d 94 15 20 + 002c9 48 8d 94 15 20 08 00 00 lea rdx, QWORD PTR lencodes$[rbp+rdx] - 002cf 48 89 95 c8 0f + 002d1 48 89 95 c8 0f 00 00 mov QWORD PTR tv175[rbp], rdx - 002d6 4c 8b c0 mov r8, rax - 002d9 8b d1 mov edx, ecx - 002db 48 8b 85 c8 0f + 002d8 4c 8b c0 mov r8, rax + 002db 8b d1 mov edx, ecx + 002dd 48 8b 85 c8 0f 00 00 mov rax, QWORD PTR tv175[rbp] - 002e2 48 8b c8 mov rcx, rax - 002e5 e8 00 00 00 00 call memset + 002e4 48 8b c8 mov rcx, rax + 002e7 e8 00 00 00 00 call memset + 002ec 90 npad 1 ; 3877 : n += c; - 002ea 8b 85 14 0b 00 + 002ed 8b 85 14 0b 00 00 mov eax, DWORD PTR c$7[rbp] - 002f0 8b 8d 54 0a 00 + 002f3 8b 8d 54 0a 00 00 mov ecx, DWORD PTR n$[rbp] - 002f6 03 c8 add ecx, eax - 002f8 8b c1 mov eax, ecx - 002fa 89 85 54 0a 00 + 002f9 03 c8 add ecx, eax + 002fb 8b c1 mov eax, ecx + 002fd 89 85 54 0a 00 00 mov DWORD PTR n$[rbp], eax $LN11@stbi__comp: ; 3878 : } ; 3879 : } - 00300 e9 4f fe ff ff jmp $LN5@stbi__comp + 00303 e9 4e fe ff ff jmp $LN5@stbi__comp $LN6@stbi__comp: ; 3880 : if (n != ntot) return stbi__err("bad codelengths", "Corrupt PNG"); - 00305 8b 85 d4 0a 00 + 00308 8b 85 d4 0a 00 00 mov eax, DWORD PTR ntot$[rbp] - 0030b 39 85 54 0a 00 + 0030e 39 85 54 0a 00 00 cmp DWORD PTR n$[rbp], eax - 00311 74 0e je SHORT $LN20@stbi__comp - 00313 48 8d 0d 00 00 + 00314 74 0e je SHORT $LN20@stbi__comp + 00316 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@MDNKOBMC@bad?5codelengths@ - 0031a e8 00 00 00 00 call stbi__err - 0031f eb 62 jmp SHORT $LN1@stbi__comp + 0031d e8 00 00 00 00 call stbi__err + 00322 eb 62 jmp SHORT $LN1@stbi__comp $LN20@stbi__comp: ; 3881 : if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; - 00321 48 8b 85 00 10 + 00324 48 8b 85 00 10 00 00 mov rax, QWORD PTR a$[rbp] - 00328 48 83 c0 34 add rax, 52 ; 00000034H - 0032c 44 8b 85 74 0a + 0032b 48 83 c0 34 add rax, 52 ; 00000034H + 0032f 44 8b 85 74 0a 00 00 mov r8d, DWORD PTR hlit$[rbp] - 00333 48 8d 95 20 08 + 00336 48 8d 95 20 08 00 00 lea rdx, QWORD PTR lencodes$[rbp] - 0033a 48 8b c8 mov rcx, rax - 0033d e8 00 00 00 00 call stbi__zbuild_huffman - 00342 85 c0 test eax, eax - 00344 75 04 jne SHORT $LN21@stbi__comp - 00346 33 c0 xor eax, eax - 00348 eb 39 jmp SHORT $LN1@stbi__comp + 0033d 48 8b c8 mov rcx, rax + 00340 e8 00 00 00 00 call stbi__zbuild_huffman + 00345 85 c0 test eax, eax + 00347 75 04 jne SHORT $LN21@stbi__comp + 00349 33 c0 xor eax, eax + 0034b eb 39 jmp SHORT $LN1@stbi__comp $LN21@stbi__comp: ; 3882 : if (!stbi__zbuild_huffman(&a->z_distance, lencodes + hlit, hdist)) return 0; - 0034a 48 63 85 74 0a + 0034d 48 63 85 74 0a 00 00 movsxd rax, DWORD PTR hlit$[rbp] - 00351 48 8d 84 05 20 + 00354 48 8d 84 05 20 08 00 00 lea rax, QWORD PTR lencodes$[rbp+rax] - 00359 48 8b 8d 00 10 + 0035c 48 8b 8d 00 10 00 00 mov rcx, QWORD PTR a$[rbp] - 00360 48 81 c1 18 08 + 00363 48 81 c1 18 08 00 00 add rcx, 2072 ; 00000818H - 00367 44 8b 85 94 0a + 0036a 44 8b 85 94 0a 00 00 mov r8d, DWORD PTR hdist$[rbp] - 0036e 48 8b d0 mov rdx, rax - 00371 e8 00 00 00 00 call stbi__zbuild_huffman - 00376 85 c0 test eax, eax - 00378 75 04 jne SHORT $LN22@stbi__comp - 0037a 33 c0 xor eax, eax - 0037c eb 05 jmp SHORT $LN1@stbi__comp + 00371 48 8b d0 mov rdx, rax + 00374 e8 00 00 00 00 call stbi__zbuild_huffman + 00379 85 c0 test eax, eax + 0037b 75 04 jne SHORT $LN22@stbi__comp + 0037d 33 c0 xor eax, eax + 0037f eb 05 jmp SHORT $LN1@stbi__comp $LN22@stbi__comp: ; 3883 : return 1; - 0037e b8 01 00 00 00 mov eax, 1 + 00381 b8 01 00 00 00 mov eax, 1 $LN1@stbi__comp: ; 3884 : } - 00383 48 8b f8 mov rdi, rax - 00386 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 0038a 48 8d 15 00 00 + 00386 48 8b f8 mov rdi, rax + 00389 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 0038d 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__compute_huffman_codes$rtcFrameData - 00391 e8 00 00 00 00 call _RTC_CheckStackVars - 00396 48 8b c7 mov rax, rdi - 00399 48 8b 8d d0 0f + 00394 e8 00 00 00 00 call _RTC_CheckStackVars + 00399 48 8b c7 mov rax, rdi + 0039c 48 8b 8d d0 0f 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 003a0 48 33 cd xor rcx, rbp - 003a3 e8 00 00 00 00 call __security_check_cookie - 003a8 48 8d a5 e8 0f + 003a3 48 33 cd xor rcx, rbp + 003a6 e8 00 00 00 00 call __security_check_cookie + 003ab 48 8d a5 e8 0f 00 00 lea rsp, QWORD PTR [rbp+4072] - 003af 5f pop rdi - 003b0 5d pop rbp - 003b1 c3 ret 0 + 003b2 5f pop rdi + 003b3 5d pop rbp + 003b4 c3 ret 0 stbi__compute_huffman_codes ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -21060,86 +21182,87 @@ stbi__parse_huffman_block PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 3790 : char* zout = a->zout; - 0001f 48 8b 85 a0 01 + 00020 48 8b 85 a0 01 00 00 mov rax, QWORD PTR a$[rbp] - 00026 48 8b 40 18 mov rax, QWORD PTR [rax+24] - 0002a 48 89 45 08 mov QWORD PTR zout$[rbp], rax + 00027 48 8b 40 18 mov rax, QWORD PTR [rax+24] + 0002b 48 89 45 08 mov QWORD PTR zout$[rbp], rax $LN2@stbi__pars: ; 3791 : for (;;) { ; 3792 : int z = stbi__zhuffman_decode(a, &a->z_length); - 0002e 48 8b 85 a0 01 + 0002f 48 8b 85 a0 01 00 00 mov rax, QWORD PTR a$[rbp] - 00035 48 83 c0 34 add rax, 52 ; 00000034H - 00039 48 8b d0 mov rdx, rax - 0003c 48 8b 8d a0 01 + 00036 48 83 c0 34 add rax, 52 ; 00000034H + 0003a 48 8b d0 mov rdx, rax + 0003d 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00043 e8 00 00 00 00 call stbi__zhuffman_decode - 00048 89 45 24 mov DWORD PTR z$1[rbp], eax + 00044 e8 00 00 00 00 call stbi__zhuffman_decode + 00049 89 45 24 mov DWORD PTR z$1[rbp], eax ; 3793 : if (z < 256) { - 0004b 81 7d 24 00 01 + 0004c 81 7d 24 00 01 00 00 cmp DWORD PTR z$1[rbp], 256 ; 00000100H - 00052 7d 72 jge SHORT $LN11@stbi__pars + 00053 7d 72 jge SHORT $LN11@stbi__pars ; 3794 : if (z < 0) return stbi__err("bad huffman code", "Corrupt PNG"); // error in huffman codes - 00054 83 7d 24 00 cmp DWORD PTR z$1[rbp], 0 - 00058 7d 11 jge SHORT $LN13@stbi__pars - 0005a 48 8d 0d 00 00 + 00055 83 7d 24 00 cmp DWORD PTR z$1[rbp], 0 + 00059 7d 11 jge SHORT $LN13@stbi__pars + 0005b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ - 00061 e8 00 00 00 00 call stbi__err - 00066 e9 83 02 00 00 jmp $LN1@stbi__pars + 00062 e8 00 00 00 00 call stbi__err + 00067 e9 83 02 00 00 jmp $LN1@stbi__pars $LN13@stbi__pars: ; 3795 : if (zout >= a->zout_end) { - 0006b 48 8b 85 a0 01 + 0006c 48 8b 85 a0 01 00 00 mov rax, QWORD PTR a$[rbp] - 00072 48 8b 40 28 mov rax, QWORD PTR [rax+40] - 00076 48 39 45 08 cmp QWORD PTR zout$[rbp], rax - 0007a 72 30 jb SHORT $LN14@stbi__pars + 00073 48 8b 40 28 mov rax, QWORD PTR [rax+40] + 00077 48 39 45 08 cmp QWORD PTR zout$[rbp], rax + 0007b 72 30 jb SHORT $LN14@stbi__pars ; 3796 : if (!stbi__zexpand(a, zout, 1)) return 0; - 0007c 41 b8 01 00 00 + 0007d 41 b8 01 00 00 00 mov r8d, 1 - 00082 48 8b 55 08 mov rdx, QWORD PTR zout$[rbp] - 00086 48 8b 8d a0 01 + 00083 48 8b 55 08 mov rdx, QWORD PTR zout$[rbp] + 00087 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR a$[rbp] - 0008d e8 00 00 00 00 call stbi__zexpand - 00092 85 c0 test eax, eax - 00094 75 07 jne SHORT $LN15@stbi__pars - 00096 33 c0 xor eax, eax - 00098 e9 51 02 00 00 jmp $LN1@stbi__pars + 0008e e8 00 00 00 00 call stbi__zexpand + 00093 85 c0 test eax, eax + 00095 75 07 jne SHORT $LN15@stbi__pars + 00097 33 c0 xor eax, eax + 00099 e9 51 02 00 00 jmp $LN1@stbi__pars $LN15@stbi__pars: ; 3797 : zout = a->zout; - 0009d 48 8b 85 a0 01 + 0009e 48 8b 85 a0 01 00 00 mov rax, QWORD PTR a$[rbp] - 000a4 48 8b 40 18 mov rax, QWORD PTR [rax+24] - 000a8 48 89 45 08 mov QWORD PTR zout$[rbp], rax + 000a5 48 8b 40 18 mov rax, QWORD PTR [rax+24] + 000a9 48 89 45 08 mov QWORD PTR zout$[rbp], rax $LN14@stbi__pars: ; 3798 : } ; 3799 : *zout++ = (char)z; - 000ac 48 8b 45 08 mov rax, QWORD PTR zout$[rbp] - 000b0 0f b6 4d 24 movzx ecx, BYTE PTR z$1[rbp] - 000b4 88 08 mov BYTE PTR [rax], cl - 000b6 48 8b 45 08 mov rax, QWORD PTR zout$[rbp] - 000ba 48 ff c0 inc rax - 000bd 48 89 45 08 mov QWORD PTR zout$[rbp], rax + 000ad 48 8b 45 08 mov rax, QWORD PTR zout$[rbp] + 000b1 0f b6 4d 24 movzx ecx, BYTE PTR z$1[rbp] + 000b5 88 08 mov BYTE PTR [rax], cl + 000b7 48 8b 45 08 mov rax, QWORD PTR zout$[rbp] + 000bb 48 ff c0 inc rax + 000be 48 89 45 08 mov QWORD PTR zout$[rbp], rax ; 3800 : } - 000c1 e9 23 02 00 00 jmp $LN12@stbi__pars + 000c2 e9 23 02 00 00 jmp $LN12@stbi__pars $LN11@stbi__pars: ; 3801 : else { @@ -21147,243 +21270,243 @@ $LN11@stbi__pars: ; 3803 : int len, dist; ; 3804 : if (z == 256) { - 000c6 81 7d 24 00 01 + 000c7 81 7d 24 00 01 00 00 cmp DWORD PTR z$1[rbp], 256 ; 00000100H - 000cd 75 19 jne SHORT $LN16@stbi__pars + 000ce 75 19 jne SHORT $LN16@stbi__pars ; 3805 : a->zout = zout; - 000cf 48 8b 85 a0 01 + 000d0 48 8b 85 a0 01 00 00 mov rax, QWORD PTR a$[rbp] - 000d6 48 8b 4d 08 mov rcx, QWORD PTR zout$[rbp] - 000da 48 89 48 18 mov QWORD PTR [rax+24], rcx + 000d7 48 8b 4d 08 mov rcx, QWORD PTR zout$[rbp] + 000db 48 89 48 18 mov QWORD PTR [rax+24], rcx ; 3806 : return 1; - 000de b8 01 00 00 00 mov eax, 1 - 000e3 e9 06 02 00 00 jmp $LN1@stbi__pars + 000df b8 01 00 00 00 mov eax, 1 + 000e4 e9 06 02 00 00 jmp $LN1@stbi__pars $LN16@stbi__pars: ; 3807 : } ; 3808 : if (z >= 286) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data - 000e8 81 7d 24 1e 01 + 000e9 81 7d 24 1e 01 00 00 cmp DWORD PTR z$1[rbp], 286 ; 0000011eH - 000ef 7c 11 jl SHORT $LN17@stbi__pars - 000f1 48 8d 0d 00 00 + 000f0 7c 11 jl SHORT $LN17@stbi__pars + 000f2 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ - 000f8 e8 00 00 00 00 call stbi__err - 000fd e9 ec 01 00 00 jmp $LN1@stbi__pars + 000f9 e8 00 00 00 00 call stbi__err + 000fe e9 ec 01 00 00 jmp $LN1@stbi__pars $LN17@stbi__pars: ; 3809 : z -= 257; - 00102 8b 45 24 mov eax, DWORD PTR z$1[rbp] - 00105 2d 01 01 00 00 sub eax, 257 ; 00000101H - 0010a 89 45 24 mov DWORD PTR z$1[rbp], eax + 00103 8b 45 24 mov eax, DWORD PTR z$1[rbp] + 00106 2d 01 01 00 00 sub eax, 257 ; 00000101H + 0010b 89 45 24 mov DWORD PTR z$1[rbp], eax ; 3810 : len = stbi__zlength_base[z]; - 0010d 48 63 45 24 movsxd rax, DWORD PTR z$1[rbp] - 00111 48 8d 0d 00 00 + 0010e 48 63 45 24 movsxd rax, DWORD PTR z$1[rbp] + 00112 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__zlength_base - 00118 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] - 0011b 89 45 64 mov DWORD PTR len$3[rbp], eax + 00119 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] + 0011c 89 45 64 mov DWORD PTR len$3[rbp], eax ; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); - 0011e 48 63 45 24 movsxd rax, DWORD PTR z$1[rbp] - 00122 48 8d 0d 00 00 + 0011f 48 63 45 24 movsxd rax, DWORD PTR z$1[rbp] + 00123 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__zlength_extra - 00129 83 3c 81 00 cmp DWORD PTR [rcx+rax*4], 0 - 0012d 74 24 je SHORT $LN18@stbi__pars - 0012f 48 63 45 24 movsxd rax, DWORD PTR z$1[rbp] - 00133 48 8d 0d 00 00 + 0012a 83 3c 81 00 cmp DWORD PTR [rcx+rax*4], 0 + 0012e 74 24 je SHORT $LN18@stbi__pars + 00130 48 63 45 24 movsxd rax, DWORD PTR z$1[rbp] + 00134 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__zlength_extra - 0013a 8b 14 81 mov edx, DWORD PTR [rcx+rax*4] - 0013d 48 8b 8d a0 01 + 0013b 8b 14 81 mov edx, DWORD PTR [rcx+rax*4] + 0013e 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00144 e8 00 00 00 00 call stbi__zreceive - 00149 8b 4d 64 mov ecx, DWORD PTR len$3[rbp] - 0014c 03 c8 add ecx, eax - 0014e 8b c1 mov eax, ecx - 00150 89 45 64 mov DWORD PTR len$3[rbp], eax + 00145 e8 00 00 00 00 call stbi__zreceive + 0014a 8b 4d 64 mov ecx, DWORD PTR len$3[rbp] + 0014d 03 c8 add ecx, eax + 0014f 8b c1 mov eax, ecx + 00151 89 45 64 mov DWORD PTR len$3[rbp], eax $LN18@stbi__pars: ; 3812 : z = stbi__zhuffman_decode(a, &a->z_distance); - 00153 48 8b 85 a0 01 + 00154 48 8b 85 a0 01 00 00 mov rax, QWORD PTR a$[rbp] - 0015a 48 05 18 08 00 + 0015b 48 05 18 08 00 00 add rax, 2072 ; 00000818H - 00160 48 8b d0 mov rdx, rax - 00163 48 8b 8d a0 01 + 00161 48 8b d0 mov rdx, rax + 00164 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR a$[rbp] - 0016a e8 00 00 00 00 call stbi__zhuffman_decode - 0016f 89 45 24 mov DWORD PTR z$1[rbp], eax + 0016b e8 00 00 00 00 call stbi__zhuffman_decode + 00170 89 45 24 mov DWORD PTR z$1[rbp], eax ; 3813 : if (z < 0 || z >= 30) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data - 00172 83 7d 24 00 cmp DWORD PTR z$1[rbp], 0 - 00176 7c 06 jl SHORT $LN20@stbi__pars - 00178 83 7d 24 1e cmp DWORD PTR z$1[rbp], 30 - 0017c 7c 11 jl SHORT $LN19@stbi__pars + 00173 83 7d 24 00 cmp DWORD PTR z$1[rbp], 0 + 00177 7c 06 jl SHORT $LN20@stbi__pars + 00179 83 7d 24 1e cmp DWORD PTR z$1[rbp], 30 + 0017d 7c 11 jl SHORT $LN19@stbi__pars $LN20@stbi__pars: - 0017e 48 8d 0d 00 00 + 0017f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ - 00185 e8 00 00 00 00 call stbi__err - 0018a e9 5f 01 00 00 jmp $LN1@stbi__pars + 00186 e8 00 00 00 00 call stbi__err + 0018b e9 5f 01 00 00 jmp $LN1@stbi__pars $LN19@stbi__pars: ; 3814 : dist = stbi__zdist_base[z]; - 0018f 48 63 45 24 movsxd rax, DWORD PTR z$1[rbp] - 00193 48 8d 0d 00 00 + 00190 48 63 45 24 movsxd rax, DWORD PTR z$1[rbp] + 00194 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__zdist_base - 0019a 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] - 0019d 89 85 84 00 00 + 0019b 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] + 0019e 89 85 84 00 00 00 mov DWORD PTR dist$4[rbp], eax ; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); - 001a3 48 63 45 24 movsxd rax, DWORD PTR z$1[rbp] - 001a7 48 8d 0d 00 00 + 001a4 48 63 45 24 movsxd rax, DWORD PTR z$1[rbp] + 001a8 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__zdist_extra - 001ae 83 3c 81 00 cmp DWORD PTR [rcx+rax*4], 0 - 001b2 74 2a je SHORT $LN21@stbi__pars - 001b4 48 63 45 24 movsxd rax, DWORD PTR z$1[rbp] - 001b8 48 8d 0d 00 00 + 001af 83 3c 81 00 cmp DWORD PTR [rcx+rax*4], 0 + 001b3 74 2a je SHORT $LN21@stbi__pars + 001b5 48 63 45 24 movsxd rax, DWORD PTR z$1[rbp] + 001b9 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__zdist_extra - 001bf 8b 14 81 mov edx, DWORD PTR [rcx+rax*4] - 001c2 48 8b 8d a0 01 + 001c0 8b 14 81 mov edx, DWORD PTR [rcx+rax*4] + 001c3 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR a$[rbp] - 001c9 e8 00 00 00 00 call stbi__zreceive - 001ce 8b 8d 84 00 00 + 001ca e8 00 00 00 00 call stbi__zreceive + 001cf 8b 8d 84 00 00 00 mov ecx, DWORD PTR dist$4[rbp] - 001d4 03 c8 add ecx, eax - 001d6 8b c1 mov eax, ecx - 001d8 89 85 84 00 00 + 001d5 03 c8 add ecx, eax + 001d7 8b c1 mov eax, ecx + 001d9 89 85 84 00 00 00 mov DWORD PTR dist$4[rbp], eax $LN21@stbi__pars: ; 3816 : if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG"); - 001de 48 8b 85 a0 01 + 001df 48 8b 85 a0 01 00 00 mov rax, QWORD PTR a$[rbp] - 001e5 48 8b 40 20 mov rax, QWORD PTR [rax+32] - 001e9 48 8b 4d 08 mov rcx, QWORD PTR zout$[rbp] - 001ed 48 2b c8 sub rcx, rax - 001f0 48 8b c1 mov rax, rcx - 001f3 48 63 8d 84 00 + 001e6 48 8b 40 20 mov rax, QWORD PTR [rax+32] + 001ea 48 8b 4d 08 mov rcx, QWORD PTR zout$[rbp] + 001ee 48 2b c8 sub rcx, rax + 001f1 48 8b c1 mov rax, rcx + 001f4 48 63 8d 84 00 00 00 movsxd rcx, DWORD PTR dist$4[rbp] - 001fa 48 3b c1 cmp rax, rcx - 001fd 7d 11 jge SHORT $LN22@stbi__pars - 001ff 48 8d 0d 00 00 + 001fb 48 3b c1 cmp rax, rcx + 001fe 7d 11 jge SHORT $LN22@stbi__pars + 00200 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08DIAPIMGJ@bad?5dist@ - 00206 e8 00 00 00 00 call stbi__err - 0020b e9 de 00 00 00 jmp $LN1@stbi__pars + 00207 e8 00 00 00 00 call stbi__err + 0020c e9 de 00 00 00 jmp $LN1@stbi__pars $LN22@stbi__pars: ; 3817 : if (zout + len > a->zout_end) { - 00210 48 63 45 64 movsxd rax, DWORD PTR len$3[rbp] - 00214 48 8b 4d 08 mov rcx, QWORD PTR zout$[rbp] - 00218 48 03 c8 add rcx, rax - 0021b 48 8b c1 mov rax, rcx - 0021e 48 8b 8d a0 01 + 00211 48 63 45 64 movsxd rax, DWORD PTR len$3[rbp] + 00215 48 8b 4d 08 mov rcx, QWORD PTR zout$[rbp] + 00219 48 03 c8 add rcx, rax + 0021c 48 8b c1 mov rax, rcx + 0021f 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00225 48 3b 41 28 cmp rax, QWORD PTR [rcx+40] - 00229 76 2e jbe SHORT $LN23@stbi__pars + 00226 48 3b 41 28 cmp rax, QWORD PTR [rcx+40] + 0022a 76 2e jbe SHORT $LN23@stbi__pars ; 3818 : if (!stbi__zexpand(a, zout, len)) return 0; - 0022b 44 8b 45 64 mov r8d, DWORD PTR len$3[rbp] - 0022f 48 8b 55 08 mov rdx, QWORD PTR zout$[rbp] - 00233 48 8b 8d a0 01 + 0022c 44 8b 45 64 mov r8d, DWORD PTR len$3[rbp] + 00230 48 8b 55 08 mov rdx, QWORD PTR zout$[rbp] + 00234 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR a$[rbp] - 0023a e8 00 00 00 00 call stbi__zexpand - 0023f 85 c0 test eax, eax - 00241 75 07 jne SHORT $LN24@stbi__pars - 00243 33 c0 xor eax, eax - 00245 e9 a4 00 00 00 jmp $LN1@stbi__pars + 0023b e8 00 00 00 00 call stbi__zexpand + 00240 85 c0 test eax, eax + 00242 75 07 jne SHORT $LN24@stbi__pars + 00244 33 c0 xor eax, eax + 00246 e9 a4 00 00 00 jmp $LN1@stbi__pars $LN24@stbi__pars: ; 3819 : zout = a->zout; - 0024a 48 8b 85 a0 01 + 0024b 48 8b 85 a0 01 00 00 mov rax, QWORD PTR a$[rbp] - 00251 48 8b 40 18 mov rax, QWORD PTR [rax+24] - 00255 48 89 45 08 mov QWORD PTR zout$[rbp], rax + 00252 48 8b 40 18 mov rax, QWORD PTR [rax+24] + 00256 48 89 45 08 mov QWORD PTR zout$[rbp], rax $LN23@stbi__pars: ; 3820 : } ; 3821 : p = (stbi_uc*)(zout - dist); - 00259 48 63 85 84 00 + 0025a 48 63 85 84 00 00 00 movsxd rax, DWORD PTR dist$4[rbp] - 00260 48 8b 4d 08 mov rcx, QWORD PTR zout$[rbp] - 00264 48 2b c8 sub rcx, rax - 00267 48 8b c1 mov rax, rcx - 0026a 48 89 45 48 mov QWORD PTR p$2[rbp], rax + 00261 48 8b 4d 08 mov rcx, QWORD PTR zout$[rbp] + 00265 48 2b c8 sub rcx, rax + 00268 48 8b c1 mov rax, rcx + 0026b 48 89 45 48 mov QWORD PTR p$2[rbp], rax ; 3822 : if (dist == 1) { // run of one byte; common in images. - 0026e 83 bd 84 00 00 + 0026f 83 bd 84 00 00 00 01 cmp DWORD PTR dist$4[rbp], 1 - 00275 75 3b jne SHORT $LN25@stbi__pars + 00276 75 3b jne SHORT $LN25@stbi__pars ; 3823 : stbi_uc v = *p; - 00277 48 8b 45 48 mov rax, QWORD PTR p$2[rbp] - 0027b 0f b6 00 movzx eax, BYTE PTR [rax] - 0027e 88 85 a4 00 00 + 00278 48 8b 45 48 mov rax, QWORD PTR p$2[rbp] + 0027c 0f b6 00 movzx eax, BYTE PTR [rax] + 0027f 88 85 a4 00 00 00 mov BYTE PTR v$5[rbp], al ; 3824 : if (len) { do *zout++ = v; while (--len); } - 00284 83 7d 64 00 cmp DWORD PTR len$3[rbp], 0 - 00288 74 26 je SHORT $LN27@stbi__pars + 00285 83 7d 64 00 cmp DWORD PTR len$3[rbp], 0 + 00289 74 26 je SHORT $LN27@stbi__pars $LN7@stbi__pars: - 0028a 48 8b 45 08 mov rax, QWORD PTR zout$[rbp] - 0028e 0f b6 8d a4 00 + 0028b 48 8b 45 08 mov rax, QWORD PTR zout$[rbp] + 0028f 0f b6 8d a4 00 00 00 movzx ecx, BYTE PTR v$5[rbp] - 00295 88 08 mov BYTE PTR [rax], cl - 00297 48 8b 45 08 mov rax, QWORD PTR zout$[rbp] - 0029b 48 ff c0 inc rax - 0029e 48 89 45 08 mov QWORD PTR zout$[rbp], rax - 002a2 8b 45 64 mov eax, DWORD PTR len$3[rbp] - 002a5 ff c8 dec eax - 002a7 89 45 64 mov DWORD PTR len$3[rbp], eax - 002aa 83 7d 64 00 cmp DWORD PTR len$3[rbp], 0 - 002ae 75 da jne SHORT $LN7@stbi__pars + 00296 88 08 mov BYTE PTR [rax], cl + 00298 48 8b 45 08 mov rax, QWORD PTR zout$[rbp] + 0029c 48 ff c0 inc rax + 0029f 48 89 45 08 mov QWORD PTR zout$[rbp], rax + 002a3 8b 45 64 mov eax, DWORD PTR len$3[rbp] + 002a6 ff c8 dec eax + 002a8 89 45 64 mov DWORD PTR len$3[rbp], eax + 002ab 83 7d 64 00 cmp DWORD PTR len$3[rbp], 0 + 002af 75 da jne SHORT $LN7@stbi__pars $LN27@stbi__pars: ; 3825 : } - 002b0 eb 37 jmp SHORT $LN26@stbi__pars + 002b1 eb 37 jmp SHORT $LN26@stbi__pars $LN25@stbi__pars: ; 3826 : else { ; 3827 : if (len) { do *zout++ = *p++; while (--len); } - 002b2 83 7d 64 00 cmp DWORD PTR len$3[rbp], 0 - 002b6 74 31 je SHORT $LN28@stbi__pars + 002b3 83 7d 64 00 cmp DWORD PTR len$3[rbp], 0 + 002b7 74 31 je SHORT $LN28@stbi__pars $LN10@stbi__pars: - 002b8 48 8b 45 08 mov rax, QWORD PTR zout$[rbp] - 002bc 48 8b 4d 48 mov rcx, QWORD PTR p$2[rbp] - 002c0 0f b6 09 movzx ecx, BYTE PTR [rcx] - 002c3 88 08 mov BYTE PTR [rax], cl - 002c5 48 8b 45 08 mov rax, QWORD PTR zout$[rbp] - 002c9 48 ff c0 inc rax - 002cc 48 89 45 08 mov QWORD PTR zout$[rbp], rax - 002d0 48 8b 45 48 mov rax, QWORD PTR p$2[rbp] - 002d4 48 ff c0 inc rax - 002d7 48 89 45 48 mov QWORD PTR p$2[rbp], rax - 002db 8b 45 64 mov eax, DWORD PTR len$3[rbp] - 002de ff c8 dec eax - 002e0 89 45 64 mov DWORD PTR len$3[rbp], eax - 002e3 83 7d 64 00 cmp DWORD PTR len$3[rbp], 0 - 002e7 75 cf jne SHORT $LN10@stbi__pars + 002b9 48 8b 45 08 mov rax, QWORD PTR zout$[rbp] + 002bd 48 8b 4d 48 mov rcx, QWORD PTR p$2[rbp] + 002c1 0f b6 09 movzx ecx, BYTE PTR [rcx] + 002c4 88 08 mov BYTE PTR [rax], cl + 002c6 48 8b 45 08 mov rax, QWORD PTR zout$[rbp] + 002ca 48 ff c0 inc rax + 002cd 48 89 45 08 mov QWORD PTR zout$[rbp], rax + 002d1 48 8b 45 48 mov rax, QWORD PTR p$2[rbp] + 002d5 48 ff c0 inc rax + 002d8 48 89 45 48 mov QWORD PTR p$2[rbp], rax + 002dc 8b 45 64 mov eax, DWORD PTR len$3[rbp] + 002df ff c8 dec eax + 002e1 89 45 64 mov DWORD PTR len$3[rbp], eax + 002e4 83 7d 64 00 cmp DWORD PTR len$3[rbp], 0 + 002e8 75 cf jne SHORT $LN10@stbi__pars $LN28@stbi__pars: $LN26@stbi__pars: $LN12@stbi__pars: @@ -21392,16 +21515,16 @@ $LN12@stbi__pars: ; 3829 : } ; 3830 : } - 002e9 e9 40 fd ff ff jmp $LN2@stbi__pars + 002ea e9 40 fd ff ff jmp $LN2@stbi__pars $LN1@stbi__pars: ; 3831 : } - 002ee 48 8d a5 88 01 + 002ef 48 8d a5 88 01 00 00 lea rsp, QWORD PTR [rbp+392] - 002f5 5f pop rdi - 002f6 5d pop rbp - 002f7 c3 ret 0 + 002f6 5f pop rdi + 002f7 5d pop rbp + 002f8 c3 ret 0 stbi__parse_huffman_block ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -21430,160 +21553,161 @@ stbi__zexpand PROC ; COMDAT 0001d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00024 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00029 90 npad 1 ; 3754 : char* q; ; 3755 : unsigned int cur, limit, old_limit; ; 3756 : z->zout = zout; - 00029 48 8b 85 60 01 + 0002a 48 8b 85 60 01 00 00 mov rax, QWORD PTR z$[rbp] - 00030 48 8b 8d 68 01 + 00031 48 8b 8d 68 01 00 00 mov rcx, QWORD PTR zout$[rbp] - 00037 48 89 48 18 mov QWORD PTR [rax+24], rcx + 00038 48 89 48 18 mov QWORD PTR [rax+24], rcx ; 3757 : if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG"); - 0003b 48 8b 85 60 01 + 0003c 48 8b 85 60 01 00 00 mov rax, QWORD PTR z$[rbp] - 00042 83 78 30 00 cmp DWORD PTR [rax+48], 0 - 00046 75 11 jne SHORT $LN4@stbi__zexp - 00048 48 8d 0d 00 00 + 00043 83 78 30 00 cmp DWORD PTR [rax+48], 0 + 00047 75 11 jne SHORT $LN4@stbi__zexp + 00049 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BE@IBFIPFO@output?5buffer?5limit@ - 0004f e8 00 00 00 00 call stbi__err - 00054 e9 05 01 00 00 jmp $LN1@stbi__zexp + 00050 e8 00 00 00 00 call stbi__err + 00055 e9 05 01 00 00 jmp $LN1@stbi__zexp $LN4@stbi__zexp: ; 3758 : cur = (unsigned int)(z->zout - z->zout_start); - 00059 48 8b 85 60 01 + 0005a 48 8b 85 60 01 00 00 mov rax, QWORD PTR z$[rbp] - 00060 48 8b 8d 60 01 + 00061 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00067 48 8b 49 20 mov rcx, QWORD PTR [rcx+32] - 0006b 48 8b 40 18 mov rax, QWORD PTR [rax+24] - 0006f 48 2b c1 sub rax, rcx - 00072 89 45 24 mov DWORD PTR cur$[rbp], eax + 00068 48 8b 49 20 mov rcx, QWORD PTR [rcx+32] + 0006c 48 8b 40 18 mov rax, QWORD PTR [rax+24] + 00070 48 2b c1 sub rax, rcx + 00073 89 45 24 mov DWORD PTR cur$[rbp], eax ; 3759 : limit = old_limit = (unsigned)(z->zout_end - z->zout_start); - 00075 48 8b 85 60 01 + 00076 48 8b 85 60 01 00 00 mov rax, QWORD PTR z$[rbp] - 0007c 48 8b 8d 60 01 + 0007d 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00083 48 8b 49 20 mov rcx, QWORD PTR [rcx+32] - 00087 48 8b 40 28 mov rax, QWORD PTR [rax+40] - 0008b 48 2b c1 sub rax, rcx - 0008e 89 45 64 mov DWORD PTR old_limit$[rbp], eax - 00091 8b 45 64 mov eax, DWORD PTR old_limit$[rbp] - 00094 89 45 44 mov DWORD PTR limit$[rbp], eax + 00084 48 8b 49 20 mov rcx, QWORD PTR [rcx+32] + 00088 48 8b 40 28 mov rax, QWORD PTR [rax+40] + 0008c 48 2b c1 sub rax, rcx + 0008f 89 45 64 mov DWORD PTR old_limit$[rbp], eax + 00092 8b 45 64 mov eax, DWORD PTR old_limit$[rbp] + 00095 89 45 44 mov DWORD PTR limit$[rbp], eax ; 3760 : if (UINT_MAX - cur < (unsigned)n) return stbi__err("outofmem", "Out of memory"); - 00097 b8 ff ff ff ff mov eax, -1 ; ffffffffH - 0009c 2b 45 24 sub eax, DWORD PTR cur$[rbp] - 0009f 3b 85 70 01 00 + 00098 b8 ff ff ff ff mov eax, -1 ; ffffffffH + 0009d 2b 45 24 sub eax, DWORD PTR cur$[rbp] + 000a0 3b 85 70 01 00 00 cmp eax, DWORD PTR n$[rbp] - 000a5 73 11 jae SHORT $LN5@stbi__zexp - 000a7 48 8d 0d 00 00 + 000a6 73 11 jae SHORT $LN5@stbi__zexp + 000a8 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 000ae e8 00 00 00 00 call stbi__err - 000b3 e9 a6 00 00 00 jmp $LN1@stbi__zexp + 000af e8 00 00 00 00 call stbi__err + 000b4 e9 a6 00 00 00 jmp $LN1@stbi__zexp $LN5@stbi__zexp: $LN2@stbi__zexp: ; 3761 : while (cur + n > limit) { - 000b8 8b 85 70 01 00 + 000b9 8b 85 70 01 00 00 mov eax, DWORD PTR n$[rbp] - 000be 8b 4d 24 mov ecx, DWORD PTR cur$[rbp] - 000c1 03 c8 add ecx, eax - 000c3 8b c1 mov eax, ecx - 000c5 3b 45 44 cmp eax, DWORD PTR limit$[rbp] - 000c8 76 21 jbe SHORT $LN3@stbi__zexp + 000bf 8b 4d 24 mov ecx, DWORD PTR cur$[rbp] + 000c2 03 c8 add ecx, eax + 000c4 8b c1 mov eax, ecx + 000c6 3b 45 44 cmp eax, DWORD PTR limit$[rbp] + 000c9 76 21 jbe SHORT $LN3@stbi__zexp ; 3762 : if (limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); - 000ca 81 7d 44 ff ff + 000cb 81 7d 44 ff ff ff 7f cmp DWORD PTR limit$[rbp], 2147483647 ; 7fffffffH - 000d1 76 0e jbe SHORT $LN6@stbi__zexp - 000d3 48 8d 0d 00 00 + 000d2 76 0e jbe SHORT $LN6@stbi__zexp + 000d4 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 000da e8 00 00 00 00 call stbi__err - 000df eb 7d jmp SHORT $LN1@stbi__zexp + 000db e8 00 00 00 00 call stbi__err + 000e0 eb 7d jmp SHORT $LN1@stbi__zexp $LN6@stbi__zexp: ; 3763 : limit *= 2; - 000e1 8b 45 44 mov eax, DWORD PTR limit$[rbp] - 000e4 d1 e0 shl eax, 1 - 000e6 89 45 44 mov DWORD PTR limit$[rbp], eax + 000e2 8b 45 44 mov eax, DWORD PTR limit$[rbp] + 000e5 d1 e0 shl eax, 1 + 000e7 89 45 44 mov DWORD PTR limit$[rbp], eax ; 3764 : } - 000e9 eb cd jmp SHORT $LN2@stbi__zexp + 000ea eb cd jmp SHORT $LN2@stbi__zexp $LN3@stbi__zexp: ; 3765 : q = (char*)STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); - 000eb 8b 45 44 mov eax, DWORD PTR limit$[rbp] - 000ee 8b d0 mov edx, eax - 000f0 48 8b 85 60 01 + 000ec 8b 45 44 mov eax, DWORD PTR limit$[rbp] + 000ef 8b d0 mov edx, eax + 000f1 48 8b 85 60 01 00 00 mov rax, QWORD PTR z$[rbp] - 000f7 48 8b 48 20 mov rcx, QWORD PTR [rax+32] - 000fb ff 15 00 00 00 + 000f8 48 8b 48 20 mov rcx, QWORD PTR [rax+32] + 000fc ff 15 00 00 00 00 call QWORD PTR __imp_realloc - 00101 48 89 45 08 mov QWORD PTR q$[rbp], rax + 00102 48 89 45 08 mov QWORD PTR q$[rbp], rax ; 3766 : STBI_NOTUSED(old_limit); ; 3767 : if (q == NULL) return stbi__err("outofmem", "Out of memory"); - 00105 48 83 7d 08 00 cmp QWORD PTR q$[rbp], 0 - 0010a 75 0e jne SHORT $LN7@stbi__zexp - 0010c 48 8d 0d 00 00 + 00106 48 83 7d 08 00 cmp QWORD PTR q$[rbp], 0 + 0010b 75 0e jne SHORT $LN7@stbi__zexp + 0010d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 00113 e8 00 00 00 00 call stbi__err - 00118 eb 44 jmp SHORT $LN1@stbi__zexp + 00114 e8 00 00 00 00 call stbi__err + 00119 eb 44 jmp SHORT $LN1@stbi__zexp $LN7@stbi__zexp: ; 3768 : z->zout_start = q; - 0011a 48 8b 85 60 01 + 0011b 48 8b 85 60 01 00 00 mov rax, QWORD PTR z$[rbp] - 00121 48 8b 4d 08 mov rcx, QWORD PTR q$[rbp] - 00125 48 89 48 20 mov QWORD PTR [rax+32], rcx + 00122 48 8b 4d 08 mov rcx, QWORD PTR q$[rbp] + 00126 48 89 48 20 mov QWORD PTR [rax+32], rcx ; 3769 : z->zout = q + cur; - 00129 8b 45 24 mov eax, DWORD PTR cur$[rbp] - 0012c 48 8b 4d 08 mov rcx, QWORD PTR q$[rbp] - 00130 48 03 c8 add rcx, rax - 00133 48 8b c1 mov rax, rcx - 00136 48 8b 8d 60 01 + 0012a 8b 45 24 mov eax, DWORD PTR cur$[rbp] + 0012d 48 8b 4d 08 mov rcx, QWORD PTR q$[rbp] + 00131 48 03 c8 add rcx, rax + 00134 48 8b c1 mov rax, rcx + 00137 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0013d 48 89 41 18 mov QWORD PTR [rcx+24], rax + 0013e 48 89 41 18 mov QWORD PTR [rcx+24], rax ; 3770 : z->zout_end = q + limit; - 00141 8b 45 44 mov eax, DWORD PTR limit$[rbp] - 00144 48 8b 4d 08 mov rcx, QWORD PTR q$[rbp] - 00148 48 03 c8 add rcx, rax - 0014b 48 8b c1 mov rax, rcx - 0014e 48 8b 8d 60 01 + 00142 8b 45 44 mov eax, DWORD PTR limit$[rbp] + 00145 48 8b 4d 08 mov rcx, QWORD PTR q$[rbp] + 00149 48 03 c8 add rcx, rax + 0014c 48 8b c1 mov rax, rcx + 0014f 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00155 48 89 41 28 mov QWORD PTR [rcx+40], rax + 00156 48 89 41 28 mov QWORD PTR [rcx+40], rax ; 3771 : return 1; - 00159 b8 01 00 00 00 mov eax, 1 + 0015a b8 01 00 00 00 mov eax, 1 $LN1@stbi__zexp: ; 3772 : } - 0015e 48 8d a5 48 01 + 0015f 48 8d a5 48 01 00 00 lea rsp, QWORD PTR [rbp+328] - 00165 5f pop rdi - 00166 5d pop rbp - 00167 c3 ret 0 + 00166 5f pop rdi + 00167 5d pop rbp + 00168 c3 ret 0 stbi__zexpand ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -21609,112 +21733,114 @@ stbi__zhuffman_decode PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 3735 : int b, s; ; 3736 : if (a->num_bits < 16) { - 00024 48 8b 85 20 01 + 00025 48 8b 85 20 01 00 00 mov rax, QWORD PTR a$[rbp] - 0002b 83 78 10 10 cmp DWORD PTR [rax+16], 16 - 0002f 7d 26 jge SHORT $LN2@stbi__zhuf + 0002c 83 78 10 10 cmp DWORD PTR [rax+16], 16 + 00030 7d 27 jge SHORT $LN2@stbi__zhuf ; 3737 : if (stbi__zeof(a)) { - 00031 48 8b 8d 20 01 + 00032 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00038 e8 00 00 00 00 call stbi__zeof - 0003d 85 c0 test eax, eax - 0003f 74 0a je SHORT $LN3@stbi__zhuf + 00039 e8 00 00 00 00 call stbi__zeof + 0003e 85 c0 test eax, eax + 00040 74 0a je SHORT $LN3@stbi__zhuf ; 3738 : return -1; /* report error for unexpected end of data. */ - 00041 b8 ff ff ff ff mov eax, -1 - 00046 e9 9a 00 00 00 jmp $LN1@stbi__zhuf + 00042 b8 ff ff ff ff mov eax, -1 + 00047 e9 9b 00 00 00 jmp $LN1@stbi__zhuf $LN3@stbi__zhuf: ; 3739 : } ; 3740 : stbi__fill_bits(a); - 0004b 48 8b 8d 20 01 + 0004c 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00052 e8 00 00 00 00 call stbi__fill_bits + 00053 e8 00 00 00 00 call stbi__fill_bits + 00058 90 npad 1 $LN2@stbi__zhuf: ; 3741 : } ; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; - 00057 48 8b 85 20 01 + 00059 48 8b 85 20 01 00 00 mov rax, QWORD PTR a$[rbp] - 0005e 8b 40 14 mov eax, DWORD PTR [rax+20] - 00061 25 ff 01 00 00 and eax, 511 ; 000001ffH - 00066 8b c0 mov eax, eax - 00068 48 8b 8d 28 01 + 00060 8b 40 14 mov eax, DWORD PTR [rax+20] + 00063 25 ff 01 00 00 and eax, 511 ; 000001ffH + 00068 8b c0 mov eax, eax + 0006a 48 8b 8d 28 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0006f 0f b7 04 41 movzx eax, WORD PTR [rcx+rax*2] - 00073 89 45 04 mov DWORD PTR b$[rbp], eax + 00071 0f b7 04 41 movzx eax, WORD PTR [rcx+rax*2] + 00075 89 45 04 mov DWORD PTR b$[rbp], eax ; 3743 : if (b) { - 00076 83 7d 04 00 cmp DWORD PTR b$[rbp], 0 - 0007a 74 56 je SHORT $LN4@stbi__zhuf + 00078 83 7d 04 00 cmp DWORD PTR b$[rbp], 0 + 0007c 74 56 je SHORT $LN4@stbi__zhuf ; 3744 : s = b >> 9; - 0007c 8b 45 04 mov eax, DWORD PTR b$[rbp] - 0007f c1 f8 09 sar eax, 9 - 00082 89 45 24 mov DWORD PTR s$[rbp], eax + 0007e 8b 45 04 mov eax, DWORD PTR b$[rbp] + 00081 c1 f8 09 sar eax, 9 + 00084 89 45 24 mov DWORD PTR s$[rbp], eax ; 3745 : a->code_buffer >>= s; - 00085 8b 45 24 mov eax, DWORD PTR s$[rbp] - 00088 48 8b 8d 20 01 + 00087 8b 45 24 mov eax, DWORD PTR s$[rbp] + 0008a 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR a$[rbp] - 0008f 48 89 8d f8 00 + 00091 48 89 8d f8 00 00 00 mov QWORD PTR tv133[rbp], rcx - 00096 0f b6 c8 movzx ecx, al - 00099 48 8b 85 f8 00 + 00098 0f b6 c8 movzx ecx, al + 0009b 48 8b 85 f8 00 00 00 mov rax, QWORD PTR tv133[rbp] - 000a0 8b 40 14 mov eax, DWORD PTR [rax+20] - 000a3 d3 e8 shr eax, cl - 000a5 48 8b 8d 20 01 + 000a2 8b 40 14 mov eax, DWORD PTR [rax+20] + 000a5 d3 e8 shr eax, cl + 000a7 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR a$[rbp] - 000ac 89 41 14 mov DWORD PTR [rcx+20], eax + 000ae 89 41 14 mov DWORD PTR [rcx+20], eax ; 3746 : a->num_bits -= s; - 000af 48 8b 85 20 01 + 000b1 48 8b 85 20 01 00 00 mov rax, QWORD PTR a$[rbp] - 000b6 8b 4d 24 mov ecx, DWORD PTR s$[rbp] - 000b9 8b 40 10 mov eax, DWORD PTR [rax+16] - 000bc 2b c1 sub eax, ecx - 000be 48 8b 8d 20 01 + 000b8 8b 4d 24 mov ecx, DWORD PTR s$[rbp] + 000bb 8b 40 10 mov eax, DWORD PTR [rax+16] + 000be 2b c1 sub eax, ecx + 000c0 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR a$[rbp] - 000c5 89 41 10 mov DWORD PTR [rcx+16], eax + 000c7 89 41 10 mov DWORD PTR [rcx+16], eax ; 3747 : return b & 511; - 000c8 8b 45 04 mov eax, DWORD PTR b$[rbp] - 000cb 25 ff 01 00 00 and eax, 511 ; 000001ffH - 000d0 eb 13 jmp SHORT $LN1@stbi__zhuf + 000ca 8b 45 04 mov eax, DWORD PTR b$[rbp] + 000cd 25 ff 01 00 00 and eax, 511 ; 000001ffH + 000d2 eb 13 jmp SHORT $LN1@stbi__zhuf $LN4@stbi__zhuf: ; 3748 : } ; 3749 : return stbi__zhuffman_decode_slowpath(a, z); - 000d2 48 8b 95 28 01 + 000d4 48 8b 95 28 01 00 00 mov rdx, QWORD PTR z$[rbp] - 000d9 48 8b 8d 20 01 + 000db 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR a$[rbp] - 000e0 e8 00 00 00 00 call stbi__zhuffman_decode_slowpath + 000e2 e8 00 00 00 00 call stbi__zhuffman_decode_slowpath $LN1@stbi__zhuf: ; 3750 : } - 000e5 48 8d a5 08 01 + 000e7 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000ec 5f pop rdi - 000ed 5d pop rbp - 000ee c3 ret 0 + 000ee 5f pop rdi + 000ef 5d pop rbp + 000f0 c3 ret 0 stbi__zhuffman_decode ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -21741,142 +21867,143 @@ stbi__zhuffman_decode_slowpath PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 3716 : int b, s, k; ; 3717 : // not resolved by fast table, so compute it the slow way ; 3718 : // use jpeg approach, which requires MSbits at top ; 3719 : k = stbi__bit_reverse(a->code_buffer, 16); - 00024 ba 10 00 00 00 mov edx, 16 - 00029 48 8b 85 40 01 + 00025 ba 10 00 00 00 mov edx, 16 + 0002a 48 8b 85 40 01 00 00 mov rax, QWORD PTR a$[rbp] - 00030 8b 48 14 mov ecx, DWORD PTR [rax+20] - 00033 e8 00 00 00 00 call stbi__bit_reverse - 00038 89 45 44 mov DWORD PTR k$[rbp], eax + 00031 8b 48 14 mov ecx, DWORD PTR [rax+20] + 00034 e8 00 00 00 00 call stbi__bit_reverse + 00039 89 45 44 mov DWORD PTR k$[rbp], eax ; 3720 : for (s = STBI__ZFAST_BITS + 1; ; ++s) - 0003b c7 45 24 0a 00 + 0003c c7 45 24 0a 00 00 00 mov DWORD PTR s$[rbp], 10 - 00042 eb 08 jmp SHORT $LN4@stbi__zhuf + 00043 eb 08 jmp SHORT $LN4@stbi__zhuf $LN2@stbi__zhuf: - 00044 8b 45 24 mov eax, DWORD PTR s$[rbp] - 00047 ff c0 inc eax - 00049 89 45 24 mov DWORD PTR s$[rbp], eax + 00045 8b 45 24 mov eax, DWORD PTR s$[rbp] + 00048 ff c0 inc eax + 0004a 89 45 24 mov DWORD PTR s$[rbp], eax $LN4@stbi__zhuf: ; 3721 : if (k < z->maxcode[s]) - 0004c 48 63 45 24 movsxd rax, DWORD PTR s$[rbp] - 00050 48 8b 8d 48 01 + 0004d 48 63 45 24 movsxd rax, DWORD PTR s$[rbp] + 00051 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00057 8b 84 81 20 04 + 00058 8b 84 81 20 04 00 00 mov eax, DWORD PTR [rcx+rax*4+1056] - 0005e 39 45 44 cmp DWORD PTR k$[rbp], eax - 00061 7d 02 jge SHORT $LN5@stbi__zhuf + 0005f 39 45 44 cmp DWORD PTR k$[rbp], eax + 00062 7d 02 jge SHORT $LN5@stbi__zhuf ; 3722 : break; - 00063 eb 02 jmp SHORT $LN3@stbi__zhuf + 00064 eb 02 jmp SHORT $LN3@stbi__zhuf $LN5@stbi__zhuf: - 00065 eb dd jmp SHORT $LN2@stbi__zhuf + 00066 eb dd jmp SHORT $LN2@stbi__zhuf $LN3@stbi__zhuf: ; 3723 : if (s >= 16) return -1; // invalid code! - 00067 83 7d 24 10 cmp DWORD PTR s$[rbp], 16 - 0006b 7c 0a jl SHORT $LN6@stbi__zhuf - 0006d b8 ff ff ff ff mov eax, -1 - 00072 e9 c2 00 00 00 jmp $LN1@stbi__zhuf + 00068 83 7d 24 10 cmp DWORD PTR s$[rbp], 16 + 0006c 7c 0a jl SHORT $LN6@stbi__zhuf + 0006e b8 ff ff ff ff mov eax, -1 + 00073 e9 c2 00 00 00 jmp $LN1@stbi__zhuf $LN6@stbi__zhuf: ; 3724 : // code size is s, so: ; 3725 : b = (k >> (16 - s)) - z->firstcode[s] + z->firstsymbol[s]; - 00077 b8 10 00 00 00 mov eax, 16 - 0007c 2b 45 24 sub eax, DWORD PTR s$[rbp] - 0007f 0f b6 c8 movzx ecx, al - 00082 8b 45 44 mov eax, DWORD PTR k$[rbp] - 00085 d3 f8 sar eax, cl - 00087 48 63 4d 24 movsxd rcx, DWORD PTR s$[rbp] - 0008b 48 8b 95 48 01 + 00078 b8 10 00 00 00 mov eax, 16 + 0007d 2b 45 24 sub eax, DWORD PTR s$[rbp] + 00080 0f b6 c8 movzx ecx, al + 00083 8b 45 44 mov eax, DWORD PTR k$[rbp] + 00086 d3 f8 sar eax, cl + 00088 48 63 4d 24 movsxd rcx, DWORD PTR s$[rbp] + 0008c 48 8b 95 48 01 00 00 mov rdx, QWORD PTR z$[rbp] - 00092 0f b7 8c 4a 00 + 00093 0f b7 8c 4a 00 04 00 00 movzx ecx, WORD PTR [rdx+rcx*2+1024] - 0009a 2b c1 sub eax, ecx - 0009c 48 63 4d 24 movsxd rcx, DWORD PTR s$[rbp] - 000a0 48 8b 95 48 01 + 0009b 2b c1 sub eax, ecx + 0009d 48 63 4d 24 movsxd rcx, DWORD PTR s$[rbp] + 000a1 48 8b 95 48 01 00 00 mov rdx, QWORD PTR z$[rbp] - 000a7 0f b7 8c 4a 64 + 000a8 0f b7 8c 4a 64 04 00 00 movzx ecx, WORD PTR [rdx+rcx*2+1124] - 000af 03 c1 add eax, ecx - 000b1 89 45 04 mov DWORD PTR b$[rbp], eax + 000b0 03 c1 add eax, ecx + 000b2 89 45 04 mov DWORD PTR b$[rbp], eax ; 3726 : if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! - 000b4 81 7d 04 20 01 + 000b5 81 7d 04 20 01 00 00 cmp DWORD PTR b$[rbp], 288 ; 00000120H - 000bb 7c 07 jl SHORT $LN7@stbi__zhuf - 000bd b8 ff ff ff ff mov eax, -1 - 000c2 eb 75 jmp SHORT $LN1@stbi__zhuf + 000bc 7c 07 jl SHORT $LN7@stbi__zhuf + 000be b8 ff ff ff ff mov eax, -1 + 000c3 eb 75 jmp SHORT $LN1@stbi__zhuf $LN7@stbi__zhuf: ; 3727 : if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. - 000c4 48 63 45 04 movsxd rax, DWORD PTR b$[rbp] - 000c8 48 8b 8d 48 01 + 000c5 48 63 45 04 movsxd rax, DWORD PTR b$[rbp] + 000c9 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR z$[rbp] - 000cf 0f b6 84 01 84 + 000d0 0f b6 84 01 84 04 00 00 movzx eax, BYTE PTR [rcx+rax+1156] - 000d7 3b 45 24 cmp eax, DWORD PTR s$[rbp] - 000da 74 07 je SHORT $LN8@stbi__zhuf - 000dc b8 ff ff ff ff mov eax, -1 - 000e1 eb 56 jmp SHORT $LN1@stbi__zhuf + 000d8 3b 45 24 cmp eax, DWORD PTR s$[rbp] + 000db 74 07 je SHORT $LN8@stbi__zhuf + 000dd b8 ff ff ff ff mov eax, -1 + 000e2 eb 56 jmp SHORT $LN1@stbi__zhuf $LN8@stbi__zhuf: ; 3728 : a->code_buffer >>= s; - 000e3 8b 45 24 mov eax, DWORD PTR s$[rbp] - 000e6 48 8b 8d 40 01 + 000e4 8b 45 24 mov eax, DWORD PTR s$[rbp] + 000e7 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR a$[rbp] - 000ed 48 89 8d 18 01 + 000ee 48 89 8d 18 01 00 00 mov QWORD PTR tv159[rbp], rcx - 000f4 0f b6 c8 movzx ecx, al - 000f7 48 8b 85 18 01 + 000f5 0f b6 c8 movzx ecx, al + 000f8 48 8b 85 18 01 00 00 mov rax, QWORD PTR tv159[rbp] - 000fe 8b 40 14 mov eax, DWORD PTR [rax+20] - 00101 d3 e8 shr eax, cl - 00103 48 8b 8d 40 01 + 000ff 8b 40 14 mov eax, DWORD PTR [rax+20] + 00102 d3 e8 shr eax, cl + 00104 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR a$[rbp] - 0010a 89 41 14 mov DWORD PTR [rcx+20], eax + 0010b 89 41 14 mov DWORD PTR [rcx+20], eax ; 3729 : a->num_bits -= s; - 0010d 48 8b 85 40 01 + 0010e 48 8b 85 40 01 00 00 mov rax, QWORD PTR a$[rbp] - 00114 8b 4d 24 mov ecx, DWORD PTR s$[rbp] - 00117 8b 40 10 mov eax, DWORD PTR [rax+16] - 0011a 2b c1 sub eax, ecx - 0011c 48 8b 8d 40 01 + 00115 8b 4d 24 mov ecx, DWORD PTR s$[rbp] + 00118 8b 40 10 mov eax, DWORD PTR [rax+16] + 0011b 2b c1 sub eax, ecx + 0011d 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR a$[rbp] - 00123 89 41 10 mov DWORD PTR [rcx+16], eax + 00124 89 41 10 mov DWORD PTR [rcx+16], eax ; 3730 : return z->value[b]; - 00126 48 63 45 04 movsxd rax, DWORD PTR b$[rbp] - 0012a 48 8b 8d 48 01 + 00127 48 63 45 04 movsxd rax, DWORD PTR b$[rbp] + 0012b 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00131 0f b7 84 41 a4 + 00132 0f b7 84 41 a4 05 00 00 movzx eax, WORD PTR [rcx+rax*2+1444] $LN1@stbi__zhuf: ; 3731 : } - 00139 48 8d a5 28 01 + 0013a 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 00140 5f pop rdi - 00141 5d pop rbp - 00142 c3 ret 0 + 00141 5f pop rdi + 00142 5d pop rbp + 00143 c3 ret 0 stbi__zhuffman_decode_slowpath ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -21902,80 +22029,82 @@ stbi__zreceive PROC ; COMDAT 00017 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001e e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00023 90 npad 1 ; 3706 : unsigned int k; ; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - 00023 48 8b 85 00 01 + 00024 48 8b 85 00 01 00 00 mov rax, QWORD PTR z$[rbp] - 0002a 8b 8d 08 01 00 + 0002b 8b 8d 08 01 00 00 mov ecx, DWORD PTR n$[rbp] - 00030 39 48 10 cmp DWORD PTR [rax+16], ecx - 00033 7d 0c jge SHORT $LN2@stbi__zrec - 00035 48 8b 8d 00 01 + 00031 39 48 10 cmp DWORD PTR [rax+16], ecx + 00034 7d 0d jge SHORT $LN2@stbi__zrec + 00036 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0003c e8 00 00 00 00 call stbi__fill_bits + 0003d e8 00 00 00 00 call stbi__fill_bits + 00042 90 npad 1 $LN2@stbi__zrec: ; 3708 : k = z->code_buffer & ((1 << n) - 1); - 00041 8b 85 08 01 00 + 00043 8b 85 08 01 00 00 mov eax, DWORD PTR n$[rbp] - 00047 b9 01 00 00 00 mov ecx, 1 - 0004c 89 8d d4 00 00 + 00049 b9 01 00 00 00 mov ecx, 1 + 0004e 89 8d d4 00 00 00 mov DWORD PTR tv84[rbp], ecx - 00052 0f b6 c8 movzx ecx, al - 00055 8b 85 d4 00 00 + 00054 0f b6 c8 movzx ecx, al + 00057 8b 85 d4 00 00 00 mov eax, DWORD PTR tv84[rbp] - 0005b d3 e0 shl eax, cl - 0005d ff c8 dec eax - 0005f 48 8b 8d 00 01 + 0005d d3 e0 shl eax, cl + 0005f ff c8 dec eax + 00061 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00066 8b 49 14 mov ecx, DWORD PTR [rcx+20] - 00069 23 c8 and ecx, eax - 0006b 8b c1 mov eax, ecx - 0006d 89 45 04 mov DWORD PTR k$[rbp], eax + 00068 8b 49 14 mov ecx, DWORD PTR [rcx+20] + 0006b 23 c8 and ecx, eax + 0006d 8b c1 mov eax, ecx + 0006f 89 45 04 mov DWORD PTR k$[rbp], eax ; 3709 : z->code_buffer >>= n; - 00070 8b 85 08 01 00 + 00072 8b 85 08 01 00 00 mov eax, DWORD PTR n$[rbp] - 00076 48 8b 8d 00 01 + 00078 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0007d 48 89 8d d8 00 + 0007f 48 89 8d d8 00 00 00 mov QWORD PTR tv90[rbp], rcx - 00084 0f b6 c8 movzx ecx, al - 00087 48 8b 85 d8 00 + 00086 0f b6 c8 movzx ecx, al + 00089 48 8b 85 d8 00 00 00 mov rax, QWORD PTR tv90[rbp] - 0008e 8b 40 14 mov eax, DWORD PTR [rax+20] - 00091 d3 e8 shr eax, cl - 00093 48 8b 8d 00 01 + 00090 8b 40 14 mov eax, DWORD PTR [rax+20] + 00093 d3 e8 shr eax, cl + 00095 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0009a 89 41 14 mov DWORD PTR [rcx+20], eax + 0009c 89 41 14 mov DWORD PTR [rcx+20], eax ; 3710 : z->num_bits -= n; - 0009d 48 8b 85 00 01 + 0009f 48 8b 85 00 01 00 00 mov rax, QWORD PTR z$[rbp] - 000a4 8b 8d 08 01 00 + 000a6 8b 8d 08 01 00 00 mov ecx, DWORD PTR n$[rbp] - 000aa 8b 40 10 mov eax, DWORD PTR [rax+16] - 000ad 2b c1 sub eax, ecx - 000af 48 8b 8d 00 01 + 000ac 8b 40 10 mov eax, DWORD PTR [rax+16] + 000af 2b c1 sub eax, ecx + 000b1 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 000b6 89 41 10 mov DWORD PTR [rcx+16], eax + 000b8 89 41 10 mov DWORD PTR [rcx+16], eax ; 3711 : return k; - 000b9 8b 45 04 mov eax, DWORD PTR k$[rbp] + 000bb 8b 45 04 mov eax, DWORD PTR k$[rbp] ; 3712 : } - 000bc 48 8d a5 e8 00 + 000be 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 000c3 5f pop rdi - 000c4 5d pop rbp - 000c5 c3 ret 0 + 000c5 5f pop rdi + 000c6 5d pop rbp + 000c7 c3 ret 0 stbi__zreceive ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -21997,86 +22126,87 @@ stbi__fill_bits PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 $LN4@stbi__fill: ; 3694 : do { ; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - 0001f 48 8b 85 f0 00 + 00020 48 8b 85 f0 00 00 00 mov rax, QWORD PTR z$[rbp] - 00026 8b 40 10 mov eax, DWORD PTR [rax+16] - 00029 b9 01 00 00 00 mov ecx, 1 - 0002e 89 8d c0 00 00 + 00027 8b 40 10 mov eax, DWORD PTR [rax+16] + 0002a b9 01 00 00 00 mov ecx, 1 + 0002f 89 8d c0 00 00 00 mov DWORD PTR tv92[rbp], ecx - 00034 0f b6 c8 movzx ecx, al - 00037 8b 85 c0 00 00 + 00035 0f b6 c8 movzx ecx, al + 00038 8b 85 c0 00 00 00 mov eax, DWORD PTR tv92[rbp] - 0003d d3 e0 shl eax, cl - 0003f 48 8b 8d f0 00 + 0003e d3 e0 shl eax, cl + 00040 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR z$[rbp] - 00046 39 41 14 cmp DWORD PTR [rcx+20], eax - 00049 72 17 jb SHORT $LN5@stbi__fill + 00047 39 41 14 cmp DWORD PTR [rcx+20], eax + 0004a 72 17 jb SHORT $LN5@stbi__fill ; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - 0004b 48 8b 85 f0 00 + 0004c 48 8b 85 f0 00 00 00 mov rax, QWORD PTR z$[rbp] - 00052 48 8b 8d f0 00 + 00053 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR z$[rbp] - 00059 48 8b 49 08 mov rcx, QWORD PTR [rcx+8] - 0005d 48 89 08 mov QWORD PTR [rax], rcx + 0005a 48 8b 49 08 mov rcx, QWORD PTR [rcx+8] + 0005e 48 89 08 mov QWORD PTR [rax], rcx ; 3697 : return; - 00060 eb 5b jmp SHORT $LN1@stbi__fill + 00061 eb 5b jmp SHORT $LN1@stbi__fill $LN5@stbi__fill: ; 3698 : } ; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - 00062 48 8b 8d f0 00 + 00063 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR z$[rbp] - 00069 e8 00 00 00 00 call stbi__zget8 - 0006e 0f b6 c0 movzx eax, al - 00071 48 8b 8d f0 00 + 0006a e8 00 00 00 00 call stbi__zget8 + 0006f 0f b6 c0 movzx eax, al + 00072 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR z$[rbp] - 00078 8b 49 10 mov ecx, DWORD PTR [rcx+16] - 0007b d3 e0 shl eax, cl - 0007d 48 8b 8d f0 00 + 00079 8b 49 10 mov ecx, DWORD PTR [rcx+16] + 0007c d3 e0 shl eax, cl + 0007e 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR z$[rbp] - 00084 8b 49 14 mov ecx, DWORD PTR [rcx+20] - 00087 0b c8 or ecx, eax - 00089 8b c1 mov eax, ecx - 0008b 48 8b 8d f0 00 + 00085 8b 49 14 mov ecx, DWORD PTR [rcx+20] + 00088 0b c8 or ecx, eax + 0008a 8b c1 mov eax, ecx + 0008c 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR z$[rbp] - 00092 89 41 14 mov DWORD PTR [rcx+20], eax + 00093 89 41 14 mov DWORD PTR [rcx+20], eax ; 3700 : z->num_bits += 8; - 00095 48 8b 85 f0 00 + 00096 48 8b 85 f0 00 00 00 mov rax, QWORD PTR z$[rbp] - 0009c 8b 40 10 mov eax, DWORD PTR [rax+16] - 0009f 83 c0 08 add eax, 8 - 000a2 48 8b 8d f0 00 + 0009d 8b 40 10 mov eax, DWORD PTR [rax+16] + 000a0 83 c0 08 add eax, 8 + 000a3 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR z$[rbp] - 000a9 89 41 10 mov DWORD PTR [rcx+16], eax + 000aa 89 41 10 mov DWORD PTR [rcx+16], eax ; 3701 : } while (z->num_bits <= 24); - 000ac 48 8b 85 f0 00 + 000ad 48 8b 85 f0 00 00 00 mov rax, QWORD PTR z$[rbp] - 000b3 83 78 10 18 cmp DWORD PTR [rax+16], 24 - 000b7 0f 8e 62 ff ff + 000b4 83 78 10 18 cmp DWORD PTR [rax+16], 24 + 000b8 0f 8e 62 ff ff ff jle $LN4@stbi__fill $LN1@stbi__fill: ; 3702 : } - 000bd 48 8d a5 d8 00 + 000be 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 000c4 5f pop rdi - 000c5 5d pop rbp - 000c6 c3 ret 0 + 000c5 5f pop rdi + 000c6 5d pop rbp + 000c7 c3 ret 0 stbi__fill_bits ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -22098,42 +22228,43 @@ stbi__zget8 PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - 0001f 48 8b 8d f0 00 + 00020 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR z$[rbp] - 00026 e8 00 00 00 00 call stbi__zeof - 0002b 85 c0 test eax, eax - 0002d 74 0c je SHORT $LN3@stbi__zget - 0002f c7 85 c0 00 00 + 00027 e8 00 00 00 00 call stbi__zeof + 0002c 85 c0 test eax, eax + 0002e 74 0c je SHORT $LN3@stbi__zget + 00030 c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv73[rbp], 0 - 00039 eb 2a jmp SHORT $LN4@stbi__zget + 0003a eb 2a jmp SHORT $LN4@stbi__zget $LN3@stbi__zget: - 0003b 48 8b 85 f0 00 + 0003c 48 8b 85 f0 00 00 00 mov rax, QWORD PTR z$[rbp] - 00042 48 8b 00 mov rax, QWORD PTR [rax] - 00045 0f b6 00 movzx eax, BYTE PTR [rax] - 00048 89 85 c0 00 00 + 00043 48 8b 00 mov rax, QWORD PTR [rax] + 00046 0f b6 00 movzx eax, BYTE PTR [rax] + 00049 89 85 c0 00 00 00 mov DWORD PTR tv73[rbp], eax - 0004e 48 8b 85 f0 00 + 0004f 48 8b 85 f0 00 00 00 mov rax, QWORD PTR z$[rbp] - 00055 48 8b 00 mov rax, QWORD PTR [rax] - 00058 48 ff c0 inc rax - 0005b 48 8b 8d f0 00 + 00056 48 8b 00 mov rax, QWORD PTR [rax] + 00059 48 ff c0 inc rax + 0005c 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR z$[rbp] - 00062 48 89 01 mov QWORD PTR [rcx], rax + 00063 48 89 01 mov QWORD PTR [rcx], rax $LN4@stbi__zget: - 00065 0f b6 85 c0 00 + 00066 0f b6 85 c0 00 00 00 movzx eax, BYTE PTR tv73[rbp] ; 3690 : } - 0006c 48 8d a5 d8 00 + 0006d 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 00073 5f pop rdi - 00074 5d pop rbp - 00075 c3 ret 0 + 00074 5f pop rdi + 00075 5d pop rbp + 00076 c3 ret 0 stbi__zget8 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -22155,33 +22286,34 @@ stbi__zeof PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 3684 : return (z->zbuffer >= z->zbuffer_end); - 0001f 48 8b 85 f0 00 + 00020 48 8b 85 f0 00 00 00 mov rax, QWORD PTR z$[rbp] - 00026 48 8b 8d f0 00 + 00027 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR z$[rbp] - 0002d 48 8b 49 08 mov rcx, QWORD PTR [rcx+8] - 00031 48 39 08 cmp QWORD PTR [rax], rcx - 00034 72 0c jb SHORT $LN3@stbi__zeof - 00036 c7 85 c0 00 00 + 0002e 48 8b 49 08 mov rcx, QWORD PTR [rcx+8] + 00032 48 39 08 cmp QWORD PTR [rax], rcx + 00035 72 0c jb SHORT $LN3@stbi__zeof + 00037 c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv67[rbp], 1 - 00040 eb 0a jmp SHORT $LN4@stbi__zeof + 00041 eb 0a jmp SHORT $LN4@stbi__zeof $LN3@stbi__zeof: - 00042 c7 85 c0 00 00 + 00043 c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv67[rbp], 0 $LN4@stbi__zeof: - 0004c 8b 85 c0 00 00 + 0004d 8b 85 c0 00 00 00 mov eax, DWORD PTR tv67[rbp] ; 3685 : } - 00052 48 8d a5 d8 00 + 00053 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 00059 5f pop rdi - 0005a 5d pop rbp - 0005b c3 ret 0 + 0005a 5f pop rdi + 0005b 5d pop rbp + 0005c c3 ret 0 stbi__zeof ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -22228,10 +22360,11 @@ stbi__zbuild_huffman PROC ; COMDAT 00047 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0004e e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00053 90 npad 1 ; 3617 : int i, k = 0; - 00053 c7 45 24 00 00 + 00054 c7 45 24 00 00 00 00 mov DWORD PTR k$[rbp], 0 ; 3618 : int code, next_code[16], sizes[17]; @@ -22239,401 +22372,403 @@ stbi__zbuild_huffman PROC ; COMDAT ; 3620 : // DEFLATE spec for generating codes ; 3621 : memset(sizes, 0, sizeof(sizes)); - 0005a 41 b8 44 00 00 + 0005b 41 b8 44 00 00 00 mov r8d, 68 ; 00000044H - 00060 33 d2 xor edx, edx - 00062 48 8d 8d d0 00 + 00061 33 d2 xor edx, edx + 00063 48 8d 8d d0 00 00 00 lea rcx, QWORD PTR sizes$[rbp] - 00069 e8 00 00 00 00 call memset + 0006a e8 00 00 00 00 call memset + 0006f 90 npad 1 ; 3622 : memset(z->fast, 0, sizeof(z->fast)); - 0006e 48 8b 85 90 02 + 00070 48 8b 85 90 02 00 00 mov rax, QWORD PTR z$[rbp] - 00075 41 b8 00 04 00 + 00077 41 b8 00 04 00 00 mov r8d, 1024 ; 00000400H - 0007b 33 d2 xor edx, edx - 0007d 48 8b c8 mov rcx, rax - 00080 e8 00 00 00 00 call memset + 0007d 33 d2 xor edx, edx + 0007f 48 8b c8 mov rcx, rax + 00082 e8 00 00 00 00 call memset + 00087 90 npad 1 ; 3623 : for (i = 0; i < num; ++i) - 00085 c7 45 04 00 00 + 00088 c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0008c eb 08 jmp SHORT $LN4@stbi__zbui + 0008f eb 08 jmp SHORT $LN4@stbi__zbui $LN2@stbi__zbui: - 0008e 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00091 ff c0 inc eax - 00093 89 45 04 mov DWORD PTR i$[rbp], eax + 00091 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00094 ff c0 inc eax + 00096 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__zbui: - 00096 8b 85 a0 02 00 + 00099 8b 85 a0 02 00 00 mov eax, DWORD PTR num$[rbp] - 0009c 39 45 04 cmp DWORD PTR i$[rbp], eax - 0009f 7d 30 jge SHORT $LN3@stbi__zbui + 0009f 39 45 04 cmp DWORD PTR i$[rbp], eax + 000a2 7d 30 jge SHORT $LN3@stbi__zbui ; 3624 : ++sizes[sizelist[i]]; - 000a1 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 000a5 48 8b 8d 98 02 + 000a4 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 000a8 48 8b 8d 98 02 00 00 mov rcx, QWORD PTR sizelist$[rbp] - 000ac 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 000b0 8b 84 85 d0 00 + 000af 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 000b3 8b 84 85 d0 00 00 00 mov eax, DWORD PTR sizes$[rbp+rax*4] - 000b7 ff c0 inc eax - 000b9 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 000bd 48 8b 95 98 02 + 000ba ff c0 inc eax + 000bc 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 000c0 48 8b 95 98 02 00 00 mov rdx, QWORD PTR sizelist$[rbp] - 000c4 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 000c8 89 84 8d d0 00 + 000c7 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 000cb 89 84 8d d0 00 00 00 mov DWORD PTR sizes$[rbp+rcx*4], eax - 000cf eb bd jmp SHORT $LN2@stbi__zbui + 000d2 eb bd jmp SHORT $LN2@stbi__zbui $LN3@stbi__zbui: ; 3625 : sizes[0] = 0; - 000d1 b8 04 00 00 00 mov eax, 4 - 000d6 48 6b c0 00 imul rax, rax, 0 - 000da c7 84 05 d0 00 + 000d4 b8 04 00 00 00 mov eax, 4 + 000d9 48 6b c0 00 imul rax, rax, 0 + 000dd c7 84 05 d0 00 00 00 00 00 00 00 mov DWORD PTR sizes$[rbp+rax], 0 ; 3626 : for (i = 1; i < 16; ++i) - 000e5 c7 45 04 01 00 + 000e8 c7 45 04 01 00 00 00 mov DWORD PTR i$[rbp], 1 - 000ec eb 08 jmp SHORT $LN7@stbi__zbui + 000ef eb 08 jmp SHORT $LN7@stbi__zbui $LN5@stbi__zbui: - 000ee 8b 45 04 mov eax, DWORD PTR i$[rbp] - 000f1 ff c0 inc eax - 000f3 89 45 04 mov DWORD PTR i$[rbp], eax + 000f1 8b 45 04 mov eax, DWORD PTR i$[rbp] + 000f4 ff c0 inc eax + 000f6 89 45 04 mov DWORD PTR i$[rbp], eax $LN7@stbi__zbui: - 000f6 83 7d 04 10 cmp DWORD PTR i$[rbp], 16 - 000fa 7d 2c jge SHORT $LN6@stbi__zbui + 000f9 83 7d 04 10 cmp DWORD PTR i$[rbp], 16 + 000fd 7d 2c jge SHORT $LN6@stbi__zbui ; 3627 : if (sizes[i] > (1 << i)) - 000fc 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00100 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 00103 ba 01 00 00 00 mov edx, 1 - 00108 d3 e2 shl edx, cl - 0010a 8b ca mov ecx, edx - 0010c 39 8c 85 d0 00 + 000ff 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00103 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 00106 ba 01 00 00 00 mov edx, 1 + 0010b d3 e2 shl edx, cl + 0010d 8b ca mov ecx, edx + 0010f 39 8c 85 d0 00 00 00 cmp DWORD PTR sizes$[rbp+rax*4], ecx - 00113 7e 11 jle SHORT $LN16@stbi__zbui + 00116 7e 11 jle SHORT $LN16@stbi__zbui ; 3628 : return stbi__err("bad sizes", "Corrupt PNG"); - 00115 48 8d 0d 00 00 + 00118 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09EOHLEIKL@bad?5sizes@ - 0011c e8 00 00 00 00 call stbi__err - 00121 e9 6b 02 00 00 jmp $LN1@stbi__zbui + 0011f e8 00 00 00 00 call stbi__err + 00124 e9 6b 02 00 00 jmp $LN1@stbi__zbui $LN16@stbi__zbui: - 00126 eb c6 jmp SHORT $LN5@stbi__zbui + 00129 eb c6 jmp SHORT $LN5@stbi__zbui $LN6@stbi__zbui: ; 3629 : code = 0; - 00128 c7 45 44 00 00 + 0012b c7 45 44 00 00 00 00 mov DWORD PTR code$[rbp], 0 ; 3630 : for (i = 1; i < 16; ++i) { - 0012f c7 45 04 01 00 + 00132 c7 45 04 01 00 00 00 mov DWORD PTR i$[rbp], 1 - 00136 eb 08 jmp SHORT $LN10@stbi__zbui + 00139 eb 08 jmp SHORT $LN10@stbi__zbui $LN8@stbi__zbui: - 00138 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0013b ff c0 inc eax - 0013d 89 45 04 mov DWORD PTR i$[rbp], eax + 0013b 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0013e ff c0 inc eax + 00140 89 45 04 mov DWORD PTR i$[rbp], eax $LN10@stbi__zbui: - 00140 83 7d 04 10 cmp DWORD PTR i$[rbp], 16 - 00144 0f 8d c6 00 00 + 00143 83 7d 04 10 cmp DWORD PTR i$[rbp], 16 + 00147 0f 8d c6 00 00 00 jge $LN9@stbi__zbui ; 3631 : next_code[i] = code; - 0014a 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 0014e 8b 4d 44 mov ecx, DWORD PTR code$[rbp] - 00151 89 4c 85 70 mov DWORD PTR next_code$[rbp+rax*4], ecx + 0014d 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00151 8b 4d 44 mov ecx, DWORD PTR code$[rbp] + 00154 89 4c 85 70 mov DWORD PTR next_code$[rbp+rax*4], ecx ; 3632 : z->firstcode[i] = (stbi__uint16)code; - 00155 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00159 48 8b 8d 90 02 + 00158 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 0015c 48 8b 8d 90 02 00 00 mov rcx, QWORD PTR z$[rbp] - 00160 0f b7 55 44 movzx edx, WORD PTR code$[rbp] - 00164 66 89 94 41 00 + 00163 0f b7 55 44 movzx edx, WORD PTR code$[rbp] + 00167 66 89 94 41 00 04 00 00 mov WORD PTR [rcx+rax*2+1024], dx ; 3633 : z->firstsymbol[i] = (stbi__uint16)k; - 0016c 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00170 48 8b 8d 90 02 + 0016f 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00173 48 8b 8d 90 02 00 00 mov rcx, QWORD PTR z$[rbp] - 00177 0f b7 55 24 movzx edx, WORD PTR k$[rbp] - 0017b 66 89 94 41 64 + 0017a 0f b7 55 24 movzx edx, WORD PTR k$[rbp] + 0017e 66 89 94 41 64 04 00 00 mov WORD PTR [rcx+rax*2+1124], dx ; 3634 : code = (code + sizes[i]); - 00183 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00187 8b 84 85 d0 00 + 00186 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 0018a 8b 84 85 d0 00 00 00 mov eax, DWORD PTR sizes$[rbp+rax*4] - 0018e 8b 4d 44 mov ecx, DWORD PTR code$[rbp] - 00191 03 c8 add ecx, eax - 00193 8b c1 mov eax, ecx - 00195 89 45 44 mov DWORD PTR code$[rbp], eax + 00191 8b 4d 44 mov ecx, DWORD PTR code$[rbp] + 00194 03 c8 add ecx, eax + 00196 8b c1 mov eax, ecx + 00198 89 45 44 mov DWORD PTR code$[rbp], eax ; 3635 : if (sizes[i]) - 00198 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 0019c 83 bc 85 d0 00 + 0019b 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 0019f 83 bc 85 d0 00 00 00 00 cmp DWORD PTR sizes$[rbp+rax*4], 0 - 001a4 74 26 je SHORT $LN17@stbi__zbui + 001a7 74 26 je SHORT $LN17@stbi__zbui ; 3636 : if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG"); - 001a6 8b 45 44 mov eax, DWORD PTR code$[rbp] - 001a9 ff c8 dec eax - 001ab 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 001ae ba 01 00 00 00 mov edx, 1 - 001b3 d3 e2 shl edx, cl - 001b5 8b ca mov ecx, edx - 001b7 3b c1 cmp eax, ecx - 001b9 7c 11 jl SHORT $LN18@stbi__zbui - 001bb 48 8d 0d 00 00 + 001a9 8b 45 44 mov eax, DWORD PTR code$[rbp] + 001ac ff c8 dec eax + 001ae 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 001b1 ba 01 00 00 00 mov edx, 1 + 001b6 d3 e2 shl edx, cl + 001b8 8b ca mov ecx, edx + 001ba 3b c1 cmp eax, ecx + 001bc 7c 11 jl SHORT $LN18@stbi__zbui + 001be 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@MDNKOBMC@bad?5codelengths@ - 001c2 e8 00 00 00 00 call stbi__err - 001c7 e9 c5 01 00 00 jmp $LN1@stbi__zbui + 001c5 e8 00 00 00 00 call stbi__err + 001ca e9 c5 01 00 00 jmp $LN1@stbi__zbui $LN18@stbi__zbui: $LN17@stbi__zbui: ; 3637 : z->maxcode[i] = code << (16 - i); // preshift for inner loop - 001cc b8 10 00 00 00 mov eax, 16 - 001d1 2b 45 04 sub eax, DWORD PTR i$[rbp] - 001d4 0f b6 c8 movzx ecx, al - 001d7 8b 45 44 mov eax, DWORD PTR code$[rbp] - 001da d3 e0 shl eax, cl - 001dc 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 001e0 48 8b 95 90 02 + 001cf b8 10 00 00 00 mov eax, 16 + 001d4 2b 45 04 sub eax, DWORD PTR i$[rbp] + 001d7 0f b6 c8 movzx ecx, al + 001da 8b 45 44 mov eax, DWORD PTR code$[rbp] + 001dd d3 e0 shl eax, cl + 001df 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 001e3 48 8b 95 90 02 00 00 mov rdx, QWORD PTR z$[rbp] - 001e7 89 84 8a 20 04 + 001ea 89 84 8a 20 04 00 00 mov DWORD PTR [rdx+rcx*4+1056], eax ; 3638 : code <<= 1; - 001ee 8b 45 44 mov eax, DWORD PTR code$[rbp] - 001f1 d1 e0 shl eax, 1 - 001f3 89 45 44 mov DWORD PTR code$[rbp], eax + 001f1 8b 45 44 mov eax, DWORD PTR code$[rbp] + 001f4 d1 e0 shl eax, 1 + 001f6 89 45 44 mov DWORD PTR code$[rbp], eax ; 3639 : k += sizes[i]; - 001f6 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 001fa 8b 84 85 d0 00 + 001f9 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 001fd 8b 84 85 d0 00 00 00 mov eax, DWORD PTR sizes$[rbp+rax*4] - 00201 8b 4d 24 mov ecx, DWORD PTR k$[rbp] - 00204 03 c8 add ecx, eax - 00206 8b c1 mov eax, ecx - 00208 89 45 24 mov DWORD PTR k$[rbp], eax + 00204 8b 4d 24 mov ecx, DWORD PTR k$[rbp] + 00207 03 c8 add ecx, eax + 00209 8b c1 mov eax, ecx + 0020b 89 45 24 mov DWORD PTR k$[rbp], eax ; 3640 : } - 0020b e9 28 ff ff ff jmp $LN8@stbi__zbui + 0020e e9 28 ff ff ff jmp $LN8@stbi__zbui $LN9@stbi__zbui: ; 3641 : z->maxcode[16] = 0x10000; // sentinel - 00210 b8 04 00 00 00 mov eax, 4 - 00215 48 6b c0 10 imul rax, rax, 16 - 00219 48 8b 8d 90 02 + 00213 b8 04 00 00 00 mov eax, 4 + 00218 48 6b c0 10 imul rax, rax, 16 + 0021c 48 8b 8d 90 02 00 00 mov rcx, QWORD PTR z$[rbp] - 00220 c7 84 01 20 04 + 00223 c7 84 01 20 04 00 00 00 00 01 00 mov DWORD PTR [rcx+rax+1056], 65536 ; 00010000H ; 3642 : for (i = 0; i < num; ++i) { - 0022b c7 45 04 00 00 + 0022e c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00232 eb 08 jmp SHORT $LN13@stbi__zbui + 00235 eb 08 jmp SHORT $LN13@stbi__zbui $LN11@stbi__zbui: - 00234 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00237 ff c0 inc eax - 00239 89 45 04 mov DWORD PTR i$[rbp], eax + 00237 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0023a ff c0 inc eax + 0023c 89 45 04 mov DWORD PTR i$[rbp], eax $LN13@stbi__zbui: - 0023c 8b 85 a0 02 00 + 0023f 8b 85 a0 02 00 00 mov eax, DWORD PTR num$[rbp] - 00242 39 45 04 cmp DWORD PTR i$[rbp], eax - 00245 0f 8d 41 01 00 + 00245 39 45 04 cmp DWORD PTR i$[rbp], eax + 00248 0f 8d 41 01 00 00 jge $LN12@stbi__zbui ; 3643 : int s = sizelist[i]; - 0024b 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 0024f 48 8b 8d 98 02 + 0024e 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00252 48 8b 8d 98 02 00 00 mov rcx, QWORD PTR sizelist$[rbp] - 00256 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0025a 89 85 34 01 00 + 00259 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0025d 89 85 34 01 00 00 mov DWORD PTR s$5[rbp], eax ; 3644 : if (s) { - 00260 83 bd 34 01 00 + 00263 83 bd 34 01 00 00 00 cmp DWORD PTR s$5[rbp], 0 - 00267 0f 84 1a 01 00 + 0026a 0f 84 1a 01 00 00 je $LN19@stbi__zbui ; 3645 : int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; - 0026d 48 63 85 34 01 + 00270 48 63 85 34 01 00 00 movsxd rax, DWORD PTR s$5[rbp] - 00274 48 63 8d 34 01 + 00277 48 63 8d 34 01 00 00 movsxd rcx, DWORD PTR s$5[rbp] - 0027b 48 8b 95 90 02 + 0027e 48 8b 95 90 02 00 00 mov rdx, QWORD PTR z$[rbp] - 00282 0f b7 8c 4a 00 + 00285 0f b7 8c 4a 00 04 00 00 movzx ecx, WORD PTR [rdx+rcx*2+1024] - 0028a 8b 44 85 70 mov eax, DWORD PTR next_code$[rbp+rax*4] - 0028e 2b c1 sub eax, ecx - 00290 48 63 8d 34 01 + 0028d 8b 44 85 70 mov eax, DWORD PTR next_code$[rbp+rax*4] + 00291 2b c1 sub eax, ecx + 00293 48 63 8d 34 01 00 00 movsxd rcx, DWORD PTR s$5[rbp] - 00297 48 8b 95 90 02 + 0029a 48 8b 95 90 02 00 00 mov rdx, QWORD PTR z$[rbp] - 0029e 0f b7 8c 4a 64 + 002a1 0f b7 8c 4a 64 04 00 00 movzx ecx, WORD PTR [rdx+rcx*2+1124] - 002a6 03 c1 add eax, ecx - 002a8 89 85 54 01 00 + 002a9 03 c1 add eax, ecx + 002ab 89 85 54 01 00 00 mov DWORD PTR c$6[rbp], eax ; 3646 : stbi__uint16 fastv = (stbi__uint16)((s << 9) | i); - 002ae 8b 85 34 01 00 + 002b1 8b 85 34 01 00 00 mov eax, DWORD PTR s$5[rbp] - 002b4 c1 e0 09 shl eax, 9 - 002b7 0b 45 04 or eax, DWORD PTR i$[rbp] - 002ba 66 89 85 74 01 + 002b7 c1 e0 09 shl eax, 9 + 002ba 0b 45 04 or eax, DWORD PTR i$[rbp] + 002bd 66 89 85 74 01 00 00 mov WORD PTR fastv$7[rbp], ax ; 3647 : z->size[c] = (stbi_uc)s; - 002c1 48 63 85 54 01 + 002c4 48 63 85 54 01 00 00 movsxd rax, DWORD PTR c$6[rbp] - 002c8 48 8b 8d 90 02 + 002cb 48 8b 8d 90 02 00 00 mov rcx, QWORD PTR z$[rbp] - 002cf 0f b6 95 34 01 + 002d2 0f b6 95 34 01 00 00 movzx edx, BYTE PTR s$5[rbp] - 002d6 88 94 01 84 04 + 002d9 88 94 01 84 04 00 00 mov BYTE PTR [rcx+rax+1156], dl ; 3648 : z->value[c] = (stbi__uint16)i; - 002dd 48 63 85 54 01 + 002e0 48 63 85 54 01 00 00 movsxd rax, DWORD PTR c$6[rbp] - 002e4 48 8b 8d 90 02 + 002e7 48 8b 8d 90 02 00 00 mov rcx, QWORD PTR z$[rbp] - 002eb 0f b7 55 04 movzx edx, WORD PTR i$[rbp] - 002ef 66 89 94 41 a4 + 002ee 0f b7 55 04 movzx edx, WORD PTR i$[rbp] + 002f2 66 89 94 41 a4 05 00 00 mov WORD PTR [rcx+rax*2+1444], dx ; 3649 : if (s <= STBI__ZFAST_BITS) { - 002f7 83 bd 34 01 00 + 002fa 83 bd 34 01 00 00 09 cmp DWORD PTR s$5[rbp], 9 - 002fe 7f 6f jg SHORT $LN20@stbi__zbui + 00301 7f 6f jg SHORT $LN20@stbi__zbui ; 3650 : int j = stbi__bit_reverse(next_code[s], s); - 00300 48 63 85 34 01 + 00303 48 63 85 34 01 00 00 movsxd rax, DWORD PTR s$5[rbp] - 00307 8b 95 34 01 00 + 0030a 8b 95 34 01 00 00 mov edx, DWORD PTR s$5[rbp] - 0030d 8b 4c 85 70 mov ecx, DWORD PTR next_code$[rbp+rax*4] - 00311 e8 00 00 00 00 call stbi__bit_reverse - 00316 89 85 94 01 00 + 00310 8b 4c 85 70 mov ecx, DWORD PTR next_code$[rbp+rax*4] + 00314 e8 00 00 00 00 call stbi__bit_reverse + 00319 89 85 94 01 00 00 mov DWORD PTR j$8[rbp], eax $LN14@stbi__zbui: ; 3651 : while (j < (1 << STBI__ZFAST_BITS)) { - 0031c 81 bd 94 01 00 + 0031f 81 bd 94 01 00 00 00 02 00 00 cmp DWORD PTR j$8[rbp], 512 ; 00000200H - 00326 7d 47 jge SHORT $LN15@stbi__zbui + 00329 7d 47 jge SHORT $LN15@stbi__zbui ; 3652 : z->fast[j] = fastv; - 00328 48 63 85 94 01 + 0032b 48 63 85 94 01 00 00 movsxd rax, DWORD PTR j$8[rbp] - 0032f 48 8b 8d 90 02 + 00332 48 8b 8d 90 02 00 00 mov rcx, QWORD PTR z$[rbp] - 00336 0f b7 95 74 01 + 00339 0f b7 95 74 01 00 00 movzx edx, WORD PTR fastv$7[rbp] - 0033d 66 89 14 41 mov WORD PTR [rcx+rax*2], dx + 00340 66 89 14 41 mov WORD PTR [rcx+rax*2], dx ; 3653 : j += (1 << s); - 00341 8b 85 34 01 00 + 00344 8b 85 34 01 00 00 mov eax, DWORD PTR s$5[rbp] - 00347 b9 01 00 00 00 mov ecx, 1 - 0034c 89 8d 64 02 00 + 0034a b9 01 00 00 00 mov ecx, 1 + 0034f 89 8d 64 02 00 00 mov DWORD PTR tv289[rbp], ecx - 00352 0f b6 c8 movzx ecx, al - 00355 8b 85 64 02 00 + 00355 0f b6 c8 movzx ecx, al + 00358 8b 85 64 02 00 00 mov eax, DWORD PTR tv289[rbp] - 0035b d3 e0 shl eax, cl - 0035d 8b 8d 94 01 00 + 0035e d3 e0 shl eax, cl + 00360 8b 8d 94 01 00 00 mov ecx, DWORD PTR j$8[rbp] - 00363 03 c8 add ecx, eax - 00365 8b c1 mov eax, ecx - 00367 89 85 94 01 00 + 00366 03 c8 add ecx, eax + 00368 8b c1 mov eax, ecx + 0036a 89 85 94 01 00 00 mov DWORD PTR j$8[rbp], eax ; 3654 : } - 0036d eb ad jmp SHORT $LN14@stbi__zbui + 00370 eb ad jmp SHORT $LN14@stbi__zbui $LN15@stbi__zbui: $LN20@stbi__zbui: ; 3655 : } ; 3656 : ++next_code[s]; - 0036f 48 63 85 34 01 + 00372 48 63 85 34 01 00 00 movsxd rax, DWORD PTR s$5[rbp] - 00376 8b 44 85 70 mov eax, DWORD PTR next_code$[rbp+rax*4] - 0037a ff c0 inc eax - 0037c 48 63 8d 34 01 + 00379 8b 44 85 70 mov eax, DWORD PTR next_code$[rbp+rax*4] + 0037d ff c0 inc eax + 0037f 48 63 8d 34 01 00 00 movsxd rcx, DWORD PTR s$5[rbp] - 00383 89 44 8d 70 mov DWORD PTR next_code$[rbp+rcx*4], eax + 00386 89 44 8d 70 mov DWORD PTR next_code$[rbp+rcx*4], eax $LN19@stbi__zbui: ; 3657 : } ; 3658 : } - 00387 e9 a8 fe ff ff jmp $LN11@stbi__zbui + 0038a e9 a8 fe ff ff jmp $LN11@stbi__zbui $LN12@stbi__zbui: ; 3659 : return 1; - 0038c b8 01 00 00 00 mov eax, 1 + 0038f b8 01 00 00 00 mov eax, 1 $LN1@stbi__zbui: ; 3660 : } - 00391 48 8b f8 mov rdi, rax - 00394 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00398 48 8d 15 00 00 + 00394 48 8b f8 mov rdi, rax + 00397 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 0039b 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__zbuild_huffman$rtcFrameData - 0039f e8 00 00 00 00 call _RTC_CheckStackVars - 003a4 48 8b c7 mov rax, rdi - 003a7 48 8b 8d 68 02 + 003a2 e8 00 00 00 00 call _RTC_CheckStackVars + 003a7 48 8b c7 mov rax, rdi + 003aa 48 8b 8d 68 02 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 003ae 48 33 cd xor rcx, rbp - 003b1 e8 00 00 00 00 call __security_check_cookie - 003b6 48 8d a5 78 02 + 003b1 48 33 cd xor rcx, rbp + 003b4 e8 00 00 00 00 call __security_check_cookie + 003b9 48 8d a5 78 02 00 00 lea rsp, QWORD PTR [rbp+632] - 003bd 5f pop rdi - 003be 5d pop rbp - 003bf c3 ret 0 + 003c0 5f pop rdi + 003c1 5d pop rbp + 003c2 c3 ret 0 stbi__zbuild_huffman ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -22656,42 +22791,43 @@ stbi__bit_reverse PROC ; COMDAT 00016 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001d e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00022 90 npad 1 ; 3609 : STBI_ASSERT(bits <= 16); - 00022 83 bd e8 00 00 + 00023 83 bd e8 00 00 00 10 cmp DWORD PTR bits$[rbp], 16 - 00029 7e 1c jle SHORT $LN3@stbi__bit_ - 0002b 41 b8 19 0e 00 + 0002a 7e 1c jle SHORT $LN3@stbi__bit_ + 0002c 41 b8 19 0e 00 00 mov r8d, 3609 ; 00000e19H - 00031 48 8d 15 00 00 + 00032 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 00038 48 8d 0d 00 00 + 00039 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1BG@HKNLHECB@?$AAb?$AAi?$AAt?$AAs?$AA?5?$AA?$DM?$AA?$DN?$AA?5?$AA1?$AA6@ - 0003f ff 15 00 00 00 + 00040 ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 00045 33 c0 xor eax, eax + 00046 33 c0 xor eax, eax $LN3@stbi__bit_: ; 3610 : // to bit reverse n bits, reverse 16 and shift ; 3611 : // e.g. 11 bits, bit reverse and shift away 5 ; 3612 : return stbi__bitreverse16(v) >> (16 - bits); - 00047 8b 8d e0 00 00 + 00048 8b 8d e0 00 00 00 mov ecx, DWORD PTR v$[rbp] - 0004d e8 00 00 00 00 call stbi__bitreverse16 - 00052 b9 10 00 00 00 mov ecx, 16 - 00057 2b 8d e8 00 00 + 0004e e8 00 00 00 00 call stbi__bitreverse16 + 00053 b9 10 00 00 00 mov ecx, 16 + 00058 2b 8d e8 00 00 00 sub ecx, DWORD PTR bits$[rbp] - 0005d d3 f8 sar eax, cl + 0005e d3 f8 sar eax, cl ; 3613 : } - 0005f 48 8d a5 c8 00 + 00060 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00066 5f pop rdi - 00067 5d pop rbp - 00068 c3 ret 0 + 00067 5f pop rdi + 00068 5d pop rbp + 00069 c3 ret 0 stbi__bit_reverse ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -22712,79 +22848,80 @@ stbi__bitreverse16 PROC ; COMDAT 00012 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00019 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001e 90 npad 1 ; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); - 0001e 8b 85 e0 00 00 + 0001f 8b 85 e0 00 00 00 mov eax, DWORD PTR n$[rbp] - 00024 25 aa aa 00 00 and eax, 43690 ; 0000aaaaH - 00029 d1 f8 sar eax, 1 - 0002b 8b 8d e0 00 00 + 00025 25 aa aa 00 00 and eax, 43690 ; 0000aaaaH + 0002a d1 f8 sar eax, 1 + 0002c 8b 8d e0 00 00 00 mov ecx, DWORD PTR n$[rbp] - 00031 81 e1 55 55 00 + 00032 81 e1 55 55 00 00 and ecx, 21845 ; 00005555H - 00037 d1 e1 shl ecx, 1 - 00039 0b c1 or eax, ecx - 0003b 89 85 e0 00 00 + 00038 d1 e1 shl ecx, 1 + 0003a 0b c1 or eax, ecx + 0003c 89 85 e0 00 00 00 mov DWORD PTR n$[rbp], eax ; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); - 00041 8b 85 e0 00 00 + 00042 8b 85 e0 00 00 00 mov eax, DWORD PTR n$[rbp] - 00047 25 cc cc 00 00 and eax, 52428 ; 0000ccccH - 0004c c1 f8 02 sar eax, 2 - 0004f 8b 8d e0 00 00 + 00048 25 cc cc 00 00 and eax, 52428 ; 0000ccccH + 0004d c1 f8 02 sar eax, 2 + 00050 8b 8d e0 00 00 00 mov ecx, DWORD PTR n$[rbp] - 00055 81 e1 33 33 00 + 00056 81 e1 33 33 00 00 and ecx, 13107 ; 00003333H - 0005b c1 e1 02 shl ecx, 2 - 0005e 0b c1 or eax, ecx - 00060 89 85 e0 00 00 + 0005c c1 e1 02 shl ecx, 2 + 0005f 0b c1 or eax, ecx + 00061 89 85 e0 00 00 00 mov DWORD PTR n$[rbp], eax ; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); - 00066 8b 85 e0 00 00 + 00067 8b 85 e0 00 00 00 mov eax, DWORD PTR n$[rbp] - 0006c 25 f0 f0 00 00 and eax, 61680 ; 0000f0f0H - 00071 c1 f8 04 sar eax, 4 - 00074 8b 8d e0 00 00 + 0006d 25 f0 f0 00 00 and eax, 61680 ; 0000f0f0H + 00072 c1 f8 04 sar eax, 4 + 00075 8b 8d e0 00 00 00 mov ecx, DWORD PTR n$[rbp] - 0007a 81 e1 0f 0f 00 + 0007b 81 e1 0f 0f 00 00 and ecx, 3855 ; 00000f0fH - 00080 c1 e1 04 shl ecx, 4 - 00083 0b c1 or eax, ecx - 00085 89 85 e0 00 00 + 00081 c1 e1 04 shl ecx, 4 + 00084 0b c1 or eax, ecx + 00086 89 85 e0 00 00 00 mov DWORD PTR n$[rbp], eax ; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); - 0008b 8b 85 e0 00 00 + 0008c 8b 85 e0 00 00 00 mov eax, DWORD PTR n$[rbp] - 00091 25 00 ff 00 00 and eax, 65280 ; 0000ff00H - 00096 c1 f8 08 sar eax, 8 - 00099 8b 8d e0 00 00 + 00092 25 00 ff 00 00 and eax, 65280 ; 0000ff00H + 00097 c1 f8 08 sar eax, 8 + 0009a 8b 8d e0 00 00 00 mov ecx, DWORD PTR n$[rbp] - 0009f 81 e1 ff 00 00 + 000a0 81 e1 ff 00 00 00 and ecx, 255 ; 000000ffH - 000a5 c1 e1 08 shl ecx, 8 - 000a8 0b c1 or eax, ecx - 000aa 89 85 e0 00 00 + 000a6 c1 e1 08 shl ecx, 8 + 000a9 0b c1 or eax, ecx + 000ab 89 85 e0 00 00 00 mov DWORD PTR n$[rbp], eax ; 3604 : return n; - 000b0 8b 85 e0 00 00 + 000b1 8b 85 e0 00 00 00 mov eax, DWORD PTR n$[rbp] ; 3605 : } - 000b6 48 8d a5 c8 00 + 000b7 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 000bd 5f pop rdi - 000be 5d pop rbp - 000bf c3 ret 0 + 000be 5f pop rdi + 000bf 5d pop rbp + 000c0 c3 ret 0 stbi__bitreverse16 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -22812,94 +22949,96 @@ stbi__jpeg_info_raw PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 3549 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { - 0002e ba 02 00 00 00 mov edx, 2 - 00033 48 8b 8d f0 00 + 0002f ba 02 00 00 00 mov edx, 2 + 00034 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR j$[rbp] - 0003a e8 00 00 00 00 call stbi__decode_jpeg_header - 0003f 85 c0 test eax, eax - 00041 75 16 jne SHORT $LN2@stbi__jpeg + 0003b e8 00 00 00 00 call stbi__decode_jpeg_header + 00040 85 c0 test eax, eax + 00042 75 17 jne SHORT $LN2@stbi__jpeg ; 3550 : stbi__rewind(j->s); - 00043 48 8b 85 f0 00 + 00044 48 8b 85 f0 00 00 00 mov rax, QWORD PTR j$[rbp] - 0004a 48 8b 08 mov rcx, QWORD PTR [rax] - 0004d e8 00 00 00 00 call stbi__rewind + 0004b 48 8b 08 mov rcx, QWORD PTR [rax] + 0004e e8 00 00 00 00 call stbi__rewind + 00053 90 npad 1 ; 3551 : return 0; - 00052 33 c0 xor eax, eax - 00054 e9 83 00 00 00 jmp $LN1@stbi__jpeg + 00054 33 c0 xor eax, eax + 00056 e9 83 00 00 00 jmp $LN1@stbi__jpeg $LN2@stbi__jpeg: ; 3552 : } ; 3553 : if (x) *x = j->s->img_x; - 00059 48 83 bd f8 00 + 0005b 48 83 bd f8 00 00 00 00 cmp QWORD PTR x$[rbp], 0 - 00061 74 15 je SHORT $LN3@stbi__jpeg - 00063 48 8b 85 f0 00 + 00063 74 15 je SHORT $LN3@stbi__jpeg + 00065 48 8b 85 f0 00 00 00 mov rax, QWORD PTR j$[rbp] - 0006a 48 8b 00 mov rax, QWORD PTR [rax] - 0006d 48 8b 8d f8 00 + 0006c 48 8b 00 mov rax, QWORD PTR [rax] + 0006f 48 8b 8d f8 00 00 00 mov rcx, QWORD PTR x$[rbp] - 00074 8b 00 mov eax, DWORD PTR [rax] - 00076 89 01 mov DWORD PTR [rcx], eax + 00076 8b 00 mov eax, DWORD PTR [rax] + 00078 89 01 mov DWORD PTR [rcx], eax $LN3@stbi__jpeg: ; 3554 : if (y) *y = j->s->img_y; - 00078 48 83 bd 00 01 + 0007a 48 83 bd 00 01 00 00 00 cmp QWORD PTR y$[rbp], 0 - 00080 74 16 je SHORT $LN4@stbi__jpeg - 00082 48 8b 85 f0 00 + 00082 74 16 je SHORT $LN4@stbi__jpeg + 00084 48 8b 85 f0 00 00 00 mov rax, QWORD PTR j$[rbp] - 00089 48 8b 00 mov rax, QWORD PTR [rax] - 0008c 48 8b 8d 00 01 + 0008b 48 8b 00 mov rax, QWORD PTR [rax] + 0008e 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR y$[rbp] - 00093 8b 40 04 mov eax, DWORD PTR [rax+4] - 00096 89 01 mov DWORD PTR [rcx], eax + 00095 8b 40 04 mov eax, DWORD PTR [rax+4] + 00098 89 01 mov DWORD PTR [rcx], eax $LN4@stbi__jpeg: ; 3555 : if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; - 00098 48 83 bd 08 01 + 0009a 48 83 bd 08 01 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 000a0 74 35 je SHORT $LN5@stbi__jpeg - 000a2 48 8b 85 f0 00 + 000a2 74 35 je SHORT $LN5@stbi__jpeg + 000a4 48 8b 85 f0 00 00 00 mov rax, QWORD PTR j$[rbp] - 000a9 48 8b 00 mov rax, QWORD PTR [rax] - 000ac 83 78 08 03 cmp DWORD PTR [rax+8], 3 - 000b0 7c 0c jl SHORT $LN7@stbi__jpeg - 000b2 c7 85 c0 00 00 + 000ab 48 8b 00 mov rax, QWORD PTR [rax] + 000ae 83 78 08 03 cmp DWORD PTR [rax+8], 3 + 000b2 7c 0c jl SHORT $LN7@stbi__jpeg + 000b4 c7 85 c0 00 00 00 03 00 00 00 mov DWORD PTR tv80[rbp], 3 - 000bc eb 0a jmp SHORT $LN8@stbi__jpeg + 000be eb 0a jmp SHORT $LN8@stbi__jpeg $LN7@stbi__jpeg: - 000be c7 85 c0 00 00 + 000c0 c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv80[rbp], 1 $LN8@stbi__jpeg: - 000c8 48 8b 85 08 01 + 000ca 48 8b 85 08 01 00 00 mov rax, QWORD PTR comp$[rbp] - 000cf 8b 8d c0 00 00 + 000d1 8b 8d c0 00 00 00 mov ecx, DWORD PTR tv80[rbp] - 000d5 89 08 mov DWORD PTR [rax], ecx + 000d7 89 08 mov DWORD PTR [rax], ecx $LN5@stbi__jpeg: ; 3556 : return 1; - 000d7 b8 01 00 00 00 mov eax, 1 + 000d9 b8 01 00 00 00 mov eax, 1 $LN1@stbi__jpeg: ; 3557 : } - 000dc 48 8d a5 d8 00 + 000de 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 000e3 5f pop rdi - 000e4 5d pop rbp - 000e5 c3 ret 0 + 000e5 5f pop rdi + 000e6 5d pop rbp + 000e7 c3 ret 0 stbi__jpeg_info_raw ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -22927,23 +23066,23 @@ r$19 = 772 g$20 = 804 b$21 = 836 y$22 = 872 -tv694 = 1268 tv656 = 1268 -tv626 = 1268 -tv545 = 1268 -tv516 = 1268 -tv288 = 1268 -tv280 = 1268 -tv252 = 1268 -tv91 = 1268 +tv694 = 1268 tv81 = 1268 -tv265 = 1272 -tv232 = 1272 -tv172 = 1272 -tv164 = 1272 -tv159 = 1272 +tv91 = 1268 +tv252 = 1268 +tv280 = 1268 +tv288 = 1268 +tv516 = 1268 +tv545 = 1268 +tv626 = 1268 tv79 = 1272 +tv265 = 1272 tv71 = 1272 +tv159 = 1272 +tv164 = 1272 +tv172 = 1272 +tv232 = 1272 tv270 = 1280 __$ArrayPad$ = 1288 z$ = 1328 @@ -22978,160 +23117,162 @@ load_jpeg_image PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 3349 : int n, decode_n, is_rgb; ; 3350 : z->s->img_n = 0; // make stbi__cleanup_jpeg safe - 00058 48 8b 85 30 05 + 00059 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 0005f 48 8b 00 mov rax, QWORD PTR [rax] - 00062 c7 40 08 00 00 + 00060 48 8b 00 mov rax, QWORD PTR [rax] + 00063 c7 40 08 00 00 00 00 mov DWORD PTR [rax+8], 0 ; 3351 : ; 3352 : // validate req_comp ; 3353 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); - 00069 83 bd 50 05 00 + 0006a 83 bd 50 05 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 00070 7c 09 jl SHORT $LN42@load_jpeg_ - 00072 83 bd 50 05 00 + 00071 7c 09 jl SHORT $LN42@load_jpeg_ + 00073 83 bd 50 05 00 00 04 cmp DWORD PTR req_comp$[rbp], 4 - 00079 7e 34 jle SHORT $LN41@load_jpeg_ + 0007a 7e 34 jle SHORT $LN41@load_jpeg_ $LN42@load_jpeg_: - 0007b 48 8d 0d 00 00 + 0007c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0N@KBPNPPBJ@bad?5req_comp@ - 00082 e8 00 00 00 00 call stbi__err - 00087 85 c0 test eax, eax - 00089 74 0d je SHORT $LN83@load_jpeg_ - 0008b 48 c7 85 f8 04 + 00083 e8 00 00 00 00 call stbi__err + 00088 85 c0 test eax, eax + 0008a 74 0d je SHORT $LN83@load_jpeg_ + 0008c 48 c7 85 f8 04 00 00 00 00 00 00 mov QWORD PTR tv71[rbp], 0 - 00096 eb 0b jmp SHORT $LN84@load_jpeg_ + 00097 eb 0b jmp SHORT $LN84@load_jpeg_ $LN83@load_jpeg_: - 00098 48 c7 85 f8 04 + 00099 48 c7 85 f8 04 00 00 00 00 00 00 mov QWORD PTR tv71[rbp], 0 $LN84@load_jpeg_: - 000a3 48 8b 85 f8 04 + 000a4 48 8b 85 f8 04 00 00 mov rax, QWORD PTR tv71[rbp] - 000aa e9 f2 11 00 00 jmp $LN1@load_jpeg_ + 000ab e9 fa 11 00 00 jmp $LN1@load_jpeg_ $LN41@load_jpeg_: ; 3354 : ; 3355 : // load a jpeg image from whichever source, but leave in YCbCr format ; 3356 : if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } - 000af 48 8b 8d 30 05 + 000b0 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 000b6 e8 00 00 00 00 call stbi__decode_jpeg_image - 000bb 85 c0 test eax, eax - 000bd 75 13 jne SHORT $LN43@load_jpeg_ - 000bf 48 8b 8d 30 05 + 000b7 e8 00 00 00 00 call stbi__decode_jpeg_image + 000bc 85 c0 test eax, eax + 000be 75 14 jne SHORT $LN43@load_jpeg_ + 000c0 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 000c6 e8 00 00 00 00 call stbi__cleanup_jpeg - 000cb 33 c0 xor eax, eax - 000cd e9 cf 11 00 00 jmp $LN1@load_jpeg_ + 000c7 e8 00 00 00 00 call stbi__cleanup_jpeg + 000cc 90 npad 1 + 000cd 33 c0 xor eax, eax + 000cf e9 d6 11 00 00 jmp $LN1@load_jpeg_ $LN43@load_jpeg_: ; 3357 : ; 3358 : // determine actual number of components to generate ; 3359 : n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; - 000d2 83 bd 50 05 00 + 000d4 83 bd 50 05 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 000d9 74 0e je SHORT $LN87@load_jpeg_ - 000db 8b 85 50 05 00 + 000db 74 0e je SHORT $LN87@load_jpeg_ + 000dd 8b 85 50 05 00 00 mov eax, DWORD PTR req_comp$[rbp] - 000e1 89 85 f4 04 00 + 000e3 89 85 f4 04 00 00 mov DWORD PTR tv81[rbp], eax - 000e7 eb 32 jmp SHORT $LN88@load_jpeg_ + 000e9 eb 32 jmp SHORT $LN88@load_jpeg_ $LN87@load_jpeg_: - 000e9 48 8b 85 30 05 + 000eb 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 000f0 48 8b 00 mov rax, QWORD PTR [rax] - 000f3 83 78 08 03 cmp DWORD PTR [rax+8], 3 - 000f7 7c 0c jl SHORT $LN85@load_jpeg_ - 000f9 c7 85 f8 04 00 + 000f2 48 8b 00 mov rax, QWORD PTR [rax] + 000f5 83 78 08 03 cmp DWORD PTR [rax+8], 3 + 000f9 7c 0c jl SHORT $LN85@load_jpeg_ + 000fb c7 85 f8 04 00 00 03 00 00 00 mov DWORD PTR tv79[rbp], 3 - 00103 eb 0a jmp SHORT $LN86@load_jpeg_ + 00105 eb 0a jmp SHORT $LN86@load_jpeg_ $LN85@load_jpeg_: - 00105 c7 85 f8 04 00 + 00107 c7 85 f8 04 00 00 01 00 00 00 mov DWORD PTR tv79[rbp], 1 $LN86@load_jpeg_: - 0010f 8b 85 f8 04 00 + 00111 8b 85 f8 04 00 00 mov eax, DWORD PTR tv79[rbp] - 00115 89 85 f4 04 00 + 00117 89 85 f4 04 00 00 mov DWORD PTR tv81[rbp], eax $LN88@load_jpeg_: - 0011b 8b 85 f4 04 00 + 0011d 8b 85 f4 04 00 00 mov eax, DWORD PTR tv81[rbp] - 00121 89 45 04 mov DWORD PTR n$[rbp], eax + 00123 89 45 04 mov DWORD PTR n$[rbp], eax ; 3360 : ; 3361 : is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); - 00124 48 8b 85 30 05 + 00126 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 0012b 48 8b 00 mov rax, QWORD PTR [rax] - 0012e 83 78 08 03 cmp DWORD PTR [rax+8], 3 - 00132 75 3c jne SHORT $LN91@load_jpeg_ - 00134 48 8b 85 30 05 + 0012d 48 8b 00 mov rax, QWORD PTR [rax] + 00130 83 78 08 03 cmp DWORD PTR [rax+8], 3 + 00134 75 3c jne SHORT $LN91@load_jpeg_ + 00136 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 0013b 83 b8 50 48 00 + 0013d 83 b8 50 48 00 00 03 cmp DWORD PTR [rax+18512], 3 - 00142 74 20 je SHORT $LN90@load_jpeg_ - 00144 48 8b 85 30 05 + 00144 74 20 je SHORT $LN90@load_jpeg_ + 00146 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 0014b 83 b8 4c 48 00 + 0014d 83 b8 4c 48 00 00 00 cmp DWORD PTR [rax+18508], 0 - 00152 75 1c jne SHORT $LN89@load_jpeg_ - 00154 48 8b 85 30 05 + 00154 75 1c jne SHORT $LN89@load_jpeg_ + 00156 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 0015b 83 b8 48 48 00 + 0015d 83 b8 48 48 00 00 00 cmp DWORD PTR [rax+18504], 0 - 00162 75 0c jne SHORT $LN91@load_jpeg_ + 00164 75 0c jne SHORT $LN91@load_jpeg_ $LN90@load_jpeg_: - 00164 c7 85 f4 04 00 + 00166 c7 85 f4 04 00 00 01 00 00 00 mov DWORD PTR tv91[rbp], 1 - 0016e eb 0a jmp SHORT $LN92@load_jpeg_ + 00170 eb 0a jmp SHORT $LN92@load_jpeg_ $LN91@load_jpeg_: $LN89@load_jpeg_: - 00170 c7 85 f4 04 00 + 00172 c7 85 f4 04 00 00 00 00 00 00 mov DWORD PTR tv91[rbp], 0 $LN92@load_jpeg_: - 0017a 8b 85 f4 04 00 + 0017c 8b 85 f4 04 00 00 mov eax, DWORD PTR tv91[rbp] - 00180 89 45 44 mov DWORD PTR is_rgb$[rbp], eax + 00182 89 45 44 mov DWORD PTR is_rgb$[rbp], eax ; 3362 : ; 3363 : if (z->s->img_n == 3 && n < 3 && !is_rgb) - 00183 48 8b 85 30 05 + 00185 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 0018a 48 8b 00 mov rax, QWORD PTR [rax] - 0018d 83 78 08 03 cmp DWORD PTR [rax+8], 3 - 00191 75 15 jne SHORT $LN44@load_jpeg_ - 00193 83 7d 04 03 cmp DWORD PTR n$[rbp], 3 - 00197 7d 0f jge SHORT $LN44@load_jpeg_ - 00199 83 7d 44 00 cmp DWORD PTR is_rgb$[rbp], 0 - 0019d 75 09 jne SHORT $LN44@load_jpeg_ + 0018c 48 8b 00 mov rax, QWORD PTR [rax] + 0018f 83 78 08 03 cmp DWORD PTR [rax+8], 3 + 00193 75 15 jne SHORT $LN44@load_jpeg_ + 00195 83 7d 04 03 cmp DWORD PTR n$[rbp], 3 + 00199 7d 0f jge SHORT $LN44@load_jpeg_ + 0019b 83 7d 44 00 cmp DWORD PTR is_rgb$[rbp], 0 + 0019f 75 09 jne SHORT $LN44@load_jpeg_ ; 3364 : decode_n = 1; - 0019f c7 45 24 01 00 + 001a1 c7 45 24 01 00 00 00 mov DWORD PTR decode_n$[rbp], 1 - 001a6 eb 10 jmp SHORT $LN45@load_jpeg_ + 001a8 eb 10 jmp SHORT $LN45@load_jpeg_ $LN44@load_jpeg_: ; 3365 : else ; 3366 : decode_n = z->s->img_n; - 001a8 48 8b 85 30 05 + 001aa 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 001af 48 8b 00 mov rax, QWORD PTR [rax] - 001b2 8b 40 08 mov eax, DWORD PTR [rax+8] - 001b5 89 45 24 mov DWORD PTR decode_n$[rbp], eax + 001b1 48 8b 00 mov rax, QWORD PTR [rax] + 001b4 8b 40 08 mov eax, DWORD PTR [rax+8] + 001b7 89 45 24 mov DWORD PTR decode_n$[rbp], eax $LN45@load_jpeg_: ; 3367 : @@ -23139,13 +23280,14 @@ $LN45@load_jpeg_: ; 3369 : // accessing uninitialized coutput[0] later ; 3370 : if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } - 001b8 83 7d 24 00 cmp DWORD PTR decode_n$[rbp], 0 - 001bc 7f 13 jg SHORT $LN46@load_jpeg_ - 001be 48 8b 8d 30 05 + 001ba 83 7d 24 00 cmp DWORD PTR decode_n$[rbp], 0 + 001be 7f 14 jg SHORT $LN46@load_jpeg_ + 001c0 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 001c5 e8 00 00 00 00 call stbi__cleanup_jpeg - 001ca 33 c0 xor eax, eax - 001cc e9 d0 10 00 00 jmp $LN1@load_jpeg_ + 001c7 e8 00 00 00 00 call stbi__cleanup_jpeg + 001cc 90 npad 1 + 001cd 33 c0 xor eax, eax + 001cf e9 d6 10 00 00 jmp $LN1@load_jpeg_ $LN46@load_jpeg_: ; 3371 : @@ -23156,16 +23298,16 @@ $LN46@load_jpeg_: ; 3376 : stbi_uc* output; ; 3377 : stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL }; - 001d1 48 c7 85 e8 00 + 001d4 48 c7 85 e8 00 00 00 00 00 00 00 mov QWORD PTR coutput$9[rbp], 0 - 001dc 48 c7 85 f0 00 + 001df 48 c7 85 f0 00 00 00 00 00 00 00 mov QWORD PTR coutput$9[rbp+8], 0 - 001e7 48 c7 85 f8 00 + 001ea 48 c7 85 f8 00 00 00 00 00 00 00 mov QWORD PTR coutput$9[rbp+16], 0 - 001f2 48 c7 85 00 01 + 001f5 48 c7 85 00 01 00 00 00 00 00 00 mov QWORD PTR coutput$9[rbp+24], 0 @@ -23174,26 +23316,26 @@ $LN46@load_jpeg_: ; 3380 : ; 3381 : for (k = 0; k < decode_n; ++k) { - 001fd c7 45 64 00 00 + 00200 c7 45 64 00 00 00 00 mov DWORD PTR k$5[rbp], 0 - 00204 eb 08 jmp SHORT $LN4@load_jpeg_ + 00207 eb 08 jmp SHORT $LN4@load_jpeg_ $LN2@load_jpeg_: - 00206 8b 45 64 mov eax, DWORD PTR k$5[rbp] - 00209 ff c0 inc eax - 0020b 89 45 64 mov DWORD PTR k$5[rbp], eax + 00209 8b 45 64 mov eax, DWORD PTR k$5[rbp] + 0020c ff c0 inc eax + 0020e 89 45 64 mov DWORD PTR k$5[rbp], eax $LN4@load_jpeg_: - 0020e 8b 45 24 mov eax, DWORD PTR decode_n$[rbp] - 00211 39 45 64 cmp DWORD PTR k$5[rbp], eax - 00214 0f 8d 7a 02 00 + 00211 8b 45 24 mov eax, DWORD PTR decode_n$[rbp] + 00214 39 45 64 cmp DWORD PTR k$5[rbp], eax + 00217 0f 8d 7b 02 00 00 jge $LN3@load_jpeg_ ; 3382 : stbi__resample* r = &res_comp[k]; - 0021a 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] - 0021e 48 6b c0 30 imul rax, rax, 48 ; 00000030H - 00222 48 8d 84 05 30 + 0021d 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] + 00221 48 6b c0 30 imul rax, rax, 48 ; 00000030H + 00225 48 8d 84 05 30 01 00 00 lea rax, QWORD PTR res_comp$10[rbp+rax] - 0022a 48 89 85 08 02 + 0022d 48 89 85 08 02 00 00 mov QWORD PTR r$11[rbp], rax ; 3383 : @@ -23201,230 +23343,231 @@ $LN4@load_jpeg_: ; 3385 : // with upsample factor of 4 ; 3386 : z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3); - 00231 48 8b 85 30 05 + 00234 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00238 48 8b 00 mov rax, QWORD PTR [rax] - 0023b 8b 00 mov eax, DWORD PTR [rax] - 0023d 83 c0 03 add eax, 3 - 00240 8b c0 mov eax, eax - 00242 8b c8 mov ecx, eax - 00244 e8 00 00 00 00 call stbi__malloc - 00249 48 63 4d 64 movsxd rcx, DWORD PTR k$5[rbp] - 0024d 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00251 48 8b 95 30 05 + 0023b 48 8b 00 mov rax, QWORD PTR [rax] + 0023e 8b 00 mov eax, DWORD PTR [rax] + 00240 83 c0 03 add eax, 3 + 00243 8b c0 mov eax, eax + 00245 8b c8 mov ecx, eax + 00247 e8 00 00 00 00 call stbi__malloc + 0024c 48 63 4d 64 movsxd rcx, DWORD PTR k$5[rbp] + 00250 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00254 48 8b 95 30 05 00 00 mov rdx, QWORD PTR z$[rbp] - 00258 48 89 84 0a e8 + 0025b 48 89 84 0a e8 46 00 00 mov QWORD PTR [rdx+rcx+18152], rax ; 3387 : if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } - 00260 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] - 00264 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00268 48 8b 8d 30 05 + 00263 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] + 00267 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0026b 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 0026f 48 83 bc 01 e8 + 00272 48 83 bc 01 e8 46 00 00 00 cmp QWORD PTR [rcx+rax+18152], 0 - 00278 75 40 jne SHORT $LN47@load_jpeg_ - 0027a 48 8b 8d 30 05 + 0027b 75 41 jne SHORT $LN47@load_jpeg_ + 0027d 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 00281 e8 00 00 00 00 call stbi__cleanup_jpeg - 00286 48 8d 0d 00 00 + 00284 e8 00 00 00 00 call stbi__cleanup_jpeg + 00289 90 npad 1 + 0028a 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 0028d e8 00 00 00 00 call stbi__err - 00292 85 c0 test eax, eax - 00294 74 0d je SHORT $LN93@load_jpeg_ - 00296 48 c7 85 f8 04 + 00291 e8 00 00 00 00 call stbi__err + 00296 85 c0 test eax, eax + 00298 74 0d je SHORT $LN93@load_jpeg_ + 0029a 48 c7 85 f8 04 00 00 00 00 00 00 mov QWORD PTR tv159[rbp], 0 - 002a1 eb 0b jmp SHORT $LN94@load_jpeg_ + 002a5 eb 0b jmp SHORT $LN94@load_jpeg_ $LN93@load_jpeg_: - 002a3 48 c7 85 f8 04 + 002a7 48 c7 85 f8 04 00 00 00 00 00 00 mov QWORD PTR tv159[rbp], 0 $LN94@load_jpeg_: - 002ae 48 8b 85 f8 04 + 002b2 48 8b 85 f8 04 00 00 mov rax, QWORD PTR tv159[rbp] - 002b5 e9 e7 0f 00 00 jmp $LN1@load_jpeg_ + 002b9 e9 ec 0f 00 00 jmp $LN1@load_jpeg_ $LN47@load_jpeg_: ; 3388 : ; 3389 : r->hs = z->img_h_max / z->img_comp[k].h; - 002ba 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] - 002be 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 002c2 48 89 85 f8 04 + 002be 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] + 002c2 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 002c6 48 89 85 f8 04 00 00 mov QWORD PTR tv164[rbp], rax - 002c9 48 8b 8d 30 05 + 002cd 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 002d0 8b 81 88 46 00 + 002d4 8b 81 88 46 00 00 mov eax, DWORD PTR [rcx+18056] - 002d6 99 cdq - 002d7 48 8b 8d 30 05 + 002da 99 cdq + 002db 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 002de 4c 8b 85 f8 04 + 002e2 4c 8b 85 f8 04 00 00 mov r8, QWORD PTR tv164[rbp] - 002e5 42 f7 bc 01 a4 + 002e9 42 f7 bc 01 a4 46 00 00 idiv DWORD PTR [rcx+r8+18084] - 002ed 48 8b 8d 08 02 + 002f1 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR r$11[rbp] - 002f4 89 41 18 mov DWORD PTR [rcx+24], eax + 002f8 89 41 18 mov DWORD PTR [rcx+24], eax ; 3390 : r->vs = z->img_v_max / z->img_comp[k].v; - 002f7 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] - 002fb 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 002ff 48 89 85 f8 04 + 002fb 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] + 002ff 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00303 48 89 85 f8 04 00 00 mov QWORD PTR tv172[rbp], rax - 00306 48 8b 8d 30 05 + 0030a 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 0030d 8b 81 8c 46 00 + 00311 8b 81 8c 46 00 00 mov eax, DWORD PTR [rcx+18060] - 00313 99 cdq - 00314 48 8b 8d 30 05 + 00317 99 cdq + 00318 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 0031b 4c 8b 85 f8 04 + 0031f 4c 8b 85 f8 04 00 00 mov r8, QWORD PTR tv172[rbp] - 00322 42 f7 bc 01 a8 + 00326 42 f7 bc 01 a8 46 00 00 idiv DWORD PTR [rcx+r8+18088] - 0032a 48 8b 8d 08 02 + 0032e 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR r$11[rbp] - 00331 89 41 1c mov DWORD PTR [rcx+28], eax + 00335 89 41 1c mov DWORD PTR [rcx+28], eax ; 3391 : r->ystep = r->vs >> 1; - 00334 48 8b 85 08 02 + 00338 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 0033b 8b 40 1c mov eax, DWORD PTR [rax+28] - 0033e d1 f8 sar eax, 1 - 00340 48 8b 8d 08 02 + 0033f 8b 40 1c mov eax, DWORD PTR [rax+28] + 00342 d1 f8 sar eax, 1 + 00344 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR r$11[rbp] - 00347 89 41 24 mov DWORD PTR [rcx+36], eax + 0034b 89 41 24 mov DWORD PTR [rcx+36], eax ; 3392 : r->w_lores = (z->s->img_x + r->hs - 1) / r->hs; - 0034a 48 8b 85 30 05 + 0034e 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00351 48 8b 00 mov rax, QWORD PTR [rax] - 00354 8b 00 mov eax, DWORD PTR [rax] - 00356 48 8b 8d 08 02 + 00355 48 8b 00 mov rax, QWORD PTR [rax] + 00358 8b 00 mov eax, DWORD PTR [rax] + 0035a 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR r$11[rbp] - 0035d 8b 49 18 mov ecx, DWORD PTR [rcx+24] - 00360 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] - 00364 33 d2 xor edx, edx - 00366 48 8b 8d 08 02 + 00361 8b 49 18 mov ecx, DWORD PTR [rcx+24] + 00364 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] + 00368 33 d2 xor edx, edx + 0036a 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR r$11[rbp] - 0036d f7 71 18 div DWORD PTR [rcx+24] - 00370 48 8b 8d 08 02 + 00371 f7 71 18 div DWORD PTR [rcx+24] + 00374 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR r$11[rbp] - 00377 89 41 20 mov DWORD PTR [rcx+32], eax + 0037b 89 41 20 mov DWORD PTR [rcx+32], eax ; 3393 : r->ypos = 0; - 0037a 48 8b 85 08 02 + 0037e 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 00381 c7 40 28 00 00 + 00385 c7 40 28 00 00 00 00 mov DWORD PTR [rax+40], 0 ; 3394 : r->line0 = r->line1 = z->img_comp[k].data; - 00388 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] - 0038c 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00390 48 8b 8d 08 02 + 0038c 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] + 00390 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00394 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR r$11[rbp] - 00397 48 8b 95 30 05 + 0039b 48 8b 95 30 05 00 00 mov rdx, QWORD PTR z$[rbp] - 0039e 48 8b 84 02 d0 + 003a2 48 8b 84 02 d0 46 00 00 mov rax, QWORD PTR [rdx+rax+18128] - 003a6 48 89 41 10 mov QWORD PTR [rcx+16], rax - 003aa 48 8b 85 08 02 + 003aa 48 89 41 10 mov QWORD PTR [rcx+16], rax + 003ae 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 003b1 48 8b 8d 08 02 + 003b5 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR r$11[rbp] - 003b8 48 8b 49 10 mov rcx, QWORD PTR [rcx+16] - 003bc 48 89 48 08 mov QWORD PTR [rax+8], rcx + 003bc 48 8b 49 10 mov rcx, QWORD PTR [rcx+16] + 003c0 48 89 48 08 mov QWORD PTR [rax+8], rcx ; 3395 : ; 3396 : if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; - 003c0 48 8b 85 08 02 + 003c4 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 003c7 83 78 18 01 cmp DWORD PTR [rax+24], 1 - 003cb 75 23 jne SHORT $LN48@load_jpeg_ - 003cd 48 8b 85 08 02 + 003cb 83 78 18 01 cmp DWORD PTR [rax+24], 1 + 003cf 75 23 jne SHORT $LN48@load_jpeg_ + 003d1 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 003d4 83 78 1c 01 cmp DWORD PTR [rax+28], 1 - 003d8 75 16 jne SHORT $LN48@load_jpeg_ - 003da 48 8b 85 08 02 + 003d8 83 78 1c 01 cmp DWORD PTR [rax+28], 1 + 003dc 75 16 jne SHORT $LN48@load_jpeg_ + 003de 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 003e1 48 8d 0d 00 00 + 003e5 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:resample_row_1 - 003e8 48 89 08 mov QWORD PTR [rax], rcx - 003eb e9 9f 00 00 00 jmp $LN49@load_jpeg_ + 003ec 48 89 08 mov QWORD PTR [rax], rcx + 003ef e9 9f 00 00 00 jmp $LN49@load_jpeg_ $LN48@load_jpeg_: ; 3397 : else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; - 003f0 48 8b 85 08 02 + 003f4 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 003f7 83 78 18 01 cmp DWORD PTR [rax+24], 1 - 003fb 75 20 jne SHORT $LN50@load_jpeg_ - 003fd 48 8b 85 08 02 + 003fb 83 78 18 01 cmp DWORD PTR [rax+24], 1 + 003ff 75 20 jne SHORT $LN50@load_jpeg_ + 00401 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 00404 83 78 1c 02 cmp DWORD PTR [rax+28], 2 - 00408 75 13 jne SHORT $LN50@load_jpeg_ - 0040a 48 8b 85 08 02 + 00408 83 78 1c 02 cmp DWORD PTR [rax+28], 2 + 0040c 75 13 jne SHORT $LN50@load_jpeg_ + 0040e 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 00411 48 8d 0d 00 00 + 00415 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__resample_row_v_2 - 00418 48 89 08 mov QWORD PTR [rax], rcx - 0041b eb 72 jmp SHORT $LN51@load_jpeg_ + 0041c 48 89 08 mov QWORD PTR [rax], rcx + 0041f eb 72 jmp SHORT $LN51@load_jpeg_ $LN50@load_jpeg_: ; 3398 : else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; - 0041d 48 8b 85 08 02 + 00421 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 00424 83 78 18 02 cmp DWORD PTR [rax+24], 2 - 00428 75 20 jne SHORT $LN52@load_jpeg_ - 0042a 48 8b 85 08 02 + 00428 83 78 18 02 cmp DWORD PTR [rax+24], 2 + 0042c 75 20 jne SHORT $LN52@load_jpeg_ + 0042e 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 00431 83 78 1c 01 cmp DWORD PTR [rax+28], 1 - 00435 75 13 jne SHORT $LN52@load_jpeg_ - 00437 48 8b 85 08 02 + 00435 83 78 1c 01 cmp DWORD PTR [rax+28], 1 + 00439 75 13 jne SHORT $LN52@load_jpeg_ + 0043b 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 0043e 48 8d 0d 00 00 + 00442 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__resample_row_h_2 - 00445 48 89 08 mov QWORD PTR [rax], rcx - 00448 eb 45 jmp SHORT $LN53@load_jpeg_ + 00449 48 89 08 mov QWORD PTR [rax], rcx + 0044c eb 45 jmp SHORT $LN53@load_jpeg_ $LN52@load_jpeg_: ; 3399 : else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; - 0044a 48 8b 85 08 02 + 0044e 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 00451 83 78 18 02 cmp DWORD PTR [rax+24], 2 - 00455 75 27 jne SHORT $LN54@load_jpeg_ - 00457 48 8b 85 08 02 + 00455 83 78 18 02 cmp DWORD PTR [rax+24], 2 + 00459 75 27 jne SHORT $LN54@load_jpeg_ + 0045b 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 0045e 83 78 1c 02 cmp DWORD PTR [rax+28], 2 - 00462 75 1a jne SHORT $LN54@load_jpeg_ - 00464 48 8b 85 08 02 + 00462 83 78 1c 02 cmp DWORD PTR [rax+28], 2 + 00466 75 1a jne SHORT $LN54@load_jpeg_ + 00468 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 0046b 48 8b 8d 30 05 + 0046f 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 00472 48 8b 89 80 48 + 00476 48 8b 89 80 48 00 00 mov rcx, QWORD PTR [rcx+18560] - 00479 48 89 08 mov QWORD PTR [rax], rcx - 0047c eb 11 jmp SHORT $LN55@load_jpeg_ + 0047d 48 89 08 mov QWORD PTR [rax], rcx + 00480 eb 11 jmp SHORT $LN55@load_jpeg_ $LN54@load_jpeg_: ; 3400 : else r->resample = stbi__resample_row_generic; - 0047e 48 8b 85 08 02 + 00482 48 8b 85 08 02 00 00 mov rax, QWORD PTR r$11[rbp] - 00485 48 8d 0d 00 00 + 00489 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__resample_row_generic - 0048c 48 89 08 mov QWORD PTR [rax], rcx + 00490 48 89 08 mov QWORD PTR [rax], rcx $LN55@load_jpeg_: $LN53@load_jpeg_: $LN51@load_jpeg_: @@ -23432,198 +23575,199 @@ $LN49@load_jpeg_: ; 3401 : } - 0048f e9 72 fd ff ff jmp $LN2@load_jpeg_ + 00493 e9 71 fd ff ff jmp $LN2@load_jpeg_ $LN3@load_jpeg_: ; 3402 : ; 3403 : // can't error after this so, this is safe ; 3404 : output = (stbi_uc*)stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); - 00494 48 8b 85 30 05 + 00498 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 0049b 48 8b 00 mov rax, QWORD PTR [rax] - 0049e 48 8b 8d 30 05 + 0049f 48 8b 00 mov rax, QWORD PTR [rax] + 004a2 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 004a5 48 8b 09 mov rcx, QWORD PTR [rcx] - 004a8 41 b9 01 00 00 + 004a9 48 8b 09 mov rcx, QWORD PTR [rcx] + 004ac 41 b9 01 00 00 00 mov r9d, 1 - 004ae 44 8b 40 04 mov r8d, DWORD PTR [rax+4] - 004b2 8b 11 mov edx, DWORD PTR [rcx] - 004b4 8b 4d 04 mov ecx, DWORD PTR n$[rbp] - 004b7 e8 00 00 00 00 call stbi__malloc_mad3 - 004bc 48 89 85 c8 00 + 004b2 44 8b 40 04 mov r8d, DWORD PTR [rax+4] + 004b6 8b 11 mov edx, DWORD PTR [rcx] + 004b8 8b 4d 04 mov ecx, DWORD PTR n$[rbp] + 004bb e8 00 00 00 00 call stbi__malloc_mad3 + 004c0 48 89 85 c8 00 00 00 mov QWORD PTR output$8[rbp], rax ; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } - 004c3 48 83 bd c8 00 + 004c7 48 83 bd c8 00 00 00 00 cmp QWORD PTR output$8[rbp], 0 - 004cb 75 40 jne SHORT $LN56@load_jpeg_ - 004cd 48 8b 8d 30 05 + 004cf 75 41 jne SHORT $LN56@load_jpeg_ + 004d1 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 004d4 e8 00 00 00 00 call stbi__cleanup_jpeg - 004d9 48 8d 0d 00 00 + 004d8 e8 00 00 00 00 call stbi__cleanup_jpeg + 004dd 90 npad 1 + 004de 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 004e0 e8 00 00 00 00 call stbi__err - 004e5 85 c0 test eax, eax - 004e7 74 0d je SHORT $LN95@load_jpeg_ - 004e9 48 c7 85 f8 04 + 004e5 e8 00 00 00 00 call stbi__err + 004ea 85 c0 test eax, eax + 004ec 74 0d je SHORT $LN95@load_jpeg_ + 004ee 48 c7 85 f8 04 00 00 00 00 00 00 mov QWORD PTR tv232[rbp], 0 - 004f4 eb 0b jmp SHORT $LN96@load_jpeg_ + 004f9 eb 0b jmp SHORT $LN96@load_jpeg_ $LN95@load_jpeg_: - 004f6 48 c7 85 f8 04 + 004fb 48 c7 85 f8 04 00 00 00 00 00 00 mov QWORD PTR tv232[rbp], 0 $LN96@load_jpeg_: - 00501 48 8b 85 f8 04 + 00506 48 8b 85 f8 04 00 00 mov rax, QWORD PTR tv232[rbp] - 00508 e9 94 0d 00 00 jmp $LN1@load_jpeg_ + 0050d e9 98 0d 00 00 jmp $LN1@load_jpeg_ $LN56@load_jpeg_: ; 3406 : ; 3407 : // now go ahead and resample ; 3408 : for (j = 0; j < z->s->img_y; ++j) { - 0050d c7 85 a4 00 00 + 00512 c7 85 a4 00 00 00 00 00 00 00 mov DWORD PTR j$7[rbp], 0 - 00517 eb 0e jmp SHORT $LN7@load_jpeg_ + 0051c eb 0e jmp SHORT $LN7@load_jpeg_ $LN5@load_jpeg_: - 00519 8b 85 a4 00 00 + 0051e 8b 85 a4 00 00 00 mov eax, DWORD PTR j$7[rbp] - 0051f ff c0 inc eax - 00521 89 85 a4 00 00 + 00524 ff c0 inc eax + 00526 89 85 a4 00 00 00 mov DWORD PTR j$7[rbp], eax $LN7@load_jpeg_: - 00527 48 8b 85 30 05 + 0052c 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 0052e 48 8b 00 mov rax, QWORD PTR [rax] - 00531 8b 40 04 mov eax, DWORD PTR [rax+4] - 00534 39 85 a4 00 00 + 00533 48 8b 00 mov rax, QWORD PTR [rax] + 00536 8b 40 04 mov eax, DWORD PTR [rax+4] + 00539 39 85 a4 00 00 00 cmp DWORD PTR j$7[rbp], eax - 0053a 0f 83 e4 0c 00 + 0053f 0f 83 e7 0c 00 00 jae $LN6@load_jpeg_ ; 3409 : stbi_uc* out = output + n * z->s->img_x * j; - 00540 48 8b 85 30 05 + 00545 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00547 48 8b 00 mov rax, QWORD PTR [rax] - 0054a 8b 4d 04 mov ecx, DWORD PTR n$[rbp] - 0054d 0f af 08 imul ecx, DWORD PTR [rax] - 00550 8b c1 mov eax, ecx - 00552 0f af 85 a4 00 + 0054c 48 8b 00 mov rax, QWORD PTR [rax] + 0054f 8b 4d 04 mov ecx, DWORD PTR n$[rbp] + 00552 0f af 08 imul ecx, DWORD PTR [rax] + 00555 8b c1 mov eax, ecx + 00557 0f af 85 a4 00 00 00 imul eax, DWORD PTR j$7[rbp] - 00559 8b c0 mov eax, eax - 0055b 48 8b 8d c8 00 + 0055e 8b c0 mov eax, eax + 00560 48 8b 8d c8 00 00 00 mov rcx, QWORD PTR output$8[rbp] - 00562 48 03 c8 add rcx, rax - 00565 48 8b c1 mov rax, rcx - 00568 48 89 85 28 02 + 00567 48 03 c8 add rcx, rax + 0056a 48 8b c1 mov rax, rcx + 0056d 48 89 85 28 02 00 00 mov QWORD PTR out$12[rbp], rax ; 3410 : for (k = 0; k < decode_n; ++k) { - 0056f c7 45 64 00 00 + 00574 c7 45 64 00 00 00 00 mov DWORD PTR k$5[rbp], 0 - 00576 eb 08 jmp SHORT $LN10@load_jpeg_ + 0057b eb 08 jmp SHORT $LN10@load_jpeg_ $LN8@load_jpeg_: - 00578 8b 45 64 mov eax, DWORD PTR k$5[rbp] - 0057b ff c0 inc eax - 0057d 89 45 64 mov DWORD PTR k$5[rbp], eax + 0057d 8b 45 64 mov eax, DWORD PTR k$5[rbp] + 00580 ff c0 inc eax + 00582 89 45 64 mov DWORD PTR k$5[rbp], eax $LN10@load_jpeg_: - 00580 8b 45 24 mov eax, DWORD PTR decode_n$[rbp] - 00583 39 45 64 cmp DWORD PTR k$5[rbp], eax - 00586 0f 8d d0 01 00 + 00585 8b 45 24 mov eax, DWORD PTR decode_n$[rbp] + 00588 39 45 64 cmp DWORD PTR k$5[rbp], eax + 0058b 0f 8d d0 01 00 00 jge $LN9@load_jpeg_ ; 3411 : stbi__resample* r = &res_comp[k]; - 0058c 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] - 00590 48 6b c0 30 imul rax, rax, 48 ; 00000030H - 00594 48 8d 84 05 30 + 00591 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] + 00595 48 6b c0 30 imul rax, rax, 48 ; 00000030H + 00599 48 8d 84 05 30 01 00 00 lea rax, QWORD PTR res_comp$10[rbp+rax] - 0059c 48 89 85 48 02 + 005a1 48 89 85 48 02 00 00 mov QWORD PTR r$13[rbp], rax ; 3412 : int y_bot = r->ystep >= (r->vs >> 1); - 005a3 48 8b 85 48 02 + 005a8 48 8b 85 48 02 00 00 mov rax, QWORD PTR r$13[rbp] - 005aa 8b 40 1c mov eax, DWORD PTR [rax+28] - 005ad d1 f8 sar eax, 1 - 005af 48 8b 8d 48 02 + 005af 8b 40 1c mov eax, DWORD PTR [rax+28] + 005b2 d1 f8 sar eax, 1 + 005b4 48 8b 8d 48 02 00 00 mov rcx, QWORD PTR r$13[rbp] - 005b6 39 41 24 cmp DWORD PTR [rcx+36], eax - 005b9 7c 0c jl SHORT $LN97@load_jpeg_ - 005bb c7 85 f4 04 00 + 005bb 39 41 24 cmp DWORD PTR [rcx+36], eax + 005be 7c 0c jl SHORT $LN97@load_jpeg_ + 005c0 c7 85 f4 04 00 00 01 00 00 00 mov DWORD PTR tv252[rbp], 1 - 005c5 eb 0a jmp SHORT $LN98@load_jpeg_ + 005ca eb 0a jmp SHORT $LN98@load_jpeg_ $LN97@load_jpeg_: - 005c7 c7 85 f4 04 00 + 005cc c7 85 f4 04 00 00 00 00 00 00 mov DWORD PTR tv252[rbp], 0 $LN98@load_jpeg_: - 005d1 8b 85 f4 04 00 + 005d6 8b 85 f4 04 00 00 mov eax, DWORD PTR tv252[rbp] - 005d7 89 85 64 02 00 + 005dc 89 85 64 02 00 00 mov DWORD PTR y_bot$14[rbp], eax ; 3413 : coutput[k] = r->resample(z->img_comp[k].linebuf, - 005dd 83 bd 64 02 00 + 005e2 83 bd 64 02 00 00 00 cmp DWORD PTR y_bot$14[rbp], 0 - 005e4 74 14 je SHORT $LN99@load_jpeg_ - 005e6 48 8b 85 48 02 + 005e9 74 14 je SHORT $LN99@load_jpeg_ + 005eb 48 8b 85 48 02 00 00 mov rax, QWORD PTR r$13[rbp] - 005ed 48 8b 40 08 mov rax, QWORD PTR [rax+8] - 005f1 48 89 85 f8 04 + 005f2 48 8b 40 08 mov rax, QWORD PTR [rax+8] + 005f6 48 89 85 f8 04 00 00 mov QWORD PTR tv265[rbp], rax - 005f8 eb 12 jmp SHORT $LN100@load_jpeg_ + 005fd eb 12 jmp SHORT $LN100@load_jpeg_ $LN99@load_jpeg_: - 005fa 48 8b 85 48 02 + 005ff 48 8b 85 48 02 00 00 mov rax, QWORD PTR r$13[rbp] - 00601 48 8b 40 10 mov rax, QWORD PTR [rax+16] - 00605 48 89 85 f8 04 + 00606 48 8b 40 10 mov rax, QWORD PTR [rax+16] + 0060a 48 89 85 f8 04 00 00 mov QWORD PTR tv265[rbp], rax $LN100@load_jpeg_: - 0060c 83 bd 64 02 00 + 00611 83 bd 64 02 00 00 00 cmp DWORD PTR y_bot$14[rbp], 0 - 00613 74 14 je SHORT $LN101@load_jpeg_ - 00615 48 8b 85 48 02 + 00618 74 14 je SHORT $LN101@load_jpeg_ + 0061a 48 8b 85 48 02 00 00 mov rax, QWORD PTR r$13[rbp] - 0061c 48 8b 40 10 mov rax, QWORD PTR [rax+16] - 00620 48 89 85 00 05 + 00621 48 8b 40 10 mov rax, QWORD PTR [rax+16] + 00625 48 89 85 00 05 00 00 mov QWORD PTR tv270[rbp], rax - 00627 eb 12 jmp SHORT $LN102@load_jpeg_ + 0062c eb 12 jmp SHORT $LN102@load_jpeg_ $LN101@load_jpeg_: - 00629 48 8b 85 48 02 + 0062e 48 8b 85 48 02 00 00 mov rax, QWORD PTR r$13[rbp] - 00630 48 8b 40 08 mov rax, QWORD PTR [rax+8] - 00634 48 89 85 00 05 + 00635 48 8b 40 08 mov rax, QWORD PTR [rax+8] + 00639 48 89 85 00 05 00 00 mov QWORD PTR tv270[rbp], rax $LN102@load_jpeg_: - 0063b 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] - 0063f 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00643 48 8b 8d 48 02 + 00640 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] + 00644 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00648 48 8b 8d 48 02 00 00 mov rcx, QWORD PTR r$13[rbp] - 0064a 8b 49 18 mov ecx, DWORD PTR [rcx+24] - 0064d 89 4c 24 20 mov DWORD PTR [rsp+32], ecx - 00651 48 8b 8d 48 02 + 0064f 8b 49 18 mov ecx, DWORD PTR [rcx+24] + 00652 89 4c 24 20 mov DWORD PTR [rsp+32], ecx + 00656 48 8b 8d 48 02 00 00 mov rcx, QWORD PTR r$13[rbp] - 00658 44 8b 49 20 mov r9d, DWORD PTR [rcx+32] - 0065c 4c 8b 85 f8 04 + 0065d 44 8b 49 20 mov r9d, DWORD PTR [rcx+32] + 00661 4c 8b 85 f8 04 00 00 mov r8, QWORD PTR tv265[rbp] - 00663 48 8b 95 00 05 + 00668 48 8b 95 00 05 00 00 mov rdx, QWORD PTR tv270[rbp] - 0066a 48 8b 8d 30 05 + 0066f 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 00671 48 8b 8c 01 e8 + 00676 48 8b 8c 01 e8 46 00 00 mov rcx, QWORD PTR [rcx+rax+18152] - 00679 48 8b 85 48 02 + 0067e 48 8b 85 48 02 00 00 mov rax, QWORD PTR r$13[rbp] - 00680 ff 10 call QWORD PTR [rax] - 00682 48 63 4d 64 movsxd rcx, DWORD PTR k$5[rbp] - 00686 48 89 84 cd e8 + 00685 ff 10 call QWORD PTR [rax] + 00687 48 63 4d 64 movsxd rcx, DWORD PTR k$5[rbp] + 0068b 48 89 84 cd e8 00 00 00 mov QWORD PTR coutput$9[rbp+rcx*8], rax ; 3414 : y_bot ? r->line1 : r->line0, @@ -23631,1136 +23775,1139 @@ $LN102@load_jpeg_: ; 3416 : r->w_lores, r->hs); ; 3417 : if (++r->ystep >= r->vs) { - 0068e 48 8b 85 48 02 + 00693 48 8b 85 48 02 00 00 mov rax, QWORD PTR r$13[rbp] - 00695 8b 40 24 mov eax, DWORD PTR [rax+36] - 00698 ff c0 inc eax - 0069a 89 85 f4 04 00 + 0069a 8b 40 24 mov eax, DWORD PTR [rax+36] + 0069d ff c0 inc eax + 0069f 89 85 f4 04 00 00 mov DWORD PTR tv280[rbp], eax - 006a0 48 8b 85 48 02 + 006a5 48 8b 85 48 02 00 00 mov rax, QWORD PTR r$13[rbp] - 006a7 8b 8d f4 04 00 + 006ac 8b 8d f4 04 00 00 mov ecx, DWORD PTR tv280[rbp] - 006ad 89 48 24 mov DWORD PTR [rax+36], ecx - 006b0 48 8b 85 48 02 + 006b2 89 48 24 mov DWORD PTR [rax+36], ecx + 006b5 48 8b 85 48 02 00 00 mov rax, QWORD PTR r$13[rbp] - 006b7 8b 40 1c mov eax, DWORD PTR [rax+28] - 006ba 39 85 f4 04 00 + 006bc 8b 40 1c mov eax, DWORD PTR [rax+28] + 006bf 39 85 f4 04 00 00 cmp DWORD PTR tv280[rbp], eax - 006c0 0f 8c 91 00 00 + 006c5 0f 8c 91 00 00 00 jl $LN57@load_jpeg_ ; 3418 : r->ystep = 0; - 006c6 48 8b 85 48 02 + 006cb 48 8b 85 48 02 00 00 mov rax, QWORD PTR r$13[rbp] - 006cd c7 40 24 00 00 + 006d2 c7 40 24 00 00 00 00 mov DWORD PTR [rax+36], 0 ; 3419 : r->line0 = r->line1; - 006d4 48 8b 85 48 02 + 006d9 48 8b 85 48 02 00 00 mov rax, QWORD PTR r$13[rbp] - 006db 48 8b 8d 48 02 + 006e0 48 8b 8d 48 02 00 00 mov rcx, QWORD PTR r$13[rbp] - 006e2 48 8b 49 10 mov rcx, QWORD PTR [rcx+16] - 006e6 48 89 48 08 mov QWORD PTR [rax+8], rcx + 006e7 48 8b 49 10 mov rcx, QWORD PTR [rcx+16] + 006eb 48 89 48 08 mov QWORD PTR [rax+8], rcx ; 3420 : if (++r->ypos < z->img_comp[k].y) - 006ea 48 8b 85 48 02 + 006ef 48 8b 85 48 02 00 00 mov rax, QWORD PTR r$13[rbp] - 006f1 8b 40 28 mov eax, DWORD PTR [rax+40] - 006f4 ff c0 inc eax - 006f6 89 85 f4 04 00 + 006f6 8b 40 28 mov eax, DWORD PTR [rax+40] + 006f9 ff c0 inc eax + 006fb 89 85 f4 04 00 00 mov DWORD PTR tv288[rbp], eax - 006fc 48 8b 85 48 02 + 00701 48 8b 85 48 02 00 00 mov rax, QWORD PTR r$13[rbp] - 00703 8b 8d f4 04 00 + 00708 8b 8d f4 04 00 00 mov ecx, DWORD PTR tv288[rbp] - 00709 89 48 28 mov DWORD PTR [rax+40], ecx - 0070c 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] - 00710 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00714 48 8b 8d 30 05 + 0070e 89 48 28 mov DWORD PTR [rax+40], ecx + 00711 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] + 00715 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00719 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 0071b 8b 84 01 c0 46 + 00720 8b 84 01 c0 46 00 00 mov eax, DWORD PTR [rcx+rax+18112] - 00722 39 85 f4 04 00 + 00727 39 85 f4 04 00 00 cmp DWORD PTR tv288[rbp], eax - 00728 7d 2d jge SHORT $LN58@load_jpeg_ + 0072d 7d 2d jge SHORT $LN58@load_jpeg_ ; 3421 : r->line1 += z->img_comp[k].w2; - 0072a 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] - 0072e 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00732 48 8b 8d 30 05 + 0072f 48 63 45 64 movsxd rax, DWORD PTR k$5[rbp] + 00733 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00737 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 00739 48 63 84 01 c4 + 0073e 48 63 84 01 c4 46 00 00 movsxd rax, DWORD PTR [rcx+rax+18116] - 00741 48 8b 8d 48 02 + 00746 48 8b 8d 48 02 00 00 mov rcx, QWORD PTR r$13[rbp] - 00748 48 03 41 10 add rax, QWORD PTR [rcx+16] - 0074c 48 8b 8d 48 02 + 0074d 48 03 41 10 add rax, QWORD PTR [rcx+16] + 00751 48 8b 8d 48 02 00 00 mov rcx, QWORD PTR r$13[rbp] - 00753 48 89 41 10 mov QWORD PTR [rcx+16], rax + 00758 48 89 41 10 mov QWORD PTR [rcx+16], rax $LN58@load_jpeg_: $LN57@load_jpeg_: ; 3422 : } ; 3423 : } - 00757 e9 1c fe ff ff jmp $LN8@load_jpeg_ + 0075c e9 1c fe ff ff jmp $LN8@load_jpeg_ $LN9@load_jpeg_: ; 3424 : if (n >= 3) { - 0075c 83 7d 04 03 cmp DWORD PTR n$[rbp], 3 - 00760 0f 8c a9 05 00 + 00761 83 7d 04 03 cmp DWORD PTR n$[rbp], 3 + 00765 0f 8c ac 05 00 00 jl $LN59@load_jpeg_ ; 3425 : stbi_uc* y = coutput[0]; - 00766 b8 08 00 00 00 mov eax, 8 - 0076b 48 6b c0 00 imul rax, rax, 0 - 0076f 48 8b 84 05 e8 + 0076b b8 08 00 00 00 mov eax, 8 + 00770 48 6b c0 00 imul rax, rax, 0 + 00774 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 00777 48 89 85 88 02 + 0077c 48 89 85 88 02 00 00 mov QWORD PTR y$15[rbp], rax ; 3426 : if (z->s->img_n == 3) { - 0077e 48 8b 85 30 05 + 00783 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00785 48 8b 00 mov rax, QWORD PTR [rax] - 00788 83 78 08 03 cmp DWORD PTR [rax+8], 3 - 0078c 0f 85 4d 01 00 + 0078a 48 8b 00 mov rax, QWORD PTR [rax] + 0078d 83 78 08 03 cmp DWORD PTR [rax+8], 3 + 00791 0f 85 4e 01 00 00 jne $LN61@load_jpeg_ ; 3427 : if (is_rgb) { - 00792 83 7d 44 00 cmp DWORD PTR is_rgb$[rbp], 0 - 00796 0f 84 e8 00 00 + 00797 83 7d 44 00 cmp DWORD PTR is_rgb$[rbp], 0 + 0079b 0f 84 e8 00 00 00 je $LN63@load_jpeg_ ; 3428 : for (i = 0; i < z->s->img_x; ++i) { - 0079c c7 85 84 00 00 + 007a1 c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$6[rbp], 0 - 007a6 eb 0e jmp SHORT $LN13@load_jpeg_ + 007ab eb 0e jmp SHORT $LN13@load_jpeg_ $LN11@load_jpeg_: - 007a8 8b 85 84 00 00 + 007ad 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 007ae ff c0 inc eax - 007b0 89 85 84 00 00 + 007b3 ff c0 inc eax + 007b5 89 85 84 00 00 00 mov DWORD PTR i$6[rbp], eax $LN13@load_jpeg_: - 007b6 48 8b 85 30 05 + 007bb 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 007bd 48 8b 00 mov rax, QWORD PTR [rax] - 007c0 8b 00 mov eax, DWORD PTR [rax] - 007c2 39 85 84 00 00 + 007c2 48 8b 00 mov rax, QWORD PTR [rax] + 007c5 8b 00 mov eax, DWORD PTR [rax] + 007c7 39 85 84 00 00 00 cmp DWORD PTR i$6[rbp], eax - 007c8 0f 83 b4 00 00 + 007cd 0f 83 b4 00 00 00 jae $LN12@load_jpeg_ ; 3429 : out[0] = y[i]; - 007ce 8b 85 84 00 00 + 007d3 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 007d4 b9 01 00 00 00 mov ecx, 1 - 007d9 48 6b c9 00 imul rcx, rcx, 0 - 007dd 48 8b 95 28 02 + 007d9 b9 01 00 00 00 mov ecx, 1 + 007de 48 6b c9 00 imul rcx, rcx, 0 + 007e2 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 007e4 4c 8b 85 88 02 + 007e9 4c 8b 85 88 02 00 00 mov r8, QWORD PTR y$15[rbp] - 007eb 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 007f0 88 04 0a mov BYTE PTR [rdx+rcx], al + 007f0 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 007f5 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3430 : out[1] = coutput[1][i]; - 007f3 b8 08 00 00 00 mov eax, 8 - 007f8 48 6b c0 01 imul rax, rax, 1 - 007fc 8b 8d 84 00 00 + 007f8 b8 08 00 00 00 mov eax, 8 + 007fd 48 6b c0 01 imul rax, rax, 1 + 00801 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 00802 48 8b 84 05 e8 + 00807 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 0080a ba 01 00 00 00 mov edx, 1 - 0080f 48 6b d2 01 imul rdx, rdx, 1 - 00813 4c 8b 85 28 02 + 0080f ba 01 00 00 00 mov edx, 1 + 00814 48 6b d2 01 imul rdx, rdx, 1 + 00818 4c 8b 85 28 02 00 00 mov r8, QWORD PTR out$12[rbp] - 0081a 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 0081e 41 88 04 10 mov BYTE PTR [r8+rdx], al + 0081f 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 00823 41 88 04 10 mov BYTE PTR [r8+rdx], al ; 3431 : out[2] = coutput[2][i]; - 00822 b8 08 00 00 00 mov eax, 8 - 00827 48 6b c0 02 imul rax, rax, 2 - 0082b 8b 8d 84 00 00 + 00827 b8 08 00 00 00 mov eax, 8 + 0082c 48 6b c0 02 imul rax, rax, 2 + 00830 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 00831 48 8b 84 05 e8 + 00836 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 00839 ba 01 00 00 00 mov edx, 1 - 0083e 48 6b d2 02 imul rdx, rdx, 2 - 00842 4c 8b 85 28 02 + 0083e ba 01 00 00 00 mov edx, 1 + 00843 48 6b d2 02 imul rdx, rdx, 2 + 00847 4c 8b 85 28 02 00 00 mov r8, QWORD PTR out$12[rbp] - 00849 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 0084d 41 88 04 10 mov BYTE PTR [r8+rdx], al + 0084e 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 00852 41 88 04 10 mov BYTE PTR [r8+rdx], al ; 3432 : out[3] = 255; - 00851 b8 01 00 00 00 mov eax, 1 - 00856 48 6b c0 03 imul rax, rax, 3 - 0085a 48 8b 8d 28 02 + 00856 b8 01 00 00 00 mov eax, 1 + 0085b 48 6b c0 03 imul rax, rax, 3 + 0085f 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00861 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00866 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH ; 3433 : out += n; - 00865 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] - 00869 48 8b 8d 28 02 + 0086a 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] + 0086e 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00870 48 03 c8 add rcx, rax - 00873 48 8b c1 mov rax, rcx - 00876 48 89 85 28 02 + 00875 48 03 c8 add rcx, rax + 00878 48 8b c1 mov rax, rcx + 0087b 48 89 85 28 02 00 00 mov QWORD PTR out$12[rbp], rax ; 3434 : } - 0087d e9 26 ff ff ff jmp $LN11@load_jpeg_ + 00882 e9 26 ff ff ff jmp $LN11@load_jpeg_ $LN12@load_jpeg_: ; 3435 : } - 00882 eb 56 jmp SHORT $LN64@load_jpeg_ + 00887 eb 57 jmp SHORT $LN64@load_jpeg_ $LN63@load_jpeg_: ; 3436 : else { ; 3437 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); - 00884 48 8b 85 30 05 + 00889 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 0088b 48 8b 00 mov rax, QWORD PTR [rax] - 0088e b9 08 00 00 00 mov ecx, 8 - 00893 48 6b c9 02 imul rcx, rcx, 2 - 00897 ba 08 00 00 00 mov edx, 8 - 0089c 48 6b d2 01 imul rdx, rdx, 1 - 008a0 44 8b 45 04 mov r8d, DWORD PTR n$[rbp] - 008a4 44 89 44 24 28 mov DWORD PTR [rsp+40], r8d - 008a9 8b 00 mov eax, DWORD PTR [rax] - 008ab 89 44 24 20 mov DWORD PTR [rsp+32], eax - 008af 4c 8b 8c 0d e8 + 00890 48 8b 00 mov rax, QWORD PTR [rax] + 00893 b9 08 00 00 00 mov ecx, 8 + 00898 48 6b c9 02 imul rcx, rcx, 2 + 0089c ba 08 00 00 00 mov edx, 8 + 008a1 48 6b d2 01 imul rdx, rdx, 1 + 008a5 44 8b 45 04 mov r8d, DWORD PTR n$[rbp] + 008a9 44 89 44 24 28 mov DWORD PTR [rsp+40], r8d + 008ae 8b 00 mov eax, DWORD PTR [rax] + 008b0 89 44 24 20 mov DWORD PTR [rsp+32], eax + 008b4 4c 8b 8c 0d e8 00 00 00 mov r9, QWORD PTR coutput$9[rbp+rcx] - 008b7 4c 8b 84 15 e8 + 008bc 4c 8b 84 15 e8 00 00 00 mov r8, QWORD PTR coutput$9[rbp+rdx] - 008bf 48 8b 95 88 02 + 008c4 48 8b 95 88 02 00 00 mov rdx, QWORD PTR y$15[rbp] - 008c6 48 8b 8d 28 02 + 008cb 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 008cd 48 8b 85 30 05 + 008d2 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 008d4 ff 90 78 48 00 + 008d9 ff 90 78 48 00 00 call QWORD PTR [rax+18552] + 008df 90 npad 1 $LN64@load_jpeg_: ; 3438 : } ; 3439 : } - 008da e9 2b 04 00 00 jmp $LN62@load_jpeg_ + 008e0 e9 2d 04 00 00 jmp $LN62@load_jpeg_ $LN61@load_jpeg_: ; 3440 : else if (z->s->img_n == 4) { - 008df 48 8b 85 30 05 + 008e5 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 008e6 48 8b 00 mov rax, QWORD PTR [rax] - 008e9 83 78 08 04 cmp DWORD PTR [rax+8], 4 - 008ed 0f 85 3f 03 00 + 008ec 48 8b 00 mov rax, QWORD PTR [rax] + 008ef 83 78 08 04 cmp DWORD PTR [rax+8], 4 + 008f3 0f 85 41 03 00 00 jne $LN65@load_jpeg_ ; 3441 : if (z->app14_color_transform == 0) { // CMYK - 008f3 48 8b 85 30 05 + 008f9 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 008fa 83 b8 4c 48 00 + 00900 83 b8 4c 48 00 00 00 cmp DWORD PTR [rax+18508], 0 - 00901 0f 85 37 01 00 + 00907 0f 85 37 01 00 00 jne $LN67@load_jpeg_ ; 3442 : for (i = 0; i < z->s->img_x; ++i) { - 00907 c7 85 84 00 00 + 0090d c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$6[rbp], 0 - 00911 eb 0e jmp SHORT $LN16@load_jpeg_ + 00917 eb 0e jmp SHORT $LN16@load_jpeg_ $LN14@load_jpeg_: - 00913 8b 85 84 00 00 + 00919 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 00919 ff c0 inc eax - 0091b 89 85 84 00 00 + 0091f ff c0 inc eax + 00921 89 85 84 00 00 00 mov DWORD PTR i$6[rbp], eax $LN16@load_jpeg_: - 00921 48 8b 85 30 05 + 00927 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00928 48 8b 00 mov rax, QWORD PTR [rax] - 0092b 8b 00 mov eax, DWORD PTR [rax] - 0092d 39 85 84 00 00 + 0092e 48 8b 00 mov rax, QWORD PTR [rax] + 00931 8b 00 mov eax, DWORD PTR [rax] + 00933 39 85 84 00 00 00 cmp DWORD PTR i$6[rbp], eax - 00933 0f 83 00 01 00 + 00939 0f 83 00 01 00 00 jae $LN15@load_jpeg_ ; 3443 : stbi_uc m = coutput[3][i]; - 00939 b8 08 00 00 00 mov eax, 8 - 0093e 48 6b c0 03 imul rax, rax, 3 - 00942 8b 8d 84 00 00 + 0093f b8 08 00 00 00 mov eax, 8 + 00944 48 6b c0 03 imul rax, rax, 3 + 00948 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 00948 48 8b 84 05 e8 + 0094e 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 00950 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 00954 88 85 a4 02 00 + 00956 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 0095a 88 85 a4 02 00 00 mov BYTE PTR m$16[rbp], al ; 3444 : out[0] = stbi__blinn_8x8(coutput[0][i], m); - 0095a b8 08 00 00 00 mov eax, 8 - 0095f 48 6b c0 00 imul rax, rax, 0 - 00963 8b 8d 84 00 00 + 00960 b8 08 00 00 00 mov eax, 8 + 00965 48 6b c0 00 imul rax, rax, 0 + 00969 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 00969 48 8b 84 05 e8 + 0096f 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 00971 0f b6 95 a4 02 + 00977 0f b6 95 a4 02 00 00 movzx edx, BYTE PTR m$16[rbp] - 00978 0f b6 0c 08 movzx ecx, BYTE PTR [rax+rcx] - 0097c e8 00 00 00 00 call stbi__blinn_8x8 - 00981 b9 01 00 00 00 mov ecx, 1 - 00986 48 6b c9 00 imul rcx, rcx, 0 - 0098a 48 8b 95 28 02 + 0097e 0f b6 0c 08 movzx ecx, BYTE PTR [rax+rcx] + 00982 e8 00 00 00 00 call stbi__blinn_8x8 + 00987 b9 01 00 00 00 mov ecx, 1 + 0098c 48 6b c9 00 imul rcx, rcx, 0 + 00990 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 00991 88 04 0a mov BYTE PTR [rdx+rcx], al + 00997 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3445 : out[1] = stbi__blinn_8x8(coutput[1][i], m); - 00994 b8 08 00 00 00 mov eax, 8 - 00999 48 6b c0 01 imul rax, rax, 1 - 0099d 8b 8d 84 00 00 + 0099a b8 08 00 00 00 mov eax, 8 + 0099f 48 6b c0 01 imul rax, rax, 1 + 009a3 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 009a3 48 8b 84 05 e8 + 009a9 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 009ab 0f b6 95 a4 02 + 009b1 0f b6 95 a4 02 00 00 movzx edx, BYTE PTR m$16[rbp] - 009b2 0f b6 0c 08 movzx ecx, BYTE PTR [rax+rcx] - 009b6 e8 00 00 00 00 call stbi__blinn_8x8 - 009bb b9 01 00 00 00 mov ecx, 1 - 009c0 48 6b c9 01 imul rcx, rcx, 1 - 009c4 48 8b 95 28 02 + 009b8 0f b6 0c 08 movzx ecx, BYTE PTR [rax+rcx] + 009bc e8 00 00 00 00 call stbi__blinn_8x8 + 009c1 b9 01 00 00 00 mov ecx, 1 + 009c6 48 6b c9 01 imul rcx, rcx, 1 + 009ca 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 009cb 88 04 0a mov BYTE PTR [rdx+rcx], al + 009d1 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3446 : out[2] = stbi__blinn_8x8(coutput[2][i], m); - 009ce b8 08 00 00 00 mov eax, 8 - 009d3 48 6b c0 02 imul rax, rax, 2 - 009d7 8b 8d 84 00 00 + 009d4 b8 08 00 00 00 mov eax, 8 + 009d9 48 6b c0 02 imul rax, rax, 2 + 009dd 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 009dd 48 8b 84 05 e8 + 009e3 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 009e5 0f b6 95 a4 02 + 009eb 0f b6 95 a4 02 00 00 movzx edx, BYTE PTR m$16[rbp] - 009ec 0f b6 0c 08 movzx ecx, BYTE PTR [rax+rcx] - 009f0 e8 00 00 00 00 call stbi__blinn_8x8 - 009f5 b9 01 00 00 00 mov ecx, 1 - 009fa 48 6b c9 02 imul rcx, rcx, 2 - 009fe 48 8b 95 28 02 + 009f2 0f b6 0c 08 movzx ecx, BYTE PTR [rax+rcx] + 009f6 e8 00 00 00 00 call stbi__blinn_8x8 + 009fb b9 01 00 00 00 mov ecx, 1 + 00a00 48 6b c9 02 imul rcx, rcx, 2 + 00a04 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 00a05 88 04 0a mov BYTE PTR [rdx+rcx], al + 00a0b 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3447 : out[3] = 255; - 00a08 b8 01 00 00 00 mov eax, 1 - 00a0d 48 6b c0 03 imul rax, rax, 3 - 00a11 48 8b 8d 28 02 + 00a0e b8 01 00 00 00 mov eax, 1 + 00a13 48 6b c0 03 imul rax, rax, 3 + 00a17 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00a18 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00a1e c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH ; 3448 : out += n; - 00a1c 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] - 00a20 48 8b 8d 28 02 + 00a22 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] + 00a26 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00a27 48 03 c8 add rcx, rax - 00a2a 48 8b c1 mov rax, rcx - 00a2d 48 89 85 28 02 + 00a2d 48 03 c8 add rcx, rax + 00a30 48 8b c1 mov rax, rcx + 00a33 48 89 85 28 02 00 00 mov QWORD PTR out$12[rbp], rax ; 3449 : } - 00a34 e9 da fe ff ff jmp $LN14@load_jpeg_ + 00a3a e9 da fe ff ff jmp $LN14@load_jpeg_ $LN15@load_jpeg_: ; 3450 : } - 00a39 e9 ef 01 00 00 jmp $LN68@load_jpeg_ + 00a3f e9 f1 01 00 00 jmp $LN68@load_jpeg_ $LN67@load_jpeg_: ; 3451 : else if (z->app14_color_transform == 2) { // YCCK - 00a3e 48 8b 85 30 05 + 00a44 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00a45 83 b8 4c 48 00 + 00a4b 83 b8 4c 48 00 00 02 cmp DWORD PTR [rax+18508], 2 - 00a4c 0f 85 85 01 00 + 00a52 0f 85 86 01 00 00 jne $LN69@load_jpeg_ ; 3452 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); - 00a52 48 8b 85 30 05 + 00a58 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00a59 48 8b 00 mov rax, QWORD PTR [rax] - 00a5c b9 08 00 00 00 mov ecx, 8 - 00a61 48 6b c9 02 imul rcx, rcx, 2 - 00a65 ba 08 00 00 00 mov edx, 8 - 00a6a 48 6b d2 01 imul rdx, rdx, 1 - 00a6e 44 8b 45 04 mov r8d, DWORD PTR n$[rbp] - 00a72 44 89 44 24 28 mov DWORD PTR [rsp+40], r8d - 00a77 8b 00 mov eax, DWORD PTR [rax] - 00a79 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00a7d 4c 8b 8c 0d e8 + 00a5f 48 8b 00 mov rax, QWORD PTR [rax] + 00a62 b9 08 00 00 00 mov ecx, 8 + 00a67 48 6b c9 02 imul rcx, rcx, 2 + 00a6b ba 08 00 00 00 mov edx, 8 + 00a70 48 6b d2 01 imul rdx, rdx, 1 + 00a74 44 8b 45 04 mov r8d, DWORD PTR n$[rbp] + 00a78 44 89 44 24 28 mov DWORD PTR [rsp+40], r8d + 00a7d 8b 00 mov eax, DWORD PTR [rax] + 00a7f 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00a83 4c 8b 8c 0d e8 00 00 00 mov r9, QWORD PTR coutput$9[rbp+rcx] - 00a85 4c 8b 84 15 e8 + 00a8b 4c 8b 84 15 e8 00 00 00 mov r8, QWORD PTR coutput$9[rbp+rdx] - 00a8d 48 8b 95 88 02 + 00a93 48 8b 95 88 02 00 00 mov rdx, QWORD PTR y$15[rbp] - 00a94 48 8b 8d 28 02 + 00a9a 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00a9b 48 8b 85 30 05 + 00aa1 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00aa2 ff 90 78 48 00 + 00aa8 ff 90 78 48 00 00 call QWORD PTR [rax+18552] + 00aae 90 npad 1 ; 3453 : for (i = 0; i < z->s->img_x; ++i) { - 00aa8 c7 85 84 00 00 + 00aaf c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$6[rbp], 0 - 00ab2 eb 0e jmp SHORT $LN19@load_jpeg_ + 00ab9 eb 0e jmp SHORT $LN19@load_jpeg_ $LN17@load_jpeg_: - 00ab4 8b 85 84 00 00 + 00abb 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 00aba ff c0 inc eax - 00abc 89 85 84 00 00 + 00ac1 ff c0 inc eax + 00ac3 89 85 84 00 00 00 mov DWORD PTR i$6[rbp], eax $LN19@load_jpeg_: - 00ac2 48 8b 85 30 05 + 00ac9 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00ac9 48 8b 00 mov rax, QWORD PTR [rax] - 00acc 8b 00 mov eax, DWORD PTR [rax] - 00ace 39 85 84 00 00 + 00ad0 48 8b 00 mov rax, QWORD PTR [rax] + 00ad3 8b 00 mov eax, DWORD PTR [rax] + 00ad5 39 85 84 00 00 00 cmp DWORD PTR i$6[rbp], eax - 00ad4 0f 83 fb 00 00 + 00adb 0f 83 fb 00 00 00 jae $LN18@load_jpeg_ ; 3454 : stbi_uc m = coutput[3][i]; - 00ada b8 08 00 00 00 mov eax, 8 - 00adf 48 6b c0 03 imul rax, rax, 3 - 00ae3 8b 8d 84 00 00 + 00ae1 b8 08 00 00 00 mov eax, 8 + 00ae6 48 6b c0 03 imul rax, rax, 3 + 00aea 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 00ae9 48 8b 84 05 e8 + 00af0 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 00af1 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 00af5 88 85 c4 02 00 + 00af8 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 00afc 88 85 c4 02 00 00 mov BYTE PTR m$17[rbp], al ; 3455 : out[0] = stbi__blinn_8x8(255 - out[0], m); - 00afb b8 01 00 00 00 mov eax, 1 - 00b00 48 6b c0 00 imul rax, rax, 0 - 00b04 48 8b 8d 28 02 + 00b02 b8 01 00 00 00 mov eax, 1 + 00b07 48 6b c0 00 imul rax, rax, 0 + 00b0b 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00b0b 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00b0f b9 ff 00 00 00 mov ecx, 255 ; 000000ffH - 00b14 2b c8 sub ecx, eax - 00b16 8b c1 mov eax, ecx - 00b18 0f b6 95 c4 02 + 00b12 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00b16 b9 ff 00 00 00 mov ecx, 255 ; 000000ffH + 00b1b 2b c8 sub ecx, eax + 00b1d 8b c1 mov eax, ecx + 00b1f 0f b6 95 c4 02 00 00 movzx edx, BYTE PTR m$17[rbp] - 00b1f 0f b6 c8 movzx ecx, al - 00b22 e8 00 00 00 00 call stbi__blinn_8x8 - 00b27 b9 01 00 00 00 mov ecx, 1 - 00b2c 48 6b c9 00 imul rcx, rcx, 0 - 00b30 48 8b 95 28 02 + 00b26 0f b6 c8 movzx ecx, al + 00b29 e8 00 00 00 00 call stbi__blinn_8x8 + 00b2e b9 01 00 00 00 mov ecx, 1 + 00b33 48 6b c9 00 imul rcx, rcx, 0 + 00b37 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 00b37 88 04 0a mov BYTE PTR [rdx+rcx], al + 00b3e 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3456 : out[1] = stbi__blinn_8x8(255 - out[1], m); - 00b3a b8 01 00 00 00 mov eax, 1 - 00b3f 48 6b c0 01 imul rax, rax, 1 - 00b43 48 8b 8d 28 02 + 00b41 b8 01 00 00 00 mov eax, 1 + 00b46 48 6b c0 01 imul rax, rax, 1 + 00b4a 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00b4a 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00b4e b9 ff 00 00 00 mov ecx, 255 ; 000000ffH - 00b53 2b c8 sub ecx, eax - 00b55 8b c1 mov eax, ecx - 00b57 0f b6 95 c4 02 + 00b51 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00b55 b9 ff 00 00 00 mov ecx, 255 ; 000000ffH + 00b5a 2b c8 sub ecx, eax + 00b5c 8b c1 mov eax, ecx + 00b5e 0f b6 95 c4 02 00 00 movzx edx, BYTE PTR m$17[rbp] - 00b5e 0f b6 c8 movzx ecx, al - 00b61 e8 00 00 00 00 call stbi__blinn_8x8 - 00b66 b9 01 00 00 00 mov ecx, 1 - 00b6b 48 6b c9 01 imul rcx, rcx, 1 - 00b6f 48 8b 95 28 02 + 00b65 0f b6 c8 movzx ecx, al + 00b68 e8 00 00 00 00 call stbi__blinn_8x8 + 00b6d b9 01 00 00 00 mov ecx, 1 + 00b72 48 6b c9 01 imul rcx, rcx, 1 + 00b76 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 00b76 88 04 0a mov BYTE PTR [rdx+rcx], al + 00b7d 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3457 : out[2] = stbi__blinn_8x8(255 - out[2], m); - 00b79 b8 01 00 00 00 mov eax, 1 - 00b7e 48 6b c0 02 imul rax, rax, 2 - 00b82 48 8b 8d 28 02 + 00b80 b8 01 00 00 00 mov eax, 1 + 00b85 48 6b c0 02 imul rax, rax, 2 + 00b89 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00b89 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00b8d b9 ff 00 00 00 mov ecx, 255 ; 000000ffH - 00b92 2b c8 sub ecx, eax - 00b94 8b c1 mov eax, ecx - 00b96 0f b6 95 c4 02 + 00b90 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00b94 b9 ff 00 00 00 mov ecx, 255 ; 000000ffH + 00b99 2b c8 sub ecx, eax + 00b9b 8b c1 mov eax, ecx + 00b9d 0f b6 95 c4 02 00 00 movzx edx, BYTE PTR m$17[rbp] - 00b9d 0f b6 c8 movzx ecx, al - 00ba0 e8 00 00 00 00 call stbi__blinn_8x8 - 00ba5 b9 01 00 00 00 mov ecx, 1 - 00baa 48 6b c9 02 imul rcx, rcx, 2 - 00bae 48 8b 95 28 02 + 00ba4 0f b6 c8 movzx ecx, al + 00ba7 e8 00 00 00 00 call stbi__blinn_8x8 + 00bac b9 01 00 00 00 mov ecx, 1 + 00bb1 48 6b c9 02 imul rcx, rcx, 2 + 00bb5 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 00bb5 88 04 0a mov BYTE PTR [rdx+rcx], al + 00bbc 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3458 : out += n; - 00bb8 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] - 00bbc 48 8b 8d 28 02 + 00bbf 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] + 00bc3 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00bc3 48 03 c8 add rcx, rax - 00bc6 48 8b c1 mov rax, rcx - 00bc9 48 89 85 28 02 + 00bca 48 03 c8 add rcx, rax + 00bcd 48 8b c1 mov rax, rcx + 00bd0 48 89 85 28 02 00 00 mov QWORD PTR out$12[rbp], rax ; 3459 : } - 00bd0 e9 df fe ff ff jmp $LN17@load_jpeg_ + 00bd7 e9 df fe ff ff jmp $LN17@load_jpeg_ $LN18@load_jpeg_: ; 3460 : } - 00bd5 eb 56 jmp SHORT $LN70@load_jpeg_ + 00bdc eb 57 jmp SHORT $LN70@load_jpeg_ $LN69@load_jpeg_: ; 3461 : else { // YCbCr + alpha? Ignore the fourth channel for now ; 3462 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); - 00bd7 48 8b 85 30 05 + 00bde 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00bde 48 8b 00 mov rax, QWORD PTR [rax] - 00be1 b9 08 00 00 00 mov ecx, 8 - 00be6 48 6b c9 02 imul rcx, rcx, 2 - 00bea ba 08 00 00 00 mov edx, 8 - 00bef 48 6b d2 01 imul rdx, rdx, 1 - 00bf3 44 8b 45 04 mov r8d, DWORD PTR n$[rbp] - 00bf7 44 89 44 24 28 mov DWORD PTR [rsp+40], r8d - 00bfc 8b 00 mov eax, DWORD PTR [rax] - 00bfe 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00c02 4c 8b 8c 0d e8 + 00be5 48 8b 00 mov rax, QWORD PTR [rax] + 00be8 b9 08 00 00 00 mov ecx, 8 + 00bed 48 6b c9 02 imul rcx, rcx, 2 + 00bf1 ba 08 00 00 00 mov edx, 8 + 00bf6 48 6b d2 01 imul rdx, rdx, 1 + 00bfa 44 8b 45 04 mov r8d, DWORD PTR n$[rbp] + 00bfe 44 89 44 24 28 mov DWORD PTR [rsp+40], r8d + 00c03 8b 00 mov eax, DWORD PTR [rax] + 00c05 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00c09 4c 8b 8c 0d e8 00 00 00 mov r9, QWORD PTR coutput$9[rbp+rcx] - 00c0a 4c 8b 84 15 e8 + 00c11 4c 8b 84 15 e8 00 00 00 mov r8, QWORD PTR coutput$9[rbp+rdx] - 00c12 48 8b 95 88 02 + 00c19 48 8b 95 88 02 00 00 mov rdx, QWORD PTR y$15[rbp] - 00c19 48 8b 8d 28 02 + 00c20 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00c20 48 8b 85 30 05 + 00c27 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00c27 ff 90 78 48 00 + 00c2e ff 90 78 48 00 00 call QWORD PTR [rax+18552] + 00c34 90 npad 1 $LN70@load_jpeg_: $LN68@load_jpeg_: ; 3463 : } ; 3464 : } - 00c2d e9 d8 00 00 00 jmp $LN66@load_jpeg_ + 00c35 e9 d8 00 00 00 jmp $LN66@load_jpeg_ $LN65@load_jpeg_: ; 3465 : else ; 3466 : for (i = 0; i < z->s->img_x; ++i) { - 00c32 c7 85 84 00 00 + 00c3a c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$6[rbp], 0 - 00c3c eb 0e jmp SHORT $LN22@load_jpeg_ + 00c44 eb 0e jmp SHORT $LN22@load_jpeg_ $LN20@load_jpeg_: - 00c3e 8b 85 84 00 00 + 00c46 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 00c44 ff c0 inc eax - 00c46 89 85 84 00 00 + 00c4c ff c0 inc eax + 00c4e 89 85 84 00 00 00 mov DWORD PTR i$6[rbp], eax $LN22@load_jpeg_: - 00c4c 48 8b 85 30 05 + 00c54 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00c53 48 8b 00 mov rax, QWORD PTR [rax] - 00c56 8b 00 mov eax, DWORD PTR [rax] - 00c58 39 85 84 00 00 + 00c5b 48 8b 00 mov rax, QWORD PTR [rax] + 00c5e 8b 00 mov eax, DWORD PTR [rax] + 00c60 39 85 84 00 00 00 cmp DWORD PTR i$6[rbp], eax - 00c5e 0f 83 a6 00 00 + 00c66 0f 83 a6 00 00 00 jae $LN21@load_jpeg_ ; 3467 : out[0] = out[1] = out[2] = y[i]; - 00c64 8b 85 84 00 00 + 00c6c 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 00c6a b9 01 00 00 00 mov ecx, 1 - 00c6f 48 6b c9 02 imul rcx, rcx, 2 - 00c73 48 8b 95 28 02 + 00c72 b9 01 00 00 00 mov ecx, 1 + 00c77 48 6b c9 02 imul rcx, rcx, 2 + 00c7b 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 00c7a 4c 8b 85 88 02 + 00c82 4c 8b 85 88 02 00 00 mov r8, QWORD PTR y$15[rbp] - 00c81 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00c86 88 04 0a mov BYTE PTR [rdx+rcx], al - 00c89 b8 01 00 00 00 mov eax, 1 - 00c8e 48 6b c0 02 imul rax, rax, 2 - 00c92 b9 01 00 00 00 mov ecx, 1 - 00c97 48 6b c9 01 imul rcx, rcx, 1 - 00c9b 48 8b 95 28 02 + 00c89 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00c8e 88 04 0a mov BYTE PTR [rdx+rcx], al + 00c91 b8 01 00 00 00 mov eax, 1 + 00c96 48 6b c0 02 imul rax, rax, 2 + 00c9a b9 01 00 00 00 mov ecx, 1 + 00c9f 48 6b c9 01 imul rcx, rcx, 1 + 00ca3 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 00ca2 4c 8b 85 28 02 + 00caa 4c 8b 85 28 02 00 00 mov r8, QWORD PTR out$12[rbp] - 00ca9 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00cae 88 04 0a mov BYTE PTR [rdx+rcx], al - 00cb1 b8 01 00 00 00 mov eax, 1 - 00cb6 48 6b c0 01 imul rax, rax, 1 - 00cba b9 01 00 00 00 mov ecx, 1 - 00cbf 48 6b c9 00 imul rcx, rcx, 0 - 00cc3 48 8b 95 28 02 + 00cb1 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00cb6 88 04 0a mov BYTE PTR [rdx+rcx], al + 00cb9 b8 01 00 00 00 mov eax, 1 + 00cbe 48 6b c0 01 imul rax, rax, 1 + 00cc2 b9 01 00 00 00 mov ecx, 1 + 00cc7 48 6b c9 00 imul rcx, rcx, 0 + 00ccb 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 00cca 4c 8b 85 28 02 + 00cd2 4c 8b 85 28 02 00 00 mov r8, QWORD PTR out$12[rbp] - 00cd1 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00cd6 88 04 0a mov BYTE PTR [rdx+rcx], al + 00cd9 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00cde 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3468 : out[3] = 255; // not used if n==3 - 00cd9 b8 01 00 00 00 mov eax, 1 - 00cde 48 6b c0 03 imul rax, rax, 3 - 00ce2 48 8b 8d 28 02 + 00ce1 b8 01 00 00 00 mov eax, 1 + 00ce6 48 6b c0 03 imul rax, rax, 3 + 00cea 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00ce9 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00cf1 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH ; 3469 : out += n; - 00ced 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] - 00cf1 48 8b 8d 28 02 + 00cf5 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] + 00cf9 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00cf8 48 03 c8 add rcx, rax - 00cfb 48 8b c1 mov rax, rcx - 00cfe 48 89 85 28 02 + 00d00 48 03 c8 add rcx, rax + 00d03 48 8b c1 mov rax, rcx + 00d06 48 89 85 28 02 00 00 mov QWORD PTR out$12[rbp], rax ; 3470 : } - 00d05 e9 34 ff ff ff jmp $LN20@load_jpeg_ + 00d0d e9 34 ff ff ff jmp $LN20@load_jpeg_ $LN21@load_jpeg_: $LN66@load_jpeg_: $LN62@load_jpeg_: ; 3471 : } - 00d0a e9 10 05 00 00 jmp $LN60@load_jpeg_ + 00d12 e9 10 05 00 00 jmp $LN60@load_jpeg_ $LN59@load_jpeg_: ; 3472 : else { ; 3473 : if (is_rgb) { - 00d0f 83 7d 44 00 cmp DWORD PTR is_rgb$[rbp], 0 - 00d13 0f 84 ab 01 00 + 00d17 83 7d 44 00 cmp DWORD PTR is_rgb$[rbp], 0 + 00d1b 0f 84 ab 01 00 00 je $LN71@load_jpeg_ ; 3474 : if (n == 1) - 00d19 83 7d 04 01 cmp DWORD PTR n$[rbp], 1 - 00d1d 0f 85 c1 00 00 + 00d21 83 7d 04 01 cmp DWORD PTR n$[rbp], 1 + 00d25 0f 85 c1 00 00 00 jne $LN73@load_jpeg_ ; 3475 : for (i = 0; i < z->s->img_x; ++i) - 00d23 c7 85 84 00 00 + 00d2b c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$6[rbp], 0 - 00d2d eb 0e jmp SHORT $LN25@load_jpeg_ + 00d35 eb 0e jmp SHORT $LN25@load_jpeg_ $LN23@load_jpeg_: - 00d2f 8b 85 84 00 00 + 00d37 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 00d35 ff c0 inc eax - 00d37 89 85 84 00 00 + 00d3d ff c0 inc eax + 00d3f 89 85 84 00 00 00 mov DWORD PTR i$6[rbp], eax $LN25@load_jpeg_: - 00d3d 48 8b 85 30 05 + 00d45 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00d44 48 8b 00 mov rax, QWORD PTR [rax] - 00d47 8b 00 mov eax, DWORD PTR [rax] - 00d49 39 85 84 00 00 + 00d4c 48 8b 00 mov rax, QWORD PTR [rax] + 00d4f 8b 00 mov eax, DWORD PTR [rax] + 00d51 39 85 84 00 00 00 cmp DWORD PTR i$6[rbp], eax - 00d4f 0f 83 8a 00 00 + 00d57 0f 83 8a 00 00 00 jae $LN24@load_jpeg_ ; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - 00d55 b8 08 00 00 00 mov eax, 8 - 00d5a 48 6b c0 02 imul rax, rax, 2 - 00d5e 8b 8d 84 00 00 + 00d5d b8 08 00 00 00 mov eax, 8 + 00d62 48 6b c0 02 imul rax, rax, 2 + 00d66 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 00d64 48 8b 84 05 e8 + 00d6c 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 00d6c 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 00d70 b9 08 00 00 00 mov ecx, 8 - 00d75 48 6b c9 01 imul rcx, rcx, 1 - 00d79 8b 95 84 00 00 + 00d74 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 00d78 b9 08 00 00 00 mov ecx, 8 + 00d7d 48 6b c9 01 imul rcx, rcx, 1 + 00d81 8b 95 84 00 00 00 mov edx, DWORD PTR i$6[rbp] - 00d7f 48 8b 8c 0d e8 + 00d87 48 8b 8c 0d e8 00 00 00 mov rcx, QWORD PTR coutput$9[rbp+rcx] - 00d87 0f b6 0c 11 movzx ecx, BYTE PTR [rcx+rdx] - 00d8b ba 08 00 00 00 mov edx, 8 - 00d90 48 6b d2 00 imul rdx, rdx, 0 - 00d94 44 8b 85 84 00 + 00d8f 0f b6 0c 11 movzx ecx, BYTE PTR [rcx+rdx] + 00d93 ba 08 00 00 00 mov edx, 8 + 00d98 48 6b d2 00 imul rdx, rdx, 0 + 00d9c 44 8b 85 84 00 00 00 mov r8d, DWORD PTR i$6[rbp] - 00d9b 48 8b 94 15 e8 + 00da3 48 8b 94 15 e8 00 00 00 mov rdx, QWORD PTR coutput$9[rbp+rdx] - 00da3 42 0f b6 14 02 movzx edx, BYTE PTR [rdx+r8] - 00da8 89 95 f4 04 00 + 00dab 42 0f b6 14 02 movzx edx, BYTE PTR [rdx+r8] + 00db0 89 95 f4 04 00 00 mov DWORD PTR tv516[rbp], edx - 00dae 44 8b c0 mov r8d, eax - 00db1 8b d1 mov edx, ecx - 00db3 8b 85 f4 04 00 + 00db6 44 8b c0 mov r8d, eax + 00db9 8b d1 mov edx, ecx + 00dbb 8b 85 f4 04 00 00 mov eax, DWORD PTR tv516[rbp] - 00db9 8b c8 mov ecx, eax - 00dbb e8 00 00 00 00 call stbi__compute_y - 00dc0 48 8b 8d 28 02 + 00dc1 8b c8 mov ecx, eax + 00dc3 e8 00 00 00 00 call stbi__compute_y + 00dc8 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00dc7 88 01 mov BYTE PTR [rcx], al - 00dc9 48 8b 85 28 02 + 00dcf 88 01 mov BYTE PTR [rcx], al + 00dd1 48 8b 85 28 02 00 00 mov rax, QWORD PTR out$12[rbp] - 00dd0 48 ff c0 inc rax - 00dd3 48 89 85 28 02 + 00dd8 48 ff c0 inc rax + 00ddb 48 89 85 28 02 00 00 mov QWORD PTR out$12[rbp], rax - 00dda e9 50 ff ff ff jmp $LN23@load_jpeg_ + 00de2 e9 50 ff ff ff jmp $LN23@load_jpeg_ $LN24@load_jpeg_: - 00ddf e9 db 00 00 00 jmp $LN74@load_jpeg_ + 00de7 e9 db 00 00 00 jmp $LN74@load_jpeg_ $LN73@load_jpeg_: ; 3477 : else { ; 3478 : for (i = 0; i < z->s->img_x; ++i, out += 2) { - 00de4 c7 85 84 00 00 + 00dec c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$6[rbp], 0 - 00dee eb 20 jmp SHORT $LN28@load_jpeg_ + 00df6 eb 20 jmp SHORT $LN28@load_jpeg_ $LN26@load_jpeg_: - 00df0 8b 85 84 00 00 + 00df8 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 00df6 ff c0 inc eax - 00df8 89 85 84 00 00 + 00dfe ff c0 inc eax + 00e00 89 85 84 00 00 00 mov DWORD PTR i$6[rbp], eax - 00dfe 48 8b 85 28 02 + 00e06 48 8b 85 28 02 00 00 mov rax, QWORD PTR out$12[rbp] - 00e05 48 83 c0 02 add rax, 2 - 00e09 48 89 85 28 02 + 00e0d 48 83 c0 02 add rax, 2 + 00e11 48 89 85 28 02 00 00 mov QWORD PTR out$12[rbp], rax $LN28@load_jpeg_: - 00e10 48 8b 85 30 05 + 00e18 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00e17 48 8b 00 mov rax, QWORD PTR [rax] - 00e1a 8b 00 mov eax, DWORD PTR [rax] - 00e1c 39 85 84 00 00 + 00e1f 48 8b 00 mov rax, QWORD PTR [rax] + 00e22 8b 00 mov eax, DWORD PTR [rax] + 00e24 39 85 84 00 00 00 cmp DWORD PTR i$6[rbp], eax - 00e22 0f 83 97 00 00 + 00e2a 0f 83 97 00 00 00 jae $LN27@load_jpeg_ ; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - 00e28 b8 08 00 00 00 mov eax, 8 - 00e2d 48 6b c0 02 imul rax, rax, 2 - 00e31 8b 8d 84 00 00 + 00e30 b8 08 00 00 00 mov eax, 8 + 00e35 48 6b c0 02 imul rax, rax, 2 + 00e39 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 00e37 48 8b 84 05 e8 + 00e3f 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 00e3f 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 00e43 b9 08 00 00 00 mov ecx, 8 - 00e48 48 6b c9 01 imul rcx, rcx, 1 - 00e4c 8b 95 84 00 00 + 00e47 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 00e4b b9 08 00 00 00 mov ecx, 8 + 00e50 48 6b c9 01 imul rcx, rcx, 1 + 00e54 8b 95 84 00 00 00 mov edx, DWORD PTR i$6[rbp] - 00e52 48 8b 8c 0d e8 + 00e5a 48 8b 8c 0d e8 00 00 00 mov rcx, QWORD PTR coutput$9[rbp+rcx] - 00e5a 0f b6 0c 11 movzx ecx, BYTE PTR [rcx+rdx] - 00e5e ba 08 00 00 00 mov edx, 8 - 00e63 48 6b d2 00 imul rdx, rdx, 0 - 00e67 44 8b 85 84 00 + 00e62 0f b6 0c 11 movzx ecx, BYTE PTR [rcx+rdx] + 00e66 ba 08 00 00 00 mov edx, 8 + 00e6b 48 6b d2 00 imul rdx, rdx, 0 + 00e6f 44 8b 85 84 00 00 00 mov r8d, DWORD PTR i$6[rbp] - 00e6e 48 8b 94 15 e8 + 00e76 48 8b 94 15 e8 00 00 00 mov rdx, QWORD PTR coutput$9[rbp+rdx] - 00e76 42 0f b6 14 02 movzx edx, BYTE PTR [rdx+r8] - 00e7b 89 95 f4 04 00 + 00e7e 42 0f b6 14 02 movzx edx, BYTE PTR [rdx+r8] + 00e83 89 95 f4 04 00 00 mov DWORD PTR tv545[rbp], edx - 00e81 44 8b c0 mov r8d, eax - 00e84 8b d1 mov edx, ecx - 00e86 8b 85 f4 04 00 + 00e89 44 8b c0 mov r8d, eax + 00e8c 8b d1 mov edx, ecx + 00e8e 8b 85 f4 04 00 00 mov eax, DWORD PTR tv545[rbp] - 00e8c 8b c8 mov ecx, eax - 00e8e e8 00 00 00 00 call stbi__compute_y - 00e93 b9 01 00 00 00 mov ecx, 1 - 00e98 48 6b c9 00 imul rcx, rcx, 0 - 00e9c 48 8b 95 28 02 + 00e94 8b c8 mov ecx, eax + 00e96 e8 00 00 00 00 call stbi__compute_y + 00e9b b9 01 00 00 00 mov ecx, 1 + 00ea0 48 6b c9 00 imul rcx, rcx, 0 + 00ea4 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 00ea3 88 04 0a mov BYTE PTR [rdx+rcx], al + 00eab 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3480 : out[1] = 255; - 00ea6 b8 01 00 00 00 mov eax, 1 - 00eab 48 6b c0 01 imul rax, rax, 1 - 00eaf 48 8b 8d 28 02 + 00eae b8 01 00 00 00 mov eax, 1 + 00eb3 48 6b c0 01 imul rax, rax, 1 + 00eb7 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 00eb6 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00ebe c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH ; 3481 : } - 00eba e9 31 ff ff ff jmp $LN26@load_jpeg_ + 00ec2 e9 31 ff ff ff jmp $LN26@load_jpeg_ $LN27@load_jpeg_: $LN74@load_jpeg_: ; 3482 : } ; 3483 : } - 00ebf e9 5b 03 00 00 jmp $LN72@load_jpeg_ + 00ec7 e9 5b 03 00 00 jmp $LN72@load_jpeg_ $LN71@load_jpeg_: ; 3484 : else if (z->s->img_n == 4 && z->app14_color_transform == 0) { - 00ec4 48 8b 85 30 05 + 00ecc 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00ecb 48 8b 00 mov rax, QWORD PTR [rax] - 00ece 83 78 08 04 cmp DWORD PTR [rax+8], 4 - 00ed2 0f 85 64 01 00 + 00ed3 48 8b 00 mov rax, QWORD PTR [rax] + 00ed6 83 78 08 04 cmp DWORD PTR [rax+8], 4 + 00eda 0f 85 64 01 00 00 jne $LN75@load_jpeg_ - 00ed8 48 8b 85 30 05 + 00ee0 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00edf 83 b8 4c 48 00 + 00ee7 83 b8 4c 48 00 00 00 cmp DWORD PTR [rax+18508], 0 - 00ee6 0f 85 50 01 00 + 00eee 0f 85 50 01 00 00 jne $LN75@load_jpeg_ ; 3485 : for (i = 0; i < z->s->img_x; ++i) { - 00eec c7 85 84 00 00 + 00ef4 c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$6[rbp], 0 - 00ef6 eb 0e jmp SHORT $LN31@load_jpeg_ + 00efe eb 0e jmp SHORT $LN31@load_jpeg_ $LN29@load_jpeg_: - 00ef8 8b 85 84 00 00 + 00f00 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 00efe ff c0 inc eax - 00f00 89 85 84 00 00 + 00f06 ff c0 inc eax + 00f08 89 85 84 00 00 00 mov DWORD PTR i$6[rbp], eax $LN31@load_jpeg_: - 00f06 48 8b 85 30 05 + 00f0e 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 00f0d 48 8b 00 mov rax, QWORD PTR [rax] - 00f10 8b 00 mov eax, DWORD PTR [rax] - 00f12 39 85 84 00 00 + 00f15 48 8b 00 mov rax, QWORD PTR [rax] + 00f18 8b 00 mov eax, DWORD PTR [rax] + 00f1a 39 85 84 00 00 00 cmp DWORD PTR i$6[rbp], eax - 00f18 0f 83 19 01 00 + 00f20 0f 83 19 01 00 00 jae $LN30@load_jpeg_ ; 3486 : stbi_uc m = coutput[3][i]; - 00f1e b8 08 00 00 00 mov eax, 8 - 00f23 48 6b c0 03 imul rax, rax, 3 - 00f27 8b 8d 84 00 00 + 00f26 b8 08 00 00 00 mov eax, 8 + 00f2b 48 6b c0 03 imul rax, rax, 3 + 00f2f 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 00f2d 48 8b 84 05 e8 + 00f35 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 00f35 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 00f39 88 85 e4 02 00 + 00f3d 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 00f41 88 85 e4 02 00 00 mov BYTE PTR m$18[rbp], al ; 3487 : stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); - 00f3f b8 08 00 00 00 mov eax, 8 - 00f44 48 6b c0 00 imul rax, rax, 0 - 00f48 8b 8d 84 00 00 + 00f47 b8 08 00 00 00 mov eax, 8 + 00f4c 48 6b c0 00 imul rax, rax, 0 + 00f50 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 00f4e 48 8b 84 05 e8 + 00f56 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 00f56 0f b6 95 e4 02 + 00f5e 0f b6 95 e4 02 00 00 movzx edx, BYTE PTR m$18[rbp] - 00f5d 0f b6 0c 08 movzx ecx, BYTE PTR [rax+rcx] - 00f61 e8 00 00 00 00 call stbi__blinn_8x8 - 00f66 88 85 04 03 00 + 00f65 0f b6 0c 08 movzx ecx, BYTE PTR [rax+rcx] + 00f69 e8 00 00 00 00 call stbi__blinn_8x8 + 00f6e 88 85 04 03 00 00 mov BYTE PTR r$19[rbp], al ; 3488 : stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); - 00f6c b8 08 00 00 00 mov eax, 8 - 00f71 48 6b c0 01 imul rax, rax, 1 - 00f75 8b 8d 84 00 00 + 00f74 b8 08 00 00 00 mov eax, 8 + 00f79 48 6b c0 01 imul rax, rax, 1 + 00f7d 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 00f7b 48 8b 84 05 e8 + 00f83 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 00f83 0f b6 95 e4 02 + 00f8b 0f b6 95 e4 02 00 00 movzx edx, BYTE PTR m$18[rbp] - 00f8a 0f b6 0c 08 movzx ecx, BYTE PTR [rax+rcx] - 00f8e e8 00 00 00 00 call stbi__blinn_8x8 - 00f93 88 85 24 03 00 + 00f92 0f b6 0c 08 movzx ecx, BYTE PTR [rax+rcx] + 00f96 e8 00 00 00 00 call stbi__blinn_8x8 + 00f9b 88 85 24 03 00 00 mov BYTE PTR g$20[rbp], al ; 3489 : stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); - 00f99 b8 08 00 00 00 mov eax, 8 - 00f9e 48 6b c0 02 imul rax, rax, 2 - 00fa2 8b 8d 84 00 00 + 00fa1 b8 08 00 00 00 mov eax, 8 + 00fa6 48 6b c0 02 imul rax, rax, 2 + 00faa 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 00fa8 48 8b 84 05 e8 + 00fb0 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 00fb0 0f b6 95 e4 02 + 00fb8 0f b6 95 e4 02 00 00 movzx edx, BYTE PTR m$18[rbp] - 00fb7 0f b6 0c 08 movzx ecx, BYTE PTR [rax+rcx] - 00fbb e8 00 00 00 00 call stbi__blinn_8x8 - 00fc0 88 85 44 03 00 + 00fbf 0f b6 0c 08 movzx ecx, BYTE PTR [rax+rcx] + 00fc3 e8 00 00 00 00 call stbi__blinn_8x8 + 00fc8 88 85 44 03 00 00 mov BYTE PTR b$21[rbp], al ; 3490 : out[0] = stbi__compute_y(r, g, b); - 00fc6 0f b6 85 44 03 + 00fce 0f b6 85 44 03 00 00 movzx eax, BYTE PTR b$21[rbp] - 00fcd 0f b6 8d 24 03 + 00fd5 0f b6 8d 24 03 00 00 movzx ecx, BYTE PTR g$20[rbp] - 00fd4 0f b6 95 04 03 + 00fdc 0f b6 95 04 03 00 00 movzx edx, BYTE PTR r$19[rbp] - 00fdb 89 95 f4 04 00 + 00fe3 89 95 f4 04 00 00 mov DWORD PTR tv626[rbp], edx - 00fe1 44 8b c0 mov r8d, eax - 00fe4 8b d1 mov edx, ecx - 00fe6 8b 85 f4 04 00 + 00fe9 44 8b c0 mov r8d, eax + 00fec 8b d1 mov edx, ecx + 00fee 8b 85 f4 04 00 00 mov eax, DWORD PTR tv626[rbp] - 00fec 8b c8 mov ecx, eax - 00fee e8 00 00 00 00 call stbi__compute_y - 00ff3 b9 01 00 00 00 mov ecx, 1 - 00ff8 48 6b c9 00 imul rcx, rcx, 0 - 00ffc 48 8b 95 28 02 + 00ff4 8b c8 mov ecx, eax + 00ff6 e8 00 00 00 00 call stbi__compute_y + 00ffb b9 01 00 00 00 mov ecx, 1 + 01000 48 6b c9 00 imul rcx, rcx, 0 + 01004 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 01003 88 04 0a mov BYTE PTR [rdx+rcx], al + 0100b 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3491 : out[1] = 255; - 01006 b8 01 00 00 00 mov eax, 1 - 0100b 48 6b c0 01 imul rax, rax, 1 - 0100f 48 8b 8d 28 02 + 0100e b8 01 00 00 00 mov eax, 1 + 01013 48 6b c0 01 imul rax, rax, 1 + 01017 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 01016 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 0101e c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH ; 3492 : out += n; - 0101a 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] - 0101e 48 8b 8d 28 02 + 01022 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] + 01026 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 01025 48 03 c8 add rcx, rax - 01028 48 8b c1 mov rax, rcx - 0102b 48 89 85 28 02 + 0102d 48 03 c8 add rcx, rax + 01030 48 8b c1 mov rax, rcx + 01033 48 89 85 28 02 00 00 mov QWORD PTR out$12[rbp], rax ; 3493 : } - 01032 e9 c1 fe ff ff jmp $LN29@load_jpeg_ + 0103a e9 c1 fe ff ff jmp $LN29@load_jpeg_ $LN30@load_jpeg_: ; 3494 : } - 01037 e9 e3 01 00 00 jmp $LN76@load_jpeg_ + 0103f e9 e3 01 00 00 jmp $LN76@load_jpeg_ $LN75@load_jpeg_: ; 3495 : else if (z->s->img_n == 4 && z->app14_color_transform == 2) { - 0103c 48 8b 85 30 05 + 01044 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 01043 48 8b 00 mov rax, QWORD PTR [rax] - 01046 83 78 08 04 cmp DWORD PTR [rax+8], 4 - 0104a 0f 85 e7 00 00 + 0104b 48 8b 00 mov rax, QWORD PTR [rax] + 0104e 83 78 08 04 cmp DWORD PTR [rax+8], 4 + 01052 0f 85 e7 00 00 00 jne $LN77@load_jpeg_ - 01050 48 8b 85 30 05 + 01058 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 01057 83 b8 4c 48 00 + 0105f 83 b8 4c 48 00 00 02 cmp DWORD PTR [rax+18508], 2 - 0105e 0f 85 d3 00 00 + 01066 0f 85 d3 00 00 00 jne $LN77@load_jpeg_ ; 3496 : for (i = 0; i < z->s->img_x; ++i) { - 01064 c7 85 84 00 00 + 0106c c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$6[rbp], 0 - 0106e eb 0e jmp SHORT $LN34@load_jpeg_ + 01076 eb 0e jmp SHORT $LN34@load_jpeg_ $LN32@load_jpeg_: - 01070 8b 85 84 00 00 + 01078 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 01076 ff c0 inc eax - 01078 89 85 84 00 00 + 0107e ff c0 inc eax + 01080 89 85 84 00 00 00 mov DWORD PTR i$6[rbp], eax $LN34@load_jpeg_: - 0107e 48 8b 85 30 05 + 01086 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 01085 48 8b 00 mov rax, QWORD PTR [rax] - 01088 8b 00 mov eax, DWORD PTR [rax] - 0108a 39 85 84 00 00 + 0108d 48 8b 00 mov rax, QWORD PTR [rax] + 01090 8b 00 mov eax, DWORD PTR [rax] + 01092 39 85 84 00 00 00 cmp DWORD PTR i$6[rbp], eax - 01090 0f 83 9c 00 00 + 01098 0f 83 9c 00 00 00 jae $LN33@load_jpeg_ ; 3497 : out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); - 01096 b8 08 00 00 00 mov eax, 8 - 0109b 48 6b c0 03 imul rax, rax, 3 - 0109f 8b 8d 84 00 00 + 0109e b8 08 00 00 00 mov eax, 8 + 010a3 48 6b c0 03 imul rax, rax, 3 + 010a7 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 010a5 48 8b 84 05 e8 + 010ad 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 010ad ba 08 00 00 00 mov edx, 8 - 010b2 48 6b d2 00 imul rdx, rdx, 0 - 010b6 44 8b 85 84 00 + 010b5 ba 08 00 00 00 mov edx, 8 + 010ba 48 6b d2 00 imul rdx, rdx, 0 + 010be 44 8b 85 84 00 00 00 mov r8d, DWORD PTR i$6[rbp] - 010bd 48 8b 94 15 e8 + 010c5 48 8b 94 15 e8 00 00 00 mov rdx, QWORD PTR coutput$9[rbp+rdx] - 010c5 42 0f b6 14 02 movzx edx, BYTE PTR [rdx+r8] - 010ca 41 b8 ff 00 00 + 010cd 42 0f b6 14 02 movzx edx, BYTE PTR [rdx+r8] + 010d2 41 b8 ff 00 00 00 mov r8d, 255 ; 000000ffH - 010d0 44 2b c2 sub r8d, edx - 010d3 41 8b d0 mov edx, r8d - 010d6 89 95 f4 04 00 + 010d8 44 2b c2 sub r8d, edx + 010db 41 8b d0 mov edx, r8d + 010de 89 95 f4 04 00 00 mov DWORD PTR tv656[rbp], edx - 010dc 0f b6 14 08 movzx edx, BYTE PTR [rax+rcx] - 010e0 8b 85 f4 04 00 + 010e4 0f b6 14 08 movzx edx, BYTE PTR [rax+rcx] + 010e8 8b 85 f4 04 00 00 mov eax, DWORD PTR tv656[rbp] - 010e6 0f b6 c8 movzx ecx, al - 010e9 e8 00 00 00 00 call stbi__blinn_8x8 - 010ee b9 01 00 00 00 mov ecx, 1 - 010f3 48 6b c9 00 imul rcx, rcx, 0 - 010f7 48 8b 95 28 02 + 010ee 0f b6 c8 movzx ecx, al + 010f1 e8 00 00 00 00 call stbi__blinn_8x8 + 010f6 b9 01 00 00 00 mov ecx, 1 + 010fb 48 6b c9 00 imul rcx, rcx, 0 + 010ff 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 010fe 88 04 0a mov BYTE PTR [rdx+rcx], al + 01106 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3498 : out[1] = 255; - 01101 b8 01 00 00 00 mov eax, 1 - 01106 48 6b c0 01 imul rax, rax, 1 - 0110a 48 8b 8d 28 02 + 01109 b8 01 00 00 00 mov eax, 1 + 0110e 48 6b c0 01 imul rax, rax, 1 + 01112 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 01111 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 01119 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH ; 3499 : out += n; - 01115 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] - 01119 48 8b 8d 28 02 + 0111d 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] + 01121 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 01120 48 03 c8 add rcx, rax - 01123 48 8b c1 mov rax, rcx - 01126 48 89 85 28 02 + 01128 48 03 c8 add rcx, rax + 0112b 48 8b c1 mov rax, rcx + 0112e 48 89 85 28 02 00 00 mov QWORD PTR out$12[rbp], rax ; 3500 : } - 0112d e9 3e ff ff ff jmp $LN32@load_jpeg_ + 01135 e9 3e ff ff ff jmp $LN32@load_jpeg_ $LN33@load_jpeg_: ; 3501 : } - 01132 e9 e8 00 00 00 jmp $LN78@load_jpeg_ + 0113a e9 e8 00 00 00 jmp $LN78@load_jpeg_ $LN77@load_jpeg_: ; 3502 : else { ; 3503 : stbi_uc* y = coutput[0]; - 01137 b8 08 00 00 00 mov eax, 8 - 0113c 48 6b c0 00 imul rax, rax, 0 - 01140 48 8b 84 05 e8 + 0113f b8 08 00 00 00 mov eax, 8 + 01144 48 6b c0 00 imul rax, rax, 0 + 01148 48 8b 84 05 e8 00 00 00 mov rax, QWORD PTR coutput$9[rbp+rax] - 01148 48 89 85 68 03 + 01150 48 89 85 68 03 00 00 mov QWORD PTR y$22[rbp], rax ; 3504 : if (n == 1) - 0114f 83 7d 04 01 cmp DWORD PTR n$[rbp], 1 - 01153 75 54 jne SHORT $LN79@load_jpeg_ + 01157 83 7d 04 01 cmp DWORD PTR n$[rbp], 1 + 0115b 75 54 jne SHORT $LN79@load_jpeg_ ; 3505 : for (i = 0; i < z->s->img_x; ++i) out[i] = y[i]; - 01155 c7 85 84 00 00 + 0115d c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$6[rbp], 0 - 0115f eb 0e jmp SHORT $LN37@load_jpeg_ + 01167 eb 0e jmp SHORT $LN37@load_jpeg_ $LN35@load_jpeg_: - 01161 8b 85 84 00 00 + 01169 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 01167 ff c0 inc eax - 01169 89 85 84 00 00 + 0116f ff c0 inc eax + 01171 89 85 84 00 00 00 mov DWORD PTR i$6[rbp], eax $LN37@load_jpeg_: - 0116f 48 8b 85 30 05 + 01177 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 01176 48 8b 00 mov rax, QWORD PTR [rax] - 01179 8b 00 mov eax, DWORD PTR [rax] - 0117b 39 85 84 00 00 + 0117e 48 8b 00 mov rax, QWORD PTR [rax] + 01181 8b 00 mov eax, DWORD PTR [rax] + 01183 39 85 84 00 00 00 cmp DWORD PTR i$6[rbp], eax - 01181 73 24 jae SHORT $LN36@load_jpeg_ - 01183 8b 85 84 00 00 + 01189 73 24 jae SHORT $LN36@load_jpeg_ + 0118b 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 01189 8b 8d 84 00 00 + 01191 8b 8d 84 00 00 00 mov ecx, DWORD PTR i$6[rbp] - 0118f 48 8b 95 28 02 + 01197 48 8b 95 28 02 00 00 mov rdx, QWORD PTR out$12[rbp] - 01196 4c 8b 85 68 03 + 0119e 4c 8b 85 68 03 00 00 mov r8, QWORD PTR y$22[rbp] - 0119d 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 011a2 88 04 0a mov BYTE PTR [rdx+rcx], al - 011a5 eb ba jmp SHORT $LN35@load_jpeg_ + 011a5 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 011aa 88 04 0a mov BYTE PTR [rdx+rcx], al + 011ad eb ba jmp SHORT $LN35@load_jpeg_ $LN36@load_jpeg_: - 011a7 eb 76 jmp SHORT $LN80@load_jpeg_ + 011af eb 76 jmp SHORT $LN80@load_jpeg_ $LN79@load_jpeg_: ; 3506 : else ; 3507 : for (i = 0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } - 011a9 c7 85 84 00 00 + 011b1 c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$6[rbp], 0 - 011b3 eb 0e jmp SHORT $LN40@load_jpeg_ + 011bb eb 0e jmp SHORT $LN40@load_jpeg_ $LN38@load_jpeg_: - 011b5 8b 85 84 00 00 + 011bd 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 011bb ff c0 inc eax - 011bd 89 85 84 00 00 + 011c3 ff c0 inc eax + 011c5 89 85 84 00 00 00 mov DWORD PTR i$6[rbp], eax $LN40@load_jpeg_: - 011c3 48 8b 85 30 05 + 011cb 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 011ca 48 8b 00 mov rax, QWORD PTR [rax] - 011cd 8b 00 mov eax, DWORD PTR [rax] - 011cf 39 85 84 00 00 + 011d2 48 8b 00 mov rax, QWORD PTR [rax] + 011d5 8b 00 mov eax, DWORD PTR [rax] + 011d7 39 85 84 00 00 00 cmp DWORD PTR i$6[rbp], eax - 011d5 73 48 jae SHORT $LN39@load_jpeg_ - 011d7 8b 85 84 00 00 + 011dd 73 48 jae SHORT $LN39@load_jpeg_ + 011df 8b 85 84 00 00 00 mov eax, DWORD PTR i$6[rbp] - 011dd 48 8b 8d 28 02 + 011e5 48 8b 8d 28 02 00 00 mov rcx, QWORD PTR out$12[rbp] - 011e4 48 8b 95 68 03 + 011ec 48 8b 95 68 03 00 00 mov rdx, QWORD PTR y$22[rbp] - 011eb 0f b6 04 02 movzx eax, BYTE PTR [rdx+rax] - 011ef 88 01 mov BYTE PTR [rcx], al - 011f1 48 8b 85 28 02 + 011f3 0f b6 04 02 movzx eax, BYTE PTR [rdx+rax] + 011f7 88 01 mov BYTE PTR [rcx], al + 011f9 48 8b 85 28 02 00 00 mov rax, QWORD PTR out$12[rbp] - 011f8 48 ff c0 inc rax - 011fb 48 89 85 28 02 + 01200 48 ff c0 inc rax + 01203 48 89 85 28 02 00 00 mov QWORD PTR out$12[rbp], rax - 01202 48 8b 85 28 02 + 0120a 48 8b 85 28 02 00 00 mov rax, QWORD PTR out$12[rbp] - 01209 c6 00 ff mov BYTE PTR [rax], 255 ; 000000ffH - 0120c 48 8b 85 28 02 + 01211 c6 00 ff mov BYTE PTR [rax], 255 ; 000000ffH + 01214 48 8b 85 28 02 00 00 mov rax, QWORD PTR out$12[rbp] - 01213 48 ff c0 inc rax - 01216 48 89 85 28 02 + 0121b 48 ff c0 inc rax + 0121e 48 89 85 28 02 00 00 mov QWORD PTR out$12[rbp], rax - 0121d eb 96 jmp SHORT $LN38@load_jpeg_ + 01225 eb 96 jmp SHORT $LN38@load_jpeg_ $LN39@load_jpeg_: $LN80@load_jpeg_: $LN78@load_jpeg_: @@ -24772,83 +24919,84 @@ $LN60@load_jpeg_: ; 3509 : } ; 3510 : } - 0121f e9 f5 f2 ff ff jmp $LN5@load_jpeg_ + 01227 e9 f2 f2 ff ff jmp $LN5@load_jpeg_ $LN6@load_jpeg_: ; 3511 : stbi__cleanup_jpeg(z); - 01224 48 8b 8d 30 05 + 0122c 48 8b 8d 30 05 00 00 mov rcx, QWORD PTR z$[rbp] - 0122b e8 00 00 00 00 call stbi__cleanup_jpeg + 01233 e8 00 00 00 00 call stbi__cleanup_jpeg + 01238 90 npad 1 ; 3512 : *out_x = z->s->img_x; - 01230 48 8b 85 30 05 + 01239 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 01237 48 8b 00 mov rax, QWORD PTR [rax] - 0123a 48 8b 8d 38 05 + 01240 48 8b 00 mov rax, QWORD PTR [rax] + 01243 48 8b 8d 38 05 00 00 mov rcx, QWORD PTR out_x$[rbp] - 01241 8b 00 mov eax, DWORD PTR [rax] - 01243 89 01 mov DWORD PTR [rcx], eax + 0124a 8b 00 mov eax, DWORD PTR [rax] + 0124c 89 01 mov DWORD PTR [rcx], eax ; 3513 : *out_y = z->s->img_y; - 01245 48 8b 85 30 05 + 0124e 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 0124c 48 8b 00 mov rax, QWORD PTR [rax] - 0124f 48 8b 8d 40 05 + 01255 48 8b 00 mov rax, QWORD PTR [rax] + 01258 48 8b 8d 40 05 00 00 mov rcx, QWORD PTR out_y$[rbp] - 01256 8b 40 04 mov eax, DWORD PTR [rax+4] - 01259 89 01 mov DWORD PTR [rcx], eax + 0125f 8b 40 04 mov eax, DWORD PTR [rax+4] + 01262 89 01 mov DWORD PTR [rcx], eax ; 3514 : if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output - 0125b 48 83 bd 48 05 + 01264 48 83 bd 48 05 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 01263 74 35 je SHORT $LN81@load_jpeg_ - 01265 48 8b 85 30 05 + 0126c 74 35 je SHORT $LN81@load_jpeg_ + 0126e 48 8b 85 30 05 00 00 mov rax, QWORD PTR z$[rbp] - 0126c 48 8b 00 mov rax, QWORD PTR [rax] - 0126f 83 78 08 03 cmp DWORD PTR [rax+8], 3 - 01273 7c 0c jl SHORT $LN103@load_jpeg_ - 01275 c7 85 f4 04 00 + 01275 48 8b 00 mov rax, QWORD PTR [rax] + 01278 83 78 08 03 cmp DWORD PTR [rax+8], 3 + 0127c 7c 0c jl SHORT $LN103@load_jpeg_ + 0127e c7 85 f4 04 00 00 03 00 00 00 mov DWORD PTR tv694[rbp], 3 - 0127f eb 0a jmp SHORT $LN104@load_jpeg_ + 01288 eb 0a jmp SHORT $LN104@load_jpeg_ $LN103@load_jpeg_: - 01281 c7 85 f4 04 00 + 0128a c7 85 f4 04 00 00 01 00 00 00 mov DWORD PTR tv694[rbp], 1 $LN104@load_jpeg_: - 0128b 48 8b 85 48 05 + 01294 48 8b 85 48 05 00 00 mov rax, QWORD PTR comp$[rbp] - 01292 8b 8d f4 04 00 + 0129b 8b 8d f4 04 00 00 mov ecx, DWORD PTR tv694[rbp] - 01298 89 08 mov DWORD PTR [rax], ecx + 012a1 89 08 mov DWORD PTR [rax], ecx $LN81@load_jpeg_: ; 3515 : return output; - 0129a 48 8b 85 c8 00 + 012a3 48 8b 85 c8 00 00 00 mov rax, QWORD PTR output$8[rbp] $LN1@load_jpeg_: ; 3516 : } ; 3517 : } - 012a1 48 8b f8 mov rdi, rax - 012a4 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 012a8 48 8d 15 00 00 + 012aa 48 8b f8 mov rdi, rax + 012ad 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 012b1 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:load_jpeg_image$rtcFrameData - 012af e8 00 00 00 00 call _RTC_CheckStackVars - 012b4 48 8b c7 mov rax, rdi - 012b7 48 8b 8d 08 05 + 012b8 e8 00 00 00 00 call _RTC_CheckStackVars + 012bd 48 8b c7 mov rax, rdi + 012c0 48 8b 8d 08 05 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 012be 48 33 cd xor rcx, rbp - 012c1 e8 00 00 00 00 call __security_check_cookie - 012c6 48 8d a5 18 05 + 012c7 48 33 cd xor rcx, rbp + 012ca e8 00 00 00 00 call __security_check_cookie + 012cf 48 8d a5 18 05 00 00 lea rsp, QWORD PTR [rbp+1304] - 012cd 5f pop rdi - 012ce 5d pop rbp - 012cf c3 ret 0 + 012d6 5f pop rdi + 012d7 5d pop rbp + 012d8 c3 ret 0 load_jpeg_image ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -24872,33 +25020,34 @@ stbi__blinn_8x8 PROC ; COMDAT 00016 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001d e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00022 90 npad 1 ; 3343 : unsigned int t = x * y + 128; - 00022 0f b6 85 00 01 + 00023 0f b6 85 00 01 00 00 movzx eax, BYTE PTR x$[rbp] - 00029 0f b6 8d 08 01 + 0002a 0f b6 8d 08 01 00 00 movzx ecx, BYTE PTR y$[rbp] - 00030 0f af c1 imul eax, ecx - 00033 05 80 00 00 00 add eax, 128 ; 00000080H - 00038 89 45 04 mov DWORD PTR t$[rbp], eax + 00031 0f af c1 imul eax, ecx + 00034 05 80 00 00 00 add eax, 128 ; 00000080H + 00039 89 45 04 mov DWORD PTR t$[rbp], eax ; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - 0003b 8b 45 04 mov eax, DWORD PTR t$[rbp] - 0003e c1 e8 08 shr eax, 8 - 00041 8b 4d 04 mov ecx, DWORD PTR t$[rbp] - 00044 03 c8 add ecx, eax - 00046 8b c1 mov eax, ecx - 00048 c1 e8 08 shr eax, 8 + 0003c 8b 45 04 mov eax, DWORD PTR t$[rbp] + 0003f c1 e8 08 shr eax, 8 + 00042 8b 4d 04 mov ecx, DWORD PTR t$[rbp] + 00045 03 c8 add ecx, eax + 00047 8b c1 mov eax, ecx + 00049 c1 e8 08 shr eax, 8 ; 3345 : } - 0004b 48 8d a5 e8 00 + 0004c 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00052 5f pop rdi - 00053 5d pop rbp - 00054 c3 ret 0 + 00053 5f pop rdi + 00054 5d pop rbp + 00055 c3 ret 0 stbi__blinn_8x8 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -24919,25 +25068,27 @@ stbi__cleanup_jpeg PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); - 0001f 48 8b 85 e0 00 + 00020 48 8b 85 e0 00 00 00 mov rax, QWORD PTR j$[rbp] - 00026 48 8b 00 mov rax, QWORD PTR [rax] - 00029 45 33 c0 xor r8d, r8d - 0002c 8b 50 08 mov edx, DWORD PTR [rax+8] - 0002f 48 8b 8d e0 00 + 00027 48 8b 00 mov rax, QWORD PTR [rax] + 0002a 45 33 c0 xor r8d, r8d + 0002d 8b 50 08 mov edx, DWORD PTR [rax+8] + 00030 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR j$[rbp] - 00036 e8 00 00 00 00 call stbi__free_jpeg_components + 00037 e8 00 00 00 00 call stbi__free_jpeg_components + 0003c 90 npad 1 ; 3328 : } - 0003b 48 8d a5 c8 00 + 0003d 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00042 5f pop rdi - 00043 5d pop rbp - 00044 c3 ret 0 + 00044 5f pop rdi + 00045 5d pop rbp + 00046 c3 ret 0 stbi__cleanup_jpeg ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -24958,67 +25109,68 @@ stbi__setup_jpeg PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 3305 : j->idct_block_kernel = stbi__idct_block; - 0001f 48 8b 85 e0 00 + 00020 48 8b 85 e0 00 00 00 mov rax, QWORD PTR j$[rbp] - 00026 48 8d 0d 00 00 + 00027 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__idct_block - 0002d 48 89 88 70 48 + 0002e 48 89 88 70 48 00 00 mov QWORD PTR [rax+18544], rcx ; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; - 00034 48 8b 85 e0 00 + 00035 48 8b 85 e0 00 00 00 mov rax, QWORD PTR j$[rbp] - 0003b 48 8d 0d 00 00 + 0003c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__YCbCr_to_RGB_row - 00042 48 89 88 78 48 + 00043 48 89 88 78 48 00 00 mov QWORD PTR [rax+18552], rcx ; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; - 00049 48 8b 85 e0 00 + 0004a 48 8b 85 e0 00 00 00 mov rax, QWORD PTR j$[rbp] - 00050 48 8d 0d 00 00 + 00051 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__resample_row_hv_2 - 00057 48 89 88 80 48 + 00058 48 89 88 80 48 00 00 mov QWORD PTR [rax+18560], rcx ; 3308 : ; 3309 : #ifdef STBI_SSE2 ; 3310 : if (stbi__sse2_available()) { - 0005e e8 00 00 00 00 call stbi__sse2_available - 00063 85 c0 test eax, eax - 00065 74 3f je SHORT $LN2@stbi__setu + 0005f e8 00 00 00 00 call stbi__sse2_available + 00064 85 c0 test eax, eax + 00066 74 3f je SHORT $LN2@stbi__setu ; 3311 : j->idct_block_kernel = stbi__idct_simd; - 00067 48 8b 85 e0 00 + 00068 48 8b 85 e0 00 00 00 mov rax, QWORD PTR j$[rbp] - 0006e 48 8d 0d 00 00 + 0006f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__idct_simd - 00075 48 89 88 70 48 + 00076 48 89 88 70 48 00 00 mov QWORD PTR [rax+18544], rcx ; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - 0007c 48 8b 85 e0 00 + 0007d 48 8b 85 e0 00 00 00 mov rax, QWORD PTR j$[rbp] - 00083 48 8d 0d 00 00 + 00084 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__YCbCr_to_RGB_simd - 0008a 48 89 88 78 48 + 0008b 48 89 88 78 48 00 00 mov QWORD PTR [rax+18552], rcx ; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; - 00091 48 8b 85 e0 00 + 00092 48 8b 85 e0 00 00 00 mov rax, QWORD PTR j$[rbp] - 00098 48 8d 0d 00 00 + 00099 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__resample_row_hv_2_simd - 0009f 48 89 88 80 48 + 000a0 48 89 88 80 48 00 00 mov QWORD PTR [rax+18560], rcx $LN2@stbi__setu: @@ -25032,11 +25184,11 @@ $LN2@stbi__setu: ; 3321 : #endif ; 3322 : } - 000a6 48 8d a5 c8 00 + 000a7 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 000ad 5f pop rdi - 000ae 5d pop rbp - 000af c3 ret 0 + 000ae 5f pop rdi + 000af 5d pop rbp + 000b0 c3 ret 0 stbi__setup_jpeg ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -25105,10 +25257,11 @@ stbi__YCbCr_to_RGB_simd PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 3170 : int i = 0; - 0002e c7 45 04 00 00 + 0002f c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 ; 3171 : @@ -25118,347 +25271,347 @@ stbi__YCbCr_to_RGB_simd PROC ; COMDAT ; 3175 : // so just accelerate step == 4 case. ; 3176 : if (step == 4) { - 00035 83 bd 58 0a 00 + 00036 83 bd 58 0a 00 00 04 cmp DWORD PTR step$[rbp], 4 - 0003c 0f 85 28 03 00 + 0003d 0f 85 28 03 00 00 jne $LN8@stbi__YCbC ; 3177 : // this is a fairly straightforward implementation and not super-optimized. ; 3178 : __m128i signflip = _mm_set1_epi8(-0x80); - 00042 66 0f 6f 05 00 + 00043 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@80808080808080808080808080808080 - 0004a 66 0f 7f 45 30 movdqa XMMWORD PTR signflip$1[rbp], xmm0 + 0004b 66 0f 7f 45 30 movdqa XMMWORD PTR signflip$1[rbp], xmm0 ; 3179 : __m128i cr_const0 = _mm_set1_epi16((short)(1.40200f * 4096.0f + 0.5f)); - 0004f 66 0f 6f 05 00 + 00050 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@166f166f166f166f166f166f166f166f - 00057 66 0f 7f 45 60 movdqa XMMWORD PTR cr_const0$2[rbp], xmm0 + 00058 66 0f 7f 45 60 movdqa XMMWORD PTR cr_const0$2[rbp], xmm0 ; 3180 : __m128i cr_const1 = _mm_set1_epi16(-(short)(0.71414f * 4096.0f + 0.5f)); - 0005c 66 0f 6f 05 00 + 0005d 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@f493f493f493f493f493f493f493f493 - 00064 66 0f 7f 85 90 + 00065 66 0f 7f 85 90 00 00 00 movdqa XMMWORD PTR cr_const1$3[rbp], xmm0 ; 3181 : __m128i cb_const0 = _mm_set1_epi16(-(short)(0.34414f * 4096.0f + 0.5f)); - 0006c 66 0f 6f 05 00 + 0006d 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@fa7efa7efa7efa7efa7efa7efa7efa7e - 00074 66 0f 7f 85 c0 + 00075 66 0f 7f 85 c0 00 00 00 movdqa XMMWORD PTR cb_const0$4[rbp], xmm0 ; 3182 : __m128i cb_const1 = _mm_set1_epi16((short)(1.77200f * 4096.0f + 0.5f)); - 0007c 66 0f 6f 05 00 + 0007d 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@1c5a1c5a1c5a1c5a1c5a1c5a1c5a1c5a - 00084 66 0f 7f 85 f0 + 00085 66 0f 7f 85 f0 00 00 00 movdqa XMMWORD PTR cb_const1$5[rbp], xmm0 ; 3183 : __m128i y_bias = _mm_set1_epi8((char)(unsigned char)128); - 0008c 66 0f 6f 05 00 + 0008d 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@80808080808080808080808080808080 - 00094 66 0f 7f 85 20 + 00095 66 0f 7f 85 20 01 00 00 movdqa XMMWORD PTR y_bias$6[rbp], xmm0 ; 3184 : __m128i xw = _mm_set1_epi16(255); // alpha channel - 0009c 66 0f 6f 05 00 + 0009d 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@00ff00ff00ff00ff00ff00ff00ff00ff - 000a4 66 0f 7f 85 50 + 000a5 66 0f 7f 85 50 01 00 00 movdqa XMMWORD PTR xw$7[rbp], xmm0 ; 3185 : ; 3186 : for (; i + 7 < count; i += 8) { - 000ac eb 09 jmp SHORT $LN4@stbi__YCbC + 000ad eb 09 jmp SHORT $LN4@stbi__YCbC $LN2@stbi__YCbC: - 000ae 8b 45 04 mov eax, DWORD PTR i$[rbp] - 000b1 83 c0 08 add eax, 8 - 000b4 89 45 04 mov DWORD PTR i$[rbp], eax + 000af 8b 45 04 mov eax, DWORD PTR i$[rbp] + 000b2 83 c0 08 add eax, 8 + 000b5 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__YCbC: - 000b7 8b 45 04 mov eax, DWORD PTR i$[rbp] - 000ba 83 c0 07 add eax, 7 - 000bd 3b 85 50 0a 00 + 000b8 8b 45 04 mov eax, DWORD PTR i$[rbp] + 000bb 83 c0 07 add eax, 7 + 000be 3b 85 50 0a 00 00 cmp eax, DWORD PTR count$[rbp] - 000c3 0f 8d a1 02 00 + 000c4 0f 8d a1 02 00 00 jge $LN3@stbi__YCbC ; 3187 : // load ; 3188 : __m128i y_bytes = _mm_loadl_epi64((__m128i*) (y + i)); - 000c9 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 000cd 48 8b 8d 38 0a + 000ca 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 000ce 48 8b 8d 38 0a 00 00 mov rcx, QWORD PTR y$[rbp] - 000d4 48 03 c8 add rcx, rax - 000d7 48 8b c1 mov rax, rcx - 000da f3 0f 7e 00 movq xmm0, QWORD PTR [rax] - 000de 66 0f 7f 85 80 + 000d5 48 03 c8 add rcx, rax + 000d8 48 8b c1 mov rax, rcx + 000db f3 0f 7e 00 movq xmm0, QWORD PTR [rax] + 000df 66 0f 7f 85 80 01 00 00 movdqa XMMWORD PTR y_bytes$8[rbp], xmm0 ; 3189 : __m128i cr_bytes = _mm_loadl_epi64((__m128i*) (pcr + i)); - 000e6 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 000ea 48 8b 8d 48 0a + 000e7 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 000eb 48 8b 8d 48 0a 00 00 mov rcx, QWORD PTR pcr$[rbp] - 000f1 48 03 c8 add rcx, rax - 000f4 48 8b c1 mov rax, rcx - 000f7 f3 0f 7e 00 movq xmm0, QWORD PTR [rax] - 000fb 66 0f 7f 85 b0 + 000f2 48 03 c8 add rcx, rax + 000f5 48 8b c1 mov rax, rcx + 000f8 f3 0f 7e 00 movq xmm0, QWORD PTR [rax] + 000fc 66 0f 7f 85 b0 01 00 00 movdqa XMMWORD PTR cr_bytes$9[rbp], xmm0 ; 3190 : __m128i cb_bytes = _mm_loadl_epi64((__m128i*) (pcb + i)); - 00103 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00107 48 8b 8d 40 0a + 00104 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00108 48 8b 8d 40 0a 00 00 mov rcx, QWORD PTR pcb$[rbp] - 0010e 48 03 c8 add rcx, rax - 00111 48 8b c1 mov rax, rcx - 00114 f3 0f 7e 00 movq xmm0, QWORD PTR [rax] - 00118 66 0f 7f 85 e0 + 0010f 48 03 c8 add rcx, rax + 00112 48 8b c1 mov rax, rcx + 00115 f3 0f 7e 00 movq xmm0, QWORD PTR [rax] + 00119 66 0f 7f 85 e0 01 00 00 movdqa XMMWORD PTR cb_bytes$10[rbp], xmm0 ; 3191 : __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 - 00120 66 0f 6f 85 b0 + 00121 66 0f 6f 85 b0 01 00 00 movdqa xmm0, XMMWORD PTR cr_bytes$9[rbp] - 00128 0f 57 45 30 xorps xmm0, XMMWORD PTR signflip$1[rbp] - 0012c 66 0f 7f 85 10 + 00129 0f 57 45 30 xorps xmm0, XMMWORD PTR signflip$1[rbp] + 0012d 66 0f 7f 85 10 02 00 00 movdqa XMMWORD PTR cr_biased$11[rbp], xmm0 ; 3192 : __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 - 00134 66 0f 6f 85 e0 + 00135 66 0f 6f 85 e0 01 00 00 movdqa xmm0, XMMWORD PTR cb_bytes$10[rbp] - 0013c 0f 57 45 30 xorps xmm0, XMMWORD PTR signflip$1[rbp] - 00140 66 0f 7f 85 40 + 0013d 0f 57 45 30 xorps xmm0, XMMWORD PTR signflip$1[rbp] + 00141 66 0f 7f 85 40 02 00 00 movdqa XMMWORD PTR cb_biased$12[rbp], xmm0 ; 3193 : ; 3194 : // unpack to short (and left-shift cr, cb by 8) ; 3195 : __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); - 00148 66 0f 6f 85 20 + 00149 66 0f 6f 85 20 01 00 00 movdqa xmm0, XMMWORD PTR y_bias$6[rbp] - 00150 66 0f 60 85 80 + 00151 66 0f 60 85 80 01 00 00 punpcklbw xmm0, XMMWORD PTR y_bytes$8[rbp] - 00158 66 0f 7f 85 70 + 00159 66 0f 7f 85 70 02 00 00 movdqa XMMWORD PTR yw$13[rbp], xmm0 ; 3196 : __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); - 00160 66 0f ef c0 pxor xmm0, xmm0 - 00164 66 0f 60 85 10 + 00161 66 0f ef c0 pxor xmm0, xmm0 + 00165 66 0f 60 85 10 02 00 00 punpcklbw xmm0, XMMWORD PTR cr_biased$11[rbp] - 0016c 66 0f 7f 85 a0 + 0016d 66 0f 7f 85 a0 02 00 00 movdqa XMMWORD PTR crw$14[rbp], xmm0 ; 3197 : __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); - 00174 66 0f ef c0 pxor xmm0, xmm0 - 00178 66 0f 60 85 40 + 00175 66 0f ef c0 pxor xmm0, xmm0 + 00179 66 0f 60 85 40 02 00 00 punpcklbw xmm0, XMMWORD PTR cb_biased$12[rbp] - 00180 66 0f 7f 85 d0 + 00181 66 0f 7f 85 d0 02 00 00 movdqa XMMWORD PTR cbw$15[rbp], xmm0 ; 3198 : ; 3199 : // color transform ; 3200 : __m128i yws = _mm_srli_epi16(yw, 4); - 00188 66 0f 6f 85 70 + 00189 66 0f 6f 85 70 02 00 00 movdqa xmm0, XMMWORD PTR yw$13[rbp] - 00190 66 0f 71 d0 04 psrlw xmm0, 4 - 00195 66 0f 7f 85 00 + 00191 66 0f 71 d0 04 psrlw xmm0, 4 + 00196 66 0f 7f 85 00 03 00 00 movdqa XMMWORD PTR yws$16[rbp], xmm0 ; 3201 : __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); - 0019d 66 0f 6f 45 60 movdqa xmm0, XMMWORD PTR cr_const0$2[rbp] - 001a2 66 0f e5 85 a0 + 0019e 66 0f 6f 45 60 movdqa xmm0, XMMWORD PTR cr_const0$2[rbp] + 001a3 66 0f e5 85 a0 02 00 00 pmulhw xmm0, XMMWORD PTR crw$14[rbp] - 001aa 66 0f 7f 85 30 + 001ab 66 0f 7f 85 30 03 00 00 movdqa XMMWORD PTR cr0$17[rbp], xmm0 ; 3202 : __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); - 001b2 66 0f 6f 85 c0 + 001b3 66 0f 6f 85 c0 00 00 00 movdqa xmm0, XMMWORD PTR cb_const0$4[rbp] - 001ba 66 0f e5 85 d0 + 001bb 66 0f e5 85 d0 02 00 00 pmulhw xmm0, XMMWORD PTR cbw$15[rbp] - 001c2 66 0f 7f 85 60 + 001c3 66 0f 7f 85 60 03 00 00 movdqa XMMWORD PTR cb0$18[rbp], xmm0 ; 3203 : __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); - 001ca 66 0f 6f 85 d0 + 001cb 66 0f 6f 85 d0 02 00 00 movdqa xmm0, XMMWORD PTR cbw$15[rbp] - 001d2 66 0f e5 85 f0 + 001d3 66 0f e5 85 f0 00 00 00 pmulhw xmm0, XMMWORD PTR cb_const1$5[rbp] - 001da 66 0f 7f 85 90 + 001db 66 0f 7f 85 90 03 00 00 movdqa XMMWORD PTR cb1$19[rbp], xmm0 ; 3204 : __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); - 001e2 66 0f 6f 85 a0 + 001e3 66 0f 6f 85 a0 02 00 00 movdqa xmm0, XMMWORD PTR crw$14[rbp] - 001ea 66 0f e5 85 90 + 001eb 66 0f e5 85 90 00 00 00 pmulhw xmm0, XMMWORD PTR cr_const1$3[rbp] - 001f2 66 0f 7f 85 c0 + 001f3 66 0f 7f 85 c0 03 00 00 movdqa XMMWORD PTR cr1$20[rbp], xmm0 ; 3205 : __m128i rws = _mm_add_epi16(cr0, yws); - 001fa 66 0f 6f 85 30 + 001fb 66 0f 6f 85 30 03 00 00 movdqa xmm0, XMMWORD PTR cr0$17[rbp] - 00202 66 0f fd 85 00 + 00203 66 0f fd 85 00 03 00 00 paddw xmm0, XMMWORD PTR yws$16[rbp] - 0020a 66 0f 7f 85 f0 + 0020b 66 0f 7f 85 f0 03 00 00 movdqa XMMWORD PTR rws$21[rbp], xmm0 ; 3206 : __m128i gwt = _mm_add_epi16(cb0, yws); - 00212 66 0f 6f 85 60 + 00213 66 0f 6f 85 60 03 00 00 movdqa xmm0, XMMWORD PTR cb0$18[rbp] - 0021a 66 0f fd 85 00 + 0021b 66 0f fd 85 00 03 00 00 paddw xmm0, XMMWORD PTR yws$16[rbp] - 00222 66 0f 7f 85 20 + 00223 66 0f 7f 85 20 04 00 00 movdqa XMMWORD PTR gwt$22[rbp], xmm0 ; 3207 : __m128i bws = _mm_add_epi16(yws, cb1); - 0022a 66 0f 6f 85 00 + 0022b 66 0f 6f 85 00 03 00 00 movdqa xmm0, XMMWORD PTR yws$16[rbp] - 00232 66 0f fd 85 90 + 00233 66 0f fd 85 90 03 00 00 paddw xmm0, XMMWORD PTR cb1$19[rbp] - 0023a 66 0f 7f 85 50 + 0023b 66 0f 7f 85 50 04 00 00 movdqa XMMWORD PTR bws$23[rbp], xmm0 ; 3208 : __m128i gws = _mm_add_epi16(gwt, cr1); - 00242 66 0f 6f 85 20 + 00243 66 0f 6f 85 20 04 00 00 movdqa xmm0, XMMWORD PTR gwt$22[rbp] - 0024a 66 0f fd 85 c0 + 0024b 66 0f fd 85 c0 03 00 00 paddw xmm0, XMMWORD PTR cr1$20[rbp] - 00252 66 0f 7f 85 80 + 00253 66 0f 7f 85 80 04 00 00 movdqa XMMWORD PTR gws$24[rbp], xmm0 ; 3209 : ; 3210 : // descale ; 3211 : __m128i rw = _mm_srai_epi16(rws, 4); - 0025a 66 0f 6f 85 f0 + 0025b 66 0f 6f 85 f0 03 00 00 movdqa xmm0, XMMWORD PTR rws$21[rbp] - 00262 66 0f 71 e0 04 psraw xmm0, 4 - 00267 66 0f 7f 85 b0 + 00263 66 0f 71 e0 04 psraw xmm0, 4 + 00268 66 0f 7f 85 b0 04 00 00 movdqa XMMWORD PTR rw$25[rbp], xmm0 ; 3212 : __m128i bw = _mm_srai_epi16(bws, 4); - 0026f 66 0f 6f 85 50 + 00270 66 0f 6f 85 50 04 00 00 movdqa xmm0, XMMWORD PTR bws$23[rbp] - 00277 66 0f 71 e0 04 psraw xmm0, 4 - 0027c 66 0f 7f 85 e0 + 00278 66 0f 71 e0 04 psraw xmm0, 4 + 0027d 66 0f 7f 85 e0 04 00 00 movdqa XMMWORD PTR bw$26[rbp], xmm0 ; 3213 : __m128i gw = _mm_srai_epi16(gws, 4); - 00284 66 0f 6f 85 80 + 00285 66 0f 6f 85 80 04 00 00 movdqa xmm0, XMMWORD PTR gws$24[rbp] - 0028c 66 0f 71 e0 04 psraw xmm0, 4 - 00291 66 0f 7f 85 10 + 0028d 66 0f 71 e0 04 psraw xmm0, 4 + 00292 66 0f 7f 85 10 05 00 00 movdqa XMMWORD PTR gw$27[rbp], xmm0 ; 3214 : ; 3215 : // back to byte, set up for transpose ; 3216 : __m128i brb = _mm_packus_epi16(rw, bw); - 00299 66 0f 6f 85 b0 + 0029a 66 0f 6f 85 b0 04 00 00 movdqa xmm0, XMMWORD PTR rw$25[rbp] - 002a1 66 0f 67 85 e0 + 002a2 66 0f 67 85 e0 04 00 00 packuswb xmm0, XMMWORD PTR bw$26[rbp] - 002a9 66 0f 7f 85 40 + 002aa 66 0f 7f 85 40 05 00 00 movdqa XMMWORD PTR brb$28[rbp], xmm0 ; 3217 : __m128i gxb = _mm_packus_epi16(gw, xw); - 002b1 66 0f 6f 85 10 + 002b2 66 0f 6f 85 10 05 00 00 movdqa xmm0, XMMWORD PTR gw$27[rbp] - 002b9 66 0f 67 85 50 + 002ba 66 0f 67 85 50 01 00 00 packuswb xmm0, XMMWORD PTR xw$7[rbp] - 002c1 66 0f 7f 85 70 + 002c2 66 0f 7f 85 70 05 00 00 movdqa XMMWORD PTR gxb$29[rbp], xmm0 ; 3218 : ; 3219 : // transpose to interleave channels ; 3220 : __m128i t0 = _mm_unpacklo_epi8(brb, gxb); - 002c9 66 0f 6f 85 40 + 002ca 66 0f 6f 85 40 05 00 00 movdqa xmm0, XMMWORD PTR brb$28[rbp] - 002d1 66 0f 60 85 70 + 002d2 66 0f 60 85 70 05 00 00 punpcklbw xmm0, XMMWORD PTR gxb$29[rbp] - 002d9 66 0f 7f 85 a0 + 002da 66 0f 7f 85 a0 05 00 00 movdqa XMMWORD PTR t0$30[rbp], xmm0 ; 3221 : __m128i t1 = _mm_unpackhi_epi8(brb, gxb); - 002e1 66 0f 6f 85 40 + 002e2 66 0f 6f 85 40 05 00 00 movdqa xmm0, XMMWORD PTR brb$28[rbp] - 002e9 66 0f 68 85 70 + 002ea 66 0f 68 85 70 05 00 00 punpckhbw xmm0, XMMWORD PTR gxb$29[rbp] - 002f1 66 0f 7f 85 d0 + 002f2 66 0f 7f 85 d0 05 00 00 movdqa XMMWORD PTR t1$31[rbp], xmm0 ; 3222 : __m128i o0 = _mm_unpacklo_epi16(t0, t1); - 002f9 66 0f 6f 85 a0 + 002fa 66 0f 6f 85 a0 05 00 00 movdqa xmm0, XMMWORD PTR t0$30[rbp] - 00301 66 0f 61 85 d0 + 00302 66 0f 61 85 d0 05 00 00 punpcklwd xmm0, XMMWORD PTR t1$31[rbp] - 00309 66 0f 7f 85 00 + 0030a 66 0f 7f 85 00 06 00 00 movdqa XMMWORD PTR o0$32[rbp], xmm0 ; 3223 : __m128i o1 = _mm_unpackhi_epi16(t0, t1); - 00311 66 0f 6f 85 a0 + 00312 66 0f 6f 85 a0 05 00 00 movdqa xmm0, XMMWORD PTR t0$30[rbp] - 00319 66 0f 69 85 d0 + 0031a 66 0f 69 85 d0 05 00 00 punpckhwd xmm0, XMMWORD PTR t1$31[rbp] - 00321 66 0f 7f 85 30 + 00322 66 0f 7f 85 30 06 00 00 movdqa XMMWORD PTR o1$33[rbp], xmm0 ; 3224 : ; 3225 : // store ; 3226 : _mm_storeu_si128((__m128i*) (out + 0), o0); - 00329 48 8b 85 30 0a + 0032a 48 8b 85 30 0a 00 00 mov rax, QWORD PTR out$[rbp] - 00330 66 0f 6f 85 00 + 00331 66 0f 6f 85 00 06 00 00 movdqa xmm0, XMMWORD PTR o0$32[rbp] - 00338 f3 0f 7f 00 movdqu XMMWORD PTR [rax], xmm0 + 00339 f3 0f 7f 00 movdqu XMMWORD PTR [rax], xmm0 ; 3227 : _mm_storeu_si128((__m128i*) (out + 16), o1); - 0033c 48 8b 85 30 0a + 0033d 48 8b 85 30 0a 00 00 mov rax, QWORD PTR out$[rbp] - 00343 48 83 c0 10 add rax, 16 - 00347 66 0f 6f 85 30 + 00344 48 83 c0 10 add rax, 16 + 00348 66 0f 6f 85 30 06 00 00 movdqa xmm0, XMMWORD PTR o1$33[rbp] - 0034f f3 0f 7f 00 movdqu XMMWORD PTR [rax], xmm0 + 00350 f3 0f 7f 00 movdqu XMMWORD PTR [rax], xmm0 ; 3228 : out += 32; - 00353 48 8b 85 30 0a + 00354 48 8b 85 30 0a 00 00 mov rax, QWORD PTR out$[rbp] - 0035a 48 83 c0 20 add rax, 32 ; 00000020H - 0035e 48 89 85 30 0a + 0035b 48 83 c0 20 add rax, 32 ; 00000020H + 0035f 48 89 85 30 0a 00 00 mov QWORD PTR out$[rbp], rax ; 3229 : } - 00365 e9 44 fd ff ff jmp $LN2@stbi__YCbC + 00366 e9 44 fd ff ff jmp $LN2@stbi__YCbC $LN3@stbi__YCbC: $LN8@stbi__YCbC: @@ -25513,224 +25666,224 @@ $LN8@stbi__YCbC: ; 3278 : ; 3279 : for (; i < count; ++i) { - 0036a eb 08 jmp SHORT $LN7@stbi__YCbC + 0036b eb 08 jmp SHORT $LN7@stbi__YCbC $LN5@stbi__YCbC: - 0036c 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0036f ff c0 inc eax - 00371 89 45 04 mov DWORD PTR i$[rbp], eax + 0036d 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00370 ff c0 inc eax + 00372 89 45 04 mov DWORD PTR i$[rbp], eax $LN7@stbi__YCbC: - 00374 8b 85 50 0a 00 + 00375 8b 85 50 0a 00 00 mov eax, DWORD PTR count$[rbp] - 0037a 39 45 04 cmp DWORD PTR i$[rbp], eax - 0037d 0f 8d e1 01 00 + 0037b 39 45 04 cmp DWORD PTR i$[rbp], eax + 0037e 0f 8d e1 01 00 00 jge $LN6@stbi__YCbC ; 3280 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding - 00383 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00387 48 8b 8d 38 0a + 00384 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00388 48 8b 8d 38 0a 00 00 mov rcx, QWORD PTR y$[rbp] - 0038e 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00392 c1 e0 14 shl eax, 20 - 00395 05 00 00 08 00 add eax, 524288 ; 00080000H - 0039a 89 85 54 06 00 + 0038f 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00393 c1 e0 14 shl eax, 20 + 00396 05 00 00 08 00 add eax, 524288 ; 00080000H + 0039b 89 85 54 06 00 00 mov DWORD PTR y_fixed$34[rbp], eax ; 3281 : int r, g, b; ; 3282 : int cr = pcr[i] - 128; - 003a0 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 003a4 48 8b 8d 48 0a + 003a1 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 003a5 48 8b 8d 48 0a 00 00 mov rcx, QWORD PTR pcr$[rbp] - 003ab 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 003af 2d 80 00 00 00 sub eax, 128 ; 00000080H - 003b4 89 85 d4 06 00 + 003ac 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 003b0 2d 80 00 00 00 sub eax, 128 ; 00000080H + 003b5 89 85 d4 06 00 00 mov DWORD PTR cr$38[rbp], eax ; 3283 : int cb = pcb[i] - 128; - 003ba 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 003be 48 8b 8d 40 0a + 003bb 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 003bf 48 8b 8d 40 0a 00 00 mov rcx, QWORD PTR pcb$[rbp] - 003c5 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 003c9 2d 80 00 00 00 sub eax, 128 ; 00000080H - 003ce 89 85 f4 06 00 + 003c6 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 003ca 2d 80 00 00 00 sub eax, 128 ; 00000080H + 003cf 89 85 f4 06 00 00 mov DWORD PTR cb$39[rbp], eax ; 3284 : r = y_fixed + cr * stbi__float2fixed(1.40200f); - 003d4 69 85 d4 06 00 + 003d5 69 85 d4 06 00 00 00 6f 16 00 imul eax, DWORD PTR cr$38[rbp], 1470208 ; 00166f00H - 003de 8b 8d 54 06 00 + 003df 8b 8d 54 06 00 00 mov ecx, DWORD PTR y_fixed$34[rbp] - 003e4 03 c8 add ecx, eax - 003e6 8b c1 mov eax, ecx - 003e8 89 85 74 06 00 + 003e5 03 c8 add ecx, eax + 003e7 8b c1 mov eax, ecx + 003e9 89 85 74 06 00 00 mov DWORD PTR r$35[rbp], eax ; 3285 : g = y_fixed + cr * -stbi__float2fixed(0.71414f) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); - 003ee 69 85 d4 06 00 + 003ef 69 85 d4 06 00 00 00 93 f4 ff imul eax, DWORD PTR cr$38[rbp], -748800 ; fffffffffff49300H - 003f8 8b 8d 54 06 00 + 003f9 8b 8d 54 06 00 00 mov ecx, DWORD PTR y_fixed$34[rbp] - 003fe 03 c8 add ecx, eax - 00400 8b c1 mov eax, ecx - 00402 69 8d f4 06 00 + 003ff 03 c8 add ecx, eax + 00401 8b c1 mov eax, ecx + 00403 69 8d f4 06 00 00 00 7e fa ff imul ecx, DWORD PTR cb$39[rbp], -360960 ; fffffffffffa7e00H - 0040c 81 e1 00 00 ff + 0040d 81 e1 00 00 ff ff and ecx, -65536 ; ffff0000H - 00412 03 c1 add eax, ecx - 00414 89 85 94 06 00 + 00413 03 c1 add eax, ecx + 00415 89 85 94 06 00 00 mov DWORD PTR g$36[rbp], eax ; 3286 : b = y_fixed + cb * stbi__float2fixed(1.77200f); - 0041a 69 85 f4 06 00 + 0041b 69 85 f4 06 00 00 00 5a 1c 00 imul eax, DWORD PTR cb$39[rbp], 1858048 ; 001c5a00H - 00424 8b 8d 54 06 00 + 00425 8b 8d 54 06 00 00 mov ecx, DWORD PTR y_fixed$34[rbp] - 0042a 03 c8 add ecx, eax - 0042c 8b c1 mov eax, ecx - 0042e 89 85 b4 06 00 + 0042b 03 c8 add ecx, eax + 0042d 8b c1 mov eax, ecx + 0042f 89 85 b4 06 00 00 mov DWORD PTR b$37[rbp], eax ; 3287 : r >>= 20; - 00434 8b 85 74 06 00 + 00435 8b 85 74 06 00 00 mov eax, DWORD PTR r$35[rbp] - 0043a c1 f8 14 sar eax, 20 - 0043d 89 85 74 06 00 + 0043b c1 f8 14 sar eax, 20 + 0043e 89 85 74 06 00 00 mov DWORD PTR r$35[rbp], eax ; 3288 : g >>= 20; - 00443 8b 85 94 06 00 + 00444 8b 85 94 06 00 00 mov eax, DWORD PTR g$36[rbp] - 00449 c1 f8 14 sar eax, 20 - 0044c 89 85 94 06 00 + 0044a c1 f8 14 sar eax, 20 + 0044d 89 85 94 06 00 00 mov DWORD PTR g$36[rbp], eax ; 3289 : b >>= 20; - 00452 8b 85 b4 06 00 + 00453 8b 85 b4 06 00 00 mov eax, DWORD PTR b$37[rbp] - 00458 c1 f8 14 sar eax, 20 - 0045b 89 85 b4 06 00 + 00459 c1 f8 14 sar eax, 20 + 0045c 89 85 b4 06 00 00 mov DWORD PTR b$37[rbp], eax ; 3290 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } - 00461 81 bd 74 06 00 + 00462 81 bd 74 06 00 00 ff 00 00 00 cmp DWORD PTR r$35[rbp], 255 ; 000000ffH - 0046b 76 1f jbe SHORT $LN9@stbi__YCbC - 0046d 83 bd 74 06 00 + 0046c 76 1f jbe SHORT $LN9@stbi__YCbC + 0046e 83 bd 74 06 00 00 00 cmp DWORD PTR r$35[rbp], 0 - 00474 7d 0c jge SHORT $LN10@stbi__YCbC - 00476 c7 85 74 06 00 + 00475 7d 0c jge SHORT $LN10@stbi__YCbC + 00477 c7 85 74 06 00 00 00 00 00 00 mov DWORD PTR r$35[rbp], 0 - 00480 eb 0a jmp SHORT $LN11@stbi__YCbC + 00481 eb 0a jmp SHORT $LN11@stbi__YCbC $LN10@stbi__YCbC: - 00482 c7 85 74 06 00 + 00483 c7 85 74 06 00 00 ff 00 00 00 mov DWORD PTR r$35[rbp], 255 ; 000000ffH $LN11@stbi__YCbC: $LN9@stbi__YCbC: ; 3291 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } - 0048c 81 bd 94 06 00 + 0048d 81 bd 94 06 00 00 ff 00 00 00 cmp DWORD PTR g$36[rbp], 255 ; 000000ffH - 00496 76 1f jbe SHORT $LN12@stbi__YCbC - 00498 83 bd 94 06 00 + 00497 76 1f jbe SHORT $LN12@stbi__YCbC + 00499 83 bd 94 06 00 00 00 cmp DWORD PTR g$36[rbp], 0 - 0049f 7d 0c jge SHORT $LN13@stbi__YCbC - 004a1 c7 85 94 06 00 + 004a0 7d 0c jge SHORT $LN13@stbi__YCbC + 004a2 c7 85 94 06 00 00 00 00 00 00 mov DWORD PTR g$36[rbp], 0 - 004ab eb 0a jmp SHORT $LN14@stbi__YCbC + 004ac eb 0a jmp SHORT $LN14@stbi__YCbC $LN13@stbi__YCbC: - 004ad c7 85 94 06 00 + 004ae c7 85 94 06 00 00 ff 00 00 00 mov DWORD PTR g$36[rbp], 255 ; 000000ffH $LN14@stbi__YCbC: $LN12@stbi__YCbC: ; 3292 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } - 004b7 81 bd b4 06 00 + 004b8 81 bd b4 06 00 00 ff 00 00 00 cmp DWORD PTR b$37[rbp], 255 ; 000000ffH - 004c1 76 1f jbe SHORT $LN15@stbi__YCbC - 004c3 83 bd b4 06 00 + 004c2 76 1f jbe SHORT $LN15@stbi__YCbC + 004c4 83 bd b4 06 00 00 00 cmp DWORD PTR b$37[rbp], 0 - 004ca 7d 0c jge SHORT $LN16@stbi__YCbC - 004cc c7 85 b4 06 00 + 004cb 7d 0c jge SHORT $LN16@stbi__YCbC + 004cd c7 85 b4 06 00 00 00 00 00 00 mov DWORD PTR b$37[rbp], 0 - 004d6 eb 0a jmp SHORT $LN17@stbi__YCbC + 004d7 eb 0a jmp SHORT $LN17@stbi__YCbC $LN16@stbi__YCbC: - 004d8 c7 85 b4 06 00 + 004d9 c7 85 b4 06 00 00 ff 00 00 00 mov DWORD PTR b$37[rbp], 255 ; 000000ffH $LN17@stbi__YCbC: $LN15@stbi__YCbC: ; 3293 : out[0] = (stbi_uc)r; - 004e2 b8 01 00 00 00 mov eax, 1 - 004e7 48 6b c0 00 imul rax, rax, 0 - 004eb 48 8b 8d 30 0a + 004e3 b8 01 00 00 00 mov eax, 1 + 004e8 48 6b c0 00 imul rax, rax, 0 + 004ec 48 8b 8d 30 0a 00 00 mov rcx, QWORD PTR out$[rbp] - 004f2 0f b6 95 74 06 + 004f3 0f b6 95 74 06 00 00 movzx edx, BYTE PTR r$35[rbp] - 004f9 88 14 01 mov BYTE PTR [rcx+rax], dl + 004fa 88 14 01 mov BYTE PTR [rcx+rax], dl ; 3294 : out[1] = (stbi_uc)g; - 004fc b8 01 00 00 00 mov eax, 1 - 00501 48 6b c0 01 imul rax, rax, 1 - 00505 48 8b 8d 30 0a + 004fd b8 01 00 00 00 mov eax, 1 + 00502 48 6b c0 01 imul rax, rax, 1 + 00506 48 8b 8d 30 0a 00 00 mov rcx, QWORD PTR out$[rbp] - 0050c 0f b6 95 94 06 + 0050d 0f b6 95 94 06 00 00 movzx edx, BYTE PTR g$36[rbp] - 00513 88 14 01 mov BYTE PTR [rcx+rax], dl + 00514 88 14 01 mov BYTE PTR [rcx+rax], dl ; 3295 : out[2] = (stbi_uc)b; - 00516 b8 01 00 00 00 mov eax, 1 - 0051b 48 6b c0 02 imul rax, rax, 2 - 0051f 48 8b 8d 30 0a + 00517 b8 01 00 00 00 mov eax, 1 + 0051c 48 6b c0 02 imul rax, rax, 2 + 00520 48 8b 8d 30 0a 00 00 mov rcx, QWORD PTR out$[rbp] - 00526 0f b6 95 b4 06 + 00527 0f b6 95 b4 06 00 00 movzx edx, BYTE PTR b$37[rbp] - 0052d 88 14 01 mov BYTE PTR [rcx+rax], dl + 0052e 88 14 01 mov BYTE PTR [rcx+rax], dl ; 3296 : out[3] = 255; - 00530 b8 01 00 00 00 mov eax, 1 - 00535 48 6b c0 03 imul rax, rax, 3 - 00539 48 8b 8d 30 0a + 00531 b8 01 00 00 00 mov eax, 1 + 00536 48 6b c0 03 imul rax, rax, 3 + 0053a 48 8b 8d 30 0a 00 00 mov rcx, QWORD PTR out$[rbp] - 00540 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00541 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH ; 3297 : out += step; - 00544 48 63 85 58 0a + 00545 48 63 85 58 0a 00 00 movsxd rax, DWORD PTR step$[rbp] - 0054b 48 8b 8d 30 0a + 0054c 48 8b 8d 30 0a 00 00 mov rcx, QWORD PTR out$[rbp] - 00552 48 03 c8 add rcx, rax - 00555 48 8b c1 mov rax, rcx - 00558 48 89 85 30 0a + 00553 48 03 c8 add rcx, rax + 00556 48 8b c1 mov rax, rcx + 00559 48 89 85 30 0a 00 00 mov QWORD PTR out$[rbp], rax ; 3298 : } - 0055f e9 08 fe ff ff jmp $LN5@stbi__YCbC + 00560 e9 08 fe ff ff jmp $LN5@stbi__YCbC $LN6@stbi__YCbC: ; 3299 : } - 00564 48 8d a5 18 0a + 00565 48 8d a5 18 0a 00 00 lea rsp, QWORD PTR [rbp+2584] - 0056b 5f pop rdi - 0056c 5d pop rbp - 0056d c3 ret 0 + 0056c 5f pop rdi + 0056d 5d pop rbp + 0056e c3 ret 0 stbi__YCbCr_to_RGB_simd ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -25766,216 +25919,217 @@ stbi__YCbCr_to_RGB_row PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 3144 : int i; ; 3145 : for (i = 0; i < count; ++i) { - 0002e c7 45 04 00 00 + 0002f c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00035 eb 08 jmp SHORT $LN4@stbi__YCbC + 00036 eb 08 jmp SHORT $LN4@stbi__YCbC $LN2@stbi__YCbC: - 00037 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0003a ff c0 inc eax - 0003c 89 45 04 mov DWORD PTR i$[rbp], eax + 00038 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0003b ff c0 inc eax + 0003d 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__YCbC: - 0003f 8b 85 e0 01 00 + 00040 8b 85 e0 01 00 00 mov eax, DWORD PTR count$[rbp] - 00045 39 45 04 cmp DWORD PTR i$[rbp], eax - 00048 0f 8d a5 01 00 + 00046 39 45 04 cmp DWORD PTR i$[rbp], eax + 00049 0f 8d a5 01 00 00 jge $LN3@stbi__YCbC ; 3146 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding - 0004e 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00052 48 8b 8d c8 01 + 0004f 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00053 48 8b 8d c8 01 00 00 mov rcx, QWORD PTR y$[rbp] - 00059 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0005d c1 e0 14 shl eax, 20 - 00060 05 00 00 08 00 add eax, 524288 ; 00080000H - 00065 89 45 24 mov DWORD PTR y_fixed$1[rbp], eax + 0005a 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0005e c1 e0 14 shl eax, 20 + 00061 05 00 00 08 00 add eax, 524288 ; 00080000H + 00066 89 45 24 mov DWORD PTR y_fixed$1[rbp], eax ; 3147 : int r, g, b; ; 3148 : int cr = pcr[i] - 128; - 00068 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 0006c 48 8b 8d d8 01 + 00069 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 0006d 48 8b 8d d8 01 00 00 mov rcx, QWORD PTR pcr$[rbp] - 00073 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00077 2d 80 00 00 00 sub eax, 128 ; 00000080H - 0007c 89 85 a4 00 00 + 00074 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00078 2d 80 00 00 00 sub eax, 128 ; 00000080H + 0007d 89 85 a4 00 00 00 mov DWORD PTR cr$5[rbp], eax ; 3149 : int cb = pcb[i] - 128; - 00082 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00086 48 8b 8d d0 01 + 00083 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00087 48 8b 8d d0 01 00 00 mov rcx, QWORD PTR pcb$[rbp] - 0008d 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00091 2d 80 00 00 00 sub eax, 128 ; 00000080H - 00096 89 85 c4 00 00 + 0008e 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00092 2d 80 00 00 00 sub eax, 128 ; 00000080H + 00097 89 85 c4 00 00 00 mov DWORD PTR cb$6[rbp], eax ; 3150 : r = y_fixed + cr * stbi__float2fixed(1.40200f); - 0009c 69 85 a4 00 00 + 0009d 69 85 a4 00 00 00 00 6f 16 00 imul eax, DWORD PTR cr$5[rbp], 1470208 ; 00166f00H - 000a6 8b 4d 24 mov ecx, DWORD PTR y_fixed$1[rbp] - 000a9 03 c8 add ecx, eax - 000ab 8b c1 mov eax, ecx - 000ad 89 45 44 mov DWORD PTR r$2[rbp], eax + 000a7 8b 4d 24 mov ecx, DWORD PTR y_fixed$1[rbp] + 000aa 03 c8 add ecx, eax + 000ac 8b c1 mov eax, ecx + 000ae 89 45 44 mov DWORD PTR r$2[rbp], eax ; 3151 : g = y_fixed + (cr * -stbi__float2fixed(0.71414f)) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); - 000b0 69 85 a4 00 00 + 000b1 69 85 a4 00 00 00 00 93 f4 ff imul eax, DWORD PTR cr$5[rbp], -748800 ; fffffffffff49300H - 000ba 8b 4d 24 mov ecx, DWORD PTR y_fixed$1[rbp] - 000bd 03 c8 add ecx, eax - 000bf 8b c1 mov eax, ecx - 000c1 69 8d c4 00 00 + 000bb 8b 4d 24 mov ecx, DWORD PTR y_fixed$1[rbp] + 000be 03 c8 add ecx, eax + 000c0 8b c1 mov eax, ecx + 000c2 69 8d c4 00 00 00 00 7e fa ff imul ecx, DWORD PTR cb$6[rbp], -360960 ; fffffffffffa7e00H - 000cb 81 e1 00 00 ff + 000cc 81 e1 00 00 ff ff and ecx, -65536 ; ffff0000H - 000d1 03 c1 add eax, ecx - 000d3 89 45 64 mov DWORD PTR g$3[rbp], eax + 000d2 03 c1 add eax, ecx + 000d4 89 45 64 mov DWORD PTR g$3[rbp], eax ; 3152 : b = y_fixed + cb * stbi__float2fixed(1.77200f); - 000d6 69 85 c4 00 00 + 000d7 69 85 c4 00 00 00 00 5a 1c 00 imul eax, DWORD PTR cb$6[rbp], 1858048 ; 001c5a00H - 000e0 8b 4d 24 mov ecx, DWORD PTR y_fixed$1[rbp] - 000e3 03 c8 add ecx, eax - 000e5 8b c1 mov eax, ecx - 000e7 89 85 84 00 00 + 000e1 8b 4d 24 mov ecx, DWORD PTR y_fixed$1[rbp] + 000e4 03 c8 add ecx, eax + 000e6 8b c1 mov eax, ecx + 000e8 89 85 84 00 00 00 mov DWORD PTR b$4[rbp], eax ; 3153 : r >>= 20; - 000ed 8b 45 44 mov eax, DWORD PTR r$2[rbp] - 000f0 c1 f8 14 sar eax, 20 - 000f3 89 45 44 mov DWORD PTR r$2[rbp], eax + 000ee 8b 45 44 mov eax, DWORD PTR r$2[rbp] + 000f1 c1 f8 14 sar eax, 20 + 000f4 89 45 44 mov DWORD PTR r$2[rbp], eax ; 3154 : g >>= 20; - 000f6 8b 45 64 mov eax, DWORD PTR g$3[rbp] - 000f9 c1 f8 14 sar eax, 20 - 000fc 89 45 64 mov DWORD PTR g$3[rbp], eax + 000f7 8b 45 64 mov eax, DWORD PTR g$3[rbp] + 000fa c1 f8 14 sar eax, 20 + 000fd 89 45 64 mov DWORD PTR g$3[rbp], eax ; 3155 : b >>= 20; - 000ff 8b 85 84 00 00 + 00100 8b 85 84 00 00 00 mov eax, DWORD PTR b$4[rbp] - 00105 c1 f8 14 sar eax, 20 - 00108 89 85 84 00 00 + 00106 c1 f8 14 sar eax, 20 + 00109 89 85 84 00 00 00 mov DWORD PTR b$4[rbp], eax ; 3156 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } - 0010e 81 7d 44 ff 00 + 0010f 81 7d 44 ff 00 00 00 cmp DWORD PTR r$2[rbp], 255 ; 000000ffH - 00115 76 16 jbe SHORT $LN5@stbi__YCbC - 00117 83 7d 44 00 cmp DWORD PTR r$2[rbp], 0 - 0011b 7d 09 jge SHORT $LN6@stbi__YCbC - 0011d c7 45 44 00 00 + 00116 76 16 jbe SHORT $LN5@stbi__YCbC + 00118 83 7d 44 00 cmp DWORD PTR r$2[rbp], 0 + 0011c 7d 09 jge SHORT $LN6@stbi__YCbC + 0011e c7 45 44 00 00 00 00 mov DWORD PTR r$2[rbp], 0 - 00124 eb 07 jmp SHORT $LN7@stbi__YCbC + 00125 eb 07 jmp SHORT $LN7@stbi__YCbC $LN6@stbi__YCbC: - 00126 c7 45 44 ff 00 + 00127 c7 45 44 ff 00 00 00 mov DWORD PTR r$2[rbp], 255 ; 000000ffH $LN7@stbi__YCbC: $LN5@stbi__YCbC: ; 3157 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } - 0012d 81 7d 64 ff 00 + 0012e 81 7d 64 ff 00 00 00 cmp DWORD PTR g$3[rbp], 255 ; 000000ffH - 00134 76 16 jbe SHORT $LN8@stbi__YCbC - 00136 83 7d 64 00 cmp DWORD PTR g$3[rbp], 0 - 0013a 7d 09 jge SHORT $LN9@stbi__YCbC - 0013c c7 45 64 00 00 + 00135 76 16 jbe SHORT $LN8@stbi__YCbC + 00137 83 7d 64 00 cmp DWORD PTR g$3[rbp], 0 + 0013b 7d 09 jge SHORT $LN9@stbi__YCbC + 0013d c7 45 64 00 00 00 00 mov DWORD PTR g$3[rbp], 0 - 00143 eb 07 jmp SHORT $LN10@stbi__YCbC + 00144 eb 07 jmp SHORT $LN10@stbi__YCbC $LN9@stbi__YCbC: - 00145 c7 45 64 ff 00 + 00146 c7 45 64 ff 00 00 00 mov DWORD PTR g$3[rbp], 255 ; 000000ffH $LN10@stbi__YCbC: $LN8@stbi__YCbC: ; 3158 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } - 0014c 81 bd 84 00 00 + 0014d 81 bd 84 00 00 00 ff 00 00 00 cmp DWORD PTR b$4[rbp], 255 ; 000000ffH - 00156 76 1f jbe SHORT $LN11@stbi__YCbC - 00158 83 bd 84 00 00 + 00157 76 1f jbe SHORT $LN11@stbi__YCbC + 00159 83 bd 84 00 00 00 00 cmp DWORD PTR b$4[rbp], 0 - 0015f 7d 0c jge SHORT $LN12@stbi__YCbC - 00161 c7 85 84 00 00 + 00160 7d 0c jge SHORT $LN12@stbi__YCbC + 00162 c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR b$4[rbp], 0 - 0016b eb 0a jmp SHORT $LN13@stbi__YCbC + 0016c eb 0a jmp SHORT $LN13@stbi__YCbC $LN12@stbi__YCbC: - 0016d c7 85 84 00 00 + 0016e c7 85 84 00 00 00 ff 00 00 00 mov DWORD PTR b$4[rbp], 255 ; 000000ffH $LN13@stbi__YCbC: $LN11@stbi__YCbC: ; 3159 : out[0] = (stbi_uc)r; - 00177 b8 01 00 00 00 mov eax, 1 - 0017c 48 6b c0 00 imul rax, rax, 0 - 00180 48 8b 8d c0 01 + 00178 b8 01 00 00 00 mov eax, 1 + 0017d 48 6b c0 00 imul rax, rax, 0 + 00181 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR out$[rbp] - 00187 0f b6 55 44 movzx edx, BYTE PTR r$2[rbp] - 0018b 88 14 01 mov BYTE PTR [rcx+rax], dl + 00188 0f b6 55 44 movzx edx, BYTE PTR r$2[rbp] + 0018c 88 14 01 mov BYTE PTR [rcx+rax], dl ; 3160 : out[1] = (stbi_uc)g; - 0018e b8 01 00 00 00 mov eax, 1 - 00193 48 6b c0 01 imul rax, rax, 1 - 00197 48 8b 8d c0 01 + 0018f b8 01 00 00 00 mov eax, 1 + 00194 48 6b c0 01 imul rax, rax, 1 + 00198 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR out$[rbp] - 0019e 0f b6 55 64 movzx edx, BYTE PTR g$3[rbp] - 001a2 88 14 01 mov BYTE PTR [rcx+rax], dl + 0019f 0f b6 55 64 movzx edx, BYTE PTR g$3[rbp] + 001a3 88 14 01 mov BYTE PTR [rcx+rax], dl ; 3161 : out[2] = (stbi_uc)b; - 001a5 b8 01 00 00 00 mov eax, 1 - 001aa 48 6b c0 02 imul rax, rax, 2 - 001ae 48 8b 8d c0 01 + 001a6 b8 01 00 00 00 mov eax, 1 + 001ab 48 6b c0 02 imul rax, rax, 2 + 001af 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR out$[rbp] - 001b5 0f b6 95 84 00 + 001b6 0f b6 95 84 00 00 00 movzx edx, BYTE PTR b$4[rbp] - 001bc 88 14 01 mov BYTE PTR [rcx+rax], dl + 001bd 88 14 01 mov BYTE PTR [rcx+rax], dl ; 3162 : out[3] = 255; - 001bf b8 01 00 00 00 mov eax, 1 - 001c4 48 6b c0 03 imul rax, rax, 3 - 001c8 48 8b 8d c0 01 + 001c0 b8 01 00 00 00 mov eax, 1 + 001c5 48 6b c0 03 imul rax, rax, 3 + 001c9 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR out$[rbp] - 001cf c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 001d0 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH ; 3163 : out += step; - 001d3 48 63 85 e8 01 + 001d4 48 63 85 e8 01 00 00 movsxd rax, DWORD PTR step$[rbp] - 001da 48 8b 8d c0 01 + 001db 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR out$[rbp] - 001e1 48 03 c8 add rcx, rax - 001e4 48 8b c1 mov rax, rcx - 001e7 48 89 85 c0 01 + 001e2 48 03 c8 add rcx, rax + 001e5 48 8b c1 mov rax, rcx + 001e8 48 89 85 c0 01 00 00 mov QWORD PTR out$[rbp], rax ; 3164 : } - 001ee e9 44 fe ff ff jmp $LN2@stbi__YCbC + 001ef e9 44 fe ff ff jmp $LN2@stbi__YCbC $LN3@stbi__YCbC: ; 3165 : } - 001f3 48 8d a5 a8 01 + 001f4 48 8d a5 a8 01 00 00 lea rsp, QWORD PTR [rbp+424] - 001fa 5f pop rdi - 001fb 5d pop rbp - 001fc c3 ret 0 + 001fb 5f pop rdi + 001fc 5d pop rbp + 001fd c3 ret 0 stbi__YCbCr_to_RGB_row ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -26005,71 +26159,72 @@ stbi__resample_row_generic PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 3130 : // resample with nearest-neighbor ; 3131 : int i, j; ; 3132 : STBI_NOTUSED(in_far); ; 3133 : for (i = 0; i < w; ++i) - 0002e c7 45 04 00 00 + 0002f c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00035 eb 08 jmp SHORT $LN4@stbi__resa + 00036 eb 08 jmp SHORT $LN4@stbi__resa $LN2@stbi__resa: - 00037 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0003a ff c0 inc eax - 0003c 89 45 04 mov DWORD PTR i$[rbp], eax + 00038 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0003b ff c0 inc eax + 0003d 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__resa: - 0003f 8b 85 38 01 00 + 00040 8b 85 38 01 00 00 mov eax, DWORD PTR w$[rbp] - 00045 39 45 04 cmp DWORD PTR i$[rbp], eax - 00048 7d 4a jge SHORT $LN3@stbi__resa + 00046 39 45 04 cmp DWORD PTR i$[rbp], eax + 00049 7d 4a jge SHORT $LN3@stbi__resa ; 3134 : for (j = 0; j < hs; ++j) - 0004a c7 45 24 00 00 + 0004b c7 45 24 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 00051 eb 08 jmp SHORT $LN7@stbi__resa + 00052 eb 08 jmp SHORT $LN7@stbi__resa $LN5@stbi__resa: - 00053 8b 45 24 mov eax, DWORD PTR j$[rbp] - 00056 ff c0 inc eax - 00058 89 45 24 mov DWORD PTR j$[rbp], eax + 00054 8b 45 24 mov eax, DWORD PTR j$[rbp] + 00057 ff c0 inc eax + 00059 89 45 24 mov DWORD PTR j$[rbp], eax $LN7@stbi__resa: - 0005b 8b 85 40 01 00 + 0005c 8b 85 40 01 00 00 mov eax, DWORD PTR hs$[rbp] - 00061 39 45 24 cmp DWORD PTR j$[rbp], eax - 00064 7d 2c jge SHORT $LN6@stbi__resa + 00062 39 45 24 cmp DWORD PTR j$[rbp], eax + 00065 7d 2c jge SHORT $LN6@stbi__resa ; 3135 : out[i * hs + j] = in_near[i]; - 00066 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 0006a 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 0006d 0f af 8d 40 01 + 00067 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 0006b 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 0006e 0f af 8d 40 01 00 00 imul ecx, DWORD PTR hs$[rbp] - 00074 03 4d 24 add ecx, DWORD PTR j$[rbp] - 00077 48 63 c9 movsxd rcx, ecx - 0007a 48 8b 95 20 01 + 00075 03 4d 24 add ecx, DWORD PTR j$[rbp] + 00078 48 63 c9 movsxd rcx, ecx + 0007b 48 8b 95 20 01 00 00 mov rdx, QWORD PTR out$[rbp] - 00081 4c 8b 85 28 01 + 00082 4c 8b 85 28 01 00 00 mov r8, QWORD PTR in_near$[rbp] - 00088 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 0008d 88 04 0a mov BYTE PTR [rdx+rcx], al - 00090 eb c1 jmp SHORT $LN5@stbi__resa + 00089 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0008e 88 04 0a mov BYTE PTR [rdx+rcx], al + 00091 eb c1 jmp SHORT $LN5@stbi__resa $LN6@stbi__resa: - 00092 eb a3 jmp SHORT $LN2@stbi__resa + 00093 eb a3 jmp SHORT $LN2@stbi__resa $LN3@stbi__resa: ; 3136 : return out; - 00094 48 8b 85 20 01 + 00095 48 8b 85 20 01 00 00 mov rax, QWORD PTR out$[rbp] ; 3137 : } - 0009b 48 8d a5 08 01 + 0009c 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000a2 5f pop rdi - 000a3 5d pop rbp - 000a4 c3 ret 0 + 000a3 5f pop rdi + 000a4 5d pop rbp + 000a5 c3 ret 0 stbi__resample_row_generic ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -26125,94 +26280,95 @@ stbi__resample_row_hv_2_simd PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 3014 : // need to generate 2x2 samples for every one in input ; 3015 : int i = 0, t0, t1; - 0002e c7 45 04 00 00 + 0002f c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 ; 3016 : ; 3017 : if (w == 1) { - 00035 83 bd 58 07 00 + 00036 83 bd 58 07 00 00 01 cmp DWORD PTR w$[rbp], 1 - 0003c 75 78 jne SHORT $LN8@stbi__resa + 0003d 75 78 jne SHORT $LN8@stbi__resa ; 3018 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); - 0003e b8 01 00 00 00 mov eax, 1 - 00043 48 6b c0 00 imul rax, rax, 0 - 00047 48 8b 8d 48 07 + 0003f b8 01 00 00 00 mov eax, 1 + 00044 48 6b c0 00 imul rax, rax, 0 + 00048 48 8b 8d 48 07 00 00 mov rcx, QWORD PTR in_near$[rbp] - 0004e 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00052 6b c0 03 imul eax, eax, 3 - 00055 b9 01 00 00 00 mov ecx, 1 - 0005a 48 6b c9 00 imul rcx, rcx, 0 - 0005e 48 8b 95 50 07 + 0004f 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00053 6b c0 03 imul eax, eax, 3 + 00056 b9 01 00 00 00 mov ecx, 1 + 0005b 48 6b c9 00 imul rcx, rcx, 0 + 0005f 48 8b 95 50 07 00 00 mov rdx, QWORD PTR in_far$[rbp] - 00065 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00069 8d 44 08 02 lea eax, DWORD PTR [rax+rcx+2] - 0006d c1 f8 02 sar eax, 2 - 00070 89 85 14 07 00 + 00066 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 0006a 8d 44 08 02 lea eax, DWORD PTR [rax+rcx+2] + 0006e c1 f8 02 sar eax, 2 + 00071 89 85 14 07 00 00 mov DWORD PTR tv78[rbp], eax - 00076 b8 01 00 00 00 mov eax, 1 - 0007b 48 6b c0 01 imul rax, rax, 1 - 0007f 48 8b 8d 40 07 + 00077 b8 01 00 00 00 mov eax, 1 + 0007c 48 6b c0 01 imul rax, rax, 1 + 00080 48 8b 8d 40 07 00 00 mov rcx, QWORD PTR out$[rbp] - 00086 0f b6 95 14 07 + 00087 0f b6 95 14 07 00 00 movzx edx, BYTE PTR tv78[rbp] - 0008d 88 14 01 mov BYTE PTR [rcx+rax], dl - 00090 b8 01 00 00 00 mov eax, 1 - 00095 48 6b c0 00 imul rax, rax, 0 - 00099 48 8b 8d 40 07 + 0008e 88 14 01 mov BYTE PTR [rcx+rax], dl + 00091 b8 01 00 00 00 mov eax, 1 + 00096 48 6b c0 00 imul rax, rax, 0 + 0009a 48 8b 8d 40 07 00 00 mov rcx, QWORD PTR out$[rbp] - 000a0 0f b6 95 14 07 + 000a1 0f b6 95 14 07 00 00 movzx edx, BYTE PTR tv78[rbp] - 000a7 88 14 01 mov BYTE PTR [rcx+rax], dl + 000a8 88 14 01 mov BYTE PTR [rcx+rax], dl ; 3019 : return out; - 000aa 48 8b 85 40 07 + 000ab 48 8b 85 40 07 00 00 mov rax, QWORD PTR out$[rbp] - 000b1 e9 e8 03 00 00 jmp $LN1@stbi__resa + 000b2 e9 e8 03 00 00 jmp $LN1@stbi__resa $LN8@stbi__resa: ; 3020 : } ; 3021 : ; 3022 : t1 = 3 * in_near[0] + in_far[0]; - 000b6 b8 01 00 00 00 mov eax, 1 - 000bb 48 6b c0 00 imul rax, rax, 0 - 000bf 48 8b 8d 48 07 + 000b7 b8 01 00 00 00 mov eax, 1 + 000bc 48 6b c0 00 imul rax, rax, 0 + 000c0 48 8b 8d 48 07 00 00 mov rcx, QWORD PTR in_near$[rbp] - 000c6 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 000ca 6b c0 03 imul eax, eax, 3 - 000cd b9 01 00 00 00 mov ecx, 1 - 000d2 48 6b c9 00 imul rcx, rcx, 0 - 000d6 48 8b 95 50 07 + 000c7 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 000cb 6b c0 03 imul eax, eax, 3 + 000ce b9 01 00 00 00 mov ecx, 1 + 000d3 48 6b c9 00 imul rcx, rcx, 0 + 000d7 48 8b 95 50 07 00 00 mov rdx, QWORD PTR in_far$[rbp] - 000dd 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 000e1 03 c1 add eax, ecx - 000e3 89 45 44 mov DWORD PTR t1$[rbp], eax + 000de 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 000e2 03 c1 add eax, ecx + 000e4 89 45 44 mov DWORD PTR t1$[rbp], eax ; 3023 : // process groups of 8 pixels for as long as we can. ; 3024 : // note we can't handle the last pixel in a row in this loop ; 3025 : // because we need to handle the filter boundary conditions. ; 3026 : for (; i < ((w - 1) & ~7); i += 8) { - 000e6 eb 09 jmp SHORT $LN4@stbi__resa + 000e7 eb 09 jmp SHORT $LN4@stbi__resa $LN2@stbi__resa: - 000e8 8b 45 04 mov eax, DWORD PTR i$[rbp] - 000eb 83 c0 08 add eax, 8 - 000ee 89 45 04 mov DWORD PTR i$[rbp], eax + 000e9 8b 45 04 mov eax, DWORD PTR i$[rbp] + 000ec 83 c0 08 add eax, 8 + 000ef 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__resa: - 000f1 8b 85 58 07 00 + 000f2 8b 85 58 07 00 00 mov eax, DWORD PTR w$[rbp] - 000f7 ff c8 dec eax - 000f9 83 e0 f8 and eax, -8 - 000fc 39 45 04 cmp DWORD PTR i$[rbp], eax - 000ff 0f 8d 96 02 00 + 000f8 ff c8 dec eax + 000fa 83 e0 f8 and eax, -8 + 000fd 39 45 04 cmp DWORD PTR i$[rbp], eax + 00100 0f 8d 96 02 00 00 jge $LN3@stbi__resa ; 3027 : #if defined(STBI_SSE2) @@ -26220,71 +26376,71 @@ $LN4@stbi__resa: ; 3029 : // this uses 3*x + y = 4*x + (y - x) ; 3030 : __m128i zero = _mm_setzero_si128(); - 00105 66 0f ef c0 pxor xmm0, xmm0 - 00109 66 0f 7f 45 70 movdqa XMMWORD PTR zero$1[rbp], xmm0 + 00106 66 0f ef c0 pxor xmm0, xmm0 + 0010a 66 0f 7f 45 70 movdqa XMMWORD PTR zero$1[rbp], xmm0 ; 3031 : __m128i farb = _mm_loadl_epi64((__m128i*) (in_far + i)); - 0010e 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00112 48 8b 8d 50 07 + 0010f 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00113 48 8b 8d 50 07 00 00 mov rcx, QWORD PTR in_far$[rbp] - 00119 48 03 c8 add rcx, rax - 0011c 48 8b c1 mov rax, rcx - 0011f f3 0f 7e 00 movq xmm0, QWORD PTR [rax] - 00123 66 0f 7f 85 a0 + 0011a 48 03 c8 add rcx, rax + 0011d 48 8b c1 mov rax, rcx + 00120 f3 0f 7e 00 movq xmm0, QWORD PTR [rax] + 00124 66 0f 7f 85 a0 00 00 00 movdqa XMMWORD PTR farb$2[rbp], xmm0 ; 3032 : __m128i nearb = _mm_loadl_epi64((__m128i*) (in_near + i)); - 0012b 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 0012f 48 8b 8d 48 07 + 0012c 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00130 48 8b 8d 48 07 00 00 mov rcx, QWORD PTR in_near$[rbp] - 00136 48 03 c8 add rcx, rax - 00139 48 8b c1 mov rax, rcx - 0013c f3 0f 7e 00 movq xmm0, QWORD PTR [rax] - 00140 66 0f 7f 85 d0 + 00137 48 03 c8 add rcx, rax + 0013a 48 8b c1 mov rax, rcx + 0013d f3 0f 7e 00 movq xmm0, QWORD PTR [rax] + 00141 66 0f 7f 85 d0 00 00 00 movdqa XMMWORD PTR nearb$3[rbp], xmm0 ; 3033 : __m128i farw = _mm_unpacklo_epi8(farb, zero); - 00148 66 0f 6f 85 a0 + 00149 66 0f 6f 85 a0 00 00 00 movdqa xmm0, XMMWORD PTR farb$2[rbp] - 00150 66 0f 60 45 70 punpcklbw xmm0, XMMWORD PTR zero$1[rbp] - 00155 66 0f 7f 85 00 + 00151 66 0f 60 45 70 punpcklbw xmm0, XMMWORD PTR zero$1[rbp] + 00156 66 0f 7f 85 00 01 00 00 movdqa XMMWORD PTR farw$4[rbp], xmm0 ; 3034 : __m128i nearw = _mm_unpacklo_epi8(nearb, zero); - 0015d 66 0f 6f 85 d0 + 0015e 66 0f 6f 85 d0 00 00 00 movdqa xmm0, XMMWORD PTR nearb$3[rbp] - 00165 66 0f 60 45 70 punpcklbw xmm0, XMMWORD PTR zero$1[rbp] - 0016a 66 0f 7f 85 30 + 00166 66 0f 60 45 70 punpcklbw xmm0, XMMWORD PTR zero$1[rbp] + 0016b 66 0f 7f 85 30 01 00 00 movdqa XMMWORD PTR nearw$5[rbp], xmm0 ; 3035 : __m128i diff = _mm_sub_epi16(farw, nearw); - 00172 66 0f 6f 85 00 + 00173 66 0f 6f 85 00 01 00 00 movdqa xmm0, XMMWORD PTR farw$4[rbp] - 0017a 66 0f f9 85 30 + 0017b 66 0f f9 85 30 01 00 00 psubw xmm0, XMMWORD PTR nearw$5[rbp] - 00182 66 0f 7f 85 60 + 00183 66 0f 7f 85 60 01 00 00 movdqa XMMWORD PTR diff$6[rbp], xmm0 ; 3036 : __m128i nears = _mm_slli_epi16(nearw, 2); - 0018a 66 0f 6f 85 30 + 0018b 66 0f 6f 85 30 01 00 00 movdqa xmm0, XMMWORD PTR nearw$5[rbp] - 00192 66 0f 71 f0 02 psllw xmm0, 2 - 00197 66 0f 7f 85 90 + 00193 66 0f 71 f0 02 psllw xmm0, 2 + 00198 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR nears$7[rbp], xmm0 ; 3037 : __m128i curr = _mm_add_epi16(nears, diff); // current row - 0019f 66 0f 6f 85 90 + 001a0 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR nears$7[rbp] - 001a7 66 0f fd 85 60 + 001a8 66 0f fd 85 60 01 00 00 paddw xmm0, XMMWORD PTR diff$6[rbp] - 001af 66 0f 7f 85 c0 + 001b0 66 0f 7f 85 c0 01 00 00 movdqa XMMWORD PTR curr$8[rbp], xmm0 ; 3038 : @@ -26295,49 +26451,49 @@ $LN4@stbi__resa: ; 3043 : // of next block of 8 pixels added in. ; 3044 : __m128i prv0 = _mm_slli_si128(curr, 2); - 001b7 66 0f 6f 85 c0 + 001b8 66 0f 6f 85 c0 01 00 00 movdqa xmm0, XMMWORD PTR curr$8[rbp] - 001bf 66 0f 73 f8 02 pslldq xmm0, 2 - 001c4 66 0f 7f 85 f0 + 001c0 66 0f 73 f8 02 pslldq xmm0, 2 + 001c5 66 0f 7f 85 f0 01 00 00 movdqa XMMWORD PTR prv0$9[rbp], xmm0 ; 3045 : __m128i nxt0 = _mm_srli_si128(curr, 2); - 001cc 66 0f 6f 85 c0 + 001cd 66 0f 6f 85 c0 01 00 00 movdqa xmm0, XMMWORD PTR curr$8[rbp] - 001d4 66 0f 73 d8 02 psrldq xmm0, 2 - 001d9 66 0f 7f 85 20 + 001d5 66 0f 73 d8 02 psrldq xmm0, 2 + 001da 66 0f 7f 85 20 02 00 00 movdqa XMMWORD PTR nxt0$10[rbp], xmm0 ; 3046 : __m128i prev = _mm_insert_epi16(prv0, t1, 0); - 001e1 66 0f 6f 85 f0 + 001e2 66 0f 6f 85 f0 01 00 00 movdqa xmm0, XMMWORD PTR prv0$9[rbp] - 001e9 66 0f c4 45 44 + 001ea 66 0f c4 45 44 00 pinsrw xmm0, DWORD PTR t1$[rbp], 0 - 001ef 66 0f 7f 85 50 + 001f0 66 0f 7f 85 50 02 00 00 movdqa XMMWORD PTR prev$11[rbp], xmm0 ; 3047 : __m128i next = _mm_insert_epi16(nxt0, 3 * in_near[i + 8] + in_far[i + 8], 7); - 001f7 8b 45 04 mov eax, DWORD PTR i$[rbp] - 001fa 83 c0 08 add eax, 8 - 001fd 48 98 cdqe - 001ff 48 8b 8d 48 07 + 001f8 8b 45 04 mov eax, DWORD PTR i$[rbp] + 001fb 83 c0 08 add eax, 8 + 001fe 48 98 cdqe + 00200 48 8b 8d 48 07 00 00 mov rcx, QWORD PTR in_near$[rbp] - 00206 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0020a 6b c0 03 imul eax, eax, 3 - 0020d 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 00210 83 c1 08 add ecx, 8 - 00213 48 63 c9 movsxd rcx, ecx - 00216 48 8b 95 50 07 + 00207 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0020b 6b c0 03 imul eax, eax, 3 + 0020e 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 00211 83 c1 08 add ecx, 8 + 00214 48 63 c9 movsxd rcx, ecx + 00217 48 8b 95 50 07 00 00 mov rdx, QWORD PTR in_far$[rbp] - 0021d 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00221 03 c1 add eax, ecx - 00223 66 0f 6f 85 20 + 0021e 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00222 03 c1 add eax, ecx + 00224 66 0f 6f 85 20 02 00 00 movdqa xmm0, XMMWORD PTR nxt0$10[rbp] - 0022b 66 0f c4 c0 07 pinsrw xmm0, eax, 7 - 00230 66 0f 7f 85 80 + 0022c 66 0f c4 c0 07 pinsrw xmm0, eax, 7 + 00231 66 0f 7f 85 80 02 00 00 movdqa XMMWORD PTR next$12[rbp], xmm0 ; 3048 : @@ -26347,123 +26503,123 @@ $LN4@stbi__resa: ; 3052 : // note the shared term. ; 3053 : __m128i bias = _mm_set1_epi16(8); - 00238 66 0f 6f 05 00 + 00239 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@00080008000800080008000800080008 - 00240 66 0f 7f 85 b0 + 00241 66 0f 7f 85 b0 02 00 00 movdqa XMMWORD PTR bias$13[rbp], xmm0 ; 3054 : __m128i curs = _mm_slli_epi16(curr, 2); - 00248 66 0f 6f 85 c0 + 00249 66 0f 6f 85 c0 01 00 00 movdqa xmm0, XMMWORD PTR curr$8[rbp] - 00250 66 0f 71 f0 02 psllw xmm0, 2 - 00255 66 0f 7f 85 e0 + 00251 66 0f 71 f0 02 psllw xmm0, 2 + 00256 66 0f 7f 85 e0 02 00 00 movdqa XMMWORD PTR curs$14[rbp], xmm0 ; 3055 : __m128i prvd = _mm_sub_epi16(prev, curr); - 0025d 66 0f 6f 85 50 + 0025e 66 0f 6f 85 50 02 00 00 movdqa xmm0, XMMWORD PTR prev$11[rbp] - 00265 66 0f f9 85 c0 + 00266 66 0f f9 85 c0 01 00 00 psubw xmm0, XMMWORD PTR curr$8[rbp] - 0026d 66 0f 7f 85 10 + 0026e 66 0f 7f 85 10 03 00 00 movdqa XMMWORD PTR prvd$15[rbp], xmm0 ; 3056 : __m128i nxtd = _mm_sub_epi16(next, curr); - 00275 66 0f 6f 85 80 + 00276 66 0f 6f 85 80 02 00 00 movdqa xmm0, XMMWORD PTR next$12[rbp] - 0027d 66 0f f9 85 c0 + 0027e 66 0f f9 85 c0 01 00 00 psubw xmm0, XMMWORD PTR curr$8[rbp] - 00285 66 0f 7f 85 40 + 00286 66 0f 7f 85 40 03 00 00 movdqa XMMWORD PTR nxtd$16[rbp], xmm0 ; 3057 : __m128i curb = _mm_add_epi16(curs, bias); - 0028d 66 0f 6f 85 e0 + 0028e 66 0f 6f 85 e0 02 00 00 movdqa xmm0, XMMWORD PTR curs$14[rbp] - 00295 66 0f fd 85 b0 + 00296 66 0f fd 85 b0 02 00 00 paddw xmm0, XMMWORD PTR bias$13[rbp] - 0029d 66 0f 7f 85 70 + 0029e 66 0f 7f 85 70 03 00 00 movdqa XMMWORD PTR curb$17[rbp], xmm0 ; 3058 : __m128i even = _mm_add_epi16(prvd, curb); - 002a5 66 0f 6f 85 10 + 002a6 66 0f 6f 85 10 03 00 00 movdqa xmm0, XMMWORD PTR prvd$15[rbp] - 002ad 66 0f fd 85 70 + 002ae 66 0f fd 85 70 03 00 00 paddw xmm0, XMMWORD PTR curb$17[rbp] - 002b5 66 0f 7f 85 a0 + 002b6 66 0f 7f 85 a0 03 00 00 movdqa XMMWORD PTR even$18[rbp], xmm0 ; 3059 : __m128i odd = _mm_add_epi16(nxtd, curb); - 002bd 66 0f 6f 85 40 + 002be 66 0f 6f 85 40 03 00 00 movdqa xmm0, XMMWORD PTR nxtd$16[rbp] - 002c5 66 0f fd 85 70 + 002c6 66 0f fd 85 70 03 00 00 paddw xmm0, XMMWORD PTR curb$17[rbp] - 002cd 66 0f 7f 85 d0 + 002ce 66 0f 7f 85 d0 03 00 00 movdqa XMMWORD PTR odd$19[rbp], xmm0 ; 3060 : ; 3061 : // interleave even and odd pixels, then undo scaling. ; 3062 : __m128i int0 = _mm_unpacklo_epi16(even, odd); - 002d5 66 0f 6f 85 a0 + 002d6 66 0f 6f 85 a0 03 00 00 movdqa xmm0, XMMWORD PTR even$18[rbp] - 002dd 66 0f 61 85 d0 + 002de 66 0f 61 85 d0 03 00 00 punpcklwd xmm0, XMMWORD PTR odd$19[rbp] - 002e5 66 0f 7f 85 00 + 002e6 66 0f 7f 85 00 04 00 00 movdqa XMMWORD PTR int0$20[rbp], xmm0 ; 3063 : __m128i int1 = _mm_unpackhi_epi16(even, odd); - 002ed 66 0f 6f 85 a0 + 002ee 66 0f 6f 85 a0 03 00 00 movdqa xmm0, XMMWORD PTR even$18[rbp] - 002f5 66 0f 69 85 d0 + 002f6 66 0f 69 85 d0 03 00 00 punpckhwd xmm0, XMMWORD PTR odd$19[rbp] - 002fd 66 0f 7f 85 30 + 002fe 66 0f 7f 85 30 04 00 00 movdqa XMMWORD PTR int1$21[rbp], xmm0 ; 3064 : __m128i de0 = _mm_srli_epi16(int0, 4); - 00305 66 0f 6f 85 00 + 00306 66 0f 6f 85 00 04 00 00 movdqa xmm0, XMMWORD PTR int0$20[rbp] - 0030d 66 0f 71 d0 04 psrlw xmm0, 4 - 00312 66 0f 7f 85 60 + 0030e 66 0f 71 d0 04 psrlw xmm0, 4 + 00313 66 0f 7f 85 60 04 00 00 movdqa XMMWORD PTR de0$22[rbp], xmm0 ; 3065 : __m128i de1 = _mm_srli_epi16(int1, 4); - 0031a 66 0f 6f 85 30 + 0031b 66 0f 6f 85 30 04 00 00 movdqa xmm0, XMMWORD PTR int1$21[rbp] - 00322 66 0f 71 d0 04 psrlw xmm0, 4 - 00327 66 0f 7f 85 90 + 00323 66 0f 71 d0 04 psrlw xmm0, 4 + 00328 66 0f 7f 85 90 04 00 00 movdqa XMMWORD PTR de1$23[rbp], xmm0 ; 3066 : ; 3067 : // pack and write output ; 3068 : __m128i outv = _mm_packus_epi16(de0, de1); - 0032f 66 0f 6f 85 60 + 00330 66 0f 6f 85 60 04 00 00 movdqa xmm0, XMMWORD PTR de0$22[rbp] - 00337 66 0f 67 85 90 + 00338 66 0f 67 85 90 04 00 00 packuswb xmm0, XMMWORD PTR de1$23[rbp] - 0033f 66 0f 7f 85 c0 + 00340 66 0f 7f 85 c0 04 00 00 movdqa XMMWORD PTR outv$24[rbp], xmm0 ; 3069 : _mm_storeu_si128((__m128i*) (out + i * 2), outv); - 00347 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0034a 03 c0 add eax, eax - 0034c 48 98 cdqe - 0034e 48 8b 8d 40 07 + 00348 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0034b 03 c0 add eax, eax + 0034d 48 98 cdqe + 0034f 48 8b 8d 40 07 00 00 mov rcx, QWORD PTR out$[rbp] - 00355 48 03 c8 add rcx, rax - 00358 48 8b c1 mov rax, rcx - 0035b 66 0f 6f 85 c0 + 00356 48 03 c8 add rcx, rax + 00359 48 8b c1 mov rax, rcx + 0035c 66 0f 6f 85 c0 04 00 00 movdqa xmm0, XMMWORD PTR outv$24[rbp] - 00363 f3 0f 7f 00 movdqu XMMWORD PTR [rax], xmm0 + 00364 f3 0f 7f 00 movdqu XMMWORD PTR [rax], xmm0 ; 3070 : #elif defined(STBI_NEON) ; 3071 : // load and perform the vertical filtering pass @@ -26504,156 +26660,156 @@ $LN4@stbi__resa: ; 3106 : // "previous" value for next iter ; 3107 : t1 = 3 * in_near[i + 7] + in_far[i + 7]; - 00367 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0036a 83 c0 07 add eax, 7 - 0036d 48 98 cdqe - 0036f 48 8b 8d 48 07 + 00368 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0036b 83 c0 07 add eax, 7 + 0036e 48 98 cdqe + 00370 48 8b 8d 48 07 00 00 mov rcx, QWORD PTR in_near$[rbp] - 00376 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0037a 6b c0 03 imul eax, eax, 3 - 0037d 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 00380 83 c1 07 add ecx, 7 - 00383 48 63 c9 movsxd rcx, ecx - 00386 48 8b 95 50 07 + 00377 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0037b 6b c0 03 imul eax, eax, 3 + 0037e 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 00381 83 c1 07 add ecx, 7 + 00384 48 63 c9 movsxd rcx, ecx + 00387 48 8b 95 50 07 00 00 mov rdx, QWORD PTR in_far$[rbp] - 0038d 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00391 03 c1 add eax, ecx - 00393 89 45 44 mov DWORD PTR t1$[rbp], eax + 0038e 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00392 03 c1 add eax, ecx + 00394 89 45 44 mov DWORD PTR t1$[rbp], eax ; 3108 : } - 00396 e9 4d fd ff ff jmp $LN2@stbi__resa + 00397 e9 4d fd ff ff jmp $LN2@stbi__resa $LN3@stbi__resa: ; 3109 : ; 3110 : t0 = t1; - 0039b 8b 45 44 mov eax, DWORD PTR t1$[rbp] - 0039e 89 45 24 mov DWORD PTR t0$[rbp], eax + 0039c 8b 45 44 mov eax, DWORD PTR t1$[rbp] + 0039f 89 45 24 mov DWORD PTR t0$[rbp], eax ; 3111 : t1 = 3 * in_near[i] + in_far[i]; - 003a1 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 003a5 48 8b 8d 48 07 + 003a2 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 003a6 48 8b 8d 48 07 00 00 mov rcx, QWORD PTR in_near$[rbp] - 003ac 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 003b0 6b c0 03 imul eax, eax, 3 - 003b3 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 003b7 48 8b 95 50 07 + 003ad 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 003b1 6b c0 03 imul eax, eax, 3 + 003b4 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 003b8 48 8b 95 50 07 00 00 mov rdx, QWORD PTR in_far$[rbp] - 003be 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 003c2 03 c1 add eax, ecx - 003c4 89 45 44 mov DWORD PTR t1$[rbp], eax + 003bf 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 003c3 03 c1 add eax, ecx + 003c5 89 45 44 mov DWORD PTR t1$[rbp], eax ; 3112 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); - 003c7 6b 45 44 03 imul eax, DWORD PTR t1$[rbp], 3 - 003cb 8b 4d 24 mov ecx, DWORD PTR t0$[rbp] - 003ce 8d 44 08 08 lea eax, DWORD PTR [rax+rcx+8] - 003d2 c1 f8 04 sar eax, 4 - 003d5 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 003d8 03 c9 add ecx, ecx - 003da 48 63 c9 movsxd rcx, ecx - 003dd 48 8b 95 40 07 + 003c8 6b 45 44 03 imul eax, DWORD PTR t1$[rbp], 3 + 003cc 8b 4d 24 mov ecx, DWORD PTR t0$[rbp] + 003cf 8d 44 08 08 lea eax, DWORD PTR [rax+rcx+8] + 003d3 c1 f8 04 sar eax, 4 + 003d6 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 003d9 03 c9 add ecx, ecx + 003db 48 63 c9 movsxd rcx, ecx + 003de 48 8b 95 40 07 00 00 mov rdx, QWORD PTR out$[rbp] - 003e4 88 04 0a mov BYTE PTR [rdx+rcx], al + 003e5 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3113 : ; 3114 : for (++i; i < w; ++i) { - 003e7 8b 45 04 mov eax, DWORD PTR i$[rbp] - 003ea ff c0 inc eax - 003ec 89 45 04 mov DWORD PTR i$[rbp], eax - 003ef eb 08 jmp SHORT $LN7@stbi__resa + 003e8 8b 45 04 mov eax, DWORD PTR i$[rbp] + 003eb ff c0 inc eax + 003ed 89 45 04 mov DWORD PTR i$[rbp], eax + 003f0 eb 08 jmp SHORT $LN7@stbi__resa $LN5@stbi__resa: - 003f1 8b 45 04 mov eax, DWORD PTR i$[rbp] - 003f4 ff c0 inc eax - 003f6 89 45 04 mov DWORD PTR i$[rbp], eax + 003f2 8b 45 04 mov eax, DWORD PTR i$[rbp] + 003f5 ff c0 inc eax + 003f7 89 45 04 mov DWORD PTR i$[rbp], eax $LN7@stbi__resa: - 003f9 8b 85 58 07 00 + 003fa 8b 85 58 07 00 00 mov eax, DWORD PTR w$[rbp] - 003ff 39 45 04 cmp DWORD PTR i$[rbp], eax - 00402 7d 73 jge SHORT $LN6@stbi__resa + 00400 39 45 04 cmp DWORD PTR i$[rbp], eax + 00403 7d 73 jge SHORT $LN6@stbi__resa ; 3115 : t0 = t1; - 00404 8b 45 44 mov eax, DWORD PTR t1$[rbp] - 00407 89 45 24 mov DWORD PTR t0$[rbp], eax + 00405 8b 45 44 mov eax, DWORD PTR t1$[rbp] + 00408 89 45 24 mov DWORD PTR t0$[rbp], eax ; 3116 : t1 = 3 * in_near[i] + in_far[i]; - 0040a 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 0040e 48 8b 8d 48 07 + 0040b 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 0040f 48 8b 8d 48 07 00 00 mov rcx, QWORD PTR in_near$[rbp] - 00415 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00419 6b c0 03 imul eax, eax, 3 - 0041c 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 00420 48 8b 95 50 07 + 00416 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0041a 6b c0 03 imul eax, eax, 3 + 0041d 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 00421 48 8b 95 50 07 00 00 mov rdx, QWORD PTR in_far$[rbp] - 00427 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 0042b 03 c1 add eax, ecx - 0042d 89 45 44 mov DWORD PTR t1$[rbp], eax + 00428 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 0042c 03 c1 add eax, ecx + 0042e 89 45 44 mov DWORD PTR t1$[rbp], eax ; 3117 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); - 00430 6b 45 24 03 imul eax, DWORD PTR t0$[rbp], 3 - 00434 8b 4d 44 mov ecx, DWORD PTR t1$[rbp] - 00437 8d 44 08 08 lea eax, DWORD PTR [rax+rcx+8] - 0043b c1 f8 04 sar eax, 4 - 0043e 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 00441 8d 4c 09 ff lea ecx, DWORD PTR [rcx+rcx-1] - 00445 48 63 c9 movsxd rcx, ecx - 00448 48 8b 95 40 07 + 00431 6b 45 24 03 imul eax, DWORD PTR t0$[rbp], 3 + 00435 8b 4d 44 mov ecx, DWORD PTR t1$[rbp] + 00438 8d 44 08 08 lea eax, DWORD PTR [rax+rcx+8] + 0043c c1 f8 04 sar eax, 4 + 0043f 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 00442 8d 4c 09 ff lea ecx, DWORD PTR [rcx+rcx-1] + 00446 48 63 c9 movsxd rcx, ecx + 00449 48 8b 95 40 07 00 00 mov rdx, QWORD PTR out$[rbp] - 0044f 88 04 0a mov BYTE PTR [rdx+rcx], al + 00450 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3118 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); - 00452 6b 45 44 03 imul eax, DWORD PTR t1$[rbp], 3 - 00456 8b 4d 24 mov ecx, DWORD PTR t0$[rbp] - 00459 8d 44 08 08 lea eax, DWORD PTR [rax+rcx+8] - 0045d c1 f8 04 sar eax, 4 - 00460 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 00463 d1 e1 shl ecx, 1 - 00465 48 63 c9 movsxd rcx, ecx - 00468 48 8b 95 40 07 + 00453 6b 45 44 03 imul eax, DWORD PTR t1$[rbp], 3 + 00457 8b 4d 24 mov ecx, DWORD PTR t0$[rbp] + 0045a 8d 44 08 08 lea eax, DWORD PTR [rax+rcx+8] + 0045e c1 f8 04 sar eax, 4 + 00461 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 00464 d1 e1 shl ecx, 1 + 00466 48 63 c9 movsxd rcx, ecx + 00469 48 8b 95 40 07 00 00 mov rdx, QWORD PTR out$[rbp] - 0046f 88 04 0a mov BYTE PTR [rdx+rcx], al + 00470 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3119 : } - 00472 e9 7a ff ff ff jmp $LN5@stbi__resa + 00473 e9 7a ff ff ff jmp $LN5@stbi__resa $LN6@stbi__resa: ; 3120 : out[w * 2 - 1] = stbi__div4(t1 + 2); - 00477 8b 45 44 mov eax, DWORD PTR t1$[rbp] - 0047a 83 c0 02 add eax, 2 - 0047d c1 f8 02 sar eax, 2 - 00480 8b 8d 58 07 00 + 00478 8b 45 44 mov eax, DWORD PTR t1$[rbp] + 0047b 83 c0 02 add eax, 2 + 0047e c1 f8 02 sar eax, 2 + 00481 8b 8d 58 07 00 00 mov ecx, DWORD PTR w$[rbp] - 00486 8d 4c 09 ff lea ecx, DWORD PTR [rcx+rcx-1] - 0048a 48 63 c9 movsxd rcx, ecx - 0048d 48 8b 95 40 07 + 00487 8d 4c 09 ff lea ecx, DWORD PTR [rcx+rcx-1] + 0048b 48 63 c9 movsxd rcx, ecx + 0048e 48 8b 95 40 07 00 00 mov rdx, QWORD PTR out$[rbp] - 00494 88 04 0a mov BYTE PTR [rdx+rcx], al + 00495 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3121 : ; 3122 : STBI_NOTUSED(hs); ; 3123 : ; 3124 : return out; - 00497 48 8b 85 40 07 + 00498 48 8b 85 40 07 00 00 mov rax, QWORD PTR out$[rbp] $LN1@stbi__resa: ; 3125 : } - 0049e 48 8d a5 28 07 + 0049f 48 8d a5 28 07 00 00 lea rsp, QWORD PTR [rbp+1832] - 004a5 5f pop rdi - 004a6 5d pop rbp - 004a7 c3 ret 0 + 004a6 5f pop rdi + 004a7 5d pop rbp + 004a8 c3 ret 0 stbi__resample_row_hv_2_simd ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -26685,177 +26841,178 @@ stbi__resample_row_hv_2 PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 2989 : // need to generate 2x2 samples for every one in input ; 2990 : int i, t0, t1; ; 2991 : if (w == 1) { - 0002e 83 bd 58 01 00 + 0002f 83 bd 58 01 00 00 01 cmp DWORD PTR w$[rbp], 1 - 00035 75 78 jne SHORT $LN5@stbi__resa + 00036 75 78 jne SHORT $LN5@stbi__resa ; 2992 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); - 00037 b8 01 00 00 00 mov eax, 1 - 0003c 48 6b c0 00 imul rax, rax, 0 - 00040 48 8b 8d 48 01 + 00038 b8 01 00 00 00 mov eax, 1 + 0003d 48 6b c0 00 imul rax, rax, 0 + 00041 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR in_near$[rbp] - 00047 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0004b 6b c0 03 imul eax, eax, 3 - 0004e b9 01 00 00 00 mov ecx, 1 - 00053 48 6b c9 00 imul rcx, rcx, 0 - 00057 48 8b 95 50 01 + 00048 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0004c 6b c0 03 imul eax, eax, 3 + 0004f b9 01 00 00 00 mov ecx, 1 + 00054 48 6b c9 00 imul rcx, rcx, 0 + 00058 48 8b 95 50 01 00 00 mov rdx, QWORD PTR in_far$[rbp] - 0005e 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00062 8d 44 08 02 lea eax, DWORD PTR [rax+rcx+2] - 00066 c1 f8 02 sar eax, 2 - 00069 89 85 14 01 00 + 0005f 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00063 8d 44 08 02 lea eax, DWORD PTR [rax+rcx+2] + 00067 c1 f8 02 sar eax, 2 + 0006a 89 85 14 01 00 00 mov DWORD PTR tv78[rbp], eax - 0006f b8 01 00 00 00 mov eax, 1 - 00074 48 6b c0 01 imul rax, rax, 1 - 00078 48 8b 8d 40 01 + 00070 b8 01 00 00 00 mov eax, 1 + 00075 48 6b c0 01 imul rax, rax, 1 + 00079 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR out$[rbp] - 0007f 0f b6 95 14 01 + 00080 0f b6 95 14 01 00 00 movzx edx, BYTE PTR tv78[rbp] - 00086 88 14 01 mov BYTE PTR [rcx+rax], dl - 00089 b8 01 00 00 00 mov eax, 1 - 0008e 48 6b c0 00 imul rax, rax, 0 - 00092 48 8b 8d 40 01 + 00087 88 14 01 mov BYTE PTR [rcx+rax], dl + 0008a b8 01 00 00 00 mov eax, 1 + 0008f 48 6b c0 00 imul rax, rax, 0 + 00093 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR out$[rbp] - 00099 0f b6 95 14 01 + 0009a 0f b6 95 14 01 00 00 movzx edx, BYTE PTR tv78[rbp] - 000a0 88 14 01 mov BYTE PTR [rcx+rax], dl + 000a1 88 14 01 mov BYTE PTR [rcx+rax], dl ; 2993 : return out; - 000a3 48 8b 85 40 01 + 000a4 48 8b 85 40 01 00 00 mov rax, QWORD PTR out$[rbp] - 000aa e9 02 01 00 00 jmp $LN1@stbi__resa + 000ab e9 02 01 00 00 jmp $LN1@stbi__resa $LN5@stbi__resa: ; 2994 : } ; 2995 : ; 2996 : t1 = 3 * in_near[0] + in_far[0]; - 000af b8 01 00 00 00 mov eax, 1 - 000b4 48 6b c0 00 imul rax, rax, 0 - 000b8 48 8b 8d 48 01 + 000b0 b8 01 00 00 00 mov eax, 1 + 000b5 48 6b c0 00 imul rax, rax, 0 + 000b9 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR in_near$[rbp] - 000bf 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 000c3 6b c0 03 imul eax, eax, 3 - 000c6 b9 01 00 00 00 mov ecx, 1 - 000cb 48 6b c9 00 imul rcx, rcx, 0 - 000cf 48 8b 95 50 01 + 000c0 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 000c4 6b c0 03 imul eax, eax, 3 + 000c7 b9 01 00 00 00 mov ecx, 1 + 000cc 48 6b c9 00 imul rcx, rcx, 0 + 000d0 48 8b 95 50 01 00 00 mov rdx, QWORD PTR in_far$[rbp] - 000d6 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 000da 03 c1 add eax, ecx - 000dc 89 45 44 mov DWORD PTR t1$[rbp], eax + 000d7 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 000db 03 c1 add eax, ecx + 000dd 89 45 44 mov DWORD PTR t1$[rbp], eax ; 2997 : out[0] = stbi__div4(t1 + 2); - 000df 8b 45 44 mov eax, DWORD PTR t1$[rbp] - 000e2 83 c0 02 add eax, 2 - 000e5 c1 f8 02 sar eax, 2 - 000e8 b9 01 00 00 00 mov ecx, 1 - 000ed 48 6b c9 00 imul rcx, rcx, 0 - 000f1 48 8b 95 40 01 + 000e0 8b 45 44 mov eax, DWORD PTR t1$[rbp] + 000e3 83 c0 02 add eax, 2 + 000e6 c1 f8 02 sar eax, 2 + 000e9 b9 01 00 00 00 mov ecx, 1 + 000ee 48 6b c9 00 imul rcx, rcx, 0 + 000f2 48 8b 95 40 01 00 00 mov rdx, QWORD PTR out$[rbp] - 000f8 88 04 0a mov BYTE PTR [rdx+rcx], al + 000f9 88 04 0a mov BYTE PTR [rdx+rcx], al ; 2998 : for (i = 1; i < w; ++i) { - 000fb c7 45 04 01 00 + 000fc c7 45 04 01 00 00 00 mov DWORD PTR i$[rbp], 1 - 00102 eb 08 jmp SHORT $LN4@stbi__resa + 00103 eb 08 jmp SHORT $LN4@stbi__resa $LN2@stbi__resa: - 00104 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00107 ff c0 inc eax - 00109 89 45 04 mov DWORD PTR i$[rbp], eax + 00105 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00108 ff c0 inc eax + 0010a 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__resa: - 0010c 8b 85 58 01 00 + 0010d 8b 85 58 01 00 00 mov eax, DWORD PTR w$[rbp] - 00112 39 45 04 cmp DWORD PTR i$[rbp], eax - 00115 7d 73 jge SHORT $LN3@stbi__resa + 00113 39 45 04 cmp DWORD PTR i$[rbp], eax + 00116 7d 73 jge SHORT $LN3@stbi__resa ; 2999 : t0 = t1; - 00117 8b 45 44 mov eax, DWORD PTR t1$[rbp] - 0011a 89 45 24 mov DWORD PTR t0$[rbp], eax + 00118 8b 45 44 mov eax, DWORD PTR t1$[rbp] + 0011b 89 45 24 mov DWORD PTR t0$[rbp], eax ; 3000 : t1 = 3 * in_near[i] + in_far[i]; - 0011d 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00121 48 8b 8d 48 01 + 0011e 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00122 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR in_near$[rbp] - 00128 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0012c 6b c0 03 imul eax, eax, 3 - 0012f 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 00133 48 8b 95 50 01 + 00129 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0012d 6b c0 03 imul eax, eax, 3 + 00130 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 00134 48 8b 95 50 01 00 00 mov rdx, QWORD PTR in_far$[rbp] - 0013a 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 0013e 03 c1 add eax, ecx - 00140 89 45 44 mov DWORD PTR t1$[rbp], eax + 0013b 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 0013f 03 c1 add eax, ecx + 00141 89 45 44 mov DWORD PTR t1$[rbp], eax ; 3001 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); - 00143 6b 45 24 03 imul eax, DWORD PTR t0$[rbp], 3 - 00147 8b 4d 44 mov ecx, DWORD PTR t1$[rbp] - 0014a 8d 44 08 08 lea eax, DWORD PTR [rax+rcx+8] - 0014e c1 f8 04 sar eax, 4 - 00151 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 00154 8d 4c 09 ff lea ecx, DWORD PTR [rcx+rcx-1] - 00158 48 63 c9 movsxd rcx, ecx - 0015b 48 8b 95 40 01 + 00144 6b 45 24 03 imul eax, DWORD PTR t0$[rbp], 3 + 00148 8b 4d 44 mov ecx, DWORD PTR t1$[rbp] + 0014b 8d 44 08 08 lea eax, DWORD PTR [rax+rcx+8] + 0014f c1 f8 04 sar eax, 4 + 00152 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 00155 8d 4c 09 ff lea ecx, DWORD PTR [rcx+rcx-1] + 00159 48 63 c9 movsxd rcx, ecx + 0015c 48 8b 95 40 01 00 00 mov rdx, QWORD PTR out$[rbp] - 00162 88 04 0a mov BYTE PTR [rdx+rcx], al + 00163 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3002 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); - 00165 6b 45 44 03 imul eax, DWORD PTR t1$[rbp], 3 - 00169 8b 4d 24 mov ecx, DWORD PTR t0$[rbp] - 0016c 8d 44 08 08 lea eax, DWORD PTR [rax+rcx+8] - 00170 c1 f8 04 sar eax, 4 - 00173 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 00176 d1 e1 shl ecx, 1 - 00178 48 63 c9 movsxd rcx, ecx - 0017b 48 8b 95 40 01 + 00166 6b 45 44 03 imul eax, DWORD PTR t1$[rbp], 3 + 0016a 8b 4d 24 mov ecx, DWORD PTR t0$[rbp] + 0016d 8d 44 08 08 lea eax, DWORD PTR [rax+rcx+8] + 00171 c1 f8 04 sar eax, 4 + 00174 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 00177 d1 e1 shl ecx, 1 + 00179 48 63 c9 movsxd rcx, ecx + 0017c 48 8b 95 40 01 00 00 mov rdx, QWORD PTR out$[rbp] - 00182 88 04 0a mov BYTE PTR [rdx+rcx], al + 00183 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3003 : } - 00185 e9 7a ff ff ff jmp $LN2@stbi__resa + 00186 e9 7a ff ff ff jmp $LN2@stbi__resa $LN3@stbi__resa: ; 3004 : out[w * 2 - 1] = stbi__div4(t1 + 2); - 0018a 8b 45 44 mov eax, DWORD PTR t1$[rbp] - 0018d 83 c0 02 add eax, 2 - 00190 c1 f8 02 sar eax, 2 - 00193 8b 8d 58 01 00 + 0018b 8b 45 44 mov eax, DWORD PTR t1$[rbp] + 0018e 83 c0 02 add eax, 2 + 00191 c1 f8 02 sar eax, 2 + 00194 8b 8d 58 01 00 00 mov ecx, DWORD PTR w$[rbp] - 00199 8d 4c 09 ff lea ecx, DWORD PTR [rcx+rcx-1] - 0019d 48 63 c9 movsxd rcx, ecx - 001a0 48 8b 95 40 01 + 0019a 8d 4c 09 ff lea ecx, DWORD PTR [rcx+rcx-1] + 0019e 48 63 c9 movsxd rcx, ecx + 001a1 48 8b 95 40 01 00 00 mov rdx, QWORD PTR out$[rbp] - 001a7 88 04 0a mov BYTE PTR [rdx+rcx], al + 001a8 88 04 0a mov BYTE PTR [rdx+rcx], al ; 3005 : ; 3006 : STBI_NOTUSED(hs); ; 3007 : ; 3008 : return out; - 001aa 48 8b 85 40 01 + 001ab 48 8b 85 40 01 00 00 mov rax, QWORD PTR out$[rbp] $LN1@stbi__resa: ; 3009 : } - 001b1 48 8d a5 28 01 + 001b2 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 001b8 5f pop rdi - 001b9 5d pop rbp - 001ba c3 ret 0 + 001b9 5f pop rdi + 001ba 5d pop rbp + 001bb c3 ret 0 stbi__resample_row_hv_2 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -26886,189 +27043,190 @@ stbi__resample_row_h_2 PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 2959 : // need to generate two samples horizontally for every one in input ; 2960 : int i; ; 2961 : stbi_uc* input = in_near; - 0002e 48 8b 85 48 01 + 0002f 48 8b 85 48 01 00 00 mov rax, QWORD PTR in_near$[rbp] - 00035 48 89 45 28 mov QWORD PTR input$[rbp], rax + 00036 48 89 45 28 mov QWORD PTR input$[rbp], rax ; 2962 : ; 2963 : if (w == 1) { - 00039 83 bd 58 01 00 + 0003a 83 bd 58 01 00 00 01 cmp DWORD PTR w$[rbp], 1 - 00040 75 59 jne SHORT $LN5@stbi__resa + 00041 75 59 jne SHORT $LN5@stbi__resa ; 2964 : // if only one sample, can't do any interpolation ; 2965 : out[0] = out[1] = input[0]; - 00042 b8 01 00 00 00 mov eax, 1 - 00047 48 6b c0 00 imul rax, rax, 0 - 0004b b9 01 00 00 00 mov ecx, 1 - 00050 48 6b c9 01 imul rcx, rcx, 1 - 00054 48 8b 95 40 01 + 00043 b8 01 00 00 00 mov eax, 1 + 00048 48 6b c0 00 imul rax, rax, 0 + 0004c b9 01 00 00 00 mov ecx, 1 + 00051 48 6b c9 01 imul rcx, rcx, 1 + 00055 48 8b 95 40 01 00 00 mov rdx, QWORD PTR out$[rbp] - 0005b 4c 8b 45 28 mov r8, QWORD PTR input$[rbp] - 0005f 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00064 88 04 0a mov BYTE PTR [rdx+rcx], al - 00067 b8 01 00 00 00 mov eax, 1 - 0006c 48 6b c0 01 imul rax, rax, 1 - 00070 b9 01 00 00 00 mov ecx, 1 - 00075 48 6b c9 00 imul rcx, rcx, 0 - 00079 48 8b 95 40 01 + 0005c 4c 8b 45 28 mov r8, QWORD PTR input$[rbp] + 00060 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00065 88 04 0a mov BYTE PTR [rdx+rcx], al + 00068 b8 01 00 00 00 mov eax, 1 + 0006d 48 6b c0 01 imul rax, rax, 1 + 00071 b9 01 00 00 00 mov ecx, 1 + 00076 48 6b c9 00 imul rcx, rcx, 0 + 0007a 48 8b 95 40 01 00 00 mov rdx, QWORD PTR out$[rbp] - 00080 4c 8b 85 40 01 + 00081 4c 8b 85 40 01 00 00 mov r8, QWORD PTR out$[rbp] - 00087 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 0008c 88 04 0a mov BYTE PTR [rdx+rcx], al + 00088 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0008d 88 04 0a mov BYTE PTR [rdx+rcx], al ; 2966 : return out; - 0008f 48 8b 85 40 01 + 00090 48 8b 85 40 01 00 00 mov rax, QWORD PTR out$[rbp] - 00096 e9 64 01 00 00 jmp $LN1@stbi__resa + 00097 e9 64 01 00 00 jmp $LN1@stbi__resa $LN5@stbi__resa: ; 2967 : } ; 2968 : ; 2969 : out[0] = input[0]; - 0009b b8 01 00 00 00 mov eax, 1 - 000a0 48 6b c0 00 imul rax, rax, 0 - 000a4 b9 01 00 00 00 mov ecx, 1 - 000a9 48 6b c9 00 imul rcx, rcx, 0 - 000ad 48 8b 95 40 01 + 0009c b8 01 00 00 00 mov eax, 1 + 000a1 48 6b c0 00 imul rax, rax, 0 + 000a5 b9 01 00 00 00 mov ecx, 1 + 000aa 48 6b c9 00 imul rcx, rcx, 0 + 000ae 48 8b 95 40 01 00 00 mov rdx, QWORD PTR out$[rbp] - 000b4 4c 8b 45 28 mov r8, QWORD PTR input$[rbp] - 000b8 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 000bd 88 04 0a mov BYTE PTR [rdx+rcx], al + 000b5 4c 8b 45 28 mov r8, QWORD PTR input$[rbp] + 000b9 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 000be 88 04 0a mov BYTE PTR [rdx+rcx], al ; 2970 : out[1] = stbi__div4(input[0] * 3 + input[1] + 2); - 000c0 b8 01 00 00 00 mov eax, 1 - 000c5 48 6b c0 00 imul rax, rax, 0 - 000c9 48 8b 4d 28 mov rcx, QWORD PTR input$[rbp] - 000cd 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 000d1 6b c0 03 imul eax, eax, 3 - 000d4 b9 01 00 00 00 mov ecx, 1 - 000d9 48 6b c9 01 imul rcx, rcx, 1 - 000dd 48 8b 55 28 mov rdx, QWORD PTR input$[rbp] - 000e1 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 000e5 8d 44 08 02 lea eax, DWORD PTR [rax+rcx+2] - 000e9 c1 f8 02 sar eax, 2 - 000ec b9 01 00 00 00 mov ecx, 1 - 000f1 48 6b c9 01 imul rcx, rcx, 1 - 000f5 48 8b 95 40 01 + 000c1 b8 01 00 00 00 mov eax, 1 + 000c6 48 6b c0 00 imul rax, rax, 0 + 000ca 48 8b 4d 28 mov rcx, QWORD PTR input$[rbp] + 000ce 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 000d2 6b c0 03 imul eax, eax, 3 + 000d5 b9 01 00 00 00 mov ecx, 1 + 000da 48 6b c9 01 imul rcx, rcx, 1 + 000de 48 8b 55 28 mov rdx, QWORD PTR input$[rbp] + 000e2 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 000e6 8d 44 08 02 lea eax, DWORD PTR [rax+rcx+2] + 000ea c1 f8 02 sar eax, 2 + 000ed b9 01 00 00 00 mov ecx, 1 + 000f2 48 6b c9 01 imul rcx, rcx, 1 + 000f6 48 8b 95 40 01 00 00 mov rdx, QWORD PTR out$[rbp] - 000fc 88 04 0a mov BYTE PTR [rdx+rcx], al + 000fd 88 04 0a mov BYTE PTR [rdx+rcx], al ; 2971 : for (i = 1; i < w - 1; ++i) { - 000ff c7 45 04 01 00 + 00100 c7 45 04 01 00 00 00 mov DWORD PTR i$[rbp], 1 - 00106 eb 08 jmp SHORT $LN4@stbi__resa + 00107 eb 08 jmp SHORT $LN4@stbi__resa $LN2@stbi__resa: - 00108 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0010b ff c0 inc eax - 0010d 89 45 04 mov DWORD PTR i$[rbp], eax + 00109 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0010c ff c0 inc eax + 0010e 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__resa: - 00110 8b 85 58 01 00 + 00111 8b 85 58 01 00 00 mov eax, DWORD PTR w$[rbp] - 00116 ff c8 dec eax - 00118 39 45 04 cmp DWORD PTR i$[rbp], eax - 0011b 7d 72 jge SHORT $LN3@stbi__resa + 00117 ff c8 dec eax + 00119 39 45 04 cmp DWORD PTR i$[rbp], eax + 0011c 7d 72 jge SHORT $LN3@stbi__resa ; 2972 : int n = 3 * input[i] + 2; - 0011d 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00121 48 8b 4d 28 mov rcx, QWORD PTR input$[rbp] - 00125 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00129 6b c0 03 imul eax, eax, 3 - 0012c 83 c0 02 add eax, 2 - 0012f 89 45 44 mov DWORD PTR n$1[rbp], eax + 0011e 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00122 48 8b 4d 28 mov rcx, QWORD PTR input$[rbp] + 00126 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0012a 6b c0 03 imul eax, eax, 3 + 0012d 83 c0 02 add eax, 2 + 00130 89 45 44 mov DWORD PTR n$1[rbp], eax ; 2973 : out[i * 2 + 0] = stbi__div4(n + input[i - 1]); - 00132 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00135 ff c8 dec eax - 00137 48 98 cdqe - 00139 48 8b 4d 28 mov rcx, QWORD PTR input$[rbp] - 0013d 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00141 8b 4d 44 mov ecx, DWORD PTR n$1[rbp] - 00144 03 c8 add ecx, eax - 00146 8b c1 mov eax, ecx - 00148 c1 f8 02 sar eax, 2 - 0014b 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 0014e 03 c9 add ecx, ecx - 00150 48 63 c9 movsxd rcx, ecx - 00153 48 8b 95 40 01 + 00133 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00136 ff c8 dec eax + 00138 48 98 cdqe + 0013a 48 8b 4d 28 mov rcx, QWORD PTR input$[rbp] + 0013e 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00142 8b 4d 44 mov ecx, DWORD PTR n$1[rbp] + 00145 03 c8 add ecx, eax + 00147 8b c1 mov eax, ecx + 00149 c1 f8 02 sar eax, 2 + 0014c 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 0014f 03 c9 add ecx, ecx + 00151 48 63 c9 movsxd rcx, ecx + 00154 48 8b 95 40 01 00 00 mov rdx, QWORD PTR out$[rbp] - 0015a 88 04 0a mov BYTE PTR [rdx+rcx], al + 0015b 88 04 0a mov BYTE PTR [rdx+rcx], al ; 2974 : out[i * 2 + 1] = stbi__div4(n + input[i + 1]); - 0015d 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00160 ff c0 inc eax - 00162 48 98 cdqe - 00164 48 8b 4d 28 mov rcx, QWORD PTR input$[rbp] - 00168 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0016c 8b 4d 44 mov ecx, DWORD PTR n$1[rbp] - 0016f 03 c8 add ecx, eax - 00171 8b c1 mov eax, ecx - 00173 c1 f8 02 sar eax, 2 - 00176 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 00179 8d 4c 09 01 lea ecx, DWORD PTR [rcx+rcx+1] - 0017d 48 63 c9 movsxd rcx, ecx - 00180 48 8b 95 40 01 + 0015e 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00161 ff c0 inc eax + 00163 48 98 cdqe + 00165 48 8b 4d 28 mov rcx, QWORD PTR input$[rbp] + 00169 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0016d 8b 4d 44 mov ecx, DWORD PTR n$1[rbp] + 00170 03 c8 add ecx, eax + 00172 8b c1 mov eax, ecx + 00174 c1 f8 02 sar eax, 2 + 00177 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 0017a 8d 4c 09 01 lea ecx, DWORD PTR [rcx+rcx+1] + 0017e 48 63 c9 movsxd rcx, ecx + 00181 48 8b 95 40 01 00 00 mov rdx, QWORD PTR out$[rbp] - 00187 88 04 0a mov BYTE PTR [rdx+rcx], al + 00188 88 04 0a mov BYTE PTR [rdx+rcx], al ; 2975 : } - 0018a e9 79 ff ff ff jmp $LN2@stbi__resa + 0018b e9 79 ff ff ff jmp $LN2@stbi__resa $LN3@stbi__resa: ; 2976 : out[i * 2 + 0] = stbi__div4(input[w - 2] * 3 + input[w - 1] + 2); - 0018f 8b 85 58 01 00 + 00190 8b 85 58 01 00 00 mov eax, DWORD PTR w$[rbp] - 00195 83 e8 02 sub eax, 2 - 00198 48 98 cdqe - 0019a 48 8b 4d 28 mov rcx, QWORD PTR input$[rbp] - 0019e 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 001a2 6b c0 03 imul eax, eax, 3 - 001a5 8b 8d 58 01 00 + 00196 83 e8 02 sub eax, 2 + 00199 48 98 cdqe + 0019b 48 8b 4d 28 mov rcx, QWORD PTR input$[rbp] + 0019f 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 001a3 6b c0 03 imul eax, eax, 3 + 001a6 8b 8d 58 01 00 00 mov ecx, DWORD PTR w$[rbp] - 001ab ff c9 dec ecx - 001ad 48 63 c9 movsxd rcx, ecx - 001b0 48 8b 55 28 mov rdx, QWORD PTR input$[rbp] - 001b4 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 001b8 8d 44 08 02 lea eax, DWORD PTR [rax+rcx+2] - 001bc c1 f8 02 sar eax, 2 - 001bf 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 001c2 03 c9 add ecx, ecx - 001c4 48 63 c9 movsxd rcx, ecx - 001c7 48 8b 95 40 01 + 001ac ff c9 dec ecx + 001ae 48 63 c9 movsxd rcx, ecx + 001b1 48 8b 55 28 mov rdx, QWORD PTR input$[rbp] + 001b5 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 001b9 8d 44 08 02 lea eax, DWORD PTR [rax+rcx+2] + 001bd c1 f8 02 sar eax, 2 + 001c0 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 001c3 03 c9 add ecx, ecx + 001c5 48 63 c9 movsxd rcx, ecx + 001c8 48 8b 95 40 01 00 00 mov rdx, QWORD PTR out$[rbp] - 001ce 88 04 0a mov BYTE PTR [rdx+rcx], al + 001cf 88 04 0a mov BYTE PTR [rdx+rcx], al ; 2977 : out[i * 2 + 1] = input[w - 1]; - 001d1 8b 85 58 01 00 + 001d2 8b 85 58 01 00 00 mov eax, DWORD PTR w$[rbp] - 001d7 ff c8 dec eax - 001d9 48 98 cdqe - 001db 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 001de 8d 4c 09 01 lea ecx, DWORD PTR [rcx+rcx+1] - 001e2 48 63 c9 movsxd rcx, ecx - 001e5 48 8b 95 40 01 + 001d8 ff c8 dec eax + 001da 48 98 cdqe + 001dc 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 001df 8d 4c 09 01 lea ecx, DWORD PTR [rcx+rcx+1] + 001e3 48 63 c9 movsxd rcx, ecx + 001e6 48 8b 95 40 01 00 00 mov rdx, QWORD PTR out$[rbp] - 001ec 4c 8b 45 28 mov r8, QWORD PTR input$[rbp] - 001f0 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 001f5 88 04 0a mov BYTE PTR [rdx+rcx], al + 001ed 4c 8b 45 28 mov r8, QWORD PTR input$[rbp] + 001f1 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 001f6 88 04 0a mov BYTE PTR [rdx+rcx], al ; 2978 : ; 2979 : STBI_NOTUSED(in_far); @@ -27076,17 +27234,17 @@ $LN3@stbi__resa: ; 2981 : ; 2982 : return out; - 001f8 48 8b 85 40 01 + 001f9 48 8b 85 40 01 00 00 mov rax, QWORD PTR out$[rbp] $LN1@stbi__resa: ; 2983 : } - 001ff 48 8d a5 28 01 + 00200 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 00206 5f pop rdi - 00207 5d pop rbp - 00208 c3 ret 0 + 00207 5f pop rdi + 00208 5d pop rbp + 00209 c3 ret 0 stbi__resample_row_h_2 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -27115,57 +27273,58 @@ stbi__resample_row_v_2 PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 2949 : // need to generate two samples vertically for every one in input ; 2950 : int i; ; 2951 : STBI_NOTUSED(hs); ; 2952 : for (i = 0; i < w; ++i) - 0002e c7 45 04 00 00 + 0002f c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00035 eb 08 jmp SHORT $LN4@stbi__resa + 00036 eb 08 jmp SHORT $LN4@stbi__resa $LN2@stbi__resa: - 00037 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0003a ff c0 inc eax - 0003c 89 45 04 mov DWORD PTR i$[rbp], eax + 00038 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0003b ff c0 inc eax + 0003d 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__resa: - 0003f 8b 85 18 01 00 + 00040 8b 85 18 01 00 00 mov eax, DWORD PTR w$[rbp] - 00045 39 45 04 cmp DWORD PTR i$[rbp], eax - 00048 7d 38 jge SHORT $LN3@stbi__resa + 00046 39 45 04 cmp DWORD PTR i$[rbp], eax + 00049 7d 38 jge SHORT $LN3@stbi__resa ; 2953 : out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2); - 0004a 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 0004e 48 8b 8d 08 01 + 0004b 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 0004f 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR in_near$[rbp] - 00055 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00059 6b c0 03 imul eax, eax, 3 - 0005c 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 00060 48 8b 95 10 01 + 00056 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0005a 6b c0 03 imul eax, eax, 3 + 0005d 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 00061 48 8b 95 10 01 00 00 mov rdx, QWORD PTR in_far$[rbp] - 00067 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 0006b 8d 44 08 02 lea eax, DWORD PTR [rax+rcx+2] - 0006f c1 f8 02 sar eax, 2 - 00072 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 00076 48 8b 95 00 01 + 00068 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 0006c 8d 44 08 02 lea eax, DWORD PTR [rax+rcx+2] + 00070 c1 f8 02 sar eax, 2 + 00073 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 00077 48 8b 95 00 01 00 00 mov rdx, QWORD PTR out$[rbp] - 0007d 88 04 0a mov BYTE PTR [rdx+rcx], al - 00080 eb b5 jmp SHORT $LN2@stbi__resa + 0007e 88 04 0a mov BYTE PTR [rdx+rcx], al + 00081 eb b5 jmp SHORT $LN2@stbi__resa $LN3@stbi__resa: ; 2954 : return out; - 00082 48 8b 85 00 01 + 00083 48 8b 85 00 01 00 00 mov rax, QWORD PTR out$[rbp] ; 2955 : } - 00089 48 8d a5 e8 00 + 0008a 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00090 5f pop rdi - 00091 5d pop rbp - 00092 c3 ret 0 + 00091 5f pop rdi + 00092 5d pop rbp + 00093 c3 ret 0 stbi__resample_row_v_2 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -27193,6 +27352,7 @@ resample_row_1 PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 2940 : STBI_NOTUSED(out); ; 2941 : STBI_NOTUSED(in_far); @@ -27200,16 +27360,16 @@ resample_row_1 PROC ; COMDAT ; 2943 : STBI_NOTUSED(hs); ; 2944 : return in_near; - 0002e 48 8b 85 e8 00 + 0002f 48 8b 85 e8 00 00 00 mov rax, QWORD PTR in_near$[rbp] ; 2945 : } - 00035 48 8d a5 c8 00 + 00036 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0003c 5f pop rdi - 0003d 5d pop rbp - 0003e c3 ret 0 + 0003d 5f pop rdi + 0003e 5d pop rbp + 0003f c3 ret 0 resample_row_1 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -27233,127 +27393,128 @@ stbi__decode_jpeg_image PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 2894 : int m; ; 2895 : for (m = 0; m < 4; m++) { - 0001f c7 45 04 00 00 + 00020 c7 45 04 00 00 00 00 mov DWORD PTR m$[rbp], 0 - 00026 eb 08 jmp SHORT $LN4@stbi__deco + 00027 eb 08 jmp SHORT $LN4@stbi__deco $LN2@stbi__deco: - 00028 8b 45 04 mov eax, DWORD PTR m$[rbp] - 0002b ff c0 inc eax - 0002d 89 45 04 mov DWORD PTR m$[rbp], eax + 00029 8b 45 04 mov eax, DWORD PTR m$[rbp] + 0002c ff c0 inc eax + 0002e 89 45 04 mov DWORD PTR m$[rbp], eax $LN4@stbi__deco: - 00030 83 7d 04 04 cmp DWORD PTR m$[rbp], 4 - 00034 7d 38 jge SHORT $LN3@stbi__deco + 00031 83 7d 04 04 cmp DWORD PTR m$[rbp], 4 + 00035 7d 38 jge SHORT $LN3@stbi__deco ; 2896 : j->img_comp[m].raw_data = NULL; - 00036 48 63 45 04 movsxd rax, DWORD PTR m$[rbp] - 0003a 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0003e 48 8b 8d 40 01 + 00037 48 63 45 04 movsxd rax, DWORD PTR m$[rbp] + 0003b 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0003f 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 00045 48 c7 84 01 d8 + 00046 48 c7 84 01 d8 46 00 00 00 00 00 00 mov QWORD PTR [rcx+rax+18136], 0 ; 2897 : j->img_comp[m].raw_coeff = NULL; - 00051 48 63 45 04 movsxd rax, DWORD PTR m$[rbp] - 00055 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00059 48 8b 8d 40 01 + 00052 48 63 45 04 movsxd rax, DWORD PTR m$[rbp] + 00056 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0005a 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 00060 48 c7 84 01 e0 + 00061 48 c7 84 01 e0 46 00 00 00 00 00 00 mov QWORD PTR [rcx+rax+18144], 0 ; 2898 : } - 0006c eb ba jmp SHORT $LN2@stbi__deco + 0006d eb ba jmp SHORT $LN2@stbi__deco $LN3@stbi__deco: ; 2899 : j->restart_interval = 0; - 0006e 48 8b 85 40 01 + 0006f 48 8b 85 40 01 00 00 mov rax, QWORD PTR j$[rbp] - 00075 c7 80 68 48 00 + 00076 c7 80 68 48 00 00 00 00 00 00 mov DWORD PTR [rax+18536], 0 ; 2900 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; - 0007f 33 d2 xor edx, edx - 00081 48 8b 8d 40 01 + 00080 33 d2 xor edx, edx + 00082 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 00088 e8 00 00 00 00 call stbi__decode_jpeg_header - 0008d 85 c0 test eax, eax - 0008f 75 07 jne SHORT $LN7@stbi__deco - 00091 33 c0 xor eax, eax - 00093 e9 8d 01 00 00 jmp $LN1@stbi__deco + 00089 e8 00 00 00 00 call stbi__decode_jpeg_header + 0008e 85 c0 test eax, eax + 00090 75 07 jne SHORT $LN7@stbi__deco + 00092 33 c0 xor eax, eax + 00094 e9 8e 01 00 00 jmp $LN1@stbi__deco $LN7@stbi__deco: ; 2901 : m = stbi__get_marker(j); - 00098 48 8b 8d 40 01 + 00099 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0009f e8 00 00 00 00 call stbi__get_marker - 000a4 0f b6 c0 movzx eax, al - 000a7 89 45 04 mov DWORD PTR m$[rbp], eax + 000a0 e8 00 00 00 00 call stbi__get_marker + 000a5 0f b6 c0 movzx eax, al + 000a8 89 45 04 mov DWORD PTR m$[rbp], eax $LN5@stbi__deco: ; 2902 : while (!stbi__EOI(m)) { - 000aa 81 7d 04 d9 00 + 000ab 81 7d 04 d9 00 00 00 cmp DWORD PTR m$[rbp], 217 ; 000000d9H - 000b1 0f 84 4d 01 00 + 000b2 0f 84 4d 01 00 00 je $LN6@stbi__deco ; 2903 : if (stbi__SOS(m)) { - 000b7 81 7d 04 da 00 + 000b8 81 7d 04 da 00 00 00 cmp DWORD PTR m$[rbp], 218 ; 000000daH - 000be 0f 85 97 00 00 + 000bf 0f 85 97 00 00 00 jne $LN8@stbi__deco ; 2904 : if (!stbi__process_scan_header(j)) return 0; - 000c4 48 8b 8d 40 01 + 000c5 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 000cb e8 00 00 00 00 call stbi__process_scan_header - 000d0 85 c0 test eax, eax - 000d2 75 07 jne SHORT $LN10@stbi__deco - 000d4 33 c0 xor eax, eax - 000d6 e9 4a 01 00 00 jmp $LN1@stbi__deco + 000cc e8 00 00 00 00 call stbi__process_scan_header + 000d1 85 c0 test eax, eax + 000d3 75 07 jne SHORT $LN10@stbi__deco + 000d5 33 c0 xor eax, eax + 000d7 e9 4b 01 00 00 jmp $LN1@stbi__deco $LN10@stbi__deco: ; 2905 : if (!stbi__parse_entropy_coded_data(j)) return 0; - 000db 48 8b 8d 40 01 + 000dc 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 000e2 e8 00 00 00 00 call stbi__parse_entropy_coded_data - 000e7 85 c0 test eax, eax - 000e9 75 07 jne SHORT $LN11@stbi__deco - 000eb 33 c0 xor eax, eax - 000ed e9 33 01 00 00 jmp $LN1@stbi__deco + 000e3 e8 00 00 00 00 call stbi__parse_entropy_coded_data + 000e8 85 c0 test eax, eax + 000ea 75 07 jne SHORT $LN11@stbi__deco + 000ec 33 c0 xor eax, eax + 000ee e9 34 01 00 00 jmp $LN1@stbi__deco $LN11@stbi__deco: ; 2906 : if (j->marker == STBI__MARKER_none) { - 000f2 48 8b 85 40 01 + 000f3 48 8b 85 40 01 00 00 mov rax, QWORD PTR j$[rbp] - 000f9 0f b6 80 28 48 + 000fa 0f b6 80 28 48 00 00 movzx eax, BYTE PTR [rax+18472] - 00100 3d ff 00 00 00 cmp eax, 255 ; 000000ffH - 00105 75 19 jne SHORT $LN12@stbi__deco + 00101 3d ff 00 00 00 cmp eax, 255 ; 000000ffH + 00106 75 19 jne SHORT $LN12@stbi__deco ; 2907 : j->marker = stbi__skip_jpeg_junk_at_end(j); - 00107 48 8b 8d 40 01 + 00108 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0010e e8 00 00 00 00 call stbi__skip_jpeg_junk_at_end - 00113 48 8b 8d 40 01 + 0010f e8 00 00 00 00 call stbi__skip_jpeg_junk_at_end + 00114 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0011a 88 81 28 48 00 + 0011b 88 81 28 48 00 00 mov BYTE PTR [rcx+18472], al $LN12@stbi__deco: @@ -27361,150 +27522,151 @@ $LN12@stbi__deco: ; 2909 : } ; 2910 : m = stbi__get_marker(j); - 00120 48 8b 8d 40 01 + 00121 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 00127 e8 00 00 00 00 call stbi__get_marker - 0012c 0f b6 c0 movzx eax, al - 0012f 89 45 04 mov DWORD PTR m$[rbp], eax + 00128 e8 00 00 00 00 call stbi__get_marker + 0012d 0f b6 c0 movzx eax, al + 00130 89 45 04 mov DWORD PTR m$[rbp], eax ; 2911 : if (STBI__RESTART(m)) - 00132 81 7d 04 d0 00 + 00133 81 7d 04 d0 00 00 00 cmp DWORD PTR m$[rbp], 208 ; 000000d0H - 00139 7c 1b jl SHORT $LN13@stbi__deco - 0013b 81 7d 04 d7 00 + 0013a 7c 1b jl SHORT $LN13@stbi__deco + 0013c 81 7d 04 d7 00 00 00 cmp DWORD PTR m$[rbp], 215 ; 000000d7H - 00142 7f 12 jg SHORT $LN13@stbi__deco + 00143 7f 12 jg SHORT $LN13@stbi__deco ; 2912 : m = stbi__get_marker(j); - 00144 48 8b 8d 40 01 + 00145 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0014b e8 00 00 00 00 call stbi__get_marker - 00150 0f b6 c0 movzx eax, al - 00153 89 45 04 mov DWORD PTR m$[rbp], eax + 0014c e8 00 00 00 00 call stbi__get_marker + 00151 0f b6 c0 movzx eax, al + 00154 89 45 04 mov DWORD PTR m$[rbp], eax $LN13@stbi__deco: ; 2913 : } - 00156 e9 a4 00 00 00 jmp $LN9@stbi__deco + 00157 e9 a4 00 00 00 jmp $LN9@stbi__deco $LN8@stbi__deco: ; 2914 : else if (stbi__DNL(m)) { - 0015b 81 7d 04 dc 00 + 0015c 81 7d 04 dc 00 00 00 cmp DWORD PTR m$[rbp], 220 ; 000000dcH - 00162 75 6f jne SHORT $LN14@stbi__deco + 00163 75 6f jne SHORT $LN14@stbi__deco ; 2915 : int Ld = stbi__get16be(j->s); - 00164 48 8b 85 40 01 + 00165 48 8b 85 40 01 00 00 mov rax, QWORD PTR j$[rbp] - 0016b 48 8b 08 mov rcx, QWORD PTR [rax] - 0016e e8 00 00 00 00 call stbi__get16be - 00173 89 45 24 mov DWORD PTR Ld$1[rbp], eax + 0016c 48 8b 08 mov rcx, QWORD PTR [rax] + 0016f e8 00 00 00 00 call stbi__get16be + 00174 89 45 24 mov DWORD PTR Ld$1[rbp], eax ; 2916 : stbi__uint32 NL = stbi__get16be(j->s); - 00176 48 8b 85 40 01 + 00177 48 8b 85 40 01 00 00 mov rax, QWORD PTR j$[rbp] - 0017d 48 8b 08 mov rcx, QWORD PTR [rax] - 00180 e8 00 00 00 00 call stbi__get16be - 00185 89 45 44 mov DWORD PTR NL$2[rbp], eax + 0017e 48 8b 08 mov rcx, QWORD PTR [rax] + 00181 e8 00 00 00 00 call stbi__get16be + 00186 89 45 44 mov DWORD PTR NL$2[rbp], eax ; 2917 : if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); - 00188 83 7d 24 04 cmp DWORD PTR Ld$1[rbp], 4 - 0018c 74 11 je SHORT $LN16@stbi__deco - 0018e 48 8d 0d 00 00 + 00189 83 7d 24 04 cmp DWORD PTR Ld$1[rbp], 4 + 0018d 74 11 je SHORT $LN16@stbi__deco + 0018f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@EPMOIECP@bad?5DNL?5len@ - 00195 e8 00 00 00 00 call stbi__err - 0019a e9 86 00 00 00 jmp $LN1@stbi__deco + 00196 e8 00 00 00 00 call stbi__err + 0019b e9 87 00 00 00 jmp $LN1@stbi__deco $LN16@stbi__deco: ; 2918 : if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); - 0019f 48 8b 85 40 01 + 001a0 48 8b 85 40 01 00 00 mov rax, QWORD PTR j$[rbp] - 001a6 48 8b 00 mov rax, QWORD PTR [rax] - 001a9 8b 40 04 mov eax, DWORD PTR [rax+4] - 001ac 39 45 44 cmp DWORD PTR NL$2[rbp], eax - 001af 74 0e je SHORT $LN17@stbi__deco - 001b1 48 8d 0d 00 00 + 001a7 48 8b 00 mov rax, QWORD PTR [rax] + 001aa 8b 40 04 mov eax, DWORD PTR [rax+4] + 001ad 39 45 44 cmp DWORD PTR NL$2[rbp], eax + 001b0 74 0e je SHORT $LN17@stbi__deco + 001b2 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0P@PNCLKCLJ@bad?5DNL?5height@ - 001b8 e8 00 00 00 00 call stbi__err - 001bd eb 66 jmp SHORT $LN1@stbi__deco + 001b9 e8 00 00 00 00 call stbi__err + 001be eb 67 jmp SHORT $LN1@stbi__deco $LN17@stbi__deco: ; 2919 : m = stbi__get_marker(j); - 001bf 48 8b 8d 40 01 + 001c0 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 001c6 e8 00 00 00 00 call stbi__get_marker - 001cb 0f b6 c0 movzx eax, al - 001ce 89 45 04 mov DWORD PTR m$[rbp], eax + 001c7 e8 00 00 00 00 call stbi__get_marker + 001cc 0f b6 c0 movzx eax, al + 001cf 89 45 04 mov DWORD PTR m$[rbp], eax ; 2920 : } - 001d1 eb 2c jmp SHORT $LN15@stbi__deco + 001d2 eb 2c jmp SHORT $LN15@stbi__deco $LN14@stbi__deco: ; 2921 : else { ; 2922 : if (!stbi__process_marker(j, m)) return 1; - 001d3 8b 55 04 mov edx, DWORD PTR m$[rbp] - 001d6 48 8b 8d 40 01 + 001d4 8b 55 04 mov edx, DWORD PTR m$[rbp] + 001d7 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 001dd e8 00 00 00 00 call stbi__process_marker - 001e2 85 c0 test eax, eax - 001e4 75 07 jne SHORT $LN18@stbi__deco - 001e6 b8 01 00 00 00 mov eax, 1 - 001eb eb 38 jmp SHORT $LN1@stbi__deco + 001de e8 00 00 00 00 call stbi__process_marker + 001e3 85 c0 test eax, eax + 001e5 75 07 jne SHORT $LN18@stbi__deco + 001e7 b8 01 00 00 00 mov eax, 1 + 001ec eb 39 jmp SHORT $LN1@stbi__deco $LN18@stbi__deco: ; 2923 : m = stbi__get_marker(j); - 001ed 48 8b 8d 40 01 + 001ee 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 001f4 e8 00 00 00 00 call stbi__get_marker - 001f9 0f b6 c0 movzx eax, al - 001fc 89 45 04 mov DWORD PTR m$[rbp], eax + 001f5 e8 00 00 00 00 call stbi__get_marker + 001fa 0f b6 c0 movzx eax, al + 001fd 89 45 04 mov DWORD PTR m$[rbp], eax $LN15@stbi__deco: $LN9@stbi__deco: ; 2924 : } ; 2925 : } - 001ff e9 a6 fe ff ff jmp $LN5@stbi__deco + 00200 e9 a6 fe ff ff jmp $LN5@stbi__deco $LN6@stbi__deco: ; 2926 : if (j->progressive) - 00204 48 8b 85 40 01 + 00205 48 8b 85 40 01 00 00 mov rax, QWORD PTR j$[rbp] - 0020b 83 b8 30 48 00 + 0020c 83 b8 30 48 00 00 00 cmp DWORD PTR [rax+18480], 0 - 00212 74 0c je SHORT $LN19@stbi__deco + 00213 74 0d je SHORT $LN19@stbi__deco ; 2927 : stbi__jpeg_finish(j); - 00214 48 8b 8d 40 01 + 00215 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0021b e8 00 00 00 00 call stbi__jpeg_finish + 0021c e8 00 00 00 00 call stbi__jpeg_finish + 00221 90 npad 1 $LN19@stbi__deco: ; 2928 : return 1; - 00220 b8 01 00 00 00 mov eax, 1 + 00222 b8 01 00 00 00 mov eax, 1 $LN1@stbi__deco: ; 2929 : } - 00225 48 8d a5 28 01 + 00227 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 0022c 5f pop rdi - 0022d 5d pop rbp - 0022e c3 ret 0 + 0022e 5f pop rdi + 0022f 5d pop rbp + 00230 c3 ret 0 stbi__decode_jpeg_image ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -27526,70 +27688,71 @@ stbi__skip_jpeg_junk_at_end PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 $LN2@stbi__skip: ; 2871 : // some JPEGs have junk at end, skip over it but if we find what looks ; 2872 : // like a valid marker, resume there ; 2873 : while (!stbi__at_eof(j->s)) { - 0001f 48 8b 85 00 01 + 00020 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 00026 48 8b 08 mov rcx, QWORD PTR [rax] - 00029 e8 00 00 00 00 call stbi__at_eof - 0002e 85 c0 test eax, eax - 00030 75 65 jne SHORT $LN3@stbi__skip + 00027 48 8b 08 mov rcx, QWORD PTR [rax] + 0002a e8 00 00 00 00 call stbi__at_eof + 0002f 85 c0 test eax, eax + 00031 75 65 jne SHORT $LN3@stbi__skip ; 2874 : int x = stbi__get8(j->s); - 00032 48 8b 85 00 01 + 00033 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 00039 48 8b 08 mov rcx, QWORD PTR [rax] - 0003c e8 00 00 00 00 call stbi__get8 - 00041 0f b6 c0 movzx eax, al - 00044 89 45 04 mov DWORD PTR x$1[rbp], eax + 0003a 48 8b 08 mov rcx, QWORD PTR [rax] + 0003d e8 00 00 00 00 call stbi__get8 + 00042 0f b6 c0 movzx eax, al + 00045 89 45 04 mov DWORD PTR x$1[rbp], eax $LN4@stbi__skip: ; 2875 : while (x == 255) { // might be a marker - 00047 81 7d 04 ff 00 + 00048 81 7d 04 ff 00 00 00 cmp DWORD PTR x$1[rbp], 255 ; 000000ffH - 0004e 75 45 jne SHORT $LN5@stbi__skip + 0004f 75 45 jne SHORT $LN5@stbi__skip ; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; - 00050 48 8b 85 00 01 + 00051 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 00057 48 8b 08 mov rcx, QWORD PTR [rax] - 0005a e8 00 00 00 00 call stbi__at_eof - 0005f 85 c0 test eax, eax - 00061 74 07 je SHORT $LN6@stbi__skip - 00063 b8 ff 00 00 00 mov eax, 255 ; 000000ffH - 00068 eb 32 jmp SHORT $LN1@stbi__skip + 00058 48 8b 08 mov rcx, QWORD PTR [rax] + 0005b e8 00 00 00 00 call stbi__at_eof + 00060 85 c0 test eax, eax + 00062 74 07 je SHORT $LN6@stbi__skip + 00064 b8 ff 00 00 00 mov eax, 255 ; 000000ffH + 00069 eb 32 jmp SHORT $LN1@stbi__skip $LN6@stbi__skip: ; 2877 : x = stbi__get8(j->s); - 0006a 48 8b 85 00 01 + 0006b 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 00071 48 8b 08 mov rcx, QWORD PTR [rax] - 00074 e8 00 00 00 00 call stbi__get8 - 00079 0f b6 c0 movzx eax, al - 0007c 89 45 04 mov DWORD PTR x$1[rbp], eax + 00072 48 8b 08 mov rcx, QWORD PTR [rax] + 00075 e8 00 00 00 00 call stbi__get8 + 0007a 0f b6 c0 movzx eax, al + 0007d 89 45 04 mov DWORD PTR x$1[rbp], eax ; 2878 : if (x != 0x00 && x != 0xff) { - 0007f 83 7d 04 00 cmp DWORD PTR x$1[rbp], 0 - 00083 74 0e je SHORT $LN7@stbi__skip - 00085 81 7d 04 ff 00 + 00080 83 7d 04 00 cmp DWORD PTR x$1[rbp], 0 + 00084 74 0e je SHORT $LN7@stbi__skip + 00086 81 7d 04 ff 00 00 00 cmp DWORD PTR x$1[rbp], 255 ; 000000ffH - 0008c 74 05 je SHORT $LN7@stbi__skip + 0008d 74 05 je SHORT $LN7@stbi__skip ; 2879 : // not a stuffed zero or lead-in to another marker, looks ; 2880 : // like an actual marker, return it ; 2881 : return x; - 0008e 8b 45 04 mov eax, DWORD PTR x$1[rbp] - 00091 eb 09 jmp SHORT $LN1@stbi__skip + 0008f 8b 45 04 mov eax, DWORD PTR x$1[rbp] + 00092 eb 09 jmp SHORT $LN1@stbi__skip $LN7@stbi__skip: ; 2882 : } @@ -27598,26 +27761,26 @@ $LN7@stbi__skip: ; 2885 : // repeated 0xff keeps trying to read the next byte of the marker. ; 2886 : } - 00093 eb b2 jmp SHORT $LN4@stbi__skip + 00094 eb b2 jmp SHORT $LN4@stbi__skip $LN5@stbi__skip: ; 2887 : } - 00095 eb 88 jmp SHORT $LN2@stbi__skip + 00096 eb 88 jmp SHORT $LN2@stbi__skip $LN3@stbi__skip: ; 2888 : return STBI__MARKER_none; - 00097 b8 ff 00 00 00 mov eax, 255 ; 000000ffH + 00098 b8 ff 00 00 00 mov eax, 255 ; 000000ffH $LN1@stbi__skip: ; 2889 : } - 0009c 48 8d a5 e8 00 + 0009d 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 000a3 5f pop rdi - 000a4 5d pop rbp - 000a5 c3 ret 0 + 000a4 5f pop rdi + 000a5 5d pop rbp + 000a6 c3 ret 0 stbi__skip_jpeg_junk_at_end ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -27642,183 +27805,184 @@ stbi__decode_jpeg_header PROC ; COMDAT 00017 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001e e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00023 90 npad 1 ; 2847 : int m; ; 2848 : z->jfif = 0; - 00023 48 8b 85 00 01 + 00024 48 8b 85 00 01 00 00 mov rax, QWORD PTR z$[rbp] - 0002a c7 80 48 48 00 + 0002b c7 80 48 48 00 00 00 00 00 00 mov DWORD PTR [rax+18504], 0 ; 2849 : z->app14_color_transform = -1; // valid values are 0,1,2 - 00034 48 8b 85 00 01 + 00035 48 8b 85 00 01 00 00 mov rax, QWORD PTR z$[rbp] - 0003b c7 80 4c 48 00 + 0003c c7 80 4c 48 00 00 ff ff ff ff mov DWORD PTR [rax+18508], -1 ; 2850 : z->marker = STBI__MARKER_none; // initialize cached marker to empty - 00045 48 8b 85 00 01 + 00046 48 8b 85 00 01 00 00 mov rax, QWORD PTR z$[rbp] - 0004c c6 80 28 48 00 + 0004d c6 80 28 48 00 00 ff mov BYTE PTR [rax+18472], 255 ; 000000ffH ; 2851 : m = stbi__get_marker(z); - 00053 48 8b 8d 00 01 + 00054 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0005a e8 00 00 00 00 call stbi__get_marker - 0005f 0f b6 c0 movzx eax, al - 00062 89 45 04 mov DWORD PTR m$[rbp], eax + 0005b e8 00 00 00 00 call stbi__get_marker + 00060 0f b6 c0 movzx eax, al + 00063 89 45 04 mov DWORD PTR m$[rbp], eax ; 2852 : if (!stbi__SOI(m)) return stbi__err("no SOI", "Corrupt JPEG"); - 00065 81 7d 04 d8 00 + 00066 81 7d 04 d8 00 00 00 cmp DWORD PTR m$[rbp], 216 ; 000000d8H - 0006c 74 11 je SHORT $LN6@stbi__deco - 0006e 48 8d 0d 00 00 + 0006d 74 11 je SHORT $LN6@stbi__deco + 0006f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_06CLMBLEP@no?5SOI@ - 00075 e8 00 00 00 00 call stbi__err - 0007a e9 04 01 00 00 jmp $LN1@stbi__deco + 00076 e8 00 00 00 00 call stbi__err + 0007b e9 04 01 00 00 jmp $LN1@stbi__deco $LN6@stbi__deco: ; 2853 : if (scan == STBI__SCAN_type) return 1; - 0007f 83 bd 08 01 00 + 00080 83 bd 08 01 00 00 01 cmp DWORD PTR scan$[rbp], 1 - 00086 75 0a jne SHORT $LN7@stbi__deco - 00088 b8 01 00 00 00 mov eax, 1 - 0008d e9 f1 00 00 00 jmp $LN1@stbi__deco + 00087 75 0a jne SHORT $LN7@stbi__deco + 00089 b8 01 00 00 00 mov eax, 1 + 0008e e9 f1 00 00 00 jmp $LN1@stbi__deco $LN7@stbi__deco: ; 2854 : m = stbi__get_marker(z); - 00092 48 8b 8d 00 01 + 00093 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00099 e8 00 00 00 00 call stbi__get_marker - 0009e 0f b6 c0 movzx eax, al - 000a1 89 45 04 mov DWORD PTR m$[rbp], eax + 0009a e8 00 00 00 00 call stbi__get_marker + 0009f 0f b6 c0 movzx eax, al + 000a2 89 45 04 mov DWORD PTR m$[rbp], eax $LN2@stbi__deco: ; 2855 : while (!stbi__SOF(m)) { - 000a4 81 7d 04 c0 00 + 000a5 81 7d 04 c0 00 00 00 cmp DWORD PTR m$[rbp], 192 ; 000000c0H - 000ab 0f 84 81 00 00 + 000ac 0f 84 81 00 00 00 je $LN3@stbi__deco - 000b1 81 7d 04 c1 00 + 000b2 81 7d 04 c1 00 00 00 cmp DWORD PTR m$[rbp], 193 ; 000000c1H - 000b8 74 78 je SHORT $LN3@stbi__deco - 000ba 81 7d 04 c2 00 + 000b9 74 78 je SHORT $LN3@stbi__deco + 000bb 81 7d 04 c2 00 00 00 cmp DWORD PTR m$[rbp], 194 ; 000000c2H - 000c1 74 6f je SHORT $LN3@stbi__deco + 000c2 74 6f je SHORT $LN3@stbi__deco ; 2856 : if (!stbi__process_marker(z, m)) return 0; - 000c3 8b 55 04 mov edx, DWORD PTR m$[rbp] - 000c6 48 8b 8d 00 01 + 000c4 8b 55 04 mov edx, DWORD PTR m$[rbp] + 000c7 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 000cd e8 00 00 00 00 call stbi__process_marker - 000d2 85 c0 test eax, eax - 000d4 75 07 jne SHORT $LN8@stbi__deco - 000d6 33 c0 xor eax, eax - 000d8 e9 a6 00 00 00 jmp $LN1@stbi__deco + 000ce e8 00 00 00 00 call stbi__process_marker + 000d3 85 c0 test eax, eax + 000d5 75 07 jne SHORT $LN8@stbi__deco + 000d7 33 c0 xor eax, eax + 000d9 e9 a6 00 00 00 jmp $LN1@stbi__deco $LN8@stbi__deco: ; 2857 : m = stbi__get_marker(z); - 000dd 48 8b 8d 00 01 + 000de 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 000e4 e8 00 00 00 00 call stbi__get_marker - 000e9 0f b6 c0 movzx eax, al - 000ec 89 45 04 mov DWORD PTR m$[rbp], eax + 000e5 e8 00 00 00 00 call stbi__get_marker + 000ea 0f b6 c0 movzx eax, al + 000ed 89 45 04 mov DWORD PTR m$[rbp], eax $LN4@stbi__deco: ; 2858 : while (m == STBI__MARKER_none) { - 000ef 81 7d 04 ff 00 + 000f0 81 7d 04 ff 00 00 00 cmp DWORD PTR m$[rbp], 255 ; 000000ffH - 000f6 75 35 jne SHORT $LN5@stbi__deco + 000f7 75 35 jne SHORT $LN5@stbi__deco ; 2859 : // some files have extra padding after their blocks, so ok, we'll scan ; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); - 000f8 48 8b 85 00 01 + 000f9 48 8b 85 00 01 00 00 mov rax, QWORD PTR z$[rbp] - 000ff 48 8b 08 mov rcx, QWORD PTR [rax] - 00102 e8 00 00 00 00 call stbi__at_eof - 00107 85 c0 test eax, eax - 00109 74 0e je SHORT $LN9@stbi__deco - 0010b 48 8d 0d 00 00 + 00100 48 8b 08 mov rcx, QWORD PTR [rax] + 00103 e8 00 00 00 00 call stbi__at_eof + 00108 85 c0 test eax, eax + 0010a 74 0e je SHORT $LN9@stbi__deco + 0010c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_06IFCEAHIA@no?5SOF@ - 00112 e8 00 00 00 00 call stbi__err - 00117 eb 6a jmp SHORT $LN1@stbi__deco + 00113 e8 00 00 00 00 call stbi__err + 00118 eb 6a jmp SHORT $LN1@stbi__deco $LN9@stbi__deco: ; 2861 : m = stbi__get_marker(z); - 00119 48 8b 8d 00 01 + 0011a 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00120 e8 00 00 00 00 call stbi__get_marker - 00125 0f b6 c0 movzx eax, al - 00128 89 45 04 mov DWORD PTR m$[rbp], eax + 00121 e8 00 00 00 00 call stbi__get_marker + 00126 0f b6 c0 movzx eax, al + 00129 89 45 04 mov DWORD PTR m$[rbp], eax ; 2862 : } - 0012b eb c2 jmp SHORT $LN4@stbi__deco + 0012c eb c2 jmp SHORT $LN4@stbi__deco $LN5@stbi__deco: ; 2863 : } - 0012d e9 72 ff ff ff jmp $LN2@stbi__deco + 0012e e9 72 ff ff ff jmp $LN2@stbi__deco $LN3@stbi__deco: ; 2864 : z->progressive = stbi__SOF_progressive(m); - 00132 81 7d 04 c2 00 + 00133 81 7d 04 c2 00 00 00 cmp DWORD PTR m$[rbp], 194 ; 000000c2H - 00139 75 0c jne SHORT $LN12@stbi__deco - 0013b c7 85 d4 00 00 + 0013a 75 0c jne SHORT $LN12@stbi__deco + 0013c c7 85 d4 00 00 00 01 00 00 00 mov DWORD PTR tv131[rbp], 1 - 00145 eb 0a jmp SHORT $LN13@stbi__deco + 00146 eb 0a jmp SHORT $LN13@stbi__deco $LN12@stbi__deco: - 00147 c7 85 d4 00 00 + 00148 c7 85 d4 00 00 00 00 00 00 00 mov DWORD PTR tv131[rbp], 0 $LN13@stbi__deco: - 00151 48 8b 85 00 01 + 00152 48 8b 85 00 01 00 00 mov rax, QWORD PTR z$[rbp] - 00158 8b 8d d4 00 00 + 00159 8b 8d d4 00 00 00 mov ecx, DWORD PTR tv131[rbp] - 0015e 89 88 30 48 00 + 0015f 89 88 30 48 00 00 mov DWORD PTR [rax+18480], ecx ; 2865 : if (!stbi__process_frame_header(z, scan)) return 0; - 00164 8b 95 08 01 00 + 00165 8b 95 08 01 00 00 mov edx, DWORD PTR scan$[rbp] - 0016a 48 8b 8d 00 01 + 0016b 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00171 e8 00 00 00 00 call stbi__process_frame_header - 00176 85 c0 test eax, eax - 00178 75 04 jne SHORT $LN10@stbi__deco - 0017a 33 c0 xor eax, eax - 0017c eb 05 jmp SHORT $LN1@stbi__deco + 00172 e8 00 00 00 00 call stbi__process_frame_header + 00177 85 c0 test eax, eax + 00179 75 04 jne SHORT $LN10@stbi__deco + 0017b 33 c0 xor eax, eax + 0017d eb 05 jmp SHORT $LN1@stbi__deco $LN10@stbi__deco: ; 2866 : return 1; - 0017e b8 01 00 00 00 mov eax, 1 + 0017f b8 01 00 00 00 mov eax, 1 $LN1@stbi__deco: ; 2867 : } - 00183 48 8d a5 e8 00 + 00184 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 0018a 5f pop rdi - 0018b 5d pop rbp - 0018c c3 ret 0 + 0018b 5f pop rdi + 0018c 5d pop rbp + 0018d c3 ret 0 stbi__decode_jpeg_header ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -27833,8 +27997,8 @@ q$ = 132 h_max$ = 164 v_max$ = 196 c$ = 228 -tv294 = 440 tv285 = 440 +tv294 = 440 z$ = 480 scan$ = 488 stbi__process_frame_header PROC ; COMDAT @@ -27851,446 +28015,447 @@ stbi__process_frame_header PROC ; COMDAT 00017 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001e e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00023 90 npad 1 ; 2746 : stbi__context* s = z->s; - 00023 48 8b 85 e0 01 + 00024 48 8b 85 e0 01 00 00 mov rax, QWORD PTR z$[rbp] - 0002a 48 8b 00 mov rax, QWORD PTR [rax] - 0002d 48 89 45 08 mov QWORD PTR s$[rbp], rax + 0002b 48 8b 00 mov rax, QWORD PTR [rax] + 0002e 48 89 45 08 mov QWORD PTR s$[rbp], rax ; 2747 : int Lf, p, i, q, h_max = 1, v_max = 1, c; - 00031 c7 85 a4 00 00 + 00032 c7 85 a4 00 00 00 01 00 00 00 mov DWORD PTR h_max$[rbp], 1 - 0003b c7 85 c4 00 00 + 0003c c7 85 c4 00 00 00 01 00 00 00 mov DWORD PTR v_max$[rbp], 1 ; 2748 : Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG - 00045 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 00049 e8 00 00 00 00 call stbi__get16be - 0004e 89 45 24 mov DWORD PTR Lf$[rbp], eax - 00051 83 7d 24 0b cmp DWORD PTR Lf$[rbp], 11 - 00055 7d 11 jge SHORT $LN17@stbi__proc - 00057 48 8d 0d 00 00 + 00046 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 0004a e8 00 00 00 00 call stbi__get16be + 0004f 89 45 24 mov DWORD PTR Lf$[rbp], eax + 00052 83 7d 24 0b cmp DWORD PTR Lf$[rbp], 11 + 00056 7d 11 jge SHORT $LN17@stbi__proc + 00058 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@DOFMJEMP@bad?5SOF?5len@ - 0005e e8 00 00 00 00 call stbi__err - 00063 e9 11 09 00 00 jmp $LN1@stbi__proc + 0005f e8 00 00 00 00 call stbi__err + 00064 e9 11 09 00 00 jmp $LN1@stbi__proc $LN17@stbi__proc: ; 2749 : p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline - 00068 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 0006c e8 00 00 00 00 call stbi__get8 - 00071 0f b6 c0 movzx eax, al - 00074 89 45 44 mov DWORD PTR p$[rbp], eax - 00077 83 7d 44 08 cmp DWORD PTR p$[rbp], 8 - 0007b 74 11 je SHORT $LN18@stbi__proc - 0007d 48 8d 0d 00 00 + 00069 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 0006d e8 00 00 00 00 call stbi__get8 + 00072 0f b6 c0 movzx eax, al + 00075 89 45 44 mov DWORD PTR p$[rbp], eax + 00078 83 7d 44 08 cmp DWORD PTR p$[rbp], 8 + 0007c 74 11 je SHORT $LN18@stbi__proc + 0007e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0L@BCINMEBJ@only?58?9bit@ - 00084 e8 00 00 00 00 call stbi__err - 00089 e9 eb 08 00 00 jmp $LN1@stbi__proc + 00085 e8 00 00 00 00 call stbi__err + 0008a e9 eb 08 00 00 jmp $LN1@stbi__proc $LN18@stbi__proc: ; 2750 : s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG - 0008e 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 00092 e8 00 00 00 00 call stbi__get16be - 00097 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 0009b 89 41 04 mov DWORD PTR [rcx+4], eax - 0009e 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 000a2 83 78 04 00 cmp DWORD PTR [rax+4], 0 - 000a6 75 11 jne SHORT $LN19@stbi__proc - 000a8 48 8d 0d 00 00 + 0008f 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 00093 e8 00 00 00 00 call stbi__get16be + 00098 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 0009c 89 41 04 mov DWORD PTR [rcx+4], eax + 0009f 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 000a3 83 78 04 00 cmp DWORD PTR [rax+4], 0 + 000a7 75 11 jne SHORT $LN19@stbi__proc + 000a9 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@LNEGOMA@no?5header?5height@ - 000af e8 00 00 00 00 call stbi__err - 000b4 e9 c0 08 00 00 jmp $LN1@stbi__proc + 000b0 e8 00 00 00 00 call stbi__err + 000b5 e9 c0 08 00 00 jmp $LN1@stbi__proc $LN19@stbi__proc: ; 2751 : s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires - 000b9 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 000bd e8 00 00 00 00 call stbi__get16be - 000c2 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 000c6 89 01 mov DWORD PTR [rcx], eax - 000c8 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 000cc 83 38 00 cmp DWORD PTR [rax], 0 - 000cf 75 11 jne SHORT $LN20@stbi__proc - 000d1 48 8d 0d 00 00 + 000ba 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 000be e8 00 00 00 00 call stbi__get16be + 000c3 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 000c7 89 01 mov DWORD PTR [rcx], eax + 000c9 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 000cd 83 38 00 cmp DWORD PTR [rax], 0 + 000d0 75 11 jne SHORT $LN20@stbi__proc + 000d2 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07BIDACDEF@0?5width@ - 000d8 e8 00 00 00 00 call stbi__err - 000dd e9 97 08 00 00 jmp $LN1@stbi__proc + 000d9 e8 00 00 00 00 call stbi__err + 000de e9 97 08 00 00 jmp $LN1@stbi__proc $LN20@stbi__proc: ; 2752 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); - 000e2 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 000e6 81 78 04 00 00 + 000e3 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 000e7 81 78 04 00 00 00 01 cmp DWORD PTR [rax+4], 16777216 ; 01000000H - 000ed 76 11 jbe SHORT $LN21@stbi__proc - 000ef 48 8d 0d 00 00 + 000ee 76 11 jbe SHORT $LN21@stbi__proc + 000f0 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 000f6 e8 00 00 00 00 call stbi__err - 000fb e9 79 08 00 00 jmp $LN1@stbi__proc + 000f7 e8 00 00 00 00 call stbi__err + 000fc e9 79 08 00 00 jmp $LN1@stbi__proc $LN21@stbi__proc: ; 2753 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); - 00100 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 00104 81 38 00 00 00 + 00101 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 00105 81 38 00 00 00 01 cmp DWORD PTR [rax], 16777216 ; 01000000H - 0010a 76 11 jbe SHORT $LN22@stbi__proc - 0010c 48 8d 0d 00 00 + 0010b 76 11 jbe SHORT $LN22@stbi__proc + 0010d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 00113 e8 00 00 00 00 call stbi__err - 00118 e9 5c 08 00 00 jmp $LN1@stbi__proc + 00114 e8 00 00 00 00 call stbi__err + 00119 e9 5c 08 00 00 jmp $LN1@stbi__proc $LN22@stbi__proc: ; 2754 : c = stbi__get8(s); - 0011d 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 00121 e8 00 00 00 00 call stbi__get8 - 00126 0f b6 c0 movzx eax, al - 00129 89 85 e4 00 00 + 0011e 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 00122 e8 00 00 00 00 call stbi__get8 + 00127 0f b6 c0 movzx eax, al + 0012a 89 85 e4 00 00 00 mov DWORD PTR c$[rbp], eax ; 2755 : if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG"); - 0012f 83 bd e4 00 00 + 00130 83 bd e4 00 00 00 03 cmp DWORD PTR c$[rbp], 3 - 00136 74 23 je SHORT $LN23@stbi__proc - 00138 83 bd e4 00 00 + 00137 74 23 je SHORT $LN23@stbi__proc + 00139 83 bd e4 00 00 00 01 cmp DWORD PTR c$[rbp], 1 - 0013f 74 1a je SHORT $LN23@stbi__proc - 00141 83 bd e4 00 00 + 00140 74 1a je SHORT $LN23@stbi__proc + 00142 83 bd e4 00 00 00 04 cmp DWORD PTR c$[rbp], 4 - 00148 74 11 je SHORT $LN23@stbi__proc - 0014a 48 8d 0d 00 00 + 00149 74 11 je SHORT $LN23@stbi__proc + 0014b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BE@DAPHADHL@bad?5component?5count@ - 00151 e8 00 00 00 00 call stbi__err - 00156 e9 1e 08 00 00 jmp $LN1@stbi__proc + 00152 e8 00 00 00 00 call stbi__err + 00157 e9 1e 08 00 00 jmp $LN1@stbi__proc $LN23@stbi__proc: ; 2756 : s->img_n = c; - 0015b 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 0015f 8b 8d e4 00 00 + 0015c 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 00160 8b 8d e4 00 00 00 mov ecx, DWORD PTR c$[rbp] - 00165 89 48 08 mov DWORD PTR [rax+8], ecx + 00166 89 48 08 mov DWORD PTR [rax+8], ecx ; 2757 : for (i = 0; i < c; ++i) { - 00168 c7 45 64 00 00 + 00169 c7 45 64 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0016f eb 08 jmp SHORT $LN4@stbi__proc + 00170 eb 08 jmp SHORT $LN4@stbi__proc $LN2@stbi__proc: - 00171 8b 45 64 mov eax, DWORD PTR i$[rbp] - 00174 ff c0 inc eax - 00176 89 45 64 mov DWORD PTR i$[rbp], eax + 00172 8b 45 64 mov eax, DWORD PTR i$[rbp] + 00175 ff c0 inc eax + 00177 89 45 64 mov DWORD PTR i$[rbp], eax $LN4@stbi__proc: - 00179 8b 85 e4 00 00 + 0017a 8b 85 e4 00 00 00 mov eax, DWORD PTR c$[rbp] - 0017f 39 45 64 cmp DWORD PTR i$[rbp], eax - 00182 7d 38 jge SHORT $LN3@stbi__proc + 00180 39 45 64 cmp DWORD PTR i$[rbp], eax + 00183 7d 38 jge SHORT $LN3@stbi__proc ; 2758 : z->img_comp[i].data = NULL; - 00184 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 00188 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0018c 48 8b 8d e0 01 + 00185 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 00189 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0018d 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00193 48 c7 84 01 d0 + 00194 48 c7 84 01 d0 46 00 00 00 00 00 00 mov QWORD PTR [rcx+rax+18128], 0 ; 2759 : z->img_comp[i].linebuf = NULL; - 0019f 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 001a3 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 001a7 48 8b 8d e0 01 + 001a0 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 001a4 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 001a8 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 001ae 48 c7 84 01 e8 + 001af 48 c7 84 01 e8 46 00 00 00 00 00 00 mov QWORD PTR [rcx+rax+18152], 0 ; 2760 : } - 001ba eb b5 jmp SHORT $LN2@stbi__proc + 001bb eb b5 jmp SHORT $LN2@stbi__proc $LN3@stbi__proc: ; 2761 : ; 2762 : if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG"); - 001bc 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 001c0 6b 40 08 03 imul eax, DWORD PTR [rax+8], 3 - 001c4 83 c0 08 add eax, 8 - 001c7 39 45 24 cmp DWORD PTR Lf$[rbp], eax - 001ca 74 11 je SHORT $LN24@stbi__proc - 001cc 48 8d 0d 00 00 + 001bd 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 001c1 6b 40 08 03 imul eax, DWORD PTR [rax+8], 3 + 001c5 83 c0 08 add eax, 8 + 001c8 39 45 24 cmp DWORD PTR Lf$[rbp], eax + 001cb 74 11 je SHORT $LN24@stbi__proc + 001cd 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@DOFMJEMP@bad?5SOF?5len@ - 001d3 e8 00 00 00 00 call stbi__err - 001d8 e9 9c 07 00 00 jmp $LN1@stbi__proc + 001d4 e8 00 00 00 00 call stbi__err + 001d9 e9 9c 07 00 00 jmp $LN1@stbi__proc $LN24@stbi__proc: ; 2763 : ; 2764 : z->rgb = 0; - 001dd 48 8b 85 e0 01 + 001de 48 8b 85 e0 01 00 00 mov rax, QWORD PTR z$[rbp] - 001e4 c7 80 50 48 00 + 001e5 c7 80 50 48 00 00 00 00 00 00 mov DWORD PTR [rax+18512], 0 ; 2765 : for (i = 0; i < s->img_n; ++i) { - 001ee c7 45 64 00 00 + 001ef c7 45 64 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 001f5 eb 08 jmp SHORT $LN7@stbi__proc + 001f6 eb 08 jmp SHORT $LN7@stbi__proc $LN5@stbi__proc: - 001f7 8b 45 64 mov eax, DWORD PTR i$[rbp] - 001fa ff c0 inc eax - 001fc 89 45 64 mov DWORD PTR i$[rbp], eax + 001f8 8b 45 64 mov eax, DWORD PTR i$[rbp] + 001fb ff c0 inc eax + 001fd 89 45 64 mov DWORD PTR i$[rbp], eax $LN7@stbi__proc: - 001ff 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 00203 8b 40 08 mov eax, DWORD PTR [rax+8] - 00206 39 45 64 cmp DWORD PTR i$[rbp], eax - 00209 0f 8d 96 01 00 + 00200 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 00204 8b 40 08 mov eax, DWORD PTR [rax+8] + 00207 39 45 64 cmp DWORD PTR i$[rbp], eax + 0020a 0f 8d 96 01 00 00 jge $LN6@stbi__proc ; 2766 : static const unsigned char rgb[3] = { 'R', 'G', 'B' }; ; 2767 : z->img_comp[i].id = stbi__get8(s); - 0020f 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 00213 e8 00 00 00 00 call stbi__get8 - 00218 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 0021c 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00220 0f b6 c0 movzx eax, al - 00223 48 8b 95 e0 01 + 00210 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 00214 e8 00 00 00 00 call stbi__get8 + 00219 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 0021d 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00221 0f b6 c0 movzx eax, al + 00224 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 0022a 89 84 0a a0 46 + 0022b 89 84 0a a0 46 00 00 mov DWORD PTR [rdx+rcx+18080], eax ; 2768 : if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) - 00231 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 00235 83 78 08 03 cmp DWORD PTR [rax+8], 3 - 00239 75 43 jne SHORT $LN25@stbi__proc - 0023b 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 0023f 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00243 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 00247 48 8d 15 00 00 + 00232 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 00236 83 78 08 03 cmp DWORD PTR [rax+8], 3 + 0023a 75 43 jne SHORT $LN25@stbi__proc + 0023c 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 00240 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00244 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 00248 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:?rgb@?5??stbi__process_frame_header@@9@9 - 0024e 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00252 48 8b 95 e0 01 + 0024f 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00253 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 00259 39 8c 02 a0 46 + 0025a 39 8c 02 a0 46 00 00 cmp DWORD PTR [rdx+rax+18080], ecx - 00260 75 1c jne SHORT $LN25@stbi__proc + 00261 75 1c jne SHORT $LN25@stbi__proc ; 2769 : ++z->rgb; - 00262 48 8b 85 e0 01 + 00263 48 8b 85 e0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00269 8b 80 50 48 00 + 0026a 8b 80 50 48 00 00 mov eax, DWORD PTR [rax+18512] - 0026f ff c0 inc eax - 00271 48 8b 8d e0 01 + 00270 ff c0 inc eax + 00272 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00278 89 81 50 48 00 + 00279 89 81 50 48 00 00 mov DWORD PTR [rcx+18512], eax $LN25@stbi__proc: ; 2770 : q = stbi__get8(s); - 0027e 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 00282 e8 00 00 00 00 call stbi__get8 - 00287 0f b6 c0 movzx eax, al - 0028a 89 85 84 00 00 + 0027f 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 00283 e8 00 00 00 00 call stbi__get8 + 00288 0f b6 c0 movzx eax, al + 0028b 89 85 84 00 00 00 mov DWORD PTR q$[rbp], eax ; 2771 : z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H", "Corrupt JPEG"); - 00290 8b 85 84 00 00 + 00291 8b 85 84 00 00 00 mov eax, DWORD PTR q$[rbp] - 00296 c1 f8 04 sar eax, 4 - 00299 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 0029d 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 002a1 48 8b 95 e0 01 + 00297 c1 f8 04 sar eax, 4 + 0029a 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 0029e 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 002a2 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 002a8 89 84 0a a4 46 + 002a9 89 84 0a a4 46 00 00 mov DWORD PTR [rdx+rcx+18084], eax - 002af 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 002b3 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 002b7 48 8b 8d e0 01 + 002b0 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 002b4 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 002b8 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 002be 83 bc 01 a4 46 + 002bf 83 bc 01 a4 46 00 00 00 cmp DWORD PTR [rcx+rax+18084], 0 - 002c6 74 19 je SHORT $LN27@stbi__proc - 002c8 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 002cc 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 002d0 48 8b 8d e0 01 + 002c7 74 19 je SHORT $LN27@stbi__proc + 002c9 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 002cd 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 002d1 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 002d7 83 bc 01 a4 46 + 002d8 83 bc 01 a4 46 00 00 04 cmp DWORD PTR [rcx+rax+18084], 4 - 002df 7e 11 jle SHORT $LN26@stbi__proc + 002e0 7e 11 jle SHORT $LN26@stbi__proc $LN27@stbi__proc: - 002e1 48 8d 0d 00 00 + 002e2 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_05BLPKENEJ@bad?5H@ - 002e8 e8 00 00 00 00 call stbi__err - 002ed e9 87 06 00 00 jmp $LN1@stbi__proc + 002e9 e8 00 00 00 00 call stbi__err + 002ee e9 87 06 00 00 jmp $LN1@stbi__proc $LN26@stbi__proc: ; 2772 : z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V", "Corrupt JPEG"); - 002f2 8b 85 84 00 00 + 002f3 8b 85 84 00 00 00 mov eax, DWORD PTR q$[rbp] - 002f8 83 e0 0f and eax, 15 - 002fb 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 002ff 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00303 48 8b 95 e0 01 + 002f9 83 e0 0f and eax, 15 + 002fc 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 00300 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00304 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 0030a 89 84 0a a8 46 + 0030b 89 84 0a a8 46 00 00 mov DWORD PTR [rdx+rcx+18088], eax - 00311 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 00315 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00319 48 8b 8d e0 01 + 00312 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 00316 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0031a 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00320 83 bc 01 a8 46 + 00321 83 bc 01 a8 46 00 00 00 cmp DWORD PTR [rcx+rax+18088], 0 - 00328 74 19 je SHORT $LN29@stbi__proc - 0032a 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 0032e 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00332 48 8b 8d e0 01 + 00329 74 19 je SHORT $LN29@stbi__proc + 0032b 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 0032f 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00333 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00339 83 bc 01 a8 46 + 0033a 83 bc 01 a8 46 00 00 04 cmp DWORD PTR [rcx+rax+18088], 4 - 00341 7e 11 jle SHORT $LN28@stbi__proc + 00342 7e 11 jle SHORT $LN28@stbi__proc $LN29@stbi__proc: - 00343 48 8d 0d 00 00 + 00344 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_05MPLLHCJG@bad?5V@ - 0034a e8 00 00 00 00 call stbi__err - 0034f e9 25 06 00 00 jmp $LN1@stbi__proc + 0034b e8 00 00 00 00 call stbi__err + 00350 e9 25 06 00 00 jmp $LN1@stbi__proc $LN28@stbi__proc: ; 2773 : z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ", "Corrupt JPEG"); - 00354 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 00358 e8 00 00 00 00 call stbi__get8 - 0035d 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 00361 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00365 0f b6 c0 movzx eax, al - 00368 48 8b 95 e0 01 + 00355 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 00359 e8 00 00 00 00 call stbi__get8 + 0035e 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 00362 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00366 0f b6 c0 movzx eax, al + 00369 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 0036f 89 84 0a ac 46 + 00370 89 84 0a ac 46 00 00 mov DWORD PTR [rdx+rcx+18092], eax - 00376 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 0037a 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0037e 48 8b 8d e0 01 + 00377 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 0037b 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0037f 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00385 83 bc 01 ac 46 + 00386 83 bc 01 ac 46 00 00 03 cmp DWORD PTR [rcx+rax+18092], 3 - 0038d 7e 11 jle SHORT $LN30@stbi__proc - 0038f 48 8d 0d 00 00 + 0038e 7e 11 jle SHORT $LN30@stbi__proc + 00390 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_06LJIHDFHI@bad?5TQ@ - 00396 e8 00 00 00 00 call stbi__err - 0039b e9 d9 05 00 00 jmp $LN1@stbi__proc + 00397 e8 00 00 00 00 call stbi__err + 0039c e9 d9 05 00 00 jmp $LN1@stbi__proc $LN30@stbi__proc: ; 2774 : } - 003a0 e9 52 fe ff ff jmp $LN5@stbi__proc + 003a1 e9 52 fe ff ff jmp $LN5@stbi__proc $LN6@stbi__proc: ; 2775 : ; 2776 : if (scan != STBI__SCAN_load) return 1; - 003a5 83 bd e8 01 00 + 003a6 83 bd e8 01 00 00 00 cmp DWORD PTR scan$[rbp], 0 - 003ac 74 0a je SHORT $LN31@stbi__proc - 003ae b8 01 00 00 00 mov eax, 1 - 003b3 e9 c1 05 00 00 jmp $LN1@stbi__proc + 003ad 74 0a je SHORT $LN31@stbi__proc + 003af b8 01 00 00 00 mov eax, 1 + 003b4 e9 c1 05 00 00 jmp $LN1@stbi__proc $LN31@stbi__proc: ; 2777 : ; 2778 : if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); - 003b8 45 33 c9 xor r9d, r9d - 003bb 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 003bf 44 8b 40 08 mov r8d, DWORD PTR [rax+8] - 003c3 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 003c7 8b 50 04 mov edx, DWORD PTR [rax+4] - 003ca 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 003ce 8b 08 mov ecx, DWORD PTR [rax] - 003d0 e8 00 00 00 00 call stbi__mad3sizes_valid - 003d5 85 c0 test eax, eax - 003d7 75 11 jne SHORT $LN32@stbi__proc - 003d9 48 8d 0d 00 00 + 003b9 45 33 c9 xor r9d, r9d + 003bc 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 003c0 44 8b 40 08 mov r8d, DWORD PTR [rax+8] + 003c4 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 003c8 8b 50 04 mov edx, DWORD PTR [rax+4] + 003cb 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 003cf 8b 08 mov ecx, DWORD PTR [rax] + 003d1 e8 00 00 00 00 call stbi__mad3sizes_valid + 003d6 85 c0 test eax, eax + 003d8 75 11 jne SHORT $LN32@stbi__proc + 003da 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 003e0 e8 00 00 00 00 call stbi__err - 003e5 e9 8f 05 00 00 jmp $LN1@stbi__proc + 003e1 e8 00 00 00 00 call stbi__err + 003e6 e9 8f 05 00 00 jmp $LN1@stbi__proc $LN32@stbi__proc: ; 2779 : ; 2780 : for (i = 0; i < s->img_n; ++i) { - 003ea c7 45 64 00 00 + 003eb c7 45 64 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 003f1 eb 08 jmp SHORT $LN10@stbi__proc + 003f2 eb 08 jmp SHORT $LN10@stbi__proc $LN8@stbi__proc: - 003f3 8b 45 64 mov eax, DWORD PTR i$[rbp] - 003f6 ff c0 inc eax - 003f8 89 45 64 mov DWORD PTR i$[rbp], eax + 003f4 8b 45 64 mov eax, DWORD PTR i$[rbp] + 003f7 ff c0 inc eax + 003f9 89 45 64 mov DWORD PTR i$[rbp], eax $LN10@stbi__proc: - 003fb 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 003ff 8b 40 08 mov eax, DWORD PTR [rax+8] - 00402 39 45 64 cmp DWORD PTR i$[rbp], eax - 00405 7d 79 jge SHORT $LN9@stbi__proc + 003fc 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 00400 8b 40 08 mov eax, DWORD PTR [rax+8] + 00403 39 45 64 cmp DWORD PTR i$[rbp], eax + 00406 7d 79 jge SHORT $LN9@stbi__proc ; 2781 : if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; - 00407 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 0040b 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0040f 48 8b 8d e0 01 + 00408 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 0040c 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00410 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00416 8b 95 a4 00 00 + 00417 8b 95 a4 00 00 00 mov edx, DWORD PTR h_max$[rbp] - 0041c 39 94 01 a4 46 + 0041d 39 94 01 a4 46 00 00 cmp DWORD PTR [rcx+rax+18084], edx - 00423 7e 1c jle SHORT $LN33@stbi__proc - 00425 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 00429 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0042d 48 8b 8d e0 01 + 00424 7e 1c jle SHORT $LN33@stbi__proc + 00426 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 0042a 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0042e 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00434 8b 84 01 a4 46 + 00435 8b 84 01 a4 46 00 00 mov eax, DWORD PTR [rcx+rax+18084] - 0043b 89 85 a4 00 00 + 0043c 89 85 a4 00 00 00 mov DWORD PTR h_max$[rbp], eax $LN33@stbi__proc: ; 2782 : if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; - 00441 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 00445 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00449 48 8b 8d e0 01 + 00442 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 00446 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0044a 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00450 8b 95 c4 00 00 + 00451 8b 95 c4 00 00 00 mov edx, DWORD PTR v_max$[rbp] - 00456 39 94 01 a8 46 + 00457 39 94 01 a8 46 00 00 cmp DWORD PTR [rcx+rax+18088], edx - 0045d 7e 1c jle SHORT $LN34@stbi__proc - 0045f 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 00463 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00467 48 8b 8d e0 01 + 0045e 7e 1c jle SHORT $LN34@stbi__proc + 00460 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 00464 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00468 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0046e 8b 84 01 a8 46 + 0046f 8b 84 01 a8 46 00 00 mov eax, DWORD PTR [rcx+rax+18088] - 00475 89 85 c4 00 00 + 00476 89 85 c4 00 00 00 mov DWORD PTR v_max$[rbp], eax $LN34@stbi__proc: ; 2783 : } - 0047b e9 73 ff ff ff jmp $LN8@stbi__proc + 0047c e9 73 ff ff ff jmp $LN8@stbi__proc $LN9@stbi__proc: ; 2784 : @@ -28298,216 +28463,216 @@ $LN9@stbi__proc: ; 2786 : // and I've never seen a non-corrupted JPEG file actually use them ; 2787 : for (i = 0; i < s->img_n; ++i) { - 00480 c7 45 64 00 00 + 00481 c7 45 64 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00487 eb 08 jmp SHORT $LN13@stbi__proc + 00488 eb 08 jmp SHORT $LN13@stbi__proc $LN11@stbi__proc: - 00489 8b 45 64 mov eax, DWORD PTR i$[rbp] - 0048c ff c0 inc eax - 0048e 89 45 64 mov DWORD PTR i$[rbp], eax + 0048a 8b 45 64 mov eax, DWORD PTR i$[rbp] + 0048d ff c0 inc eax + 0048f 89 45 64 mov DWORD PTR i$[rbp], eax $LN13@stbi__proc: - 00491 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 00495 8b 40 08 mov eax, DWORD PTR [rax+8] - 00498 39 45 64 cmp DWORD PTR i$[rbp], eax - 0049b 0f 8d 8b 00 00 + 00492 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 00496 8b 40 08 mov eax, DWORD PTR [rax+8] + 00499 39 45 64 cmp DWORD PTR i$[rbp], eax + 0049c 0f 8d 8b 00 00 00 jge $LN12@stbi__proc ; 2788 : if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG"); - 004a1 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 004a5 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 004a9 48 89 85 b8 01 + 004a2 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 004a6 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 004aa 48 89 85 b8 01 00 00 mov QWORD PTR tv285[rbp], rax - 004b0 8b 85 a4 00 00 + 004b1 8b 85 a4 00 00 00 mov eax, DWORD PTR h_max$[rbp] - 004b6 99 cdq - 004b7 48 8b 8d e0 01 + 004b7 99 cdq + 004b8 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 004be 4c 8b 85 b8 01 + 004bf 4c 8b 85 b8 01 00 00 mov r8, QWORD PTR tv285[rbp] - 004c5 42 f7 bc 01 a4 + 004c6 42 f7 bc 01 a4 46 00 00 idiv DWORD PTR [rcx+r8+18084] - 004cd 8b c2 mov eax, edx - 004cf 85 c0 test eax, eax - 004d1 74 11 je SHORT $LN35@stbi__proc - 004d3 48 8d 0d 00 00 + 004ce 8b c2 mov eax, edx + 004d0 85 c0 test eax, eax + 004d2 74 11 je SHORT $LN35@stbi__proc + 004d4 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_05BLPKENEJ@bad?5H@ - 004da e8 00 00 00 00 call stbi__err - 004df e9 95 04 00 00 jmp $LN1@stbi__proc + 004db e8 00 00 00 00 call stbi__err + 004e0 e9 95 04 00 00 jmp $LN1@stbi__proc $LN35@stbi__proc: ; 2789 : if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG"); - 004e4 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 004e8 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 004ec 48 89 85 b8 01 + 004e5 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 004e9 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 004ed 48 89 85 b8 01 00 00 mov QWORD PTR tv294[rbp], rax - 004f3 8b 85 c4 00 00 + 004f4 8b 85 c4 00 00 00 mov eax, DWORD PTR v_max$[rbp] - 004f9 99 cdq - 004fa 48 8b 8d e0 01 + 004fa 99 cdq + 004fb 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00501 4c 8b 85 b8 01 + 00502 4c 8b 85 b8 01 00 00 mov r8, QWORD PTR tv294[rbp] - 00508 42 f7 bc 01 a8 + 00509 42 f7 bc 01 a8 46 00 00 idiv DWORD PTR [rcx+r8+18088] - 00510 8b c2 mov eax, edx - 00512 85 c0 test eax, eax - 00514 74 11 je SHORT $LN36@stbi__proc - 00516 48 8d 0d 00 00 + 00511 8b c2 mov eax, edx + 00513 85 c0 test eax, eax + 00515 74 11 je SHORT $LN36@stbi__proc + 00517 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_05MPLLHCJG@bad?5V@ - 0051d e8 00 00 00 00 call stbi__err - 00522 e9 52 04 00 00 jmp $LN1@stbi__proc + 0051e e8 00 00 00 00 call stbi__err + 00523 e9 52 04 00 00 jmp $LN1@stbi__proc $LN36@stbi__proc: ; 2790 : } - 00527 e9 5d ff ff ff jmp $LN11@stbi__proc + 00528 e9 5d ff ff ff jmp $LN11@stbi__proc $LN12@stbi__proc: ; 2791 : ; 2792 : // compute interleaved mcu info ; 2793 : z->img_h_max = h_max; - 0052c 48 8b 85 e0 01 + 0052d 48 8b 85 e0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00533 8b 8d a4 00 00 + 00534 8b 8d a4 00 00 00 mov ecx, DWORD PTR h_max$[rbp] - 00539 89 88 88 46 00 + 0053a 89 88 88 46 00 00 mov DWORD PTR [rax+18056], ecx ; 2794 : z->img_v_max = v_max; - 0053f 48 8b 85 e0 01 + 00540 48 8b 85 e0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00546 8b 8d c4 00 00 + 00547 8b 8d c4 00 00 00 mov ecx, DWORD PTR v_max$[rbp] - 0054c 89 88 8c 46 00 + 0054d 89 88 8c 46 00 00 mov DWORD PTR [rax+18060], ecx ; 2795 : z->img_mcu_w = h_max * 8; - 00552 8b 85 a4 00 00 + 00553 8b 85 a4 00 00 00 mov eax, DWORD PTR h_max$[rbp] - 00558 c1 e0 03 shl eax, 3 - 0055b 48 8b 8d e0 01 + 00559 c1 e0 03 shl eax, 3 + 0055c 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00562 89 81 98 46 00 + 00563 89 81 98 46 00 00 mov DWORD PTR [rcx+18072], eax ; 2796 : z->img_mcu_h = v_max * 8; - 00568 8b 85 c4 00 00 + 00569 8b 85 c4 00 00 00 mov eax, DWORD PTR v_max$[rbp] - 0056e c1 e0 03 shl eax, 3 - 00571 48 8b 8d e0 01 + 0056f c1 e0 03 shl eax, 3 + 00572 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00578 89 81 9c 46 00 + 00579 89 81 9c 46 00 00 mov DWORD PTR [rcx+18076], eax ; 2797 : // these sizes can't be more than 17 bits ; 2798 : z->img_mcu_x = (s->img_x + z->img_mcu_w - 1) / z->img_mcu_w; - 0057e 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 00582 8b 00 mov eax, DWORD PTR [rax] - 00584 48 8b 8d e0 01 + 0057f 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 00583 8b 00 mov eax, DWORD PTR [rax] + 00585 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0058b 8b 89 98 46 00 + 0058c 8b 89 98 46 00 00 mov ecx, DWORD PTR [rcx+18072] - 00591 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] - 00595 33 d2 xor edx, edx - 00597 48 8b 8d e0 01 + 00592 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] + 00596 33 d2 xor edx, edx + 00598 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0059e f7 b1 98 46 00 + 0059f f7 b1 98 46 00 00 div DWORD PTR [rcx+18072] - 005a4 48 8b 8d e0 01 + 005a5 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 005ab 89 81 90 46 00 + 005ac 89 81 90 46 00 00 mov DWORD PTR [rcx+18064], eax ; 2799 : z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h; - 005b1 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 005b5 8b 40 04 mov eax, DWORD PTR [rax+4] - 005b8 48 8b 8d e0 01 + 005b2 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 005b6 8b 40 04 mov eax, DWORD PTR [rax+4] + 005b9 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 005bf 8b 89 9c 46 00 + 005c0 8b 89 9c 46 00 00 mov ecx, DWORD PTR [rcx+18076] - 005c5 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] - 005c9 33 d2 xor edx, edx - 005cb 48 8b 8d e0 01 + 005c6 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] + 005ca 33 d2 xor edx, edx + 005cc 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 005d2 f7 b1 9c 46 00 + 005d3 f7 b1 9c 46 00 00 div DWORD PTR [rcx+18076] - 005d8 48 8b 8d e0 01 + 005d9 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 005df 89 81 94 46 00 + 005e0 89 81 94 46 00 00 mov DWORD PTR [rcx+18068], eax ; 2800 : ; 2801 : for (i = 0; i < s->img_n; ++i) { - 005e5 c7 45 64 00 00 + 005e6 c7 45 64 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 005ec eb 08 jmp SHORT $LN16@stbi__proc + 005ed eb 08 jmp SHORT $LN16@stbi__proc $LN14@stbi__proc: - 005ee 8b 45 64 mov eax, DWORD PTR i$[rbp] - 005f1 ff c0 inc eax - 005f3 89 45 64 mov DWORD PTR i$[rbp], eax + 005ef 8b 45 64 mov eax, DWORD PTR i$[rbp] + 005f2 ff c0 inc eax + 005f4 89 45 64 mov DWORD PTR i$[rbp], eax $LN16@stbi__proc: - 005f6 48 8b 45 08 mov rax, QWORD PTR s$[rbp] - 005fa 8b 40 08 mov eax, DWORD PTR [rax+8] - 005fd 39 45 64 cmp DWORD PTR i$[rbp], eax - 00600 0f 8d 6e 03 00 + 005f7 48 8b 45 08 mov rax, QWORD PTR s$[rbp] + 005fb 8b 40 08 mov eax, DWORD PTR [rax+8] + 005fe 39 45 64 cmp DWORD PTR i$[rbp], eax + 00601 0f 8d 6e 03 00 00 jge $LN15@stbi__proc ; 2802 : // number of effective pixels (e.g. for non-interleaved MCU) ; 2803 : z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max - 1) / h_max; - 00606 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 0060a 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0060e 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 00612 48 8b 95 e0 01 + 00607 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 0060b 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0060f 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 00613 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 00619 8b 09 mov ecx, DWORD PTR [rcx] - 0061b 0f af 8c 02 a4 + 0061a 8b 09 mov ecx, DWORD PTR [rcx] + 0061c 0f af 8c 02 a4 46 00 00 imul ecx, DWORD PTR [rdx+rax+18084] - 00623 8b c1 mov eax, ecx - 00625 8b 8d a4 00 00 + 00624 8b c1 mov eax, ecx + 00626 8b 8d a4 00 00 00 mov ecx, DWORD PTR h_max$[rbp] - 0062b 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] - 0062f 33 d2 xor edx, edx - 00631 f7 b5 a4 00 00 + 0062c 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] + 00630 33 d2 xor edx, edx + 00632 f7 b5 a4 00 00 00 div DWORD PTR h_max$[rbp] - 00637 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 0063b 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 0063f 48 8b 95 e0 01 + 00638 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 0063c 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00640 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 00646 89 84 0a bc 46 + 00647 89 84 0a bc 46 00 00 mov DWORD PTR [rdx+rcx+18108], eax ; 2804 : z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max - 1) / v_max; - 0064d 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 00651 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00655 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] - 00659 48 8b 95 e0 01 + 0064e 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 00652 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00656 48 8b 4d 08 mov rcx, QWORD PTR s$[rbp] + 0065a 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 00660 8b 49 04 mov ecx, DWORD PTR [rcx+4] - 00663 0f af 8c 02 a8 + 00661 8b 49 04 mov ecx, DWORD PTR [rcx+4] + 00664 0f af 8c 02 a8 46 00 00 imul ecx, DWORD PTR [rdx+rax+18088] - 0066b 8b c1 mov eax, ecx - 0066d 8b 8d c4 00 00 + 0066c 8b c1 mov eax, ecx + 0066e 8b 8d c4 00 00 00 mov ecx, DWORD PTR v_max$[rbp] - 00673 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] - 00677 33 d2 xor edx, edx - 00679 f7 b5 c4 00 00 + 00674 8d 44 08 ff lea eax, DWORD PTR [rax+rcx-1] + 00678 33 d2 xor edx, edx + 0067a f7 b5 c4 00 00 00 div DWORD PTR v_max$[rbp] - 0067f 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 00683 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00687 48 8b 95 e0 01 + 00680 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 00684 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00688 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 0068e 89 84 0a c0 46 + 0068f 89 84 0a c0 46 00 00 mov DWORD PTR [rdx+rcx+18112], eax ; 2805 : // to simplify generation, we'll allocate enough memory to decode @@ -28519,279 +28684,279 @@ $LN16@stbi__proc: ; 2811 : // so these muls can't overflow with 32-bit ints (which we require) ; 2812 : z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; - 00695 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 00699 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0069d 48 8b 8d e0 01 + 00696 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 0069a 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0069e 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 006a4 48 8b 95 e0 01 + 006a5 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 006ab 8b 89 90 46 00 + 006ac 8b 89 90 46 00 00 mov ecx, DWORD PTR [rcx+18064] - 006b1 0f af 8c 02 a4 + 006b2 0f af 8c 02 a4 46 00 00 imul ecx, DWORD PTR [rdx+rax+18084] - 006b9 8b c1 mov eax, ecx - 006bb c1 e0 03 shl eax, 3 - 006be 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 006c2 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 006c6 48 8b 95 e0 01 + 006ba 8b c1 mov eax, ecx + 006bc c1 e0 03 shl eax, 3 + 006bf 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 006c3 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 006c7 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 006cd 89 84 0a c4 46 + 006ce 89 84 0a c4 46 00 00 mov DWORD PTR [rdx+rcx+18116], eax ; 2813 : z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; - 006d4 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 006d8 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 006dc 48 8b 8d e0 01 + 006d5 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 006d9 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 006dd 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 006e3 48 8b 95 e0 01 + 006e4 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 006ea 8b 89 94 46 00 + 006eb 8b 89 94 46 00 00 mov ecx, DWORD PTR [rcx+18068] - 006f0 0f af 8c 02 a8 + 006f1 0f af 8c 02 a8 46 00 00 imul ecx, DWORD PTR [rdx+rax+18088] - 006f8 8b c1 mov eax, ecx - 006fa c1 e0 03 shl eax, 3 - 006fd 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 00701 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00705 48 8b 95 e0 01 + 006f9 8b c1 mov eax, ecx + 006fb c1 e0 03 shl eax, 3 + 006fe 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 00702 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00706 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 0070c 89 84 0a c8 46 + 0070d 89 84 0a c8 46 00 00 mov DWORD PTR [rdx+rcx+18120], eax ; 2814 : z->img_comp[i].coeff = 0; - 00713 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 00717 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0071b 48 8b 8d e0 01 + 00714 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 00718 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0071c 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00722 48 c7 84 01 f0 + 00723 48 c7 84 01 f0 46 00 00 00 00 00 00 mov QWORD PTR [rcx+rax+18160], 0 ; 2815 : z->img_comp[i].raw_coeff = 0; - 0072e 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 00732 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00736 48 8b 8d e0 01 + 0072f 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 00733 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00737 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0073d 48 c7 84 01 e0 + 0073e 48 c7 84 01 e0 46 00 00 00 00 00 00 mov QWORD PTR [rcx+rax+18144], 0 ; 2816 : z->img_comp[i].linebuf = NULL; - 00749 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 0074d 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00751 48 8b 8d e0 01 + 0074a 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 0074e 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00752 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00758 48 c7 84 01 e8 + 00759 48 c7 84 01 e8 46 00 00 00 00 00 00 mov QWORD PTR [rcx+rax+18152], 0 ; 2817 : z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); - 00764 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 00768 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0076c 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 00770 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00774 41 b8 0f 00 00 + 00765 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 00769 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0076d 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 00771 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00775 41 b8 0f 00 00 00 mov r8d, 15 - 0077a 48 8b 95 e0 01 + 0077b 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 00781 8b 94 02 c8 46 + 00782 8b 94 02 c8 46 00 00 mov edx, DWORD PTR [rdx+rax+18120] - 00788 48 8b 85 e0 01 + 00789 48 8b 85 e0 01 00 00 mov rax, QWORD PTR z$[rbp] - 0078f 8b 8c 08 c4 46 + 00790 8b 8c 08 c4 46 00 00 mov ecx, DWORD PTR [rax+rcx+18116] - 00796 e8 00 00 00 00 call stbi__malloc_mad2 - 0079b 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 0079f 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 007a3 48 8b 95 e0 01 + 00797 e8 00 00 00 00 call stbi__malloc_mad2 + 0079c 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 007a0 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 007a4 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 007aa 48 89 84 0a d8 + 007ab 48 89 84 0a d8 46 00 00 mov QWORD PTR [rdx+rcx+18136], rax ; 2818 : if (z->img_comp[i].raw_data == NULL) - 007b2 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 007b6 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 007ba 48 8b 8d e0 01 + 007b3 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 007b7 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 007bb 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 007c1 48 83 bc 01 d8 + 007c2 48 83 bc 01 d8 46 00 00 00 cmp QWORD PTR [rcx+rax+18136], 0 - 007ca 75 27 jne SHORT $LN37@stbi__proc + 007cb 75 27 jne SHORT $LN37@stbi__proc ; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); - 007cc 48 8d 0d 00 00 + 007cd 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 007d3 e8 00 00 00 00 call stbi__err - 007d8 8b 4d 64 mov ecx, DWORD PTR i$[rbp] - 007db ff c1 inc ecx - 007dd 44 8b c0 mov r8d, eax - 007e0 8b d1 mov edx, ecx - 007e2 48 8b 8d e0 01 + 007d4 e8 00 00 00 00 call stbi__err + 007d9 8b 4d 64 mov ecx, DWORD PTR i$[rbp] + 007dc ff c1 inc ecx + 007de 44 8b c0 mov r8d, eax + 007e1 8b d1 mov edx, ecx + 007e3 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 007e9 e8 00 00 00 00 call stbi__free_jpeg_components - 007ee e9 86 01 00 00 jmp $LN1@stbi__proc + 007ea e8 00 00 00 00 call stbi__free_jpeg_components + 007ef e9 86 01 00 00 jmp $LN1@stbi__proc $LN37@stbi__proc: ; 2820 : // align blocks for idct using mmx/sse ; 2821 : z->img_comp[i].data = (stbi_uc*)(((size_t)z->img_comp[i].raw_data + 15) & ~15); - 007f3 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 007f7 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 007fb 48 8b 8d e0 01 + 007f4 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 007f8 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 007fc 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00802 48 8b 84 01 d8 + 00803 48 8b 84 01 d8 46 00 00 mov rax, QWORD PTR [rcx+rax+18136] - 0080a 48 83 c0 0f add rax, 15 - 0080e 48 83 e0 f0 and rax, -16 - 00812 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 00816 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 0081a 48 8b 95 e0 01 + 0080b 48 83 c0 0f add rax, 15 + 0080f 48 83 e0 f0 and rax, -16 + 00813 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 00817 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 0081b 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 00821 48 89 84 0a d0 + 00822 48 89 84 0a d0 46 00 00 mov QWORD PTR [rdx+rcx+18128], rax ; 2822 : if (z->progressive) { - 00829 48 8b 85 e0 01 + 0082a 48 8b 85 e0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00830 83 b8 30 48 00 + 00831 83 b8 30 48 00 00 00 cmp DWORD PTR [rax+18480], 0 - 00837 0f 84 32 01 00 + 00838 0f 84 32 01 00 00 je $LN38@stbi__proc ; 2823 : // w2, h2 are multiples of 8 (see above) ; 2824 : z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; - 0083d 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 00841 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00845 48 8b 8d e0 01 + 0083e 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 00842 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00846 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0084c 8b 84 01 c4 46 + 0084d 8b 84 01 c4 46 00 00 mov eax, DWORD PTR [rcx+rax+18116] - 00853 99 cdq - 00854 83 e2 07 and edx, 7 - 00857 03 c2 add eax, edx - 00859 c1 f8 03 sar eax, 3 - 0085c 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 00860 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00864 48 8b 95 e0 01 + 00854 99 cdq + 00855 83 e2 07 and edx, 7 + 00858 03 c2 add eax, edx + 0085a c1 f8 03 sar eax, 3 + 0085d 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 00861 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00865 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 0086b 89 84 0a f8 46 + 0086c 89 84 0a f8 46 00 00 mov DWORD PTR [rdx+rcx+18168], eax ; 2825 : z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; - 00872 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 00876 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0087a 48 8b 8d e0 01 + 00873 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 00877 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0087b 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00881 8b 84 01 c8 46 + 00882 8b 84 01 c8 46 00 00 mov eax, DWORD PTR [rcx+rax+18120] - 00888 99 cdq - 00889 83 e2 07 and edx, 7 - 0088c 03 c2 add eax, edx - 0088e c1 f8 03 sar eax, 3 - 00891 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 00895 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00899 48 8b 95 e0 01 + 00889 99 cdq + 0088a 83 e2 07 and edx, 7 + 0088d 03 c2 add eax, edx + 0088f c1 f8 03 sar eax, 3 + 00892 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 00896 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 0089a 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 008a0 89 84 0a fc 46 + 008a1 89 84 0a fc 46 00 00 mov DWORD PTR [rdx+rcx+18172], eax ; 2826 : z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); - 008a7 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 008ab 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 008af 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 008b3 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 008b7 41 b9 0f 00 00 + 008a8 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 008ac 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 008b0 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 008b4 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 008b8 41 b9 0f 00 00 00 mov r9d, 15 - 008bd 41 b8 02 00 00 + 008be 41 b8 02 00 00 00 mov r8d, 2 - 008c3 48 8b 95 e0 01 + 008c4 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 008ca 8b 94 02 c8 46 + 008cb 8b 94 02 c8 46 00 00 mov edx, DWORD PTR [rdx+rax+18120] - 008d1 48 8b 85 e0 01 + 008d2 48 8b 85 e0 01 00 00 mov rax, QWORD PTR z$[rbp] - 008d8 8b 8c 08 c4 46 + 008d9 8b 8c 08 c4 46 00 00 mov ecx, DWORD PTR [rax+rcx+18116] - 008df e8 00 00 00 00 call stbi__malloc_mad3 - 008e4 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 008e8 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 008ec 48 8b 95 e0 01 + 008e0 e8 00 00 00 00 call stbi__malloc_mad3 + 008e5 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 008e9 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 008ed 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 008f3 48 89 84 0a e0 + 008f4 48 89 84 0a e0 46 00 00 mov QWORD PTR [rdx+rcx+18144], rax ; 2827 : if (z->img_comp[i].raw_coeff == NULL) - 008fb 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 008ff 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00903 48 8b 8d e0 01 + 008fc 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 00900 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00904 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0090a 48 83 bc 01 e0 + 0090b 48 83 bc 01 e0 46 00 00 00 cmp QWORD PTR [rcx+rax+18144], 0 - 00913 75 24 jne SHORT $LN39@stbi__proc + 00914 75 24 jne SHORT $LN39@stbi__proc ; 2828 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); - 00915 48 8d 0d 00 00 + 00916 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 0091c e8 00 00 00 00 call stbi__err - 00921 8b 4d 64 mov ecx, DWORD PTR i$[rbp] - 00924 ff c1 inc ecx - 00926 44 8b c0 mov r8d, eax - 00929 8b d1 mov edx, ecx - 0092b 48 8b 8d e0 01 + 0091d e8 00 00 00 00 call stbi__err + 00922 8b 4d 64 mov ecx, DWORD PTR i$[rbp] + 00925 ff c1 inc ecx + 00927 44 8b c0 mov r8d, eax + 0092a 8b d1 mov edx, ecx + 0092c 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00932 e8 00 00 00 00 call stbi__free_jpeg_components - 00937 eb 40 jmp SHORT $LN1@stbi__proc + 00933 e8 00 00 00 00 call stbi__free_jpeg_components + 00938 eb 40 jmp SHORT $LN1@stbi__proc $LN39@stbi__proc: ; 2829 : z->img_comp[i].coeff = (short*)(((size_t)z->img_comp[i].raw_coeff + 15) & ~15); - 00939 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] - 0093d 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00941 48 8b 8d e0 01 + 0093a 48 63 45 64 movsxd rax, DWORD PTR i$[rbp] + 0093e 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00942 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00948 48 8b 84 01 e0 + 00949 48 8b 84 01 e0 46 00 00 mov rax, QWORD PTR [rcx+rax+18144] - 00950 48 83 c0 0f add rax, 15 - 00954 48 83 e0 f0 and rax, -16 - 00958 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] - 0095c 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00960 48 8b 95 e0 01 + 00951 48 83 c0 0f add rax, 15 + 00955 48 83 e0 f0 and rax, -16 + 00959 48 63 4d 64 movsxd rcx, DWORD PTR i$[rbp] + 0095d 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00961 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 00967 48 89 84 0a f0 + 00968 48 89 84 0a f0 46 00 00 mov QWORD PTR [rdx+rcx+18160], rax $LN38@stbi__proc: ; 2830 : } ; 2831 : } - 0096f e9 7a fc ff ff jmp $LN14@stbi__proc + 00970 e9 7a fc ff ff jmp $LN14@stbi__proc $LN15@stbi__proc: ; 2832 : ; 2833 : return 1; - 00974 b8 01 00 00 00 mov eax, 1 + 00975 b8 01 00 00 00 mov eax, 1 $LN1@stbi__proc: ; 2834 : } - 00979 48 8d a5 c8 01 + 0097a 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 00980 5f pop rdi - 00981 5d pop rbp - 00982 c3 ret 0 + 00981 5f pop rdi + 00982 5d pop rbp + 00983 c3 ret 0 stbi__process_frame_header ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -28817,62 +28982,64 @@ stbi__free_jpeg_components PROC ; COMDAT 0001c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00023 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00028 90 npad 1 ; 2724 : int i; ; 2725 : for (i = 0; i < ncomp; ++i) { - 00028 c7 45 04 00 00 + 00029 c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0002f eb 08 jmp SHORT $LN4@stbi__free + 00030 eb 08 jmp SHORT $LN4@stbi__free $LN2@stbi__free: - 00031 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00034 ff c0 inc eax - 00036 89 45 04 mov DWORD PTR i$[rbp], eax + 00032 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00035 ff c0 inc eax + 00037 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__free: - 00039 8b 85 08 01 00 + 0003a 8b 85 08 01 00 00 mov eax, DWORD PTR ncomp$[rbp] - 0003f 39 45 04 cmp DWORD PTR i$[rbp], eax - 00042 0f 8d 31 01 00 + 00040 39 45 04 cmp DWORD PTR i$[rbp], eax + 00043 0f 8d 34 01 00 00 jge $LN3@stbi__free ; 2726 : if (z->img_comp[i].raw_data) { - 00048 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 0004c 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00050 48 8b 8d 00 01 + 00049 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 0004d 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00051 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00057 48 83 bc 01 d8 + 00058 48 83 bc 01 d8 46 00 00 00 cmp QWORD PTR [rcx+rax+18136], 0 - 00060 74 53 je SHORT $LN5@stbi__free + 00061 74 54 je SHORT $LN5@stbi__free ; 2727 : STBI_FREE(z->img_comp[i].raw_data); - 00062 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00066 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0006a 48 8b 8d 00 01 + 00063 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00067 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0006b 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00071 48 8b 8c 01 d8 + 00072 48 8b 8c 01 d8 46 00 00 mov rcx, QWORD PTR [rcx+rax+18136] - 00079 ff 15 00 00 00 + 0007a ff 15 00 00 00 00 call QWORD PTR __imp_free + 00080 90 npad 1 ; 2728 : z->img_comp[i].raw_data = NULL; - 0007f 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00083 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00087 48 8b 8d 00 01 + 00081 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00085 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00089 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0008e 48 c7 84 01 d8 + 00090 48 c7 84 01 d8 46 00 00 00 00 00 00 mov QWORD PTR [rcx+rax+18136], 0 ; 2729 : z->img_comp[i].data = NULL; - 0009a 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 0009e 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 000a2 48 8b 8d 00 01 + 0009c 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 000a0 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 000a4 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 000a9 48 c7 84 01 d0 + 000ab 48 c7 84 01 d0 46 00 00 00 00 00 00 mov QWORD PTR [rcx+rax+18128], 0 $LN5@stbi__free: @@ -28880,42 +29047,43 @@ $LN5@stbi__free: ; 2730 : } ; 2731 : if (z->img_comp[i].raw_coeff) { - 000b5 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 000b9 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 000bd 48 8b 8d 00 01 + 000b7 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 000bb 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 000bf 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 000c4 48 83 bc 01 e0 + 000c6 48 83 bc 01 e0 46 00 00 00 cmp QWORD PTR [rcx+rax+18144], 0 - 000cd 74 53 je SHORT $LN6@stbi__free + 000cf 74 54 je SHORT $LN6@stbi__free ; 2732 : STBI_FREE(z->img_comp[i].raw_coeff); - 000cf 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 000d3 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 000d7 48 8b 8d 00 01 + 000d1 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 000d5 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 000d9 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 000de 48 8b 8c 01 e0 + 000e0 48 8b 8c 01 e0 46 00 00 mov rcx, QWORD PTR [rcx+rax+18144] - 000e6 ff 15 00 00 00 + 000e8 ff 15 00 00 00 00 call QWORD PTR __imp_free + 000ee 90 npad 1 ; 2733 : z->img_comp[i].raw_coeff = 0; - 000ec 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 000f0 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 000f4 48 8b 8d 00 01 + 000ef 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 000f3 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 000f7 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 000fb 48 c7 84 01 e0 + 000fe 48 c7 84 01 e0 46 00 00 00 00 00 00 mov QWORD PTR [rcx+rax+18144], 0 ; 2734 : z->img_comp[i].coeff = 0; - 00107 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 0010b 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0010f 48 8b 8d 00 01 + 0010a 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 0010e 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00112 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00116 48 c7 84 01 f0 + 00119 48 c7 84 01 f0 46 00 00 00 00 00 00 mov QWORD PTR [rcx+rax+18160], 0 $LN6@stbi__free: @@ -28923,32 +29091,33 @@ $LN6@stbi__free: ; 2735 : } ; 2736 : if (z->img_comp[i].linebuf) { - 00122 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00126 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0012a 48 8b 8d 00 01 + 00125 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00129 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0012d 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00131 48 83 bc 01 e8 + 00134 48 83 bc 01 e8 46 00 00 00 cmp QWORD PTR [rcx+rax+18152], 0 - 0013a 74 38 je SHORT $LN7@stbi__free + 0013d 74 39 je SHORT $LN7@stbi__free ; 2737 : STBI_FREE(z->img_comp[i].linebuf); - 0013c 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00140 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00144 48 8b 8d 00 01 + 0013f 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00143 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00147 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0014b 48 8b 8c 01 e8 + 0014e 48 8b 8c 01 e8 46 00 00 mov rcx, QWORD PTR [rcx+rax+18152] - 00153 ff 15 00 00 00 + 00156 ff 15 00 00 00 00 call QWORD PTR __imp_free + 0015c 90 npad 1 ; 2738 : z->img_comp[i].linebuf = NULL; - 00159 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 0015d 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00161 48 8b 8d 00 01 + 0015d 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00161 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00165 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00168 48 c7 84 01 e8 + 0016c 48 c7 84 01 e8 46 00 00 00 00 00 00 mov QWORD PTR [rcx+rax+18152], 0 $LN7@stbi__free: @@ -28956,21 +29125,21 @@ $LN7@stbi__free: ; 2739 : } ; 2740 : } - 00174 e9 b8 fe ff ff jmp $LN2@stbi__free + 00178 e9 b5 fe ff ff jmp $LN2@stbi__free $LN3@stbi__free: ; 2741 : return why; - 00179 8b 85 10 01 00 + 0017d 8b 85 10 01 00 00 mov eax, DWORD PTR why$[rbp] ; 2742 : } - 0017f 48 8d a5 e8 00 + 00183 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00186 5f pop rdi - 00187 5d pop rbp - 00188 c3 ret 0 + 0018a 5f pop rdi + 0018b 5d pop rbp + 0018c c3 ret 0 stbi__free_jpeg_components ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -28997,215 +29166,216 @@ stbi__process_scan_header PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 2684 : int i; ; 2685 : int Ls = stbi__get16be(z->s); - 0001f 48 8b 85 a0 01 + 00020 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00026 48 8b 08 mov rcx, QWORD PTR [rax] - 00029 e8 00 00 00 00 call stbi__get16be - 0002e 89 45 24 mov DWORD PTR Ls$[rbp], eax + 00027 48 8b 08 mov rcx, QWORD PTR [rax] + 0002a e8 00 00 00 00 call stbi__get16be + 0002f 89 45 24 mov DWORD PTR Ls$[rbp], eax ; 2686 : z->scan_n = stbi__get8(z->s); - 00031 48 8b 85 a0 01 + 00032 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00038 48 8b 08 mov rcx, QWORD PTR [rax] - 0003b e8 00 00 00 00 call stbi__get8 - 00040 0f b6 c0 movzx eax, al - 00043 48 8b 8d a0 01 + 00039 48 8b 08 mov rcx, QWORD PTR [rax] + 0003c e8 00 00 00 00 call stbi__get8 + 00041 0f b6 c0 movzx eax, al + 00044 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0004a 89 81 54 48 00 + 0004b 89 81 54 48 00 00 mov DWORD PTR [rcx+18516], eax ; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); - 00050 48 8b 85 a0 01 + 00051 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00057 83 b8 54 48 00 + 00058 83 b8 54 48 00 00 01 cmp DWORD PTR [rax+18516], 1 - 0005e 7c 2c jl SHORT $LN9@stbi__proc - 00060 48 8b 85 a0 01 + 0005f 7c 2c jl SHORT $LN9@stbi__proc + 00061 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00067 83 b8 54 48 00 + 00068 83 b8 54 48 00 00 04 cmp DWORD PTR [rax+18516], 4 - 0006e 7f 1c jg SHORT $LN9@stbi__proc - 00070 48 8b 85 a0 01 + 0006f 7f 1c jg SHORT $LN9@stbi__proc + 00071 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00077 48 8b 00 mov rax, QWORD PTR [rax] - 0007a 48 8b 8d a0 01 + 00078 48 8b 00 mov rax, QWORD PTR [rax] + 0007b 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00081 8b 40 08 mov eax, DWORD PTR [rax+8] - 00084 39 81 54 48 00 + 00082 8b 40 08 mov eax, DWORD PTR [rax+8] + 00085 39 81 54 48 00 00 cmp DWORD PTR [rcx+18516], eax - 0008a 7e 11 jle SHORT $LN8@stbi__proc + 0008b 7e 11 jle SHORT $LN8@stbi__proc $LN9@stbi__proc: - 0008c 48 8d 0d 00 00 + 0008d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BI@DHFJCMBA@bad?5SOS?5component?5count@ - 00093 e8 00 00 00 00 call stbi__err - 00098 e9 e2 02 00 00 jmp $LN1@stbi__proc + 00094 e8 00 00 00 00 call stbi__err + 00099 e9 e2 02 00 00 jmp $LN1@stbi__proc $LN8@stbi__proc: ; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); - 0009d 48 8b 85 a0 01 + 0009e 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 000a4 8b 80 54 48 00 + 000a5 8b 80 54 48 00 00 mov eax, DWORD PTR [rax+18516] - 000aa 8d 44 00 06 lea eax, DWORD PTR [rax+rax+6] - 000ae 39 45 24 cmp DWORD PTR Ls$[rbp], eax - 000b1 74 11 je SHORT $LN10@stbi__proc - 000b3 48 8d 0d 00 00 + 000ab 8d 44 00 06 lea eax, DWORD PTR [rax+rax+6] + 000af 39 45 24 cmp DWORD PTR Ls$[rbp], eax + 000b2 74 11 je SHORT $LN10@stbi__proc + 000b4 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@GNEHAHOH@bad?5SOS?5len@ - 000ba e8 00 00 00 00 call stbi__err - 000bf e9 bb 02 00 00 jmp $LN1@stbi__proc + 000bb e8 00 00 00 00 call stbi__err + 000c0 e9 bb 02 00 00 jmp $LN1@stbi__proc $LN10@stbi__proc: ; 2689 : for (i = 0; i < z->scan_n; ++i) { - 000c4 c7 45 04 00 00 + 000c5 c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 000cb eb 08 jmp SHORT $LN4@stbi__proc + 000cc eb 08 jmp SHORT $LN4@stbi__proc $LN2@stbi__proc: - 000cd 8b 45 04 mov eax, DWORD PTR i$[rbp] - 000d0 ff c0 inc eax - 000d2 89 45 04 mov DWORD PTR i$[rbp], eax + 000ce 8b 45 04 mov eax, DWORD PTR i$[rbp] + 000d1 ff c0 inc eax + 000d3 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__proc: - 000d5 48 8b 85 a0 01 + 000d6 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 000dc 8b 80 54 48 00 + 000dd 8b 80 54 48 00 00 mov eax, DWORD PTR [rax+18516] - 000e2 39 45 04 cmp DWORD PTR i$[rbp], eax - 000e5 0f 8d 34 01 00 + 000e3 39 45 04 cmp DWORD PTR i$[rbp], eax + 000e6 0f 8d 34 01 00 00 jge $LN3@stbi__proc ; 2690 : int id = stbi__get8(z->s), which; - 000eb 48 8b 85 a0 01 + 000ec 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 000f2 48 8b 08 mov rcx, QWORD PTR [rax] - 000f5 e8 00 00 00 00 call stbi__get8 - 000fa 0f b6 c0 movzx eax, al - 000fd 89 45 44 mov DWORD PTR id$1[rbp], eax + 000f3 48 8b 08 mov rcx, QWORD PTR [rax] + 000f6 e8 00 00 00 00 call stbi__get8 + 000fb 0f b6 c0 movzx eax, al + 000fe 89 45 44 mov DWORD PTR id$1[rbp], eax ; 2691 : int q = stbi__get8(z->s); - 00100 48 8b 85 a0 01 + 00101 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00107 48 8b 08 mov rcx, QWORD PTR [rax] - 0010a e8 00 00 00 00 call stbi__get8 - 0010f 0f b6 c0 movzx eax, al - 00112 89 85 84 00 00 + 00108 48 8b 08 mov rcx, QWORD PTR [rax] + 0010b e8 00 00 00 00 call stbi__get8 + 00110 0f b6 c0 movzx eax, al + 00113 89 85 84 00 00 00 mov DWORD PTR q$3[rbp], eax ; 2692 : for (which = 0; which < z->s->img_n; ++which) - 00118 c7 45 64 00 00 + 00119 c7 45 64 00 00 00 00 mov DWORD PTR which$2[rbp], 0 - 0011f eb 08 jmp SHORT $LN7@stbi__proc + 00120 eb 08 jmp SHORT $LN7@stbi__proc $LN5@stbi__proc: - 00121 8b 45 64 mov eax, DWORD PTR which$2[rbp] - 00124 ff c0 inc eax - 00126 89 45 64 mov DWORD PTR which$2[rbp], eax + 00122 8b 45 64 mov eax, DWORD PTR which$2[rbp] + 00125 ff c0 inc eax + 00127 89 45 64 mov DWORD PTR which$2[rbp], eax $LN7@stbi__proc: - 00129 48 8b 85 a0 01 + 0012a 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00130 48 8b 00 mov rax, QWORD PTR [rax] - 00133 8b 40 08 mov eax, DWORD PTR [rax+8] - 00136 39 45 64 cmp DWORD PTR which$2[rbp], eax - 00139 7d 1f jge SHORT $LN6@stbi__proc + 00131 48 8b 00 mov rax, QWORD PTR [rax] + 00134 8b 40 08 mov eax, DWORD PTR [rax+8] + 00137 39 45 64 cmp DWORD PTR which$2[rbp], eax + 0013a 7d 1f jge SHORT $LN6@stbi__proc ; 2693 : if (z->img_comp[which].id == id) - 0013b 48 63 45 64 movsxd rax, DWORD PTR which$2[rbp] - 0013f 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00143 48 8b 8d a0 01 + 0013c 48 63 45 64 movsxd rax, DWORD PTR which$2[rbp] + 00140 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00144 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0014a 8b 55 44 mov edx, DWORD PTR id$1[rbp] - 0014d 39 94 01 a0 46 + 0014b 8b 55 44 mov edx, DWORD PTR id$1[rbp] + 0014e 39 94 01 a0 46 00 00 cmp DWORD PTR [rcx+rax+18080], edx - 00154 75 02 jne SHORT $LN11@stbi__proc + 00155 75 02 jne SHORT $LN11@stbi__proc ; 2694 : break; - 00156 eb 02 jmp SHORT $LN6@stbi__proc + 00157 eb 02 jmp SHORT $LN6@stbi__proc $LN11@stbi__proc: - 00158 eb c7 jmp SHORT $LN5@stbi__proc + 00159 eb c7 jmp SHORT $LN5@stbi__proc $LN6@stbi__proc: ; 2695 : if (which == z->s->img_n) return 0; // no match - 0015a 48 8b 85 a0 01 + 0015b 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00161 48 8b 00 mov rax, QWORD PTR [rax] - 00164 8b 40 08 mov eax, DWORD PTR [rax+8] - 00167 39 45 64 cmp DWORD PTR which$2[rbp], eax - 0016a 75 07 jne SHORT $LN12@stbi__proc - 0016c 33 c0 xor eax, eax - 0016e e9 0c 02 00 00 jmp $LN1@stbi__proc + 00162 48 8b 00 mov rax, QWORD PTR [rax] + 00165 8b 40 08 mov eax, DWORD PTR [rax+8] + 00168 39 45 64 cmp DWORD PTR which$2[rbp], eax + 0016b 75 07 jne SHORT $LN12@stbi__proc + 0016d 33 c0 xor eax, eax + 0016f e9 0c 02 00 00 jmp $LN1@stbi__proc $LN12@stbi__proc: ; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); - 00173 8b 85 84 00 00 + 00174 8b 85 84 00 00 00 mov eax, DWORD PTR q$3[rbp] - 00179 c1 f8 04 sar eax, 4 - 0017c 48 63 4d 64 movsxd rcx, DWORD PTR which$2[rbp] - 00180 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00184 48 8b 95 a0 01 + 0017a c1 f8 04 sar eax, 4 + 0017d 48 63 4d 64 movsxd rcx, DWORD PTR which$2[rbp] + 00181 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00185 48 8b 95 a0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 0018b 89 84 0a b0 46 + 0018c 89 84 0a b0 46 00 00 mov DWORD PTR [rdx+rcx+18096], eax - 00192 48 63 45 64 movsxd rax, DWORD PTR which$2[rbp] - 00196 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0019a 48 8b 8d a0 01 + 00193 48 63 45 64 movsxd rax, DWORD PTR which$2[rbp] + 00197 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0019b 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 001a1 83 bc 01 b0 46 + 001a2 83 bc 01 b0 46 00 00 03 cmp DWORD PTR [rcx+rax+18096], 3 - 001a9 7e 11 jle SHORT $LN13@stbi__proc - 001ab 48 8d 0d 00 00 + 001aa 7e 11 jle SHORT $LN13@stbi__proc + 001ac 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@NOCCBFAC@bad?5DC?5huff@ - 001b2 e8 00 00 00 00 call stbi__err - 001b7 e9 c3 01 00 00 jmp $LN1@stbi__proc + 001b3 e8 00 00 00 00 call stbi__err + 001b8 e9 c3 01 00 00 jmp $LN1@stbi__proc $LN13@stbi__proc: ; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); - 001bc 8b 85 84 00 00 + 001bd 8b 85 84 00 00 00 mov eax, DWORD PTR q$3[rbp] - 001c2 83 e0 0f and eax, 15 - 001c5 48 63 4d 64 movsxd rcx, DWORD PTR which$2[rbp] - 001c9 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 001cd 48 8b 95 a0 01 + 001c3 83 e0 0f and eax, 15 + 001c6 48 63 4d 64 movsxd rcx, DWORD PTR which$2[rbp] + 001ca 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 001ce 48 8b 95 a0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 001d4 89 84 0a b4 46 + 001d5 89 84 0a b4 46 00 00 mov DWORD PTR [rdx+rcx+18100], eax - 001db 48 63 45 64 movsxd rax, DWORD PTR which$2[rbp] - 001df 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 001e3 48 8b 8d a0 01 + 001dc 48 63 45 64 movsxd rax, DWORD PTR which$2[rbp] + 001e0 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 001e4 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 001ea 83 bc 01 b4 46 + 001eb 83 bc 01 b4 46 00 00 03 cmp DWORD PTR [rcx+rax+18100], 3 - 001f2 7e 11 jle SHORT $LN14@stbi__proc - 001f4 48 8d 0d 00 00 + 001f3 7e 11 jle SHORT $LN14@stbi__proc + 001f5 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@JGMCBLGG@bad?5AC?5huff@ - 001fb e8 00 00 00 00 call stbi__err - 00200 e9 7a 01 00 00 jmp $LN1@stbi__proc + 001fc e8 00 00 00 00 call stbi__err + 00201 e9 7a 01 00 00 jmp $LN1@stbi__proc $LN14@stbi__proc: ; 2698 : z->order[i] = which; - 00205 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00209 48 8b 8d a0 01 + 00206 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 0020a 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00210 8b 55 64 mov edx, DWORD PTR which$2[rbp] - 00213 89 94 81 58 48 + 00211 8b 55 64 mov edx, DWORD PTR which$2[rbp] + 00214 89 94 81 58 48 00 00 mov DWORD PTR [rcx+rax*4+18520], edx ; 2699 : } - 0021a e9 ae fe ff ff jmp $LN2@stbi__proc + 0021b e9 ae fe ff ff jmp $LN2@stbi__proc $LN3@stbi__proc: ; 2700 : @@ -29213,150 +29383,150 @@ $LN3@stbi__proc: ; 2702 : int aa; ; 2703 : z->spec_start = stbi__get8(z->s); - 0021f 48 8b 85 a0 01 + 00220 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00226 48 8b 08 mov rcx, QWORD PTR [rax] - 00229 e8 00 00 00 00 call stbi__get8 - 0022e 0f b6 c0 movzx eax, al - 00231 48 8b 8d a0 01 + 00227 48 8b 08 mov rcx, QWORD PTR [rax] + 0022a e8 00 00 00 00 call stbi__get8 + 0022f 0f b6 c0 movzx eax, al + 00232 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00238 89 81 34 48 00 + 00239 89 81 34 48 00 00 mov DWORD PTR [rcx+18484], eax ; 2704 : z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 - 0023e 48 8b 85 a0 01 + 0023f 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00245 48 8b 08 mov rcx, QWORD PTR [rax] - 00248 e8 00 00 00 00 call stbi__get8 - 0024d 0f b6 c0 movzx eax, al - 00250 48 8b 8d a0 01 + 00246 48 8b 08 mov rcx, QWORD PTR [rax] + 00249 e8 00 00 00 00 call stbi__get8 + 0024e 0f b6 c0 movzx eax, al + 00251 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00257 89 81 38 48 00 + 00258 89 81 38 48 00 00 mov DWORD PTR [rcx+18488], eax ; 2705 : aa = stbi__get8(z->s); - 0025d 48 8b 85 a0 01 + 0025e 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00264 48 8b 08 mov rcx, QWORD PTR [rax] - 00267 e8 00 00 00 00 call stbi__get8 - 0026c 0f b6 c0 movzx eax, al - 0026f 89 85 a4 00 00 + 00265 48 8b 08 mov rcx, QWORD PTR [rax] + 00268 e8 00 00 00 00 call stbi__get8 + 0026d 0f b6 c0 movzx eax, al + 00270 89 85 a4 00 00 00 mov DWORD PTR aa$4[rbp], eax ; 2706 : z->succ_high = (aa >> 4); - 00275 8b 85 a4 00 00 + 00276 8b 85 a4 00 00 00 mov eax, DWORD PTR aa$4[rbp] - 0027b c1 f8 04 sar eax, 4 - 0027e 48 8b 8d a0 01 + 0027c c1 f8 04 sar eax, 4 + 0027f 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00285 89 81 3c 48 00 + 00286 89 81 3c 48 00 00 mov DWORD PTR [rcx+18492], eax ; 2707 : z->succ_low = (aa & 15); - 0028b 8b 85 a4 00 00 + 0028c 8b 85 a4 00 00 00 mov eax, DWORD PTR aa$4[rbp] - 00291 83 e0 0f and eax, 15 - 00294 48 8b 8d a0 01 + 00292 83 e0 0f and eax, 15 + 00295 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0029b 89 81 40 48 00 + 0029c 89 81 40 48 00 00 mov DWORD PTR [rcx+18496], eax ; 2708 : if (z->progressive) { - 002a1 48 8b 85 a0 01 + 002a2 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 002a8 83 b8 30 48 00 + 002a9 83 b8 30 48 00 00 00 cmp DWORD PTR [rax+18480], 0 - 002af 74 6c je SHORT $LN15@stbi__proc + 002b0 74 6c je SHORT $LN15@stbi__proc ; 2709 : if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) - 002b1 48 8b 85 a0 01 + 002b2 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 002b8 83 b8 34 48 00 + 002b9 83 b8 34 48 00 00 3f cmp DWORD PTR [rax+18484], 63 ; 0000003fH - 002bf 7f 4c jg SHORT $LN18@stbi__proc - 002c1 48 8b 85 a0 01 + 002c0 7f 4c jg SHORT $LN18@stbi__proc + 002c2 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 002c8 83 b8 38 48 00 + 002c9 83 b8 38 48 00 00 3f cmp DWORD PTR [rax+18488], 63 ; 0000003fH - 002cf 7f 3c jg SHORT $LN18@stbi__proc - 002d1 48 8b 85 a0 01 + 002d0 7f 3c jg SHORT $LN18@stbi__proc + 002d2 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 002d8 48 8b 8d a0 01 + 002d9 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 002df 8b 89 38 48 00 + 002e0 8b 89 38 48 00 00 mov ecx, DWORD PTR [rcx+18488] - 002e5 39 88 34 48 00 + 002e6 39 88 34 48 00 00 cmp DWORD PTR [rax+18484], ecx - 002eb 7f 20 jg SHORT $LN18@stbi__proc - 002ed 48 8b 85 a0 01 + 002ec 7f 20 jg SHORT $LN18@stbi__proc + 002ee 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 002f4 83 b8 3c 48 00 + 002f5 83 b8 3c 48 00 00 0d cmp DWORD PTR [rax+18492], 13 - 002fb 7f 10 jg SHORT $LN18@stbi__proc - 002fd 48 8b 85 a0 01 + 002fc 7f 10 jg SHORT $LN18@stbi__proc + 002fe 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00304 83 b8 40 48 00 + 00305 83 b8 40 48 00 00 0d cmp DWORD PTR [rax+18496], 13 - 0030b 7e 0e jle SHORT $LN17@stbi__proc + 0030c 7e 0e jle SHORT $LN17@stbi__proc $LN18@stbi__proc: ; 2710 : return stbi__err("bad SOS", "Corrupt JPEG"); - 0030d 48 8d 0d 00 00 + 0030e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07EEJOMGGP@bad?5SOS@ - 00314 e8 00 00 00 00 call stbi__err - 00319 eb 64 jmp SHORT $LN1@stbi__proc + 00315 e8 00 00 00 00 call stbi__err + 0031a eb 64 jmp SHORT $LN1@stbi__proc $LN17@stbi__proc: ; 2711 : } - 0031b eb 5d jmp SHORT $LN16@stbi__proc + 0031c eb 5d jmp SHORT $LN16@stbi__proc $LN15@stbi__proc: ; 2712 : else { ; 2713 : if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG"); - 0031d 48 8b 85 a0 01 + 0031e 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00324 83 b8 34 48 00 + 00325 83 b8 34 48 00 00 00 cmp DWORD PTR [rax+18484], 0 - 0032b 74 0e je SHORT $LN19@stbi__proc - 0032d 48 8d 0d 00 00 + 0032c 74 0e je SHORT $LN19@stbi__proc + 0032e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07EEJOMGGP@bad?5SOS@ - 00334 e8 00 00 00 00 call stbi__err - 00339 eb 44 jmp SHORT $LN1@stbi__proc + 00335 e8 00 00 00 00 call stbi__err + 0033a eb 44 jmp SHORT $LN1@stbi__proc $LN19@stbi__proc: ; 2714 : if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG"); - 0033b 48 8b 85 a0 01 + 0033c 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00342 83 b8 3c 48 00 + 00343 83 b8 3c 48 00 00 00 cmp DWORD PTR [rax+18492], 0 - 00349 75 10 jne SHORT $LN21@stbi__proc - 0034b 48 8b 85 a0 01 + 0034a 75 10 jne SHORT $LN21@stbi__proc + 0034c 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00352 83 b8 40 48 00 + 00353 83 b8 40 48 00 00 00 cmp DWORD PTR [rax+18496], 0 - 00359 74 0e je SHORT $LN20@stbi__proc + 0035a 74 0e je SHORT $LN20@stbi__proc $LN21@stbi__proc: - 0035b 48 8d 0d 00 00 + 0035c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07EEJOMGGP@bad?5SOS@ - 00362 e8 00 00 00 00 call stbi__err - 00367 eb 16 jmp SHORT $LN1@stbi__proc + 00363 e8 00 00 00 00 call stbi__err + 00368 eb 16 jmp SHORT $LN1@stbi__proc $LN20@stbi__proc: ; 2715 : z->spec_end = 63; - 00369 48 8b 85 a0 01 + 0036a 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00370 c7 80 38 48 00 + 00371 c7 80 38 48 00 00 3f 00 00 00 mov DWORD PTR [rax+18488], 63 ; 0000003fH $LN16@stbi__proc: @@ -29365,16 +29535,16 @@ $LN16@stbi__proc: ; 2718 : ; 2719 : return 1; - 0037a b8 01 00 00 00 mov eax, 1 + 0037b b8 01 00 00 00 mov eax, 1 $LN1@stbi__proc: ; 2720 : } - 0037f 48 8d a5 88 01 + 00380 48 8d a5 88 01 00 00 lea rsp, QWORD PTR [rbp+392] - 00386 5f pop rdi - 00387 5d pop rbp - 00388 c3 ret 0 + 00387 5f pop rdi + 00388 5d pop rbp + 00389 c3 ret 0 stbi__process_scan_header ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -29398,12 +29568,12 @@ ok$16 = 484 i$17 = 516 ok$18 = 548 i$19 = 580 -tv236 = 980 -tv155 = 980 -tv152 = 980 -tv149 = 980 -tv88 = 980 tv64 = 980 +tv88 = 980 +tv149 = 980 +tv152 = 980 +tv155 = 980 +tv236 = 980 __$ArrayPad$ = 984 z$ = 1024 m$ = 1032 @@ -29432,537 +29602,539 @@ stbi__process_marker PROC ; COMDAT 00041 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00048 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0004d 90 npad 1 ; 2578 : int L; ; 2579 : switch (m) { - 0004d 8b 85 08 04 00 + 0004e 8b 85 08 04 00 00 mov eax, DWORD PTR m$[rbp] - 00053 89 85 d4 03 00 + 00054 89 85 d4 03 00 00 mov DWORD PTR tv64[rbp], eax - 00059 81 bd d4 03 00 + 0005a 81 bd d4 03 00 00 c4 00 00 00 cmp DWORD PTR tv64[rbp], 196 ; 000000c4H - 00063 0f 84 19 02 00 + 00064 0f 84 19 02 00 00 je $LN29@stbi__proc - 00069 81 bd d4 03 00 + 0006a 81 bd d4 03 00 00 db 00 00 00 cmp DWORD PTR tv64[rbp], 219 ; 000000dbH - 00073 74 79 je SHORT $LN26@stbi__proc - 00075 81 bd d4 03 00 + 00074 74 79 je SHORT $LN26@stbi__proc + 00076 81 bd d4 03 00 00 dd 00 00 00 cmp DWORD PTR tv64[rbp], 221 ; 000000ddH - 0007f 74 22 je SHORT $LN24@stbi__proc - 00081 81 bd d4 03 00 + 00080 74 22 je SHORT $LN24@stbi__proc + 00082 81 bd d4 03 00 00 ff 00 00 00 cmp DWORD PTR tv64[rbp], 255 ; 000000ffH - 0008b 74 05 je SHORT $LN23@stbi__proc - 0008d e9 8a 04 00 00 jmp $LN2@stbi__proc + 0008c 74 05 je SHORT $LN23@stbi__proc + 0008e e9 8b 04 00 00 jmp $LN2@stbi__proc $LN23@stbi__proc: ; 2580 : case STBI__MARKER_none: // no marker found ; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); - 00092 48 8d 0d 00 00 + 00093 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@KLNDOKJD@expected?5marker@ - 00099 e8 00 00 00 00 call stbi__err - 0009e e9 9c 06 00 00 jmp $LN1@stbi__proc + 0009a e8 00 00 00 00 call stbi__err + 0009f e9 a1 06 00 00 jmp $LN1@stbi__proc $LN24@stbi__proc: ; 2582 : ; 2583 : case 0xDD: // DRI - specify restart interval ; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); - 000a3 48 8b 85 00 04 + 000a4 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 000aa 48 8b 08 mov rcx, QWORD PTR [rax] - 000ad e8 00 00 00 00 call stbi__get16be - 000b2 83 f8 04 cmp eax, 4 - 000b5 74 11 je SHORT $LN25@stbi__proc - 000b7 48 8d 0d 00 00 + 000ab 48 8b 08 mov rcx, QWORD PTR [rax] + 000ae e8 00 00 00 00 call stbi__get16be + 000b3 83 f8 04 cmp eax, 4 + 000b6 74 11 je SHORT $LN25@stbi__proc + 000b8 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@LPHNODCG@bad?5DRI?5len@ - 000be e8 00 00 00 00 call stbi__err - 000c3 e9 77 06 00 00 jmp $LN1@stbi__proc + 000bf e8 00 00 00 00 call stbi__err + 000c4 e9 7c 06 00 00 jmp $LN1@stbi__proc $LN25@stbi__proc: ; 2585 : z->restart_interval = stbi__get16be(z->s); - 000c8 48 8b 85 00 04 + 000c9 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 000cf 48 8b 08 mov rcx, QWORD PTR [rax] - 000d2 e8 00 00 00 00 call stbi__get16be - 000d7 48 8b 8d 00 04 + 000d0 48 8b 08 mov rcx, QWORD PTR [rax] + 000d3 e8 00 00 00 00 call stbi__get16be + 000d8 48 8b 8d 00 04 00 00 mov rcx, QWORD PTR z$[rbp] - 000de 89 81 68 48 00 + 000df 89 81 68 48 00 00 mov DWORD PTR [rcx+18536], eax ; 2586 : return 1; - 000e4 b8 01 00 00 00 mov eax, 1 - 000e9 e9 51 06 00 00 jmp $LN1@stbi__proc + 000e5 b8 01 00 00 00 mov eax, 1 + 000ea e9 56 06 00 00 jmp $LN1@stbi__proc $LN26@stbi__proc: ; 2587 : ; 2588 : case 0xDB: // DQT - define quantization table ; 2589 : L = stbi__get16be(z->s) - 2; - 000ee 48 8b 85 00 04 + 000ef 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 000f5 48 8b 08 mov rcx, QWORD PTR [rax] - 000f8 e8 00 00 00 00 call stbi__get16be - 000fd 83 e8 02 sub eax, 2 - 00100 89 45 04 mov DWORD PTR L$[rbp], eax + 000f6 48 8b 08 mov rcx, QWORD PTR [rax] + 000f9 e8 00 00 00 00 call stbi__get16be + 000fe 83 e8 02 sub eax, 2 + 00101 89 45 04 mov DWORD PTR L$[rbp], eax $LN4@stbi__proc: ; 2590 : while (L > 0) { - 00103 83 7d 04 00 cmp DWORD PTR L$[rbp], 0 - 00107 0f 8e 4e 01 00 + 00104 83 7d 04 00 cmp DWORD PTR L$[rbp], 0 + 00108 0f 8e 4e 01 00 00 jle $LN5@stbi__proc ; 2591 : int q = stbi__get8(z->s); - 0010d 48 8b 85 00 04 + 0010e 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 00114 48 8b 08 mov rcx, QWORD PTR [rax] - 00117 e8 00 00 00 00 call stbi__get8 - 0011c 0f b6 c0 movzx eax, al - 0011f 89 45 24 mov DWORD PTR q$4[rbp], eax + 00115 48 8b 08 mov rcx, QWORD PTR [rax] + 00118 e8 00 00 00 00 call stbi__get8 + 0011d 0f b6 c0 movzx eax, al + 00120 89 45 24 mov DWORD PTR q$4[rbp], eax ; 2592 : int p = q >> 4, sixteen = (p != 0); - 00122 8b 45 24 mov eax, DWORD PTR q$4[rbp] - 00125 c1 f8 04 sar eax, 4 - 00128 89 45 44 mov DWORD PTR p$5[rbp], eax - 0012b 83 7d 44 00 cmp DWORD PTR p$5[rbp], 0 - 0012f 74 0c je SHORT $LN52@stbi__proc - 00131 c7 85 d4 03 00 + 00123 8b 45 24 mov eax, DWORD PTR q$4[rbp] + 00126 c1 f8 04 sar eax, 4 + 00129 89 45 44 mov DWORD PTR p$5[rbp], eax + 0012c 83 7d 44 00 cmp DWORD PTR p$5[rbp], 0 + 00130 74 0c je SHORT $LN52@stbi__proc + 00132 c7 85 d4 03 00 00 01 00 00 00 mov DWORD PTR tv88[rbp], 1 - 0013b eb 0a jmp SHORT $LN53@stbi__proc + 0013c eb 0a jmp SHORT $LN53@stbi__proc $LN52@stbi__proc: - 0013d c7 85 d4 03 00 + 0013e c7 85 d4 03 00 00 00 00 00 00 mov DWORD PTR tv88[rbp], 0 $LN53@stbi__proc: - 00147 8b 85 d4 03 00 + 00148 8b 85 d4 03 00 00 mov eax, DWORD PTR tv88[rbp] - 0014d 89 45 64 mov DWORD PTR sixteen$6[rbp], eax + 0014e 89 45 64 mov DWORD PTR sixteen$6[rbp], eax ; 2593 : int t = q & 15, i; - 00150 8b 45 24 mov eax, DWORD PTR q$4[rbp] - 00153 83 e0 0f and eax, 15 - 00156 89 85 84 00 00 + 00151 8b 45 24 mov eax, DWORD PTR q$4[rbp] + 00154 83 e0 0f and eax, 15 + 00157 89 85 84 00 00 00 mov DWORD PTR t$7[rbp], eax ; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); - 0015c 83 7d 44 00 cmp DWORD PTR p$5[rbp], 0 - 00160 74 17 je SHORT $LN27@stbi__proc - 00162 83 7d 44 01 cmp DWORD PTR p$5[rbp], 1 - 00166 74 11 je SHORT $LN27@stbi__proc - 00168 48 8d 0d 00 00 + 0015d 83 7d 44 00 cmp DWORD PTR p$5[rbp], 0 + 00161 74 17 je SHORT $LN27@stbi__proc + 00163 83 7d 44 01 cmp DWORD PTR p$5[rbp], 1 + 00167 74 11 je SHORT $LN27@stbi__proc + 00169 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0N@BOFJCHAP@bad?5DQT?5type@ - 0016f e8 00 00 00 00 call stbi__err - 00174 e9 c6 05 00 00 jmp $LN1@stbi__proc + 00170 e8 00 00 00 00 call stbi__err + 00175 e9 cb 05 00 00 jmp $LN1@stbi__proc $LN27@stbi__proc: ; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); - 00179 83 bd 84 00 00 + 0017a 83 bd 84 00 00 00 03 cmp DWORD PTR t$7[rbp], 3 - 00180 7e 11 jle SHORT $LN28@stbi__proc - 00182 48 8d 0d 00 00 + 00181 7e 11 jle SHORT $LN28@stbi__proc + 00183 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0O@CNHKKDIM@bad?5DQT?5table@ - 00189 e8 00 00 00 00 call stbi__err - 0018e e9 ac 05 00 00 jmp $LN1@stbi__proc + 0018a e8 00 00 00 00 call stbi__err + 0018f e9 b1 05 00 00 jmp $LN1@stbi__proc $LN28@stbi__proc: ; 2596 : ; 2597 : for (i = 0; i < 64; ++i) - 00193 c7 85 a4 00 00 + 00194 c7 85 a4 00 00 00 00 00 00 00 mov DWORD PTR i$8[rbp], 0 - 0019d eb 0e jmp SHORT $LN8@stbi__proc + 0019e eb 0e jmp SHORT $LN8@stbi__proc $LN6@stbi__proc: - 0019f 8b 85 a4 00 00 + 001a0 8b 85 a4 00 00 00 mov eax, DWORD PTR i$8[rbp] - 001a5 ff c0 inc eax - 001a7 89 85 a4 00 00 + 001a6 ff c0 inc eax + 001a8 89 85 a4 00 00 00 mov DWORD PTR i$8[rbp], eax $LN8@stbi__proc: - 001ad 83 bd a4 00 00 + 001ae 83 bd a4 00 00 00 40 cmp DWORD PTR i$8[rbp], 64 ; 00000040H - 001b4 7d 74 jge SHORT $LN7@stbi__proc + 001b5 7d 74 jge SHORT $LN7@stbi__proc ; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); - 001b6 83 7d 64 00 cmp DWORD PTR sixteen$6[rbp], 0 - 001ba 74 17 je SHORT $LN54@stbi__proc - 001bc 48 8b 85 00 04 + 001b7 83 7d 64 00 cmp DWORD PTR sixteen$6[rbp], 0 + 001bb 74 17 je SHORT $LN54@stbi__proc + 001bd 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 001c3 48 8b 08 mov rcx, QWORD PTR [rax] - 001c6 e8 00 00 00 00 call stbi__get16be - 001cb 89 85 d4 03 00 + 001c4 48 8b 08 mov rcx, QWORD PTR [rax] + 001c7 e8 00 00 00 00 call stbi__get16be + 001cc 89 85 d4 03 00 00 mov DWORD PTR tv149[rbp], eax - 001d1 eb 18 jmp SHORT $LN55@stbi__proc + 001d2 eb 18 jmp SHORT $LN55@stbi__proc $LN54@stbi__proc: - 001d3 48 8b 85 00 04 + 001d4 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 001da 48 8b 08 mov rcx, QWORD PTR [rax] - 001dd e8 00 00 00 00 call stbi__get8 - 001e2 0f b6 c0 movzx eax, al - 001e5 89 85 d4 03 00 + 001db 48 8b 08 mov rcx, QWORD PTR [rax] + 001de e8 00 00 00 00 call stbi__get8 + 001e3 0f b6 c0 movzx eax, al + 001e6 89 85 d4 03 00 00 mov DWORD PTR tv149[rbp], eax $LN55@stbi__proc: - 001eb 48 63 85 84 00 + 001ec 48 63 85 84 00 00 00 movsxd rax, DWORD PTR t$7[rbp] - 001f2 48 69 c0 80 00 + 001f3 48 69 c0 80 00 00 00 imul rax, rax, 128 ; 00000080H - 001f9 48 8b 8d 00 04 + 001fa 48 8b 8d 00 04 00 00 mov rcx, QWORD PTR z$[rbp] - 00200 48 8d 84 01 88 + 00201 48 8d 84 01 88 34 00 00 lea rax, QWORD PTR [rcx+rax+13448] - 00208 48 63 8d a4 00 + 00209 48 63 8d a4 00 00 00 movsxd rcx, DWORD PTR i$8[rbp] - 0020f 48 8d 15 00 00 + 00210 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__jpeg_dezigzag - 00216 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 0021a 0f b7 95 d4 03 + 00217 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 0021b 0f b7 95 d4 03 00 00 movzx edx, WORD PTR tv149[rbp] - 00221 66 89 14 48 mov WORD PTR [rax+rcx*2], dx - 00225 e9 75 ff ff ff jmp $LN6@stbi__proc + 00222 66 89 14 48 mov WORD PTR [rax+rcx*2], dx + 00226 e9 75 ff ff ff jmp $LN6@stbi__proc $LN7@stbi__proc: ; 2599 : L -= (sixteen ? 129 : 65); - 0022a 83 7d 64 00 cmp DWORD PTR sixteen$6[rbp], 0 - 0022e 74 0c je SHORT $LN56@stbi__proc - 00230 c7 85 d4 03 00 + 0022b 83 7d 64 00 cmp DWORD PTR sixteen$6[rbp], 0 + 0022f 74 0c je SHORT $LN56@stbi__proc + 00231 c7 85 d4 03 00 00 81 00 00 00 mov DWORD PTR tv152[rbp], 129 ; 00000081H - 0023a eb 0a jmp SHORT $LN57@stbi__proc + 0023b eb 0a jmp SHORT $LN57@stbi__proc $LN56@stbi__proc: - 0023c c7 85 d4 03 00 + 0023d c7 85 d4 03 00 00 41 00 00 00 mov DWORD PTR tv152[rbp], 65 ; 00000041H $LN57@stbi__proc: - 00246 8b 85 d4 03 00 + 00247 8b 85 d4 03 00 00 mov eax, DWORD PTR tv152[rbp] - 0024c 8b 4d 04 mov ecx, DWORD PTR L$[rbp] - 0024f 2b c8 sub ecx, eax - 00251 8b c1 mov eax, ecx - 00253 89 45 04 mov DWORD PTR L$[rbp], eax + 0024d 8b 4d 04 mov ecx, DWORD PTR L$[rbp] + 00250 2b c8 sub ecx, eax + 00252 8b c1 mov eax, ecx + 00254 89 45 04 mov DWORD PTR L$[rbp], eax ; 2600 : } - 00256 e9 a8 fe ff ff jmp $LN4@stbi__proc + 00257 e9 a8 fe ff ff jmp $LN4@stbi__proc $LN5@stbi__proc: ; 2601 : return L == 0; - 0025b 83 7d 04 00 cmp DWORD PTR L$[rbp], 0 - 0025f 75 0c jne SHORT $LN58@stbi__proc - 00261 c7 85 d4 03 00 + 0025c 83 7d 04 00 cmp DWORD PTR L$[rbp], 0 + 00260 75 0c jne SHORT $LN58@stbi__proc + 00262 c7 85 d4 03 00 00 01 00 00 00 mov DWORD PTR tv155[rbp], 1 - 0026b eb 0a jmp SHORT $LN59@stbi__proc + 0026c eb 0a jmp SHORT $LN59@stbi__proc $LN58@stbi__proc: - 0026d c7 85 d4 03 00 + 0026e c7 85 d4 03 00 00 00 00 00 00 mov DWORD PTR tv155[rbp], 0 $LN59@stbi__proc: - 00277 8b 85 d4 03 00 + 00278 8b 85 d4 03 00 00 mov eax, DWORD PTR tv155[rbp] - 0027d e9 bd 04 00 00 jmp $LN1@stbi__proc + 0027e e9 c2 04 00 00 jmp $LN1@stbi__proc $LN29@stbi__proc: ; 2602 : ; 2603 : case 0xC4: // DHT - define huffman table ; 2604 : L = stbi__get16be(z->s) - 2; - 00282 48 8b 85 00 04 + 00283 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 00289 48 8b 08 mov rcx, QWORD PTR [rax] - 0028c e8 00 00 00 00 call stbi__get16be - 00291 83 e8 02 sub eax, 2 - 00294 89 45 04 mov DWORD PTR L$[rbp], eax + 0028a 48 8b 08 mov rcx, QWORD PTR [rax] + 0028d e8 00 00 00 00 call stbi__get16be + 00292 83 e8 02 sub eax, 2 + 00295 89 45 04 mov DWORD PTR L$[rbp], eax $LN9@stbi__proc: ; 2605 : while (L > 0) { - 00297 83 7d 04 00 cmp DWORD PTR L$[rbp], 0 - 0029b 0f 8e 54 02 00 + 00298 83 7d 04 00 cmp DWORD PTR L$[rbp], 0 + 0029c 0f 8e 55 02 00 00 jle $LN10@stbi__proc ; 2606 : stbi_uc* v; ; 2607 : int sizes[16], i, n = 0; - 002a1 c7 85 64 01 00 + 002a2 c7 85 64 01 00 00 00 00 00 00 mov DWORD PTR n$12[rbp], 0 ; 2608 : int q = stbi__get8(z->s); - 002ab 48 8b 85 00 04 + 002ac 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 002b2 48 8b 08 mov rcx, QWORD PTR [rax] - 002b5 e8 00 00 00 00 call stbi__get8 - 002ba 0f b6 c0 movzx eax, al - 002bd 89 85 84 01 00 + 002b3 48 8b 08 mov rcx, QWORD PTR [rax] + 002b6 e8 00 00 00 00 call stbi__get8 + 002bb 0f b6 c0 movzx eax, al + 002be 89 85 84 01 00 00 mov DWORD PTR q$13[rbp], eax ; 2609 : int tc = q >> 4; - 002c3 8b 85 84 01 00 + 002c4 8b 85 84 01 00 00 mov eax, DWORD PTR q$13[rbp] - 002c9 c1 f8 04 sar eax, 4 - 002cc 89 85 a4 01 00 + 002ca c1 f8 04 sar eax, 4 + 002cd 89 85 a4 01 00 00 mov DWORD PTR tc$14[rbp], eax ; 2610 : int th = q & 15; - 002d2 8b 85 84 01 00 + 002d3 8b 85 84 01 00 00 mov eax, DWORD PTR q$13[rbp] - 002d8 83 e0 0f and eax, 15 - 002db 89 85 c4 01 00 + 002d9 83 e0 0f and eax, 15 + 002dc 89 85 c4 01 00 00 mov DWORD PTR th$15[rbp], eax ; 2611 : if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG"); - 002e1 83 bd a4 01 00 + 002e2 83 bd a4 01 00 00 01 cmp DWORD PTR tc$14[rbp], 1 - 002e8 7f 09 jg SHORT $LN31@stbi__proc - 002ea 83 bd c4 01 00 + 002e9 7f 09 jg SHORT $LN31@stbi__proc + 002eb 83 bd c4 01 00 00 03 cmp DWORD PTR th$15[rbp], 3 - 002f1 7e 11 jle SHORT $LN30@stbi__proc + 002f2 7e 11 jle SHORT $LN30@stbi__proc $LN31@stbi__proc: - 002f3 48 8d 0d 00 00 + 002f4 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0P@JLGKOCGN@bad?5DHT?5header@ - 002fa e8 00 00 00 00 call stbi__err - 002ff e9 3b 04 00 00 jmp $LN1@stbi__proc + 002fb e8 00 00 00 00 call stbi__err + 00300 e9 40 04 00 00 jmp $LN1@stbi__proc $LN30@stbi__proc: ; 2612 : for (i = 0; i < 16; ++i) { - 00304 c7 85 44 01 00 + 00305 c7 85 44 01 00 00 00 00 00 00 mov DWORD PTR i$11[rbp], 0 - 0030e eb 0e jmp SHORT $LN13@stbi__proc + 0030f eb 0e jmp SHORT $LN13@stbi__proc $LN11@stbi__proc: - 00310 8b 85 44 01 00 + 00311 8b 85 44 01 00 00 mov eax, DWORD PTR i$11[rbp] - 00316 ff c0 inc eax - 00318 89 85 44 01 00 + 00317 ff c0 inc eax + 00319 89 85 44 01 00 00 mov DWORD PTR i$11[rbp], eax $LN13@stbi__proc: - 0031e 83 bd 44 01 00 + 0031f 83 bd 44 01 00 00 10 cmp DWORD PTR i$11[rbp], 16 - 00325 7d 40 jge SHORT $LN12@stbi__proc + 00326 7d 40 jge SHORT $LN12@stbi__proc ; 2613 : sizes[i] = stbi__get8(z->s); - 00327 48 8b 85 00 04 + 00328 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 0032e 48 8b 08 mov rcx, QWORD PTR [rax] - 00331 e8 00 00 00 00 call stbi__get8 - 00336 48 63 8d 44 01 + 0032f 48 8b 08 mov rcx, QWORD PTR [rax] + 00332 e8 00 00 00 00 call stbi__get8 + 00337 48 63 8d 44 01 00 00 movsxd rcx, DWORD PTR i$11[rbp] - 0033d 0f b6 c0 movzx eax, al - 00340 89 84 8d f0 00 + 0033e 0f b6 c0 movzx eax, al + 00341 89 84 8d f0 00 00 00 mov DWORD PTR sizes$10[rbp+rcx*4], eax ; 2614 : n += sizes[i]; - 00347 48 63 85 44 01 + 00348 48 63 85 44 01 00 00 movsxd rax, DWORD PTR i$11[rbp] - 0034e 8b 84 85 f0 00 + 0034f 8b 84 85 f0 00 00 00 mov eax, DWORD PTR sizes$10[rbp+rax*4] - 00355 8b 8d 64 01 00 + 00356 8b 8d 64 01 00 00 mov ecx, DWORD PTR n$12[rbp] - 0035b 03 c8 add ecx, eax - 0035d 8b c1 mov eax, ecx - 0035f 89 85 64 01 00 + 0035c 03 c8 add ecx, eax + 0035e 8b c1 mov eax, ecx + 00360 89 85 64 01 00 00 mov DWORD PTR n$12[rbp], eax ; 2615 : } - 00365 eb a9 jmp SHORT $LN11@stbi__proc + 00366 eb a9 jmp SHORT $LN11@stbi__proc $LN12@stbi__proc: ; 2616 : if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values! - 00367 81 bd 64 01 00 + 00368 81 bd 64 01 00 00 00 01 00 00 cmp DWORD PTR n$12[rbp], 256 ; 00000100H - 00371 7e 11 jle SHORT $LN32@stbi__proc - 00373 48 8d 0d 00 00 + 00372 7e 11 jle SHORT $LN32@stbi__proc + 00374 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0P@JLGKOCGN@bad?5DHT?5header@ - 0037a e8 00 00 00 00 call stbi__err - 0037f e9 bb 03 00 00 jmp $LN1@stbi__proc + 0037b e8 00 00 00 00 call stbi__err + 00380 e9 c0 03 00 00 jmp $LN1@stbi__proc $LN32@stbi__proc: ; 2617 : L -= 17; - 00384 8b 45 04 mov eax, DWORD PTR L$[rbp] - 00387 83 e8 11 sub eax, 17 - 0038a 89 45 04 mov DWORD PTR L$[rbp], eax + 00385 8b 45 04 mov eax, DWORD PTR L$[rbp] + 00388 83 e8 11 sub eax, 17 + 0038b 89 45 04 mov DWORD PTR L$[rbp], eax ; 2618 : if (tc == 0) { - 0038d 83 bd a4 01 00 + 0038e 83 bd a4 01 00 00 00 cmp DWORD PTR tc$14[rbp], 0 - 00394 75 5a jne SHORT $LN33@stbi__proc + 00395 75 5a jne SHORT $LN33@stbi__proc ; 2619 : if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0; - 00396 48 63 85 c4 01 + 00397 48 63 85 c4 01 00 00 movsxd rax, DWORD PTR th$15[rbp] - 0039d 48 69 c0 90 06 + 0039e 48 69 c0 90 06 00 00 imul rax, rax, 1680 ; 00000690H - 003a4 48 8b 8d 00 04 + 003a5 48 8b 8d 00 04 00 00 mov rcx, QWORD PTR z$[rbp] - 003ab 48 8d 44 01 08 lea rax, QWORD PTR [rcx+rax+8] - 003b0 48 8d 95 f0 00 + 003ac 48 8d 44 01 08 lea rax, QWORD PTR [rcx+rax+8] + 003b1 48 8d 95 f0 00 00 00 lea rdx, QWORD PTR sizes$10[rbp] - 003b7 48 8b c8 mov rcx, rax - 003ba e8 00 00 00 00 call stbi__build_huffman - 003bf 85 c0 test eax, eax - 003c1 75 07 jne SHORT $LN35@stbi__proc - 003c3 33 c0 xor eax, eax - 003c5 e9 75 03 00 00 jmp $LN1@stbi__proc + 003b8 48 8b c8 mov rcx, rax + 003bb e8 00 00 00 00 call stbi__build_huffman + 003c0 85 c0 test eax, eax + 003c2 75 07 jne SHORT $LN35@stbi__proc + 003c4 33 c0 xor eax, eax + 003c6 e9 7a 03 00 00 jmp $LN1@stbi__proc $LN35@stbi__proc: ; 2620 : v = z->huff_dc[th].values; - 003ca 48 63 85 c4 01 + 003cb 48 63 85 c4 01 00 00 movsxd rax, DWORD PTR th$15[rbp] - 003d1 48 69 c0 90 06 + 003d2 48 69 c0 90 06 00 00 imul rax, rax, 1680 ; 00000690H - 003d8 48 8b 8d 00 04 + 003d9 48 8b 8d 00 04 00 00 mov rcx, QWORD PTR z$[rbp] - 003df 48 8d 84 01 08 + 003e0 48 8d 84 01 08 04 00 00 lea rax, QWORD PTR [rcx+rax+1032] - 003e7 48 89 85 c8 00 + 003e8 48 89 85 c8 00 00 00 mov QWORD PTR v$9[rbp], rax ; 2621 : } - 003ee eb 5b jmp SHORT $LN34@stbi__proc + 003ef eb 5b jmp SHORT $LN34@stbi__proc $LN33@stbi__proc: ; 2622 : else { ; 2623 : if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0; - 003f0 48 63 85 c4 01 + 003f1 48 63 85 c4 01 00 00 movsxd rax, DWORD PTR th$15[rbp] - 003f7 48 69 c0 90 06 + 003f8 48 69 c0 90 06 00 00 imul rax, rax, 1680 ; 00000690H - 003fe 48 8b 8d 00 04 + 003ff 48 8b 8d 00 04 00 00 mov rcx, QWORD PTR z$[rbp] - 00405 48 8d 84 01 48 + 00406 48 8d 84 01 48 1a 00 00 lea rax, QWORD PTR [rcx+rax+6728] - 0040d 48 8d 95 f0 00 + 0040e 48 8d 95 f0 00 00 00 lea rdx, QWORD PTR sizes$10[rbp] - 00414 48 8b c8 mov rcx, rax - 00417 e8 00 00 00 00 call stbi__build_huffman - 0041c 85 c0 test eax, eax - 0041e 75 07 jne SHORT $LN36@stbi__proc - 00420 33 c0 xor eax, eax - 00422 e9 18 03 00 00 jmp $LN1@stbi__proc + 00415 48 8b c8 mov rcx, rax + 00418 e8 00 00 00 00 call stbi__build_huffman + 0041d 85 c0 test eax, eax + 0041f 75 07 jne SHORT $LN36@stbi__proc + 00421 33 c0 xor eax, eax + 00423 e9 1d 03 00 00 jmp $LN1@stbi__proc $LN36@stbi__proc: ; 2624 : v = z->huff_ac[th].values; - 00427 48 63 85 c4 01 + 00428 48 63 85 c4 01 00 00 movsxd rax, DWORD PTR th$15[rbp] - 0042e 48 69 c0 90 06 + 0042f 48 69 c0 90 06 00 00 imul rax, rax, 1680 ; 00000690H - 00435 48 8b 8d 00 04 + 00436 48 8b 8d 00 04 00 00 mov rcx, QWORD PTR z$[rbp] - 0043c 48 8d 84 01 48 + 0043d 48 8d 84 01 48 1e 00 00 lea rax, QWORD PTR [rcx+rax+7752] - 00444 48 89 85 c8 00 + 00445 48 89 85 c8 00 00 00 mov QWORD PTR v$9[rbp], rax $LN34@stbi__proc: ; 2625 : } ; 2626 : for (i = 0; i < n; ++i) - 0044b c7 85 44 01 00 + 0044c c7 85 44 01 00 00 00 00 00 00 mov DWORD PTR i$11[rbp], 0 - 00455 eb 0e jmp SHORT $LN16@stbi__proc + 00456 eb 0e jmp SHORT $LN16@stbi__proc $LN14@stbi__proc: - 00457 8b 85 44 01 00 + 00458 8b 85 44 01 00 00 mov eax, DWORD PTR i$11[rbp] - 0045d ff c0 inc eax - 0045f 89 85 44 01 00 + 0045e ff c0 inc eax + 00460 89 85 44 01 00 00 mov DWORD PTR i$11[rbp], eax $LN16@stbi__proc: - 00465 8b 85 64 01 00 + 00466 8b 85 64 01 00 00 mov eax, DWORD PTR n$12[rbp] - 0046b 39 85 44 01 00 + 0046c 39 85 44 01 00 00 cmp DWORD PTR i$11[rbp], eax - 00471 7d 22 jge SHORT $LN15@stbi__proc + 00472 7d 22 jge SHORT $LN15@stbi__proc ; 2627 : v[i] = stbi__get8(z->s); - 00473 48 8b 85 00 04 + 00474 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 0047a 48 8b 08 mov rcx, QWORD PTR [rax] - 0047d e8 00 00 00 00 call stbi__get8 - 00482 48 63 8d 44 01 + 0047b 48 8b 08 mov rcx, QWORD PTR [rax] + 0047e e8 00 00 00 00 call stbi__get8 + 00483 48 63 8d 44 01 00 00 movsxd rcx, DWORD PTR i$11[rbp] - 00489 48 8b 95 c8 00 + 0048a 48 8b 95 c8 00 00 00 mov rdx, QWORD PTR v$9[rbp] - 00490 88 04 0a mov BYTE PTR [rdx+rcx], al - 00493 eb c2 jmp SHORT $LN14@stbi__proc + 00491 88 04 0a mov BYTE PTR [rdx+rcx], al + 00494 eb c2 jmp SHORT $LN14@stbi__proc $LN15@stbi__proc: ; 2628 : if (tc != 0) - 00495 83 bd a4 01 00 + 00496 83 bd a4 01 00 00 00 cmp DWORD PTR tc$14[rbp], 0 - 0049c 74 42 je SHORT $LN37@stbi__proc + 0049d 74 43 je SHORT $LN37@stbi__proc ; 2629 : stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); - 0049e 48 63 85 c4 01 + 0049f 48 63 85 c4 01 00 00 movsxd rax, DWORD PTR th$15[rbp] - 004a5 48 69 c0 90 06 + 004a6 48 69 c0 90 06 00 00 imul rax, rax, 1680 ; 00000690H - 004ac 48 8b 8d 00 04 + 004ad 48 8b 8d 00 04 00 00 mov rcx, QWORD PTR z$[rbp] - 004b3 48 8d 84 01 48 + 004b4 48 8d 84 01 48 1a 00 00 lea rax, QWORD PTR [rcx+rax+6728] - 004bb 48 63 8d c4 01 + 004bc 48 63 8d c4 01 00 00 movsxd rcx, DWORD PTR th$15[rbp] - 004c2 48 69 c9 00 04 + 004c3 48 69 c9 00 04 00 00 imul rcx, rcx, 1024 ; 00000400H - 004c9 48 8b 95 00 04 + 004ca 48 8b 95 00 04 00 00 mov rdx, QWORD PTR z$[rbp] - 004d0 48 8d 8c 0a 88 + 004d1 48 8d 8c 0a 88 36 00 00 lea rcx, QWORD PTR [rdx+rcx+13960] - 004d8 48 8b d0 mov rdx, rax - 004db e8 00 00 00 00 call stbi__build_fast_ac + 004d9 48 8b d0 mov rdx, rax + 004dc e8 00 00 00 00 call stbi__build_fast_ac + 004e1 90 npad 1 $LN37@stbi__proc: ; 2630 : L -= n; - 004e0 8b 85 64 01 00 + 004e2 8b 85 64 01 00 00 mov eax, DWORD PTR n$12[rbp] - 004e6 8b 4d 04 mov ecx, DWORD PTR L$[rbp] - 004e9 2b c8 sub ecx, eax - 004eb 8b c1 mov eax, ecx - 004ed 89 45 04 mov DWORD PTR L$[rbp], eax + 004e8 8b 4d 04 mov ecx, DWORD PTR L$[rbp] + 004eb 2b c8 sub ecx, eax + 004ed 8b c1 mov eax, ecx + 004ef 89 45 04 mov DWORD PTR L$[rbp], eax ; 2631 : } - 004f0 e9 a2 fd ff ff jmp $LN9@stbi__proc + 004f2 e9 a1 fd ff ff jmp $LN9@stbi__proc $LN10@stbi__proc: ; 2632 : return L == 0; - 004f5 83 7d 04 00 cmp DWORD PTR L$[rbp], 0 - 004f9 75 0c jne SHORT $LN60@stbi__proc - 004fb c7 85 d4 03 00 + 004f7 83 7d 04 00 cmp DWORD PTR L$[rbp], 0 + 004fb 75 0c jne SHORT $LN60@stbi__proc + 004fd c7 85 d4 03 00 00 01 00 00 00 mov DWORD PTR tv236[rbp], 1 - 00505 eb 0a jmp SHORT $LN61@stbi__proc + 00507 eb 0a jmp SHORT $LN61@stbi__proc $LN60@stbi__proc: - 00507 c7 85 d4 03 00 + 00509 c7 85 d4 03 00 00 00 00 00 00 mov DWORD PTR tv236[rbp], 0 $LN61@stbi__proc: - 00511 8b 85 d4 03 00 + 00513 8b 85 d4 03 00 00 mov eax, DWORD PTR tv236[rbp] - 00517 e9 23 02 00 00 jmp $LN1@stbi__proc + 00519 e9 27 02 00 00 jmp $LN1@stbi__proc $LN2@stbi__proc: ; 2633 : } @@ -29970,252 +30142,255 @@ $LN2@stbi__proc: ; 2635 : // check for comment block or APP blocks ; 2636 : if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { - 0051c 81 bd 08 04 00 + 0051e 81 bd 08 04 00 00 e0 00 00 00 cmp DWORD PTR m$[rbp], 224 ; 000000e0H - 00526 7c 0c jl SHORT $LN40@stbi__proc - 00528 81 bd 08 04 00 + 00528 7c 0c jl SHORT $LN40@stbi__proc + 0052a 81 bd 08 04 00 00 ef 00 00 00 cmp DWORD PTR m$[rbp], 239 ; 000000efH - 00532 7e 10 jle SHORT $LN39@stbi__proc + 00534 7e 10 jle SHORT $LN39@stbi__proc $LN40@stbi__proc: - 00534 81 bd 08 04 00 + 00536 81 bd 08 04 00 00 fe 00 00 00 cmp DWORD PTR m$[rbp], 254 ; 000000feH - 0053e 0f 85 ef 01 00 + 00540 0f 85 f3 01 00 00 jne $LN38@stbi__proc $LN39@stbi__proc: ; 2637 : L = stbi__get16be(z->s); - 00544 48 8b 85 00 04 + 00546 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 0054b 48 8b 08 mov rcx, QWORD PTR [rax] - 0054e e8 00 00 00 00 call stbi__get16be - 00553 89 45 04 mov DWORD PTR L$[rbp], eax + 0054d 48 8b 08 mov rcx, QWORD PTR [rax] + 00550 e8 00 00 00 00 call stbi__get16be + 00555 89 45 04 mov DWORD PTR L$[rbp], eax ; 2638 : if (L < 2) { - 00556 83 7d 04 02 cmp DWORD PTR L$[rbp], 2 - 0055a 7d 30 jge SHORT $LN41@stbi__proc + 00558 83 7d 04 02 cmp DWORD PTR L$[rbp], 2 + 0055c 7d 30 jge SHORT $LN41@stbi__proc ; 2639 : if (m == 0xFE) - 0055c 81 bd 08 04 00 + 0055e 81 bd 08 04 00 00 fe 00 00 00 cmp DWORD PTR m$[rbp], 254 ; 000000feH - 00566 75 13 jne SHORT $LN42@stbi__proc + 00568 75 13 jne SHORT $LN42@stbi__proc ; 2640 : return stbi__err("bad COM len", "Corrupt JPEG"); - 00568 48 8d 0d 00 00 + 0056a 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@CICAFFCH@bad?5COM?5len@ - 0056f e8 00 00 00 00 call stbi__err - 00574 e9 c6 01 00 00 jmp $LN1@stbi__proc - 00579 eb 11 jmp SHORT $LN43@stbi__proc + 00571 e8 00 00 00 00 call stbi__err + 00576 e9 ca 01 00 00 jmp $LN1@stbi__proc + 0057b eb 11 jmp SHORT $LN43@stbi__proc $LN42@stbi__proc: ; 2641 : else ; 2642 : return stbi__err("bad APP len", "Corrupt JPEG"); - 0057b 48 8d 0d 00 00 + 0057d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@EENLKPDI@bad?5APP?5len@ - 00582 e8 00 00 00 00 call stbi__err - 00587 e9 b3 01 00 00 jmp $LN1@stbi__proc + 00584 e8 00 00 00 00 call stbi__err + 00589 e9 b7 01 00 00 jmp $LN1@stbi__proc $LN43@stbi__proc: $LN41@stbi__proc: ; 2643 : } ; 2644 : L -= 2; - 0058c 8b 45 04 mov eax, DWORD PTR L$[rbp] - 0058f 83 e8 02 sub eax, 2 - 00592 89 45 04 mov DWORD PTR L$[rbp], eax + 0058e 8b 45 04 mov eax, DWORD PTR L$[rbp] + 00591 83 e8 02 sub eax, 2 + 00594 89 45 04 mov DWORD PTR L$[rbp], eax ; 2645 : ; 2646 : if (m == 0xE0 && L >= 5) { // JFIF APP0 segment - 00595 81 bd 08 04 00 + 00597 81 bd 08 04 00 00 e0 00 00 00 cmp DWORD PTR m$[rbp], 224 ; 000000e0H - 0059f 0f 85 93 00 00 + 005a1 0f 85 93 00 00 00 jne $LN44@stbi__proc - 005a5 83 7d 04 05 cmp DWORD PTR L$[rbp], 5 - 005a9 0f 8c 89 00 00 + 005a7 83 7d 04 05 cmp DWORD PTR L$[rbp], 5 + 005ab 0f 8c 89 00 00 00 jl $LN44@stbi__proc ; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; ; 2648 : int ok = 1; - 005af c7 85 e4 01 00 + 005b1 c7 85 e4 01 00 00 01 00 00 00 mov DWORD PTR ok$16[rbp], 1 ; 2649 : int i; ; 2650 : for (i = 0; i < 5; ++i) - 005b9 c7 85 04 02 00 + 005bb c7 85 04 02 00 00 00 00 00 00 mov DWORD PTR i$17[rbp], 0 - 005c3 eb 0e jmp SHORT $LN19@stbi__proc + 005c5 eb 0e jmp SHORT $LN19@stbi__proc $LN17@stbi__proc: - 005c5 8b 85 04 02 00 + 005c7 8b 85 04 02 00 00 mov eax, DWORD PTR i$17[rbp] - 005cb ff c0 inc eax - 005cd 89 85 04 02 00 + 005cd ff c0 inc eax + 005cf 89 85 04 02 00 00 mov DWORD PTR i$17[rbp], eax $LN19@stbi__proc: - 005d3 83 bd 04 02 00 + 005d5 83 bd 04 02 00 00 05 cmp DWORD PTR i$17[rbp], 5 - 005da 7d 34 jge SHORT $LN18@stbi__proc + 005dc 7d 34 jge SHORT $LN18@stbi__proc ; 2651 : if (stbi__get8(z->s) != tag[i]) - 005dc 48 8b 85 00 04 + 005de 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 005e3 48 8b 08 mov rcx, QWORD PTR [rax] - 005e6 e8 00 00 00 00 call stbi__get8 - 005eb 0f b6 c0 movzx eax, al - 005ee 48 63 8d 04 02 + 005e5 48 8b 08 mov rcx, QWORD PTR [rax] + 005e8 e8 00 00 00 00 call stbi__get8 + 005ed 0f b6 c0 movzx eax, al + 005f0 48 63 8d 04 02 00 00 movsxd rcx, DWORD PTR i$17[rbp] - 005f5 48 8d 15 00 00 + 005f7 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:?tag@?O@??stbi__process_marker@@9@9 - 005fc 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00600 3b c1 cmp eax, ecx - 00602 74 0a je SHORT $LN46@stbi__proc + 005fe 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00602 3b c1 cmp eax, ecx + 00604 74 0a je SHORT $LN46@stbi__proc ; 2652 : ok = 0; - 00604 c7 85 e4 01 00 + 00606 c7 85 e4 01 00 00 00 00 00 00 mov DWORD PTR ok$16[rbp], 0 $LN46@stbi__proc: - 0060e eb b5 jmp SHORT $LN17@stbi__proc + 00610 eb b5 jmp SHORT $LN17@stbi__proc $LN18@stbi__proc: ; 2653 : L -= 5; - 00610 8b 45 04 mov eax, DWORD PTR L$[rbp] - 00613 83 e8 05 sub eax, 5 - 00616 89 45 04 mov DWORD PTR L$[rbp], eax + 00612 8b 45 04 mov eax, DWORD PTR L$[rbp] + 00615 83 e8 05 sub eax, 5 + 00618 89 45 04 mov DWORD PTR L$[rbp], eax ; 2654 : if (ok) - 00619 83 bd e4 01 00 + 0061b 83 bd e4 01 00 00 00 cmp DWORD PTR ok$16[rbp], 0 - 00620 74 11 je SHORT $LN47@stbi__proc + 00622 74 11 je SHORT $LN47@stbi__proc ; 2655 : z->jfif = 1; - 00622 48 8b 85 00 04 + 00624 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 00629 c7 80 48 48 00 + 0062b c7 80 48 48 00 00 01 00 00 00 mov DWORD PTR [rax+18504], 1 $LN47@stbi__proc: ; 2656 : } - 00633 e9 e2 00 00 00 jmp $LN45@stbi__proc + 00635 e9 e5 00 00 00 jmp $LN45@stbi__proc $LN44@stbi__proc: ; 2657 : else if (m == 0xEE && L >= 12) { // Adobe APP14 segment - 00638 81 bd 08 04 00 + 0063a 81 bd 08 04 00 00 ee 00 00 00 cmp DWORD PTR m$[rbp], 238 ; 000000eeH - 00642 0f 85 d2 00 00 + 00644 0f 85 d5 00 00 00 jne $LN48@stbi__proc - 00648 83 7d 04 0c cmp DWORD PTR L$[rbp], 12 - 0064c 0f 8c c8 00 00 + 0064a 83 7d 04 0c cmp DWORD PTR L$[rbp], 12 + 0064e 0f 8c cb 00 00 00 jl $LN48@stbi__proc ; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; ; 2659 : int ok = 1; - 00652 c7 85 24 02 00 + 00654 c7 85 24 02 00 00 01 00 00 00 mov DWORD PTR ok$18[rbp], 1 ; 2660 : int i; ; 2661 : for (i = 0; i < 6; ++i) - 0065c c7 85 44 02 00 + 0065e c7 85 44 02 00 00 00 00 00 00 mov DWORD PTR i$19[rbp], 0 - 00666 eb 0e jmp SHORT $LN22@stbi__proc + 00668 eb 0e jmp SHORT $LN22@stbi__proc $LN20@stbi__proc: - 00668 8b 85 44 02 00 + 0066a 8b 85 44 02 00 00 mov eax, DWORD PTR i$19[rbp] - 0066e ff c0 inc eax - 00670 89 85 44 02 00 + 00670 ff c0 inc eax + 00672 89 85 44 02 00 00 mov DWORD PTR i$19[rbp], eax $LN22@stbi__proc: - 00676 83 bd 44 02 00 + 00678 83 bd 44 02 00 00 06 cmp DWORD PTR i$19[rbp], 6 - 0067d 7d 34 jge SHORT $LN21@stbi__proc + 0067f 7d 34 jge SHORT $LN21@stbi__proc ; 2662 : if (stbi__get8(z->s) != tag[i]) - 0067f 48 8b 85 00 04 + 00681 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 00686 48 8b 08 mov rcx, QWORD PTR [rax] - 00689 e8 00 00 00 00 call stbi__get8 - 0068e 0f b6 c0 movzx eax, al - 00691 48 63 8d 44 02 + 00688 48 8b 08 mov rcx, QWORD PTR [rax] + 0068b e8 00 00 00 00 call stbi__get8 + 00690 0f b6 c0 movzx eax, al + 00693 48 63 8d 44 02 00 00 movsxd rcx, DWORD PTR i$19[rbp] - 00698 48 8d 15 00 00 + 0069a 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:?tag@?BA@??stbi__process_marker@@9@9 - 0069f 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 006a3 3b c1 cmp eax, ecx - 006a5 74 0a je SHORT $LN49@stbi__proc + 006a1 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 006a5 3b c1 cmp eax, ecx + 006a7 74 0a je SHORT $LN49@stbi__proc ; 2663 : ok = 0; - 006a7 c7 85 24 02 00 + 006a9 c7 85 24 02 00 00 00 00 00 00 mov DWORD PTR ok$18[rbp], 0 $LN49@stbi__proc: - 006b1 eb b5 jmp SHORT $LN20@stbi__proc + 006b3 eb b5 jmp SHORT $LN20@stbi__proc $LN21@stbi__proc: ; 2664 : L -= 6; - 006b3 8b 45 04 mov eax, DWORD PTR L$[rbp] - 006b6 83 e8 06 sub eax, 6 - 006b9 89 45 04 mov DWORD PTR L$[rbp], eax + 006b5 8b 45 04 mov eax, DWORD PTR L$[rbp] + 006b8 83 e8 06 sub eax, 6 + 006bb 89 45 04 mov DWORD PTR L$[rbp], eax ; 2665 : if (ok) { - 006bc 83 bd 24 02 00 + 006be 83 bd 24 02 00 00 00 cmp DWORD PTR ok$18[rbp], 0 - 006c3 74 55 je SHORT $LN50@stbi__proc + 006c5 74 58 je SHORT $LN50@stbi__proc ; 2666 : stbi__get8(z->s); // version - 006c5 48 8b 85 00 04 + 006c7 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 006cc 48 8b 08 mov rcx, QWORD PTR [rax] - 006cf e8 00 00 00 00 call stbi__get8 + 006ce 48 8b 08 mov rcx, QWORD PTR [rax] + 006d1 e8 00 00 00 00 call stbi__get8 + 006d6 90 npad 1 ; 2667 : stbi__get16be(z->s); // flags0 - 006d4 48 8b 85 00 04 + 006d7 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 006db 48 8b 08 mov rcx, QWORD PTR [rax] - 006de e8 00 00 00 00 call stbi__get16be + 006de 48 8b 08 mov rcx, QWORD PTR [rax] + 006e1 e8 00 00 00 00 call stbi__get16be + 006e6 90 npad 1 ; 2668 : stbi__get16be(z->s); // flags1 - 006e3 48 8b 85 00 04 + 006e7 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 006ea 48 8b 08 mov rcx, QWORD PTR [rax] - 006ed e8 00 00 00 00 call stbi__get16be + 006ee 48 8b 08 mov rcx, QWORD PTR [rax] + 006f1 e8 00 00 00 00 call stbi__get16be + 006f6 90 npad 1 ; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform - 006f2 48 8b 85 00 04 + 006f7 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 006f9 48 8b 08 mov rcx, QWORD PTR [rax] - 006fc e8 00 00 00 00 call stbi__get8 - 00701 0f b6 c0 movzx eax, al - 00704 48 8b 8d 00 04 + 006fe 48 8b 08 mov rcx, QWORD PTR [rax] + 00701 e8 00 00 00 00 call stbi__get8 + 00706 0f b6 c0 movzx eax, al + 00709 48 8b 8d 00 04 00 00 mov rcx, QWORD PTR z$[rbp] - 0070b 89 81 4c 48 00 + 00710 89 81 4c 48 00 00 mov DWORD PTR [rcx+18508], eax ; 2670 : L -= 6; - 00711 8b 45 04 mov eax, DWORD PTR L$[rbp] - 00714 83 e8 06 sub eax, 6 - 00717 89 45 04 mov DWORD PTR L$[rbp], eax + 00716 8b 45 04 mov eax, DWORD PTR L$[rbp] + 00719 83 e8 06 sub eax, 6 + 0071c 89 45 04 mov DWORD PTR L$[rbp], eax $LN50@stbi__proc: $LN48@stbi__proc: $LN45@stbi__proc: @@ -30225,44 +30400,45 @@ $LN45@stbi__proc: ; 2673 : ; 2674 : stbi__skip(z->s, L); - 0071a 8b 55 04 mov edx, DWORD PTR L$[rbp] - 0071d 48 8b 85 00 04 + 0071f 8b 55 04 mov edx, DWORD PTR L$[rbp] + 00722 48 8b 85 00 04 00 00 mov rax, QWORD PTR z$[rbp] - 00724 48 8b 08 mov rcx, QWORD PTR [rax] - 00727 e8 00 00 00 00 call stbi__skip + 00729 48 8b 08 mov rcx, QWORD PTR [rax] + 0072c e8 00 00 00 00 call stbi__skip + 00731 90 npad 1 ; 2675 : return 1; - 0072c b8 01 00 00 00 mov eax, 1 - 00731 eb 0c jmp SHORT $LN1@stbi__proc + 00732 b8 01 00 00 00 mov eax, 1 + 00737 eb 0c jmp SHORT $LN1@stbi__proc $LN38@stbi__proc: ; 2676 : } ; 2677 : ; 2678 : return stbi__err("unknown marker", "Corrupt JPEG"); - 00733 48 8d 0d 00 00 + 00739 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0P@NNGPHMMK@unknown?5marker@ - 0073a e8 00 00 00 00 call stbi__err + 00740 e8 00 00 00 00 call stbi__err $LN1@stbi__proc: ; 2679 : } - 0073f 48 8b f8 mov rdi, rax - 00742 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00746 48 8d 15 00 00 + 00745 48 8b f8 mov rdi, rax + 00748 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 0074c 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__process_marker$rtcFrameData - 0074d e8 00 00 00 00 call _RTC_CheckStackVars - 00752 48 8b c7 mov rax, rdi - 00755 48 8b 8d d8 03 + 00753 e8 00 00 00 00 call _RTC_CheckStackVars + 00758 48 8b c7 mov rax, rdi + 0075b 48 8b 8d d8 03 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 0075c 48 33 cd xor rcx, rbp - 0075f e8 00 00 00 00 call __security_check_cookie - 00764 48 8d a5 e8 03 + 00762 48 33 cd xor rcx, rbp + 00765 e8 00 00 00 00 call __security_check_cookie + 0076a 48 8d a5 e8 03 00 00 lea rsp, QWORD PTR [rbp+1000] - 0076b 5f pop rdi - 0076c 5d pop rbp - 0076d c3 ret 0 + 00771 5f pop rdi + 00772 5d pop rbp + 00773 c3 ret 0 stbi__process_marker ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -30289,195 +30465,198 @@ stbi__jpeg_finish PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 2559 : if (z->progressive) { - 0001f 48 8b 85 a0 01 + 00020 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 00026 83 b8 30 48 00 + 00027 83 b8 30 48 00 00 00 cmp DWORD PTR [rax+18480], 0 - 0002d 0f 84 af 01 00 + 0002e 0f 84 b1 01 00 00 je $LN11@stbi__jpeg ; 2560 : // dequantize and idct the data ; 2561 : int i, j, n; ; 2562 : for (n = 0; n < z->s->img_n; ++n) { - 00033 c7 45 44 00 00 + 00034 c7 45 44 00 00 00 00 mov DWORD PTR n$3[rbp], 0 - 0003a eb 08 jmp SHORT $LN4@stbi__jpeg + 0003b eb 08 jmp SHORT $LN4@stbi__jpeg $LN2@stbi__jpeg: - 0003c 8b 45 44 mov eax, DWORD PTR n$3[rbp] - 0003f ff c0 inc eax - 00041 89 45 44 mov DWORD PTR n$3[rbp], eax + 0003d 8b 45 44 mov eax, DWORD PTR n$3[rbp] + 00040 ff c0 inc eax + 00042 89 45 44 mov DWORD PTR n$3[rbp], eax $LN4@stbi__jpeg: - 00044 48 8b 85 a0 01 + 00045 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 0004b 48 8b 00 mov rax, QWORD PTR [rax] - 0004e 8b 40 08 mov eax, DWORD PTR [rax+8] - 00051 39 45 44 cmp DWORD PTR n$3[rbp], eax - 00054 0f 8d 88 01 00 + 0004c 48 8b 00 mov rax, QWORD PTR [rax] + 0004f 8b 40 08 mov eax, DWORD PTR [rax+8] + 00052 39 45 44 cmp DWORD PTR n$3[rbp], eax + 00055 0f 8d 8a 01 00 00 jge $LN3@stbi__jpeg ; 2563 : int w = (z->img_comp[n].x + 7) >> 3; - 0005a 48 63 45 44 movsxd rax, DWORD PTR n$3[rbp] - 0005e 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00062 48 8b 8d a0 01 + 0005b 48 63 45 44 movsxd rax, DWORD PTR n$3[rbp] + 0005f 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00063 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00069 8b 84 01 bc 46 + 0006a 8b 84 01 bc 46 00 00 mov eax, DWORD PTR [rcx+rax+18108] - 00070 83 c0 07 add eax, 7 - 00073 c1 f8 03 sar eax, 3 - 00076 89 45 64 mov DWORD PTR w$4[rbp], eax + 00071 83 c0 07 add eax, 7 + 00074 c1 f8 03 sar eax, 3 + 00077 89 45 64 mov DWORD PTR w$4[rbp], eax ; 2564 : int h = (z->img_comp[n].y + 7) >> 3; - 00079 48 63 45 44 movsxd rax, DWORD PTR n$3[rbp] - 0007d 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00081 48 8b 8d a0 01 + 0007a 48 63 45 44 movsxd rax, DWORD PTR n$3[rbp] + 0007e 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00082 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00088 8b 84 01 c0 46 + 00089 8b 84 01 c0 46 00 00 mov eax, DWORD PTR [rcx+rax+18112] - 0008f 83 c0 07 add eax, 7 - 00092 c1 f8 03 sar eax, 3 - 00095 89 85 84 00 00 + 00090 83 c0 07 add eax, 7 + 00093 c1 f8 03 sar eax, 3 + 00096 89 85 84 00 00 00 mov DWORD PTR h$5[rbp], eax ; 2565 : for (j = 0; j < h; ++j) { - 0009b c7 45 24 00 00 + 0009c c7 45 24 00 00 00 00 mov DWORD PTR j$2[rbp], 0 - 000a2 eb 08 jmp SHORT $LN7@stbi__jpeg + 000a3 eb 08 jmp SHORT $LN7@stbi__jpeg $LN5@stbi__jpeg: - 000a4 8b 45 24 mov eax, DWORD PTR j$2[rbp] - 000a7 ff c0 inc eax - 000a9 89 45 24 mov DWORD PTR j$2[rbp], eax + 000a5 8b 45 24 mov eax, DWORD PTR j$2[rbp] + 000a8 ff c0 inc eax + 000aa 89 45 24 mov DWORD PTR j$2[rbp], eax $LN7@stbi__jpeg: - 000ac 8b 85 84 00 00 + 000ad 8b 85 84 00 00 00 mov eax, DWORD PTR h$5[rbp] - 000b2 39 45 24 cmp DWORD PTR j$2[rbp], eax - 000b5 0f 8d 22 01 00 + 000b3 39 45 24 cmp DWORD PTR j$2[rbp], eax + 000b6 0f 8d 24 01 00 00 jge $LN6@stbi__jpeg ; 2566 : for (i = 0; i < w; ++i) { - 000bb c7 45 04 00 00 + 000bc c7 45 04 00 00 00 00 mov DWORD PTR i$1[rbp], 0 - 000c2 eb 08 jmp SHORT $LN10@stbi__jpeg + 000c3 eb 08 jmp SHORT $LN10@stbi__jpeg $LN8@stbi__jpeg: - 000c4 8b 45 04 mov eax, DWORD PTR i$1[rbp] - 000c7 ff c0 inc eax - 000c9 89 45 04 mov DWORD PTR i$1[rbp], eax + 000c5 8b 45 04 mov eax, DWORD PTR i$1[rbp] + 000c8 ff c0 inc eax + 000ca 89 45 04 mov DWORD PTR i$1[rbp], eax $LN10@stbi__jpeg: - 000cc 8b 45 64 mov eax, DWORD PTR w$4[rbp] - 000cf 39 45 04 cmp DWORD PTR i$1[rbp], eax - 000d2 0f 8d 00 01 00 + 000cd 8b 45 64 mov eax, DWORD PTR w$4[rbp] + 000d0 39 45 04 cmp DWORD PTR i$1[rbp], eax + 000d3 0f 8d 02 01 00 00 jge $LN9@stbi__jpeg ; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); - 000d8 48 63 45 44 movsxd rax, DWORD PTR n$3[rbp] - 000dc 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 000e0 48 63 4d 44 movsxd rcx, DWORD PTR n$3[rbp] - 000e4 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 000e8 48 8b 95 a0 01 + 000d9 48 63 45 44 movsxd rax, DWORD PTR n$3[rbp] + 000dd 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 000e1 48 63 4d 44 movsxd rcx, DWORD PTR n$3[rbp] + 000e5 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 000e9 48 8b 95 a0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 000ef 44 8b 45 24 mov r8d, DWORD PTR j$2[rbp] - 000f3 44 0f af 84 0a + 000f0 44 8b 45 24 mov r8d, DWORD PTR j$2[rbp] + 000f4 44 0f af 84 0a f8 46 00 00 imul r8d, DWORD PTR [rdx+rcx+18168] - 000fc 41 8b c8 mov ecx, r8d - 000ff 8b 55 04 mov edx, DWORD PTR i$1[rbp] - 00102 03 d1 add edx, ecx - 00104 8b ca mov ecx, edx - 00106 6b c9 40 imul ecx, ecx, 64 ; 00000040H - 00109 48 63 c9 movsxd rcx, ecx - 0010c 48 8b 95 a0 01 + 000fd 41 8b c8 mov ecx, r8d + 00100 8b 55 04 mov edx, DWORD PTR i$1[rbp] + 00103 03 d1 add edx, ecx + 00105 8b ca mov ecx, edx + 00107 6b c9 40 imul ecx, ecx, 64 ; 00000040H + 0010a 48 63 c9 movsxd rcx, ecx + 0010d 48 8b 95 a0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 00113 48 8b 84 02 f0 + 00114 48 8b 84 02 f0 46 00 00 mov rax, QWORD PTR [rdx+rax+18160] - 0011b 48 8d 04 48 lea rax, QWORD PTR [rax+rcx*2] - 0011f 48 89 85 a8 00 + 0011c 48 8d 04 48 lea rax, QWORD PTR [rax+rcx*2] + 00120 48 89 85 a8 00 00 00 mov QWORD PTR data$6[rbp], rax ; 2568 : stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); - 00126 48 63 45 44 movsxd rax, DWORD PTR n$3[rbp] - 0012a 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0012e 48 8b 8d a0 01 + 00127 48 63 45 44 movsxd rax, DWORD PTR n$3[rbp] + 0012b 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0012f 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 00135 48 63 84 01 ac + 00136 48 63 84 01 ac 46 00 00 movsxd rax, DWORD PTR [rcx+rax+18092] - 0013d 48 69 c0 80 00 + 0013e 48 69 c0 80 00 00 00 imul rax, rax, 128 ; 00000080H - 00144 48 8b 8d a0 01 + 00145 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR z$[rbp] - 0014b 48 8d 84 01 88 + 0014c 48 8d 84 01 88 34 00 00 lea rax, QWORD PTR [rcx+rax+13448] - 00153 48 8b d0 mov rdx, rax - 00156 48 8b 8d a8 00 + 00154 48 8b d0 mov rdx, rax + 00157 48 8b 8d a8 00 00 00 mov rcx, QWORD PTR data$6[rbp] - 0015d e8 00 00 00 00 call stbi__jpeg_dequantize + 0015e e8 00 00 00 00 call stbi__jpeg_dequantize + 00163 90 npad 1 ; 2569 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); - 00162 48 63 45 44 movsxd rax, DWORD PTR n$3[rbp] - 00166 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0016a 48 63 4d 44 movsxd rcx, DWORD PTR n$3[rbp] - 0016e 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00172 48 63 55 44 movsxd rdx, DWORD PTR n$3[rbp] - 00176 48 6b d2 60 imul rdx, rdx, 96 ; 00000060H - 0017a 4c 8b 85 a0 01 + 00164 48 63 45 44 movsxd rax, DWORD PTR n$3[rbp] + 00168 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0016c 48 63 4d 44 movsxd rcx, DWORD PTR n$3[rbp] + 00170 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00174 48 63 55 44 movsxd rdx, DWORD PTR n$3[rbp] + 00178 48 6b d2 60 imul rdx, rdx, 96 ; 00000060H + 0017c 4c 8b 85 a0 01 00 00 mov r8, QWORD PTR z$[rbp] - 00181 41 8b 94 10 c4 + 00183 41 8b 94 10 c4 46 00 00 mov edx, DWORD PTR [r8+rdx+18116] - 00189 0f af 55 24 imul edx, DWORD PTR j$2[rbp] - 0018d c1 e2 03 shl edx, 3 - 00190 48 63 d2 movsxd rdx, edx - 00193 4c 8b 85 a0 01 + 0018b 0f af 55 24 imul edx, DWORD PTR j$2[rbp] + 0018f c1 e2 03 shl edx, 3 + 00192 48 63 d2 movsxd rdx, edx + 00195 4c 8b 85 a0 01 00 00 mov r8, QWORD PTR z$[rbp] - 0019a 49 8b 8c 08 d0 + 0019c 49 8b 8c 08 d0 46 00 00 mov rcx, QWORD PTR [r8+rcx+18128] - 001a2 48 03 ca add rcx, rdx - 001a5 8b 55 04 mov edx, DWORD PTR i$1[rbp] - 001a8 c1 e2 03 shl edx, 3 - 001ab 48 63 d2 movsxd rdx, edx - 001ae 48 03 ca add rcx, rdx - 001b1 4c 8b 85 a8 00 + 001a4 48 03 ca add rcx, rdx + 001a7 8b 55 04 mov edx, DWORD PTR i$1[rbp] + 001aa c1 e2 03 shl edx, 3 + 001ad 48 63 d2 movsxd rdx, edx + 001b0 48 03 ca add rcx, rdx + 001b3 4c 8b 85 a8 00 00 00 mov r8, QWORD PTR data$6[rbp] - 001b8 48 8b 95 a0 01 + 001ba 48 8b 95 a0 01 00 00 mov rdx, QWORD PTR z$[rbp] - 001bf 8b 94 02 c4 46 + 001c1 8b 94 02 c4 46 00 00 mov edx, DWORD PTR [rdx+rax+18116] - 001c6 48 8b 85 a0 01 + 001c8 48 8b 85 a0 01 00 00 mov rax, QWORD PTR z$[rbp] - 001cd ff 90 70 48 00 + 001cf ff 90 70 48 00 00 call QWORD PTR [rax+18544] + 001d5 90 npad 1 ; 2570 : } - 001d3 e9 ec fe ff ff jmp $LN8@stbi__jpeg + 001d6 e9 ea fe ff ff jmp $LN8@stbi__jpeg $LN9@stbi__jpeg: ; 2571 : } - 001d8 e9 c7 fe ff ff jmp $LN5@stbi__jpeg + 001db e9 c5 fe ff ff jmp $LN5@stbi__jpeg $LN6@stbi__jpeg: ; 2572 : } - 001dd e9 5a fe ff ff jmp $LN2@stbi__jpeg + 001e0 e9 58 fe ff ff jmp $LN2@stbi__jpeg $LN3@stbi__jpeg: $LN11@stbi__jpeg: ; 2573 : } ; 2574 : } - 001e2 48 8d a5 88 01 + 001e5 48 8d a5 88 01 00 00 lea rsp, QWORD PTR [rbp+392] - 001e9 5f pop rdi - 001ea 5d pop rbp - 001eb c3 ret 0 + 001ec 5f pop rdi + 001ed 5d pop rbp + 001ee c3 ret 0 stbi__jpeg_finish ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -30501,46 +30680,47 @@ stbi__jpeg_dequantize PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 2552 : int i; ; 2553 : for (i = 0; i < 64; ++i) - 00024 c7 45 04 00 00 + 00025 c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0002b eb 08 jmp SHORT $LN4@stbi__jpeg + 0002c eb 08 jmp SHORT $LN4@stbi__jpeg $LN2@stbi__jpeg: - 0002d 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00030 ff c0 inc eax - 00032 89 45 04 mov DWORD PTR i$[rbp], eax + 0002e 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00031 ff c0 inc eax + 00033 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__jpeg: - 00035 83 7d 04 40 cmp DWORD PTR i$[rbp], 64 ; 00000040H - 00039 7d 32 jge SHORT $LN3@stbi__jpeg + 00036 83 7d 04 40 cmp DWORD PTR i$[rbp], 64 ; 00000040H + 0003a 7d 32 jge SHORT $LN3@stbi__jpeg ; 2554 : data[i] *= dequant[i]; - 0003b 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 0003f 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 00043 48 8b 95 08 01 + 0003c 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00040 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 00044 48 8b 95 08 01 00 00 mov rdx, QWORD PTR dequant$[rbp] - 0004a 0f b7 0c 4a movzx ecx, WORD PTR [rdx+rcx*2] - 0004e 48 8b 95 00 01 + 0004b 0f b7 0c 4a movzx ecx, WORD PTR [rdx+rcx*2] + 0004f 48 8b 95 00 01 00 00 mov rdx, QWORD PTR data$[rbp] - 00055 0f bf 04 42 movsx eax, WORD PTR [rdx+rax*2] - 00059 0f af c1 imul eax, ecx - 0005c 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 00060 48 8b 95 00 01 + 00056 0f bf 04 42 movsx eax, WORD PTR [rdx+rax*2] + 0005a 0f af c1 imul eax, ecx + 0005d 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 00061 48 8b 95 00 01 00 00 mov rdx, QWORD PTR data$[rbp] - 00067 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax - 0006b eb c0 jmp SHORT $LN2@stbi__jpeg + 00068 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax + 0006c eb c0 jmp SHORT $LN2@stbi__jpeg $LN3@stbi__jpeg: ; 2555 : } - 0006d 48 8d a5 e8 00 + 0006e 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00074 5f pop rdi - 00075 5d pop rbp - 00076 c3 ret 0 + 00075 5f pop rdi + 00076 5d pop rbp + 00077 c3 ret 0 stbi__jpeg_dequantize ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -30581,9 +30761,9 @@ x2$35 = 1220 y2$36 = 1252 data$37 = 1288 tv518 = 1876 -tv400 = 1876 -tv311 = 1876 tv190 = 1876 +tv311 = 1876 +tv400 = 1876 __$ArrayPad$ = 1880 z$ = 1920 stbi__parse_entropy_coded_data PROC ; COMDAT @@ -30610,42 +30790,44 @@ stbi__parse_entropy_coded_data PROC ; COMDAT 0003d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00044 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00049 90 npad 1 ; 2424 : stbi__jpeg_reset(z); - 00049 48 8b 8d 80 07 + 0004a 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00050 e8 00 00 00 00 call stbi__jpeg_reset + 00051 e8 00 00 00 00 call stbi__jpeg_reset + 00056 90 npad 1 ; 2425 : if (!z->progressive) { - 00055 48 8b 85 80 07 + 00057 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 0005c 83 b8 30 48 00 + 0005e 83 b8 30 48 00 00 00 cmp DWORD PTR [rax+18480], 0 - 00063 0f 85 6c 06 00 + 00065 0f 85 72 06 00 00 jne $LN44@stbi__pars ; 2426 : if (z->scan_n == 1) { - 00069 48 8b 85 80 07 + 0006b 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 00070 83 b8 54 48 00 + 00072 83 b8 54 48 00 00 01 cmp DWORD PTR [rax+18516], 1 - 00077 0f 85 ac 02 00 + 00079 0f 85 af 02 00 00 jne $LN46@stbi__pars ; 2427 : int i, j; ; 2428 : STBI_SIMD_ALIGN(short, data[64]); ; 2429 : int n = z->order[0]; - 0007d b8 04 00 00 00 mov eax, 4 - 00082 48 6b c0 00 imul rax, rax, 0 - 00086 48 8b 8d 80 07 + 0007f b8 04 00 00 00 mov eax, 4 + 00084 48 6b c0 00 imul rax, rax, 0 + 00088 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 0008d 8b 84 01 58 48 + 0008f 8b 84 01 58 48 00 00 mov eax, DWORD PTR [rcx+rax+18520] - 00094 89 85 e4 00 00 + 00096 89 85 e4 00 00 00 mov DWORD PTR n$8[rbp], eax ; 2430 : // non-interleaved data, we just need to process one block at a time, @@ -30654,251 +30836,254 @@ stbi__parse_entropy_coded_data PROC ; COMDAT ; 2433 : // component has, independent of interleaved MCU blocking and such ; 2434 : int w = (z->img_comp[n].x + 7) >> 3; - 0009a 48 63 85 e4 00 + 0009c 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR n$8[rbp] - 000a1 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 000a5 48 8b 8d 80 07 + 000a3 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 000a7 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 000ac 8b 84 01 bc 46 + 000ae 8b 84 01 bc 46 00 00 mov eax, DWORD PTR [rcx+rax+18108] - 000b3 83 c0 07 add eax, 7 - 000b6 c1 f8 03 sar eax, 3 - 000b9 89 85 04 01 00 + 000b5 83 c0 07 add eax, 7 + 000b8 c1 f8 03 sar eax, 3 + 000bb 89 85 04 01 00 00 mov DWORD PTR w$9[rbp], eax ; 2435 : int h = (z->img_comp[n].y + 7) >> 3; - 000bf 48 63 85 e4 00 + 000c1 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR n$8[rbp] - 000c6 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 000ca 48 8b 8d 80 07 + 000c8 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 000cc 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 000d1 8b 84 01 c0 46 + 000d3 8b 84 01 c0 46 00 00 mov eax, DWORD PTR [rcx+rax+18112] - 000d8 83 c0 07 add eax, 7 - 000db c1 f8 03 sar eax, 3 - 000de 89 85 24 01 00 + 000da 83 c0 07 add eax, 7 + 000dd c1 f8 03 sar eax, 3 + 000e0 89 85 24 01 00 00 mov DWORD PTR h$10[rbp], eax ; 2436 : for (j = 0; j < h; ++j) { - 000e4 c7 45 24 00 00 + 000e6 c7 45 24 00 00 00 00 mov DWORD PTR j$6[rbp], 0 - 000eb eb 08 jmp SHORT $LN4@stbi__pars + 000ed eb 08 jmp SHORT $LN4@stbi__pars $LN2@stbi__pars: - 000ed 8b 45 24 mov eax, DWORD PTR j$6[rbp] - 000f0 ff c0 inc eax - 000f2 89 45 24 mov DWORD PTR j$6[rbp], eax + 000ef 8b 45 24 mov eax, DWORD PTR j$6[rbp] + 000f2 ff c0 inc eax + 000f4 89 45 24 mov DWORD PTR j$6[rbp], eax $LN4@stbi__pars: - 000f5 8b 85 24 01 00 + 000f7 8b 85 24 01 00 00 mov eax, DWORD PTR h$10[rbp] - 000fb 39 45 24 cmp DWORD PTR j$6[rbp], eax - 000fe 0f 8d 16 02 00 + 000fd 39 45 24 cmp DWORD PTR j$6[rbp], eax + 00100 0f 8d 19 02 00 00 jge $LN3@stbi__pars ; 2437 : for (i = 0; i < w; ++i) { - 00104 c7 45 04 00 00 + 00106 c7 45 04 00 00 00 00 mov DWORD PTR i$5[rbp], 0 - 0010b eb 08 jmp SHORT $LN7@stbi__pars + 0010d eb 08 jmp SHORT $LN7@stbi__pars $LN5@stbi__pars: - 0010d 8b 45 04 mov eax, DWORD PTR i$5[rbp] - 00110 ff c0 inc eax - 00112 89 45 04 mov DWORD PTR i$5[rbp], eax + 0010f 8b 45 04 mov eax, DWORD PTR i$5[rbp] + 00112 ff c0 inc eax + 00114 89 45 04 mov DWORD PTR i$5[rbp], eax $LN7@stbi__pars: - 00115 8b 85 04 01 00 + 00117 8b 85 04 01 00 00 mov eax, DWORD PTR w$9[rbp] - 0011b 39 45 04 cmp DWORD PTR i$5[rbp], eax - 0011e 0f 8d f1 01 00 + 0011d 39 45 04 cmp DWORD PTR i$5[rbp], eax + 00120 0f 8d f4 01 00 00 jge $LN6@stbi__pars ; 2438 : int ha = z->img_comp[n].ha; - 00124 48 63 85 e4 00 + 00126 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR n$8[rbp] - 0012b 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0012f 48 8b 8d 80 07 + 0012d 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00131 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00136 8b 84 01 b4 46 + 00138 8b 84 01 b4 46 00 00 mov eax, DWORD PTR [rcx+rax+18100] - 0013d 89 85 44 01 00 + 0013f 89 85 44 01 00 00 mov DWORD PTR ha$11[rbp], eax ; 2439 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; - 00143 48 63 85 e4 00 + 00145 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR n$8[rbp] - 0014a 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0014e 48 8b 8d 80 07 + 0014c 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00150 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00155 48 63 84 01 ac + 00157 48 63 84 01 ac 46 00 00 movsxd rax, DWORD PTR [rcx+rax+18092] - 0015d 48 69 c0 80 00 + 0015f 48 69 c0 80 00 00 00 imul rax, rax, 128 ; 00000080H - 00164 48 8b 8d 80 07 + 00166 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 0016b 48 8d 84 01 88 + 0016d 48 8d 84 01 88 34 00 00 lea rax, QWORD PTR [rcx+rax+13448] - 00173 48 63 8d 44 01 + 00175 48 63 8d 44 01 00 00 movsxd rcx, DWORD PTR ha$11[rbp] - 0017a 48 69 c9 00 04 + 0017c 48 69 c9 00 04 00 00 imul rcx, rcx, 1024 ; 00000400H - 00181 48 8b 95 80 07 + 00183 48 8b 95 80 07 00 00 mov rdx, QWORD PTR z$[rbp] - 00188 48 8d 8c 0a 88 + 0018a 48 8d 8c 0a 88 36 00 00 lea rcx, QWORD PTR [rdx+rcx+13960] - 00190 48 63 95 44 01 + 00192 48 63 95 44 01 00 00 movsxd rdx, DWORD PTR ha$11[rbp] - 00197 48 69 d2 90 06 + 00199 48 69 d2 90 06 00 00 imul rdx, rdx, 1680 ; 00000690H - 0019e 4c 8b 85 80 07 + 001a0 4c 8b 85 80 07 00 00 mov r8, QWORD PTR z$[rbp] - 001a5 49 8d 94 10 48 + 001a7 49 8d 94 10 48 1a 00 00 lea rdx, QWORD PTR [r8+rdx+6728] - 001ad 4c 63 85 e4 00 + 001af 4c 63 85 e4 00 00 00 movsxd r8, DWORD PTR n$8[rbp] - 001b4 4d 6b c0 60 imul r8, r8, 96 ; 00000060H - 001b8 4c 8b 8d 80 07 + 001b6 4d 6b c0 60 imul r8, r8, 96 ; 00000060H + 001ba 4c 8b 8d 80 07 00 00 mov r9, QWORD PTR z$[rbp] - 001bf 4f 63 84 01 b0 + 001c1 4f 63 84 01 b0 46 00 00 movsxd r8, DWORD PTR [r9+r8+18096] - 001c7 4d 69 c0 90 06 + 001c9 4d 69 c0 90 06 00 00 imul r8, r8, 1680 ; 00000690H - 001ce 4c 8b 8d 80 07 + 001d0 4c 8b 8d 80 07 00 00 mov r9, QWORD PTR z$[rbp] - 001d5 4f 8d 44 01 08 lea r8, QWORD PTR [r9+r8+8] - 001da 48 89 44 24 30 mov QWORD PTR [rsp+48], rax - 001df 8b 85 e4 00 00 + 001d7 4f 8d 44 01 08 lea r8, QWORD PTR [r9+r8+8] + 001dc 48 89 44 24 30 mov QWORD PTR [rsp+48], rax + 001e1 8b 85 e4 00 00 00 mov eax, DWORD PTR n$8[rbp] - 001e5 89 44 24 28 mov DWORD PTR [rsp+40], eax - 001e9 48 89 4c 24 20 mov QWORD PTR [rsp+32], rcx - 001ee 4c 8b ca mov r9, rdx - 001f1 48 8d 55 50 lea rdx, QWORD PTR data$7[rbp] - 001f5 48 8b 8d 80 07 + 001e7 89 44 24 28 mov DWORD PTR [rsp+40], eax + 001eb 48 89 4c 24 20 mov QWORD PTR [rsp+32], rcx + 001f0 4c 8b ca mov r9, rdx + 001f3 48 8d 55 50 lea rdx, QWORD PTR data$7[rbp] + 001f7 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 001fc e8 00 00 00 00 call stbi__jpeg_decode_block - 00201 85 c0 test eax, eax - 00203 75 07 jne SHORT $LN48@stbi__pars - 00205 33 c0 xor eax, eax - 00207 e9 65 0a 00 00 jmp $LN1@stbi__pars + 001fe e8 00 00 00 00 call stbi__jpeg_decode_block + 00203 85 c0 test eax, eax + 00205 75 07 jne SHORT $LN48@stbi__pars + 00207 33 c0 xor eax, eax + 00209 e9 6f 0a 00 00 jmp $LN1@stbi__pars $LN48@stbi__pars: ; 2440 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); - 0020c 48 63 85 e4 00 + 0020e 48 63 85 e4 00 00 00 movsxd rax, DWORD PTR n$8[rbp] - 00213 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00217 48 63 8d e4 00 + 00215 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00219 48 63 8d e4 00 00 00 movsxd rcx, DWORD PTR n$8[rbp] - 0021e 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00222 48 63 95 e4 00 + 00220 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00224 48 63 95 e4 00 00 00 movsxd rdx, DWORD PTR n$8[rbp] - 00229 48 6b d2 60 imul rdx, rdx, 96 ; 00000060H - 0022d 4c 8b 85 80 07 + 0022b 48 6b d2 60 imul rdx, rdx, 96 ; 00000060H + 0022f 4c 8b 85 80 07 00 00 mov r8, QWORD PTR z$[rbp] - 00234 41 8b 94 10 c4 + 00236 41 8b 94 10 c4 46 00 00 mov edx, DWORD PTR [r8+rdx+18116] - 0023c 0f af 55 24 imul edx, DWORD PTR j$6[rbp] - 00240 c1 e2 03 shl edx, 3 - 00243 48 63 d2 movsxd rdx, edx - 00246 4c 8b 85 80 07 + 0023e 0f af 55 24 imul edx, DWORD PTR j$6[rbp] + 00242 c1 e2 03 shl edx, 3 + 00245 48 63 d2 movsxd rdx, edx + 00248 4c 8b 85 80 07 00 00 mov r8, QWORD PTR z$[rbp] - 0024d 49 8b 8c 08 d0 + 0024f 49 8b 8c 08 d0 46 00 00 mov rcx, QWORD PTR [r8+rcx+18128] - 00255 48 03 ca add rcx, rdx - 00258 8b 55 04 mov edx, DWORD PTR i$5[rbp] - 0025b c1 e2 03 shl edx, 3 - 0025e 48 63 d2 movsxd rdx, edx - 00261 48 03 ca add rcx, rdx - 00264 4c 8d 45 50 lea r8, QWORD PTR data$7[rbp] - 00268 48 8b 95 80 07 + 00257 48 03 ca add rcx, rdx + 0025a 8b 55 04 mov edx, DWORD PTR i$5[rbp] + 0025d c1 e2 03 shl edx, 3 + 00260 48 63 d2 movsxd rdx, edx + 00263 48 03 ca add rcx, rdx + 00266 4c 8d 45 50 lea r8, QWORD PTR data$7[rbp] + 0026a 48 8b 95 80 07 00 00 mov rdx, QWORD PTR z$[rbp] - 0026f 8b 94 02 c4 46 + 00271 8b 94 02 c4 46 00 00 mov edx, DWORD PTR [rdx+rax+18116] - 00276 48 8b 85 80 07 + 00278 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 0027d ff 90 70 48 00 + 0027f ff 90 70 48 00 00 call QWORD PTR [rax+18544] + 00285 90 npad 1 ; 2441 : // every data block is an MCU, so countdown the restart interval ; 2442 : if (--z->todo <= 0) { - 00283 48 8b 85 80 07 + 00286 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 0028a 8b 80 6c 48 00 + 0028d 8b 80 6c 48 00 00 mov eax, DWORD PTR [rax+18540] - 00290 ff c8 dec eax - 00292 89 85 54 07 00 + 00293 ff c8 dec eax + 00295 89 85 54 07 00 00 mov DWORD PTR tv190[rbp], eax - 00298 48 8b 85 80 07 + 0029b 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 0029f 8b 8d 54 07 00 + 002a2 8b 8d 54 07 00 00 mov ecx, DWORD PTR tv190[rbp] - 002a5 89 88 6c 48 00 + 002a8 89 88 6c 48 00 00 mov DWORD PTR [rax+18540], ecx - 002ab 83 bd 54 07 00 + 002ae 83 bd 54 07 00 00 00 cmp DWORD PTR tv190[rbp], 0 - 002b2 7f 5c jg SHORT $LN49@stbi__pars + 002b5 7f 5e jg SHORT $LN49@stbi__pars ; 2443 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - 002b4 48 8b 85 80 07 + 002b7 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 002bb 83 b8 24 48 00 + 002be 83 b8 24 48 00 00 18 cmp DWORD PTR [rax+18468], 24 - 002c2 7d 0c jge SHORT $LN50@stbi__pars - 002c4 48 8b 8d 80 07 + 002c5 7d 0d jge SHORT $LN50@stbi__pars + 002c7 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 002cb e8 00 00 00 00 call stbi__grow_buffer_unsafe + 002ce e8 00 00 00 00 call stbi__grow_buffer_unsafe + 002d3 90 npad 1 $LN50@stbi__pars: ; 2444 : // if it's NOT a restart, then just bail, so we get corrupt data ; 2445 : // rather than no data ; 2446 : if (!STBI__RESTART(z->marker)) return 1; - 002d0 48 8b 85 80 07 + 002d4 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 002d7 0f b6 80 28 48 + 002db 0f b6 80 28 48 00 00 movzx eax, BYTE PTR [rax+18472] - 002de 3d d0 00 00 00 cmp eax, 208 ; 000000d0H - 002e3 7c 15 jl SHORT $LN52@stbi__pars - 002e5 48 8b 85 80 07 + 002e2 3d d0 00 00 00 cmp eax, 208 ; 000000d0H + 002e7 7c 15 jl SHORT $LN52@stbi__pars + 002e9 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 002ec 0f b6 80 28 48 + 002f0 0f b6 80 28 48 00 00 movzx eax, BYTE PTR [rax+18472] - 002f3 3d d7 00 00 00 cmp eax, 215 ; 000000d7H - 002f8 7e 0a jle SHORT $LN51@stbi__pars + 002f7 3d d7 00 00 00 cmp eax, 215 ; 000000d7H + 002fc 7e 0a jle SHORT $LN51@stbi__pars $LN52@stbi__pars: - 002fa b8 01 00 00 00 mov eax, 1 - 002ff e9 6d 09 00 00 jmp $LN1@stbi__pars + 002fe b8 01 00 00 00 mov eax, 1 + 00303 e9 75 09 00 00 jmp $LN1@stbi__pars $LN51@stbi__pars: ; 2447 : stbi__jpeg_reset(z); - 00304 48 8b 8d 80 07 + 00308 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 0030b e8 00 00 00 00 call stbi__jpeg_reset + 0030f e8 00 00 00 00 call stbi__jpeg_reset + 00314 90 npad 1 $LN49@stbi__pars: ; 2448 : } ; 2449 : } - 00310 e9 f8 fd ff ff jmp $LN5@stbi__pars + 00315 e9 f5 fd ff ff jmp $LN5@stbi__pars $LN6@stbi__pars: ; 2450 : } - 00315 e9 d3 fd ff ff jmp $LN2@stbi__pars + 0031a e9 d0 fd ff ff jmp $LN2@stbi__pars $LN3@stbi__pars: ; 2451 : return 1; - 0031a b8 01 00 00 00 mov eax, 1 - 0031f e9 4d 09 00 00 jmp $LN1@stbi__pars + 0031f b8 01 00 00 00 mov eax, 1 + 00324 e9 54 09 00 00 jmp $LN1@stbi__pars ; 2452 : } - 00324 e9 a7 03 00 00 jmp $LN47@stbi__pars + 00329 e9 aa 03 00 00 jmp $LN47@stbi__pars $LN46@stbi__pars: ; 2453 : else { // interleaved @@ -30906,391 +31091,394 @@ $LN46@stbi__pars: ; 2455 : STBI_SIMD_ALIGN(short, data[64]); ; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { - 00329 c7 85 84 01 00 + 0032e c7 85 84 01 00 00 00 00 00 00 mov DWORD PTR j$13[rbp], 0 - 00333 eb 0e jmp SHORT $LN10@stbi__pars + 00338 eb 0e jmp SHORT $LN10@stbi__pars $LN8@stbi__pars: - 00335 8b 85 84 01 00 + 0033a 8b 85 84 01 00 00 mov eax, DWORD PTR j$13[rbp] - 0033b ff c0 inc eax - 0033d 89 85 84 01 00 + 00340 ff c0 inc eax + 00342 89 85 84 01 00 00 mov DWORD PTR j$13[rbp], eax $LN10@stbi__pars: - 00343 48 8b 85 80 07 + 00348 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 0034a 8b 80 94 46 00 + 0034f 8b 80 94 46 00 00 mov eax, DWORD PTR [rax+18068] - 00350 39 85 84 01 00 + 00355 39 85 84 01 00 00 cmp DWORD PTR j$13[rbp], eax - 00356 0f 8d 6a 03 00 + 0035b 0f 8d 6d 03 00 00 jge $LN9@stbi__pars ; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { - 0035c c7 85 64 01 00 + 00361 c7 85 64 01 00 00 00 00 00 00 mov DWORD PTR i$12[rbp], 0 - 00366 eb 0e jmp SHORT $LN13@stbi__pars + 0036b eb 0e jmp SHORT $LN13@stbi__pars $LN11@stbi__pars: - 00368 8b 85 64 01 00 + 0036d 8b 85 64 01 00 00 mov eax, DWORD PTR i$12[rbp] - 0036e ff c0 inc eax - 00370 89 85 64 01 00 + 00373 ff c0 inc eax + 00375 89 85 64 01 00 00 mov DWORD PTR i$12[rbp], eax $LN13@stbi__pars: - 00376 48 8b 85 80 07 + 0037b 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 0037d 8b 80 90 46 00 + 00382 8b 80 90 46 00 00 mov eax, DWORD PTR [rax+18064] - 00383 39 85 64 01 00 + 00388 39 85 64 01 00 00 cmp DWORD PTR i$12[rbp], eax - 00389 0f 8d 32 03 00 + 0038e 0f 8d 35 03 00 00 jge $LN12@stbi__pars ; 2458 : // scan an interleaved mcu... process scan_n components in order ; 2459 : for (k = 0; k < z->scan_n; ++k) { - 0038f c7 85 a4 01 00 + 00394 c7 85 a4 01 00 00 00 00 00 00 mov DWORD PTR k$14[rbp], 0 - 00399 eb 0e jmp SHORT $LN16@stbi__pars + 0039e eb 0e jmp SHORT $LN16@stbi__pars $LN14@stbi__pars: - 0039b 8b 85 a4 01 00 + 003a0 8b 85 a4 01 00 00 mov eax, DWORD PTR k$14[rbp] - 003a1 ff c0 inc eax - 003a3 89 85 a4 01 00 + 003a6 ff c0 inc eax + 003a8 89 85 a4 01 00 00 mov DWORD PTR k$14[rbp], eax $LN16@stbi__pars: - 003a9 48 8b 85 80 07 + 003ae 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 003b0 8b 80 54 48 00 + 003b5 8b 80 54 48 00 00 mov eax, DWORD PTR [rax+18516] - 003b6 39 85 a4 01 00 + 003bb 39 85 a4 01 00 00 cmp DWORD PTR k$14[rbp], eax - 003bc 0f 8d 6d 02 00 + 003c1 0f 8d 6e 02 00 00 jge $LN15@stbi__pars ; 2460 : int n = z->order[k]; - 003c2 48 63 85 a4 01 + 003c7 48 63 85 a4 01 00 00 movsxd rax, DWORD PTR k$14[rbp] - 003c9 48 8b 8d 80 07 + 003ce 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 003d0 8b 84 81 58 48 + 003d5 8b 84 81 58 48 00 00 mov eax, DWORD PTR [rcx+rax*4+18520] - 003d7 89 85 a4 02 00 + 003dc 89 85 a4 02 00 00 mov DWORD PTR n$18[rbp], eax ; 2461 : // scan out an mcu's worth of this component; that's just determined ; 2462 : // by the basic H and V specified for the component ; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { - 003dd c7 85 e4 01 00 + 003e2 c7 85 e4 01 00 00 00 00 00 00 mov DWORD PTR y$16[rbp], 0 - 003e7 eb 0e jmp SHORT $LN19@stbi__pars + 003ec eb 0e jmp SHORT $LN19@stbi__pars $LN17@stbi__pars: - 003e9 8b 85 e4 01 00 + 003ee 8b 85 e4 01 00 00 mov eax, DWORD PTR y$16[rbp] - 003ef ff c0 inc eax - 003f1 89 85 e4 01 00 + 003f4 ff c0 inc eax + 003f6 89 85 e4 01 00 00 mov DWORD PTR y$16[rbp], eax $LN19@stbi__pars: - 003f7 48 63 85 a4 02 + 003fc 48 63 85 a4 02 00 00 movsxd rax, DWORD PTR n$18[rbp] - 003fe 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00402 48 8b 8d 80 07 + 00403 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00407 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00409 8b 84 01 a8 46 + 0040e 8b 84 01 a8 46 00 00 mov eax, DWORD PTR [rcx+rax+18088] - 00410 39 85 e4 01 00 + 00415 39 85 e4 01 00 00 cmp DWORD PTR y$16[rbp], eax - 00416 0f 8d 0e 02 00 + 0041b 0f 8d 0f 02 00 00 jge $LN18@stbi__pars ; 2464 : for (x = 0; x < z->img_comp[n].h; ++x) { - 0041c c7 85 c4 01 00 + 00421 c7 85 c4 01 00 00 00 00 00 00 mov DWORD PTR x$15[rbp], 0 - 00426 eb 0e jmp SHORT $LN22@stbi__pars + 0042b eb 0e jmp SHORT $LN22@stbi__pars $LN20@stbi__pars: - 00428 8b 85 c4 01 00 + 0042d 8b 85 c4 01 00 00 mov eax, DWORD PTR x$15[rbp] - 0042e ff c0 inc eax - 00430 89 85 c4 01 00 + 00433 ff c0 inc eax + 00435 89 85 c4 01 00 00 mov DWORD PTR x$15[rbp], eax $LN22@stbi__pars: - 00436 48 63 85 a4 02 + 0043b 48 63 85 a4 02 00 00 movsxd rax, DWORD PTR n$18[rbp] - 0043d 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00441 48 8b 8d 80 07 + 00442 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00446 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00448 8b 84 01 a4 46 + 0044d 8b 84 01 a4 46 00 00 mov eax, DWORD PTR [rcx+rax+18084] - 0044f 39 85 c4 01 00 + 00454 39 85 c4 01 00 00 cmp DWORD PTR x$15[rbp], eax - 00455 0f 8d ca 01 00 + 0045a 0f 8d cb 01 00 00 jge $LN21@stbi__pars ; 2465 : int x2 = (i * z->img_comp[n].h + x) * 8; - 0045b 48 63 85 a4 02 + 00460 48 63 85 a4 02 00 00 movsxd rax, DWORD PTR n$18[rbp] - 00462 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00466 48 8b 8d 80 07 + 00467 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0046b 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 0046d 8b 95 64 01 00 + 00472 8b 95 64 01 00 00 mov edx, DWORD PTR i$12[rbp] - 00473 0f af 94 01 a4 + 00478 0f af 94 01 a4 46 00 00 imul edx, DWORD PTR [rcx+rax+18084] - 0047b 8b c2 mov eax, edx - 0047d 03 85 c4 01 00 + 00480 8b c2 mov eax, edx + 00482 03 85 c4 01 00 00 add eax, DWORD PTR x$15[rbp] - 00483 c1 e0 03 shl eax, 3 - 00486 89 85 c4 02 00 + 00488 c1 e0 03 shl eax, 3 + 0048b 89 85 c4 02 00 00 mov DWORD PTR x2$19[rbp], eax ; 2466 : int y2 = (j * z->img_comp[n].v + y) * 8; - 0048c 48 63 85 a4 02 + 00491 48 63 85 a4 02 00 00 movsxd rax, DWORD PTR n$18[rbp] - 00493 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00497 48 8b 8d 80 07 + 00498 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0049c 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 0049e 8b 95 84 01 00 + 004a3 8b 95 84 01 00 00 mov edx, DWORD PTR j$13[rbp] - 004a4 0f af 94 01 a8 + 004a9 0f af 94 01 a8 46 00 00 imul edx, DWORD PTR [rcx+rax+18088] - 004ac 8b c2 mov eax, edx - 004ae 03 85 e4 01 00 + 004b1 8b c2 mov eax, edx + 004b3 03 85 e4 01 00 00 add eax, DWORD PTR y$16[rbp] - 004b4 c1 e0 03 shl eax, 3 - 004b7 89 85 e4 02 00 + 004b9 c1 e0 03 shl eax, 3 + 004bc 89 85 e4 02 00 00 mov DWORD PTR y2$20[rbp], eax ; 2467 : int ha = z->img_comp[n].ha; - 004bd 48 63 85 a4 02 + 004c2 48 63 85 a4 02 00 00 movsxd rax, DWORD PTR n$18[rbp] - 004c4 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 004c8 48 8b 8d 80 07 + 004c9 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 004cd 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 004cf 8b 84 01 b4 46 + 004d4 8b 84 01 b4 46 00 00 mov eax, DWORD PTR [rcx+rax+18100] - 004d6 89 85 04 03 00 + 004db 89 85 04 03 00 00 mov DWORD PTR ha$21[rbp], eax ; 2468 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; - 004dc 48 63 85 a4 02 + 004e1 48 63 85 a4 02 00 00 movsxd rax, DWORD PTR n$18[rbp] - 004e3 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 004e7 48 8b 8d 80 07 + 004e8 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 004ec 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 004ee 48 63 84 01 ac + 004f3 48 63 84 01 ac 46 00 00 movsxd rax, DWORD PTR [rcx+rax+18092] - 004f6 48 69 c0 80 00 + 004fb 48 69 c0 80 00 00 00 imul rax, rax, 128 ; 00000080H - 004fd 48 8b 8d 80 07 + 00502 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00504 48 8d 84 01 88 + 00509 48 8d 84 01 88 34 00 00 lea rax, QWORD PTR [rcx+rax+13448] - 0050c 48 63 8d 04 03 + 00511 48 63 8d 04 03 00 00 movsxd rcx, DWORD PTR ha$21[rbp] - 00513 48 69 c9 00 04 + 00518 48 69 c9 00 04 00 00 imul rcx, rcx, 1024 ; 00000400H - 0051a 48 8b 95 80 07 + 0051f 48 8b 95 80 07 00 00 mov rdx, QWORD PTR z$[rbp] - 00521 48 8d 8c 0a 88 + 00526 48 8d 8c 0a 88 36 00 00 lea rcx, QWORD PTR [rdx+rcx+13960] - 00529 48 63 95 04 03 + 0052e 48 63 95 04 03 00 00 movsxd rdx, DWORD PTR ha$21[rbp] - 00530 48 69 d2 90 06 + 00535 48 69 d2 90 06 00 00 imul rdx, rdx, 1680 ; 00000690H - 00537 4c 8b 85 80 07 + 0053c 4c 8b 85 80 07 00 00 mov r8, QWORD PTR z$[rbp] - 0053e 49 8d 94 10 48 + 00543 49 8d 94 10 48 1a 00 00 lea rdx, QWORD PTR [r8+rdx+6728] - 00546 4c 63 85 a4 02 + 0054b 4c 63 85 a4 02 00 00 movsxd r8, DWORD PTR n$18[rbp] - 0054d 4d 6b c0 60 imul r8, r8, 96 ; 00000060H - 00551 4c 8b 8d 80 07 + 00552 4d 6b c0 60 imul r8, r8, 96 ; 00000060H + 00556 4c 8b 8d 80 07 00 00 mov r9, QWORD PTR z$[rbp] - 00558 4f 63 84 01 b0 + 0055d 4f 63 84 01 b0 46 00 00 movsxd r8, DWORD PTR [r9+r8+18096] - 00560 4d 69 c0 90 06 + 00565 4d 69 c0 90 06 00 00 imul r8, r8, 1680 ; 00000690H - 00567 4c 8b 8d 80 07 + 0056c 4c 8b 8d 80 07 00 00 mov r9, QWORD PTR z$[rbp] - 0056e 4f 8d 44 01 08 lea r8, QWORD PTR [r9+r8+8] - 00573 48 89 44 24 30 mov QWORD PTR [rsp+48], rax - 00578 8b 85 a4 02 00 + 00573 4f 8d 44 01 08 lea r8, QWORD PTR [r9+r8+8] + 00578 48 89 44 24 30 mov QWORD PTR [rsp+48], rax + 0057d 8b 85 a4 02 00 00 mov eax, DWORD PTR n$18[rbp] - 0057e 89 44 24 28 mov DWORD PTR [rsp+40], eax - 00582 48 89 4c 24 20 mov QWORD PTR [rsp+32], rcx - 00587 4c 8b ca mov r9, rdx - 0058a 48 8d 95 10 02 + 00583 89 44 24 28 mov DWORD PTR [rsp+40], eax + 00587 48 89 4c 24 20 mov QWORD PTR [rsp+32], rcx + 0058c 4c 8b ca mov r9, rdx + 0058f 48 8d 95 10 02 00 00 lea rdx, QWORD PTR data$17[rbp] - 00591 48 8b 8d 80 07 + 00596 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00598 e8 00 00 00 00 call stbi__jpeg_decode_block - 0059d 85 c0 test eax, eax - 0059f 75 07 jne SHORT $LN53@stbi__pars - 005a1 33 c0 xor eax, eax - 005a3 e9 c9 06 00 00 jmp $LN1@stbi__pars + 0059d e8 00 00 00 00 call stbi__jpeg_decode_block + 005a2 85 c0 test eax, eax + 005a4 75 07 jne SHORT $LN53@stbi__pars + 005a6 33 c0 xor eax, eax + 005a8 e9 d0 06 00 00 jmp $LN1@stbi__pars $LN53@stbi__pars: ; 2469 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); - 005a8 48 63 85 a4 02 + 005ad 48 63 85 a4 02 00 00 movsxd rax, DWORD PTR n$18[rbp] - 005af 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 005b3 48 63 8d a4 02 + 005b4 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 005b8 48 63 8d a4 02 00 00 movsxd rcx, DWORD PTR n$18[rbp] - 005ba 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 005be 48 63 95 a4 02 + 005bf 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 005c3 48 63 95 a4 02 00 00 movsxd rdx, DWORD PTR n$18[rbp] - 005c5 48 6b d2 60 imul rdx, rdx, 96 ; 00000060H - 005c9 4c 8b 85 80 07 + 005ca 48 6b d2 60 imul rdx, rdx, 96 ; 00000060H + 005ce 4c 8b 85 80 07 00 00 mov r8, QWORD PTR z$[rbp] - 005d0 41 8b 94 10 c4 + 005d5 41 8b 94 10 c4 46 00 00 mov edx, DWORD PTR [r8+rdx+18116] - 005d8 0f af 95 e4 02 + 005dd 0f af 95 e4 02 00 00 imul edx, DWORD PTR y2$20[rbp] - 005df 48 63 d2 movsxd rdx, edx - 005e2 4c 8b 85 80 07 + 005e4 48 63 d2 movsxd rdx, edx + 005e7 4c 8b 85 80 07 00 00 mov r8, QWORD PTR z$[rbp] - 005e9 49 8b 8c 08 d0 + 005ee 49 8b 8c 08 d0 46 00 00 mov rcx, QWORD PTR [r8+rcx+18128] - 005f1 48 03 ca add rcx, rdx - 005f4 48 63 95 c4 02 + 005f6 48 03 ca add rcx, rdx + 005f9 48 63 95 c4 02 00 00 movsxd rdx, DWORD PTR x2$19[rbp] - 005fb 48 03 ca add rcx, rdx - 005fe 4c 8d 85 10 02 + 00600 48 03 ca add rcx, rdx + 00603 4c 8d 85 10 02 00 00 lea r8, QWORD PTR data$17[rbp] - 00605 48 8b 95 80 07 + 0060a 48 8b 95 80 07 00 00 mov rdx, QWORD PTR z$[rbp] - 0060c 8b 94 02 c4 46 + 00611 8b 94 02 c4 46 00 00 mov edx, DWORD PTR [rdx+rax+18116] - 00613 48 8b 85 80 07 + 00618 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 0061a ff 90 70 48 00 + 0061f ff 90 70 48 00 00 call QWORD PTR [rax+18544] + 00625 90 npad 1 ; 2470 : } - 00620 e9 03 fe ff ff jmp $LN20@stbi__pars + 00626 e9 02 fe ff ff jmp $LN20@stbi__pars $LN21@stbi__pars: ; 2471 : } - 00625 e9 bf fd ff ff jmp $LN17@stbi__pars + 0062b e9 be fd ff ff jmp $LN17@stbi__pars $LN18@stbi__pars: ; 2472 : } - 0062a e9 6c fd ff ff jmp $LN14@stbi__pars + 00630 e9 6b fd ff ff jmp $LN14@stbi__pars $LN15@stbi__pars: ; 2473 : // after all interleaved components, that's an interleaved MCU, ; 2474 : // so now count down the restart interval ; 2475 : if (--z->todo <= 0) { - 0062f 48 8b 85 80 07 + 00635 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 00636 8b 80 6c 48 00 + 0063c 8b 80 6c 48 00 00 mov eax, DWORD PTR [rax+18540] - 0063c ff c8 dec eax - 0063e 89 85 54 07 00 + 00642 ff c8 dec eax + 00644 89 85 54 07 00 00 mov DWORD PTR tv311[rbp], eax - 00644 48 8b 85 80 07 + 0064a 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 0064b 8b 8d 54 07 00 + 00651 8b 8d 54 07 00 00 mov ecx, DWORD PTR tv311[rbp] - 00651 89 88 6c 48 00 + 00657 89 88 6c 48 00 00 mov DWORD PTR [rax+18540], ecx - 00657 83 bd 54 07 00 + 0065d 83 bd 54 07 00 00 00 cmp DWORD PTR tv311[rbp], 0 - 0065e 7f 5c jg SHORT $LN54@stbi__pars + 00664 7f 5e jg SHORT $LN54@stbi__pars ; 2476 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - 00660 48 8b 85 80 07 + 00666 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 00667 83 b8 24 48 00 + 0066d 83 b8 24 48 00 00 18 cmp DWORD PTR [rax+18468], 24 - 0066e 7d 0c jge SHORT $LN55@stbi__pars - 00670 48 8b 8d 80 07 + 00674 7d 0d jge SHORT $LN55@stbi__pars + 00676 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00677 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 0067d e8 00 00 00 00 call stbi__grow_buffer_unsafe + 00682 90 npad 1 $LN55@stbi__pars: ; 2477 : if (!STBI__RESTART(z->marker)) return 1; - 0067c 48 8b 85 80 07 + 00683 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 00683 0f b6 80 28 48 + 0068a 0f b6 80 28 48 00 00 movzx eax, BYTE PTR [rax+18472] - 0068a 3d d0 00 00 00 cmp eax, 208 ; 000000d0H - 0068f 7c 15 jl SHORT $LN57@stbi__pars - 00691 48 8b 85 80 07 + 00691 3d d0 00 00 00 cmp eax, 208 ; 000000d0H + 00696 7c 15 jl SHORT $LN57@stbi__pars + 00698 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 00698 0f b6 80 28 48 + 0069f 0f b6 80 28 48 00 00 movzx eax, BYTE PTR [rax+18472] - 0069f 3d d7 00 00 00 cmp eax, 215 ; 000000d7H - 006a4 7e 0a jle SHORT $LN56@stbi__pars + 006a6 3d d7 00 00 00 cmp eax, 215 ; 000000d7H + 006ab 7e 0a jle SHORT $LN56@stbi__pars $LN57@stbi__pars: - 006a6 b8 01 00 00 00 mov eax, 1 - 006ab e9 c1 05 00 00 jmp $LN1@stbi__pars + 006ad b8 01 00 00 00 mov eax, 1 + 006b2 e9 c6 05 00 00 jmp $LN1@stbi__pars $LN56@stbi__pars: ; 2478 : stbi__jpeg_reset(z); - 006b0 48 8b 8d 80 07 + 006b7 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 006b7 e8 00 00 00 00 call stbi__jpeg_reset + 006be e8 00 00 00 00 call stbi__jpeg_reset + 006c3 90 npad 1 $LN54@stbi__pars: ; 2479 : } ; 2480 : } - 006bc e9 a7 fc ff ff jmp $LN11@stbi__pars + 006c4 e9 a4 fc ff ff jmp $LN11@stbi__pars $LN12@stbi__pars: ; 2481 : } - 006c1 e9 6f fc ff ff jmp $LN8@stbi__pars + 006c9 e9 6c fc ff ff jmp $LN8@stbi__pars $LN9@stbi__pars: ; 2482 : return 1; - 006c6 b8 01 00 00 00 mov eax, 1 - 006cb e9 a1 05 00 00 jmp $LN1@stbi__pars + 006ce b8 01 00 00 00 mov eax, 1 + 006d3 e9 a5 05 00 00 jmp $LN1@stbi__pars $LN47@stbi__pars: ; 2483 : } ; 2484 : } - 006d0 e9 9c 05 00 00 jmp $LN45@stbi__pars + 006d8 e9 a0 05 00 00 jmp $LN45@stbi__pars $LN44@stbi__pars: ; 2485 : else { ; 2486 : if (z->scan_n == 1) { - 006d5 48 8b 85 80 07 + 006dd 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 006dc 83 b8 54 48 00 + 006e4 83 b8 54 48 00 00 01 cmp DWORD PTR [rax+18516], 1 - 006e3 0f 85 a3 02 00 + 006eb 0f 85 a5 02 00 00 jne $LN58@stbi__pars ; 2487 : int i, j; ; 2488 : int n = z->order[0]; - 006e9 b8 04 00 00 00 mov eax, 4 - 006ee 48 6b c0 00 imul rax, rax, 0 - 006f2 48 8b 8d 80 07 + 006f1 b8 04 00 00 00 mov eax, 4 + 006f6 48 6b c0 00 imul rax, rax, 0 + 006fa 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 006f9 8b 84 01 58 48 + 00701 8b 84 01 58 48 00 00 mov eax, DWORD PTR [rcx+rax+18520] - 00700 89 85 64 03 00 + 00708 89 85 64 03 00 00 mov DWORD PTR n$24[rbp], eax ; 2489 : // non-interleaved data, we just need to process one block at a time, @@ -31299,188 +31487,188 @@ $LN44@stbi__pars: ; 2492 : // component has, independent of interleaved MCU blocking and such ; 2493 : int w = (z->img_comp[n].x + 7) >> 3; - 00706 48 63 85 64 03 + 0070e 48 63 85 64 03 00 00 movsxd rax, DWORD PTR n$24[rbp] - 0070d 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00711 48 8b 8d 80 07 + 00715 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00719 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00718 8b 84 01 bc 46 + 00720 8b 84 01 bc 46 00 00 mov eax, DWORD PTR [rcx+rax+18108] - 0071f 83 c0 07 add eax, 7 - 00722 c1 f8 03 sar eax, 3 - 00725 89 85 84 03 00 + 00727 83 c0 07 add eax, 7 + 0072a c1 f8 03 sar eax, 3 + 0072d 89 85 84 03 00 00 mov DWORD PTR w$25[rbp], eax ; 2494 : int h = (z->img_comp[n].y + 7) >> 3; - 0072b 48 63 85 64 03 + 00733 48 63 85 64 03 00 00 movsxd rax, DWORD PTR n$24[rbp] - 00732 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00736 48 8b 8d 80 07 + 0073a 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0073e 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 0073d 8b 84 01 c0 46 + 00745 8b 84 01 c0 46 00 00 mov eax, DWORD PTR [rcx+rax+18112] - 00744 83 c0 07 add eax, 7 - 00747 c1 f8 03 sar eax, 3 - 0074a 89 85 a4 03 00 + 0074c 83 c0 07 add eax, 7 + 0074f c1 f8 03 sar eax, 3 + 00752 89 85 a4 03 00 00 mov DWORD PTR h$26[rbp], eax ; 2495 : for (j = 0; j < h; ++j) { - 00750 c7 85 44 03 00 + 00758 c7 85 44 03 00 00 00 00 00 00 mov DWORD PTR j$23[rbp], 0 - 0075a eb 0e jmp SHORT $LN25@stbi__pars + 00762 eb 0e jmp SHORT $LN25@stbi__pars $LN23@stbi__pars: - 0075c 8b 85 44 03 00 + 00764 8b 85 44 03 00 00 mov eax, DWORD PTR j$23[rbp] - 00762 ff c0 inc eax - 00764 89 85 44 03 00 + 0076a ff c0 inc eax + 0076c 89 85 44 03 00 00 mov DWORD PTR j$23[rbp], eax $LN25@stbi__pars: - 0076a 8b 85 a4 03 00 + 00772 8b 85 a4 03 00 00 mov eax, DWORD PTR h$26[rbp] - 00770 39 85 44 03 00 + 00778 39 85 44 03 00 00 cmp DWORD PTR j$23[rbp], eax - 00776 0f 8d 01 02 00 + 0077e 0f 8d 03 02 00 00 jge $LN24@stbi__pars ; 2496 : for (i = 0; i < w; ++i) { - 0077c c7 85 24 03 00 + 00784 c7 85 24 03 00 00 00 00 00 00 mov DWORD PTR i$22[rbp], 0 - 00786 eb 0e jmp SHORT $LN28@stbi__pars + 0078e eb 0e jmp SHORT $LN28@stbi__pars $LN26@stbi__pars: - 00788 8b 85 24 03 00 + 00790 8b 85 24 03 00 00 mov eax, DWORD PTR i$22[rbp] - 0078e ff c0 inc eax - 00790 89 85 24 03 00 + 00796 ff c0 inc eax + 00798 89 85 24 03 00 00 mov DWORD PTR i$22[rbp], eax $LN28@stbi__pars: - 00796 8b 85 84 03 00 + 0079e 8b 85 84 03 00 00 mov eax, DWORD PTR w$25[rbp] - 0079c 39 85 24 03 00 + 007a4 39 85 24 03 00 00 cmp DWORD PTR i$22[rbp], eax - 007a2 0f 8d d0 01 00 + 007aa 0f 8d d2 01 00 00 jge $LN27@stbi__pars ; 2497 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); - 007a8 48 63 85 64 03 + 007b0 48 63 85 64 03 00 00 movsxd rax, DWORD PTR n$24[rbp] - 007af 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 007b3 48 63 8d 64 03 + 007b7 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 007bb 48 63 8d 64 03 00 00 movsxd rcx, DWORD PTR n$24[rbp] - 007ba 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 007be 48 8b 95 80 07 + 007c2 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 007c6 48 8b 95 80 07 00 00 mov rdx, QWORD PTR z$[rbp] - 007c5 44 8b 85 44 03 + 007cd 44 8b 85 44 03 00 00 mov r8d, DWORD PTR j$23[rbp] - 007cc 44 0f af 84 0a + 007d4 44 0f af 84 0a f8 46 00 00 imul r8d, DWORD PTR [rdx+rcx+18168] - 007d5 41 8b c8 mov ecx, r8d - 007d8 8b 95 24 03 00 + 007dd 41 8b c8 mov ecx, r8d + 007e0 8b 95 24 03 00 00 mov edx, DWORD PTR i$22[rbp] - 007de 03 d1 add edx, ecx - 007e0 8b ca mov ecx, edx - 007e2 6b c9 40 imul ecx, ecx, 64 ; 00000040H - 007e5 48 63 c9 movsxd rcx, ecx - 007e8 48 8b 95 80 07 + 007e6 03 d1 add edx, ecx + 007e8 8b ca mov ecx, edx + 007ea 6b c9 40 imul ecx, ecx, 64 ; 00000040H + 007ed 48 63 c9 movsxd rcx, ecx + 007f0 48 8b 95 80 07 00 00 mov rdx, QWORD PTR z$[rbp] - 007ef 48 8b 84 02 f0 + 007f7 48 8b 84 02 f0 46 00 00 mov rax, QWORD PTR [rdx+rax+18160] - 007f7 48 8d 04 48 lea rax, QWORD PTR [rax+rcx*2] - 007fb 48 89 85 c8 03 + 007ff 48 8d 04 48 lea rax, QWORD PTR [rax+rcx*2] + 00803 48 89 85 c8 03 00 00 mov QWORD PTR data$27[rbp], rax ; 2498 : if (z->spec_start == 0) { - 00802 48 8b 85 80 07 + 0080a 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 00809 83 b8 34 48 00 + 00811 83 b8 34 48 00 00 00 cmp DWORD PTR [rax+18484], 0 - 00810 75 57 jne SHORT $LN60@stbi__pars + 00818 75 57 jne SHORT $LN60@stbi__pars ; 2499 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) - 00812 48 63 85 64 03 + 0081a 48 63 85 64 03 00 00 movsxd rax, DWORD PTR n$24[rbp] - 00819 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 0081d 48 8b 8d 80 07 + 00821 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00825 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00824 48 63 84 01 b0 + 0082c 48 63 84 01 b0 46 00 00 movsxd rax, DWORD PTR [rcx+rax+18096] - 0082c 48 69 c0 90 06 + 00834 48 69 c0 90 06 00 00 imul rax, rax, 1680 ; 00000690H - 00833 48 8b 8d 80 07 + 0083b 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 0083a 48 8d 44 01 08 lea rax, QWORD PTR [rcx+rax+8] - 0083f 44 8b 8d 64 03 + 00842 48 8d 44 01 08 lea rax, QWORD PTR [rcx+rax+8] + 00847 44 8b 8d 64 03 00 00 mov r9d, DWORD PTR n$24[rbp] - 00846 4c 8b c0 mov r8, rax - 00849 48 8b 95 c8 03 + 0084e 4c 8b c0 mov r8, rax + 00851 48 8b 95 c8 03 00 00 mov rdx, QWORD PTR data$27[rbp] - 00850 48 8b 8d 80 07 + 00858 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00857 e8 00 00 00 00 call stbi__jpeg_decode_block_prog_dc - 0085c 85 c0 test eax, eax - 0085e 75 07 jne SHORT $LN62@stbi__pars + 0085f e8 00 00 00 00 call stbi__jpeg_decode_block_prog_dc + 00864 85 c0 test eax, eax + 00866 75 07 jne SHORT $LN62@stbi__pars ; 2500 : return 0; - 00860 33 c0 xor eax, eax - 00862 e9 0a 04 00 00 jmp $LN1@stbi__pars + 00868 33 c0 xor eax, eax + 0086a e9 0e 04 00 00 jmp $LN1@stbi__pars $LN62@stbi__pars: ; 2501 : } - 00867 eb 7d jmp SHORT $LN61@stbi__pars + 0086f eb 7d jmp SHORT $LN61@stbi__pars $LN60@stbi__pars: ; 2502 : else { ; 2503 : int ha = z->img_comp[n].ha; - 00869 48 63 85 64 03 + 00871 48 63 85 64 03 00 00 movsxd rax, DWORD PTR n$24[rbp] - 00870 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00874 48 8b 8d 80 07 + 00878 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0087c 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 0087b 8b 84 01 b4 46 + 00883 8b 84 01 b4 46 00 00 mov eax, DWORD PTR [rcx+rax+18100] - 00882 89 85 e4 03 00 + 0088a 89 85 e4 03 00 00 mov DWORD PTR ha$28[rbp], eax ; 2504 : if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) - 00888 48 63 85 e4 03 + 00890 48 63 85 e4 03 00 00 movsxd rax, DWORD PTR ha$28[rbp] - 0088f 48 69 c0 00 04 + 00897 48 69 c0 00 04 00 00 imul rax, rax, 1024 ; 00000400H - 00896 48 8b 8d 80 07 + 0089e 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 0089d 48 8d 84 01 88 + 008a5 48 8d 84 01 88 36 00 00 lea rax, QWORD PTR [rcx+rax+13960] - 008a5 48 63 8d e4 03 + 008ad 48 63 8d e4 03 00 00 movsxd rcx, DWORD PTR ha$28[rbp] - 008ac 48 69 c9 90 06 + 008b4 48 69 c9 90 06 00 00 imul rcx, rcx, 1680 ; 00000690H - 008b3 48 8b 95 80 07 + 008bb 48 8b 95 80 07 00 00 mov rdx, QWORD PTR z$[rbp] - 008ba 48 8d 8c 0a 48 + 008c2 48 8d 8c 0a 48 1a 00 00 lea rcx, QWORD PTR [rdx+rcx+6728] - 008c2 4c 8b c8 mov r9, rax - 008c5 4c 8b c1 mov r8, rcx - 008c8 48 8b 95 c8 03 + 008ca 4c 8b c8 mov r9, rax + 008cd 4c 8b c1 mov r8, rcx + 008d0 48 8b 95 c8 03 00 00 mov rdx, QWORD PTR data$27[rbp] - 008cf 48 8b 8d 80 07 + 008d7 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 008d6 e8 00 00 00 00 call stbi__jpeg_decode_block_prog_ac - 008db 85 c0 test eax, eax - 008dd 75 07 jne SHORT $LN63@stbi__pars + 008de e8 00 00 00 00 call stbi__jpeg_decode_block_prog_ac + 008e3 85 c0 test eax, eax + 008e5 75 07 jne SHORT $LN63@stbi__pars ; 2505 : return 0; - 008df 33 c0 xor eax, eax - 008e1 e9 8b 03 00 00 jmp $LN1@stbi__pars + 008e7 33 c0 xor eax, eax + 008e9 e9 8f 03 00 00 jmp $LN1@stbi__pars $LN63@stbi__pars: $LN61@stbi__pars: @@ -31488,391 +31676,395 @@ $LN61@stbi__pars: ; 2507 : // every data block is an MCU, so countdown the restart interval ; 2508 : if (--z->todo <= 0) { - 008e6 48 8b 85 80 07 + 008ee 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 008ed 8b 80 6c 48 00 + 008f5 8b 80 6c 48 00 00 mov eax, DWORD PTR [rax+18540] - 008f3 ff c8 dec eax - 008f5 89 85 54 07 00 + 008fb ff c8 dec eax + 008fd 89 85 54 07 00 00 mov DWORD PTR tv400[rbp], eax - 008fb 48 8b 85 80 07 + 00903 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 00902 8b 8d 54 07 00 + 0090a 8b 8d 54 07 00 00 mov ecx, DWORD PTR tv400[rbp] - 00908 89 88 6c 48 00 + 00910 89 88 6c 48 00 00 mov DWORD PTR [rax+18540], ecx - 0090e 83 bd 54 07 00 + 00916 83 bd 54 07 00 00 00 cmp DWORD PTR tv400[rbp], 0 - 00915 7f 5c jg SHORT $LN64@stbi__pars + 0091d 7f 5e jg SHORT $LN64@stbi__pars ; 2509 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - 00917 48 8b 85 80 07 + 0091f 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 0091e 83 b8 24 48 00 + 00926 83 b8 24 48 00 00 18 cmp DWORD PTR [rax+18468], 24 - 00925 7d 0c jge SHORT $LN65@stbi__pars - 00927 48 8b 8d 80 07 + 0092d 7d 0d jge SHORT $LN65@stbi__pars + 0092f 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 0092e e8 00 00 00 00 call stbi__grow_buffer_unsafe + 00936 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 0093b 90 npad 1 $LN65@stbi__pars: ; 2510 : if (!STBI__RESTART(z->marker)) return 1; - 00933 48 8b 85 80 07 + 0093c 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 0093a 0f b6 80 28 48 + 00943 0f b6 80 28 48 00 00 movzx eax, BYTE PTR [rax+18472] - 00941 3d d0 00 00 00 cmp eax, 208 ; 000000d0H - 00946 7c 15 jl SHORT $LN67@stbi__pars - 00948 48 8b 85 80 07 + 0094a 3d d0 00 00 00 cmp eax, 208 ; 000000d0H + 0094f 7c 15 jl SHORT $LN67@stbi__pars + 00951 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 0094f 0f b6 80 28 48 + 00958 0f b6 80 28 48 00 00 movzx eax, BYTE PTR [rax+18472] - 00956 3d d7 00 00 00 cmp eax, 215 ; 000000d7H - 0095b 7e 0a jle SHORT $LN66@stbi__pars + 0095f 3d d7 00 00 00 cmp eax, 215 ; 000000d7H + 00964 7e 0a jle SHORT $LN66@stbi__pars $LN67@stbi__pars: - 0095d b8 01 00 00 00 mov eax, 1 - 00962 e9 0a 03 00 00 jmp $LN1@stbi__pars + 00966 b8 01 00 00 00 mov eax, 1 + 0096b e9 0d 03 00 00 jmp $LN1@stbi__pars $LN66@stbi__pars: ; 2511 : stbi__jpeg_reset(z); - 00967 48 8b 8d 80 07 + 00970 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 0096e e8 00 00 00 00 call stbi__jpeg_reset + 00977 e8 00 00 00 00 call stbi__jpeg_reset + 0097c 90 npad 1 $LN64@stbi__pars: ; 2512 : } ; 2513 : } - 00973 e9 10 fe ff ff jmp $LN26@stbi__pars + 0097d e9 0e fe ff ff jmp $LN26@stbi__pars $LN27@stbi__pars: ; 2514 : } - 00978 e9 df fd ff ff jmp $LN23@stbi__pars + 00982 e9 dd fd ff ff jmp $LN23@stbi__pars $LN24@stbi__pars: ; 2515 : return 1; - 0097d b8 01 00 00 00 mov eax, 1 - 00982 e9 ea 02 00 00 jmp $LN1@stbi__pars + 00987 b8 01 00 00 00 mov eax, 1 + 0098c e9 ec 02 00 00 jmp $LN1@stbi__pars ; 2516 : } - 00987 e9 e5 02 00 00 jmp $LN59@stbi__pars + 00991 e9 e7 02 00 00 jmp $LN59@stbi__pars $LN58@stbi__pars: ; 2517 : else { // interleaved ; 2518 : int i, j, k, x, y; ; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { - 0098c c7 85 24 04 00 + 00996 c7 85 24 04 00 00 00 00 00 00 mov DWORD PTR j$30[rbp], 0 - 00996 eb 0e jmp SHORT $LN31@stbi__pars + 009a0 eb 0e jmp SHORT $LN31@stbi__pars $LN29@stbi__pars: - 00998 8b 85 24 04 00 + 009a2 8b 85 24 04 00 00 mov eax, DWORD PTR j$30[rbp] - 0099e ff c0 inc eax - 009a0 89 85 24 04 00 + 009a8 ff c0 inc eax + 009aa 89 85 24 04 00 00 mov DWORD PTR j$30[rbp], eax $LN31@stbi__pars: - 009a6 48 8b 85 80 07 + 009b0 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 009ad 8b 80 94 46 00 + 009b7 8b 80 94 46 00 00 mov eax, DWORD PTR [rax+18068] - 009b3 39 85 24 04 00 + 009bd 39 85 24 04 00 00 cmp DWORD PTR j$30[rbp], eax - 009b9 0f 8d ad 02 00 + 009c3 0f 8d af 02 00 00 jge $LN30@stbi__pars ; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { - 009bf c7 85 04 04 00 + 009c9 c7 85 04 04 00 00 00 00 00 00 mov DWORD PTR i$29[rbp], 0 - 009c9 eb 0e jmp SHORT $LN34@stbi__pars + 009d3 eb 0e jmp SHORT $LN34@stbi__pars $LN32@stbi__pars: - 009cb 8b 85 04 04 00 + 009d5 8b 85 04 04 00 00 mov eax, DWORD PTR i$29[rbp] - 009d1 ff c0 inc eax - 009d3 89 85 04 04 00 + 009db ff c0 inc eax + 009dd 89 85 04 04 00 00 mov DWORD PTR i$29[rbp], eax $LN34@stbi__pars: - 009d9 48 8b 85 80 07 + 009e3 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 009e0 8b 80 90 46 00 + 009ea 8b 80 90 46 00 00 mov eax, DWORD PTR [rax+18064] - 009e6 39 85 04 04 00 + 009f0 39 85 04 04 00 00 cmp DWORD PTR i$29[rbp], eax - 009ec 0f 8d 75 02 00 + 009f6 0f 8d 77 02 00 00 jge $LN33@stbi__pars ; 2521 : // scan an interleaved mcu... process scan_n components in order ; 2522 : for (k = 0; k < z->scan_n; ++k) { - 009f2 c7 85 44 04 00 + 009fc c7 85 44 04 00 00 00 00 00 00 mov DWORD PTR k$31[rbp], 0 - 009fc eb 0e jmp SHORT $LN37@stbi__pars + 00a06 eb 0e jmp SHORT $LN37@stbi__pars $LN35@stbi__pars: - 009fe 8b 85 44 04 00 + 00a08 8b 85 44 04 00 00 mov eax, DWORD PTR k$31[rbp] - 00a04 ff c0 inc eax - 00a06 89 85 44 04 00 + 00a0e ff c0 inc eax + 00a10 89 85 44 04 00 00 mov DWORD PTR k$31[rbp], eax $LN37@stbi__pars: - 00a0c 48 8b 85 80 07 + 00a16 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 00a13 8b 80 54 48 00 + 00a1d 8b 80 54 48 00 00 mov eax, DWORD PTR [rax+18516] - 00a19 39 85 44 04 00 + 00a23 39 85 44 04 00 00 cmp DWORD PTR k$31[rbp], eax - 00a1f 0f 8d b3 01 00 + 00a29 0f 8d b3 01 00 00 jge $LN36@stbi__pars ; 2523 : int n = z->order[k]; - 00a25 48 63 85 44 04 + 00a2f 48 63 85 44 04 00 00 movsxd rax, DWORD PTR k$31[rbp] - 00a2c 48 8b 8d 80 07 + 00a36 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00a33 8b 84 81 58 48 + 00a3d 8b 84 81 58 48 00 00 mov eax, DWORD PTR [rcx+rax*4+18520] - 00a3a 89 85 a4 04 00 + 00a44 89 85 a4 04 00 00 mov DWORD PTR n$34[rbp], eax ; 2524 : // scan out an mcu's worth of this component; that's just determined ; 2525 : // by the basic H and V specified for the component ; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { - 00a40 c7 85 84 04 00 + 00a4a c7 85 84 04 00 00 00 00 00 00 mov DWORD PTR y$33[rbp], 0 - 00a4a eb 0e jmp SHORT $LN40@stbi__pars + 00a54 eb 0e jmp SHORT $LN40@stbi__pars $LN38@stbi__pars: - 00a4c 8b 85 84 04 00 + 00a56 8b 85 84 04 00 00 mov eax, DWORD PTR y$33[rbp] - 00a52 ff c0 inc eax - 00a54 89 85 84 04 00 + 00a5c ff c0 inc eax + 00a5e 89 85 84 04 00 00 mov DWORD PTR y$33[rbp], eax $LN40@stbi__pars: - 00a5a 48 63 85 a4 04 + 00a64 48 63 85 a4 04 00 00 movsxd rax, DWORD PTR n$34[rbp] - 00a61 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00a65 48 8b 8d 80 07 + 00a6b 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00a6f 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00a6c 8b 84 01 a8 46 + 00a76 8b 84 01 a8 46 00 00 mov eax, DWORD PTR [rcx+rax+18088] - 00a73 39 85 84 04 00 + 00a7d 39 85 84 04 00 00 cmp DWORD PTR y$33[rbp], eax - 00a79 0f 8d 54 01 00 + 00a83 0f 8d 54 01 00 00 jge $LN39@stbi__pars ; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { - 00a7f c7 85 64 04 00 + 00a89 c7 85 64 04 00 00 00 00 00 00 mov DWORD PTR x$32[rbp], 0 - 00a89 eb 0e jmp SHORT $LN43@stbi__pars + 00a93 eb 0e jmp SHORT $LN43@stbi__pars $LN41@stbi__pars: - 00a8b 8b 85 64 04 00 + 00a95 8b 85 64 04 00 00 mov eax, DWORD PTR x$32[rbp] - 00a91 ff c0 inc eax - 00a93 89 85 64 04 00 + 00a9b ff c0 inc eax + 00a9d 89 85 64 04 00 00 mov DWORD PTR x$32[rbp], eax $LN43@stbi__pars: - 00a99 48 63 85 a4 04 + 00aa3 48 63 85 a4 04 00 00 movsxd rax, DWORD PTR n$34[rbp] - 00aa0 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00aa4 48 8b 8d 80 07 + 00aaa 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00aae 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00aab 8b 84 01 a4 46 + 00ab5 8b 84 01 a4 46 00 00 mov eax, DWORD PTR [rcx+rax+18084] - 00ab2 39 85 64 04 00 + 00abc 39 85 64 04 00 00 cmp DWORD PTR x$32[rbp], eax - 00ab8 0f 8d 10 01 00 + 00ac2 0f 8d 10 01 00 00 jge $LN42@stbi__pars ; 2528 : int x2 = (i * z->img_comp[n].h + x); - 00abe 48 63 85 a4 04 + 00ac8 48 63 85 a4 04 00 00 movsxd rax, DWORD PTR n$34[rbp] - 00ac5 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00ac9 48 8b 8d 80 07 + 00acf 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00ad3 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00ad0 8b 95 04 04 00 + 00ada 8b 95 04 04 00 00 mov edx, DWORD PTR i$29[rbp] - 00ad6 0f af 94 01 a4 + 00ae0 0f af 94 01 a4 46 00 00 imul edx, DWORD PTR [rcx+rax+18084] - 00ade 8b c2 mov eax, edx - 00ae0 03 85 64 04 00 + 00ae8 8b c2 mov eax, edx + 00aea 03 85 64 04 00 00 add eax, DWORD PTR x$32[rbp] - 00ae6 89 85 c4 04 00 + 00af0 89 85 c4 04 00 00 mov DWORD PTR x2$35[rbp], eax ; 2529 : int y2 = (j * z->img_comp[n].v + y); - 00aec 48 63 85 a4 04 + 00af6 48 63 85 a4 04 00 00 movsxd rax, DWORD PTR n$34[rbp] - 00af3 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00af7 48 8b 8d 80 07 + 00afd 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00b01 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00afe 8b 95 24 04 00 + 00b08 8b 95 24 04 00 00 mov edx, DWORD PTR j$30[rbp] - 00b04 0f af 94 01 a8 + 00b0e 0f af 94 01 a8 46 00 00 imul edx, DWORD PTR [rcx+rax+18088] - 00b0c 8b c2 mov eax, edx - 00b0e 03 85 84 04 00 + 00b16 8b c2 mov eax, edx + 00b18 03 85 84 04 00 00 add eax, DWORD PTR y$33[rbp] - 00b14 89 85 e4 04 00 + 00b1e 89 85 e4 04 00 00 mov DWORD PTR y2$36[rbp], eax ; 2530 : short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); - 00b1a 48 63 85 a4 04 + 00b24 48 63 85 a4 04 00 00 movsxd rax, DWORD PTR n$34[rbp] - 00b21 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00b25 48 63 8d a4 04 + 00b2b 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00b2f 48 63 8d a4 04 00 00 movsxd rcx, DWORD PTR n$34[rbp] - 00b2c 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H - 00b30 48 8b 95 80 07 + 00b36 48 6b c9 60 imul rcx, rcx, 96 ; 00000060H + 00b3a 48 8b 95 80 07 00 00 mov rdx, QWORD PTR z$[rbp] - 00b37 44 8b 85 e4 04 + 00b41 44 8b 85 e4 04 00 00 mov r8d, DWORD PTR y2$36[rbp] - 00b3e 44 0f af 84 0a + 00b48 44 0f af 84 0a f8 46 00 00 imul r8d, DWORD PTR [rdx+rcx+18168] - 00b47 41 8b c8 mov ecx, r8d - 00b4a 8b 95 c4 04 00 + 00b51 41 8b c8 mov ecx, r8d + 00b54 8b 95 c4 04 00 00 mov edx, DWORD PTR x2$35[rbp] - 00b50 03 d1 add edx, ecx - 00b52 8b ca mov ecx, edx - 00b54 6b c9 40 imul ecx, ecx, 64 ; 00000040H - 00b57 48 63 c9 movsxd rcx, ecx - 00b5a 48 8b 95 80 07 + 00b5a 03 d1 add edx, ecx + 00b5c 8b ca mov ecx, edx + 00b5e 6b c9 40 imul ecx, ecx, 64 ; 00000040H + 00b61 48 63 c9 movsxd rcx, ecx + 00b64 48 8b 95 80 07 00 00 mov rdx, QWORD PTR z$[rbp] - 00b61 48 8b 84 02 f0 + 00b6b 48 8b 84 02 f0 46 00 00 mov rax, QWORD PTR [rdx+rax+18160] - 00b69 48 8d 04 48 lea rax, QWORD PTR [rax+rcx*2] - 00b6d 48 89 85 08 05 + 00b73 48 8d 04 48 lea rax, QWORD PTR [rax+rcx*2] + 00b77 48 89 85 08 05 00 00 mov QWORD PTR data$37[rbp], rax ; 2531 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) - 00b74 48 63 85 a4 04 + 00b7e 48 63 85 a4 04 00 00 movsxd rax, DWORD PTR n$34[rbp] - 00b7b 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00b7f 48 8b 8d 80 07 + 00b85 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00b89 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00b86 48 63 84 01 b0 + 00b90 48 63 84 01 b0 46 00 00 movsxd rax, DWORD PTR [rcx+rax+18096] - 00b8e 48 69 c0 90 06 + 00b98 48 69 c0 90 06 00 00 imul rax, rax, 1680 ; 00000690H - 00b95 48 8b 8d 80 07 + 00b9f 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00b9c 48 8d 44 01 08 lea rax, QWORD PTR [rcx+rax+8] - 00ba1 44 8b 8d a4 04 + 00ba6 48 8d 44 01 08 lea rax, QWORD PTR [rcx+rax+8] + 00bab 44 8b 8d a4 04 00 00 mov r9d, DWORD PTR n$34[rbp] - 00ba8 4c 8b c0 mov r8, rax - 00bab 48 8b 95 08 05 + 00bb2 4c 8b c0 mov r8, rax + 00bb5 48 8b 95 08 05 00 00 mov rdx, QWORD PTR data$37[rbp] - 00bb2 48 8b 8d 80 07 + 00bbc 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00bb9 e8 00 00 00 00 call stbi__jpeg_decode_block_prog_dc - 00bbe 85 c0 test eax, eax - 00bc0 75 07 jne SHORT $LN68@stbi__pars + 00bc3 e8 00 00 00 00 call stbi__jpeg_decode_block_prog_dc + 00bc8 85 c0 test eax, eax + 00bca 75 07 jne SHORT $LN68@stbi__pars ; 2532 : return 0; - 00bc2 33 c0 xor eax, eax - 00bc4 e9 a8 00 00 00 jmp $LN1@stbi__pars + 00bcc 33 c0 xor eax, eax + 00bce e9 aa 00 00 00 jmp $LN1@stbi__pars $LN68@stbi__pars: ; 2533 : } - 00bc9 e9 bd fe ff ff jmp $LN41@stbi__pars + 00bd3 e9 bd fe ff ff jmp $LN41@stbi__pars $LN42@stbi__pars: ; 2534 : } - 00bce e9 79 fe ff ff jmp $LN38@stbi__pars + 00bd8 e9 79 fe ff ff jmp $LN38@stbi__pars $LN39@stbi__pars: ; 2535 : } - 00bd3 e9 26 fe ff ff jmp $LN35@stbi__pars + 00bdd e9 26 fe ff ff jmp $LN35@stbi__pars $LN36@stbi__pars: ; 2536 : // after all interleaved components, that's an interleaved MCU, ; 2537 : // so now count down the restart interval ; 2538 : if (--z->todo <= 0) { - 00bd8 48 8b 85 80 07 + 00be2 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 00bdf 8b 80 6c 48 00 + 00be9 8b 80 6c 48 00 00 mov eax, DWORD PTR [rax+18540] - 00be5 ff c8 dec eax - 00be7 89 85 54 07 00 + 00bef ff c8 dec eax + 00bf1 89 85 54 07 00 00 mov DWORD PTR tv518[rbp], eax - 00bed 48 8b 85 80 07 + 00bf7 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 00bf4 8b 8d 54 07 00 + 00bfe 8b 8d 54 07 00 00 mov ecx, DWORD PTR tv518[rbp] - 00bfa 89 88 6c 48 00 + 00c04 89 88 6c 48 00 00 mov DWORD PTR [rax+18540], ecx - 00c00 83 bd 54 07 00 + 00c0a 83 bd 54 07 00 00 00 cmp DWORD PTR tv518[rbp], 0 - 00c07 7f 59 jg SHORT $LN69@stbi__pars + 00c11 7f 5b jg SHORT $LN69@stbi__pars ; 2539 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - 00c09 48 8b 85 80 07 + 00c13 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 00c10 83 b8 24 48 00 + 00c1a 83 b8 24 48 00 00 18 cmp DWORD PTR [rax+18468], 24 - 00c17 7d 0c jge SHORT $LN70@stbi__pars - 00c19 48 8b 8d 80 07 + 00c21 7d 0d jge SHORT $LN70@stbi__pars + 00c23 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00c20 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 00c2a e8 00 00 00 00 call stbi__grow_buffer_unsafe + 00c2f 90 npad 1 $LN70@stbi__pars: ; 2540 : if (!STBI__RESTART(z->marker)) return 1; - 00c25 48 8b 85 80 07 + 00c30 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 00c2c 0f b6 80 28 48 + 00c37 0f b6 80 28 48 00 00 movzx eax, BYTE PTR [rax+18472] - 00c33 3d d0 00 00 00 cmp eax, 208 ; 000000d0H - 00c38 7c 15 jl SHORT $LN72@stbi__pars - 00c3a 48 8b 85 80 07 + 00c3e 3d d0 00 00 00 cmp eax, 208 ; 000000d0H + 00c43 7c 15 jl SHORT $LN72@stbi__pars + 00c45 48 8b 85 80 07 00 00 mov rax, QWORD PTR z$[rbp] - 00c41 0f b6 80 28 48 + 00c4c 0f b6 80 28 48 00 00 movzx eax, BYTE PTR [rax+18472] - 00c48 3d d7 00 00 00 cmp eax, 215 ; 000000d7H - 00c4d 7e 07 jle SHORT $LN71@stbi__pars + 00c53 3d d7 00 00 00 cmp eax, 215 ; 000000d7H + 00c58 7e 07 jle SHORT $LN71@stbi__pars $LN72@stbi__pars: - 00c4f b8 01 00 00 00 mov eax, 1 - 00c54 eb 1b jmp SHORT $LN1@stbi__pars + 00c5a b8 01 00 00 00 mov eax, 1 + 00c5f eb 1c jmp SHORT $LN1@stbi__pars $LN71@stbi__pars: ; 2541 : stbi__jpeg_reset(z); - 00c56 48 8b 8d 80 07 + 00c61 48 8b 8d 80 07 00 00 mov rcx, QWORD PTR z$[rbp] - 00c5d e8 00 00 00 00 call stbi__jpeg_reset + 00c68 e8 00 00 00 00 call stbi__jpeg_reset + 00c6d 90 npad 1 $LN69@stbi__pars: ; 2542 : } ; 2543 : } - 00c62 e9 64 fd ff ff jmp $LN32@stbi__pars + 00c6e e9 62 fd ff ff jmp $LN32@stbi__pars $LN33@stbi__pars: ; 2544 : } - 00c67 e9 2c fd ff ff jmp $LN29@stbi__pars + 00c73 e9 2a fd ff ff jmp $LN29@stbi__pars $LN30@stbi__pars: ; 2545 : return 1; - 00c6c b8 01 00 00 00 mov eax, 1 + 00c78 b8 01 00 00 00 mov eax, 1 $LN59@stbi__pars: $LN45@stbi__pars: $LN1@stbi__pars: @@ -31881,21 +32073,21 @@ $LN1@stbi__pars: ; 2547 : } ; 2548 : } - 00c71 48 8b f8 mov rdi, rax - 00c74 48 8d 4d c0 lea rcx, QWORD PTR [rbp-64] - 00c78 48 8d 15 00 00 + 00c7d 48 8b f8 mov rdi, rax + 00c80 48 8d 4d c0 lea rcx, QWORD PTR [rbp-64] + 00c84 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__parse_entropy_coded_data$rtcFrameData - 00c7f e8 00 00 00 00 call _RTC_CheckStackVars - 00c84 48 8b c7 mov rax, rdi - 00c87 48 8b 8d 58 07 + 00c8b e8 00 00 00 00 call _RTC_CheckStackVars + 00c90 48 8b c7 mov rax, rdi + 00c93 48 8b 8d 58 07 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00c8e 48 33 cd xor rcx, rbp - 00c91 e8 00 00 00 00 call __security_check_cookie - 00c96 48 8d a5 68 07 + 00c9a 48 33 cd xor rcx, rbp + 00c9d e8 00 00 00 00 call __security_check_cookie + 00ca2 48 8d a5 68 07 00 00 lea rsp, QWORD PTR [rbp+1896] - 00c9d 5f pop rdi - 00c9e 5d pop rbp - 00c9f c3 ret 0 + 00ca9 5f pop rdi + 00caa 5d pop rbp + 00cab c3 ret 0 stbi__parse_entropy_coded_data ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -31917,107 +32109,108 @@ stbi__jpeg_reset PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 2411 : j->code_bits = 0; - 0001f 48 8b 85 f0 00 + 00020 48 8b 85 f0 00 00 00 mov rax, QWORD PTR j$[rbp] - 00026 c7 80 24 48 00 + 00027 c7 80 24 48 00 00 00 00 00 00 mov DWORD PTR [rax+18468], 0 ; 2412 : j->code_buffer = 0; - 00030 48 8b 85 f0 00 + 00031 48 8b 85 f0 00 00 00 mov rax, QWORD PTR j$[rbp] - 00037 c7 80 20 48 00 + 00038 c7 80 20 48 00 00 00 00 00 00 mov DWORD PTR [rax+18464], 0 ; 2413 : j->nomore = 0; - 00041 48 8b 85 f0 00 + 00042 48 8b 85 f0 00 00 00 mov rax, QWORD PTR j$[rbp] - 00048 c7 80 2c 48 00 + 00049 c7 80 2c 48 00 00 00 00 00 00 mov DWORD PTR [rax+18476], 0 ; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; - 00052 b8 60 00 00 00 mov eax, 96 ; 00000060H - 00057 48 6b c0 03 imul rax, rax, 3 - 0005b 48 8b 8d f0 00 + 00053 b8 60 00 00 00 mov eax, 96 ; 00000060H + 00058 48 6b c0 03 imul rax, rax, 3 + 0005c 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR j$[rbp] - 00062 c7 84 01 b8 46 + 00063 c7 84 01 b8 46 00 00 00 00 00 00 mov DWORD PTR [rcx+rax+18104], 0 - 0006d b8 60 00 00 00 mov eax, 96 ; 00000060H - 00072 48 6b c0 02 imul rax, rax, 2 - 00076 48 8b 8d f0 00 + 0006e b8 60 00 00 00 mov eax, 96 ; 00000060H + 00073 48 6b c0 02 imul rax, rax, 2 + 00077 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR j$[rbp] - 0007d c7 84 01 b8 46 + 0007e c7 84 01 b8 46 00 00 00 00 00 00 mov DWORD PTR [rcx+rax+18104], 0 - 00088 b8 60 00 00 00 mov eax, 96 ; 00000060H - 0008d 48 6b c0 01 imul rax, rax, 1 - 00091 48 8b 8d f0 00 + 00089 b8 60 00 00 00 mov eax, 96 ; 00000060H + 0008e 48 6b c0 01 imul rax, rax, 1 + 00092 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR j$[rbp] - 00098 c7 84 01 b8 46 + 00099 c7 84 01 b8 46 00 00 00 00 00 00 mov DWORD PTR [rcx+rax+18104], 0 - 000a3 b8 60 00 00 00 mov eax, 96 ; 00000060H - 000a8 48 6b c0 00 imul rax, rax, 0 - 000ac 48 8b 8d f0 00 + 000a4 b8 60 00 00 00 mov eax, 96 ; 00000060H + 000a9 48 6b c0 00 imul rax, rax, 0 + 000ad 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR j$[rbp] - 000b3 c7 84 01 b8 46 + 000b4 c7 84 01 b8 46 00 00 00 00 00 00 mov DWORD PTR [rcx+rax+18104], 0 ; 2415 : j->marker = STBI__MARKER_none; - 000be 48 8b 85 f0 00 + 000bf 48 8b 85 f0 00 00 00 mov rax, QWORD PTR j$[rbp] - 000c5 c6 80 28 48 00 + 000c6 c6 80 28 48 00 00 ff mov BYTE PTR [rax+18472], 255 ; 000000ffH ; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; - 000cc 48 8b 85 f0 00 + 000cd 48 8b 85 f0 00 00 00 mov rax, QWORD PTR j$[rbp] - 000d3 83 b8 68 48 00 + 000d4 83 b8 68 48 00 00 00 cmp DWORD PTR [rax+18536], 0 - 000da 74 15 je SHORT $LN3@stbi__jpeg - 000dc 48 8b 85 f0 00 + 000db 74 15 je SHORT $LN3@stbi__jpeg + 000dd 48 8b 85 f0 00 00 00 mov rax, QWORD PTR j$[rbp] - 000e3 8b 80 68 48 00 + 000e4 8b 80 68 48 00 00 mov eax, DWORD PTR [rax+18536] - 000e9 89 85 c0 00 00 + 000ea 89 85 c0 00 00 00 mov DWORD PTR tv88[rbp], eax - 000ef eb 0a jmp SHORT $LN4@stbi__jpeg + 000f0 eb 0a jmp SHORT $LN4@stbi__jpeg $LN3@stbi__jpeg: - 000f1 c7 85 c0 00 00 + 000f2 c7 85 c0 00 00 00 ff ff ff 7f mov DWORD PTR tv88[rbp], 2147483647 ; 7fffffffH $LN4@stbi__jpeg: - 000fb 48 8b 85 f0 00 + 000fc 48 8b 85 f0 00 00 00 mov rax, QWORD PTR j$[rbp] - 00102 8b 8d c0 00 00 + 00103 8b 8d c0 00 00 00 mov ecx, DWORD PTR tv88[rbp] - 00108 89 88 6c 48 00 + 00109 89 88 6c 48 00 00 mov DWORD PTR [rax+18540], ecx ; 2417 : j->eob_run = 0; - 0010e 48 8b 85 f0 00 + 0010f 48 8b 85 f0 00 00 00 mov rax, QWORD PTR j$[rbp] - 00115 c7 80 44 48 00 + 00116 c7 80 44 48 00 00 00 00 00 00 mov DWORD PTR [rax+18500], 0 ; 2418 : // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, ; 2419 : // since we don't even allow 1<<30 pixels ; 2420 : } - 0011f 48 8d a5 d8 00 + 00120 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 00126 5f pop rdi - 00127 5d pop rbp - 00128 c3 ret 0 + 00127 5f pop rdi + 00128 5d pop rbp + 00129 c3 ret 0 stbi__jpeg_reset ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -32039,75 +32232,76 @@ stbi__get_marker PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 2394 : stbi_uc x; ; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } - 0001f 48 8b 85 00 01 + 00020 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 00026 0f b6 80 28 48 + 00027 0f b6 80 28 48 00 00 movzx eax, BYTE PTR [rax+18472] - 0002d 3d ff 00 00 00 cmp eax, 255 ; 000000ffH - 00032 74 25 je SHORT $LN4@stbi__get_ - 00034 48 8b 85 00 01 + 0002e 3d ff 00 00 00 cmp eax, 255 ; 000000ffH + 00033 74 25 je SHORT $LN4@stbi__get_ + 00035 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 0003b 0f b6 80 28 48 + 0003c 0f b6 80 28 48 00 00 movzx eax, BYTE PTR [rax+18472] - 00042 88 45 04 mov BYTE PTR x$[rbp], al - 00045 48 8b 85 00 01 + 00043 88 45 04 mov BYTE PTR x$[rbp], al + 00046 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 0004c c6 80 28 48 00 + 0004d c6 80 28 48 00 00 ff mov BYTE PTR [rax+18472], 255 ; 000000ffH - 00053 0f b6 45 04 movzx eax, BYTE PTR x$[rbp] - 00057 eb 44 jmp SHORT $LN1@stbi__get_ + 00054 0f b6 45 04 movzx eax, BYTE PTR x$[rbp] + 00058 eb 44 jmp SHORT $LN1@stbi__get_ $LN4@stbi__get_: ; 2396 : x = stbi__get8(j->s); - 00059 48 8b 85 00 01 + 0005a 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 00060 48 8b 08 mov rcx, QWORD PTR [rax] - 00063 e8 00 00 00 00 call stbi__get8 - 00068 88 45 04 mov BYTE PTR x$[rbp], al + 00061 48 8b 08 mov rcx, QWORD PTR [rax] + 00064 e8 00 00 00 00 call stbi__get8 + 00069 88 45 04 mov BYTE PTR x$[rbp], al ; 2397 : if (x != 0xff) return STBI__MARKER_none; - 0006b 0f b6 45 04 movzx eax, BYTE PTR x$[rbp] - 0006f 3d ff 00 00 00 cmp eax, 255 ; 000000ffH - 00074 74 04 je SHORT $LN5@stbi__get_ - 00076 b0 ff mov al, 255 ; 000000ffH - 00078 eb 23 jmp SHORT $LN1@stbi__get_ + 0006c 0f b6 45 04 movzx eax, BYTE PTR x$[rbp] + 00070 3d ff 00 00 00 cmp eax, 255 ; 000000ffH + 00075 74 04 je SHORT $LN5@stbi__get_ + 00077 b0 ff mov al, 255 ; 000000ffH + 00079 eb 23 jmp SHORT $LN1@stbi__get_ $LN5@stbi__get_: $LN2@stbi__get_: ; 2398 : while (x == 0xff) - 0007a 0f b6 45 04 movzx eax, BYTE PTR x$[rbp] - 0007e 3d ff 00 00 00 cmp eax, 255 ; 000000ffH - 00083 75 14 jne SHORT $LN3@stbi__get_ + 0007b 0f b6 45 04 movzx eax, BYTE PTR x$[rbp] + 0007f 3d ff 00 00 00 cmp eax, 255 ; 000000ffH + 00084 75 14 jne SHORT $LN3@stbi__get_ ; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes - 00085 48 8b 85 00 01 + 00086 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 0008c 48 8b 08 mov rcx, QWORD PTR [rax] - 0008f e8 00 00 00 00 call stbi__get8 - 00094 88 45 04 mov BYTE PTR x$[rbp], al - 00097 eb e1 jmp SHORT $LN2@stbi__get_ + 0008d 48 8b 08 mov rcx, QWORD PTR [rax] + 00090 e8 00 00 00 00 call stbi__get8 + 00095 88 45 04 mov BYTE PTR x$[rbp], al + 00098 eb e1 jmp SHORT $LN2@stbi__get_ $LN3@stbi__get_: ; 2400 : return x; - 00099 0f b6 45 04 movzx eax, BYTE PTR x$[rbp] + 0009a 0f b6 45 04 movzx eax, BYTE PTR x$[rbp] $LN1@stbi__get_: ; 2401 : } - 0009d 48 8d a5 e8 00 + 0009e 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 000a4 5f pop rdi - 000a5 5d pop rbp - 000a6 c3 ret 0 + 000a5 5f pop rdi + 000a6 5d pop rbp + 000a7 c3 ret 0 stbi__get_marker ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -32300,6 +32494,7 @@ stbi__idct_simd PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 2005 : // This is constructed to match our regular (generic) integer IDCT exactly. ; 2006 : __m128i row0, row1, row2, row3, row4, row5, row6, row7; @@ -32386,651 +32581,651 @@ stbi__idct_simd PROC ; COMDAT ; 2087 : ; 2088 : __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); - 0002e 66 0f 6f 05 00 + 0002f 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@eb1a08a9eb1a08a9eb1a08a9eb1a08a9 - 00036 66 0f 7f 85 c0 + 00037 66 0f 7f 85 c0 01 00 00 movdqa XMMWORD PTR rot0_0$[rbp], xmm0 ; 2089 : __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f)); - 0003e 66 0f 6f 05 00 + 0003f 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@08a914e808a914e808a914e808a914e8 - 00046 66 0f 7f 85 f0 + 00047 66 0f 7f 85 f0 01 00 00 movdqa XMMWORD PTR rot0_1$[rbp], xmm0 ; 2090 : __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); - 0004e 66 0f 6f 05 00 + 0004f 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@12d0046b12d0046b12d0046b12d0046b - 00056 66 0f 7f 85 20 + 00057 66 0f 7f 85 20 02 00 00 movdqa XMMWORD PTR rot1_0$[rbp], xmm0 ; 2091 : __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); - 0005e 66 0f 6f 05 00 + 0005f 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@e9cf12d0e9cf12d0e9cf12d0e9cf12d0 - 00066 66 0f 7f 85 50 + 00067 66 0f 7f 85 50 02 00 00 movdqa XMMWORD PTR rot1_1$[rbp], xmm0 ; 2092 : __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f)); - 0006e 66 0f 6f 05 00 + 0006f 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@e09ee565e09ee565e09ee565e09ee565 - 00076 66 0f 7f 85 80 + 00077 66 0f 7f 85 80 02 00 00 movdqa XMMWORD PTR rot2_0$[rbp], xmm0 ; 2093 : __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f)); - 0007e 66 0f 6f 05 00 + 0007f 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@11c8e09e11c8e09e11c8e09e11c8e09e - 00086 66 0f 7f 85 b0 + 00087 66 0f 7f 85 b0 02 00 00 movdqa XMMWORD PTR rot2_1$[rbp], xmm0 ; 2094 : __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f)); - 0008e 66 0f 6f 05 00 + 0008f 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@f9c31a9df9c31a9df9c31a9df9c31a9d - 00096 66 0f 7f 85 e0 + 00097 66 0f 7f 85 e0 02 00 00 movdqa XMMWORD PTR rot3_0$[rbp], xmm0 ; 2095 : __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f)); - 0009e 66 0f 6f 05 00 + 0009f 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@11c8f9c311c8f9c311c8f9c311c8f9c3 - 000a6 66 0f 7f 85 10 + 000a7 66 0f 7f 85 10 03 00 00 movdqa XMMWORD PTR rot3_1$[rbp], xmm0 ; 2096 : ; 2097 : // rounding biases in column/row passes, see stbi__idct_block for explanation. ; 2098 : __m128i bias_0 = _mm_set1_epi32(512); - 000ae 66 0f 6f 05 00 + 000af 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@00000200000002000000020000000200 - 000b6 66 0f 7f 85 40 + 000b7 66 0f 7f 85 40 03 00 00 movdqa XMMWORD PTR bias_0$[rbp], xmm0 ; 2099 : __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17)); - 000be 66 0f 6f 05 00 + 000bf 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@01010000010100000101000001010000 - 000c6 66 0f 7f 85 70 + 000c7 66 0f 7f 85 70 03 00 00 movdqa XMMWORD PTR bias_1$[rbp], xmm0 ; 2100 : ; 2101 : // load ; 2102 : row0 = _mm_load_si128((const __m128i*) (data + 0 * 8)); - 000ce 48 8b 85 80 25 + 000cf 48 8b 85 80 25 00 00 mov rax, QWORD PTR data$[rbp] - 000d5 f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] - 000d9 66 0f 7f 45 10 movdqa XMMWORD PTR row0$[rbp], xmm0 + 000d6 f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] + 000da 66 0f 7f 45 10 movdqa XMMWORD PTR row0$[rbp], xmm0 ; 2103 : row1 = _mm_load_si128((const __m128i*) (data + 1 * 8)); - 000de 48 8b 85 80 25 + 000df 48 8b 85 80 25 00 00 mov rax, QWORD PTR data$[rbp] - 000e5 48 83 c0 10 add rax, 16 - 000e9 f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] - 000ed 66 0f 7f 45 40 movdqa XMMWORD PTR row1$[rbp], xmm0 + 000e6 48 83 c0 10 add rax, 16 + 000ea f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] + 000ee 66 0f 7f 45 40 movdqa XMMWORD PTR row1$[rbp], xmm0 ; 2104 : row2 = _mm_load_si128((const __m128i*) (data + 2 * 8)); - 000f2 48 8b 85 80 25 + 000f3 48 8b 85 80 25 00 00 mov rax, QWORD PTR data$[rbp] - 000f9 48 83 c0 20 add rax, 32 ; 00000020H - 000fd f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] - 00101 66 0f 7f 45 70 movdqa XMMWORD PTR row2$[rbp], xmm0 + 000fa 48 83 c0 20 add rax, 32 ; 00000020H + 000fe f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] + 00102 66 0f 7f 45 70 movdqa XMMWORD PTR row2$[rbp], xmm0 ; 2105 : row3 = _mm_load_si128((const __m128i*) (data + 3 * 8)); - 00106 48 8b 85 80 25 + 00107 48 8b 85 80 25 00 00 mov rax, QWORD PTR data$[rbp] - 0010d 48 83 c0 30 add rax, 48 ; 00000030H - 00111 f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] - 00115 66 0f 7f 85 a0 + 0010e 48 83 c0 30 add rax, 48 ; 00000030H + 00112 f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] + 00116 66 0f 7f 85 a0 00 00 00 movdqa XMMWORD PTR row3$[rbp], xmm0 ; 2106 : row4 = _mm_load_si128((const __m128i*) (data + 4 * 8)); - 0011d 48 8b 85 80 25 + 0011e 48 8b 85 80 25 00 00 mov rax, QWORD PTR data$[rbp] - 00124 48 83 c0 40 add rax, 64 ; 00000040H - 00128 f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] - 0012c 66 0f 7f 85 d0 + 00125 48 83 c0 40 add rax, 64 ; 00000040H + 00129 f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] + 0012d 66 0f 7f 85 d0 00 00 00 movdqa XMMWORD PTR row4$[rbp], xmm0 ; 2107 : row5 = _mm_load_si128((const __m128i*) (data + 5 * 8)); - 00134 48 8b 85 80 25 + 00135 48 8b 85 80 25 00 00 mov rax, QWORD PTR data$[rbp] - 0013b 48 83 c0 50 add rax, 80 ; 00000050H - 0013f f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] - 00143 66 0f 7f 85 00 + 0013c 48 83 c0 50 add rax, 80 ; 00000050H + 00140 f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] + 00144 66 0f 7f 85 00 01 00 00 movdqa XMMWORD PTR row5$[rbp], xmm0 ; 2108 : row6 = _mm_load_si128((const __m128i*) (data + 6 * 8)); - 0014b 48 8b 85 80 25 + 0014c 48 8b 85 80 25 00 00 mov rax, QWORD PTR data$[rbp] - 00152 48 83 c0 60 add rax, 96 ; 00000060H - 00156 f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] - 0015a 66 0f 7f 85 30 + 00153 48 83 c0 60 add rax, 96 ; 00000060H + 00157 f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] + 0015b 66 0f 7f 85 30 01 00 00 movdqa XMMWORD PTR row6$[rbp], xmm0 ; 2109 : row7 = _mm_load_si128((const __m128i*) (data + 7 * 8)); - 00162 48 8b 85 80 25 + 00163 48 8b 85 80 25 00 00 mov rax, QWORD PTR data$[rbp] - 00169 48 83 c0 70 add rax, 112 ; 00000070H - 0016d f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] - 00171 66 0f 7f 85 60 + 0016a 48 83 c0 70 add rax, 112 ; 00000070H + 0016e f3 0f 6f 00 movdqu xmm0, XMMWORD PTR [rax] + 00172 66 0f 7f 85 60 01 00 00 movdqa XMMWORD PTR row7$[rbp], xmm0 ; 2110 : ; 2111 : // column pass ; 2112 : dct_pass(bias_0, 10); - 00179 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] - 0017e 66 0f 61 85 30 + 0017a 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] + 0017f 66 0f 61 85 30 01 00 00 punpcklwd xmm0, XMMWORD PTR row6$[rbp] - 00186 66 0f 7f 85 a0 + 00187 66 0f 7f 85 a0 03 00 00 movdqa XMMWORD PTR rot0_0lo$1[rbp], xmm0 - 0018e 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] - 00193 66 0f 69 85 30 + 0018f 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] + 00194 66 0f 69 85 30 01 00 00 punpckhwd xmm0, XMMWORD PTR row6$[rbp] - 0019b 66 0f 7f 85 d0 + 0019c 66 0f 7f 85 d0 03 00 00 movdqa XMMWORD PTR rot0_0hi$2[rbp], xmm0 - 001a3 66 0f 6f 85 a0 + 001a4 66 0f 6f 85 a0 03 00 00 movdqa xmm0, XMMWORD PTR rot0_0lo$1[rbp] - 001ab 66 0f f5 85 c0 + 001ac 66 0f f5 85 c0 01 00 00 pmaddwd xmm0, XMMWORD PTR rot0_0$[rbp] - 001b3 66 0f 7f 85 00 + 001b4 66 0f 7f 85 00 04 00 00 movdqa XMMWORD PTR t2e_l$3[rbp], xmm0 - 001bb 66 0f 6f 85 d0 + 001bc 66 0f 6f 85 d0 03 00 00 movdqa xmm0, XMMWORD PTR rot0_0hi$2[rbp] - 001c3 66 0f f5 85 c0 + 001c4 66 0f f5 85 c0 01 00 00 pmaddwd xmm0, XMMWORD PTR rot0_0$[rbp] - 001cb 66 0f 7f 85 30 + 001cc 66 0f 7f 85 30 04 00 00 movdqa XMMWORD PTR t2e_h$4[rbp], xmm0 - 001d3 66 0f 6f 85 a0 + 001d4 66 0f 6f 85 a0 03 00 00 movdqa xmm0, XMMWORD PTR rot0_0lo$1[rbp] - 001db 66 0f f5 85 f0 + 001dc 66 0f f5 85 f0 01 00 00 pmaddwd xmm0, XMMWORD PTR rot0_1$[rbp] - 001e3 66 0f 7f 85 60 + 001e4 66 0f 7f 85 60 04 00 00 movdqa XMMWORD PTR t3e_l$5[rbp], xmm0 - 001eb 66 0f 6f 85 d0 + 001ec 66 0f 6f 85 d0 03 00 00 movdqa xmm0, XMMWORD PTR rot0_0hi$2[rbp] - 001f3 66 0f f5 85 f0 + 001f4 66 0f f5 85 f0 01 00 00 pmaddwd xmm0, XMMWORD PTR rot0_1$[rbp] - 001fb 66 0f 7f 85 90 + 001fc 66 0f 7f 85 90 04 00 00 movdqa XMMWORD PTR t3e_h$6[rbp], xmm0 - 00203 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] - 00208 66 0f fd 85 d0 + 00204 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] + 00209 66 0f fd 85 d0 00 00 00 paddw xmm0, XMMWORD PTR row4$[rbp] - 00210 66 0f 7f 85 c0 + 00211 66 0f 7f 85 c0 04 00 00 movdqa XMMWORD PTR sum04$7[rbp], xmm0 - 00218 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] - 0021d 66 0f f9 85 d0 + 00219 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] + 0021e 66 0f f9 85 d0 00 00 00 psubw xmm0, XMMWORD PTR row4$[rbp] - 00225 66 0f 7f 85 f0 + 00226 66 0f 7f 85 f0 04 00 00 movdqa XMMWORD PTR dif04$8[rbp], xmm0 - 0022d 66 0f ef c0 pxor xmm0, xmm0 - 00231 66 0f 61 85 c0 + 0022e 66 0f ef c0 pxor xmm0, xmm0 + 00232 66 0f 61 85 c0 04 00 00 punpcklwd xmm0, XMMWORD PTR sum04$7[rbp] - 00239 66 0f 72 e0 04 psrad xmm0, 4 - 0023e 66 0f 7f 85 20 + 0023a 66 0f 72 e0 04 psrad xmm0, 4 + 0023f 66 0f 7f 85 20 05 00 00 movdqa XMMWORD PTR t0e_l$9[rbp], xmm0 - 00246 66 0f ef c0 pxor xmm0, xmm0 - 0024a 66 0f 69 85 c0 + 00247 66 0f ef c0 pxor xmm0, xmm0 + 0024b 66 0f 69 85 c0 04 00 00 punpckhwd xmm0, XMMWORD PTR sum04$7[rbp] - 00252 66 0f 72 e0 04 psrad xmm0, 4 - 00257 66 0f 7f 85 50 + 00253 66 0f 72 e0 04 psrad xmm0, 4 + 00258 66 0f 7f 85 50 05 00 00 movdqa XMMWORD PTR t0e_h$10[rbp], xmm0 - 0025f 66 0f ef c0 pxor xmm0, xmm0 - 00263 66 0f 61 85 f0 + 00260 66 0f ef c0 pxor xmm0, xmm0 + 00264 66 0f 61 85 f0 04 00 00 punpcklwd xmm0, XMMWORD PTR dif04$8[rbp] - 0026b 66 0f 72 e0 04 psrad xmm0, 4 - 00270 66 0f 7f 85 80 + 0026c 66 0f 72 e0 04 psrad xmm0, 4 + 00271 66 0f 7f 85 80 05 00 00 movdqa XMMWORD PTR t1e_l$11[rbp], xmm0 - 00278 66 0f ef c0 pxor xmm0, xmm0 - 0027c 66 0f 69 85 f0 + 00279 66 0f ef c0 pxor xmm0, xmm0 + 0027d 66 0f 69 85 f0 04 00 00 punpckhwd xmm0, XMMWORD PTR dif04$8[rbp] - 00284 66 0f 72 e0 04 psrad xmm0, 4 - 00289 66 0f 7f 85 b0 + 00285 66 0f 72 e0 04 psrad xmm0, 4 + 0028a 66 0f 7f 85 b0 05 00 00 movdqa XMMWORD PTR t1e_h$12[rbp], xmm0 - 00291 66 0f 6f 85 20 + 00292 66 0f 6f 85 20 05 00 00 movdqa xmm0, XMMWORD PTR t0e_l$9[rbp] - 00299 66 0f fe 85 60 + 0029a 66 0f fe 85 60 04 00 00 paddd xmm0, XMMWORD PTR t3e_l$5[rbp] - 002a1 66 0f 7f 85 e0 + 002a2 66 0f 7f 85 e0 05 00 00 movdqa XMMWORD PTR x0_l$13[rbp], xmm0 - 002a9 66 0f 6f 85 50 + 002aa 66 0f 6f 85 50 05 00 00 movdqa xmm0, XMMWORD PTR t0e_h$10[rbp] - 002b1 66 0f fe 85 90 + 002b2 66 0f fe 85 90 04 00 00 paddd xmm0, XMMWORD PTR t3e_h$6[rbp] - 002b9 66 0f 7f 85 10 + 002ba 66 0f 7f 85 10 06 00 00 movdqa XMMWORD PTR x0_h$14[rbp], xmm0 - 002c1 66 0f 6f 85 20 + 002c2 66 0f 6f 85 20 05 00 00 movdqa xmm0, XMMWORD PTR t0e_l$9[rbp] - 002c9 66 0f fa 85 60 + 002ca 66 0f fa 85 60 04 00 00 psubd xmm0, XMMWORD PTR t3e_l$5[rbp] - 002d1 66 0f 7f 85 40 + 002d2 66 0f 7f 85 40 06 00 00 movdqa XMMWORD PTR x3_l$15[rbp], xmm0 - 002d9 66 0f 6f 85 50 + 002da 66 0f 6f 85 50 05 00 00 movdqa xmm0, XMMWORD PTR t0e_h$10[rbp] - 002e1 66 0f fa 85 90 + 002e2 66 0f fa 85 90 04 00 00 psubd xmm0, XMMWORD PTR t3e_h$6[rbp] - 002e9 66 0f 7f 85 70 + 002ea 66 0f 7f 85 70 06 00 00 movdqa XMMWORD PTR x3_h$16[rbp], xmm0 - 002f1 66 0f 6f 85 80 + 002f2 66 0f 6f 85 80 05 00 00 movdqa xmm0, XMMWORD PTR t1e_l$11[rbp] - 002f9 66 0f fe 85 00 + 002fa 66 0f fe 85 00 04 00 00 paddd xmm0, XMMWORD PTR t2e_l$3[rbp] - 00301 66 0f 7f 85 a0 + 00302 66 0f 7f 85 a0 06 00 00 movdqa XMMWORD PTR x1_l$17[rbp], xmm0 - 00309 66 0f 6f 85 b0 + 0030a 66 0f 6f 85 b0 05 00 00 movdqa xmm0, XMMWORD PTR t1e_h$12[rbp] - 00311 66 0f fe 85 30 + 00312 66 0f fe 85 30 04 00 00 paddd xmm0, XMMWORD PTR t2e_h$4[rbp] - 00319 66 0f 7f 85 d0 + 0031a 66 0f 7f 85 d0 06 00 00 movdqa XMMWORD PTR x1_h$18[rbp], xmm0 - 00321 66 0f 6f 85 80 + 00322 66 0f 6f 85 80 05 00 00 movdqa xmm0, XMMWORD PTR t1e_l$11[rbp] - 00329 66 0f fa 85 00 + 0032a 66 0f fa 85 00 04 00 00 psubd xmm0, XMMWORD PTR t2e_l$3[rbp] - 00331 66 0f 7f 85 00 + 00332 66 0f 7f 85 00 07 00 00 movdqa XMMWORD PTR x2_l$19[rbp], xmm0 - 00339 66 0f 6f 85 b0 + 0033a 66 0f 6f 85 b0 05 00 00 movdqa xmm0, XMMWORD PTR t1e_h$12[rbp] - 00341 66 0f fa 85 30 + 00342 66 0f fa 85 30 04 00 00 psubd xmm0, XMMWORD PTR t2e_h$4[rbp] - 00349 66 0f 7f 85 30 + 0034a 66 0f 7f 85 30 07 00 00 movdqa XMMWORD PTR x2_h$20[rbp], xmm0 - 00351 66 0f 6f 85 60 + 00352 66 0f 6f 85 60 01 00 00 movdqa xmm0, XMMWORD PTR row7$[rbp] - 00359 66 0f 61 85 a0 + 0035a 66 0f 61 85 a0 00 00 00 punpcklwd xmm0, XMMWORD PTR row3$[rbp] - 00361 66 0f 7f 85 60 + 00362 66 0f 7f 85 60 07 00 00 movdqa XMMWORD PTR rot2_0lo$21[rbp], xmm0 - 00369 66 0f 6f 85 60 + 0036a 66 0f 6f 85 60 01 00 00 movdqa xmm0, XMMWORD PTR row7$[rbp] - 00371 66 0f 69 85 a0 + 00372 66 0f 69 85 a0 00 00 00 punpckhwd xmm0, XMMWORD PTR row3$[rbp] - 00379 66 0f 7f 85 90 + 0037a 66 0f 7f 85 90 07 00 00 movdqa XMMWORD PTR rot2_0hi$22[rbp], xmm0 - 00381 66 0f 6f 85 60 + 00382 66 0f 6f 85 60 07 00 00 movdqa xmm0, XMMWORD PTR rot2_0lo$21[rbp] - 00389 66 0f f5 85 80 + 0038a 66 0f f5 85 80 02 00 00 pmaddwd xmm0, XMMWORD PTR rot2_0$[rbp] - 00391 66 0f 7f 85 c0 + 00392 66 0f 7f 85 c0 07 00 00 movdqa XMMWORD PTR y0o_l$23[rbp], xmm0 - 00399 66 0f 6f 85 90 + 0039a 66 0f 6f 85 90 07 00 00 movdqa xmm0, XMMWORD PTR rot2_0hi$22[rbp] - 003a1 66 0f f5 85 80 + 003a2 66 0f f5 85 80 02 00 00 pmaddwd xmm0, XMMWORD PTR rot2_0$[rbp] - 003a9 66 0f 7f 85 f0 + 003aa 66 0f 7f 85 f0 07 00 00 movdqa XMMWORD PTR y0o_h$24[rbp], xmm0 - 003b1 66 0f 6f 85 60 + 003b2 66 0f 6f 85 60 07 00 00 movdqa xmm0, XMMWORD PTR rot2_0lo$21[rbp] - 003b9 66 0f f5 85 b0 + 003ba 66 0f f5 85 b0 02 00 00 pmaddwd xmm0, XMMWORD PTR rot2_1$[rbp] - 003c1 66 0f 7f 85 20 + 003c2 66 0f 7f 85 20 08 00 00 movdqa XMMWORD PTR y2o_l$25[rbp], xmm0 - 003c9 66 0f 6f 85 90 + 003ca 66 0f 6f 85 90 07 00 00 movdqa xmm0, XMMWORD PTR rot2_0hi$22[rbp] - 003d1 66 0f f5 85 b0 + 003d2 66 0f f5 85 b0 02 00 00 pmaddwd xmm0, XMMWORD PTR rot2_1$[rbp] - 003d9 66 0f 7f 85 50 + 003da 66 0f 7f 85 50 08 00 00 movdqa XMMWORD PTR y2o_h$26[rbp], xmm0 - 003e1 66 0f 6f 85 00 + 003e2 66 0f 6f 85 00 01 00 00 movdqa xmm0, XMMWORD PTR row5$[rbp] - 003e9 66 0f 61 45 40 punpcklwd xmm0, XMMWORD PTR row1$[rbp] - 003ee 66 0f 7f 85 80 + 003ea 66 0f 61 45 40 punpcklwd xmm0, XMMWORD PTR row1$[rbp] + 003ef 66 0f 7f 85 80 08 00 00 movdqa XMMWORD PTR rot3_0lo$27[rbp], xmm0 - 003f6 66 0f 6f 85 00 + 003f7 66 0f 6f 85 00 01 00 00 movdqa xmm0, XMMWORD PTR row5$[rbp] - 003fe 66 0f 69 45 40 punpckhwd xmm0, XMMWORD PTR row1$[rbp] - 00403 66 0f 7f 85 b0 + 003ff 66 0f 69 45 40 punpckhwd xmm0, XMMWORD PTR row1$[rbp] + 00404 66 0f 7f 85 b0 08 00 00 movdqa XMMWORD PTR rot3_0hi$28[rbp], xmm0 - 0040b 66 0f 6f 85 80 + 0040c 66 0f 6f 85 80 08 00 00 movdqa xmm0, XMMWORD PTR rot3_0lo$27[rbp] - 00413 66 0f f5 85 e0 + 00414 66 0f f5 85 e0 02 00 00 pmaddwd xmm0, XMMWORD PTR rot3_0$[rbp] - 0041b 66 0f 7f 85 e0 + 0041c 66 0f 7f 85 e0 08 00 00 movdqa XMMWORD PTR y1o_l$29[rbp], xmm0 - 00423 66 0f 6f 85 b0 + 00424 66 0f 6f 85 b0 08 00 00 movdqa xmm0, XMMWORD PTR rot3_0hi$28[rbp] - 0042b 66 0f f5 85 e0 + 0042c 66 0f f5 85 e0 02 00 00 pmaddwd xmm0, XMMWORD PTR rot3_0$[rbp] - 00433 66 0f 7f 85 10 + 00434 66 0f 7f 85 10 09 00 00 movdqa XMMWORD PTR y1o_h$30[rbp], xmm0 - 0043b 66 0f 6f 85 80 + 0043c 66 0f 6f 85 80 08 00 00 movdqa xmm0, XMMWORD PTR rot3_0lo$27[rbp] - 00443 66 0f f5 85 10 + 00444 66 0f f5 85 10 03 00 00 pmaddwd xmm0, XMMWORD PTR rot3_1$[rbp] - 0044b 66 0f 7f 85 40 + 0044c 66 0f 7f 85 40 09 00 00 movdqa XMMWORD PTR y3o_l$31[rbp], xmm0 - 00453 66 0f 6f 85 b0 + 00454 66 0f 6f 85 b0 08 00 00 movdqa xmm0, XMMWORD PTR rot3_0hi$28[rbp] - 0045b 66 0f f5 85 10 + 0045c 66 0f f5 85 10 03 00 00 pmaddwd xmm0, XMMWORD PTR rot3_1$[rbp] - 00463 66 0f 7f 85 70 + 00464 66 0f 7f 85 70 09 00 00 movdqa XMMWORD PTR y3o_h$32[rbp], xmm0 - 0046b 66 0f 6f 45 40 movdqa xmm0, XMMWORD PTR row1$[rbp] - 00470 66 0f fd 85 60 + 0046c 66 0f 6f 45 40 movdqa xmm0, XMMWORD PTR row1$[rbp] + 00471 66 0f fd 85 60 01 00 00 paddw xmm0, XMMWORD PTR row7$[rbp] - 00478 66 0f 7f 85 a0 + 00479 66 0f 7f 85 a0 09 00 00 movdqa XMMWORD PTR sum17$33[rbp], xmm0 - 00480 66 0f 6f 85 a0 + 00481 66 0f 6f 85 a0 00 00 00 movdqa xmm0, XMMWORD PTR row3$[rbp] - 00488 66 0f fd 85 00 + 00489 66 0f fd 85 00 01 00 00 paddw xmm0, XMMWORD PTR row5$[rbp] - 00490 66 0f 7f 85 d0 + 00491 66 0f 7f 85 d0 09 00 00 movdqa XMMWORD PTR sum35$34[rbp], xmm0 - 00498 66 0f 6f 85 a0 + 00499 66 0f 6f 85 a0 09 00 00 movdqa xmm0, XMMWORD PTR sum17$33[rbp] - 004a0 66 0f 61 85 d0 + 004a1 66 0f 61 85 d0 09 00 00 punpcklwd xmm0, XMMWORD PTR sum35$34[rbp] - 004a8 66 0f 7f 85 00 + 004a9 66 0f 7f 85 00 0a 00 00 movdqa XMMWORD PTR rot1_0lo$35[rbp], xmm0 - 004b0 66 0f 6f 85 a0 + 004b1 66 0f 6f 85 a0 09 00 00 movdqa xmm0, XMMWORD PTR sum17$33[rbp] - 004b8 66 0f 69 85 d0 + 004b9 66 0f 69 85 d0 09 00 00 punpckhwd xmm0, XMMWORD PTR sum35$34[rbp] - 004c0 66 0f 7f 85 30 + 004c1 66 0f 7f 85 30 0a 00 00 movdqa XMMWORD PTR rot1_0hi$36[rbp], xmm0 - 004c8 66 0f 6f 85 00 + 004c9 66 0f 6f 85 00 0a 00 00 movdqa xmm0, XMMWORD PTR rot1_0lo$35[rbp] - 004d0 66 0f f5 85 20 + 004d1 66 0f f5 85 20 02 00 00 pmaddwd xmm0, XMMWORD PTR rot1_0$[rbp] - 004d8 66 0f 7f 85 60 + 004d9 66 0f 7f 85 60 0a 00 00 movdqa XMMWORD PTR y4o_l$37[rbp], xmm0 - 004e0 66 0f 6f 85 30 + 004e1 66 0f 6f 85 30 0a 00 00 movdqa xmm0, XMMWORD PTR rot1_0hi$36[rbp] - 004e8 66 0f f5 85 20 + 004e9 66 0f f5 85 20 02 00 00 pmaddwd xmm0, XMMWORD PTR rot1_0$[rbp] - 004f0 66 0f 7f 85 90 + 004f1 66 0f 7f 85 90 0a 00 00 movdqa XMMWORD PTR y4o_h$38[rbp], xmm0 - 004f8 66 0f 6f 85 00 + 004f9 66 0f 6f 85 00 0a 00 00 movdqa xmm0, XMMWORD PTR rot1_0lo$35[rbp] - 00500 66 0f f5 85 50 + 00501 66 0f f5 85 50 02 00 00 pmaddwd xmm0, XMMWORD PTR rot1_1$[rbp] - 00508 66 0f 7f 85 c0 + 00509 66 0f 7f 85 c0 0a 00 00 movdqa XMMWORD PTR y5o_l$39[rbp], xmm0 - 00510 66 0f 6f 85 30 + 00511 66 0f 6f 85 30 0a 00 00 movdqa xmm0, XMMWORD PTR rot1_0hi$36[rbp] - 00518 66 0f f5 85 50 + 00519 66 0f f5 85 50 02 00 00 pmaddwd xmm0, XMMWORD PTR rot1_1$[rbp] - 00520 66 0f 7f 85 f0 + 00521 66 0f 7f 85 f0 0a 00 00 movdqa XMMWORD PTR y5o_h$40[rbp], xmm0 - 00528 66 0f 6f 85 c0 + 00529 66 0f 6f 85 c0 07 00 00 movdqa xmm0, XMMWORD PTR y0o_l$23[rbp] - 00530 66 0f fe 85 60 + 00531 66 0f fe 85 60 0a 00 00 paddd xmm0, XMMWORD PTR y4o_l$37[rbp] - 00538 66 0f 7f 85 20 + 00539 66 0f 7f 85 20 0b 00 00 movdqa XMMWORD PTR x4_l$41[rbp], xmm0 - 00540 66 0f 6f 85 f0 + 00541 66 0f 6f 85 f0 07 00 00 movdqa xmm0, XMMWORD PTR y0o_h$24[rbp] - 00548 66 0f fe 85 90 + 00549 66 0f fe 85 90 0a 00 00 paddd xmm0, XMMWORD PTR y4o_h$38[rbp] - 00550 66 0f 7f 85 50 + 00551 66 0f 7f 85 50 0b 00 00 movdqa XMMWORD PTR x4_h$42[rbp], xmm0 - 00558 66 0f 6f 85 e0 + 00559 66 0f 6f 85 e0 08 00 00 movdqa xmm0, XMMWORD PTR y1o_l$29[rbp] - 00560 66 0f fe 85 c0 + 00561 66 0f fe 85 c0 0a 00 00 paddd xmm0, XMMWORD PTR y5o_l$39[rbp] - 00568 66 0f 7f 85 80 + 00569 66 0f 7f 85 80 0b 00 00 movdqa XMMWORD PTR x5_l$43[rbp], xmm0 - 00570 66 0f 6f 85 10 + 00571 66 0f 6f 85 10 09 00 00 movdqa xmm0, XMMWORD PTR y1o_h$30[rbp] - 00578 66 0f fe 85 f0 + 00579 66 0f fe 85 f0 0a 00 00 paddd xmm0, XMMWORD PTR y5o_h$40[rbp] - 00580 66 0f 7f 85 b0 + 00581 66 0f 7f 85 b0 0b 00 00 movdqa XMMWORD PTR x5_h$44[rbp], xmm0 - 00588 66 0f 6f 85 20 + 00589 66 0f 6f 85 20 08 00 00 movdqa xmm0, XMMWORD PTR y2o_l$25[rbp] - 00590 66 0f fe 85 c0 + 00591 66 0f fe 85 c0 0a 00 00 paddd xmm0, XMMWORD PTR y5o_l$39[rbp] - 00598 66 0f 7f 85 e0 + 00599 66 0f 7f 85 e0 0b 00 00 movdqa XMMWORD PTR x6_l$45[rbp], xmm0 - 005a0 66 0f 6f 85 50 + 005a1 66 0f 6f 85 50 08 00 00 movdqa xmm0, XMMWORD PTR y2o_h$26[rbp] - 005a8 66 0f fe 85 f0 + 005a9 66 0f fe 85 f0 0a 00 00 paddd xmm0, XMMWORD PTR y5o_h$40[rbp] - 005b0 66 0f 7f 85 10 + 005b1 66 0f 7f 85 10 0c 00 00 movdqa XMMWORD PTR x6_h$46[rbp], xmm0 - 005b8 66 0f 6f 85 40 + 005b9 66 0f 6f 85 40 09 00 00 movdqa xmm0, XMMWORD PTR y3o_l$31[rbp] - 005c0 66 0f fe 85 60 + 005c1 66 0f fe 85 60 0a 00 00 paddd xmm0, XMMWORD PTR y4o_l$37[rbp] - 005c8 66 0f 7f 85 40 + 005c9 66 0f 7f 85 40 0c 00 00 movdqa XMMWORD PTR x7_l$47[rbp], xmm0 - 005d0 66 0f 6f 85 70 + 005d1 66 0f 6f 85 70 09 00 00 movdqa xmm0, XMMWORD PTR y3o_h$32[rbp] - 005d8 66 0f fe 85 90 + 005d9 66 0f fe 85 90 0a 00 00 paddd xmm0, XMMWORD PTR y4o_h$38[rbp] - 005e0 66 0f 7f 85 70 + 005e1 66 0f 7f 85 70 0c 00 00 movdqa XMMWORD PTR x7_h$48[rbp], xmm0 - 005e8 66 0f 6f 85 e0 + 005e9 66 0f 6f 85 e0 05 00 00 movdqa xmm0, XMMWORD PTR x0_l$13[rbp] - 005f0 66 0f fe 85 40 + 005f1 66 0f fe 85 40 03 00 00 paddd xmm0, XMMWORD PTR bias_0$[rbp] - 005f8 66 0f 7f 85 a0 + 005f9 66 0f 7f 85 a0 0c 00 00 movdqa XMMWORD PTR abiased_l$49[rbp], xmm0 - 00600 66 0f 6f 85 10 + 00601 66 0f 6f 85 10 06 00 00 movdqa xmm0, XMMWORD PTR x0_h$14[rbp] - 00608 66 0f fe 85 40 + 00609 66 0f fe 85 40 03 00 00 paddd xmm0, XMMWORD PTR bias_0$[rbp] - 00610 66 0f 7f 85 d0 + 00611 66 0f 7f 85 d0 0c 00 00 movdqa XMMWORD PTR abiased_h$50[rbp], xmm0 - 00618 66 0f 6f 85 a0 + 00619 66 0f 6f 85 a0 0c 00 00 movdqa xmm0, XMMWORD PTR abiased_l$49[rbp] - 00620 66 0f fe 85 40 + 00621 66 0f fe 85 40 0c 00 00 paddd xmm0, XMMWORD PTR x7_l$47[rbp] - 00628 66 0f 7f 85 00 + 00629 66 0f 7f 85 00 0d 00 00 movdqa XMMWORD PTR sum_l$51[rbp], xmm0 - 00630 66 0f 6f 85 d0 + 00631 66 0f 6f 85 d0 0c 00 00 movdqa xmm0, XMMWORD PTR abiased_h$50[rbp] - 00638 66 0f fe 85 70 + 00639 66 0f fe 85 70 0c 00 00 paddd xmm0, XMMWORD PTR x7_h$48[rbp] - 00640 66 0f 7f 85 30 + 00641 66 0f 7f 85 30 0d 00 00 movdqa XMMWORD PTR sum_h$52[rbp], xmm0 - 00648 66 0f 6f 85 a0 + 00649 66 0f 6f 85 a0 0c 00 00 movdqa xmm0, XMMWORD PTR abiased_l$49[rbp] - 00650 66 0f fa 85 40 + 00651 66 0f fa 85 40 0c 00 00 psubd xmm0, XMMWORD PTR x7_l$47[rbp] - 00658 66 0f 7f 85 60 + 00659 66 0f 7f 85 60 0d 00 00 movdqa XMMWORD PTR dif_l$53[rbp], xmm0 - 00660 66 0f 6f 85 d0 + 00661 66 0f 6f 85 d0 0c 00 00 movdqa xmm0, XMMWORD PTR abiased_h$50[rbp] - 00668 66 0f fa 85 70 + 00669 66 0f fa 85 70 0c 00 00 psubd xmm0, XMMWORD PTR x7_h$48[rbp] - 00670 66 0f 7f 85 90 + 00671 66 0f 7f 85 90 0d 00 00 movdqa XMMWORD PTR dif_h$54[rbp], xmm0 - 00678 66 0f 6f 85 30 + 00679 66 0f 6f 85 30 0d 00 00 movdqa xmm0, XMMWORD PTR sum_h$52[rbp] - 00680 66 0f 72 e0 0a psrad xmm0, 10 - 00685 66 0f 6f 8d 00 + 00681 66 0f 72 e0 0a psrad xmm0, 10 + 00686 66 0f 6f 8d 00 0d 00 00 movdqa xmm1, XMMWORD PTR sum_l$51[rbp] - 0068d 66 0f 72 e1 0a psrad xmm1, 10 - 00692 66 0f 6b c8 packssdw xmm1, xmm0 - 00696 66 0f 6f c1 movdqa xmm0, xmm1 - 0069a 66 0f 7f 45 10 movdqa XMMWORD PTR row0$[rbp], xmm0 - 0069f 66 0f 6f 85 90 + 0068e 66 0f 72 e1 0a psrad xmm1, 10 + 00693 66 0f 6b c8 packssdw xmm1, xmm0 + 00697 66 0f 6f c1 movdqa xmm0, xmm1 + 0069b 66 0f 7f 45 10 movdqa XMMWORD PTR row0$[rbp], xmm0 + 006a0 66 0f 6f 85 90 0d 00 00 movdqa xmm0, XMMWORD PTR dif_h$54[rbp] - 006a7 66 0f 72 e0 0a psrad xmm0, 10 - 006ac 66 0f 6f 8d 60 + 006a8 66 0f 72 e0 0a psrad xmm0, 10 + 006ad 66 0f 6f 8d 60 0d 00 00 movdqa xmm1, XMMWORD PTR dif_l$53[rbp] - 006b4 66 0f 72 e1 0a psrad xmm1, 10 - 006b9 66 0f 6b c8 packssdw xmm1, xmm0 - 006bd 66 0f 6f c1 movdqa xmm0, xmm1 - 006c1 66 0f 7f 85 60 + 006b5 66 0f 72 e1 0a psrad xmm1, 10 + 006ba 66 0f 6b c8 packssdw xmm1, xmm0 + 006be 66 0f 6f c1 movdqa xmm0, xmm1 + 006c2 66 0f 7f 85 60 01 00 00 movdqa XMMWORD PTR row7$[rbp], xmm0 - 006c9 66 0f 6f 85 a0 + 006ca 66 0f 6f 85 a0 06 00 00 movdqa xmm0, XMMWORD PTR x1_l$17[rbp] - 006d1 66 0f fe 85 40 + 006d2 66 0f fe 85 40 03 00 00 paddd xmm0, XMMWORD PTR bias_0$[rbp] - 006d9 66 0f 7f 85 c0 + 006da 66 0f 7f 85 c0 0d 00 00 movdqa XMMWORD PTR abiased_l$55[rbp], xmm0 - 006e1 66 0f 6f 85 d0 + 006e2 66 0f 6f 85 d0 06 00 00 movdqa xmm0, XMMWORD PTR x1_h$18[rbp] - 006e9 66 0f fe 85 40 + 006ea 66 0f fe 85 40 03 00 00 paddd xmm0, XMMWORD PTR bias_0$[rbp] - 006f1 66 0f 7f 85 f0 + 006f2 66 0f 7f 85 f0 0d 00 00 movdqa XMMWORD PTR abiased_h$56[rbp], xmm0 - 006f9 66 0f 6f 85 c0 + 006fa 66 0f 6f 85 c0 0d 00 00 movdqa xmm0, XMMWORD PTR abiased_l$55[rbp] - 00701 66 0f fe 85 e0 + 00702 66 0f fe 85 e0 0b 00 00 paddd xmm0, XMMWORD PTR x6_l$45[rbp] - 00709 66 0f 7f 85 20 + 0070a 66 0f 7f 85 20 0e 00 00 movdqa XMMWORD PTR sum_l$57[rbp], xmm0 - 00711 66 0f 6f 85 f0 + 00712 66 0f 6f 85 f0 0d 00 00 movdqa xmm0, XMMWORD PTR abiased_h$56[rbp] - 00719 66 0f fe 85 10 + 0071a 66 0f fe 85 10 0c 00 00 paddd xmm0, XMMWORD PTR x6_h$46[rbp] - 00721 66 0f 7f 85 50 + 00722 66 0f 7f 85 50 0e 00 00 movdqa XMMWORD PTR sum_h$58[rbp], xmm0 - 00729 66 0f 6f 85 c0 + 0072a 66 0f 6f 85 c0 0d 00 00 movdqa xmm0, XMMWORD PTR abiased_l$55[rbp] - 00731 66 0f fa 85 e0 + 00732 66 0f fa 85 e0 0b 00 00 psubd xmm0, XMMWORD PTR x6_l$45[rbp] - 00739 66 0f 7f 85 80 + 0073a 66 0f 7f 85 80 0e 00 00 movdqa XMMWORD PTR dif_l$59[rbp], xmm0 - 00741 66 0f 6f 85 f0 + 00742 66 0f 6f 85 f0 0d 00 00 movdqa xmm0, XMMWORD PTR abiased_h$56[rbp] - 00749 66 0f fa 85 10 + 0074a 66 0f fa 85 10 0c 00 00 psubd xmm0, XMMWORD PTR x6_h$46[rbp] - 00751 66 0f 7f 85 b0 + 00752 66 0f 7f 85 b0 0e 00 00 movdqa XMMWORD PTR dif_h$60[rbp], xmm0 - 00759 66 0f 6f 85 50 + 0075a 66 0f 6f 85 50 0e 00 00 movdqa xmm0, XMMWORD PTR sum_h$58[rbp] - 00761 66 0f 72 e0 0a psrad xmm0, 10 - 00766 66 0f 6f 8d 20 + 00762 66 0f 72 e0 0a psrad xmm0, 10 + 00767 66 0f 6f 8d 20 0e 00 00 movdqa xmm1, XMMWORD PTR sum_l$57[rbp] - 0076e 66 0f 72 e1 0a psrad xmm1, 10 - 00773 66 0f 6b c8 packssdw xmm1, xmm0 - 00777 66 0f 6f c1 movdqa xmm0, xmm1 - 0077b 66 0f 7f 45 40 movdqa XMMWORD PTR row1$[rbp], xmm0 - 00780 66 0f 6f 85 b0 + 0076f 66 0f 72 e1 0a psrad xmm1, 10 + 00774 66 0f 6b c8 packssdw xmm1, xmm0 + 00778 66 0f 6f c1 movdqa xmm0, xmm1 + 0077c 66 0f 7f 45 40 movdqa XMMWORD PTR row1$[rbp], xmm0 + 00781 66 0f 6f 85 b0 0e 00 00 movdqa xmm0, XMMWORD PTR dif_h$60[rbp] - 00788 66 0f 72 e0 0a psrad xmm0, 10 - 0078d 66 0f 6f 8d 80 + 00789 66 0f 72 e0 0a psrad xmm0, 10 + 0078e 66 0f 6f 8d 80 0e 00 00 movdqa xmm1, XMMWORD PTR dif_l$59[rbp] - 00795 66 0f 72 e1 0a psrad xmm1, 10 - 0079a 66 0f 6b c8 packssdw xmm1, xmm0 - 0079e 66 0f 6f c1 movdqa xmm0, xmm1 - 007a2 66 0f 7f 85 30 + 00796 66 0f 72 e1 0a psrad xmm1, 10 + 0079b 66 0f 6b c8 packssdw xmm1, xmm0 + 0079f 66 0f 6f c1 movdqa xmm0, xmm1 + 007a3 66 0f 7f 85 30 01 00 00 movdqa XMMWORD PTR row6$[rbp], xmm0 - 007aa 66 0f 6f 85 00 + 007ab 66 0f 6f 85 00 07 00 00 movdqa xmm0, XMMWORD PTR x2_l$19[rbp] - 007b2 66 0f fe 85 40 + 007b3 66 0f fe 85 40 03 00 00 paddd xmm0, XMMWORD PTR bias_0$[rbp] - 007ba 66 0f 7f 85 e0 + 007bb 66 0f 7f 85 e0 0e 00 00 movdqa XMMWORD PTR abiased_l$61[rbp], xmm0 - 007c2 66 0f 6f 85 30 + 007c3 66 0f 6f 85 30 07 00 00 movdqa xmm0, XMMWORD PTR x2_h$20[rbp] - 007ca 66 0f fe 85 40 + 007cb 66 0f fe 85 40 03 00 00 paddd xmm0, XMMWORD PTR bias_0$[rbp] - 007d2 66 0f 7f 85 10 + 007d3 66 0f 7f 85 10 0f 00 00 movdqa XMMWORD PTR abiased_h$62[rbp], xmm0 - 007da 66 0f 6f 85 e0 + 007db 66 0f 6f 85 e0 0e 00 00 movdqa xmm0, XMMWORD PTR abiased_l$61[rbp] - 007e2 66 0f fe 85 80 + 007e3 66 0f fe 85 80 0b 00 00 paddd xmm0, XMMWORD PTR x5_l$43[rbp] - 007ea 66 0f 7f 85 40 + 007eb 66 0f 7f 85 40 0f 00 00 movdqa XMMWORD PTR sum_l$63[rbp], xmm0 - 007f2 66 0f 6f 85 10 + 007f3 66 0f 6f 85 10 0f 00 00 movdqa xmm0, XMMWORD PTR abiased_h$62[rbp] - 007fa 66 0f fe 85 b0 + 007fb 66 0f fe 85 b0 0b 00 00 paddd xmm0, XMMWORD PTR x5_h$44[rbp] - 00802 66 0f 7f 85 70 + 00803 66 0f 7f 85 70 0f 00 00 movdqa XMMWORD PTR sum_h$64[rbp], xmm0 - 0080a 66 0f 6f 85 e0 + 0080b 66 0f 6f 85 e0 0e 00 00 movdqa xmm0, XMMWORD PTR abiased_l$61[rbp] - 00812 66 0f fa 85 80 + 00813 66 0f fa 85 80 0b 00 00 psubd xmm0, XMMWORD PTR x5_l$43[rbp] - 0081a 66 0f 7f 85 a0 + 0081b 66 0f 7f 85 a0 0f 00 00 movdqa XMMWORD PTR dif_l$65[rbp], xmm0 - 00822 66 0f 6f 85 10 + 00823 66 0f 6f 85 10 0f 00 00 movdqa xmm0, XMMWORD PTR abiased_h$62[rbp] - 0082a 66 0f fa 85 b0 + 0082b 66 0f fa 85 b0 0b 00 00 psubd xmm0, XMMWORD PTR x5_h$44[rbp] - 00832 66 0f 7f 85 d0 + 00833 66 0f 7f 85 d0 0f 00 00 movdqa XMMWORD PTR dif_h$66[rbp], xmm0 - 0083a 66 0f 6f 85 70 + 0083b 66 0f 6f 85 70 0f 00 00 movdqa xmm0, XMMWORD PTR sum_h$64[rbp] - 00842 66 0f 72 e0 0a psrad xmm0, 10 - 00847 66 0f 6f 8d 40 + 00843 66 0f 72 e0 0a psrad xmm0, 10 + 00848 66 0f 6f 8d 40 0f 00 00 movdqa xmm1, XMMWORD PTR sum_l$63[rbp] - 0084f 66 0f 72 e1 0a psrad xmm1, 10 - 00854 66 0f 6b c8 packssdw xmm1, xmm0 - 00858 66 0f 6f c1 movdqa xmm0, xmm1 - 0085c 66 0f 7f 45 70 movdqa XMMWORD PTR row2$[rbp], xmm0 - 00861 66 0f 6f 85 d0 + 00850 66 0f 72 e1 0a psrad xmm1, 10 + 00855 66 0f 6b c8 packssdw xmm1, xmm0 + 00859 66 0f 6f c1 movdqa xmm0, xmm1 + 0085d 66 0f 7f 45 70 movdqa XMMWORD PTR row2$[rbp], xmm0 + 00862 66 0f 6f 85 d0 0f 00 00 movdqa xmm0, XMMWORD PTR dif_h$66[rbp] - 00869 66 0f 72 e0 0a psrad xmm0, 10 - 0086e 66 0f 6f 8d a0 + 0086a 66 0f 72 e0 0a psrad xmm0, 10 + 0086f 66 0f 6f 8d a0 0f 00 00 movdqa xmm1, XMMWORD PTR dif_l$65[rbp] - 00876 66 0f 72 e1 0a psrad xmm1, 10 - 0087b 66 0f 6b c8 packssdw xmm1, xmm0 - 0087f 66 0f 6f c1 movdqa xmm0, xmm1 - 00883 66 0f 7f 85 00 + 00877 66 0f 72 e1 0a psrad xmm1, 10 + 0087c 66 0f 6b c8 packssdw xmm1, xmm0 + 00880 66 0f 6f c1 movdqa xmm0, xmm1 + 00884 66 0f 7f 85 00 01 00 00 movdqa XMMWORD PTR row5$[rbp], xmm0 - 0088b 66 0f 6f 85 40 + 0088c 66 0f 6f 85 40 06 00 00 movdqa xmm0, XMMWORD PTR x3_l$15[rbp] - 00893 66 0f fe 85 40 + 00894 66 0f fe 85 40 03 00 00 paddd xmm0, XMMWORD PTR bias_0$[rbp] - 0089b 66 0f 7f 85 00 + 0089c 66 0f 7f 85 00 10 00 00 movdqa XMMWORD PTR abiased_l$67[rbp], xmm0 - 008a3 66 0f 6f 85 70 + 008a4 66 0f 6f 85 70 06 00 00 movdqa xmm0, XMMWORD PTR x3_h$16[rbp] - 008ab 66 0f fe 85 40 + 008ac 66 0f fe 85 40 03 00 00 paddd xmm0, XMMWORD PTR bias_0$[rbp] - 008b3 66 0f 7f 85 30 + 008b4 66 0f 7f 85 30 10 00 00 movdqa XMMWORD PTR abiased_h$68[rbp], xmm0 - 008bb 66 0f 6f 85 00 + 008bc 66 0f 6f 85 00 10 00 00 movdqa xmm0, XMMWORD PTR abiased_l$67[rbp] - 008c3 66 0f fe 85 20 + 008c4 66 0f fe 85 20 0b 00 00 paddd xmm0, XMMWORD PTR x4_l$41[rbp] - 008cb 66 0f 7f 85 60 + 008cc 66 0f 7f 85 60 10 00 00 movdqa XMMWORD PTR sum_l$69[rbp], xmm0 - 008d3 66 0f 6f 85 30 + 008d4 66 0f 6f 85 30 10 00 00 movdqa xmm0, XMMWORD PTR abiased_h$68[rbp] - 008db 66 0f fe 85 50 + 008dc 66 0f fe 85 50 0b 00 00 paddd xmm0, XMMWORD PTR x4_h$42[rbp] - 008e3 66 0f 7f 85 90 + 008e4 66 0f 7f 85 90 10 00 00 movdqa XMMWORD PTR sum_h$70[rbp], xmm0 - 008eb 66 0f 6f 85 00 + 008ec 66 0f 6f 85 00 10 00 00 movdqa xmm0, XMMWORD PTR abiased_l$67[rbp] - 008f3 66 0f fa 85 20 + 008f4 66 0f fa 85 20 0b 00 00 psubd xmm0, XMMWORD PTR x4_l$41[rbp] - 008fb 66 0f 7f 85 c0 + 008fc 66 0f 7f 85 c0 10 00 00 movdqa XMMWORD PTR dif_l$71[rbp], xmm0 - 00903 66 0f 6f 85 30 + 00904 66 0f 6f 85 30 10 00 00 movdqa xmm0, XMMWORD PTR abiased_h$68[rbp] - 0090b 66 0f fa 85 50 + 0090c 66 0f fa 85 50 0b 00 00 psubd xmm0, XMMWORD PTR x4_h$42[rbp] - 00913 66 0f 7f 85 f0 + 00914 66 0f 7f 85 f0 10 00 00 movdqa XMMWORD PTR dif_h$72[rbp], xmm0 - 0091b 66 0f 6f 85 90 + 0091c 66 0f 6f 85 90 10 00 00 movdqa xmm0, XMMWORD PTR sum_h$70[rbp] - 00923 66 0f 72 e0 0a psrad xmm0, 10 - 00928 66 0f 6f 8d 60 + 00924 66 0f 72 e0 0a psrad xmm0, 10 + 00929 66 0f 6f 8d 60 10 00 00 movdqa xmm1, XMMWORD PTR sum_l$69[rbp] - 00930 66 0f 72 e1 0a psrad xmm1, 10 - 00935 66 0f 6b c8 packssdw xmm1, xmm0 - 00939 66 0f 6f c1 movdqa xmm0, xmm1 - 0093d 66 0f 7f 85 a0 + 00931 66 0f 72 e1 0a psrad xmm1, 10 + 00936 66 0f 6b c8 packssdw xmm1, xmm0 + 0093a 66 0f 6f c1 movdqa xmm0, xmm1 + 0093e 66 0f 7f 85 a0 00 00 00 movdqa XMMWORD PTR row3$[rbp], xmm0 - 00945 66 0f 6f 85 f0 + 00946 66 0f 6f 85 f0 10 00 00 movdqa xmm0, XMMWORD PTR dif_h$72[rbp] - 0094d 66 0f 72 e0 0a psrad xmm0, 10 - 00952 66 0f 6f 8d c0 + 0094e 66 0f 72 e0 0a psrad xmm0, 10 + 00953 66 0f 6f 8d c0 10 00 00 movdqa xmm1, XMMWORD PTR dif_l$71[rbp] - 0095a 66 0f 72 e1 0a psrad xmm1, 10 - 0095f 66 0f 6b c8 packssdw xmm1, xmm0 - 00963 66 0f 6f c1 movdqa xmm0, xmm1 - 00967 66 0f 7f 85 d0 + 0095b 66 0f 72 e1 0a psrad xmm1, 10 + 00960 66 0f 6b c8 packssdw xmm1, xmm0 + 00964 66 0f 6f c1 movdqa xmm0, xmm1 + 00968 66 0f 7f 85 d0 00 00 00 movdqa XMMWORD PTR row4$[rbp], xmm0 ; 2113 : @@ -33038,207 +33233,207 @@ stbi__idct_simd PROC ; COMDAT ; 2115 : // 16bit 8x8 transpose pass 1 ; 2116 : dct_interleave16(row0, row4); - 0096f 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] - 00974 66 0f 7f 85 90 + 00970 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] + 00975 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 0097c 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] - 00981 66 0f 61 85 d0 + 0097d 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] + 00982 66 0f 61 85 d0 00 00 00 punpcklwd xmm0, XMMWORD PTR row4$[rbp] - 00989 66 0f 7f 45 10 movdqa XMMWORD PTR row0$[rbp], xmm0 - 0098e 66 0f 6f 85 90 + 0098a 66 0f 7f 45 10 movdqa XMMWORD PTR row0$[rbp], xmm0 + 0098f 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 00996 66 0f 69 85 d0 + 00997 66 0f 69 85 d0 00 00 00 punpckhwd xmm0, XMMWORD PTR row4$[rbp] - 0099e 66 0f 7f 85 d0 + 0099f 66 0f 7f 85 d0 00 00 00 movdqa XMMWORD PTR row4$[rbp], xmm0 ; 2117 : dct_interleave16(row1, row5); - 009a6 66 0f 6f 45 40 movdqa xmm0, XMMWORD PTR row1$[rbp] - 009ab 66 0f 7f 85 90 + 009a7 66 0f 6f 45 40 movdqa xmm0, XMMWORD PTR row1$[rbp] + 009ac 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 009b3 66 0f 6f 45 40 movdqa xmm0, XMMWORD PTR row1$[rbp] - 009b8 66 0f 61 85 00 + 009b4 66 0f 6f 45 40 movdqa xmm0, XMMWORD PTR row1$[rbp] + 009b9 66 0f 61 85 00 01 00 00 punpcklwd xmm0, XMMWORD PTR row5$[rbp] - 009c0 66 0f 7f 45 40 movdqa XMMWORD PTR row1$[rbp], xmm0 - 009c5 66 0f 6f 85 90 + 009c1 66 0f 7f 45 40 movdqa XMMWORD PTR row1$[rbp], xmm0 + 009c6 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 009cd 66 0f 69 85 00 + 009ce 66 0f 69 85 00 01 00 00 punpckhwd xmm0, XMMWORD PTR row5$[rbp] - 009d5 66 0f 7f 85 00 + 009d6 66 0f 7f 85 00 01 00 00 movdqa XMMWORD PTR row5$[rbp], xmm0 ; 2118 : dct_interleave16(row2, row6); - 009dd 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] - 009e2 66 0f 7f 85 90 + 009de 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] + 009e3 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 009ea 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] - 009ef 66 0f 61 85 30 + 009eb 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] + 009f0 66 0f 61 85 30 01 00 00 punpcklwd xmm0, XMMWORD PTR row6$[rbp] - 009f7 66 0f 7f 45 70 movdqa XMMWORD PTR row2$[rbp], xmm0 - 009fc 66 0f 6f 85 90 + 009f8 66 0f 7f 45 70 movdqa XMMWORD PTR row2$[rbp], xmm0 + 009fd 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 00a04 66 0f 69 85 30 + 00a05 66 0f 69 85 30 01 00 00 punpckhwd xmm0, XMMWORD PTR row6$[rbp] - 00a0c 66 0f 7f 85 30 + 00a0d 66 0f 7f 85 30 01 00 00 movdqa XMMWORD PTR row6$[rbp], xmm0 ; 2119 : dct_interleave16(row3, row7); - 00a14 66 0f 6f 85 a0 + 00a15 66 0f 6f 85 a0 00 00 00 movdqa xmm0, XMMWORD PTR row3$[rbp] - 00a1c 66 0f 7f 85 90 + 00a1d 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 00a24 66 0f 6f 85 a0 + 00a25 66 0f 6f 85 a0 00 00 00 movdqa xmm0, XMMWORD PTR row3$[rbp] - 00a2c 66 0f 61 85 60 + 00a2d 66 0f 61 85 60 01 00 00 punpcklwd xmm0, XMMWORD PTR row7$[rbp] - 00a34 66 0f 7f 85 a0 + 00a35 66 0f 7f 85 a0 00 00 00 movdqa XMMWORD PTR row3$[rbp], xmm0 - 00a3c 66 0f 6f 85 90 + 00a3d 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 00a44 66 0f 69 85 60 + 00a45 66 0f 69 85 60 01 00 00 punpckhwd xmm0, XMMWORD PTR row7$[rbp] - 00a4c 66 0f 7f 85 60 + 00a4d 66 0f 7f 85 60 01 00 00 movdqa XMMWORD PTR row7$[rbp], xmm0 ; 2120 : ; 2121 : // transpose pass 2 ; 2122 : dct_interleave16(row0, row2); - 00a54 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] - 00a59 66 0f 7f 85 90 + 00a55 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] + 00a5a 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 00a61 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] - 00a66 66 0f 61 45 70 punpcklwd xmm0, XMMWORD PTR row2$[rbp] - 00a6b 66 0f 7f 45 10 movdqa XMMWORD PTR row0$[rbp], xmm0 - 00a70 66 0f 6f 85 90 + 00a62 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] + 00a67 66 0f 61 45 70 punpcklwd xmm0, XMMWORD PTR row2$[rbp] + 00a6c 66 0f 7f 45 10 movdqa XMMWORD PTR row0$[rbp], xmm0 + 00a71 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 00a78 66 0f 69 45 70 punpckhwd xmm0, XMMWORD PTR row2$[rbp] - 00a7d 66 0f 7f 45 70 movdqa XMMWORD PTR row2$[rbp], xmm0 + 00a79 66 0f 69 45 70 punpckhwd xmm0, XMMWORD PTR row2$[rbp] + 00a7e 66 0f 7f 45 70 movdqa XMMWORD PTR row2$[rbp], xmm0 ; 2123 : dct_interleave16(row1, row3); - 00a82 66 0f 6f 45 40 movdqa xmm0, XMMWORD PTR row1$[rbp] - 00a87 66 0f 7f 85 90 + 00a83 66 0f 6f 45 40 movdqa xmm0, XMMWORD PTR row1$[rbp] + 00a88 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 00a8f 66 0f 6f 45 40 movdqa xmm0, XMMWORD PTR row1$[rbp] - 00a94 66 0f 61 85 a0 + 00a90 66 0f 6f 45 40 movdqa xmm0, XMMWORD PTR row1$[rbp] + 00a95 66 0f 61 85 a0 00 00 00 punpcklwd xmm0, XMMWORD PTR row3$[rbp] - 00a9c 66 0f 7f 45 40 movdqa XMMWORD PTR row1$[rbp], xmm0 - 00aa1 66 0f 6f 85 90 + 00a9d 66 0f 7f 45 40 movdqa XMMWORD PTR row1$[rbp], xmm0 + 00aa2 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 00aa9 66 0f 69 85 a0 + 00aaa 66 0f 69 85 a0 00 00 00 punpckhwd xmm0, XMMWORD PTR row3$[rbp] - 00ab1 66 0f 7f 85 a0 + 00ab2 66 0f 7f 85 a0 00 00 00 movdqa XMMWORD PTR row3$[rbp], xmm0 ; 2124 : dct_interleave16(row4, row6); - 00ab9 66 0f 6f 85 d0 + 00aba 66 0f 6f 85 d0 00 00 00 movdqa xmm0, XMMWORD PTR row4$[rbp] - 00ac1 66 0f 7f 85 90 + 00ac2 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 00ac9 66 0f 6f 85 d0 + 00aca 66 0f 6f 85 d0 00 00 00 movdqa xmm0, XMMWORD PTR row4$[rbp] - 00ad1 66 0f 61 85 30 + 00ad2 66 0f 61 85 30 01 00 00 punpcklwd xmm0, XMMWORD PTR row6$[rbp] - 00ad9 66 0f 7f 85 d0 + 00ada 66 0f 7f 85 d0 00 00 00 movdqa XMMWORD PTR row4$[rbp], xmm0 - 00ae1 66 0f 6f 85 90 + 00ae2 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 00ae9 66 0f 69 85 30 + 00aea 66 0f 69 85 30 01 00 00 punpckhwd xmm0, XMMWORD PTR row6$[rbp] - 00af1 66 0f 7f 85 30 + 00af2 66 0f 7f 85 30 01 00 00 movdqa XMMWORD PTR row6$[rbp], xmm0 ; 2125 : dct_interleave16(row5, row7); - 00af9 66 0f 6f 85 00 + 00afa 66 0f 6f 85 00 01 00 00 movdqa xmm0, XMMWORD PTR row5$[rbp] - 00b01 66 0f 7f 85 90 + 00b02 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 00b09 66 0f 6f 85 00 + 00b0a 66 0f 6f 85 00 01 00 00 movdqa xmm0, XMMWORD PTR row5$[rbp] - 00b11 66 0f 61 85 60 + 00b12 66 0f 61 85 60 01 00 00 punpcklwd xmm0, XMMWORD PTR row7$[rbp] - 00b19 66 0f 7f 85 00 + 00b1a 66 0f 7f 85 00 01 00 00 movdqa XMMWORD PTR row5$[rbp], xmm0 - 00b21 66 0f 6f 85 90 + 00b22 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 00b29 66 0f 69 85 60 + 00b2a 66 0f 69 85 60 01 00 00 punpckhwd xmm0, XMMWORD PTR row7$[rbp] - 00b31 66 0f 7f 85 60 + 00b32 66 0f 7f 85 60 01 00 00 movdqa XMMWORD PTR row7$[rbp], xmm0 ; 2126 : ; 2127 : // transpose pass 3 ; 2128 : dct_interleave16(row0, row1); - 00b39 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] - 00b3e 66 0f 7f 85 90 + 00b3a 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] + 00b3f 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 00b46 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] - 00b4b 66 0f 61 45 40 punpcklwd xmm0, XMMWORD PTR row1$[rbp] - 00b50 66 0f 7f 45 10 movdqa XMMWORD PTR row0$[rbp], xmm0 - 00b55 66 0f 6f 85 90 + 00b47 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] + 00b4c 66 0f 61 45 40 punpcklwd xmm0, XMMWORD PTR row1$[rbp] + 00b51 66 0f 7f 45 10 movdqa XMMWORD PTR row0$[rbp], xmm0 + 00b56 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 00b5d 66 0f 69 45 40 punpckhwd xmm0, XMMWORD PTR row1$[rbp] - 00b62 66 0f 7f 45 40 movdqa XMMWORD PTR row1$[rbp], xmm0 + 00b5e 66 0f 69 45 40 punpckhwd xmm0, XMMWORD PTR row1$[rbp] + 00b63 66 0f 7f 45 40 movdqa XMMWORD PTR row1$[rbp], xmm0 ; 2129 : dct_interleave16(row2, row3); - 00b67 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] - 00b6c 66 0f 7f 85 90 + 00b68 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] + 00b6d 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 00b74 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] - 00b79 66 0f 61 85 a0 + 00b75 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] + 00b7a 66 0f 61 85 a0 00 00 00 punpcklwd xmm0, XMMWORD PTR row3$[rbp] - 00b81 66 0f 7f 45 70 movdqa XMMWORD PTR row2$[rbp], xmm0 - 00b86 66 0f 6f 85 90 + 00b82 66 0f 7f 45 70 movdqa XMMWORD PTR row2$[rbp], xmm0 + 00b87 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 00b8e 66 0f 69 85 a0 + 00b8f 66 0f 69 85 a0 00 00 00 punpckhwd xmm0, XMMWORD PTR row3$[rbp] - 00b96 66 0f 7f 85 a0 + 00b97 66 0f 7f 85 a0 00 00 00 movdqa XMMWORD PTR row3$[rbp], xmm0 ; 2130 : dct_interleave16(row4, row5); - 00b9e 66 0f 6f 85 d0 + 00b9f 66 0f 6f 85 d0 00 00 00 movdqa xmm0, XMMWORD PTR row4$[rbp] - 00ba6 66 0f 7f 85 90 + 00ba7 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 00bae 66 0f 6f 85 d0 + 00baf 66 0f 6f 85 d0 00 00 00 movdqa xmm0, XMMWORD PTR row4$[rbp] - 00bb6 66 0f 61 85 00 + 00bb7 66 0f 61 85 00 01 00 00 punpcklwd xmm0, XMMWORD PTR row5$[rbp] - 00bbe 66 0f 7f 85 d0 + 00bbf 66 0f 7f 85 d0 00 00 00 movdqa XMMWORD PTR row4$[rbp], xmm0 - 00bc6 66 0f 6f 85 90 + 00bc7 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 00bce 66 0f 69 85 00 + 00bcf 66 0f 69 85 00 01 00 00 punpckhwd xmm0, XMMWORD PTR row5$[rbp] - 00bd6 66 0f 7f 85 00 + 00bd7 66 0f 7f 85 00 01 00 00 movdqa XMMWORD PTR row5$[rbp], xmm0 ; 2131 : dct_interleave16(row6, row7); - 00bde 66 0f 6f 85 30 + 00bdf 66 0f 6f 85 30 01 00 00 movdqa xmm0, XMMWORD PTR row6$[rbp] - 00be6 66 0f 7f 85 90 + 00be7 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 00bee 66 0f 6f 85 30 + 00bef 66 0f 6f 85 30 01 00 00 movdqa xmm0, XMMWORD PTR row6$[rbp] - 00bf6 66 0f 61 85 60 + 00bf7 66 0f 61 85 60 01 00 00 punpcklwd xmm0, XMMWORD PTR row7$[rbp] - 00bfe 66 0f 7f 85 30 + 00bff 66 0f 7f 85 30 01 00 00 movdqa XMMWORD PTR row6$[rbp], xmm0 - 00c06 66 0f 6f 85 90 + 00c07 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 00c0e 66 0f 69 85 60 + 00c0f 66 0f 69 85 60 01 00 00 punpckhwd xmm0, XMMWORD PTR row7$[rbp] - 00c16 66 0f 7f 85 60 + 00c17 66 0f 7f 85 60 01 00 00 movdqa XMMWORD PTR row7$[rbp], xmm0 ; 2132 : } @@ -33246,507 +33441,507 @@ stbi__idct_simd PROC ; COMDAT ; 2134 : // row pass ; 2135 : dct_pass(bias_1, 17); - 00c1e 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] - 00c23 66 0f 61 85 30 + 00c1f 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] + 00c24 66 0f 61 85 30 01 00 00 punpcklwd xmm0, XMMWORD PTR row6$[rbp] - 00c2b 66 0f 7f 85 20 + 00c2c 66 0f 7f 85 20 11 00 00 movdqa XMMWORD PTR rot0_0lo$73[rbp], xmm0 - 00c33 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] - 00c38 66 0f 69 85 30 + 00c34 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] + 00c39 66 0f 69 85 30 01 00 00 punpckhwd xmm0, XMMWORD PTR row6$[rbp] - 00c40 66 0f 7f 85 50 + 00c41 66 0f 7f 85 50 11 00 00 movdqa XMMWORD PTR rot0_0hi$74[rbp], xmm0 - 00c48 66 0f 6f 85 20 + 00c49 66 0f 6f 85 20 11 00 00 movdqa xmm0, XMMWORD PTR rot0_0lo$73[rbp] - 00c50 66 0f f5 85 c0 + 00c51 66 0f f5 85 c0 01 00 00 pmaddwd xmm0, XMMWORD PTR rot0_0$[rbp] - 00c58 66 0f 7f 85 80 + 00c59 66 0f 7f 85 80 11 00 00 movdqa XMMWORD PTR t2e_l$75[rbp], xmm0 - 00c60 66 0f 6f 85 50 + 00c61 66 0f 6f 85 50 11 00 00 movdqa xmm0, XMMWORD PTR rot0_0hi$74[rbp] - 00c68 66 0f f5 85 c0 + 00c69 66 0f f5 85 c0 01 00 00 pmaddwd xmm0, XMMWORD PTR rot0_0$[rbp] - 00c70 66 0f 7f 85 b0 + 00c71 66 0f 7f 85 b0 11 00 00 movdqa XMMWORD PTR t2e_h$76[rbp], xmm0 - 00c78 66 0f 6f 85 20 + 00c79 66 0f 6f 85 20 11 00 00 movdqa xmm0, XMMWORD PTR rot0_0lo$73[rbp] - 00c80 66 0f f5 85 f0 + 00c81 66 0f f5 85 f0 01 00 00 pmaddwd xmm0, XMMWORD PTR rot0_1$[rbp] - 00c88 66 0f 7f 85 e0 + 00c89 66 0f 7f 85 e0 11 00 00 movdqa XMMWORD PTR t3e_l$77[rbp], xmm0 - 00c90 66 0f 6f 85 50 + 00c91 66 0f 6f 85 50 11 00 00 movdqa xmm0, XMMWORD PTR rot0_0hi$74[rbp] - 00c98 66 0f f5 85 f0 + 00c99 66 0f f5 85 f0 01 00 00 pmaddwd xmm0, XMMWORD PTR rot0_1$[rbp] - 00ca0 66 0f 7f 85 10 + 00ca1 66 0f 7f 85 10 12 00 00 movdqa XMMWORD PTR t3e_h$78[rbp], xmm0 - 00ca8 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] - 00cad 66 0f fd 85 d0 + 00ca9 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] + 00cae 66 0f fd 85 d0 00 00 00 paddw xmm0, XMMWORD PTR row4$[rbp] - 00cb5 66 0f 7f 85 40 + 00cb6 66 0f 7f 85 40 12 00 00 movdqa XMMWORD PTR sum04$79[rbp], xmm0 - 00cbd 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] - 00cc2 66 0f f9 85 d0 + 00cbe 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] + 00cc3 66 0f f9 85 d0 00 00 00 psubw xmm0, XMMWORD PTR row4$[rbp] - 00cca 66 0f 7f 85 70 + 00ccb 66 0f 7f 85 70 12 00 00 movdqa XMMWORD PTR dif04$80[rbp], xmm0 - 00cd2 66 0f ef c0 pxor xmm0, xmm0 - 00cd6 66 0f 61 85 40 + 00cd3 66 0f ef c0 pxor xmm0, xmm0 + 00cd7 66 0f 61 85 40 12 00 00 punpcklwd xmm0, XMMWORD PTR sum04$79[rbp] - 00cde 66 0f 72 e0 04 psrad xmm0, 4 - 00ce3 66 0f 7f 85 a0 + 00cdf 66 0f 72 e0 04 psrad xmm0, 4 + 00ce4 66 0f 7f 85 a0 12 00 00 movdqa XMMWORD PTR t0e_l$81[rbp], xmm0 - 00ceb 66 0f ef c0 pxor xmm0, xmm0 - 00cef 66 0f 69 85 40 + 00cec 66 0f ef c0 pxor xmm0, xmm0 + 00cf0 66 0f 69 85 40 12 00 00 punpckhwd xmm0, XMMWORD PTR sum04$79[rbp] - 00cf7 66 0f 72 e0 04 psrad xmm0, 4 - 00cfc 66 0f 7f 85 d0 + 00cf8 66 0f 72 e0 04 psrad xmm0, 4 + 00cfd 66 0f 7f 85 d0 12 00 00 movdqa XMMWORD PTR t0e_h$82[rbp], xmm0 - 00d04 66 0f ef c0 pxor xmm0, xmm0 - 00d08 66 0f 61 85 70 + 00d05 66 0f ef c0 pxor xmm0, xmm0 + 00d09 66 0f 61 85 70 12 00 00 punpcklwd xmm0, XMMWORD PTR dif04$80[rbp] - 00d10 66 0f 72 e0 04 psrad xmm0, 4 - 00d15 66 0f 7f 85 00 + 00d11 66 0f 72 e0 04 psrad xmm0, 4 + 00d16 66 0f 7f 85 00 13 00 00 movdqa XMMWORD PTR t1e_l$83[rbp], xmm0 - 00d1d 66 0f ef c0 pxor xmm0, xmm0 - 00d21 66 0f 69 85 70 + 00d1e 66 0f ef c0 pxor xmm0, xmm0 + 00d22 66 0f 69 85 70 12 00 00 punpckhwd xmm0, XMMWORD PTR dif04$80[rbp] - 00d29 66 0f 72 e0 04 psrad xmm0, 4 - 00d2e 66 0f 7f 85 30 + 00d2a 66 0f 72 e0 04 psrad xmm0, 4 + 00d2f 66 0f 7f 85 30 13 00 00 movdqa XMMWORD PTR t1e_h$84[rbp], xmm0 - 00d36 66 0f 6f 85 a0 + 00d37 66 0f 6f 85 a0 12 00 00 movdqa xmm0, XMMWORD PTR t0e_l$81[rbp] - 00d3e 66 0f fe 85 e0 + 00d3f 66 0f fe 85 e0 11 00 00 paddd xmm0, XMMWORD PTR t3e_l$77[rbp] - 00d46 66 0f 7f 85 60 + 00d47 66 0f 7f 85 60 13 00 00 movdqa XMMWORD PTR x0_l$85[rbp], xmm0 - 00d4e 66 0f 6f 85 d0 + 00d4f 66 0f 6f 85 d0 12 00 00 movdqa xmm0, XMMWORD PTR t0e_h$82[rbp] - 00d56 66 0f fe 85 10 + 00d57 66 0f fe 85 10 12 00 00 paddd xmm0, XMMWORD PTR t3e_h$78[rbp] - 00d5e 66 0f 7f 85 90 + 00d5f 66 0f 7f 85 90 13 00 00 movdqa XMMWORD PTR x0_h$86[rbp], xmm0 - 00d66 66 0f 6f 85 a0 + 00d67 66 0f 6f 85 a0 12 00 00 movdqa xmm0, XMMWORD PTR t0e_l$81[rbp] - 00d6e 66 0f fa 85 e0 + 00d6f 66 0f fa 85 e0 11 00 00 psubd xmm0, XMMWORD PTR t3e_l$77[rbp] - 00d76 66 0f 7f 85 c0 + 00d77 66 0f 7f 85 c0 13 00 00 movdqa XMMWORD PTR x3_l$87[rbp], xmm0 - 00d7e 66 0f 6f 85 d0 + 00d7f 66 0f 6f 85 d0 12 00 00 movdqa xmm0, XMMWORD PTR t0e_h$82[rbp] - 00d86 66 0f fa 85 10 + 00d87 66 0f fa 85 10 12 00 00 psubd xmm0, XMMWORD PTR t3e_h$78[rbp] - 00d8e 66 0f 7f 85 f0 + 00d8f 66 0f 7f 85 f0 13 00 00 movdqa XMMWORD PTR x3_h$88[rbp], xmm0 - 00d96 66 0f 6f 85 00 + 00d97 66 0f 6f 85 00 13 00 00 movdqa xmm0, XMMWORD PTR t1e_l$83[rbp] - 00d9e 66 0f fe 85 80 + 00d9f 66 0f fe 85 80 11 00 00 paddd xmm0, XMMWORD PTR t2e_l$75[rbp] - 00da6 66 0f 7f 85 20 + 00da7 66 0f 7f 85 20 14 00 00 movdqa XMMWORD PTR x1_l$89[rbp], xmm0 - 00dae 66 0f 6f 85 30 + 00daf 66 0f 6f 85 30 13 00 00 movdqa xmm0, XMMWORD PTR t1e_h$84[rbp] - 00db6 66 0f fe 85 b0 + 00db7 66 0f fe 85 b0 11 00 00 paddd xmm0, XMMWORD PTR t2e_h$76[rbp] - 00dbe 66 0f 7f 85 50 + 00dbf 66 0f 7f 85 50 14 00 00 movdqa XMMWORD PTR x1_h$90[rbp], xmm0 - 00dc6 66 0f 6f 85 00 + 00dc7 66 0f 6f 85 00 13 00 00 movdqa xmm0, XMMWORD PTR t1e_l$83[rbp] - 00dce 66 0f fa 85 80 + 00dcf 66 0f fa 85 80 11 00 00 psubd xmm0, XMMWORD PTR t2e_l$75[rbp] - 00dd6 66 0f 7f 85 80 + 00dd7 66 0f 7f 85 80 14 00 00 movdqa XMMWORD PTR x2_l$91[rbp], xmm0 - 00dde 66 0f 6f 85 30 + 00ddf 66 0f 6f 85 30 13 00 00 movdqa xmm0, XMMWORD PTR t1e_h$84[rbp] - 00de6 66 0f fa 85 b0 + 00de7 66 0f fa 85 b0 11 00 00 psubd xmm0, XMMWORD PTR t2e_h$76[rbp] - 00dee 66 0f 7f 85 b0 + 00def 66 0f 7f 85 b0 14 00 00 movdqa XMMWORD PTR x2_h$92[rbp], xmm0 - 00df6 66 0f 6f 85 60 + 00df7 66 0f 6f 85 60 01 00 00 movdqa xmm0, XMMWORD PTR row7$[rbp] - 00dfe 66 0f 61 85 a0 + 00dff 66 0f 61 85 a0 00 00 00 punpcklwd xmm0, XMMWORD PTR row3$[rbp] - 00e06 66 0f 7f 85 e0 + 00e07 66 0f 7f 85 e0 14 00 00 movdqa XMMWORD PTR rot2_0lo$93[rbp], xmm0 - 00e0e 66 0f 6f 85 60 + 00e0f 66 0f 6f 85 60 01 00 00 movdqa xmm0, XMMWORD PTR row7$[rbp] - 00e16 66 0f 69 85 a0 + 00e17 66 0f 69 85 a0 00 00 00 punpckhwd xmm0, XMMWORD PTR row3$[rbp] - 00e1e 66 0f 7f 85 10 + 00e1f 66 0f 7f 85 10 15 00 00 movdqa XMMWORD PTR rot2_0hi$94[rbp], xmm0 - 00e26 66 0f 6f 85 e0 + 00e27 66 0f 6f 85 e0 14 00 00 movdqa xmm0, XMMWORD PTR rot2_0lo$93[rbp] - 00e2e 66 0f f5 85 80 + 00e2f 66 0f f5 85 80 02 00 00 pmaddwd xmm0, XMMWORD PTR rot2_0$[rbp] - 00e36 66 0f 7f 85 40 + 00e37 66 0f 7f 85 40 15 00 00 movdqa XMMWORD PTR y0o_l$95[rbp], xmm0 - 00e3e 66 0f 6f 85 10 + 00e3f 66 0f 6f 85 10 15 00 00 movdqa xmm0, XMMWORD PTR rot2_0hi$94[rbp] - 00e46 66 0f f5 85 80 + 00e47 66 0f f5 85 80 02 00 00 pmaddwd xmm0, XMMWORD PTR rot2_0$[rbp] - 00e4e 66 0f 7f 85 70 + 00e4f 66 0f 7f 85 70 15 00 00 movdqa XMMWORD PTR y0o_h$96[rbp], xmm0 - 00e56 66 0f 6f 85 e0 + 00e57 66 0f 6f 85 e0 14 00 00 movdqa xmm0, XMMWORD PTR rot2_0lo$93[rbp] - 00e5e 66 0f f5 85 b0 + 00e5f 66 0f f5 85 b0 02 00 00 pmaddwd xmm0, XMMWORD PTR rot2_1$[rbp] - 00e66 66 0f 7f 85 a0 + 00e67 66 0f 7f 85 a0 15 00 00 movdqa XMMWORD PTR y2o_l$97[rbp], xmm0 - 00e6e 66 0f 6f 85 10 + 00e6f 66 0f 6f 85 10 15 00 00 movdqa xmm0, XMMWORD PTR rot2_0hi$94[rbp] - 00e76 66 0f f5 85 b0 + 00e77 66 0f f5 85 b0 02 00 00 pmaddwd xmm0, XMMWORD PTR rot2_1$[rbp] - 00e7e 66 0f 7f 85 d0 + 00e7f 66 0f 7f 85 d0 15 00 00 movdqa XMMWORD PTR y2o_h$98[rbp], xmm0 - 00e86 66 0f 6f 85 00 + 00e87 66 0f 6f 85 00 01 00 00 movdqa xmm0, XMMWORD PTR row5$[rbp] - 00e8e 66 0f 61 45 40 punpcklwd xmm0, XMMWORD PTR row1$[rbp] - 00e93 66 0f 7f 85 00 + 00e8f 66 0f 61 45 40 punpcklwd xmm0, XMMWORD PTR row1$[rbp] + 00e94 66 0f 7f 85 00 16 00 00 movdqa XMMWORD PTR rot3_0lo$99[rbp], xmm0 - 00e9b 66 0f 6f 85 00 + 00e9c 66 0f 6f 85 00 01 00 00 movdqa xmm0, XMMWORD PTR row5$[rbp] - 00ea3 66 0f 69 45 40 punpckhwd xmm0, XMMWORD PTR row1$[rbp] - 00ea8 66 0f 7f 85 30 + 00ea4 66 0f 69 45 40 punpckhwd xmm0, XMMWORD PTR row1$[rbp] + 00ea9 66 0f 7f 85 30 16 00 00 movdqa XMMWORD PTR rot3_0hi$100[rbp], xmm0 - 00eb0 66 0f 6f 85 00 + 00eb1 66 0f 6f 85 00 16 00 00 movdqa xmm0, XMMWORD PTR rot3_0lo$99[rbp] - 00eb8 66 0f f5 85 e0 + 00eb9 66 0f f5 85 e0 02 00 00 pmaddwd xmm0, XMMWORD PTR rot3_0$[rbp] - 00ec0 66 0f 7f 85 60 + 00ec1 66 0f 7f 85 60 16 00 00 movdqa XMMWORD PTR y1o_l$101[rbp], xmm0 - 00ec8 66 0f 6f 85 30 + 00ec9 66 0f 6f 85 30 16 00 00 movdqa xmm0, XMMWORD PTR rot3_0hi$100[rbp] - 00ed0 66 0f f5 85 e0 + 00ed1 66 0f f5 85 e0 02 00 00 pmaddwd xmm0, XMMWORD PTR rot3_0$[rbp] - 00ed8 66 0f 7f 85 90 + 00ed9 66 0f 7f 85 90 16 00 00 movdqa XMMWORD PTR y1o_h$102[rbp], xmm0 - 00ee0 66 0f 6f 85 00 + 00ee1 66 0f 6f 85 00 16 00 00 movdqa xmm0, XMMWORD PTR rot3_0lo$99[rbp] - 00ee8 66 0f f5 85 10 + 00ee9 66 0f f5 85 10 03 00 00 pmaddwd xmm0, XMMWORD PTR rot3_1$[rbp] - 00ef0 66 0f 7f 85 c0 + 00ef1 66 0f 7f 85 c0 16 00 00 movdqa XMMWORD PTR y3o_l$103[rbp], xmm0 - 00ef8 66 0f 6f 85 30 + 00ef9 66 0f 6f 85 30 16 00 00 movdqa xmm0, XMMWORD PTR rot3_0hi$100[rbp] - 00f00 66 0f f5 85 10 + 00f01 66 0f f5 85 10 03 00 00 pmaddwd xmm0, XMMWORD PTR rot3_1$[rbp] - 00f08 66 0f 7f 85 f0 + 00f09 66 0f 7f 85 f0 16 00 00 movdqa XMMWORD PTR y3o_h$104[rbp], xmm0 - 00f10 66 0f 6f 45 40 movdqa xmm0, XMMWORD PTR row1$[rbp] - 00f15 66 0f fd 85 60 + 00f11 66 0f 6f 45 40 movdqa xmm0, XMMWORD PTR row1$[rbp] + 00f16 66 0f fd 85 60 01 00 00 paddw xmm0, XMMWORD PTR row7$[rbp] - 00f1d 66 0f 7f 85 20 + 00f1e 66 0f 7f 85 20 17 00 00 movdqa XMMWORD PTR sum17$105[rbp], xmm0 - 00f25 66 0f 6f 85 a0 + 00f26 66 0f 6f 85 a0 00 00 00 movdqa xmm0, XMMWORD PTR row3$[rbp] - 00f2d 66 0f fd 85 00 + 00f2e 66 0f fd 85 00 01 00 00 paddw xmm0, XMMWORD PTR row5$[rbp] - 00f35 66 0f 7f 85 50 + 00f36 66 0f 7f 85 50 17 00 00 movdqa XMMWORD PTR sum35$106[rbp], xmm0 - 00f3d 66 0f 6f 85 20 + 00f3e 66 0f 6f 85 20 17 00 00 movdqa xmm0, XMMWORD PTR sum17$105[rbp] - 00f45 66 0f 61 85 50 + 00f46 66 0f 61 85 50 17 00 00 punpcklwd xmm0, XMMWORD PTR sum35$106[rbp] - 00f4d 66 0f 7f 85 80 + 00f4e 66 0f 7f 85 80 17 00 00 movdqa XMMWORD PTR rot1_0lo$107[rbp], xmm0 - 00f55 66 0f 6f 85 20 + 00f56 66 0f 6f 85 20 17 00 00 movdqa xmm0, XMMWORD PTR sum17$105[rbp] - 00f5d 66 0f 69 85 50 + 00f5e 66 0f 69 85 50 17 00 00 punpckhwd xmm0, XMMWORD PTR sum35$106[rbp] - 00f65 66 0f 7f 85 b0 + 00f66 66 0f 7f 85 b0 17 00 00 movdqa XMMWORD PTR rot1_0hi$108[rbp], xmm0 - 00f6d 66 0f 6f 85 80 + 00f6e 66 0f 6f 85 80 17 00 00 movdqa xmm0, XMMWORD PTR rot1_0lo$107[rbp] - 00f75 66 0f f5 85 20 + 00f76 66 0f f5 85 20 02 00 00 pmaddwd xmm0, XMMWORD PTR rot1_0$[rbp] - 00f7d 66 0f 7f 85 e0 + 00f7e 66 0f 7f 85 e0 17 00 00 movdqa XMMWORD PTR y4o_l$109[rbp], xmm0 - 00f85 66 0f 6f 85 b0 + 00f86 66 0f 6f 85 b0 17 00 00 movdqa xmm0, XMMWORD PTR rot1_0hi$108[rbp] - 00f8d 66 0f f5 85 20 + 00f8e 66 0f f5 85 20 02 00 00 pmaddwd xmm0, XMMWORD PTR rot1_0$[rbp] - 00f95 66 0f 7f 85 10 + 00f96 66 0f 7f 85 10 18 00 00 movdqa XMMWORD PTR y4o_h$110[rbp], xmm0 - 00f9d 66 0f 6f 85 80 + 00f9e 66 0f 6f 85 80 17 00 00 movdqa xmm0, XMMWORD PTR rot1_0lo$107[rbp] - 00fa5 66 0f f5 85 50 + 00fa6 66 0f f5 85 50 02 00 00 pmaddwd xmm0, XMMWORD PTR rot1_1$[rbp] - 00fad 66 0f 7f 85 40 + 00fae 66 0f 7f 85 40 18 00 00 movdqa XMMWORD PTR y5o_l$111[rbp], xmm0 - 00fb5 66 0f 6f 85 b0 + 00fb6 66 0f 6f 85 b0 17 00 00 movdqa xmm0, XMMWORD PTR rot1_0hi$108[rbp] - 00fbd 66 0f f5 85 50 + 00fbe 66 0f f5 85 50 02 00 00 pmaddwd xmm0, XMMWORD PTR rot1_1$[rbp] - 00fc5 66 0f 7f 85 70 + 00fc6 66 0f 7f 85 70 18 00 00 movdqa XMMWORD PTR y5o_h$112[rbp], xmm0 - 00fcd 66 0f 6f 85 40 + 00fce 66 0f 6f 85 40 15 00 00 movdqa xmm0, XMMWORD PTR y0o_l$95[rbp] - 00fd5 66 0f fe 85 e0 + 00fd6 66 0f fe 85 e0 17 00 00 paddd xmm0, XMMWORD PTR y4o_l$109[rbp] - 00fdd 66 0f 7f 85 a0 + 00fde 66 0f 7f 85 a0 18 00 00 movdqa XMMWORD PTR x4_l$113[rbp], xmm0 - 00fe5 66 0f 6f 85 70 + 00fe6 66 0f 6f 85 70 15 00 00 movdqa xmm0, XMMWORD PTR y0o_h$96[rbp] - 00fed 66 0f fe 85 10 + 00fee 66 0f fe 85 10 18 00 00 paddd xmm0, XMMWORD PTR y4o_h$110[rbp] - 00ff5 66 0f 7f 85 d0 + 00ff6 66 0f 7f 85 d0 18 00 00 movdqa XMMWORD PTR x4_h$114[rbp], xmm0 - 00ffd 66 0f 6f 85 60 + 00ffe 66 0f 6f 85 60 16 00 00 movdqa xmm0, XMMWORD PTR y1o_l$101[rbp] - 01005 66 0f fe 85 40 + 01006 66 0f fe 85 40 18 00 00 paddd xmm0, XMMWORD PTR y5o_l$111[rbp] - 0100d 66 0f 7f 85 00 + 0100e 66 0f 7f 85 00 19 00 00 movdqa XMMWORD PTR x5_l$115[rbp], xmm0 - 01015 66 0f 6f 85 90 + 01016 66 0f 6f 85 90 16 00 00 movdqa xmm0, XMMWORD PTR y1o_h$102[rbp] - 0101d 66 0f fe 85 70 + 0101e 66 0f fe 85 70 18 00 00 paddd xmm0, XMMWORD PTR y5o_h$112[rbp] - 01025 66 0f 7f 85 30 + 01026 66 0f 7f 85 30 19 00 00 movdqa XMMWORD PTR x5_h$116[rbp], xmm0 - 0102d 66 0f 6f 85 a0 + 0102e 66 0f 6f 85 a0 15 00 00 movdqa xmm0, XMMWORD PTR y2o_l$97[rbp] - 01035 66 0f fe 85 40 + 01036 66 0f fe 85 40 18 00 00 paddd xmm0, XMMWORD PTR y5o_l$111[rbp] - 0103d 66 0f 7f 85 60 + 0103e 66 0f 7f 85 60 19 00 00 movdqa XMMWORD PTR x6_l$117[rbp], xmm0 - 01045 66 0f 6f 85 d0 + 01046 66 0f 6f 85 d0 15 00 00 movdqa xmm0, XMMWORD PTR y2o_h$98[rbp] - 0104d 66 0f fe 85 70 + 0104e 66 0f fe 85 70 18 00 00 paddd xmm0, XMMWORD PTR y5o_h$112[rbp] - 01055 66 0f 7f 85 90 + 01056 66 0f 7f 85 90 19 00 00 movdqa XMMWORD PTR x6_h$118[rbp], xmm0 - 0105d 66 0f 6f 85 c0 + 0105e 66 0f 6f 85 c0 16 00 00 movdqa xmm0, XMMWORD PTR y3o_l$103[rbp] - 01065 66 0f fe 85 e0 + 01066 66 0f fe 85 e0 17 00 00 paddd xmm0, XMMWORD PTR y4o_l$109[rbp] - 0106d 66 0f 7f 85 c0 + 0106e 66 0f 7f 85 c0 19 00 00 movdqa XMMWORD PTR x7_l$119[rbp], xmm0 - 01075 66 0f 6f 85 f0 + 01076 66 0f 6f 85 f0 16 00 00 movdqa xmm0, XMMWORD PTR y3o_h$104[rbp] - 0107d 66 0f fe 85 10 + 0107e 66 0f fe 85 10 18 00 00 paddd xmm0, XMMWORD PTR y4o_h$110[rbp] - 01085 66 0f 7f 85 f0 + 01086 66 0f 7f 85 f0 19 00 00 movdqa XMMWORD PTR x7_h$120[rbp], xmm0 - 0108d 66 0f 6f 85 60 + 0108e 66 0f 6f 85 60 13 00 00 movdqa xmm0, XMMWORD PTR x0_l$85[rbp] - 01095 66 0f fe 85 70 + 01096 66 0f fe 85 70 03 00 00 paddd xmm0, XMMWORD PTR bias_1$[rbp] - 0109d 66 0f 7f 85 20 + 0109e 66 0f 7f 85 20 1a 00 00 movdqa XMMWORD PTR abiased_l$121[rbp], xmm0 - 010a5 66 0f 6f 85 90 + 010a6 66 0f 6f 85 90 13 00 00 movdqa xmm0, XMMWORD PTR x0_h$86[rbp] - 010ad 66 0f fe 85 70 + 010ae 66 0f fe 85 70 03 00 00 paddd xmm0, XMMWORD PTR bias_1$[rbp] - 010b5 66 0f 7f 85 50 + 010b6 66 0f 7f 85 50 1a 00 00 movdqa XMMWORD PTR abiased_h$122[rbp], xmm0 - 010bd 66 0f 6f 85 20 + 010be 66 0f 6f 85 20 1a 00 00 movdqa xmm0, XMMWORD PTR abiased_l$121[rbp] - 010c5 66 0f fe 85 c0 + 010c6 66 0f fe 85 c0 19 00 00 paddd xmm0, XMMWORD PTR x7_l$119[rbp] - 010cd 66 0f 7f 85 80 + 010ce 66 0f 7f 85 80 1a 00 00 movdqa XMMWORD PTR sum_l$123[rbp], xmm0 - 010d5 66 0f 6f 85 50 + 010d6 66 0f 6f 85 50 1a 00 00 movdqa xmm0, XMMWORD PTR abiased_h$122[rbp] - 010dd 66 0f fe 85 f0 + 010de 66 0f fe 85 f0 19 00 00 paddd xmm0, XMMWORD PTR x7_h$120[rbp] - 010e5 66 0f 7f 85 b0 + 010e6 66 0f 7f 85 b0 1a 00 00 movdqa XMMWORD PTR sum_h$124[rbp], xmm0 - 010ed 66 0f 6f 85 20 + 010ee 66 0f 6f 85 20 1a 00 00 movdqa xmm0, XMMWORD PTR abiased_l$121[rbp] - 010f5 66 0f fa 85 c0 + 010f6 66 0f fa 85 c0 19 00 00 psubd xmm0, XMMWORD PTR x7_l$119[rbp] - 010fd 66 0f 7f 85 e0 + 010fe 66 0f 7f 85 e0 1a 00 00 movdqa XMMWORD PTR dif_l$125[rbp], xmm0 - 01105 66 0f 6f 85 50 + 01106 66 0f 6f 85 50 1a 00 00 movdqa xmm0, XMMWORD PTR abiased_h$122[rbp] - 0110d 66 0f fa 85 f0 + 0110e 66 0f fa 85 f0 19 00 00 psubd xmm0, XMMWORD PTR x7_h$120[rbp] - 01115 66 0f 7f 85 10 + 01116 66 0f 7f 85 10 1b 00 00 movdqa XMMWORD PTR dif_h$126[rbp], xmm0 - 0111d 66 0f 6f 85 b0 + 0111e 66 0f 6f 85 b0 1a 00 00 movdqa xmm0, XMMWORD PTR sum_h$124[rbp] - 01125 66 0f 72 e0 11 psrad xmm0, 17 - 0112a 66 0f 6f 8d 80 + 01126 66 0f 72 e0 11 psrad xmm0, 17 + 0112b 66 0f 6f 8d 80 1a 00 00 movdqa xmm1, XMMWORD PTR sum_l$123[rbp] - 01132 66 0f 72 e1 11 psrad xmm1, 17 - 01137 66 0f 6b c8 packssdw xmm1, xmm0 - 0113b 66 0f 6f c1 movdqa xmm0, xmm1 - 0113f 66 0f 7f 45 10 movdqa XMMWORD PTR row0$[rbp], xmm0 - 01144 66 0f 6f 85 10 + 01133 66 0f 72 e1 11 psrad xmm1, 17 + 01138 66 0f 6b c8 packssdw xmm1, xmm0 + 0113c 66 0f 6f c1 movdqa xmm0, xmm1 + 01140 66 0f 7f 45 10 movdqa XMMWORD PTR row0$[rbp], xmm0 + 01145 66 0f 6f 85 10 1b 00 00 movdqa xmm0, XMMWORD PTR dif_h$126[rbp] - 0114c 66 0f 72 e0 11 psrad xmm0, 17 - 01151 66 0f 6f 8d e0 + 0114d 66 0f 72 e0 11 psrad xmm0, 17 + 01152 66 0f 6f 8d e0 1a 00 00 movdqa xmm1, XMMWORD PTR dif_l$125[rbp] - 01159 66 0f 72 e1 11 psrad xmm1, 17 - 0115e 66 0f 6b c8 packssdw xmm1, xmm0 - 01162 66 0f 6f c1 movdqa xmm0, xmm1 - 01166 66 0f 7f 85 60 + 0115a 66 0f 72 e1 11 psrad xmm1, 17 + 0115f 66 0f 6b c8 packssdw xmm1, xmm0 + 01163 66 0f 6f c1 movdqa xmm0, xmm1 + 01167 66 0f 7f 85 60 01 00 00 movdqa XMMWORD PTR row7$[rbp], xmm0 - 0116e 66 0f 6f 85 20 + 0116f 66 0f 6f 85 20 14 00 00 movdqa xmm0, XMMWORD PTR x1_l$89[rbp] - 01176 66 0f fe 85 70 + 01177 66 0f fe 85 70 03 00 00 paddd xmm0, XMMWORD PTR bias_1$[rbp] - 0117e 66 0f 7f 85 40 + 0117f 66 0f 7f 85 40 1b 00 00 movdqa XMMWORD PTR abiased_l$127[rbp], xmm0 - 01186 66 0f 6f 85 50 + 01187 66 0f 6f 85 50 14 00 00 movdqa xmm0, XMMWORD PTR x1_h$90[rbp] - 0118e 66 0f fe 85 70 + 0118f 66 0f fe 85 70 03 00 00 paddd xmm0, XMMWORD PTR bias_1$[rbp] - 01196 66 0f 7f 85 70 + 01197 66 0f 7f 85 70 1b 00 00 movdqa XMMWORD PTR abiased_h$128[rbp], xmm0 - 0119e 66 0f 6f 85 40 + 0119f 66 0f 6f 85 40 1b 00 00 movdqa xmm0, XMMWORD PTR abiased_l$127[rbp] - 011a6 66 0f fe 85 60 + 011a7 66 0f fe 85 60 19 00 00 paddd xmm0, XMMWORD PTR x6_l$117[rbp] - 011ae 66 0f 7f 85 a0 + 011af 66 0f 7f 85 a0 1b 00 00 movdqa XMMWORD PTR sum_l$129[rbp], xmm0 - 011b6 66 0f 6f 85 70 + 011b7 66 0f 6f 85 70 1b 00 00 movdqa xmm0, XMMWORD PTR abiased_h$128[rbp] - 011be 66 0f fe 85 90 + 011bf 66 0f fe 85 90 19 00 00 paddd xmm0, XMMWORD PTR x6_h$118[rbp] - 011c6 66 0f 7f 85 d0 + 011c7 66 0f 7f 85 d0 1b 00 00 movdqa XMMWORD PTR sum_h$130[rbp], xmm0 - 011ce 66 0f 6f 85 40 + 011cf 66 0f 6f 85 40 1b 00 00 movdqa xmm0, XMMWORD PTR abiased_l$127[rbp] - 011d6 66 0f fa 85 60 + 011d7 66 0f fa 85 60 19 00 00 psubd xmm0, XMMWORD PTR x6_l$117[rbp] - 011de 66 0f 7f 85 00 + 011df 66 0f 7f 85 00 1c 00 00 movdqa XMMWORD PTR dif_l$131[rbp], xmm0 - 011e6 66 0f 6f 85 70 + 011e7 66 0f 6f 85 70 1b 00 00 movdqa xmm0, XMMWORD PTR abiased_h$128[rbp] - 011ee 66 0f fa 85 90 + 011ef 66 0f fa 85 90 19 00 00 psubd xmm0, XMMWORD PTR x6_h$118[rbp] - 011f6 66 0f 7f 85 30 + 011f7 66 0f 7f 85 30 1c 00 00 movdqa XMMWORD PTR dif_h$132[rbp], xmm0 - 011fe 66 0f 6f 85 d0 + 011ff 66 0f 6f 85 d0 1b 00 00 movdqa xmm0, XMMWORD PTR sum_h$130[rbp] - 01206 66 0f 72 e0 11 psrad xmm0, 17 - 0120b 66 0f 6f 8d a0 + 01207 66 0f 72 e0 11 psrad xmm0, 17 + 0120c 66 0f 6f 8d a0 1b 00 00 movdqa xmm1, XMMWORD PTR sum_l$129[rbp] - 01213 66 0f 72 e1 11 psrad xmm1, 17 - 01218 66 0f 6b c8 packssdw xmm1, xmm0 - 0121c 66 0f 6f c1 movdqa xmm0, xmm1 - 01220 66 0f 7f 45 40 movdqa XMMWORD PTR row1$[rbp], xmm0 - 01225 66 0f 6f 85 30 + 01214 66 0f 72 e1 11 psrad xmm1, 17 + 01219 66 0f 6b c8 packssdw xmm1, xmm0 + 0121d 66 0f 6f c1 movdqa xmm0, xmm1 + 01221 66 0f 7f 45 40 movdqa XMMWORD PTR row1$[rbp], xmm0 + 01226 66 0f 6f 85 30 1c 00 00 movdqa xmm0, XMMWORD PTR dif_h$132[rbp] - 0122d 66 0f 72 e0 11 psrad xmm0, 17 - 01232 66 0f 6f 8d 00 + 0122e 66 0f 72 e0 11 psrad xmm0, 17 + 01233 66 0f 6f 8d 00 1c 00 00 movdqa xmm1, XMMWORD PTR dif_l$131[rbp] - 0123a 66 0f 72 e1 11 psrad xmm1, 17 - 0123f 66 0f 6b c8 packssdw xmm1, xmm0 - 01243 66 0f 6f c1 movdqa xmm0, xmm1 - 01247 66 0f 7f 85 30 + 0123b 66 0f 72 e1 11 psrad xmm1, 17 + 01240 66 0f 6b c8 packssdw xmm1, xmm0 + 01244 66 0f 6f c1 movdqa xmm0, xmm1 + 01248 66 0f 7f 85 30 01 00 00 movdqa XMMWORD PTR row6$[rbp], xmm0 - 0124f 66 0f 6f 85 80 + 01250 66 0f 6f 85 80 14 00 00 movdqa xmm0, XMMWORD PTR x2_l$91[rbp] - 01257 66 0f fe 85 70 + 01258 66 0f fe 85 70 03 00 00 paddd xmm0, XMMWORD PTR bias_1$[rbp] - 0125f 66 0f 7f 85 60 + 01260 66 0f 7f 85 60 1c 00 00 movdqa XMMWORD PTR abiased_l$133[rbp], xmm0 - 01267 66 0f 6f 85 b0 + 01268 66 0f 6f 85 b0 14 00 00 movdqa xmm0, XMMWORD PTR x2_h$92[rbp] - 0126f 66 0f fe 85 70 + 01270 66 0f fe 85 70 03 00 00 paddd xmm0, XMMWORD PTR bias_1$[rbp] - 01277 66 0f 7f 85 90 + 01278 66 0f 7f 85 90 1c 00 00 movdqa XMMWORD PTR abiased_h$134[rbp], xmm0 - 0127f 66 0f 6f 85 60 + 01280 66 0f 6f 85 60 1c 00 00 movdqa xmm0, XMMWORD PTR abiased_l$133[rbp] - 01287 66 0f fe 85 00 + 01288 66 0f fe 85 00 19 00 00 paddd xmm0, XMMWORD PTR x5_l$115[rbp] - 0128f 66 0f 7f 85 c0 + 01290 66 0f 7f 85 c0 1c 00 00 movdqa XMMWORD PTR sum_l$135[rbp], xmm0 - 01297 66 0f 6f 85 90 + 01298 66 0f 6f 85 90 1c 00 00 movdqa xmm0, XMMWORD PTR abiased_h$134[rbp] - 0129f 66 0f fe 85 30 + 012a0 66 0f fe 85 30 19 00 00 paddd xmm0, XMMWORD PTR x5_h$116[rbp] - 012a7 66 0f 7f 85 f0 + 012a8 66 0f 7f 85 f0 1c 00 00 movdqa XMMWORD PTR sum_h$136[rbp], xmm0 - 012af 66 0f 6f 85 60 + 012b0 66 0f 6f 85 60 1c 00 00 movdqa xmm0, XMMWORD PTR abiased_l$133[rbp] - 012b7 66 0f fa 85 00 + 012b8 66 0f fa 85 00 19 00 00 psubd xmm0, XMMWORD PTR x5_l$115[rbp] - 012bf 66 0f 7f 85 20 + 012c0 66 0f 7f 85 20 1d 00 00 movdqa XMMWORD PTR dif_l$137[rbp], xmm0 - 012c7 66 0f 6f 85 90 + 012c8 66 0f 6f 85 90 1c 00 00 movdqa xmm0, XMMWORD PTR abiased_h$134[rbp] - 012cf 66 0f fa 85 30 + 012d0 66 0f fa 85 30 19 00 00 psubd xmm0, XMMWORD PTR x5_h$116[rbp] - 012d7 66 0f 7f 85 50 + 012d8 66 0f 7f 85 50 1d 00 00 movdqa XMMWORD PTR dif_h$138[rbp], xmm0 - 012df 66 0f 6f 85 f0 + 012e0 66 0f 6f 85 f0 1c 00 00 movdqa xmm0, XMMWORD PTR sum_h$136[rbp] - 012e7 66 0f 72 e0 11 psrad xmm0, 17 - 012ec 66 0f 6f 8d c0 + 012e8 66 0f 72 e0 11 psrad xmm0, 17 + 012ed 66 0f 6f 8d c0 1c 00 00 movdqa xmm1, XMMWORD PTR sum_l$135[rbp] - 012f4 66 0f 72 e1 11 psrad xmm1, 17 - 012f9 66 0f 6b c8 packssdw xmm1, xmm0 - 012fd 66 0f 6f c1 movdqa xmm0, xmm1 - 01301 66 0f 7f 45 70 movdqa XMMWORD PTR row2$[rbp], xmm0 - 01306 66 0f 6f 85 50 + 012f5 66 0f 72 e1 11 psrad xmm1, 17 + 012fa 66 0f 6b c8 packssdw xmm1, xmm0 + 012fe 66 0f 6f c1 movdqa xmm0, xmm1 + 01302 66 0f 7f 45 70 movdqa XMMWORD PTR row2$[rbp], xmm0 + 01307 66 0f 6f 85 50 1d 00 00 movdqa xmm0, XMMWORD PTR dif_h$138[rbp] - 0130e 66 0f 72 e0 11 psrad xmm0, 17 - 01313 66 0f 6f 8d 20 + 0130f 66 0f 72 e0 11 psrad xmm0, 17 + 01314 66 0f 6f 8d 20 1d 00 00 movdqa xmm1, XMMWORD PTR dif_l$137[rbp] - 0131b 66 0f 72 e1 11 psrad xmm1, 17 - 01320 66 0f 6b c8 packssdw xmm1, xmm0 - 01324 66 0f 6f c1 movdqa xmm0, xmm1 - 01328 66 0f 7f 85 00 + 0131c 66 0f 72 e1 11 psrad xmm1, 17 + 01321 66 0f 6b c8 packssdw xmm1, xmm0 + 01325 66 0f 6f c1 movdqa xmm0, xmm1 + 01329 66 0f 7f 85 00 01 00 00 movdqa XMMWORD PTR row5$[rbp], xmm0 - 01330 66 0f 6f 85 c0 + 01331 66 0f 6f 85 c0 13 00 00 movdqa xmm0, XMMWORD PTR x3_l$87[rbp] - 01338 66 0f fe 85 70 + 01339 66 0f fe 85 70 03 00 00 paddd xmm0, XMMWORD PTR bias_1$[rbp] - 01340 66 0f 7f 85 80 + 01341 66 0f 7f 85 80 1d 00 00 movdqa XMMWORD PTR abiased_l$139[rbp], xmm0 - 01348 66 0f 6f 85 f0 + 01349 66 0f 6f 85 f0 13 00 00 movdqa xmm0, XMMWORD PTR x3_h$88[rbp] - 01350 66 0f fe 85 70 + 01351 66 0f fe 85 70 03 00 00 paddd xmm0, XMMWORD PTR bias_1$[rbp] - 01358 66 0f 7f 85 b0 + 01359 66 0f 7f 85 b0 1d 00 00 movdqa XMMWORD PTR abiased_h$140[rbp], xmm0 - 01360 66 0f 6f 85 80 + 01361 66 0f 6f 85 80 1d 00 00 movdqa xmm0, XMMWORD PTR abiased_l$139[rbp] - 01368 66 0f fe 85 a0 + 01369 66 0f fe 85 a0 18 00 00 paddd xmm0, XMMWORD PTR x4_l$113[rbp] - 01370 66 0f 7f 85 e0 + 01371 66 0f 7f 85 e0 1d 00 00 movdqa XMMWORD PTR sum_l$141[rbp], xmm0 - 01378 66 0f 6f 85 b0 + 01379 66 0f 6f 85 b0 1d 00 00 movdqa xmm0, XMMWORD PTR abiased_h$140[rbp] - 01380 66 0f fe 85 d0 + 01381 66 0f fe 85 d0 18 00 00 paddd xmm0, XMMWORD PTR x4_h$114[rbp] - 01388 66 0f 7f 85 10 + 01389 66 0f 7f 85 10 1e 00 00 movdqa XMMWORD PTR sum_h$142[rbp], xmm0 - 01390 66 0f 6f 85 80 + 01391 66 0f 6f 85 80 1d 00 00 movdqa xmm0, XMMWORD PTR abiased_l$139[rbp] - 01398 66 0f fa 85 a0 + 01399 66 0f fa 85 a0 18 00 00 psubd xmm0, XMMWORD PTR x4_l$113[rbp] - 013a0 66 0f 7f 85 40 + 013a1 66 0f 7f 85 40 1e 00 00 movdqa XMMWORD PTR dif_l$143[rbp], xmm0 - 013a8 66 0f 6f 85 b0 + 013a9 66 0f 6f 85 b0 1d 00 00 movdqa xmm0, XMMWORD PTR abiased_h$140[rbp] - 013b0 66 0f fa 85 d0 + 013b1 66 0f fa 85 d0 18 00 00 psubd xmm0, XMMWORD PTR x4_h$114[rbp] - 013b8 66 0f 7f 85 70 + 013b9 66 0f 7f 85 70 1e 00 00 movdqa XMMWORD PTR dif_h$144[rbp], xmm0 - 013c0 66 0f 6f 85 10 + 013c1 66 0f 6f 85 10 1e 00 00 movdqa xmm0, XMMWORD PTR sum_h$142[rbp] - 013c8 66 0f 72 e0 11 psrad xmm0, 17 - 013cd 66 0f 6f 8d e0 + 013c9 66 0f 72 e0 11 psrad xmm0, 17 + 013ce 66 0f 6f 8d e0 1d 00 00 movdqa xmm1, XMMWORD PTR sum_l$141[rbp] - 013d5 66 0f 72 e1 11 psrad xmm1, 17 - 013da 66 0f 6b c8 packssdw xmm1, xmm0 - 013de 66 0f 6f c1 movdqa xmm0, xmm1 - 013e2 66 0f 7f 85 a0 + 013d6 66 0f 72 e1 11 psrad xmm1, 17 + 013db 66 0f 6b c8 packssdw xmm1, xmm0 + 013df 66 0f 6f c1 movdqa xmm0, xmm1 + 013e3 66 0f 7f 85 a0 00 00 00 movdqa XMMWORD PTR row3$[rbp], xmm0 - 013ea 66 0f 6f 85 70 + 013eb 66 0f 6f 85 70 1e 00 00 movdqa xmm0, XMMWORD PTR dif_h$144[rbp] - 013f2 66 0f 72 e0 11 psrad xmm0, 17 - 013f7 66 0f 6f 8d 40 + 013f3 66 0f 72 e0 11 psrad xmm0, 17 + 013f8 66 0f 6f 8d 40 1e 00 00 movdqa xmm1, XMMWORD PTR dif_l$143[rbp] - 013ff 66 0f 72 e1 11 psrad xmm1, 17 - 01404 66 0f 6b c8 packssdw xmm1, xmm0 - 01408 66 0f 6f c1 movdqa xmm0, xmm1 - 0140c 66 0f 7f 85 d0 + 01400 66 0f 72 e1 11 psrad xmm1, 17 + 01405 66 0f 6b c8 packssdw xmm1, xmm0 + 01409 66 0f 6f c1 movdqa xmm0, xmm1 + 0140d 66 0f 7f 85 d0 00 00 00 movdqa XMMWORD PTR row4$[rbp], xmm0 ; 2136 : @@ -33754,282 +33949,282 @@ stbi__idct_simd PROC ; COMDAT ; 2138 : // pack ; 2139 : __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 - 01414 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] - 01419 66 0f 67 45 40 packuswb xmm0, XMMWORD PTR row1$[rbp] - 0141e 66 0f 7f 85 a0 + 01415 66 0f 6f 45 10 movdqa xmm0, XMMWORD PTR row0$[rbp] + 0141a 66 0f 67 45 40 packuswb xmm0, XMMWORD PTR row1$[rbp] + 0141f 66 0f 7f 85 a0 1e 00 00 movdqa XMMWORD PTR p0$145[rbp], xmm0 ; 2140 : __m128i p1 = _mm_packus_epi16(row2, row3); - 01426 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] - 0142b 66 0f 67 85 a0 + 01427 66 0f 6f 45 70 movdqa xmm0, XMMWORD PTR row2$[rbp] + 0142c 66 0f 67 85 a0 00 00 00 packuswb xmm0, XMMWORD PTR row3$[rbp] - 01433 66 0f 7f 85 d0 + 01434 66 0f 7f 85 d0 1e 00 00 movdqa XMMWORD PTR p1$146[rbp], xmm0 ; 2141 : __m128i p2 = _mm_packus_epi16(row4, row5); - 0143b 66 0f 6f 85 d0 + 0143c 66 0f 6f 85 d0 00 00 00 movdqa xmm0, XMMWORD PTR row4$[rbp] - 01443 66 0f 67 85 00 + 01444 66 0f 67 85 00 01 00 00 packuswb xmm0, XMMWORD PTR row5$[rbp] - 0144b 66 0f 7f 85 00 + 0144c 66 0f 7f 85 00 1f 00 00 movdqa XMMWORD PTR p2$147[rbp], xmm0 ; 2142 : __m128i p3 = _mm_packus_epi16(row6, row7); - 01453 66 0f 6f 85 30 + 01454 66 0f 6f 85 30 01 00 00 movdqa xmm0, XMMWORD PTR row6$[rbp] - 0145b 66 0f 67 85 60 + 0145c 66 0f 67 85 60 01 00 00 packuswb xmm0, XMMWORD PTR row7$[rbp] - 01463 66 0f 7f 85 30 + 01464 66 0f 7f 85 30 1f 00 00 movdqa XMMWORD PTR p3$148[rbp], xmm0 ; 2143 : ; 2144 : // 8bit 8x8 transpose pass 1 ; 2145 : dct_interleave8(p0, p2); // a0e0a1e1... - 0146b 66 0f 6f 85 a0 + 0146c 66 0f 6f 85 a0 1e 00 00 movdqa xmm0, XMMWORD PTR p0$145[rbp] - 01473 66 0f 7f 85 90 + 01474 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 0147b 66 0f 6f 85 a0 + 0147c 66 0f 6f 85 a0 1e 00 00 movdqa xmm0, XMMWORD PTR p0$145[rbp] - 01483 66 0f 60 85 00 + 01484 66 0f 60 85 00 1f 00 00 punpcklbw xmm0, XMMWORD PTR p2$147[rbp] - 0148b 66 0f 7f 85 a0 + 0148c 66 0f 7f 85 a0 1e 00 00 movdqa XMMWORD PTR p0$145[rbp], xmm0 - 01493 66 0f 6f 85 90 + 01494 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 0149b 66 0f 68 85 00 + 0149c 66 0f 68 85 00 1f 00 00 punpckhbw xmm0, XMMWORD PTR p2$147[rbp] - 014a3 66 0f 7f 85 00 + 014a4 66 0f 7f 85 00 1f 00 00 movdqa XMMWORD PTR p2$147[rbp], xmm0 ; 2146 : dct_interleave8(p1, p3); // c0g0c1g1... - 014ab 66 0f 6f 85 d0 + 014ac 66 0f 6f 85 d0 1e 00 00 movdqa xmm0, XMMWORD PTR p1$146[rbp] - 014b3 66 0f 7f 85 90 + 014b4 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 014bb 66 0f 6f 85 d0 + 014bc 66 0f 6f 85 d0 1e 00 00 movdqa xmm0, XMMWORD PTR p1$146[rbp] - 014c3 66 0f 60 85 30 + 014c4 66 0f 60 85 30 1f 00 00 punpcklbw xmm0, XMMWORD PTR p3$148[rbp] - 014cb 66 0f 7f 85 d0 + 014cc 66 0f 7f 85 d0 1e 00 00 movdqa XMMWORD PTR p1$146[rbp], xmm0 - 014d3 66 0f 6f 85 90 + 014d4 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 014db 66 0f 68 85 30 + 014dc 66 0f 68 85 30 1f 00 00 punpckhbw xmm0, XMMWORD PTR p3$148[rbp] - 014e3 66 0f 7f 85 30 + 014e4 66 0f 7f 85 30 1f 00 00 movdqa XMMWORD PTR p3$148[rbp], xmm0 ; 2147 : ; 2148 : // transpose pass 2 ; 2149 : dct_interleave8(p0, p1); // a0c0e0g0... - 014eb 66 0f 6f 85 a0 + 014ec 66 0f 6f 85 a0 1e 00 00 movdqa xmm0, XMMWORD PTR p0$145[rbp] - 014f3 66 0f 7f 85 90 + 014f4 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 014fb 66 0f 6f 85 a0 + 014fc 66 0f 6f 85 a0 1e 00 00 movdqa xmm0, XMMWORD PTR p0$145[rbp] - 01503 66 0f 60 85 d0 + 01504 66 0f 60 85 d0 1e 00 00 punpcklbw xmm0, XMMWORD PTR p1$146[rbp] - 0150b 66 0f 7f 85 a0 + 0150c 66 0f 7f 85 a0 1e 00 00 movdqa XMMWORD PTR p0$145[rbp], xmm0 - 01513 66 0f 6f 85 90 + 01514 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 0151b 66 0f 68 85 d0 + 0151c 66 0f 68 85 d0 1e 00 00 punpckhbw xmm0, XMMWORD PTR p1$146[rbp] - 01523 66 0f 7f 85 d0 + 01524 66 0f 7f 85 d0 1e 00 00 movdqa XMMWORD PTR p1$146[rbp], xmm0 ; 2150 : dct_interleave8(p2, p3); // b0d0f0h0... - 0152b 66 0f 6f 85 00 + 0152c 66 0f 6f 85 00 1f 00 00 movdqa xmm0, XMMWORD PTR p2$147[rbp] - 01533 66 0f 7f 85 90 + 01534 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 0153b 66 0f 6f 85 00 + 0153c 66 0f 6f 85 00 1f 00 00 movdqa xmm0, XMMWORD PTR p2$147[rbp] - 01543 66 0f 60 85 30 + 01544 66 0f 60 85 30 1f 00 00 punpcklbw xmm0, XMMWORD PTR p3$148[rbp] - 0154b 66 0f 7f 85 00 + 0154c 66 0f 7f 85 00 1f 00 00 movdqa XMMWORD PTR p2$147[rbp], xmm0 - 01553 66 0f 6f 85 90 + 01554 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 0155b 66 0f 68 85 30 + 0155c 66 0f 68 85 30 1f 00 00 punpckhbw xmm0, XMMWORD PTR p3$148[rbp] - 01563 66 0f 7f 85 30 + 01564 66 0f 7f 85 30 1f 00 00 movdqa XMMWORD PTR p3$148[rbp], xmm0 ; 2151 : ; 2152 : // transpose pass 3 ; 2153 : dct_interleave8(p0, p2); // a0b0c0d0... - 0156b 66 0f 6f 85 a0 + 0156c 66 0f 6f 85 a0 1e 00 00 movdqa xmm0, XMMWORD PTR p0$145[rbp] - 01573 66 0f 7f 85 90 + 01574 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 0157b 66 0f 6f 85 a0 + 0157c 66 0f 6f 85 a0 1e 00 00 movdqa xmm0, XMMWORD PTR p0$145[rbp] - 01583 66 0f 60 85 00 + 01584 66 0f 60 85 00 1f 00 00 punpcklbw xmm0, XMMWORD PTR p2$147[rbp] - 0158b 66 0f 7f 85 a0 + 0158c 66 0f 7f 85 a0 1e 00 00 movdqa XMMWORD PTR p0$145[rbp], xmm0 - 01593 66 0f 6f 85 90 + 01594 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 0159b 66 0f 68 85 00 + 0159c 66 0f 68 85 00 1f 00 00 punpckhbw xmm0, XMMWORD PTR p2$147[rbp] - 015a3 66 0f 7f 85 00 + 015a4 66 0f 7f 85 00 1f 00 00 movdqa XMMWORD PTR p2$147[rbp], xmm0 ; 2154 : dct_interleave8(p1, p3); // a4b4c4d4... - 015ab 66 0f 6f 85 d0 + 015ac 66 0f 6f 85 d0 1e 00 00 movdqa xmm0, XMMWORD PTR p1$146[rbp] - 015b3 66 0f 7f 85 90 + 015b4 66 0f 7f 85 90 01 00 00 movdqa XMMWORD PTR tmp$[rbp], xmm0 - 015bb 66 0f 6f 85 d0 + 015bc 66 0f 6f 85 d0 1e 00 00 movdqa xmm0, XMMWORD PTR p1$146[rbp] - 015c3 66 0f 60 85 30 + 015c4 66 0f 60 85 30 1f 00 00 punpcklbw xmm0, XMMWORD PTR p3$148[rbp] - 015cb 66 0f 7f 85 d0 + 015cc 66 0f 7f 85 d0 1e 00 00 movdqa XMMWORD PTR p1$146[rbp], xmm0 - 015d3 66 0f 6f 85 90 + 015d4 66 0f 6f 85 90 01 00 00 movdqa xmm0, XMMWORD PTR tmp$[rbp] - 015db 66 0f 68 85 30 + 015dc 66 0f 68 85 30 1f 00 00 punpckhbw xmm0, XMMWORD PTR p3$148[rbp] - 015e3 66 0f 7f 85 30 + 015e4 66 0f 7f 85 30 1f 00 00 movdqa XMMWORD PTR p3$148[rbp], xmm0 ; 2155 : ; 2156 : // store ; 2157 : _mm_storel_epi64((__m128i*) out, p0); out += out_stride; - 015eb 48 8b 85 70 25 + 015ec 48 8b 85 70 25 00 00 mov rax, QWORD PTR out$[rbp] - 015f2 66 0f 6f 85 a0 + 015f3 66 0f 6f 85 a0 1e 00 00 movdqa xmm0, XMMWORD PTR p0$145[rbp] - 015fa 66 0f d6 00 movq QWORD PTR [rax], xmm0 - 015fe 48 63 85 78 25 + 015fb 66 0f d6 00 movq QWORD PTR [rax], xmm0 + 015ff 48 63 85 78 25 00 00 movsxd rax, DWORD PTR out_stride$[rbp] - 01605 48 8b 8d 70 25 + 01606 48 8b 8d 70 25 00 00 mov rcx, QWORD PTR out$[rbp] - 0160c 48 03 c8 add rcx, rax - 0160f 48 8b c1 mov rax, rcx - 01612 48 89 85 70 25 + 0160d 48 03 c8 add rcx, rax + 01610 48 8b c1 mov rax, rcx + 01613 48 89 85 70 25 00 00 mov QWORD PTR out$[rbp], rax ; 2158 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; - 01619 66 0f 6f 85 a0 + 0161a 66 0f 6f 85 a0 1e 00 00 movdqa xmm0, XMMWORD PTR p0$145[rbp] - 01621 66 0f 70 c0 4e pshufd xmm0, xmm0, 78 ; 0000004eH - 01626 48 8b 85 70 25 + 01622 66 0f 70 c0 4e pshufd xmm0, xmm0, 78 ; 0000004eH + 01627 48 8b 85 70 25 00 00 mov rax, QWORD PTR out$[rbp] - 0162d 66 0f d6 00 movq QWORD PTR [rax], xmm0 - 01631 48 63 85 78 25 + 0162e 66 0f d6 00 movq QWORD PTR [rax], xmm0 + 01632 48 63 85 78 25 00 00 movsxd rax, DWORD PTR out_stride$[rbp] - 01638 48 8b 8d 70 25 + 01639 48 8b 8d 70 25 00 00 mov rcx, QWORD PTR out$[rbp] - 0163f 48 03 c8 add rcx, rax - 01642 48 8b c1 mov rax, rcx - 01645 48 89 85 70 25 + 01640 48 03 c8 add rcx, rax + 01643 48 8b c1 mov rax, rcx + 01646 48 89 85 70 25 00 00 mov QWORD PTR out$[rbp], rax ; 2159 : _mm_storel_epi64((__m128i*) out, p2); out += out_stride; - 0164c 48 8b 85 70 25 + 0164d 48 8b 85 70 25 00 00 mov rax, QWORD PTR out$[rbp] - 01653 66 0f 6f 85 00 + 01654 66 0f 6f 85 00 1f 00 00 movdqa xmm0, XMMWORD PTR p2$147[rbp] - 0165b 66 0f d6 00 movq QWORD PTR [rax], xmm0 - 0165f 48 63 85 78 25 + 0165c 66 0f d6 00 movq QWORD PTR [rax], xmm0 + 01660 48 63 85 78 25 00 00 movsxd rax, DWORD PTR out_stride$[rbp] - 01666 48 8b 8d 70 25 + 01667 48 8b 8d 70 25 00 00 mov rcx, QWORD PTR out$[rbp] - 0166d 48 03 c8 add rcx, rax - 01670 48 8b c1 mov rax, rcx - 01673 48 89 85 70 25 + 0166e 48 03 c8 add rcx, rax + 01671 48 8b c1 mov rax, rcx + 01674 48 89 85 70 25 00 00 mov QWORD PTR out$[rbp], rax ; 2160 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; - 0167a 66 0f 6f 85 00 + 0167b 66 0f 6f 85 00 1f 00 00 movdqa xmm0, XMMWORD PTR p2$147[rbp] - 01682 66 0f 70 c0 4e pshufd xmm0, xmm0, 78 ; 0000004eH - 01687 48 8b 85 70 25 + 01683 66 0f 70 c0 4e pshufd xmm0, xmm0, 78 ; 0000004eH + 01688 48 8b 85 70 25 00 00 mov rax, QWORD PTR out$[rbp] - 0168e 66 0f d6 00 movq QWORD PTR [rax], xmm0 - 01692 48 63 85 78 25 + 0168f 66 0f d6 00 movq QWORD PTR [rax], xmm0 + 01693 48 63 85 78 25 00 00 movsxd rax, DWORD PTR out_stride$[rbp] - 01699 48 8b 8d 70 25 + 0169a 48 8b 8d 70 25 00 00 mov rcx, QWORD PTR out$[rbp] - 016a0 48 03 c8 add rcx, rax - 016a3 48 8b c1 mov rax, rcx - 016a6 48 89 85 70 25 + 016a1 48 03 c8 add rcx, rax + 016a4 48 8b c1 mov rax, rcx + 016a7 48 89 85 70 25 00 00 mov QWORD PTR out$[rbp], rax ; 2161 : _mm_storel_epi64((__m128i*) out, p1); out += out_stride; - 016ad 48 8b 85 70 25 + 016ae 48 8b 85 70 25 00 00 mov rax, QWORD PTR out$[rbp] - 016b4 66 0f 6f 85 d0 + 016b5 66 0f 6f 85 d0 1e 00 00 movdqa xmm0, XMMWORD PTR p1$146[rbp] - 016bc 66 0f d6 00 movq QWORD PTR [rax], xmm0 - 016c0 48 63 85 78 25 + 016bd 66 0f d6 00 movq QWORD PTR [rax], xmm0 + 016c1 48 63 85 78 25 00 00 movsxd rax, DWORD PTR out_stride$[rbp] - 016c7 48 8b 8d 70 25 + 016c8 48 8b 8d 70 25 00 00 mov rcx, QWORD PTR out$[rbp] - 016ce 48 03 c8 add rcx, rax - 016d1 48 8b c1 mov rax, rcx - 016d4 48 89 85 70 25 + 016cf 48 03 c8 add rcx, rax + 016d2 48 8b c1 mov rax, rcx + 016d5 48 89 85 70 25 00 00 mov QWORD PTR out$[rbp], rax ; 2162 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; - 016db 66 0f 6f 85 d0 + 016dc 66 0f 6f 85 d0 1e 00 00 movdqa xmm0, XMMWORD PTR p1$146[rbp] - 016e3 66 0f 70 c0 4e pshufd xmm0, xmm0, 78 ; 0000004eH - 016e8 48 8b 85 70 25 + 016e4 66 0f 70 c0 4e pshufd xmm0, xmm0, 78 ; 0000004eH + 016e9 48 8b 85 70 25 00 00 mov rax, QWORD PTR out$[rbp] - 016ef 66 0f d6 00 movq QWORD PTR [rax], xmm0 - 016f3 48 63 85 78 25 + 016f0 66 0f d6 00 movq QWORD PTR [rax], xmm0 + 016f4 48 63 85 78 25 00 00 movsxd rax, DWORD PTR out_stride$[rbp] - 016fa 48 8b 8d 70 25 + 016fb 48 8b 8d 70 25 00 00 mov rcx, QWORD PTR out$[rbp] - 01701 48 03 c8 add rcx, rax - 01704 48 8b c1 mov rax, rcx - 01707 48 89 85 70 25 + 01702 48 03 c8 add rcx, rax + 01705 48 8b c1 mov rax, rcx + 01708 48 89 85 70 25 00 00 mov QWORD PTR out$[rbp], rax ; 2163 : _mm_storel_epi64((__m128i*) out, p3); out += out_stride; - 0170e 48 8b 85 70 25 + 0170f 48 8b 85 70 25 00 00 mov rax, QWORD PTR out$[rbp] - 01715 66 0f 6f 85 30 + 01716 66 0f 6f 85 30 1f 00 00 movdqa xmm0, XMMWORD PTR p3$148[rbp] - 0171d 66 0f d6 00 movq QWORD PTR [rax], xmm0 - 01721 48 63 85 78 25 + 0171e 66 0f d6 00 movq QWORD PTR [rax], xmm0 + 01722 48 63 85 78 25 00 00 movsxd rax, DWORD PTR out_stride$[rbp] - 01728 48 8b 8d 70 25 + 01729 48 8b 8d 70 25 00 00 mov rcx, QWORD PTR out$[rbp] - 0172f 48 03 c8 add rcx, rax - 01732 48 8b c1 mov rax, rcx - 01735 48 89 85 70 25 + 01730 48 03 c8 add rcx, rax + 01733 48 8b c1 mov rax, rcx + 01736 48 89 85 70 25 00 00 mov QWORD PTR out$[rbp], rax ; 2164 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e)); - 0173c 66 0f 6f 85 30 + 0173d 66 0f 6f 85 30 1f 00 00 movdqa xmm0, XMMWORD PTR p3$148[rbp] - 01744 66 0f 70 c0 4e pshufd xmm0, xmm0, 78 ; 0000004eH - 01749 48 8b 85 70 25 + 01745 66 0f 70 c0 4e pshufd xmm0, xmm0, 78 ; 0000004eH + 0174a 48 8b 85 70 25 00 00 mov rax, QWORD PTR out$[rbp] - 01750 66 0f d6 00 movq QWORD PTR [rax], xmm0 + 01751 66 0f d6 00 movq QWORD PTR [rax], xmm0 ; 2165 : } ; 2166 : @@ -34044,11 +34239,11 @@ stbi__idct_simd PROC ; COMDAT ; 2175 : #undef dct_pass ; 2176 : } - 01754 48 8d a5 58 25 + 01755 48 8d a5 58 25 00 00 lea rsp, QWORD PTR [rbp+9560] - 0175b 5f pop rdi - 0175c 5d pop rbp - 0175d c3 ret 0 + 0175c 5f pop rdi + 0175d 5d pop rbp + 0175e c3 ret 0 stbi__idct_simd ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -34117,106 +34312,107 @@ stbi__idct_block PROC ; COMDAT 00046 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0004d e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00052 90 npad 1 ; 1941 : int i, val[64], * v = val; - 00052 48 8d 45 30 lea rax, QWORD PTR val$[rbp] - 00056 48 89 85 48 01 + 00053 48 8d 45 30 lea rax, QWORD PTR val$[rbp] + 00057 48 89 85 48 01 00 00 mov QWORD PTR v$[rbp], rax ; 1942 : stbi_uc* o; ; 1943 : short* d = data; - 0005d 48 8b 85 70 07 + 0005e 48 8b 85 70 07 00 00 mov rax, QWORD PTR data$[rbp] - 00064 48 89 85 88 01 + 00065 48 89 85 88 01 00 00 mov QWORD PTR d$[rbp], rax ; 1944 : ; 1945 : // columns ; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { - 0006b c7 45 04 00 00 + 0006c c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00072 eb 2c jmp SHORT $LN4@stbi__idct + 00073 eb 2c jmp SHORT $LN4@stbi__idct $LN2@stbi__idct: - 00074 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00077 ff c0 inc eax - 00079 89 45 04 mov DWORD PTR i$[rbp], eax - 0007c 48 8b 85 88 01 + 00075 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00078 ff c0 inc eax + 0007a 89 45 04 mov DWORD PTR i$[rbp], eax + 0007d 48 8b 85 88 01 00 00 mov rax, QWORD PTR d$[rbp] - 00083 48 83 c0 02 add rax, 2 - 00087 48 89 85 88 01 + 00084 48 83 c0 02 add rax, 2 + 00088 48 89 85 88 01 00 00 mov QWORD PTR d$[rbp], rax - 0008e 48 8b 85 48 01 + 0008f 48 8b 85 48 01 00 00 mov rax, QWORD PTR v$[rbp] - 00095 48 83 c0 04 add rax, 4 - 00099 48 89 85 48 01 + 00096 48 83 c0 04 add rax, 4 + 0009a 48 89 85 48 01 00 00 mov QWORD PTR v$[rbp], rax $LN4@stbi__idct: - 000a0 83 7d 04 08 cmp DWORD PTR i$[rbp], 8 - 000a4 0f 8d 5f 06 00 + 000a1 83 7d 04 08 cmp DWORD PTR i$[rbp], 8 + 000a5 0f 8d 5f 06 00 00 jge $LN3@stbi__idct ; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing ; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 ; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { - 000aa b8 02 00 00 00 mov eax, 2 - 000af 48 6b c0 08 imul rax, rax, 8 - 000b3 48 8b 8d 88 01 + 000ab b8 02 00 00 00 mov eax, 2 + 000b0 48 6b c0 08 imul rax, rax, 8 + 000b4 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 000ba 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 000be 85 c0 test eax, eax - 000c0 0f 85 92 01 00 + 000bb 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 000bf 85 c0 test eax, eax + 000c1 0f 85 92 01 00 00 jne $LN8@stbi__idct - 000c6 b8 02 00 00 00 mov eax, 2 - 000cb 48 6b c0 10 imul rax, rax, 16 - 000cf 48 8b 8d 88 01 + 000c7 b8 02 00 00 00 mov eax, 2 + 000cc 48 6b c0 10 imul rax, rax, 16 + 000d0 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 000d6 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 000da 85 c0 test eax, eax - 000dc 0f 85 76 01 00 + 000d7 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 000db 85 c0 test eax, eax + 000dd 0f 85 76 01 00 00 jne $LN8@stbi__idct - 000e2 b8 02 00 00 00 mov eax, 2 - 000e7 48 6b c0 18 imul rax, rax, 24 - 000eb 48 8b 8d 88 01 + 000e3 b8 02 00 00 00 mov eax, 2 + 000e8 48 6b c0 18 imul rax, rax, 24 + 000ec 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 000f2 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 000f6 85 c0 test eax, eax - 000f8 0f 85 5a 01 00 + 000f3 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 000f7 85 c0 test eax, eax + 000f9 0f 85 5a 01 00 00 jne $LN8@stbi__idct - 000fe b8 02 00 00 00 mov eax, 2 - 00103 48 6b c0 20 imul rax, rax, 32 ; 00000020H - 00107 48 8b 8d 88 01 + 000ff b8 02 00 00 00 mov eax, 2 + 00104 48 6b c0 20 imul rax, rax, 32 ; 00000020H + 00108 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 0010e 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 00112 85 c0 test eax, eax - 00114 0f 85 3e 01 00 + 0010f 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 00113 85 c0 test eax, eax + 00115 0f 85 3e 01 00 00 jne $LN8@stbi__idct - 0011a b8 02 00 00 00 mov eax, 2 - 0011f 48 6b c0 28 imul rax, rax, 40 ; 00000028H - 00123 48 8b 8d 88 01 + 0011b b8 02 00 00 00 mov eax, 2 + 00120 48 6b c0 28 imul rax, rax, 40 ; 00000028H + 00124 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 0012a 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 0012e 85 c0 test eax, eax - 00130 0f 85 22 01 00 + 0012b 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 0012f 85 c0 test eax, eax + 00131 0f 85 22 01 00 00 jne $LN8@stbi__idct - 00136 b8 02 00 00 00 mov eax, 2 - 0013b 48 6b c0 30 imul rax, rax, 48 ; 00000030H - 0013f 48 8b 8d 88 01 + 00137 b8 02 00 00 00 mov eax, 2 + 0013c 48 6b c0 30 imul rax, rax, 48 ; 00000030H + 00140 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 00146 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 0014a 85 c0 test eax, eax - 0014c 0f 85 06 01 00 + 00147 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 0014b 85 c0 test eax, eax + 0014d 0f 85 06 01 00 00 jne $LN8@stbi__idct - 00152 b8 02 00 00 00 mov eax, 2 - 00157 48 6b c0 38 imul rax, rax, 56 ; 00000038H - 0015b 48 8b 8d 88 01 + 00153 b8 02 00 00 00 mov eax, 2 + 00158 48 6b c0 38 imul rax, rax, 56 ; 00000038H + 0015c 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 00162 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 00166 85 c0 test eax, eax - 00168 0f 85 ea 00 00 + 00163 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 00167 85 c0 test eax, eax + 00169 0f 85 ea 00 00 00 jne $LN8@stbi__idct ; 1950 : // no shortcut 0 seconds @@ -34225,800 +34421,800 @@ $LN4@stbi__idct: ; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds ; 1954 : int dcterm = d[0] * 4; - 0016e b8 02 00 00 00 mov eax, 2 - 00173 48 6b c0 00 imul rax, rax, 0 - 00177 48 8b 8d 88 01 + 0016f b8 02 00 00 00 mov eax, 2 + 00174 48 6b c0 00 imul rax, rax, 0 + 00178 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 0017e 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 00182 c1 e0 02 shl eax, 2 - 00185 89 85 a4 01 00 + 0017f 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 00183 c1 e0 02 shl eax, 2 + 00186 89 85 a4 01 00 00 mov DWORD PTR dcterm$4[rbp], eax ; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; - 0018b b8 04 00 00 00 mov eax, 4 - 00190 48 6b c0 38 imul rax, rax, 56 ; 00000038H - 00194 48 8b 8d 48 01 + 0018c b8 04 00 00 00 mov eax, 4 + 00191 48 6b c0 38 imul rax, rax, 56 ; 00000038H + 00195 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 0019b 8b 95 a4 01 00 + 0019c 8b 95 a4 01 00 00 mov edx, DWORD PTR dcterm$4[rbp] - 001a1 89 14 01 mov DWORD PTR [rcx+rax], edx - 001a4 b8 04 00 00 00 mov eax, 4 - 001a9 48 6b c0 30 imul rax, rax, 48 ; 00000030H - 001ad 48 8b 8d 48 01 + 001a2 89 14 01 mov DWORD PTR [rcx+rax], edx + 001a5 b8 04 00 00 00 mov eax, 4 + 001aa 48 6b c0 30 imul rax, rax, 48 ; 00000030H + 001ae 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 001b4 8b 95 a4 01 00 + 001b5 8b 95 a4 01 00 00 mov edx, DWORD PTR dcterm$4[rbp] - 001ba 89 14 01 mov DWORD PTR [rcx+rax], edx - 001bd b8 04 00 00 00 mov eax, 4 - 001c2 48 6b c0 28 imul rax, rax, 40 ; 00000028H - 001c6 48 8b 8d 48 01 + 001bb 89 14 01 mov DWORD PTR [rcx+rax], edx + 001be b8 04 00 00 00 mov eax, 4 + 001c3 48 6b c0 28 imul rax, rax, 40 ; 00000028H + 001c7 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 001cd 8b 95 a4 01 00 + 001ce 8b 95 a4 01 00 00 mov edx, DWORD PTR dcterm$4[rbp] - 001d3 89 14 01 mov DWORD PTR [rcx+rax], edx - 001d6 b8 04 00 00 00 mov eax, 4 - 001db 48 6b c0 20 imul rax, rax, 32 ; 00000020H - 001df 48 8b 8d 48 01 + 001d4 89 14 01 mov DWORD PTR [rcx+rax], edx + 001d7 b8 04 00 00 00 mov eax, 4 + 001dc 48 6b c0 20 imul rax, rax, 32 ; 00000020H + 001e0 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 001e6 8b 95 a4 01 00 + 001e7 8b 95 a4 01 00 00 mov edx, DWORD PTR dcterm$4[rbp] - 001ec 89 14 01 mov DWORD PTR [rcx+rax], edx - 001ef b8 04 00 00 00 mov eax, 4 - 001f4 48 6b c0 18 imul rax, rax, 24 - 001f8 48 8b 8d 48 01 + 001ed 89 14 01 mov DWORD PTR [rcx+rax], edx + 001f0 b8 04 00 00 00 mov eax, 4 + 001f5 48 6b c0 18 imul rax, rax, 24 + 001f9 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 001ff 8b 95 a4 01 00 + 00200 8b 95 a4 01 00 00 mov edx, DWORD PTR dcterm$4[rbp] - 00205 89 14 01 mov DWORD PTR [rcx+rax], edx - 00208 b8 04 00 00 00 mov eax, 4 - 0020d 48 6b c0 10 imul rax, rax, 16 - 00211 48 8b 8d 48 01 + 00206 89 14 01 mov DWORD PTR [rcx+rax], edx + 00209 b8 04 00 00 00 mov eax, 4 + 0020e 48 6b c0 10 imul rax, rax, 16 + 00212 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 00218 8b 95 a4 01 00 + 00219 8b 95 a4 01 00 00 mov edx, DWORD PTR dcterm$4[rbp] - 0021e 89 14 01 mov DWORD PTR [rcx+rax], edx - 00221 b8 04 00 00 00 mov eax, 4 - 00226 48 6b c0 08 imul rax, rax, 8 - 0022a 48 8b 8d 48 01 + 0021f 89 14 01 mov DWORD PTR [rcx+rax], edx + 00222 b8 04 00 00 00 mov eax, 4 + 00227 48 6b c0 08 imul rax, rax, 8 + 0022b 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 00231 8b 95 a4 01 00 + 00232 8b 95 a4 01 00 00 mov edx, DWORD PTR dcterm$4[rbp] - 00237 89 14 01 mov DWORD PTR [rcx+rax], edx - 0023a b8 04 00 00 00 mov eax, 4 - 0023f 48 6b c0 00 imul rax, rax, 0 - 00243 48 8b 8d 48 01 + 00238 89 14 01 mov DWORD PTR [rcx+rax], edx + 0023b b8 04 00 00 00 mov eax, 4 + 00240 48 6b c0 00 imul rax, rax, 0 + 00244 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 0024a 8b 95 a4 01 00 + 0024b 8b 95 a4 01 00 00 mov edx, DWORD PTR dcterm$4[rbp] - 00250 89 14 01 mov DWORD PTR [rcx+rax], edx + 00251 89 14 01 mov DWORD PTR [rcx+rax], edx ; 1956 : } - 00253 e9 ac 04 00 00 jmp $LN9@stbi__idct + 00254 e9 ac 04 00 00 jmp $LN9@stbi__idct $LN8@stbi__idct: ; 1957 : else { ; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) - 00258 b8 02 00 00 00 mov eax, 2 - 0025d 48 6b c0 10 imul rax, rax, 16 - 00261 48 8b 8d 88 01 + 00259 b8 02 00 00 00 mov eax, 2 + 0025e 48 6b c0 10 imul rax, rax, 16 + 00262 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 00268 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 0026c 89 85 64 02 00 + 00269 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 0026d 89 85 64 02 00 00 mov DWORD PTR p2$10[rbp], eax - 00272 b8 02 00 00 00 mov eax, 2 - 00277 48 6b c0 30 imul rax, rax, 48 ; 00000030H - 0027b 48 8b 8d 88 01 + 00273 b8 02 00 00 00 mov eax, 2 + 00278 48 6b c0 30 imul rax, rax, 48 ; 00000030H + 0027c 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 00282 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 00286 89 85 84 02 00 + 00283 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 00287 89 85 84 02 00 00 mov DWORD PTR p3$11[rbp], eax - 0028c 8b 85 84 02 00 + 0028d 8b 85 84 02 00 00 mov eax, DWORD PTR p3$11[rbp] - 00292 8b 8d 64 02 00 + 00293 8b 8d 64 02 00 00 mov ecx, DWORD PTR p2$10[rbp] - 00298 03 c8 add ecx, eax - 0029a 8b c1 mov eax, ecx - 0029c 69 c0 a9 08 00 + 00299 03 c8 add ecx, eax + 0029b 8b c1 mov eax, ecx + 0029d 69 c0 a9 08 00 00 imul eax, eax, 2217 ; 000008a9H - 002a2 89 85 44 02 00 + 002a3 89 85 44 02 00 00 mov DWORD PTR p1$9[rbp], eax - 002a8 69 85 84 02 00 + 002a9 69 85 84 02 00 00 71 e2 ff ff imul eax, DWORD PTR p3$11[rbp], -7567 ; ffffffffffffe271H - 002b2 8b 8d 44 02 00 + 002b3 8b 8d 44 02 00 00 mov ecx, DWORD PTR p1$9[rbp] - 002b8 03 c8 add ecx, eax - 002ba 8b c1 mov eax, ecx - 002bc 89 85 04 02 00 + 002b9 03 c8 add ecx, eax + 002bb 8b c1 mov eax, ecx + 002bd 89 85 04 02 00 00 mov DWORD PTR t2$7[rbp], eax - 002c2 69 85 64 02 00 + 002c3 69 85 64 02 00 00 3f 0c 00 00 imul eax, DWORD PTR p2$10[rbp], 3135 ; 00000c3fH - 002cc 8b 8d 44 02 00 + 002cd 8b 8d 44 02 00 00 mov ecx, DWORD PTR p1$9[rbp] - 002d2 03 c8 add ecx, eax - 002d4 8b c1 mov eax, ecx - 002d6 89 85 24 02 00 + 002d3 03 c8 add ecx, eax + 002d5 8b c1 mov eax, ecx + 002d7 89 85 24 02 00 00 mov DWORD PTR t3$8[rbp], eax - 002dc b8 02 00 00 00 mov eax, 2 - 002e1 48 6b c0 00 imul rax, rax, 0 - 002e5 48 8b 8d 88 01 + 002dd b8 02 00 00 00 mov eax, 2 + 002e2 48 6b c0 00 imul rax, rax, 0 + 002e6 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 002ec 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 002f0 89 85 64 02 00 + 002ed 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 002f1 89 85 64 02 00 00 mov DWORD PTR p2$10[rbp], eax - 002f6 b8 02 00 00 00 mov eax, 2 - 002fb 48 6b c0 20 imul rax, rax, 32 ; 00000020H - 002ff 48 8b 8d 88 01 + 002f7 b8 02 00 00 00 mov eax, 2 + 002fc 48 6b c0 20 imul rax, rax, 32 ; 00000020H + 00300 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 00306 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 0030a 89 85 84 02 00 + 00307 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 0030b 89 85 84 02 00 00 mov DWORD PTR p3$11[rbp], eax - 00310 8b 85 84 02 00 + 00311 8b 85 84 02 00 00 mov eax, DWORD PTR p3$11[rbp] - 00316 8b 8d 64 02 00 + 00317 8b 8d 64 02 00 00 mov ecx, DWORD PTR p2$10[rbp] - 0031c 03 c8 add ecx, eax - 0031e 8b c1 mov eax, ecx - 00320 69 c0 00 10 00 + 0031d 03 c8 add ecx, eax + 0031f 8b c1 mov eax, ecx + 00321 69 c0 00 10 00 00 imul eax, eax, 4096 ; 00001000H - 00326 89 85 c4 01 00 + 00327 89 85 c4 01 00 00 mov DWORD PTR t0$5[rbp], eax - 0032c 8b 85 84 02 00 + 0032d 8b 85 84 02 00 00 mov eax, DWORD PTR p3$11[rbp] - 00332 8b 8d 64 02 00 + 00333 8b 8d 64 02 00 00 mov ecx, DWORD PTR p2$10[rbp] - 00338 2b c8 sub ecx, eax - 0033a 8b c1 mov eax, ecx - 0033c 69 c0 00 10 00 + 00339 2b c8 sub ecx, eax + 0033b 8b c1 mov eax, ecx + 0033d 69 c0 00 10 00 00 imul eax, eax, 4096 ; 00001000H - 00342 89 85 e4 01 00 + 00343 89 85 e4 01 00 00 mov DWORD PTR t1$6[rbp], eax - 00348 8b 85 24 02 00 + 00349 8b 85 24 02 00 00 mov eax, DWORD PTR t3$8[rbp] - 0034e 8b 8d c4 01 00 + 0034f 8b 8d c4 01 00 00 mov ecx, DWORD PTR t0$5[rbp] - 00354 03 c8 add ecx, eax - 00356 8b c1 mov eax, ecx - 00358 89 85 e4 02 00 + 00355 03 c8 add ecx, eax + 00357 8b c1 mov eax, ecx + 00359 89 85 e4 02 00 00 mov DWORD PTR x0$14[rbp], eax - 0035e 8b 85 24 02 00 + 0035f 8b 85 24 02 00 00 mov eax, DWORD PTR t3$8[rbp] - 00364 8b 8d c4 01 00 + 00365 8b 8d c4 01 00 00 mov ecx, DWORD PTR t0$5[rbp] - 0036a 2b c8 sub ecx, eax - 0036c 8b c1 mov eax, ecx - 0036e 89 85 44 03 00 + 0036b 2b c8 sub ecx, eax + 0036d 8b c1 mov eax, ecx + 0036f 89 85 44 03 00 00 mov DWORD PTR x3$17[rbp], eax - 00374 8b 85 04 02 00 + 00375 8b 85 04 02 00 00 mov eax, DWORD PTR t2$7[rbp] - 0037a 8b 8d e4 01 00 + 0037b 8b 8d e4 01 00 00 mov ecx, DWORD PTR t1$6[rbp] - 00380 03 c8 add ecx, eax - 00382 8b c1 mov eax, ecx - 00384 89 85 04 03 00 + 00381 03 c8 add ecx, eax + 00383 8b c1 mov eax, ecx + 00385 89 85 04 03 00 00 mov DWORD PTR x1$15[rbp], eax - 0038a 8b 85 04 02 00 + 0038b 8b 85 04 02 00 00 mov eax, DWORD PTR t2$7[rbp] - 00390 8b 8d e4 01 00 + 00391 8b 8d e4 01 00 00 mov ecx, DWORD PTR t1$6[rbp] - 00396 2b c8 sub ecx, eax - 00398 8b c1 mov eax, ecx - 0039a 89 85 24 03 00 + 00397 2b c8 sub ecx, eax + 00399 8b c1 mov eax, ecx + 0039b 89 85 24 03 00 00 mov DWORD PTR x2$16[rbp], eax - 003a0 b8 02 00 00 00 mov eax, 2 - 003a5 48 6b c0 38 imul rax, rax, 56 ; 00000038H - 003a9 48 8b 8d 88 01 + 003a1 b8 02 00 00 00 mov eax, 2 + 003a6 48 6b c0 38 imul rax, rax, 56 ; 00000038H + 003aa 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 003b0 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 003b4 89 85 c4 01 00 + 003b1 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 003b5 89 85 c4 01 00 00 mov DWORD PTR t0$5[rbp], eax - 003ba b8 02 00 00 00 mov eax, 2 - 003bf 48 6b c0 28 imul rax, rax, 40 ; 00000028H - 003c3 48 8b 8d 88 01 + 003bb b8 02 00 00 00 mov eax, 2 + 003c0 48 6b c0 28 imul rax, rax, 40 ; 00000028H + 003c4 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 003ca 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 003ce 89 85 e4 01 00 + 003cb 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 003cf 89 85 e4 01 00 00 mov DWORD PTR t1$6[rbp], eax - 003d4 b8 02 00 00 00 mov eax, 2 - 003d9 48 6b c0 18 imul rax, rax, 24 - 003dd 48 8b 8d 88 01 + 003d5 b8 02 00 00 00 mov eax, 2 + 003da 48 6b c0 18 imul rax, rax, 24 + 003de 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 003e4 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 003e8 89 85 04 02 00 + 003e5 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 003e9 89 85 04 02 00 00 mov DWORD PTR t2$7[rbp], eax - 003ee b8 02 00 00 00 mov eax, 2 - 003f3 48 6b c0 08 imul rax, rax, 8 - 003f7 48 8b 8d 88 01 + 003ef b8 02 00 00 00 mov eax, 2 + 003f4 48 6b c0 08 imul rax, rax, 8 + 003f8 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR d$[rbp] - 003fe 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] - 00402 89 85 24 02 00 + 003ff 0f bf 04 01 movsx eax, WORD PTR [rcx+rax] + 00403 89 85 24 02 00 00 mov DWORD PTR t3$8[rbp], eax - 00408 8b 85 04 02 00 + 00409 8b 85 04 02 00 00 mov eax, DWORD PTR t2$7[rbp] - 0040e 8b 8d c4 01 00 + 0040f 8b 8d c4 01 00 00 mov ecx, DWORD PTR t0$5[rbp] - 00414 03 c8 add ecx, eax - 00416 8b c1 mov eax, ecx - 00418 89 85 84 02 00 + 00415 03 c8 add ecx, eax + 00417 8b c1 mov eax, ecx + 00419 89 85 84 02 00 00 mov DWORD PTR p3$11[rbp], eax - 0041e 8b 85 24 02 00 + 0041f 8b 85 24 02 00 00 mov eax, DWORD PTR t3$8[rbp] - 00424 8b 8d e4 01 00 + 00425 8b 8d e4 01 00 00 mov ecx, DWORD PTR t1$6[rbp] - 0042a 03 c8 add ecx, eax - 0042c 8b c1 mov eax, ecx - 0042e 89 85 a4 02 00 + 0042b 03 c8 add ecx, eax + 0042d 8b c1 mov eax, ecx + 0042f 89 85 a4 02 00 00 mov DWORD PTR p4$12[rbp], eax - 00434 8b 85 24 02 00 + 00435 8b 85 24 02 00 00 mov eax, DWORD PTR t3$8[rbp] - 0043a 8b 8d c4 01 00 + 0043b 8b 8d c4 01 00 00 mov ecx, DWORD PTR t0$5[rbp] - 00440 03 c8 add ecx, eax - 00442 8b c1 mov eax, ecx - 00444 89 85 44 02 00 + 00441 03 c8 add ecx, eax + 00443 8b c1 mov eax, ecx + 00445 89 85 44 02 00 00 mov DWORD PTR p1$9[rbp], eax - 0044a 8b 85 04 02 00 + 0044b 8b 85 04 02 00 00 mov eax, DWORD PTR t2$7[rbp] - 00450 8b 8d e4 01 00 + 00451 8b 8d e4 01 00 00 mov ecx, DWORD PTR t1$6[rbp] - 00456 03 c8 add ecx, eax - 00458 8b c1 mov eax, ecx - 0045a 89 85 64 02 00 + 00457 03 c8 add ecx, eax + 00459 8b c1 mov eax, ecx + 0045b 89 85 64 02 00 00 mov DWORD PTR p2$10[rbp], eax - 00460 8b 85 a4 02 00 + 00461 8b 85 a4 02 00 00 mov eax, DWORD PTR p4$12[rbp] - 00466 8b 8d 84 02 00 + 00467 8b 8d 84 02 00 00 mov ecx, DWORD PTR p3$11[rbp] - 0046c 03 c8 add ecx, eax - 0046e 8b c1 mov eax, ecx - 00470 69 c0 d0 12 00 + 0046d 03 c8 add ecx, eax + 0046f 8b c1 mov eax, ecx + 00471 69 c0 d0 12 00 00 imul eax, eax, 4816 ; 000012d0H - 00476 89 85 c4 02 00 + 00477 89 85 c4 02 00 00 mov DWORD PTR p5$13[rbp], eax - 0047c 69 85 c4 01 00 + 0047d 69 85 c4 01 00 00 c7 04 00 00 imul eax, DWORD PTR t0$5[rbp], 1223 ; 000004c7H - 00486 89 85 c4 01 00 + 00487 89 85 c4 01 00 00 mov DWORD PTR t0$5[rbp], eax - 0048c 69 85 e4 01 00 + 0048d 69 85 e4 01 00 00 da 20 00 00 imul eax, DWORD PTR t1$6[rbp], 8410 ; 000020daH - 00496 89 85 e4 01 00 + 00497 89 85 e4 01 00 00 mov DWORD PTR t1$6[rbp], eax - 0049c 69 85 04 02 00 + 0049d 69 85 04 02 00 00 2a 31 00 00 imul eax, DWORD PTR t2$7[rbp], 12586 ; 0000312aH - 004a6 89 85 04 02 00 + 004a7 89 85 04 02 00 00 mov DWORD PTR t2$7[rbp], eax - 004ac 69 85 24 02 00 + 004ad 69 85 24 02 00 00 05 18 00 00 imul eax, DWORD PTR t3$8[rbp], 6149 ; 00001805H - 004b6 89 85 24 02 00 + 004b7 89 85 24 02 00 00 mov DWORD PTR t3$8[rbp], eax - 004bc 69 85 44 02 00 + 004bd 69 85 44 02 00 00 9b f1 ff ff imul eax, DWORD PTR p1$9[rbp], -3685 ; fffffffffffff19bH - 004c6 8b 8d c4 02 00 + 004c7 8b 8d c4 02 00 00 mov ecx, DWORD PTR p5$13[rbp] - 004cc 03 c8 add ecx, eax - 004ce 8b c1 mov eax, ecx - 004d0 89 85 44 02 00 + 004cd 03 c8 add ecx, eax + 004cf 8b c1 mov eax, ecx + 004d1 89 85 44 02 00 00 mov DWORD PTR p1$9[rbp], eax - 004d6 69 85 64 02 00 + 004d7 69 85 64 02 00 00 ff d6 ff ff imul eax, DWORD PTR p2$10[rbp], -10497 ; ffffffffffffd6ffH - 004e0 8b 8d c4 02 00 + 004e1 8b 8d c4 02 00 00 mov ecx, DWORD PTR p5$13[rbp] - 004e6 03 c8 add ecx, eax - 004e8 8b c1 mov eax, ecx - 004ea 89 85 64 02 00 + 004e7 03 c8 add ecx, eax + 004e9 8b c1 mov eax, ecx + 004eb 89 85 64 02 00 00 mov DWORD PTR p2$10[rbp], eax - 004f0 69 85 84 02 00 + 004f1 69 85 84 02 00 00 9e e0 ff ff imul eax, DWORD PTR p3$11[rbp], -8034 ; ffffffffffffe09eH - 004fa 89 85 84 02 00 + 004fb 89 85 84 02 00 00 mov DWORD PTR p3$11[rbp], eax - 00500 69 85 a4 02 00 + 00501 69 85 a4 02 00 00 c3 f9 ff ff imul eax, DWORD PTR p4$12[rbp], -1597 ; fffffffffffff9c3H - 0050a 89 85 a4 02 00 + 0050b 89 85 a4 02 00 00 mov DWORD PTR p4$12[rbp], eax - 00510 8b 85 a4 02 00 + 00511 8b 85 a4 02 00 00 mov eax, DWORD PTR p4$12[rbp] - 00516 8b 8d 44 02 00 + 00517 8b 8d 44 02 00 00 mov ecx, DWORD PTR p1$9[rbp] - 0051c 03 c8 add ecx, eax - 0051e 8b c1 mov eax, ecx - 00520 8b 8d 24 02 00 + 0051d 03 c8 add ecx, eax + 0051f 8b c1 mov eax, ecx + 00521 8b 8d 24 02 00 00 mov ecx, DWORD PTR t3$8[rbp] - 00526 03 c8 add ecx, eax - 00528 8b c1 mov eax, ecx - 0052a 89 85 24 02 00 + 00527 03 c8 add ecx, eax + 00529 8b c1 mov eax, ecx + 0052b 89 85 24 02 00 00 mov DWORD PTR t3$8[rbp], eax - 00530 8b 85 84 02 00 + 00531 8b 85 84 02 00 00 mov eax, DWORD PTR p3$11[rbp] - 00536 8b 8d 64 02 00 + 00537 8b 8d 64 02 00 00 mov ecx, DWORD PTR p2$10[rbp] - 0053c 03 c8 add ecx, eax - 0053e 8b c1 mov eax, ecx - 00540 8b 8d 04 02 00 + 0053d 03 c8 add ecx, eax + 0053f 8b c1 mov eax, ecx + 00541 8b 8d 04 02 00 00 mov ecx, DWORD PTR t2$7[rbp] - 00546 03 c8 add ecx, eax - 00548 8b c1 mov eax, ecx - 0054a 89 85 04 02 00 + 00547 03 c8 add ecx, eax + 00549 8b c1 mov eax, ecx + 0054b 89 85 04 02 00 00 mov DWORD PTR t2$7[rbp], eax - 00550 8b 85 a4 02 00 + 00551 8b 85 a4 02 00 00 mov eax, DWORD PTR p4$12[rbp] - 00556 8b 8d 64 02 00 + 00557 8b 8d 64 02 00 00 mov ecx, DWORD PTR p2$10[rbp] - 0055c 03 c8 add ecx, eax - 0055e 8b c1 mov eax, ecx - 00560 8b 8d e4 01 00 + 0055d 03 c8 add ecx, eax + 0055f 8b c1 mov eax, ecx + 00561 8b 8d e4 01 00 00 mov ecx, DWORD PTR t1$6[rbp] - 00566 03 c8 add ecx, eax - 00568 8b c1 mov eax, ecx - 0056a 89 85 e4 01 00 + 00567 03 c8 add ecx, eax + 00569 8b c1 mov eax, ecx + 0056b 89 85 e4 01 00 00 mov DWORD PTR t1$6[rbp], eax - 00570 8b 85 84 02 00 + 00571 8b 85 84 02 00 00 mov eax, DWORD PTR p3$11[rbp] - 00576 8b 8d 44 02 00 + 00577 8b 8d 44 02 00 00 mov ecx, DWORD PTR p1$9[rbp] - 0057c 03 c8 add ecx, eax - 0057e 8b c1 mov eax, ecx - 00580 8b 8d c4 01 00 + 0057d 03 c8 add ecx, eax + 0057f 8b c1 mov eax, ecx + 00581 8b 8d c4 01 00 00 mov ecx, DWORD PTR t0$5[rbp] - 00586 03 c8 add ecx, eax - 00588 8b c1 mov eax, ecx - 0058a 89 85 c4 01 00 + 00587 03 c8 add ecx, eax + 00589 8b c1 mov eax, ecx + 0058b 89 85 c4 01 00 00 mov DWORD PTR t0$5[rbp], eax ; 1959 : // constants scaled things up by 1<<12; let's bring them back ; 1960 : // down, but keep 2 extra bits of precision ; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; - 00590 8b 85 e4 02 00 + 00591 8b 85 e4 02 00 00 mov eax, DWORD PTR x0$14[rbp] - 00596 05 00 02 00 00 add eax, 512 ; 00000200H - 0059b 89 85 e4 02 00 + 00597 05 00 02 00 00 add eax, 512 ; 00000200H + 0059c 89 85 e4 02 00 00 mov DWORD PTR x0$14[rbp], eax - 005a1 8b 85 04 03 00 + 005a2 8b 85 04 03 00 00 mov eax, DWORD PTR x1$15[rbp] - 005a7 05 00 02 00 00 add eax, 512 ; 00000200H - 005ac 89 85 04 03 00 + 005a8 05 00 02 00 00 add eax, 512 ; 00000200H + 005ad 89 85 04 03 00 00 mov DWORD PTR x1$15[rbp], eax - 005b2 8b 85 24 03 00 + 005b3 8b 85 24 03 00 00 mov eax, DWORD PTR x2$16[rbp] - 005b8 05 00 02 00 00 add eax, 512 ; 00000200H - 005bd 89 85 24 03 00 + 005b9 05 00 02 00 00 add eax, 512 ; 00000200H + 005be 89 85 24 03 00 00 mov DWORD PTR x2$16[rbp], eax - 005c3 8b 85 44 03 00 + 005c4 8b 85 44 03 00 00 mov eax, DWORD PTR x3$17[rbp] - 005c9 05 00 02 00 00 add eax, 512 ; 00000200H - 005ce 89 85 44 03 00 + 005ca 05 00 02 00 00 add eax, 512 ; 00000200H + 005cf 89 85 44 03 00 00 mov DWORD PTR x3$17[rbp], eax ; 1962 : v[0] = (x0 + t3) >> 10; - 005d4 8b 85 24 02 00 + 005d5 8b 85 24 02 00 00 mov eax, DWORD PTR t3$8[rbp] - 005da 8b 8d e4 02 00 + 005db 8b 8d e4 02 00 00 mov ecx, DWORD PTR x0$14[rbp] - 005e0 03 c8 add ecx, eax - 005e2 8b c1 mov eax, ecx - 005e4 c1 f8 0a sar eax, 10 - 005e7 b9 04 00 00 00 mov ecx, 4 - 005ec 48 6b c9 00 imul rcx, rcx, 0 - 005f0 48 8b 95 48 01 + 005e1 03 c8 add ecx, eax + 005e3 8b c1 mov eax, ecx + 005e5 c1 f8 0a sar eax, 10 + 005e8 b9 04 00 00 00 mov ecx, 4 + 005ed 48 6b c9 00 imul rcx, rcx, 0 + 005f1 48 8b 95 48 01 00 00 mov rdx, QWORD PTR v$[rbp] - 005f7 89 04 0a mov DWORD PTR [rdx+rcx], eax + 005f8 89 04 0a mov DWORD PTR [rdx+rcx], eax ; 1963 : v[56] = (x0 - t3) >> 10; - 005fa 8b 85 24 02 00 + 005fb 8b 85 24 02 00 00 mov eax, DWORD PTR t3$8[rbp] - 00600 8b 8d e4 02 00 + 00601 8b 8d e4 02 00 00 mov ecx, DWORD PTR x0$14[rbp] - 00606 2b c8 sub ecx, eax - 00608 8b c1 mov eax, ecx - 0060a c1 f8 0a sar eax, 10 - 0060d b9 04 00 00 00 mov ecx, 4 - 00612 48 6b c9 38 imul rcx, rcx, 56 ; 00000038H - 00616 48 8b 95 48 01 + 00607 2b c8 sub ecx, eax + 00609 8b c1 mov eax, ecx + 0060b c1 f8 0a sar eax, 10 + 0060e b9 04 00 00 00 mov ecx, 4 + 00613 48 6b c9 38 imul rcx, rcx, 56 ; 00000038H + 00617 48 8b 95 48 01 00 00 mov rdx, QWORD PTR v$[rbp] - 0061d 89 04 0a mov DWORD PTR [rdx+rcx], eax + 0061e 89 04 0a mov DWORD PTR [rdx+rcx], eax ; 1964 : v[8] = (x1 + t2) >> 10; - 00620 8b 85 04 02 00 + 00621 8b 85 04 02 00 00 mov eax, DWORD PTR t2$7[rbp] - 00626 8b 8d 04 03 00 + 00627 8b 8d 04 03 00 00 mov ecx, DWORD PTR x1$15[rbp] - 0062c 03 c8 add ecx, eax - 0062e 8b c1 mov eax, ecx - 00630 c1 f8 0a sar eax, 10 - 00633 b9 04 00 00 00 mov ecx, 4 - 00638 48 6b c9 08 imul rcx, rcx, 8 - 0063c 48 8b 95 48 01 + 0062d 03 c8 add ecx, eax + 0062f 8b c1 mov eax, ecx + 00631 c1 f8 0a sar eax, 10 + 00634 b9 04 00 00 00 mov ecx, 4 + 00639 48 6b c9 08 imul rcx, rcx, 8 + 0063d 48 8b 95 48 01 00 00 mov rdx, QWORD PTR v$[rbp] - 00643 89 04 0a mov DWORD PTR [rdx+rcx], eax + 00644 89 04 0a mov DWORD PTR [rdx+rcx], eax ; 1965 : v[48] = (x1 - t2) >> 10; - 00646 8b 85 04 02 00 + 00647 8b 85 04 02 00 00 mov eax, DWORD PTR t2$7[rbp] - 0064c 8b 8d 04 03 00 + 0064d 8b 8d 04 03 00 00 mov ecx, DWORD PTR x1$15[rbp] - 00652 2b c8 sub ecx, eax - 00654 8b c1 mov eax, ecx - 00656 c1 f8 0a sar eax, 10 - 00659 b9 04 00 00 00 mov ecx, 4 - 0065e 48 6b c9 30 imul rcx, rcx, 48 ; 00000030H - 00662 48 8b 95 48 01 + 00653 2b c8 sub ecx, eax + 00655 8b c1 mov eax, ecx + 00657 c1 f8 0a sar eax, 10 + 0065a b9 04 00 00 00 mov ecx, 4 + 0065f 48 6b c9 30 imul rcx, rcx, 48 ; 00000030H + 00663 48 8b 95 48 01 00 00 mov rdx, QWORD PTR v$[rbp] - 00669 89 04 0a mov DWORD PTR [rdx+rcx], eax + 0066a 89 04 0a mov DWORD PTR [rdx+rcx], eax ; 1966 : v[16] = (x2 + t1) >> 10; - 0066c 8b 85 e4 01 00 + 0066d 8b 85 e4 01 00 00 mov eax, DWORD PTR t1$6[rbp] - 00672 8b 8d 24 03 00 + 00673 8b 8d 24 03 00 00 mov ecx, DWORD PTR x2$16[rbp] - 00678 03 c8 add ecx, eax - 0067a 8b c1 mov eax, ecx - 0067c c1 f8 0a sar eax, 10 - 0067f b9 04 00 00 00 mov ecx, 4 - 00684 48 6b c9 10 imul rcx, rcx, 16 - 00688 48 8b 95 48 01 + 00679 03 c8 add ecx, eax + 0067b 8b c1 mov eax, ecx + 0067d c1 f8 0a sar eax, 10 + 00680 b9 04 00 00 00 mov ecx, 4 + 00685 48 6b c9 10 imul rcx, rcx, 16 + 00689 48 8b 95 48 01 00 00 mov rdx, QWORD PTR v$[rbp] - 0068f 89 04 0a mov DWORD PTR [rdx+rcx], eax + 00690 89 04 0a mov DWORD PTR [rdx+rcx], eax ; 1967 : v[40] = (x2 - t1) >> 10; - 00692 8b 85 e4 01 00 + 00693 8b 85 e4 01 00 00 mov eax, DWORD PTR t1$6[rbp] - 00698 8b 8d 24 03 00 + 00699 8b 8d 24 03 00 00 mov ecx, DWORD PTR x2$16[rbp] - 0069e 2b c8 sub ecx, eax - 006a0 8b c1 mov eax, ecx - 006a2 c1 f8 0a sar eax, 10 - 006a5 b9 04 00 00 00 mov ecx, 4 - 006aa 48 6b c9 28 imul rcx, rcx, 40 ; 00000028H - 006ae 48 8b 95 48 01 + 0069f 2b c8 sub ecx, eax + 006a1 8b c1 mov eax, ecx + 006a3 c1 f8 0a sar eax, 10 + 006a6 b9 04 00 00 00 mov ecx, 4 + 006ab 48 6b c9 28 imul rcx, rcx, 40 ; 00000028H + 006af 48 8b 95 48 01 00 00 mov rdx, QWORD PTR v$[rbp] - 006b5 89 04 0a mov DWORD PTR [rdx+rcx], eax + 006b6 89 04 0a mov DWORD PTR [rdx+rcx], eax ; 1968 : v[24] = (x3 + t0) >> 10; - 006b8 8b 85 c4 01 00 + 006b9 8b 85 c4 01 00 00 mov eax, DWORD PTR t0$5[rbp] - 006be 8b 8d 44 03 00 + 006bf 8b 8d 44 03 00 00 mov ecx, DWORD PTR x3$17[rbp] - 006c4 03 c8 add ecx, eax - 006c6 8b c1 mov eax, ecx - 006c8 c1 f8 0a sar eax, 10 - 006cb b9 04 00 00 00 mov ecx, 4 - 006d0 48 6b c9 18 imul rcx, rcx, 24 - 006d4 48 8b 95 48 01 + 006c5 03 c8 add ecx, eax + 006c7 8b c1 mov eax, ecx + 006c9 c1 f8 0a sar eax, 10 + 006cc b9 04 00 00 00 mov ecx, 4 + 006d1 48 6b c9 18 imul rcx, rcx, 24 + 006d5 48 8b 95 48 01 00 00 mov rdx, QWORD PTR v$[rbp] - 006db 89 04 0a mov DWORD PTR [rdx+rcx], eax + 006dc 89 04 0a mov DWORD PTR [rdx+rcx], eax ; 1969 : v[32] = (x3 - t0) >> 10; - 006de 8b 85 c4 01 00 + 006df 8b 85 c4 01 00 00 mov eax, DWORD PTR t0$5[rbp] - 006e4 8b 8d 44 03 00 + 006e5 8b 8d 44 03 00 00 mov ecx, DWORD PTR x3$17[rbp] - 006ea 2b c8 sub ecx, eax - 006ec 8b c1 mov eax, ecx - 006ee c1 f8 0a sar eax, 10 - 006f1 b9 04 00 00 00 mov ecx, 4 - 006f6 48 6b c9 20 imul rcx, rcx, 32 ; 00000020H - 006fa 48 8b 95 48 01 + 006eb 2b c8 sub ecx, eax + 006ed 8b c1 mov eax, ecx + 006ef c1 f8 0a sar eax, 10 + 006f2 b9 04 00 00 00 mov ecx, 4 + 006f7 48 6b c9 20 imul rcx, rcx, 32 ; 00000020H + 006fb 48 8b 95 48 01 00 00 mov rdx, QWORD PTR v$[rbp] - 00701 89 04 0a mov DWORD PTR [rdx+rcx], eax + 00702 89 04 0a mov DWORD PTR [rdx+rcx], eax $LN9@stbi__idct: ; 1970 : } ; 1971 : } - 00704 e9 6b f9 ff ff jmp $LN2@stbi__idct + 00705 e9 6b f9 ff ff jmp $LN2@stbi__idct $LN3@stbi__idct: ; 1972 : ; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { - 00709 c7 45 04 00 00 + 0070a c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00710 48 8d 45 30 lea rax, QWORD PTR val$[rbp] - 00714 48 89 85 48 01 + 00711 48 8d 45 30 lea rax, QWORD PTR val$[rbp] + 00715 48 89 85 48 01 00 00 mov QWORD PTR v$[rbp], rax - 0071b 48 8b 85 60 07 + 0071c 48 8b 85 60 07 00 00 mov rax, QWORD PTR out$[rbp] - 00722 48 89 85 68 01 + 00723 48 89 85 68 01 00 00 mov QWORD PTR o$[rbp], rax - 00729 eb 35 jmp SHORT $LN7@stbi__idct + 0072a eb 35 jmp SHORT $LN7@stbi__idct $LN5@stbi__idct: - 0072b 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0072e ff c0 inc eax - 00730 89 45 04 mov DWORD PTR i$[rbp], eax - 00733 48 8b 85 48 01 + 0072c 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0072f ff c0 inc eax + 00731 89 45 04 mov DWORD PTR i$[rbp], eax + 00734 48 8b 85 48 01 00 00 mov rax, QWORD PTR v$[rbp] - 0073a 48 83 c0 20 add rax, 32 ; 00000020H - 0073e 48 89 85 48 01 + 0073b 48 83 c0 20 add rax, 32 ; 00000020H + 0073f 48 89 85 48 01 00 00 mov QWORD PTR v$[rbp], rax - 00745 48 63 85 68 07 + 00746 48 63 85 68 07 00 00 movsxd rax, DWORD PTR out_stride$[rbp] - 0074c 48 8b 8d 68 01 + 0074d 48 8b 8d 68 01 00 00 mov rcx, QWORD PTR o$[rbp] - 00753 48 03 c8 add rcx, rax - 00756 48 8b c1 mov rax, rcx - 00759 48 89 85 68 01 + 00754 48 03 c8 add rcx, rax + 00757 48 8b c1 mov rax, rcx + 0075a 48 89 85 68 01 00 00 mov QWORD PTR o$[rbp], rax $LN7@stbi__idct: - 00760 83 7d 04 08 cmp DWORD PTR i$[rbp], 8 - 00764 0f 8d e1 04 00 + 00761 83 7d 04 08 cmp DWORD PTR i$[rbp], 8 + 00765 0f 8d e1 04 00 00 jge $LN6@stbi__idct ; 1974 : // no fast case since the first 1D IDCT spread components out ; 1975 : STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]) - 0076a b8 04 00 00 00 mov eax, 4 - 0076f 48 6b c0 02 imul rax, rax, 2 - 00773 48 8b 8d 48 01 + 0076b b8 04 00 00 00 mov eax, 4 + 00770 48 6b c0 02 imul rax, rax, 2 + 00774 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 0077a 8b 04 01 mov eax, DWORD PTR [rcx+rax] - 0077d 89 85 04 04 00 + 0077b 8b 04 01 mov eax, DWORD PTR [rcx+rax] + 0077e 89 85 04 04 00 00 mov DWORD PTR p2$23[rbp], eax - 00783 b8 04 00 00 00 mov eax, 4 - 00788 48 6b c0 06 imul rax, rax, 6 - 0078c 48 8b 8d 48 01 + 00784 b8 04 00 00 00 mov eax, 4 + 00789 48 6b c0 06 imul rax, rax, 6 + 0078d 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 00793 8b 04 01 mov eax, DWORD PTR [rcx+rax] - 00796 89 85 24 04 00 + 00794 8b 04 01 mov eax, DWORD PTR [rcx+rax] + 00797 89 85 24 04 00 00 mov DWORD PTR p3$24[rbp], eax - 0079c 8b 85 24 04 00 + 0079d 8b 85 24 04 00 00 mov eax, DWORD PTR p3$24[rbp] - 007a2 8b 8d 04 04 00 + 007a3 8b 8d 04 04 00 00 mov ecx, DWORD PTR p2$23[rbp] - 007a8 03 c8 add ecx, eax - 007aa 8b c1 mov eax, ecx - 007ac 69 c0 a9 08 00 + 007a9 03 c8 add ecx, eax + 007ab 8b c1 mov eax, ecx + 007ad 69 c0 a9 08 00 00 imul eax, eax, 2217 ; 000008a9H - 007b2 89 85 e4 03 00 + 007b3 89 85 e4 03 00 00 mov DWORD PTR p1$22[rbp], eax - 007b8 69 85 24 04 00 + 007b9 69 85 24 04 00 00 71 e2 ff ff imul eax, DWORD PTR p3$24[rbp], -7567 ; ffffffffffffe271H - 007c2 8b 8d e4 03 00 + 007c3 8b 8d e4 03 00 00 mov ecx, DWORD PTR p1$22[rbp] - 007c8 03 c8 add ecx, eax - 007ca 8b c1 mov eax, ecx - 007cc 89 85 a4 03 00 + 007c9 03 c8 add ecx, eax + 007cb 8b c1 mov eax, ecx + 007cd 89 85 a4 03 00 00 mov DWORD PTR t2$20[rbp], eax - 007d2 69 85 04 04 00 + 007d3 69 85 04 04 00 00 3f 0c 00 00 imul eax, DWORD PTR p2$23[rbp], 3135 ; 00000c3fH - 007dc 8b 8d e4 03 00 + 007dd 8b 8d e4 03 00 00 mov ecx, DWORD PTR p1$22[rbp] - 007e2 03 c8 add ecx, eax - 007e4 8b c1 mov eax, ecx - 007e6 89 85 c4 03 00 + 007e3 03 c8 add ecx, eax + 007e5 8b c1 mov eax, ecx + 007e7 89 85 c4 03 00 00 mov DWORD PTR t3$21[rbp], eax - 007ec b8 04 00 00 00 mov eax, 4 - 007f1 48 6b c0 00 imul rax, rax, 0 - 007f5 48 8b 8d 48 01 + 007ed b8 04 00 00 00 mov eax, 4 + 007f2 48 6b c0 00 imul rax, rax, 0 + 007f6 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 007fc 8b 04 01 mov eax, DWORD PTR [rcx+rax] - 007ff 89 85 04 04 00 + 007fd 8b 04 01 mov eax, DWORD PTR [rcx+rax] + 00800 89 85 04 04 00 00 mov DWORD PTR p2$23[rbp], eax - 00805 b8 04 00 00 00 mov eax, 4 - 0080a 48 6b c0 04 imul rax, rax, 4 - 0080e 48 8b 8d 48 01 + 00806 b8 04 00 00 00 mov eax, 4 + 0080b 48 6b c0 04 imul rax, rax, 4 + 0080f 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 00815 8b 04 01 mov eax, DWORD PTR [rcx+rax] - 00818 89 85 24 04 00 + 00816 8b 04 01 mov eax, DWORD PTR [rcx+rax] + 00819 89 85 24 04 00 00 mov DWORD PTR p3$24[rbp], eax - 0081e 8b 85 24 04 00 + 0081f 8b 85 24 04 00 00 mov eax, DWORD PTR p3$24[rbp] - 00824 8b 8d 04 04 00 + 00825 8b 8d 04 04 00 00 mov ecx, DWORD PTR p2$23[rbp] - 0082a 03 c8 add ecx, eax - 0082c 8b c1 mov eax, ecx - 0082e 69 c0 00 10 00 + 0082b 03 c8 add ecx, eax + 0082d 8b c1 mov eax, ecx + 0082f 69 c0 00 10 00 00 imul eax, eax, 4096 ; 00001000H - 00834 89 85 64 03 00 + 00835 89 85 64 03 00 00 mov DWORD PTR t0$18[rbp], eax - 0083a 8b 85 24 04 00 + 0083b 8b 85 24 04 00 00 mov eax, DWORD PTR p3$24[rbp] - 00840 8b 8d 04 04 00 + 00841 8b 8d 04 04 00 00 mov ecx, DWORD PTR p2$23[rbp] - 00846 2b c8 sub ecx, eax - 00848 8b c1 mov eax, ecx - 0084a 69 c0 00 10 00 + 00847 2b c8 sub ecx, eax + 00849 8b c1 mov eax, ecx + 0084b 69 c0 00 10 00 00 imul eax, eax, 4096 ; 00001000H - 00850 89 85 84 03 00 + 00851 89 85 84 03 00 00 mov DWORD PTR t1$19[rbp], eax - 00856 8b 85 c4 03 00 + 00857 8b 85 c4 03 00 00 mov eax, DWORD PTR t3$21[rbp] - 0085c 8b 8d 64 03 00 + 0085d 8b 8d 64 03 00 00 mov ecx, DWORD PTR t0$18[rbp] - 00862 03 c8 add ecx, eax - 00864 8b c1 mov eax, ecx - 00866 89 85 84 04 00 + 00863 03 c8 add ecx, eax + 00865 8b c1 mov eax, ecx + 00867 89 85 84 04 00 00 mov DWORD PTR x0$27[rbp], eax - 0086c 8b 85 c4 03 00 + 0086d 8b 85 c4 03 00 00 mov eax, DWORD PTR t3$21[rbp] - 00872 8b 8d 64 03 00 + 00873 8b 8d 64 03 00 00 mov ecx, DWORD PTR t0$18[rbp] - 00878 2b c8 sub ecx, eax - 0087a 8b c1 mov eax, ecx - 0087c 89 85 e4 04 00 + 00879 2b c8 sub ecx, eax + 0087b 8b c1 mov eax, ecx + 0087d 89 85 e4 04 00 00 mov DWORD PTR x3$30[rbp], eax - 00882 8b 85 a4 03 00 + 00883 8b 85 a4 03 00 00 mov eax, DWORD PTR t2$20[rbp] - 00888 8b 8d 84 03 00 + 00889 8b 8d 84 03 00 00 mov ecx, DWORD PTR t1$19[rbp] - 0088e 03 c8 add ecx, eax - 00890 8b c1 mov eax, ecx - 00892 89 85 a4 04 00 + 0088f 03 c8 add ecx, eax + 00891 8b c1 mov eax, ecx + 00893 89 85 a4 04 00 00 mov DWORD PTR x1$28[rbp], eax - 00898 8b 85 a4 03 00 + 00899 8b 85 a4 03 00 00 mov eax, DWORD PTR t2$20[rbp] - 0089e 8b 8d 84 03 00 + 0089f 8b 8d 84 03 00 00 mov ecx, DWORD PTR t1$19[rbp] - 008a4 2b c8 sub ecx, eax - 008a6 8b c1 mov eax, ecx - 008a8 89 85 c4 04 00 + 008a5 2b c8 sub ecx, eax + 008a7 8b c1 mov eax, ecx + 008a9 89 85 c4 04 00 00 mov DWORD PTR x2$29[rbp], eax - 008ae b8 04 00 00 00 mov eax, 4 - 008b3 48 6b c0 07 imul rax, rax, 7 - 008b7 48 8b 8d 48 01 + 008af b8 04 00 00 00 mov eax, 4 + 008b4 48 6b c0 07 imul rax, rax, 7 + 008b8 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 008be 8b 04 01 mov eax, DWORD PTR [rcx+rax] - 008c1 89 85 64 03 00 + 008bf 8b 04 01 mov eax, DWORD PTR [rcx+rax] + 008c2 89 85 64 03 00 00 mov DWORD PTR t0$18[rbp], eax - 008c7 b8 04 00 00 00 mov eax, 4 - 008cc 48 6b c0 05 imul rax, rax, 5 - 008d0 48 8b 8d 48 01 + 008c8 b8 04 00 00 00 mov eax, 4 + 008cd 48 6b c0 05 imul rax, rax, 5 + 008d1 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 008d7 8b 04 01 mov eax, DWORD PTR [rcx+rax] - 008da 89 85 84 03 00 + 008d8 8b 04 01 mov eax, DWORD PTR [rcx+rax] + 008db 89 85 84 03 00 00 mov DWORD PTR t1$19[rbp], eax - 008e0 b8 04 00 00 00 mov eax, 4 - 008e5 48 6b c0 03 imul rax, rax, 3 - 008e9 48 8b 8d 48 01 + 008e1 b8 04 00 00 00 mov eax, 4 + 008e6 48 6b c0 03 imul rax, rax, 3 + 008ea 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 008f0 8b 04 01 mov eax, DWORD PTR [rcx+rax] - 008f3 89 85 a4 03 00 + 008f1 8b 04 01 mov eax, DWORD PTR [rcx+rax] + 008f4 89 85 a4 03 00 00 mov DWORD PTR t2$20[rbp], eax - 008f9 b8 04 00 00 00 mov eax, 4 - 008fe 48 6b c0 01 imul rax, rax, 1 - 00902 48 8b 8d 48 01 + 008fa b8 04 00 00 00 mov eax, 4 + 008ff 48 6b c0 01 imul rax, rax, 1 + 00903 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR v$[rbp] - 00909 8b 04 01 mov eax, DWORD PTR [rcx+rax] - 0090c 89 85 c4 03 00 + 0090a 8b 04 01 mov eax, DWORD PTR [rcx+rax] + 0090d 89 85 c4 03 00 00 mov DWORD PTR t3$21[rbp], eax - 00912 8b 85 a4 03 00 + 00913 8b 85 a4 03 00 00 mov eax, DWORD PTR t2$20[rbp] - 00918 8b 8d 64 03 00 + 00919 8b 8d 64 03 00 00 mov ecx, DWORD PTR t0$18[rbp] - 0091e 03 c8 add ecx, eax - 00920 8b c1 mov eax, ecx - 00922 89 85 24 04 00 + 0091f 03 c8 add ecx, eax + 00921 8b c1 mov eax, ecx + 00923 89 85 24 04 00 00 mov DWORD PTR p3$24[rbp], eax - 00928 8b 85 c4 03 00 + 00929 8b 85 c4 03 00 00 mov eax, DWORD PTR t3$21[rbp] - 0092e 8b 8d 84 03 00 + 0092f 8b 8d 84 03 00 00 mov ecx, DWORD PTR t1$19[rbp] - 00934 03 c8 add ecx, eax - 00936 8b c1 mov eax, ecx - 00938 89 85 44 04 00 + 00935 03 c8 add ecx, eax + 00937 8b c1 mov eax, ecx + 00939 89 85 44 04 00 00 mov DWORD PTR p4$25[rbp], eax - 0093e 8b 85 c4 03 00 + 0093f 8b 85 c4 03 00 00 mov eax, DWORD PTR t3$21[rbp] - 00944 8b 8d 64 03 00 + 00945 8b 8d 64 03 00 00 mov ecx, DWORD PTR t0$18[rbp] - 0094a 03 c8 add ecx, eax - 0094c 8b c1 mov eax, ecx - 0094e 89 85 e4 03 00 + 0094b 03 c8 add ecx, eax + 0094d 8b c1 mov eax, ecx + 0094f 89 85 e4 03 00 00 mov DWORD PTR p1$22[rbp], eax - 00954 8b 85 a4 03 00 + 00955 8b 85 a4 03 00 00 mov eax, DWORD PTR t2$20[rbp] - 0095a 8b 8d 84 03 00 + 0095b 8b 8d 84 03 00 00 mov ecx, DWORD PTR t1$19[rbp] - 00960 03 c8 add ecx, eax - 00962 8b c1 mov eax, ecx - 00964 89 85 04 04 00 + 00961 03 c8 add ecx, eax + 00963 8b c1 mov eax, ecx + 00965 89 85 04 04 00 00 mov DWORD PTR p2$23[rbp], eax - 0096a 8b 85 44 04 00 + 0096b 8b 85 44 04 00 00 mov eax, DWORD PTR p4$25[rbp] - 00970 8b 8d 24 04 00 + 00971 8b 8d 24 04 00 00 mov ecx, DWORD PTR p3$24[rbp] - 00976 03 c8 add ecx, eax - 00978 8b c1 mov eax, ecx - 0097a 69 c0 d0 12 00 + 00977 03 c8 add ecx, eax + 00979 8b c1 mov eax, ecx + 0097b 69 c0 d0 12 00 00 imul eax, eax, 4816 ; 000012d0H - 00980 89 85 64 04 00 + 00981 89 85 64 04 00 00 mov DWORD PTR p5$26[rbp], eax - 00986 69 85 64 03 00 + 00987 69 85 64 03 00 00 c7 04 00 00 imul eax, DWORD PTR t0$18[rbp], 1223 ; 000004c7H - 00990 89 85 64 03 00 + 00991 89 85 64 03 00 00 mov DWORD PTR t0$18[rbp], eax - 00996 69 85 84 03 00 + 00997 69 85 84 03 00 00 da 20 00 00 imul eax, DWORD PTR t1$19[rbp], 8410 ; 000020daH - 009a0 89 85 84 03 00 + 009a1 89 85 84 03 00 00 mov DWORD PTR t1$19[rbp], eax - 009a6 69 85 a4 03 00 + 009a7 69 85 a4 03 00 00 2a 31 00 00 imul eax, DWORD PTR t2$20[rbp], 12586 ; 0000312aH - 009b0 89 85 a4 03 00 + 009b1 89 85 a4 03 00 00 mov DWORD PTR t2$20[rbp], eax - 009b6 69 85 c4 03 00 + 009b7 69 85 c4 03 00 00 05 18 00 00 imul eax, DWORD PTR t3$21[rbp], 6149 ; 00001805H - 009c0 89 85 c4 03 00 + 009c1 89 85 c4 03 00 00 mov DWORD PTR t3$21[rbp], eax - 009c6 69 85 e4 03 00 + 009c7 69 85 e4 03 00 00 9b f1 ff ff imul eax, DWORD PTR p1$22[rbp], -3685 ; fffffffffffff19bH - 009d0 8b 8d 64 04 00 + 009d1 8b 8d 64 04 00 00 mov ecx, DWORD PTR p5$26[rbp] - 009d6 03 c8 add ecx, eax - 009d8 8b c1 mov eax, ecx - 009da 89 85 e4 03 00 + 009d7 03 c8 add ecx, eax + 009d9 8b c1 mov eax, ecx + 009db 89 85 e4 03 00 00 mov DWORD PTR p1$22[rbp], eax - 009e0 69 85 04 04 00 + 009e1 69 85 04 04 00 00 ff d6 ff ff imul eax, DWORD PTR p2$23[rbp], -10497 ; ffffffffffffd6ffH - 009ea 8b 8d 64 04 00 + 009eb 8b 8d 64 04 00 00 mov ecx, DWORD PTR p5$26[rbp] - 009f0 03 c8 add ecx, eax - 009f2 8b c1 mov eax, ecx - 009f4 89 85 04 04 00 + 009f1 03 c8 add ecx, eax + 009f3 8b c1 mov eax, ecx + 009f5 89 85 04 04 00 00 mov DWORD PTR p2$23[rbp], eax - 009fa 69 85 24 04 00 + 009fb 69 85 24 04 00 00 9e e0 ff ff imul eax, DWORD PTR p3$24[rbp], -8034 ; ffffffffffffe09eH - 00a04 89 85 24 04 00 + 00a05 89 85 24 04 00 00 mov DWORD PTR p3$24[rbp], eax - 00a0a 69 85 44 04 00 + 00a0b 69 85 44 04 00 00 c3 f9 ff ff imul eax, DWORD PTR p4$25[rbp], -1597 ; fffffffffffff9c3H - 00a14 89 85 44 04 00 + 00a15 89 85 44 04 00 00 mov DWORD PTR p4$25[rbp], eax - 00a1a 8b 85 44 04 00 + 00a1b 8b 85 44 04 00 00 mov eax, DWORD PTR p4$25[rbp] - 00a20 8b 8d e4 03 00 + 00a21 8b 8d e4 03 00 00 mov ecx, DWORD PTR p1$22[rbp] - 00a26 03 c8 add ecx, eax - 00a28 8b c1 mov eax, ecx - 00a2a 8b 8d c4 03 00 + 00a27 03 c8 add ecx, eax + 00a29 8b c1 mov eax, ecx + 00a2b 8b 8d c4 03 00 00 mov ecx, DWORD PTR t3$21[rbp] - 00a30 03 c8 add ecx, eax - 00a32 8b c1 mov eax, ecx - 00a34 89 85 c4 03 00 + 00a31 03 c8 add ecx, eax + 00a33 8b c1 mov eax, ecx + 00a35 89 85 c4 03 00 00 mov DWORD PTR t3$21[rbp], eax - 00a3a 8b 85 24 04 00 + 00a3b 8b 85 24 04 00 00 mov eax, DWORD PTR p3$24[rbp] - 00a40 8b 8d 04 04 00 + 00a41 8b 8d 04 04 00 00 mov ecx, DWORD PTR p2$23[rbp] - 00a46 03 c8 add ecx, eax - 00a48 8b c1 mov eax, ecx - 00a4a 8b 8d a4 03 00 + 00a47 03 c8 add ecx, eax + 00a49 8b c1 mov eax, ecx + 00a4b 8b 8d a4 03 00 00 mov ecx, DWORD PTR t2$20[rbp] - 00a50 03 c8 add ecx, eax - 00a52 8b c1 mov eax, ecx - 00a54 89 85 a4 03 00 + 00a51 03 c8 add ecx, eax + 00a53 8b c1 mov eax, ecx + 00a55 89 85 a4 03 00 00 mov DWORD PTR t2$20[rbp], eax - 00a5a 8b 85 44 04 00 + 00a5b 8b 85 44 04 00 00 mov eax, DWORD PTR p4$25[rbp] - 00a60 8b 8d 04 04 00 + 00a61 8b 8d 04 04 00 00 mov ecx, DWORD PTR p2$23[rbp] - 00a66 03 c8 add ecx, eax - 00a68 8b c1 mov eax, ecx - 00a6a 8b 8d 84 03 00 + 00a67 03 c8 add ecx, eax + 00a69 8b c1 mov eax, ecx + 00a6b 8b 8d 84 03 00 00 mov ecx, DWORD PTR t1$19[rbp] - 00a70 03 c8 add ecx, eax - 00a72 8b c1 mov eax, ecx - 00a74 89 85 84 03 00 + 00a71 03 c8 add ecx, eax + 00a73 8b c1 mov eax, ecx + 00a75 89 85 84 03 00 00 mov DWORD PTR t1$19[rbp], eax - 00a7a 8b 85 24 04 00 + 00a7b 8b 85 24 04 00 00 mov eax, DWORD PTR p3$24[rbp] - 00a80 8b 8d e4 03 00 + 00a81 8b 8d e4 03 00 00 mov ecx, DWORD PTR p1$22[rbp] - 00a86 03 c8 add ecx, eax - 00a88 8b c1 mov eax, ecx - 00a8a 8b 8d 64 03 00 + 00a87 03 c8 add ecx, eax + 00a89 8b c1 mov eax, ecx + 00a8b 8b 8d 64 03 00 00 mov ecx, DWORD PTR t0$18[rbp] - 00a90 03 c8 add ecx, eax - 00a92 8b c1 mov eax, ecx - 00a94 89 85 64 03 00 + 00a91 03 c8 add ecx, eax + 00a93 8b c1 mov eax, ecx + 00a95 89 85 64 03 00 00 mov DWORD PTR t0$18[rbp], eax ; 1976 : // constants scaled things up by 1<<12, plus we had 1<<2 from first @@ -35029,194 +35225,194 @@ $LN7@stbi__idct: ; 1981 : // to encode as 0..255 by adding 128, so we'll add that before the shift ; 1982 : x0 += 65536 + (128 << 17); - 00a9a 8b 85 84 04 00 + 00a9b 8b 85 84 04 00 00 mov eax, DWORD PTR x0$27[rbp] - 00aa0 05 00 00 01 01 add eax, 16842752 ; 01010000H - 00aa5 89 85 84 04 00 + 00aa1 05 00 00 01 01 add eax, 16842752 ; 01010000H + 00aa6 89 85 84 04 00 00 mov DWORD PTR x0$27[rbp], eax ; 1983 : x1 += 65536 + (128 << 17); - 00aab 8b 85 a4 04 00 + 00aac 8b 85 a4 04 00 00 mov eax, DWORD PTR x1$28[rbp] - 00ab1 05 00 00 01 01 add eax, 16842752 ; 01010000H - 00ab6 89 85 a4 04 00 + 00ab2 05 00 00 01 01 add eax, 16842752 ; 01010000H + 00ab7 89 85 a4 04 00 00 mov DWORD PTR x1$28[rbp], eax ; 1984 : x2 += 65536 + (128 << 17); - 00abc 8b 85 c4 04 00 + 00abd 8b 85 c4 04 00 00 mov eax, DWORD PTR x2$29[rbp] - 00ac2 05 00 00 01 01 add eax, 16842752 ; 01010000H - 00ac7 89 85 c4 04 00 + 00ac3 05 00 00 01 01 add eax, 16842752 ; 01010000H + 00ac8 89 85 c4 04 00 00 mov DWORD PTR x2$29[rbp], eax ; 1985 : x3 += 65536 + (128 << 17); - 00acd 8b 85 e4 04 00 + 00ace 8b 85 e4 04 00 00 mov eax, DWORD PTR x3$30[rbp] - 00ad3 05 00 00 01 01 add eax, 16842752 ; 01010000H - 00ad8 89 85 e4 04 00 + 00ad4 05 00 00 01 01 add eax, 16842752 ; 01010000H + 00ad9 89 85 e4 04 00 00 mov DWORD PTR x3$30[rbp], eax ; 1986 : // tried computing the shifts into temps, or'ing the temps to see ; 1987 : // if any were out of range, but that was slower ; 1988 : o[0] = stbi__clamp((x0 + t3) >> 17); - 00ade 8b 85 c4 03 00 + 00adf 8b 85 c4 03 00 00 mov eax, DWORD PTR t3$21[rbp] - 00ae4 8b 8d 84 04 00 + 00ae5 8b 8d 84 04 00 00 mov ecx, DWORD PTR x0$27[rbp] - 00aea 03 c8 add ecx, eax - 00aec 8b c1 mov eax, ecx - 00aee c1 f8 11 sar eax, 17 - 00af1 8b c8 mov ecx, eax - 00af3 e8 00 00 00 00 call stbi__clamp - 00af8 b9 01 00 00 00 mov ecx, 1 - 00afd 48 6b c9 00 imul rcx, rcx, 0 - 00b01 48 8b 95 68 01 + 00aeb 03 c8 add ecx, eax + 00aed 8b c1 mov eax, ecx + 00aef c1 f8 11 sar eax, 17 + 00af2 8b c8 mov ecx, eax + 00af4 e8 00 00 00 00 call stbi__clamp + 00af9 b9 01 00 00 00 mov ecx, 1 + 00afe 48 6b c9 00 imul rcx, rcx, 0 + 00b02 48 8b 95 68 01 00 00 mov rdx, QWORD PTR o$[rbp] - 00b08 88 04 0a mov BYTE PTR [rdx+rcx], al + 00b09 88 04 0a mov BYTE PTR [rdx+rcx], al ; 1989 : o[7] = stbi__clamp((x0 - t3) >> 17); - 00b0b 8b 85 c4 03 00 + 00b0c 8b 85 c4 03 00 00 mov eax, DWORD PTR t3$21[rbp] - 00b11 8b 8d 84 04 00 + 00b12 8b 8d 84 04 00 00 mov ecx, DWORD PTR x0$27[rbp] - 00b17 2b c8 sub ecx, eax - 00b19 8b c1 mov eax, ecx - 00b1b c1 f8 11 sar eax, 17 - 00b1e 8b c8 mov ecx, eax - 00b20 e8 00 00 00 00 call stbi__clamp - 00b25 b9 01 00 00 00 mov ecx, 1 - 00b2a 48 6b c9 07 imul rcx, rcx, 7 - 00b2e 48 8b 95 68 01 + 00b18 2b c8 sub ecx, eax + 00b1a 8b c1 mov eax, ecx + 00b1c c1 f8 11 sar eax, 17 + 00b1f 8b c8 mov ecx, eax + 00b21 e8 00 00 00 00 call stbi__clamp + 00b26 b9 01 00 00 00 mov ecx, 1 + 00b2b 48 6b c9 07 imul rcx, rcx, 7 + 00b2f 48 8b 95 68 01 00 00 mov rdx, QWORD PTR o$[rbp] - 00b35 88 04 0a mov BYTE PTR [rdx+rcx], al + 00b36 88 04 0a mov BYTE PTR [rdx+rcx], al ; 1990 : o[1] = stbi__clamp((x1 + t2) >> 17); - 00b38 8b 85 a4 03 00 + 00b39 8b 85 a4 03 00 00 mov eax, DWORD PTR t2$20[rbp] - 00b3e 8b 8d a4 04 00 + 00b3f 8b 8d a4 04 00 00 mov ecx, DWORD PTR x1$28[rbp] - 00b44 03 c8 add ecx, eax - 00b46 8b c1 mov eax, ecx - 00b48 c1 f8 11 sar eax, 17 - 00b4b 8b c8 mov ecx, eax - 00b4d e8 00 00 00 00 call stbi__clamp - 00b52 b9 01 00 00 00 mov ecx, 1 - 00b57 48 6b c9 01 imul rcx, rcx, 1 - 00b5b 48 8b 95 68 01 + 00b45 03 c8 add ecx, eax + 00b47 8b c1 mov eax, ecx + 00b49 c1 f8 11 sar eax, 17 + 00b4c 8b c8 mov ecx, eax + 00b4e e8 00 00 00 00 call stbi__clamp + 00b53 b9 01 00 00 00 mov ecx, 1 + 00b58 48 6b c9 01 imul rcx, rcx, 1 + 00b5c 48 8b 95 68 01 00 00 mov rdx, QWORD PTR o$[rbp] - 00b62 88 04 0a mov BYTE PTR [rdx+rcx], al + 00b63 88 04 0a mov BYTE PTR [rdx+rcx], al ; 1991 : o[6] = stbi__clamp((x1 - t2) >> 17); - 00b65 8b 85 a4 03 00 + 00b66 8b 85 a4 03 00 00 mov eax, DWORD PTR t2$20[rbp] - 00b6b 8b 8d a4 04 00 + 00b6c 8b 8d a4 04 00 00 mov ecx, DWORD PTR x1$28[rbp] - 00b71 2b c8 sub ecx, eax - 00b73 8b c1 mov eax, ecx - 00b75 c1 f8 11 sar eax, 17 - 00b78 8b c8 mov ecx, eax - 00b7a e8 00 00 00 00 call stbi__clamp - 00b7f b9 01 00 00 00 mov ecx, 1 - 00b84 48 6b c9 06 imul rcx, rcx, 6 - 00b88 48 8b 95 68 01 + 00b72 2b c8 sub ecx, eax + 00b74 8b c1 mov eax, ecx + 00b76 c1 f8 11 sar eax, 17 + 00b79 8b c8 mov ecx, eax + 00b7b e8 00 00 00 00 call stbi__clamp + 00b80 b9 01 00 00 00 mov ecx, 1 + 00b85 48 6b c9 06 imul rcx, rcx, 6 + 00b89 48 8b 95 68 01 00 00 mov rdx, QWORD PTR o$[rbp] - 00b8f 88 04 0a mov BYTE PTR [rdx+rcx], al + 00b90 88 04 0a mov BYTE PTR [rdx+rcx], al ; 1992 : o[2] = stbi__clamp((x2 + t1) >> 17); - 00b92 8b 85 84 03 00 + 00b93 8b 85 84 03 00 00 mov eax, DWORD PTR t1$19[rbp] - 00b98 8b 8d c4 04 00 + 00b99 8b 8d c4 04 00 00 mov ecx, DWORD PTR x2$29[rbp] - 00b9e 03 c8 add ecx, eax - 00ba0 8b c1 mov eax, ecx - 00ba2 c1 f8 11 sar eax, 17 - 00ba5 8b c8 mov ecx, eax - 00ba7 e8 00 00 00 00 call stbi__clamp - 00bac b9 01 00 00 00 mov ecx, 1 - 00bb1 48 6b c9 02 imul rcx, rcx, 2 - 00bb5 48 8b 95 68 01 + 00b9f 03 c8 add ecx, eax + 00ba1 8b c1 mov eax, ecx + 00ba3 c1 f8 11 sar eax, 17 + 00ba6 8b c8 mov ecx, eax + 00ba8 e8 00 00 00 00 call stbi__clamp + 00bad b9 01 00 00 00 mov ecx, 1 + 00bb2 48 6b c9 02 imul rcx, rcx, 2 + 00bb6 48 8b 95 68 01 00 00 mov rdx, QWORD PTR o$[rbp] - 00bbc 88 04 0a mov BYTE PTR [rdx+rcx], al + 00bbd 88 04 0a mov BYTE PTR [rdx+rcx], al ; 1993 : o[5] = stbi__clamp((x2 - t1) >> 17); - 00bbf 8b 85 84 03 00 + 00bc0 8b 85 84 03 00 00 mov eax, DWORD PTR t1$19[rbp] - 00bc5 8b 8d c4 04 00 + 00bc6 8b 8d c4 04 00 00 mov ecx, DWORD PTR x2$29[rbp] - 00bcb 2b c8 sub ecx, eax - 00bcd 8b c1 mov eax, ecx - 00bcf c1 f8 11 sar eax, 17 - 00bd2 8b c8 mov ecx, eax - 00bd4 e8 00 00 00 00 call stbi__clamp - 00bd9 b9 01 00 00 00 mov ecx, 1 - 00bde 48 6b c9 05 imul rcx, rcx, 5 - 00be2 48 8b 95 68 01 + 00bcc 2b c8 sub ecx, eax + 00bce 8b c1 mov eax, ecx + 00bd0 c1 f8 11 sar eax, 17 + 00bd3 8b c8 mov ecx, eax + 00bd5 e8 00 00 00 00 call stbi__clamp + 00bda b9 01 00 00 00 mov ecx, 1 + 00bdf 48 6b c9 05 imul rcx, rcx, 5 + 00be3 48 8b 95 68 01 00 00 mov rdx, QWORD PTR o$[rbp] - 00be9 88 04 0a mov BYTE PTR [rdx+rcx], al + 00bea 88 04 0a mov BYTE PTR [rdx+rcx], al ; 1994 : o[3] = stbi__clamp((x3 + t0) >> 17); - 00bec 8b 85 64 03 00 + 00bed 8b 85 64 03 00 00 mov eax, DWORD PTR t0$18[rbp] - 00bf2 8b 8d e4 04 00 + 00bf3 8b 8d e4 04 00 00 mov ecx, DWORD PTR x3$30[rbp] - 00bf8 03 c8 add ecx, eax - 00bfa 8b c1 mov eax, ecx - 00bfc c1 f8 11 sar eax, 17 - 00bff 8b c8 mov ecx, eax - 00c01 e8 00 00 00 00 call stbi__clamp - 00c06 b9 01 00 00 00 mov ecx, 1 - 00c0b 48 6b c9 03 imul rcx, rcx, 3 - 00c0f 48 8b 95 68 01 + 00bf9 03 c8 add ecx, eax + 00bfb 8b c1 mov eax, ecx + 00bfd c1 f8 11 sar eax, 17 + 00c00 8b c8 mov ecx, eax + 00c02 e8 00 00 00 00 call stbi__clamp + 00c07 b9 01 00 00 00 mov ecx, 1 + 00c0c 48 6b c9 03 imul rcx, rcx, 3 + 00c10 48 8b 95 68 01 00 00 mov rdx, QWORD PTR o$[rbp] - 00c16 88 04 0a mov BYTE PTR [rdx+rcx], al + 00c17 88 04 0a mov BYTE PTR [rdx+rcx], al ; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); - 00c19 8b 85 64 03 00 + 00c1a 8b 85 64 03 00 00 mov eax, DWORD PTR t0$18[rbp] - 00c1f 8b 8d e4 04 00 + 00c20 8b 8d e4 04 00 00 mov ecx, DWORD PTR x3$30[rbp] - 00c25 2b c8 sub ecx, eax - 00c27 8b c1 mov eax, ecx - 00c29 c1 f8 11 sar eax, 17 - 00c2c 8b c8 mov ecx, eax - 00c2e e8 00 00 00 00 call stbi__clamp - 00c33 b9 01 00 00 00 mov ecx, 1 - 00c38 48 6b c9 04 imul rcx, rcx, 4 - 00c3c 48 8b 95 68 01 + 00c26 2b c8 sub ecx, eax + 00c28 8b c1 mov eax, ecx + 00c2a c1 f8 11 sar eax, 17 + 00c2d 8b c8 mov ecx, eax + 00c2f e8 00 00 00 00 call stbi__clamp + 00c34 b9 01 00 00 00 mov ecx, 1 + 00c39 48 6b c9 04 imul rcx, rcx, 4 + 00c3d 48 8b 95 68 01 00 00 mov rdx, QWORD PTR o$[rbp] - 00c43 88 04 0a mov BYTE PTR [rdx+rcx], al + 00c44 88 04 0a mov BYTE PTR [rdx+rcx], al ; 1996 : } - 00c46 e9 e0 fa ff ff jmp $LN5@stbi__idct + 00c47 e9 e0 fa ff ff jmp $LN5@stbi__idct $LN6@stbi__idct: ; 1997 : } - 00c4b 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00c4f 48 8d 15 00 00 + 00c4c 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00c50 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__idct_block$rtcFrameData - 00c56 e8 00 00 00 00 call _RTC_CheckStackVars - 00c5b 48 8b 8d 38 07 + 00c57 e8 00 00 00 00 call _RTC_CheckStackVars + 00c5c 48 8b 8d 38 07 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00c62 48 33 cd xor rcx, rbp - 00c65 e8 00 00 00 00 call __security_check_cookie - 00c6a 48 8d a5 48 07 + 00c63 48 33 cd xor rcx, rbp + 00c66 e8 00 00 00 00 call __security_check_cookie + 00c6b 48 8d a5 48 07 00 00 lea rsp, QWORD PTR [rbp+1864] - 00c71 5f pop rdi - 00c72 5d pop rbp - 00c73 c3 ret 0 + 00c72 5f pop rdi + 00c73 5d pop rbp + 00c74 c3 ret 0 stbi__idct_block ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -35237,47 +35433,48 @@ stbi__clamp PROC ; COMDAT 00012 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00019 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001e 90 npad 1 ; 1890 : // trick to use a single test to catch both cases ; 1891 : if ((unsigned int)x > 255) { - 0001e 81 bd e0 00 00 + 0001f 81 bd e0 00 00 00 ff 00 00 00 cmp DWORD PTR x$[rbp], 255 ; 000000ffH - 00028 76 1d jbe SHORT $LN2@stbi__clam + 00029 76 1d jbe SHORT $LN2@stbi__clam ; 1892 : if (x < 0) return 0; - 0002a 83 bd e0 00 00 + 0002b 83 bd e0 00 00 00 00 cmp DWORD PTR x$[rbp], 0 - 00031 7d 04 jge SHORT $LN3@stbi__clam - 00033 32 c0 xor al, al - 00035 eb 17 jmp SHORT $LN1@stbi__clam + 00032 7d 04 jge SHORT $LN3@stbi__clam + 00034 32 c0 xor al, al + 00036 eb 17 jmp SHORT $LN1@stbi__clam $LN3@stbi__clam: ; 1893 : if (x > 255) return 255; - 00037 81 bd e0 00 00 + 00038 81 bd e0 00 00 00 ff 00 00 00 cmp DWORD PTR x$[rbp], 255 ; 000000ffH - 00041 7e 04 jle SHORT $LN4@stbi__clam - 00043 b0 ff mov al, 255 ; 000000ffH - 00045 eb 07 jmp SHORT $LN1@stbi__clam + 00042 7e 04 jle SHORT $LN4@stbi__clam + 00044 b0 ff mov al, 255 ; 000000ffH + 00046 eb 07 jmp SHORT $LN1@stbi__clam $LN4@stbi__clam: $LN2@stbi__clam: ; 1894 : } ; 1895 : return (stbi_uc)x; - 00047 0f b6 85 e0 00 + 00048 0f b6 85 e0 00 00 00 movzx eax, BYTE PTR x$[rbp] $LN1@stbi__clam: ; 1896 : } - 0004e 48 8d a5 c8 00 + 0004f 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00055 5f pop rdi - 00056 5d pop rbp - 00057 c3 ret 0 + 00056 5f pop rdi + 00057 5d pop rbp + 00058 c3 ret 0 stbi__clamp ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -35297,9 +35494,9 @@ r$9 = 292 s$10 = 324 rs$11 = 356 p$12 = 392 -tv420 = 596 -tv393 = 596 tv371 = 596 +tv393 = 596 +tv420 = 596 tv354 = 600 j$ = 640 data$ = 648 @@ -35321,75 +35518,76 @@ stbi__jpeg_decode_block_prog_ac PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 1762 : int k; ; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - 0002e 48 8b 85 80 02 + 0002f 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 00035 83 b8 34 48 00 + 00036 83 b8 34 48 00 00 00 cmp DWORD PTR [rax+18484], 0 - 0003c 75 11 jne SHORT $LN13@stbi__jpeg - 0003e 48 8d 0d 00 00 + 0003d 75 11 jne SHORT $LN13@stbi__jpeg + 0003f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BG@PJBJDAGM@can?8t?5merge?5dc?5and?5ac@ - 00045 e8 00 00 00 00 call stbi__err - 0004a e9 74 06 00 00 jmp $LN1@stbi__jpeg + 00046 e8 00 00 00 00 call stbi__err + 0004b e9 75 06 00 00 jmp $LN1@stbi__jpeg $LN13@stbi__jpeg: ; 1764 : ; 1765 : if (j->succ_high == 0) { - 0004f 48 8b 85 80 02 + 00050 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 00056 83 b8 3c 48 00 + 00057 83 b8 3c 48 00 00 00 cmp DWORD PTR [rax+18492], 0 - 0005d 0f 85 f3 02 00 + 0005e 0f 85 f4 02 00 00 jne $LN14@stbi__jpeg ; 1766 : int shift = j->succ_low; - 00063 48 8b 85 80 02 + 00064 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 0006a 8b 80 40 48 00 + 0006b 8b 80 40 48 00 00 mov eax, DWORD PTR [rax+18496] - 00070 89 45 24 mov DWORD PTR shift$1[rbp], eax + 00071 89 45 24 mov DWORD PTR shift$1[rbp], eax ; 1767 : ; 1768 : if (j->eob_run) { - 00073 48 8b 85 80 02 + 00074 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 0007a 83 b8 44 48 00 + 0007b 83 b8 44 48 00 00 00 cmp DWORD PTR [rax+18500], 0 - 00081 74 26 je SHORT $LN16@stbi__jpeg + 00082 74 26 je SHORT $LN16@stbi__jpeg ; 1769 : --j->eob_run; - 00083 48 8b 85 80 02 + 00084 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 0008a 8b 80 44 48 00 + 0008b 8b 80 44 48 00 00 mov eax, DWORD PTR [rax+18500] - 00090 ff c8 dec eax - 00092 48 8b 8d 80 02 + 00091 ff c8 dec eax + 00093 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00099 89 81 44 48 00 + 0009a 89 81 44 48 00 00 mov DWORD PTR [rcx+18500], eax ; 1770 : return 1; - 0009f b8 01 00 00 00 mov eax, 1 - 000a4 e9 1a 06 00 00 jmp $LN1@stbi__jpeg + 000a0 b8 01 00 00 00 mov eax, 1 + 000a5 e9 1b 06 00 00 jmp $LN1@stbi__jpeg $LN16@stbi__jpeg: ; 1771 : } ; 1772 : ; 1773 : k = j->spec_start; - 000a9 48 8b 85 80 02 + 000aa 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 000b0 8b 80 34 48 00 + 000b1 8b 80 34 48 00 00 mov eax, DWORD PTR [rax+18484] - 000b6 89 45 04 mov DWORD PTR k$[rbp], eax + 000b7 89 45 04 mov DWORD PTR k$[rbp], eax $LN4@stbi__jpeg: ; 1774 : do { @@ -35397,296 +35595,297 @@ $LN4@stbi__jpeg: ; 1776 : int c, r, s; ; 1777 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - 000b9 48 8b 85 80 02 + 000ba 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 000c0 83 b8 24 48 00 + 000c1 83 b8 24 48 00 00 10 cmp DWORD PTR [rax+18468], 16 - 000c7 7d 0c jge SHORT $LN17@stbi__jpeg - 000c9 48 8b 8d 80 02 + 000c8 7d 0d jge SHORT $LN17@stbi__jpeg + 000ca 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 000d0 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 000d1 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 000d6 90 npad 1 $LN17@stbi__jpeg: ; 1778 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); - 000d5 48 8b 85 80 02 + 000d7 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 000dc 8b 80 20 48 00 + 000de 8b 80 20 48 00 00 mov eax, DWORD PTR [rax+18464] - 000e2 c1 e8 17 shr eax, 23 - 000e5 25 ff 01 00 00 and eax, 511 ; 000001ffH - 000ea 89 45 64 mov DWORD PTR c$3[rbp], eax + 000e4 c1 e8 17 shr eax, 23 + 000e7 25 ff 01 00 00 and eax, 511 ; 000001ffH + 000ec 89 45 64 mov DWORD PTR c$3[rbp], eax ; 1779 : r = fac[c]; - 000ed 48 63 45 64 movsxd rax, DWORD PTR c$3[rbp] - 000f1 48 8b 8d 98 02 + 000ef 48 63 45 64 movsxd rax, DWORD PTR c$3[rbp] + 000f3 48 8b 8d 98 02 00 00 mov rcx, QWORD PTR fac$[rbp] - 000f8 0f bf 04 41 movsx eax, WORD PTR [rcx+rax*2] - 000fc 89 85 84 00 00 + 000fa 0f bf 04 41 movsx eax, WORD PTR [rcx+rax*2] + 000fe 89 85 84 00 00 00 mov DWORD PTR r$4[rbp], eax ; 1780 : if (r) { // fast-AC path - 00102 83 bd 84 00 00 + 00104 83 bd 84 00 00 00 00 cmp DWORD PTR r$4[rbp], 0 - 00109 0f 84 e5 00 00 + 0010b 0f 84 e5 00 00 00 je $LN18@stbi__jpeg ; 1781 : k += (r >> 4) & 15; // run - 0010f 8b 85 84 00 00 + 00111 8b 85 84 00 00 00 mov eax, DWORD PTR r$4[rbp] - 00115 c1 f8 04 sar eax, 4 - 00118 83 e0 0f and eax, 15 - 0011b 8b 4d 04 mov ecx, DWORD PTR k$[rbp] - 0011e 03 c8 add ecx, eax - 00120 8b c1 mov eax, ecx - 00122 89 45 04 mov DWORD PTR k$[rbp], eax + 00117 c1 f8 04 sar eax, 4 + 0011a 83 e0 0f and eax, 15 + 0011d 8b 4d 04 mov ecx, DWORD PTR k$[rbp] + 00120 03 c8 add ecx, eax + 00122 8b c1 mov eax, ecx + 00124 89 45 04 mov DWORD PTR k$[rbp], eax ; 1782 : s = r & 15; // combined length - 00125 8b 85 84 00 00 + 00127 8b 85 84 00 00 00 mov eax, DWORD PTR r$4[rbp] - 0012b 83 e0 0f and eax, 15 - 0012e 89 85 a4 00 00 + 0012d 83 e0 0f and eax, 15 + 00130 89 85 a4 00 00 00 mov DWORD PTR s$5[rbp], eax ; 1783 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); - 00134 48 8b 85 80 02 + 00136 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 0013b 8b 80 24 48 00 + 0013d 8b 80 24 48 00 00 mov eax, DWORD PTR [rax+18468] - 00141 39 85 a4 00 00 + 00143 39 85 a4 00 00 00 cmp DWORD PTR s$5[rbp], eax - 00147 7e 11 jle SHORT $LN20@stbi__jpeg - 00149 48 8d 0d 00 00 + 00149 7e 11 jle SHORT $LN20@stbi__jpeg + 0014b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ - 00150 e8 00 00 00 00 call stbi__err - 00155 e9 69 05 00 00 jmp $LN1@stbi__jpeg + 00152 e8 00 00 00 00 call stbi__err + 00157 e9 69 05 00 00 jmp $LN1@stbi__jpeg $LN20@stbi__jpeg: ; 1784 : j->code_buffer <<= s; - 0015a 8b 85 a4 00 00 + 0015c 8b 85 a4 00 00 00 mov eax, DWORD PTR s$5[rbp] - 00160 48 8b 8d 80 02 + 00162 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00167 48 89 8d 58 02 + 00169 48 89 8d 58 02 00 00 mov QWORD PTR tv354[rbp], rcx - 0016e 0f b6 c8 movzx ecx, al - 00171 48 8b 85 58 02 + 00170 0f b6 c8 movzx ecx, al + 00173 48 8b 85 58 02 00 00 mov rax, QWORD PTR tv354[rbp] - 00178 8b 80 20 48 00 + 0017a 8b 80 20 48 00 00 mov eax, DWORD PTR [rax+18464] - 0017e d3 e0 shl eax, cl - 00180 48 8b 8d 80 02 + 00180 d3 e0 shl eax, cl + 00182 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00187 89 81 20 48 00 + 00189 89 81 20 48 00 00 mov DWORD PTR [rcx+18464], eax ; 1785 : j->code_bits -= s; - 0018d 48 8b 85 80 02 + 0018f 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 00194 8b 8d a4 00 00 + 00196 8b 8d a4 00 00 00 mov ecx, DWORD PTR s$5[rbp] - 0019a 8b 80 24 48 00 + 0019c 8b 80 24 48 00 00 mov eax, DWORD PTR [rax+18468] - 001a0 2b c1 sub eax, ecx - 001a2 48 8b 8d 80 02 + 001a2 2b c1 sub eax, ecx + 001a4 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 001a9 89 81 24 48 00 + 001ab 89 81 24 48 00 00 mov DWORD PTR [rcx+18468], eax ; 1786 : zig = stbi__jpeg_dezigzag[k++]; - 001af 48 63 45 04 movsxd rax, DWORD PTR k$[rbp] - 001b3 48 8d 0d 00 00 + 001b1 48 63 45 04 movsxd rax, DWORD PTR k$[rbp] + 001b5 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__jpeg_dezigzag - 001ba 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 001be 89 45 44 mov DWORD PTR zig$2[rbp], eax - 001c1 8b 45 04 mov eax, DWORD PTR k$[rbp] - 001c4 ff c0 inc eax - 001c6 89 45 04 mov DWORD PTR k$[rbp], eax + 001bc 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 001c0 89 45 44 mov DWORD PTR zig$2[rbp], eax + 001c3 8b 45 04 mov eax, DWORD PTR k$[rbp] + 001c6 ff c0 inc eax + 001c8 89 45 04 mov DWORD PTR k$[rbp], eax ; 1787 : data[zig] = (short)((r >> 8) * (1 << shift)); - 001c9 8b 85 84 00 00 + 001cb 8b 85 84 00 00 00 mov eax, DWORD PTR r$4[rbp] - 001cf c1 f8 08 sar eax, 8 - 001d2 8b 4d 24 mov ecx, DWORD PTR shift$1[rbp] - 001d5 ba 01 00 00 00 mov edx, 1 - 001da d3 e2 shl edx, cl - 001dc 8b ca mov ecx, edx - 001de 0f af c1 imul eax, ecx - 001e1 8b 4d 44 mov ecx, DWORD PTR zig$2[rbp] - 001e4 48 8b 95 88 02 + 001d1 c1 f8 08 sar eax, 8 + 001d4 8b 4d 24 mov ecx, DWORD PTR shift$1[rbp] + 001d7 ba 01 00 00 00 mov edx, 1 + 001dc d3 e2 shl edx, cl + 001de 8b ca mov ecx, edx + 001e0 0f af c1 imul eax, ecx + 001e3 8b 4d 44 mov ecx, DWORD PTR zig$2[rbp] + 001e6 48 8b 95 88 02 00 00 mov rdx, QWORD PTR data$[rbp] - 001eb 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax + 001ed 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax ; 1788 : } - 001ef e9 47 01 00 00 jmp $LN19@stbi__jpeg + 001f1 e9 47 01 00 00 jmp $LN19@stbi__jpeg $LN18@stbi__jpeg: ; 1789 : else { ; 1790 : int rs = stbi__jpeg_huff_decode(j, hac); - 001f4 48 8b 95 90 02 + 001f6 48 8b 95 90 02 00 00 mov rdx, QWORD PTR hac$[rbp] - 001fb 48 8b 8d 80 02 + 001fd 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00202 e8 00 00 00 00 call stbi__jpeg_huff_decode - 00207 89 85 c4 00 00 + 00204 e8 00 00 00 00 call stbi__jpeg_huff_decode + 00209 89 85 c4 00 00 00 mov DWORD PTR rs$6[rbp], eax ; 1791 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); - 0020d 83 bd c4 00 00 + 0020f 83 bd c4 00 00 00 00 cmp DWORD PTR rs$6[rbp], 0 - 00214 7d 11 jge SHORT $LN21@stbi__jpeg - 00216 48 8d 0d 00 00 + 00216 7d 11 jge SHORT $LN21@stbi__jpeg + 00218 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ - 0021d e8 00 00 00 00 call stbi__err - 00222 e9 9c 04 00 00 jmp $LN1@stbi__jpeg + 0021f e8 00 00 00 00 call stbi__err + 00224 e9 9c 04 00 00 jmp $LN1@stbi__jpeg $LN21@stbi__jpeg: ; 1792 : s = rs & 15; - 00227 8b 85 c4 00 00 + 00229 8b 85 c4 00 00 00 mov eax, DWORD PTR rs$6[rbp] - 0022d 83 e0 0f and eax, 15 - 00230 89 85 a4 00 00 + 0022f 83 e0 0f and eax, 15 + 00232 89 85 a4 00 00 00 mov DWORD PTR s$5[rbp], eax ; 1793 : r = rs >> 4; - 00236 8b 85 c4 00 00 + 00238 8b 85 c4 00 00 00 mov eax, DWORD PTR rs$6[rbp] - 0023c c1 f8 04 sar eax, 4 - 0023f 89 85 84 00 00 + 0023e c1 f8 04 sar eax, 4 + 00241 89 85 84 00 00 00 mov DWORD PTR r$4[rbp], eax ; 1794 : if (s == 0) { - 00245 83 bd a4 00 00 + 00247 83 bd a4 00 00 00 00 cmp DWORD PTR s$5[rbp], 0 - 0024c 0f 85 90 00 00 + 0024e 0f 85 90 00 00 00 jne $LN22@stbi__jpeg ; 1795 : if (r < 15) { - 00252 83 bd 84 00 00 + 00254 83 bd 84 00 00 00 0f cmp DWORD PTR r$4[rbp], 15 - 00259 7d 7c jge SHORT $LN24@stbi__jpeg + 0025b 7d 7c jge SHORT $LN24@stbi__jpeg ; 1796 : j->eob_run = (1 << r); - 0025b 8b 85 84 00 00 + 0025d 8b 85 84 00 00 00 mov eax, DWORD PTR r$4[rbp] - 00261 b9 01 00 00 00 mov ecx, 1 - 00266 89 8d 54 02 00 + 00263 b9 01 00 00 00 mov ecx, 1 + 00268 89 8d 54 02 00 00 mov DWORD PTR tv371[rbp], ecx - 0026c 0f b6 c8 movzx ecx, al - 0026f 8b 85 54 02 00 + 0026e 0f b6 c8 movzx ecx, al + 00271 8b 85 54 02 00 00 mov eax, DWORD PTR tv371[rbp] - 00275 d3 e0 shl eax, cl - 00277 48 8b 8d 80 02 + 00277 d3 e0 shl eax, cl + 00279 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 0027e 89 81 44 48 00 + 00280 89 81 44 48 00 00 mov DWORD PTR [rcx+18500], eax ; 1797 : if (r) - 00284 83 bd 84 00 00 + 00286 83 bd 84 00 00 00 00 cmp DWORD PTR r$4[rbp], 0 - 0028b 74 2c je SHORT $LN25@stbi__jpeg + 0028d 74 2c je SHORT $LN25@stbi__jpeg ; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); - 0028d 8b 95 84 00 00 + 0028f 8b 95 84 00 00 00 mov edx, DWORD PTR r$4[rbp] - 00293 48 8b 8d 80 02 + 00295 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 0029a e8 00 00 00 00 call stbi__jpeg_get_bits - 0029f 48 8b 8d 80 02 + 0029c e8 00 00 00 00 call stbi__jpeg_get_bits + 002a1 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 002a6 03 81 44 48 00 + 002a8 03 81 44 48 00 00 add eax, DWORD PTR [rcx+18500] - 002ac 48 8b 8d 80 02 + 002ae 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 002b3 89 81 44 48 00 + 002b5 89 81 44 48 00 00 mov DWORD PTR [rcx+18500], eax $LN25@stbi__jpeg: ; 1799 : --j->eob_run; - 002b9 48 8b 85 80 02 + 002bb 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 002c0 8b 80 44 48 00 + 002c2 8b 80 44 48 00 00 mov eax, DWORD PTR [rax+18500] - 002c6 ff c8 dec eax - 002c8 48 8b 8d 80 02 + 002c8 ff c8 dec eax + 002ca 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 002cf 89 81 44 48 00 + 002d1 89 81 44 48 00 00 mov DWORD PTR [rcx+18500], eax ; 1800 : break; - 002d5 eb 7a jmp SHORT $LN3@stbi__jpeg + 002d7 eb 7a jmp SHORT $LN3@stbi__jpeg $LN24@stbi__jpeg: ; 1801 : } ; 1802 : k += 16; - 002d7 8b 45 04 mov eax, DWORD PTR k$[rbp] - 002da 83 c0 10 add eax, 16 - 002dd 89 45 04 mov DWORD PTR k$[rbp], eax + 002d9 8b 45 04 mov eax, DWORD PTR k$[rbp] + 002dc 83 c0 10 add eax, 16 + 002df 89 45 04 mov DWORD PTR k$[rbp], eax ; 1803 : } - 002e0 eb 59 jmp SHORT $LN23@stbi__jpeg + 002e2 eb 59 jmp SHORT $LN23@stbi__jpeg $LN22@stbi__jpeg: ; 1804 : else { ; 1805 : k += r; - 002e2 8b 85 84 00 00 + 002e4 8b 85 84 00 00 00 mov eax, DWORD PTR r$4[rbp] - 002e8 8b 4d 04 mov ecx, DWORD PTR k$[rbp] - 002eb 03 c8 add ecx, eax - 002ed 8b c1 mov eax, ecx - 002ef 89 45 04 mov DWORD PTR k$[rbp], eax + 002ea 8b 4d 04 mov ecx, DWORD PTR k$[rbp] + 002ed 03 c8 add ecx, eax + 002ef 8b c1 mov eax, ecx + 002f1 89 45 04 mov DWORD PTR k$[rbp], eax ; 1806 : zig = stbi__jpeg_dezigzag[k++]; - 002f2 48 63 45 04 movsxd rax, DWORD PTR k$[rbp] - 002f6 48 8d 0d 00 00 + 002f4 48 63 45 04 movsxd rax, DWORD PTR k$[rbp] + 002f8 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__jpeg_dezigzag - 002fd 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00301 89 45 44 mov DWORD PTR zig$2[rbp], eax - 00304 8b 45 04 mov eax, DWORD PTR k$[rbp] - 00307 ff c0 inc eax - 00309 89 45 04 mov DWORD PTR k$[rbp], eax + 002ff 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00303 89 45 44 mov DWORD PTR zig$2[rbp], eax + 00306 8b 45 04 mov eax, DWORD PTR k$[rbp] + 00309 ff c0 inc eax + 0030b 89 45 04 mov DWORD PTR k$[rbp], eax ; 1807 : data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift)); - 0030c 8b 95 a4 00 00 + 0030e 8b 95 a4 00 00 00 mov edx, DWORD PTR s$5[rbp] - 00312 48 8b 8d 80 02 + 00314 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00319 e8 00 00 00 00 call stbi__extend_receive - 0031e 8b 4d 24 mov ecx, DWORD PTR shift$1[rbp] - 00321 ba 01 00 00 00 mov edx, 1 - 00326 d3 e2 shl edx, cl - 00328 8b ca mov ecx, edx - 0032a 0f af c1 imul eax, ecx - 0032d 8b 4d 44 mov ecx, DWORD PTR zig$2[rbp] - 00330 48 8b 95 88 02 + 0031b e8 00 00 00 00 call stbi__extend_receive + 00320 8b 4d 24 mov ecx, DWORD PTR shift$1[rbp] + 00323 ba 01 00 00 00 mov edx, 1 + 00328 d3 e2 shl edx, cl + 0032a 8b ca mov ecx, edx + 0032c 0f af c1 imul eax, ecx + 0032f 8b 4d 44 mov ecx, DWORD PTR zig$2[rbp] + 00332 48 8b 95 88 02 00 00 mov rdx, QWORD PTR data$[rbp] - 00337 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax + 00339 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax $LN23@stbi__jpeg: $LN19@stbi__jpeg: @@ -35694,18 +35893,18 @@ $LN19@stbi__jpeg: ; 1809 : } ; 1810 : } while (k <= j->spec_end); - 0033b 48 8b 85 80 02 + 0033d 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 00342 8b 80 38 48 00 + 00344 8b 80 38 48 00 00 mov eax, DWORD PTR [rax+18488] - 00348 39 45 04 cmp DWORD PTR k$[rbp], eax - 0034b 0f 8e 68 fd ff + 0034a 39 45 04 cmp DWORD PTR k$[rbp], eax + 0034d 0f 8e 67 fd ff ff jle $LN4@stbi__jpeg $LN3@stbi__jpeg: ; 1811 : } - 00351 e9 68 03 00 00 jmp $LN15@stbi__jpeg + 00353 e9 68 03 00 00 jmp $LN15@stbi__jpeg $LN14@stbi__jpeg: ; 1812 : else { @@ -35713,138 +35912,138 @@ $LN14@stbi__jpeg: ; 1814 : ; 1815 : short bit = (short)(1 << j->succ_low); - 00356 48 8b 85 80 02 + 00358 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 0035d 8b 80 40 48 00 + 0035f 8b 80 40 48 00 00 mov eax, DWORD PTR [rax+18496] - 00363 b9 01 00 00 00 mov ecx, 1 - 00368 89 8d 54 02 00 + 00365 b9 01 00 00 00 mov ecx, 1 + 0036a 89 8d 54 02 00 00 mov DWORD PTR tv393[rbp], ecx - 0036e 0f b6 c8 movzx ecx, al - 00371 8b 85 54 02 00 + 00370 0f b6 c8 movzx ecx, al + 00373 8b 85 54 02 00 00 mov eax, DWORD PTR tv393[rbp] - 00377 d3 e0 shl eax, cl - 00379 66 89 85 e4 00 + 00379 d3 e0 shl eax, cl + 0037b 66 89 85 e4 00 00 00 mov WORD PTR bit$7[rbp], ax ; 1816 : ; 1817 : if (j->eob_run) { - 00380 48 8b 85 80 02 + 00382 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 00387 83 b8 44 48 00 + 00389 83 b8 44 48 00 00 00 cmp DWORD PTR [rax+18500], 0 - 0038e 0f 84 fa 00 00 + 00390 0f 84 fa 00 00 00 je $LN26@stbi__jpeg ; 1818 : --j->eob_run; - 00394 48 8b 85 80 02 + 00396 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 0039b 8b 80 44 48 00 + 0039d 8b 80 44 48 00 00 mov eax, DWORD PTR [rax+18500] - 003a1 ff c8 dec eax - 003a3 48 8b 8d 80 02 + 003a3 ff c8 dec eax + 003a5 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 003aa 89 81 44 48 00 + 003ac 89 81 44 48 00 00 mov DWORD PTR [rcx+18500], eax ; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { - 003b0 48 8b 85 80 02 + 003b2 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 003b7 8b 80 34 48 00 + 003b9 8b 80 34 48 00 00 mov eax, DWORD PTR [rax+18484] - 003bd 89 45 04 mov DWORD PTR k$[rbp], eax - 003c0 eb 08 jmp SHORT $LN7@stbi__jpeg + 003bf 89 45 04 mov DWORD PTR k$[rbp], eax + 003c2 eb 08 jmp SHORT $LN7@stbi__jpeg $LN5@stbi__jpeg: - 003c2 8b 45 04 mov eax, DWORD PTR k$[rbp] - 003c5 ff c0 inc eax - 003c7 89 45 04 mov DWORD PTR k$[rbp], eax + 003c4 8b 45 04 mov eax, DWORD PTR k$[rbp] + 003c7 ff c0 inc eax + 003c9 89 45 04 mov DWORD PTR k$[rbp], eax $LN7@stbi__jpeg: - 003ca 48 8b 85 80 02 + 003cc 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 003d1 8b 80 38 48 00 + 003d3 8b 80 38 48 00 00 mov eax, DWORD PTR [rax+18488] - 003d7 39 45 04 cmp DWORD PTR k$[rbp], eax - 003da 0f 8f a9 00 00 + 003d9 39 45 04 cmp DWORD PTR k$[rbp], eax + 003dc 0f 8f a9 00 00 00 jg $LN6@stbi__jpeg ; 1820 : short* p = &data[stbi__jpeg_dezigzag[k]]; - 003e0 48 63 45 04 movsxd rax, DWORD PTR k$[rbp] - 003e4 48 8d 0d 00 00 + 003e2 48 63 45 04 movsxd rax, DWORD PTR k$[rbp] + 003e6 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__jpeg_dezigzag - 003eb 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 003ef 48 8b 8d 88 02 + 003ed 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 003f1 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR data$[rbp] - 003f6 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] - 003fa 48 89 85 08 01 + 003f8 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] + 003fc 48 89 85 08 01 00 00 mov QWORD PTR p$8[rbp], rax ; 1821 : if (*p != 0) - 00401 48 8b 85 08 01 + 00403 48 8b 85 08 01 00 00 mov rax, QWORD PTR p$8[rbp] - 00408 0f bf 00 movsx eax, WORD PTR [rax] - 0040b 85 c0 test eax, eax - 0040d 74 75 je SHORT $LN28@stbi__jpeg + 0040a 0f bf 00 movsx eax, WORD PTR [rax] + 0040d 85 c0 test eax, eax + 0040f 74 75 je SHORT $LN28@stbi__jpeg ; 1822 : if (stbi__jpeg_get_bit(j)) - 0040f 48 8b 8d 80 02 + 00411 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00416 e8 00 00 00 00 call stbi__jpeg_get_bit - 0041b 85 c0 test eax, eax - 0041d 74 65 je SHORT $LN29@stbi__jpeg + 00418 e8 00 00 00 00 call stbi__jpeg_get_bit + 0041d 85 c0 test eax, eax + 0041f 74 65 je SHORT $LN29@stbi__jpeg ; 1823 : if ((*p & bit) == 0) { - 0041f 48 8b 85 08 01 + 00421 48 8b 85 08 01 00 00 mov rax, QWORD PTR p$8[rbp] - 00426 0f bf 00 movsx eax, WORD PTR [rax] - 00429 0f bf 8d e4 00 + 00428 0f bf 00 movsx eax, WORD PTR [rax] + 0042b 0f bf 8d e4 00 00 00 movsx ecx, WORD PTR bit$7[rbp] - 00430 23 c1 and eax, ecx - 00432 85 c0 test eax, eax - 00434 75 4e jne SHORT $LN30@stbi__jpeg + 00432 23 c1 and eax, ecx + 00434 85 c0 test eax, eax + 00436 75 4e jne SHORT $LN30@stbi__jpeg ; 1824 : if (*p > 0) - 00436 48 8b 85 08 01 + 00438 48 8b 85 08 01 00 00 mov rax, QWORD PTR p$8[rbp] - 0043d 0f bf 00 movsx eax, WORD PTR [rax] - 00440 85 c0 test eax, eax - 00442 7e 21 jle SHORT $LN31@stbi__jpeg + 0043f 0f bf 00 movsx eax, WORD PTR [rax] + 00442 85 c0 test eax, eax + 00444 7e 21 jle SHORT $LN31@stbi__jpeg ; 1825 : *p += bit; - 00444 0f bf 85 e4 00 + 00446 0f bf 85 e4 00 00 00 movsx eax, WORD PTR bit$7[rbp] - 0044b 48 8b 8d 08 01 + 0044d 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR p$8[rbp] - 00452 0f bf 09 movsx ecx, WORD PTR [rcx] - 00455 03 c8 add ecx, eax - 00457 8b c1 mov eax, ecx - 00459 48 8b 8d 08 01 + 00454 0f bf 09 movsx ecx, WORD PTR [rcx] + 00457 03 c8 add ecx, eax + 00459 8b c1 mov eax, ecx + 0045b 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR p$8[rbp] - 00460 66 89 01 mov WORD PTR [rcx], ax - 00463 eb 1f jmp SHORT $LN32@stbi__jpeg + 00462 66 89 01 mov WORD PTR [rcx], ax + 00465 eb 1f jmp SHORT $LN32@stbi__jpeg $LN31@stbi__jpeg: ; 1826 : else ; 1827 : *p -= bit; - 00465 0f bf 85 e4 00 + 00467 0f bf 85 e4 00 00 00 movsx eax, WORD PTR bit$7[rbp] - 0046c 48 8b 8d 08 01 + 0046e 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR p$8[rbp] - 00473 0f bf 09 movsx ecx, WORD PTR [rcx] - 00476 2b c8 sub ecx, eax - 00478 8b c1 mov eax, ecx - 0047a 48 8b 8d 08 01 + 00475 0f bf 09 movsx ecx, WORD PTR [rcx] + 00478 2b c8 sub ecx, eax + 0047a 8b c1 mov eax, ecx + 0047c 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR p$8[rbp] - 00481 66 89 01 mov WORD PTR [rcx], ax + 00483 66 89 01 mov WORD PTR [rcx], ax $LN32@stbi__jpeg: $LN30@stbi__jpeg: $LN29@stbi__jpeg: @@ -35853,118 +36052,118 @@ $LN28@stbi__jpeg: ; 1828 : } ; 1829 : } - 00484 e9 39 ff ff ff jmp $LN5@stbi__jpeg + 00486 e9 39 ff ff ff jmp $LN5@stbi__jpeg $LN6@stbi__jpeg: ; 1830 : } - 00489 e9 30 02 00 00 jmp $LN27@stbi__jpeg + 0048b e9 30 02 00 00 jmp $LN27@stbi__jpeg $LN26@stbi__jpeg: ; 1831 : else { ; 1832 : k = j->spec_start; - 0048e 48 8b 85 80 02 + 00490 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 00495 8b 80 34 48 00 + 00497 8b 80 34 48 00 00 mov eax, DWORD PTR [rax+18484] - 0049b 89 45 04 mov DWORD PTR k$[rbp], eax + 0049d 89 45 04 mov DWORD PTR k$[rbp], eax $LN10@stbi__jpeg: ; 1833 : do { ; 1834 : int r, s; ; 1835 : int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh - 0049e 48 8b 95 90 02 + 004a0 48 8b 95 90 02 00 00 mov rdx, QWORD PTR hac$[rbp] - 004a5 48 8b 8d 80 02 + 004a7 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 004ac e8 00 00 00 00 call stbi__jpeg_huff_decode - 004b1 89 85 64 01 00 + 004ae e8 00 00 00 00 call stbi__jpeg_huff_decode + 004b3 89 85 64 01 00 00 mov DWORD PTR rs$11[rbp], eax ; 1836 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); - 004b7 83 bd 64 01 00 + 004b9 83 bd 64 01 00 00 00 cmp DWORD PTR rs$11[rbp], 0 - 004be 7d 11 jge SHORT $LN33@stbi__jpeg - 004c0 48 8d 0d 00 00 + 004c0 7d 11 jge SHORT $LN33@stbi__jpeg + 004c2 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ - 004c7 e8 00 00 00 00 call stbi__err - 004cc e9 f2 01 00 00 jmp $LN1@stbi__jpeg + 004c9 e8 00 00 00 00 call stbi__err + 004ce e9 f2 01 00 00 jmp $LN1@stbi__jpeg $LN33@stbi__jpeg: ; 1837 : s = rs & 15; - 004d1 8b 85 64 01 00 + 004d3 8b 85 64 01 00 00 mov eax, DWORD PTR rs$11[rbp] - 004d7 83 e0 0f and eax, 15 - 004da 89 85 44 01 00 + 004d9 83 e0 0f and eax, 15 + 004dc 89 85 44 01 00 00 mov DWORD PTR s$10[rbp], eax ; 1838 : r = rs >> 4; - 004e0 8b 85 64 01 00 + 004e2 8b 85 64 01 00 00 mov eax, DWORD PTR rs$11[rbp] - 004e6 c1 f8 04 sar eax, 4 - 004e9 89 85 24 01 00 + 004e8 c1 f8 04 sar eax, 4 + 004eb 89 85 24 01 00 00 mov DWORD PTR r$9[rbp], eax ; 1839 : if (s == 0) { - 004ef 83 bd 44 01 00 + 004f1 83 bd 44 01 00 00 00 cmp DWORD PTR s$10[rbp], 0 - 004f6 75 75 jne SHORT $LN34@stbi__jpeg + 004f8 75 75 jne SHORT $LN34@stbi__jpeg ; 1840 : if (r < 15) { - 004f8 83 bd 24 01 00 + 004fa 83 bd 24 01 00 00 0f cmp DWORD PTR r$9[rbp], 15 - 004ff 7d 6a jge SHORT $LN36@stbi__jpeg + 00501 7d 6a jge SHORT $LN36@stbi__jpeg ; 1841 : j->eob_run = (1 << r) - 1; - 00501 8b 85 24 01 00 + 00503 8b 85 24 01 00 00 mov eax, DWORD PTR r$9[rbp] - 00507 b9 01 00 00 00 mov ecx, 1 - 0050c 89 8d 54 02 00 + 00509 b9 01 00 00 00 mov ecx, 1 + 0050e 89 8d 54 02 00 00 mov DWORD PTR tv420[rbp], ecx - 00512 0f b6 c8 movzx ecx, al - 00515 8b 85 54 02 00 + 00514 0f b6 c8 movzx ecx, al + 00517 8b 85 54 02 00 00 mov eax, DWORD PTR tv420[rbp] - 0051b d3 e0 shl eax, cl - 0051d ff c8 dec eax - 0051f 48 8b 8d 80 02 + 0051d d3 e0 shl eax, cl + 0051f ff c8 dec eax + 00521 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00526 89 81 44 48 00 + 00528 89 81 44 48 00 00 mov DWORD PTR [rcx+18500], eax ; 1842 : if (r) - 0052c 83 bd 24 01 00 + 0052e 83 bd 24 01 00 00 00 cmp DWORD PTR r$9[rbp], 0 - 00533 74 2c je SHORT $LN38@stbi__jpeg + 00535 74 2c je SHORT $LN38@stbi__jpeg ; 1843 : j->eob_run += stbi__jpeg_get_bits(j, r); - 00535 8b 95 24 01 00 + 00537 8b 95 24 01 00 00 mov edx, DWORD PTR r$9[rbp] - 0053b 48 8b 8d 80 02 + 0053d 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00542 e8 00 00 00 00 call stbi__jpeg_get_bits - 00547 48 8b 8d 80 02 + 00544 e8 00 00 00 00 call stbi__jpeg_get_bits + 00549 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 0054e 03 81 44 48 00 + 00550 03 81 44 48 00 00 add eax, DWORD PTR [rcx+18500] - 00554 48 8b 8d 80 02 + 00556 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 0055b 89 81 44 48 00 + 0055d 89 81 44 48 00 00 mov DWORD PTR [rcx+18500], eax $LN38@stbi__jpeg: ; 1844 : r = 64; // force end of block - 00561 c7 85 24 01 00 + 00563 c7 85 24 01 00 00 40 00 00 00 mov DWORD PTR r$9[rbp], 64 ; 00000040H $LN36@stbi__jpeg: @@ -35976,46 +36175,46 @@ $LN36@stbi__jpeg: ; 1850 : } ; 1851 : } - 0056b eb 48 jmp SHORT $LN35@stbi__jpeg + 0056d eb 48 jmp SHORT $LN35@stbi__jpeg $LN34@stbi__jpeg: ; 1852 : else { ; 1853 : if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); - 0056d 83 bd 44 01 00 + 0056f 83 bd 44 01 00 00 01 cmp DWORD PTR s$10[rbp], 1 - 00574 74 11 je SHORT $LN39@stbi__jpeg - 00576 48 8d 0d 00 00 + 00576 74 11 je SHORT $LN39@stbi__jpeg + 00578 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ - 0057d e8 00 00 00 00 call stbi__err - 00582 e9 3c 01 00 00 jmp $LN1@stbi__jpeg + 0057f e8 00 00 00 00 call stbi__err + 00584 e9 3c 01 00 00 jmp $LN1@stbi__jpeg $LN39@stbi__jpeg: ; 1854 : // sign bit ; 1855 : if (stbi__jpeg_get_bit(j)) - 00587 48 8b 8d 80 02 + 00589 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 0058e e8 00 00 00 00 call stbi__jpeg_get_bit - 00593 85 c0 test eax, eax - 00595 74 0f je SHORT $LN40@stbi__jpeg + 00590 e8 00 00 00 00 call stbi__jpeg_get_bit + 00595 85 c0 test eax, eax + 00597 74 0f je SHORT $LN40@stbi__jpeg ; 1856 : s = bit; - 00597 0f bf 85 e4 00 + 00599 0f bf 85 e4 00 00 00 movsx eax, WORD PTR bit$7[rbp] - 0059e 89 85 44 01 00 + 005a0 89 85 44 01 00 00 mov DWORD PTR s$10[rbp], eax - 005a4 eb 0f jmp SHORT $LN41@stbi__jpeg + 005a6 eb 0f jmp SHORT $LN41@stbi__jpeg $LN40@stbi__jpeg: ; 1857 : else ; 1858 : s = -bit; - 005a6 0f bf 85 e4 00 + 005a8 0f bf 85 e4 00 00 00 movsx eax, WORD PTR bit$7[rbp] - 005ad f7 d8 neg eax - 005af 89 85 44 01 00 + 005af f7 d8 neg eax + 005b1 89 85 44 01 00 00 mov DWORD PTR s$10[rbp], eax $LN41@stbi__jpeg: $LN35@stbi__jpeg: @@ -36026,92 +36225,92 @@ $LN11@stbi__jpeg: ; 1861 : // advance by r ; 1862 : while (k <= j->spec_end) { - 005b5 48 8b 85 80 02 + 005b7 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 005bc 8b 80 38 48 00 + 005be 8b 80 38 48 00 00 mov eax, DWORD PTR [rax+18488] - 005c2 39 45 04 cmp DWORD PTR k$[rbp], eax - 005c5 0f 8f dd 00 00 + 005c4 39 45 04 cmp DWORD PTR k$[rbp], eax + 005c7 0f 8f dd 00 00 00 jg $LN12@stbi__jpeg ; 1863 : short* p = &data[stbi__jpeg_dezigzag[k++]]; - 005cb 48 63 45 04 movsxd rax, DWORD PTR k$[rbp] - 005cf 48 8d 0d 00 00 + 005cd 48 63 45 04 movsxd rax, DWORD PTR k$[rbp] + 005d1 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__jpeg_dezigzag - 005d6 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 005da 48 8b 8d 88 02 + 005d8 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 005dc 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR data$[rbp] - 005e1 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] - 005e5 48 89 85 88 01 + 005e3 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] + 005e7 48 89 85 88 01 00 00 mov QWORD PTR p$12[rbp], rax - 005ec 8b 45 04 mov eax, DWORD PTR k$[rbp] - 005ef ff c0 inc eax - 005f1 89 45 04 mov DWORD PTR k$[rbp], eax + 005ee 8b 45 04 mov eax, DWORD PTR k$[rbp] + 005f1 ff c0 inc eax + 005f3 89 45 04 mov DWORD PTR k$[rbp], eax ; 1864 : if (*p != 0) { - 005f4 48 8b 85 88 01 + 005f6 48 8b 85 88 01 00 00 mov rax, QWORD PTR p$12[rbp] - 005fb 0f bf 00 movsx eax, WORD PTR [rax] - 005fe 85 c0 test eax, eax - 00600 74 77 je SHORT $LN42@stbi__jpeg + 005fd 0f bf 00 movsx eax, WORD PTR [rax] + 00600 85 c0 test eax, eax + 00602 74 77 je SHORT $LN42@stbi__jpeg ; 1865 : if (stbi__jpeg_get_bit(j)) - 00602 48 8b 8d 80 02 + 00604 48 8b 8d 80 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00609 e8 00 00 00 00 call stbi__jpeg_get_bit - 0060e 85 c0 test eax, eax - 00610 74 65 je SHORT $LN44@stbi__jpeg + 0060b e8 00 00 00 00 call stbi__jpeg_get_bit + 00610 85 c0 test eax, eax + 00612 74 65 je SHORT $LN44@stbi__jpeg ; 1866 : if ((*p & bit) == 0) { - 00612 48 8b 85 88 01 + 00614 48 8b 85 88 01 00 00 mov rax, QWORD PTR p$12[rbp] - 00619 0f bf 00 movsx eax, WORD PTR [rax] - 0061c 0f bf 8d e4 00 + 0061b 0f bf 00 movsx eax, WORD PTR [rax] + 0061e 0f bf 8d e4 00 00 00 movsx ecx, WORD PTR bit$7[rbp] - 00623 23 c1 and eax, ecx - 00625 85 c0 test eax, eax - 00627 75 4e jne SHORT $LN45@stbi__jpeg + 00625 23 c1 and eax, ecx + 00627 85 c0 test eax, eax + 00629 75 4e jne SHORT $LN45@stbi__jpeg ; 1867 : if (*p > 0) - 00629 48 8b 85 88 01 + 0062b 48 8b 85 88 01 00 00 mov rax, QWORD PTR p$12[rbp] - 00630 0f bf 00 movsx eax, WORD PTR [rax] - 00633 85 c0 test eax, eax - 00635 7e 21 jle SHORT $LN46@stbi__jpeg + 00632 0f bf 00 movsx eax, WORD PTR [rax] + 00635 85 c0 test eax, eax + 00637 7e 21 jle SHORT $LN46@stbi__jpeg ; 1868 : *p += bit; - 00637 0f bf 85 e4 00 + 00639 0f bf 85 e4 00 00 00 movsx eax, WORD PTR bit$7[rbp] - 0063e 48 8b 8d 88 01 + 00640 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR p$12[rbp] - 00645 0f bf 09 movsx ecx, WORD PTR [rcx] - 00648 03 c8 add ecx, eax - 0064a 8b c1 mov eax, ecx - 0064c 48 8b 8d 88 01 + 00647 0f bf 09 movsx ecx, WORD PTR [rcx] + 0064a 03 c8 add ecx, eax + 0064c 8b c1 mov eax, ecx + 0064e 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR p$12[rbp] - 00653 66 89 01 mov WORD PTR [rcx], ax - 00656 eb 1f jmp SHORT $LN47@stbi__jpeg + 00655 66 89 01 mov WORD PTR [rcx], ax + 00658 eb 1f jmp SHORT $LN47@stbi__jpeg $LN46@stbi__jpeg: ; 1869 : else ; 1870 : *p -= bit; - 00658 0f bf 85 e4 00 + 0065a 0f bf 85 e4 00 00 00 movsx eax, WORD PTR bit$7[rbp] - 0065f 48 8b 8d 88 01 + 00661 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR p$12[rbp] - 00666 0f bf 09 movsx ecx, WORD PTR [rcx] - 00669 2b c8 sub ecx, eax - 0066b 8b c1 mov eax, ecx - 0066d 48 8b 8d 88 01 + 00668 0f bf 09 movsx ecx, WORD PTR [rcx] + 0066b 2b c8 sub ecx, eax + 0066d 8b c1 mov eax, ecx + 0066f 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR p$12[rbp] - 00674 66 89 01 mov WORD PTR [rcx], ax + 00676 66 89 01 mov WORD PTR [rcx], ax $LN47@stbi__jpeg: $LN45@stbi__jpeg: $LN44@stbi__jpeg: @@ -36119,53 +36318,53 @@ $LN44@stbi__jpeg: ; 1871 : } ; 1872 : } - 00677 eb 2a jmp SHORT $LN43@stbi__jpeg + 00679 eb 2a jmp SHORT $LN43@stbi__jpeg $LN42@stbi__jpeg: ; 1873 : else { ; 1874 : if (r == 0) { - 00679 83 bd 24 01 00 + 0067b 83 bd 24 01 00 00 00 cmp DWORD PTR r$9[rbp], 0 - 00680 75 13 jne SHORT $LN48@stbi__jpeg + 00682 75 13 jne SHORT $LN48@stbi__jpeg ; 1875 : *p = (short)s; - 00682 48 8b 85 88 01 + 00684 48 8b 85 88 01 00 00 mov rax, QWORD PTR p$12[rbp] - 00689 0f b7 8d 44 01 + 0068b 0f b7 8d 44 01 00 00 movzx ecx, WORD PTR s$10[rbp] - 00690 66 89 08 mov WORD PTR [rax], cx + 00692 66 89 08 mov WORD PTR [rax], cx ; 1876 : break; - 00693 eb 13 jmp SHORT $LN12@stbi__jpeg + 00695 eb 13 jmp SHORT $LN12@stbi__jpeg $LN48@stbi__jpeg: ; 1877 : } ; 1878 : --r; - 00695 8b 85 24 01 00 + 00697 8b 85 24 01 00 00 mov eax, DWORD PTR r$9[rbp] - 0069b ff c8 dec eax - 0069d 89 85 24 01 00 + 0069d ff c8 dec eax + 0069f 89 85 24 01 00 00 mov DWORD PTR r$9[rbp], eax $LN43@stbi__jpeg: ; 1879 : } ; 1880 : } - 006a3 e9 0d ff ff ff jmp $LN11@stbi__jpeg + 006a5 e9 0d ff ff ff jmp $LN11@stbi__jpeg $LN12@stbi__jpeg: ; 1881 : } while (k <= j->spec_end); - 006a8 48 8b 85 80 02 + 006aa 48 8b 85 80 02 00 00 mov rax, QWORD PTR j$[rbp] - 006af 8b 80 38 48 00 + 006b1 8b 80 38 48 00 00 mov eax, DWORD PTR [rax+18488] - 006b5 39 45 04 cmp DWORD PTR k$[rbp], eax - 006b8 0f 8e e0 fd ff + 006b7 39 45 04 cmp DWORD PTR k$[rbp], eax + 006ba 0f 8e e0 fd ff ff jle $LN10@stbi__jpeg $LN27@stbi__jpeg: $LN15@stbi__jpeg: @@ -36174,16 +36373,16 @@ $LN15@stbi__jpeg: ; 1883 : } ; 1884 : return 1; - 006be b8 01 00 00 00 mov eax, 1 + 006c0 b8 01 00 00 00 mov eax, 1 $LN1@stbi__jpeg: ; 1885 : } - 006c3 48 8d a5 68 02 + 006c5 48 8d a5 68 02 00 00 lea rsp, QWORD PTR [rbp+616] - 006ca 5f pop rdi - 006cb 5d pop rbp - 006cc c3 ret 0 + 006cc 5f pop rdi + 006cd 5d pop rbp + 006ce c3 ret 0 stbi__jpeg_decode_block_prog_ac ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -36193,9 +36392,9 @@ _TEXT SEGMENT diff$ = 4 dc$ = 36 t$ = 68 -tv211 = 276 -tv207 = 276 tv87 = 276 +tv207 = 276 +tv211 = 276 j$ = 320 data$ = 328 hdc$ = 336 @@ -36216,237 +36415,240 @@ stbi__jpeg_decode_block_prog_dc PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 1731 : int diff, dc; ; 1732 : int t; ; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - 0002e 48 8b 85 40 01 + 0002f 48 8b 85 40 01 00 00 mov rax, QWORD PTR j$[rbp] - 00035 83 b8 38 48 00 + 00036 83 b8 38 48 00 00 00 cmp DWORD PTR [rax+18488], 0 - 0003c 74 11 je SHORT $LN2@stbi__jpeg - 0003e 48 8d 0d 00 00 + 0003d 74 11 je SHORT $LN2@stbi__jpeg + 0003f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BG@PJBJDAGM@can?8t?5merge?5dc?5and?5ac@ - 00045 e8 00 00 00 00 call stbi__err - 0004a e9 f5 01 00 00 jmp $LN1@stbi__jpeg + 00046 e8 00 00 00 00 call stbi__err + 0004b e9 f7 01 00 00 jmp $LN1@stbi__jpeg $LN2@stbi__jpeg: ; 1734 : ; 1735 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - 0004f 48 8b 85 40 01 + 00050 48 8b 85 40 01 00 00 mov rax, QWORD PTR j$[rbp] - 00056 83 b8 24 48 00 + 00057 83 b8 24 48 00 00 10 cmp DWORD PTR [rax+18468], 16 - 0005d 7d 0c jge SHORT $LN3@stbi__jpeg - 0005f 48 8b 8d 40 01 + 0005e 7d 0d jge SHORT $LN3@stbi__jpeg + 00060 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 00066 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 00067 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 0006c 90 npad 1 $LN3@stbi__jpeg: ; 1736 : ; 1737 : if (j->succ_high == 0) { - 0006b 48 8b 85 40 01 + 0006d 48 8b 85 40 01 00 00 mov rax, QWORD PTR j$[rbp] - 00072 83 b8 3c 48 00 + 00074 83 b8 3c 48 00 00 00 cmp DWORD PTR [rax+18492], 0 - 00079 0f 85 6d 01 00 + 0007b 0f 85 6e 01 00 00 jne $LN4@stbi__jpeg ; 1738 : // first scan for DC coefficient, must be first ; 1739 : memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now - 0007f 41 b8 80 00 00 + 00081 41 b8 80 00 00 00 mov r8d, 128 ; 00000080H - 00085 33 d2 xor edx, edx - 00087 48 8b 8d 48 01 + 00087 33 d2 xor edx, edx + 00089 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR data$[rbp] - 0008e e8 00 00 00 00 call memset + 00090 e8 00 00 00 00 call memset + 00095 90 npad 1 ; 1740 : t = stbi__jpeg_huff_decode(j, hdc); - 00093 48 8b 95 50 01 + 00096 48 8b 95 50 01 00 00 mov rdx, QWORD PTR hdc$[rbp] - 0009a 48 8b 8d 40 01 + 0009d 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 000a1 e8 00 00 00 00 call stbi__jpeg_huff_decode - 000a6 89 45 44 mov DWORD PTR t$[rbp], eax + 000a4 e8 00 00 00 00 call stbi__jpeg_huff_decode + 000a9 89 45 44 mov DWORD PTR t$[rbp], eax ; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - 000a9 83 7d 44 00 cmp DWORD PTR t$[rbp], 0 - 000ad 7c 06 jl SHORT $LN7@stbi__jpeg - 000af 83 7d 44 0f cmp DWORD PTR t$[rbp], 15 - 000b3 7e 11 jle SHORT $LN6@stbi__jpeg + 000ac 83 7d 44 00 cmp DWORD PTR t$[rbp], 0 + 000b0 7c 06 jl SHORT $LN7@stbi__jpeg + 000b2 83 7d 44 0f cmp DWORD PTR t$[rbp], 15 + 000b6 7e 11 jle SHORT $LN6@stbi__jpeg $LN7@stbi__jpeg: - 000b5 48 8d 0d 00 00 + 000b8 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BG@PJBJDAGM@can?8t?5merge?5dc?5and?5ac@ - 000bc e8 00 00 00 00 call stbi__err - 000c1 e9 7e 01 00 00 jmp $LN1@stbi__jpeg + 000bf e8 00 00 00 00 call stbi__err + 000c4 e9 7e 01 00 00 jmp $LN1@stbi__jpeg $LN6@stbi__jpeg: ; 1742 : diff = t ? stbi__extend_receive(j, t) : 0; - 000c6 83 7d 44 00 cmp DWORD PTR t$[rbp], 0 - 000ca 74 17 je SHORT $LN12@stbi__jpeg - 000cc 8b 55 44 mov edx, DWORD PTR t$[rbp] - 000cf 48 8b 8d 40 01 + 000c9 83 7d 44 00 cmp DWORD PTR t$[rbp], 0 + 000cd 74 17 je SHORT $LN12@stbi__jpeg + 000cf 8b 55 44 mov edx, DWORD PTR t$[rbp] + 000d2 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 000d6 e8 00 00 00 00 call stbi__extend_receive - 000db 89 85 14 01 00 + 000d9 e8 00 00 00 00 call stbi__extend_receive + 000de 89 85 14 01 00 00 mov DWORD PTR tv87[rbp], eax - 000e1 eb 0a jmp SHORT $LN13@stbi__jpeg + 000e4 eb 0a jmp SHORT $LN13@stbi__jpeg $LN12@stbi__jpeg: - 000e3 c7 85 14 01 00 + 000e6 c7 85 14 01 00 00 00 00 00 00 mov DWORD PTR tv87[rbp], 0 $LN13@stbi__jpeg: - 000ed 8b 85 14 01 00 + 000f0 8b 85 14 01 00 00 mov eax, DWORD PTR tv87[rbp] - 000f3 89 45 04 mov DWORD PTR diff$[rbp], eax + 000f6 89 45 04 mov DWORD PTR diff$[rbp], eax ; 1743 : ; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); - 000f6 48 63 85 58 01 + 000f9 48 63 85 58 01 00 00 movsxd rax, DWORD PTR b$[rbp] - 000fd 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00101 8b 55 04 mov edx, DWORD PTR diff$[rbp] - 00104 48 8b 8d 40 01 + 00100 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00104 8b 55 04 mov edx, DWORD PTR diff$[rbp] + 00107 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0010b 8b 8c 01 b8 46 + 0010e 8b 8c 01 b8 46 00 00 mov ecx, DWORD PTR [rcx+rax+18104] - 00112 e8 00 00 00 00 call stbi__addints_valid - 00117 85 c0 test eax, eax - 00119 75 11 jne SHORT $LN8@stbi__jpeg - 0011b 48 8d 0d 00 00 + 00115 e8 00 00 00 00 call stbi__addints_valid + 0011a 85 c0 test eax, eax + 0011c 75 11 jne SHORT $LN8@stbi__jpeg + 0011e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09IFDKCGFO@bad?5delta@ - 00122 e8 00 00 00 00 call stbi__err - 00127 e9 18 01 00 00 jmp $LN1@stbi__jpeg + 00125 e8 00 00 00 00 call stbi__err + 0012a e9 18 01 00 00 jmp $LN1@stbi__jpeg $LN8@stbi__jpeg: ; 1745 : dc = j->img_comp[b].dc_pred + diff; - 0012c 48 63 85 58 01 + 0012f 48 63 85 58 01 00 00 movsxd rax, DWORD PTR b$[rbp] - 00133 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00137 48 8b 8d 40 01 + 00136 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 0013a 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0013e 8b 84 01 b8 46 + 00141 8b 84 01 b8 46 00 00 mov eax, DWORD PTR [rcx+rax+18104] - 00145 03 45 04 add eax, DWORD PTR diff$[rbp] - 00148 89 45 24 mov DWORD PTR dc$[rbp], eax + 00148 03 45 04 add eax, DWORD PTR diff$[rbp] + 0014b 89 45 24 mov DWORD PTR dc$[rbp], eax ; 1746 : j->img_comp[b].dc_pred = dc; - 0014b 48 63 85 58 01 + 0014e 48 63 85 58 01 00 00 movsxd rax, DWORD PTR b$[rbp] - 00152 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00156 48 8b 8d 40 01 + 00155 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00159 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0015d 8b 55 24 mov edx, DWORD PTR dc$[rbp] - 00160 89 94 01 b8 46 + 00160 8b 55 24 mov edx, DWORD PTR dc$[rbp] + 00163 89 94 01 b8 46 00 00 mov DWORD PTR [rcx+rax+18104], edx ; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - 00167 48 8b 85 40 01 + 0016a 48 8b 85 40 01 00 00 mov rax, QWORD PTR j$[rbp] - 0016e 8b 80 40 48 00 + 00171 8b 80 40 48 00 00 mov eax, DWORD PTR [rax+18496] - 00174 b9 01 00 00 00 mov ecx, 1 - 00179 89 8d 14 01 00 + 00177 b9 01 00 00 00 mov ecx, 1 + 0017c 89 8d 14 01 00 00 mov DWORD PTR tv207[rbp], ecx - 0017f 0f b6 c8 movzx ecx, al - 00182 8b 85 14 01 00 + 00182 0f b6 c8 movzx ecx, al + 00185 8b 85 14 01 00 00 mov eax, DWORD PTR tv207[rbp] - 00188 d3 e0 shl eax, cl - 0018a 0f b7 d0 movzx edx, ax - 0018d 0f b7 4d 24 movzx ecx, WORD PTR dc$[rbp] - 00191 e8 00 00 00 00 call stbi__mul2shorts_valid - 00196 85 c0 test eax, eax - 00198 75 11 jne SHORT $LN9@stbi__jpeg - 0019a 48 8d 0d 00 00 + 0018b d3 e0 shl eax, cl + 0018d 0f b7 d0 movzx edx, ax + 00190 0f b7 4d 24 movzx ecx, WORD PTR dc$[rbp] + 00194 e8 00 00 00 00 call stbi__mul2shorts_valid + 00199 85 c0 test eax, eax + 0019b 75 11 jne SHORT $LN9@stbi__jpeg + 0019d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BG@PJBJDAGM@can?8t?5merge?5dc?5and?5ac@ - 001a1 e8 00 00 00 00 call stbi__err - 001a6 e9 99 00 00 00 jmp $LN1@stbi__jpeg + 001a4 e8 00 00 00 00 call stbi__err + 001a9 e9 99 00 00 00 jmp $LN1@stbi__jpeg $LN9@stbi__jpeg: ; 1748 : data[0] = (short)(dc * (1 << j->succ_low)); - 001ab 48 8b 85 40 01 + 001ae 48 8b 85 40 01 00 00 mov rax, QWORD PTR j$[rbp] - 001b2 8b 80 40 48 00 + 001b5 8b 80 40 48 00 00 mov eax, DWORD PTR [rax+18496] - 001b8 b9 01 00 00 00 mov ecx, 1 - 001bd 89 8d 14 01 00 + 001bb b9 01 00 00 00 mov ecx, 1 + 001c0 89 8d 14 01 00 00 mov DWORD PTR tv211[rbp], ecx - 001c3 0f b6 c8 movzx ecx, al - 001c6 8b 85 14 01 00 + 001c6 0f b6 c8 movzx ecx, al + 001c9 8b 85 14 01 00 00 mov eax, DWORD PTR tv211[rbp] - 001cc d3 e0 shl eax, cl - 001ce 8b 4d 24 mov ecx, DWORD PTR dc$[rbp] - 001d1 0f af c8 imul ecx, eax - 001d4 8b c1 mov eax, ecx - 001d6 b9 02 00 00 00 mov ecx, 2 - 001db 48 6b c9 00 imul rcx, rcx, 0 - 001df 48 8b 95 48 01 + 001cf d3 e0 shl eax, cl + 001d1 8b 4d 24 mov ecx, DWORD PTR dc$[rbp] + 001d4 0f af c8 imul ecx, eax + 001d7 8b c1 mov eax, ecx + 001d9 b9 02 00 00 00 mov ecx, 2 + 001de 48 6b c9 00 imul rcx, rcx, 0 + 001e2 48 8b 95 48 01 00 00 mov rdx, QWORD PTR data$[rbp] - 001e6 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 001e9 66 89 04 0a mov WORD PTR [rdx+rcx], ax ; 1749 : } - 001ea eb 53 jmp SHORT $LN5@stbi__jpeg + 001ed eb 53 jmp SHORT $LN5@stbi__jpeg $LN4@stbi__jpeg: ; 1750 : else { ; 1751 : // refinement scan for DC coefficient ; 1752 : if (stbi__jpeg_get_bit(j)) - 001ec 48 8b 8d 40 01 + 001ef 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 001f3 e8 00 00 00 00 call stbi__jpeg_get_bit - 001f8 85 c0 test eax, eax - 001fa 74 43 je SHORT $LN10@stbi__jpeg + 001f6 e8 00 00 00 00 call stbi__jpeg_get_bit + 001fb 85 c0 test eax, eax + 001fd 74 43 je SHORT $LN10@stbi__jpeg ; 1753 : data[0] += (short)(1 << j->succ_low); - 001fc b8 02 00 00 00 mov eax, 2 - 00201 48 6b c0 00 imul rax, rax, 0 - 00205 48 8b 8d 40 01 + 001ff b8 02 00 00 00 mov eax, 2 + 00204 48 6b c0 00 imul rax, rax, 0 + 00208 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0020c 8b 89 40 48 00 + 0020f 8b 89 40 48 00 00 mov ecx, DWORD PTR [rcx+18496] - 00212 ba 01 00 00 00 mov edx, 1 - 00217 d3 e2 shl edx, cl - 00219 8b ca mov ecx, edx - 0021b 0f bf c9 movsx ecx, cx - 0021e 48 8b 95 48 01 + 00215 ba 01 00 00 00 mov edx, 1 + 0021a d3 e2 shl edx, cl + 0021c 8b ca mov ecx, edx + 0021e 0f bf c9 movsx ecx, cx + 00221 48 8b 95 48 01 00 00 mov rdx, QWORD PTR data$[rbp] - 00225 0f bf 04 02 movsx eax, WORD PTR [rdx+rax] - 00229 03 c1 add eax, ecx - 0022b b9 02 00 00 00 mov ecx, 2 - 00230 48 6b c9 00 imul rcx, rcx, 0 - 00234 48 8b 95 48 01 + 00228 0f bf 04 02 movsx eax, WORD PTR [rdx+rax] + 0022c 03 c1 add eax, ecx + 0022e b9 02 00 00 00 mov ecx, 2 + 00233 48 6b c9 00 imul rcx, rcx, 0 + 00237 48 8b 95 48 01 00 00 mov rdx, QWORD PTR data$[rbp] - 0023b 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 0023e 66 89 04 0a mov WORD PTR [rdx+rcx], ax $LN10@stbi__jpeg: $LN5@stbi__jpeg: ; 1754 : } ; 1755 : return 1; - 0023f b8 01 00 00 00 mov eax, 1 + 00242 b8 01 00 00 00 mov eax, 1 $LN1@stbi__jpeg: ; 1756 : } - 00244 48 8d a5 28 01 + 00247 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 0024b 5f pop rdi - 0024c 5d pop rbp - 0024d c3 ret 0 + 0024e 5f pop rdi + 0024f 5d pop rbp + 00250 c3 ret 0 stbi__jpeg_decode_block_prog_dc ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -36487,155 +36689,158 @@ stbi__jpeg_decode_block PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 1674 : int diff, dc, k; ; 1675 : int t; ; 1676 : ; 1677 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - 0002e 48 8b 85 00 02 + 0002f 48 8b 85 00 02 00 00 mov rax, QWORD PTR j$[rbp] - 00035 83 b8 24 48 00 + 00036 83 b8 24 48 00 00 10 cmp DWORD PTR [rax+18468], 16 - 0003c 7d 0c jge SHORT $LN5@stbi__jpeg - 0003e 48 8b 8d 00 02 + 0003d 7d 0d jge SHORT $LN5@stbi__jpeg + 0003f 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00045 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 00046 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 0004b 90 npad 1 $LN5@stbi__jpeg: ; 1678 : t = stbi__jpeg_huff_decode(j, hdc); - 0004a 48 8b 95 10 02 + 0004c 48 8b 95 10 02 00 00 mov rdx, QWORD PTR hdc$[rbp] - 00051 48 8b 8d 00 02 + 00053 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00058 e8 00 00 00 00 call stbi__jpeg_huff_decode - 0005d 89 45 64 mov DWORD PTR t$[rbp], eax + 0005a e8 00 00 00 00 call stbi__jpeg_huff_decode + 0005f 89 45 64 mov DWORD PTR t$[rbp], eax ; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); - 00060 83 7d 64 00 cmp DWORD PTR t$[rbp], 0 - 00064 7c 06 jl SHORT $LN7@stbi__jpeg - 00066 83 7d 64 0f cmp DWORD PTR t$[rbp], 15 - 0006a 7e 11 jle SHORT $LN6@stbi__jpeg + 00062 83 7d 64 00 cmp DWORD PTR t$[rbp], 0 + 00066 7c 06 jl SHORT $LN7@stbi__jpeg + 00068 83 7d 64 0f cmp DWORD PTR t$[rbp], 15 + 0006c 7e 11 jle SHORT $LN6@stbi__jpeg $LN7@stbi__jpeg: - 0006c 48 8d 0d 00 00 + 0006e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ - 00073 e8 00 00 00 00 call stbi__err - 00078 e9 50 03 00 00 jmp $LN1@stbi__jpeg + 00075 e8 00 00 00 00 call stbi__err + 0007a e9 52 03 00 00 jmp $LN1@stbi__jpeg $LN6@stbi__jpeg: ; 1680 : ; 1681 : // 0 all the ac values now so we can do it 32-bits at a time ; 1682 : memset(data, 0, 64 * sizeof(data[0])); - 0007d 41 b8 80 00 00 + 0007f 41 b8 80 00 00 00 mov r8d, 128 ; 00000080H - 00083 33 d2 xor edx, edx - 00085 48 8b 8d 08 02 + 00085 33 d2 xor edx, edx + 00087 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR data$[rbp] - 0008c e8 00 00 00 00 call memset + 0008e e8 00 00 00 00 call memset + 00093 90 npad 1 ; 1683 : ; 1684 : diff = t ? stbi__extend_receive(j, t) : 0; - 00091 83 7d 64 00 cmp DWORD PTR t$[rbp], 0 - 00095 74 17 je SHORT $LN19@stbi__jpeg - 00097 8b 55 64 mov edx, DWORD PTR t$[rbp] - 0009a 48 8b 8d 00 02 + 00094 83 7d 64 00 cmp DWORD PTR t$[rbp], 0 + 00098 74 17 je SHORT $LN19@stbi__jpeg + 0009a 8b 55 64 mov edx, DWORD PTR t$[rbp] + 0009d 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR j$[rbp] - 000a1 e8 00 00 00 00 call stbi__extend_receive - 000a6 89 85 d4 01 00 + 000a4 e8 00 00 00 00 call stbi__extend_receive + 000a9 89 85 d4 01 00 00 mov DWORD PTR tv81[rbp], eax - 000ac eb 0a jmp SHORT $LN20@stbi__jpeg + 000af eb 0a jmp SHORT $LN20@stbi__jpeg $LN19@stbi__jpeg: - 000ae c7 85 d4 01 00 + 000b1 c7 85 d4 01 00 00 00 00 00 00 mov DWORD PTR tv81[rbp], 0 $LN20@stbi__jpeg: - 000b8 8b 85 d4 01 00 + 000bb 8b 85 d4 01 00 00 mov eax, DWORD PTR tv81[rbp] - 000be 89 45 04 mov DWORD PTR diff$[rbp], eax + 000c1 89 45 04 mov DWORD PTR diff$[rbp], eax ; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); - 000c1 48 63 85 28 02 + 000c4 48 63 85 28 02 00 00 movsxd rax, DWORD PTR b$[rbp] - 000c8 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 000cc 8b 55 04 mov edx, DWORD PTR diff$[rbp] - 000cf 48 8b 8d 00 02 + 000cb 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 000cf 8b 55 04 mov edx, DWORD PTR diff$[rbp] + 000d2 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR j$[rbp] - 000d6 8b 8c 01 b8 46 + 000d9 8b 8c 01 b8 46 00 00 mov ecx, DWORD PTR [rcx+rax+18104] - 000dd e8 00 00 00 00 call stbi__addints_valid - 000e2 85 c0 test eax, eax - 000e4 75 11 jne SHORT $LN8@stbi__jpeg - 000e6 48 8d 0d 00 00 + 000e0 e8 00 00 00 00 call stbi__addints_valid + 000e5 85 c0 test eax, eax + 000e7 75 11 jne SHORT $LN8@stbi__jpeg + 000e9 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09IFDKCGFO@bad?5delta@ - 000ed e8 00 00 00 00 call stbi__err - 000f2 e9 d6 02 00 00 jmp $LN1@stbi__jpeg + 000f0 e8 00 00 00 00 call stbi__err + 000f5 e9 d7 02 00 00 jmp $LN1@stbi__jpeg $LN8@stbi__jpeg: ; 1686 : dc = j->img_comp[b].dc_pred + diff; - 000f7 48 63 85 28 02 + 000fa 48 63 85 28 02 00 00 movsxd rax, DWORD PTR b$[rbp] - 000fe 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00102 48 8b 8d 00 02 + 00101 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00105 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00109 8b 84 01 b8 46 + 0010c 8b 84 01 b8 46 00 00 mov eax, DWORD PTR [rcx+rax+18104] - 00110 03 45 04 add eax, DWORD PTR diff$[rbp] - 00113 89 45 24 mov DWORD PTR dc$[rbp], eax + 00113 03 45 04 add eax, DWORD PTR diff$[rbp] + 00116 89 45 24 mov DWORD PTR dc$[rbp], eax ; 1687 : j->img_comp[b].dc_pred = dc; - 00116 48 63 85 28 02 + 00119 48 63 85 28 02 00 00 movsxd rax, DWORD PTR b$[rbp] - 0011d 48 6b c0 60 imul rax, rax, 96 ; 00000060H - 00121 48 8b 8d 00 02 + 00120 48 6b c0 60 imul rax, rax, 96 ; 00000060H + 00124 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00128 8b 55 24 mov edx, DWORD PTR dc$[rbp] - 0012b 89 94 01 b8 46 + 0012b 8b 55 24 mov edx, DWORD PTR dc$[rbp] + 0012e 89 94 01 b8 46 00 00 mov DWORD PTR [rcx+rax+18104], edx ; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - 00132 b8 02 00 00 00 mov eax, 2 - 00137 48 6b c0 00 imul rax, rax, 0 - 0013b 48 8b 8d 30 02 + 00135 b8 02 00 00 00 mov eax, 2 + 0013a 48 6b c0 00 imul rax, rax, 0 + 0013e 48 8b 8d 30 02 00 00 mov rcx, QWORD PTR dequant$[rbp] - 00142 0f b7 14 01 movzx edx, WORD PTR [rcx+rax] - 00146 0f b7 4d 24 movzx ecx, WORD PTR dc$[rbp] - 0014a e8 00 00 00 00 call stbi__mul2shorts_valid - 0014f 85 c0 test eax, eax - 00151 75 11 jne SHORT $LN9@stbi__jpeg - 00153 48 8d 0d 00 00 + 00145 0f b7 14 01 movzx edx, WORD PTR [rcx+rax] + 00149 0f b7 4d 24 movzx ecx, WORD PTR dc$[rbp] + 0014d e8 00 00 00 00 call stbi__mul2shorts_valid + 00152 85 c0 test eax, eax + 00154 75 11 jne SHORT $LN9@stbi__jpeg + 00156 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BG@PJBJDAGM@can?8t?5merge?5dc?5and?5ac@ - 0015a e8 00 00 00 00 call stbi__err - 0015f e9 69 02 00 00 jmp $LN1@stbi__jpeg + 0015d e8 00 00 00 00 call stbi__err + 00162 e9 6a 02 00 00 jmp $LN1@stbi__jpeg $LN9@stbi__jpeg: ; 1689 : data[0] = (short)(dc * dequant[0]); - 00164 b8 02 00 00 00 mov eax, 2 - 00169 48 6b c0 00 imul rax, rax, 0 - 0016d 48 8b 8d 30 02 + 00167 b8 02 00 00 00 mov eax, 2 + 0016c 48 6b c0 00 imul rax, rax, 0 + 00170 48 8b 8d 30 02 00 00 mov rcx, QWORD PTR dequant$[rbp] - 00174 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 00178 8b 4d 24 mov ecx, DWORD PTR dc$[rbp] - 0017b 0f af c8 imul ecx, eax - 0017e 8b c1 mov eax, ecx - 00180 b9 02 00 00 00 mov ecx, 2 - 00185 48 6b c9 00 imul rcx, rcx, 0 - 00189 48 8b 95 08 02 + 00177 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 0017b 8b 4d 24 mov ecx, DWORD PTR dc$[rbp] + 0017e 0f af c8 imul ecx, eax + 00181 8b c1 mov eax, ecx + 00183 b9 02 00 00 00 mov ecx, 2 + 00188 48 6b c9 00 imul rcx, rcx, 0 + 0018c 48 8b 95 08 02 00 00 mov rdx, QWORD PTR data$[rbp] - 00190 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00193 66 89 04 0a mov WORD PTR [rdx+rcx], ax ; 1690 : ; 1691 : // decode AC components, see JPEG spec ; 1692 : k = 1; - 00194 c7 45 44 01 00 + 00197 c7 45 44 01 00 00 00 mov DWORD PTR k$[rbp], 1 $LN4@stbi__jpeg: @@ -36644,250 +36849,251 @@ $LN4@stbi__jpeg: ; 1695 : int c, r, s; ; 1696 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - 0019b 48 8b 85 00 02 + 0019e 48 8b 85 00 02 00 00 mov rax, QWORD PTR j$[rbp] - 001a2 83 b8 24 48 00 + 001a5 83 b8 24 48 00 00 10 cmp DWORD PTR [rax+18468], 16 - 001a9 7d 0c jge SHORT $LN10@stbi__jpeg - 001ab 48 8b 8d 00 02 + 001ac 7d 0d jge SHORT $LN10@stbi__jpeg + 001ae 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR j$[rbp] - 001b2 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 001b5 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 001ba 90 npad 1 $LN10@stbi__jpeg: ; 1697 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); - 001b7 48 8b 85 00 02 + 001bb 48 8b 85 00 02 00 00 mov rax, QWORD PTR j$[rbp] - 001be 8b 80 20 48 00 + 001c2 8b 80 20 48 00 00 mov eax, DWORD PTR [rax+18464] - 001c4 c1 e8 17 shr eax, 23 - 001c7 25 ff 01 00 00 and eax, 511 ; 000001ffH - 001cc 89 85 a4 00 00 + 001c8 c1 e8 17 shr eax, 23 + 001cb 25 ff 01 00 00 and eax, 511 ; 000001ffH + 001d0 89 85 a4 00 00 00 mov DWORD PTR c$2[rbp], eax ; 1698 : r = fac[c]; - 001d2 48 63 85 a4 00 + 001d6 48 63 85 a4 00 00 00 movsxd rax, DWORD PTR c$2[rbp] - 001d9 48 8b 8d 20 02 + 001dd 48 8b 8d 20 02 00 00 mov rcx, QWORD PTR fac$[rbp] - 001e0 0f bf 04 41 movsx eax, WORD PTR [rcx+rax*2] - 001e4 89 85 c4 00 00 + 001e4 0f bf 04 41 movsx eax, WORD PTR [rcx+rax*2] + 001e8 89 85 c4 00 00 00 mov DWORD PTR r$3[rbp], eax ; 1699 : if (r) { // fast-AC path - 001ea 83 bd c4 00 00 + 001ee 83 bd c4 00 00 00 00 cmp DWORD PTR r$3[rbp], 0 - 001f1 0f 84 f0 00 00 + 001f5 0f 84 f0 00 00 00 je $LN11@stbi__jpeg ; 1700 : k += (r >> 4) & 15; // run - 001f7 8b 85 c4 00 00 + 001fb 8b 85 c4 00 00 00 mov eax, DWORD PTR r$3[rbp] - 001fd c1 f8 04 sar eax, 4 - 00200 83 e0 0f and eax, 15 - 00203 8b 4d 44 mov ecx, DWORD PTR k$[rbp] - 00206 03 c8 add ecx, eax - 00208 8b c1 mov eax, ecx - 0020a 89 45 44 mov DWORD PTR k$[rbp], eax + 00201 c1 f8 04 sar eax, 4 + 00204 83 e0 0f and eax, 15 + 00207 8b 4d 44 mov ecx, DWORD PTR k$[rbp] + 0020a 03 c8 add ecx, eax + 0020c 8b c1 mov eax, ecx + 0020e 89 45 44 mov DWORD PTR k$[rbp], eax ; 1701 : s = r & 15; // combined length - 0020d 8b 85 c4 00 00 + 00211 8b 85 c4 00 00 00 mov eax, DWORD PTR r$3[rbp] - 00213 83 e0 0f and eax, 15 - 00216 89 85 e4 00 00 + 00217 83 e0 0f and eax, 15 + 0021a 89 85 e4 00 00 00 mov DWORD PTR s$4[rbp], eax ; 1702 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); - 0021c 48 8b 85 00 02 + 00220 48 8b 85 00 02 00 00 mov rax, QWORD PTR j$[rbp] - 00223 8b 80 24 48 00 + 00227 8b 80 24 48 00 00 mov eax, DWORD PTR [rax+18468] - 00229 39 85 e4 00 00 + 0022d 39 85 e4 00 00 00 cmp DWORD PTR s$4[rbp], eax - 0022f 7e 11 jle SHORT $LN13@stbi__jpeg - 00231 48 8d 0d 00 00 + 00233 7e 11 jle SHORT $LN13@stbi__jpeg + 00235 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ - 00238 e8 00 00 00 00 call stbi__err - 0023d e9 8b 01 00 00 jmp $LN1@stbi__jpeg + 0023c e8 00 00 00 00 call stbi__err + 00241 e9 8b 01 00 00 jmp $LN1@stbi__jpeg $LN13@stbi__jpeg: ; 1703 : j->code_buffer <<= s; - 00242 8b 85 e4 00 00 + 00246 8b 85 e4 00 00 00 mov eax, DWORD PTR s$4[rbp] - 00248 48 8b 8d 00 02 + 0024c 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR j$[rbp] - 0024f 48 89 8d d8 01 + 00253 48 89 8d d8 01 00 00 mov QWORD PTR tv275[rbp], rcx - 00256 0f b6 c8 movzx ecx, al - 00259 48 8b 85 d8 01 + 0025a 0f b6 c8 movzx ecx, al + 0025d 48 8b 85 d8 01 00 00 mov rax, QWORD PTR tv275[rbp] - 00260 8b 80 20 48 00 + 00264 8b 80 20 48 00 00 mov eax, DWORD PTR [rax+18464] - 00266 d3 e0 shl eax, cl - 00268 48 8b 8d 00 02 + 0026a d3 e0 shl eax, cl + 0026c 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR j$[rbp] - 0026f 89 81 20 48 00 + 00273 89 81 20 48 00 00 mov DWORD PTR [rcx+18464], eax ; 1704 : j->code_bits -= s; - 00275 48 8b 85 00 02 + 00279 48 8b 85 00 02 00 00 mov rax, QWORD PTR j$[rbp] - 0027c 8b 8d e4 00 00 + 00280 8b 8d e4 00 00 00 mov ecx, DWORD PTR s$4[rbp] - 00282 8b 80 24 48 00 + 00286 8b 80 24 48 00 00 mov eax, DWORD PTR [rax+18468] - 00288 2b c1 sub eax, ecx - 0028a 48 8b 8d 00 02 + 0028c 2b c1 sub eax, ecx + 0028e 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00291 89 81 24 48 00 + 00295 89 81 24 48 00 00 mov DWORD PTR [rcx+18468], eax ; 1705 : // decode into unzigzag'd location ; 1706 : zig = stbi__jpeg_dezigzag[k++]; - 00297 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] - 0029b 48 8d 0d 00 00 + 0029b 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] + 0029f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__jpeg_dezigzag - 002a2 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 002a6 89 85 84 00 00 + 002a6 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 002aa 89 85 84 00 00 00 mov DWORD PTR zig$1[rbp], eax - 002ac 8b 45 44 mov eax, DWORD PTR k$[rbp] - 002af ff c0 inc eax - 002b1 89 45 44 mov DWORD PTR k$[rbp], eax + 002b0 8b 45 44 mov eax, DWORD PTR k$[rbp] + 002b3 ff c0 inc eax + 002b5 89 45 44 mov DWORD PTR k$[rbp], eax ; 1707 : data[zig] = (short)((r >> 8) * dequant[zig]); - 002b4 8b 85 c4 00 00 + 002b8 8b 85 c4 00 00 00 mov eax, DWORD PTR r$3[rbp] - 002ba c1 f8 08 sar eax, 8 - 002bd 8b 8d 84 00 00 + 002be c1 f8 08 sar eax, 8 + 002c1 8b 8d 84 00 00 00 mov ecx, DWORD PTR zig$1[rbp] - 002c3 48 8b 95 30 02 + 002c7 48 8b 95 30 02 00 00 mov rdx, QWORD PTR dequant$[rbp] - 002ca 0f b7 0c 4a movzx ecx, WORD PTR [rdx+rcx*2] - 002ce 0f af c1 imul eax, ecx - 002d1 8b 8d 84 00 00 + 002ce 0f b7 0c 4a movzx ecx, WORD PTR [rdx+rcx*2] + 002d2 0f af c1 imul eax, ecx + 002d5 8b 8d 84 00 00 00 mov ecx, DWORD PTR zig$1[rbp] - 002d7 48 8b 95 08 02 + 002db 48 8b 95 08 02 00 00 mov rdx, QWORD PTR data$[rbp] - 002de 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax + 002e2 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax ; 1708 : } - 002e2 e9 d7 00 00 00 jmp $LN12@stbi__jpeg + 002e6 e9 d7 00 00 00 jmp $LN12@stbi__jpeg $LN11@stbi__jpeg: ; 1709 : else { ; 1710 : int rs = stbi__jpeg_huff_decode(j, hac); - 002e7 48 8b 95 18 02 + 002eb 48 8b 95 18 02 00 00 mov rdx, QWORD PTR hac$[rbp] - 002ee 48 8b 8d 00 02 + 002f2 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR j$[rbp] - 002f5 e8 00 00 00 00 call stbi__jpeg_huff_decode - 002fa 89 85 04 01 00 + 002f9 e8 00 00 00 00 call stbi__jpeg_huff_decode + 002fe 89 85 04 01 00 00 mov DWORD PTR rs$5[rbp], eax ; 1711 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); - 00300 83 bd 04 01 00 + 00304 83 bd 04 01 00 00 00 cmp DWORD PTR rs$5[rbp], 0 - 00307 7d 11 jge SHORT $LN14@stbi__jpeg - 00309 48 8d 0d 00 00 + 0030b 7d 11 jge SHORT $LN14@stbi__jpeg + 0030d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ - 00310 e8 00 00 00 00 call stbi__err - 00315 e9 b3 00 00 00 jmp $LN1@stbi__jpeg + 00314 e8 00 00 00 00 call stbi__err + 00319 e9 b3 00 00 00 jmp $LN1@stbi__jpeg $LN14@stbi__jpeg: ; 1712 : s = rs & 15; - 0031a 8b 85 04 01 00 + 0031e 8b 85 04 01 00 00 mov eax, DWORD PTR rs$5[rbp] - 00320 83 e0 0f and eax, 15 - 00323 89 85 e4 00 00 + 00324 83 e0 0f and eax, 15 + 00327 89 85 e4 00 00 00 mov DWORD PTR s$4[rbp], eax ; 1713 : r = rs >> 4; - 00329 8b 85 04 01 00 + 0032d 8b 85 04 01 00 00 mov eax, DWORD PTR rs$5[rbp] - 0032f c1 f8 04 sar eax, 4 - 00332 89 85 c4 00 00 + 00333 c1 f8 04 sar eax, 4 + 00336 89 85 c4 00 00 00 mov DWORD PTR r$3[rbp], eax ; 1714 : if (s == 0) { - 00338 83 bd e4 00 00 + 0033c 83 bd e4 00 00 00 00 cmp DWORD PTR s$4[rbp], 0 - 0033f 75 19 jne SHORT $LN15@stbi__jpeg + 00343 75 19 jne SHORT $LN15@stbi__jpeg ; 1715 : if (rs != 0xf0) break; // end block - 00341 81 bd 04 01 00 + 00345 81 bd 04 01 00 00 f0 00 00 00 cmp DWORD PTR rs$5[rbp], 240 ; 000000f0H - 0034b 74 02 je SHORT $LN17@stbi__jpeg - 0034d eb 79 jmp SHORT $LN3@stbi__jpeg + 0034f 74 02 je SHORT $LN17@stbi__jpeg + 00351 eb 79 jmp SHORT $LN3@stbi__jpeg $LN17@stbi__jpeg: ; 1716 : k += 16; - 0034f 8b 45 44 mov eax, DWORD PTR k$[rbp] - 00352 83 c0 10 add eax, 16 - 00355 89 45 44 mov DWORD PTR k$[rbp], eax + 00353 8b 45 44 mov eax, DWORD PTR k$[rbp] + 00356 83 c0 10 add eax, 16 + 00359 89 45 44 mov DWORD PTR k$[rbp], eax ; 1717 : } - 00358 eb 64 jmp SHORT $LN16@stbi__jpeg + 0035c eb 64 jmp SHORT $LN16@stbi__jpeg $LN15@stbi__jpeg: ; 1718 : else { ; 1719 : k += r; - 0035a 8b 85 c4 00 00 + 0035e 8b 85 c4 00 00 00 mov eax, DWORD PTR r$3[rbp] - 00360 8b 4d 44 mov ecx, DWORD PTR k$[rbp] - 00363 03 c8 add ecx, eax - 00365 8b c1 mov eax, ecx - 00367 89 45 44 mov DWORD PTR k$[rbp], eax + 00364 8b 4d 44 mov ecx, DWORD PTR k$[rbp] + 00367 03 c8 add ecx, eax + 00369 8b c1 mov eax, ecx + 0036b 89 45 44 mov DWORD PTR k$[rbp], eax ; 1720 : // decode into unzigzag'd location ; 1721 : zig = stbi__jpeg_dezigzag[k++]; - 0036a 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] - 0036e 48 8d 0d 00 00 + 0036e 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] + 00372 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__jpeg_dezigzag - 00375 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00379 89 85 84 00 00 + 00379 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0037d 89 85 84 00 00 00 mov DWORD PTR zig$1[rbp], eax - 0037f 8b 45 44 mov eax, DWORD PTR k$[rbp] - 00382 ff c0 inc eax - 00384 89 45 44 mov DWORD PTR k$[rbp], eax + 00383 8b 45 44 mov eax, DWORD PTR k$[rbp] + 00386 ff c0 inc eax + 00388 89 45 44 mov DWORD PTR k$[rbp], eax ; 1722 : data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]); - 00387 8b 95 e4 00 00 + 0038b 8b 95 e4 00 00 00 mov edx, DWORD PTR s$4[rbp] - 0038d 48 8b 8d 00 02 + 00391 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR j$[rbp] - 00394 e8 00 00 00 00 call stbi__extend_receive - 00399 8b 8d 84 00 00 + 00398 e8 00 00 00 00 call stbi__extend_receive + 0039d 8b 8d 84 00 00 00 mov ecx, DWORD PTR zig$1[rbp] - 0039f 48 8b 95 30 02 + 003a3 48 8b 95 30 02 00 00 mov rdx, QWORD PTR dequant$[rbp] - 003a6 0f b7 0c 4a movzx ecx, WORD PTR [rdx+rcx*2] - 003aa 0f af c1 imul eax, ecx - 003ad 8b 8d 84 00 00 + 003aa 0f b7 0c 4a movzx ecx, WORD PTR [rdx+rcx*2] + 003ae 0f af c1 imul eax, ecx + 003b1 8b 8d 84 00 00 00 mov ecx, DWORD PTR zig$1[rbp] - 003b3 48 8b 95 08 02 + 003b7 48 8b 95 08 02 00 00 mov rdx, QWORD PTR data$[rbp] - 003ba 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax + 003be 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax $LN16@stbi__jpeg: $LN12@stbi__jpeg: @@ -36895,23 +37101,23 @@ $LN12@stbi__jpeg: ; 1724 : } ; 1725 : } while (k < 64); - 003be 83 7d 44 40 cmp DWORD PTR k$[rbp], 64 ; 00000040H - 003c2 0f 8c d3 fd ff + 003c2 83 7d 44 40 cmp DWORD PTR k$[rbp], 64 ; 00000040H + 003c6 0f 8c d2 fd ff ff jl $LN4@stbi__jpeg $LN3@stbi__jpeg: ; 1726 : return 1; - 003c8 b8 01 00 00 00 mov eax, 1 + 003cc b8 01 00 00 00 mov eax, 1 $LN1@stbi__jpeg: ; 1727 : } - 003cd 48 8d a5 e8 01 + 003d1 48 8d a5 e8 01 00 00 lea rsp, QWORD PTR [rbp+488] - 003d4 5f pop rdi - 003d5 5d pop rbp - 003d6 c3 ret 0 + 003d8 5f pop rdi + 003d9 5d pop rbp + 003da c3 ret 0 stbi__jpeg_decode_block ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -36933,76 +37139,78 @@ stbi__jpeg_get_bit PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 1645 : unsigned int k; ; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); - 0001f 48 8b 85 00 01 + 00020 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 00026 83 b8 24 48 00 + 00027 83 b8 24 48 00 00 01 cmp DWORD PTR [rax+18468], 1 - 0002d 7d 0c jge SHORT $LN2@stbi__jpeg - 0002f 48 8b 8d 00 01 + 0002e 7d 0d jge SHORT $LN2@stbi__jpeg + 00030 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR j$[rbp] - 00036 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 00037 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 0003c 90 npad 1 $LN2@stbi__jpeg: ; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing - 0003b 48 8b 85 00 01 + 0003d 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 00042 83 b8 24 48 00 + 00044 83 b8 24 48 00 00 01 cmp DWORD PTR [rax+18468], 1 - 00049 7d 04 jge SHORT $LN3@stbi__jpeg - 0004b 33 c0 xor eax, eax - 0004d eb 50 jmp SHORT $LN1@stbi__jpeg + 0004b 7d 04 jge SHORT $LN3@stbi__jpeg + 0004d 33 c0 xor eax, eax + 0004f eb 50 jmp SHORT $LN1@stbi__jpeg $LN3@stbi__jpeg: ; 1648 : k = j->code_buffer; - 0004f 48 8b 85 00 01 + 00051 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 00056 8b 80 20 48 00 + 00058 8b 80 20 48 00 00 mov eax, DWORD PTR [rax+18464] - 0005c 89 45 04 mov DWORD PTR k$[rbp], eax + 0005e 89 45 04 mov DWORD PTR k$[rbp], eax ; 1649 : j->code_buffer <<= 1; - 0005f 48 8b 85 00 01 + 00061 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 00066 8b 80 20 48 00 + 00068 8b 80 20 48 00 00 mov eax, DWORD PTR [rax+18464] - 0006c d1 e0 shl eax, 1 - 0006e 48 8b 8d 00 01 + 0006e d1 e0 shl eax, 1 + 00070 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR j$[rbp] - 00075 89 81 20 48 00 + 00077 89 81 20 48 00 00 mov DWORD PTR [rcx+18464], eax ; 1650 : --j->code_bits; - 0007b 48 8b 85 00 01 + 0007d 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 00082 8b 80 24 48 00 + 00084 8b 80 24 48 00 00 mov eax, DWORD PTR [rax+18468] - 00088 ff c8 dec eax - 0008a 48 8b 8d 00 01 + 0008a ff c8 dec eax + 0008c 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR j$[rbp] - 00091 89 81 24 48 00 + 00093 89 81 24 48 00 00 mov DWORD PTR [rcx+18468], eax ; 1651 : return k & 0x80000000; - 00097 8b 45 04 mov eax, DWORD PTR k$[rbp] - 0009a 25 00 00 00 80 and eax, -2147483648 ; 80000000H + 00099 8b 45 04 mov eax, DWORD PTR k$[rbp] + 0009c 25 00 00 00 80 and eax, -2147483648 ; 80000000H $LN1@stbi__jpeg: ; 1652 : } - 0009f 48 8d a5 e8 00 + 000a1 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 000a6 5f pop rdi - 000a7 5d pop rbp - 000a8 c3 ret 0 + 000a8 5f pop rdi + 000a9 5d pop rbp + 000aa c3 ret 0 stbi__jpeg_get_bit ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -37026,100 +37234,102 @@ stbi__jpeg_get_bits PROC ; COMDAT 00017 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001e e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00023 90 npad 1 ; 1633 : unsigned int k; ; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); - 00023 48 8b 85 00 01 + 00024 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 0002a 8b 8d 08 01 00 + 0002b 8b 8d 08 01 00 00 mov ecx, DWORD PTR n$[rbp] - 00030 39 88 24 48 00 + 00031 39 88 24 48 00 00 cmp DWORD PTR [rax+18468], ecx - 00036 7d 0c jge SHORT $LN2@stbi__jpeg - 00038 48 8b 8d 00 01 + 00037 7d 0d jge SHORT $LN2@stbi__jpeg + 00039 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0003f e8 00 00 00 00 call stbi__grow_buffer_unsafe + 00040 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 00045 90 npad 1 $LN2@stbi__jpeg: ; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing - 00044 48 8b 85 00 01 + 00046 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 0004b 8b 8d 08 01 00 + 0004d 8b 8d 08 01 00 00 mov ecx, DWORD PTR n$[rbp] - 00051 39 88 24 48 00 + 00053 39 88 24 48 00 00 cmp DWORD PTR [rax+18468], ecx - 00057 7d 07 jge SHORT $LN3@stbi__jpeg - 00059 33 c0 xor eax, eax - 0005b e9 82 00 00 00 jmp $LN1@stbi__jpeg + 00059 7d 07 jge SHORT $LN3@stbi__jpeg + 0005b 33 c0 xor eax, eax + 0005d e9 82 00 00 00 jmp $LN1@stbi__jpeg $LN3@stbi__jpeg: ; 1636 : k = stbi_lrot(j->code_buffer, n); - 00060 8b 95 08 01 00 + 00062 8b 95 08 01 00 00 mov edx, DWORD PTR n$[rbp] - 00066 48 8b 85 00 01 + 00068 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 0006d 8b 88 20 48 00 + 0006f 8b 88 20 48 00 00 mov ecx, DWORD PTR [rax+18464] - 00073 e8 00 00 00 00 call _lrotl - 00078 89 45 04 mov DWORD PTR k$[rbp], eax + 00075 e8 00 00 00 00 call _lrotl + 0007a 89 45 04 mov DWORD PTR k$[rbp], eax ; 1637 : j->code_buffer = k & ~stbi__bmask[n]; - 0007b 48 63 85 08 01 + 0007d 48 63 85 08 01 00 00 movsxd rax, DWORD PTR n$[rbp] - 00082 48 8d 0d 00 00 + 00084 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__bmask - 00089 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] - 0008c f7 d0 not eax - 0008e 8b 4d 04 mov ecx, DWORD PTR k$[rbp] - 00091 23 c8 and ecx, eax - 00093 8b c1 mov eax, ecx - 00095 48 8b 8d 00 01 + 0008b 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] + 0008e f7 d0 not eax + 00090 8b 4d 04 mov ecx, DWORD PTR k$[rbp] + 00093 23 c8 and ecx, eax + 00095 8b c1 mov eax, ecx + 00097 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0009c 89 81 20 48 00 + 0009e 89 81 20 48 00 00 mov DWORD PTR [rcx+18464], eax ; 1638 : k &= stbi__bmask[n]; - 000a2 48 63 85 08 01 + 000a4 48 63 85 08 01 00 00 movsxd rax, DWORD PTR n$[rbp] - 000a9 48 8d 0d 00 00 + 000ab 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__bmask - 000b0 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] - 000b3 8b 4d 04 mov ecx, DWORD PTR k$[rbp] - 000b6 23 c8 and ecx, eax - 000b8 8b c1 mov eax, ecx - 000ba 89 45 04 mov DWORD PTR k$[rbp], eax + 000b2 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] + 000b5 8b 4d 04 mov ecx, DWORD PTR k$[rbp] + 000b8 23 c8 and ecx, eax + 000ba 8b c1 mov eax, ecx + 000bc 89 45 04 mov DWORD PTR k$[rbp], eax ; 1639 : j->code_bits -= n; - 000bd 48 8b 85 00 01 + 000bf 48 8b 85 00 01 00 00 mov rax, QWORD PTR j$[rbp] - 000c4 8b 8d 08 01 00 + 000c6 8b 8d 08 01 00 00 mov ecx, DWORD PTR n$[rbp] - 000ca 8b 80 24 48 00 + 000cc 8b 80 24 48 00 00 mov eax, DWORD PTR [rax+18468] - 000d0 2b c1 sub eax, ecx - 000d2 48 8b 8d 00 01 + 000d2 2b c1 sub eax, ecx + 000d4 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR j$[rbp] - 000d9 89 81 24 48 00 + 000db 89 81 24 48 00 00 mov DWORD PTR [rcx+18468], eax ; 1640 : return k; - 000df 8b 45 04 mov eax, DWORD PTR k$[rbp] + 000e1 8b 45 04 mov eax, DWORD PTR k$[rbp] $LN1@stbi__jpeg: ; 1641 : } - 000e2 48 8d a5 e8 00 + 000e4 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 000e9 5f pop rdi - 000ea 5d pop rbp - 000eb c3 ret 0 + 000eb 5f pop rdi + 000ec 5d pop rbp + 000ed c3 ret 0 stbi__jpeg_get_bits ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -37144,121 +37354,123 @@ stbi__extend_receive PROC ; COMDAT 00017 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001e e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00023 90 npad 1 ; 1617 : unsigned int k; ; 1618 : int sgn; ; 1619 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); - 00023 48 8b 85 20 01 + 00024 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 0002a 8b 8d 28 01 00 + 0002b 8b 8d 28 01 00 00 mov ecx, DWORD PTR n$[rbp] - 00030 39 88 24 48 00 + 00031 39 88 24 48 00 00 cmp DWORD PTR [rax+18468], ecx - 00036 7d 0c jge SHORT $LN2@stbi__exte - 00038 48 8b 8d 20 01 + 00037 7d 0d jge SHORT $LN2@stbi__exte + 00039 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0003f e8 00 00 00 00 call stbi__grow_buffer_unsafe + 00040 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 00045 90 npad 1 $LN2@stbi__exte: ; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing - 00044 48 8b 85 20 01 + 00046 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 0004b 8b 8d 28 01 00 + 0004d 8b 8d 28 01 00 00 mov ecx, DWORD PTR n$[rbp] - 00051 39 88 24 48 00 + 00053 39 88 24 48 00 00 cmp DWORD PTR [rax+18468], ecx - 00057 7d 07 jge SHORT $LN3@stbi__exte - 00059 33 c0 xor eax, eax - 0005b e9 b1 00 00 00 jmp $LN1@stbi__exte + 00059 7d 07 jge SHORT $LN3@stbi__exte + 0005b 33 c0 xor eax, eax + 0005d e9 b1 00 00 00 jmp $LN1@stbi__exte $LN3@stbi__exte: ; 1621 : ; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) - 00060 48 8b 85 20 01 + 00062 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 00067 8b 80 20 48 00 + 00069 8b 80 20 48 00 00 mov eax, DWORD PTR [rax+18464] - 0006d c1 e8 1f shr eax, 31 - 00070 89 45 24 mov DWORD PTR sgn$[rbp], eax + 0006f c1 e8 1f shr eax, 31 + 00072 89 45 24 mov DWORD PTR sgn$[rbp], eax ; 1623 : k = stbi_lrot(j->code_buffer, n); - 00073 8b 95 28 01 00 + 00075 8b 95 28 01 00 00 mov edx, DWORD PTR n$[rbp] - 00079 48 8b 85 20 01 + 0007b 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 00080 8b 88 20 48 00 + 00082 8b 88 20 48 00 00 mov ecx, DWORD PTR [rax+18464] - 00086 e8 00 00 00 00 call _lrotl - 0008b 89 45 04 mov DWORD PTR k$[rbp], eax + 00088 e8 00 00 00 00 call _lrotl + 0008d 89 45 04 mov DWORD PTR k$[rbp], eax ; 1624 : j->code_buffer = k & ~stbi__bmask[n]; - 0008e 48 63 85 28 01 + 00090 48 63 85 28 01 00 00 movsxd rax, DWORD PTR n$[rbp] - 00095 48 8d 0d 00 00 + 00097 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__bmask - 0009c 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] - 0009f f7 d0 not eax - 000a1 8b 4d 04 mov ecx, DWORD PTR k$[rbp] - 000a4 23 c8 and ecx, eax - 000a6 8b c1 mov eax, ecx - 000a8 48 8b 8d 20 01 + 0009e 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] + 000a1 f7 d0 not eax + 000a3 8b 4d 04 mov ecx, DWORD PTR k$[rbp] + 000a6 23 c8 and ecx, eax + 000a8 8b c1 mov eax, ecx + 000aa 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR j$[rbp] - 000af 89 81 20 48 00 + 000b1 89 81 20 48 00 00 mov DWORD PTR [rcx+18464], eax ; 1625 : k &= stbi__bmask[n]; - 000b5 48 63 85 28 01 + 000b7 48 63 85 28 01 00 00 movsxd rax, DWORD PTR n$[rbp] - 000bc 48 8d 0d 00 00 + 000be 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__bmask - 000c3 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] - 000c6 8b 4d 04 mov ecx, DWORD PTR k$[rbp] - 000c9 23 c8 and ecx, eax - 000cb 8b c1 mov eax, ecx - 000cd 89 45 04 mov DWORD PTR k$[rbp], eax + 000c5 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] + 000c8 8b 4d 04 mov ecx, DWORD PTR k$[rbp] + 000cb 23 c8 and ecx, eax + 000cd 8b c1 mov eax, ecx + 000cf 89 45 04 mov DWORD PTR k$[rbp], eax ; 1626 : j->code_bits -= n; - 000d0 48 8b 85 20 01 + 000d2 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 000d7 8b 8d 28 01 00 + 000d9 8b 8d 28 01 00 00 mov ecx, DWORD PTR n$[rbp] - 000dd 8b 80 24 48 00 + 000df 8b 80 24 48 00 00 mov eax, DWORD PTR [rax+18468] - 000e3 2b c1 sub eax, ecx - 000e5 48 8b 8d 20 01 + 000e5 2b c1 sub eax, ecx + 000e7 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR j$[rbp] - 000ec 89 81 24 48 00 + 000ee 89 81 24 48 00 00 mov DWORD PTR [rcx+18468], eax ; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); - 000f2 48 63 85 28 01 + 000f4 48 63 85 28 01 00 00 movsxd rax, DWORD PTR n$[rbp] - 000f9 48 8d 0d 00 00 + 000fb 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__jbias - 00100 8b 55 24 mov edx, DWORD PTR sgn$[rbp] - 00103 ff ca dec edx - 00105 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] - 00108 23 c2 and eax, edx - 0010a 8b 4d 04 mov ecx, DWORD PTR k$[rbp] - 0010d 03 c8 add ecx, eax - 0010f 8b c1 mov eax, ecx + 00102 8b 55 24 mov edx, DWORD PTR sgn$[rbp] + 00105 ff ca dec edx + 00107 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] + 0010a 23 c2 and eax, edx + 0010c 8b 4d 04 mov ecx, DWORD PTR k$[rbp] + 0010f 03 c8 add ecx, eax + 00111 8b c1 mov eax, ecx $LN1@stbi__exte: ; 1628 : } - 00111 48 8d a5 08 01 + 00113 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 00118 5f pop rdi - 00119 5d pop rbp - 0011a c3 ret 0 + 0011a 5f pop rdi + 0011b 5d pop rbp + 0011c c3 ret 0 stbi__extend_receive ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -37269,10 +37481,10 @@ temp$ = 4 c$ = 36 k$ = 68 s$1 = 100 -tv253 = 312 -tv242 = 312 -tv233 = 312 tv212 = 312 +tv233 = 312 +tv242 = 312 +tv253 = 312 j$ = 352 h$ = 360 stbi__jpeg_huff_decode PROC ; COMDAT @@ -37289,20 +37501,22 @@ stbi__jpeg_huff_decode PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 1561 : unsigned int temp; ; 1562 : int c, k; ; 1563 : ; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - 00024 48 8b 85 60 01 + 00025 48 8b 85 60 01 00 00 mov rax, QWORD PTR j$[rbp] - 0002b 83 b8 24 48 00 + 0002c 83 b8 24 48 00 00 10 cmp DWORD PTR [rax+18468], 16 - 00032 7d 0c jge SHORT $LN5@stbi__jpeg - 00034 48 8b 8d 60 01 + 00033 7d 0d jge SHORT $LN5@stbi__jpeg + 00035 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0003b e8 00 00 00 00 call stbi__grow_buffer_unsafe + 0003c e8 00 00 00 00 call stbi__grow_buffer_unsafe + 00041 90 npad 1 $LN5@stbi__jpeg: ; 1565 : @@ -37310,92 +37524,92 @@ $LN5@stbi__jpeg: ; 1567 : // if the code is <= FAST_BITS ; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); - 00040 48 8b 85 60 01 + 00042 48 8b 85 60 01 00 00 mov rax, QWORD PTR j$[rbp] - 00047 8b 80 20 48 00 + 00049 8b 80 20 48 00 00 mov eax, DWORD PTR [rax+18464] - 0004d c1 e8 17 shr eax, 23 - 00050 25 ff 01 00 00 and eax, 511 ; 000001ffH - 00055 89 45 24 mov DWORD PTR c$[rbp], eax + 0004f c1 e8 17 shr eax, 23 + 00052 25 ff 01 00 00 and eax, 511 ; 000001ffH + 00057 89 45 24 mov DWORD PTR c$[rbp], eax ; 1569 : k = h->fast[c]; - 00058 48 63 45 24 movsxd rax, DWORD PTR c$[rbp] - 0005c 48 8b 8d 68 01 + 0005a 48 63 45 24 movsxd rax, DWORD PTR c$[rbp] + 0005e 48 8b 8d 68 01 00 00 mov rcx, QWORD PTR h$[rbp] - 00063 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00067 89 45 44 mov DWORD PTR k$[rbp], eax + 00065 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00069 89 45 44 mov DWORD PTR k$[rbp], eax ; 1570 : if (k < 255) { - 0006a 81 7d 44 ff 00 + 0006c 81 7d 44 ff 00 00 00 cmp DWORD PTR k$[rbp], 255 ; 000000ffH - 00071 0f 8d 99 00 00 + 00073 0f 8d 99 00 00 00 jge $LN6@stbi__jpeg ; 1571 : int s = h->size[k]; - 00077 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] - 0007b 48 8b 8d 68 01 + 00079 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] + 0007d 48 8b 8d 68 01 00 00 mov rcx, QWORD PTR h$[rbp] - 00082 0f b6 84 01 00 + 00084 0f b6 84 01 00 05 00 00 movzx eax, BYTE PTR [rcx+rax+1280] - 0008a 89 45 64 mov DWORD PTR s$1[rbp], eax + 0008c 89 45 64 mov DWORD PTR s$1[rbp], eax ; 1572 : if (s > j->code_bits) - 0008d 48 8b 85 60 01 + 0008f 48 8b 85 60 01 00 00 mov rax, QWORD PTR j$[rbp] - 00094 8b 80 24 48 00 + 00096 8b 80 24 48 00 00 mov eax, DWORD PTR [rax+18468] - 0009a 39 45 64 cmp DWORD PTR s$1[rbp], eax - 0009d 7e 0a jle SHORT $LN7@stbi__jpeg + 0009c 39 45 64 cmp DWORD PTR s$1[rbp], eax + 0009f 7e 0a jle SHORT $LN7@stbi__jpeg ; 1573 : return -1; - 0009f b8 ff ff ff ff mov eax, -1 - 000a4 e9 41 02 00 00 jmp $LN1@stbi__jpeg + 000a1 b8 ff ff ff ff mov eax, -1 + 000a6 e9 41 02 00 00 jmp $LN1@stbi__jpeg $LN7@stbi__jpeg: ; 1574 : j->code_buffer <<= s; - 000a9 8b 45 64 mov eax, DWORD PTR s$1[rbp] - 000ac 48 8b 8d 60 01 + 000ab 8b 45 64 mov eax, DWORD PTR s$1[rbp] + 000ae 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR j$[rbp] - 000b3 48 89 8d 38 01 + 000b5 48 89 8d 38 01 00 00 mov QWORD PTR tv212[rbp], rcx - 000ba 0f b6 c8 movzx ecx, al - 000bd 48 8b 85 38 01 + 000bc 0f b6 c8 movzx ecx, al + 000bf 48 8b 85 38 01 00 00 mov rax, QWORD PTR tv212[rbp] - 000c4 8b 80 20 48 00 + 000c6 8b 80 20 48 00 00 mov eax, DWORD PTR [rax+18464] - 000ca d3 e0 shl eax, cl - 000cc 48 8b 8d 60 01 + 000cc d3 e0 shl eax, cl + 000ce 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR j$[rbp] - 000d3 89 81 20 48 00 + 000d5 89 81 20 48 00 00 mov DWORD PTR [rcx+18464], eax ; 1575 : j->code_bits -= s; - 000d9 48 8b 85 60 01 + 000db 48 8b 85 60 01 00 00 mov rax, QWORD PTR j$[rbp] - 000e0 8b 4d 64 mov ecx, DWORD PTR s$1[rbp] - 000e3 8b 80 24 48 00 + 000e2 8b 4d 64 mov ecx, DWORD PTR s$1[rbp] + 000e5 8b 80 24 48 00 00 mov eax, DWORD PTR [rax+18468] - 000e9 2b c1 sub eax, ecx - 000eb 48 8b 8d 60 01 + 000eb 2b c1 sub eax, ecx + 000ed 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR j$[rbp] - 000f2 89 81 24 48 00 + 000f4 89 81 24 48 00 00 mov DWORD PTR [rcx+18468], eax ; 1576 : return h->values[k]; - 000f8 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] - 000fc 48 8b 8d 68 01 + 000fa 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] + 000fe 48 8b 8d 68 01 00 00 mov rcx, QWORD PTR h$[rbp] - 00103 0f b6 84 01 00 + 00105 0f b6 84 01 00 04 00 00 movzx eax, BYTE PTR [rcx+rax+1024] - 0010b e9 da 01 00 00 jmp $LN1@stbi__jpeg + 0010d e9 da 01 00 00 jmp $LN1@stbi__jpeg $LN6@stbi__jpeg: ; 1577 : } @@ -37408,219 +37622,219 @@ $LN6@stbi__jpeg: ; 1584 : // that way we don't need to shift inside the loop. ; 1585 : temp = j->code_buffer >> 16; - 00110 48 8b 85 60 01 + 00112 48 8b 85 60 01 00 00 mov rax, QWORD PTR j$[rbp] - 00117 8b 80 20 48 00 + 00119 8b 80 20 48 00 00 mov eax, DWORD PTR [rax+18464] - 0011d c1 e8 10 shr eax, 16 - 00120 89 45 04 mov DWORD PTR temp$[rbp], eax + 0011f c1 e8 10 shr eax, 16 + 00122 89 45 04 mov DWORD PTR temp$[rbp], eax ; 1586 : for (k = FAST_BITS + 1; ; ++k) - 00123 c7 45 44 0a 00 + 00125 c7 45 44 0a 00 00 00 mov DWORD PTR k$[rbp], 10 - 0012a eb 08 jmp SHORT $LN4@stbi__jpeg + 0012c eb 08 jmp SHORT $LN4@stbi__jpeg $LN2@stbi__jpeg: - 0012c 8b 45 44 mov eax, DWORD PTR k$[rbp] - 0012f ff c0 inc eax - 00131 89 45 44 mov DWORD PTR k$[rbp], eax + 0012e 8b 45 44 mov eax, DWORD PTR k$[rbp] + 00131 ff c0 inc eax + 00133 89 45 44 mov DWORD PTR k$[rbp], eax $LN4@stbi__jpeg: ; 1587 : if (temp < h->maxcode[k]) - 00134 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] - 00138 48 8b 8d 68 01 + 00136 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] + 0013a 48 8b 8d 68 01 00 00 mov rcx, QWORD PTR h$[rbp] - 0013f 8b 84 81 04 06 + 00141 8b 84 81 04 06 00 00 mov eax, DWORD PTR [rcx+rax*4+1540] - 00146 39 45 04 cmp DWORD PTR temp$[rbp], eax - 00149 73 02 jae SHORT $LN8@stbi__jpeg + 00148 39 45 04 cmp DWORD PTR temp$[rbp], eax + 0014b 73 02 jae SHORT $LN8@stbi__jpeg ; 1588 : break; - 0014b eb 02 jmp SHORT $LN3@stbi__jpeg + 0014d eb 02 jmp SHORT $LN3@stbi__jpeg $LN8@stbi__jpeg: - 0014d eb dd jmp SHORT $LN2@stbi__jpeg + 0014f eb dd jmp SHORT $LN2@stbi__jpeg $LN3@stbi__jpeg: ; 1589 : if (k == 17) { - 0014f 83 7d 44 11 cmp DWORD PTR k$[rbp], 17 - 00153 75 27 jne SHORT $LN9@stbi__jpeg + 00151 83 7d 44 11 cmp DWORD PTR k$[rbp], 17 + 00155 75 27 jne SHORT $LN9@stbi__jpeg ; 1590 : // error! code not found ; 1591 : j->code_bits -= 16; - 00155 48 8b 85 60 01 + 00157 48 8b 85 60 01 00 00 mov rax, QWORD PTR j$[rbp] - 0015c 8b 80 24 48 00 + 0015e 8b 80 24 48 00 00 mov eax, DWORD PTR [rax+18468] - 00162 83 e8 10 sub eax, 16 - 00165 48 8b 8d 60 01 + 00164 83 e8 10 sub eax, 16 + 00167 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0016c 89 81 24 48 00 + 0016e 89 81 24 48 00 00 mov DWORD PTR [rcx+18468], eax ; 1592 : return -1; - 00172 b8 ff ff ff ff mov eax, -1 - 00177 e9 6e 01 00 00 jmp $LN1@stbi__jpeg + 00174 b8 ff ff ff ff mov eax, -1 + 00179 e9 6e 01 00 00 jmp $LN1@stbi__jpeg $LN9@stbi__jpeg: ; 1593 : } ; 1594 : ; 1595 : if (k > j->code_bits) - 0017c 48 8b 85 60 01 + 0017e 48 8b 85 60 01 00 00 mov rax, QWORD PTR j$[rbp] - 00183 8b 80 24 48 00 + 00185 8b 80 24 48 00 00 mov eax, DWORD PTR [rax+18468] - 00189 39 45 44 cmp DWORD PTR k$[rbp], eax - 0018c 7e 0a jle SHORT $LN10@stbi__jpeg + 0018b 39 45 44 cmp DWORD PTR k$[rbp], eax + 0018e 7e 0a jle SHORT $LN10@stbi__jpeg ; 1596 : return -1; - 0018e b8 ff ff ff ff mov eax, -1 - 00193 e9 52 01 00 00 jmp $LN1@stbi__jpeg + 00190 b8 ff ff ff ff mov eax, -1 + 00195 e9 52 01 00 00 jmp $LN1@stbi__jpeg $LN10@stbi__jpeg: ; 1597 : ; 1598 : // convert the huffman code to the symbol id ; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; - 00198 b8 20 00 00 00 mov eax, 32 ; 00000020H - 0019d 2b 45 44 sub eax, DWORD PTR k$[rbp] - 001a0 48 8b 8d 60 01 + 0019a b8 20 00 00 00 mov eax, 32 ; 00000020H + 0019f 2b 45 44 sub eax, DWORD PTR k$[rbp] + 001a2 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR j$[rbp] - 001a7 48 89 8d 38 01 + 001a9 48 89 8d 38 01 00 00 mov QWORD PTR tv233[rbp], rcx - 001ae 0f b6 c8 movzx ecx, al - 001b1 48 8b 85 38 01 + 001b0 0f b6 c8 movzx ecx, al + 001b3 48 8b 85 38 01 00 00 mov rax, QWORD PTR tv233[rbp] - 001b8 8b 80 20 48 00 + 001ba 8b 80 20 48 00 00 mov eax, DWORD PTR [rax+18464] - 001be d3 e8 shr eax, cl - 001c0 48 63 4d 44 movsxd rcx, DWORD PTR k$[rbp] - 001c4 48 8d 15 00 00 + 001c0 d3 e8 shr eax, cl + 001c2 48 63 4d 44 movsxd rcx, DWORD PTR k$[rbp] + 001c6 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__bmask - 001cb 23 04 8a and eax, DWORD PTR [rdx+rcx*4] - 001ce 48 63 4d 44 movsxd rcx, DWORD PTR k$[rbp] - 001d2 48 8b 95 68 01 + 001cd 23 04 8a and eax, DWORD PTR [rdx+rcx*4] + 001d0 48 63 4d 44 movsxd rcx, DWORD PTR k$[rbp] + 001d4 48 8b 95 68 01 00 00 mov rdx, QWORD PTR h$[rbp] - 001d9 03 84 8a 4c 06 + 001db 03 84 8a 4c 06 00 00 add eax, DWORD PTR [rdx+rcx*4+1612] - 001e0 89 45 24 mov DWORD PTR c$[rbp], eax + 001e2 89 45 24 mov DWORD PTR c$[rbp], eax ; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! - 001e3 83 7d 24 00 cmp DWORD PTR c$[rbp], 0 - 001e7 7c 09 jl SHORT $LN12@stbi__jpeg - 001e9 81 7d 24 00 01 + 001e5 83 7d 24 00 cmp DWORD PTR c$[rbp], 0 + 001e9 7c 09 jl SHORT $LN12@stbi__jpeg + 001eb 81 7d 24 00 01 00 00 cmp DWORD PTR c$[rbp], 256 ; 00000100H - 001f0 7c 0a jl SHORT $LN11@stbi__jpeg + 001f2 7c 0a jl SHORT $LN11@stbi__jpeg $LN12@stbi__jpeg: ; 1601 : return -1; - 001f2 b8 ff ff ff ff mov eax, -1 - 001f7 e9 ee 00 00 00 jmp $LN1@stbi__jpeg + 001f4 b8 ff ff ff ff mov eax, -1 + 001f9 e9 ee 00 00 00 jmp $LN1@stbi__jpeg $LN11@stbi__jpeg: ; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); - 001fc 48 63 45 24 movsxd rax, DWORD PTR c$[rbp] - 00200 48 8b 8d 68 01 + 001fe 48 63 45 24 movsxd rax, DWORD PTR c$[rbp] + 00202 48 8b 8d 68 01 00 00 mov rcx, QWORD PTR h$[rbp] - 00207 0f b6 84 01 00 + 00209 0f b6 84 01 00 05 00 00 movzx eax, BYTE PTR [rcx+rax+1280] - 0020f b9 20 00 00 00 mov ecx, 32 ; 00000020H - 00214 2b c8 sub ecx, eax - 00216 8b c1 mov eax, ecx - 00218 48 8b 8d 60 01 + 00211 b9 20 00 00 00 mov ecx, 32 ; 00000020H + 00216 2b c8 sub ecx, eax + 00218 8b c1 mov eax, ecx + 0021a 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR j$[rbp] - 0021f 48 89 8d 38 01 + 00221 48 89 8d 38 01 00 00 mov QWORD PTR tv242[rbp], rcx - 00226 0f b6 c8 movzx ecx, al - 00229 48 8b 85 38 01 + 00228 0f b6 c8 movzx ecx, al + 0022b 48 8b 85 38 01 00 00 mov rax, QWORD PTR tv242[rbp] - 00230 8b 80 20 48 00 + 00232 8b 80 20 48 00 00 mov eax, DWORD PTR [rax+18464] - 00236 d3 e8 shr eax, cl - 00238 48 63 4d 24 movsxd rcx, DWORD PTR c$[rbp] - 0023c 48 8b 95 68 01 + 00238 d3 e8 shr eax, cl + 0023a 48 63 4d 24 movsxd rcx, DWORD PTR c$[rbp] + 0023e 48 8b 95 68 01 00 00 mov rdx, QWORD PTR h$[rbp] - 00243 0f b6 8c 0a 00 + 00245 0f b6 8c 0a 00 05 00 00 movzx ecx, BYTE PTR [rdx+rcx+1280] - 0024b 48 8d 15 00 00 + 0024d 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__bmask - 00252 23 04 8a and eax, DWORD PTR [rdx+rcx*4] - 00255 48 63 4d 24 movsxd rcx, DWORD PTR c$[rbp] - 00259 48 8b 95 68 01 + 00254 23 04 8a and eax, DWORD PTR [rdx+rcx*4] + 00257 48 63 4d 24 movsxd rcx, DWORD PTR c$[rbp] + 0025b 48 8b 95 68 01 00 00 mov rdx, QWORD PTR h$[rbp] - 00260 0f b7 8c 4a 00 + 00262 0f b7 8c 4a 00 02 00 00 movzx ecx, WORD PTR [rdx+rcx*2+512] - 00268 3b c1 cmp eax, ecx - 0026a 74 1c je SHORT $LN14@stbi__jpeg - 0026c 41 b8 42 06 00 + 0026a 3b c1 cmp eax, ecx + 0026c 74 1c je SHORT $LN14@stbi__jpeg + 0026e 41 b8 42 06 00 00 mov r8d, 1602 ; 00000642H - 00272 48 8d 15 00 00 + 00274 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 00279 48 8d 0d 00 00 + 0027b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1KE@JGKPJEBO@?$AA?$CI?$AA?$CI?$AA?$CI?$AAj?$AA?9?$AA?$DO?$AAc?$AAo?$AAd?$AAe?$AA_?$AAb?$AAu?$AAf?$AAf@ - 00280 ff 15 00 00 00 + 00282 ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 00286 33 c0 xor eax, eax + 00288 33 c0 xor eax, eax $LN14@stbi__jpeg: ; 1603 : ; 1604 : // convert the id to a symbol ; 1605 : j->code_bits -= k; - 00288 48 8b 85 60 01 + 0028a 48 8b 85 60 01 00 00 mov rax, QWORD PTR j$[rbp] - 0028f 8b 4d 44 mov ecx, DWORD PTR k$[rbp] - 00292 8b 80 24 48 00 + 00291 8b 4d 44 mov ecx, DWORD PTR k$[rbp] + 00294 8b 80 24 48 00 00 mov eax, DWORD PTR [rax+18468] - 00298 2b c1 sub eax, ecx - 0029a 48 8b 8d 60 01 + 0029a 2b c1 sub eax, ecx + 0029c 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR j$[rbp] - 002a1 89 81 24 48 00 + 002a3 89 81 24 48 00 00 mov DWORD PTR [rcx+18468], eax ; 1606 : j->code_buffer <<= k; - 002a7 8b 45 44 mov eax, DWORD PTR k$[rbp] - 002aa 48 8b 8d 60 01 + 002a9 8b 45 44 mov eax, DWORD PTR k$[rbp] + 002ac 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR j$[rbp] - 002b1 48 89 8d 38 01 + 002b3 48 89 8d 38 01 00 00 mov QWORD PTR tv253[rbp], rcx - 002b8 0f b6 c8 movzx ecx, al - 002bb 48 8b 85 38 01 + 002ba 0f b6 c8 movzx ecx, al + 002bd 48 8b 85 38 01 00 00 mov rax, QWORD PTR tv253[rbp] - 002c2 8b 80 20 48 00 + 002c4 8b 80 20 48 00 00 mov eax, DWORD PTR [rax+18464] - 002c8 d3 e0 shl eax, cl - 002ca 48 8b 8d 60 01 + 002ca d3 e0 shl eax, cl + 002cc 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR j$[rbp] - 002d1 89 81 20 48 00 + 002d3 89 81 20 48 00 00 mov DWORD PTR [rcx+18464], eax ; 1607 : return h->values[c]; - 002d7 48 63 45 24 movsxd rax, DWORD PTR c$[rbp] - 002db 48 8b 8d 68 01 + 002d9 48 63 45 24 movsxd rax, DWORD PTR c$[rbp] + 002dd 48 8b 8d 68 01 00 00 mov rcx, QWORD PTR h$[rbp] - 002e2 0f b6 84 01 00 + 002e4 0f b6 84 01 00 04 00 00 movzx eax, BYTE PTR [rcx+rax+1024] $LN1@stbi__jpeg: ; 1608 : } - 002ea 48 8d a5 48 01 + 002ec 48 8d a5 48 01 00 00 lea rsp, QWORD PTR [rbp+328] - 002f1 5f pop rdi - 002f2 5d pop rbp - 002f3 c3 ret 0 + 002f3 5f pop rdi + 002f4 5d pop rbp + 002f5 c3 ret 0 stbi__jpeg_huff_decode ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -37644,85 +37858,86 @@ stbi__grow_buffer_unsafe PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 $LN4@stbi__grow: ; 1539 : do { ; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); - 0001f 48 8b 85 20 01 + 00020 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 00026 83 b8 2c 48 00 + 00027 83 b8 2c 48 00 00 00 cmp DWORD PTR [rax+18476], 0 - 0002d 74 0c je SHORT $LN10@stbi__grow - 0002f c7 85 f4 00 00 + 0002e 74 0c je SHORT $LN10@stbi__grow + 00030 c7 85 f4 00 00 00 00 00 00 00 mov DWORD PTR tv70[rbp], 0 - 00039 eb 18 jmp SHORT $LN11@stbi__grow + 0003a eb 18 jmp SHORT $LN11@stbi__grow $LN10@stbi__grow: - 0003b 48 8b 85 20 01 + 0003c 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 00042 48 8b 08 mov rcx, QWORD PTR [rax] - 00045 e8 00 00 00 00 call stbi__get8 - 0004a 0f b6 c0 movzx eax, al - 0004d 89 85 f4 00 00 + 00043 48 8b 08 mov rcx, QWORD PTR [rax] + 00046 e8 00 00 00 00 call stbi__get8 + 0004b 0f b6 c0 movzx eax, al + 0004e 89 85 f4 00 00 00 mov DWORD PTR tv70[rbp], eax $LN11@stbi__grow: - 00053 8b 85 f4 00 00 + 00054 8b 85 f4 00 00 00 mov eax, DWORD PTR tv70[rbp] - 00059 89 45 04 mov DWORD PTR b$1[rbp], eax + 0005a 89 45 04 mov DWORD PTR b$1[rbp], eax ; 1541 : if (b == 0xff) { - 0005c 81 7d 04 ff 00 + 0005d 81 7d 04 ff 00 00 00 cmp DWORD PTR b$1[rbp], 255 ; 000000ffH - 00063 75 5f jne SHORT $LN7@stbi__grow + 00064 75 5f jne SHORT $LN7@stbi__grow ; 1542 : int c = stbi__get8(j->s); - 00065 48 8b 85 20 01 + 00066 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 0006c 48 8b 08 mov rcx, QWORD PTR [rax] - 0006f e8 00 00 00 00 call stbi__get8 - 00074 0f b6 c0 movzx eax, al - 00077 89 45 24 mov DWORD PTR c$2[rbp], eax + 0006d 48 8b 08 mov rcx, QWORD PTR [rax] + 00070 e8 00 00 00 00 call stbi__get8 + 00075 0f b6 c0 movzx eax, al + 00078 89 45 24 mov DWORD PTR c$2[rbp], eax $LN5@stbi__grow: ; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes - 0007a 81 7d 24 ff 00 + 0007b 81 7d 24 ff 00 00 00 cmp DWORD PTR c$2[rbp], 255 ; 000000ffH - 00081 75 17 jne SHORT $LN6@stbi__grow - 00083 48 8b 85 20 01 + 00082 75 17 jne SHORT $LN6@stbi__grow + 00084 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 0008a 48 8b 08 mov rcx, QWORD PTR [rax] - 0008d e8 00 00 00 00 call stbi__get8 - 00092 0f b6 c0 movzx eax, al - 00095 89 45 24 mov DWORD PTR c$2[rbp], eax - 00098 eb e0 jmp SHORT $LN5@stbi__grow + 0008b 48 8b 08 mov rcx, QWORD PTR [rax] + 0008e e8 00 00 00 00 call stbi__get8 + 00093 0f b6 c0 movzx eax, al + 00096 89 45 24 mov DWORD PTR c$2[rbp], eax + 00099 eb e0 jmp SHORT $LN5@stbi__grow $LN6@stbi__grow: ; 1544 : if (c != 0) { - 0009a 83 7d 24 00 cmp DWORD PTR c$2[rbp], 0 - 0009e 74 24 je SHORT $LN8@stbi__grow + 0009b 83 7d 24 00 cmp DWORD PTR c$2[rbp], 0 + 0009f 74 24 je SHORT $LN8@stbi__grow ; 1545 : j->marker = (unsigned char)c; - 000a0 48 8b 85 20 01 + 000a1 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 000a7 0f b6 4d 24 movzx ecx, BYTE PTR c$2[rbp] - 000ab 88 88 28 48 00 + 000a8 0f b6 4d 24 movzx ecx, BYTE PTR c$2[rbp] + 000ac 88 88 28 48 00 00 mov BYTE PTR [rax+18472], cl ; 1546 : j->nomore = 1; - 000b1 48 8b 85 20 01 + 000b2 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 000b8 c7 80 2c 48 00 + 000b9 c7 80 2c 48 00 00 01 00 00 00 mov DWORD PTR [rax+18476], 1 ; 1547 : return; - 000c2 eb 6b jmp SHORT $LN1@stbi__grow + 000c3 eb 6b jmp SHORT $LN1@stbi__grow $LN8@stbi__grow: $LN7@stbi__grow: @@ -37730,55 +37945,55 @@ $LN7@stbi__grow: ; 1549 : } ; 1550 : j->code_buffer |= b << (24 - j->code_bits); - 000c4 48 8b 85 20 01 + 000c5 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 000cb b9 18 00 00 00 mov ecx, 24 - 000d0 2b 88 24 48 00 + 000cc b9 18 00 00 00 mov ecx, 24 + 000d1 2b 88 24 48 00 00 sub ecx, DWORD PTR [rax+18468] - 000d6 8b c1 mov eax, ecx - 000d8 0f b6 c8 movzx ecx, al - 000db 8b 45 04 mov eax, DWORD PTR b$1[rbp] - 000de d3 e0 shl eax, cl - 000e0 48 8b 8d 20 01 + 000d7 8b c1 mov eax, ecx + 000d9 0f b6 c8 movzx ecx, al + 000dc 8b 45 04 mov eax, DWORD PTR b$1[rbp] + 000df d3 e0 shl eax, cl + 000e1 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR j$[rbp] - 000e7 8b 89 20 48 00 + 000e8 8b 89 20 48 00 00 mov ecx, DWORD PTR [rcx+18464] - 000ed 0b c8 or ecx, eax - 000ef 8b c1 mov eax, ecx - 000f1 48 8b 8d 20 01 + 000ee 0b c8 or ecx, eax + 000f0 8b c1 mov eax, ecx + 000f2 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR j$[rbp] - 000f8 89 81 20 48 00 + 000f9 89 81 20 48 00 00 mov DWORD PTR [rcx+18464], eax ; 1551 : j->code_bits += 8; - 000fe 48 8b 85 20 01 + 000ff 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 00105 8b 80 24 48 00 + 00106 8b 80 24 48 00 00 mov eax, DWORD PTR [rax+18468] - 0010b 83 c0 08 add eax, 8 - 0010e 48 8b 8d 20 01 + 0010c 83 c0 08 add eax, 8 + 0010f 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR j$[rbp] - 00115 89 81 24 48 00 + 00116 89 81 24 48 00 00 mov DWORD PTR [rcx+18468], eax ; 1552 : } while (j->code_bits <= 24); - 0011b 48 8b 85 20 01 + 0011c 48 8b 85 20 01 00 00 mov rax, QWORD PTR j$[rbp] - 00122 83 b8 24 48 00 + 00123 83 b8 24 48 00 00 18 cmp DWORD PTR [rax+18468], 24 - 00129 0f 8e f0 fe ff + 0012a 0f 8e f0 fe ff ff jle $LN4@stbi__grow $LN1@stbi__grow: ; 1553 : } - 0012f 48 8d a5 08 01 + 00130 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 00136 5f pop rdi - 00137 5d pop rbp - 00138 c3 ret 0 + 00137 5f pop rdi + 00138 5d pop rbp + 00139 c3 ret 0 stbi__grow_buffer_unsafe ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -37793,8 +38008,8 @@ magbits$4 = 132 len$5 = 164 k$6 = 196 m$7 = 228 -tv178 = 436 tv174 = 436 +tv178 = 436 fast_ac$ = 480 h$ = 488 stbi__build_fast_ac PROC ; COMDAT @@ -37811,177 +38026,178 @@ stbi__build_fast_ac PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 1514 : int i; ; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { - 00024 c7 45 04 00 00 + 00025 c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0002b eb 08 jmp SHORT $LN4@stbi__buil + 0002c eb 08 jmp SHORT $LN4@stbi__buil $LN2@stbi__buil: - 0002d 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00030 ff c0 inc eax - 00032 89 45 04 mov DWORD PTR i$[rbp], eax + 0002e 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00031 ff c0 inc eax + 00033 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__buil: - 00035 81 7d 04 00 02 + 00036 81 7d 04 00 02 00 00 cmp DWORD PTR i$[rbp], 512 ; 00000200H - 0003c 0f 8d 6b 01 00 + 0003d 0f 8d 6b 01 00 00 jge $LN3@stbi__buil ; 1516 : stbi_uc fast = h->fast[i]; - 00042 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00046 48 8b 8d e8 01 + 00043 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00047 48 8b 8d e8 01 00 00 mov rcx, QWORD PTR h$[rbp] - 0004d 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00051 88 45 24 mov BYTE PTR fast$1[rbp], al + 0004e 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00052 88 45 24 mov BYTE PTR fast$1[rbp], al ; 1517 : fast_ac[i] = 0; - 00054 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00058 33 c9 xor ecx, ecx - 0005a 48 8b 95 e0 01 + 00055 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00059 33 c9 xor ecx, ecx + 0005b 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR fast_ac$[rbp] - 00061 66 89 0c 42 mov WORD PTR [rdx+rax*2], cx + 00062 66 89 0c 42 mov WORD PTR [rdx+rax*2], cx ; 1518 : if (fast < 255) { - 00065 0f b6 45 24 movzx eax, BYTE PTR fast$1[rbp] - 00069 3d ff 00 00 00 cmp eax, 255 ; 000000ffH - 0006e 0f 8d 34 01 00 + 00066 0f b6 45 24 movzx eax, BYTE PTR fast$1[rbp] + 0006a 3d ff 00 00 00 cmp eax, 255 ; 000000ffH + 0006f 0f 8d 34 01 00 00 jge $LN5@stbi__buil ; 1519 : int rs = h->values[fast]; - 00074 0f b6 45 24 movzx eax, BYTE PTR fast$1[rbp] - 00078 48 8b 8d e8 01 + 00075 0f b6 45 24 movzx eax, BYTE PTR fast$1[rbp] + 00079 48 8b 8d e8 01 00 00 mov rcx, QWORD PTR h$[rbp] - 0007f 0f b6 84 01 00 + 00080 0f b6 84 01 00 04 00 00 movzx eax, BYTE PTR [rcx+rax+1024] - 00087 89 45 44 mov DWORD PTR rs$2[rbp], eax + 00088 89 45 44 mov DWORD PTR rs$2[rbp], eax ; 1520 : int run = (rs >> 4) & 15; - 0008a 8b 45 44 mov eax, DWORD PTR rs$2[rbp] - 0008d c1 f8 04 sar eax, 4 - 00090 83 e0 0f and eax, 15 - 00093 89 45 64 mov DWORD PTR run$3[rbp], eax + 0008b 8b 45 44 mov eax, DWORD PTR rs$2[rbp] + 0008e c1 f8 04 sar eax, 4 + 00091 83 e0 0f and eax, 15 + 00094 89 45 64 mov DWORD PTR run$3[rbp], eax ; 1521 : int magbits = rs & 15; - 00096 8b 45 44 mov eax, DWORD PTR rs$2[rbp] - 00099 83 e0 0f and eax, 15 - 0009c 89 85 84 00 00 + 00097 8b 45 44 mov eax, DWORD PTR rs$2[rbp] + 0009a 83 e0 0f and eax, 15 + 0009d 89 85 84 00 00 00 mov DWORD PTR magbits$4[rbp], eax ; 1522 : int len = h->size[fast]; - 000a2 0f b6 45 24 movzx eax, BYTE PTR fast$1[rbp] - 000a6 48 8b 8d e8 01 + 000a3 0f b6 45 24 movzx eax, BYTE PTR fast$1[rbp] + 000a7 48 8b 8d e8 01 00 00 mov rcx, QWORD PTR h$[rbp] - 000ad 0f b6 84 01 00 + 000ae 0f b6 84 01 00 05 00 00 movzx eax, BYTE PTR [rcx+rax+1280] - 000b5 89 85 a4 00 00 + 000b6 89 85 a4 00 00 00 mov DWORD PTR len$5[rbp], eax ; 1523 : ; 1524 : if (magbits && len + magbits <= FAST_BITS) { - 000bb 83 bd 84 00 00 + 000bc 83 bd 84 00 00 00 00 cmp DWORD PTR magbits$4[rbp], 0 - 000c2 0f 84 e0 00 00 + 000c3 0f 84 e0 00 00 00 je $LN6@stbi__buil - 000c8 8b 85 84 00 00 + 000c9 8b 85 84 00 00 00 mov eax, DWORD PTR magbits$4[rbp] - 000ce 8b 8d a4 00 00 + 000cf 8b 8d a4 00 00 00 mov ecx, DWORD PTR len$5[rbp] - 000d4 03 c8 add ecx, eax - 000d6 8b c1 mov eax, ecx - 000d8 83 f8 09 cmp eax, 9 - 000db 0f 8f c7 00 00 + 000d5 03 c8 add ecx, eax + 000d7 8b c1 mov eax, ecx + 000d9 83 f8 09 cmp eax, 9 + 000dc 0f 8f c7 00 00 00 jg $LN6@stbi__buil ; 1525 : // magnitude code followed by receive_extend code ; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); - 000e1 8b 85 a4 00 00 + 000e2 8b 85 a4 00 00 00 mov eax, DWORD PTR len$5[rbp] - 000e7 0f b6 c8 movzx ecx, al - 000ea 8b 45 04 mov eax, DWORD PTR i$[rbp] - 000ed d3 e0 shl eax, cl - 000ef 25 ff 01 00 00 and eax, 511 ; 000001ffH - 000f4 b9 09 00 00 00 mov ecx, 9 - 000f9 2b 8d 84 00 00 + 000e8 0f b6 c8 movzx ecx, al + 000eb 8b 45 04 mov eax, DWORD PTR i$[rbp] + 000ee d3 e0 shl eax, cl + 000f0 25 ff 01 00 00 and eax, 511 ; 000001ffH + 000f5 b9 09 00 00 00 mov ecx, 9 + 000fa 2b 8d 84 00 00 00 sub ecx, DWORD PTR magbits$4[rbp] - 000ff d3 f8 sar eax, cl - 00101 89 85 c4 00 00 + 00100 d3 f8 sar eax, cl + 00102 89 85 c4 00 00 00 mov DWORD PTR k$6[rbp], eax ; 1527 : int m = 1 << (magbits - 1); - 00107 8b 85 84 00 00 + 00108 8b 85 84 00 00 00 mov eax, DWORD PTR magbits$4[rbp] - 0010d ff c8 dec eax - 0010f b9 01 00 00 00 mov ecx, 1 - 00114 89 8d b4 01 00 + 0010e ff c8 dec eax + 00110 b9 01 00 00 00 mov ecx, 1 + 00115 89 8d b4 01 00 00 mov DWORD PTR tv174[rbp], ecx - 0011a 0f b6 c8 movzx ecx, al - 0011d 8b 85 b4 01 00 + 0011b 0f b6 c8 movzx ecx, al + 0011e 8b 85 b4 01 00 00 mov eax, DWORD PTR tv174[rbp] - 00123 d3 e0 shl eax, cl - 00125 89 85 e4 00 00 + 00124 d3 e0 shl eax, cl + 00126 89 85 e4 00 00 00 mov DWORD PTR m$7[rbp], eax ; 1528 : if (k < m) k += (~0U << magbits) + 1; - 0012b 8b 85 e4 00 00 + 0012c 8b 85 e4 00 00 00 mov eax, DWORD PTR m$7[rbp] - 00131 39 85 c4 00 00 + 00132 39 85 c4 00 00 00 cmp DWORD PTR k$6[rbp], eax - 00137 7d 2c jge SHORT $LN7@stbi__buil - 00139 8b 85 84 00 00 + 00138 7d 2c jge SHORT $LN7@stbi__buil + 0013a 8b 85 84 00 00 00 mov eax, DWORD PTR magbits$4[rbp] - 0013f b9 ff ff ff ff mov ecx, -1 ; ffffffffH - 00144 89 8d b4 01 00 + 00140 b9 ff ff ff ff mov ecx, -1 ; ffffffffH + 00145 89 8d b4 01 00 00 mov DWORD PTR tv178[rbp], ecx - 0014a 0f b6 c8 movzx ecx, al - 0014d 8b 85 b4 01 00 + 0014b 0f b6 c8 movzx ecx, al + 0014e 8b 85 b4 01 00 00 mov eax, DWORD PTR tv178[rbp] - 00153 d3 e0 shl eax, cl - 00155 8b 8d c4 00 00 + 00154 d3 e0 shl eax, cl + 00156 8b 8d c4 00 00 00 mov ecx, DWORD PTR k$6[rbp] - 0015b 8d 44 01 01 lea eax, DWORD PTR [rcx+rax+1] - 0015f 89 85 c4 00 00 + 0015c 8d 44 01 01 lea eax, DWORD PTR [rcx+rax+1] + 00160 89 85 c4 00 00 00 mov DWORD PTR k$6[rbp], eax $LN7@stbi__buil: ; 1529 : // if the result is small enough, we can fit it in fast_ac table ; 1530 : if (k >= -128 && k <= 127) - 00165 83 bd c4 00 00 + 00166 83 bd c4 00 00 00 80 cmp DWORD PTR k$6[rbp], -128 ; ffffffffffffff80H - 0016c 7c 3a jl SHORT $LN8@stbi__buil - 0016e 83 bd c4 00 00 + 0016d 7c 3a jl SHORT $LN8@stbi__buil + 0016f 83 bd c4 00 00 00 7f cmp DWORD PTR k$6[rbp], 127 ; 0000007fH - 00175 7f 31 jg SHORT $LN8@stbi__buil + 00176 7f 31 jg SHORT $LN8@stbi__buil ; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); - 00177 69 85 c4 00 00 + 00178 69 85 c4 00 00 00 00 01 00 00 imul eax, DWORD PTR k$6[rbp], 256 ; 00000100H - 00181 6b 4d 64 10 imul ecx, DWORD PTR run$3[rbp], 16 - 00185 03 c1 add eax, ecx - 00187 8b 8d 84 00 00 + 00182 6b 4d 64 10 imul ecx, DWORD PTR run$3[rbp], 16 + 00186 03 c1 add eax, ecx + 00188 8b 8d 84 00 00 00 mov ecx, DWORD PTR magbits$4[rbp] - 0018d 8b 95 a4 00 00 + 0018e 8b 95 a4 00 00 00 mov edx, DWORD PTR len$5[rbp] - 00193 03 d1 add edx, ecx - 00195 8b ca mov ecx, edx - 00197 03 c1 add eax, ecx - 00199 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 0019d 48 8b 95 e0 01 + 00194 03 d1 add edx, ecx + 00196 8b ca mov ecx, edx + 00198 03 c1 add eax, ecx + 0019a 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 0019e 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR fast_ac$[rbp] - 001a4 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax + 001a5 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax $LN8@stbi__buil: $LN6@stbi__buil: $LN5@stbi__buil: @@ -37990,16 +38206,16 @@ $LN5@stbi__buil: ; 1533 : } ; 1534 : } - 001a8 e9 80 fe ff ff jmp $LN2@stbi__buil + 001a9 e9 80 fe ff ff jmp $LN2@stbi__buil $LN3@stbi__buil: ; 1535 : } - 001ad 48 8d a5 c8 01 + 001ae 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 001b4 5f pop rdi - 001b5 5d pop rbp - 001b6 c3 ret 0 + 001b5 5f pop rdi + 001b6 5d pop rbp + 001b7 c3 ret 0 stbi__build_fast_ac ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -38030,177 +38246,178 @@ stbi__build_huffman PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 1467 : int i, j, k = 0; - 00024 c7 45 44 00 00 + 00025 c7 45 44 00 00 00 00 mov DWORD PTR k$[rbp], 0 ; 1468 : unsigned int code; ; 1469 : // build size list for each symbol (from JPEG spec) ; 1470 : for (i = 0; i < 16; ++i) { - 0002b c7 45 04 00 00 + 0002c c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00032 eb 08 jmp SHORT $LN4@stbi__buil + 00033 eb 08 jmp SHORT $LN4@stbi__buil $LN2@stbi__buil: - 00034 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00037 ff c0 inc eax - 00039 89 45 04 mov DWORD PTR i$[rbp], eax + 00035 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00038 ff c0 inc eax + 0003a 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__buil: - 0003c 83 7d 04 10 cmp DWORD PTR i$[rbp], 16 - 00040 7d 61 jge SHORT $LN3@stbi__buil + 0003d 83 7d 04 10 cmp DWORD PTR i$[rbp], 16 + 00041 7d 61 jge SHORT $LN3@stbi__buil ; 1471 : for (j = 0; j < count[i]; ++j) { - 00042 c7 45 24 00 00 + 00043 c7 45 24 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 00049 eb 08 jmp SHORT $LN7@stbi__buil + 0004a eb 08 jmp SHORT $LN7@stbi__buil $LN5@stbi__buil: - 0004b 8b 45 24 mov eax, DWORD PTR j$[rbp] - 0004e ff c0 inc eax - 00050 89 45 24 mov DWORD PTR j$[rbp], eax + 0004c 8b 45 24 mov eax, DWORD PTR j$[rbp] + 0004f ff c0 inc eax + 00051 89 45 24 mov DWORD PTR j$[rbp], eax $LN7@stbi__buil: - 00053 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00057 48 8b 8d c8 01 + 00054 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00058 48 8b 8d c8 01 00 00 mov rcx, QWORD PTR count$[rbp] - 0005e 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] - 00061 39 45 24 cmp DWORD PTR j$[rbp], eax - 00064 7d 3b jge SHORT $LN6@stbi__buil + 0005f 8b 04 81 mov eax, DWORD PTR [rcx+rax*4] + 00062 39 45 24 cmp DWORD PTR j$[rbp], eax + 00065 7d 3b jge SHORT $LN6@stbi__buil ; 1472 : h->size[k++] = (stbi_uc)(i + 1); - 00066 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00069 ff c0 inc eax - 0006b 48 63 4d 44 movsxd rcx, DWORD PTR k$[rbp] - 0006f 48 8b 95 c0 01 + 00067 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0006a ff c0 inc eax + 0006c 48 63 4d 44 movsxd rcx, DWORD PTR k$[rbp] + 00070 48 8b 95 c0 01 00 00 mov rdx, QWORD PTR h$[rbp] - 00076 88 84 0a 00 05 + 00077 88 84 0a 00 05 00 00 mov BYTE PTR [rdx+rcx+1280], al - 0007d 8b 45 44 mov eax, DWORD PTR k$[rbp] - 00080 ff c0 inc eax - 00082 89 45 44 mov DWORD PTR k$[rbp], eax + 0007e 8b 45 44 mov eax, DWORD PTR k$[rbp] + 00081 ff c0 inc eax + 00083 89 45 44 mov DWORD PTR k$[rbp], eax ; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); - 00085 81 7d 44 01 01 + 00086 81 7d 44 01 01 00 00 cmp DWORD PTR k$[rbp], 257 ; 00000101H - 0008c 7c 11 jl SHORT $LN19@stbi__buil - 0008e 48 8d 0d 00 00 + 0008d 7c 11 jl SHORT $LN19@stbi__buil + 0008f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0O@DEFOLMLB@bad?5size?5list@ - 00095 e8 00 00 00 00 call stbi__err - 0009a e9 0f 02 00 00 jmp $LN1@stbi__buil + 00096 e8 00 00 00 00 call stbi__err + 0009b e9 10 02 00 00 jmp $LN1@stbi__buil $LN19@stbi__buil: ; 1474 : } - 0009f eb aa jmp SHORT $LN5@stbi__buil + 000a0 eb aa jmp SHORT $LN5@stbi__buil $LN6@stbi__buil: ; 1475 : } - 000a1 eb 91 jmp SHORT $LN2@stbi__buil + 000a2 eb 91 jmp SHORT $LN2@stbi__buil $LN3@stbi__buil: ; 1476 : h->size[k] = 0; - 000a3 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] - 000a7 48 8b 8d c0 01 + 000a4 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] + 000a8 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR h$[rbp] - 000ae c6 84 01 00 05 + 000af c6 84 01 00 05 00 00 00 mov BYTE PTR [rcx+rax+1280], 0 ; 1477 : ; 1478 : // compute actual symbols (from jpeg spec) ; 1479 : code = 0; - 000b6 c7 45 64 00 00 + 000b7 c7 45 64 00 00 00 00 mov DWORD PTR code$[rbp], 0 ; 1480 : k = 0; - 000bd c7 45 44 00 00 + 000be c7 45 44 00 00 00 00 mov DWORD PTR k$[rbp], 0 ; 1481 : for (j = 1; j <= 16; ++j) { - 000c4 c7 45 24 01 00 + 000c5 c7 45 24 01 00 00 00 mov DWORD PTR j$[rbp], 1 - 000cb eb 08 jmp SHORT $LN10@stbi__buil + 000cc eb 08 jmp SHORT $LN10@stbi__buil $LN8@stbi__buil: - 000cd 8b 45 24 mov eax, DWORD PTR j$[rbp] - 000d0 ff c0 inc eax - 000d2 89 45 24 mov DWORD PTR j$[rbp], eax + 000ce 8b 45 24 mov eax, DWORD PTR j$[rbp] + 000d1 ff c0 inc eax + 000d3 89 45 24 mov DWORD PTR j$[rbp], eax $LN10@stbi__buil: - 000d5 83 7d 24 10 cmp DWORD PTR j$[rbp], 16 - 000d9 0f 8f ca 00 00 + 000d6 83 7d 24 10 cmp DWORD PTR j$[rbp], 16 + 000da 0f 8f ca 00 00 00 jg $LN9@stbi__buil ; 1482 : // compute delta to add to code to compute symbol id ; 1483 : h->delta[j] = k - code; - 000df 8b 45 64 mov eax, DWORD PTR code$[rbp] - 000e2 8b 4d 44 mov ecx, DWORD PTR k$[rbp] - 000e5 2b c8 sub ecx, eax - 000e7 8b c1 mov eax, ecx - 000e9 48 63 4d 24 movsxd rcx, DWORD PTR j$[rbp] - 000ed 48 8b 95 c0 01 + 000e0 8b 45 64 mov eax, DWORD PTR code$[rbp] + 000e3 8b 4d 44 mov ecx, DWORD PTR k$[rbp] + 000e6 2b c8 sub ecx, eax + 000e8 8b c1 mov eax, ecx + 000ea 48 63 4d 24 movsxd rcx, DWORD PTR j$[rbp] + 000ee 48 8b 95 c0 01 00 00 mov rdx, QWORD PTR h$[rbp] - 000f4 89 84 8a 4c 06 + 000f5 89 84 8a 4c 06 00 00 mov DWORD PTR [rdx+rcx*4+1612], eax ; 1484 : if (h->size[k] == j) { - 000fb 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] - 000ff 48 8b 8d c0 01 + 000fc 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] + 00100 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR h$[rbp] - 00106 0f b6 84 01 00 + 00107 0f b6 84 01 00 05 00 00 movzx eax, BYTE PTR [rcx+rax+1280] - 0010e 3b 45 24 cmp eax, DWORD PTR j$[rbp] - 00111 75 67 jne SHORT $LN20@stbi__buil + 0010f 3b 45 24 cmp eax, DWORD PTR j$[rbp] + 00112 75 67 jne SHORT $LN20@stbi__buil $LN11@stbi__buil: ; 1485 : while (h->size[k] == j) - 00113 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] - 00117 48 8b 8d c0 01 + 00114 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] + 00118 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR h$[rbp] - 0011e 0f b6 84 01 00 + 0011f 0f b6 84 01 00 05 00 00 movzx eax, BYTE PTR [rcx+rax+1280] - 00126 3b 45 24 cmp eax, DWORD PTR j$[rbp] - 00129 75 29 jne SHORT $LN12@stbi__buil + 00127 3b 45 24 cmp eax, DWORD PTR j$[rbp] + 0012a 75 29 jne SHORT $LN12@stbi__buil ; 1486 : h->code[k++] = (stbi__uint16)(code++); - 0012b 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] - 0012f 48 8b 8d c0 01 + 0012c 48 63 45 44 movsxd rax, DWORD PTR k$[rbp] + 00130 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR h$[rbp] - 00136 0f b7 55 64 movzx edx, WORD PTR code$[rbp] - 0013a 66 89 94 41 00 + 00137 0f b7 55 64 movzx edx, WORD PTR code$[rbp] + 0013b 66 89 94 41 00 02 00 00 mov WORD PTR [rcx+rax*2+512], dx - 00142 8b 45 44 mov eax, DWORD PTR k$[rbp] - 00145 ff c0 inc eax - 00147 89 45 44 mov DWORD PTR k$[rbp], eax - 0014a 8b 45 64 mov eax, DWORD PTR code$[rbp] - 0014d ff c0 inc eax - 0014f 89 45 64 mov DWORD PTR code$[rbp], eax - 00152 eb bf jmp SHORT $LN11@stbi__buil + 00143 8b 45 44 mov eax, DWORD PTR k$[rbp] + 00146 ff c0 inc eax + 00148 89 45 44 mov DWORD PTR k$[rbp], eax + 0014b 8b 45 64 mov eax, DWORD PTR code$[rbp] + 0014e ff c0 inc eax + 00150 89 45 64 mov DWORD PTR code$[rbp], eax + 00153 eb bf jmp SHORT $LN11@stbi__buil $LN12@stbi__buil: ; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); - 00154 8b 45 64 mov eax, DWORD PTR code$[rbp] - 00157 ff c8 dec eax - 00159 8b 4d 24 mov ecx, DWORD PTR j$[rbp] - 0015c ba 01 00 00 00 mov edx, 1 - 00161 d3 e2 shl edx, cl - 00163 8b ca mov ecx, edx - 00165 3b c1 cmp eax, ecx - 00167 72 11 jb SHORT $LN21@stbi__buil - 00169 48 8d 0d 00 00 + 00155 8b 45 64 mov eax, DWORD PTR code$[rbp] + 00158 ff c8 dec eax + 0015a 8b 4d 24 mov ecx, DWORD PTR j$[rbp] + 0015d ba 01 00 00 00 mov edx, 1 + 00162 d3 e2 shl edx, cl + 00164 8b ca mov ecx, edx + 00166 3b c1 cmp eax, ecx + 00168 72 11 jb SHORT $LN21@stbi__buil + 0016a 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BB@FOKGPEKG@bad?5code?5lengths@ - 00170 e8 00 00 00 00 call stbi__err - 00175 e9 34 01 00 00 jmp $LN1@stbi__buil + 00171 e8 00 00 00 00 call stbi__err + 00176 e9 35 01 00 00 jmp $LN1@stbi__buil $LN21@stbi__buil: $LN20@stbi__buil: @@ -38208,34 +38425,34 @@ $LN20@stbi__buil: ; 1489 : // compute largest code + 1 for this size, preshifted as needed later ; 1490 : h->maxcode[j] = code << (16 - j); - 0017a b8 10 00 00 00 mov eax, 16 - 0017f 2b 45 24 sub eax, DWORD PTR j$[rbp] - 00182 0f b6 c8 movzx ecx, al - 00185 8b 45 64 mov eax, DWORD PTR code$[rbp] - 00188 d3 e0 shl eax, cl - 0018a 48 63 4d 24 movsxd rcx, DWORD PTR j$[rbp] - 0018e 48 8b 95 c0 01 + 0017b b8 10 00 00 00 mov eax, 16 + 00180 2b 45 24 sub eax, DWORD PTR j$[rbp] + 00183 0f b6 c8 movzx ecx, al + 00186 8b 45 64 mov eax, DWORD PTR code$[rbp] + 00189 d3 e0 shl eax, cl + 0018b 48 63 4d 24 movsxd rcx, DWORD PTR j$[rbp] + 0018f 48 8b 95 c0 01 00 00 mov rdx, QWORD PTR h$[rbp] - 00195 89 84 8a 04 06 + 00196 89 84 8a 04 06 00 00 mov DWORD PTR [rdx+rcx*4+1540], eax ; 1491 : code <<= 1; - 0019c 8b 45 64 mov eax, DWORD PTR code$[rbp] - 0019f d1 e0 shl eax, 1 - 001a1 89 45 64 mov DWORD PTR code$[rbp], eax + 0019d 8b 45 64 mov eax, DWORD PTR code$[rbp] + 001a0 d1 e0 shl eax, 1 + 001a2 89 45 64 mov DWORD PTR code$[rbp], eax ; 1492 : } - 001a4 e9 24 ff ff ff jmp $LN8@stbi__buil + 001a5 e9 24 ff ff ff jmp $LN8@stbi__buil $LN9@stbi__buil: ; 1493 : h->maxcode[j] = 0xffffffff; - 001a9 48 63 45 24 movsxd rax, DWORD PTR j$[rbp] - 001ad 48 8b 8d c0 01 + 001aa 48 63 45 24 movsxd rax, DWORD PTR j$[rbp] + 001ae 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR h$[rbp] - 001b4 c7 84 81 04 06 + 001b5 c7 84 81 04 06 00 00 ff ff ff ff mov DWORD PTR [rcx+rax*4+1540], -1 ; ffffffffH @@ -38243,127 +38460,128 @@ $LN9@stbi__buil: ; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated ; 1496 : memset(h->fast, 255, 1 << FAST_BITS); - 001bf 48 8b 85 c0 01 + 001c0 48 8b 85 c0 01 00 00 mov rax, QWORD PTR h$[rbp] - 001c6 41 b8 00 02 00 + 001c7 41 b8 00 02 00 00 mov r8d, 512 ; 00000200H - 001cc ba ff 00 00 00 mov edx, 255 ; 000000ffH - 001d1 48 8b c8 mov rcx, rax - 001d4 e8 00 00 00 00 call memset + 001cd ba ff 00 00 00 mov edx, 255 ; 000000ffH + 001d2 48 8b c8 mov rcx, rax + 001d5 e8 00 00 00 00 call memset + 001da 90 npad 1 ; 1497 : for (i = 0; i < k; ++i) { - 001d9 c7 45 04 00 00 + 001db c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 001e0 eb 08 jmp SHORT $LN15@stbi__buil + 001e2 eb 08 jmp SHORT $LN15@stbi__buil $LN13@stbi__buil: - 001e2 8b 45 04 mov eax, DWORD PTR i$[rbp] - 001e5 ff c0 inc eax - 001e7 89 45 04 mov DWORD PTR i$[rbp], eax + 001e4 8b 45 04 mov eax, DWORD PTR i$[rbp] + 001e7 ff c0 inc eax + 001e9 89 45 04 mov DWORD PTR i$[rbp], eax $LN15@stbi__buil: - 001ea 8b 45 44 mov eax, DWORD PTR k$[rbp] - 001ed 39 45 04 cmp DWORD PTR i$[rbp], eax - 001f0 0f 8d b3 00 00 + 001ec 8b 45 44 mov eax, DWORD PTR k$[rbp] + 001ef 39 45 04 cmp DWORD PTR i$[rbp], eax + 001f2 0f 8d b3 00 00 00 jge $LN14@stbi__buil ; 1498 : int s = h->size[i]; - 001f6 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 001fa 48 8b 8d c0 01 + 001f8 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 001fc 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR h$[rbp] - 00201 0f b6 84 01 00 + 00203 0f b6 84 01 00 05 00 00 movzx eax, BYTE PTR [rcx+rax+1280] - 00209 89 85 84 00 00 + 0020b 89 85 84 00 00 00 mov DWORD PTR s$1[rbp], eax ; 1499 : if (s <= FAST_BITS) { - 0020f 83 bd 84 00 00 + 00211 83 bd 84 00 00 00 09 cmp DWORD PTR s$1[rbp], 9 - 00216 0f 8f 88 00 00 + 00218 0f 8f 88 00 00 00 jg $LN22@stbi__buil ; 1500 : int c = h->code[i] << (FAST_BITS - s); - 0021c 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 00220 48 8b 8d c0 01 + 0021e 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 00222 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR h$[rbp] - 00227 0f b7 84 41 00 + 00229 0f b7 84 41 00 02 00 00 movzx eax, WORD PTR [rcx+rax*2+512] - 0022f b9 09 00 00 00 mov ecx, 9 - 00234 2b 8d 84 00 00 + 00231 b9 09 00 00 00 mov ecx, 9 + 00236 2b 8d 84 00 00 00 sub ecx, DWORD PTR s$1[rbp] - 0023a d3 e0 shl eax, cl - 0023c 89 85 a4 00 00 + 0023c d3 e0 shl eax, cl + 0023e 89 85 a4 00 00 00 mov DWORD PTR c$2[rbp], eax ; 1501 : int m = 1 << (FAST_BITS - s); - 00242 b8 09 00 00 00 mov eax, 9 - 00247 2b 85 84 00 00 + 00244 b8 09 00 00 00 mov eax, 9 + 00249 2b 85 84 00 00 00 sub eax, DWORD PTR s$1[rbp] - 0024d b9 01 00 00 00 mov ecx, 1 - 00252 89 8d 94 01 00 + 0024f b9 01 00 00 00 mov ecx, 1 + 00254 89 8d 94 01 00 00 mov DWORD PTR tv238[rbp], ecx - 00258 0f b6 c8 movzx ecx, al - 0025b 8b 85 94 01 00 + 0025a 0f b6 c8 movzx ecx, al + 0025d 8b 85 94 01 00 00 mov eax, DWORD PTR tv238[rbp] - 00261 d3 e0 shl eax, cl - 00263 89 85 c4 00 00 + 00263 d3 e0 shl eax, cl + 00265 89 85 c4 00 00 00 mov DWORD PTR m$3[rbp], eax ; 1502 : for (j = 0; j < m; ++j) { - 00269 c7 45 24 00 00 + 0026b c7 45 24 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 00270 eb 08 jmp SHORT $LN18@stbi__buil + 00272 eb 08 jmp SHORT $LN18@stbi__buil $LN16@stbi__buil: - 00272 8b 45 24 mov eax, DWORD PTR j$[rbp] - 00275 ff c0 inc eax - 00277 89 45 24 mov DWORD PTR j$[rbp], eax + 00274 8b 45 24 mov eax, DWORD PTR j$[rbp] + 00277 ff c0 inc eax + 00279 89 45 24 mov DWORD PTR j$[rbp], eax $LN18@stbi__buil: - 0027a 8b 85 c4 00 00 + 0027c 8b 85 c4 00 00 00 mov eax, DWORD PTR m$3[rbp] - 00280 39 45 24 cmp DWORD PTR j$[rbp], eax - 00283 7d 1f jge SHORT $LN17@stbi__buil + 00282 39 45 24 cmp DWORD PTR j$[rbp], eax + 00285 7d 1f jge SHORT $LN17@stbi__buil ; 1503 : h->fast[c + j] = (stbi_uc)i; - 00285 8b 45 24 mov eax, DWORD PTR j$[rbp] - 00288 8b 8d a4 00 00 + 00287 8b 45 24 mov eax, DWORD PTR j$[rbp] + 0028a 8b 8d a4 00 00 00 mov ecx, DWORD PTR c$2[rbp] - 0028e 03 c8 add ecx, eax - 00290 8b c1 mov eax, ecx - 00292 48 98 cdqe - 00294 48 8b 8d c0 01 + 00290 03 c8 add ecx, eax + 00292 8b c1 mov eax, ecx + 00294 48 98 cdqe + 00296 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR h$[rbp] - 0029b 0f b6 55 04 movzx edx, BYTE PTR i$[rbp] - 0029f 88 14 01 mov BYTE PTR [rcx+rax], dl + 0029d 0f b6 55 04 movzx edx, BYTE PTR i$[rbp] + 002a1 88 14 01 mov BYTE PTR [rcx+rax], dl ; 1504 : } - 002a2 eb ce jmp SHORT $LN16@stbi__buil + 002a4 eb ce jmp SHORT $LN16@stbi__buil $LN17@stbi__buil: $LN22@stbi__buil: ; 1505 : } ; 1506 : } - 002a4 e9 39 ff ff ff jmp $LN13@stbi__buil + 002a6 e9 39 ff ff ff jmp $LN13@stbi__buil $LN14@stbi__buil: ; 1507 : return 1; - 002a9 b8 01 00 00 00 mov eax, 1 + 002ab b8 01 00 00 00 mov eax, 1 $LN1@stbi__buil: ; 1508 : } - 002ae 48 8d a5 a8 01 + 002b0 48 8d a5 a8 01 00 00 lea rsp, QWORD PTR [rbp+424] - 002b5 5f pop rdi - 002b6 5d pop rbp - 002b7 c3 ret 0 + 002b7 5f pop rdi + 002b8 5d pop rbp + 002b9 c3 ret 0 stbi__build_huffman ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -38375,13 +38593,13 @@ j$ = 36 good$ = 72 src$1 = 104 dest$2 = 136 -tv323 = 340 -tv303 = 340 -tv281 = 340 -tv261 = 340 tv129 = 340 -tv356 = 344 +tv261 = 340 +tv281 = 340 +tv303 = 340 +tv323 = 340 tv82 = 344 +tv356 = 344 data$ = 384 img_n$ = 392 req_comp$ = 400 @@ -38403,132 +38621,134 @@ stbi__convert_format16 PROC ; COMDAT 00021 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00028 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002d 90 npad 1 ; 1276 : int i, j; ; 1277 : stbi__uint16* good; ; 1278 : ; 1279 : if (req_comp == img_n) return data; - 0002d 8b 85 88 01 00 + 0002e 8b 85 88 01 00 00 mov eax, DWORD PTR img_n$[rbp] - 00033 39 85 90 01 00 + 00034 39 85 90 01 00 00 cmp DWORD PTR req_comp$[rbp], eax - 00039 75 0c jne SHORT $LN43@stbi__conv - 0003b 48 8b 85 80 01 + 0003a 75 0c jne SHORT $LN43@stbi__conv + 0003c 48 8b 85 80 01 00 00 mov rax, QWORD PTR data$[rbp] - 00042 e9 33 0a 00 00 jmp $LN1@stbi__conv + 00043 e9 37 0a 00 00 jmp $LN1@stbi__conv $LN43@stbi__conv: ; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); - 00047 83 bd 90 01 00 + 00048 83 bd 90 01 00 00 01 cmp DWORD PTR req_comp$[rbp], 1 - 0004e 7c 09 jl SHORT $LN59@stbi__conv - 00050 83 bd 90 01 00 + 0004f 7c 09 jl SHORT $LN59@stbi__conv + 00051 83 bd 90 01 00 00 04 cmp DWORD PTR req_comp$[rbp], 4 - 00057 7e 1c jle SHORT $LN60@stbi__conv + 00058 7e 1c jle SHORT $LN60@stbi__conv $LN59@stbi__conv: - 00059 41 b8 00 05 00 + 0005a 41 b8 00 05 00 00 mov r8d, 1280 ; 00000500H - 0005f 48 8d 15 00 00 + 00060 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 00066 48 8d 0d 00 00 + 00067 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1DO@MABJBNAJ@?$AAr?$AAe?$AAq?$AA_?$AAc?$AAo?$AAm?$AAp?$AA?5?$AA?$DO?$AA?$DN?$AA?5?$AA1?$AA?5?$AA?$CG@ - 0006d ff 15 00 00 00 + 0006e ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 00073 33 c0 xor eax, eax + 00074 33 c0 xor eax, eax $LN60@stbi__conv: ; 1281 : ; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); - 00075 8b 85 90 01 00 + 00076 8b 85 90 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 0007b 0f af 85 98 01 + 0007c 0f af 85 98 01 00 00 imul eax, DWORD PTR x$[rbp] - 00082 0f af 85 a0 01 + 00083 0f af 85 a0 01 00 00 imul eax, DWORD PTR y$[rbp] - 00089 d1 e0 shl eax, 1 - 0008b 8b c0 mov eax, eax - 0008d 8b c8 mov ecx, eax - 0008f e8 00 00 00 00 call stbi__malloc - 00094 48 89 45 48 mov QWORD PTR good$[rbp], rax + 0008a d1 e0 shl eax, 1 + 0008c 8b c0 mov eax, eax + 0008e 8b c8 mov ecx, eax + 00090 e8 00 00 00 00 call stbi__malloc + 00095 48 89 45 48 mov QWORD PTR good$[rbp], rax ; 1283 : if (good == NULL) { - 00098 48 83 7d 48 00 cmp QWORD PTR good$[rbp], 0 - 0009d 75 41 jne SHORT $LN44@stbi__conv + 00099 48 83 7d 48 00 cmp QWORD PTR good$[rbp], 0 + 0009e 75 42 jne SHORT $LN44@stbi__conv ; 1284 : STBI_FREE(data); - 0009f 48 8b 8d 80 01 + 000a0 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR data$[rbp] - 000a6 ff 15 00 00 00 + 000a7 ff 15 00 00 00 00 call QWORD PTR __imp_free + 000ad 90 npad 1 ; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); - 000ac 48 8d 0d 00 00 + 000ae 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 000b3 e8 00 00 00 00 call stbi__err - 000b8 85 c0 test eax, eax - 000ba 74 0d je SHORT $LN61@stbi__conv - 000bc 48 c7 85 58 01 + 000b5 e8 00 00 00 00 call stbi__err + 000ba 85 c0 test eax, eax + 000bc 74 0d je SHORT $LN61@stbi__conv + 000be 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv82[rbp], 0 - 000c7 eb 0b jmp SHORT $LN62@stbi__conv + 000c9 eb 0b jmp SHORT $LN62@stbi__conv $LN61@stbi__conv: - 000c9 48 c7 85 58 01 + 000cb 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv82[rbp], 0 $LN62@stbi__conv: - 000d4 48 8b 85 58 01 + 000d6 48 8b 85 58 01 00 00 mov rax, QWORD PTR tv82[rbp] - 000db e9 9a 09 00 00 jmp $LN1@stbi__conv + 000dd e9 9d 09 00 00 jmp $LN1@stbi__conv $LN44@stbi__conv: ; 1286 : } ; 1287 : ; 1288 : for (j = 0; j < (int)y; ++j) { - 000e0 c7 45 24 00 00 + 000e2 c7 45 24 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 000e7 eb 08 jmp SHORT $LN4@stbi__conv + 000e9 eb 08 jmp SHORT $LN4@stbi__conv $LN2@stbi__conv: - 000e9 8b 45 24 mov eax, DWORD PTR j$[rbp] - 000ec ff c0 inc eax - 000ee 89 45 24 mov DWORD PTR j$[rbp], eax + 000eb 8b 45 24 mov eax, DWORD PTR j$[rbp] + 000ee ff c0 inc eax + 000f0 89 45 24 mov DWORD PTR j$[rbp], eax $LN4@stbi__conv: - 000f1 8b 85 a0 01 00 + 000f3 8b 85 a0 01 00 00 mov eax, DWORD PTR y$[rbp] - 000f7 39 45 24 cmp DWORD PTR j$[rbp], eax - 000fa 0f 8d 69 09 00 + 000f9 39 45 24 cmp DWORD PTR j$[rbp], eax + 000fc 0f 8d 6b 09 00 00 jge $LN3@stbi__conv ; 1289 : stbi__uint16* src = data + j * x * img_n; - 00100 8b 45 24 mov eax, DWORD PTR j$[rbp] - 00103 0f af 85 98 01 + 00102 8b 45 24 mov eax, DWORD PTR j$[rbp] + 00105 0f af 85 98 01 00 00 imul eax, DWORD PTR x$[rbp] - 0010a 0f af 85 88 01 + 0010c 0f af 85 88 01 00 00 imul eax, DWORD PTR img_n$[rbp] - 00111 8b c0 mov eax, eax - 00113 48 8b 8d 80 01 + 00113 8b c0 mov eax, eax + 00115 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR data$[rbp] - 0011a 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] - 0011e 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 0011c 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] + 00120 48 89 45 68 mov QWORD PTR src$1[rbp], rax ; 1290 : stbi__uint16* dest = good + j * x * req_comp; - 00122 8b 45 24 mov eax, DWORD PTR j$[rbp] - 00125 0f af 85 98 01 + 00124 8b 45 24 mov eax, DWORD PTR j$[rbp] + 00127 0f af 85 98 01 00 00 imul eax, DWORD PTR x$[rbp] - 0012c 0f af 85 90 01 + 0012e 0f af 85 90 01 00 00 imul eax, DWORD PTR req_comp$[rbp] - 00133 8b c0 mov eax, eax - 00135 48 8b 4d 48 mov rcx, QWORD PTR good$[rbp] - 00139 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] - 0013d 48 89 85 88 00 + 00135 8b c0 mov eax, eax + 00137 48 8b 4d 48 mov rcx, QWORD PTR good$[rbp] + 0013b 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] + 0013f 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax ; 1291 : @@ -38538,785 +38758,789 @@ $LN4@stbi__conv: ; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros ; 1296 : switch (STBI__COMBO(img_n, req_comp)) { - 00144 8b 85 90 01 00 + 00146 8b 85 90 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 0014a 8b 8d 88 01 00 + 0014c 8b 8d 88 01 00 00 mov ecx, DWORD PTR img_n$[rbp] - 00150 8d 04 c8 lea eax, DWORD PTR [rax+rcx*8] - 00153 89 85 54 01 00 + 00152 8d 04 c8 lea eax, DWORD PTR [rax+rcx*8] + 00155 89 85 54 01 00 00 mov DWORD PTR tv129[rbp], eax - 00159 8b 85 54 01 00 + 0015b 8b 85 54 01 00 00 mov eax, DWORD PTR tv129[rbp] - 0015f 83 e8 0a sub eax, 10 - 00162 89 85 54 01 00 + 00161 83 e8 0a sub eax, 10 + 00164 89 85 54 01 00 00 mov DWORD PTR tv129[rbp], eax - 00168 83 bd 54 01 00 + 0016a 83 bd 54 01 00 00 19 cmp DWORD PTR tv129[rbp], 25 - 0016f 0f 87 85 08 00 + 00171 0f 87 85 08 00 00 ja $LN57@stbi__conv - 00175 48 63 85 54 01 + 00177 48 63 85 54 01 00 00 movsxd rax, DWORD PTR tv129[rbp] - 0017c 48 8d 0d 00 00 + 0017e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__ImageBase - 00183 8b 84 81 00 00 + 00185 8b 84 81 00 00 00 00 mov eax, DWORD PTR $LN66@stbi__conv[rcx+rax*4] - 0018a 48 03 c1 add rax, rcx - 0018d ff e0 jmp rax + 0018c 48 03 c1 add rax, rcx + 0018f ff e0 jmp rax $LN45@stbi__conv: ; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; - 0018f 8b 85 98 01 00 + 00191 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 00195 ff c8 dec eax - 00197 89 45 04 mov DWORD PTR i$[rbp], eax - 0019a eb 26 jmp SHORT $LN9@stbi__conv + 00197 ff c8 dec eax + 00199 89 45 04 mov DWORD PTR i$[rbp], eax + 0019c eb 26 jmp SHORT $LN9@stbi__conv $LN7@stbi__conv: - 0019c 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0019f ff c8 dec eax - 001a1 89 45 04 mov DWORD PTR i$[rbp], eax - 001a4 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 001a8 48 83 c0 02 add rax, 2 - 001ac 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 001b0 48 8b 85 88 00 + 0019e 8b 45 04 mov eax, DWORD PTR i$[rbp] + 001a1 ff c8 dec eax + 001a3 89 45 04 mov DWORD PTR i$[rbp], eax + 001a6 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 001aa 48 83 c0 02 add rax, 2 + 001ae 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 001b2 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 001b7 48 83 c0 04 add rax, 4 - 001bb 48 89 85 88 00 + 001b9 48 83 c0 04 add rax, 4 + 001bd 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN9@stbi__conv: - 001c2 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 001c6 7c 41 jl SHORT $LN8@stbi__conv - 001c8 b8 02 00 00 00 mov eax, 2 - 001cd 48 6b c0 00 imul rax, rax, 0 - 001d1 b9 02 00 00 00 mov ecx, 2 - 001d6 48 6b c9 00 imul rcx, rcx, 0 - 001da 48 8b 95 88 00 + 001c4 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 001c8 7c 41 jl SHORT $LN8@stbi__conv + 001ca b8 02 00 00 00 mov eax, 2 + 001cf 48 6b c0 00 imul rax, rax, 0 + 001d3 b9 02 00 00 00 mov ecx, 2 + 001d8 48 6b c9 00 imul rcx, rcx, 0 + 001dc 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 001e1 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 001e5 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 001ea 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 001ee b8 02 00 00 00 mov eax, 2 - 001f3 48 6b c0 01 imul rax, rax, 1 - 001f7 b9 ff ff 00 00 mov ecx, 65535 ; 0000ffffH - 001fc 48 8b 95 88 00 + 001e3 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 001e7 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 001ec 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 001f0 b8 02 00 00 00 mov eax, 2 + 001f5 48 6b c0 01 imul rax, rax, 1 + 001f9 b9 ff ff 00 00 mov ecx, 65535 ; 0000ffffH + 001fe 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00203 66 89 0c 02 mov WORD PTR [rdx+rax], cx - 00207 eb 93 jmp SHORT $LN7@stbi__conv + 00205 66 89 0c 02 mov WORD PTR [rdx+rax], cx + 00209 eb 93 jmp SHORT $LN7@stbi__conv $LN8@stbi__conv: - 00209 e9 56 08 00 00 jmp $LN5@stbi__conv + 0020b e9 58 08 00 00 jmp $LN5@stbi__conv $LN46@stbi__conv: ; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; - 0020e 8b 85 98 01 00 + 00210 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 00214 ff c8 dec eax - 00216 89 45 04 mov DWORD PTR i$[rbp], eax - 00219 eb 26 jmp SHORT $LN12@stbi__conv + 00216 ff c8 dec eax + 00218 89 45 04 mov DWORD PTR i$[rbp], eax + 0021b eb 26 jmp SHORT $LN12@stbi__conv $LN10@stbi__conv: - 0021b 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0021e ff c8 dec eax - 00220 89 45 04 mov DWORD PTR i$[rbp], eax - 00223 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 00227 48 83 c0 02 add rax, 2 - 0022b 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 0022f 48 8b 85 88 00 + 0021d 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00220 ff c8 dec eax + 00222 89 45 04 mov DWORD PTR i$[rbp], eax + 00225 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 00229 48 83 c0 02 add rax, 2 + 0022d 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 00231 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 00236 48 83 c0 06 add rax, 6 - 0023a 48 89 85 88 00 + 00238 48 83 c0 06 add rax, 6 + 0023c 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN12@stbi__conv: - 00241 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 00245 7c 7d jl SHORT $LN11@stbi__conv - 00247 b8 02 00 00 00 mov eax, 2 - 0024c 48 6b c0 00 imul rax, rax, 0 - 00250 b9 02 00 00 00 mov ecx, 2 - 00255 48 6b c9 02 imul rcx, rcx, 2 - 00259 48 8b 95 88 00 + 00243 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 00247 7c 7d jl SHORT $LN11@stbi__conv + 00249 b8 02 00 00 00 mov eax, 2 + 0024e 48 6b c0 00 imul rax, rax, 0 + 00252 b9 02 00 00 00 mov ecx, 2 + 00257 48 6b c9 02 imul rcx, rcx, 2 + 0025b 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00260 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00264 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 00269 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 0026d b8 02 00 00 00 mov eax, 2 - 00272 48 6b c0 02 imul rax, rax, 2 - 00276 b9 02 00 00 00 mov ecx, 2 - 0027b 48 6b c9 01 imul rcx, rcx, 1 - 0027f 48 8b 95 88 00 + 00262 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00266 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 0026b 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 0026f b8 02 00 00 00 mov eax, 2 + 00274 48 6b c0 02 imul rax, rax, 2 + 00278 b9 02 00 00 00 mov ecx, 2 + 0027d 48 6b c9 01 imul rcx, rcx, 1 + 00281 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00286 4c 8b 85 88 00 + 00288 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 0028d 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 00292 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 00296 b8 02 00 00 00 mov eax, 2 - 0029b 48 6b c0 01 imul rax, rax, 1 - 0029f b9 02 00 00 00 mov ecx, 2 - 002a4 48 6b c9 00 imul rcx, rcx, 0 - 002a8 48 8b 95 88 00 + 0028f 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 00294 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00298 b8 02 00 00 00 mov eax, 2 + 0029d 48 6b c0 01 imul rax, rax, 1 + 002a1 b9 02 00 00 00 mov ecx, 2 + 002a6 48 6b c9 00 imul rcx, rcx, 0 + 002aa 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 002af 4c 8b 85 88 00 + 002b1 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 002b6 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 002bb 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 002bf e9 57 ff ff ff jmp $LN10@stbi__conv + 002b8 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 002bd 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 002c1 e9 57 ff ff ff jmp $LN10@stbi__conv $LN11@stbi__conv: - 002c4 e9 9b 07 00 00 jmp $LN5@stbi__conv + 002c6 e9 9d 07 00 00 jmp $LN5@stbi__conv $LN47@stbi__conv: ; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; - 002c9 8b 85 98 01 00 + 002cb 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 002cf ff c8 dec eax - 002d1 89 45 04 mov DWORD PTR i$[rbp], eax - 002d4 eb 26 jmp SHORT $LN15@stbi__conv + 002d1 ff c8 dec eax + 002d3 89 45 04 mov DWORD PTR i$[rbp], eax + 002d6 eb 26 jmp SHORT $LN15@stbi__conv $LN13@stbi__conv: - 002d6 8b 45 04 mov eax, DWORD PTR i$[rbp] - 002d9 ff c8 dec eax - 002db 89 45 04 mov DWORD PTR i$[rbp], eax - 002de 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 002e2 48 83 c0 02 add rax, 2 - 002e6 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 002ea 48 8b 85 88 00 + 002d8 8b 45 04 mov eax, DWORD PTR i$[rbp] + 002db ff c8 dec eax + 002dd 89 45 04 mov DWORD PTR i$[rbp], eax + 002e0 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 002e4 48 83 c0 02 add rax, 2 + 002e8 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 002ec 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 002f1 48 83 c0 08 add rax, 8 - 002f5 48 89 85 88 00 + 002f3 48 83 c0 08 add rax, 8 + 002f7 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN15@stbi__conv: - 002fc 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 00300 0f 8c 96 00 00 + 002fe 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 00302 0f 8c 96 00 00 00 jl $LN14@stbi__conv - 00306 b8 02 00 00 00 mov eax, 2 - 0030b 48 6b c0 00 imul rax, rax, 0 - 0030f b9 02 00 00 00 mov ecx, 2 - 00314 48 6b c9 02 imul rcx, rcx, 2 - 00318 48 8b 95 88 00 + 00308 b8 02 00 00 00 mov eax, 2 + 0030d 48 6b c0 00 imul rax, rax, 0 + 00311 b9 02 00 00 00 mov ecx, 2 + 00316 48 6b c9 02 imul rcx, rcx, 2 + 0031a 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0031f 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00323 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 00328 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 0032c b8 02 00 00 00 mov eax, 2 - 00331 48 6b c0 02 imul rax, rax, 2 - 00335 b9 02 00 00 00 mov ecx, 2 - 0033a 48 6b c9 01 imul rcx, rcx, 1 - 0033e 48 8b 95 88 00 + 00321 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00325 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 0032a 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 0032e b8 02 00 00 00 mov eax, 2 + 00333 48 6b c0 02 imul rax, rax, 2 + 00337 b9 02 00 00 00 mov ecx, 2 + 0033c 48 6b c9 01 imul rcx, rcx, 1 + 00340 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00345 4c 8b 85 88 00 + 00347 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 0034c 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 00351 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 00355 b8 02 00 00 00 mov eax, 2 - 0035a 48 6b c0 01 imul rax, rax, 1 - 0035e b9 02 00 00 00 mov ecx, 2 - 00363 48 6b c9 00 imul rcx, rcx, 0 - 00367 48 8b 95 88 00 + 0034e 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 00353 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00357 b8 02 00 00 00 mov eax, 2 + 0035c 48 6b c0 01 imul rax, rax, 1 + 00360 b9 02 00 00 00 mov ecx, 2 + 00365 48 6b c9 00 imul rcx, rcx, 0 + 00369 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0036e 4c 8b 85 88 00 + 00370 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 00375 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 0037a 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 0037e b8 02 00 00 00 mov eax, 2 - 00383 48 6b c0 03 imul rax, rax, 3 - 00387 b9 ff ff 00 00 mov ecx, 65535 ; 0000ffffH - 0038c 48 8b 95 88 00 + 00377 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 0037c 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00380 b8 02 00 00 00 mov eax, 2 + 00385 48 6b c0 03 imul rax, rax, 3 + 00389 b9 ff ff 00 00 mov ecx, 65535 ; 0000ffffH + 0038e 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00393 66 89 0c 02 mov WORD PTR [rdx+rax], cx - 00397 e9 3a ff ff ff jmp $LN13@stbi__conv + 00395 66 89 0c 02 mov WORD PTR [rdx+rax], cx + 00399 e9 3a ff ff ff jmp $LN13@stbi__conv $LN14@stbi__conv: - 0039c e9 c3 06 00 00 jmp $LN5@stbi__conv + 0039e e9 c5 06 00 00 jmp $LN5@stbi__conv $LN48@stbi__conv: ; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; - 003a1 8b 85 98 01 00 + 003a3 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 003a7 ff c8 dec eax - 003a9 89 45 04 mov DWORD PTR i$[rbp], eax - 003ac eb 26 jmp SHORT $LN18@stbi__conv + 003a9 ff c8 dec eax + 003ab 89 45 04 mov DWORD PTR i$[rbp], eax + 003ae eb 26 jmp SHORT $LN18@stbi__conv $LN16@stbi__conv: - 003ae 8b 45 04 mov eax, DWORD PTR i$[rbp] - 003b1 ff c8 dec eax - 003b3 89 45 04 mov DWORD PTR i$[rbp], eax - 003b6 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 003ba 48 83 c0 04 add rax, 4 - 003be 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 003c2 48 8b 85 88 00 + 003b0 8b 45 04 mov eax, DWORD PTR i$[rbp] + 003b3 ff c8 dec eax + 003b5 89 45 04 mov DWORD PTR i$[rbp], eax + 003b8 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 003bc 48 83 c0 04 add rax, 4 + 003c0 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 003c4 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 003c9 48 83 c0 02 add rax, 2 - 003cd 48 89 85 88 00 + 003cb 48 83 c0 02 add rax, 2 + 003cf 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN18@stbi__conv: - 003d4 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 003d8 7c 28 jl SHORT $LN17@stbi__conv - 003da b8 02 00 00 00 mov eax, 2 - 003df 48 6b c0 00 imul rax, rax, 0 - 003e3 b9 02 00 00 00 mov ecx, 2 - 003e8 48 6b c9 00 imul rcx, rcx, 0 - 003ec 48 8b 95 88 00 + 003d6 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 003da 7c 28 jl SHORT $LN17@stbi__conv + 003dc b8 02 00 00 00 mov eax, 2 + 003e1 48 6b c0 00 imul rax, rax, 0 + 003e5 b9 02 00 00 00 mov ecx, 2 + 003ea 48 6b c9 00 imul rcx, rcx, 0 + 003ee 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 003f3 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 003f7 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 003fc 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 00400 eb ac jmp SHORT $LN16@stbi__conv + 003f5 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 003f9 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 003fe 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00402 eb ac jmp SHORT $LN16@stbi__conv $LN17@stbi__conv: - 00402 e9 5d 06 00 00 jmp $LN5@stbi__conv + 00404 e9 5f 06 00 00 jmp $LN5@stbi__conv $LN49@stbi__conv: ; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; - 00407 8b 85 98 01 00 + 00409 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 0040d ff c8 dec eax - 0040f 89 45 04 mov DWORD PTR i$[rbp], eax - 00412 eb 26 jmp SHORT $LN21@stbi__conv + 0040f ff c8 dec eax + 00411 89 45 04 mov DWORD PTR i$[rbp], eax + 00414 eb 26 jmp SHORT $LN21@stbi__conv $LN19@stbi__conv: - 00414 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00417 ff c8 dec eax - 00419 89 45 04 mov DWORD PTR i$[rbp], eax - 0041c 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 00420 48 83 c0 04 add rax, 4 - 00424 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 00428 48 8b 85 88 00 + 00416 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00419 ff c8 dec eax + 0041b 89 45 04 mov DWORD PTR i$[rbp], eax + 0041e 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 00422 48 83 c0 04 add rax, 4 + 00426 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 0042a 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 0042f 48 83 c0 06 add rax, 6 - 00433 48 89 85 88 00 + 00431 48 83 c0 06 add rax, 6 + 00435 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN21@stbi__conv: - 0043a 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 0043e 7c 7d jl SHORT $LN20@stbi__conv - 00440 b8 02 00 00 00 mov eax, 2 - 00445 48 6b c0 00 imul rax, rax, 0 - 00449 b9 02 00 00 00 mov ecx, 2 - 0044e 48 6b c9 02 imul rcx, rcx, 2 - 00452 48 8b 95 88 00 + 0043c 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 00440 7c 7d jl SHORT $LN20@stbi__conv + 00442 b8 02 00 00 00 mov eax, 2 + 00447 48 6b c0 00 imul rax, rax, 0 + 0044b b9 02 00 00 00 mov ecx, 2 + 00450 48 6b c9 02 imul rcx, rcx, 2 + 00454 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00459 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 0045d 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 00462 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 00466 b8 02 00 00 00 mov eax, 2 - 0046b 48 6b c0 02 imul rax, rax, 2 - 0046f b9 02 00 00 00 mov ecx, 2 - 00474 48 6b c9 01 imul rcx, rcx, 1 - 00478 48 8b 95 88 00 + 0045b 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 0045f 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 00464 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00468 b8 02 00 00 00 mov eax, 2 + 0046d 48 6b c0 02 imul rax, rax, 2 + 00471 b9 02 00 00 00 mov ecx, 2 + 00476 48 6b c9 01 imul rcx, rcx, 1 + 0047a 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0047f 4c 8b 85 88 00 + 00481 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 00486 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 0048b 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 0048f b8 02 00 00 00 mov eax, 2 - 00494 48 6b c0 01 imul rax, rax, 1 - 00498 b9 02 00 00 00 mov ecx, 2 - 0049d 48 6b c9 00 imul rcx, rcx, 0 - 004a1 48 8b 95 88 00 + 00488 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 0048d 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00491 b8 02 00 00 00 mov eax, 2 + 00496 48 6b c0 01 imul rax, rax, 1 + 0049a b9 02 00 00 00 mov ecx, 2 + 0049f 48 6b c9 00 imul rcx, rcx, 0 + 004a3 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 004a8 4c 8b 85 88 00 + 004aa 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 004af 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 004b4 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 004b8 e9 57 ff ff ff jmp $LN19@stbi__conv + 004b1 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 004b6 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 004ba e9 57 ff ff ff jmp $LN19@stbi__conv $LN20@stbi__conv: - 004bd e9 a2 05 00 00 jmp $LN5@stbi__conv + 004bf e9 a4 05 00 00 jmp $LN5@stbi__conv $LN50@stbi__conv: ; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; - 004c2 8b 85 98 01 00 + 004c4 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 004c8 ff c8 dec eax - 004ca 89 45 04 mov DWORD PTR i$[rbp], eax - 004cd eb 26 jmp SHORT $LN24@stbi__conv + 004ca ff c8 dec eax + 004cc 89 45 04 mov DWORD PTR i$[rbp], eax + 004cf eb 26 jmp SHORT $LN24@stbi__conv $LN22@stbi__conv: - 004cf 8b 45 04 mov eax, DWORD PTR i$[rbp] - 004d2 ff c8 dec eax - 004d4 89 45 04 mov DWORD PTR i$[rbp], eax - 004d7 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 004db 48 83 c0 04 add rax, 4 - 004df 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 004e3 48 8b 85 88 00 + 004d1 8b 45 04 mov eax, DWORD PTR i$[rbp] + 004d4 ff c8 dec eax + 004d6 89 45 04 mov DWORD PTR i$[rbp], eax + 004d9 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 004dd 48 83 c0 04 add rax, 4 + 004e1 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 004e5 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 004ea 48 83 c0 08 add rax, 8 - 004ee 48 89 85 88 00 + 004ec 48 83 c0 08 add rax, 8 + 004f0 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN24@stbi__conv: - 004f5 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 004f9 0f 8c a3 00 00 + 004f7 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 004fb 0f 8c a3 00 00 00 jl $LN23@stbi__conv - 004ff b8 02 00 00 00 mov eax, 2 - 00504 48 6b c0 00 imul rax, rax, 0 - 00508 b9 02 00 00 00 mov ecx, 2 - 0050d 48 6b c9 02 imul rcx, rcx, 2 - 00511 48 8b 95 88 00 + 00501 b8 02 00 00 00 mov eax, 2 + 00506 48 6b c0 00 imul rax, rax, 0 + 0050a b9 02 00 00 00 mov ecx, 2 + 0050f 48 6b c9 02 imul rcx, rcx, 2 + 00513 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00518 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 0051c 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 00521 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 00525 b8 02 00 00 00 mov eax, 2 - 0052a 48 6b c0 02 imul rax, rax, 2 - 0052e b9 02 00 00 00 mov ecx, 2 - 00533 48 6b c9 01 imul rcx, rcx, 1 - 00537 48 8b 95 88 00 + 0051a 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 0051e 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 00523 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00527 b8 02 00 00 00 mov eax, 2 + 0052c 48 6b c0 02 imul rax, rax, 2 + 00530 b9 02 00 00 00 mov ecx, 2 + 00535 48 6b c9 01 imul rcx, rcx, 1 + 00539 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0053e 4c 8b 85 88 00 + 00540 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 00545 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 0054a 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 0054e b8 02 00 00 00 mov eax, 2 - 00553 48 6b c0 01 imul rax, rax, 1 - 00557 b9 02 00 00 00 mov ecx, 2 - 0055c 48 6b c9 00 imul rcx, rcx, 0 - 00560 48 8b 95 88 00 + 00547 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 0054c 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00550 b8 02 00 00 00 mov eax, 2 + 00555 48 6b c0 01 imul rax, rax, 1 + 00559 b9 02 00 00 00 mov ecx, 2 + 0055e 48 6b c9 00 imul rcx, rcx, 0 + 00562 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00567 4c 8b 85 88 00 + 00569 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 0056e 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 00573 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 00577 b8 02 00 00 00 mov eax, 2 - 0057c 48 6b c0 01 imul rax, rax, 1 - 00580 b9 02 00 00 00 mov ecx, 2 - 00585 48 6b c9 03 imul rcx, rcx, 3 - 00589 48 8b 95 88 00 + 00570 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 00575 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00579 b8 02 00 00 00 mov eax, 2 + 0057e 48 6b c0 01 imul rax, rax, 1 + 00582 b9 02 00 00 00 mov ecx, 2 + 00587 48 6b c9 03 imul rcx, rcx, 3 + 0058b 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00590 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00594 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 00599 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 0059d e9 2d ff ff ff jmp $LN22@stbi__conv + 00592 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00596 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 0059b 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 0059f e9 2d ff ff ff jmp $LN22@stbi__conv $LN23@stbi__conv: - 005a2 e9 bd 04 00 00 jmp $LN5@stbi__conv + 005a4 e9 bf 04 00 00 jmp $LN5@stbi__conv $LN51@stbi__conv: ; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; - 005a7 8b 85 98 01 00 + 005a9 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 005ad ff c8 dec eax - 005af 89 45 04 mov DWORD PTR i$[rbp], eax - 005b2 eb 26 jmp SHORT $LN27@stbi__conv + 005af ff c8 dec eax + 005b1 89 45 04 mov DWORD PTR i$[rbp], eax + 005b4 eb 26 jmp SHORT $LN27@stbi__conv $LN25@stbi__conv: - 005b4 8b 45 04 mov eax, DWORD PTR i$[rbp] - 005b7 ff c8 dec eax - 005b9 89 45 04 mov DWORD PTR i$[rbp], eax - 005bc 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 005c0 48 83 c0 06 add rax, 6 - 005c4 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 005c8 48 8b 85 88 00 + 005b6 8b 45 04 mov eax, DWORD PTR i$[rbp] + 005b9 ff c8 dec eax + 005bb 89 45 04 mov DWORD PTR i$[rbp], eax + 005be 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 005c2 48 83 c0 06 add rax, 6 + 005c6 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 005ca 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 005cf 48 83 c0 08 add rax, 8 - 005d3 48 89 85 88 00 + 005d1 48 83 c0 08 add rax, 8 + 005d5 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN27@stbi__conv: - 005da 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 005de 0f 8c 90 00 00 + 005dc 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 005e0 0f 8c 90 00 00 00 jl $LN26@stbi__conv - 005e4 b8 02 00 00 00 mov eax, 2 - 005e9 48 6b c0 00 imul rax, rax, 0 - 005ed b9 02 00 00 00 mov ecx, 2 - 005f2 48 6b c9 00 imul rcx, rcx, 0 - 005f6 48 8b 95 88 00 + 005e6 b8 02 00 00 00 mov eax, 2 + 005eb 48 6b c0 00 imul rax, rax, 0 + 005ef b9 02 00 00 00 mov ecx, 2 + 005f4 48 6b c9 00 imul rcx, rcx, 0 + 005f8 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 005fd 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00601 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 00606 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 0060a b8 02 00 00 00 mov eax, 2 - 0060f 48 6b c0 01 imul rax, rax, 1 - 00613 b9 02 00 00 00 mov ecx, 2 - 00618 48 6b c9 01 imul rcx, rcx, 1 - 0061c 48 8b 95 88 00 + 005ff 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00603 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 00608 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 0060c b8 02 00 00 00 mov eax, 2 + 00611 48 6b c0 01 imul rax, rax, 1 + 00615 b9 02 00 00 00 mov ecx, 2 + 0061a 48 6b c9 01 imul rcx, rcx, 1 + 0061e 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00623 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00627 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 0062c 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 00630 b8 02 00 00 00 mov eax, 2 - 00635 48 6b c0 02 imul rax, rax, 2 - 00639 b9 02 00 00 00 mov ecx, 2 - 0063e 48 6b c9 02 imul rcx, rcx, 2 - 00642 48 8b 95 88 00 + 00625 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00629 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 0062e 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00632 b8 02 00 00 00 mov eax, 2 + 00637 48 6b c0 02 imul rax, rax, 2 + 0063b b9 02 00 00 00 mov ecx, 2 + 00640 48 6b c9 02 imul rcx, rcx, 2 + 00644 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00649 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 0064d 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 00652 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 00656 b8 02 00 00 00 mov eax, 2 - 0065b 48 6b c0 03 imul rax, rax, 3 - 0065f b9 ff ff 00 00 mov ecx, 65535 ; 0000ffffH - 00664 48 8b 95 88 00 + 0064b 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 0064f 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 00654 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00658 b8 02 00 00 00 mov eax, 2 + 0065d 48 6b c0 03 imul rax, rax, 3 + 00661 b9 ff ff 00 00 mov ecx, 65535 ; 0000ffffH + 00666 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0066b 66 89 0c 02 mov WORD PTR [rdx+rax], cx - 0066f e9 40 ff ff ff jmp $LN25@stbi__conv + 0066d 66 89 0c 02 mov WORD PTR [rdx+rax], cx + 00671 e9 40 ff ff ff jmp $LN25@stbi__conv $LN26@stbi__conv: - 00674 e9 eb 03 00 00 jmp $LN5@stbi__conv + 00676 e9 ed 03 00 00 jmp $LN5@stbi__conv $LN52@stbi__conv: ; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; - 00679 8b 85 98 01 00 + 0067b 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 0067f ff c8 dec eax - 00681 89 45 04 mov DWORD PTR i$[rbp], eax - 00684 eb 26 jmp SHORT $LN30@stbi__conv + 00681 ff c8 dec eax + 00683 89 45 04 mov DWORD PTR i$[rbp], eax + 00686 eb 26 jmp SHORT $LN30@stbi__conv $LN28@stbi__conv: - 00686 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00689 ff c8 dec eax - 0068b 89 45 04 mov DWORD PTR i$[rbp], eax - 0068e 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 00692 48 83 c0 06 add rax, 6 - 00696 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 0069a 48 8b 85 88 00 + 00688 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0068b ff c8 dec eax + 0068d 89 45 04 mov DWORD PTR i$[rbp], eax + 00690 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 00694 48 83 c0 06 add rax, 6 + 00698 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 0069c 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 006a1 48 83 c0 02 add rax, 2 - 006a5 48 89 85 88 00 + 006a3 48 83 c0 02 add rax, 2 + 006a7 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN30@stbi__conv: - 006ac 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 006b0 7c 65 jl SHORT $LN29@stbi__conv - 006b2 b8 02 00 00 00 mov eax, 2 - 006b7 48 6b c0 02 imul rax, rax, 2 - 006bb 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] - 006bf 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 006c3 b9 02 00 00 00 mov ecx, 2 - 006c8 48 6b c9 01 imul rcx, rcx, 1 - 006cc 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] - 006d0 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] - 006d4 ba 02 00 00 00 mov edx, 2 - 006d9 48 6b d2 00 imul rdx, rdx, 0 - 006dd 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 006e1 41 0f b7 14 10 movzx edx, WORD PTR [r8+rdx] - 006e6 89 95 54 01 00 + 006ae 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 006b2 7c 65 jl SHORT $LN29@stbi__conv + 006b4 b8 02 00 00 00 mov eax, 2 + 006b9 48 6b c0 02 imul rax, rax, 2 + 006bd 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] + 006c1 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 006c5 b9 02 00 00 00 mov ecx, 2 + 006ca 48 6b c9 01 imul rcx, rcx, 1 + 006ce 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] + 006d2 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] + 006d6 ba 02 00 00 00 mov edx, 2 + 006db 48 6b d2 00 imul rdx, rdx, 0 + 006df 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 006e3 41 0f b7 14 10 movzx edx, WORD PTR [r8+rdx] + 006e8 89 95 54 01 00 00 mov DWORD PTR tv261[rbp], edx - 006ec 44 8b c0 mov r8d, eax - 006ef 8b d1 mov edx, ecx - 006f1 8b 85 54 01 00 + 006ee 44 8b c0 mov r8d, eax + 006f1 8b d1 mov edx, ecx + 006f3 8b 85 54 01 00 00 mov eax, DWORD PTR tv261[rbp] - 006f7 8b c8 mov ecx, eax - 006f9 e8 00 00 00 00 call stbi__compute_y_16 - 006fe b9 02 00 00 00 mov ecx, 2 - 00703 48 6b c9 00 imul rcx, rcx, 0 - 00707 48 8b 95 88 00 + 006f9 8b c8 mov ecx, eax + 006fb e8 00 00 00 00 call stbi__compute_y_16 + 00700 b9 02 00 00 00 mov ecx, 2 + 00705 48 6b c9 00 imul rcx, rcx, 0 + 00709 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0070e 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 00712 e9 6f ff ff ff jmp $LN28@stbi__conv + 00710 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00714 e9 6f ff ff ff jmp $LN28@stbi__conv $LN29@stbi__conv: - 00717 e9 48 03 00 00 jmp $LN5@stbi__conv + 00719 e9 4a 03 00 00 jmp $LN5@stbi__conv $LN53@stbi__conv: ; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; - 0071c 8b 85 98 01 00 + 0071e 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 00722 ff c8 dec eax - 00724 89 45 04 mov DWORD PTR i$[rbp], eax - 00727 eb 26 jmp SHORT $LN33@stbi__conv + 00724 ff c8 dec eax + 00726 89 45 04 mov DWORD PTR i$[rbp], eax + 00729 eb 26 jmp SHORT $LN33@stbi__conv $LN31@stbi__conv: - 00729 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0072c ff c8 dec eax - 0072e 89 45 04 mov DWORD PTR i$[rbp], eax - 00731 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 00735 48 83 c0 06 add rax, 6 - 00739 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 0073d 48 8b 85 88 00 + 0072b 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0072e ff c8 dec eax + 00730 89 45 04 mov DWORD PTR i$[rbp], eax + 00733 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 00737 48 83 c0 06 add rax, 6 + 0073b 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 0073f 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 00744 48 83 c0 04 add rax, 4 - 00748 48 89 85 88 00 + 00746 48 83 c0 04 add rax, 4 + 0074a 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN33@stbi__conv: - 0074f 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 00753 7c 7e jl SHORT $LN32@stbi__conv - 00755 b8 02 00 00 00 mov eax, 2 - 0075a 48 6b c0 02 imul rax, rax, 2 - 0075e 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] - 00762 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 00766 b9 02 00 00 00 mov ecx, 2 - 0076b 48 6b c9 01 imul rcx, rcx, 1 - 0076f 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] - 00773 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] - 00777 ba 02 00 00 00 mov edx, 2 - 0077c 48 6b d2 00 imul rdx, rdx, 0 - 00780 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00784 41 0f b7 14 10 movzx edx, WORD PTR [r8+rdx] - 00789 89 95 54 01 00 + 00751 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 00755 7c 7e jl SHORT $LN32@stbi__conv + 00757 b8 02 00 00 00 mov eax, 2 + 0075c 48 6b c0 02 imul rax, rax, 2 + 00760 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] + 00764 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 00768 b9 02 00 00 00 mov ecx, 2 + 0076d 48 6b c9 01 imul rcx, rcx, 1 + 00771 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] + 00775 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] + 00779 ba 02 00 00 00 mov edx, 2 + 0077e 48 6b d2 00 imul rdx, rdx, 0 + 00782 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00786 41 0f b7 14 10 movzx edx, WORD PTR [r8+rdx] + 0078b 89 95 54 01 00 00 mov DWORD PTR tv281[rbp], edx - 0078f 44 8b c0 mov r8d, eax - 00792 8b d1 mov edx, ecx - 00794 8b 85 54 01 00 + 00791 44 8b c0 mov r8d, eax + 00794 8b d1 mov edx, ecx + 00796 8b 85 54 01 00 00 mov eax, DWORD PTR tv281[rbp] - 0079a 8b c8 mov ecx, eax - 0079c e8 00 00 00 00 call stbi__compute_y_16 - 007a1 b9 02 00 00 00 mov ecx, 2 - 007a6 48 6b c9 00 imul rcx, rcx, 0 - 007aa 48 8b 95 88 00 + 0079c 8b c8 mov ecx, eax + 0079e e8 00 00 00 00 call stbi__compute_y_16 + 007a3 b9 02 00 00 00 mov ecx, 2 + 007a8 48 6b c9 00 imul rcx, rcx, 0 + 007ac 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 007b1 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 007b5 b8 02 00 00 00 mov eax, 2 - 007ba 48 6b c0 01 imul rax, rax, 1 - 007be b9 ff ff 00 00 mov ecx, 65535 ; 0000ffffH - 007c3 48 8b 95 88 00 + 007b3 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 007b7 b8 02 00 00 00 mov eax, 2 + 007bc 48 6b c0 01 imul rax, rax, 1 + 007c0 b9 ff ff 00 00 mov ecx, 65535 ; 0000ffffH + 007c5 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 007ca 66 89 0c 02 mov WORD PTR [rdx+rax], cx - 007ce e9 56 ff ff ff jmp $LN31@stbi__conv + 007cc 66 89 0c 02 mov WORD PTR [rdx+rax], cx + 007d0 e9 56 ff ff ff jmp $LN31@stbi__conv $LN32@stbi__conv: - 007d3 e9 8c 02 00 00 jmp $LN5@stbi__conv + 007d5 e9 8e 02 00 00 jmp $LN5@stbi__conv $LN54@stbi__conv: ; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; - 007d8 8b 85 98 01 00 + 007da 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 007de ff c8 dec eax - 007e0 89 45 04 mov DWORD PTR i$[rbp], eax - 007e3 eb 26 jmp SHORT $LN36@stbi__conv + 007e0 ff c8 dec eax + 007e2 89 45 04 mov DWORD PTR i$[rbp], eax + 007e5 eb 26 jmp SHORT $LN36@stbi__conv $LN34@stbi__conv: - 007e5 8b 45 04 mov eax, DWORD PTR i$[rbp] - 007e8 ff c8 dec eax - 007ea 89 45 04 mov DWORD PTR i$[rbp], eax - 007ed 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 007f1 48 83 c0 08 add rax, 8 - 007f5 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 007f9 48 8b 85 88 00 + 007e7 8b 45 04 mov eax, DWORD PTR i$[rbp] + 007ea ff c8 dec eax + 007ec 89 45 04 mov DWORD PTR i$[rbp], eax + 007ef 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 007f3 48 83 c0 08 add rax, 8 + 007f7 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 007fb 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 00800 48 83 c0 02 add rax, 2 - 00804 48 89 85 88 00 + 00802 48 83 c0 02 add rax, 2 + 00806 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN36@stbi__conv: - 0080b 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 0080f 7c 65 jl SHORT $LN35@stbi__conv - 00811 b8 02 00 00 00 mov eax, 2 - 00816 48 6b c0 02 imul rax, rax, 2 - 0081a 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] - 0081e 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 00822 b9 02 00 00 00 mov ecx, 2 - 00827 48 6b c9 01 imul rcx, rcx, 1 - 0082b 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] - 0082f 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] - 00833 ba 02 00 00 00 mov edx, 2 - 00838 48 6b d2 00 imul rdx, rdx, 0 - 0083c 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00840 41 0f b7 14 10 movzx edx, WORD PTR [r8+rdx] - 00845 89 95 54 01 00 + 0080d 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 00811 7c 65 jl SHORT $LN35@stbi__conv + 00813 b8 02 00 00 00 mov eax, 2 + 00818 48 6b c0 02 imul rax, rax, 2 + 0081c 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] + 00820 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 00824 b9 02 00 00 00 mov ecx, 2 + 00829 48 6b c9 01 imul rcx, rcx, 1 + 0082d 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] + 00831 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] + 00835 ba 02 00 00 00 mov edx, 2 + 0083a 48 6b d2 00 imul rdx, rdx, 0 + 0083e 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00842 41 0f b7 14 10 movzx edx, WORD PTR [r8+rdx] + 00847 89 95 54 01 00 00 mov DWORD PTR tv303[rbp], edx - 0084b 44 8b c0 mov r8d, eax - 0084e 8b d1 mov edx, ecx - 00850 8b 85 54 01 00 + 0084d 44 8b c0 mov r8d, eax + 00850 8b d1 mov edx, ecx + 00852 8b 85 54 01 00 00 mov eax, DWORD PTR tv303[rbp] - 00856 8b c8 mov ecx, eax - 00858 e8 00 00 00 00 call stbi__compute_y_16 - 0085d b9 02 00 00 00 mov ecx, 2 - 00862 48 6b c9 00 imul rcx, rcx, 0 - 00866 48 8b 95 88 00 + 00858 8b c8 mov ecx, eax + 0085a e8 00 00 00 00 call stbi__compute_y_16 + 0085f b9 02 00 00 00 mov ecx, 2 + 00864 48 6b c9 00 imul rcx, rcx, 0 + 00868 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0086d 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 00871 e9 6f ff ff ff jmp $LN34@stbi__conv + 0086f 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00873 e9 6f ff ff ff jmp $LN34@stbi__conv $LN35@stbi__conv: - 00876 e9 e9 01 00 00 jmp $LN5@stbi__conv + 00878 e9 eb 01 00 00 jmp $LN5@stbi__conv $LN55@stbi__conv: ; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; - 0087b 8b 85 98 01 00 + 0087d 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 00881 ff c8 dec eax - 00883 89 45 04 mov DWORD PTR i$[rbp], eax - 00886 eb 26 jmp SHORT $LN39@stbi__conv + 00883 ff c8 dec eax + 00885 89 45 04 mov DWORD PTR i$[rbp], eax + 00888 eb 26 jmp SHORT $LN39@stbi__conv $LN37@stbi__conv: - 00888 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0088b ff c8 dec eax - 0088d 89 45 04 mov DWORD PTR i$[rbp], eax - 00890 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 00894 48 83 c0 08 add rax, 8 - 00898 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 0089c 48 8b 85 88 00 + 0088a 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0088d ff c8 dec eax + 0088f 89 45 04 mov DWORD PTR i$[rbp], eax + 00892 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 00896 48 83 c0 08 add rax, 8 + 0089a 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 0089e 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 008a3 48 83 c0 04 add rax, 4 - 008a7 48 89 85 88 00 + 008a5 48 83 c0 04 add rax, 4 + 008a9 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN39@stbi__conv: - 008ae 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 008b2 0f 8c 8b 00 00 + 008b0 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 008b4 0f 8c 8b 00 00 00 jl $LN38@stbi__conv - 008b8 b8 02 00 00 00 mov eax, 2 - 008bd 48 6b c0 02 imul rax, rax, 2 - 008c1 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] - 008c5 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 008c9 b9 02 00 00 00 mov ecx, 2 - 008ce 48 6b c9 01 imul rcx, rcx, 1 - 008d2 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] - 008d6 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] - 008da ba 02 00 00 00 mov edx, 2 - 008df 48 6b d2 00 imul rdx, rdx, 0 - 008e3 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 008e7 41 0f b7 14 10 movzx edx, WORD PTR [r8+rdx] - 008ec 89 95 54 01 00 + 008ba b8 02 00 00 00 mov eax, 2 + 008bf 48 6b c0 02 imul rax, rax, 2 + 008c3 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] + 008c7 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 008cb b9 02 00 00 00 mov ecx, 2 + 008d0 48 6b c9 01 imul rcx, rcx, 1 + 008d4 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] + 008d8 0f b7 0c 0a movzx ecx, WORD PTR [rdx+rcx] + 008dc ba 02 00 00 00 mov edx, 2 + 008e1 48 6b d2 00 imul rdx, rdx, 0 + 008e5 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 008e9 41 0f b7 14 10 movzx edx, WORD PTR [r8+rdx] + 008ee 89 95 54 01 00 00 mov DWORD PTR tv323[rbp], edx - 008f2 44 8b c0 mov r8d, eax - 008f5 8b d1 mov edx, ecx - 008f7 8b 85 54 01 00 + 008f4 44 8b c0 mov r8d, eax + 008f7 8b d1 mov edx, ecx + 008f9 8b 85 54 01 00 00 mov eax, DWORD PTR tv323[rbp] - 008fd 8b c8 mov ecx, eax - 008ff e8 00 00 00 00 call stbi__compute_y_16 - 00904 b9 02 00 00 00 mov ecx, 2 - 00909 48 6b c9 00 imul rcx, rcx, 0 - 0090d 48 8b 95 88 00 + 008ff 8b c8 mov ecx, eax + 00901 e8 00 00 00 00 call stbi__compute_y_16 + 00906 b9 02 00 00 00 mov ecx, 2 + 0090b 48 6b c9 00 imul rcx, rcx, 0 + 0090f 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00914 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 00918 b8 02 00 00 00 mov eax, 2 - 0091d 48 6b c0 03 imul rax, rax, 3 - 00921 b9 02 00 00 00 mov ecx, 2 - 00926 48 6b c9 01 imul rcx, rcx, 1 - 0092a 48 8b 95 88 00 + 00916 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 0091a b8 02 00 00 00 mov eax, 2 + 0091f 48 6b c0 03 imul rax, rax, 3 + 00923 b9 02 00 00 00 mov ecx, 2 + 00928 48 6b c9 01 imul rcx, rcx, 1 + 0092c 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00931 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00935 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 0093a 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 0093e e9 45 ff ff ff jmp $LN37@stbi__conv + 00933 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00937 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 0093c 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00940 e9 45 ff ff ff jmp $LN37@stbi__conv $LN38@stbi__conv: - 00943 e9 1c 01 00 00 jmp $LN5@stbi__conv + 00945 e9 1e 01 00 00 jmp $LN5@stbi__conv $LN56@stbi__conv: ; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; - 00948 8b 85 98 01 00 + 0094a 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 0094e ff c8 dec eax - 00950 89 45 04 mov DWORD PTR i$[rbp], eax - 00953 eb 26 jmp SHORT $LN42@stbi__conv + 00950 ff c8 dec eax + 00952 89 45 04 mov DWORD PTR i$[rbp], eax + 00955 eb 26 jmp SHORT $LN42@stbi__conv $LN40@stbi__conv: - 00955 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00958 ff c8 dec eax - 0095a 89 45 04 mov DWORD PTR i$[rbp], eax - 0095d 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 00961 48 83 c0 08 add rax, 8 - 00965 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 00969 48 8b 85 88 00 + 00957 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0095a ff c8 dec eax + 0095c 89 45 04 mov DWORD PTR i$[rbp], eax + 0095f 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 00963 48 83 c0 08 add rax, 8 + 00967 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 0096b 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 00970 48 83 c0 06 add rax, 6 - 00974 48 89 85 88 00 + 00972 48 83 c0 06 add rax, 6 + 00976 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN42@stbi__conv: - 0097b 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 0097f 7c 77 jl SHORT $LN41@stbi__conv - 00981 b8 02 00 00 00 mov eax, 2 - 00986 48 6b c0 00 imul rax, rax, 0 - 0098a b9 02 00 00 00 mov ecx, 2 - 0098f 48 6b c9 00 imul rcx, rcx, 0 - 00993 48 8b 95 88 00 + 0097d 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 00981 7c 77 jl SHORT $LN41@stbi__conv + 00983 b8 02 00 00 00 mov eax, 2 + 00988 48 6b c0 00 imul rax, rax, 0 + 0098c b9 02 00 00 00 mov ecx, 2 + 00991 48 6b c9 00 imul rcx, rcx, 0 + 00995 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0099a 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 0099e 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 009a3 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 009a7 b8 02 00 00 00 mov eax, 2 - 009ac 48 6b c0 01 imul rax, rax, 1 - 009b0 b9 02 00 00 00 mov ecx, 2 - 009b5 48 6b c9 01 imul rcx, rcx, 1 - 009b9 48 8b 95 88 00 + 0099c 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 009a0 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 009a5 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 009a9 b8 02 00 00 00 mov eax, 2 + 009ae 48 6b c0 01 imul rax, rax, 1 + 009b2 b9 02 00 00 00 mov ecx, 2 + 009b7 48 6b c9 01 imul rcx, rcx, 1 + 009bb 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 009c0 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 009c4 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 009c9 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 009cd b8 02 00 00 00 mov eax, 2 - 009d2 48 6b c0 02 imul rax, rax, 2 - 009d6 b9 02 00 00 00 mov ecx, 2 - 009db 48 6b c9 02 imul rcx, rcx, 2 - 009df 48 8b 95 88 00 + 009c2 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 009c6 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 009cb 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 009cf b8 02 00 00 00 mov eax, 2 + 009d4 48 6b c0 02 imul rax, rax, 2 + 009d8 b9 02 00 00 00 mov ecx, 2 + 009dd 48 6b c9 02 imul rcx, rcx, 2 + 009e1 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 009e6 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 009ea 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] - 009ef 66 89 04 0a mov WORD PTR [rdx+rcx], ax - 009f3 e9 5d ff ff ff jmp $LN40@stbi__conv + 009e8 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 009ec 41 0f b7 04 00 movzx eax, WORD PTR [r8+rax] + 009f1 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 009f5 e9 5d ff ff ff jmp $LN40@stbi__conv $LN41@stbi__conv: - 009f8 eb 6a jmp SHORT $LN5@stbi__conv + 009fa eb 6c jmp SHORT $LN5@stbi__conv $LN57@stbi__conv: ; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); - 009fa 33 c0 xor eax, eax - 009fc 85 c0 test eax, eax - 009fe 75 1c jne SHORT $LN63@stbi__conv - 00a00 41 b8 1d 05 00 + 009fc 33 c0 xor eax, eax + 009fe 85 c0 test eax, eax + 00a00 75 1c jne SHORT $LN63@stbi__conv + 00a02 41 b8 1d 05 00 00 mov r8d, 1309 ; 0000051dH - 00a06 48 8d 15 00 00 + 00a08 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 00a0d 48 8d 0d 00 00 + 00a0f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_13COJANIEC@?$AA0@ - 00a14 ff 15 00 00 00 + 00a16 ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 00a1a 33 c0 xor eax, eax + 00a1c 33 c0 xor eax, eax $LN63@stbi__conv: - 00a1c 48 8b 8d 80 01 + 00a1e 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR data$[rbp] - 00a23 ff 15 00 00 00 + 00a25 ff 15 00 00 00 00 call QWORD PTR __imp_free - 00a29 48 8b 4d 48 mov rcx, QWORD PTR good$[rbp] - 00a2d ff 15 00 00 00 + 00a2b 90 npad 1 + 00a2c 48 8b 4d 48 mov rcx, QWORD PTR good$[rbp] + 00a30 ff 15 00 00 00 00 call QWORD PTR __imp_free - 00a33 48 8d 0d 00 00 + 00a36 90 npad 1 + 00a37 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@MHDBFHD@unsupported@ - 00a3a e8 00 00 00 00 call stbi__err - 00a3f 85 c0 test eax, eax - 00a41 74 0d je SHORT $LN64@stbi__conv - 00a43 48 c7 85 58 01 + 00a3e e8 00 00 00 00 call stbi__err + 00a43 85 c0 test eax, eax + 00a45 74 0d je SHORT $LN64@stbi__conv + 00a47 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv356[rbp], 0 - 00a4e eb 0b jmp SHORT $LN65@stbi__conv + 00a52 eb 0b jmp SHORT $LN65@stbi__conv $LN64@stbi__conv: - 00a50 48 c7 85 58 01 + 00a54 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv356[rbp], 0 $LN65@stbi__conv: - 00a5b 48 8b 85 58 01 + 00a5f 48 8b 85 58 01 00 00 mov rax, QWORD PTR tv356[rbp] - 00a62 eb 16 jmp SHORT $LN1@stbi__conv + 00a66 eb 17 jmp SHORT $LN1@stbi__conv $LN5@stbi__conv: ; 1310 : } ; 1311 : #undef STBI__CASE ; 1312 : } - 00a64 e9 80 f6 ff ff jmp $LN2@stbi__conv + 00a68 e9 7e f6 ff ff jmp $LN2@stbi__conv $LN3@stbi__conv: ; 1313 : ; 1314 : STBI_FREE(data); - 00a69 48 8b 8d 80 01 + 00a6d 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR data$[rbp] - 00a70 ff 15 00 00 00 + 00a74 ff 15 00 00 00 00 call QWORD PTR __imp_free + 00a7a 90 npad 1 ; 1315 : return good; - 00a76 48 8b 45 48 mov rax, QWORD PTR good$[rbp] + 00a7b 48 8b 45 48 mov rax, QWORD PTR good$[rbp] $LN1@stbi__conv: ; 1316 : } - 00a7a 48 8d a5 68 01 + 00a7f 48 8d a5 68 01 00 00 lea rsp, QWORD PTR [rbp+360] - 00a81 5f pop rdi - 00a82 5d pop rbp - 00a83 c3 ret 0 + 00a86 5f pop rdi + 00a87 5d pop rbp + 00a88 c3 ret 0 + 00a89 0f 1f 00 npad 3 $LN66@stbi__conv: - 00a84 00 00 00 00 DD $LN45@stbi__conv - 00a88 00 00 00 00 DD $LN46@stbi__conv - 00a8c 00 00 00 00 DD $LN47@stbi__conv - 00a90 00 00 00 00 DD $LN57@stbi__conv - 00a94 00 00 00 00 DD $LN57@stbi__conv + 00a8c 00 00 00 00 DD $LN45@stbi__conv + 00a90 00 00 00 00 DD $LN46@stbi__conv + 00a94 00 00 00 00 DD $LN47@stbi__conv 00a98 00 00 00 00 DD $LN57@stbi__conv 00a9c 00 00 00 00 DD $LN57@stbi__conv - 00aa0 00 00 00 00 DD $LN48@stbi__conv + 00aa0 00 00 00 00 DD $LN57@stbi__conv 00aa4 00 00 00 00 DD $LN57@stbi__conv - 00aa8 00 00 00 00 DD $LN49@stbi__conv - 00aac 00 00 00 00 DD $LN50@stbi__conv - 00ab0 00 00 00 00 DD $LN57@stbi__conv - 00ab4 00 00 00 00 DD $LN57@stbi__conv + 00aa8 00 00 00 00 DD $LN48@stbi__conv + 00aac 00 00 00 00 DD $LN57@stbi__conv + 00ab0 00 00 00 00 DD $LN49@stbi__conv + 00ab4 00 00 00 00 DD $LN50@stbi__conv 00ab8 00 00 00 00 DD $LN57@stbi__conv 00abc 00 00 00 00 DD $LN57@stbi__conv - 00ac0 00 00 00 00 DD $LN52@stbi__conv - 00ac4 00 00 00 00 DD $LN53@stbi__conv - 00ac8 00 00 00 00 DD $LN57@stbi__conv - 00acc 00 00 00 00 DD $LN51@stbi__conv + 00ac0 00 00 00 00 DD $LN57@stbi__conv + 00ac4 00 00 00 00 DD $LN57@stbi__conv + 00ac8 00 00 00 00 DD $LN52@stbi__conv + 00acc 00 00 00 00 DD $LN53@stbi__conv 00ad0 00 00 00 00 DD $LN57@stbi__conv - 00ad4 00 00 00 00 DD $LN57@stbi__conv + 00ad4 00 00 00 00 DD $LN51@stbi__conv 00ad8 00 00 00 00 DD $LN57@stbi__conv 00adc 00 00 00 00 DD $LN57@stbi__conv - 00ae0 00 00 00 00 DD $LN54@stbi__conv - 00ae4 00 00 00 00 DD $LN55@stbi__conv - 00ae8 00 00 00 00 DD $LN56@stbi__conv + 00ae0 00 00 00 00 DD $LN57@stbi__conv + 00ae4 00 00 00 00 DD $LN57@stbi__conv + 00ae8 00 00 00 00 DD $LN54@stbi__conv + 00aec 00 00 00 00 DD $LN55@stbi__conv + 00af0 00 00 00 00 DD $LN56@stbi__conv stbi__convert_format16 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -39341,26 +39565,27 @@ stbi__compute_y_16 PROC ; COMDAT 0001b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00022 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00027 90 npad 1 ; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - 00027 6b 85 e0 00 00 + 00028 6b 85 e0 00 00 00 4d imul eax, DWORD PTR r$[rbp], 77 ; 0000004dH - 0002e 69 8d e8 00 00 + 0002f 69 8d e8 00 00 00 96 00 00 00 imul ecx, DWORD PTR g$[rbp], 150 ; 00000096H - 00038 03 c1 add eax, ecx - 0003a 6b 8d f0 00 00 + 00039 03 c1 add eax, ecx + 0003b 6b 8d f0 00 00 00 1d imul ecx, DWORD PTR b$[rbp], 29 - 00041 03 c1 add eax, ecx - 00043 c1 f8 08 sar eax, 8 + 00042 03 c1 add eax, ecx + 00044 c1 f8 08 sar eax, 8 ; 1268 : } - 00046 48 8d a5 c8 00 + 00047 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0004d 5f pop rdi - 0004e 5d pop rbp - 0004f c3 ret 0 + 0004e 5f pop rdi + 0004f 5d pop rbp + 00050 c3 ret 0 stbi__compute_y_16 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -39372,13 +39597,13 @@ j$ = 36 good$ = 72 src$1 = 104 dest$2 = 136 -tv320 = 340 -tv300 = 340 -tv278 = 340 -tv258 = 340 tv94 = 340 -tv353 = 344 +tv258 = 340 +tv278 = 340 +tv300 = 340 +tv320 = 340 tv81 = 344 +tv353 = 344 data$ = 384 img_n$ = 392 req_comp$ = 400 @@ -39400,132 +39625,134 @@ stbi__convert_format PROC ; COMDAT 00021 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00028 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002d 90 npad 1 ; 1219 : int i, j; ; 1220 : unsigned char* good; ; 1221 : ; 1222 : if (req_comp == img_n) return data; - 0002d 8b 85 88 01 00 + 0002e 8b 85 88 01 00 00 mov eax, DWORD PTR img_n$[rbp] - 00033 39 85 90 01 00 + 00034 39 85 90 01 00 00 cmp DWORD PTR req_comp$[rbp], eax - 00039 75 0c jne SHORT $LN43@stbi__conv - 0003b 48 8b 85 80 01 + 0003a 75 0c jne SHORT $LN43@stbi__conv + 0003c 48 8b 85 80 01 00 00 mov rax, QWORD PTR data$[rbp] - 00042 e9 ff 09 00 00 jmp $LN1@stbi__conv + 00043 e9 03 0a 00 00 jmp $LN1@stbi__conv $LN43@stbi__conv: ; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); - 00047 83 bd 90 01 00 + 00048 83 bd 90 01 00 00 01 cmp DWORD PTR req_comp$[rbp], 1 - 0004e 7c 09 jl SHORT $LN59@stbi__conv - 00050 83 bd 90 01 00 + 0004f 7c 09 jl SHORT $LN59@stbi__conv + 00051 83 bd 90 01 00 00 04 cmp DWORD PTR req_comp$[rbp], 4 - 00057 7e 1c jle SHORT $LN60@stbi__conv + 00058 7e 1c jle SHORT $LN60@stbi__conv $LN59@stbi__conv: - 00059 41 b8 c7 04 00 + 0005a 41 b8 c7 04 00 00 mov r8d, 1223 ; 000004c7H - 0005f 48 8d 15 00 00 + 00060 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 00066 48 8d 0d 00 00 + 00067 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1DO@MABJBNAJ@?$AAr?$AAe?$AAq?$AA_?$AAc?$AAo?$AAm?$AAp?$AA?5?$AA?$DO?$AA?$DN?$AA?5?$AA1?$AA?5?$AA?$CG@ - 0006d ff 15 00 00 00 + 0006e ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 00073 33 c0 xor eax, eax + 00074 33 c0 xor eax, eax $LN60@stbi__conv: ; 1224 : ; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); - 00075 45 33 c9 xor r9d, r9d - 00078 44 8b 85 a0 01 + 00076 45 33 c9 xor r9d, r9d + 00079 44 8b 85 a0 01 00 00 mov r8d, DWORD PTR y$[rbp] - 0007f 8b 95 98 01 00 + 00080 8b 95 98 01 00 00 mov edx, DWORD PTR x$[rbp] - 00085 8b 8d 90 01 00 + 00086 8b 8d 90 01 00 00 mov ecx, DWORD PTR req_comp$[rbp] - 0008b e8 00 00 00 00 call stbi__malloc_mad3 - 00090 48 89 45 48 mov QWORD PTR good$[rbp], rax + 0008c e8 00 00 00 00 call stbi__malloc_mad3 + 00091 48 89 45 48 mov QWORD PTR good$[rbp], rax ; 1226 : if (good == NULL) { - 00094 48 83 7d 48 00 cmp QWORD PTR good$[rbp], 0 - 00099 75 41 jne SHORT $LN44@stbi__conv + 00095 48 83 7d 48 00 cmp QWORD PTR good$[rbp], 0 + 0009a 75 42 jne SHORT $LN44@stbi__conv ; 1227 : STBI_FREE(data); - 0009b 48 8b 8d 80 01 + 0009c 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR data$[rbp] - 000a2 ff 15 00 00 00 + 000a3 ff 15 00 00 00 00 call QWORD PTR __imp_free + 000a9 90 npad 1 ; 1228 : return stbi__errpuc("outofmem", "Out of memory"); - 000a8 48 8d 0d 00 00 + 000aa 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 000af e8 00 00 00 00 call stbi__err - 000b4 85 c0 test eax, eax - 000b6 74 0d je SHORT $LN61@stbi__conv - 000b8 48 c7 85 58 01 + 000b1 e8 00 00 00 00 call stbi__err + 000b6 85 c0 test eax, eax + 000b8 74 0d je SHORT $LN61@stbi__conv + 000ba 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv81[rbp], 0 - 000c3 eb 0b jmp SHORT $LN62@stbi__conv + 000c5 eb 0b jmp SHORT $LN62@stbi__conv $LN61@stbi__conv: - 000c5 48 c7 85 58 01 + 000c7 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv81[rbp], 0 $LN62@stbi__conv: - 000d0 48 8b 85 58 01 + 000d2 48 8b 85 58 01 00 00 mov rax, QWORD PTR tv81[rbp] - 000d7 e9 6a 09 00 00 jmp $LN1@stbi__conv + 000d9 e9 6d 09 00 00 jmp $LN1@stbi__conv $LN44@stbi__conv: ; 1229 : } ; 1230 : ; 1231 : for (j = 0; j < (int)y; ++j) { - 000dc c7 45 24 00 00 + 000de c7 45 24 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 000e3 eb 08 jmp SHORT $LN4@stbi__conv + 000e5 eb 08 jmp SHORT $LN4@stbi__conv $LN2@stbi__conv: - 000e5 8b 45 24 mov eax, DWORD PTR j$[rbp] - 000e8 ff c0 inc eax - 000ea 89 45 24 mov DWORD PTR j$[rbp], eax + 000e7 8b 45 24 mov eax, DWORD PTR j$[rbp] + 000ea ff c0 inc eax + 000ec 89 45 24 mov DWORD PTR j$[rbp], eax $LN4@stbi__conv: - 000ed 8b 85 a0 01 00 + 000ef 8b 85 a0 01 00 00 mov eax, DWORD PTR y$[rbp] - 000f3 39 45 24 cmp DWORD PTR j$[rbp], eax - 000f6 0f 8d 39 09 00 + 000f5 39 45 24 cmp DWORD PTR j$[rbp], eax + 000f8 0f 8d 3b 09 00 00 jge $LN3@stbi__conv ; 1232 : unsigned char* src = data + j * x * img_n; - 000fc 8b 45 24 mov eax, DWORD PTR j$[rbp] - 000ff 0f af 85 98 01 + 000fe 8b 45 24 mov eax, DWORD PTR j$[rbp] + 00101 0f af 85 98 01 00 00 imul eax, DWORD PTR x$[rbp] - 00106 0f af 85 88 01 + 00108 0f af 85 88 01 00 00 imul eax, DWORD PTR img_n$[rbp] - 0010d 8b c0 mov eax, eax - 0010f 48 8b 8d 80 01 + 0010f 8b c0 mov eax, eax + 00111 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR data$[rbp] - 00116 48 03 c8 add rcx, rax - 00119 48 8b c1 mov rax, rcx - 0011c 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 00118 48 03 c8 add rcx, rax + 0011b 48 8b c1 mov rax, rcx + 0011e 48 89 45 68 mov QWORD PTR src$1[rbp], rax ; 1233 : unsigned char* dest = good + j * x * req_comp; - 00120 8b 45 24 mov eax, DWORD PTR j$[rbp] - 00123 0f af 85 98 01 + 00122 8b 45 24 mov eax, DWORD PTR j$[rbp] + 00125 0f af 85 98 01 00 00 imul eax, DWORD PTR x$[rbp] - 0012a 0f af 85 90 01 + 0012c 0f af 85 90 01 00 00 imul eax, DWORD PTR req_comp$[rbp] - 00131 8b c0 mov eax, eax - 00133 48 8b 4d 48 mov rcx, QWORD PTR good$[rbp] - 00137 48 03 c8 add rcx, rax - 0013a 48 8b c1 mov rax, rcx - 0013d 48 89 85 88 00 + 00133 8b c0 mov eax, eax + 00135 48 8b 4d 48 mov rcx, QWORD PTR good$[rbp] + 00139 48 03 c8 add rcx, rax + 0013c 48 8b c1 mov rax, rcx + 0013f 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax ; 1234 : @@ -39535,781 +39762,785 @@ $LN4@stbi__conv: ; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros ; 1239 : switch (STBI__COMBO(img_n, req_comp)) { - 00144 8b 85 90 01 00 + 00146 8b 85 90 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 0014a 8b 8d 88 01 00 + 0014c 8b 8d 88 01 00 00 mov ecx, DWORD PTR img_n$[rbp] - 00150 8d 04 c8 lea eax, DWORD PTR [rax+rcx*8] - 00153 89 85 54 01 00 + 00152 8d 04 c8 lea eax, DWORD PTR [rax+rcx*8] + 00155 89 85 54 01 00 00 mov DWORD PTR tv94[rbp], eax - 00159 8b 85 54 01 00 + 0015b 8b 85 54 01 00 00 mov eax, DWORD PTR tv94[rbp] - 0015f 83 e8 0a sub eax, 10 - 00162 89 85 54 01 00 + 00161 83 e8 0a sub eax, 10 + 00164 89 85 54 01 00 00 mov DWORD PTR tv94[rbp], eax - 00168 83 bd 54 01 00 + 0016a 83 bd 54 01 00 00 19 cmp DWORD PTR tv94[rbp], 25 - 0016f 0f 87 51 08 00 + 00171 0f 87 51 08 00 00 ja $LN57@stbi__conv - 00175 48 63 85 54 01 + 00177 48 63 85 54 01 00 00 movsxd rax, DWORD PTR tv94[rbp] - 0017c 48 8d 0d 00 00 + 0017e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__ImageBase - 00183 8b 84 81 00 00 + 00185 8b 84 81 00 00 00 00 mov eax, DWORD PTR $LN66@stbi__conv[rcx+rax*4] - 0018a 48 03 c1 add rax, rcx - 0018d ff e0 jmp rax + 0018c 48 03 c1 add rax, rcx + 0018f ff e0 jmp rax $LN45@stbi__conv: ; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; - 0018f 8b 85 98 01 00 + 00191 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 00195 ff c8 dec eax - 00197 89 45 04 mov DWORD PTR i$[rbp], eax - 0019a eb 25 jmp SHORT $LN9@stbi__conv + 00197 ff c8 dec eax + 00199 89 45 04 mov DWORD PTR i$[rbp], eax + 0019c eb 25 jmp SHORT $LN9@stbi__conv $LN7@stbi__conv: - 0019c 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0019f ff c8 dec eax - 001a1 89 45 04 mov DWORD PTR i$[rbp], eax - 001a4 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 001a8 48 ff c0 inc rax - 001ab 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 001af 48 8b 85 88 00 + 0019e 8b 45 04 mov eax, DWORD PTR i$[rbp] + 001a1 ff c8 dec eax + 001a3 89 45 04 mov DWORD PTR i$[rbp], eax + 001a6 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 001aa 48 ff c0 inc rax + 001ad 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 001b1 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 001b6 48 83 c0 02 add rax, 2 - 001ba 48 89 85 88 00 + 001b8 48 83 c0 02 add rax, 2 + 001bc 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN9@stbi__conv: - 001c1 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 001c5 7c 3b jl SHORT $LN8@stbi__conv - 001c7 b8 01 00 00 00 mov eax, 1 - 001cc 48 6b c0 00 imul rax, rax, 0 - 001d0 b9 01 00 00 00 mov ecx, 1 - 001d5 48 6b c9 00 imul rcx, rcx, 0 - 001d9 48 8b 95 88 00 + 001c3 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 001c7 7c 3b jl SHORT $LN8@stbi__conv + 001c9 b8 01 00 00 00 mov eax, 1 + 001ce 48 6b c0 00 imul rax, rax, 0 + 001d2 b9 01 00 00 00 mov ecx, 1 + 001d7 48 6b c9 00 imul rcx, rcx, 0 + 001db 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 001e0 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 001e4 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 001e9 88 04 0a mov BYTE PTR [rdx+rcx], al - 001ec b8 01 00 00 00 mov eax, 1 - 001f1 48 6b c0 01 imul rax, rax, 1 - 001f5 48 8b 8d 88 00 + 001e2 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 001e6 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 001eb 88 04 0a mov BYTE PTR [rdx+rcx], al + 001ee b8 01 00 00 00 mov eax, 1 + 001f3 48 6b c0 01 imul rax, rax, 1 + 001f7 48 8b 8d 88 00 00 00 mov rcx, QWORD PTR dest$2[rbp] - 001fc c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 00200 eb 9a jmp SHORT $LN7@stbi__conv + 001fe c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00202 eb 9a jmp SHORT $LN7@stbi__conv $LN8@stbi__conv: - 00202 e9 29 08 00 00 jmp $LN5@stbi__conv + 00204 e9 2b 08 00 00 jmp $LN5@stbi__conv $LN46@stbi__conv: ; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; - 00207 8b 85 98 01 00 + 00209 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 0020d ff c8 dec eax - 0020f 89 45 04 mov DWORD PTR i$[rbp], eax - 00212 eb 25 jmp SHORT $LN12@stbi__conv + 0020f ff c8 dec eax + 00211 89 45 04 mov DWORD PTR i$[rbp], eax + 00214 eb 25 jmp SHORT $LN12@stbi__conv $LN10@stbi__conv: - 00214 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00217 ff c8 dec eax - 00219 89 45 04 mov DWORD PTR i$[rbp], eax - 0021c 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 00220 48 ff c0 inc rax - 00223 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 00227 48 8b 85 88 00 + 00216 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00219 ff c8 dec eax + 0021b 89 45 04 mov DWORD PTR i$[rbp], eax + 0021e 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 00222 48 ff c0 inc rax + 00225 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 00229 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 0022e 48 83 c0 03 add rax, 3 - 00232 48 89 85 88 00 + 00230 48 83 c0 03 add rax, 3 + 00234 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN12@stbi__conv: - 00239 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 0023d 7c 7a jl SHORT $LN11@stbi__conv - 0023f b8 01 00 00 00 mov eax, 1 - 00244 48 6b c0 00 imul rax, rax, 0 - 00248 b9 01 00 00 00 mov ecx, 1 - 0024d 48 6b c9 02 imul rcx, rcx, 2 - 00251 48 8b 95 88 00 + 0023b 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 0023f 7c 7a jl SHORT $LN11@stbi__conv + 00241 b8 01 00 00 00 mov eax, 1 + 00246 48 6b c0 00 imul rax, rax, 0 + 0024a b9 01 00 00 00 mov ecx, 1 + 0024f 48 6b c9 02 imul rcx, rcx, 2 + 00253 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00258 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 0025c 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00261 88 04 0a mov BYTE PTR [rdx+rcx], al - 00264 b8 01 00 00 00 mov eax, 1 - 00269 48 6b c0 02 imul rax, rax, 2 - 0026d b9 01 00 00 00 mov ecx, 1 - 00272 48 6b c9 01 imul rcx, rcx, 1 - 00276 48 8b 95 88 00 + 0025a 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 0025e 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00263 88 04 0a mov BYTE PTR [rdx+rcx], al + 00266 b8 01 00 00 00 mov eax, 1 + 0026b 48 6b c0 02 imul rax, rax, 2 + 0026f b9 01 00 00 00 mov ecx, 1 + 00274 48 6b c9 01 imul rcx, rcx, 1 + 00278 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0027d 4c 8b 85 88 00 + 0027f 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 00284 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00289 88 04 0a mov BYTE PTR [rdx+rcx], al - 0028c b8 01 00 00 00 mov eax, 1 - 00291 48 6b c0 01 imul rax, rax, 1 - 00295 b9 01 00 00 00 mov ecx, 1 - 0029a 48 6b c9 00 imul rcx, rcx, 0 - 0029e 48 8b 95 88 00 + 00286 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0028b 88 04 0a mov BYTE PTR [rdx+rcx], al + 0028e b8 01 00 00 00 mov eax, 1 + 00293 48 6b c0 01 imul rax, rax, 1 + 00297 b9 01 00 00 00 mov ecx, 1 + 0029c 48 6b c9 00 imul rcx, rcx, 0 + 002a0 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 002a5 4c 8b 85 88 00 + 002a7 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 002ac 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 002b1 88 04 0a mov BYTE PTR [rdx+rcx], al - 002b4 e9 5b ff ff ff jmp $LN10@stbi__conv + 002ae 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 002b3 88 04 0a mov BYTE PTR [rdx+rcx], al + 002b6 e9 5b ff ff ff jmp $LN10@stbi__conv $LN11@stbi__conv: - 002b9 e9 72 07 00 00 jmp $LN5@stbi__conv + 002bb e9 74 07 00 00 jmp $LN5@stbi__conv $LN47@stbi__conv: ; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; - 002be 8b 85 98 01 00 + 002c0 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 002c4 ff c8 dec eax - 002c6 89 45 04 mov DWORD PTR i$[rbp], eax - 002c9 eb 25 jmp SHORT $LN15@stbi__conv + 002c6 ff c8 dec eax + 002c8 89 45 04 mov DWORD PTR i$[rbp], eax + 002cb eb 25 jmp SHORT $LN15@stbi__conv $LN13@stbi__conv: - 002cb 8b 45 04 mov eax, DWORD PTR i$[rbp] - 002ce ff c8 dec eax - 002d0 89 45 04 mov DWORD PTR i$[rbp], eax - 002d3 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 002d7 48 ff c0 inc rax - 002da 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 002de 48 8b 85 88 00 + 002cd 8b 45 04 mov eax, DWORD PTR i$[rbp] + 002d0 ff c8 dec eax + 002d2 89 45 04 mov DWORD PTR i$[rbp], eax + 002d5 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 002d9 48 ff c0 inc rax + 002dc 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 002e0 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 002e5 48 83 c0 04 add rax, 4 - 002e9 48 89 85 88 00 + 002e7 48 83 c0 04 add rax, 4 + 002eb 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN15@stbi__conv: - 002f0 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 002f4 0f 8c 8e 00 00 + 002f2 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 002f6 0f 8c 8e 00 00 00 jl $LN14@stbi__conv - 002fa b8 01 00 00 00 mov eax, 1 - 002ff 48 6b c0 00 imul rax, rax, 0 - 00303 b9 01 00 00 00 mov ecx, 1 - 00308 48 6b c9 02 imul rcx, rcx, 2 - 0030c 48 8b 95 88 00 + 002fc b8 01 00 00 00 mov eax, 1 + 00301 48 6b c0 00 imul rax, rax, 0 + 00305 b9 01 00 00 00 mov ecx, 1 + 0030a 48 6b c9 02 imul rcx, rcx, 2 + 0030e 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00313 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00317 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 0031c 88 04 0a mov BYTE PTR [rdx+rcx], al - 0031f b8 01 00 00 00 mov eax, 1 - 00324 48 6b c0 02 imul rax, rax, 2 - 00328 b9 01 00 00 00 mov ecx, 1 - 0032d 48 6b c9 01 imul rcx, rcx, 1 - 00331 48 8b 95 88 00 + 00315 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00319 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0031e 88 04 0a mov BYTE PTR [rdx+rcx], al + 00321 b8 01 00 00 00 mov eax, 1 + 00326 48 6b c0 02 imul rax, rax, 2 + 0032a b9 01 00 00 00 mov ecx, 1 + 0032f 48 6b c9 01 imul rcx, rcx, 1 + 00333 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00338 4c 8b 85 88 00 + 0033a 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 0033f 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00344 88 04 0a mov BYTE PTR [rdx+rcx], al - 00347 b8 01 00 00 00 mov eax, 1 - 0034c 48 6b c0 01 imul rax, rax, 1 - 00350 b9 01 00 00 00 mov ecx, 1 - 00355 48 6b c9 00 imul rcx, rcx, 0 - 00359 48 8b 95 88 00 + 00341 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00346 88 04 0a mov BYTE PTR [rdx+rcx], al + 00349 b8 01 00 00 00 mov eax, 1 + 0034e 48 6b c0 01 imul rax, rax, 1 + 00352 b9 01 00 00 00 mov ecx, 1 + 00357 48 6b c9 00 imul rcx, rcx, 0 + 0035b 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00360 4c 8b 85 88 00 + 00362 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 00367 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 0036c 88 04 0a mov BYTE PTR [rdx+rcx], al - 0036f b8 01 00 00 00 mov eax, 1 - 00374 48 6b c0 03 imul rax, rax, 3 - 00378 48 8b 8d 88 00 + 00369 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0036e 88 04 0a mov BYTE PTR [rdx+rcx], al + 00371 b8 01 00 00 00 mov eax, 1 + 00376 48 6b c0 03 imul rax, rax, 3 + 0037a 48 8b 8d 88 00 00 00 mov rcx, QWORD PTR dest$2[rbp] - 0037f c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 00383 e9 43 ff ff ff jmp $LN13@stbi__conv + 00381 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00385 e9 43 ff ff ff jmp $LN13@stbi__conv $LN14@stbi__conv: - 00388 e9 a3 06 00 00 jmp $LN5@stbi__conv + 0038a e9 a5 06 00 00 jmp $LN5@stbi__conv $LN48@stbi__conv: ; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; - 0038d 8b 85 98 01 00 + 0038f 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 00393 ff c8 dec eax - 00395 89 45 04 mov DWORD PTR i$[rbp], eax - 00398 eb 25 jmp SHORT $LN18@stbi__conv + 00395 ff c8 dec eax + 00397 89 45 04 mov DWORD PTR i$[rbp], eax + 0039a eb 25 jmp SHORT $LN18@stbi__conv $LN16@stbi__conv: - 0039a 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0039d ff c8 dec eax - 0039f 89 45 04 mov DWORD PTR i$[rbp], eax - 003a2 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 003a6 48 83 c0 02 add rax, 2 - 003aa 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 003ae 48 8b 85 88 00 + 0039c 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0039f ff c8 dec eax + 003a1 89 45 04 mov DWORD PTR i$[rbp], eax + 003a4 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 003a8 48 83 c0 02 add rax, 2 + 003ac 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 003b0 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 003b5 48 ff c0 inc rax - 003b8 48 89 85 88 00 + 003b7 48 ff c0 inc rax + 003ba 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN18@stbi__conv: - 003bf 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 003c3 7c 27 jl SHORT $LN17@stbi__conv - 003c5 b8 01 00 00 00 mov eax, 1 - 003ca 48 6b c0 00 imul rax, rax, 0 - 003ce b9 01 00 00 00 mov ecx, 1 - 003d3 48 6b c9 00 imul rcx, rcx, 0 - 003d7 48 8b 95 88 00 + 003c1 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 003c5 7c 27 jl SHORT $LN17@stbi__conv + 003c7 b8 01 00 00 00 mov eax, 1 + 003cc 48 6b c0 00 imul rax, rax, 0 + 003d0 b9 01 00 00 00 mov ecx, 1 + 003d5 48 6b c9 00 imul rcx, rcx, 0 + 003d9 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 003de 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 003e2 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 003e7 88 04 0a mov BYTE PTR [rdx+rcx], al - 003ea eb ae jmp SHORT $LN16@stbi__conv + 003e0 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 003e4 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 003e9 88 04 0a mov BYTE PTR [rdx+rcx], al + 003ec eb ae jmp SHORT $LN16@stbi__conv $LN17@stbi__conv: - 003ec e9 3f 06 00 00 jmp $LN5@stbi__conv + 003ee e9 41 06 00 00 jmp $LN5@stbi__conv $LN49@stbi__conv: ; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; - 003f1 8b 85 98 01 00 + 003f3 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 003f7 ff c8 dec eax - 003f9 89 45 04 mov DWORD PTR i$[rbp], eax - 003fc eb 26 jmp SHORT $LN21@stbi__conv + 003f9 ff c8 dec eax + 003fb 89 45 04 mov DWORD PTR i$[rbp], eax + 003fe eb 26 jmp SHORT $LN21@stbi__conv $LN19@stbi__conv: - 003fe 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00401 ff c8 dec eax - 00403 89 45 04 mov DWORD PTR i$[rbp], eax - 00406 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 0040a 48 83 c0 02 add rax, 2 - 0040e 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 00412 48 8b 85 88 00 + 00400 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00403 ff c8 dec eax + 00405 89 45 04 mov DWORD PTR i$[rbp], eax + 00408 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 0040c 48 83 c0 02 add rax, 2 + 00410 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 00414 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 00419 48 83 c0 03 add rax, 3 - 0041d 48 89 85 88 00 + 0041b 48 83 c0 03 add rax, 3 + 0041f 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN21@stbi__conv: - 00424 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 00428 7c 7a jl SHORT $LN20@stbi__conv - 0042a b8 01 00 00 00 mov eax, 1 - 0042f 48 6b c0 00 imul rax, rax, 0 - 00433 b9 01 00 00 00 mov ecx, 1 - 00438 48 6b c9 02 imul rcx, rcx, 2 - 0043c 48 8b 95 88 00 + 00426 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 0042a 7c 7a jl SHORT $LN20@stbi__conv + 0042c b8 01 00 00 00 mov eax, 1 + 00431 48 6b c0 00 imul rax, rax, 0 + 00435 b9 01 00 00 00 mov ecx, 1 + 0043a 48 6b c9 02 imul rcx, rcx, 2 + 0043e 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00443 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00447 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 0044c 88 04 0a mov BYTE PTR [rdx+rcx], al - 0044f b8 01 00 00 00 mov eax, 1 - 00454 48 6b c0 02 imul rax, rax, 2 - 00458 b9 01 00 00 00 mov ecx, 1 - 0045d 48 6b c9 01 imul rcx, rcx, 1 - 00461 48 8b 95 88 00 + 00445 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00449 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0044e 88 04 0a mov BYTE PTR [rdx+rcx], al + 00451 b8 01 00 00 00 mov eax, 1 + 00456 48 6b c0 02 imul rax, rax, 2 + 0045a b9 01 00 00 00 mov ecx, 1 + 0045f 48 6b c9 01 imul rcx, rcx, 1 + 00463 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00468 4c 8b 85 88 00 + 0046a 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 0046f 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00474 88 04 0a mov BYTE PTR [rdx+rcx], al - 00477 b8 01 00 00 00 mov eax, 1 - 0047c 48 6b c0 01 imul rax, rax, 1 - 00480 b9 01 00 00 00 mov ecx, 1 - 00485 48 6b c9 00 imul rcx, rcx, 0 - 00489 48 8b 95 88 00 + 00471 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00476 88 04 0a mov BYTE PTR [rdx+rcx], al + 00479 b8 01 00 00 00 mov eax, 1 + 0047e 48 6b c0 01 imul rax, rax, 1 + 00482 b9 01 00 00 00 mov ecx, 1 + 00487 48 6b c9 00 imul rcx, rcx, 0 + 0048b 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00490 4c 8b 85 88 00 + 00492 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 00497 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 0049c 88 04 0a mov BYTE PTR [rdx+rcx], al - 0049f e9 5a ff ff ff jmp $LN19@stbi__conv + 00499 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0049e 88 04 0a mov BYTE PTR [rdx+rcx], al + 004a1 e9 5a ff ff ff jmp $LN19@stbi__conv $LN20@stbi__conv: - 004a4 e9 87 05 00 00 jmp $LN5@stbi__conv + 004a6 e9 89 05 00 00 jmp $LN5@stbi__conv $LN50@stbi__conv: ; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; - 004a9 8b 85 98 01 00 + 004ab 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 004af ff c8 dec eax - 004b1 89 45 04 mov DWORD PTR i$[rbp], eax - 004b4 eb 26 jmp SHORT $LN24@stbi__conv + 004b1 ff c8 dec eax + 004b3 89 45 04 mov DWORD PTR i$[rbp], eax + 004b6 eb 26 jmp SHORT $LN24@stbi__conv $LN22@stbi__conv: - 004b6 8b 45 04 mov eax, DWORD PTR i$[rbp] - 004b9 ff c8 dec eax - 004bb 89 45 04 mov DWORD PTR i$[rbp], eax - 004be 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 004c2 48 83 c0 02 add rax, 2 - 004c6 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 004ca 48 8b 85 88 00 + 004b8 8b 45 04 mov eax, DWORD PTR i$[rbp] + 004bb ff c8 dec eax + 004bd 89 45 04 mov DWORD PTR i$[rbp], eax + 004c0 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 004c4 48 83 c0 02 add rax, 2 + 004c8 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 004cc 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 004d1 48 83 c0 04 add rax, 4 - 004d5 48 89 85 88 00 + 004d3 48 83 c0 04 add rax, 4 + 004d7 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN24@stbi__conv: - 004dc 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 004e0 0f 8c 9f 00 00 + 004de 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 004e2 0f 8c 9f 00 00 00 jl $LN23@stbi__conv - 004e6 b8 01 00 00 00 mov eax, 1 - 004eb 48 6b c0 00 imul rax, rax, 0 - 004ef b9 01 00 00 00 mov ecx, 1 - 004f4 48 6b c9 02 imul rcx, rcx, 2 - 004f8 48 8b 95 88 00 + 004e8 b8 01 00 00 00 mov eax, 1 + 004ed 48 6b c0 00 imul rax, rax, 0 + 004f1 b9 01 00 00 00 mov ecx, 1 + 004f6 48 6b c9 02 imul rcx, rcx, 2 + 004fa 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 004ff 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00503 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00508 88 04 0a mov BYTE PTR [rdx+rcx], al - 0050b b8 01 00 00 00 mov eax, 1 - 00510 48 6b c0 02 imul rax, rax, 2 - 00514 b9 01 00 00 00 mov ecx, 1 - 00519 48 6b c9 01 imul rcx, rcx, 1 - 0051d 48 8b 95 88 00 + 00501 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00505 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0050a 88 04 0a mov BYTE PTR [rdx+rcx], al + 0050d b8 01 00 00 00 mov eax, 1 + 00512 48 6b c0 02 imul rax, rax, 2 + 00516 b9 01 00 00 00 mov ecx, 1 + 0051b 48 6b c9 01 imul rcx, rcx, 1 + 0051f 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00524 4c 8b 85 88 00 + 00526 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 0052b 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00530 88 04 0a mov BYTE PTR [rdx+rcx], al - 00533 b8 01 00 00 00 mov eax, 1 - 00538 48 6b c0 01 imul rax, rax, 1 - 0053c b9 01 00 00 00 mov ecx, 1 - 00541 48 6b c9 00 imul rcx, rcx, 0 - 00545 48 8b 95 88 00 + 0052d 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00532 88 04 0a mov BYTE PTR [rdx+rcx], al + 00535 b8 01 00 00 00 mov eax, 1 + 0053a 48 6b c0 01 imul rax, rax, 1 + 0053e b9 01 00 00 00 mov ecx, 1 + 00543 48 6b c9 00 imul rcx, rcx, 0 + 00547 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0054c 4c 8b 85 88 00 + 0054e 4c 8b 85 88 00 00 00 mov r8, QWORD PTR dest$2[rbp] - 00553 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00558 88 04 0a mov BYTE PTR [rdx+rcx], al - 0055b b8 01 00 00 00 mov eax, 1 - 00560 48 6b c0 01 imul rax, rax, 1 - 00564 b9 01 00 00 00 mov ecx, 1 - 00569 48 6b c9 03 imul rcx, rcx, 3 - 0056d 48 8b 95 88 00 + 00555 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0055a 88 04 0a mov BYTE PTR [rdx+rcx], al + 0055d b8 01 00 00 00 mov eax, 1 + 00562 48 6b c0 01 imul rax, rax, 1 + 00566 b9 01 00 00 00 mov ecx, 1 + 0056b 48 6b c9 03 imul rcx, rcx, 3 + 0056f 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00574 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00578 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 0057d 88 04 0a mov BYTE PTR [rdx+rcx], al - 00580 e9 31 ff ff ff jmp $LN22@stbi__conv + 00576 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 0057a 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0057f 88 04 0a mov BYTE PTR [rdx+rcx], al + 00582 e9 31 ff ff ff jmp $LN22@stbi__conv $LN23@stbi__conv: - 00585 e9 a6 04 00 00 jmp $LN5@stbi__conv + 00587 e9 a8 04 00 00 jmp $LN5@stbi__conv $LN51@stbi__conv: ; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; - 0058a 8b 85 98 01 00 + 0058c 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 00590 ff c8 dec eax - 00592 89 45 04 mov DWORD PTR i$[rbp], eax - 00595 eb 26 jmp SHORT $LN27@stbi__conv + 00592 ff c8 dec eax + 00594 89 45 04 mov DWORD PTR i$[rbp], eax + 00597 eb 26 jmp SHORT $LN27@stbi__conv $LN25@stbi__conv: - 00597 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0059a ff c8 dec eax - 0059c 89 45 04 mov DWORD PTR i$[rbp], eax - 0059f 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 005a3 48 83 c0 03 add rax, 3 - 005a7 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 005ab 48 8b 85 88 00 + 00599 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0059c ff c8 dec eax + 0059e 89 45 04 mov DWORD PTR i$[rbp], eax + 005a1 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 005a5 48 83 c0 03 add rax, 3 + 005a9 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 005ad 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 005b2 48 83 c0 04 add rax, 4 - 005b6 48 89 85 88 00 + 005b4 48 83 c0 04 add rax, 4 + 005b8 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN27@stbi__conv: - 005bd 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 005c1 0f 8c 88 00 00 + 005bf 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 005c3 0f 8c 88 00 00 00 jl $LN26@stbi__conv - 005c7 b8 01 00 00 00 mov eax, 1 - 005cc 48 6b c0 00 imul rax, rax, 0 - 005d0 b9 01 00 00 00 mov ecx, 1 - 005d5 48 6b c9 00 imul rcx, rcx, 0 - 005d9 48 8b 95 88 00 + 005c9 b8 01 00 00 00 mov eax, 1 + 005ce 48 6b c0 00 imul rax, rax, 0 + 005d2 b9 01 00 00 00 mov ecx, 1 + 005d7 48 6b c9 00 imul rcx, rcx, 0 + 005db 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 005e0 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 005e4 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 005e9 88 04 0a mov BYTE PTR [rdx+rcx], al - 005ec b8 01 00 00 00 mov eax, 1 - 005f1 48 6b c0 01 imul rax, rax, 1 - 005f5 b9 01 00 00 00 mov ecx, 1 - 005fa 48 6b c9 01 imul rcx, rcx, 1 - 005fe 48 8b 95 88 00 + 005e2 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 005e6 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 005eb 88 04 0a mov BYTE PTR [rdx+rcx], al + 005ee b8 01 00 00 00 mov eax, 1 + 005f3 48 6b c0 01 imul rax, rax, 1 + 005f7 b9 01 00 00 00 mov ecx, 1 + 005fc 48 6b c9 01 imul rcx, rcx, 1 + 00600 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00605 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00609 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 0060e 88 04 0a mov BYTE PTR [rdx+rcx], al - 00611 b8 01 00 00 00 mov eax, 1 - 00616 48 6b c0 02 imul rax, rax, 2 - 0061a b9 01 00 00 00 mov ecx, 1 - 0061f 48 6b c9 02 imul rcx, rcx, 2 - 00623 48 8b 95 88 00 + 00607 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 0060b 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00610 88 04 0a mov BYTE PTR [rdx+rcx], al + 00613 b8 01 00 00 00 mov eax, 1 + 00618 48 6b c0 02 imul rax, rax, 2 + 0061c b9 01 00 00 00 mov ecx, 1 + 00621 48 6b c9 02 imul rcx, rcx, 2 + 00625 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0062a 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 0062e 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00633 88 04 0a mov BYTE PTR [rdx+rcx], al - 00636 b8 01 00 00 00 mov eax, 1 - 0063b 48 6b c0 03 imul rax, rax, 3 - 0063f 48 8b 8d 88 00 + 0062c 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00630 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00635 88 04 0a mov BYTE PTR [rdx+rcx], al + 00638 b8 01 00 00 00 mov eax, 1 + 0063d 48 6b c0 03 imul rax, rax, 3 + 00641 48 8b 8d 88 00 00 00 mov rcx, QWORD PTR dest$2[rbp] - 00646 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 0064a e9 48 ff ff ff jmp $LN25@stbi__conv + 00648 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 0064c e9 48 ff ff ff jmp $LN25@stbi__conv $LN26@stbi__conv: - 0064f e9 dc 03 00 00 jmp $LN5@stbi__conv + 00651 e9 de 03 00 00 jmp $LN5@stbi__conv $LN52@stbi__conv: ; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; - 00654 8b 85 98 01 00 + 00656 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 0065a ff c8 dec eax - 0065c 89 45 04 mov DWORD PTR i$[rbp], eax - 0065f eb 25 jmp SHORT $LN30@stbi__conv + 0065c ff c8 dec eax + 0065e 89 45 04 mov DWORD PTR i$[rbp], eax + 00661 eb 25 jmp SHORT $LN30@stbi__conv $LN28@stbi__conv: - 00661 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00664 ff c8 dec eax - 00666 89 45 04 mov DWORD PTR i$[rbp], eax - 00669 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 0066d 48 83 c0 03 add rax, 3 - 00671 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 00675 48 8b 85 88 00 + 00663 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00666 ff c8 dec eax + 00668 89 45 04 mov DWORD PTR i$[rbp], eax + 0066b 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 0066f 48 83 c0 03 add rax, 3 + 00673 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 00677 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 0067c 48 ff c0 inc rax - 0067f 48 89 85 88 00 + 0067e 48 ff c0 inc rax + 00681 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN30@stbi__conv: - 00686 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 0068a 7c 64 jl SHORT $LN29@stbi__conv - 0068c b8 01 00 00 00 mov eax, 1 - 00691 48 6b c0 02 imul rax, rax, 2 - 00695 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] - 00699 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0069d b9 01 00 00 00 mov ecx, 1 - 006a2 48 6b c9 01 imul rcx, rcx, 1 - 006a6 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] - 006aa 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 006ae ba 01 00 00 00 mov edx, 1 - 006b3 48 6b d2 00 imul rdx, rdx, 0 - 006b7 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 006bb 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] - 006c0 89 95 54 01 00 + 00688 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 0068c 7c 64 jl SHORT $LN29@stbi__conv + 0068e b8 01 00 00 00 mov eax, 1 + 00693 48 6b c0 02 imul rax, rax, 2 + 00697 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] + 0069b 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0069f b9 01 00 00 00 mov ecx, 1 + 006a4 48 6b c9 01 imul rcx, rcx, 1 + 006a8 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] + 006ac 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 006b0 ba 01 00 00 00 mov edx, 1 + 006b5 48 6b d2 00 imul rdx, rdx, 0 + 006b9 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 006bd 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] + 006c2 89 95 54 01 00 00 mov DWORD PTR tv258[rbp], edx - 006c6 44 8b c0 mov r8d, eax - 006c9 8b d1 mov edx, ecx - 006cb 8b 85 54 01 00 + 006c8 44 8b c0 mov r8d, eax + 006cb 8b d1 mov edx, ecx + 006cd 8b 85 54 01 00 00 mov eax, DWORD PTR tv258[rbp] - 006d1 8b c8 mov ecx, eax - 006d3 e8 00 00 00 00 call stbi__compute_y - 006d8 b9 01 00 00 00 mov ecx, 1 - 006dd 48 6b c9 00 imul rcx, rcx, 0 - 006e1 48 8b 95 88 00 + 006d3 8b c8 mov ecx, eax + 006d5 e8 00 00 00 00 call stbi__compute_y + 006da b9 01 00 00 00 mov ecx, 1 + 006df 48 6b c9 00 imul rcx, rcx, 0 + 006e3 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 006e8 88 04 0a mov BYTE PTR [rdx+rcx], al - 006eb e9 71 ff ff ff jmp $LN28@stbi__conv + 006ea 88 04 0a mov BYTE PTR [rdx+rcx], al + 006ed e9 71 ff ff ff jmp $LN28@stbi__conv $LN29@stbi__conv: - 006f0 e9 3b 03 00 00 jmp $LN5@stbi__conv + 006f2 e9 3d 03 00 00 jmp $LN5@stbi__conv $LN53@stbi__conv: ; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; - 006f5 8b 85 98 01 00 + 006f7 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 006fb ff c8 dec eax - 006fd 89 45 04 mov DWORD PTR i$[rbp], eax - 00700 eb 26 jmp SHORT $LN33@stbi__conv + 006fd ff c8 dec eax + 006ff 89 45 04 mov DWORD PTR i$[rbp], eax + 00702 eb 26 jmp SHORT $LN33@stbi__conv $LN31@stbi__conv: - 00702 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00705 ff c8 dec eax - 00707 89 45 04 mov DWORD PTR i$[rbp], eax - 0070a 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 0070e 48 83 c0 03 add rax, 3 - 00712 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 00716 48 8b 85 88 00 + 00704 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00707 ff c8 dec eax + 00709 89 45 04 mov DWORD PTR i$[rbp], eax + 0070c 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 00710 48 83 c0 03 add rax, 3 + 00714 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 00718 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 0071d 48 83 c0 02 add rax, 2 - 00721 48 89 85 88 00 + 0071f 48 83 c0 02 add rax, 2 + 00723 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN33@stbi__conv: - 00728 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 0072c 7c 78 jl SHORT $LN32@stbi__conv - 0072e b8 01 00 00 00 mov eax, 1 - 00733 48 6b c0 02 imul rax, rax, 2 - 00737 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] - 0073b 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0073f b9 01 00 00 00 mov ecx, 1 - 00744 48 6b c9 01 imul rcx, rcx, 1 - 00748 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] - 0074c 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00750 ba 01 00 00 00 mov edx, 1 - 00755 48 6b d2 00 imul rdx, rdx, 0 - 00759 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 0075d 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] - 00762 89 95 54 01 00 + 0072a 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 0072e 7c 78 jl SHORT $LN32@stbi__conv + 00730 b8 01 00 00 00 mov eax, 1 + 00735 48 6b c0 02 imul rax, rax, 2 + 00739 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] + 0073d 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00741 b9 01 00 00 00 mov ecx, 1 + 00746 48 6b c9 01 imul rcx, rcx, 1 + 0074a 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] + 0074e 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00752 ba 01 00 00 00 mov edx, 1 + 00757 48 6b d2 00 imul rdx, rdx, 0 + 0075b 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 0075f 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] + 00764 89 95 54 01 00 00 mov DWORD PTR tv278[rbp], edx - 00768 44 8b c0 mov r8d, eax - 0076b 8b d1 mov edx, ecx - 0076d 8b 85 54 01 00 + 0076a 44 8b c0 mov r8d, eax + 0076d 8b d1 mov edx, ecx + 0076f 8b 85 54 01 00 00 mov eax, DWORD PTR tv278[rbp] - 00773 8b c8 mov ecx, eax - 00775 e8 00 00 00 00 call stbi__compute_y - 0077a b9 01 00 00 00 mov ecx, 1 - 0077f 48 6b c9 00 imul rcx, rcx, 0 - 00783 48 8b 95 88 00 + 00775 8b c8 mov ecx, eax + 00777 e8 00 00 00 00 call stbi__compute_y + 0077c b9 01 00 00 00 mov ecx, 1 + 00781 48 6b c9 00 imul rcx, rcx, 0 + 00785 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0078a 88 04 0a mov BYTE PTR [rdx+rcx], al - 0078d b8 01 00 00 00 mov eax, 1 - 00792 48 6b c0 01 imul rax, rax, 1 - 00796 48 8b 8d 88 00 + 0078c 88 04 0a mov BYTE PTR [rdx+rcx], al + 0078f b8 01 00 00 00 mov eax, 1 + 00794 48 6b c0 01 imul rax, rax, 1 + 00798 48 8b 8d 88 00 00 00 mov rcx, QWORD PTR dest$2[rbp] - 0079d c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 007a1 e9 5c ff ff ff jmp $LN31@stbi__conv + 0079f c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 007a3 e9 5c ff ff ff jmp $LN31@stbi__conv $LN32@stbi__conv: - 007a6 e9 85 02 00 00 jmp $LN5@stbi__conv + 007a8 e9 87 02 00 00 jmp $LN5@stbi__conv $LN54@stbi__conv: ; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; - 007ab 8b 85 98 01 00 + 007ad 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 007b1 ff c8 dec eax - 007b3 89 45 04 mov DWORD PTR i$[rbp], eax - 007b6 eb 25 jmp SHORT $LN36@stbi__conv + 007b3 ff c8 dec eax + 007b5 89 45 04 mov DWORD PTR i$[rbp], eax + 007b8 eb 25 jmp SHORT $LN36@stbi__conv $LN34@stbi__conv: - 007b8 8b 45 04 mov eax, DWORD PTR i$[rbp] - 007bb ff c8 dec eax - 007bd 89 45 04 mov DWORD PTR i$[rbp], eax - 007c0 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 007c4 48 83 c0 04 add rax, 4 - 007c8 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 007cc 48 8b 85 88 00 + 007ba 8b 45 04 mov eax, DWORD PTR i$[rbp] + 007bd ff c8 dec eax + 007bf 89 45 04 mov DWORD PTR i$[rbp], eax + 007c2 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 007c6 48 83 c0 04 add rax, 4 + 007ca 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 007ce 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 007d3 48 ff c0 inc rax - 007d6 48 89 85 88 00 + 007d5 48 ff c0 inc rax + 007d8 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN36@stbi__conv: - 007dd 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 007e1 7c 64 jl SHORT $LN35@stbi__conv - 007e3 b8 01 00 00 00 mov eax, 1 - 007e8 48 6b c0 02 imul rax, rax, 2 - 007ec 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] - 007f0 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 007f4 b9 01 00 00 00 mov ecx, 1 - 007f9 48 6b c9 01 imul rcx, rcx, 1 - 007fd 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] - 00801 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 00805 ba 01 00 00 00 mov edx, 1 - 0080a 48 6b d2 00 imul rdx, rdx, 0 - 0080e 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00812 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] - 00817 89 95 54 01 00 + 007df 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 007e3 7c 64 jl SHORT $LN35@stbi__conv + 007e5 b8 01 00 00 00 mov eax, 1 + 007ea 48 6b c0 02 imul rax, rax, 2 + 007ee 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] + 007f2 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 007f6 b9 01 00 00 00 mov ecx, 1 + 007fb 48 6b c9 01 imul rcx, rcx, 1 + 007ff 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] + 00803 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 00807 ba 01 00 00 00 mov edx, 1 + 0080c 48 6b d2 00 imul rdx, rdx, 0 + 00810 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00814 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] + 00819 89 95 54 01 00 00 mov DWORD PTR tv300[rbp], edx - 0081d 44 8b c0 mov r8d, eax - 00820 8b d1 mov edx, ecx - 00822 8b 85 54 01 00 + 0081f 44 8b c0 mov r8d, eax + 00822 8b d1 mov edx, ecx + 00824 8b 85 54 01 00 00 mov eax, DWORD PTR tv300[rbp] - 00828 8b c8 mov ecx, eax - 0082a e8 00 00 00 00 call stbi__compute_y - 0082f b9 01 00 00 00 mov ecx, 1 - 00834 48 6b c9 00 imul rcx, rcx, 0 - 00838 48 8b 95 88 00 + 0082a 8b c8 mov ecx, eax + 0082c e8 00 00 00 00 call stbi__compute_y + 00831 b9 01 00 00 00 mov ecx, 1 + 00836 48 6b c9 00 imul rcx, rcx, 0 + 0083a 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0083f 88 04 0a mov BYTE PTR [rdx+rcx], al - 00842 e9 71 ff ff ff jmp $LN34@stbi__conv + 00841 88 04 0a mov BYTE PTR [rdx+rcx], al + 00844 e9 71 ff ff ff jmp $LN34@stbi__conv $LN35@stbi__conv: - 00847 e9 e4 01 00 00 jmp $LN5@stbi__conv + 00849 e9 e6 01 00 00 jmp $LN5@stbi__conv $LN55@stbi__conv: ; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; - 0084c 8b 85 98 01 00 + 0084e 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 00852 ff c8 dec eax - 00854 89 45 04 mov DWORD PTR i$[rbp], eax - 00857 eb 26 jmp SHORT $LN39@stbi__conv + 00854 ff c8 dec eax + 00856 89 45 04 mov DWORD PTR i$[rbp], eax + 00859 eb 26 jmp SHORT $LN39@stbi__conv $LN37@stbi__conv: - 00859 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0085c ff c8 dec eax - 0085e 89 45 04 mov DWORD PTR i$[rbp], eax - 00861 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 00865 48 83 c0 04 add rax, 4 - 00869 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 0086d 48 8b 85 88 00 + 0085b 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0085e ff c8 dec eax + 00860 89 45 04 mov DWORD PTR i$[rbp], eax + 00863 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 00867 48 83 c0 04 add rax, 4 + 0086b 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 0086f 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 00874 48 83 c0 02 add rax, 2 - 00878 48 89 85 88 00 + 00876 48 83 c0 02 add rax, 2 + 0087a 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN39@stbi__conv: - 0087f 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 00883 0f 8c 89 00 00 + 00881 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 00885 0f 8c 89 00 00 00 jl $LN38@stbi__conv - 00889 b8 01 00 00 00 mov eax, 1 - 0088e 48 6b c0 02 imul rax, rax, 2 - 00892 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] - 00896 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 0089a b9 01 00 00 00 mov ecx, 1 - 0089f 48 6b c9 01 imul rcx, rcx, 1 - 008a3 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] - 008a7 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 008ab ba 01 00 00 00 mov edx, 1 - 008b0 48 6b d2 00 imul rdx, rdx, 0 - 008b4 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 008b8 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] - 008bd 89 95 54 01 00 + 0088b b8 01 00 00 00 mov eax, 1 + 00890 48 6b c0 02 imul rax, rax, 2 + 00894 48 8b 4d 68 mov rcx, QWORD PTR src$1[rbp] + 00898 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0089c b9 01 00 00 00 mov ecx, 1 + 008a1 48 6b c9 01 imul rcx, rcx, 1 + 008a5 48 8b 55 68 mov rdx, QWORD PTR src$1[rbp] + 008a9 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 008ad ba 01 00 00 00 mov edx, 1 + 008b2 48 6b d2 00 imul rdx, rdx, 0 + 008b6 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 008ba 41 0f b6 14 10 movzx edx, BYTE PTR [r8+rdx] + 008bf 89 95 54 01 00 00 mov DWORD PTR tv320[rbp], edx - 008c3 44 8b c0 mov r8d, eax - 008c6 8b d1 mov edx, ecx - 008c8 8b 85 54 01 00 + 008c5 44 8b c0 mov r8d, eax + 008c8 8b d1 mov edx, ecx + 008ca 8b 85 54 01 00 00 mov eax, DWORD PTR tv320[rbp] - 008ce 8b c8 mov ecx, eax - 008d0 e8 00 00 00 00 call stbi__compute_y - 008d5 b9 01 00 00 00 mov ecx, 1 - 008da 48 6b c9 00 imul rcx, rcx, 0 - 008de 48 8b 95 88 00 + 008d0 8b c8 mov ecx, eax + 008d2 e8 00 00 00 00 call stbi__compute_y + 008d7 b9 01 00 00 00 mov ecx, 1 + 008dc 48 6b c9 00 imul rcx, rcx, 0 + 008e0 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 008e5 88 04 0a mov BYTE PTR [rdx+rcx], al - 008e8 b8 01 00 00 00 mov eax, 1 - 008ed 48 6b c0 03 imul rax, rax, 3 - 008f1 b9 01 00 00 00 mov ecx, 1 - 008f6 48 6b c9 01 imul rcx, rcx, 1 - 008fa 48 8b 95 88 00 + 008e7 88 04 0a mov BYTE PTR [rdx+rcx], al + 008ea b8 01 00 00 00 mov eax, 1 + 008ef 48 6b c0 03 imul rax, rax, 3 + 008f3 b9 01 00 00 00 mov ecx, 1 + 008f8 48 6b c9 01 imul rcx, rcx, 1 + 008fc 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00901 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00905 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 0090a 88 04 0a mov BYTE PTR [rdx+rcx], al - 0090d e9 47 ff ff ff jmp $LN37@stbi__conv + 00903 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00907 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 0090c 88 04 0a mov BYTE PTR [rdx+rcx], al + 0090f e9 47 ff ff ff jmp $LN37@stbi__conv $LN38@stbi__conv: - 00912 e9 19 01 00 00 jmp $LN5@stbi__conv + 00914 e9 1b 01 00 00 jmp $LN5@stbi__conv $LN56@stbi__conv: ; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; - 00917 8b 85 98 01 00 + 00919 8b 85 98 01 00 00 mov eax, DWORD PTR x$[rbp] - 0091d ff c8 dec eax - 0091f 89 45 04 mov DWORD PTR i$[rbp], eax - 00922 eb 26 jmp SHORT $LN42@stbi__conv + 0091f ff c8 dec eax + 00921 89 45 04 mov DWORD PTR i$[rbp], eax + 00924 eb 26 jmp SHORT $LN42@stbi__conv $LN40@stbi__conv: - 00924 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00927 ff c8 dec eax - 00929 89 45 04 mov DWORD PTR i$[rbp], eax - 0092c 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] - 00930 48 83 c0 04 add rax, 4 - 00934 48 89 45 68 mov QWORD PTR src$1[rbp], rax - 00938 48 8b 85 88 00 + 00926 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00929 ff c8 dec eax + 0092b 89 45 04 mov DWORD PTR i$[rbp], eax + 0092e 48 8b 45 68 mov rax, QWORD PTR src$1[rbp] + 00932 48 83 c0 04 add rax, 4 + 00936 48 89 45 68 mov QWORD PTR src$1[rbp], rax + 0093a 48 8b 85 88 00 00 00 mov rax, QWORD PTR dest$2[rbp] - 0093f 48 83 c0 03 add rax, 3 - 00943 48 89 85 88 00 + 00941 48 83 c0 03 add rax, 3 + 00945 48 89 85 88 00 00 00 mov QWORD PTR dest$2[rbp], rax $LN42@stbi__conv: - 0094a 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 - 0094e 7c 74 jl SHORT $LN41@stbi__conv - 00950 b8 01 00 00 00 mov eax, 1 - 00955 48 6b c0 00 imul rax, rax, 0 - 00959 b9 01 00 00 00 mov ecx, 1 - 0095e 48 6b c9 00 imul rcx, rcx, 0 - 00962 48 8b 95 88 00 + 0094c 83 7d 04 00 cmp DWORD PTR i$[rbp], 0 + 00950 7c 74 jl SHORT $LN41@stbi__conv + 00952 b8 01 00 00 00 mov eax, 1 + 00957 48 6b c0 00 imul rax, rax, 0 + 0095b b9 01 00 00 00 mov ecx, 1 + 00960 48 6b c9 00 imul rcx, rcx, 0 + 00964 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 00969 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 0096d 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00972 88 04 0a mov BYTE PTR [rdx+rcx], al - 00975 b8 01 00 00 00 mov eax, 1 - 0097a 48 6b c0 01 imul rax, rax, 1 - 0097e b9 01 00 00 00 mov ecx, 1 - 00983 48 6b c9 01 imul rcx, rcx, 1 - 00987 48 8b 95 88 00 + 0096b 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 0096f 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00974 88 04 0a mov BYTE PTR [rdx+rcx], al + 00977 b8 01 00 00 00 mov eax, 1 + 0097c 48 6b c0 01 imul rax, rax, 1 + 00980 b9 01 00 00 00 mov ecx, 1 + 00985 48 6b c9 01 imul rcx, rcx, 1 + 00989 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 0098e 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 00992 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 00997 88 04 0a mov BYTE PTR [rdx+rcx], al - 0099a b8 01 00 00 00 mov eax, 1 - 0099f 48 6b c0 02 imul rax, rax, 2 - 009a3 b9 01 00 00 00 mov ecx, 1 - 009a8 48 6b c9 02 imul rcx, rcx, 2 - 009ac 48 8b 95 88 00 + 00990 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 00994 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 00999 88 04 0a mov BYTE PTR [rdx+rcx], al + 0099c b8 01 00 00 00 mov eax, 1 + 009a1 48 6b c0 02 imul rax, rax, 2 + 009a5 b9 01 00 00 00 mov ecx, 1 + 009aa 48 6b c9 02 imul rcx, rcx, 2 + 009ae 48 8b 95 88 00 00 00 mov rdx, QWORD PTR dest$2[rbp] - 009b3 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] - 009b7 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 009bc 88 04 0a mov BYTE PTR [rdx+rcx], al - 009bf e9 60 ff ff ff jmp $LN40@stbi__conv + 009b5 4c 8b 45 68 mov r8, QWORD PTR src$1[rbp] + 009b9 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 009be 88 04 0a mov BYTE PTR [rdx+rcx], al + 009c1 e9 60 ff ff ff jmp $LN40@stbi__conv $LN41@stbi__conv: - 009c4 eb 6a jmp SHORT $LN5@stbi__conv + 009c6 eb 6c jmp SHORT $LN5@stbi__conv $LN57@stbi__conv: ; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); - 009c6 33 c0 xor eax, eax - 009c8 85 c0 test eax, eax - 009ca 75 1c jne SHORT $LN63@stbi__conv - 009cc 41 b8 e4 04 00 + 009c8 33 c0 xor eax, eax + 009ca 85 c0 test eax, eax + 009cc 75 1c jne SHORT $LN63@stbi__conv + 009ce 41 b8 e4 04 00 00 mov r8d, 1252 ; 000004e4H - 009d2 48 8d 15 00 00 + 009d4 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 009d9 48 8d 0d 00 00 + 009db 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_13COJANIEC@?$AA0@ - 009e0 ff 15 00 00 00 + 009e2 ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 009e6 33 c0 xor eax, eax + 009e8 33 c0 xor eax, eax $LN63@stbi__conv: - 009e8 48 8b 8d 80 01 + 009ea 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR data$[rbp] - 009ef ff 15 00 00 00 + 009f1 ff 15 00 00 00 00 call QWORD PTR __imp_free - 009f5 48 8b 4d 48 mov rcx, QWORD PTR good$[rbp] - 009f9 ff 15 00 00 00 + 009f7 90 npad 1 + 009f8 48 8b 4d 48 mov rcx, QWORD PTR good$[rbp] + 009fc ff 15 00 00 00 00 call QWORD PTR __imp_free - 009ff 48 8d 0d 00 00 + 00a02 90 npad 1 + 00a03 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@MHDBFHD@unsupported@ - 00a06 e8 00 00 00 00 call stbi__err - 00a0b 85 c0 test eax, eax - 00a0d 74 0d je SHORT $LN64@stbi__conv - 00a0f 48 c7 85 58 01 + 00a0a e8 00 00 00 00 call stbi__err + 00a0f 85 c0 test eax, eax + 00a11 74 0d je SHORT $LN64@stbi__conv + 00a13 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv353[rbp], 0 - 00a1a eb 0b jmp SHORT $LN65@stbi__conv + 00a1e eb 0b jmp SHORT $LN65@stbi__conv $LN64@stbi__conv: - 00a1c 48 c7 85 58 01 + 00a20 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv353[rbp], 0 $LN65@stbi__conv: - 00a27 48 8b 85 58 01 + 00a2b 48 8b 85 58 01 00 00 mov rax, QWORD PTR tv353[rbp] - 00a2e eb 16 jmp SHORT $LN1@stbi__conv + 00a32 eb 17 jmp SHORT $LN1@stbi__conv $LN5@stbi__conv: ; 1253 : } ; 1254 : #undef STBI__CASE ; 1255 : } - 00a30 e9 b0 f6 ff ff jmp $LN2@stbi__conv + 00a34 e9 ae f6 ff ff jmp $LN2@stbi__conv $LN3@stbi__conv: ; 1256 : ; 1257 : STBI_FREE(data); - 00a35 48 8b 8d 80 01 + 00a39 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR data$[rbp] - 00a3c ff 15 00 00 00 + 00a40 ff 15 00 00 00 00 call QWORD PTR __imp_free + 00a46 90 npad 1 ; 1258 : return good; - 00a42 48 8b 45 48 mov rax, QWORD PTR good$[rbp] + 00a47 48 8b 45 48 mov rax, QWORD PTR good$[rbp] $LN1@stbi__conv: ; 1259 : } - 00a46 48 8d a5 68 01 + 00a4b 48 8d a5 68 01 00 00 lea rsp, QWORD PTR [rbp+360] - 00a4d 5f pop rdi - 00a4e 5d pop rbp - 00a4f c3 ret 0 + 00a52 5f pop rdi + 00a53 5d pop rbp + 00a54 c3 ret 0 + 00a55 0f 1f 00 npad 3 $LN66@stbi__conv: - 00a50 00 00 00 00 DD $LN45@stbi__conv - 00a54 00 00 00 00 DD $LN46@stbi__conv - 00a58 00 00 00 00 DD $LN47@stbi__conv - 00a5c 00 00 00 00 DD $LN57@stbi__conv - 00a60 00 00 00 00 DD $LN57@stbi__conv + 00a58 00 00 00 00 DD $LN45@stbi__conv + 00a5c 00 00 00 00 DD $LN46@stbi__conv + 00a60 00 00 00 00 DD $LN47@stbi__conv 00a64 00 00 00 00 DD $LN57@stbi__conv 00a68 00 00 00 00 DD $LN57@stbi__conv - 00a6c 00 00 00 00 DD $LN48@stbi__conv + 00a6c 00 00 00 00 DD $LN57@stbi__conv 00a70 00 00 00 00 DD $LN57@stbi__conv - 00a74 00 00 00 00 DD $LN49@stbi__conv - 00a78 00 00 00 00 DD $LN50@stbi__conv - 00a7c 00 00 00 00 DD $LN57@stbi__conv - 00a80 00 00 00 00 DD $LN57@stbi__conv + 00a74 00 00 00 00 DD $LN48@stbi__conv + 00a78 00 00 00 00 DD $LN57@stbi__conv + 00a7c 00 00 00 00 DD $LN49@stbi__conv + 00a80 00 00 00 00 DD $LN50@stbi__conv 00a84 00 00 00 00 DD $LN57@stbi__conv 00a88 00 00 00 00 DD $LN57@stbi__conv - 00a8c 00 00 00 00 DD $LN52@stbi__conv - 00a90 00 00 00 00 DD $LN53@stbi__conv - 00a94 00 00 00 00 DD $LN57@stbi__conv - 00a98 00 00 00 00 DD $LN51@stbi__conv + 00a8c 00 00 00 00 DD $LN57@stbi__conv + 00a90 00 00 00 00 DD $LN57@stbi__conv + 00a94 00 00 00 00 DD $LN52@stbi__conv + 00a98 00 00 00 00 DD $LN53@stbi__conv 00a9c 00 00 00 00 DD $LN57@stbi__conv - 00aa0 00 00 00 00 DD $LN57@stbi__conv + 00aa0 00 00 00 00 DD $LN51@stbi__conv 00aa4 00 00 00 00 DD $LN57@stbi__conv 00aa8 00 00 00 00 DD $LN57@stbi__conv - 00aac 00 00 00 00 DD $LN54@stbi__conv - 00ab0 00 00 00 00 DD $LN55@stbi__conv - 00ab4 00 00 00 00 DD $LN56@stbi__conv + 00aac 00 00 00 00 DD $LN57@stbi__conv + 00ab0 00 00 00 00 DD $LN57@stbi__conv + 00ab4 00 00 00 00 DD $LN54@stbi__conv + 00ab8 00 00 00 00 DD $LN55@stbi__conv + 00abc 00 00 00 00 DD $LN56@stbi__conv stbi__convert_format ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -40334,26 +40565,27 @@ stbi__compute_y PROC ; COMDAT 0001b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00022 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00027 90 npad 1 ; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - 00027 6b 85 e0 00 00 + 00028 6b 85 e0 00 00 00 4d imul eax, DWORD PTR r$[rbp], 77 ; 0000004dH - 0002e 69 8d e8 00 00 + 0002f 69 8d e8 00 00 00 96 00 00 00 imul ecx, DWORD PTR g$[rbp], 150 ; 00000096H - 00038 03 c1 add eax, ecx - 0003a 6b 8d f0 00 00 + 00039 03 c1 add eax, ecx + 0003b 6b 8d f0 00 00 00 1d imul ecx, DWORD PTR b$[rbp], 29 - 00041 03 c1 add eax, ecx - 00043 c1 f8 08 sar eax, 8 + 00042 03 c1 add eax, ecx + 00044 c1 f8 08 sar eax, 8 ; 1211 : } - 00046 48 8d a5 c8 00 + 00047 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0004d 5f pop rdi - 0004e 5d pop rbp - 0004f c3 ret 0 + 0004e 5f pop rdi + 0004f 5d pop rbp + 00050 c3 ret 0 stbi__compute_y ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -40375,36 +40607,37 @@ stbi__get32le PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 1186 : stbi__uint32 z = stbi__get16le(s); - 0001f 48 8b 8d 00 01 + 00020 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__get16le - 0002b 89 45 04 mov DWORD PTR z$[rbp], eax + 00027 e8 00 00 00 00 call stbi__get16le + 0002c 89 45 04 mov DWORD PTR z$[rbp], eax ; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - 0002e 48 8b 8d 00 01 + 0002f 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00035 e8 00 00 00 00 call stbi__get16le - 0003a c1 e0 10 shl eax, 16 - 0003d 8b 4d 04 mov ecx, DWORD PTR z$[rbp] - 00040 03 c8 add ecx, eax - 00042 8b c1 mov eax, ecx - 00044 89 45 04 mov DWORD PTR z$[rbp], eax + 00036 e8 00 00 00 00 call stbi__get16le + 0003b c1 e0 10 shl eax, 16 + 0003e 8b 4d 04 mov ecx, DWORD PTR z$[rbp] + 00041 03 c8 add ecx, eax + 00043 8b c1 mov eax, ecx + 00045 89 45 04 mov DWORD PTR z$[rbp], eax ; 1188 : return z; - 00047 8b 45 04 mov eax, DWORD PTR z$[rbp] + 00048 8b 45 04 mov eax, DWORD PTR z$[rbp] ; 1189 : } - 0004a 48 8d a5 e8 00 + 0004b 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00051 5f pop rdi - 00052 5d pop rbp - 00053 c3 ret 0 + 00052 5f pop rdi + 00053 5d pop rbp + 00054 c3 ret 0 stbi__get32le ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -40426,33 +40659,34 @@ stbi__get16le PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 1178 : int z = stbi__get8(s); - 0001f 48 8b 8d 00 01 + 00020 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__get8 - 0002b 0f b6 c0 movzx eax, al - 0002e 89 45 04 mov DWORD PTR z$[rbp], eax + 00027 e8 00 00 00 00 call stbi__get8 + 0002c 0f b6 c0 movzx eax, al + 0002f 89 45 04 mov DWORD PTR z$[rbp], eax ; 1179 : return z + (stbi__get8(s) << 8); - 00031 48 8b 8d 00 01 + 00032 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00038 e8 00 00 00 00 call stbi__get8 - 0003d 0f b6 c0 movzx eax, al - 00040 c1 e0 08 shl eax, 8 - 00043 8b 4d 04 mov ecx, DWORD PTR z$[rbp] - 00046 03 c8 add ecx, eax - 00048 8b c1 mov eax, ecx + 00039 e8 00 00 00 00 call stbi__get8 + 0003e 0f b6 c0 movzx eax, al + 00041 c1 e0 08 shl eax, 8 + 00044 8b 4d 04 mov ecx, DWORD PTR z$[rbp] + 00047 03 c8 add ecx, eax + 00049 8b c1 mov eax, ecx ; 1180 : } - 0004a 48 8d a5 e8 00 + 0004b 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00051 5f pop rdi - 00052 5d pop rbp - 00053 c3 ret 0 + 00052 5f pop rdi + 00053 5d pop rbp + 00054 c3 ret 0 stbi__get16le ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -40475,35 +40709,36 @@ stbi__get32be PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 1168 : stbi__uint32 z = stbi__get16be(s); - 0001f 48 8b 8d 00 01 + 00020 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__get16be - 0002b 89 45 04 mov DWORD PTR z$[rbp], eax + 00027 e8 00 00 00 00 call stbi__get16be + 0002c 89 45 04 mov DWORD PTR z$[rbp], eax ; 1169 : return (z << 16) + stbi__get16be(s); - 0002e 8b 45 04 mov eax, DWORD PTR z$[rbp] - 00031 c1 e0 10 shl eax, 16 - 00034 89 85 d4 00 00 + 0002f 8b 45 04 mov eax, DWORD PTR z$[rbp] + 00032 c1 e0 10 shl eax, 16 + 00035 89 85 d4 00 00 00 mov DWORD PTR tv66[rbp], eax - 0003a 48 8b 8d 00 01 + 0003b 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00041 e8 00 00 00 00 call stbi__get16be - 00046 8b 8d d4 00 00 + 00042 e8 00 00 00 00 call stbi__get16be + 00047 8b 8d d4 00 00 00 mov ecx, DWORD PTR tv66[rbp] - 0004c 03 c8 add ecx, eax - 0004e 8b c1 mov eax, ecx + 0004d 03 c8 add ecx, eax + 0004f 8b c1 mov eax, ecx ; 1170 : } - 00050 48 8d a5 e8 00 + 00051 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00057 5f pop rdi - 00058 5d pop rbp - 00059 c3 ret 0 + 00058 5f pop rdi + 00059 5d pop rbp + 0005a c3 ret 0 stbi__get32be ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -40526,37 +40761,38 @@ stbi__get16be PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 1158 : int z = stbi__get8(s); - 0001f 48 8b 8d 00 01 + 00020 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__get8 - 0002b 0f b6 c0 movzx eax, al - 0002e 89 45 04 mov DWORD PTR z$[rbp], eax + 00027 e8 00 00 00 00 call stbi__get8 + 0002c 0f b6 c0 movzx eax, al + 0002f 89 45 04 mov DWORD PTR z$[rbp], eax ; 1159 : return (z << 8) + stbi__get8(s); - 00031 8b 45 04 mov eax, DWORD PTR z$[rbp] - 00034 c1 e0 08 shl eax, 8 - 00037 89 85 d4 00 00 + 00032 8b 45 04 mov eax, DWORD PTR z$[rbp] + 00035 c1 e0 08 shl eax, 8 + 00038 89 85 d4 00 00 00 mov DWORD PTR tv67[rbp], eax - 0003d 48 8b 8d 00 01 + 0003e 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00044 e8 00 00 00 00 call stbi__get8 - 00049 0f b6 c0 movzx eax, al - 0004c 8b 8d d4 00 00 + 00045 e8 00 00 00 00 call stbi__get8 + 0004a 0f b6 c0 movzx eax, al + 0004d 8b 8d d4 00 00 00 mov ecx, DWORD PTR tv67[rbp] - 00052 03 c8 add ecx, eax - 00054 8b c1 mov eax, ecx + 00053 03 c8 add ecx, eax + 00055 8b c1 mov eax, ecx ; 1160 : } - 00056 48 8d a5 e8 00 + 00057 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 0005d 5f pop rdi - 0005e 5d pop rbp - 0005f c3 ret 0 + 0005e 5f pop rdi + 0005f 5d pop rbp + 00060 c3 ret 0 stbi__get16be ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -40585,108 +40821,110 @@ stbi__getn PROC ; COMDAT 0001d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00024 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00029 90 npad 1 ; 1129 : if (s->io.read) { - 00029 48 8b 85 40 01 + 0002a 48 8b 85 40 01 00 00 mov rax, QWORD PTR s$[rbp] - 00030 48 83 78 10 00 cmp QWORD PTR [rax+16], 0 - 00035 0f 84 e0 00 00 + 00031 48 83 78 10 00 cmp QWORD PTR [rax+16], 0 + 00036 0f 84 e1 00 00 00 je $LN2@stbi__getn ; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); - 0003b 48 8b 85 40 01 + 0003c 48 8b 85 40 01 00 00 mov rax, QWORD PTR s$[rbp] - 00042 48 8b 8d 40 01 + 00043 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00049 48 8b 89 c0 00 + 0004a 48 8b 89 c0 00 00 00 mov rcx, QWORD PTR [rcx+192] - 00050 48 8b 80 c8 00 + 00051 48 8b 80 c8 00 00 00 mov rax, QWORD PTR [rax+200] - 00057 48 2b c1 sub rax, rcx - 0005a 89 45 04 mov DWORD PTR blen$1[rbp], eax + 00058 48 2b c1 sub rax, rcx + 0005b 89 45 04 mov DWORD PTR blen$1[rbp], eax ; 1131 : if (blen < n) { - 0005d 8b 85 50 01 00 + 0005e 8b 85 50 01 00 00 mov eax, DWORD PTR n$[rbp] - 00063 39 45 04 cmp DWORD PTR blen$1[rbp], eax - 00066 0f 8d af 00 00 + 00064 39 45 04 cmp DWORD PTR blen$1[rbp], eax + 00067 0f 8d b0 00 00 00 jge $LN3@stbi__getn ; 1132 : int res, count; ; 1133 : ; 1134 : memcpy(buffer, s->img_buffer, blen); - 0006c 48 63 45 04 movsxd rax, DWORD PTR blen$1[rbp] - 00070 4c 8b c0 mov r8, rax - 00073 48 8b 85 40 01 + 0006d 48 63 45 04 movsxd rax, DWORD PTR blen$1[rbp] + 00071 4c 8b c0 mov r8, rax + 00074 48 8b 85 40 01 00 00 mov rax, QWORD PTR s$[rbp] - 0007a 48 8b 90 c0 00 + 0007b 48 8b 90 c0 00 00 00 mov rdx, QWORD PTR [rax+192] - 00081 48 8b 8d 48 01 + 00082 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR buffer$[rbp] - 00088 e8 00 00 00 00 call memcpy + 00089 e8 00 00 00 00 call memcpy + 0008e 90 npad 1 ; 1135 : ; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); - 0008d 8b 45 04 mov eax, DWORD PTR blen$1[rbp] - 00090 8b 8d 50 01 00 + 0008f 8b 45 04 mov eax, DWORD PTR blen$1[rbp] + 00092 8b 8d 50 01 00 00 mov ecx, DWORD PTR n$[rbp] - 00096 2b c8 sub ecx, eax - 00098 8b c1 mov eax, ecx - 0009a 48 63 4d 04 movsxd rcx, DWORD PTR blen$1[rbp] - 0009e 48 8b 95 48 01 + 00098 2b c8 sub ecx, eax + 0009a 8b c1 mov eax, ecx + 0009c 48 63 4d 04 movsxd rcx, DWORD PTR blen$1[rbp] + 000a0 48 8b 95 48 01 00 00 mov rdx, QWORD PTR buffer$[rbp] - 000a5 48 03 d1 add rdx, rcx - 000a8 48 8b ca mov rcx, rdx - 000ab 44 8b c0 mov r8d, eax - 000ae 48 8b d1 mov rdx, rcx - 000b1 48 8b 85 40 01 + 000a7 48 03 d1 add rdx, rcx + 000aa 48 8b ca mov rcx, rdx + 000ad 44 8b c0 mov r8d, eax + 000b0 48 8b d1 mov rdx, rcx + 000b3 48 8b 85 40 01 00 00 mov rax, QWORD PTR s$[rbp] - 000b8 48 8b 48 28 mov rcx, QWORD PTR [rax+40] - 000bc 48 8b 85 40 01 + 000ba 48 8b 48 28 mov rcx, QWORD PTR [rax+40] + 000be 48 8b 85 40 01 00 00 mov rax, QWORD PTR s$[rbp] - 000c3 ff 50 10 call QWORD PTR [rax+16] - 000c6 89 45 44 mov DWORD PTR count$3[rbp], eax + 000c5 ff 50 10 call QWORD PTR [rax+16] + 000c8 89 45 44 mov DWORD PTR count$3[rbp], eax ; 1137 : res = (count == (n - blen)); - 000c9 8b 45 04 mov eax, DWORD PTR blen$1[rbp] - 000cc 8b 8d 50 01 00 + 000cb 8b 45 04 mov eax, DWORD PTR blen$1[rbp] + 000ce 8b 8d 50 01 00 00 mov ecx, DWORD PTR n$[rbp] - 000d2 2b c8 sub ecx, eax - 000d4 8b c1 mov eax, ecx - 000d6 39 45 44 cmp DWORD PTR count$3[rbp], eax - 000d9 75 0c jne SHORT $LN7@stbi__getn - 000db c7 85 14 01 00 + 000d4 2b c8 sub ecx, eax + 000d6 8b c1 mov eax, ecx + 000d8 39 45 44 cmp DWORD PTR count$3[rbp], eax + 000db 75 0c jne SHORT $LN7@stbi__getn + 000dd c7 85 14 01 00 00 01 00 00 00 mov DWORD PTR tv87[rbp], 1 - 000e5 eb 0a jmp SHORT $LN8@stbi__getn + 000e7 eb 0a jmp SHORT $LN8@stbi__getn $LN7@stbi__getn: - 000e7 c7 85 14 01 00 + 000e9 c7 85 14 01 00 00 00 00 00 00 mov DWORD PTR tv87[rbp], 0 $LN8@stbi__getn: - 000f1 8b 85 14 01 00 + 000f3 8b 85 14 01 00 00 mov eax, DWORD PTR tv87[rbp] - 000f7 89 45 24 mov DWORD PTR res$2[rbp], eax + 000f9 89 45 24 mov DWORD PTR res$2[rbp], eax ; 1138 : s->img_buffer = s->img_buffer_end; - 000fa 48 8b 85 40 01 + 000fc 48 8b 85 40 01 00 00 mov rax, QWORD PTR s$[rbp] - 00101 48 8b 8d 40 01 + 00103 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00108 48 8b 89 c8 00 + 0010a 48 8b 89 c8 00 00 00 mov rcx, QWORD PTR [rcx+200] - 0010f 48 89 88 c0 00 + 00111 48 89 88 c0 00 00 00 mov QWORD PTR [rax+192], rcx ; 1139 : return res; - 00116 8b 45 24 mov eax, DWORD PTR res$2[rbp] - 00119 eb 77 jmp SHORT $LN1@stbi__getn + 00118 8b 45 24 mov eax, DWORD PTR res$2[rbp] + 0011b eb 78 jmp SHORT $LN1@stbi__getn $LN3@stbi__getn: $LN2@stbi__getn: @@ -40695,68 +40933,69 @@ $LN2@stbi__getn: ; 1142 : ; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { - 0011b 48 63 85 50 01 + 0011d 48 63 85 50 01 00 00 movsxd rax, DWORD PTR n$[rbp] - 00122 48 8b 8d 40 01 + 00124 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00129 48 03 81 c0 00 + 0012b 48 03 81 c0 00 00 00 add rax, QWORD PTR [rcx+192] - 00130 48 8b 8d 40 01 + 00132 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00137 48 3b 81 c8 00 + 00139 48 3b 81 c8 00 00 00 cmp rax, QWORD PTR [rcx+200] - 0013e 77 50 ja SHORT $LN4@stbi__getn + 00140 77 51 ja SHORT $LN4@stbi__getn ; 1144 : memcpy(buffer, s->img_buffer, n); - 00140 48 63 85 50 01 + 00142 48 63 85 50 01 00 00 movsxd rax, DWORD PTR n$[rbp] - 00147 4c 8b c0 mov r8, rax - 0014a 48 8b 85 40 01 + 00149 4c 8b c0 mov r8, rax + 0014c 48 8b 85 40 01 00 00 mov rax, QWORD PTR s$[rbp] - 00151 48 8b 90 c0 00 + 00153 48 8b 90 c0 00 00 00 mov rdx, QWORD PTR [rax+192] - 00158 48 8b 8d 48 01 + 0015a 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR buffer$[rbp] - 0015f e8 00 00 00 00 call memcpy + 00161 e8 00 00 00 00 call memcpy + 00166 90 npad 1 ; 1145 : s->img_buffer += n; - 00164 48 63 85 50 01 + 00167 48 63 85 50 01 00 00 movsxd rax, DWORD PTR n$[rbp] - 0016b 48 8b 8d 40 01 + 0016e 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00172 48 03 81 c0 00 + 00175 48 03 81 c0 00 00 00 add rax, QWORD PTR [rcx+192] - 00179 48 8b 8d 40 01 + 0017c 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00180 48 89 81 c0 00 + 00183 48 89 81 c0 00 00 00 mov QWORD PTR [rcx+192], rax ; 1146 : return 1; - 00187 b8 01 00 00 00 mov eax, 1 - 0018c eb 04 jmp SHORT $LN1@stbi__getn + 0018a b8 01 00 00 00 mov eax, 1 + 0018f eb 04 jmp SHORT $LN1@stbi__getn ; 1147 : } - 0018e eb 02 jmp SHORT $LN5@stbi__getn + 00191 eb 02 jmp SHORT $LN5@stbi__getn $LN4@stbi__getn: ; 1148 : else ; 1149 : return 0; - 00190 33 c0 xor eax, eax + 00193 33 c0 xor eax, eax $LN5@stbi__getn: $LN1@stbi__getn: ; 1150 : } - 00192 48 8d a5 28 01 + 00195 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 00199 5f pop rdi - 0019a 5d pop rbp - 0019b c3 ret 0 + 0019c 5f pop rdi + 0019d 5d pop rbp + 0019e c3 ret 0 stbi__getn ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -40780,94 +41019,96 @@ stbi__skip PROC ; COMDAT 00017 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001e e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00023 90 npad 1 ; 1107 : if (n == 0) return; // already there! - 00023 83 bd 08 01 00 + 00024 83 bd 08 01 00 00 00 cmp DWORD PTR n$[rbp], 0 - 0002a 75 05 jne SHORT $LN2@stbi__skip - 0002c e9 ca 00 00 00 jmp $LN1@stbi__skip + 0002b 75 05 jne SHORT $LN2@stbi__skip + 0002d e9 cb 00 00 00 jmp $LN1@stbi__skip $LN2@stbi__skip: ; 1108 : if (n < 0) { - 00031 83 bd 08 01 00 + 00032 83 bd 08 01 00 00 00 cmp DWORD PTR n$[rbp], 0 - 00038 7d 21 jge SHORT $LN3@stbi__skip + 00039 7d 21 jge SHORT $LN3@stbi__skip ; 1109 : s->img_buffer = s->img_buffer_end; - 0003a 48 8b 85 00 01 + 0003b 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00041 48 8b 8d 00 01 + 00042 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00048 48 8b 89 c8 00 + 00049 48 8b 89 c8 00 00 00 mov rcx, QWORD PTR [rcx+200] - 0004f 48 89 88 c0 00 + 00050 48 89 88 c0 00 00 00 mov QWORD PTR [rax+192], rcx ; 1110 : return; - 00056 e9 a0 00 00 00 jmp $LN1@stbi__skip + 00057 e9 a1 00 00 00 jmp $LN1@stbi__skip $LN3@stbi__skip: ; 1111 : } ; 1112 : if (s->io.read) { - 0005b 48 8b 85 00 01 + 0005c 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00062 48 83 78 10 00 cmp QWORD PTR [rax+16], 0 - 00067 74 6f je SHORT $LN4@stbi__skip + 00063 48 83 78 10 00 cmp QWORD PTR [rax+16], 0 + 00068 74 70 je SHORT $LN4@stbi__skip ; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - 00069 48 8b 85 00 01 + 0006a 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00070 48 8b 8d 00 01 + 00071 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00077 48 8b 89 c0 00 + 00078 48 8b 89 c0 00 00 00 mov rcx, QWORD PTR [rcx+192] - 0007e 48 8b 80 c8 00 + 0007f 48 8b 80 c8 00 00 00 mov rax, QWORD PTR [rax+200] - 00085 48 2b c1 sub rax, rcx - 00088 89 45 04 mov DWORD PTR blen$1[rbp], eax + 00086 48 2b c1 sub rax, rcx + 00089 89 45 04 mov DWORD PTR blen$1[rbp], eax ; 1114 : if (blen < n) { - 0008b 8b 85 08 01 00 + 0008c 8b 85 08 01 00 00 mov eax, DWORD PTR n$[rbp] - 00091 39 45 04 cmp DWORD PTR blen$1[rbp], eax - 00094 7d 42 jge SHORT $LN5@stbi__skip + 00092 39 45 04 cmp DWORD PTR blen$1[rbp], eax + 00095 7d 43 jge SHORT $LN5@stbi__skip ; 1115 : s->img_buffer = s->img_buffer_end; - 00096 48 8b 85 00 01 + 00097 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 0009d 48 8b 8d 00 01 + 0009e 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000a4 48 8b 89 c8 00 + 000a5 48 8b 89 c8 00 00 00 mov rcx, QWORD PTR [rcx+200] - 000ab 48 89 88 c0 00 + 000ac 48 89 88 c0 00 00 00 mov QWORD PTR [rax+192], rcx ; 1116 : (s->io.skip)(s->io_user_data, n - blen); - 000b2 8b 45 04 mov eax, DWORD PTR blen$1[rbp] - 000b5 8b 8d 08 01 00 + 000b3 8b 45 04 mov eax, DWORD PTR blen$1[rbp] + 000b6 8b 8d 08 01 00 00 mov ecx, DWORD PTR n$[rbp] - 000bb 2b c8 sub ecx, eax - 000bd 8b c1 mov eax, ecx - 000bf 8b d0 mov edx, eax - 000c1 48 8b 85 00 01 + 000bc 2b c8 sub ecx, eax + 000be 8b c1 mov eax, ecx + 000c0 8b d0 mov edx, eax + 000c2 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 000c8 48 8b 48 28 mov rcx, QWORD PTR [rax+40] - 000cc 48 8b 85 00 01 + 000c9 48 8b 48 28 mov rcx, QWORD PTR [rax+40] + 000cd 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 000d3 ff 50 18 call QWORD PTR [rax+24] + 000d4 ff 50 18 call QWORD PTR [rax+24] + 000d7 90 npad 1 ; 1117 : return; - 000d6 eb 23 jmp SHORT $LN1@stbi__skip + 000d8 eb 23 jmp SHORT $LN1@stbi__skip $LN5@stbi__skip: $LN4@stbi__skip: @@ -40875,25 +41116,25 @@ $LN4@stbi__skip: ; 1119 : } ; 1120 : s->img_buffer += n; - 000d8 48 63 85 08 01 + 000da 48 63 85 08 01 00 00 movsxd rax, DWORD PTR n$[rbp] - 000df 48 8b 8d 00 01 + 000e1 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000e6 48 03 81 c0 00 + 000e8 48 03 81 c0 00 00 00 add rax, QWORD PTR [rcx+192] - 000ed 48 8b 8d 00 01 + 000ef 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000f4 48 89 81 c0 00 + 000f6 48 89 81 c0 00 00 00 mov QWORD PTR [rcx+192], rax $LN1@stbi__skip: ; 1121 : } - 000fb 48 8d a5 e8 00 + 000fd 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00102 5f pop rdi - 00103 5d pop rbp - 00104 c3 ret 0 + 00104 5f pop rdi + 00105 5d pop rbp + 00106 c3 ret 0 stbi__skip ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -40915,38 +41156,39 @@ stbi__at_eof PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 1091 : if (s->io.read) { - 0001f 48 8b 85 f0 00 + 00020 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00026 48 83 78 10 00 cmp QWORD PTR [rax+16], 0 - 0002b 74 31 je SHORT $LN2@stbi__at_e + 00027 48 83 78 10 00 cmp QWORD PTR [rax+16], 0 + 0002c 74 31 je SHORT $LN2@stbi__at_e ; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - 0002d 48 8b 85 f0 00 + 0002e 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00034 48 8b 48 28 mov rcx, QWORD PTR [rax+40] - 00038 48 8b 85 f0 00 + 00035 48 8b 48 28 mov rcx, QWORD PTR [rax+40] + 00039 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 0003f ff 50 20 call QWORD PTR [rax+32] - 00042 85 c0 test eax, eax - 00044 75 04 jne SHORT $LN3@stbi__at_e - 00046 33 c0 xor eax, eax - 00048 eb 4e jmp SHORT $LN1@stbi__at_e + 00040 ff 50 20 call QWORD PTR [rax+32] + 00043 85 c0 test eax, eax + 00045 75 04 jne SHORT $LN3@stbi__at_e + 00047 33 c0 xor eax, eax + 00049 eb 4e jmp SHORT $LN1@stbi__at_e $LN3@stbi__at_e: ; 1093 : // if feof() is true, check if buffer = end ; 1094 : // special case: we've only got the special 0 character at the end ; 1095 : if (s->read_from_callbacks == 0) return 1; - 0004a 48 8b 85 f0 00 + 0004b 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00051 83 78 30 00 cmp DWORD PTR [rax+48], 0 - 00055 75 07 jne SHORT $LN4@stbi__at_e - 00057 b8 01 00 00 00 mov eax, 1 - 0005c eb 3a jmp SHORT $LN1@stbi__at_e + 00052 83 78 30 00 cmp DWORD PTR [rax+48], 0 + 00056 75 07 jne SHORT $LN4@stbi__at_e + 00058 b8 01 00 00 00 mov eax, 1 + 0005d eb 3a jmp SHORT $LN1@stbi__at_e $LN4@stbi__at_e: $LN2@stbi__at_e: @@ -40954,41 +41196,41 @@ $LN2@stbi__at_e: ; 1097 : ; 1098 : return s->img_buffer >= s->img_buffer_end; - 0005e 48 8b 85 f0 00 + 0005f 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00065 48 8b 8d f0 00 + 00066 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 0006c 48 8b 89 c8 00 + 0006d 48 8b 89 c8 00 00 00 mov rcx, QWORD PTR [rcx+200] - 00073 48 39 88 c0 00 + 00074 48 39 88 c0 00 00 00 cmp QWORD PTR [rax+192], rcx - 0007a 72 0c jb SHORT $LN6@stbi__at_e - 0007c c7 85 c0 00 00 + 0007b 72 0c jb SHORT $LN6@stbi__at_e + 0007d c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv76[rbp], 1 - 00086 eb 0a jmp SHORT $LN7@stbi__at_e + 00087 eb 0a jmp SHORT $LN7@stbi__at_e $LN6@stbi__at_e: - 00088 c7 85 c0 00 00 + 00089 c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv76[rbp], 0 $LN7@stbi__at_e: - 00092 8b 85 c0 00 00 + 00093 8b 85 c0 00 00 00 mov eax, DWORD PTR tv76[rbp] $LN1@stbi__at_e: ; 1099 : } - 00098 48 8d a5 d8 00 + 00099 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 0009f 5f pop rdi - 000a0 5d pop rbp - 000a1 c3 ret 0 + 000a0 5f pop rdi + 000a1 5d pop rbp + 000a2 c3 ret 0 stbi__at_eof ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__get8 _TEXT SEGMENT -tv81 = 192 tv72 = 192 +tv81 = 192 s$ = 240 stbi__get8 PROC ; COMDAT @@ -41003,91 +41245,93 @@ stbi__get8 PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 1077 : if (s->img_buffer < s->img_buffer_end) - 0001f 48 8b 85 f0 00 + 00020 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00026 48 8b 8d f0 00 + 00027 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 0002d 48 8b 89 c8 00 + 0002e 48 8b 89 c8 00 00 00 mov rcx, QWORD PTR [rcx+200] - 00034 48 39 88 c0 00 + 00035 48 39 88 c0 00 00 00 cmp QWORD PTR [rax+192], rcx - 0003b 73 3f jae SHORT $LN2@stbi__get8 + 0003c 73 3f jae SHORT $LN2@stbi__get8 ; 1078 : return *s->img_buffer++; - 0003d 48 8b 85 f0 00 + 0003e 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00044 48 8b 80 c0 00 + 00045 48 8b 80 c0 00 00 00 mov rax, QWORD PTR [rax+192] - 0004b 0f b6 00 movzx eax, BYTE PTR [rax] - 0004e 88 85 c0 00 00 + 0004c 0f b6 00 movzx eax, BYTE PTR [rax] + 0004f 88 85 c0 00 00 00 mov BYTE PTR tv72[rbp], al - 00054 48 8b 85 f0 00 + 00055 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 0005b 48 8b 80 c0 00 + 0005c 48 8b 80 c0 00 00 00 mov rax, QWORD PTR [rax+192] - 00062 48 ff c0 inc rax - 00065 48 8b 8d f0 00 + 00063 48 ff c0 inc rax + 00066 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 0006c 48 89 81 c0 00 + 0006d 48 89 81 c0 00 00 00 mov QWORD PTR [rcx+192], rax - 00073 0f b6 85 c0 00 + 00074 0f b6 85 c0 00 00 00 movzx eax, BYTE PTR tv72[rbp] - 0007a eb 5a jmp SHORT $LN1@stbi__get8 + 0007b eb 5b jmp SHORT $LN1@stbi__get8 $LN2@stbi__get8: ; 1079 : if (s->read_from_callbacks) { - 0007c 48 8b 85 f0 00 + 0007d 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00083 83 78 30 00 cmp DWORD PTR [rax+48], 0 - 00087 74 4b je SHORT $LN3@stbi__get8 + 00084 83 78 30 00 cmp DWORD PTR [rax+48], 0 + 00088 74 4c je SHORT $LN3@stbi__get8 ; 1080 : stbi__refill_buffer(s); - 00089 48 8b 8d f0 00 + 0008a 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 00090 e8 00 00 00 00 call stbi__refill_buffer + 00091 e8 00 00 00 00 call stbi__refill_buffer + 00096 90 npad 1 ; 1081 : return *s->img_buffer++; - 00095 48 8b 85 f0 00 + 00097 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 0009c 48 8b 80 c0 00 + 0009e 48 8b 80 c0 00 00 00 mov rax, QWORD PTR [rax+192] - 000a3 0f b6 00 movzx eax, BYTE PTR [rax] - 000a6 88 85 c0 00 00 + 000a5 0f b6 00 movzx eax, BYTE PTR [rax] + 000a8 88 85 c0 00 00 00 mov BYTE PTR tv81[rbp], al - 000ac 48 8b 85 f0 00 + 000ae 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 000b3 48 8b 80 c0 00 + 000b5 48 8b 80 c0 00 00 00 mov rax, QWORD PTR [rax+192] - 000ba 48 ff c0 inc rax - 000bd 48 8b 8d f0 00 + 000bc 48 ff c0 inc rax + 000bf 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 000c4 48 89 81 c0 00 + 000c6 48 89 81 c0 00 00 00 mov QWORD PTR [rcx+192], rax - 000cb 0f b6 85 c0 00 + 000cd 0f b6 85 c0 00 00 00 movzx eax, BYTE PTR tv81[rbp] - 000d2 eb 02 jmp SHORT $LN1@stbi__get8 + 000d4 eb 02 jmp SHORT $LN1@stbi__get8 $LN3@stbi__get8: ; 1082 : } ; 1083 : return 0; - 000d4 32 c0 xor al, al + 000d6 32 c0 xor al, al $LN1@stbi__get8: ; 1084 : } - 000d6 48 8d a5 d8 00 + 000d8 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 000dd 5f pop rdi - 000de 5d pop rbp - 000df c3 ret 0 + 000df 5f pop rdi + 000e0 5d pop rbp + 000e1 c3 ret 0 stbi__get8 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -41132,152 +41376,154 @@ stbi__loadf_main PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 923 : unsigned char* data; ; 924 : #ifndef STBI_NO_HDR ; 925 : if (stbi__hdr_test(s)) { - 00058 48 8b 8d 60 01 + 00059 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0005f e8 00 00 00 00 call stbi__hdr_test - 00064 85 c0 test eax, eax - 00066 74 70 je SHORT $LN2@stbi__load + 00060 e8 00 00 00 00 call stbi__hdr_test + 00065 85 c0 test eax, eax + 00067 74 71 je SHORT $LN2@stbi__load ; 926 : stbi__result_info ri; ; 927 : float* hdr_data = stbi__hdr_load(s, x, y, comp, req_comp, &ri); - 00068 48 8d 45 28 lea rax, QWORD PTR ri$4[rbp] - 0006c 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 00071 8b 85 80 01 00 + 00069 48 8d 45 28 lea rax, QWORD PTR ri$4[rbp] + 0006d 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 00072 8b 85 80 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00077 89 44 24 20 mov DWORD PTR [rsp+32], eax - 0007b 4c 8b 8d 78 01 + 00078 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0007c 4c 8b 8d 78 01 00 00 mov r9, QWORD PTR comp$[rbp] - 00082 4c 8b 85 70 01 + 00083 4c 8b 85 70 01 00 00 mov r8, QWORD PTR y$[rbp] - 00089 48 8b 95 68 01 + 0008a 48 8b 95 68 01 00 00 mov rdx, QWORD PTR x$[rbp] - 00090 48 8b 8d 60 01 + 00091 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00097 e8 00 00 00 00 call stbi__hdr_load - 0009c 48 89 45 58 mov QWORD PTR hdr_data$5[rbp], rax + 00098 e8 00 00 00 00 call stbi__hdr_load + 0009d 48 89 45 58 mov QWORD PTR hdr_data$5[rbp], rax ; 928 : if (hdr_data) - 000a0 48 83 7d 58 00 cmp QWORD PTR hdr_data$5[rbp], 0 - 000a5 74 28 je SHORT $LN3@stbi__load + 000a1 48 83 7d 58 00 cmp QWORD PTR hdr_data$5[rbp], 0 + 000a6 74 29 je SHORT $LN3@stbi__load ; 929 : stbi__float_postprocess(hdr_data, x, y, comp, req_comp); - 000a7 8b 85 80 01 00 + 000a8 8b 85 80 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 000ad 89 44 24 20 mov DWORD PTR [rsp+32], eax - 000b1 4c 8b 8d 78 01 + 000ae 89 44 24 20 mov DWORD PTR [rsp+32], eax + 000b2 4c 8b 8d 78 01 00 00 mov r9, QWORD PTR comp$[rbp] - 000b8 4c 8b 85 70 01 + 000b9 4c 8b 85 70 01 00 00 mov r8, QWORD PTR y$[rbp] - 000bf 48 8b 95 68 01 + 000c0 48 8b 95 68 01 00 00 mov rdx, QWORD PTR x$[rbp] - 000c6 48 8b 4d 58 mov rcx, QWORD PTR hdr_data$5[rbp] - 000ca e8 00 00 00 00 call stbi__float_postprocess + 000c7 48 8b 4d 58 mov rcx, QWORD PTR hdr_data$5[rbp] + 000cb e8 00 00 00 00 call stbi__float_postprocess + 000d0 90 npad 1 $LN3@stbi__load: ; 930 : return hdr_data; - 000cf 48 8b 45 58 mov rax, QWORD PTR hdr_data$5[rbp] - 000d3 e9 b0 00 00 00 jmp $LN1@stbi__load + 000d1 48 8b 45 58 mov rax, QWORD PTR hdr_data$5[rbp] + 000d5 e9 b0 00 00 00 jmp $LN1@stbi__load $LN2@stbi__load: ; 931 : } ; 932 : #endif ; 933 : data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp); - 000d8 8b 85 80 01 00 + 000da 8b 85 80 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 000de 89 44 24 20 mov DWORD PTR [rsp+32], eax - 000e2 4c 8b 8d 78 01 + 000e0 89 44 24 20 mov DWORD PTR [rsp+32], eax + 000e4 4c 8b 8d 78 01 00 00 mov r9, QWORD PTR comp$[rbp] - 000e9 4c 8b 85 70 01 + 000eb 4c 8b 85 70 01 00 00 mov r8, QWORD PTR y$[rbp] - 000f0 48 8b 95 68 01 + 000f2 48 8b 95 68 01 00 00 mov rdx, QWORD PTR x$[rbp] - 000f7 48 8b 8d 60 01 + 000f9 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000fe e8 00 00 00 00 call stbi__load_and_postprocess_8bit - 00103 48 89 45 08 mov QWORD PTR data$[rbp], rax + 00100 e8 00 00 00 00 call stbi__load_and_postprocess_8bit + 00105 48 89 45 08 mov QWORD PTR data$[rbp], rax ; 934 : if (data) - 00107 48 83 7d 08 00 cmp QWORD PTR data$[rbp], 0 - 0010c 74 4b je SHORT $LN4@stbi__load + 00109 48 83 7d 08 00 cmp QWORD PTR data$[rbp], 0 + 0010e 74 4b je SHORT $LN4@stbi__load ; 935 : return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp); - 0010e 83 bd 80 01 00 + 00110 83 bd 80 01 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 00115 74 0e je SHORT $LN6@stbi__load - 00117 8b 85 80 01 00 + 00117 74 0e je SHORT $LN6@stbi__load + 00119 8b 85 80 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 0011d 89 85 24 01 00 + 0011f 89 85 24 01 00 00 mov DWORD PTR tv89[rbp], eax - 00123 eb 0f jmp SHORT $LN7@stbi__load + 00125 eb 0f jmp SHORT $LN7@stbi__load $LN6@stbi__load: - 00125 48 8b 85 78 01 + 00127 48 8b 85 78 01 00 00 mov rax, QWORD PTR comp$[rbp] - 0012c 8b 00 mov eax, DWORD PTR [rax] - 0012e 89 85 24 01 00 + 0012e 8b 00 mov eax, DWORD PTR [rax] + 00130 89 85 24 01 00 00 mov DWORD PTR tv89[rbp], eax $LN7@stbi__load: - 00134 44 8b 8d 24 01 + 00136 44 8b 8d 24 01 00 00 mov r9d, DWORD PTR tv89[rbp] - 0013b 48 8b 85 70 01 + 0013d 48 8b 85 70 01 00 00 mov rax, QWORD PTR y$[rbp] - 00142 44 8b 00 mov r8d, DWORD PTR [rax] - 00145 48 8b 85 68 01 + 00144 44 8b 00 mov r8d, DWORD PTR [rax] + 00147 48 8b 85 68 01 00 00 mov rax, QWORD PTR x$[rbp] - 0014c 8b 10 mov edx, DWORD PTR [rax] - 0014e 48 8b 4d 08 mov rcx, QWORD PTR data$[rbp] - 00152 e8 00 00 00 00 call stbi__ldr_to_hdr - 00157 eb 2f jmp SHORT $LN1@stbi__load + 0014e 8b 10 mov edx, DWORD PTR [rax] + 00150 48 8b 4d 08 mov rcx, QWORD PTR data$[rbp] + 00154 e8 00 00 00 00 call stbi__ldr_to_hdr + 00159 eb 2f jmp SHORT $LN1@stbi__load $LN4@stbi__load: ; 936 : return stbi__errpf("unknown image type", "Image not of any known type, or corrupt"); - 00159 48 8d 0d 00 00 + 0015b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BD@CBEDEJPH@unknown?5image?5type@ - 00160 e8 00 00 00 00 call stbi__err - 00165 85 c0 test eax, eax - 00167 74 0d je SHORT $LN8@stbi__load - 00169 48 c7 85 28 01 + 00162 e8 00 00 00 00 call stbi__err + 00167 85 c0 test eax, eax + 00169 74 0d je SHORT $LN8@stbi__load + 0016b 48 c7 85 28 01 00 00 00 00 00 00 mov QWORD PTR tv129[rbp], 0 - 00174 eb 0b jmp SHORT $LN9@stbi__load + 00176 eb 0b jmp SHORT $LN9@stbi__load $LN8@stbi__load: - 00176 48 c7 85 28 01 + 00178 48 c7 85 28 01 00 00 00 00 00 00 mov QWORD PTR tv129[rbp], 0 $LN9@stbi__load: - 00181 48 8b 85 28 01 + 00183 48 8b 85 28 01 00 00 mov rax, QWORD PTR tv129[rbp] $LN1@stbi__load: ; 937 : } - 00188 48 8b f8 mov rdi, rax - 0018b 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 0018f 48 8d 15 00 00 + 0018a 48 8b f8 mov rdi, rax + 0018d 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 00191 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__loadf_main$rtcFrameData - 00196 e8 00 00 00 00 call _RTC_CheckStackVars - 0019b 48 8b c7 mov rax, rdi - 0019e 48 8b 8d 30 01 + 00198 e8 00 00 00 00 call _RTC_CheckStackVars + 0019d 48 8b c7 mov rax, rdi + 001a0 48 8b 8d 30 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 001a5 48 33 cd xor rcx, rbp - 001a8 e8 00 00 00 00 call __security_check_cookie - 001ad 48 8d a5 48 01 + 001a7 48 33 cd xor rcx, rbp + 001aa e8 00 00 00 00 call __security_check_cookie + 001af 48 8d a5 48 01 00 00 lea rsp, QWORD PTR [rbp+328] - 001b4 5f pop rdi - 001b5 5d pop rbp - 001b6 c3 ret 0 + 001b6 5f pop rdi + 001b7 5d pop rbp + 001b8 c3 ret 0 stbi__loadf_main ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -41313,6 +41559,7 @@ stbi__fopen PROC ; COMDAT 00042 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00049 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0004e 90 npad 1 ; 790 : FILE* f; ; 791 : #if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) @@ -41334,19 +41581,19 @@ stbi__fopen PROC ; COMDAT ; 807 : #elif defined(_MSC_VER) && _MSC_VER >= 1400 ; 808 : if (0 != fopen_s(&f, filename, mode)) - 0004e 4c 8b 85 08 01 + 0004f 4c 8b 85 08 01 00 00 mov r8, QWORD PTR mode$[rbp] - 00055 48 8b 95 00 01 + 00056 48 8b 95 00 01 00 00 mov rdx, QWORD PTR filename$[rbp] - 0005c 48 8d 4d 08 lea rcx, QWORD PTR f$[rbp] - 00060 ff 15 00 00 00 + 0005d 48 8d 4d 08 lea rcx, QWORD PTR f$[rbp] + 00061 ff 15 00 00 00 00 call QWORD PTR __imp_fopen_s - 00066 85 c0 test eax, eax - 00068 74 08 je SHORT $LN2@stbi__fope + 00067 85 c0 test eax, eax + 00069 74 08 je SHORT $LN2@stbi__fope ; 809 : f = 0; - 0006a 48 c7 45 08 00 + 0006b 48 c7 45 08 00 00 00 00 mov QWORD PTR f$[rbp], 0 $LN2@stbi__fope: @@ -41355,25 +41602,25 @@ $LN2@stbi__fope: ; 812 : #endif ; 813 : return f; - 00072 48 8b 45 08 mov rax, QWORD PTR f$[rbp] + 00073 48 8b 45 08 mov rax, QWORD PTR f$[rbp] ; 814 : } - 00076 48 8b f8 mov rdi, rax - 00079 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 0007d 48 8d 15 00 00 + 00077 48 8b f8 mov rdi, rax + 0007a 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 0007e 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__fopen$rtcFrameData - 00084 e8 00 00 00 00 call _RTC_CheckStackVars - 00089 48 8b c7 mov rax, rdi - 0008c 48 8b 8d d8 00 + 00085 e8 00 00 00 00 call _RTC_CheckStackVars + 0008a 48 8b c7 mov rax, rdi + 0008d 48 8b 8d d8 00 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00093 48 33 cd xor rcx, rbp - 00096 e8 00 00 00 00 call __security_check_cookie - 0009b 48 8d a5 e8 00 + 00094 48 33 cd xor rcx, rbp + 00097 e8 00 00 00 00 call __security_check_cookie + 0009c 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 000a2 5f pop rdi - 000a3 5d pop rbp - 000a4 c3 ret 0 + 000a3 5f pop rdi + 000a4 5d pop rbp + 000a5 c3 ret 0 stbi__fopen ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -41381,8 +41628,8 @@ _TEXT ENDS ; COMDAT stbi__float_postprocess _TEXT SEGMENT channels$1 = 4 -tv81 = 212 tv77 = 212 +tv81 = 212 result$ = 256 x$ = 264 y$ = 272 @@ -41404,87 +41651,89 @@ stbi__float_postprocess PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 767 : if (stbi__vertically_flip_on_load && result != NULL) { - 0002e b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_set - 00033 8b c0 mov eax, eax - 00035 8b 0d 00 00 00 + 0002f b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_set + 00034 8b c0 mov eax, eax + 00036 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 0003b 65 48 8b 14 25 + 0003c 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 00044 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00048 83 3c 08 00 cmp DWORD PTR [rax+rcx], 0 - 0004c 74 25 je SHORT $LN4@stbi__floa - 0004e b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_local - 00053 8b c0 mov eax, eax - 00055 8b 0d 00 00 00 + 00045 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00049 83 3c 08 00 cmp DWORD PTR [rax+rcx], 0 + 0004d 74 25 je SHORT $LN4@stbi__floa + 0004f b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_local + 00054 8b c0 mov eax, eax + 00056 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 0005b 65 48 8b 14 25 + 0005c 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 00064 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00068 8b 04 08 mov eax, DWORD PTR [rax+rcx] - 0006b 89 85 d4 00 00 + 00065 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00069 8b 04 08 mov eax, DWORD PTR [rax+rcx] + 0006c 89 85 d4 00 00 00 mov DWORD PTR tv77[rbp], eax - 00071 eb 0c jmp SHORT $LN5@stbi__floa + 00072 eb 0c jmp SHORT $LN5@stbi__floa $LN4@stbi__floa: - 00073 8b 05 00 00 00 + 00074 8b 05 00 00 00 00 mov eax, DWORD PTR stbi__vertically_flip_on_load_global - 00079 89 85 d4 00 00 + 0007a 89 85 d4 00 00 00 mov DWORD PTR tv77[rbp], eax $LN5@stbi__floa: - 0007f 83 bd d4 00 00 + 00080 83 bd d4 00 00 00 00 cmp DWORD PTR tv77[rbp], 0 - 00086 74 63 je SHORT $LN2@stbi__floa - 00088 48 83 bd 00 01 + 00087 74 64 je SHORT $LN2@stbi__floa + 00089 48 83 bd 00 01 00 00 00 cmp QWORD PTR result$[rbp], 0 - 00090 74 59 je SHORT $LN2@stbi__floa + 00091 74 5a je SHORT $LN2@stbi__floa ; 768 : int channels = req_comp ? req_comp : *comp; - 00092 83 bd 20 01 00 + 00093 83 bd 20 01 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 00099 74 0e je SHORT $LN6@stbi__floa - 0009b 8b 85 20 01 00 + 0009a 74 0e je SHORT $LN6@stbi__floa + 0009c 8b 85 20 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 000a1 89 85 d4 00 00 + 000a2 89 85 d4 00 00 00 mov DWORD PTR tv81[rbp], eax - 000a7 eb 0f jmp SHORT $LN7@stbi__floa + 000a8 eb 0f jmp SHORT $LN7@stbi__floa $LN6@stbi__floa: - 000a9 48 8b 85 18 01 + 000aa 48 8b 85 18 01 00 00 mov rax, QWORD PTR comp$[rbp] - 000b0 8b 00 mov eax, DWORD PTR [rax] - 000b2 89 85 d4 00 00 + 000b1 8b 00 mov eax, DWORD PTR [rax] + 000b3 89 85 d4 00 00 00 mov DWORD PTR tv81[rbp], eax $LN7@stbi__floa: - 000b8 8b 85 d4 00 00 + 000b9 8b 85 d4 00 00 00 mov eax, DWORD PTR tv81[rbp] - 000be 89 45 04 mov DWORD PTR channels$1[rbp], eax + 000bf 89 45 04 mov DWORD PTR channels$1[rbp], eax ; 769 : stbi__vertical_flip(result, *x, *y, channels * sizeof(float)); - 000c1 48 63 45 04 movsxd rax, DWORD PTR channels$1[rbp] - 000c5 48 c1 e0 02 shl rax, 2 - 000c9 44 8b c8 mov r9d, eax - 000cc 48 8b 85 10 01 + 000c2 48 63 45 04 movsxd rax, DWORD PTR channels$1[rbp] + 000c6 48 c1 e0 02 shl rax, 2 + 000ca 44 8b c8 mov r9d, eax + 000cd 48 8b 85 10 01 00 00 mov rax, QWORD PTR y$[rbp] - 000d3 44 8b 00 mov r8d, DWORD PTR [rax] - 000d6 48 8b 85 08 01 + 000d4 44 8b 00 mov r8d, DWORD PTR [rax] + 000d7 48 8b 85 08 01 00 00 mov rax, QWORD PTR x$[rbp] - 000dd 8b 10 mov edx, DWORD PTR [rax] - 000df 48 8b 8d 00 01 + 000de 8b 10 mov edx, DWORD PTR [rax] + 000e0 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR result$[rbp] - 000e6 e8 00 00 00 00 call stbi__vertical_flip + 000e7 e8 00 00 00 00 call stbi__vertical_flip + 000ec 90 npad 1 $LN2@stbi__floa: ; 770 : } ; 771 : } - 000eb 48 8d a5 e8 00 + 000ed 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 000f2 5f pop rdi - 000f3 5d pop rbp - 000f4 c3 ret 0 + 000f4 5f pop rdi + 000f5 5d pop rbp + 000f6 c3 ret 0 stbi__float_postprocess ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -41494,9 +41743,9 @@ _TEXT SEGMENT ri$ = 8 result$ = 56 channels$4 = 84 -tv135 = 292 -tv132 = 292 tv82 = 292 +tv132 = 292 +tv135 = 292 __$ArrayPad$ = 296 s$ = 336 x$ = 344 @@ -41530,97 +41779,98 @@ stbi__load_and_postprocess_16bit PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 739 : stbi__result_info ri; ; 740 : void* result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16); - 00058 c7 44 24 30 10 + 00059 c7 44 24 30 10 00 00 00 mov DWORD PTR [rsp+48], 16 - 00060 48 8d 45 08 lea rax, QWORD PTR ri$[rbp] - 00064 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 00069 8b 85 70 01 00 + 00061 48 8d 45 08 lea rax, QWORD PTR ri$[rbp] + 00065 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 0006a 8b 85 70 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 0006f 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00073 4c 8b 8d 68 01 + 00070 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00074 4c 8b 8d 68 01 00 00 mov r9, QWORD PTR comp$[rbp] - 0007a 4c 8b 85 60 01 + 0007b 4c 8b 85 60 01 00 00 mov r8, QWORD PTR y$[rbp] - 00081 48 8b 95 58 01 + 00082 48 8b 95 58 01 00 00 mov rdx, QWORD PTR x$[rbp] - 00088 48 8b 8d 50 01 + 00089 48 8b 8d 50 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0008f e8 00 00 00 00 call stbi__load_main - 00094 48 89 45 38 mov QWORD PTR result$[rbp], rax + 00090 e8 00 00 00 00 call stbi__load_main + 00095 48 89 45 38 mov QWORD PTR result$[rbp], rax ; 741 : ; 742 : if (result == NULL) - 00098 48 83 7d 38 00 cmp QWORD PTR result$[rbp], 0 - 0009d 75 07 jne SHORT $LN2@stbi__load + 00099 48 83 7d 38 00 cmp QWORD PTR result$[rbp], 0 + 0009e 75 07 jne SHORT $LN2@stbi__load ; 743 : return NULL; - 0009f 33 c0 xor eax, eax - 000a1 e9 35 01 00 00 jmp $LN1@stbi__load + 000a0 33 c0 xor eax, eax + 000a2 e9 36 01 00 00 jmp $LN1@stbi__load $LN2@stbi__load: ; 744 : ; 745 : // it is the responsibility of the loaders to make sure we get either 8 or 16 bit. ; 746 : STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16); - 000a6 83 7d 08 08 cmp DWORD PTR ri$[rbp], 8 - 000aa 74 22 je SHORT $LN6@stbi__load - 000ac 83 7d 08 10 cmp DWORD PTR ri$[rbp], 16 - 000b0 74 1c je SHORT $LN6@stbi__load - 000b2 41 b8 ea 02 00 + 000a7 83 7d 08 08 cmp DWORD PTR ri$[rbp], 8 + 000ab 74 22 je SHORT $LN6@stbi__load + 000ad 83 7d 08 10 cmp DWORD PTR ri$[rbp], 16 + 000b1 74 1c je SHORT $LN6@stbi__load + 000b3 41 b8 ea 02 00 00 mov r8d, 746 ; 000002eaH - 000b8 48 8d 15 00 00 + 000b9 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 000bf 48 8d 0d 00 00 + 000c0 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1GM@LFNCFCEN@?$AAr?$AAi?$AA?4?$AAb?$AAi?$AAt?$AAs?$AA_?$AAp?$AAe?$AAr?$AA_?$AAc?$AAh?$AAa@ - 000c6 ff 15 00 00 00 + 000c7 ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 000cc 33 c0 xor eax, eax + 000cd 33 c0 xor eax, eax $LN6@stbi__load: ; 747 : ; 748 : if (ri.bits_per_channel != 16) { - 000ce 83 7d 08 10 cmp DWORD PTR ri$[rbp], 16 - 000d2 74 54 je SHORT $LN3@stbi__load + 000cf 83 7d 08 10 cmp DWORD PTR ri$[rbp], 16 + 000d3 74 54 je SHORT $LN3@stbi__load ; 749 : result = stbi__convert_8_to_16((stbi_uc*)result, *x, *y, req_comp == 0 ? *comp : req_comp); - 000d4 83 bd 70 01 00 + 000d5 83 bd 70 01 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 000db 75 11 jne SHORT $LN7@stbi__load - 000dd 48 8b 85 68 01 + 000dc 75 11 jne SHORT $LN7@stbi__load + 000de 48 8b 85 68 01 00 00 mov rax, QWORD PTR comp$[rbp] - 000e4 8b 00 mov eax, DWORD PTR [rax] - 000e6 89 85 24 01 00 + 000e5 8b 00 mov eax, DWORD PTR [rax] + 000e7 89 85 24 01 00 00 mov DWORD PTR tv82[rbp], eax - 000ec eb 0c jmp SHORT $LN8@stbi__load + 000ed eb 0c jmp SHORT $LN8@stbi__load $LN7@stbi__load: - 000ee 8b 85 70 01 00 + 000ef 8b 85 70 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 000f4 89 85 24 01 00 + 000f5 89 85 24 01 00 00 mov DWORD PTR tv82[rbp], eax $LN8@stbi__load: - 000fa 44 8b 8d 24 01 + 000fb 44 8b 8d 24 01 00 00 mov r9d, DWORD PTR tv82[rbp] - 00101 48 8b 85 60 01 + 00102 48 8b 85 60 01 00 00 mov rax, QWORD PTR y$[rbp] - 00108 44 8b 00 mov r8d, DWORD PTR [rax] - 0010b 48 8b 85 58 01 + 00109 44 8b 00 mov r8d, DWORD PTR [rax] + 0010c 48 8b 85 58 01 00 00 mov rax, QWORD PTR x$[rbp] - 00112 8b 10 mov edx, DWORD PTR [rax] - 00114 48 8b 4d 38 mov rcx, QWORD PTR result$[rbp] - 00118 e8 00 00 00 00 call stbi__convert_8_to_16 - 0011d 48 89 45 38 mov QWORD PTR result$[rbp], rax + 00113 8b 10 mov edx, DWORD PTR [rax] + 00115 48 8b 4d 38 mov rcx, QWORD PTR result$[rbp] + 00119 e8 00 00 00 00 call stbi__convert_8_to_16 + 0011e 48 89 45 38 mov QWORD PTR result$[rbp], rax ; 750 : ri.bits_per_channel = 16; - 00121 c7 45 08 10 00 + 00122 c7 45 08 10 00 00 00 mov DWORD PTR ri$[rbp], 16 $LN3@stbi__load: @@ -41631,96 +41881,97 @@ $LN3@stbi__load: ; 755 : ; 756 : if (stbi__vertically_flip_on_load) { - 00128 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_set - 0012d 8b c0 mov eax, eax - 0012f 8b 0d 00 00 00 + 00129 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_set + 0012e 8b c0 mov eax, eax + 00130 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 00135 65 48 8b 14 25 + 00136 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 0013e 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00142 83 3c 08 00 cmp DWORD PTR [rax+rcx], 0 - 00146 74 25 je SHORT $LN9@stbi__load - 00148 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_local - 0014d 8b c0 mov eax, eax - 0014f 8b 0d 00 00 00 + 0013f 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00143 83 3c 08 00 cmp DWORD PTR [rax+rcx], 0 + 00147 74 25 je SHORT $LN9@stbi__load + 00149 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_local + 0014e 8b c0 mov eax, eax + 00150 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 00155 65 48 8b 14 25 + 00156 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 0015e 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00162 8b 04 08 mov eax, DWORD PTR [rax+rcx] - 00165 89 85 24 01 00 + 0015f 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00163 8b 04 08 mov eax, DWORD PTR [rax+rcx] + 00166 89 85 24 01 00 00 mov DWORD PTR tv132[rbp], eax - 0016b eb 0c jmp SHORT $LN10@stbi__load + 0016c eb 0c jmp SHORT $LN10@stbi__load $LN9@stbi__load: - 0016d 8b 05 00 00 00 + 0016e 8b 05 00 00 00 00 mov eax, DWORD PTR stbi__vertically_flip_on_load_global - 00173 89 85 24 01 00 + 00174 89 85 24 01 00 00 mov DWORD PTR tv132[rbp], eax $LN10@stbi__load: - 00179 83 bd 24 01 00 + 0017a 83 bd 24 01 00 00 00 cmp DWORD PTR tv132[rbp], 0 - 00180 74 55 je SHORT $LN4@stbi__load + 00181 74 56 je SHORT $LN4@stbi__load ; 757 : int channels = req_comp ? req_comp : *comp; - 00182 83 bd 70 01 00 + 00183 83 bd 70 01 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 00189 74 0e je SHORT $LN11@stbi__load - 0018b 8b 85 70 01 00 + 0018a 74 0e je SHORT $LN11@stbi__load + 0018c 8b 85 70 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00191 89 85 24 01 00 + 00192 89 85 24 01 00 00 mov DWORD PTR tv135[rbp], eax - 00197 eb 0f jmp SHORT $LN12@stbi__load + 00198 eb 0f jmp SHORT $LN12@stbi__load $LN11@stbi__load: - 00199 48 8b 85 68 01 + 0019a 48 8b 85 68 01 00 00 mov rax, QWORD PTR comp$[rbp] - 001a0 8b 00 mov eax, DWORD PTR [rax] - 001a2 89 85 24 01 00 + 001a1 8b 00 mov eax, DWORD PTR [rax] + 001a3 89 85 24 01 00 00 mov DWORD PTR tv135[rbp], eax $LN12@stbi__load: - 001a8 8b 85 24 01 00 + 001a9 8b 85 24 01 00 00 mov eax, DWORD PTR tv135[rbp] - 001ae 89 45 54 mov DWORD PTR channels$4[rbp], eax + 001af 89 45 54 mov DWORD PTR channels$4[rbp], eax ; 758 : stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi__uint16)); - 001b1 48 63 45 54 movsxd rax, DWORD PTR channels$4[rbp] - 001b5 48 d1 e0 shl rax, 1 - 001b8 44 8b c8 mov r9d, eax - 001bb 48 8b 85 60 01 + 001b2 48 63 45 54 movsxd rax, DWORD PTR channels$4[rbp] + 001b6 48 d1 e0 shl rax, 1 + 001b9 44 8b c8 mov r9d, eax + 001bc 48 8b 85 60 01 00 00 mov rax, QWORD PTR y$[rbp] - 001c2 44 8b 00 mov r8d, DWORD PTR [rax] - 001c5 48 8b 85 58 01 + 001c3 44 8b 00 mov r8d, DWORD PTR [rax] + 001c6 48 8b 85 58 01 00 00 mov rax, QWORD PTR x$[rbp] - 001cc 8b 10 mov edx, DWORD PTR [rax] - 001ce 48 8b 4d 38 mov rcx, QWORD PTR result$[rbp] - 001d2 e8 00 00 00 00 call stbi__vertical_flip + 001cd 8b 10 mov edx, DWORD PTR [rax] + 001cf 48 8b 4d 38 mov rcx, QWORD PTR result$[rbp] + 001d3 e8 00 00 00 00 call stbi__vertical_flip + 001d8 90 npad 1 $LN4@stbi__load: ; 759 : } ; 760 : ; 761 : return (stbi__uint16*)result; - 001d7 48 8b 45 38 mov rax, QWORD PTR result$[rbp] + 001d9 48 8b 45 38 mov rax, QWORD PTR result$[rbp] $LN1@stbi__load: ; 762 : } - 001db 48 8b f8 mov rdi, rax - 001de 48 8d 4d c0 lea rcx, QWORD PTR [rbp-64] - 001e2 48 8d 15 00 00 + 001dd 48 8b f8 mov rdi, rax + 001e0 48 8d 4d c0 lea rcx, QWORD PTR [rbp-64] + 001e4 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__load_and_postprocess_16bit$rtcFrameData - 001e9 e8 00 00 00 00 call _RTC_CheckStackVars - 001ee 48 8b c7 mov rax, rdi - 001f1 48 8b 8d 28 01 + 001eb e8 00 00 00 00 call _RTC_CheckStackVars + 001f0 48 8b c7 mov rax, rdi + 001f3 48 8b 8d 28 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 001f8 48 33 cd xor rcx, rbp - 001fb e8 00 00 00 00 call __security_check_cookie - 00200 48 8d a5 38 01 + 001fa 48 33 cd xor rcx, rbp + 001fd e8 00 00 00 00 call __security_check_cookie + 00202 48 8d a5 38 01 00 00 lea rsp, QWORD PTR [rbp+312] - 00207 5f pop rdi - 00208 5d pop rbp - 00209 c3 ret 0 + 00209 5f pop rdi + 0020a 5d pop rbp + 0020b c3 ret 0 stbi__load_and_postprocess_16bit ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -41730,9 +41981,9 @@ _TEXT SEGMENT ri$ = 8 result$ = 56 channels$4 = 84 -tv135 = 292 -tv132 = 292 tv82 = 292 +tv132 = 292 +tv135 = 292 __$ArrayPad$ = 296 s$ = 336 x$ = 344 @@ -41766,97 +42017,98 @@ stbi__load_and_postprocess_8bit PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 713 : stbi__result_info ri; ; 714 : void* result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8); - 00058 c7 44 24 30 08 + 00059 c7 44 24 30 08 00 00 00 mov DWORD PTR [rsp+48], 8 - 00060 48 8d 45 08 lea rax, QWORD PTR ri$[rbp] - 00064 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 00069 8b 85 70 01 00 + 00061 48 8d 45 08 lea rax, QWORD PTR ri$[rbp] + 00065 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 0006a 8b 85 70 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 0006f 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00073 4c 8b 8d 68 01 + 00070 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00074 4c 8b 8d 68 01 00 00 mov r9, QWORD PTR comp$[rbp] - 0007a 4c 8b 85 60 01 + 0007b 4c 8b 85 60 01 00 00 mov r8, QWORD PTR y$[rbp] - 00081 48 8b 95 58 01 + 00082 48 8b 95 58 01 00 00 mov rdx, QWORD PTR x$[rbp] - 00088 48 8b 8d 50 01 + 00089 48 8b 8d 50 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0008f e8 00 00 00 00 call stbi__load_main - 00094 48 89 45 38 mov QWORD PTR result$[rbp], rax + 00090 e8 00 00 00 00 call stbi__load_main + 00095 48 89 45 38 mov QWORD PTR result$[rbp], rax ; 715 : ; 716 : if (result == NULL) - 00098 48 83 7d 38 00 cmp QWORD PTR result$[rbp], 0 - 0009d 75 07 jne SHORT $LN2@stbi__load + 00099 48 83 7d 38 00 cmp QWORD PTR result$[rbp], 0 + 0009e 75 07 jne SHORT $LN2@stbi__load ; 717 : return NULL; - 0009f 33 c0 xor eax, eax - 000a1 e9 2f 01 00 00 jmp $LN1@stbi__load + 000a0 33 c0 xor eax, eax + 000a2 e9 30 01 00 00 jmp $LN1@stbi__load $LN2@stbi__load: ; 718 : ; 719 : // it is the responsibility of the loaders to make sure we get either 8 or 16 bit. ; 720 : STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16); - 000a6 83 7d 08 08 cmp DWORD PTR ri$[rbp], 8 - 000aa 74 22 je SHORT $LN6@stbi__load - 000ac 83 7d 08 10 cmp DWORD PTR ri$[rbp], 16 - 000b0 74 1c je SHORT $LN6@stbi__load - 000b2 41 b8 d0 02 00 + 000a7 83 7d 08 08 cmp DWORD PTR ri$[rbp], 8 + 000ab 74 22 je SHORT $LN6@stbi__load + 000ad 83 7d 08 10 cmp DWORD PTR ri$[rbp], 16 + 000b1 74 1c je SHORT $LN6@stbi__load + 000b3 41 b8 d0 02 00 00 mov r8d, 720 ; 000002d0H - 000b8 48 8d 15 00 00 + 000b9 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 000bf 48 8d 0d 00 00 + 000c0 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1GM@LFNCFCEN@?$AAr?$AAi?$AA?4?$AAb?$AAi?$AAt?$AAs?$AA_?$AAp?$AAe?$AAr?$AA_?$AAc?$AAh?$AAa@ - 000c6 ff 15 00 00 00 + 000c7 ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 000cc 33 c0 xor eax, eax + 000cd 33 c0 xor eax, eax $LN6@stbi__load: ; 721 : ; 722 : if (ri.bits_per_channel != 8) { - 000ce 83 7d 08 08 cmp DWORD PTR ri$[rbp], 8 - 000d2 74 54 je SHORT $LN3@stbi__load + 000cf 83 7d 08 08 cmp DWORD PTR ri$[rbp], 8 + 000d3 74 54 je SHORT $LN3@stbi__load ; 723 : result = stbi__convert_16_to_8((stbi__uint16*)result, *x, *y, req_comp == 0 ? *comp : req_comp); - 000d4 83 bd 70 01 00 + 000d5 83 bd 70 01 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 000db 75 11 jne SHORT $LN7@stbi__load - 000dd 48 8b 85 68 01 + 000dc 75 11 jne SHORT $LN7@stbi__load + 000de 48 8b 85 68 01 00 00 mov rax, QWORD PTR comp$[rbp] - 000e4 8b 00 mov eax, DWORD PTR [rax] - 000e6 89 85 24 01 00 + 000e5 8b 00 mov eax, DWORD PTR [rax] + 000e7 89 85 24 01 00 00 mov DWORD PTR tv82[rbp], eax - 000ec eb 0c jmp SHORT $LN8@stbi__load + 000ed eb 0c jmp SHORT $LN8@stbi__load $LN7@stbi__load: - 000ee 8b 85 70 01 00 + 000ef 8b 85 70 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 000f4 89 85 24 01 00 + 000f5 89 85 24 01 00 00 mov DWORD PTR tv82[rbp], eax $LN8@stbi__load: - 000fa 44 8b 8d 24 01 + 000fb 44 8b 8d 24 01 00 00 mov r9d, DWORD PTR tv82[rbp] - 00101 48 8b 85 60 01 + 00102 48 8b 85 60 01 00 00 mov rax, QWORD PTR y$[rbp] - 00108 44 8b 00 mov r8d, DWORD PTR [rax] - 0010b 48 8b 85 58 01 + 00109 44 8b 00 mov r8d, DWORD PTR [rax] + 0010c 48 8b 85 58 01 00 00 mov rax, QWORD PTR x$[rbp] - 00112 8b 10 mov edx, DWORD PTR [rax] - 00114 48 8b 4d 38 mov rcx, QWORD PTR result$[rbp] - 00118 e8 00 00 00 00 call stbi__convert_16_to_8 - 0011d 48 89 45 38 mov QWORD PTR result$[rbp], rax + 00113 8b 10 mov edx, DWORD PTR [rax] + 00115 48 8b 4d 38 mov rcx, QWORD PTR result$[rbp] + 00119 e8 00 00 00 00 call stbi__convert_16_to_8 + 0011e 48 89 45 38 mov QWORD PTR result$[rbp], rax ; 724 : ri.bits_per_channel = 8; - 00121 c7 45 08 08 00 + 00122 c7 45 08 08 00 00 00 mov DWORD PTR ri$[rbp], 8 $LN3@stbi__load: @@ -41866,94 +42118,95 @@ $LN3@stbi__load: ; 728 : ; 729 : if (stbi__vertically_flip_on_load) { - 00128 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_set - 0012d 8b c0 mov eax, eax - 0012f 8b 0d 00 00 00 + 00129 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_set + 0012e 8b c0 mov eax, eax + 00130 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 00135 65 48 8b 14 25 + 00136 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 0013e 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00142 83 3c 08 00 cmp DWORD PTR [rax+rcx], 0 - 00146 74 25 je SHORT $LN9@stbi__load - 00148 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_local - 0014d 8b c0 mov eax, eax - 0014f 8b 0d 00 00 00 + 0013f 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00143 83 3c 08 00 cmp DWORD PTR [rax+rcx], 0 + 00147 74 25 je SHORT $LN9@stbi__load + 00149 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_local + 0014e 8b c0 mov eax, eax + 00150 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 00155 65 48 8b 14 25 + 00156 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 0015e 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00162 8b 04 08 mov eax, DWORD PTR [rax+rcx] - 00165 89 85 24 01 00 + 0015f 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00163 8b 04 08 mov eax, DWORD PTR [rax+rcx] + 00166 89 85 24 01 00 00 mov DWORD PTR tv132[rbp], eax - 0016b eb 0c jmp SHORT $LN10@stbi__load + 0016c eb 0c jmp SHORT $LN10@stbi__load $LN9@stbi__load: - 0016d 8b 05 00 00 00 + 0016e 8b 05 00 00 00 00 mov eax, DWORD PTR stbi__vertically_flip_on_load_global - 00173 89 85 24 01 00 + 00174 89 85 24 01 00 00 mov DWORD PTR tv132[rbp], eax $LN10@stbi__load: - 00179 83 bd 24 01 00 + 0017a 83 bd 24 01 00 00 00 cmp DWORD PTR tv132[rbp], 0 - 00180 74 4f je SHORT $LN4@stbi__load + 00181 74 50 je SHORT $LN4@stbi__load ; 730 : int channels = req_comp ? req_comp : *comp; - 00182 83 bd 70 01 00 + 00183 83 bd 70 01 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 00189 74 0e je SHORT $LN11@stbi__load - 0018b 8b 85 70 01 00 + 0018a 74 0e je SHORT $LN11@stbi__load + 0018c 8b 85 70 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00191 89 85 24 01 00 + 00192 89 85 24 01 00 00 mov DWORD PTR tv135[rbp], eax - 00197 eb 0f jmp SHORT $LN12@stbi__load + 00198 eb 0f jmp SHORT $LN12@stbi__load $LN11@stbi__load: - 00199 48 8b 85 68 01 + 0019a 48 8b 85 68 01 00 00 mov rax, QWORD PTR comp$[rbp] - 001a0 8b 00 mov eax, DWORD PTR [rax] - 001a2 89 85 24 01 00 + 001a1 8b 00 mov eax, DWORD PTR [rax] + 001a3 89 85 24 01 00 00 mov DWORD PTR tv135[rbp], eax $LN12@stbi__load: - 001a8 8b 85 24 01 00 + 001a9 8b 85 24 01 00 00 mov eax, DWORD PTR tv135[rbp] - 001ae 89 45 54 mov DWORD PTR channels$4[rbp], eax + 001af 89 45 54 mov DWORD PTR channels$4[rbp], eax ; 731 : stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi_uc)); - 001b1 44 8b 4d 54 mov r9d, DWORD PTR channels$4[rbp] - 001b5 48 8b 85 60 01 + 001b2 44 8b 4d 54 mov r9d, DWORD PTR channels$4[rbp] + 001b6 48 8b 85 60 01 00 00 mov rax, QWORD PTR y$[rbp] - 001bc 44 8b 00 mov r8d, DWORD PTR [rax] - 001bf 48 8b 85 58 01 + 001bd 44 8b 00 mov r8d, DWORD PTR [rax] + 001c0 48 8b 85 58 01 00 00 mov rax, QWORD PTR x$[rbp] - 001c6 8b 10 mov edx, DWORD PTR [rax] - 001c8 48 8b 4d 38 mov rcx, QWORD PTR result$[rbp] - 001cc e8 00 00 00 00 call stbi__vertical_flip + 001c7 8b 10 mov edx, DWORD PTR [rax] + 001c9 48 8b 4d 38 mov rcx, QWORD PTR result$[rbp] + 001cd e8 00 00 00 00 call stbi__vertical_flip + 001d2 90 npad 1 $LN4@stbi__load: ; 732 : } ; 733 : ; 734 : return (unsigned char*)result; - 001d1 48 8b 45 38 mov rax, QWORD PTR result$[rbp] + 001d3 48 8b 45 38 mov rax, QWORD PTR result$[rbp] $LN1@stbi__load: ; 735 : } - 001d5 48 8b f8 mov rdi, rax - 001d8 48 8d 4d c0 lea rcx, QWORD PTR [rbp-64] - 001dc 48 8d 15 00 00 + 001d7 48 8b f8 mov rdi, rax + 001da 48 8d 4d c0 lea rcx, QWORD PTR [rbp-64] + 001de 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__load_and_postprocess_8bit$rtcFrameData - 001e3 e8 00 00 00 00 call _RTC_CheckStackVars - 001e8 48 8b c7 mov rax, rdi - 001eb 48 8b 8d 28 01 + 001e5 e8 00 00 00 00 call _RTC_CheckStackVars + 001ea 48 8b c7 mov rax, rdi + 001ed 48 8b 8d 28 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 001f2 48 33 cd xor rcx, rbp - 001f5 e8 00 00 00 00 call __security_check_cookie - 001fa 48 8d a5 38 01 + 001f4 48 33 cd xor rcx, rbp + 001f7 e8 00 00 00 00 call __security_check_cookie + 001fc 48 8d a5 38 01 00 00 lea rsp, QWORD PTR [rbp+312] - 00201 5f pop rdi - 00202 5d pop rbp - 00203 c3 ret 0 + 00203 5f pop rdi + 00204 5d pop rbp + 00205 c3 ret 0 stbi__load_and_postprocess_8bit ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -41984,71 +42237,73 @@ stbi__vertical_flip_slices PROC ; COMDAT 00021 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00028 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002d 90 npad 1 ; 700 : int slice; ; 701 : int slice_size = w * h * bytes_per_pixel; - 0002d 8b 85 48 01 00 + 0002e 8b 85 48 01 00 00 mov eax, DWORD PTR w$[rbp] - 00033 0f af 85 50 01 + 00034 0f af 85 50 01 00 00 imul eax, DWORD PTR h$[rbp] - 0003a 0f af 85 60 01 + 0003b 0f af 85 60 01 00 00 imul eax, DWORD PTR bytes_per_pixel$[rbp] - 00041 89 45 24 mov DWORD PTR slice_size$[rbp], eax + 00042 89 45 24 mov DWORD PTR slice_size$[rbp], eax ; 702 : ; 703 : stbi_uc* bytes = (stbi_uc*)image; - 00044 48 8b 85 40 01 + 00045 48 8b 85 40 01 00 00 mov rax, QWORD PTR image$[rbp] - 0004b 48 89 45 48 mov QWORD PTR bytes$[rbp], rax + 0004c 48 89 45 48 mov QWORD PTR bytes$[rbp], rax ; 704 : for (slice = 0; slice < z; ++slice) { - 0004f c7 45 04 00 00 + 00050 c7 45 04 00 00 00 00 mov DWORD PTR slice$[rbp], 0 - 00056 eb 08 jmp SHORT $LN4@stbi__vert + 00057 eb 08 jmp SHORT $LN4@stbi__vert $LN2@stbi__vert: - 00058 8b 45 04 mov eax, DWORD PTR slice$[rbp] - 0005b ff c0 inc eax - 0005d 89 45 04 mov DWORD PTR slice$[rbp], eax + 00059 8b 45 04 mov eax, DWORD PTR slice$[rbp] + 0005c ff c0 inc eax + 0005e 89 45 04 mov DWORD PTR slice$[rbp], eax $LN4@stbi__vert: - 00060 8b 85 58 01 00 + 00061 8b 85 58 01 00 00 mov eax, DWORD PTR z$[rbp] - 00066 39 45 04 cmp DWORD PTR slice$[rbp], eax - 00069 7d 31 jge SHORT $LN3@stbi__vert + 00067 39 45 04 cmp DWORD PTR slice$[rbp], eax + 0006a 7d 32 jge SHORT $LN3@stbi__vert ; 705 : stbi__vertical_flip(bytes, w, h, bytes_per_pixel); - 0006b 44 8b 8d 60 01 + 0006c 44 8b 8d 60 01 00 00 mov r9d, DWORD PTR bytes_per_pixel$[rbp] - 00072 44 8b 85 50 01 + 00073 44 8b 85 50 01 00 00 mov r8d, DWORD PTR h$[rbp] - 00079 8b 95 48 01 00 + 0007a 8b 95 48 01 00 00 mov edx, DWORD PTR w$[rbp] - 0007f 48 8b 4d 48 mov rcx, QWORD PTR bytes$[rbp] - 00083 e8 00 00 00 00 call stbi__vertical_flip + 00080 48 8b 4d 48 mov rcx, QWORD PTR bytes$[rbp] + 00084 e8 00 00 00 00 call stbi__vertical_flip + 00089 90 npad 1 ; 706 : bytes += slice_size; - 00088 48 63 45 24 movsxd rax, DWORD PTR slice_size$[rbp] - 0008c 48 8b 4d 48 mov rcx, QWORD PTR bytes$[rbp] - 00090 48 03 c8 add rcx, rax - 00093 48 8b c1 mov rax, rcx - 00096 48 89 45 48 mov QWORD PTR bytes$[rbp], rax + 0008a 48 63 45 24 movsxd rax, DWORD PTR slice_size$[rbp] + 0008e 48 8b 4d 48 mov rcx, QWORD PTR bytes$[rbp] + 00092 48 03 c8 add rcx, rax + 00095 48 8b c1 mov rax, rcx + 00098 48 89 45 48 mov QWORD PTR bytes$[rbp], rax ; 707 : } - 0009a eb bc jmp SHORT $LN2@stbi__vert + 0009c eb bb jmp SHORT $LN2@stbi__vert $LN3@stbi__vert: ; 708 : } - 0009c 48 8d a5 28 01 + 0009e 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 000a3 5f pop rdi - 000a4 5d pop rbp - 000a5 c3 ret 0 + 000a5 5f pop rdi + 000a6 5d pop rbp + 000a7 c3 ret 0 stbi__vertical_flip_slices ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -42096,193 +42351,197 @@ stbi__vertical_flip PROC ; COMDAT 0004b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00052 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00057 90 npad 1 ; 675 : int row; ; 676 : size_t bytes_per_row = (size_t)w * bytes_per_pixel; - 00057 48 63 85 f8 0c + 00058 48 63 85 f8 0c 00 00 movsxd rax, DWORD PTR w$[rbp] - 0005e 48 63 8d 08 0d + 0005f 48 63 8d 08 0d 00 00 movsxd rcx, DWORD PTR bytes_per_pixel$[rbp] - 00065 48 0f af c1 imul rax, rcx - 00069 48 89 45 28 mov QWORD PTR bytes_per_row$[rbp], rax + 00066 48 0f af c1 imul rax, rcx + 0006a 48 89 45 28 mov QWORD PTR bytes_per_row$[rbp], rax ; 677 : stbi_uc temp[2048]; ; 678 : stbi_uc* bytes = (stbi_uc*)image; - 0006d 48 8b 85 f0 0c + 0006e 48 8b 85 f0 0c 00 00 mov rax, QWORD PTR image$[rbp] - 00074 48 89 85 68 08 + 00075 48 89 85 68 08 00 00 mov QWORD PTR bytes$[rbp], rax ; 679 : ; 680 : for (row = 0; row < (h >> 1); row++) { - 0007b c7 45 04 00 00 + 0007c c7 45 04 00 00 00 00 mov DWORD PTR row$[rbp], 0 - 00082 eb 08 jmp SHORT $LN4@stbi__vert + 00083 eb 08 jmp SHORT $LN4@stbi__vert $LN2@stbi__vert: - 00084 8b 45 04 mov eax, DWORD PTR row$[rbp] - 00087 ff c0 inc eax - 00089 89 45 04 mov DWORD PTR row$[rbp], eax + 00085 8b 45 04 mov eax, DWORD PTR row$[rbp] + 00088 ff c0 inc eax + 0008a 89 45 04 mov DWORD PTR row$[rbp], eax $LN4@stbi__vert: - 0008c 8b 85 00 0d 00 + 0008d 8b 85 00 0d 00 00 mov eax, DWORD PTR h$[rbp] - 00092 d1 f8 sar eax, 1 - 00094 39 45 04 cmp DWORD PTR row$[rbp], eax - 00097 0f 8d 39 01 00 + 00093 d1 f8 sar eax, 1 + 00095 39 45 04 cmp DWORD PTR row$[rbp], eax + 00098 0f 8d 3c 01 00 00 jge $LN3@stbi__vert ; 681 : stbi_uc* row0 = bytes + row * bytes_per_row; - 0009d 48 63 45 04 movsxd rax, DWORD PTR row$[rbp] - 000a1 48 0f af 45 28 imul rax, QWORD PTR bytes_per_row$[rbp] - 000a6 48 8b 8d 68 08 + 0009e 48 63 45 04 movsxd rax, DWORD PTR row$[rbp] + 000a2 48 0f af 45 28 imul rax, QWORD PTR bytes_per_row$[rbp] + 000a7 48 8b 8d 68 08 00 00 mov rcx, QWORD PTR bytes$[rbp] - 000ad 48 03 c8 add rcx, rax - 000b0 48 8b c1 mov rax, rcx - 000b3 48 89 85 88 08 + 000ae 48 03 c8 add rcx, rax + 000b1 48 8b c1 mov rax, rcx + 000b4 48 89 85 88 08 00 00 mov QWORD PTR row0$4[rbp], rax ; 682 : stbi_uc* row1 = bytes + (h - row - 1) * bytes_per_row; - 000ba 8b 45 04 mov eax, DWORD PTR row$[rbp] - 000bd 8b 8d 00 0d 00 + 000bb 8b 45 04 mov eax, DWORD PTR row$[rbp] + 000be 8b 8d 00 0d 00 00 mov ecx, DWORD PTR h$[rbp] - 000c3 2b c8 sub ecx, eax - 000c5 8b c1 mov eax, ecx - 000c7 ff c8 dec eax - 000c9 48 98 cdqe - 000cb 48 0f af 45 28 imul rax, QWORD PTR bytes_per_row$[rbp] - 000d0 48 8b 8d 68 08 + 000c4 2b c8 sub ecx, eax + 000c6 8b c1 mov eax, ecx + 000c8 ff c8 dec eax + 000ca 48 98 cdqe + 000cc 48 0f af 45 28 imul rax, QWORD PTR bytes_per_row$[rbp] + 000d1 48 8b 8d 68 08 00 00 mov rcx, QWORD PTR bytes$[rbp] - 000d7 48 03 c8 add rcx, rax - 000da 48 8b c1 mov rax, rcx - 000dd 48 89 85 a8 08 + 000d8 48 03 c8 add rcx, rax + 000db 48 8b c1 mov rax, rcx + 000de 48 89 85 a8 08 00 00 mov QWORD PTR row1$5[rbp], rax ; 683 : // swap row0 with row1 ; 684 : size_t bytes_left = bytes_per_row; - 000e4 48 8b 45 28 mov rax, QWORD PTR bytes_per_row$[rbp] - 000e8 48 89 85 c8 08 + 000e5 48 8b 45 28 mov rax, QWORD PTR bytes_per_row$[rbp] + 000e9 48 89 85 c8 08 00 00 mov QWORD PTR bytes_left$6[rbp], rax $LN5@stbi__vert: ; 685 : while (bytes_left) { - 000ef 48 83 bd c8 08 + 000f0 48 83 bd c8 08 00 00 00 cmp QWORD PTR bytes_left$6[rbp], 0 - 000f7 0f 84 d4 00 00 + 000f8 0f 84 d7 00 00 00 je $LN6@stbi__vert ; 686 : size_t bytes_copy = (bytes_left < sizeof(temp)) ? bytes_left : sizeof(temp); - 000fd 48 81 bd c8 08 + 000fe 48 81 bd c8 08 00 00 00 08 00 00 cmp QWORD PTR bytes_left$6[rbp], 2048 ; 00000800H - 00108 73 10 jae SHORT $LN8@stbi__vert - 0010a 48 8b 85 c8 08 + 00109 73 10 jae SHORT $LN8@stbi__vert + 0010b 48 8b 85 c8 08 00 00 mov rax, QWORD PTR bytes_left$6[rbp] - 00111 48 89 85 b8 0c + 00112 48 89 85 b8 0c 00 00 mov QWORD PTR tv80[rbp], rax - 00118 eb 0b jmp SHORT $LN9@stbi__vert + 00119 eb 0b jmp SHORT $LN9@stbi__vert $LN8@stbi__vert: - 0011a 48 c7 85 b8 0c + 0011b 48 c7 85 b8 0c 00 00 00 08 00 00 mov QWORD PTR tv80[rbp], 2048 ; 00000800H $LN9@stbi__vert: - 00125 48 8b 85 b8 0c + 00126 48 8b 85 b8 0c 00 00 mov rax, QWORD PTR tv80[rbp] - 0012c 48 89 85 e8 08 + 0012d 48 89 85 e8 08 00 00 mov QWORD PTR bytes_copy$7[rbp], rax ; 687 : memcpy(temp, row0, bytes_copy); - 00133 4c 8b 85 e8 08 + 00134 4c 8b 85 e8 08 00 00 mov r8, QWORD PTR bytes_copy$7[rbp] - 0013a 48 8b 95 88 08 + 0013b 48 8b 95 88 08 00 00 mov rdx, QWORD PTR row0$4[rbp] - 00141 48 8d 4d 50 lea rcx, QWORD PTR temp$[rbp] - 00145 e8 00 00 00 00 call memcpy + 00142 48 8d 4d 50 lea rcx, QWORD PTR temp$[rbp] + 00146 e8 00 00 00 00 call memcpy + 0014b 90 npad 1 ; 688 : memcpy(row0, row1, bytes_copy); - 0014a 4c 8b 85 e8 08 + 0014c 4c 8b 85 e8 08 00 00 mov r8, QWORD PTR bytes_copy$7[rbp] - 00151 48 8b 95 a8 08 + 00153 48 8b 95 a8 08 00 00 mov rdx, QWORD PTR row1$5[rbp] - 00158 48 8b 8d 88 08 + 0015a 48 8b 8d 88 08 00 00 mov rcx, QWORD PTR row0$4[rbp] - 0015f e8 00 00 00 00 call memcpy + 00161 e8 00 00 00 00 call memcpy + 00166 90 npad 1 ; 689 : memcpy(row1, temp, bytes_copy); - 00164 4c 8b 85 e8 08 + 00167 4c 8b 85 e8 08 00 00 mov r8, QWORD PTR bytes_copy$7[rbp] - 0016b 48 8d 55 50 lea rdx, QWORD PTR temp$[rbp] - 0016f 48 8b 8d a8 08 + 0016e 48 8d 55 50 lea rdx, QWORD PTR temp$[rbp] + 00172 48 8b 8d a8 08 00 00 mov rcx, QWORD PTR row1$5[rbp] - 00176 e8 00 00 00 00 call memcpy + 00179 e8 00 00 00 00 call memcpy + 0017e 90 npad 1 ; 690 : row0 += bytes_copy; - 0017b 48 8b 85 e8 08 + 0017f 48 8b 85 e8 08 00 00 mov rax, QWORD PTR bytes_copy$7[rbp] - 00182 48 8b 8d 88 08 + 00186 48 8b 8d 88 08 00 00 mov rcx, QWORD PTR row0$4[rbp] - 00189 48 03 c8 add rcx, rax - 0018c 48 8b c1 mov rax, rcx - 0018f 48 89 85 88 08 + 0018d 48 03 c8 add rcx, rax + 00190 48 8b c1 mov rax, rcx + 00193 48 89 85 88 08 00 00 mov QWORD PTR row0$4[rbp], rax ; 691 : row1 += bytes_copy; - 00196 48 8b 85 e8 08 + 0019a 48 8b 85 e8 08 00 00 mov rax, QWORD PTR bytes_copy$7[rbp] - 0019d 48 8b 8d a8 08 + 001a1 48 8b 8d a8 08 00 00 mov rcx, QWORD PTR row1$5[rbp] - 001a4 48 03 c8 add rcx, rax - 001a7 48 8b c1 mov rax, rcx - 001aa 48 89 85 a8 08 + 001a8 48 03 c8 add rcx, rax + 001ab 48 8b c1 mov rax, rcx + 001ae 48 89 85 a8 08 00 00 mov QWORD PTR row1$5[rbp], rax ; 692 : bytes_left -= bytes_copy; - 001b1 48 8b 85 e8 08 + 001b5 48 8b 85 e8 08 00 00 mov rax, QWORD PTR bytes_copy$7[rbp] - 001b8 48 8b 8d c8 08 + 001bc 48 8b 8d c8 08 00 00 mov rcx, QWORD PTR bytes_left$6[rbp] - 001bf 48 2b c8 sub rcx, rax - 001c2 48 8b c1 mov rax, rcx - 001c5 48 89 85 c8 08 + 001c3 48 2b c8 sub rcx, rax + 001c6 48 8b c1 mov rax, rcx + 001c9 48 89 85 c8 08 00 00 mov QWORD PTR bytes_left$6[rbp], rax ; 693 : } - 001cc e9 1e ff ff ff jmp $LN5@stbi__vert + 001d0 e9 1b ff ff ff jmp $LN5@stbi__vert $LN6@stbi__vert: ; 694 : } - 001d1 e9 ae fe ff ff jmp $LN2@stbi__vert + 001d5 e9 ab fe ff ff jmp $LN2@stbi__vert $LN3@stbi__vert: ; 695 : } - 001d6 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 001da 48 8d 15 00 00 + 001da 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 001de 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__vertical_flip$rtcFrameData - 001e1 e8 00 00 00 00 call _RTC_CheckStackVars - 001e6 48 8b 8d c0 0c + 001e5 e8 00 00 00 00 call _RTC_CheckStackVars + 001ea 48 8b 8d c0 0c 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 001ed 48 33 cd xor rcx, rbp - 001f0 e8 00 00 00 00 call __security_check_cookie - 001f5 48 8d a5 d8 0c + 001f1 48 33 cd xor rcx, rbp + 001f4 e8 00 00 00 00 call __security_check_cookie + 001f9 48 8d a5 d8 0c 00 00 lea rsp, QWORD PTR [rbp+3288] - 001fc 5f pop rdi - 001fd 5d pop rbp - 001fe c3 ret 0 + 00200 5f pop rdi + 00201 5d pop rbp + 00202 c3 ret 0 stbi__vertical_flip ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -42313,105 +42572,107 @@ stbi__convert_8_to_16 PROC ; COMDAT 00021 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00028 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002d 90 npad 1 ; 659 : int i; ; 660 : int img_len = w * h * channels; - 0002d 8b 85 48 01 00 + 0002e 8b 85 48 01 00 00 mov eax, DWORD PTR w$[rbp] - 00033 0f af 85 50 01 + 00034 0f af 85 50 01 00 00 imul eax, DWORD PTR h$[rbp] - 0003a 0f af 85 58 01 + 0003b 0f af 85 58 01 00 00 imul eax, DWORD PTR channels$[rbp] - 00041 89 45 24 mov DWORD PTR img_len$[rbp], eax + 00042 89 45 24 mov DWORD PTR img_len$[rbp], eax ; 661 : stbi__uint16* enlarged; ; 662 : ; 663 : enlarged = (stbi__uint16*)stbi__malloc(img_len * 2); - 00044 8b 45 24 mov eax, DWORD PTR img_len$[rbp] - 00047 d1 e0 shl eax, 1 - 00049 48 98 cdqe - 0004b 48 8b c8 mov rcx, rax - 0004e e8 00 00 00 00 call stbi__malloc - 00053 48 89 45 48 mov QWORD PTR enlarged$[rbp], rax + 00045 8b 45 24 mov eax, DWORD PTR img_len$[rbp] + 00048 d1 e0 shl eax, 1 + 0004a 48 98 cdqe + 0004c 48 8b c8 mov rcx, rax + 0004f e8 00 00 00 00 call stbi__malloc + 00054 48 89 45 48 mov QWORD PTR enlarged$[rbp], rax ; 664 : if (enlarged == NULL) return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); - 00057 48 83 7d 48 00 cmp QWORD PTR enlarged$[rbp], 0 - 0005c 75 31 jne SHORT $LN5@stbi__conv - 0005e 48 8d 0d 00 00 + 00058 48 83 7d 48 00 cmp QWORD PTR enlarged$[rbp], 0 + 0005d 75 31 jne SHORT $LN5@stbi__conv + 0005f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 00065 e8 00 00 00 00 call stbi__err - 0006a 85 c0 test eax, eax - 0006c 74 0d je SHORT $LN7@stbi__conv - 0006e 48 c7 85 18 01 + 00066 e8 00 00 00 00 call stbi__err + 0006b 85 c0 test eax, eax + 0006d 74 0d je SHORT $LN7@stbi__conv + 0006f 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv74[rbp], 0 - 00079 eb 0b jmp SHORT $LN8@stbi__conv + 0007a eb 0b jmp SHORT $LN8@stbi__conv $LN7@stbi__conv: - 0007b 48 c7 85 18 01 + 0007c 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv74[rbp], 0 $LN8@stbi__conv: - 00086 48 8b 85 18 01 + 00087 48 8b 85 18 01 00 00 mov rax, QWORD PTR tv74[rbp] - 0008d eb 5b jmp SHORT $LN1@stbi__conv + 0008e eb 5c jmp SHORT $LN1@stbi__conv $LN5@stbi__conv: ; 665 : ; 666 : for (i = 0; i < img_len; ++i) - 0008f c7 45 04 00 00 + 00090 c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00096 eb 08 jmp SHORT $LN4@stbi__conv + 00097 eb 08 jmp SHORT $LN4@stbi__conv $LN2@stbi__conv: - 00098 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0009b ff c0 inc eax - 0009d 89 45 04 mov DWORD PTR i$[rbp], eax + 00099 8b 45 04 mov eax, DWORD PTR i$[rbp] + 0009c ff c0 inc eax + 0009e 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__conv: - 000a0 8b 45 24 mov eax, DWORD PTR img_len$[rbp] - 000a3 39 45 04 cmp DWORD PTR i$[rbp], eax - 000a6 7d 31 jge SHORT $LN3@stbi__conv + 000a1 8b 45 24 mov eax, DWORD PTR img_len$[rbp] + 000a4 39 45 04 cmp DWORD PTR i$[rbp], eax + 000a7 7d 31 jge SHORT $LN3@stbi__conv ; 667 : enlarged[i] = (stbi__uint16)((orig[i] << 8) + orig[i]); // replicate to high and low byte, maps 0->0, 255->0xffff - 000a8 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 000ac 48 8b 8d 40 01 + 000a9 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 000ad 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR orig$[rbp] - 000b3 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 000b7 c1 e0 08 shl eax, 8 - 000ba 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 000be 48 8b 95 40 01 + 000b4 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 000b8 c1 e0 08 shl eax, 8 + 000bb 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 000bf 48 8b 95 40 01 00 00 mov rdx, QWORD PTR orig$[rbp] - 000c5 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] - 000c9 03 c1 add eax, ecx - 000cb 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 000cf 48 8b 55 48 mov rdx, QWORD PTR enlarged$[rbp] - 000d3 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax - 000d7 eb bf jmp SHORT $LN2@stbi__conv + 000c6 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+rcx] + 000ca 03 c1 add eax, ecx + 000cc 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 000d0 48 8b 55 48 mov rdx, QWORD PTR enlarged$[rbp] + 000d4 66 89 04 4a mov WORD PTR [rdx+rcx*2], ax + 000d8 eb bf jmp SHORT $LN2@stbi__conv $LN3@stbi__conv: ; 668 : ; 669 : STBI_FREE(orig); - 000d9 48 8b 8d 40 01 + 000da 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR orig$[rbp] - 000e0 ff 15 00 00 00 + 000e1 ff 15 00 00 00 00 call QWORD PTR __imp_free + 000e7 90 npad 1 ; 670 : return enlarged; - 000e6 48 8b 45 48 mov rax, QWORD PTR enlarged$[rbp] + 000e8 48 8b 45 48 mov rax, QWORD PTR enlarged$[rbp] $LN1@stbi__conv: ; 671 : } - 000ea 48 8d a5 28 01 + 000ec 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 000f1 5f pop rdi - 000f2 5d pop rbp - 000f3 c3 ret 0 + 000f3 5f pop rdi + 000f4 5d pop rbp + 000f5 c3 ret 0 stbi__convert_8_to_16 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -42442,99 +42703,101 @@ stbi__convert_16_to_8 PROC ; COMDAT 00021 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00028 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002d 90 npad 1 ; 643 : int i; ; 644 : int img_len = w * h * channels; - 0002d 8b 85 48 01 00 + 0002e 8b 85 48 01 00 00 mov eax, DWORD PTR w$[rbp] - 00033 0f af 85 50 01 + 00034 0f af 85 50 01 00 00 imul eax, DWORD PTR h$[rbp] - 0003a 0f af 85 58 01 + 0003b 0f af 85 58 01 00 00 imul eax, DWORD PTR channels$[rbp] - 00041 89 45 24 mov DWORD PTR img_len$[rbp], eax + 00042 89 45 24 mov DWORD PTR img_len$[rbp], eax ; 645 : stbi_uc* reduced; ; 646 : ; 647 : reduced = (stbi_uc*)stbi__malloc(img_len); - 00044 48 63 45 24 movsxd rax, DWORD PTR img_len$[rbp] - 00048 48 8b c8 mov rcx, rax - 0004b e8 00 00 00 00 call stbi__malloc - 00050 48 89 45 48 mov QWORD PTR reduced$[rbp], rax + 00045 48 63 45 24 movsxd rax, DWORD PTR img_len$[rbp] + 00049 48 8b c8 mov rcx, rax + 0004c e8 00 00 00 00 call stbi__malloc + 00051 48 89 45 48 mov QWORD PTR reduced$[rbp], rax ; 648 : if (reduced == NULL) return stbi__errpuc("outofmem", "Out of memory"); - 00054 48 83 7d 48 00 cmp QWORD PTR reduced$[rbp], 0 - 00059 75 31 jne SHORT $LN5@stbi__conv - 0005b 48 8d 0d 00 00 + 00055 48 83 7d 48 00 cmp QWORD PTR reduced$[rbp], 0 + 0005a 75 31 jne SHORT $LN5@stbi__conv + 0005c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 00062 e8 00 00 00 00 call stbi__err - 00067 85 c0 test eax, eax - 00069 74 0d je SHORT $LN7@stbi__conv - 0006b 48 c7 85 18 01 + 00063 e8 00 00 00 00 call stbi__err + 00068 85 c0 test eax, eax + 0006a 74 0d je SHORT $LN7@stbi__conv + 0006c 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv73[rbp], 0 - 00076 eb 0b jmp SHORT $LN8@stbi__conv + 00077 eb 0b jmp SHORT $LN8@stbi__conv $LN7@stbi__conv: - 00078 48 c7 85 18 01 + 00079 48 c7 85 18 01 00 00 00 00 00 00 mov QWORD PTR tv73[rbp], 0 $LN8@stbi__conv: - 00083 48 8b 85 18 01 + 00084 48 8b 85 18 01 00 00 mov rax, QWORD PTR tv73[rbp] - 0008a eb 4e jmp SHORT $LN1@stbi__conv + 0008b eb 4f jmp SHORT $LN1@stbi__conv $LN5@stbi__conv: ; 649 : ; 650 : for (i = 0; i < img_len; ++i) - 0008c c7 45 04 00 00 + 0008d c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00093 eb 08 jmp SHORT $LN4@stbi__conv + 00094 eb 08 jmp SHORT $LN4@stbi__conv $LN2@stbi__conv: - 00095 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00098 ff c0 inc eax - 0009a 89 45 04 mov DWORD PTR i$[rbp], eax + 00096 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00099 ff c0 inc eax + 0009b 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__conv: - 0009d 8b 45 24 mov eax, DWORD PTR img_len$[rbp] - 000a0 39 45 04 cmp DWORD PTR i$[rbp], eax - 000a3 7d 24 jge SHORT $LN3@stbi__conv + 0009e 8b 45 24 mov eax, DWORD PTR img_len$[rbp] + 000a1 39 45 04 cmp DWORD PTR i$[rbp], eax + 000a4 7d 24 jge SHORT $LN3@stbi__conv ; 651 : reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is sufficient approx of 16->8 bit scaling - 000a5 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] - 000a9 48 8b 8d 40 01 + 000a6 48 63 45 04 movsxd rax, DWORD PTR i$[rbp] + 000aa 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR orig$[rbp] - 000b0 0f b7 04 41 movzx eax, WORD PTR [rcx+rax*2] - 000b4 c1 f8 08 sar eax, 8 - 000b7 25 ff 00 00 00 and eax, 255 ; 000000ffH - 000bc 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] - 000c0 48 8b 55 48 mov rdx, QWORD PTR reduced$[rbp] - 000c4 88 04 0a mov BYTE PTR [rdx+rcx], al - 000c7 eb cc jmp SHORT $LN2@stbi__conv + 000b1 0f b7 04 41 movzx eax, WORD PTR [rcx+rax*2] + 000b5 c1 f8 08 sar eax, 8 + 000b8 25 ff 00 00 00 and eax, 255 ; 000000ffH + 000bd 48 63 4d 04 movsxd rcx, DWORD PTR i$[rbp] + 000c1 48 8b 55 48 mov rdx, QWORD PTR reduced$[rbp] + 000c5 88 04 0a mov BYTE PTR [rdx+rcx], al + 000c8 eb cc jmp SHORT $LN2@stbi__conv $LN3@stbi__conv: ; 652 : ; 653 : STBI_FREE(orig); - 000c9 48 8b 8d 40 01 + 000ca 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR orig$[rbp] - 000d0 ff 15 00 00 00 + 000d1 ff 15 00 00 00 00 call QWORD PTR __imp_free + 000d7 90 npad 1 ; 654 : return reduced; - 000d6 48 8b 45 48 mov rax, QWORD PTR reduced$[rbp] + 000d8 48 8b 45 48 mov rax, QWORD PTR reduced$[rbp] $LN1@stbi__conv: ; 655 : } - 000da 48 8d a5 28 01 + 000dc 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 000e1 5f pop rdi - 000e2 5d pop rbp - 000e3 c3 ret 0 + 000e3 5f pop rdi + 000e4 5d pop rbp + 000e5 c3 ret 0 stbi__convert_16_to_8 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -42567,35 +42830,37 @@ stbi__load_main PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 590 : memset(ri, 0, sizeof(*ri)); // make sure it's initialized if we add new fields - 0002e 41 b8 0c 00 00 + 0002f 41 b8 0c 00 00 00 mov r8d, 12 - 00034 33 d2 xor edx, edx - 00036 48 8b 8d 28 01 + 00035 33 d2 xor edx, edx + 00037 48 8b 8d 28 01 00 00 mov rcx, QWORD PTR ri$[rbp] - 0003d e8 00 00 00 00 call memset + 0003e e8 00 00 00 00 call memset + 00043 90 npad 1 ; 591 : ri->bits_per_channel = 8; // default is 8 so most paths don't have to be changed - 00042 48 8b 85 28 01 + 00044 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 00049 c7 00 08 00 00 + 0004b c7 00 08 00 00 00 mov DWORD PTR [rax], 8 ; 592 : ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order - 0004f 48 8b 85 28 01 + 00051 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 00056 c7 40 08 00 00 + 00058 c7 40 08 00 00 00 00 mov DWORD PTR [rax+8], 0 ; 593 : ri->num_channels = 0; - 0005d 48 8b 85 28 01 + 0005f 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 00064 c7 40 04 00 00 + 00066 c7 40 04 00 00 00 00 mov DWORD PTR [rax+4], 0 ; 594 : @@ -42604,111 +42869,111 @@ stbi__load_main PROC ; COMDAT ; 597 : #ifndef STBI_NO_PNG ; 598 : if (stbi__png_test(s)) return stbi__png_load(s, x, y, comp, req_comp, ri); - 0006b 48 8b 8d 00 01 + 0006d 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00072 e8 00 00 00 00 call stbi__png_test - 00077 85 c0 test eax, eax - 00079 74 3c je SHORT $LN2@stbi__load - 0007b 48 8b 85 28 01 + 00074 e8 00 00 00 00 call stbi__png_test + 00079 85 c0 test eax, eax + 0007b 74 3c je SHORT $LN2@stbi__load + 0007d 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 00082 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 00087 8b 85 20 01 00 + 00084 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 00089 8b 85 20 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 0008d 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00091 4c 8b 8d 18 01 + 0008f 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00093 4c 8b 8d 18 01 00 00 mov r9, QWORD PTR comp$[rbp] - 00098 4c 8b 85 10 01 + 0009a 4c 8b 85 10 01 00 00 mov r8, QWORD PTR y$[rbp] - 0009f 48 8b 95 08 01 + 000a1 48 8b 95 08 01 00 00 mov rdx, QWORD PTR x$[rbp] - 000a6 48 8b 8d 00 01 + 000a8 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000ad e8 00 00 00 00 call stbi__png_load - 000b2 e9 e4 02 00 00 jmp $LN1@stbi__load + 000af e8 00 00 00 00 call stbi__png_load + 000b4 e9 e4 02 00 00 jmp $LN1@stbi__load $LN2@stbi__load: ; 599 : #endif ; 600 : #ifndef STBI_NO_BMP ; 601 : if (stbi__bmp_test(s)) return stbi__bmp_load(s, x, y, comp, req_comp, ri); - 000b7 48 8b 8d 00 01 + 000b9 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000be e8 00 00 00 00 call stbi__bmp_test - 000c3 85 c0 test eax, eax - 000c5 74 3c je SHORT $LN3@stbi__load - 000c7 48 8b 85 28 01 + 000c0 e8 00 00 00 00 call stbi__bmp_test + 000c5 85 c0 test eax, eax + 000c7 74 3c je SHORT $LN3@stbi__load + 000c9 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 000ce 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 000d3 8b 85 20 01 00 + 000d0 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 000d5 8b 85 20 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 000d9 89 44 24 20 mov DWORD PTR [rsp+32], eax - 000dd 4c 8b 8d 18 01 + 000db 89 44 24 20 mov DWORD PTR [rsp+32], eax + 000df 4c 8b 8d 18 01 00 00 mov r9, QWORD PTR comp$[rbp] - 000e4 4c 8b 85 10 01 + 000e6 4c 8b 85 10 01 00 00 mov r8, QWORD PTR y$[rbp] - 000eb 48 8b 95 08 01 + 000ed 48 8b 95 08 01 00 00 mov rdx, QWORD PTR x$[rbp] - 000f2 48 8b 8d 00 01 + 000f4 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000f9 e8 00 00 00 00 call stbi__bmp_load - 000fe e9 98 02 00 00 jmp $LN1@stbi__load + 000fb e8 00 00 00 00 call stbi__bmp_load + 00100 e9 98 02 00 00 jmp $LN1@stbi__load $LN3@stbi__load: ; 602 : #endif ; 603 : #ifndef STBI_NO_GIF ; 604 : if (stbi__gif_test(s)) return stbi__gif_load(s, x, y, comp, req_comp, ri); - 00103 48 8b 8d 00 01 + 00105 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0010a e8 00 00 00 00 call stbi__gif_test - 0010f 85 c0 test eax, eax - 00111 74 3c je SHORT $LN4@stbi__load - 00113 48 8b 85 28 01 + 0010c e8 00 00 00 00 call stbi__gif_test + 00111 85 c0 test eax, eax + 00113 74 3c je SHORT $LN4@stbi__load + 00115 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 0011a 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 0011f 8b 85 20 01 00 + 0011c 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 00121 8b 85 20 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00125 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00129 4c 8b 8d 18 01 + 00127 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0012b 4c 8b 8d 18 01 00 00 mov r9, QWORD PTR comp$[rbp] - 00130 4c 8b 85 10 01 + 00132 4c 8b 85 10 01 00 00 mov r8, QWORD PTR y$[rbp] - 00137 48 8b 95 08 01 + 00139 48 8b 95 08 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0013e 48 8b 8d 00 01 + 00140 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00145 e8 00 00 00 00 call stbi__gif_load - 0014a e9 4c 02 00 00 jmp $LN1@stbi__load + 00147 e8 00 00 00 00 call stbi__gif_load + 0014c e9 4c 02 00 00 jmp $LN1@stbi__load $LN4@stbi__load: ; 605 : #endif ; 606 : #ifndef STBI_NO_PSD ; 607 : if (stbi__psd_test(s)) return stbi__psd_load(s, x, y, comp, req_comp, ri, bpc); - 0014f 48 8b 8d 00 01 + 00151 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00156 e8 00 00 00 00 call stbi__psd_test - 0015b 85 c0 test eax, eax - 0015d 74 46 je SHORT $LN5@stbi__load - 0015f 8b 85 30 01 00 + 00158 e8 00 00 00 00 call stbi__psd_test + 0015d 85 c0 test eax, eax + 0015f 74 46 je SHORT $LN5@stbi__load + 00161 8b 85 30 01 00 00 mov eax, DWORD PTR bpc$[rbp] - 00165 89 44 24 30 mov DWORD PTR [rsp+48], eax - 00169 48 8b 85 28 01 + 00167 89 44 24 30 mov DWORD PTR [rsp+48], eax + 0016b 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 00170 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 00175 8b 85 20 01 00 + 00172 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 00177 8b 85 20 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 0017b 89 44 24 20 mov DWORD PTR [rsp+32], eax - 0017f 4c 8b 8d 18 01 + 0017d 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00181 4c 8b 8d 18 01 00 00 mov r9, QWORD PTR comp$[rbp] - 00186 4c 8b 85 10 01 + 00188 4c 8b 85 10 01 00 00 mov r8, QWORD PTR y$[rbp] - 0018d 48 8b 95 08 01 + 0018f 48 8b 95 08 01 00 00 mov rdx, QWORD PTR x$[rbp] - 00194 48 8b 8d 00 01 + 00196 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0019b e8 00 00 00 00 call stbi__psd_load - 001a0 e9 f6 01 00 00 jmp $LN1@stbi__load + 0019d e8 00 00 00 00 call stbi__psd_load + 001a2 e9 f6 01 00 00 jmp $LN1@stbi__load $LN5@stbi__load: ; 608 : #else @@ -42717,27 +42982,27 @@ $LN5@stbi__load: ; 611 : #ifndef STBI_NO_PIC ; 612 : if (stbi__pic_test(s)) return stbi__pic_load(s, x, y, comp, req_comp, ri); - 001a5 48 8b 8d 00 01 + 001a7 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001ac e8 00 00 00 00 call stbi__pic_test - 001b1 85 c0 test eax, eax - 001b3 74 3c je SHORT $LN6@stbi__load - 001b5 48 8b 85 28 01 + 001ae e8 00 00 00 00 call stbi__pic_test + 001b3 85 c0 test eax, eax + 001b5 74 3c je SHORT $LN6@stbi__load + 001b7 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 001bc 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 001c1 8b 85 20 01 00 + 001be 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 001c3 8b 85 20 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 001c7 89 44 24 20 mov DWORD PTR [rsp+32], eax - 001cb 4c 8b 8d 18 01 + 001c9 89 44 24 20 mov DWORD PTR [rsp+32], eax + 001cd 4c 8b 8d 18 01 00 00 mov r9, QWORD PTR comp$[rbp] - 001d2 4c 8b 85 10 01 + 001d4 4c 8b 85 10 01 00 00 mov r8, QWORD PTR y$[rbp] - 001d9 48 8b 95 08 01 + 001db 48 8b 95 08 01 00 00 mov rdx, QWORD PTR x$[rbp] - 001e0 48 8b 8d 00 01 + 001e2 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001e7 e8 00 00 00 00 call stbi__pic_load - 001ec e9 aa 01 00 00 jmp $LN1@stbi__load + 001e9 e8 00 00 00 00 call stbi__pic_load + 001ee e9 aa 01 00 00 jmp $LN1@stbi__load $LN6@stbi__load: ; 613 : #endif @@ -42748,54 +43013,54 @@ $LN6@stbi__load: ; 618 : #ifndef STBI_NO_JPEG ; 619 : if (stbi__jpeg_test(s)) return stbi__jpeg_load(s, x, y, comp, req_comp, ri); - 001f1 48 8b 8d 00 01 + 001f3 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001f8 e8 00 00 00 00 call stbi__jpeg_test - 001fd 85 c0 test eax, eax - 001ff 74 3c je SHORT $LN7@stbi__load - 00201 48 8b 85 28 01 + 001fa e8 00 00 00 00 call stbi__jpeg_test + 001ff 85 c0 test eax, eax + 00201 74 3c je SHORT $LN7@stbi__load + 00203 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 00208 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 0020d 8b 85 20 01 00 + 0020a 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 0020f 8b 85 20 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00213 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00217 4c 8b 8d 18 01 + 00215 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00219 4c 8b 8d 18 01 00 00 mov r9, QWORD PTR comp$[rbp] - 0021e 4c 8b 85 10 01 + 00220 4c 8b 85 10 01 00 00 mov r8, QWORD PTR y$[rbp] - 00225 48 8b 95 08 01 + 00227 48 8b 95 08 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0022c 48 8b 8d 00 01 + 0022e 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00233 e8 00 00 00 00 call stbi__jpeg_load - 00238 e9 5e 01 00 00 jmp $LN1@stbi__load + 00235 e8 00 00 00 00 call stbi__jpeg_load + 0023a e9 5e 01 00 00 jmp $LN1@stbi__load $LN7@stbi__load: ; 620 : #endif ; 621 : #ifndef STBI_NO_PNM ; 622 : if (stbi__pnm_test(s)) return stbi__pnm_load(s, x, y, comp, req_comp, ri); - 0023d 48 8b 8d 00 01 + 0023f 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00244 e8 00 00 00 00 call stbi__pnm_test - 00249 85 c0 test eax, eax - 0024b 74 3c je SHORT $LN8@stbi__load - 0024d 48 8b 85 28 01 + 00246 e8 00 00 00 00 call stbi__pnm_test + 0024b 85 c0 test eax, eax + 0024d 74 3c je SHORT $LN8@stbi__load + 0024f 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 00254 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 00259 8b 85 20 01 00 + 00256 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 0025b 8b 85 20 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 0025f 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00263 4c 8b 8d 18 01 + 00261 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00265 4c 8b 8d 18 01 00 00 mov r9, QWORD PTR comp$[rbp] - 0026a 4c 8b 85 10 01 + 0026c 4c 8b 85 10 01 00 00 mov r8, QWORD PTR y$[rbp] - 00271 48 8b 95 08 01 + 00273 48 8b 95 08 01 00 00 mov rdx, QWORD PTR x$[rbp] - 00278 48 8b 8d 00 01 + 0027a 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0027f e8 00 00 00 00 call stbi__pnm_load - 00284 e9 12 01 00 00 jmp $LN1@stbi__load + 00281 e8 00 00 00 00 call stbi__pnm_load + 00286 e9 12 01 00 00 jmp $LN1@stbi__load $LN8@stbi__load: ; 623 : #endif @@ -42803,60 +43068,60 @@ $LN8@stbi__load: ; 625 : #ifndef STBI_NO_HDR ; 626 : if (stbi__hdr_test(s)) { - 00289 48 8b 8d 00 01 + 0028b 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00290 e8 00 00 00 00 call stbi__hdr_test - 00295 85 c0 test eax, eax - 00297 0f 84 86 00 00 + 00292 e8 00 00 00 00 call stbi__hdr_test + 00297 85 c0 test eax, eax + 00299 0f 84 86 00 00 00 je $LN9@stbi__load ; 627 : float* hdr = stbi__hdr_load(s, x, y, comp, req_comp, ri); - 0029d 48 8b 85 28 01 + 0029f 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 002a4 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 002a9 8b 85 20 01 00 + 002a6 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 002ab 8b 85 20 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 002af 89 44 24 20 mov DWORD PTR [rsp+32], eax - 002b3 4c 8b 8d 18 01 + 002b1 89 44 24 20 mov DWORD PTR [rsp+32], eax + 002b5 4c 8b 8d 18 01 00 00 mov r9, QWORD PTR comp$[rbp] - 002ba 4c 8b 85 10 01 + 002bc 4c 8b 85 10 01 00 00 mov r8, QWORD PTR y$[rbp] - 002c1 48 8b 95 08 01 + 002c3 48 8b 95 08 01 00 00 mov rdx, QWORD PTR x$[rbp] - 002c8 48 8b 8d 00 01 + 002ca 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 002cf e8 00 00 00 00 call stbi__hdr_load - 002d4 48 89 45 08 mov QWORD PTR hdr$1[rbp], rax + 002d1 e8 00 00 00 00 call stbi__hdr_load + 002d6 48 89 45 08 mov QWORD PTR hdr$1[rbp], rax ; 628 : return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp); - 002d8 83 bd 20 01 00 + 002da 83 bd 20 01 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 002df 74 0e je SHORT $LN12@stbi__load - 002e1 8b 85 20 01 00 + 002e1 74 0e je SHORT $LN12@stbi__load + 002e3 8b 85 20 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 002e7 89 85 d4 00 00 + 002e9 89 85 d4 00 00 00 mov DWORD PTR tv185[rbp], eax - 002ed eb 0f jmp SHORT $LN13@stbi__load + 002ef eb 0f jmp SHORT $LN13@stbi__load $LN12@stbi__load: - 002ef 48 8b 85 18 01 + 002f1 48 8b 85 18 01 00 00 mov rax, QWORD PTR comp$[rbp] - 002f6 8b 00 mov eax, DWORD PTR [rax] - 002f8 89 85 d4 00 00 + 002f8 8b 00 mov eax, DWORD PTR [rax] + 002fa 89 85 d4 00 00 00 mov DWORD PTR tv185[rbp], eax $LN13@stbi__load: - 002fe 44 8b 8d d4 00 + 00300 44 8b 8d d4 00 00 00 mov r9d, DWORD PTR tv185[rbp] - 00305 48 8b 85 10 01 + 00307 48 8b 85 10 01 00 00 mov rax, QWORD PTR y$[rbp] - 0030c 44 8b 00 mov r8d, DWORD PTR [rax] - 0030f 48 8b 85 08 01 + 0030e 44 8b 00 mov r8d, DWORD PTR [rax] + 00311 48 8b 85 08 01 00 00 mov rax, QWORD PTR x$[rbp] - 00316 8b 10 mov edx, DWORD PTR [rax] - 00318 48 8b 4d 08 mov rcx, QWORD PTR hdr$1[rbp] - 0031c e8 00 00 00 00 call stbi__hdr_to_ldr - 00321 eb 78 jmp SHORT $LN1@stbi__load + 00318 8b 10 mov edx, DWORD PTR [rax] + 0031a 48 8b 4d 08 mov rcx, QWORD PTR hdr$1[rbp] + 0031e e8 00 00 00 00 call stbi__hdr_to_ldr + 00323 eb 78 jmp SHORT $LN1@stbi__load $LN9@stbi__load: ; 629 : } @@ -42866,61 +43131,61 @@ $LN9@stbi__load: ; 633 : // test tga last because it's a crappy test! ; 634 : if (stbi__tga_test(s)) - 00323 48 8b 8d 00 01 + 00325 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0032a e8 00 00 00 00 call stbi__tga_test - 0032f 85 c0 test eax, eax - 00331 74 39 je SHORT $LN10@stbi__load + 0032c e8 00 00 00 00 call stbi__tga_test + 00331 85 c0 test eax, eax + 00333 74 39 je SHORT $LN10@stbi__load ; 635 : return stbi__tga_load(s, x, y, comp, req_comp, ri); - 00333 48 8b 85 28 01 + 00335 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 0033a 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 0033f 8b 85 20 01 00 + 0033c 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 00341 8b 85 20 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00345 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00349 4c 8b 8d 18 01 + 00347 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0034b 4c 8b 8d 18 01 00 00 mov r9, QWORD PTR comp$[rbp] - 00350 4c 8b 85 10 01 + 00352 4c 8b 85 10 01 00 00 mov r8, QWORD PTR y$[rbp] - 00357 48 8b 95 08 01 + 00359 48 8b 95 08 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0035e 48 8b 8d 00 01 + 00360 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00365 e8 00 00 00 00 call stbi__tga_load - 0036a eb 2f jmp SHORT $LN1@stbi__load + 00367 e8 00 00 00 00 call stbi__tga_load + 0036c eb 2f jmp SHORT $LN1@stbi__load $LN10@stbi__load: ; 636 : #endif ; 637 : ; 638 : return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt"); - 0036c 48 8d 0d 00 00 + 0036e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BD@CBEDEJPH@unknown?5image?5type@ - 00373 e8 00 00 00 00 call stbi__err - 00378 85 c0 test eax, eax - 0037a 74 0d je SHORT $LN14@stbi__load - 0037c 48 c7 85 d8 00 + 00375 e8 00 00 00 00 call stbi__err + 0037a 85 c0 test eax, eax + 0037c 74 0d je SHORT $LN14@stbi__load + 0037e 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv203[rbp], 0 - 00387 eb 0b jmp SHORT $LN15@stbi__load + 00389 eb 0b jmp SHORT $LN15@stbi__load $LN14@stbi__load: - 00389 48 c7 85 d8 00 + 0038b 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv203[rbp], 0 $LN15@stbi__load: - 00394 48 8b 85 d8 00 + 00396 48 8b 85 d8 00 00 00 mov rax, QWORD PTR tv203[rbp] $LN1@stbi__load: ; 639 : } - 0039b 48 8d a5 e8 00 + 0039d 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 003a2 5f pop rdi - 003a3 5d pop rbp - 003a4 c3 ret 0 + 003a4 5f pop rdi + 003a5 5d pop rbp + 003a6 c3 ret 0 stbi__load_main ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -42933,8 +43198,8 @@ n$ = 68 output$ = 104 z$1 = 132 z$2 = 164 -tv93 = 376 tv75 = 376 +tv93 = 376 data$ = 416 x$ = 424 y$ = 432 @@ -42955,266 +43220,269 @@ stbi__hdr_to_ldr PROC ; COMDAT 00021 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00028 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002d 90 npad 1 ; 1348 : int i, k, n; ; 1349 : stbi_uc* output; ; 1350 : if (!data) return NULL; - 0002d 48 83 bd a0 01 + 0002e 48 83 bd a0 01 00 00 00 cmp QWORD PTR data$[rbp], 0 - 00035 75 07 jne SHORT $LN8@stbi__hdr_ - 00037 33 c0 xor eax, eax - 00039 e9 3c 02 00 00 jmp $LN1@stbi__hdr_ + 00036 75 07 jne SHORT $LN8@stbi__hdr_ + 00038 33 c0 xor eax, eax + 0003a e9 3e 02 00 00 jmp $LN1@stbi__hdr_ $LN8@stbi__hdr_: ; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); - 0003e 45 33 c9 xor r9d, r9d - 00041 44 8b 85 b8 01 + 0003f 45 33 c9 xor r9d, r9d + 00042 44 8b 85 b8 01 00 00 mov r8d, DWORD PTR comp$[rbp] - 00048 8b 95 b0 01 00 + 00049 8b 95 b0 01 00 00 mov edx, DWORD PTR y$[rbp] - 0004e 8b 8d a8 01 00 + 0004f 8b 8d a8 01 00 00 mov ecx, DWORD PTR x$[rbp] - 00054 e8 00 00 00 00 call stbi__malloc_mad3 - 00059 48 89 45 68 mov QWORD PTR output$[rbp], rax + 00055 e8 00 00 00 00 call stbi__malloc_mad3 + 0005a 48 89 45 68 mov QWORD PTR output$[rbp], rax ; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } - 0005d 48 83 7d 68 00 cmp QWORD PTR output$[rbp], 0 - 00062 75 41 jne SHORT $LN9@stbi__hdr_ - 00064 48 8b 8d a0 01 + 0005e 48 83 7d 68 00 cmp QWORD PTR output$[rbp], 0 + 00063 75 42 jne SHORT $LN9@stbi__hdr_ + 00065 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR data$[rbp] - 0006b ff 15 00 00 00 + 0006c ff 15 00 00 00 00 call QWORD PTR __imp_free - 00071 48 8d 0d 00 00 + 00072 90 npad 1 + 00073 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 00078 e8 00 00 00 00 call stbi__err - 0007d 85 c0 test eax, eax - 0007f 74 0d je SHORT $LN18@stbi__hdr_ - 00081 48 c7 85 78 01 + 0007a e8 00 00 00 00 call stbi__err + 0007f 85 c0 test eax, eax + 00081 74 0d je SHORT $LN18@stbi__hdr_ + 00083 48 c7 85 78 01 00 00 00 00 00 00 mov QWORD PTR tv75[rbp], 0 - 0008c eb 0b jmp SHORT $LN19@stbi__hdr_ + 0008e eb 0b jmp SHORT $LN19@stbi__hdr_ $LN18@stbi__hdr_: - 0008e 48 c7 85 78 01 + 00090 48 c7 85 78 01 00 00 00 00 00 00 mov QWORD PTR tv75[rbp], 0 $LN19@stbi__hdr_: - 00099 48 8b 85 78 01 + 0009b 48 8b 85 78 01 00 00 mov rax, QWORD PTR tv75[rbp] - 000a0 e9 d5 01 00 00 jmp $LN1@stbi__hdr_ + 000a2 e9 d6 01 00 00 jmp $LN1@stbi__hdr_ $LN9@stbi__hdr_: ; 1353 : // compute number of non-alpha components ; 1354 : if (comp & 1) n = comp; else n = comp - 1; - 000a5 8b 85 b8 01 00 + 000a7 8b 85 b8 01 00 00 mov eax, DWORD PTR comp$[rbp] - 000ab 83 e0 01 and eax, 1 - 000ae 85 c0 test eax, eax - 000b0 74 0b je SHORT $LN10@stbi__hdr_ - 000b2 8b 85 b8 01 00 + 000ad 83 e0 01 and eax, 1 + 000b0 85 c0 test eax, eax + 000b2 74 0b je SHORT $LN10@stbi__hdr_ + 000b4 8b 85 b8 01 00 00 mov eax, DWORD PTR comp$[rbp] - 000b8 89 45 44 mov DWORD PTR n$[rbp], eax - 000bb eb 0b jmp SHORT $LN11@stbi__hdr_ + 000ba 89 45 44 mov DWORD PTR n$[rbp], eax + 000bd eb 0b jmp SHORT $LN11@stbi__hdr_ $LN10@stbi__hdr_: - 000bd 8b 85 b8 01 00 + 000bf 8b 85 b8 01 00 00 mov eax, DWORD PTR comp$[rbp] - 000c3 ff c8 dec eax - 000c5 89 45 44 mov DWORD PTR n$[rbp], eax + 000c5 ff c8 dec eax + 000c7 89 45 44 mov DWORD PTR n$[rbp], eax $LN11@stbi__hdr_: ; 1355 : for (i = 0; i < x * y; ++i) { - 000c8 c7 45 04 00 00 + 000ca c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 000cf eb 08 jmp SHORT $LN4@stbi__hdr_ + 000d1 eb 08 jmp SHORT $LN4@stbi__hdr_ $LN2@stbi__hdr_: - 000d1 8b 45 04 mov eax, DWORD PTR i$[rbp] - 000d4 ff c0 inc eax - 000d6 89 45 04 mov DWORD PTR i$[rbp], eax + 000d3 8b 45 04 mov eax, DWORD PTR i$[rbp] + 000d6 ff c0 inc eax + 000d8 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__hdr_: - 000d9 8b 85 a8 01 00 + 000db 8b 85 a8 01 00 00 mov eax, DWORD PTR x$[rbp] - 000df 0f af 85 b0 01 + 000e1 0f af 85 b0 01 00 00 imul eax, DWORD PTR y$[rbp] - 000e6 39 45 04 cmp DWORD PTR i$[rbp], eax - 000e9 0f 8d 7a 01 00 + 000e8 39 45 04 cmp DWORD PTR i$[rbp], eax + 000eb 0f 8d 7a 01 00 00 jge $LN3@stbi__hdr_ ; 1356 : for (k = 0; k < n; ++k) { - 000ef c7 45 24 00 00 + 000f1 c7 45 24 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 000f6 eb 08 jmp SHORT $LN7@stbi__hdr_ + 000f8 eb 08 jmp SHORT $LN7@stbi__hdr_ $LN5@stbi__hdr_: - 000f8 8b 45 24 mov eax, DWORD PTR k$[rbp] - 000fb ff c0 inc eax - 000fd 89 45 24 mov DWORD PTR k$[rbp], eax + 000fa 8b 45 24 mov eax, DWORD PTR k$[rbp] + 000fd ff c0 inc eax + 000ff 89 45 24 mov DWORD PTR k$[rbp], eax $LN7@stbi__hdr_: - 00100 8b 45 44 mov eax, DWORD PTR n$[rbp] - 00103 39 45 24 cmp DWORD PTR k$[rbp], eax - 00106 0f 8d bf 00 00 + 00102 8b 45 44 mov eax, DWORD PTR n$[rbp] + 00105 39 45 24 cmp DWORD PTR k$[rbp], eax + 00108 0f 8d bf 00 00 00 jge $LN6@stbi__hdr_ ; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; - 0010c f3 0f 5a 05 00 + 0010e f3 0f 5a 05 00 00 00 00 cvtss2sd xmm0, DWORD PTR stbi__h2l_gamma_i - 00114 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00117 0f af 85 b8 01 + 00116 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00119 0f af 85 b8 01 00 00 imul eax, DWORD PTR comp$[rbp] - 0011e 03 45 24 add eax, DWORD PTR k$[rbp] - 00121 48 98 cdqe - 00123 48 8b 8d a0 01 + 00120 03 45 24 add eax, DWORD PTR k$[rbp] + 00123 48 98 cdqe + 00125 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR data$[rbp] - 0012a f3 0f 10 0c 81 movss xmm1, DWORD PTR [rcx+rax*4] - 0012f f3 0f 59 0d 00 + 0012c f3 0f 10 0c 81 movss xmm1, DWORD PTR [rcx+rax*4] + 00131 f3 0f 59 0d 00 00 00 00 mulss xmm1, DWORD PTR stbi__h2l_scale_i - 00137 f3 0f 5a c9 cvtss2sd xmm1, xmm1 - 0013b f2 0f 11 8d 78 + 00139 f3 0f 5a c9 cvtss2sd xmm1, xmm1 + 0013d f2 0f 11 8d 78 01 00 00 movsd QWORD PTR tv93[rbp], xmm1 - 00143 0f 28 c8 movaps xmm1, xmm0 - 00146 f2 0f 10 85 78 + 00145 0f 28 c8 movaps xmm1, xmm0 + 00148 f2 0f 10 85 78 01 00 00 movsd xmm0, QWORD PTR tv93[rbp] - 0014e e8 00 00 00 00 call pow - 00153 f2 0f 5a c0 cvtsd2ss xmm0, xmm0 - 00157 f3 0f 59 05 00 + 00150 e8 00 00 00 00 call pow + 00155 f2 0f 5a c0 cvtsd2ss xmm0, xmm0 + 00159 f3 0f 59 05 00 00 00 00 mulss xmm0, DWORD PTR __real@437f0000 - 0015f f3 0f 58 05 00 + 00161 f3 0f 58 05 00 00 00 00 addss xmm0, DWORD PTR __real@3f000000 - 00167 f3 0f 11 85 84 + 00169 f3 0f 11 85 84 00 00 00 movss DWORD PTR z$1[rbp], xmm0 ; 1358 : if (z < 0) z = 0; - 0016f 0f 57 c0 xorps xmm0, xmm0 - 00172 0f 2f 85 84 00 + 00171 0f 57 c0 xorps xmm0, xmm0 + 00174 0f 2f 85 84 00 00 00 comiss xmm0, DWORD PTR z$1[rbp] - 00179 76 0b jbe SHORT $LN12@stbi__hdr_ - 0017b 0f 57 c0 xorps xmm0, xmm0 - 0017e f3 0f 11 85 84 + 0017b 76 0b jbe SHORT $LN12@stbi__hdr_ + 0017d 0f 57 c0 xorps xmm0, xmm0 + 00180 f3 0f 11 85 84 00 00 00 movss DWORD PTR z$1[rbp], xmm0 $LN12@stbi__hdr_: ; 1359 : if (z > 255) z = 255; - 00186 f3 0f 10 85 84 + 00188 f3 0f 10 85 84 00 00 00 movss xmm0, DWORD PTR z$1[rbp] - 0018e 0f 2f 05 00 00 + 00190 0f 2f 05 00 00 00 00 comiss xmm0, DWORD PTR __real@437f0000 - 00195 76 10 jbe SHORT $LN13@stbi__hdr_ - 00197 f3 0f 10 05 00 + 00197 76 10 jbe SHORT $LN13@stbi__hdr_ + 00199 f3 0f 10 05 00 00 00 00 movss xmm0, DWORD PTR __real@437f0000 - 0019f f3 0f 11 85 84 + 001a1 f3 0f 11 85 84 00 00 00 movss DWORD PTR z$1[rbp], xmm0 $LN13@stbi__hdr_: ; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); - 001a7 f3 0f 2c 85 84 + 001a9 f3 0f 2c 85 84 00 00 00 cvttss2si eax, DWORD PTR z$1[rbp] - 001af 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 001b2 0f af 8d b8 01 + 001b1 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 001b4 0f af 8d b8 01 00 00 imul ecx, DWORD PTR comp$[rbp] - 001b9 03 4d 24 add ecx, DWORD PTR k$[rbp] - 001bc 48 63 c9 movsxd rcx, ecx - 001bf 48 8b 55 68 mov rdx, QWORD PTR output$[rbp] - 001c3 88 04 0a mov BYTE PTR [rdx+rcx], al + 001bb 03 4d 24 add ecx, DWORD PTR k$[rbp] + 001be 48 63 c9 movsxd rcx, ecx + 001c1 48 8b 55 68 mov rdx, QWORD PTR output$[rbp] + 001c5 88 04 0a mov BYTE PTR [rdx+rcx], al ; 1361 : } - 001c6 e9 2d ff ff ff jmp $LN5@stbi__hdr_ + 001c8 e9 2d ff ff ff jmp $LN5@stbi__hdr_ $LN6@stbi__hdr_: ; 1362 : if (k < comp) { - 001cb 8b 85 b8 01 00 + 001cd 8b 85 b8 01 00 00 mov eax, DWORD PTR comp$[rbp] - 001d1 39 45 24 cmp DWORD PTR k$[rbp], eax - 001d4 0f 8d 8a 00 00 + 001d3 39 45 24 cmp DWORD PTR k$[rbp], eax + 001d6 0f 8d 8a 00 00 00 jge $LN14@stbi__hdr_ ; 1363 : float z = data[i * comp + k] * 255 + 0.5f; - 001da 8b 45 04 mov eax, DWORD PTR i$[rbp] - 001dd 0f af 85 b8 01 + 001dc 8b 45 04 mov eax, DWORD PTR i$[rbp] + 001df 0f af 85 b8 01 00 00 imul eax, DWORD PTR comp$[rbp] - 001e4 03 45 24 add eax, DWORD PTR k$[rbp] - 001e7 48 98 cdqe - 001e9 48 8b 8d a0 01 + 001e6 03 45 24 add eax, DWORD PTR k$[rbp] + 001e9 48 98 cdqe + 001eb 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR data$[rbp] - 001f0 f3 0f 10 04 81 movss xmm0, DWORD PTR [rcx+rax*4] - 001f5 f3 0f 59 05 00 + 001f2 f3 0f 10 04 81 movss xmm0, DWORD PTR [rcx+rax*4] + 001f7 f3 0f 59 05 00 00 00 00 mulss xmm0, DWORD PTR __real@437f0000 - 001fd f3 0f 58 05 00 + 001ff f3 0f 58 05 00 00 00 00 addss xmm0, DWORD PTR __real@3f000000 - 00205 f3 0f 11 85 a4 + 00207 f3 0f 11 85 a4 00 00 00 movss DWORD PTR z$2[rbp], xmm0 ; 1364 : if (z < 0) z = 0; - 0020d 0f 57 c0 xorps xmm0, xmm0 - 00210 0f 2f 85 a4 00 + 0020f 0f 57 c0 xorps xmm0, xmm0 + 00212 0f 2f 85 a4 00 00 00 comiss xmm0, DWORD PTR z$2[rbp] - 00217 76 0b jbe SHORT $LN15@stbi__hdr_ - 00219 0f 57 c0 xorps xmm0, xmm0 - 0021c f3 0f 11 85 a4 + 00219 76 0b jbe SHORT $LN15@stbi__hdr_ + 0021b 0f 57 c0 xorps xmm0, xmm0 + 0021e f3 0f 11 85 a4 00 00 00 movss DWORD PTR z$2[rbp], xmm0 $LN15@stbi__hdr_: ; 1365 : if (z > 255) z = 255; - 00224 f3 0f 10 85 a4 + 00226 f3 0f 10 85 a4 00 00 00 movss xmm0, DWORD PTR z$2[rbp] - 0022c 0f 2f 05 00 00 + 0022e 0f 2f 05 00 00 00 00 comiss xmm0, DWORD PTR __real@437f0000 - 00233 76 10 jbe SHORT $LN16@stbi__hdr_ - 00235 f3 0f 10 05 00 + 00235 76 10 jbe SHORT $LN16@stbi__hdr_ + 00237 f3 0f 10 05 00 00 00 00 movss xmm0, DWORD PTR __real@437f0000 - 0023d f3 0f 11 85 a4 + 0023f f3 0f 11 85 a4 00 00 00 movss DWORD PTR z$2[rbp], xmm0 $LN16@stbi__hdr_: ; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); - 00245 f3 0f 2c 85 a4 + 00247 f3 0f 2c 85 a4 00 00 00 cvttss2si eax, DWORD PTR z$2[rbp] - 0024d 8b 4d 04 mov ecx, DWORD PTR i$[rbp] - 00250 0f af 8d b8 01 + 0024f 8b 4d 04 mov ecx, DWORD PTR i$[rbp] + 00252 0f af 8d b8 01 00 00 imul ecx, DWORD PTR comp$[rbp] - 00257 03 4d 24 add ecx, DWORD PTR k$[rbp] - 0025a 48 63 c9 movsxd rcx, ecx - 0025d 48 8b 55 68 mov rdx, QWORD PTR output$[rbp] - 00261 88 04 0a mov BYTE PTR [rdx+rcx], al + 00259 03 4d 24 add ecx, DWORD PTR k$[rbp] + 0025c 48 63 c9 movsxd rcx, ecx + 0025f 48 8b 55 68 mov rdx, QWORD PTR output$[rbp] + 00263 88 04 0a mov BYTE PTR [rdx+rcx], al $LN14@stbi__hdr_: ; 1367 : } ; 1368 : } - 00264 e9 68 fe ff ff jmp $LN2@stbi__hdr_ + 00266 e9 68 fe ff ff jmp $LN2@stbi__hdr_ $LN3@stbi__hdr_: ; 1369 : STBI_FREE(data); - 00269 48 8b 8d a0 01 + 0026b 48 8b 8d a0 01 00 00 mov rcx, QWORD PTR data$[rbp] - 00270 ff 15 00 00 00 + 00272 ff 15 00 00 00 00 call QWORD PTR __imp_free + 00278 90 npad 1 ; 1370 : return output; - 00276 48 8b 45 68 mov rax, QWORD PTR output$[rbp] + 00279 48 8b 45 68 mov rax, QWORD PTR output$[rbp] $LN1@stbi__hdr_: ; 1371 : } - 0027a 48 8d a5 88 01 + 0027d 48 8d a5 88 01 00 00 lea rsp, QWORD PTR [rbp+392] - 00281 5f pop rdi - 00282 5d pop rbp - 00283 c3 ret 0 + 00284 5f pop rdi + 00285 5d pop rbp + 00286 c3 ret 0 stbi__hdr_to_ldr ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -43225,8 +43493,8 @@ i$ = 4 k$ = 36 n$ = 68 output$ = 104 -tv133 = 312 tv76 = 312 +tv133 = 312 data$ = 352 x$ = 360 y$ = 368 @@ -43247,240 +43515,243 @@ stbi__ldr_to_hdr PROC ; COMDAT 00021 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00028 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002d 90 npad 1 ; 1322 : int i, k, n; ; 1323 : float* output; ; 1324 : if (!data) return NULL; - 0002d 48 83 bd 60 01 + 0002e 48 83 bd 60 01 00 00 00 cmp QWORD PTR data$[rbp], 0 - 00035 75 07 jne SHORT $LN11@stbi__ldr_ - 00037 33 c0 xor eax, eax - 00039 e9 d0 01 00 00 jmp $LN1@stbi__ldr_ + 00036 75 07 jne SHORT $LN11@stbi__ldr_ + 00038 33 c0 xor eax, eax + 0003a e9 d2 01 00 00 jmp $LN1@stbi__ldr_ $LN11@stbi__ldr_: ; 1325 : output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0); - 0003e c7 44 24 20 00 + 0003f c7 44 24 20 00 00 00 00 mov DWORD PTR [rsp+32], 0 - 00046 41 b9 04 00 00 + 00047 41 b9 04 00 00 00 mov r9d, 4 - 0004c 44 8b 85 78 01 + 0004d 44 8b 85 78 01 00 00 mov r8d, DWORD PTR comp$[rbp] - 00053 8b 95 70 01 00 + 00054 8b 95 70 01 00 00 mov edx, DWORD PTR y$[rbp] - 00059 8b 8d 68 01 00 + 0005a 8b 8d 68 01 00 00 mov ecx, DWORD PTR x$[rbp] - 0005f e8 00 00 00 00 call stbi__malloc_mad4 - 00064 48 89 45 68 mov QWORD PTR output$[rbp], rax + 00060 e8 00 00 00 00 call stbi__malloc_mad4 + 00065 48 89 45 68 mov QWORD PTR output$[rbp], rax ; 1326 : if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } - 00068 48 83 7d 68 00 cmp QWORD PTR output$[rbp], 0 - 0006d 75 41 jne SHORT $LN12@stbi__ldr_ - 0006f 48 8b 8d 60 01 + 00069 48 83 7d 68 00 cmp QWORD PTR output$[rbp], 0 + 0006e 75 42 jne SHORT $LN12@stbi__ldr_ + 00070 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR data$[rbp] - 00076 ff 15 00 00 00 + 00077 ff 15 00 00 00 00 call QWORD PTR __imp_free - 0007c 48 8d 0d 00 00 + 0007d 90 npad 1 + 0007e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 00083 e8 00 00 00 00 call stbi__err - 00088 85 c0 test eax, eax - 0008a 74 0d je SHORT $LN17@stbi__ldr_ - 0008c 48 c7 85 38 01 + 00085 e8 00 00 00 00 call stbi__err + 0008a 85 c0 test eax, eax + 0008c 74 0d je SHORT $LN17@stbi__ldr_ + 0008e 48 c7 85 38 01 00 00 00 00 00 00 mov QWORD PTR tv76[rbp], 0 - 00097 eb 0b jmp SHORT $LN18@stbi__ldr_ + 00099 eb 0b jmp SHORT $LN18@stbi__ldr_ $LN17@stbi__ldr_: - 00099 48 c7 85 38 01 + 0009b 48 c7 85 38 01 00 00 00 00 00 00 mov QWORD PTR tv76[rbp], 0 $LN18@stbi__ldr_: - 000a4 48 8b 85 38 01 + 000a6 48 8b 85 38 01 00 00 mov rax, QWORD PTR tv76[rbp] - 000ab e9 5e 01 00 00 jmp $LN1@stbi__ldr_ + 000ad e9 5f 01 00 00 jmp $LN1@stbi__ldr_ $LN12@stbi__ldr_: ; 1327 : // compute number of non-alpha components ; 1328 : if (comp & 1) n = comp; else n = comp - 1; - 000b0 8b 85 78 01 00 + 000b2 8b 85 78 01 00 00 mov eax, DWORD PTR comp$[rbp] - 000b6 83 e0 01 and eax, 1 - 000b9 85 c0 test eax, eax - 000bb 74 0b je SHORT $LN13@stbi__ldr_ - 000bd 8b 85 78 01 00 + 000b8 83 e0 01 and eax, 1 + 000bb 85 c0 test eax, eax + 000bd 74 0b je SHORT $LN13@stbi__ldr_ + 000bf 8b 85 78 01 00 00 mov eax, DWORD PTR comp$[rbp] - 000c3 89 45 44 mov DWORD PTR n$[rbp], eax - 000c6 eb 0b jmp SHORT $LN14@stbi__ldr_ + 000c5 89 45 44 mov DWORD PTR n$[rbp], eax + 000c8 eb 0b jmp SHORT $LN14@stbi__ldr_ $LN13@stbi__ldr_: - 000c8 8b 85 78 01 00 + 000ca 8b 85 78 01 00 00 mov eax, DWORD PTR comp$[rbp] - 000ce ff c8 dec eax - 000d0 89 45 44 mov DWORD PTR n$[rbp], eax + 000d0 ff c8 dec eax + 000d2 89 45 44 mov DWORD PTR n$[rbp], eax $LN14@stbi__ldr_: ; 1329 : for (i = 0; i < x * y; ++i) { - 000d3 c7 45 04 00 00 + 000d5 c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 000da eb 08 jmp SHORT $LN4@stbi__ldr_ + 000dc eb 08 jmp SHORT $LN4@stbi__ldr_ $LN2@stbi__ldr_: - 000dc 8b 45 04 mov eax, DWORD PTR i$[rbp] - 000df ff c0 inc eax - 000e1 89 45 04 mov DWORD PTR i$[rbp], eax + 000de 8b 45 04 mov eax, DWORD PTR i$[rbp] + 000e1 ff c0 inc eax + 000e3 89 45 04 mov DWORD PTR i$[rbp], eax $LN4@stbi__ldr_: - 000e4 8b 85 68 01 00 + 000e6 8b 85 68 01 00 00 mov eax, DWORD PTR x$[rbp] - 000ea 0f af 85 70 01 + 000ec 0f af 85 70 01 00 00 imul eax, DWORD PTR y$[rbp] - 000f1 39 45 04 cmp DWORD PTR i$[rbp], eax - 000f4 0f 8d 95 00 00 + 000f3 39 45 04 cmp DWORD PTR i$[rbp], eax + 000f6 0f 8d 95 00 00 00 jge $LN3@stbi__ldr_ ; 1330 : for (k = 0; k < n; ++k) { - 000fa c7 45 24 00 00 + 000fc c7 45 24 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 00101 eb 08 jmp SHORT $LN7@stbi__ldr_ + 00103 eb 08 jmp SHORT $LN7@stbi__ldr_ $LN5@stbi__ldr_: - 00103 8b 45 24 mov eax, DWORD PTR k$[rbp] - 00106 ff c0 inc eax - 00108 89 45 24 mov DWORD PTR k$[rbp], eax + 00105 8b 45 24 mov eax, DWORD PTR k$[rbp] + 00108 ff c0 inc eax + 0010a 89 45 24 mov DWORD PTR k$[rbp], eax $LN7@stbi__ldr_: - 0010b 8b 45 44 mov eax, DWORD PTR n$[rbp] - 0010e 39 45 24 cmp DWORD PTR k$[rbp], eax - 00111 7d 77 jge SHORT $LN6@stbi__ldr_ + 0010d 8b 45 44 mov eax, DWORD PTR n$[rbp] + 00110 39 45 24 cmp DWORD PTR k$[rbp], eax + 00113 7d 77 jge SHORT $LN6@stbi__ldr_ ; 1331 : output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale); - 00113 f3 0f 5a 05 00 + 00115 f3 0f 5a 05 00 00 00 00 cvtss2sd xmm0, DWORD PTR stbi__l2h_gamma - 0011b 8b 45 04 mov eax, DWORD PTR i$[rbp] - 0011e 0f af 85 78 01 + 0011d 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00120 0f af 85 78 01 00 00 imul eax, DWORD PTR comp$[rbp] - 00125 03 45 24 add eax, DWORD PTR k$[rbp] - 00128 48 98 cdqe - 0012a 48 8b 8d 60 01 + 00127 03 45 24 add eax, DWORD PTR k$[rbp] + 0012a 48 98 cdqe + 0012c 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR data$[rbp] - 00131 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00135 f3 0f 2a c8 cvtsi2ss xmm1, eax - 00139 f3 0f 5e 0d 00 + 00133 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00137 f3 0f 2a c8 cvtsi2ss xmm1, eax + 0013b f3 0f 5e 0d 00 00 00 00 divss xmm1, DWORD PTR __real@437f0000 - 00141 f3 0f 5a c9 cvtss2sd xmm1, xmm1 - 00145 f2 0f 11 8d 38 + 00143 f3 0f 5a c9 cvtss2sd xmm1, xmm1 + 00147 f2 0f 11 8d 38 01 00 00 movsd QWORD PTR tv133[rbp], xmm1 - 0014d 0f 28 c8 movaps xmm1, xmm0 - 00150 f2 0f 10 85 38 + 0014f 0f 28 c8 movaps xmm1, xmm0 + 00152 f2 0f 10 85 38 01 00 00 movsd xmm0, QWORD PTR tv133[rbp] - 00158 e8 00 00 00 00 call pow - 0015d f3 0f 5a 0d 00 + 0015a e8 00 00 00 00 call pow + 0015f f3 0f 5a 0d 00 00 00 00 cvtss2sd xmm1, DWORD PTR stbi__l2h_scale - 00165 f2 0f 59 c1 mulsd xmm0, xmm1 - 00169 f2 0f 5a c0 cvtsd2ss xmm0, xmm0 - 0016d 8b 45 04 mov eax, DWORD PTR i$[rbp] - 00170 0f af 85 78 01 + 00167 f2 0f 59 c1 mulsd xmm0, xmm1 + 0016b f2 0f 5a c0 cvtsd2ss xmm0, xmm0 + 0016f 8b 45 04 mov eax, DWORD PTR i$[rbp] + 00172 0f af 85 78 01 00 00 imul eax, DWORD PTR comp$[rbp] - 00177 03 45 24 add eax, DWORD PTR k$[rbp] - 0017a 48 98 cdqe - 0017c 48 8b 4d 68 mov rcx, QWORD PTR output$[rbp] - 00180 f3 0f 11 04 81 movss DWORD PTR [rcx+rax*4], xmm0 + 00179 03 45 24 add eax, DWORD PTR k$[rbp] + 0017c 48 98 cdqe + 0017e 48 8b 4d 68 mov rcx, QWORD PTR output$[rbp] + 00182 f3 0f 11 04 81 movss DWORD PTR [rcx+rax*4], xmm0 ; 1332 : } - 00185 e9 79 ff ff ff jmp $LN5@stbi__ldr_ + 00187 e9 79 ff ff ff jmp $LN5@stbi__ldr_ $LN6@stbi__ldr_: ; 1333 : } - 0018a e9 4d ff ff ff jmp $LN2@stbi__ldr_ + 0018c e9 4d ff ff ff jmp $LN2@stbi__ldr_ $LN3@stbi__ldr_: ; 1334 : if (n < comp) { - 0018f 8b 85 78 01 00 + 00191 8b 85 78 01 00 00 mov eax, DWORD PTR comp$[rbp] - 00195 39 45 44 cmp DWORD PTR n$[rbp], eax - 00198 7d 63 jge SHORT $LN15@stbi__ldr_ + 00197 39 45 44 cmp DWORD PTR n$[rbp], eax + 0019a 7d 63 jge SHORT $LN15@stbi__ldr_ ; 1335 : for (i = 0; i < x * y; ++i) { - 0019a c7 45 04 00 00 + 0019c c7 45 04 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 001a1 eb 08 jmp SHORT $LN10@stbi__ldr_ + 001a3 eb 08 jmp SHORT $LN10@stbi__ldr_ $LN8@stbi__ldr_: - 001a3 8b 45 04 mov eax, DWORD PTR i$[rbp] - 001a6 ff c0 inc eax - 001a8 89 45 04 mov DWORD PTR i$[rbp], eax + 001a5 8b 45 04 mov eax, DWORD PTR i$[rbp] + 001a8 ff c0 inc eax + 001aa 89 45 04 mov DWORD PTR i$[rbp], eax $LN10@stbi__ldr_: - 001ab 8b 85 68 01 00 + 001ad 8b 85 68 01 00 00 mov eax, DWORD PTR x$[rbp] - 001b1 0f af 85 70 01 + 001b3 0f af 85 70 01 00 00 imul eax, DWORD PTR y$[rbp] - 001b8 39 45 04 cmp DWORD PTR i$[rbp], eax - 001bb 7d 40 jge SHORT $LN9@stbi__ldr_ + 001ba 39 45 04 cmp DWORD PTR i$[rbp], eax + 001bd 7d 40 jge SHORT $LN9@stbi__ldr_ ; 1336 : output[i * comp + n] = data[i * comp + n] / 255.0f; - 001bd 8b 45 04 mov eax, DWORD PTR i$[rbp] - 001c0 0f af 85 78 01 + 001bf 8b 45 04 mov eax, DWORD PTR i$[rbp] + 001c2 0f af 85 78 01 00 00 imul eax, DWORD PTR comp$[rbp] - 001c7 03 45 44 add eax, DWORD PTR n$[rbp] - 001ca 48 98 cdqe - 001cc 48 8b 8d 60 01 + 001c9 03 45 44 add eax, DWORD PTR n$[rbp] + 001cc 48 98 cdqe + 001ce 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR data$[rbp] - 001d3 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 001d7 f3 0f 2a c0 cvtsi2ss xmm0, eax - 001db f3 0f 5e 05 00 + 001d5 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 001d9 f3 0f 2a c0 cvtsi2ss xmm0, eax + 001dd f3 0f 5e 05 00 00 00 00 divss xmm0, DWORD PTR __real@437f0000 - 001e3 8b 45 04 mov eax, DWORD PTR i$[rbp] - 001e6 0f af 85 78 01 + 001e5 8b 45 04 mov eax, DWORD PTR i$[rbp] + 001e8 0f af 85 78 01 00 00 imul eax, DWORD PTR comp$[rbp] - 001ed 03 45 44 add eax, DWORD PTR n$[rbp] - 001f0 48 98 cdqe - 001f2 48 8b 4d 68 mov rcx, QWORD PTR output$[rbp] - 001f6 f3 0f 11 04 81 movss DWORD PTR [rcx+rax*4], xmm0 + 001ef 03 45 44 add eax, DWORD PTR n$[rbp] + 001f2 48 98 cdqe + 001f4 48 8b 4d 68 mov rcx, QWORD PTR output$[rbp] + 001f8 f3 0f 11 04 81 movss DWORD PTR [rcx+rax*4], xmm0 ; 1337 : } - 001fb eb a6 jmp SHORT $LN8@stbi__ldr_ + 001fd eb a6 jmp SHORT $LN8@stbi__ldr_ $LN9@stbi__ldr_: $LN15@stbi__ldr_: ; 1338 : } ; 1339 : STBI_FREE(data); - 001fd 48 8b 8d 60 01 + 001ff 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR data$[rbp] - 00204 ff 15 00 00 00 + 00206 ff 15 00 00 00 00 call QWORD PTR __imp_free + 0020c 90 npad 1 ; 1340 : return output; - 0020a 48 8b 45 68 mov rax, QWORD PTR output$[rbp] + 0020d 48 8b 45 68 mov rax, QWORD PTR output$[rbp] $LN1@stbi__ldr_: ; 1341 : } - 0020e 48 8d a5 48 01 + 00211 48 8d a5 48 01 00 00 lea rsp, QWORD PTR [rbp+328] - 00215 5f pop rdi - 00216 5d pop rbp - 00217 c3 ret 0 + 00218 5f pop rdi + 00219 5d pop rbp + 0021a c3 ret 0 stbi__ldr_to_hdr ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__mul2shorts_valid _TEXT SEGMENT -tv87 = 192 -tv82 = 192 -tv75 = 192 tv73 = 192 -tv91 = 196 -tv86 = 196 -tv79 = 196 +tv75 = 192 +tv82 = 192 +tv87 = 192 tv72 = 196 +tv79 = 196 +tv86 = 196 +tv91 = 196 a$ = 240 b$ = 248 stbi__mul2shorts_valid PROC ; COMDAT @@ -43497,149 +43768,150 @@ stbi__mul2shorts_valid PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 531 : if (b == 0 || b == -1) return 1; // multiplication by 0 is always 0; check for -1 so SHRT_MIN/b doesn't overflow - 00024 0f bf 85 f8 00 + 00025 0f bf 85 f8 00 00 00 movsx eax, WORD PTR b$[rbp] - 0002b 85 c0 test eax, eax - 0002d 74 0c je SHORT $LN3@stbi__mul2 - 0002f 0f bf 85 f8 00 + 0002c 85 c0 test eax, eax + 0002e 74 0c je SHORT $LN3@stbi__mul2 + 00030 0f bf 85 f8 00 00 00 movsx eax, WORD PTR b$[rbp] - 00036 83 f8 ff cmp eax, -1 - 00039 75 0a jne SHORT $LN2@stbi__mul2 + 00037 83 f8 ff cmp eax, -1 + 0003a 75 0a jne SHORT $LN2@stbi__mul2 $LN3@stbi__mul2: - 0003b b8 01 00 00 00 mov eax, 1 - 00040 e9 28 01 00 00 jmp $LN1@stbi__mul2 + 0003c b8 01 00 00 00 mov eax, 1 + 00041 e9 28 01 00 00 jmp $LN1@stbi__mul2 $LN2@stbi__mul2: ; 532 : if ((a >= 0) == (b >= 0)) return a <= SHRT_MAX / b; // product is positive, so similar to mul2sizes_valid - 00045 0f bf 85 f0 00 + 00046 0f bf 85 f0 00 00 00 movsx eax, WORD PTR a$[rbp] - 0004c 85 c0 test eax, eax - 0004e 7c 0c jl SHORT $LN9@stbi__mul2 - 00050 c7 85 c0 00 00 + 0004d 85 c0 test eax, eax + 0004f 7c 0c jl SHORT $LN9@stbi__mul2 + 00051 c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv73[rbp], 1 - 0005a eb 0a jmp SHORT $LN10@stbi__mul2 + 0005b eb 0a jmp SHORT $LN10@stbi__mul2 $LN9@stbi__mul2: - 0005c c7 85 c0 00 00 + 0005d c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv73[rbp], 0 $LN10@stbi__mul2: - 00066 0f bf 85 f8 00 + 00067 0f bf 85 f8 00 00 00 movsx eax, WORD PTR b$[rbp] - 0006d 85 c0 test eax, eax - 0006f 7c 0c jl SHORT $LN7@stbi__mul2 - 00071 c7 85 c4 00 00 + 0006e 85 c0 test eax, eax + 00070 7c 0c jl SHORT $LN7@stbi__mul2 + 00072 c7 85 c4 00 00 00 01 00 00 00 mov DWORD PTR tv72[rbp], 1 - 0007b eb 0a jmp SHORT $LN8@stbi__mul2 + 0007c eb 0a jmp SHORT $LN8@stbi__mul2 $LN7@stbi__mul2: - 0007d c7 85 c4 00 00 + 0007e c7 85 c4 00 00 00 00 00 00 00 mov DWORD PTR tv72[rbp], 0 $LN8@stbi__mul2: - 00087 8b 85 c4 00 00 + 00088 8b 85 c4 00 00 00 mov eax, DWORD PTR tv72[rbp] - 0008d 39 85 c0 00 00 + 0008e 39 85 c0 00 00 00 cmp DWORD PTR tv73[rbp], eax - 00093 75 47 jne SHORT $LN4@stbi__mul2 - 00095 0f bf 85 f0 00 + 00094 75 47 jne SHORT $LN4@stbi__mul2 + 00096 0f bf 85 f0 00 00 00 movsx eax, WORD PTR a$[rbp] - 0009c 89 85 c0 00 00 + 0009d 89 85 c0 00 00 00 mov DWORD PTR tv75[rbp], eax - 000a2 0f bf 8d f8 00 + 000a3 0f bf 8d f8 00 00 00 movsx ecx, WORD PTR b$[rbp] - 000a9 b8 ff 7f 00 00 mov eax, 32767 ; 00007fffH - 000ae 99 cdq - 000af f7 f9 idiv ecx - 000b1 8b 8d c0 00 00 + 000aa b8 ff 7f 00 00 mov eax, 32767 ; 00007fffH + 000af 99 cdq + 000b0 f7 f9 idiv ecx + 000b2 8b 8d c0 00 00 00 mov ecx, DWORD PTR tv75[rbp] - 000b7 3b c8 cmp ecx, eax - 000b9 7f 0c jg SHORT $LN11@stbi__mul2 - 000bb c7 85 c4 00 00 + 000b8 3b c8 cmp ecx, eax + 000ba 7f 0c jg SHORT $LN11@stbi__mul2 + 000bc c7 85 c4 00 00 00 01 00 00 00 mov DWORD PTR tv79[rbp], 1 - 000c5 eb 0a jmp SHORT $LN12@stbi__mul2 + 000c6 eb 0a jmp SHORT $LN12@stbi__mul2 $LN11@stbi__mul2: - 000c7 c7 85 c4 00 00 + 000c8 c7 85 c4 00 00 00 00 00 00 00 mov DWORD PTR tv79[rbp], 0 $LN12@stbi__mul2: - 000d1 8b 85 c4 00 00 + 000d2 8b 85 c4 00 00 00 mov eax, DWORD PTR tv79[rbp] - 000d7 e9 91 00 00 00 jmp $LN1@stbi__mul2 + 000d8 e9 91 00 00 00 jmp $LN1@stbi__mul2 $LN4@stbi__mul2: ; 533 : if (b < 0) return a <= SHRT_MIN / b; // same as a * b >= SHRT_MIN - 000dc 0f bf 85 f8 00 + 000dd 0f bf 85 f8 00 00 00 movsx eax, WORD PTR b$[rbp] - 000e3 85 c0 test eax, eax - 000e5 7d 44 jge SHORT $LN5@stbi__mul2 - 000e7 0f bf 85 f0 00 + 000e4 85 c0 test eax, eax + 000e6 7d 44 jge SHORT $LN5@stbi__mul2 + 000e8 0f bf 85 f0 00 00 00 movsx eax, WORD PTR a$[rbp] - 000ee 89 85 c0 00 00 + 000ef 89 85 c0 00 00 00 mov DWORD PTR tv82[rbp], eax - 000f4 0f bf 8d f8 00 + 000f5 0f bf 8d f8 00 00 00 movsx ecx, WORD PTR b$[rbp] - 000fb b8 00 80 ff ff mov eax, -32768 ; ffffffffffff8000H - 00100 99 cdq - 00101 f7 f9 idiv ecx - 00103 8b 8d c0 00 00 + 000fc b8 00 80 ff ff mov eax, -32768 ; ffffffffffff8000H + 00101 99 cdq + 00102 f7 f9 idiv ecx + 00104 8b 8d c0 00 00 00 mov ecx, DWORD PTR tv82[rbp] - 00109 3b c8 cmp ecx, eax - 0010b 7f 0c jg SHORT $LN13@stbi__mul2 - 0010d c7 85 c4 00 00 + 0010a 3b c8 cmp ecx, eax + 0010c 7f 0c jg SHORT $LN13@stbi__mul2 + 0010e c7 85 c4 00 00 00 01 00 00 00 mov DWORD PTR tv86[rbp], 1 - 00117 eb 0a jmp SHORT $LN14@stbi__mul2 + 00118 eb 0a jmp SHORT $LN14@stbi__mul2 $LN13@stbi__mul2: - 00119 c7 85 c4 00 00 + 0011a c7 85 c4 00 00 00 00 00 00 00 mov DWORD PTR tv86[rbp], 0 $LN14@stbi__mul2: - 00123 8b 85 c4 00 00 + 00124 8b 85 c4 00 00 00 mov eax, DWORD PTR tv86[rbp] - 00129 eb 42 jmp SHORT $LN1@stbi__mul2 + 0012a eb 42 jmp SHORT $LN1@stbi__mul2 $LN5@stbi__mul2: ; 534 : return a >= SHRT_MIN / b; - 0012b 0f bf 85 f0 00 + 0012c 0f bf 85 f0 00 00 00 movsx eax, WORD PTR a$[rbp] - 00132 89 85 c0 00 00 + 00133 89 85 c0 00 00 00 mov DWORD PTR tv87[rbp], eax - 00138 0f bf 8d f8 00 + 00139 0f bf 8d f8 00 00 00 movsx ecx, WORD PTR b$[rbp] - 0013f b8 00 80 ff ff mov eax, -32768 ; ffffffffffff8000H - 00144 99 cdq - 00145 f7 f9 idiv ecx - 00147 8b 8d c0 00 00 + 00140 b8 00 80 ff ff mov eax, -32768 ; ffffffffffff8000H + 00145 99 cdq + 00146 f7 f9 idiv ecx + 00148 8b 8d c0 00 00 00 mov ecx, DWORD PTR tv87[rbp] - 0014d 3b c8 cmp ecx, eax - 0014f 7c 0c jl SHORT $LN15@stbi__mul2 - 00151 c7 85 c4 00 00 + 0014e 3b c8 cmp ecx, eax + 00150 7c 0c jl SHORT $LN15@stbi__mul2 + 00152 c7 85 c4 00 00 00 01 00 00 00 mov DWORD PTR tv91[rbp], 1 - 0015b eb 0a jmp SHORT $LN16@stbi__mul2 + 0015c eb 0a jmp SHORT $LN16@stbi__mul2 $LN15@stbi__mul2: - 0015d c7 85 c4 00 00 + 0015e c7 85 c4 00 00 00 00 00 00 00 mov DWORD PTR tv91[rbp], 0 $LN16@stbi__mul2: - 00167 8b 85 c4 00 00 + 00168 8b 85 c4 00 00 00 mov eax, DWORD PTR tv91[rbp] $LN1@stbi__mul2: ; 535 : } - 0016d 48 8d a5 d8 00 + 0016e 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 00174 5f pop rdi - 00175 5d pop rbp - 00176 c3 ret 0 + 00175 5f pop rdi + 00176 5d pop rbp + 00177 c3 ret 0 stbi__mul2shorts_valid ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__addints_valid _TEXT SEGMENT -tv76 = 192 -tv73 = 192 tv67 = 192 +tv73 = 192 +tv76 = 192 tv66 = 196 a$ = 240 b$ = 248 @@ -43657,90 +43929,91 @@ stbi__addints_valid PROC ; COMDAT 00016 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001d e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00022 90 npad 1 ; 523 : if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow - 00022 83 bd f0 00 00 + 00023 83 bd f0 00 00 00 00 cmp DWORD PTR a$[rbp], 0 - 00029 7c 0c jl SHORT $LN7@stbi__addi - 0002b c7 85 c0 00 00 + 0002a 7c 0c jl SHORT $LN7@stbi__addi + 0002c c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv67[rbp], 1 - 00035 eb 0a jmp SHORT $LN8@stbi__addi + 00036 eb 0a jmp SHORT $LN8@stbi__addi $LN7@stbi__addi: - 00037 c7 85 c0 00 00 + 00038 c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv67[rbp], 0 $LN8@stbi__addi: - 00041 83 bd f8 00 00 + 00042 83 bd f8 00 00 00 00 cmp DWORD PTR b$[rbp], 0 - 00048 7c 0c jl SHORT $LN5@stbi__addi - 0004a c7 85 c4 00 00 + 00049 7c 0c jl SHORT $LN5@stbi__addi + 0004b c7 85 c4 00 00 00 01 00 00 00 mov DWORD PTR tv66[rbp], 1 - 00054 eb 0a jmp SHORT $LN6@stbi__addi + 00055 eb 0a jmp SHORT $LN6@stbi__addi $LN5@stbi__addi: - 00056 c7 85 c4 00 00 + 00057 c7 85 c4 00 00 00 00 00 00 00 mov DWORD PTR tv66[rbp], 0 $LN6@stbi__addi: - 00060 8b 85 c4 00 00 + 00061 8b 85 c4 00 00 00 mov eax, DWORD PTR tv66[rbp] - 00066 39 85 c0 00 00 + 00067 39 85 c0 00 00 00 cmp DWORD PTR tv67[rbp], eax - 0006c 74 07 je SHORT $LN2@stbi__addi - 0006e b8 01 00 00 00 mov eax, 1 - 00073 eb 72 jmp SHORT $LN1@stbi__addi + 0006d 74 07 je SHORT $LN2@stbi__addi + 0006f b8 01 00 00 00 mov eax, 1 + 00074 eb 72 jmp SHORT $LN1@stbi__addi $LN2@stbi__addi: ; 524 : if (a < 0 && b < 0) return a >= INT_MIN - b; // same as a + b >= INT_MIN; INT_MIN - b cannot overflow since b < 0. - 00075 83 bd f0 00 00 + 00076 83 bd f0 00 00 00 00 cmp DWORD PTR a$[rbp], 0 - 0007c 7d 3a jge SHORT $LN3@stbi__addi - 0007e 83 bd f8 00 00 + 0007d 7d 3a jge SHORT $LN3@stbi__addi + 0007f 83 bd f8 00 00 00 00 cmp DWORD PTR b$[rbp], 0 - 00085 7d 31 jge SHORT $LN3@stbi__addi - 00087 b8 00 00 00 80 mov eax, -2147483648 ; ffffffff80000000H - 0008c 2b 85 f8 00 00 + 00086 7d 31 jge SHORT $LN3@stbi__addi + 00088 b8 00 00 00 80 mov eax, -2147483648 ; ffffffff80000000H + 0008d 2b 85 f8 00 00 00 sub eax, DWORD PTR b$[rbp] - 00092 39 85 f0 00 00 + 00093 39 85 f0 00 00 00 cmp DWORD PTR a$[rbp], eax - 00098 7c 0c jl SHORT $LN9@stbi__addi - 0009a c7 85 c0 00 00 + 00099 7c 0c jl SHORT $LN9@stbi__addi + 0009b c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv73[rbp], 1 - 000a4 eb 0a jmp SHORT $LN10@stbi__addi + 000a5 eb 0a jmp SHORT $LN10@stbi__addi $LN9@stbi__addi: - 000a6 c7 85 c0 00 00 + 000a7 c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv73[rbp], 0 $LN10@stbi__addi: - 000b0 8b 85 c0 00 00 + 000b1 8b 85 c0 00 00 00 mov eax, DWORD PTR tv73[rbp] - 000b6 eb 2f jmp SHORT $LN1@stbi__addi + 000b7 eb 2f jmp SHORT $LN1@stbi__addi $LN3@stbi__addi: ; 525 : return a <= INT_MAX - b; - 000b8 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 000bd 2b 85 f8 00 00 + 000b9 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 000be 2b 85 f8 00 00 00 sub eax, DWORD PTR b$[rbp] - 000c3 39 85 f0 00 00 + 000c4 39 85 f0 00 00 00 cmp DWORD PTR a$[rbp], eax - 000c9 7f 0c jg SHORT $LN11@stbi__addi - 000cb c7 85 c0 00 00 + 000ca 7f 0c jg SHORT $LN11@stbi__addi + 000cc c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv76[rbp], 1 - 000d5 eb 0a jmp SHORT $LN12@stbi__addi + 000d6 eb 0a jmp SHORT $LN12@stbi__addi $LN11@stbi__addi: - 000d7 c7 85 c0 00 00 + 000d8 c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv76[rbp], 0 $LN12@stbi__addi: - 000e1 8b 85 c0 00 00 + 000e2 8b 85 c0 00 00 00 mov eax, DWORD PTR tv76[rbp] $LN1@stbi__addi: ; 526 : } - 000e7 48 8d a5 d8 00 + 000e8 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 000ee 5f pop rdi - 000ef 5d pop rbp - 000f0 c3 ret 0 + 000ef 5f pop rdi + 000f0 5d pop rbp + 000f1 c3 ret 0 stbi__addints_valid ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -43768,51 +44041,52 @@ stbi__malloc_mad4 PROC ; COMDAT 00020 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00027 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002c 90 npad 1 ; 515 : if (!stbi__mad4sizes_valid(a, b, c, d, add)) return NULL; - 0002c 8b 85 00 01 00 + 0002d 8b 85 00 01 00 00 mov eax, DWORD PTR add$[rbp] - 00032 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00036 44 8b 8d f8 00 + 00033 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00037 44 8b 8d f8 00 00 00 mov r9d, DWORD PTR d$[rbp] - 0003d 44 8b 85 f0 00 + 0003e 44 8b 85 f0 00 00 00 mov r8d, DWORD PTR c$[rbp] - 00044 8b 95 e8 00 00 + 00045 8b 95 e8 00 00 00 mov edx, DWORD PTR b$[rbp] - 0004a 8b 8d e0 00 00 + 0004b 8b 8d e0 00 00 00 mov ecx, DWORD PTR a$[rbp] - 00050 e8 00 00 00 00 call stbi__mad4sizes_valid - 00055 85 c0 test eax, eax - 00057 75 04 jne SHORT $LN2@stbi__mall - 00059 33 c0 xor eax, eax - 0005b eb 2b jmp SHORT $LN1@stbi__mall + 00051 e8 00 00 00 00 call stbi__mad4sizes_valid + 00056 85 c0 test eax, eax + 00058 75 04 jne SHORT $LN2@stbi__mall + 0005a 33 c0 xor eax, eax + 0005c eb 2b jmp SHORT $LN1@stbi__mall $LN2@stbi__mall: ; 516 : return stbi__malloc(a * b * c * d + add); - 0005d 8b 85 e0 00 00 + 0005e 8b 85 e0 00 00 00 mov eax, DWORD PTR a$[rbp] - 00063 0f af 85 e8 00 + 00064 0f af 85 e8 00 00 00 imul eax, DWORD PTR b$[rbp] - 0006a 0f af 85 f0 00 + 0006b 0f af 85 f0 00 00 00 imul eax, DWORD PTR c$[rbp] - 00071 0f af 85 f8 00 + 00072 0f af 85 f8 00 00 00 imul eax, DWORD PTR d$[rbp] - 00078 03 85 00 01 00 + 00079 03 85 00 01 00 00 add eax, DWORD PTR add$[rbp] - 0007e 48 98 cdqe - 00080 48 8b c8 mov rcx, rax - 00083 e8 00 00 00 00 call stbi__malloc + 0007f 48 98 cdqe + 00081 48 8b c8 mov rcx, rax + 00084 e8 00 00 00 00 call stbi__malloc $LN1@stbi__mall: ; 517 : } - 00088 48 8d a5 c8 00 + 00089 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0008f 5f pop rdi - 00090 5d pop rbp - 00091 c3 ret 0 + 00090 5f pop rdi + 00091 5d pop rbp + 00092 c3 ret 0 stbi__malloc_mad4 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -43839,46 +44113,47 @@ stbi__malloc_mad3 PROC ; COMDAT 00020 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00027 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002c 90 npad 1 ; 508 : if (!stbi__mad3sizes_valid(a, b, c, add)) return NULL; - 0002c 44 8b 8d f8 00 + 0002d 44 8b 8d f8 00 00 00 mov r9d, DWORD PTR add$[rbp] - 00033 44 8b 85 f0 00 + 00034 44 8b 85 f0 00 00 00 mov r8d, DWORD PTR c$[rbp] - 0003a 8b 95 e8 00 00 + 0003b 8b 95 e8 00 00 00 mov edx, DWORD PTR b$[rbp] - 00040 8b 8d e0 00 00 + 00041 8b 8d e0 00 00 00 mov ecx, DWORD PTR a$[rbp] - 00046 e8 00 00 00 00 call stbi__mad3sizes_valid - 0004b 85 c0 test eax, eax - 0004d 75 04 jne SHORT $LN2@stbi__mall - 0004f 33 c0 xor eax, eax - 00051 eb 24 jmp SHORT $LN1@stbi__mall + 00047 e8 00 00 00 00 call stbi__mad3sizes_valid + 0004c 85 c0 test eax, eax + 0004e 75 04 jne SHORT $LN2@stbi__mall + 00050 33 c0 xor eax, eax + 00052 eb 24 jmp SHORT $LN1@stbi__mall $LN2@stbi__mall: ; 509 : return stbi__malloc(a * b * c + add); - 00053 8b 85 e0 00 00 + 00054 8b 85 e0 00 00 00 mov eax, DWORD PTR a$[rbp] - 00059 0f af 85 e8 00 + 0005a 0f af 85 e8 00 00 00 imul eax, DWORD PTR b$[rbp] - 00060 0f af 85 f0 00 + 00061 0f af 85 f0 00 00 00 imul eax, DWORD PTR c$[rbp] - 00067 03 85 f8 00 00 + 00068 03 85 f8 00 00 00 add eax, DWORD PTR add$[rbp] - 0006d 48 98 cdqe - 0006f 48 8b c8 mov rcx, rax - 00072 e8 00 00 00 00 call stbi__malloc + 0006e 48 98 cdqe + 00070 48 8b c8 mov rcx, rax + 00073 e8 00 00 00 00 call stbi__malloc $LN1@stbi__mall: ; 510 : } - 00077 48 8d a5 c8 00 + 00078 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0007e 5f pop rdi - 0007f 5d pop rbp - 00080 c3 ret 0 + 0007f 5f pop rdi + 00080 5d pop rbp + 00081 c3 ret 0 stbi__malloc_mad3 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -43903,42 +44178,43 @@ stbi__malloc_mad2 PROC ; COMDAT 0001b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00022 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00027 90 npad 1 ; 501 : if (!stbi__mad2sizes_valid(a, b, add)) return NULL; - 00027 44 8b 85 f0 00 + 00028 44 8b 85 f0 00 00 00 mov r8d, DWORD PTR add$[rbp] - 0002e 8b 95 e8 00 00 + 0002f 8b 95 e8 00 00 00 mov edx, DWORD PTR b$[rbp] - 00034 8b 8d e0 00 00 + 00035 8b 8d e0 00 00 00 mov ecx, DWORD PTR a$[rbp] - 0003a e8 00 00 00 00 call stbi__mad2sizes_valid - 0003f 85 c0 test eax, eax - 00041 75 04 jne SHORT $LN2@stbi__mall - 00043 33 c0 xor eax, eax - 00045 eb 1d jmp SHORT $LN1@stbi__mall + 0003b e8 00 00 00 00 call stbi__mad2sizes_valid + 00040 85 c0 test eax, eax + 00042 75 04 jne SHORT $LN2@stbi__mall + 00044 33 c0 xor eax, eax + 00046 eb 1d jmp SHORT $LN1@stbi__mall $LN2@stbi__mall: ; 502 : return stbi__malloc(a * b + add); - 00047 8b 85 e0 00 00 + 00048 8b 85 e0 00 00 00 mov eax, DWORD PTR a$[rbp] - 0004d 0f af 85 e8 00 + 0004e 0f af 85 e8 00 00 00 imul eax, DWORD PTR b$[rbp] - 00054 03 85 f0 00 00 + 00055 03 85 f0 00 00 00 add eax, DWORD PTR add$[rbp] - 0005a 48 98 cdqe - 0005c 48 8b c8 mov rcx, rax - 0005f e8 00 00 00 00 call stbi__malloc + 0005b 48 98 cdqe + 0005d 48 8b c8 mov rcx, rax + 00060 e8 00 00 00 00 call stbi__malloc $LN1@stbi__mall: ; 503 : } - 00064 48 8d a5 c8 00 + 00065 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0006b 5f pop rdi - 0006c 5d pop rbp - 0006d c3 ret 0 + 0006c 5f pop rdi + 0006d 5d pop rbp + 0006e c3 ret 0 stbi__malloc_mad2 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -43967,70 +44243,71 @@ stbi__mad4sizes_valid PROC ; COMDAT 00020 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00027 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002c 90 npad 1 ; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - 0002c 8b 95 f8 00 00 + 0002d 8b 95 f8 00 00 00 mov edx, DWORD PTR b$[rbp] - 00032 8b 8d f0 00 00 + 00033 8b 8d f0 00 00 00 mov ecx, DWORD PTR a$[rbp] - 00038 e8 00 00 00 00 call stbi__mul2sizes_valid - 0003d 85 c0 test eax, eax - 0003f 74 7b je SHORT $LN3@stbi__mad4 - 00041 8b 85 f0 00 00 + 00039 e8 00 00 00 00 call stbi__mul2sizes_valid + 0003e 85 c0 test eax, eax + 00040 74 7b je SHORT $LN3@stbi__mad4 + 00042 8b 85 f0 00 00 00 mov eax, DWORD PTR a$[rbp] - 00047 0f af 85 f8 00 + 00048 0f af 85 f8 00 00 00 imul eax, DWORD PTR b$[rbp] - 0004e 8b 95 00 01 00 + 0004f 8b 95 00 01 00 00 mov edx, DWORD PTR c$[rbp] - 00054 8b c8 mov ecx, eax - 00056 e8 00 00 00 00 call stbi__mul2sizes_valid - 0005b 85 c0 test eax, eax - 0005d 74 5d je SHORT $LN3@stbi__mad4 - 0005f 8b 85 f0 00 00 + 00055 8b c8 mov ecx, eax + 00057 e8 00 00 00 00 call stbi__mul2sizes_valid + 0005c 85 c0 test eax, eax + 0005e 74 5d je SHORT $LN3@stbi__mad4 + 00060 8b 85 f0 00 00 00 mov eax, DWORD PTR a$[rbp] - 00065 0f af 85 f8 00 + 00066 0f af 85 f8 00 00 00 imul eax, DWORD PTR b$[rbp] - 0006c 0f af 85 00 01 + 0006d 0f af 85 00 01 00 00 imul eax, DWORD PTR c$[rbp] - 00073 8b 95 08 01 00 + 00074 8b 95 08 01 00 00 mov edx, DWORD PTR d$[rbp] - 00079 8b c8 mov ecx, eax - 0007b e8 00 00 00 00 call stbi__mul2sizes_valid - 00080 85 c0 test eax, eax - 00082 74 38 je SHORT $LN3@stbi__mad4 - 00084 8b 85 f0 00 00 + 0007a 8b c8 mov ecx, eax + 0007c e8 00 00 00 00 call stbi__mul2sizes_valid + 00081 85 c0 test eax, eax + 00083 74 38 je SHORT $LN3@stbi__mad4 + 00085 8b 85 f0 00 00 00 mov eax, DWORD PTR a$[rbp] - 0008a 0f af 85 f8 00 + 0008b 0f af 85 f8 00 00 00 imul eax, DWORD PTR b$[rbp] - 00091 0f af 85 00 01 + 00092 0f af 85 00 01 00 00 imul eax, DWORD PTR c$[rbp] - 00098 0f af 85 08 01 + 00099 0f af 85 08 01 00 00 imul eax, DWORD PTR d$[rbp] - 0009f 8b 95 10 01 00 + 000a0 8b 95 10 01 00 00 mov edx, DWORD PTR add$[rbp] - 000a5 8b c8 mov ecx, eax - 000a7 e8 00 00 00 00 call stbi__addsizes_valid - 000ac 85 c0 test eax, eax - 000ae 74 0c je SHORT $LN3@stbi__mad4 - 000b0 c7 85 c0 00 00 + 000a6 8b c8 mov ecx, eax + 000a8 e8 00 00 00 00 call stbi__addsizes_valid + 000ad 85 c0 test eax, eax + 000af 74 0c je SHORT $LN3@stbi__mad4 + 000b1 c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv86[rbp], 1 - 000ba eb 0a jmp SHORT $LN4@stbi__mad4 + 000bb eb 0a jmp SHORT $LN4@stbi__mad4 $LN3@stbi__mad4: - 000bc c7 85 c0 00 00 + 000bd c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv86[rbp], 0 $LN4@stbi__mad4: - 000c6 8b 85 c0 00 00 + 000c7 8b 85 c0 00 00 00 mov eax, DWORD PTR tv86[rbp] ; 493 : stbi__mul2sizes_valid(a * b * c, d) && stbi__addsizes_valid(a * b * c * d, add); ; 494 : } - 000cc 48 8d a5 d8 00 + 000cd 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 000d3 5f pop rdi - 000d4 5d pop rbp - 000d5 c3 ret 0 + 000d4 5f pop rdi + 000d5 5d pop rbp + 000d6 c3 ret 0 stbi__mad4sizes_valid ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -44058,56 +44335,57 @@ stbi__mad3sizes_valid PROC ; COMDAT 00020 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00027 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002c 90 npad 1 ; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - 0002c 8b 95 f8 00 00 + 0002d 8b 95 f8 00 00 00 mov edx, DWORD PTR b$[rbp] - 00032 8b 8d f0 00 00 + 00033 8b 8d f0 00 00 00 mov ecx, DWORD PTR a$[rbp] - 00038 e8 00 00 00 00 call stbi__mul2sizes_valid - 0003d 85 c0 test eax, eax - 0003f 74 4f je SHORT $LN3@stbi__mad3 - 00041 8b 85 f0 00 00 + 00039 e8 00 00 00 00 call stbi__mul2sizes_valid + 0003e 85 c0 test eax, eax + 00040 74 4f je SHORT $LN3@stbi__mad3 + 00042 8b 85 f0 00 00 00 mov eax, DWORD PTR a$[rbp] - 00047 0f af 85 f8 00 + 00048 0f af 85 f8 00 00 00 imul eax, DWORD PTR b$[rbp] - 0004e 8b 95 00 01 00 + 0004f 8b 95 00 01 00 00 mov edx, DWORD PTR c$[rbp] - 00054 8b c8 mov ecx, eax - 00056 e8 00 00 00 00 call stbi__mul2sizes_valid - 0005b 85 c0 test eax, eax - 0005d 74 31 je SHORT $LN3@stbi__mad3 - 0005f 8b 85 f0 00 00 + 00055 8b c8 mov ecx, eax + 00057 e8 00 00 00 00 call stbi__mul2sizes_valid + 0005c 85 c0 test eax, eax + 0005e 74 31 je SHORT $LN3@stbi__mad3 + 00060 8b 85 f0 00 00 00 mov eax, DWORD PTR a$[rbp] - 00065 0f af 85 f8 00 + 00066 0f af 85 f8 00 00 00 imul eax, DWORD PTR b$[rbp] - 0006c 0f af 85 00 01 + 0006d 0f af 85 00 01 00 00 imul eax, DWORD PTR c$[rbp] - 00073 8b 95 08 01 00 + 00074 8b 95 08 01 00 00 mov edx, DWORD PTR add$[rbp] - 00079 8b c8 mov ecx, eax - 0007b e8 00 00 00 00 call stbi__addsizes_valid - 00080 85 c0 test eax, eax - 00082 74 0c je SHORT $LN3@stbi__mad3 - 00084 c7 85 c0 00 00 + 0007a 8b c8 mov ecx, eax + 0007c e8 00 00 00 00 call stbi__addsizes_valid + 00081 85 c0 test eax, eax + 00083 74 0c je SHORT $LN3@stbi__mad3 + 00085 c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv79[rbp], 1 - 0008e eb 0a jmp SHORT $LN4@stbi__mad3 + 0008f eb 0a jmp SHORT $LN4@stbi__mad3 $LN3@stbi__mad3: - 00090 c7 85 c0 00 00 + 00091 c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv79[rbp], 0 $LN4@stbi__mad3: - 0009a 8b 85 c0 00 00 + 0009b 8b 85 c0 00 00 00 mov eax, DWORD PTR tv79[rbp] ; 485 : stbi__addsizes_valid(a * b * c, add); ; 486 : } - 000a0 48 8d a5 d8 00 + 000a1 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 000a7 5f pop rdi - 000a8 5d pop rbp - 000a9 c3 ret 0 + 000a8 5f pop rdi + 000a9 5d pop rbp + 000aa c3 ret 0 stbi__mad3sizes_valid ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -44133,43 +44411,44 @@ stbi__mad2sizes_valid PROC ; COMDAT 0001b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00022 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00027 90 npad 1 ; 477 : return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add); - 00027 8b 95 f8 00 00 + 00028 8b 95 f8 00 00 00 mov edx, DWORD PTR b$[rbp] - 0002d 8b 8d f0 00 00 + 0002e 8b 8d f0 00 00 00 mov ecx, DWORD PTR a$[rbp] - 00033 e8 00 00 00 00 call stbi__mul2sizes_valid - 00038 85 c0 test eax, eax - 0003a 74 2a je SHORT $LN3@stbi__mad2 - 0003c 8b 85 f0 00 00 + 00034 e8 00 00 00 00 call stbi__mul2sizes_valid + 00039 85 c0 test eax, eax + 0003b 74 2a je SHORT $LN3@stbi__mad2 + 0003d 8b 85 f0 00 00 00 mov eax, DWORD PTR a$[rbp] - 00042 0f af 85 f8 00 + 00043 0f af 85 f8 00 00 00 imul eax, DWORD PTR b$[rbp] - 00049 8b 95 00 01 00 + 0004a 8b 95 00 01 00 00 mov edx, DWORD PTR add$[rbp] - 0004f 8b c8 mov ecx, eax - 00051 e8 00 00 00 00 call stbi__addsizes_valid - 00056 85 c0 test eax, eax - 00058 74 0c je SHORT $LN3@stbi__mad2 - 0005a c7 85 c0 00 00 + 00050 8b c8 mov ecx, eax + 00052 e8 00 00 00 00 call stbi__addsizes_valid + 00057 85 c0 test eax, eax + 00059 74 0c je SHORT $LN3@stbi__mad2 + 0005b c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv73[rbp], 1 - 00064 eb 0a jmp SHORT $LN4@stbi__mad2 + 00065 eb 0a jmp SHORT $LN4@stbi__mad2 $LN3@stbi__mad2: - 00066 c7 85 c0 00 00 + 00067 c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv73[rbp], 0 $LN4@stbi__mad2: - 00070 8b 85 c0 00 00 + 00071 8b 85 c0 00 00 00 mov eax, DWORD PTR tv73[rbp] ; 478 : } - 00076 48 8d a5 d8 00 + 00077 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 0007d 5f pop rdi - 0007e 5d pop rbp - 0007f c3 ret 0 + 0007e 5f pop rdi + 0007f 5d pop rbp + 00080 c3 ret 0 stbi__mad2sizes_valid ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -44193,57 +44472,58 @@ stbi__mul2sizes_valid PROC ; COMDAT 00016 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001d e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00022 90 npad 1 ; 467 : if (a < 0 || b < 0) return 0; - 00022 83 bd f0 00 00 + 00023 83 bd f0 00 00 00 00 cmp DWORD PTR a$[rbp], 0 - 00029 7c 09 jl SHORT $LN3@stbi__mul2 - 0002b 83 bd f8 00 00 + 0002a 7c 09 jl SHORT $LN3@stbi__mul2 + 0002c 83 bd f8 00 00 00 00 cmp DWORD PTR b$[rbp], 0 - 00032 7d 04 jge SHORT $LN2@stbi__mul2 + 00033 7d 04 jge SHORT $LN2@stbi__mul2 $LN3@stbi__mul2: - 00034 33 c0 xor eax, eax - 00036 eb 40 jmp SHORT $LN1@stbi__mul2 + 00035 33 c0 xor eax, eax + 00037 eb 40 jmp SHORT $LN1@stbi__mul2 $LN2@stbi__mul2: ; 468 : if (b == 0) return 1; // mul-by-0 is always safe - 00038 83 bd f8 00 00 + 00039 83 bd f8 00 00 00 00 cmp DWORD PTR b$[rbp], 0 - 0003f 75 07 jne SHORT $LN4@stbi__mul2 - 00041 b8 01 00 00 00 mov eax, 1 - 00046 eb 30 jmp SHORT $LN1@stbi__mul2 + 00040 75 07 jne SHORT $LN4@stbi__mul2 + 00042 b8 01 00 00 00 mov eax, 1 + 00047 eb 30 jmp SHORT $LN1@stbi__mul2 $LN4@stbi__mul2: ; 469 : // portable way to check for no overflows in a*b ; 470 : return a <= INT_MAX / b; - 00048 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 0004d 99 cdq - 0004e f7 bd f8 00 00 + 00049 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 0004e 99 cdq + 0004f f7 bd f8 00 00 00 idiv DWORD PTR b$[rbp] - 00054 39 85 f0 00 00 + 00055 39 85 f0 00 00 00 cmp DWORD PTR a$[rbp], eax - 0005a 7f 0c jg SHORT $LN6@stbi__mul2 - 0005c c7 85 c0 00 00 + 0005b 7f 0c jg SHORT $LN6@stbi__mul2 + 0005d c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv69[rbp], 1 - 00066 eb 0a jmp SHORT $LN7@stbi__mul2 + 00067 eb 0a jmp SHORT $LN7@stbi__mul2 $LN6@stbi__mul2: - 00068 c7 85 c0 00 00 + 00069 c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv69[rbp], 0 $LN7@stbi__mul2: - 00072 8b 85 c0 00 00 + 00073 8b 85 c0 00 00 00 mov eax, DWORD PTR tv69[rbp] $LN1@stbi__mul2: ; 471 : } - 00078 48 8d a5 d8 00 + 00079 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 0007f 5f pop rdi - 00080 5d pop rbp - 00081 c3 ret 0 + 00080 5f pop rdi + 00081 5d pop rbp + 00082 c3 ret 0 stbi__mul2sizes_valid ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -44267,14 +44547,15 @@ stbi__addsizes_valid PROC ; COMDAT 00016 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001d e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00022 90 npad 1 ; 455 : if (b < 0) return 0; - 00022 83 bd f8 00 00 + 00023 83 bd f8 00 00 00 00 cmp DWORD PTR b$[rbp], 0 - 00029 7d 04 jge SHORT $LN2@stbi__adds - 0002b 33 c0 xor eax, eax - 0002d eb 2f jmp SHORT $LN1@stbi__adds + 0002a 7d 04 jge SHORT $LN2@stbi__adds + 0002c 33 c0 xor eax, eax + 0002e eb 2f jmp SHORT $LN1@stbi__adds $LN2@stbi__adds: ; 456 : // now 0 <= b <= INT_MAX, hence also @@ -44283,30 +44564,30 @@ $LN2@stbi__adds: ; 459 : // same as a <= INT_MAX - b (no overflow) ; 460 : return a <= INT_MAX - b; - 0002f b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00034 2b 85 f8 00 00 + 00030 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 00035 2b 85 f8 00 00 00 sub eax, DWORD PTR b$[rbp] - 0003a 39 85 f0 00 00 + 0003b 39 85 f0 00 00 00 cmp DWORD PTR a$[rbp], eax - 00040 7f 0c jg SHORT $LN4@stbi__adds - 00042 c7 85 c0 00 00 + 00041 7f 0c jg SHORT $LN4@stbi__adds + 00043 c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv67[rbp], 1 - 0004c eb 0a jmp SHORT $LN5@stbi__adds + 0004d eb 0a jmp SHORT $LN5@stbi__adds $LN4@stbi__adds: - 0004e c7 85 c0 00 00 + 0004f c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv67[rbp], 0 $LN5@stbi__adds: - 00058 8b 85 c0 00 00 + 00059 8b 85 c0 00 00 00 mov eax, DWORD PTR tv67[rbp] $LN1@stbi__adds: ; 461 : } - 0005e 48 8d a5 d8 00 + 0005f 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 00065 5f pop rdi - 00066 5d pop rbp - 00067 c3 ret 0 + 00066 5f pop rdi + 00067 5d pop rbp + 00068 c3 ret 0 stbi__addsizes_valid ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -44327,21 +44608,22 @@ stbi__malloc PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 438 : return STBI_MALLOC(size); - 0001f 48 8b 8d e0 00 + 00020 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR size$[rbp] - 00026 ff 15 00 00 00 + 00027 ff 15 00 00 00 00 call QWORD PTR __imp_malloc ; 439 : } - 0002c 48 8d a5 c8 00 + 0002d 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00033 5f pop rdi - 00034 5d pop rbp - 00035 c3 ret 0 + 00034 5f pop rdi + 00035 5d pop rbp + 00036 c3 ret 0 stbi__malloc ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -44362,31 +44644,32 @@ stbi__err PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 431 : stbi__g_failure_reason = str; - 0001f b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__g_failure_reason - 00024 8b c0 mov eax, eax - 00026 8b 0d 00 00 00 + 00020 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__g_failure_reason + 00025 8b c0 mov eax, eax + 00027 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 0002c 65 48 8b 14 25 + 0002d 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 00035 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00039 48 8b 95 e0 00 + 00036 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 0003a 48 8b 95 e0 00 00 00 mov rdx, QWORD PTR str$[rbp] - 00040 48 89 14 08 mov QWORD PTR [rax+rcx], rdx + 00041 48 89 14 08 mov QWORD PTR [rax+rcx], rdx ; 432 : return 0; - 00044 33 c0 xor eax, eax + 00045 33 c0 xor eax, eax ; 433 : } - 00046 48 8d a5 c8 00 + 00047 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0004d 5f pop rdi - 0004e 5d pop rbp - 0004f c3 ret 0 + 0004e 5f pop rdi + 0004f 5d pop rbp + 00050 c3 ret 0 stbi__err ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -44407,36 +44690,37 @@ stbi__pnm_is16 PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 7195 : if (stbi__pnm_info(s, NULL, NULL, NULL) == 16) - 0001f 45 33 c9 xor r9d, r9d - 00022 45 33 c0 xor r8d, r8d - 00025 33 d2 xor edx, edx - 00027 48 8b 8d e0 00 + 00020 45 33 c9 xor r9d, r9d + 00023 45 33 c0 xor r8d, r8d + 00026 33 d2 xor edx, edx + 00028 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 0002e e8 00 00 00 00 call stbi__pnm_info - 00033 83 f8 10 cmp eax, 16 - 00036 75 07 jne SHORT $LN2@stbi__pnm_ + 0002f e8 00 00 00 00 call stbi__pnm_info + 00034 83 f8 10 cmp eax, 16 + 00037 75 07 jne SHORT $LN2@stbi__pnm_ ; 7196 : return 1; - 00038 b8 01 00 00 00 mov eax, 1 - 0003d eb 02 jmp SHORT $LN1@stbi__pnm_ + 00039 b8 01 00 00 00 mov eax, 1 + 0003e eb 02 jmp SHORT $LN1@stbi__pnm_ $LN2@stbi__pnm_: ; 7197 : return 0; - 0003f 33 c0 xor eax, eax + 00040 33 c0 xor eax, eax $LN1@stbi__pnm_: ; 7198 : } - 00041 48 8d a5 c8 00 + 00042 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00048 5f pop rdi - 00049 5d pop rbp - 0004a c3 ret 0 + 00049 5f pop rdi + 0004a 5d pop rbp + 0004b c3 ret 0 stbi__pnm_is16 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -44481,255 +44765,261 @@ stbi__pnm_info PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 7152 : int maxv, dummy; ; 7153 : char c, p, t; ; 7154 : ; 7155 : if (!x) x = &dummy; - 00058 48 83 bd 88 01 + 00059 48 83 bd 88 01 00 00 00 cmp QWORD PTR x$[rbp], 0 - 00060 75 0b jne SHORT $LN2@stbi__pnm_ - 00062 48 8d 45 24 lea rax, QWORD PTR dummy$[rbp] - 00066 48 89 85 88 01 + 00061 75 0b jne SHORT $LN2@stbi__pnm_ + 00063 48 8d 45 24 lea rax, QWORD PTR dummy$[rbp] + 00067 48 89 85 88 01 00 00 mov QWORD PTR x$[rbp], rax $LN2@stbi__pnm_: ; 7156 : if (!y) y = &dummy; - 0006d 48 83 bd 90 01 + 0006e 48 83 bd 90 01 00 00 00 cmp QWORD PTR y$[rbp], 0 - 00075 75 0b jne SHORT $LN3@stbi__pnm_ - 00077 48 8d 45 24 lea rax, QWORD PTR dummy$[rbp] - 0007b 48 89 85 90 01 + 00076 75 0b jne SHORT $LN3@stbi__pnm_ + 00078 48 8d 45 24 lea rax, QWORD PTR dummy$[rbp] + 0007c 48 89 85 90 01 00 00 mov QWORD PTR y$[rbp], rax $LN3@stbi__pnm_: ; 7157 : if (!comp) comp = &dummy; - 00082 48 83 bd 98 01 + 00083 48 83 bd 98 01 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 0008a 75 0b jne SHORT $LN4@stbi__pnm_ - 0008c 48 8d 45 24 lea rax, QWORD PTR dummy$[rbp] - 00090 48 89 85 98 01 + 0008b 75 0b jne SHORT $LN4@stbi__pnm_ + 0008d 48 8d 45 24 lea rax, QWORD PTR dummy$[rbp] + 00091 48 89 85 98 01 00 00 mov QWORD PTR comp$[rbp], rax $LN4@stbi__pnm_: ; 7158 : ; 7159 : stbi__rewind(s); - 00097 48 8b 8d 80 01 + 00098 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0009e e8 00 00 00 00 call stbi__rewind + 0009f e8 00 00 00 00 call stbi__rewind + 000a4 90 npad 1 ; 7160 : ; 7161 : // Get identifier ; 7162 : p = (char)stbi__get8(s); - 000a3 48 8b 8d 80 01 + 000a5 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000aa e8 00 00 00 00 call stbi__get8 - 000af 88 45 64 mov BYTE PTR p$[rbp], al + 000ac e8 00 00 00 00 call stbi__get8 + 000b1 88 45 64 mov BYTE PTR p$[rbp], al ; 7163 : t = (char)stbi__get8(s); - 000b2 48 8b 8d 80 01 + 000b4 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000b9 e8 00 00 00 00 call stbi__get8 - 000be 88 85 84 00 00 + 000bb e8 00 00 00 00 call stbi__get8 + 000c0 88 85 84 00 00 00 mov BYTE PTR t$[rbp], al ; 7164 : if (p != 'P' || (t != '5' && t != '6')) { - 000c4 0f be 45 64 movsx eax, BYTE PTR p$[rbp] - 000c8 83 f8 50 cmp eax, 80 ; 00000050H - 000cb 75 18 jne SHORT $LN6@stbi__pnm_ - 000cd 0f be 85 84 00 + 000c6 0f be 45 64 movsx eax, BYTE PTR p$[rbp] + 000ca 83 f8 50 cmp eax, 80 ; 00000050H + 000cd 75 18 jne SHORT $LN6@stbi__pnm_ + 000cf 0f be 85 84 00 00 00 movsx eax, BYTE PTR t$[rbp] - 000d4 83 f8 35 cmp eax, 53 ; 00000035H - 000d7 74 1f je SHORT $LN5@stbi__pnm_ - 000d9 0f be 85 84 00 + 000d6 83 f8 35 cmp eax, 53 ; 00000035H + 000d9 74 20 je SHORT $LN5@stbi__pnm_ + 000db 0f be 85 84 00 00 00 movsx eax, BYTE PTR t$[rbp] - 000e0 83 f8 36 cmp eax, 54 ; 00000036H - 000e3 74 13 je SHORT $LN5@stbi__pnm_ + 000e2 83 f8 36 cmp eax, 54 ; 00000036H + 000e5 74 14 je SHORT $LN5@stbi__pnm_ $LN6@stbi__pnm_: ; 7165 : stbi__rewind(s); - 000e5 48 8b 8d 80 01 + 000e7 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000ec e8 00 00 00 00 call stbi__rewind + 000ee e8 00 00 00 00 call stbi__rewind + 000f3 90 npad 1 ; 7166 : return 0; - 000f1 33 c0 xor eax, eax - 000f3 e9 1c 01 00 00 jmp $LN1@stbi__pnm_ + 000f4 33 c0 xor eax, eax + 000f6 e9 1f 01 00 00 jmp $LN1@stbi__pnm_ $LN5@stbi__pnm_: ; 7167 : } ; 7168 : ; 7169 : *comp = (t == '6') ? 3 : 1; // '5' is 1-component .pgm; '6' is 3-component .ppm - 000f8 0f be 85 84 00 + 000fb 0f be 85 84 00 00 00 movsx eax, BYTE PTR t$[rbp] - 000ff 83 f8 36 cmp eax, 54 ; 00000036H - 00102 75 0c jne SHORT $LN14@stbi__pnm_ - 00104 c7 85 54 01 00 + 00102 83 f8 36 cmp eax, 54 ; 00000036H + 00105 75 0c jne SHORT $LN14@stbi__pnm_ + 00107 c7 85 54 01 00 00 03 00 00 00 mov DWORD PTR tv81[rbp], 3 - 0010e eb 0a jmp SHORT $LN15@stbi__pnm_ + 00111 eb 0a jmp SHORT $LN15@stbi__pnm_ $LN14@stbi__pnm_: - 00110 c7 85 54 01 00 + 00113 c7 85 54 01 00 00 01 00 00 00 mov DWORD PTR tv81[rbp], 1 $LN15@stbi__pnm_: - 0011a 48 8b 85 98 01 + 0011d 48 8b 85 98 01 00 00 mov rax, QWORD PTR comp$[rbp] - 00121 8b 8d 54 01 00 + 00124 8b 8d 54 01 00 00 mov ecx, DWORD PTR tv81[rbp] - 00127 89 08 mov DWORD PTR [rax], ecx + 0012a 89 08 mov DWORD PTR [rax], ecx ; 7170 : ; 7171 : c = (char)stbi__get8(s); - 00129 48 8b 8d 80 01 + 0012c 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00130 e8 00 00 00 00 call stbi__get8 - 00135 88 45 44 mov BYTE PTR c$[rbp], al + 00133 e8 00 00 00 00 call stbi__get8 + 00138 88 45 44 mov BYTE PTR c$[rbp], al ; 7172 : stbi__pnm_skip_whitespace(s, &c); - 00138 48 8d 55 44 lea rdx, QWORD PTR c$[rbp] - 0013c 48 8b 8d 80 01 + 0013b 48 8d 55 44 lea rdx, QWORD PTR c$[rbp] + 0013f 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00143 e8 00 00 00 00 call stbi__pnm_skip_whitespace + 00146 e8 00 00 00 00 call stbi__pnm_skip_whitespace + 0014b 90 npad 1 ; 7173 : ; 7174 : *x = stbi__pnm_getinteger(s, &c); // read width - 00148 48 8d 55 44 lea rdx, QWORD PTR c$[rbp] - 0014c 48 8b 8d 80 01 + 0014c 48 8d 55 44 lea rdx, QWORD PTR c$[rbp] + 00150 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00153 e8 00 00 00 00 call stbi__pnm_getinteger - 00158 48 8b 8d 88 01 + 00157 e8 00 00 00 00 call stbi__pnm_getinteger + 0015c 48 8b 8d 88 01 00 00 mov rcx, QWORD PTR x$[rbp] - 0015f 89 01 mov DWORD PTR [rcx], eax + 00163 89 01 mov DWORD PTR [rcx], eax ; 7175 : if (*x == 0) - 00161 48 8b 85 88 01 + 00165 48 8b 85 88 01 00 00 mov rax, QWORD PTR x$[rbp] - 00168 83 38 00 cmp DWORD PTR [rax], 0 - 0016b 75 11 jne SHORT $LN7@stbi__pnm_ + 0016c 83 38 00 cmp DWORD PTR [rax], 0 + 0016f 75 11 jne SHORT $LN7@stbi__pnm_ ; 7176 : return stbi__err("invalid width", "PPM image header had zero or overflowing width"); - 0016d 48 8d 0d 00 00 + 00171 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0O@MKGNGALN@invalid?5width@ - 00174 e8 00 00 00 00 call stbi__err - 00179 e9 96 00 00 00 jmp $LN1@stbi__pnm_ + 00178 e8 00 00 00 00 call stbi__err + 0017d e9 98 00 00 00 jmp $LN1@stbi__pnm_ $LN7@stbi__pnm_: ; 7177 : stbi__pnm_skip_whitespace(s, &c); - 0017e 48 8d 55 44 lea rdx, QWORD PTR c$[rbp] - 00182 48 8b 8d 80 01 + 00182 48 8d 55 44 lea rdx, QWORD PTR c$[rbp] + 00186 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00189 e8 00 00 00 00 call stbi__pnm_skip_whitespace + 0018d e8 00 00 00 00 call stbi__pnm_skip_whitespace + 00192 90 npad 1 ; 7178 : ; 7179 : *y = stbi__pnm_getinteger(s, &c); // read height - 0018e 48 8d 55 44 lea rdx, QWORD PTR c$[rbp] - 00192 48 8b 8d 80 01 + 00193 48 8d 55 44 lea rdx, QWORD PTR c$[rbp] + 00197 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00199 e8 00 00 00 00 call stbi__pnm_getinteger - 0019e 48 8b 8d 90 01 + 0019e e8 00 00 00 00 call stbi__pnm_getinteger + 001a3 48 8b 8d 90 01 00 00 mov rcx, QWORD PTR y$[rbp] - 001a5 89 01 mov DWORD PTR [rcx], eax + 001aa 89 01 mov DWORD PTR [rcx], eax ; 7180 : if (*y == 0) - 001a7 48 8b 85 90 01 + 001ac 48 8b 85 90 01 00 00 mov rax, QWORD PTR y$[rbp] - 001ae 83 38 00 cmp DWORD PTR [rax], 0 - 001b1 75 0e jne SHORT $LN8@stbi__pnm_ + 001b3 83 38 00 cmp DWORD PTR [rax], 0 + 001b6 75 0e jne SHORT $LN8@stbi__pnm_ ; 7181 : return stbi__err("invalid width", "PPM image header had zero or overflowing width"); - 001b3 48 8d 0d 00 00 + 001b8 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0O@MKGNGALN@invalid?5width@ - 001ba e8 00 00 00 00 call stbi__err - 001bf eb 53 jmp SHORT $LN1@stbi__pnm_ + 001bf e8 00 00 00 00 call stbi__err + 001c4 eb 54 jmp SHORT $LN1@stbi__pnm_ $LN8@stbi__pnm_: ; 7182 : stbi__pnm_skip_whitespace(s, &c); - 001c1 48 8d 55 44 lea rdx, QWORD PTR c$[rbp] - 001c5 48 8b 8d 80 01 + 001c6 48 8d 55 44 lea rdx, QWORD PTR c$[rbp] + 001ca 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001cc e8 00 00 00 00 call stbi__pnm_skip_whitespace + 001d1 e8 00 00 00 00 call stbi__pnm_skip_whitespace + 001d6 90 npad 1 ; 7183 : ; 7184 : maxv = stbi__pnm_getinteger(s, &c); // read max value - 001d1 48 8d 55 44 lea rdx, QWORD PTR c$[rbp] - 001d5 48 8b 8d 80 01 + 001d7 48 8d 55 44 lea rdx, QWORD PTR c$[rbp] + 001db 48 8b 8d 80 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001dc e8 00 00 00 00 call stbi__pnm_getinteger - 001e1 89 45 04 mov DWORD PTR maxv$[rbp], eax + 001e2 e8 00 00 00 00 call stbi__pnm_getinteger + 001e7 89 45 04 mov DWORD PTR maxv$[rbp], eax ; 7185 : if (maxv > 65535) - 001e4 81 7d 04 ff ff + 001ea 81 7d 04 ff ff 00 00 cmp DWORD PTR maxv$[rbp], 65535 ; 0000ffffH - 001eb 7e 10 jle SHORT $LN9@stbi__pnm_ + 001f1 7e 10 jle SHORT $LN9@stbi__pnm_ ; 7186 : return stbi__err("max value > 65535", "PPM image supports only 8-bit and 16-bit images"); - 001ed 48 8d 0d 00 00 + 001f3 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BC@CNFMOKHC@max?5value?5?$DO?565535@ - 001f4 e8 00 00 00 00 call stbi__err - 001f9 eb 19 jmp SHORT $LN1@stbi__pnm_ - 001fb eb 17 jmp SHORT $LN10@stbi__pnm_ + 001fa e8 00 00 00 00 call stbi__err + 001ff eb 19 jmp SHORT $LN1@stbi__pnm_ + 00201 eb 17 jmp SHORT $LN10@stbi__pnm_ $LN9@stbi__pnm_: ; 7187 : else if (maxv > 255) - 001fd 81 7d 04 ff 00 + 00203 81 7d 04 ff 00 00 00 cmp DWORD PTR maxv$[rbp], 255 ; 000000ffH - 00204 7e 09 jle SHORT $LN11@stbi__pnm_ + 0020a 7e 09 jle SHORT $LN11@stbi__pnm_ ; 7188 : return 16; - 00206 b8 10 00 00 00 mov eax, 16 - 0020b eb 07 jmp SHORT $LN1@stbi__pnm_ - 0020d eb 05 jmp SHORT $LN12@stbi__pnm_ + 0020c b8 10 00 00 00 mov eax, 16 + 00211 eb 07 jmp SHORT $LN1@stbi__pnm_ + 00213 eb 05 jmp SHORT $LN12@stbi__pnm_ $LN11@stbi__pnm_: ; 7189 : else ; 7190 : return 8; - 0020f b8 08 00 00 00 mov eax, 8 + 00215 b8 08 00 00 00 mov eax, 8 $LN12@stbi__pnm_: $LN10@stbi__pnm_: $LN1@stbi__pnm_: ; 7191 : } - 00214 48 8b f8 mov rdi, rax - 00217 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 0021b 48 8d 15 00 00 + 0021a 48 8b f8 mov rdi, rax + 0021d 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00221 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__pnm_info$rtcFrameData - 00222 e8 00 00 00 00 call _RTC_CheckStackVars - 00227 48 8b c7 mov rax, rdi - 0022a 48 8b 8d 58 01 + 00228 e8 00 00 00 00 call _RTC_CheckStackVars + 0022d 48 8b c7 mov rax, rdi + 00230 48 8b 8d 58 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00231 48 33 cd xor rcx, rbp - 00234 e8 00 00 00 00 call __security_check_cookie - 00239 48 8d a5 68 01 + 00237 48 33 cd xor rcx, rbp + 0023a e8 00 00 00 00 call __security_check_cookie + 0023f 48 8d a5 68 01 00 00 lea rsp, QWORD PTR [rbp+360] - 00240 5f pop rdi - 00241 5d pop rbp - 00242 c3 ret 0 + 00246 5f pop rdi + 00247 5d pop rbp + 00248 c3 ret 0 stbi__pnm_info ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -44738,11 +45028,11 @@ _TEXT ENDS _TEXT SEGMENT out$ = 8 tv160 = 212 -tv172 = 216 -tv154 = 216 -tv138 = 216 -tv86 = 216 tv80 = 216 +tv86 = 216 +tv138 = 216 +tv154 = 216 +tv172 = 216 s$ = 256 x$ = 264 y$ = 272 @@ -44765,370 +45055,372 @@ stbi__pnm_load PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 7076 : stbi_uc* out; ; 7077 : STBI_NOTUSED(ri); ; 7078 : ; 7079 : ri->bits_per_channel = stbi__pnm_info(s, (int*)&s->img_x, (int*)&s->img_y, (int*)&s->img_n); - 0002e 48 8b 85 00 01 + 0002f 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00035 48 83 c0 08 add rax, 8 - 00039 48 8b 8d 00 01 + 00036 48 83 c0 08 add rax, 8 + 0003a 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00040 48 83 c1 04 add rcx, 4 - 00044 48 8b 95 00 01 + 00041 48 83 c1 04 add rcx, 4 + 00045 48 8b 95 00 01 00 00 mov rdx, QWORD PTR s$[rbp] - 0004b 4c 8b c8 mov r9, rax - 0004e 4c 8b c1 mov r8, rcx - 00051 48 8b 8d 00 01 + 0004c 4c 8b c8 mov r9, rax + 0004f 4c 8b c1 mov r8, rcx + 00052 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00058 e8 00 00 00 00 call stbi__pnm_info - 0005d 48 8b 8d 28 01 + 00059 e8 00 00 00 00 call stbi__pnm_info + 0005e 48 8b 8d 28 01 00 00 mov rcx, QWORD PTR ri$[rbp] - 00064 89 01 mov DWORD PTR [rcx], eax + 00065 89 01 mov DWORD PTR [rcx], eax ; 7080 : if (ri->bits_per_channel == 0) - 00066 48 8b 85 28 01 + 00067 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 0006d 83 38 00 cmp DWORD PTR [rax], 0 - 00070 75 07 jne SHORT $LN2@stbi__pnm_ + 0006e 83 38 00 cmp DWORD PTR [rax], 0 + 00071 75 07 jne SHORT $LN2@stbi__pnm_ ; 7081 : return 0; - 00072 33 c0 xor eax, eax - 00074 e9 05 03 00 00 jmp $LN1@stbi__pnm_ + 00073 33 c0 xor eax, eax + 00075 e9 06 03 00 00 jmp $LN1@stbi__pnm_ $LN2@stbi__pnm_: ; 7082 : ; 7083 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - 00079 48 8b 85 00 01 + 0007a 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00080 81 78 04 00 00 + 00081 81 78 04 00 00 00 01 cmp DWORD PTR [rax+4], 16777216 ; 01000000H - 00087 76 34 jbe SHORT $LN3@stbi__pnm_ - 00089 48 8d 0d 00 00 + 00088 76 34 jbe SHORT $LN3@stbi__pnm_ + 0008a 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 00090 e8 00 00 00 00 call stbi__err - 00095 85 c0 test eax, eax - 00097 74 0d je SHORT $LN14@stbi__pnm_ - 00099 48 c7 85 d8 00 + 00091 e8 00 00 00 00 call stbi__err + 00096 85 c0 test eax, eax + 00098 74 0d je SHORT $LN14@stbi__pnm_ + 0009a 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv80[rbp], 0 - 000a4 eb 0b jmp SHORT $LN15@stbi__pnm_ + 000a5 eb 0b jmp SHORT $LN15@stbi__pnm_ $LN14@stbi__pnm_: - 000a6 48 c7 85 d8 00 + 000a7 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv80[rbp], 0 $LN15@stbi__pnm_: - 000b1 48 8b 85 d8 00 + 000b2 48 8b 85 d8 00 00 00 mov rax, QWORD PTR tv80[rbp] - 000b8 e9 c1 02 00 00 jmp $LN1@stbi__pnm_ + 000b9 e9 c2 02 00 00 jmp $LN1@stbi__pnm_ $LN3@stbi__pnm_: ; 7084 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - 000bd 48 8b 85 00 01 + 000be 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 000c4 81 38 00 00 00 + 000c5 81 38 00 00 00 01 cmp DWORD PTR [rax], 16777216 ; 01000000H - 000ca 76 34 jbe SHORT $LN4@stbi__pnm_ - 000cc 48 8d 0d 00 00 + 000cb 76 34 jbe SHORT $LN4@stbi__pnm_ + 000cd 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 000d3 e8 00 00 00 00 call stbi__err - 000d8 85 c0 test eax, eax - 000da 74 0d je SHORT $LN16@stbi__pnm_ - 000dc 48 c7 85 d8 00 + 000d4 e8 00 00 00 00 call stbi__err + 000d9 85 c0 test eax, eax + 000db 74 0d je SHORT $LN16@stbi__pnm_ + 000dd 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv86[rbp], 0 - 000e7 eb 0b jmp SHORT $LN17@stbi__pnm_ + 000e8 eb 0b jmp SHORT $LN17@stbi__pnm_ $LN16@stbi__pnm_: - 000e9 48 c7 85 d8 00 + 000ea 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv86[rbp], 0 $LN17@stbi__pnm_: - 000f4 48 8b 85 d8 00 + 000f5 48 8b 85 d8 00 00 00 mov rax, QWORD PTR tv86[rbp] - 000fb e9 7e 02 00 00 jmp $LN1@stbi__pnm_ + 000fc e9 7f 02 00 00 jmp $LN1@stbi__pnm_ $LN4@stbi__pnm_: ; 7085 : ; 7086 : *x = s->img_x; - 00100 48 8b 85 08 01 + 00101 48 8b 85 08 01 00 00 mov rax, QWORD PTR x$[rbp] - 00107 48 8b 8d 00 01 + 00108 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0010e 8b 09 mov ecx, DWORD PTR [rcx] - 00110 89 08 mov DWORD PTR [rax], ecx + 0010f 8b 09 mov ecx, DWORD PTR [rcx] + 00111 89 08 mov DWORD PTR [rax], ecx ; 7087 : *y = s->img_y; - 00112 48 8b 85 10 01 + 00113 48 8b 85 10 01 00 00 mov rax, QWORD PTR y$[rbp] - 00119 48 8b 8d 00 01 + 0011a 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00120 8b 49 04 mov ecx, DWORD PTR [rcx+4] - 00123 89 08 mov DWORD PTR [rax], ecx + 00121 8b 49 04 mov ecx, DWORD PTR [rcx+4] + 00124 89 08 mov DWORD PTR [rax], ecx ; 7088 : if (comp) *comp = s->img_n; - 00125 48 83 bd 18 01 + 00126 48 83 bd 18 01 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 0012d 74 13 je SHORT $LN5@stbi__pnm_ - 0012f 48 8b 85 18 01 + 0012e 74 13 je SHORT $LN5@stbi__pnm_ + 00130 48 8b 85 18 01 00 00 mov rax, QWORD PTR comp$[rbp] - 00136 48 8b 8d 00 01 + 00137 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0013d 8b 49 08 mov ecx, DWORD PTR [rcx+8] - 00140 89 08 mov DWORD PTR [rax], ecx + 0013e 8b 49 08 mov ecx, DWORD PTR [rcx+8] + 00141 89 08 mov DWORD PTR [rax], ecx $LN5@stbi__pnm_: ; 7089 : ; 7090 : if (!stbi__mad4sizes_valid(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0)) - 00142 48 8b 85 28 01 + 00143 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 00149 8b 00 mov eax, DWORD PTR [rax] - 0014b 99 cdq - 0014c 83 e2 07 and edx, 7 - 0014f 03 c2 add eax, edx - 00151 c1 f8 03 sar eax, 3 - 00154 c7 44 24 20 00 + 0014a 8b 00 mov eax, DWORD PTR [rax] + 0014c 99 cdq + 0014d 83 e2 07 and edx, 7 + 00150 03 c2 add eax, edx + 00152 c1 f8 03 sar eax, 3 + 00155 c7 44 24 20 00 00 00 00 mov DWORD PTR [rsp+32], 0 - 0015c 44 8b c8 mov r9d, eax - 0015f 48 8b 85 00 01 + 0015d 44 8b c8 mov r9d, eax + 00160 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00166 44 8b 40 04 mov r8d, DWORD PTR [rax+4] - 0016a 48 8b 85 00 01 + 00167 44 8b 40 04 mov r8d, DWORD PTR [rax+4] + 0016b 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00171 8b 10 mov edx, DWORD PTR [rax] - 00173 48 8b 85 00 01 + 00172 8b 10 mov edx, DWORD PTR [rax] + 00174 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 0017a 8b 48 08 mov ecx, DWORD PTR [rax+8] - 0017d e8 00 00 00 00 call stbi__mad4sizes_valid - 00182 85 c0 test eax, eax - 00184 75 34 jne SHORT $LN6@stbi__pnm_ + 0017b 8b 48 08 mov ecx, DWORD PTR [rax+8] + 0017e e8 00 00 00 00 call stbi__mad4sizes_valid + 00183 85 c0 test eax, eax + 00185 75 34 jne SHORT $LN6@stbi__pnm_ ; 7091 : return stbi__errpuc("too large", "PNM too large"); - 00186 48 8d 0d 00 00 + 00187 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 0018d e8 00 00 00 00 call stbi__err - 00192 85 c0 test eax, eax - 00194 74 0d je SHORT $LN18@stbi__pnm_ - 00196 48 c7 85 d8 00 + 0018e e8 00 00 00 00 call stbi__err + 00193 85 c0 test eax, eax + 00195 74 0d je SHORT $LN18@stbi__pnm_ + 00197 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv138[rbp], 0 - 001a1 eb 0b jmp SHORT $LN19@stbi__pnm_ + 001a2 eb 0b jmp SHORT $LN19@stbi__pnm_ $LN18@stbi__pnm_: - 001a3 48 c7 85 d8 00 + 001a4 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv138[rbp], 0 $LN19@stbi__pnm_: - 001ae 48 8b 85 d8 00 + 001af 48 8b 85 d8 00 00 00 mov rax, QWORD PTR tv138[rbp] - 001b5 e9 c4 01 00 00 jmp $LN1@stbi__pnm_ + 001b6 e9 c5 01 00 00 jmp $LN1@stbi__pnm_ $LN6@stbi__pnm_: ; 7092 : ; 7093 : out = (stbi_uc*)stbi__malloc_mad4(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0); - 001ba 48 8b 85 28 01 + 001bb 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 001c1 8b 00 mov eax, DWORD PTR [rax] - 001c3 99 cdq - 001c4 83 e2 07 and edx, 7 - 001c7 03 c2 add eax, edx - 001c9 c1 f8 03 sar eax, 3 - 001cc c7 44 24 20 00 + 001c2 8b 00 mov eax, DWORD PTR [rax] + 001c4 99 cdq + 001c5 83 e2 07 and edx, 7 + 001c8 03 c2 add eax, edx + 001ca c1 f8 03 sar eax, 3 + 001cd c7 44 24 20 00 00 00 00 mov DWORD PTR [rsp+32], 0 - 001d4 44 8b c8 mov r9d, eax - 001d7 48 8b 85 00 01 + 001d5 44 8b c8 mov r9d, eax + 001d8 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 001de 44 8b 40 04 mov r8d, DWORD PTR [rax+4] - 001e2 48 8b 85 00 01 + 001df 44 8b 40 04 mov r8d, DWORD PTR [rax+4] + 001e3 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 001e9 8b 10 mov edx, DWORD PTR [rax] - 001eb 48 8b 85 00 01 + 001ea 8b 10 mov edx, DWORD PTR [rax] + 001ec 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 001f2 8b 48 08 mov ecx, DWORD PTR [rax+8] - 001f5 e8 00 00 00 00 call stbi__malloc_mad4 - 001fa 48 89 45 08 mov QWORD PTR out$[rbp], rax + 001f3 8b 48 08 mov ecx, DWORD PTR [rax+8] + 001f6 e8 00 00 00 00 call stbi__malloc_mad4 + 001fb 48 89 45 08 mov QWORD PTR out$[rbp], rax ; 7094 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); - 001fe 48 83 7d 08 00 cmp QWORD PTR out$[rbp], 0 - 00203 75 34 jne SHORT $LN7@stbi__pnm_ - 00205 48 8d 0d 00 00 + 001ff 48 83 7d 08 00 cmp QWORD PTR out$[rbp], 0 + 00204 75 34 jne SHORT $LN7@stbi__pnm_ + 00206 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 0020c e8 00 00 00 00 call stbi__err - 00211 85 c0 test eax, eax - 00213 74 0d je SHORT $LN20@stbi__pnm_ - 00215 48 c7 85 d8 00 + 0020d e8 00 00 00 00 call stbi__err + 00212 85 c0 test eax, eax + 00214 74 0d je SHORT $LN20@stbi__pnm_ + 00216 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv154[rbp], 0 - 00220 eb 0b jmp SHORT $LN21@stbi__pnm_ + 00221 eb 0b jmp SHORT $LN21@stbi__pnm_ $LN20@stbi__pnm_: - 00222 48 c7 85 d8 00 + 00223 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv154[rbp], 0 $LN21@stbi__pnm_: - 0022d 48 8b 85 d8 00 + 0022e 48 8b 85 d8 00 00 00 mov rax, QWORD PTR tv154[rbp] - 00234 e9 45 01 00 00 jmp $LN1@stbi__pnm_ + 00235 e9 46 01 00 00 jmp $LN1@stbi__pnm_ $LN7@stbi__pnm_: ; 7095 : if (!stbi__getn(s, out, s->img_n * s->img_x * s->img_y * (ri->bits_per_channel / 8))) { - 00239 48 8b 85 00 01 + 0023a 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00240 48 8b 8d 00 01 + 00241 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00247 8b 40 08 mov eax, DWORD PTR [rax+8] - 0024a 0f af 01 imul eax, DWORD PTR [rcx] - 0024d 48 8b 8d 00 01 + 00248 8b 40 08 mov eax, DWORD PTR [rax+8] + 0024b 0f af 01 imul eax, DWORD PTR [rcx] + 0024e 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00254 0f af 41 04 imul eax, DWORD PTR [rcx+4] - 00258 89 85 d4 00 00 + 00255 0f af 41 04 imul eax, DWORD PTR [rcx+4] + 00259 89 85 d4 00 00 00 mov DWORD PTR tv160[rbp], eax - 0025e 48 8b 8d 28 01 + 0025f 48 8b 8d 28 01 00 00 mov rcx, QWORD PTR ri$[rbp] - 00265 8b 01 mov eax, DWORD PTR [rcx] - 00267 99 cdq - 00268 83 e2 07 and edx, 7 - 0026b 03 c2 add eax, edx - 0026d c1 f8 03 sar eax, 3 - 00270 8b 8d d4 00 00 + 00266 8b 01 mov eax, DWORD PTR [rcx] + 00268 99 cdq + 00269 83 e2 07 and edx, 7 + 0026c 03 c2 add eax, edx + 0026e c1 f8 03 sar eax, 3 + 00271 8b 8d d4 00 00 00 mov ecx, DWORD PTR tv160[rbp] - 00276 0f af c8 imul ecx, eax - 00279 8b c1 mov eax, ecx - 0027b 44 8b c0 mov r8d, eax - 0027e 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] - 00282 48 8b 8d 00 01 + 00277 0f af c8 imul ecx, eax + 0027a 8b c1 mov eax, ecx + 0027c 44 8b c0 mov r8d, eax + 0027f 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] + 00283 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00289 e8 00 00 00 00 call stbi__getn - 0028e 85 c0 test eax, eax - 00290 75 3e jne SHORT $LN8@stbi__pnm_ + 0028a e8 00 00 00 00 call stbi__getn + 0028f 85 c0 test eax, eax + 00291 75 3f jne SHORT $LN8@stbi__pnm_ ; 7096 : STBI_FREE(out); - 00292 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 00296 ff 15 00 00 00 + 00293 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 00297 ff 15 00 00 00 00 call QWORD PTR __imp_free + 0029d 90 npad 1 ; 7097 : return stbi__errpuc("bad PNM", "PNM file truncated"); - 0029c 48 8d 0d 00 00 + 0029e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07IDKIDMGJ@bad?5PNM@ - 002a3 e8 00 00 00 00 call stbi__err - 002a8 85 c0 test eax, eax - 002aa 74 0d je SHORT $LN22@stbi__pnm_ - 002ac 48 c7 85 d8 00 + 002a5 e8 00 00 00 00 call stbi__err + 002aa 85 c0 test eax, eax + 002ac 74 0d je SHORT $LN22@stbi__pnm_ + 002ae 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv172[rbp], 0 - 002b7 eb 0b jmp SHORT $LN23@stbi__pnm_ + 002b9 eb 0b jmp SHORT $LN23@stbi__pnm_ $LN22@stbi__pnm_: - 002b9 48 c7 85 d8 00 + 002bb 48 c7 85 d8 00 00 00 00 00 00 00 mov QWORD PTR tv172[rbp], 0 $LN23@stbi__pnm_: - 002c4 48 8b 85 d8 00 + 002c6 48 8b 85 d8 00 00 00 mov rax, QWORD PTR tv172[rbp] - 002cb e9 ae 00 00 00 jmp $LN1@stbi__pnm_ + 002cd e9 ae 00 00 00 jmp $LN1@stbi__pnm_ $LN8@stbi__pnm_: ; 7098 : } ; 7099 : ; 7100 : if (req_comp && req_comp != s->img_n) { - 002d0 83 bd 20 01 00 + 002d2 83 bd 20 01 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 002d7 0f 84 9d 00 00 + 002d9 0f 84 9d 00 00 00 je $LN9@stbi__pnm_ - 002dd 48 8b 85 00 01 + 002df 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 002e4 8b 40 08 mov eax, DWORD PTR [rax+8] - 002e7 39 85 20 01 00 + 002e6 8b 40 08 mov eax, DWORD PTR [rax+8] + 002e9 39 85 20 01 00 00 cmp DWORD PTR req_comp$[rbp], eax - 002ed 0f 84 87 00 00 + 002ef 0f 84 87 00 00 00 je $LN9@stbi__pnm_ ; 7101 : if (ri->bits_per_channel == 16) { - 002f3 48 8b 85 28 01 + 002f5 48 8b 85 28 01 00 00 mov rax, QWORD PTR ri$[rbp] - 002fa 83 38 10 cmp DWORD PTR [rax], 16 - 002fd 75 38 jne SHORT $LN10@stbi__pnm_ + 002fc 83 38 10 cmp DWORD PTR [rax], 16 + 002ff 75 38 jne SHORT $LN10@stbi__pnm_ ; 7102 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, s->img_n, req_comp, s->img_x, s->img_y); - 002ff 48 8b 85 00 01 + 00301 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00306 8b 40 04 mov eax, DWORD PTR [rax+4] - 00309 89 44 24 20 mov DWORD PTR [rsp+32], eax - 0030d 48 8b 85 00 01 + 00308 8b 40 04 mov eax, DWORD PTR [rax+4] + 0030b 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0030f 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00314 44 8b 08 mov r9d, DWORD PTR [rax] - 00317 44 8b 85 20 01 + 00316 44 8b 08 mov r9d, DWORD PTR [rax] + 00319 44 8b 85 20 01 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 0031e 48 8b 85 00 01 + 00320 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00325 8b 50 08 mov edx, DWORD PTR [rax+8] - 00328 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 0032c e8 00 00 00 00 call stbi__convert_format16 - 00331 48 89 45 08 mov QWORD PTR out$[rbp], rax + 00327 8b 50 08 mov edx, DWORD PTR [rax+8] + 0032a 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 0032e e8 00 00 00 00 call stbi__convert_format16 + 00333 48 89 45 08 mov QWORD PTR out$[rbp], rax ; 7103 : } - 00335 eb 36 jmp SHORT $LN11@stbi__pnm_ + 00337 eb 36 jmp SHORT $LN11@stbi__pnm_ $LN10@stbi__pnm_: ; 7104 : else { ; 7105 : out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y); - 00337 48 8b 85 00 01 + 00339 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 0033e 8b 40 04 mov eax, DWORD PTR [rax+4] - 00341 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00345 48 8b 85 00 01 + 00340 8b 40 04 mov eax, DWORD PTR [rax+4] + 00343 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00347 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 0034c 44 8b 08 mov r9d, DWORD PTR [rax] - 0034f 44 8b 85 20 01 + 0034e 44 8b 08 mov r9d, DWORD PTR [rax] + 00351 44 8b 85 20 01 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 00356 48 8b 85 00 01 + 00358 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 0035d 8b 50 08 mov edx, DWORD PTR [rax+8] - 00360 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 00364 e8 00 00 00 00 call stbi__convert_format - 00369 48 89 45 08 mov QWORD PTR out$[rbp], rax + 0035f 8b 50 08 mov edx, DWORD PTR [rax+8] + 00362 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 00366 e8 00 00 00 00 call stbi__convert_format + 0036b 48 89 45 08 mov QWORD PTR out$[rbp], rax $LN11@stbi__pnm_: ; 7106 : } ; 7107 : if (out == NULL) return out; // stbi__convert_format frees input on failure - 0036d 48 83 7d 08 00 cmp QWORD PTR out$[rbp], 0 - 00372 75 06 jne SHORT $LN12@stbi__pnm_ - 00374 48 8b 45 08 mov rax, QWORD PTR out$[rbp] - 00378 eb 04 jmp SHORT $LN1@stbi__pnm_ + 0036f 48 83 7d 08 00 cmp QWORD PTR out$[rbp], 0 + 00374 75 06 jne SHORT $LN12@stbi__pnm_ + 00376 48 8b 45 08 mov rax, QWORD PTR out$[rbp] + 0037a eb 04 jmp SHORT $LN1@stbi__pnm_ $LN12@stbi__pnm_: $LN9@stbi__pnm_: ; 7108 : } ; 7109 : return out; - 0037a 48 8b 45 08 mov rax, QWORD PTR out$[rbp] + 0037c 48 8b 45 08 mov rax, QWORD PTR out$[rbp] $LN1@stbi__pnm_: ; 7110 : } - 0037e 48 8d a5 e8 00 + 00380 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00385 5f pop rdi - 00386 5d pop rbp - 00387 c3 ret 0 + 00387 5f pop rdi + 00388 5d pop rbp + 00389 c3 ret 0 stbi__pnm_load ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -45151,60 +45443,62 @@ stbi__pnm_test PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 7064 : char p, t; ; 7065 : p = (char)stbi__get8(s); - 0001f 48 8b 8d 20 01 + 00020 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__get8 - 0002b 88 45 04 mov BYTE PTR p$[rbp], al + 00027 e8 00 00 00 00 call stbi__get8 + 0002c 88 45 04 mov BYTE PTR p$[rbp], al ; 7066 : t = (char)stbi__get8(s); - 0002e 48 8b 8d 20 01 + 0002f 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00035 e8 00 00 00 00 call stbi__get8 - 0003a 88 45 24 mov BYTE PTR t$[rbp], al + 00036 e8 00 00 00 00 call stbi__get8 + 0003b 88 45 24 mov BYTE PTR t$[rbp], al ; 7067 : if (p != 'P' || (t != '5' && t != '6')) { - 0003d 0f be 45 04 movsx eax, BYTE PTR p$[rbp] - 00041 83 f8 50 cmp eax, 80 ; 00000050H - 00044 75 12 jne SHORT $LN3@stbi__pnm_ - 00046 0f be 45 24 movsx eax, BYTE PTR t$[rbp] - 0004a 83 f8 35 cmp eax, 53 ; 00000035H - 0004d 74 19 je SHORT $LN2@stbi__pnm_ - 0004f 0f be 45 24 movsx eax, BYTE PTR t$[rbp] - 00053 83 f8 36 cmp eax, 54 ; 00000036H - 00056 74 10 je SHORT $LN2@stbi__pnm_ + 0003e 0f be 45 04 movsx eax, BYTE PTR p$[rbp] + 00042 83 f8 50 cmp eax, 80 ; 00000050H + 00045 75 12 jne SHORT $LN3@stbi__pnm_ + 00047 0f be 45 24 movsx eax, BYTE PTR t$[rbp] + 0004b 83 f8 35 cmp eax, 53 ; 00000035H + 0004e 74 1a je SHORT $LN2@stbi__pnm_ + 00050 0f be 45 24 movsx eax, BYTE PTR t$[rbp] + 00054 83 f8 36 cmp eax, 54 ; 00000036H + 00057 74 11 je SHORT $LN2@stbi__pnm_ $LN3@stbi__pnm_: ; 7068 : stbi__rewind(s); - 00058 48 8b 8d 20 01 + 00059 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0005f e8 00 00 00 00 call stbi__rewind + 00060 e8 00 00 00 00 call stbi__rewind + 00065 90 npad 1 ; 7069 : return 0; - 00064 33 c0 xor eax, eax - 00066 eb 05 jmp SHORT $LN1@stbi__pnm_ + 00066 33 c0 xor eax, eax + 00068 eb 05 jmp SHORT $LN1@stbi__pnm_ $LN2@stbi__pnm_: ; 7070 : } ; 7071 : return 1; - 00068 b8 01 00 00 00 mov eax, 1 + 0006a b8 01 00 00 00 mov eax, 1 $LN1@stbi__pnm_: ; 7072 : } - 0006d 48 8d a5 08 01 + 0006f 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 00074 5f pop rdi - 00075 5d pop rbp - 00076 c3 ret 0 + 00076 5f pop rdi + 00077 5d pop rbp + 00078 c3 ret 0 stbi__pnm_test ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -45231,26 +45525,27 @@ stbi__gif_info PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 6644 : return stbi__gif_info_raw(s, x, y, comp); - 0002e 4c 8b 8d f8 00 + 0002f 4c 8b 8d f8 00 00 00 mov r9, QWORD PTR comp$[rbp] - 00035 4c 8b 85 f0 00 + 00036 4c 8b 85 f0 00 00 00 mov r8, QWORD PTR y$[rbp] - 0003c 48 8b 95 e8 00 + 0003d 48 8b 95 e8 00 00 00 mov rdx, QWORD PTR x$[rbp] - 00043 48 8b 8d e0 00 + 00044 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 0004a e8 00 00 00 00 call stbi__gif_info_raw + 0004b e8 00 00 00 00 call stbi__gif_info_raw ; 6645 : } - 0004f 48 8d a5 c8 00 + 00050 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00056 5f pop rdi - 00057 5d pop rbp - 00058 c3 ret 0 + 00057 5f pop rdi + 00058 5d pop rbp + 00059 c3 ret 0 stbi__gif_info ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -45267,8 +45562,8 @@ out_size$10 = 35124 delays_size$11 = 35156 tmp$12 = 35192 new_delays$13 = 35224 -tv209 = 36776 -tv136 = 36776 +tv137 = 36776 +tv211 = 36776 __$ArrayPad$ = 36784 s$ = 36832 delays$ = 36840 @@ -45305,46 +45600,47 @@ stbi__load_gif_main PROC ; COMDAT 00052 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00059 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0005e 90 npad 1 ; 6527 : if (stbi__gif_test(s)) { - 0005e 48 8b 8d e0 8f + 0005f 48 8b 8d e0 8f 00 00 mov rcx, QWORD PTR s$[rbp] - 00065 e8 00 00 00 00 call stbi__gif_test - 0006a 85 c0 test eax, eax - 0006c 0f 84 94 03 00 + 00066 e8 00 00 00 00 call stbi__gif_test + 0006b 85 c0 test eax, eax + 0006d 0f 84 9a 03 00 00 je $LN5@stbi__load ; 6528 : int layers = 0; - 00072 c7 45 04 00 00 + 00073 c7 45 04 00 00 00 00 mov DWORD PTR layers$4[rbp], 0 ; 6529 : stbi_uc* u = 0; - 00079 48 c7 45 28 00 + 0007a 48 c7 45 28 00 00 00 00 mov QWORD PTR u$5[rbp], 0 ; 6530 : stbi_uc* out = 0; - 00081 48 c7 45 48 00 + 00082 48 c7 45 48 00 00 00 00 mov QWORD PTR out$6[rbp], 0 ; 6531 : stbi_uc* two_back = 0; - 00089 48 c7 45 68 00 + 0008a 48 c7 45 68 00 00 00 00 mov QWORD PTR two_back$7[rbp], 0 ; 6532 : stbi__gif g; ; 6533 : int stride; ; 6534 : int out_size = 0; - 00091 c7 85 34 89 00 + 00092 c7 85 34 89 00 00 00 00 00 00 mov DWORD PTR out_size$10[rbp], 0 ; 6535 : int delays_size = 0; - 0009b c7 85 54 89 00 + 0009c c7 85 54 89 00 00 00 00 00 00 mov DWORD PTR delays_size$11[rbp], 0 ; 6536 : @@ -45353,24 +45649,25 @@ stbi__load_gif_main PROC ; COMDAT ; 6539 : ; 6540 : memset(&g, 0, sizeof(g)); - 000a5 41 b8 70 88 00 + 000a6 41 b8 70 88 00 00 mov r8d, 34928 ; 00008870H - 000ab 33 d2 xor edx, edx - 000ad 48 8d 8d 90 00 + 000ac 33 d2 xor edx, edx + 000ae 48 8d 8d 90 00 00 00 lea rcx, QWORD PTR g$8[rbp] - 000b4 e8 00 00 00 00 call memset + 000b5 e8 00 00 00 00 call memset + 000ba 90 npad 1 ; 6541 : if (delays) { - 000b9 48 83 bd e8 8f + 000bb 48 83 bd e8 8f 00 00 00 cmp QWORD PTR delays$[rbp], 0 - 000c1 74 0e je SHORT $LN7@stbi__load + 000c3 74 0e je SHORT $LN7@stbi__load ; 6542 : *delays = 0; - 000c3 48 8b 85 e8 8f + 000c5 48 8b 85 e8 8f 00 00 mov rax, QWORD PTR delays$[rbp] - 000ca 48 c7 00 00 00 + 000cc 48 c7 00 00 00 00 00 mov QWORD PTR [rax], 0 $LN7@stbi__load: $LN4@stbi__load: @@ -45380,122 +45677,122 @@ $LN4@stbi__load: ; 6545 : do { ; 6546 : u = stbi__gif_load_next(s, &g, comp, req_comp, two_back); - 000d1 48 8b 45 68 mov rax, QWORD PTR two_back$7[rbp] - 000d5 48 89 44 24 20 mov QWORD PTR [rsp+32], rax - 000da 44 8b 8d 10 90 + 000d3 48 8b 45 68 mov rax, QWORD PTR two_back$7[rbp] + 000d7 48 89 44 24 20 mov QWORD PTR [rsp+32], rax + 000dc 44 8b 8d 10 90 00 00 mov r9d, DWORD PTR req_comp$[rbp] - 000e1 4c 8b 85 08 90 + 000e3 4c 8b 85 08 90 00 00 mov r8, QWORD PTR comp$[rbp] - 000e8 48 8d 95 90 00 + 000ea 48 8d 95 90 00 00 00 lea rdx, QWORD PTR g$8[rbp] - 000ef 48 8b 8d e0 8f + 000f1 48 8b 8d e0 8f 00 00 mov rcx, QWORD PTR s$[rbp] - 000f6 e8 00 00 00 00 call stbi__gif_load_next - 000fb 48 89 45 28 mov QWORD PTR u$5[rbp], rax + 000f8 e8 00 00 00 00 call stbi__gif_load_next + 000fd 48 89 45 28 mov QWORD PTR u$5[rbp], rax ; 6547 : if (u == (stbi_uc*)s) u = 0; // end of animated gif marker - 000ff 48 8b 85 e0 8f + 00101 48 8b 85 e0 8f 00 00 mov rax, QWORD PTR s$[rbp] - 00106 48 39 45 28 cmp QWORD PTR u$5[rbp], rax - 0010a 75 08 jne SHORT $LN8@stbi__load - 0010c 48 c7 45 28 00 + 00108 48 39 45 28 cmp QWORD PTR u$5[rbp], rax + 0010c 75 08 jne SHORT $LN8@stbi__load + 0010e 48 c7 45 28 00 00 00 00 mov QWORD PTR u$5[rbp], 0 $LN8@stbi__load: ; 6548 : ; 6549 : if (u) { - 00114 48 83 7d 28 00 cmp QWORD PTR u$5[rbp], 0 - 00119 0f 84 5f 02 00 + 00116 48 83 7d 28 00 cmp QWORD PTR u$5[rbp], 0 + 0011b 0f 84 61 02 00 00 je $LN9@stbi__load ; 6550 : *x = g.w; - 0011f 48 8b 85 f0 8f + 00121 48 8b 85 f0 8f 00 00 mov rax, QWORD PTR x$[rbp] - 00126 8b 8d 90 00 00 + 00128 8b 8d 90 00 00 00 mov ecx, DWORD PTR g$8[rbp] - 0012c 89 08 mov DWORD PTR [rax], ecx + 0012e 89 08 mov DWORD PTR [rax], ecx ; 6551 : *y = g.h; - 0012e 48 8b 85 f8 8f + 00130 48 8b 85 f8 8f 00 00 mov rax, QWORD PTR y$[rbp] - 00135 8b 8d 94 00 00 + 00137 8b 8d 94 00 00 00 mov ecx, DWORD PTR g$8[rbp+4] - 0013b 89 08 mov DWORD PTR [rax], ecx + 0013d 89 08 mov DWORD PTR [rax], ecx ; 6552 : ++layers; - 0013d 8b 45 04 mov eax, DWORD PTR layers$4[rbp] - 00140 ff c0 inc eax - 00142 89 45 04 mov DWORD PTR layers$4[rbp], eax + 0013f 8b 45 04 mov eax, DWORD PTR layers$4[rbp] + 00142 ff c0 inc eax + 00144 89 45 04 mov DWORD PTR layers$4[rbp], eax ; 6553 : stride = g.w * g.h * 4; - 00145 8b 85 90 00 00 + 00147 8b 85 90 00 00 00 mov eax, DWORD PTR g$8[rbp] - 0014b 0f af 85 94 00 + 0014d 0f af 85 94 00 00 00 imul eax, DWORD PTR g$8[rbp+4] - 00152 c1 e0 02 shl eax, 2 - 00155 89 85 14 89 00 + 00154 c1 e0 02 shl eax, 2 + 00157 89 85 14 89 00 00 mov DWORD PTR stride$9[rbp], eax ; 6554 : ; 6555 : if (out) { - 0015b 48 83 7d 48 00 cmp QWORD PTR out$6[rbp], 0 - 00160 0f 84 04 01 00 + 0015d 48 83 7d 48 00 cmp QWORD PTR out$6[rbp], 0 + 00162 0f 84 05 01 00 00 je $LN10@stbi__load ; 6556 : void* tmp = (stbi_uc*)STBI_REALLOC_SIZED(out, out_size, layers * stride); - 00166 8b 85 14 89 00 - 00 mov eax, DWORD PTR stride$9[rbp] - 0016c f7 65 04 mul DWORD PTR layers$4[rbp] - 0016f 8b c0 mov eax, eax - 00171 48 c7 c1 ff ff + 00168 8b 45 04 mov eax, DWORD PTR layers$4[rbp] + 0016b 0f af 85 14 89 + 00 00 imul eax, DWORD PTR stride$9[rbp] + 00172 48 98 cdqe + 00174 48 c7 c1 ff ff ff ff mov rcx, -1 - 00178 48 0f 40 c1 cmovo rax, rcx - 0017c 48 8b d0 mov rdx, rax - 0017f 48 8b 4d 48 mov rcx, QWORD PTR out$6[rbp] - 00183 ff 15 00 00 00 + 0017b 48 0f 40 c1 cmovo rax, rcx + 0017f 48 8b d0 mov rdx, rax + 00182 48 8b 4d 48 mov rcx, QWORD PTR out$6[rbp] + 00186 ff 15 00 00 00 00 call QWORD PTR __imp_realloc - 00189 48 89 85 78 89 + 0018c 48 89 85 78 89 00 00 mov QWORD PTR tmp$12[rbp], rax ; 6557 : if (!tmp) - 00190 48 83 bd 78 89 + 00193 48 83 bd 78 89 00 00 00 cmp QWORD PTR tmp$12[rbp], 0 - 00198 75 1e jne SHORT $LN12@stbi__load + 0019b 75 1e jne SHORT $LN12@stbi__load ; 6558 : return stbi__load_gif_main_outofmem(&g, out, delays); - 0019a 4c 8b 85 e8 8f + 0019d 4c 8b 85 e8 8f 00 00 mov r8, QWORD PTR delays$[rbp] - 001a1 48 8b 55 48 mov rdx, QWORD PTR out$6[rbp] - 001a5 48 8d 8d 90 00 + 001a4 48 8b 55 48 mov rdx, QWORD PTR out$6[rbp] + 001a8 48 8d 8d 90 00 00 00 lea rcx, QWORD PTR g$8[rbp] - 001ac e8 00 00 00 00 call stbi__load_gif_main_outofmem - 001b1 e9 7f 02 00 00 jmp $LN1@stbi__load - 001b6 eb 1b jmp SHORT $LN13@stbi__load + 001af e8 00 00 00 00 call stbi__load_gif_main_outofmem + 001b4 e9 83 02 00 00 jmp $LN1@stbi__load + 001b9 eb 1b jmp SHORT $LN13@stbi__load $LN12@stbi__load: ; 6559 : else { ; 6560 : out = (stbi_uc*)tmp; - 001b8 48 8b 85 78 89 + 001bb 48 8b 85 78 89 00 00 mov rax, QWORD PTR tmp$12[rbp] - 001bf 48 89 45 48 mov QWORD PTR out$6[rbp], rax + 001c2 48 89 45 48 mov QWORD PTR out$6[rbp], rax ; 6561 : out_size = layers * stride; - 001c3 8b 45 04 mov eax, DWORD PTR layers$4[rbp] - 001c6 0f af 85 14 89 + 001c6 8b 45 04 mov eax, DWORD PTR layers$4[rbp] + 001c9 0f af 85 14 89 00 00 imul eax, DWORD PTR stride$9[rbp] - 001cd 89 85 34 89 00 + 001d0 89 85 34 89 00 00 mov DWORD PTR out_size$10[rbp], eax $LN13@stbi__load: @@ -45503,145 +45800,145 @@ $LN13@stbi__load: ; 6563 : ; 6564 : if (delays) { - 001d3 48 83 bd e8 8f + 001d6 48 83 bd e8 8f 00 00 00 cmp QWORD PTR delays$[rbp], 0 - 001db 0f 84 84 00 00 + 001de 0f 84 84 00 00 00 je $LN14@stbi__load ; 6565 : int* new_delays = (int*)STBI_REALLOC_SIZED(*delays, delays_size, sizeof(int) * layers); - 001e1 48 63 45 04 movsxd rax, DWORD PTR layers$4[rbp] - 001e5 48 89 85 a8 8f - 00 00 mov QWORD PTR tv136[rbp], rax - 001ec b8 04 00 00 00 mov eax, 4 - 001f1 48 8b 8d a8 8f - 00 00 mov rcx, QWORD PTR tv136[rbp] - 001f8 48 f7 e1 mul rcx - 001fb 48 c7 c1 ff ff + 001e4 48 63 45 04 movsxd rax, DWORD PTR layers$4[rbp] + 001e8 48 89 85 a8 8f + 00 00 mov QWORD PTR tv137[rbp], rax + 001ef b8 04 00 00 00 mov eax, 4 + 001f4 48 8b 8d a8 8f + 00 00 mov rcx, QWORD PTR tv137[rbp] + 001fb 48 f7 e1 mul rcx + 001fe 48 c7 c1 ff ff ff ff mov rcx, -1 - 00202 48 0f 40 c1 cmovo rax, rcx - 00206 48 8b d0 mov rdx, rax - 00209 48 8b 85 e8 8f + 00205 48 0f 42 c1 cmovb rax, rcx + 00209 48 8b d0 mov rdx, rax + 0020c 48 8b 85 e8 8f 00 00 mov rax, QWORD PTR delays$[rbp] - 00210 48 8b 08 mov rcx, QWORD PTR [rax] - 00213 ff 15 00 00 00 + 00213 48 8b 08 mov rcx, QWORD PTR [rax] + 00216 ff 15 00 00 00 00 call QWORD PTR __imp_realloc - 00219 48 89 85 98 89 + 0021c 48 89 85 98 89 00 00 mov QWORD PTR new_delays$13[rbp], rax ; 6566 : if (!new_delays) - 00220 48 83 bd 98 89 + 00223 48 83 bd 98 89 00 00 00 cmp QWORD PTR new_delays$13[rbp], 0 - 00228 75 1c jne SHORT $LN15@stbi__load + 0022b 75 1c jne SHORT $LN15@stbi__load ; 6567 : return stbi__load_gif_main_outofmem(&g, out, delays); - 0022a 4c 8b 85 e8 8f + 0022d 4c 8b 85 e8 8f 00 00 mov r8, QWORD PTR delays$[rbp] - 00231 48 8b 55 48 mov rdx, QWORD PTR out$6[rbp] - 00235 48 8d 8d 90 00 + 00234 48 8b 55 48 mov rdx, QWORD PTR out$6[rbp] + 00238 48 8d 8d 90 00 00 00 lea rcx, QWORD PTR g$8[rbp] - 0023c e8 00 00 00 00 call stbi__load_gif_main_outofmem - 00241 e9 ef 01 00 00 jmp $LN1@stbi__load + 0023f e8 00 00 00 00 call stbi__load_gif_main_outofmem + 00244 e9 f3 01 00 00 jmp $LN1@stbi__load $LN15@stbi__load: ; 6568 : *delays = new_delays; - 00246 48 8b 85 e8 8f + 00249 48 8b 85 e8 8f 00 00 mov rax, QWORD PTR delays$[rbp] - 0024d 48 8b 8d 98 89 + 00250 48 8b 8d 98 89 00 00 mov rcx, QWORD PTR new_delays$13[rbp] - 00254 48 89 08 mov QWORD PTR [rax], rcx + 00257 48 89 08 mov QWORD PTR [rax], rcx ; 6569 : delays_size = layers * sizeof(int); - 00257 48 63 45 04 movsxd rax, DWORD PTR layers$4[rbp] - 0025b 48 c1 e0 02 shl rax, 2 - 0025f 89 85 54 89 00 + 0025a 48 63 45 04 movsxd rax, DWORD PTR layers$4[rbp] + 0025e 48 c1 e0 02 shl rax, 2 + 00262 89 85 54 89 00 00 mov DWORD PTR delays_size$11[rbp], eax $LN14@stbi__load: ; 6570 : } ; 6571 : } - 00265 e9 a6 00 00 00 jmp $LN11@stbi__load + 00268 e9 a6 00 00 00 jmp $LN11@stbi__load $LN10@stbi__load: ; 6572 : else { ; 6573 : out = (stbi_uc*)stbi__malloc(layers * stride); - 0026a 8b 45 04 mov eax, DWORD PTR layers$4[rbp] - 0026d 0f af 85 14 89 + 0026d 8b 45 04 mov eax, DWORD PTR layers$4[rbp] + 00270 0f af 85 14 89 00 00 imul eax, DWORD PTR stride$9[rbp] - 00274 48 98 cdqe - 00276 48 8b c8 mov rcx, rax - 00279 e8 00 00 00 00 call stbi__malloc - 0027e 48 89 45 48 mov QWORD PTR out$6[rbp], rax + 00277 48 98 cdqe + 00279 48 8b c8 mov rcx, rax + 0027c e8 00 00 00 00 call stbi__malloc + 00281 48 89 45 48 mov QWORD PTR out$6[rbp], rax ; 6574 : if (!out) - 00282 48 83 7d 48 00 cmp QWORD PTR out$6[rbp], 0 - 00287 75 1c jne SHORT $LN16@stbi__load + 00285 48 83 7d 48 00 cmp QWORD PTR out$6[rbp], 0 + 0028a 75 1c jne SHORT $LN16@stbi__load ; 6575 : return stbi__load_gif_main_outofmem(&g, out, delays); - 00289 4c 8b 85 e8 8f + 0028c 4c 8b 85 e8 8f 00 00 mov r8, QWORD PTR delays$[rbp] - 00290 48 8b 55 48 mov rdx, QWORD PTR out$6[rbp] - 00294 48 8d 8d 90 00 + 00293 48 8b 55 48 mov rdx, QWORD PTR out$6[rbp] + 00297 48 8d 8d 90 00 00 00 lea rcx, QWORD PTR g$8[rbp] - 0029b e8 00 00 00 00 call stbi__load_gif_main_outofmem - 002a0 e9 90 01 00 00 jmp $LN1@stbi__load + 0029e e8 00 00 00 00 call stbi__load_gif_main_outofmem + 002a3 e9 94 01 00 00 jmp $LN1@stbi__load $LN16@stbi__load: ; 6576 : out_size = layers * stride; - 002a5 8b 45 04 mov eax, DWORD PTR layers$4[rbp] - 002a8 0f af 85 14 89 + 002a8 8b 45 04 mov eax, DWORD PTR layers$4[rbp] + 002ab 0f af 85 14 89 00 00 imul eax, DWORD PTR stride$9[rbp] - 002af 89 85 34 89 00 + 002b2 89 85 34 89 00 00 mov DWORD PTR out_size$10[rbp], eax ; 6577 : if (delays) { - 002b5 48 83 bd e8 8f + 002b8 48 83 bd e8 8f 00 00 00 cmp QWORD PTR delays$[rbp], 0 - 002bd 74 51 je SHORT $LN17@stbi__load + 002c0 74 51 je SHORT $LN17@stbi__load ; 6578 : *delays = (int*)stbi__malloc(layers * sizeof(int)); - 002bf 48 63 45 04 movsxd rax, DWORD PTR layers$4[rbp] - 002c3 48 c1 e0 02 shl rax, 2 - 002c7 48 8b c8 mov rcx, rax - 002ca e8 00 00 00 00 call stbi__malloc - 002cf 48 8b 8d e8 8f + 002c2 48 63 45 04 movsxd rax, DWORD PTR layers$4[rbp] + 002c6 48 c1 e0 02 shl rax, 2 + 002ca 48 8b c8 mov rcx, rax + 002cd e8 00 00 00 00 call stbi__malloc + 002d2 48 8b 8d e8 8f 00 00 mov rcx, QWORD PTR delays$[rbp] - 002d6 48 89 01 mov QWORD PTR [rcx], rax + 002d9 48 89 01 mov QWORD PTR [rcx], rax ; 6579 : if (!*delays) - 002d9 48 8b 85 e8 8f + 002dc 48 8b 85 e8 8f 00 00 mov rax, QWORD PTR delays$[rbp] - 002e0 48 83 38 00 cmp QWORD PTR [rax], 0 - 002e4 75 1c jne SHORT $LN18@stbi__load + 002e3 48 83 38 00 cmp QWORD PTR [rax], 0 + 002e7 75 1c jne SHORT $LN18@stbi__load ; 6580 : return stbi__load_gif_main_outofmem(&g, out, delays); - 002e6 4c 8b 85 e8 8f + 002e9 4c 8b 85 e8 8f 00 00 mov r8, QWORD PTR delays$[rbp] - 002ed 48 8b 55 48 mov rdx, QWORD PTR out$6[rbp] - 002f1 48 8d 8d 90 00 + 002f0 48 8b 55 48 mov rdx, QWORD PTR out$6[rbp] + 002f4 48 8d 8d 90 00 00 00 lea rcx, QWORD PTR g$8[rbp] - 002f8 e8 00 00 00 00 call stbi__load_gif_main_outofmem - 002fd e9 33 01 00 00 jmp $LN1@stbi__load + 002fb e8 00 00 00 00 call stbi__load_gif_main_outofmem + 00300 e9 37 01 00 00 jmp $LN1@stbi__load $LN18@stbi__load: ; 6581 : delays_size = layers * sizeof(int); - 00302 48 63 45 04 movsxd rax, DWORD PTR layers$4[rbp] - 00306 48 c1 e0 02 shl rax, 2 - 0030a 89 85 54 89 00 + 00305 48 63 45 04 movsxd rax, DWORD PTR layers$4[rbp] + 00309 48 c1 e0 02 shl rax, 2 + 0030d 89 85 54 89 00 00 mov DWORD PTR delays_size$11[rbp], eax $LN17@stbi__load: $LN11@stbi__load: @@ -45650,56 +45947,57 @@ $LN11@stbi__load: ; 6583 : } ; 6584 : memcpy(out + ((layers - 1) * stride), u, stride); - 00310 48 63 85 14 89 + 00313 48 63 85 14 89 00 00 movsxd rax, DWORD PTR stride$9[rbp] - 00317 8b 4d 04 mov ecx, DWORD PTR layers$4[rbp] - 0031a ff c9 dec ecx - 0031c 0f af 8d 14 89 + 0031a 8b 4d 04 mov ecx, DWORD PTR layers$4[rbp] + 0031d ff c9 dec ecx + 0031f 0f af 8d 14 89 00 00 imul ecx, DWORD PTR stride$9[rbp] - 00323 48 63 c9 movsxd rcx, ecx - 00326 48 8b 55 48 mov rdx, QWORD PTR out$6[rbp] - 0032a 48 03 d1 add rdx, rcx - 0032d 48 8b ca mov rcx, rdx - 00330 4c 8b c0 mov r8, rax - 00333 48 8b 55 28 mov rdx, QWORD PTR u$5[rbp] - 00337 e8 00 00 00 00 call memcpy + 00326 48 63 c9 movsxd rcx, ecx + 00329 48 8b 55 48 mov rdx, QWORD PTR out$6[rbp] + 0032d 48 03 d1 add rdx, rcx + 00330 48 8b ca mov rcx, rdx + 00333 4c 8b c0 mov r8, rax + 00336 48 8b 55 28 mov rdx, QWORD PTR u$5[rbp] + 0033a e8 00 00 00 00 call memcpy + 0033f 90 npad 1 ; 6585 : if (layers >= 2) { - 0033c 83 7d 04 02 cmp DWORD PTR layers$4[rbp], 2 - 00340 7c 18 jl SHORT $LN19@stbi__load + 00340 83 7d 04 02 cmp DWORD PTR layers$4[rbp], 2 + 00344 7c 18 jl SHORT $LN19@stbi__load ; 6586 : two_back = out - 2 * stride; - 00342 8b 85 14 89 00 + 00346 8b 85 14 89 00 00 mov eax, DWORD PTR stride$9[rbp] - 00348 d1 e0 shl eax, 1 - 0034a 48 98 cdqe - 0034c 48 8b 4d 48 mov rcx, QWORD PTR out$6[rbp] - 00350 48 2b c8 sub rcx, rax - 00353 48 8b c1 mov rax, rcx - 00356 48 89 45 68 mov QWORD PTR two_back$7[rbp], rax + 0034c d1 e0 shl eax, 1 + 0034e 48 98 cdqe + 00350 48 8b 4d 48 mov rcx, QWORD PTR out$6[rbp] + 00354 48 2b c8 sub rcx, rax + 00357 48 8b c1 mov rax, rcx + 0035a 48 89 45 68 mov QWORD PTR two_back$7[rbp], rax $LN19@stbi__load: ; 6587 : } ; 6588 : ; 6589 : if (delays) { - 0035a 48 83 bd e8 8f + 0035e 48 83 bd e8 8f 00 00 00 cmp QWORD PTR delays$[rbp], 0 - 00362 74 1a je SHORT $LN20@stbi__load + 00366 74 1a je SHORT $LN20@stbi__load ; 6590 : (*delays)[layers - 1U] = g.delay; - 00364 8b 45 04 mov eax, DWORD PTR layers$4[rbp] - 00367 ff c8 dec eax - 00369 8b c0 mov eax, eax - 0036b 48 8b 8d e8 8f + 00368 8b 45 04 mov eax, DWORD PTR layers$4[rbp] + 0036b ff c8 dec eax + 0036d 8b c0 mov eax, eax + 0036f 48 8b 8d e8 8f 00 00 mov rcx, QWORD PTR delays$[rbp] - 00372 48 8b 09 mov rcx, QWORD PTR [rcx] - 00375 8b 95 f8 88 00 + 00376 48 8b 09 mov rcx, QWORD PTR [rcx] + 00379 8b 95 f8 88 00 00 mov edx, DWORD PTR g$8[rbp+34920] - 0037b 89 14 81 mov DWORD PTR [rcx+rax*4], edx + 0037f 89 14 81 mov DWORD PTR [rcx+rax*4], edx $LN20@stbi__load: $LN9@stbi__load: @@ -45707,119 +46005,122 @@ $LN9@stbi__load: ; 6592 : } ; 6593 : } while (u != 0); - 0037e 48 83 7d 28 00 cmp QWORD PTR u$5[rbp], 0 - 00383 0f 85 48 fd ff + 00382 48 83 7d 28 00 cmp QWORD PTR u$5[rbp], 0 + 00387 0f 85 46 fd ff ff jne $LN4@stbi__load ; 6594 : ; 6595 : // free temp buffer; ; 6596 : STBI_FREE(g.out); - 00389 48 8b 8d 98 00 + 0038d 48 8b 8d 98 00 00 00 mov rcx, QWORD PTR g$8[rbp+8] - 00390 ff 15 00 00 00 + 00394 ff 15 00 00 00 00 call QWORD PTR __imp_free + 0039a 90 npad 1 ; 6597 : STBI_FREE(g.history); - 00396 48 8b 8d a8 00 + 0039b 48 8b 8d a8 00 00 00 mov rcx, QWORD PTR g$8[rbp+24] - 0039d ff 15 00 00 00 + 003a2 ff 15 00 00 00 00 call QWORD PTR __imp_free + 003a8 90 npad 1 ; 6598 : STBI_FREE(g.background); - 003a3 48 8b 8d a0 00 + 003a9 48 8b 8d a0 00 00 00 mov rcx, QWORD PTR g$8[rbp+16] - 003aa ff 15 00 00 00 + 003b0 ff 15 00 00 00 00 call QWORD PTR __imp_free + 003b6 90 npad 1 ; 6599 : ; 6600 : // do the final conversion after loading everything; ; 6601 : if (req_comp && req_comp != 4) - 003b0 83 bd 10 90 00 + 003b7 83 bd 10 90 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 003b7 74 39 je SHORT $LN21@stbi__load - 003b9 83 bd 10 90 00 + 003be 74 39 je SHORT $LN21@stbi__load + 003c0 83 bd 10 90 00 00 04 cmp DWORD PTR req_comp$[rbp], 4 - 003c0 74 30 je SHORT $LN21@stbi__load + 003c7 74 30 je SHORT $LN21@stbi__load ; 6602 : out = stbi__convert_format(out, 4, req_comp, layers * g.w, g.h); - 003c2 8b 45 04 mov eax, DWORD PTR layers$4[rbp] - 003c5 0f af 85 90 00 + 003c9 8b 45 04 mov eax, DWORD PTR layers$4[rbp] + 003cc 0f af 85 90 00 00 00 imul eax, DWORD PTR g$8[rbp] - 003cc 8b 8d 94 00 00 + 003d3 8b 8d 94 00 00 00 mov ecx, DWORD PTR g$8[rbp+4] - 003d2 89 4c 24 20 mov DWORD PTR [rsp+32], ecx - 003d6 44 8b c8 mov r9d, eax - 003d9 44 8b 85 10 90 + 003d9 89 4c 24 20 mov DWORD PTR [rsp+32], ecx + 003dd 44 8b c8 mov r9d, eax + 003e0 44 8b 85 10 90 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 003e0 ba 04 00 00 00 mov edx, 4 - 003e5 48 8b 4d 48 mov rcx, QWORD PTR out$6[rbp] - 003e9 e8 00 00 00 00 call stbi__convert_format - 003ee 48 89 45 48 mov QWORD PTR out$6[rbp], rax + 003e7 ba 04 00 00 00 mov edx, 4 + 003ec 48 8b 4d 48 mov rcx, QWORD PTR out$6[rbp] + 003f0 e8 00 00 00 00 call stbi__convert_format + 003f5 48 89 45 48 mov QWORD PTR out$6[rbp], rax $LN21@stbi__load: ; 6603 : ; 6604 : *z = layers; - 003f2 48 8b 85 00 90 + 003f9 48 8b 85 00 90 00 00 mov rax, QWORD PTR z$[rbp] - 003f9 8b 4d 04 mov ecx, DWORD PTR layers$4[rbp] - 003fc 89 08 mov DWORD PTR [rax], ecx + 00400 8b 4d 04 mov ecx, DWORD PTR layers$4[rbp] + 00403 89 08 mov DWORD PTR [rax], ecx ; 6605 : return out; - 003fe 48 8b 45 48 mov rax, QWORD PTR out$6[rbp] - 00402 eb 31 jmp SHORT $LN1@stbi__load + 00405 48 8b 45 48 mov rax, QWORD PTR out$6[rbp] + 00409 eb 31 jmp SHORT $LN1@stbi__load ; 6606 : } - 00404 eb 2f jmp SHORT $LN6@stbi__load + 0040b eb 2f jmp SHORT $LN6@stbi__load $LN5@stbi__load: ; 6607 : else { ; 6608 : return stbi__errpuc("not GIF", "Image was not as a gif type."); - 00406 48 8d 0d 00 00 + 0040d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07KMJLPAII@not?5GIF@ - 0040d e8 00 00 00 00 call stbi__err - 00412 85 c0 test eax, eax - 00414 74 0d je SHORT $LN23@stbi__load - 00416 48 c7 85 a8 8f + 00414 e8 00 00 00 00 call stbi__err + 00419 85 c0 test eax, eax + 0041b 74 0d je SHORT $LN23@stbi__load + 0041d 48 c7 85 a8 8f 00 00 00 00 00 - 00 mov QWORD PTR tv209[rbp], 0 - 00421 eb 0b jmp SHORT $LN24@stbi__load + 00 mov QWORD PTR tv211[rbp], 0 + 00428 eb 0b jmp SHORT $LN24@stbi__load $LN23@stbi__load: - 00423 48 c7 85 a8 8f + 0042a 48 c7 85 a8 8f 00 00 00 00 00 - 00 mov QWORD PTR tv209[rbp], 0 + 00 mov QWORD PTR tv211[rbp], 0 $LN24@stbi__load: - 0042e 48 8b 85 a8 8f - 00 00 mov rax, QWORD PTR tv209[rbp] + 00435 48 8b 85 a8 8f + 00 00 mov rax, QWORD PTR tv211[rbp] $LN6@stbi__load: $LN1@stbi__load: ; 6609 : } ; 6610 : } - 00435 48 8b f8 mov rdi, rax - 00438 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 0043c 48 8d 15 00 00 + 0043c 48 8b f8 mov rdi, rax + 0043f 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 00443 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__load_gif_main$rtcFrameData - 00443 e8 00 00 00 00 call _RTC_CheckStackVars - 00448 48 8b c7 mov rax, rdi - 0044b 48 8b 8d b0 8f + 0044a e8 00 00 00 00 call _RTC_CheckStackVars + 0044f 48 8b c7 mov rax, rdi + 00452 48 8b 8d b0 8f 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00452 48 33 cd xor rcx, rbp - 00455 e8 00 00 00 00 call __security_check_cookie - 0045a 48 8d a5 c8 8f + 00459 48 33 cd xor rcx, rbp + 0045c e8 00 00 00 00 call __security_check_cookie + 00461 48 8d a5 c8 8f 00 00 lea rsp, QWORD PTR [rbp+36808] - 00461 5f pop rdi - 00462 5d pop rbp - 00463 c3 ret 0 + 00468 5f pop rdi + 00469 5d pop rbp + 0046a c3 ret 0 stbi__load_gif_main ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -45863,107 +46164,110 @@ stbi__gif_load PROC ; COMDAT 00052 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00059 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0005e 90 npad 1 ; 6614 : stbi_uc* u = 0; - 0005e 48 c7 45 08 00 + 0005f 48 c7 45 08 00 00 00 00 mov QWORD PTR u$[rbp], 0 ; 6615 : stbi__gif g; ; 6616 : memset(&g, 0, sizeof(g)); - 00066 41 b8 70 88 00 + 00067 41 b8 70 88 00 00 mov r8d, 34928 ; 00008870H - 0006c 33 d2 xor edx, edx - 0006e 48 8d 4d 30 lea rcx, QWORD PTR g$[rbp] - 00072 e8 00 00 00 00 call memset + 0006d 33 d2 xor edx, edx + 0006f 48 8d 4d 30 lea rcx, QWORD PTR g$[rbp] + 00073 e8 00 00 00 00 call memset + 00078 90 npad 1 ; 6617 : STBI_NOTUSED(ri); ; 6618 : ; 6619 : u = stbi__gif_load_next(s, &g, comp, req_comp, 0); - 00077 48 c7 44 24 20 + 00079 48 c7 44 24 20 00 00 00 00 mov QWORD PTR [rsp+32], 0 - 00080 44 8b 8d f0 8e + 00082 44 8b 8d f0 8e 00 00 mov r9d, DWORD PTR req_comp$[rbp] - 00087 4c 8b 85 e8 8e + 00089 4c 8b 85 e8 8e 00 00 mov r8, QWORD PTR comp$[rbp] - 0008e 48 8d 55 30 lea rdx, QWORD PTR g$[rbp] - 00092 48 8b 8d d0 8e + 00090 48 8d 55 30 lea rdx, QWORD PTR g$[rbp] + 00094 48 8b 8d d0 8e 00 00 mov rcx, QWORD PTR s$[rbp] - 00099 e8 00 00 00 00 call stbi__gif_load_next - 0009e 48 89 45 08 mov QWORD PTR u$[rbp], rax + 0009b e8 00 00 00 00 call stbi__gif_load_next + 000a0 48 89 45 08 mov QWORD PTR u$[rbp], rax ; 6620 : if (u == (stbi_uc*)s) u = 0; // end of animated gif marker - 000a2 48 8b 85 d0 8e + 000a4 48 8b 85 d0 8e 00 00 mov rax, QWORD PTR s$[rbp] - 000a9 48 39 45 08 cmp QWORD PTR u$[rbp], rax - 000ad 75 08 jne SHORT $LN2@stbi__gif_ - 000af 48 c7 45 08 00 + 000ab 48 39 45 08 cmp QWORD PTR u$[rbp], rax + 000af 75 08 jne SHORT $LN2@stbi__gif_ + 000b1 48 c7 45 08 00 00 00 00 mov QWORD PTR u$[rbp], 0 $LN2@stbi__gif_: ; 6621 : if (u) { - 000b7 48 83 7d 08 00 cmp QWORD PTR u$[rbp], 0 - 000bc 74 50 je SHORT $LN3@stbi__gif_ + 000b9 48 83 7d 08 00 cmp QWORD PTR u$[rbp], 0 + 000be 74 50 je SHORT $LN3@stbi__gif_ ; 6622 : *x = g.w; - 000be 48 8b 85 d8 8e + 000c0 48 8b 85 d8 8e 00 00 mov rax, QWORD PTR x$[rbp] - 000c5 8b 4d 30 mov ecx, DWORD PTR g$[rbp] - 000c8 89 08 mov DWORD PTR [rax], ecx + 000c7 8b 4d 30 mov ecx, DWORD PTR g$[rbp] + 000ca 89 08 mov DWORD PTR [rax], ecx ; 6623 : *y = g.h; - 000ca 48 8b 85 e0 8e + 000cc 48 8b 85 e0 8e 00 00 mov rax, QWORD PTR y$[rbp] - 000d1 8b 4d 34 mov ecx, DWORD PTR g$[rbp+4] - 000d4 89 08 mov DWORD PTR [rax], ecx + 000d3 8b 4d 34 mov ecx, DWORD PTR g$[rbp+4] + 000d6 89 08 mov DWORD PTR [rax], ecx ; 6624 : ; 6625 : // moved conversion to after successful load so that the same ; 6626 : // can be done for multiple frames. ; 6627 : if (req_comp && req_comp != 4) - 000d6 83 bd f0 8e 00 + 000d8 83 bd f0 8e 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 000dd 74 2d je SHORT $LN5@stbi__gif_ - 000df 83 bd f0 8e 00 + 000df 74 2d je SHORT $LN5@stbi__gif_ + 000e1 83 bd f0 8e 00 00 04 cmp DWORD PTR req_comp$[rbp], 4 - 000e6 74 24 je SHORT $LN5@stbi__gif_ + 000e8 74 24 je SHORT $LN5@stbi__gif_ ; 6628 : u = stbi__convert_format(u, 4, req_comp, g.w, g.h); - 000e8 8b 45 34 mov eax, DWORD PTR g$[rbp+4] - 000eb 89 44 24 20 mov DWORD PTR [rsp+32], eax - 000ef 44 8b 4d 30 mov r9d, DWORD PTR g$[rbp] - 000f3 44 8b 85 f0 8e + 000ea 8b 45 34 mov eax, DWORD PTR g$[rbp+4] + 000ed 89 44 24 20 mov DWORD PTR [rsp+32], eax + 000f1 44 8b 4d 30 mov r9d, DWORD PTR g$[rbp] + 000f5 44 8b 85 f0 8e 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 000fa ba 04 00 00 00 mov edx, 4 - 000ff 48 8b 4d 08 mov rcx, QWORD PTR u$[rbp] - 00103 e8 00 00 00 00 call stbi__convert_format - 00108 48 89 45 08 mov QWORD PTR u$[rbp], rax + 000fc ba 04 00 00 00 mov edx, 4 + 00101 48 8b 4d 08 mov rcx, QWORD PTR u$[rbp] + 00105 e8 00 00 00 00 call stbi__convert_format + 0010a 48 89 45 08 mov QWORD PTR u$[rbp], rax $LN5@stbi__gif_: ; 6629 : } - 0010c eb 11 jmp SHORT $LN4@stbi__gif_ + 0010e eb 12 jmp SHORT $LN4@stbi__gif_ $LN3@stbi__gif_: ; 6630 : else if (g.out) { - 0010e 48 83 7d 38 00 cmp QWORD PTR g$[rbp+8], 0 - 00113 74 0a je SHORT $LN6@stbi__gif_ + 00110 48 83 7d 38 00 cmp QWORD PTR g$[rbp+8], 0 + 00115 74 0b je SHORT $LN6@stbi__gif_ ; 6631 : // if there was an error and we allocated an image buffer, free it! ; 6632 : STBI_FREE(g.out); - 00115 48 8b 4d 38 mov rcx, QWORD PTR g$[rbp+8] - 00119 ff 15 00 00 00 + 00117 48 8b 4d 38 mov rcx, QWORD PTR g$[rbp+8] + 0011b ff 15 00 00 00 00 call QWORD PTR __imp_free + 00121 90 npad 1 $LN6@stbi__gif_: $LN4@stbi__gif_: @@ -45972,38 +46276,40 @@ $LN4@stbi__gif_: ; 6635 : // free buffers needed for multiple frame loading; ; 6636 : STBI_FREE(g.history); - 0011f 48 8b 4d 48 mov rcx, QWORD PTR g$[rbp+24] - 00123 ff 15 00 00 00 + 00122 48 8b 4d 48 mov rcx, QWORD PTR g$[rbp+24] + 00126 ff 15 00 00 00 00 call QWORD PTR __imp_free + 0012c 90 npad 1 ; 6637 : STBI_FREE(g.background); - 00129 48 8b 4d 40 mov rcx, QWORD PTR g$[rbp+16] - 0012d ff 15 00 00 00 + 0012d 48 8b 4d 40 mov rcx, QWORD PTR g$[rbp+16] + 00131 ff 15 00 00 00 00 call QWORD PTR __imp_free + 00137 90 npad 1 ; 6638 : ; 6639 : return u; - 00133 48 8b 45 08 mov rax, QWORD PTR u$[rbp] + 00138 48 8b 45 08 mov rax, QWORD PTR u$[rbp] ; 6640 : } - 00137 48 8b f8 mov rdi, rax - 0013a 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 0013e 48 8d 15 00 00 + 0013c 48 8b f8 mov rdi, rax + 0013f 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 00143 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__gif_load$rtcFrameData - 00145 e8 00 00 00 00 call _RTC_CheckStackVars - 0014a 48 8b c7 mov rax, rdi - 0014d 48 8b 8d a8 8e + 0014a e8 00 00 00 00 call _RTC_CheckStackVars + 0014f 48 8b c7 mov rax, rdi + 00152 48 8b 8d a8 8e 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00154 48 33 cd xor rcx, rbp - 00157 e8 00 00 00 00 call __security_check_cookie - 0015c 48 8d a5 b8 8e + 00159 48 33 cd xor rcx, rbp + 0015c e8 00 00 00 00 call __security_check_cookie + 00161 48 8d a5 b8 8e 00 00 lea rsp, QWORD PTR [rbp+36536] - 00163 5f pop rdi - 00164 5d pop rbp - 00165 c3 ret 0 + 00168 5f pop rdi + 00169 5d pop rbp + 0016a c3 ret 0 stbi__gif_load ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -46025,31 +46331,33 @@ stbi__gif_test PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 6141 : int r = stbi__gif_test_raw(s); - 0001f 48 8b 8d 00 01 + 00020 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__gif_test_raw - 0002b 89 45 04 mov DWORD PTR r$[rbp], eax + 00027 e8 00 00 00 00 call stbi__gif_test_raw + 0002c 89 45 04 mov DWORD PTR r$[rbp], eax ; 6142 : stbi__rewind(s); - 0002e 48 8b 8d 00 01 + 0002f 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00035 e8 00 00 00 00 call stbi__rewind + 00036 e8 00 00 00 00 call stbi__rewind + 0003b 90 npad 1 ; 6143 : return r; - 0003a 8b 45 04 mov eax, DWORD PTR r$[rbp] + 0003c 8b 45 04 mov eax, DWORD PTR r$[rbp] ; 6144 : } - 0003d 48 8d a5 e8 00 + 0003f 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00044 5f pop rdi - 00045 5d pop rbp - 00046 c3 ret 0 + 00046 5f pop rdi + 00047 5d pop rbp + 00048 c3 ret 0 stbi__gif_test ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -46095,154 +46403,160 @@ stbi__pic_info PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 6993 : int act_comp = 0, num_packets = 0, chained, dummy; - 00058 c7 45 04 00 00 + 00059 c7 45 04 00 00 00 00 mov DWORD PTR act_comp$[rbp], 0 - 0005f c7 45 24 00 00 + 00060 c7 45 24 00 00 00 00 mov DWORD PTR num_packets$[rbp], 0 ; 6994 : stbi__pic_packet packets[10]; ; 6995 : ; 6996 : if (!x) x = &dummy; - 00066 48 83 bd c8 01 + 00067 48 83 bd c8 01 00 00 00 cmp QWORD PTR x$[rbp], 0 - 0006e 75 0b jne SHORT $LN5@stbi__pic_ - 00070 48 8d 45 64 lea rax, QWORD PTR dummy$[rbp] - 00074 48 89 85 c8 01 + 0006f 75 0b jne SHORT $LN5@stbi__pic_ + 00071 48 8d 45 64 lea rax, QWORD PTR dummy$[rbp] + 00075 48 89 85 c8 01 00 00 mov QWORD PTR x$[rbp], rax $LN5@stbi__pic_: ; 6997 : if (!y) y = &dummy; - 0007b 48 83 bd d0 01 + 0007c 48 83 bd d0 01 00 00 00 cmp QWORD PTR y$[rbp], 0 - 00083 75 0b jne SHORT $LN6@stbi__pic_ - 00085 48 8d 45 64 lea rax, QWORD PTR dummy$[rbp] - 00089 48 89 85 d0 01 + 00084 75 0b jne SHORT $LN6@stbi__pic_ + 00086 48 8d 45 64 lea rax, QWORD PTR dummy$[rbp] + 0008a 48 89 85 d0 01 00 00 mov QWORD PTR y$[rbp], rax $LN6@stbi__pic_: ; 6998 : if (!comp) comp = &dummy; - 00090 48 83 bd d8 01 + 00091 48 83 bd d8 01 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 00098 75 0b jne SHORT $LN7@stbi__pic_ - 0009a 48 8d 45 64 lea rax, QWORD PTR dummy$[rbp] - 0009e 48 89 85 d8 01 + 00099 75 0b jne SHORT $LN7@stbi__pic_ + 0009b 48 8d 45 64 lea rax, QWORD PTR dummy$[rbp] + 0009f 48 89 85 d8 01 00 00 mov QWORD PTR comp$[rbp], rax $LN7@stbi__pic_: ; 6999 : ; 7000 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) { - 000a5 48 8d 15 00 00 + 000a6 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_04KBFEPHFH@S?$IA?v4@ - 000ac 48 8b 8d c0 01 + 000ad 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000b3 e8 00 00 00 00 call stbi__pic_is4 - 000b8 85 c0 test eax, eax - 000ba 75 13 jne SHORT $LN8@stbi__pic_ + 000b4 e8 00 00 00 00 call stbi__pic_is4 + 000b9 85 c0 test eax, eax + 000bb 75 14 jne SHORT $LN8@stbi__pic_ ; 7001 : stbi__rewind(s); - 000bc 48 8b 8d c0 01 + 000bd 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000c3 e8 00 00 00 00 call stbi__rewind + 000c4 e8 00 00 00 00 call stbi__rewind + 000c9 90 npad 1 ; 7002 : return 0; - 000c8 33 c0 xor eax, eax - 000ca e9 bd 01 00 00 jmp $LN1@stbi__pic_ + 000ca 33 c0 xor eax, eax + 000cc e9 c3 01 00 00 jmp $LN1@stbi__pic_ $LN8@stbi__pic_: ; 7003 : } ; 7004 : ; 7005 : stbi__skip(s, 88); - 000cf ba 58 00 00 00 mov edx, 88 ; 00000058H - 000d4 48 8b 8d c0 01 + 000d1 ba 58 00 00 00 mov edx, 88 ; 00000058H + 000d6 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000db e8 00 00 00 00 call stbi__skip + 000dd e8 00 00 00 00 call stbi__skip + 000e2 90 npad 1 ; 7006 : ; 7007 : *x = stbi__get16be(s); - 000e0 48 8b 8d c0 01 + 000e3 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000e7 e8 00 00 00 00 call stbi__get16be - 000ec 48 8b 8d c8 01 + 000ea e8 00 00 00 00 call stbi__get16be + 000ef 48 8b 8d c8 01 00 00 mov rcx, QWORD PTR x$[rbp] - 000f3 89 01 mov DWORD PTR [rcx], eax + 000f6 89 01 mov DWORD PTR [rcx], eax ; 7008 : *y = stbi__get16be(s); - 000f5 48 8b 8d c0 01 + 000f8 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000fc e8 00 00 00 00 call stbi__get16be - 00101 48 8b 8d d0 01 + 000ff e8 00 00 00 00 call stbi__get16be + 00104 48 8b 8d d0 01 00 00 mov rcx, QWORD PTR y$[rbp] - 00108 89 01 mov DWORD PTR [rcx], eax + 0010b 89 01 mov DWORD PTR [rcx], eax ; 7009 : if (stbi__at_eof(s)) { - 0010a 48 8b 8d c0 01 + 0010d 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00111 e8 00 00 00 00 call stbi__at_eof - 00116 85 c0 test eax, eax - 00118 74 13 je SHORT $LN9@stbi__pic_ + 00114 e8 00 00 00 00 call stbi__at_eof + 00119 85 c0 test eax, eax + 0011b 74 14 je SHORT $LN9@stbi__pic_ ; 7010 : stbi__rewind(s); - 0011a 48 8b 8d c0 01 + 0011d 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00121 e8 00 00 00 00 call stbi__rewind + 00124 e8 00 00 00 00 call stbi__rewind + 00129 90 npad 1 ; 7011 : return 0; - 00126 33 c0 xor eax, eax - 00128 e9 5f 01 00 00 jmp $LN1@stbi__pic_ + 0012a 33 c0 xor eax, eax + 0012c e9 63 01 00 00 jmp $LN1@stbi__pic_ $LN9@stbi__pic_: ; 7012 : } ; 7013 : if ((*x) != 0 && (1 << 28) / (*x) < (*y)) { - 0012d 48 8b 85 c8 01 + 00131 48 8b 85 c8 01 00 00 mov rax, QWORD PTR x$[rbp] - 00134 83 38 00 cmp DWORD PTR [rax], 0 - 00137 74 2d je SHORT $LN10@stbi__pic_ - 00139 b8 00 00 00 10 mov eax, 268435456 ; 10000000H - 0013e 99 cdq - 0013f 48 8b 8d c8 01 + 00138 83 38 00 cmp DWORD PTR [rax], 0 + 0013b 74 2e je SHORT $LN10@stbi__pic_ + 0013d b8 00 00 00 10 mov eax, 268435456 ; 10000000H + 00142 99 cdq + 00143 48 8b 8d c8 01 00 00 mov rcx, QWORD PTR x$[rbp] - 00146 f7 39 idiv DWORD PTR [rcx] - 00148 48 8b 8d d0 01 + 0014a f7 39 idiv DWORD PTR [rcx] + 0014c 48 8b 8d d0 01 00 00 mov rcx, QWORD PTR y$[rbp] - 0014f 3b 01 cmp eax, DWORD PTR [rcx] - 00151 7d 13 jge SHORT $LN10@stbi__pic_ + 00153 3b 01 cmp eax, DWORD PTR [rcx] + 00155 7d 14 jge SHORT $LN10@stbi__pic_ ; 7014 : stbi__rewind(s); - 00153 48 8b 8d c0 01 + 00157 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0015a e8 00 00 00 00 call stbi__rewind + 0015e e8 00 00 00 00 call stbi__rewind + 00163 90 npad 1 ; 7015 : return 0; - 0015f 33 c0 xor eax, eax - 00161 e9 26 01 00 00 jmp $LN1@stbi__pic_ + 00164 33 c0 xor eax, eax + 00166 e9 29 01 00 00 jmp $LN1@stbi__pic_ $LN10@stbi__pic_: ; 7016 : } ; 7017 : ; 7018 : stbi__skip(s, 8); - 00166 ba 08 00 00 00 mov edx, 8 - 0016b 48 8b 8d c0 01 + 0016b ba 08 00 00 00 mov edx, 8 + 00170 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00172 e8 00 00 00 00 call stbi__skip + 00177 e8 00 00 00 00 call stbi__skip + 0017c 90 npad 1 $LN4@stbi__pic_: ; 7019 : @@ -46251,166 +46565,168 @@ $LN4@stbi__pic_: ; 7022 : ; 7023 : if (num_packets == sizeof(packets) / sizeof(packets[0])) - 00177 48 63 45 24 movsxd rax, DWORD PTR num_packets$[rbp] - 0017b 48 83 f8 0a cmp rax, 10 - 0017f 75 07 jne SHORT $LN11@stbi__pic_ + 0017d 48 63 45 24 movsxd rax, DWORD PTR num_packets$[rbp] + 00181 48 83 f8 0a cmp rax, 10 + 00185 75 07 jne SHORT $LN11@stbi__pic_ ; 7024 : return 0; - 00181 33 c0 xor eax, eax - 00183 e9 04 01 00 00 jmp $LN1@stbi__pic_ + 00187 33 c0 xor eax, eax + 00189 e9 06 01 00 00 jmp $LN1@stbi__pic_ $LN11@stbi__pic_: ; 7025 : ; 7026 : packet = &packets[num_packets++]; - 00188 48 63 45 24 movsxd rax, DWORD PTR num_packets$[rbp] - 0018c 48 6b c0 03 imul rax, rax, 3 - 00190 48 8d 84 05 88 + 0018e 48 63 45 24 movsxd rax, DWORD PTR num_packets$[rbp] + 00192 48 6b c0 03 imul rax, rax, 3 + 00196 48 8d 84 05 88 00 00 00 lea rax, QWORD PTR packets$[rbp+rax] - 00198 48 89 85 c8 00 + 0019e 48 89 85 c8 00 00 00 mov QWORD PTR packet$5[rbp], rax - 0019f 8b 45 24 mov eax, DWORD PTR num_packets$[rbp] - 001a2 ff c0 inc eax - 001a4 89 45 24 mov DWORD PTR num_packets$[rbp], eax + 001a5 8b 45 24 mov eax, DWORD PTR num_packets$[rbp] + 001a8 ff c0 inc eax + 001aa 89 45 24 mov DWORD PTR num_packets$[rbp], eax ; 7027 : chained = stbi__get8(s); - 001a7 48 8b 8d c0 01 + 001ad 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001ae e8 00 00 00 00 call stbi__get8 - 001b3 0f b6 c0 movzx eax, al - 001b6 89 45 44 mov DWORD PTR chained$[rbp], eax + 001b4 e8 00 00 00 00 call stbi__get8 + 001b9 0f b6 c0 movzx eax, al + 001bc 89 45 44 mov DWORD PTR chained$[rbp], eax ; 7028 : packet->size = stbi__get8(s); - 001b9 48 8b 8d c0 01 + 001bf 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001c0 e8 00 00 00 00 call stbi__get8 - 001c5 48 8b 8d c8 00 + 001c6 e8 00 00 00 00 call stbi__get8 + 001cb 48 8b 8d c8 00 00 00 mov rcx, QWORD PTR packet$5[rbp] - 001cc 88 01 mov BYTE PTR [rcx], al + 001d2 88 01 mov BYTE PTR [rcx], al ; 7029 : packet->type = stbi__get8(s); - 001ce 48 8b 8d c0 01 + 001d4 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001d5 e8 00 00 00 00 call stbi__get8 - 001da 48 8b 8d c8 00 + 001db e8 00 00 00 00 call stbi__get8 + 001e0 48 8b 8d c8 00 00 00 mov rcx, QWORD PTR packet$5[rbp] - 001e1 88 41 01 mov BYTE PTR [rcx+1], al + 001e7 88 41 01 mov BYTE PTR [rcx+1], al ; 7030 : packet->channel = stbi__get8(s); - 001e4 48 8b 8d c0 01 + 001ea 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001eb e8 00 00 00 00 call stbi__get8 - 001f0 48 8b 8d c8 00 + 001f1 e8 00 00 00 00 call stbi__get8 + 001f6 48 8b 8d c8 00 00 00 mov rcx, QWORD PTR packet$5[rbp] - 001f7 88 41 02 mov BYTE PTR [rcx+2], al + 001fd 88 41 02 mov BYTE PTR [rcx+2], al ; 7031 : act_comp |= packet->channel; - 001fa 48 8b 85 c8 00 + 00200 48 8b 85 c8 00 00 00 mov rax, QWORD PTR packet$5[rbp] - 00201 0f b6 40 02 movzx eax, BYTE PTR [rax+2] - 00205 8b 4d 04 mov ecx, DWORD PTR act_comp$[rbp] - 00208 0b c8 or ecx, eax - 0020a 8b c1 mov eax, ecx - 0020c 89 45 04 mov DWORD PTR act_comp$[rbp], eax + 00207 0f b6 40 02 movzx eax, BYTE PTR [rax+2] + 0020b 8b 4d 04 mov ecx, DWORD PTR act_comp$[rbp] + 0020e 0b c8 or ecx, eax + 00210 8b c1 mov eax, ecx + 00212 89 45 04 mov DWORD PTR act_comp$[rbp], eax ; 7032 : ; 7033 : if (stbi__at_eof(s)) { - 0020f 48 8b 8d c0 01 + 00215 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00216 e8 00 00 00 00 call stbi__at_eof - 0021b 85 c0 test eax, eax - 0021d 74 10 je SHORT $LN12@stbi__pic_ + 0021c e8 00 00 00 00 call stbi__at_eof + 00221 85 c0 test eax, eax + 00223 74 11 je SHORT $LN12@stbi__pic_ ; 7034 : stbi__rewind(s); - 0021f 48 8b 8d c0 01 + 00225 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00226 e8 00 00 00 00 call stbi__rewind + 0022c e8 00 00 00 00 call stbi__rewind + 00231 90 npad 1 ; 7035 : return 0; - 0022b 33 c0 xor eax, eax - 0022d eb 5d jmp SHORT $LN1@stbi__pic_ + 00232 33 c0 xor eax, eax + 00234 eb 5e jmp SHORT $LN1@stbi__pic_ $LN12@stbi__pic_: ; 7036 : } ; 7037 : if (packet->size != 8) { - 0022f 48 8b 85 c8 00 + 00236 48 8b 85 c8 00 00 00 mov rax, QWORD PTR packet$5[rbp] - 00236 0f b6 00 movzx eax, BYTE PTR [rax] - 00239 83 f8 08 cmp eax, 8 - 0023c 74 10 je SHORT $LN13@stbi__pic_ + 0023d 0f b6 00 movzx eax, BYTE PTR [rax] + 00240 83 f8 08 cmp eax, 8 + 00243 74 11 je SHORT $LN13@stbi__pic_ ; 7038 : stbi__rewind(s); - 0023e 48 8b 8d c0 01 + 00245 48 8b 8d c0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00245 e8 00 00 00 00 call stbi__rewind + 0024c e8 00 00 00 00 call stbi__rewind + 00251 90 npad 1 ; 7039 : return 0; - 0024a 33 c0 xor eax, eax - 0024c eb 3e jmp SHORT $LN1@stbi__pic_ + 00252 33 c0 xor eax, eax + 00254 eb 3e jmp SHORT $LN1@stbi__pic_ $LN13@stbi__pic_: ; 7040 : } ; 7041 : } while (chained); - 0024e 83 7d 44 00 cmp DWORD PTR chained$[rbp], 0 - 00252 0f 85 1f ff ff + 00256 83 7d 44 00 cmp DWORD PTR chained$[rbp], 0 + 0025a 0f 85 1d ff ff ff jne $LN4@stbi__pic_ ; 7042 : ; 7043 : *comp = (act_comp & 0x10 ? 4 : 3); - 00258 8b 45 04 mov eax, DWORD PTR act_comp$[rbp] - 0025b 83 e0 10 and eax, 16 - 0025e 85 c0 test eax, eax - 00260 74 0c je SHORT $LN15@stbi__pic_ - 00262 c7 85 94 01 00 + 00260 8b 45 04 mov eax, DWORD PTR act_comp$[rbp] + 00263 83 e0 10 and eax, 16 + 00266 85 c0 test eax, eax + 00268 74 0c je SHORT $LN15@stbi__pic_ + 0026a c7 85 94 01 00 00 04 00 00 00 mov DWORD PTR tv152[rbp], 4 - 0026c eb 0a jmp SHORT $LN16@stbi__pic_ + 00274 eb 0a jmp SHORT $LN16@stbi__pic_ $LN15@stbi__pic_: - 0026e c7 85 94 01 00 + 00276 c7 85 94 01 00 00 03 00 00 00 mov DWORD PTR tv152[rbp], 3 $LN16@stbi__pic_: - 00278 48 8b 85 d8 01 + 00280 48 8b 85 d8 01 00 00 mov rax, QWORD PTR comp$[rbp] - 0027f 8b 8d 94 01 00 + 00287 8b 8d 94 01 00 00 mov ecx, DWORD PTR tv152[rbp] - 00285 89 08 mov DWORD PTR [rax], ecx + 0028d 89 08 mov DWORD PTR [rax], ecx ; 7044 : ; 7045 : return 1; - 00287 b8 01 00 00 00 mov eax, 1 + 0028f b8 01 00 00 00 mov eax, 1 $LN1@stbi__pic_: ; 7046 : } - 0028c 48 8b f8 mov rdi, rax - 0028f 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00293 48 8d 15 00 00 + 00294 48 8b f8 mov rdi, rax + 00297 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 0029b 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__pic_info$rtcFrameData - 0029a e8 00 00 00 00 call _RTC_CheckStackVars - 0029f 48 8b c7 mov rax, rdi - 002a2 48 8b 8d 98 01 + 002a2 e8 00 00 00 00 call _RTC_CheckStackVars + 002a7 48 8b c7 mov rax, rdi + 002aa 48 8b 8d 98 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 002a9 48 33 cd xor rcx, rbp - 002ac e8 00 00 00 00 call __security_check_cookie - 002b1 48 8d a5 a8 01 + 002b1 48 33 cd xor rcx, rbp + 002b4 e8 00 00 00 00 call __security_check_cookie + 002b9 48 8d a5 a8 01 00 00 lea rsp, QWORD PTR [rbp+424] - 002b8 5f pop rdi - 002b9 5d pop rbp - 002ba c3 ret 0 + 002c0 5f pop rdi + 002c1 5d pop rbp + 002c2 c3 ret 0 stbi__pic_info ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -46422,11 +46738,11 @@ i$ = 36 x$ = 68 y$ = 100 internal_comp$ = 132 -tv143 = 344 -tv130 = 344 -tv88 = 344 -tv81 = 344 tv76 = 344 +tv81 = 344 +tv88 = 344 +tv130 = 344 +tv143 = 344 __$ArrayPad$ = 352 s$ = 400 px$ = 408 @@ -46461,6 +46777,7 @@ stbi__pic_load PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 6051 : stbi_uc* result; ; 6052 : int i, x, y, internal_comp; @@ -46468,311 +46785,317 @@ stbi__pic_load PROC ; COMDAT ; 6054 : ; 6055 : if (!comp) comp = &internal_comp; - 00058 48 83 bd a8 01 + 00059 48 83 bd a8 01 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 00060 75 0e jne SHORT $LN5@stbi__pic_ - 00062 48 8d 85 84 00 + 00061 75 0e jne SHORT $LN5@stbi__pic_ + 00063 48 8d 85 84 00 00 00 lea rax, QWORD PTR internal_comp$[rbp] - 00069 48 89 85 a8 01 + 0006a 48 89 85 a8 01 00 00 mov QWORD PTR comp$[rbp], rax $LN5@stbi__pic_: ; 6056 : ; 6057 : for (i = 0; i < 92; ++i) - 00070 c7 45 24 00 00 + 00071 c7 45 24 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00077 eb 08 jmp SHORT $LN4@stbi__pic_ + 00078 eb 08 jmp SHORT $LN4@stbi__pic_ $LN2@stbi__pic_: - 00079 8b 45 24 mov eax, DWORD PTR i$[rbp] - 0007c ff c0 inc eax - 0007e 89 45 24 mov DWORD PTR i$[rbp], eax + 0007a 8b 45 24 mov eax, DWORD PTR i$[rbp] + 0007d ff c0 inc eax + 0007f 89 45 24 mov DWORD PTR i$[rbp], eax $LN4@stbi__pic_: - 00081 83 7d 24 5c cmp DWORD PTR i$[rbp], 92 ; 0000005cH - 00085 7d 0e jge SHORT $LN3@stbi__pic_ + 00082 83 7d 24 5c cmp DWORD PTR i$[rbp], 92 ; 0000005cH + 00086 7d 0f jge SHORT $LN3@stbi__pic_ ; 6058 : stbi__get8(s); - 00087 48 8b 8d 90 01 + 00088 48 8b 8d 90 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0008e e8 00 00 00 00 call stbi__get8 - 00093 eb e4 jmp SHORT $LN2@stbi__pic_ + 0008f e8 00 00 00 00 call stbi__get8 + 00094 90 npad 1 + 00095 eb e3 jmp SHORT $LN2@stbi__pic_ $LN3@stbi__pic_: ; 6059 : ; 6060 : x = stbi__get16be(s); - 00095 48 8b 8d 90 01 + 00097 48 8b 8d 90 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0009c e8 00 00 00 00 call stbi__get16be - 000a1 89 45 44 mov DWORD PTR x$[rbp], eax + 0009e e8 00 00 00 00 call stbi__get16be + 000a3 89 45 44 mov DWORD PTR x$[rbp], eax ; 6061 : y = stbi__get16be(s); - 000a4 48 8b 8d 90 01 + 000a6 48 8b 8d 90 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000ab e8 00 00 00 00 call stbi__get16be - 000b0 89 45 64 mov DWORD PTR y$[rbp], eax + 000ad e8 00 00 00 00 call stbi__get16be + 000b2 89 45 64 mov DWORD PTR y$[rbp], eax ; 6062 : ; 6063 : if (y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - 000b3 81 7d 64 00 00 + 000b5 81 7d 64 00 00 00 01 cmp DWORD PTR y$[rbp], 16777216 ; 01000000H - 000ba 7e 34 jle SHORT $LN6@stbi__pic_ - 000bc 48 8d 0d 00 00 + 000bc 7e 34 jle SHORT $LN6@stbi__pic_ + 000be 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 000c3 e8 00 00 00 00 call stbi__err - 000c8 85 c0 test eax, eax - 000ca 74 0d je SHORT $LN14@stbi__pic_ - 000cc 48 c7 85 58 01 + 000c5 e8 00 00 00 00 call stbi__err + 000ca 85 c0 test eax, eax + 000cc 74 0d je SHORT $LN14@stbi__pic_ + 000ce 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv76[rbp], 0 - 000d7 eb 0b jmp SHORT $LN15@stbi__pic_ + 000d9 eb 0b jmp SHORT $LN15@stbi__pic_ $LN14@stbi__pic_: - 000d9 48 c7 85 58 01 + 000db 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv76[rbp], 0 $LN15@stbi__pic_: - 000e4 48 8b 85 58 01 + 000e6 48 8b 85 58 01 00 00 mov rax, QWORD PTR tv76[rbp] - 000eb e9 f3 01 00 00 jmp $LN1@stbi__pic_ + 000ed e9 f8 01 00 00 jmp $LN1@stbi__pic_ $LN6@stbi__pic_: ; 6064 : if (x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - 000f0 81 7d 44 00 00 + 000f2 81 7d 44 00 00 00 01 cmp DWORD PTR x$[rbp], 16777216 ; 01000000H - 000f7 7e 34 jle SHORT $LN7@stbi__pic_ - 000f9 48 8d 0d 00 00 + 000f9 7e 34 jle SHORT $LN7@stbi__pic_ + 000fb 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 00100 e8 00 00 00 00 call stbi__err - 00105 85 c0 test eax, eax - 00107 74 0d je SHORT $LN16@stbi__pic_ - 00109 48 c7 85 58 01 + 00102 e8 00 00 00 00 call stbi__err + 00107 85 c0 test eax, eax + 00109 74 0d je SHORT $LN16@stbi__pic_ + 0010b 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv81[rbp], 0 - 00114 eb 0b jmp SHORT $LN17@stbi__pic_ + 00116 eb 0b jmp SHORT $LN17@stbi__pic_ $LN16@stbi__pic_: - 00116 48 c7 85 58 01 + 00118 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv81[rbp], 0 $LN17@stbi__pic_: - 00121 48 8b 85 58 01 + 00123 48 8b 85 58 01 00 00 mov rax, QWORD PTR tv81[rbp] - 00128 e9 b6 01 00 00 jmp $LN1@stbi__pic_ + 0012a e9 bb 01 00 00 jmp $LN1@stbi__pic_ $LN7@stbi__pic_: ; 6065 : ; 6066 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (pic header)"); - 0012d 48 8b 8d 90 01 + 0012f 48 8b 8d 90 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00134 e8 00 00 00 00 call stbi__at_eof - 00139 85 c0 test eax, eax - 0013b 74 34 je SHORT $LN8@stbi__pic_ - 0013d 48 8d 0d 00 00 + 00136 e8 00 00 00 00 call stbi__at_eof + 0013b 85 c0 test eax, eax + 0013d 74 34 je SHORT $LN8@stbi__pic_ + 0013f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08GGMBIFE@bad?5file@ - 00144 e8 00 00 00 00 call stbi__err - 00149 85 c0 test eax, eax - 0014b 74 0d je SHORT $LN18@stbi__pic_ - 0014d 48 c7 85 58 01 + 00146 e8 00 00 00 00 call stbi__err + 0014b 85 c0 test eax, eax + 0014d 74 0d je SHORT $LN18@stbi__pic_ + 0014f 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv88[rbp], 0 - 00158 eb 0b jmp SHORT $LN19@stbi__pic_ + 0015a eb 0b jmp SHORT $LN19@stbi__pic_ $LN18@stbi__pic_: - 0015a 48 c7 85 58 01 + 0015c 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv88[rbp], 0 $LN19@stbi__pic_: - 00165 48 8b 85 58 01 + 00167 48 8b 85 58 01 00 00 mov rax, QWORD PTR tv88[rbp] - 0016c e9 72 01 00 00 jmp $LN1@stbi__pic_ + 0016e e9 77 01 00 00 jmp $LN1@stbi__pic_ $LN8@stbi__pic_: ; 6067 : if (!stbi__mad3sizes_valid(x, y, 4, 0)) return stbi__errpuc("too large", "PIC image too large to decode"); - 00171 45 33 c9 xor r9d, r9d - 00174 41 b8 04 00 00 + 00173 45 33 c9 xor r9d, r9d + 00176 41 b8 04 00 00 00 mov r8d, 4 - 0017a 8b 55 64 mov edx, DWORD PTR y$[rbp] - 0017d 8b 4d 44 mov ecx, DWORD PTR x$[rbp] - 00180 e8 00 00 00 00 call stbi__mad3sizes_valid - 00185 85 c0 test eax, eax - 00187 75 34 jne SHORT $LN9@stbi__pic_ - 00189 48 8d 0d 00 00 + 0017c 8b 55 64 mov edx, DWORD PTR y$[rbp] + 0017f 8b 4d 44 mov ecx, DWORD PTR x$[rbp] + 00182 e8 00 00 00 00 call stbi__mad3sizes_valid + 00187 85 c0 test eax, eax + 00189 75 34 jne SHORT $LN9@stbi__pic_ + 0018b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 00190 e8 00 00 00 00 call stbi__err - 00195 85 c0 test eax, eax - 00197 74 0d je SHORT $LN20@stbi__pic_ - 00199 48 c7 85 58 01 + 00192 e8 00 00 00 00 call stbi__err + 00197 85 c0 test eax, eax + 00199 74 0d je SHORT $LN20@stbi__pic_ + 0019b 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv130[rbp], 0 - 001a4 eb 0b jmp SHORT $LN21@stbi__pic_ + 001a6 eb 0b jmp SHORT $LN21@stbi__pic_ $LN20@stbi__pic_: - 001a6 48 c7 85 58 01 + 001a8 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv130[rbp], 0 $LN21@stbi__pic_: - 001b1 48 8b 85 58 01 + 001b3 48 8b 85 58 01 00 00 mov rax, QWORD PTR tv130[rbp] - 001b8 e9 26 01 00 00 jmp $LN1@stbi__pic_ + 001ba e9 2b 01 00 00 jmp $LN1@stbi__pic_ $LN9@stbi__pic_: ; 6068 : ; 6069 : stbi__get32be(s); //skip `ratio' - 001bd 48 8b 8d 90 01 + 001bf 48 8b 8d 90 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001c4 e8 00 00 00 00 call stbi__get32be + 001c6 e8 00 00 00 00 call stbi__get32be + 001cb 90 npad 1 ; 6070 : stbi__get16be(s); //skip `fields' - 001c9 48 8b 8d 90 01 + 001cc 48 8b 8d 90 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001d0 e8 00 00 00 00 call stbi__get16be + 001d3 e8 00 00 00 00 call stbi__get16be + 001d8 90 npad 1 ; 6071 : stbi__get16be(s); //skip `pad' - 001d5 48 8b 8d 90 01 + 001d9 48 8b 8d 90 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001dc e8 00 00 00 00 call stbi__get16be + 001e0 e8 00 00 00 00 call stbi__get16be + 001e5 90 npad 1 ; 6072 : ; 6073 : // intermediate buffer is RGBA ; 6074 : result = (stbi_uc*)stbi__malloc_mad3(x, y, 4, 0); - 001e1 45 33 c9 xor r9d, r9d - 001e4 41 b8 04 00 00 + 001e6 45 33 c9 xor r9d, r9d + 001e9 41 b8 04 00 00 00 mov r8d, 4 - 001ea 8b 55 64 mov edx, DWORD PTR y$[rbp] - 001ed 8b 4d 44 mov ecx, DWORD PTR x$[rbp] - 001f0 e8 00 00 00 00 call stbi__malloc_mad3 - 001f5 48 89 45 08 mov QWORD PTR result$[rbp], rax + 001ef 8b 55 64 mov edx, DWORD PTR y$[rbp] + 001f2 8b 4d 44 mov ecx, DWORD PTR x$[rbp] + 001f5 e8 00 00 00 00 call stbi__malloc_mad3 + 001fa 48 89 45 08 mov QWORD PTR result$[rbp], rax ; 6075 : if (!result) return stbi__errpuc("outofmem", "Out of memory"); - 001f9 48 83 7d 08 00 cmp QWORD PTR result$[rbp], 0 - 001fe 75 34 jne SHORT $LN10@stbi__pic_ - 00200 48 8d 0d 00 00 + 001fe 48 83 7d 08 00 cmp QWORD PTR result$[rbp], 0 + 00203 75 34 jne SHORT $LN10@stbi__pic_ + 00205 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 00207 e8 00 00 00 00 call stbi__err - 0020c 85 c0 test eax, eax - 0020e 74 0d je SHORT $LN22@stbi__pic_ - 00210 48 c7 85 58 01 + 0020c e8 00 00 00 00 call stbi__err + 00211 85 c0 test eax, eax + 00213 74 0d je SHORT $LN22@stbi__pic_ + 00215 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv143[rbp], 0 - 0021b eb 0b jmp SHORT $LN23@stbi__pic_ + 00220 eb 0b jmp SHORT $LN23@stbi__pic_ $LN22@stbi__pic_: - 0021d 48 c7 85 58 01 + 00222 48 c7 85 58 01 00 00 00 00 00 00 mov QWORD PTR tv143[rbp], 0 $LN23@stbi__pic_: - 00228 48 8b 85 58 01 + 0022d 48 8b 85 58 01 00 00 mov rax, QWORD PTR tv143[rbp] - 0022f e9 af 00 00 00 jmp $LN1@stbi__pic_ + 00234 e9 b1 00 00 00 jmp $LN1@stbi__pic_ $LN10@stbi__pic_: ; 6076 : memset(result, 0xff, x * y * 4); - 00234 8b 45 44 mov eax, DWORD PTR x$[rbp] - 00237 0f af 45 64 imul eax, DWORD PTR y$[rbp] - 0023b c1 e0 02 shl eax, 2 - 0023e 48 98 cdqe - 00240 4c 8b c0 mov r8, rax - 00243 ba ff 00 00 00 mov edx, 255 ; 000000ffH - 00248 48 8b 4d 08 mov rcx, QWORD PTR result$[rbp] - 0024c e8 00 00 00 00 call memset + 00239 8b 45 44 mov eax, DWORD PTR x$[rbp] + 0023c 0f af 45 64 imul eax, DWORD PTR y$[rbp] + 00240 c1 e0 02 shl eax, 2 + 00243 48 98 cdqe + 00245 4c 8b c0 mov r8, rax + 00248 ba ff 00 00 00 mov edx, 255 ; 000000ffH + 0024d 48 8b 4d 08 mov rcx, QWORD PTR result$[rbp] + 00251 e8 00 00 00 00 call memset + 00256 90 npad 1 ; 6077 : ; 6078 : if (!stbi__pic_load_core(s, x, y, comp, result)) { - 00251 48 8b 45 08 mov rax, QWORD PTR result$[rbp] - 00255 48 89 44 24 20 mov QWORD PTR [rsp+32], rax - 0025a 4c 8b 8d a8 01 + 00257 48 8b 45 08 mov rax, QWORD PTR result$[rbp] + 0025b 48 89 44 24 20 mov QWORD PTR [rsp+32], rax + 00260 4c 8b 8d a8 01 00 00 mov r9, QWORD PTR comp$[rbp] - 00261 44 8b 45 64 mov r8d, DWORD PTR y$[rbp] - 00265 8b 55 44 mov edx, DWORD PTR x$[rbp] - 00268 48 8b 8d 90 01 + 00267 44 8b 45 64 mov r8d, DWORD PTR y$[rbp] + 0026b 8b 55 44 mov edx, DWORD PTR x$[rbp] + 0026e 48 8b 8d 90 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0026f e8 00 00 00 00 call stbi__pic_load_core - 00274 48 85 c0 test rax, rax - 00277 75 12 jne SHORT $LN11@stbi__pic_ + 00275 e8 00 00 00 00 call stbi__pic_load_core + 0027a 48 85 c0 test rax, rax + 0027d 75 13 jne SHORT $LN11@stbi__pic_ ; 6079 : STBI_FREE(result); - 00279 48 8b 4d 08 mov rcx, QWORD PTR result$[rbp] - 0027d ff 15 00 00 00 + 0027f 48 8b 4d 08 mov rcx, QWORD PTR result$[rbp] + 00283 ff 15 00 00 00 00 call QWORD PTR __imp_free + 00289 90 npad 1 ; 6080 : result = 0; - 00283 48 c7 45 08 00 + 0028a 48 c7 45 08 00 00 00 00 mov QWORD PTR result$[rbp], 0 $LN11@stbi__pic_: ; 6081 : } ; 6082 : *px = x; - 0028b 48 8b 85 98 01 + 00292 48 8b 85 98 01 00 00 mov rax, QWORD PTR px$[rbp] - 00292 8b 4d 44 mov ecx, DWORD PTR x$[rbp] - 00295 89 08 mov DWORD PTR [rax], ecx + 00299 8b 4d 44 mov ecx, DWORD PTR x$[rbp] + 0029c 89 08 mov DWORD PTR [rax], ecx ; 6083 : *py = y; - 00297 48 8b 85 a0 01 + 0029e 48 8b 85 a0 01 00 00 mov rax, QWORD PTR py$[rbp] - 0029e 8b 4d 64 mov ecx, DWORD PTR y$[rbp] - 002a1 89 08 mov DWORD PTR [rax], ecx + 002a5 8b 4d 64 mov ecx, DWORD PTR y$[rbp] + 002a8 89 08 mov DWORD PTR [rax], ecx ; 6084 : if (req_comp == 0) req_comp = *comp; - 002a3 83 bd b0 01 00 + 002aa 83 bd b0 01 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 002aa 75 0f jne SHORT $LN12@stbi__pic_ - 002ac 48 8b 85 a8 01 + 002b1 75 0f jne SHORT $LN12@stbi__pic_ + 002b3 48 8b 85 a8 01 00 00 mov rax, QWORD PTR comp$[rbp] - 002b3 8b 00 mov eax, DWORD PTR [rax] - 002b5 89 85 b0 01 00 + 002ba 8b 00 mov eax, DWORD PTR [rax] + 002bc 89 85 b0 01 00 00 mov DWORD PTR req_comp$[rbp], eax $LN12@stbi__pic_: ; 6085 : result = stbi__convert_format(result, 4, req_comp, x, y); - 002bb 8b 45 64 mov eax, DWORD PTR y$[rbp] - 002be 89 44 24 20 mov DWORD PTR [rsp+32], eax - 002c2 44 8b 4d 44 mov r9d, DWORD PTR x$[rbp] - 002c6 44 8b 85 b0 01 + 002c2 8b 45 64 mov eax, DWORD PTR y$[rbp] + 002c5 89 44 24 20 mov DWORD PTR [rsp+32], eax + 002c9 44 8b 4d 44 mov r9d, DWORD PTR x$[rbp] + 002cd 44 8b 85 b0 01 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 002cd ba 04 00 00 00 mov edx, 4 - 002d2 48 8b 4d 08 mov rcx, QWORD PTR result$[rbp] - 002d6 e8 00 00 00 00 call stbi__convert_format - 002db 48 89 45 08 mov QWORD PTR result$[rbp], rax + 002d4 ba 04 00 00 00 mov edx, 4 + 002d9 48 8b 4d 08 mov rcx, QWORD PTR result$[rbp] + 002dd e8 00 00 00 00 call stbi__convert_format + 002e2 48 89 45 08 mov QWORD PTR result$[rbp], rax ; 6086 : ; 6087 : return result; - 002df 48 8b 45 08 mov rax, QWORD PTR result$[rbp] + 002e6 48 8b 45 08 mov rax, QWORD PTR result$[rbp] $LN1@stbi__pic_: ; 6088 : } - 002e3 48 8b f8 mov rdi, rax - 002e6 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 002ea 48 8d 15 00 00 + 002ea 48 8b f8 mov rdi, rax + 002ed 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 002f1 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__pic_load$rtcFrameData - 002f1 e8 00 00 00 00 call _RTC_CheckStackVars - 002f6 48 8b c7 mov rax, rdi - 002f9 48 8b 8d 60 01 + 002f8 e8 00 00 00 00 call _RTC_CheckStackVars + 002fd 48 8b c7 mov rax, rdi + 00300 48 8b 8d 60 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00300 48 33 cd xor rcx, rbp - 00303 e8 00 00 00 00 call __security_check_cookie - 00308 48 8d a5 78 01 + 00307 48 33 cd xor rcx, rbp + 0030a e8 00 00 00 00 call __security_check_cookie + 0030f 48 8d a5 78 01 00 00 lea rsp, QWORD PTR [rbp+376] - 0030f 5f pop rdi - 00310 5d pop rbp - 00311 c3 ret 0 + 00316 5f pop rdi + 00317 5d pop rbp + 00318 c3 ret 0 stbi__pic_load ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -46794,31 +47117,33 @@ stbi__pic_test PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 6092 : int r = stbi__pic_test_core(s); - 0001f 48 8b 8d 00 01 + 00020 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__pic_test_core - 0002b 89 45 04 mov DWORD PTR r$[rbp], eax + 00027 e8 00 00 00 00 call stbi__pic_test_core + 0002c 89 45 04 mov DWORD PTR r$[rbp], eax ; 6093 : stbi__rewind(s); - 0002e 48 8b 8d 00 01 + 0002f 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00035 e8 00 00 00 00 call stbi__rewind + 00036 e8 00 00 00 00 call stbi__rewind + 0003b 90 npad 1 ; 6094 : return r; - 0003a 8b 45 04 mov eax, DWORD PTR r$[rbp] + 0003c 8b 45 04 mov eax, DWORD PTR r$[rbp] ; 6095 : } - 0003d 48 8d a5 e8 00 + 0003f 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00044 5f pop rdi - 00045 5d pop rbp - 00046 c3 ret 0 + 00046 5f pop rdi + 00047 5d pop rbp + 00048 c3 ret 0 stbi__pic_test ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -46861,68 +47186,70 @@ stbi__hdr_info PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 6859 : char buffer[STBI__HDR_BUFLEN]; ; 6860 : char* token; ; 6861 : int valid = 0; - 00058 c7 85 44 04 00 + 00059 c7 85 44 04 00 00 00 00 00 00 mov DWORD PTR valid$[rbp], 0 ; 6862 : int dummy; ; 6863 : ; 6864 : if (!x) x = &dummy; - 00062 48 83 bd e8 06 + 00063 48 83 bd e8 06 00 00 00 cmp QWORD PTR x$[rbp], 0 - 0006a 75 0e jne SHORT $LN7@stbi__hdr_ - 0006c 48 8d 85 64 04 + 0006b 75 0e jne SHORT $LN7@stbi__hdr_ + 0006d 48 8d 85 64 04 00 00 lea rax, QWORD PTR dummy$[rbp] - 00073 48 89 85 e8 06 + 00074 48 89 85 e8 06 00 00 mov QWORD PTR x$[rbp], rax $LN7@stbi__hdr_: ; 6865 : if (!y) y = &dummy; - 0007a 48 83 bd f0 06 + 0007b 48 83 bd f0 06 00 00 00 cmp QWORD PTR y$[rbp], 0 - 00082 75 0e jne SHORT $LN8@stbi__hdr_ - 00084 48 8d 85 64 04 + 00083 75 0e jne SHORT $LN8@stbi__hdr_ + 00085 48 8d 85 64 04 00 00 lea rax, QWORD PTR dummy$[rbp] - 0008b 48 89 85 f0 06 + 0008c 48 89 85 f0 06 00 00 mov QWORD PTR y$[rbp], rax $LN8@stbi__hdr_: ; 6866 : if (!comp) comp = &dummy; - 00092 48 83 bd f8 06 + 00093 48 83 bd f8 06 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 0009a 75 0e jne SHORT $LN9@stbi__hdr_ - 0009c 48 8d 85 64 04 + 0009b 75 0e jne SHORT $LN9@stbi__hdr_ + 0009d 48 8d 85 64 04 00 00 lea rax, QWORD PTR dummy$[rbp] - 000a3 48 89 85 f8 06 + 000a4 48 89 85 f8 06 00 00 mov QWORD PTR comp$[rbp], rax $LN9@stbi__hdr_: ; 6867 : ; 6868 : if (stbi__hdr_test(s) == 0) { - 000aa 48 8b 8d e0 06 + 000ab 48 8b 8d e0 06 00 00 mov rcx, QWORD PTR s$[rbp] - 000b1 e8 00 00 00 00 call stbi__hdr_test - 000b6 85 c0 test eax, eax - 000b8 75 13 jne SHORT $LN10@stbi__hdr_ + 000b2 e8 00 00 00 00 call stbi__hdr_test + 000b7 85 c0 test eax, eax + 000b9 75 14 jne SHORT $LN10@stbi__hdr_ ; 6869 : stbi__rewind(s); - 000ba 48 8b 8d e0 06 + 000bb 48 8b 8d e0 06 00 00 mov rcx, QWORD PTR s$[rbp] - 000c1 e8 00 00 00 00 call stbi__rewind + 000c2 e8 00 00 00 00 call stbi__rewind + 000c7 90 npad 1 ; 6870 : return 0; - 000c6 33 c0 xor eax, eax - 000c8 e9 7f 01 00 00 jmp $LN1@stbi__hdr_ + 000c8 33 c0 xor eax, eax + 000ca e9 82 01 00 00 jmp $LN1@stbi__hdr_ $LN10@stbi__hdr_: $LN2@stbi__hdr_: @@ -46931,212 +47258,215 @@ $LN2@stbi__hdr_: ; 6873 : for (;;) { ; 6874 : token = stbi__hdr_gettoken(s, buffer); - 000cd 48 8d 55 10 lea rdx, QWORD PTR buffer$[rbp] - 000d1 48 8b 8d e0 06 + 000cf 48 8d 55 10 lea rdx, QWORD PTR buffer$[rbp] + 000d3 48 8b 8d e0 06 00 00 mov rcx, QWORD PTR s$[rbp] - 000d8 e8 00 00 00 00 call stbi__hdr_gettoken - 000dd 48 89 85 28 04 + 000da e8 00 00 00 00 call stbi__hdr_gettoken + 000df 48 89 85 28 04 00 00 mov QWORD PTR token$[rbp], rax ; 6875 : if (token[0] == 0) break; - 000e4 b8 01 00 00 00 mov eax, 1 - 000e9 48 6b c0 00 imul rax, rax, 0 - 000ed 48 8b 8d 28 04 + 000e6 b8 01 00 00 00 mov eax, 1 + 000eb 48 6b c0 00 imul rax, rax, 0 + 000ef 48 8b 8d 28 04 00 00 mov rcx, QWORD PTR token$[rbp] - 000f4 0f be 04 01 movsx eax, BYTE PTR [rcx+rax] - 000f8 85 c0 test eax, eax - 000fa 75 02 jne SHORT $LN11@stbi__hdr_ - 000fc eb 23 jmp SHORT $LN3@stbi__hdr_ + 000f6 0f be 04 01 movsx eax, BYTE PTR [rcx+rax] + 000fa 85 c0 test eax, eax + 000fc 75 02 jne SHORT $LN11@stbi__hdr_ + 000fe eb 23 jmp SHORT $LN3@stbi__hdr_ $LN11@stbi__hdr_: ; 6876 : if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; - 000fe 48 8d 15 00 00 + 00100 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BH@JFGBLLKC@FORMAT?$DN32?9bit_rle_rgbe@ - 00105 48 8b 8d 28 04 + 00107 48 8b 8d 28 04 00 00 mov rcx, QWORD PTR token$[rbp] - 0010c e8 00 00 00 00 call strcmp - 00111 85 c0 test eax, eax - 00113 75 0a jne SHORT $LN12@stbi__hdr_ - 00115 c7 85 44 04 00 + 0010e e8 00 00 00 00 call strcmp + 00113 85 c0 test eax, eax + 00115 75 0a jne SHORT $LN12@stbi__hdr_ + 00117 c7 85 44 04 00 00 01 00 00 00 mov DWORD PTR valid$[rbp], 1 $LN12@stbi__hdr_: ; 6877 : } - 0011f eb ac jmp SHORT $LN2@stbi__hdr_ + 00121 eb ac jmp SHORT $LN2@stbi__hdr_ $LN3@stbi__hdr_: ; 6878 : ; 6879 : if (!valid) { - 00121 83 bd 44 04 00 + 00123 83 bd 44 04 00 00 00 cmp DWORD PTR valid$[rbp], 0 - 00128 75 13 jne SHORT $LN13@stbi__hdr_ + 0012a 75 14 jne SHORT $LN13@stbi__hdr_ ; 6880 : stbi__rewind(s); - 0012a 48 8b 8d e0 06 + 0012c 48 8b 8d e0 06 00 00 mov rcx, QWORD PTR s$[rbp] - 00131 e8 00 00 00 00 call stbi__rewind + 00133 e8 00 00 00 00 call stbi__rewind + 00138 90 npad 1 ; 6881 : return 0; - 00136 33 c0 xor eax, eax - 00138 e9 0f 01 00 00 jmp $LN1@stbi__hdr_ + 00139 33 c0 xor eax, eax + 0013b e9 11 01 00 00 jmp $LN1@stbi__hdr_ $LN13@stbi__hdr_: ; 6882 : } ; 6883 : token = stbi__hdr_gettoken(s, buffer); - 0013d 48 8d 55 10 lea rdx, QWORD PTR buffer$[rbp] - 00141 48 8b 8d e0 06 + 00140 48 8d 55 10 lea rdx, QWORD PTR buffer$[rbp] + 00144 48 8b 8d e0 06 00 00 mov rcx, QWORD PTR s$[rbp] - 00148 e8 00 00 00 00 call stbi__hdr_gettoken - 0014d 48 89 85 28 04 + 0014b e8 00 00 00 00 call stbi__hdr_gettoken + 00150 48 89 85 28 04 00 00 mov QWORD PTR token$[rbp], rax ; 6884 : if (strncmp(token, "-Y ", 3)) { - 00154 41 b8 03 00 00 + 00157 41 b8 03 00 00 00 mov r8d, 3 - 0015a 48 8d 15 00 00 + 0015d 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_03HKAKGGJN@?9Y?5@ - 00161 48 8b 8d 28 04 + 00164 48 8b 8d 28 04 00 00 mov rcx, QWORD PTR token$[rbp] - 00168 ff 15 00 00 00 + 0016b ff 15 00 00 00 00 call QWORD PTR __imp_strncmp - 0016e 85 c0 test eax, eax - 00170 74 13 je SHORT $LN14@stbi__hdr_ + 00171 85 c0 test eax, eax + 00173 74 14 je SHORT $LN14@stbi__hdr_ ; 6885 : stbi__rewind(s); - 00172 48 8b 8d e0 06 + 00175 48 8b 8d e0 06 00 00 mov rcx, QWORD PTR s$[rbp] - 00179 e8 00 00 00 00 call stbi__rewind + 0017c e8 00 00 00 00 call stbi__rewind + 00181 90 npad 1 ; 6886 : return 0; - 0017e 33 c0 xor eax, eax - 00180 e9 c7 00 00 00 jmp $LN1@stbi__hdr_ + 00182 33 c0 xor eax, eax + 00184 e9 c8 00 00 00 jmp $LN1@stbi__hdr_ $LN14@stbi__hdr_: ; 6887 : } ; 6888 : token += 3; - 00185 48 8b 85 28 04 + 00189 48 8b 85 28 04 00 00 mov rax, QWORD PTR token$[rbp] - 0018c 48 83 c0 03 add rax, 3 - 00190 48 89 85 28 04 + 00190 48 83 c0 03 add rax, 3 + 00194 48 89 85 28 04 00 00 mov QWORD PTR token$[rbp], rax ; 6889 : *y = (int)strtol(token, &token, 10); - 00197 41 b8 0a 00 00 + 0019b 41 b8 0a 00 00 00 mov r8d, 10 - 0019d 48 8d 95 28 04 + 001a1 48 8d 95 28 04 00 00 lea rdx, QWORD PTR token$[rbp] - 001a4 48 8b 8d 28 04 + 001a8 48 8b 8d 28 04 00 00 mov rcx, QWORD PTR token$[rbp] - 001ab ff 15 00 00 00 + 001af ff 15 00 00 00 00 call QWORD PTR __imp_strtol - 001b1 48 8b 8d f0 06 + 001b5 48 8b 8d f0 06 00 00 mov rcx, QWORD PTR y$[rbp] - 001b8 89 01 mov DWORD PTR [rcx], eax + 001bc 89 01 mov DWORD PTR [rcx], eax $LN5@stbi__hdr_: ; 6890 : while (*token == ' ') ++token; - 001ba 48 8b 85 28 04 + 001be 48 8b 85 28 04 00 00 mov rax, QWORD PTR token$[rbp] - 001c1 0f be 00 movsx eax, BYTE PTR [rax] - 001c4 83 f8 20 cmp eax, 32 ; 00000020H - 001c7 75 13 jne SHORT $LN6@stbi__hdr_ - 001c9 48 8b 85 28 04 + 001c5 0f be 00 movsx eax, BYTE PTR [rax] + 001c8 83 f8 20 cmp eax, 32 ; 00000020H + 001cb 75 13 jne SHORT $LN6@stbi__hdr_ + 001cd 48 8b 85 28 04 00 00 mov rax, QWORD PTR token$[rbp] - 001d0 48 ff c0 inc rax - 001d3 48 89 85 28 04 + 001d4 48 ff c0 inc rax + 001d7 48 89 85 28 04 00 00 mov QWORD PTR token$[rbp], rax - 001da eb de jmp SHORT $LN5@stbi__hdr_ + 001de eb de jmp SHORT $LN5@stbi__hdr_ $LN6@stbi__hdr_: ; 6891 : if (strncmp(token, "+X ", 3)) { - 001dc 41 b8 03 00 00 + 001e0 41 b8 03 00 00 00 mov r8d, 3 - 001e2 48 8d 15 00 00 + 001e6 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_03FOKDFDHG@?$CLX?5@ - 001e9 48 8b 8d 28 04 + 001ed 48 8b 8d 28 04 00 00 mov rcx, QWORD PTR token$[rbp] - 001f0 ff 15 00 00 00 + 001f4 ff 15 00 00 00 00 call QWORD PTR __imp_strncmp - 001f6 85 c0 test eax, eax - 001f8 74 10 je SHORT $LN15@stbi__hdr_ + 001fa 85 c0 test eax, eax + 001fc 74 11 je SHORT $LN15@stbi__hdr_ ; 6892 : stbi__rewind(s); - 001fa 48 8b 8d e0 06 + 001fe 48 8b 8d e0 06 00 00 mov rcx, QWORD PTR s$[rbp] - 00201 e8 00 00 00 00 call stbi__rewind + 00205 e8 00 00 00 00 call stbi__rewind + 0020a 90 npad 1 ; 6893 : return 0; - 00206 33 c0 xor eax, eax - 00208 eb 42 jmp SHORT $LN1@stbi__hdr_ + 0020b 33 c0 xor eax, eax + 0020d eb 42 jmp SHORT $LN1@stbi__hdr_ $LN15@stbi__hdr_: ; 6894 : } ; 6895 : token += 3; - 0020a 48 8b 85 28 04 + 0020f 48 8b 85 28 04 00 00 mov rax, QWORD PTR token$[rbp] - 00211 48 83 c0 03 add rax, 3 - 00215 48 89 85 28 04 + 00216 48 83 c0 03 add rax, 3 + 0021a 48 89 85 28 04 00 00 mov QWORD PTR token$[rbp], rax ; 6896 : *x = (int)strtol(token, NULL, 10); - 0021c 41 b8 0a 00 00 + 00221 41 b8 0a 00 00 00 mov r8d, 10 - 00222 33 d2 xor edx, edx - 00224 48 8b 8d 28 04 + 00227 33 d2 xor edx, edx + 00229 48 8b 8d 28 04 00 00 mov rcx, QWORD PTR token$[rbp] - 0022b ff 15 00 00 00 + 00230 ff 15 00 00 00 00 call QWORD PTR __imp_strtol - 00231 48 8b 8d e8 06 + 00236 48 8b 8d e8 06 00 00 mov rcx, QWORD PTR x$[rbp] - 00238 89 01 mov DWORD PTR [rcx], eax + 0023d 89 01 mov DWORD PTR [rcx], eax ; 6897 : *comp = 3; - 0023a 48 8b 85 f8 06 + 0023f 48 8b 85 f8 06 00 00 mov rax, QWORD PTR comp$[rbp] - 00241 c7 00 03 00 00 + 00246 c7 00 03 00 00 00 mov DWORD PTR [rax], 3 ; 6898 : return 1; - 00247 b8 01 00 00 00 mov eax, 1 + 0024c b8 01 00 00 00 mov eax, 1 $LN1@stbi__hdr_: ; 6899 : } - 0024c 48 8b f8 mov rdi, rax - 0024f 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00253 48 8d 15 00 00 + 00251 48 8b f8 mov rdi, rax + 00254 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00258 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__hdr_info$rtcFrameData - 0025a e8 00 00 00 00 call _RTC_CheckStackVars - 0025f 48 8b c7 mov rax, rdi - 00262 48 8b 8d b8 06 + 0025f e8 00 00 00 00 call _RTC_CheckStackVars + 00264 48 8b c7 mov rax, rdi + 00267 48 8b 8d b8 06 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00269 48 33 cd xor rcx, rbp - 0026c e8 00 00 00 00 call __security_check_cookie - 00271 48 8d a5 c8 06 + 0026e 48 33 cd xor rcx, rbp + 00271 e8 00 00 00 00 call __security_check_cookie + 00276 48 8d a5 c8 06 00 00 lea rsp, QWORD PTR [rbp+1736] - 00278 5f pop rdi - 00279 5d pop rbp - 0027a c3 ret 0 + 0027d 5f pop rdi + 0027e 5d pop rbp + 0027f c3 ret 0 stbi__hdr_info ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -47164,17 +47494,17 @@ rgbe$7 = 1572 rgbe$8 = 1604 nleft$9 = 1636 tv309 = 2424 -tv290 = 2424 -tv267 = 2424 -tv256 = 2424 -tv194 = 2424 -tv183 = 2424 -tv170 = 2424 -tv165 = 2424 -tv155 = 2424 -tv138 = 2424 -tv94 = 2424 tv78 = 2424 +tv94 = 2424 +tv138 = 2424 +tv155 = 2424 +tv165 = 2424 +tv170 = 2424 +tv183 = 2424 +tv194 = 2424 +tv256 = 2424 +tv267 = 2424 +tv290 = 2424 __$ArrayPad$ = 2432 s$ = 2480 x$ = 2488 @@ -47209,12 +47539,13 @@ stbi__hdr_load PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 6726 : char buffer[STBI__HDR_BUFLEN]; ; 6727 : char* token; ; 6728 : int valid = 0; - 00058 c7 85 44 04 00 + 00059 c7 85 44 04 00 00 00 00 00 00 mov DWORD PTR valid$[rbp], 0 ; 6729 : int width, height; @@ -47229,49 +47560,49 @@ stbi__hdr_load PROC ; COMDAT ; 6738 : // Check identifier ; 6739 : headerToken = stbi__hdr_gettoken(s, buffer); - 00062 48 8d 55 10 lea rdx, QWORD PTR buffer$[rbp] - 00066 48 8b 8d b0 09 + 00063 48 8d 55 10 lea rdx, QWORD PTR buffer$[rbp] + 00067 48 8b 8d b0 09 00 00 mov rcx, QWORD PTR s$[rbp] - 0006d e8 00 00 00 00 call stbi__hdr_gettoken - 00072 48 89 85 08 06 + 0006e e8 00 00 00 00 call stbi__hdr_gettoken + 00073 48 89 85 08 06 00 00 mov QWORD PTR headerToken$[rbp], rax ; 6740 : if (strcmp(headerToken, "#?RADIANCE") != 0 && strcmp(headerToken, "#?RGBE") != 0) - 00079 48 8d 15 00 00 + 0007a 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0L@NCPEAJBD@?$CD?$DPRADIANCE@ - 00080 48 8b 8d 08 06 + 00081 48 8b 8d 08 06 00 00 mov rcx, QWORD PTR headerToken$[rbp] - 00087 e8 00 00 00 00 call strcmp - 0008c 85 c0 test eax, eax - 0008e 74 4b je SHORT $LN30@stbi__hdr_ - 00090 48 8d 15 00 00 + 00088 e8 00 00 00 00 call strcmp + 0008d 85 c0 test eax, eax + 0008f 74 4b je SHORT $LN30@stbi__hdr_ + 00091 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_06NDOKKIDJ@?$CD?$DPRGBE@ - 00097 48 8b 8d 08 06 + 00098 48 8b 8d 08 06 00 00 mov rcx, QWORD PTR headerToken$[rbp] - 0009e e8 00 00 00 00 call strcmp - 000a3 85 c0 test eax, eax - 000a5 74 34 je SHORT $LN30@stbi__hdr_ + 0009f e8 00 00 00 00 call strcmp + 000a4 85 c0 test eax, eax + 000a6 74 34 je SHORT $LN30@stbi__hdr_ ; 6741 : return stbi__errpf("not HDR", "Corrupt HDR image"); - 000a7 48 8d 0d 00 00 + 000a8 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07NCIOKENI@not?5HDR@ - 000ae e8 00 00 00 00 call stbi__err - 000b3 85 c0 test eax, eax - 000b5 74 0d je SHORT $LN58@stbi__hdr_ - 000b7 48 c7 85 78 09 + 000af e8 00 00 00 00 call stbi__err + 000b4 85 c0 test eax, eax + 000b6 74 0d je SHORT $LN58@stbi__hdr_ + 000b8 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv78[rbp], 0 - 000c2 eb 0b jmp SHORT $LN59@stbi__hdr_ + 000c3 eb 0b jmp SHORT $LN59@stbi__hdr_ $LN58@stbi__hdr_: - 000c4 48 c7 85 78 09 + 000c5 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv78[rbp], 0 $LN59@stbi__hdr_: - 000cf 48 8b 85 78 09 + 000d0 48 8b 85 78 09 00 00 mov rax, QWORD PTR tv78[rbp] - 000d6 e9 46 09 00 00 jmp $LN1@stbi__hdr_ + 000d7 e9 53 09 00 00 jmp $LN1@stbi__hdr_ $LN30@stbi__hdr_: $LN2@stbi__hdr_: @@ -47280,66 +47611,66 @@ $LN2@stbi__hdr_: ; 6744 : for (;;) { ; 6745 : token = stbi__hdr_gettoken(s, buffer); - 000db 48 8d 55 10 lea rdx, QWORD PTR buffer$[rbp] - 000df 48 8b 8d b0 09 + 000dc 48 8d 55 10 lea rdx, QWORD PTR buffer$[rbp] + 000e0 48 8b 8d b0 09 00 00 mov rcx, QWORD PTR s$[rbp] - 000e6 e8 00 00 00 00 call stbi__hdr_gettoken - 000eb 48 89 85 28 04 + 000e7 e8 00 00 00 00 call stbi__hdr_gettoken + 000ec 48 89 85 28 04 00 00 mov QWORD PTR token$[rbp], rax ; 6746 : if (token[0] == 0) break; - 000f2 b8 01 00 00 00 mov eax, 1 - 000f7 48 6b c0 00 imul rax, rax, 0 - 000fb 48 8b 8d 28 04 + 000f3 b8 01 00 00 00 mov eax, 1 + 000f8 48 6b c0 00 imul rax, rax, 0 + 000fc 48 8b 8d 28 04 00 00 mov rcx, QWORD PTR token$[rbp] - 00102 0f be 04 01 movsx eax, BYTE PTR [rcx+rax] - 00106 85 c0 test eax, eax - 00108 75 02 jne SHORT $LN31@stbi__hdr_ - 0010a eb 23 jmp SHORT $LN3@stbi__hdr_ + 00103 0f be 04 01 movsx eax, BYTE PTR [rcx+rax] + 00107 85 c0 test eax, eax + 00109 75 02 jne SHORT $LN31@stbi__hdr_ + 0010b eb 23 jmp SHORT $LN3@stbi__hdr_ $LN31@stbi__hdr_: ; 6747 : if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; - 0010c 48 8d 15 00 00 + 0010d 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BH@JFGBLLKC@FORMAT?$DN32?9bit_rle_rgbe@ - 00113 48 8b 8d 28 04 + 00114 48 8b 8d 28 04 00 00 mov rcx, QWORD PTR token$[rbp] - 0011a e8 00 00 00 00 call strcmp - 0011f 85 c0 test eax, eax - 00121 75 0a jne SHORT $LN32@stbi__hdr_ - 00123 c7 85 44 04 00 + 0011b e8 00 00 00 00 call strcmp + 00120 85 c0 test eax, eax + 00122 75 0a jne SHORT $LN32@stbi__hdr_ + 00124 c7 85 44 04 00 00 01 00 00 00 mov DWORD PTR valid$[rbp], 1 $LN32@stbi__hdr_: ; 6748 : } - 0012d eb ac jmp SHORT $LN2@stbi__hdr_ + 0012e eb ac jmp SHORT $LN2@stbi__hdr_ $LN3@stbi__hdr_: ; 6749 : ; 6750 : if (!valid) return stbi__errpf("unsupported format", "Unsupported HDR format"); - 0012f 83 bd 44 04 00 + 00130 83 bd 44 04 00 00 00 cmp DWORD PTR valid$[rbp], 0 - 00136 75 34 jne SHORT $LN33@stbi__hdr_ - 00138 48 8d 0d 00 00 + 00137 75 34 jne SHORT $LN33@stbi__hdr_ + 00139 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BD@NKJFFLKL@unsupported?5format@ - 0013f e8 00 00 00 00 call stbi__err - 00144 85 c0 test eax, eax - 00146 74 0d je SHORT $LN60@stbi__hdr_ - 00148 48 c7 85 78 09 + 00140 e8 00 00 00 00 call stbi__err + 00145 85 c0 test eax, eax + 00147 74 0d je SHORT $LN60@stbi__hdr_ + 00149 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv94[rbp], 0 - 00153 eb 0b jmp SHORT $LN61@stbi__hdr_ + 00154 eb 0b jmp SHORT $LN61@stbi__hdr_ $LN60@stbi__hdr_: - 00155 48 c7 85 78 09 + 00156 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv94[rbp], 0 $LN61@stbi__hdr_: - 00160 48 8b 85 78 09 + 00161 48 8b 85 78 09 00 00 mov rax, QWORD PTR tv94[rbp] - 00167 e9 b5 08 00 00 jmp $LN1@stbi__hdr_ + 00168 e9 c2 08 00 00 jmp $LN1@stbi__hdr_ $LN33@stbi__hdr_: ; 6751 : @@ -47347,300 +47678,300 @@ $LN33@stbi__hdr_: ; 6753 : // can't use sscanf() if we're not using stdio! ; 6754 : token = stbi__hdr_gettoken(s, buffer); - 0016c 48 8d 55 10 lea rdx, QWORD PTR buffer$[rbp] - 00170 48 8b 8d b0 09 + 0016d 48 8d 55 10 lea rdx, QWORD PTR buffer$[rbp] + 00171 48 8b 8d b0 09 00 00 mov rcx, QWORD PTR s$[rbp] - 00177 e8 00 00 00 00 call stbi__hdr_gettoken - 0017c 48 89 85 28 04 + 00178 e8 00 00 00 00 call stbi__hdr_gettoken + 0017d 48 89 85 28 04 00 00 mov QWORD PTR token$[rbp], rax ; 6755 : if (strncmp(token, "-Y ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); - 00183 41 b8 03 00 00 + 00184 41 b8 03 00 00 00 mov r8d, 3 - 00189 48 8d 15 00 00 + 0018a 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_03HKAKGGJN@?9Y?5@ - 00190 48 8b 8d 28 04 + 00191 48 8b 8d 28 04 00 00 mov rcx, QWORD PTR token$[rbp] - 00197 ff 15 00 00 00 + 00198 ff 15 00 00 00 00 call QWORD PTR __imp_strncmp - 0019d 85 c0 test eax, eax - 0019f 74 34 je SHORT $LN34@stbi__hdr_ - 001a1 48 8d 0d 00 00 + 0019e 85 c0 test eax, eax + 001a0 74 34 je SHORT $LN34@stbi__hdr_ + 001a2 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BI@DCNDPIOH@unsupported?5data?5layout@ - 001a8 e8 00 00 00 00 call stbi__err - 001ad 85 c0 test eax, eax - 001af 74 0d je SHORT $LN62@stbi__hdr_ - 001b1 48 c7 85 78 09 + 001a9 e8 00 00 00 00 call stbi__err + 001ae 85 c0 test eax, eax + 001b0 74 0d je SHORT $LN62@stbi__hdr_ + 001b2 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv138[rbp], 0 - 001bc eb 0b jmp SHORT $LN63@stbi__hdr_ + 001bd eb 0b jmp SHORT $LN63@stbi__hdr_ $LN62@stbi__hdr_: - 001be 48 c7 85 78 09 + 001bf 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv138[rbp], 0 $LN63@stbi__hdr_: - 001c9 48 8b 85 78 09 + 001ca 48 8b 85 78 09 00 00 mov rax, QWORD PTR tv138[rbp] - 001d0 e9 4c 08 00 00 jmp $LN1@stbi__hdr_ + 001d1 e9 59 08 00 00 jmp $LN1@stbi__hdr_ $LN34@stbi__hdr_: ; 6756 : token += 3; - 001d5 48 8b 85 28 04 + 001d6 48 8b 85 28 04 00 00 mov rax, QWORD PTR token$[rbp] - 001dc 48 83 c0 03 add rax, 3 - 001e0 48 89 85 28 04 + 001dd 48 83 c0 03 add rax, 3 + 001e1 48 89 85 28 04 00 00 mov QWORD PTR token$[rbp], rax ; 6757 : height = (int)strtol(token, &token, 10); - 001e7 41 b8 0a 00 00 + 001e8 41 b8 0a 00 00 00 mov r8d, 10 - 001ed 48 8d 95 28 04 + 001ee 48 8d 95 28 04 00 00 lea rdx, QWORD PTR token$[rbp] - 001f4 48 8b 8d 28 04 + 001f5 48 8b 8d 28 04 00 00 mov rcx, QWORD PTR token$[rbp] - 001fb ff 15 00 00 00 + 001fc ff 15 00 00 00 00 call QWORD PTR __imp_strtol - 00201 89 85 84 04 00 + 00202 89 85 84 04 00 00 mov DWORD PTR height$[rbp], eax $LN5@stbi__hdr_: ; 6758 : while (*token == ' ') ++token; - 00207 48 8b 85 28 04 + 00208 48 8b 85 28 04 00 00 mov rax, QWORD PTR token$[rbp] - 0020e 0f be 00 movsx eax, BYTE PTR [rax] - 00211 83 f8 20 cmp eax, 32 ; 00000020H - 00214 75 13 jne SHORT $LN6@stbi__hdr_ - 00216 48 8b 85 28 04 + 0020f 0f be 00 movsx eax, BYTE PTR [rax] + 00212 83 f8 20 cmp eax, 32 ; 00000020H + 00215 75 13 jne SHORT $LN6@stbi__hdr_ + 00217 48 8b 85 28 04 00 00 mov rax, QWORD PTR token$[rbp] - 0021d 48 ff c0 inc rax - 00220 48 89 85 28 04 + 0021e 48 ff c0 inc rax + 00221 48 89 85 28 04 00 00 mov QWORD PTR token$[rbp], rax - 00227 eb de jmp SHORT $LN5@stbi__hdr_ + 00228 eb de jmp SHORT $LN5@stbi__hdr_ $LN6@stbi__hdr_: ; 6759 : if (strncmp(token, "+X ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); - 00229 41 b8 03 00 00 + 0022a 41 b8 03 00 00 00 mov r8d, 3 - 0022f 48 8d 15 00 00 + 00230 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_03FOKDFDHG@?$CLX?5@ - 00236 48 8b 8d 28 04 + 00237 48 8b 8d 28 04 00 00 mov rcx, QWORD PTR token$[rbp] - 0023d ff 15 00 00 00 + 0023e ff 15 00 00 00 00 call QWORD PTR __imp_strncmp - 00243 85 c0 test eax, eax - 00245 74 34 je SHORT $LN35@stbi__hdr_ - 00247 48 8d 0d 00 00 + 00244 85 c0 test eax, eax + 00246 74 34 je SHORT $LN35@stbi__hdr_ + 00248 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BI@DCNDPIOH@unsupported?5data?5layout@ - 0024e e8 00 00 00 00 call stbi__err - 00253 85 c0 test eax, eax - 00255 74 0d je SHORT $LN64@stbi__hdr_ - 00257 48 c7 85 78 09 + 0024f e8 00 00 00 00 call stbi__err + 00254 85 c0 test eax, eax + 00256 74 0d je SHORT $LN64@stbi__hdr_ + 00258 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv155[rbp], 0 - 00262 eb 0b jmp SHORT $LN65@stbi__hdr_ + 00263 eb 0b jmp SHORT $LN65@stbi__hdr_ $LN64@stbi__hdr_: - 00264 48 c7 85 78 09 + 00265 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv155[rbp], 0 $LN65@stbi__hdr_: - 0026f 48 8b 85 78 09 + 00270 48 8b 85 78 09 00 00 mov rax, QWORD PTR tv155[rbp] - 00276 e9 a6 07 00 00 jmp $LN1@stbi__hdr_ + 00277 e9 b3 07 00 00 jmp $LN1@stbi__hdr_ $LN35@stbi__hdr_: ; 6760 : token += 3; - 0027b 48 8b 85 28 04 + 0027c 48 8b 85 28 04 00 00 mov rax, QWORD PTR token$[rbp] - 00282 48 83 c0 03 add rax, 3 - 00286 48 89 85 28 04 + 00283 48 83 c0 03 add rax, 3 + 00287 48 89 85 28 04 00 00 mov QWORD PTR token$[rbp], rax ; 6761 : width = (int)strtol(token, NULL, 10); - 0028d 41 b8 0a 00 00 + 0028e 41 b8 0a 00 00 00 mov r8d, 10 - 00293 33 d2 xor edx, edx - 00295 48 8b 8d 28 04 + 00294 33 d2 xor edx, edx + 00296 48 8b 8d 28 04 00 00 mov rcx, QWORD PTR token$[rbp] - 0029c ff 15 00 00 00 + 0029d ff 15 00 00 00 00 call QWORD PTR __imp_strtol - 002a2 89 85 64 04 00 + 002a3 89 85 64 04 00 00 mov DWORD PTR width$[rbp], eax ; 6762 : ; 6763 : if (height > STBI_MAX_DIMENSIONS) return stbi__errpf("too large", "Very large image (corrupt?)"); - 002a8 81 bd 84 04 00 + 002a9 81 bd 84 04 00 00 00 00 00 01 cmp DWORD PTR height$[rbp], 16777216 ; 01000000H - 002b2 7e 34 jle SHORT $LN36@stbi__hdr_ - 002b4 48 8d 0d 00 00 + 002b3 7e 34 jle SHORT $LN36@stbi__hdr_ + 002b5 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 002bb e8 00 00 00 00 call stbi__err - 002c0 85 c0 test eax, eax - 002c2 74 0d je SHORT $LN66@stbi__hdr_ - 002c4 48 c7 85 78 09 + 002bc e8 00 00 00 00 call stbi__err + 002c1 85 c0 test eax, eax + 002c3 74 0d je SHORT $LN66@stbi__hdr_ + 002c5 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv165[rbp], 0 - 002cf eb 0b jmp SHORT $LN67@stbi__hdr_ + 002d0 eb 0b jmp SHORT $LN67@stbi__hdr_ $LN66@stbi__hdr_: - 002d1 48 c7 85 78 09 + 002d2 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv165[rbp], 0 $LN67@stbi__hdr_: - 002dc 48 8b 85 78 09 + 002dd 48 8b 85 78 09 00 00 mov rax, QWORD PTR tv165[rbp] - 002e3 e9 39 07 00 00 jmp $LN1@stbi__hdr_ + 002e4 e9 46 07 00 00 jmp $LN1@stbi__hdr_ $LN36@stbi__hdr_: ; 6764 : if (width > STBI_MAX_DIMENSIONS) return stbi__errpf("too large", "Very large image (corrupt?)"); - 002e8 81 bd 64 04 00 + 002e9 81 bd 64 04 00 00 00 00 00 01 cmp DWORD PTR width$[rbp], 16777216 ; 01000000H - 002f2 7e 34 jle SHORT $LN37@stbi__hdr_ - 002f4 48 8d 0d 00 00 + 002f3 7e 34 jle SHORT $LN37@stbi__hdr_ + 002f5 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 002fb e8 00 00 00 00 call stbi__err - 00300 85 c0 test eax, eax - 00302 74 0d je SHORT $LN68@stbi__hdr_ - 00304 48 c7 85 78 09 + 002fc e8 00 00 00 00 call stbi__err + 00301 85 c0 test eax, eax + 00303 74 0d je SHORT $LN68@stbi__hdr_ + 00305 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv170[rbp], 0 - 0030f eb 0b jmp SHORT $LN69@stbi__hdr_ + 00310 eb 0b jmp SHORT $LN69@stbi__hdr_ $LN68@stbi__hdr_: - 00311 48 c7 85 78 09 + 00312 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv170[rbp], 0 $LN69@stbi__hdr_: - 0031c 48 8b 85 78 09 + 0031d 48 8b 85 78 09 00 00 mov rax, QWORD PTR tv170[rbp] - 00323 e9 f9 06 00 00 jmp $LN1@stbi__hdr_ + 00324 e9 06 07 00 00 jmp $LN1@stbi__hdr_ $LN37@stbi__hdr_: ; 6765 : ; 6766 : *x = width; - 00328 48 8b 85 b8 09 + 00329 48 8b 85 b8 09 00 00 mov rax, QWORD PTR x$[rbp] - 0032f 8b 8d 64 04 00 + 00330 8b 8d 64 04 00 00 mov ecx, DWORD PTR width$[rbp] - 00335 89 08 mov DWORD PTR [rax], ecx + 00336 89 08 mov DWORD PTR [rax], ecx ; 6767 : *y = height; - 00337 48 8b 85 c0 09 + 00338 48 8b 85 c0 09 00 00 mov rax, QWORD PTR y$[rbp] - 0033e 8b 8d 84 04 00 + 0033f 8b 8d 84 04 00 00 mov ecx, DWORD PTR height$[rbp] - 00344 89 08 mov DWORD PTR [rax], ecx + 00345 89 08 mov DWORD PTR [rax], ecx ; 6768 : ; 6769 : if (comp) *comp = 3; - 00346 48 83 bd c8 09 + 00347 48 83 bd c8 09 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 0034e 74 0d je SHORT $LN38@stbi__hdr_ - 00350 48 8b 85 c8 09 + 0034f 74 0d je SHORT $LN38@stbi__hdr_ + 00351 48 8b 85 c8 09 00 00 mov rax, QWORD PTR comp$[rbp] - 00357 c7 00 03 00 00 + 00358 c7 00 03 00 00 00 mov DWORD PTR [rax], 3 $LN38@stbi__hdr_: ; 6770 : if (req_comp == 0) req_comp = 3; - 0035d 83 bd d0 09 00 + 0035e 83 bd d0 09 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 00364 75 0a jne SHORT $LN39@stbi__hdr_ - 00366 c7 85 d0 09 00 + 00365 75 0a jne SHORT $LN39@stbi__hdr_ + 00367 c7 85 d0 09 00 00 03 00 00 00 mov DWORD PTR req_comp$[rbp], 3 $LN39@stbi__hdr_: ; 6771 : ; 6772 : if (!stbi__mad4sizes_valid(width, height, req_comp, sizeof(float), 0)) - 00370 c7 44 24 20 00 + 00371 c7 44 24 20 00 00 00 00 mov DWORD PTR [rsp+32], 0 - 00378 41 b9 04 00 00 + 00379 41 b9 04 00 00 00 mov r9d, 4 - 0037e 44 8b 85 d0 09 + 0037f 44 8b 85 d0 09 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 00385 8b 95 84 04 00 + 00386 8b 95 84 04 00 00 mov edx, DWORD PTR height$[rbp] - 0038b 8b 8d 64 04 00 + 0038c 8b 8d 64 04 00 00 mov ecx, DWORD PTR width$[rbp] - 00391 e8 00 00 00 00 call stbi__mad4sizes_valid - 00396 85 c0 test eax, eax - 00398 75 34 jne SHORT $LN40@stbi__hdr_ + 00392 e8 00 00 00 00 call stbi__mad4sizes_valid + 00397 85 c0 test eax, eax + 00399 75 34 jne SHORT $LN40@stbi__hdr_ ; 6773 : return stbi__errpf("too large", "HDR image is too large"); - 0039a 48 8d 0d 00 00 + 0039b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 003a1 e8 00 00 00 00 call stbi__err - 003a6 85 c0 test eax, eax - 003a8 74 0d je SHORT $LN70@stbi__hdr_ - 003aa 48 c7 85 78 09 + 003a2 e8 00 00 00 00 call stbi__err + 003a7 85 c0 test eax, eax + 003a9 74 0d je SHORT $LN70@stbi__hdr_ + 003ab 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv183[rbp], 0 - 003b5 eb 0b jmp SHORT $LN71@stbi__hdr_ + 003b6 eb 0b jmp SHORT $LN71@stbi__hdr_ $LN70@stbi__hdr_: - 003b7 48 c7 85 78 09 + 003b8 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv183[rbp], 0 $LN71@stbi__hdr_: - 003c2 48 8b 85 78 09 + 003c3 48 8b 85 78 09 00 00 mov rax, QWORD PTR tv183[rbp] - 003c9 e9 53 06 00 00 jmp $LN1@stbi__hdr_ + 003ca e9 60 06 00 00 jmp $LN1@stbi__hdr_ $LN40@stbi__hdr_: ; 6774 : ; 6775 : // Read data ; 6776 : hdr_data = (float*)stbi__malloc_mad4(width, height, req_comp, sizeof(float), 0); - 003ce c7 44 24 20 00 + 003cf c7 44 24 20 00 00 00 00 mov DWORD PTR [rsp+32], 0 - 003d6 41 b9 04 00 00 + 003d7 41 b9 04 00 00 00 mov r9d, 4 - 003dc 44 8b 85 d0 09 + 003dd 44 8b 85 d0 09 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 003e3 8b 95 84 04 00 + 003e4 8b 95 84 04 00 00 mov edx, DWORD PTR height$[rbp] - 003e9 8b 8d 64 04 00 + 003ea 8b 8d 64 04 00 00 mov ecx, DWORD PTR width$[rbp] - 003ef e8 00 00 00 00 call stbi__malloc_mad4 - 003f4 48 89 85 c8 04 + 003f0 e8 00 00 00 00 call stbi__malloc_mad4 + 003f5 48 89 85 c8 04 00 00 mov QWORD PTR hdr_data$[rbp], rax ; 6777 : if (!hdr_data) - 003fb 48 83 bd c8 04 + 003fc 48 83 bd c8 04 00 00 00 cmp QWORD PTR hdr_data$[rbp], 0 - 00403 75 34 jne SHORT $LN41@stbi__hdr_ + 00404 75 34 jne SHORT $LN41@stbi__hdr_ ; 6778 : return stbi__errpf("outofmem", "Out of memory"); - 00405 48 8d 0d 00 00 + 00406 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 0040c e8 00 00 00 00 call stbi__err - 00411 85 c0 test eax, eax - 00413 74 0d je SHORT $LN72@stbi__hdr_ - 00415 48 c7 85 78 09 + 0040d e8 00 00 00 00 call stbi__err + 00412 85 c0 test eax, eax + 00414 74 0d je SHORT $LN72@stbi__hdr_ + 00416 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv194[rbp], 0 - 00420 eb 0b jmp SHORT $LN73@stbi__hdr_ + 00421 eb 0b jmp SHORT $LN73@stbi__hdr_ $LN72@stbi__hdr_: - 00422 48 c7 85 78 09 + 00423 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv194[rbp], 0 $LN73@stbi__hdr_: - 0042d 48 8b 85 78 09 + 0042e 48 8b 85 78 09 00 00 mov rax, QWORD PTR tv194[rbp] - 00434 e9 e8 05 00 00 jmp $LN1@stbi__hdr_ + 00435 e9 f5 05 00 00 jmp $LN1@stbi__hdr_ $LN41@stbi__hdr_: ; 6779 : @@ -47648,174 +47979,176 @@ $LN41@stbi__hdr_: ; 6781 : // image data is stored as some number of sca ; 6782 : if (width < 8 || width >= 32768) { - 00439 83 bd 64 04 00 + 0043a 83 bd 64 04 00 00 08 cmp DWORD PTR width$[rbp], 8 - 00440 7c 10 jl SHORT $LN44@stbi__hdr_ - 00442 81 bd 64 04 00 + 00441 7c 10 jl SHORT $LN44@stbi__hdr_ + 00443 81 bd 64 04 00 00 00 80 00 00 cmp DWORD PTR width$[rbp], 32768 ; 00008000H - 0044c 0f 8c c7 00 00 + 0044d 0f 8c c9 00 00 00 jl $LN42@stbi__hdr_ $LN44@stbi__hdr_: ; 6783 : // Read flat data ; 6784 : for (j = 0; j < height; ++j) { - 00452 c7 85 64 05 00 + 00453 c7 85 64 05 00 00 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 0045c eb 0e jmp SHORT $LN9@stbi__hdr_ + 0045d eb 0e jmp SHORT $LN9@stbi__hdr_ $LN7@stbi__hdr_: - 0045e 8b 85 64 05 00 + 0045f 8b 85 64 05 00 00 mov eax, DWORD PTR j$[rbp] - 00464 ff c0 inc eax - 00466 89 85 64 05 00 + 00465 ff c0 inc eax + 00467 89 85 64 05 00 00 mov DWORD PTR j$[rbp], eax $LN9@stbi__hdr_: - 0046c 8b 85 84 04 00 + 0046d 8b 85 84 04 00 00 mov eax, DWORD PTR height$[rbp] - 00472 39 85 64 05 00 + 00473 39 85 64 05 00 00 cmp DWORD PTR j$[rbp], eax - 00478 0f 8d 96 00 00 + 00479 0f 8d 98 00 00 00 jge $LN8@stbi__hdr_ ; 6785 : for (i = 0; i < width; ++i) { - 0047e c7 85 44 05 00 + 0047f c7 85 44 05 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00488 eb 0e jmp SHORT $LN12@stbi__hdr_ + 00489 eb 0e jmp SHORT $LN12@stbi__hdr_ $LN10@stbi__hdr_: - 0048a 8b 85 44 05 00 + 0048b 8b 85 44 05 00 00 mov eax, DWORD PTR i$[rbp] - 00490 ff c0 inc eax - 00492 89 85 44 05 00 + 00491 ff c0 inc eax + 00493 89 85 44 05 00 00 mov DWORD PTR i$[rbp], eax $LN12@stbi__hdr_: - 00498 8b 85 64 04 00 + 00499 8b 85 64 04 00 00 mov eax, DWORD PTR width$[rbp] - 0049e 39 85 44 05 00 + 0049f 39 85 44 05 00 00 cmp DWORD PTR i$[rbp], eax - 004a4 7d 69 jge SHORT $LN11@stbi__hdr_ + 004a5 7d 6b jge SHORT $LN11@stbi__hdr_ $main_decode_loop$82: ; 6786 : stbi_uc rgbe[4]; ; 6787 : main_decode_loop: ; 6788 : stbi__getn(s, rgbe, 4); - 004a6 41 b8 04 00 00 + 004a7 41 b8 04 00 00 00 mov r8d, 4 - 004ac 48 8d 95 24 06 + 004ad 48 8d 95 24 06 00 00 lea rdx, QWORD PTR rgbe$7[rbp] - 004b3 48 8b 8d b0 09 + 004b4 48 8b 8d b0 09 00 00 mov rcx, QWORD PTR s$[rbp] - 004ba e8 00 00 00 00 call stbi__getn + 004bb e8 00 00 00 00 call stbi__getn + 004c0 90 npad 1 ; 6789 : stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp); - 004bf 8b 85 64 05 00 + 004c1 8b 85 64 05 00 00 mov eax, DWORD PTR j$[rbp] - 004c5 0f af 85 64 04 + 004c7 0f af 85 64 04 00 00 imul eax, DWORD PTR width$[rbp] - 004cc 0f af 85 d0 09 + 004ce 0f af 85 d0 09 00 00 imul eax, DWORD PTR req_comp$[rbp] - 004d3 48 98 cdqe - 004d5 48 8b 8d c8 04 + 004d5 48 98 cdqe + 004d7 48 8b 8d c8 04 00 00 mov rcx, QWORD PTR hdr_data$[rbp] - 004dc 48 8d 04 81 lea rax, QWORD PTR [rcx+rax*4] - 004e0 8b 8d 44 05 00 + 004de 48 8d 04 81 lea rax, QWORD PTR [rcx+rax*4] + 004e2 8b 8d 44 05 00 00 mov ecx, DWORD PTR i$[rbp] - 004e6 0f af 8d d0 09 + 004e8 0f af 8d d0 09 00 00 imul ecx, DWORD PTR req_comp$[rbp] - 004ed 48 63 c9 movsxd rcx, ecx - 004f0 48 8d 04 88 lea rax, QWORD PTR [rax+rcx*4] - 004f4 44 8b 85 d0 09 + 004ef 48 63 c9 movsxd rcx, ecx + 004f2 48 8d 04 88 lea rax, QWORD PTR [rax+rcx*4] + 004f6 44 8b 85 d0 09 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 004fb 48 8d 95 24 06 + 004fd 48 8d 95 24 06 00 00 lea rdx, QWORD PTR rgbe$7[rbp] - 00502 48 8b c8 mov rcx, rax - 00505 e8 00 00 00 00 call stbi__hdr_convert + 00504 48 8b c8 mov rcx, rax + 00507 e8 00 00 00 00 call stbi__hdr_convert + 0050c 90 npad 1 ; 6790 : } - 0050a e9 7b ff ff ff jmp $LN10@stbi__hdr_ + 0050d e9 79 ff ff ff jmp $LN10@stbi__hdr_ $LN11@stbi__hdr_: ; 6791 : } - 0050f e9 4a ff ff ff jmp $LN7@stbi__hdr_ + 00512 e9 48 ff ff ff jmp $LN7@stbi__hdr_ $LN8@stbi__hdr_: ; 6792 : } - 00514 e9 01 05 00 00 jmp $LN43@stbi__hdr_ + 00517 e9 0c 05 00 00 jmp $LN43@stbi__hdr_ $LN42@stbi__hdr_: ; 6793 : else { ; 6794 : // Read RLE-encoded data ; 6795 : scanline = NULL; - 00519 48 c7 85 a8 04 + 0051c 48 c7 85 a8 04 00 00 00 00 00 00 mov QWORD PTR scanline$[rbp], 0 ; 6796 : ; 6797 : for (j = 0; j < height; ++j) { - 00524 c7 85 64 05 00 + 00527 c7 85 64 05 00 00 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 0052e eb 0e jmp SHORT $LN15@stbi__hdr_ + 00531 eb 0e jmp SHORT $LN15@stbi__hdr_ $LN13@stbi__hdr_: - 00530 8b 85 64 05 00 + 00533 8b 85 64 05 00 00 mov eax, DWORD PTR j$[rbp] - 00536 ff c0 inc eax - 00538 89 85 64 05 00 + 00539 ff c0 inc eax + 0053b 89 85 64 05 00 00 mov DWORD PTR j$[rbp], eax $LN15@stbi__hdr_: - 0053e 8b 85 84 04 00 + 00541 8b 85 84 04 00 00 mov eax, DWORD PTR height$[rbp] - 00544 39 85 64 05 00 + 00547 39 85 64 05 00 00 cmp DWORD PTR j$[rbp], eax - 0054a 0f 8d b3 04 00 + 0054d 0f 8d bd 04 00 00 jge $LN14@stbi__hdr_ ; 6798 : c1 = stbi__get8(s); - 00550 48 8b 8d b0 09 + 00553 48 8b 8d b0 09 00 00 mov rcx, QWORD PTR s$[rbp] - 00557 e8 00 00 00 00 call stbi__get8 - 0055c 0f b6 c0 movzx eax, al - 0055f 89 85 a4 05 00 + 0055a e8 00 00 00 00 call stbi__get8 + 0055f 0f b6 c0 movzx eax, al + 00562 89 85 a4 05 00 00 mov DWORD PTR c1$[rbp], eax ; 6799 : c2 = stbi__get8(s); - 00565 48 8b 8d b0 09 + 00568 48 8b 8d b0 09 00 00 mov rcx, QWORD PTR s$[rbp] - 0056c e8 00 00 00 00 call stbi__get8 - 00571 0f b6 c0 movzx eax, al - 00574 89 85 c4 05 00 + 0056f e8 00 00 00 00 call stbi__get8 + 00574 0f b6 c0 movzx eax, al + 00577 89 85 c4 05 00 00 mov DWORD PTR c2$[rbp], eax ; 6800 : len = stbi__get8(s); - 0057a 48 8b 8d b0 09 + 0057d 48 8b 8d b0 09 00 00 mov rcx, QWORD PTR s$[rbp] - 00581 e8 00 00 00 00 call stbi__get8 - 00586 0f b6 c0 movzx eax, al - 00589 89 85 e4 04 00 + 00584 e8 00 00 00 00 call stbi__get8 + 00589 0f b6 c0 movzx eax, al + 0058c 89 85 e4 04 00 00 mov DWORD PTR len$[rbp], eax ; 6801 : if (c1 != 2 || c2 != 2 || (len & 0x80)) { - 0058f 83 bd a4 05 00 + 00592 83 bd a4 05 00 00 02 cmp DWORD PTR c1$[rbp], 2 - 00596 75 1c jne SHORT $LN46@stbi__hdr_ - 00598 83 bd c4 05 00 + 00599 75 1c jne SHORT $LN46@stbi__hdr_ + 0059b 83 bd c4 05 00 00 02 cmp DWORD PTR c2$[rbp], 2 - 0059f 75 13 jne SHORT $LN46@stbi__hdr_ - 005a1 8b 85 e4 04 00 + 005a2 75 13 jne SHORT $LN46@stbi__hdr_ + 005a4 8b 85 e4 04 00 00 mov eax, DWORD PTR len$[rbp] - 005a7 25 80 00 00 00 and eax, 128 ; 00000080H - 005ac 85 c0 test eax, eax - 005ae 0f 84 a1 00 00 + 005aa 25 80 00 00 00 and eax, 128 ; 00000080H + 005af 85 c0 test eax, eax + 005b1 0f 84 a3 00 00 00 je $LN45@stbi__hdr_ $LN46@stbi__hdr_: @@ -47824,177 +48157,182 @@ $LN46@stbi__hdr_: ; 6804 : stbi_uc rgbe[4]; ; 6805 : rgbe[0] = (stbi_uc)c1; - 005b4 b8 01 00 00 00 mov eax, 1 - 005b9 48 6b c0 00 imul rax, rax, 0 - 005bd 0f b6 8d a4 05 + 005b7 b8 01 00 00 00 mov eax, 1 + 005bc 48 6b c0 00 imul rax, rax, 0 + 005c0 0f b6 8d a4 05 00 00 movzx ecx, BYTE PTR c1$[rbp] - 005c4 88 8c 05 44 06 + 005c7 88 8c 05 44 06 00 00 mov BYTE PTR rgbe$8[rbp+rax], cl ; 6806 : rgbe[1] = (stbi_uc)c2; - 005cb b8 01 00 00 00 mov eax, 1 - 005d0 48 6b c0 01 imul rax, rax, 1 - 005d4 0f b6 8d c4 05 + 005ce b8 01 00 00 00 mov eax, 1 + 005d3 48 6b c0 01 imul rax, rax, 1 + 005d7 0f b6 8d c4 05 00 00 movzx ecx, BYTE PTR c2$[rbp] - 005db 88 8c 05 44 06 + 005de 88 8c 05 44 06 00 00 mov BYTE PTR rgbe$8[rbp+rax], cl ; 6807 : rgbe[2] = (stbi_uc)len; - 005e2 b8 01 00 00 00 mov eax, 1 - 005e7 48 6b c0 02 imul rax, rax, 2 - 005eb 0f b6 8d e4 04 + 005e5 b8 01 00 00 00 mov eax, 1 + 005ea 48 6b c0 02 imul rax, rax, 2 + 005ee 0f b6 8d e4 04 00 00 movzx ecx, BYTE PTR len$[rbp] - 005f2 88 8c 05 44 06 + 005f5 88 8c 05 44 06 00 00 mov BYTE PTR rgbe$8[rbp+rax], cl ; 6808 : rgbe[3] = (stbi_uc)stbi__get8(s); - 005f9 48 8b 8d b0 09 + 005fc 48 8b 8d b0 09 00 00 mov rcx, QWORD PTR s$[rbp] - 00600 e8 00 00 00 00 call stbi__get8 - 00605 b9 01 00 00 00 mov ecx, 1 - 0060a 48 6b c9 03 imul rcx, rcx, 3 - 0060e 88 84 0d 44 06 + 00603 e8 00 00 00 00 call stbi__get8 + 00608 b9 01 00 00 00 mov ecx, 1 + 0060d 48 6b c9 03 imul rcx, rcx, 3 + 00611 88 84 0d 44 06 00 00 mov BYTE PTR rgbe$8[rbp+rcx], al ; 6809 : stbi__hdr_convert(hdr_data, rgbe, req_comp); - 00615 44 8b 85 d0 09 + 00618 44 8b 85 d0 09 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 0061c 48 8d 95 44 06 + 0061f 48 8d 95 44 06 00 00 lea rdx, QWORD PTR rgbe$8[rbp] - 00623 48 8b 8d c8 04 + 00626 48 8b 8d c8 04 00 00 mov rcx, QWORD PTR hdr_data$[rbp] - 0062a e8 00 00 00 00 call stbi__hdr_convert + 0062d e8 00 00 00 00 call stbi__hdr_convert + 00632 90 npad 1 ; 6810 : i = 1; - 0062f c7 85 44 05 00 + 00633 c7 85 44 05 00 00 01 00 00 00 mov DWORD PTR i$[rbp], 1 ; 6811 : j = 0; - 00639 c7 85 64 05 00 + 0063d c7 85 64 05 00 00 00 00 00 00 mov DWORD PTR j$[rbp], 0 ; 6812 : STBI_FREE(scanline); - 00643 48 8b 8d a8 04 + 00647 48 8b 8d a8 04 00 00 mov rcx, QWORD PTR scanline$[rbp] - 0064a ff 15 00 00 00 + 0064e ff 15 00 00 00 00 call QWORD PTR __imp_free + 00654 90 npad 1 ; 6813 : goto main_decode_loop; // yes, this makes no sense - 00650 e9 51 fe ff ff jmp $main_decode_loop$82 + 00655 e9 4d fe ff ff jmp $main_decode_loop$82 $LN45@stbi__hdr_: ; 6814 : } ; 6815 : len <<= 8; - 00655 8b 85 e4 04 00 + 0065a 8b 85 e4 04 00 00 mov eax, DWORD PTR len$[rbp] - 0065b c1 e0 08 shl eax, 8 - 0065e 89 85 e4 04 00 + 00660 c1 e0 08 shl eax, 8 + 00663 89 85 e4 04 00 00 mov DWORD PTR len$[rbp], eax ; 6816 : len |= stbi__get8(s); - 00664 48 8b 8d b0 09 + 00669 48 8b 8d b0 09 00 00 mov rcx, QWORD PTR s$[rbp] - 0066b e8 00 00 00 00 call stbi__get8 - 00670 0f b6 c0 movzx eax, al - 00673 8b 8d e4 04 00 + 00670 e8 00 00 00 00 call stbi__get8 + 00675 0f b6 c0 movzx eax, al + 00678 8b 8d e4 04 00 00 mov ecx, DWORD PTR len$[rbp] - 00679 0b c8 or ecx, eax - 0067b 8b c1 mov eax, ecx - 0067d 89 85 e4 04 00 + 0067e 0b c8 or ecx, eax + 00680 8b c1 mov eax, ecx + 00682 89 85 e4 04 00 00 mov DWORD PTR len$[rbp], eax ; 6817 : if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); } - 00683 8b 85 64 04 00 + 00688 8b 85 64 04 00 00 mov eax, DWORD PTR width$[rbp] - 00689 39 85 e4 04 00 + 0068e 39 85 e4 04 00 00 cmp DWORD PTR len$[rbp], eax - 0068f 74 4e je SHORT $LN47@stbi__hdr_ - 00691 48 8b 8d c8 04 + 00694 74 50 je SHORT $LN47@stbi__hdr_ + 00696 48 8b 8d c8 04 00 00 mov rcx, QWORD PTR hdr_data$[rbp] - 00698 ff 15 00 00 00 + 0069d ff 15 00 00 00 00 call QWORD PTR __imp_free - 0069e 48 8b 8d a8 04 + 006a3 90 npad 1 + 006a4 48 8b 8d a8 04 00 00 mov rcx, QWORD PTR scanline$[rbp] - 006a5 ff 15 00 00 00 + 006ab ff 15 00 00 00 00 call QWORD PTR __imp_free - 006ab 48 8d 0d 00 00 + 006b1 90 npad 1 + 006b2 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0CA@JBEOCDFN@invalid?5decoded?5scanline?5length@ - 006b2 e8 00 00 00 00 call stbi__err - 006b7 85 c0 test eax, eax - 006b9 74 0d je SHORT $LN74@stbi__hdr_ - 006bb 48 c7 85 78 09 + 006b9 e8 00 00 00 00 call stbi__err + 006be 85 c0 test eax, eax + 006c0 74 0d je SHORT $LN74@stbi__hdr_ + 006c2 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv256[rbp], 0 - 006c6 eb 0b jmp SHORT $LN75@stbi__hdr_ + 006cd eb 0b jmp SHORT $LN75@stbi__hdr_ $LN74@stbi__hdr_: - 006c8 48 c7 85 78 09 + 006cf 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv256[rbp], 0 $LN75@stbi__hdr_: - 006d3 48 8b 85 78 09 + 006da 48 8b 85 78 09 00 00 mov rax, QWORD PTR tv256[rbp] - 006da e9 42 03 00 00 jmp $LN1@stbi__hdr_ + 006e1 e9 49 03 00 00 jmp $LN1@stbi__hdr_ $LN47@stbi__hdr_: ; 6818 : if (scanline == NULL) { - 006df 48 83 bd a8 04 + 006e6 48 83 bd a8 04 00 00 00 cmp QWORD PTR scanline$[rbp], 0 - 006e7 75 65 jne SHORT $LN48@stbi__hdr_ + 006ee 75 66 jne SHORT $LN48@stbi__hdr_ ; 6819 : scanline = (stbi_uc*)stbi__malloc_mad2(width, 4, 0); - 006e9 45 33 c0 xor r8d, r8d - 006ec ba 04 00 00 00 mov edx, 4 - 006f1 8b 8d 64 04 00 + 006f0 45 33 c0 xor r8d, r8d + 006f3 ba 04 00 00 00 mov edx, 4 + 006f8 8b 8d 64 04 00 00 mov ecx, DWORD PTR width$[rbp] - 006f7 e8 00 00 00 00 call stbi__malloc_mad2 - 006fc 48 89 85 a8 04 + 006fe e8 00 00 00 00 call stbi__malloc_mad2 + 00703 48 89 85 a8 04 00 00 mov QWORD PTR scanline$[rbp], rax ; 6820 : if (!scanline) { - 00703 48 83 bd a8 04 + 0070a 48 83 bd a8 04 00 00 00 cmp QWORD PTR scanline$[rbp], 0 - 0070b 75 41 jne SHORT $LN49@stbi__hdr_ + 00712 75 42 jne SHORT $LN49@stbi__hdr_ ; 6821 : STBI_FREE(hdr_data); - 0070d 48 8b 8d c8 04 + 00714 48 8b 8d c8 04 00 00 mov rcx, QWORD PTR hdr_data$[rbp] - 00714 ff 15 00 00 00 + 0071b ff 15 00 00 00 00 call QWORD PTR __imp_free + 00721 90 npad 1 ; 6822 : return stbi__errpf("outofmem", "Out of memory"); - 0071a 48 8d 0d 00 00 + 00722 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 00721 e8 00 00 00 00 call stbi__err - 00726 85 c0 test eax, eax - 00728 74 0d je SHORT $LN76@stbi__hdr_ - 0072a 48 c7 85 78 09 + 00729 e8 00 00 00 00 call stbi__err + 0072e 85 c0 test eax, eax + 00730 74 0d je SHORT $LN76@stbi__hdr_ + 00732 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv267[rbp], 0 - 00735 eb 0b jmp SHORT $LN77@stbi__hdr_ + 0073d eb 0b jmp SHORT $LN77@stbi__hdr_ $LN76@stbi__hdr_: - 00737 48 c7 85 78 09 + 0073f 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv267[rbp], 0 $LN77@stbi__hdr_: - 00742 48 8b 85 78 09 + 0074a 48 8b 85 78 09 00 00 mov rax, QWORD PTR tv267[rbp] - 00749 e9 d3 02 00 00 jmp $LN1@stbi__hdr_ + 00751 e9 d9 02 00 00 jmp $LN1@stbi__hdr_ $LN49@stbi__hdr_: $LN48@stbi__hdr_: @@ -48003,316 +48341,322 @@ $LN48@stbi__hdr_: ; 6825 : ; 6826 : for (k = 0; k < 4; ++k) { - 0074e c7 85 84 05 00 + 00756 c7 85 84 05 00 00 00 00 00 00 mov DWORD PTR k$[rbp], 0 - 00758 eb 0e jmp SHORT $LN18@stbi__hdr_ + 00760 eb 0e jmp SHORT $LN18@stbi__hdr_ $LN16@stbi__hdr_: - 0075a 8b 85 84 05 00 + 00762 8b 85 84 05 00 00 mov eax, DWORD PTR k$[rbp] - 00760 ff c0 inc eax - 00762 89 85 84 05 00 + 00768 ff c0 inc eax + 0076a 89 85 84 05 00 00 mov DWORD PTR k$[rbp], eax $LN18@stbi__hdr_: - 00768 83 bd 84 05 00 + 00770 83 bd 84 05 00 00 04 cmp DWORD PTR k$[rbp], 4 - 0076f 0f 8d 10 02 00 + 00777 0f 8d 14 02 00 00 jge $LN17@stbi__hdr_ ; 6827 : int nleft; ; 6828 : i = 0; - 00775 c7 85 44 05 00 + 0077d c7 85 44 05 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 $LN19@stbi__hdr_: ; 6829 : while ((nleft = width - i) > 0) { - 0077f 8b 85 44 05 00 + 00787 8b 85 44 05 00 00 mov eax, DWORD PTR i$[rbp] - 00785 8b 8d 64 04 00 + 0078d 8b 8d 64 04 00 00 mov ecx, DWORD PTR width$[rbp] - 0078b 2b c8 sub ecx, eax - 0078d 8b c1 mov eax, ecx - 0078f 89 85 64 06 00 + 00793 2b c8 sub ecx, eax + 00795 8b c1 mov eax, ecx + 00797 89 85 64 06 00 00 mov DWORD PTR nleft$9[rbp], eax - 00795 83 bd 64 06 00 + 0079d 83 bd 64 06 00 00 00 cmp DWORD PTR nleft$9[rbp], 0 - 0079c 0f 8e de 01 00 + 007a4 0f 8e e2 01 00 00 jle $LN20@stbi__hdr_ ; 6830 : count = stbi__get8(s); - 007a2 48 8b 8d b0 09 + 007aa 48 8b 8d b0 09 00 00 mov rcx, QWORD PTR s$[rbp] - 007a9 e8 00 00 00 00 call stbi__get8 - 007ae 88 85 04 05 00 + 007b1 e8 00 00 00 00 call stbi__get8 + 007b6 88 85 04 05 00 00 mov BYTE PTR count$[rbp], al ; 6831 : if (count > 128) { - 007b4 0f b6 85 04 05 + 007bc 0f b6 85 04 05 00 00 movzx eax, BYTE PTR count$[rbp] - 007bb 3d 80 00 00 00 cmp eax, 128 ; 00000080H - 007c0 0f 8e ec 00 00 + 007c3 3d 80 00 00 00 cmp eax, 128 ; 00000080H + 007c8 0f 8e ee 00 00 00 jle $LN50@stbi__hdr_ ; 6832 : // Run ; 6833 : value = stbi__get8(s); - 007c6 48 8b 8d b0 09 + 007ce 48 8b 8d b0 09 00 00 mov rcx, QWORD PTR s$[rbp] - 007cd e8 00 00 00 00 call stbi__get8 - 007d2 88 85 24 05 00 + 007d5 e8 00 00 00 00 call stbi__get8 + 007da 88 85 24 05 00 00 mov BYTE PTR value$[rbp], al ; 6834 : count -= 128; - 007d8 0f b6 85 04 05 + 007e0 0f b6 85 04 05 00 00 movzx eax, BYTE PTR count$[rbp] - 007df 2d 80 00 00 00 sub eax, 128 ; 00000080H - 007e4 88 85 04 05 00 + 007e7 2d 80 00 00 00 sub eax, 128 ; 00000080H + 007ec 88 85 04 05 00 00 mov BYTE PTR count$[rbp], al ; 6835 : if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } - 007ea 0f b6 85 04 05 + 007f2 0f b6 85 04 05 00 00 movzx eax, BYTE PTR count$[rbp] - 007f1 85 c0 test eax, eax - 007f3 74 0f je SHORT $LN53@stbi__hdr_ - 007f5 0f b6 85 04 05 + 007f9 85 c0 test eax, eax + 007fb 74 0f je SHORT $LN53@stbi__hdr_ + 007fd 0f b6 85 04 05 00 00 movzx eax, BYTE PTR count$[rbp] - 007fc 3b 85 64 06 00 + 00804 3b 85 64 06 00 00 cmp eax, DWORD PTR nleft$9[rbp] - 00802 7e 4e jle SHORT $LN52@stbi__hdr_ + 0080a 7e 50 jle SHORT $LN52@stbi__hdr_ $LN53@stbi__hdr_: - 00804 48 8b 8d c8 04 + 0080c 48 8b 8d c8 04 00 00 mov rcx, QWORD PTR hdr_data$[rbp] - 0080b ff 15 00 00 00 + 00813 ff 15 00 00 00 00 call QWORD PTR __imp_free - 00811 48 8b 8d a8 04 + 00819 90 npad 1 + 0081a 48 8b 8d a8 04 00 00 mov rcx, QWORD PTR scanline$[rbp] - 00818 ff 15 00 00 00 + 00821 ff 15 00 00 00 00 call QWORD PTR __imp_free - 0081e 48 8d 0d 00 00 + 00827 90 npad 1 + 00828 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07DPPMCAKL@corrupt@ - 00825 e8 00 00 00 00 call stbi__err - 0082a 85 c0 test eax, eax - 0082c 74 0d je SHORT $LN78@stbi__hdr_ - 0082e 48 c7 85 78 09 + 0082f e8 00 00 00 00 call stbi__err + 00834 85 c0 test eax, eax + 00836 74 0d je SHORT $LN78@stbi__hdr_ + 00838 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv290[rbp], 0 - 00839 eb 0b jmp SHORT $LN79@stbi__hdr_ + 00843 eb 0b jmp SHORT $LN79@stbi__hdr_ $LN78@stbi__hdr_: - 0083b 48 c7 85 78 09 + 00845 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv290[rbp], 0 $LN79@stbi__hdr_: - 00846 48 8b 85 78 09 + 00850 48 8b 85 78 09 00 00 mov rax, QWORD PTR tv290[rbp] - 0084d e9 cf 01 00 00 jmp $LN1@stbi__hdr_ + 00857 e9 d3 01 00 00 jmp $LN1@stbi__hdr_ $LN52@stbi__hdr_: ; 6836 : for (z = 0; z < count; ++z) - 00852 c7 85 e4 05 00 + 0085c c7 85 e4 05 00 00 00 00 00 00 mov DWORD PTR z$[rbp], 0 - 0085c eb 0e jmp SHORT $LN23@stbi__hdr_ + 00866 eb 0e jmp SHORT $LN23@stbi__hdr_ $LN21@stbi__hdr_: - 0085e 8b 85 e4 05 00 + 00868 8b 85 e4 05 00 00 mov eax, DWORD PTR z$[rbp] - 00864 ff c0 inc eax - 00866 89 85 e4 05 00 + 0086e ff c0 inc eax + 00870 89 85 e4 05 00 00 mov DWORD PTR z$[rbp], eax $LN23@stbi__hdr_: - 0086c 0f b6 85 04 05 + 00876 0f b6 85 04 05 00 00 movzx eax, BYTE PTR count$[rbp] - 00873 39 85 e4 05 00 + 0087d 39 85 e4 05 00 00 cmp DWORD PTR z$[rbp], eax - 00879 7d 32 jge SHORT $LN22@stbi__hdr_ + 00883 7d 32 jge SHORT $LN22@stbi__hdr_ ; 6837 : scanline[i++ * 4 + k] = value; - 0087b 8b 85 84 05 00 + 00885 8b 85 84 05 00 00 mov eax, DWORD PTR k$[rbp] - 00881 8b 8d 44 05 00 + 0088b 8b 8d 44 05 00 00 mov ecx, DWORD PTR i$[rbp] - 00887 8d 04 88 lea eax, DWORD PTR [rax+rcx*4] - 0088a 48 98 cdqe - 0088c 48 8b 8d a8 04 + 00891 8d 04 88 lea eax, DWORD PTR [rax+rcx*4] + 00894 48 98 cdqe + 00896 48 8b 8d a8 04 00 00 mov rcx, QWORD PTR scanline$[rbp] - 00893 0f b6 95 24 05 + 0089d 0f b6 95 24 05 00 00 movzx edx, BYTE PTR value$[rbp] - 0089a 88 14 01 mov BYTE PTR [rcx+rax], dl - 0089d 8b 85 44 05 00 + 008a4 88 14 01 mov BYTE PTR [rcx+rax], dl + 008a7 8b 85 44 05 00 00 mov eax, DWORD PTR i$[rbp] - 008a3 ff c0 inc eax - 008a5 89 85 44 05 00 + 008ad ff c0 inc eax + 008af 89 85 44 05 00 00 mov DWORD PTR i$[rbp], eax - 008ab eb b1 jmp SHORT $LN21@stbi__hdr_ + 008b5 eb b1 jmp SHORT $LN21@stbi__hdr_ $LN22@stbi__hdr_: ; 6838 : } - 008ad e9 c9 00 00 00 jmp $LN51@stbi__hdr_ + 008b7 e9 cb 00 00 00 jmp $LN51@stbi__hdr_ $LN50@stbi__hdr_: ; 6839 : else { ; 6840 : // Dump ; 6841 : if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } - 008b2 0f b6 85 04 05 + 008bc 0f b6 85 04 05 00 00 movzx eax, BYTE PTR count$[rbp] - 008b9 85 c0 test eax, eax - 008bb 74 0f je SHORT $LN55@stbi__hdr_ - 008bd 0f b6 85 04 05 + 008c3 85 c0 test eax, eax + 008c5 74 0f je SHORT $LN55@stbi__hdr_ + 008c7 0f b6 85 04 05 00 00 movzx eax, BYTE PTR count$[rbp] - 008c4 3b 85 64 06 00 + 008ce 3b 85 64 06 00 00 cmp eax, DWORD PTR nleft$9[rbp] - 008ca 7e 4e jle SHORT $LN54@stbi__hdr_ + 008d4 7e 50 jle SHORT $LN54@stbi__hdr_ $LN55@stbi__hdr_: - 008cc 48 8b 8d c8 04 + 008d6 48 8b 8d c8 04 00 00 mov rcx, QWORD PTR hdr_data$[rbp] - 008d3 ff 15 00 00 00 + 008dd ff 15 00 00 00 00 call QWORD PTR __imp_free - 008d9 48 8b 8d a8 04 + 008e3 90 npad 1 + 008e4 48 8b 8d a8 04 00 00 mov rcx, QWORD PTR scanline$[rbp] - 008e0 ff 15 00 00 00 + 008eb ff 15 00 00 00 00 call QWORD PTR __imp_free - 008e6 48 8d 0d 00 00 + 008f1 90 npad 1 + 008f2 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07DPPMCAKL@corrupt@ - 008ed e8 00 00 00 00 call stbi__err - 008f2 85 c0 test eax, eax - 008f4 74 0d je SHORT $LN80@stbi__hdr_ - 008f6 48 c7 85 78 09 + 008f9 e8 00 00 00 00 call stbi__err + 008fe 85 c0 test eax, eax + 00900 74 0d je SHORT $LN80@stbi__hdr_ + 00902 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv309[rbp], 0 - 00901 eb 0b jmp SHORT $LN81@stbi__hdr_ + 0090d eb 0b jmp SHORT $LN81@stbi__hdr_ $LN80@stbi__hdr_: - 00903 48 c7 85 78 09 + 0090f 48 c7 85 78 09 00 00 00 00 00 00 mov QWORD PTR tv309[rbp], 0 $LN81@stbi__hdr_: - 0090e 48 8b 85 78 09 + 0091a 48 8b 85 78 09 00 00 mov rax, QWORD PTR tv309[rbp] - 00915 e9 07 01 00 00 jmp $LN1@stbi__hdr_ + 00921 e9 09 01 00 00 jmp $LN1@stbi__hdr_ $LN54@stbi__hdr_: ; 6842 : for (z = 0; z < count; ++z) - 0091a c7 85 e4 05 00 + 00926 c7 85 e4 05 00 00 00 00 00 00 mov DWORD PTR z$[rbp], 0 - 00924 eb 0e jmp SHORT $LN26@stbi__hdr_ + 00930 eb 0e jmp SHORT $LN26@stbi__hdr_ $LN24@stbi__hdr_: - 00926 8b 85 e4 05 00 + 00932 8b 85 e4 05 00 00 mov eax, DWORD PTR z$[rbp] - 0092c ff c0 inc eax - 0092e 89 85 e4 05 00 + 00938 ff c0 inc eax + 0093a 89 85 e4 05 00 00 mov DWORD PTR z$[rbp], eax $LN26@stbi__hdr_: - 00934 0f b6 85 04 05 + 00940 0f b6 85 04 05 00 00 movzx eax, BYTE PTR count$[rbp] - 0093b 39 85 e4 05 00 + 00947 39 85 e4 05 00 00 cmp DWORD PTR z$[rbp], eax - 00941 7d 38 jge SHORT $LN25@stbi__hdr_ + 0094d 7d 38 jge SHORT $LN25@stbi__hdr_ ; 6843 : scanline[i++ * 4 + k] = stbi__get8(s); - 00943 48 8b 8d b0 09 + 0094f 48 8b 8d b0 09 00 00 mov rcx, QWORD PTR s$[rbp] - 0094a e8 00 00 00 00 call stbi__get8 - 0094f 8b 8d 84 05 00 + 00956 e8 00 00 00 00 call stbi__get8 + 0095b 8b 8d 84 05 00 00 mov ecx, DWORD PTR k$[rbp] - 00955 8b 95 44 05 00 + 00961 8b 95 44 05 00 00 mov edx, DWORD PTR i$[rbp] - 0095b 8d 0c 91 lea ecx, DWORD PTR [rcx+rdx*4] - 0095e 48 63 c9 movsxd rcx, ecx - 00961 48 8b 95 a8 04 + 00967 8d 0c 91 lea ecx, DWORD PTR [rcx+rdx*4] + 0096a 48 63 c9 movsxd rcx, ecx + 0096d 48 8b 95 a8 04 00 00 mov rdx, QWORD PTR scanline$[rbp] - 00968 88 04 0a mov BYTE PTR [rdx+rcx], al - 0096b 8b 85 44 05 00 + 00974 88 04 0a mov BYTE PTR [rdx+rcx], al + 00977 8b 85 44 05 00 00 mov eax, DWORD PTR i$[rbp] - 00971 ff c0 inc eax - 00973 89 85 44 05 00 + 0097d ff c0 inc eax + 0097f 89 85 44 05 00 00 mov DWORD PTR i$[rbp], eax - 00979 eb ab jmp SHORT $LN24@stbi__hdr_ + 00985 eb ab jmp SHORT $LN24@stbi__hdr_ $LN25@stbi__hdr_: $LN51@stbi__hdr_: ; 6844 : } ; 6845 : } - 0097b e9 ff fd ff ff jmp $LN19@stbi__hdr_ + 00987 e9 fb fd ff ff jmp $LN19@stbi__hdr_ $LN20@stbi__hdr_: ; 6846 : } - 00980 e9 d5 fd ff ff jmp $LN16@stbi__hdr_ + 0098c e9 d1 fd ff ff jmp $LN16@stbi__hdr_ $LN17@stbi__hdr_: ; 6847 : for (i = 0; i < width; ++i) - 00985 c7 85 44 05 00 + 00991 c7 85 44 05 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0098f eb 0e jmp SHORT $LN29@stbi__hdr_ + 0099b eb 0e jmp SHORT $LN29@stbi__hdr_ $LN27@stbi__hdr_: - 00991 8b 85 44 05 00 + 0099d 8b 85 44 05 00 00 mov eax, DWORD PTR i$[rbp] - 00997 ff c0 inc eax - 00999 89 85 44 05 00 + 009a3 ff c0 inc eax + 009a5 89 85 44 05 00 00 mov DWORD PTR i$[rbp], eax $LN29@stbi__hdr_: - 0099f 8b 85 64 04 00 + 009ab 8b 85 64 04 00 00 mov eax, DWORD PTR width$[rbp] - 009a5 39 85 44 05 00 + 009b1 39 85 44 05 00 00 cmp DWORD PTR i$[rbp], eax - 009ab 7d 51 jge SHORT $LN28@stbi__hdr_ + 009b7 7d 52 jge SHORT $LN28@stbi__hdr_ ; 6848 : stbi__hdr_convert(hdr_data + (j * width + i) * req_comp, scanline + i * 4, req_comp); - 009ad 8b 85 44 05 00 + 009b9 8b 85 44 05 00 00 mov eax, DWORD PTR i$[rbp] - 009b3 c1 e0 02 shl eax, 2 - 009b6 48 98 cdqe - 009b8 48 8b 8d a8 04 + 009bf c1 e0 02 shl eax, 2 + 009c2 48 98 cdqe + 009c4 48 8b 8d a8 04 00 00 mov rcx, QWORD PTR scanline$[rbp] - 009bf 48 03 c8 add rcx, rax - 009c2 48 8b c1 mov rax, rcx - 009c5 8b 8d 64 05 00 + 009cb 48 03 c8 add rcx, rax + 009ce 48 8b c1 mov rax, rcx + 009d1 8b 8d 64 05 00 00 mov ecx, DWORD PTR j$[rbp] - 009cb 0f af 8d 64 04 + 009d7 0f af 8d 64 04 00 00 imul ecx, DWORD PTR width$[rbp] - 009d2 03 8d 44 05 00 + 009de 03 8d 44 05 00 00 add ecx, DWORD PTR i$[rbp] - 009d8 0f af 8d d0 09 + 009e4 0f af 8d d0 09 00 00 imul ecx, DWORD PTR req_comp$[rbp] - 009df 48 63 c9 movsxd rcx, ecx - 009e2 48 8b 95 c8 04 + 009eb 48 63 c9 movsxd rcx, ecx + 009ee 48 8b 95 c8 04 00 00 mov rdx, QWORD PTR hdr_data$[rbp] - 009e9 48 8d 0c 8a lea rcx, QWORD PTR [rdx+rcx*4] - 009ed 44 8b 85 d0 09 + 009f5 48 8d 0c 8a lea rcx, QWORD PTR [rdx+rcx*4] + 009f9 44 8b 85 d0 09 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 009f4 48 8b d0 mov rdx, rax - 009f7 e8 00 00 00 00 call stbi__hdr_convert - 009fc eb 93 jmp SHORT $LN27@stbi__hdr_ + 00a00 48 8b d0 mov rdx, rax + 00a03 e8 00 00 00 00 call stbi__hdr_convert + 00a08 90 npad 1 + 00a09 eb 92 jmp SHORT $LN27@stbi__hdr_ $LN28@stbi__hdr_: ; 6849 : } - 009fe e9 2d fb ff ff jmp $LN13@stbi__hdr_ + 00a0b e9 23 fb ff ff jmp $LN13@stbi__hdr_ $LN14@stbi__hdr_: ; 6850 : if (scanline) - 00a03 48 83 bd a8 04 + 00a10 48 83 bd a8 04 00 00 00 cmp QWORD PTR scanline$[rbp], 0 - 00a0b 74 0d je SHORT $LN56@stbi__hdr_ + 00a18 74 0e je SHORT $LN56@stbi__hdr_ ; 6851 : STBI_FREE(scanline); - 00a0d 48 8b 8d a8 04 + 00a1a 48 8b 8d a8 04 00 00 mov rcx, QWORD PTR scanline$[rbp] - 00a14 ff 15 00 00 00 + 00a21 ff 15 00 00 00 00 call QWORD PTR __imp_free + 00a27 90 npad 1 $LN56@stbi__hdr_: $LN43@stbi__hdr_: @@ -48320,27 +48664,27 @@ $LN43@stbi__hdr_: ; 6853 : ; 6854 : return hdr_data; - 00a1a 48 8b 85 c8 04 + 00a28 48 8b 85 c8 04 00 00 mov rax, QWORD PTR hdr_data$[rbp] $LN1@stbi__hdr_: ; 6855 : } - 00a21 48 8b f8 mov rdi, rax - 00a24 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 00a28 48 8d 15 00 00 + 00a2f 48 8b f8 mov rdi, rax + 00a32 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 00a36 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__hdr_load$rtcFrameData - 00a2f e8 00 00 00 00 call _RTC_CheckStackVars - 00a34 48 8b c7 mov rax, rdi - 00a37 48 8b 8d 80 09 + 00a3d e8 00 00 00 00 call _RTC_CheckStackVars + 00a42 48 8b c7 mov rax, rdi + 00a45 48 8b 8d 80 09 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00a3e 48 33 cd xor rcx, rbp - 00a41 e8 00 00 00 00 call __security_check_cookie - 00a46 48 8d a5 98 09 + 00a4c 48 33 cd xor rcx, rbp + 00a4f e8 00 00 00 00 call __security_check_cookie + 00a54 48 8d a5 98 09 00 00 lea rsp, QWORD PTR [rbp+2456] - 00a4d 5f pop rdi - 00a4e 5d pop rbp - 00a4f c3 ret 0 + 00a5b 5f pop rdi + 00a5c 5d pop rbp + 00a5d c3 ret 0 stbi__hdr_load ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -48362,55 +48706,58 @@ stbi__hdr_test PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 6664 : int r = stbi__hdr_test_core(s, "#?RADIANCE\n"); - 0001f 48 8d 15 00 00 + 00020 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0M@HOIDFNFN@?$CD?$DPRADIANCE?6@ - 00026 48 8b 8d 00 01 + 00027 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0002d e8 00 00 00 00 call stbi__hdr_test_core - 00032 89 45 04 mov DWORD PTR r$[rbp], eax + 0002e e8 00 00 00 00 call stbi__hdr_test_core + 00033 89 45 04 mov DWORD PTR r$[rbp], eax ; 6665 : stbi__rewind(s); - 00035 48 8b 8d 00 01 + 00036 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0003c e8 00 00 00 00 call stbi__rewind + 0003d e8 00 00 00 00 call stbi__rewind + 00042 90 npad 1 ; 6666 : if (!r) { - 00041 83 7d 04 00 cmp DWORD PTR r$[rbp], 0 - 00045 75 22 jne SHORT $LN2@stbi__hdr_ + 00043 83 7d 04 00 cmp DWORD PTR r$[rbp], 0 + 00047 75 23 jne SHORT $LN2@stbi__hdr_ ; 6667 : r = stbi__hdr_test_core(s, "#?RGBE\n"); - 00047 48 8d 15 00 00 + 00049 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_07KFDJIKCK@?$CD?$DPRGBE?6@ - 0004e 48 8b 8d 00 01 + 00050 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00055 e8 00 00 00 00 call stbi__hdr_test_core - 0005a 89 45 04 mov DWORD PTR r$[rbp], eax + 00057 e8 00 00 00 00 call stbi__hdr_test_core + 0005c 89 45 04 mov DWORD PTR r$[rbp], eax ; 6668 : stbi__rewind(s); - 0005d 48 8b 8d 00 01 + 0005f 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00064 e8 00 00 00 00 call stbi__rewind + 00066 e8 00 00 00 00 call stbi__rewind + 0006b 90 npad 1 $LN2@stbi__hdr_: ; 6669 : } ; 6670 : return r; - 00069 8b 45 04 mov eax, DWORD PTR r$[rbp] + 0006c 8b 45 04 mov eax, DWORD PTR r$[rbp] ; 6671 : } - 0006c 48 8d a5 e8 00 + 0006f 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00073 5f pop rdi - 00074 5d pop rbp - 00075 c3 ret 0 + 00076 5f pop rdi + 00077 5d pop rbp + 00078 c3 ret 0 stbi__hdr_test ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -48433,134 +48780,142 @@ stbi__psd_is16 PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 6964 : int channelCount, depth; ; 6965 : if (stbi__get32be(s) != 0x38425053) { - 0001f 48 8b 8d 20 01 + 00020 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__get32be - 0002b 3d 53 50 42 38 cmp eax, 943870035 ; 38425053H - 00030 74 13 je SHORT $LN2@stbi__psd_ + 00027 e8 00 00 00 00 call stbi__get32be + 0002c 3d 53 50 42 38 cmp eax, 943870035 ; 38425053H + 00031 74 14 je SHORT $LN2@stbi__psd_ ; 6966 : stbi__rewind(s); - 00032 48 8b 8d 20 01 + 00033 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00039 e8 00 00 00 00 call stbi__rewind + 0003a e8 00 00 00 00 call stbi__rewind + 0003f 90 npad 1 ; 6967 : return 0; - 0003e 33 c0 xor eax, eax - 00040 e9 9f 00 00 00 jmp $LN1@stbi__psd_ + 00040 33 c0 xor eax, eax + 00042 e9 a8 00 00 00 jmp $LN1@stbi__psd_ $LN2@stbi__psd_: ; 6968 : } ; 6969 : if (stbi__get16be(s) != 1) { - 00045 48 8b 8d 20 01 + 00047 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0004c e8 00 00 00 00 call stbi__get16be - 00051 83 f8 01 cmp eax, 1 - 00054 74 10 je SHORT $LN3@stbi__psd_ + 0004e e8 00 00 00 00 call stbi__get16be + 00053 83 f8 01 cmp eax, 1 + 00056 74 14 je SHORT $LN3@stbi__psd_ ; 6970 : stbi__rewind(s); - 00056 48 8b 8d 20 01 + 00058 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0005d e8 00 00 00 00 call stbi__rewind + 0005f e8 00 00 00 00 call stbi__rewind + 00064 90 npad 1 ; 6971 : return 0; - 00062 33 c0 xor eax, eax - 00064 eb 7e jmp SHORT $LN1@stbi__psd_ + 00065 33 c0 xor eax, eax + 00067 e9 83 00 00 00 jmp $LN1@stbi__psd_ $LN3@stbi__psd_: ; 6972 : } ; 6973 : stbi__skip(s, 6); - 00066 ba 06 00 00 00 mov edx, 6 - 0006b 48 8b 8d 20 01 + 0006c ba 06 00 00 00 mov edx, 6 + 00071 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00072 e8 00 00 00 00 call stbi__skip + 00078 e8 00 00 00 00 call stbi__skip + 0007d 90 npad 1 ; 6974 : channelCount = stbi__get16be(s); - 00077 48 8b 8d 20 01 + 0007e 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0007e e8 00 00 00 00 call stbi__get16be - 00083 89 45 04 mov DWORD PTR channelCount$[rbp], eax + 00085 e8 00 00 00 00 call stbi__get16be + 0008a 89 45 04 mov DWORD PTR channelCount$[rbp], eax ; 6975 : if (channelCount < 0 || channelCount > 16) { - 00086 83 7d 04 00 cmp DWORD PTR channelCount$[rbp], 0 - 0008a 7c 06 jl SHORT $LN5@stbi__psd_ - 0008c 83 7d 04 10 cmp DWORD PTR channelCount$[rbp], 16 - 00090 7e 10 jle SHORT $LN4@stbi__psd_ + 0008d 83 7d 04 00 cmp DWORD PTR channelCount$[rbp], 0 + 00091 7c 06 jl SHORT $LN5@stbi__psd_ + 00093 83 7d 04 10 cmp DWORD PTR channelCount$[rbp], 16 + 00097 7e 11 jle SHORT $LN4@stbi__psd_ $LN5@stbi__psd_: ; 6976 : stbi__rewind(s); - 00092 48 8b 8d 20 01 + 00099 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00099 e8 00 00 00 00 call stbi__rewind + 000a0 e8 00 00 00 00 call stbi__rewind + 000a5 90 npad 1 ; 6977 : return 0; - 0009e 33 c0 xor eax, eax - 000a0 eb 42 jmp SHORT $LN1@stbi__psd_ + 000a6 33 c0 xor eax, eax + 000a8 eb 45 jmp SHORT $LN1@stbi__psd_ $LN4@stbi__psd_: ; 6978 : } ; 6979 : STBI_NOTUSED(stbi__get32be(s)); - 000a2 48 8b 8d 20 01 + 000aa 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000a9 e8 00 00 00 00 call stbi__get32be + 000b1 e8 00 00 00 00 call stbi__get32be + 000b6 90 npad 1 ; 6980 : STBI_NOTUSED(stbi__get32be(s)); - 000ae 48 8b 8d 20 01 + 000b7 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000b5 e8 00 00 00 00 call stbi__get32be + 000be e8 00 00 00 00 call stbi__get32be + 000c3 90 npad 1 ; 6981 : depth = stbi__get16be(s); - 000ba 48 8b 8d 20 01 + 000c4 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000c1 e8 00 00 00 00 call stbi__get16be - 000c6 89 45 24 mov DWORD PTR depth$[rbp], eax + 000cb e8 00 00 00 00 call stbi__get16be + 000d0 89 45 24 mov DWORD PTR depth$[rbp], eax ; 6982 : if (depth != 16) { - 000c9 83 7d 24 10 cmp DWORD PTR depth$[rbp], 16 - 000cd 74 10 je SHORT $LN6@stbi__psd_ + 000d3 83 7d 24 10 cmp DWORD PTR depth$[rbp], 16 + 000d7 74 11 je SHORT $LN6@stbi__psd_ ; 6983 : stbi__rewind(s); - 000cf 48 8b 8d 20 01 + 000d9 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000d6 e8 00 00 00 00 call stbi__rewind + 000e0 e8 00 00 00 00 call stbi__rewind + 000e5 90 npad 1 ; 6984 : return 0; - 000db 33 c0 xor eax, eax - 000dd eb 05 jmp SHORT $LN1@stbi__psd_ + 000e6 33 c0 xor eax, eax + 000e8 eb 05 jmp SHORT $LN1@stbi__psd_ $LN6@stbi__psd_: ; 6985 : } ; 6986 : return 1; - 000df b8 01 00 00 00 mov eax, 1 + 000ea b8 01 00 00 00 mov eax, 1 $LN1@stbi__psd_: ; 6987 : } - 000e4 48 8d a5 08 01 + 000ef 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000eb 5f pop rdi - 000ec 5d pop rbp - 000ed c3 ret 0 + 000f6 5f pop rdi + 000f7 5d pop rbp + 000f8 c3 ret 0 stbi__psd_is16 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -48602,210 +48957,217 @@ stbi__psd_info PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 6929 : int channelCount, dummy, depth; ; 6930 : if (!x) x = &dummy; - 00058 48 83 bd 48 01 + 00059 48 83 bd 48 01 00 00 00 cmp QWORD PTR x$[rbp], 0 - 00060 75 0b jne SHORT $LN2@stbi__psd_ - 00062 48 8d 45 24 lea rax, QWORD PTR dummy$[rbp] - 00066 48 89 85 48 01 + 00061 75 0b jne SHORT $LN2@stbi__psd_ + 00063 48 8d 45 24 lea rax, QWORD PTR dummy$[rbp] + 00067 48 89 85 48 01 00 00 mov QWORD PTR x$[rbp], rax $LN2@stbi__psd_: ; 6931 : if (!y) y = &dummy; - 0006d 48 83 bd 50 01 + 0006e 48 83 bd 50 01 00 00 00 cmp QWORD PTR y$[rbp], 0 - 00075 75 0b jne SHORT $LN3@stbi__psd_ - 00077 48 8d 45 24 lea rax, QWORD PTR dummy$[rbp] - 0007b 48 89 85 50 01 + 00076 75 0b jne SHORT $LN3@stbi__psd_ + 00078 48 8d 45 24 lea rax, QWORD PTR dummy$[rbp] + 0007c 48 89 85 50 01 00 00 mov QWORD PTR y$[rbp], rax $LN3@stbi__psd_: ; 6932 : if (!comp) comp = &dummy; - 00082 48 83 bd 58 01 + 00083 48 83 bd 58 01 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 0008a 75 0b jne SHORT $LN4@stbi__psd_ - 0008c 48 8d 45 24 lea rax, QWORD PTR dummy$[rbp] - 00090 48 89 85 58 01 + 0008b 75 0b jne SHORT $LN4@stbi__psd_ + 0008d 48 8d 45 24 lea rax, QWORD PTR dummy$[rbp] + 00091 48 89 85 58 01 00 00 mov QWORD PTR comp$[rbp], rax $LN4@stbi__psd_: ; 6933 : if (stbi__get32be(s) != 0x38425053) { - 00097 48 8b 8d 40 01 + 00098 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0009e e8 00 00 00 00 call stbi__get32be - 000a3 3d 53 50 42 38 cmp eax, 943870035 ; 38425053H - 000a8 74 13 je SHORT $LN5@stbi__psd_ + 0009f e8 00 00 00 00 call stbi__get32be + 000a4 3d 53 50 42 38 cmp eax, 943870035 ; 38425053H + 000a9 74 14 je SHORT $LN5@stbi__psd_ ; 6934 : stbi__rewind(s); - 000aa 48 8b 8d 40 01 + 000ab 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000b1 e8 00 00 00 00 call stbi__rewind + 000b2 e8 00 00 00 00 call stbi__rewind + 000b7 90 npad 1 ; 6935 : return 0; - 000b6 33 c0 xor eax, eax - 000b8 e9 eb 00 00 00 jmp $LN1@stbi__psd_ + 000b8 33 c0 xor eax, eax + 000ba e9 f0 00 00 00 jmp $LN1@stbi__psd_ $LN5@stbi__psd_: ; 6936 : } ; 6937 : if (stbi__get16be(s) != 1) { - 000bd 48 8b 8d 40 01 + 000bf 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000c4 e8 00 00 00 00 call stbi__get16be - 000c9 83 f8 01 cmp eax, 1 - 000cc 74 13 je SHORT $LN6@stbi__psd_ + 000c6 e8 00 00 00 00 call stbi__get16be + 000cb 83 f8 01 cmp eax, 1 + 000ce 74 14 je SHORT $LN6@stbi__psd_ ; 6938 : stbi__rewind(s); - 000ce 48 8b 8d 40 01 + 000d0 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000d5 e8 00 00 00 00 call stbi__rewind + 000d7 e8 00 00 00 00 call stbi__rewind + 000dc 90 npad 1 ; 6939 : return 0; - 000da 33 c0 xor eax, eax - 000dc e9 c7 00 00 00 jmp $LN1@stbi__psd_ + 000dd 33 c0 xor eax, eax + 000df e9 cb 00 00 00 jmp $LN1@stbi__psd_ $LN6@stbi__psd_: ; 6940 : } ; 6941 : stbi__skip(s, 6); - 000e1 ba 06 00 00 00 mov edx, 6 - 000e6 48 8b 8d 40 01 + 000e4 ba 06 00 00 00 mov edx, 6 + 000e9 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000ed e8 00 00 00 00 call stbi__skip + 000f0 e8 00 00 00 00 call stbi__skip + 000f5 90 npad 1 ; 6942 : channelCount = stbi__get16be(s); - 000f2 48 8b 8d 40 01 + 000f6 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000f9 e8 00 00 00 00 call stbi__get16be - 000fe 89 45 04 mov DWORD PTR channelCount$[rbp], eax + 000fd e8 00 00 00 00 call stbi__get16be + 00102 89 45 04 mov DWORD PTR channelCount$[rbp], eax ; 6943 : if (channelCount < 0 || channelCount > 16) { - 00101 83 7d 04 00 cmp DWORD PTR channelCount$[rbp], 0 - 00105 7c 06 jl SHORT $LN8@stbi__psd_ - 00107 83 7d 04 10 cmp DWORD PTR channelCount$[rbp], 16 - 0010b 7e 13 jle SHORT $LN7@stbi__psd_ + 00105 83 7d 04 00 cmp DWORD PTR channelCount$[rbp], 0 + 00109 7c 06 jl SHORT $LN8@stbi__psd_ + 0010b 83 7d 04 10 cmp DWORD PTR channelCount$[rbp], 16 + 0010f 7e 14 jle SHORT $LN7@stbi__psd_ $LN8@stbi__psd_: ; 6944 : stbi__rewind(s); - 0010d 48 8b 8d 40 01 + 00111 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00114 e8 00 00 00 00 call stbi__rewind + 00118 e8 00 00 00 00 call stbi__rewind + 0011d 90 npad 1 ; 6945 : return 0; - 00119 33 c0 xor eax, eax - 0011b e9 88 00 00 00 jmp $LN1@stbi__psd_ + 0011e 33 c0 xor eax, eax + 00120 e9 8a 00 00 00 jmp $LN1@stbi__psd_ $LN7@stbi__psd_: ; 6946 : } ; 6947 : *y = stbi__get32be(s); - 00120 48 8b 8d 40 01 + 00125 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00127 e8 00 00 00 00 call stbi__get32be - 0012c 48 8b 8d 50 01 + 0012c e8 00 00 00 00 call stbi__get32be + 00131 48 8b 8d 50 01 00 00 mov rcx, QWORD PTR y$[rbp] - 00133 89 01 mov DWORD PTR [rcx], eax + 00138 89 01 mov DWORD PTR [rcx], eax ; 6948 : *x = stbi__get32be(s); - 00135 48 8b 8d 40 01 + 0013a 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0013c e8 00 00 00 00 call stbi__get32be - 00141 48 8b 8d 48 01 + 00141 e8 00 00 00 00 call stbi__get32be + 00146 48 8b 8d 48 01 00 00 mov rcx, QWORD PTR x$[rbp] - 00148 89 01 mov DWORD PTR [rcx], eax + 0014d 89 01 mov DWORD PTR [rcx], eax ; 6949 : depth = stbi__get16be(s); - 0014a 48 8b 8d 40 01 + 0014f 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00151 e8 00 00 00 00 call stbi__get16be - 00156 89 45 44 mov DWORD PTR depth$[rbp], eax + 00156 e8 00 00 00 00 call stbi__get16be + 0015b 89 45 44 mov DWORD PTR depth$[rbp], eax ; 6950 : if (depth != 8 && depth != 16) { - 00159 83 7d 44 08 cmp DWORD PTR depth$[rbp], 8 - 0015d 74 16 je SHORT $LN9@stbi__psd_ - 0015f 83 7d 44 10 cmp DWORD PTR depth$[rbp], 16 - 00163 74 10 je SHORT $LN9@stbi__psd_ + 0015e 83 7d 44 08 cmp DWORD PTR depth$[rbp], 8 + 00162 74 17 je SHORT $LN9@stbi__psd_ + 00164 83 7d 44 10 cmp DWORD PTR depth$[rbp], 16 + 00168 74 11 je SHORT $LN9@stbi__psd_ ; 6951 : stbi__rewind(s); - 00165 48 8b 8d 40 01 + 0016a 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0016c e8 00 00 00 00 call stbi__rewind + 00171 e8 00 00 00 00 call stbi__rewind + 00176 90 npad 1 ; 6952 : return 0; - 00171 33 c0 xor eax, eax - 00173 eb 33 jmp SHORT $LN1@stbi__psd_ + 00177 33 c0 xor eax, eax + 00179 eb 34 jmp SHORT $LN1@stbi__psd_ $LN9@stbi__psd_: ; 6953 : } ; 6954 : if (stbi__get16be(s) != 3) { - 00175 48 8b 8d 40 01 + 0017b 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0017c e8 00 00 00 00 call stbi__get16be - 00181 83 f8 03 cmp eax, 3 - 00184 74 10 je SHORT $LN10@stbi__psd_ + 00182 e8 00 00 00 00 call stbi__get16be + 00187 83 f8 03 cmp eax, 3 + 0018a 74 11 je SHORT $LN10@stbi__psd_ ; 6955 : stbi__rewind(s); - 00186 48 8b 8d 40 01 + 0018c 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0018d e8 00 00 00 00 call stbi__rewind + 00193 e8 00 00 00 00 call stbi__rewind + 00198 90 npad 1 ; 6956 : return 0; - 00192 33 c0 xor eax, eax - 00194 eb 12 jmp SHORT $LN1@stbi__psd_ + 00199 33 c0 xor eax, eax + 0019b eb 12 jmp SHORT $LN1@stbi__psd_ $LN10@stbi__psd_: ; 6957 : } ; 6958 : *comp = 4; - 00196 48 8b 85 58 01 + 0019d 48 8b 85 58 01 00 00 mov rax, QWORD PTR comp$[rbp] - 0019d c7 00 04 00 00 + 001a4 c7 00 04 00 00 00 mov DWORD PTR [rax], 4 ; 6959 : return 1; - 001a3 b8 01 00 00 00 mov eax, 1 + 001aa b8 01 00 00 00 mov eax, 1 $LN1@stbi__psd_: ; 6960 : } - 001a8 48 8b f8 mov rdi, rax - 001ab 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 001af 48 8d 15 00 00 + 001af 48 8b f8 mov rdi, rax + 001b2 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 001b6 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__psd_info$rtcFrameData - 001b6 e8 00 00 00 00 call _RTC_CheckStackVars - 001bb 48 8b c7 mov rax, rdi - 001be 48 8b 8d 18 01 + 001bd e8 00 00 00 00 call _RTC_CheckStackVars + 001c2 48 8b c7 mov rax, rdi + 001c5 48 8b 8d 18 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 001c5 48 33 cd xor rcx, rbp - 001c8 e8 00 00 00 00 call __security_check_cookie - 001cd 48 8d a5 28 01 + 001cc 48 33 cd xor rcx, rbp + 001cf e8 00 00 00 00 call __security_check_cookie + 001d4 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 001d4 5f pop rdi - 001d5 5d pop rbp - 001d6 c3 ret 0 + 001db 5f pop rdi + 001dc 5d pop rbp + 001dd c3 ret 0 stbi__psd_info ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -48837,19 +49199,19 @@ a$13 = 676 ra$14 = 708 inv_a$15 = 740 tv241 = 1140 -tv233 = 1140 tv212 = 1140 -tv223 = 1144 -tv196 = 1144 -tv177 = 1144 -tv167 = 1144 -tv148 = 1144 -tv141 = 1144 -tv133 = 1144 -tv128 = 1144 +tv233 = 1140 tv87 = 1144 -tv77 = 1144 +tv128 = 1144 +tv133 = 1144 +tv141 = 1144 +tv148 = 1144 +tv167 = 1144 +tv196 = 1144 tv70 = 1144 +tv223 = 1144 +tv77 = 1144 +tv177 = 1144 s$ = 1184 x$ = 1192 y$ = 1200 @@ -48873,6 +49235,7 @@ stbi__psd_load PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 5669 : int pixelCount; ; 5670 : int channelCount, compression; @@ -48885,216 +49248,217 @@ stbi__psd_load PROC ; COMDAT ; 5677 : // Check identifier ; 5678 : if (stbi__get32be(s) != 0x38425053) // "8BPS" - 0002e 48 8b 8d a0 04 + 0002f 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 00035 e8 00 00 00 00 call stbi__get32be - 0003a 3d 53 50 42 38 cmp eax, 943870035 ; 38425053H - 0003f 74 34 je SHORT $LN32@stbi__psd_ + 00036 e8 00 00 00 00 call stbi__get32be + 0003b 3d 53 50 42 38 cmp eax, 943870035 ; 38425053H + 00040 74 34 je SHORT $LN32@stbi__psd_ ; 5679 : return stbi__errpuc("not PSD", "Corrupt PSD image"); - 00041 48 8d 0d 00 00 + 00042 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07ECNCNLIK@not?5PSD@ - 00048 e8 00 00 00 00 call stbi__err - 0004d 85 c0 test eax, eax - 0004f 74 0d je SHORT $LN69@stbi__psd_ - 00051 48 c7 85 78 04 + 00049 e8 00 00 00 00 call stbi__err + 0004e 85 c0 test eax, eax + 00050 74 0d je SHORT $LN69@stbi__psd_ + 00052 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv70[rbp], 0 - 0005c eb 0b jmp SHORT $LN70@stbi__psd_ + 0005d eb 0b jmp SHORT $LN70@stbi__psd_ $LN69@stbi__psd_: - 0005e 48 c7 85 78 04 + 0005f 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv70[rbp], 0 $LN70@stbi__psd_: - 00069 48 8b 85 78 04 + 0006a 48 8b 85 78 04 00 00 mov rax, QWORD PTR tv70[rbp] - 00070 e9 b1 0b 00 00 jmp $LN1@stbi__psd_ + 00071 e9 b7 0b 00 00 jmp $LN1@stbi__psd_ $LN32@stbi__psd_: ; 5680 : ; 5681 : // Check file type version. ; 5682 : if (stbi__get16be(s) != 1) - 00075 48 8b 8d a0 04 + 00076 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 0007c e8 00 00 00 00 call stbi__get16be - 00081 83 f8 01 cmp eax, 1 - 00084 74 34 je SHORT $LN33@stbi__psd_ + 0007d e8 00 00 00 00 call stbi__get16be + 00082 83 f8 01 cmp eax, 1 + 00085 74 34 je SHORT $LN33@stbi__psd_ ; 5683 : return stbi__errpuc("wrong version", "Unsupported version of PSD image"); - 00086 48 8d 0d 00 00 + 00087 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0O@CHBCDKKC@wrong?5version@ - 0008d e8 00 00 00 00 call stbi__err - 00092 85 c0 test eax, eax - 00094 74 0d je SHORT $LN71@stbi__psd_ - 00096 48 c7 85 78 04 + 0008e e8 00 00 00 00 call stbi__err + 00093 85 c0 test eax, eax + 00095 74 0d je SHORT $LN71@stbi__psd_ + 00097 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv77[rbp], 0 - 000a1 eb 0b jmp SHORT $LN72@stbi__psd_ + 000a2 eb 0b jmp SHORT $LN72@stbi__psd_ $LN71@stbi__psd_: - 000a3 48 c7 85 78 04 + 000a4 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv77[rbp], 0 $LN72@stbi__psd_: - 000ae 48 8b 85 78 04 + 000af 48 8b 85 78 04 00 00 mov rax, QWORD PTR tv77[rbp] - 000b5 e9 6c 0b 00 00 jmp $LN1@stbi__psd_ + 000b6 e9 72 0b 00 00 jmp $LN1@stbi__psd_ $LN33@stbi__psd_: ; 5684 : ; 5685 : // Skip 6 reserved bytes. ; 5686 : stbi__skip(s, 6); - 000ba ba 06 00 00 00 mov edx, 6 - 000bf 48 8b 8d a0 04 + 000bb ba 06 00 00 00 mov edx, 6 + 000c0 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 000c6 e8 00 00 00 00 call stbi__skip + 000c7 e8 00 00 00 00 call stbi__skip + 000cc 90 npad 1 ; 5687 : ; 5688 : // Read the number of channels (R, G, B, A, etc). ; 5689 : channelCount = stbi__get16be(s); - 000cb 48 8b 8d a0 04 + 000cd 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 000d2 e8 00 00 00 00 call stbi__get16be - 000d7 89 45 24 mov DWORD PTR channelCount$[rbp], eax + 000d4 e8 00 00 00 00 call stbi__get16be + 000d9 89 45 24 mov DWORD PTR channelCount$[rbp], eax ; 5690 : if (channelCount < 0 || channelCount > 16) - 000da 83 7d 24 00 cmp DWORD PTR channelCount$[rbp], 0 - 000de 7c 06 jl SHORT $LN35@stbi__psd_ - 000e0 83 7d 24 10 cmp DWORD PTR channelCount$[rbp], 16 - 000e4 7e 34 jle SHORT $LN34@stbi__psd_ + 000dc 83 7d 24 00 cmp DWORD PTR channelCount$[rbp], 0 + 000e0 7c 06 jl SHORT $LN35@stbi__psd_ + 000e2 83 7d 24 10 cmp DWORD PTR channelCount$[rbp], 16 + 000e6 7e 34 jle SHORT $LN34@stbi__psd_ $LN35@stbi__psd_: ; 5691 : return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); - 000e6 48 8d 0d 00 00 + 000e8 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BE@PJBNGDBE@wrong?5channel?5count@ - 000ed e8 00 00 00 00 call stbi__err - 000f2 85 c0 test eax, eax - 000f4 74 0d je SHORT $LN73@stbi__psd_ - 000f6 48 c7 85 78 04 + 000ef e8 00 00 00 00 call stbi__err + 000f4 85 c0 test eax, eax + 000f6 74 0d je SHORT $LN73@stbi__psd_ + 000f8 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv87[rbp], 0 - 00101 eb 0b jmp SHORT $LN74@stbi__psd_ + 00103 eb 0b jmp SHORT $LN74@stbi__psd_ $LN73@stbi__psd_: - 00103 48 c7 85 78 04 + 00105 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv87[rbp], 0 $LN74@stbi__psd_: - 0010e 48 8b 85 78 04 + 00110 48 8b 85 78 04 00 00 mov rax, QWORD PTR tv87[rbp] - 00115 e9 0c 0b 00 00 jmp $LN1@stbi__psd_ + 00117 e9 11 0b 00 00 jmp $LN1@stbi__psd_ $LN34@stbi__psd_: ; 5692 : ; 5693 : // Read the rows and columns of the image. ; 5694 : h = stbi__get32be(s); - 0011a 48 8b 8d a0 04 + 0011c 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 00121 e8 00 00 00 00 call stbi__get32be - 00126 89 85 e4 00 00 + 00123 e8 00 00 00 00 call stbi__get32be + 00128 89 85 e4 00 00 00 mov DWORD PTR h$[rbp], eax ; 5695 : w = stbi__get32be(s); - 0012c 48 8b 8d a0 04 + 0012e 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 00133 e8 00 00 00 00 call stbi__get32be - 00138 89 85 c4 00 00 + 00135 e8 00 00 00 00 call stbi__get32be + 0013a 89 85 c4 00 00 00 mov DWORD PTR w$[rbp], eax ; 5696 : ; 5697 : if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - 0013e 81 bd e4 00 00 + 00140 81 bd e4 00 00 00 00 00 00 01 cmp DWORD PTR h$[rbp], 16777216 ; 01000000H - 00148 7e 34 jle SHORT $LN36@stbi__psd_ - 0014a 48 8d 0d 00 00 + 0014a 7e 34 jle SHORT $LN36@stbi__psd_ + 0014c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 00151 e8 00 00 00 00 call stbi__err - 00156 85 c0 test eax, eax - 00158 74 0d je SHORT $LN75@stbi__psd_ - 0015a 48 c7 85 78 04 + 00153 e8 00 00 00 00 call stbi__err + 00158 85 c0 test eax, eax + 0015a 74 0d je SHORT $LN75@stbi__psd_ + 0015c 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv128[rbp], 0 - 00165 eb 0b jmp SHORT $LN76@stbi__psd_ + 00167 eb 0b jmp SHORT $LN76@stbi__psd_ $LN75@stbi__psd_: - 00167 48 c7 85 78 04 + 00169 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv128[rbp], 0 $LN76@stbi__psd_: - 00172 48 8b 85 78 04 + 00174 48 8b 85 78 04 00 00 mov rax, QWORD PTR tv128[rbp] - 00179 e9 a8 0a 00 00 jmp $LN1@stbi__psd_ + 0017b e9 ad 0a 00 00 jmp $LN1@stbi__psd_ $LN36@stbi__psd_: ; 5698 : if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - 0017e 81 bd c4 00 00 + 00180 81 bd c4 00 00 00 00 00 00 01 cmp DWORD PTR w$[rbp], 16777216 ; 01000000H - 00188 7e 34 jle SHORT $LN37@stbi__psd_ - 0018a 48 8d 0d 00 00 + 0018a 7e 34 jle SHORT $LN37@stbi__psd_ + 0018c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 00191 e8 00 00 00 00 call stbi__err - 00196 85 c0 test eax, eax - 00198 74 0d je SHORT $LN77@stbi__psd_ - 0019a 48 c7 85 78 04 + 00193 e8 00 00 00 00 call stbi__err + 00198 85 c0 test eax, eax + 0019a 74 0d je SHORT $LN77@stbi__psd_ + 0019c 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv133[rbp], 0 - 001a5 eb 0b jmp SHORT $LN78@stbi__psd_ + 001a7 eb 0b jmp SHORT $LN78@stbi__psd_ $LN77@stbi__psd_: - 001a7 48 c7 85 78 04 + 001a9 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv133[rbp], 0 $LN78@stbi__psd_: - 001b2 48 8b 85 78 04 + 001b4 48 8b 85 78 04 00 00 mov rax, QWORD PTR tv133[rbp] - 001b9 e9 68 0a 00 00 jmp $LN1@stbi__psd_ + 001bb e9 6d 0a 00 00 jmp $LN1@stbi__psd_ $LN37@stbi__psd_: ; 5699 : ; 5700 : // Make sure the depth is 8 bits. ; 5701 : bitdepth = stbi__get16be(s); - 001be 48 8b 8d a0 04 + 001c0 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 001c5 e8 00 00 00 00 call stbi__get16be - 001ca 89 85 a4 00 00 + 001c7 e8 00 00 00 00 call stbi__get16be + 001cc 89 85 a4 00 00 00 mov DWORD PTR bitdepth$[rbp], eax ; 5702 : if (bitdepth != 8 && bitdepth != 16) - 001d0 83 bd a4 00 00 + 001d2 83 bd a4 00 00 00 08 cmp DWORD PTR bitdepth$[rbp], 8 - 001d7 74 3d je SHORT $LN38@stbi__psd_ - 001d9 83 bd a4 00 00 + 001d9 74 3d je SHORT $LN38@stbi__psd_ + 001db 83 bd a4 00 00 00 10 cmp DWORD PTR bitdepth$[rbp], 16 - 001e0 74 34 je SHORT $LN38@stbi__psd_ + 001e2 74 34 je SHORT $LN38@stbi__psd_ ; 5703 : return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); - 001e2 48 8d 0d 00 00 + 001e4 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BG@NOLDLPP@unsupported?5bit?5depth@ - 001e9 e8 00 00 00 00 call stbi__err - 001ee 85 c0 test eax, eax - 001f0 74 0d je SHORT $LN79@stbi__psd_ - 001f2 48 c7 85 78 04 + 001eb e8 00 00 00 00 call stbi__err + 001f0 85 c0 test eax, eax + 001f2 74 0d je SHORT $LN79@stbi__psd_ + 001f4 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv141[rbp], 0 - 001fd eb 0b jmp SHORT $LN80@stbi__psd_ + 001ff eb 0b jmp SHORT $LN80@stbi__psd_ $LN79@stbi__psd_: - 001ff 48 c7 85 78 04 + 00201 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv141[rbp], 0 $LN80@stbi__psd_: - 0020a 48 8b 85 78 04 + 0020c 48 8b 85 78 04 00 00 mov rax, QWORD PTR tv141[rbp] - 00211 e9 10 0a 00 00 jmp $LN1@stbi__psd_ + 00213 e9 15 0a 00 00 jmp $LN1@stbi__psd_ $LN38@stbi__psd_: ; 5704 : @@ -49110,68 +49474,71 @@ $LN38@stbi__psd_: ; 5714 : // 9: Lab color ; 5715 : if (stbi__get16be(s) != 3) - 00216 48 8b 8d a0 04 + 00218 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 0021d e8 00 00 00 00 call stbi__get16be - 00222 83 f8 03 cmp eax, 3 - 00225 74 34 je SHORT $LN39@stbi__psd_ + 0021f e8 00 00 00 00 call stbi__get16be + 00224 83 f8 03 cmp eax, 3 + 00227 74 34 je SHORT $LN39@stbi__psd_ ; 5716 : return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); - 00227 48 8d 0d 00 00 + 00229 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BD@IOGGBMNK@wrong?5color?5format@ - 0022e e8 00 00 00 00 call stbi__err - 00233 85 c0 test eax, eax - 00235 74 0d je SHORT $LN81@stbi__psd_ - 00237 48 c7 85 78 04 + 00230 e8 00 00 00 00 call stbi__err + 00235 85 c0 test eax, eax + 00237 74 0d je SHORT $LN81@stbi__psd_ + 00239 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv148[rbp], 0 - 00242 eb 0b jmp SHORT $LN82@stbi__psd_ + 00244 eb 0b jmp SHORT $LN82@stbi__psd_ $LN81@stbi__psd_: - 00244 48 c7 85 78 04 + 00246 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv148[rbp], 0 $LN82@stbi__psd_: - 0024f 48 8b 85 78 04 + 00251 48 8b 85 78 04 00 00 mov rax, QWORD PTR tv148[rbp] - 00256 e9 cb 09 00 00 jmp $LN1@stbi__psd_ + 00258 e9 d0 09 00 00 jmp $LN1@stbi__psd_ $LN39@stbi__psd_: ; 5717 : ; 5718 : // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) ; 5719 : stbi__skip(s, stbi__get32be(s)); - 0025b 48 8b 8d a0 04 + 0025d 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 00262 e8 00 00 00 00 call stbi__get32be - 00267 8b d0 mov edx, eax - 00269 48 8b 8d a0 04 + 00264 e8 00 00 00 00 call stbi__get32be + 00269 8b d0 mov edx, eax + 0026b 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 00270 e8 00 00 00 00 call stbi__skip + 00272 e8 00 00 00 00 call stbi__skip + 00277 90 npad 1 ; 5720 : ; 5721 : // Skip the image resources. (resolution, pen tool paths, etc) ; 5722 : stbi__skip(s, stbi__get32be(s)); - 00275 48 8b 8d a0 04 + 00278 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 0027c e8 00 00 00 00 call stbi__get32be - 00281 8b d0 mov edx, eax - 00283 48 8b 8d a0 04 + 0027f e8 00 00 00 00 call stbi__get32be + 00284 8b d0 mov edx, eax + 00286 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 0028a e8 00 00 00 00 call stbi__skip + 0028d e8 00 00 00 00 call stbi__skip + 00292 90 npad 1 ; 5723 : ; 5724 : // Skip the reserved data. ; 5725 : stbi__skip(s, stbi__get32be(s)); - 0028f 48 8b 8d a0 04 + 00293 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 00296 e8 00 00 00 00 call stbi__get32be - 0029b 8b d0 mov edx, eax - 0029d 48 8b 8d a0 04 + 0029a e8 00 00 00 00 call stbi__get32be + 0029f 8b d0 mov edx, eax + 002a1 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 002a4 e8 00 00 00 00 call stbi__skip + 002a8 e8 00 00 00 00 call stbi__skip + 002ad 90 npad 1 ; 5726 : ; 5727 : // Find out if the data is compressed. @@ -49180,70 +49547,70 @@ $LN39@stbi__psd_: ; 5730 : // 1: RLE compressed ; 5731 : compression = stbi__get16be(s); - 002a9 48 8b 8d a0 04 + 002ae 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 002b0 e8 00 00 00 00 call stbi__get16be - 002b5 89 45 44 mov DWORD PTR compression$[rbp], eax + 002b5 e8 00 00 00 00 call stbi__get16be + 002ba 89 45 44 mov DWORD PTR compression$[rbp], eax ; 5732 : if (compression > 1) - 002b8 83 7d 44 01 cmp DWORD PTR compression$[rbp], 1 - 002bc 7e 34 jle SHORT $LN40@stbi__psd_ + 002bd 83 7d 44 01 cmp DWORD PTR compression$[rbp], 1 + 002c1 7e 34 jle SHORT $LN40@stbi__psd_ ; 5733 : return stbi__errpuc("bad compression", "PSD has an unknown compression format"); - 002be 48 8d 0d 00 00 + 002c3 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0BA@MCNBDLPD@bad?5compression@ - 002c5 e8 00 00 00 00 call stbi__err - 002ca 85 c0 test eax, eax - 002cc 74 0d je SHORT $LN83@stbi__psd_ - 002ce 48 c7 85 78 04 + 002ca e8 00 00 00 00 call stbi__err + 002cf 85 c0 test eax, eax + 002d1 74 0d je SHORT $LN83@stbi__psd_ + 002d3 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv167[rbp], 0 - 002d9 eb 0b jmp SHORT $LN84@stbi__psd_ + 002de eb 0b jmp SHORT $LN84@stbi__psd_ $LN83@stbi__psd_: - 002db 48 c7 85 78 04 + 002e0 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv167[rbp], 0 $LN84@stbi__psd_: - 002e6 48 8b 85 78 04 + 002eb 48 8b 85 78 04 00 00 mov rax, QWORD PTR tv167[rbp] - 002ed e9 34 09 00 00 jmp $LN1@stbi__psd_ + 002f2 e9 36 09 00 00 jmp $LN1@stbi__psd_ $LN40@stbi__psd_: ; 5734 : ; 5735 : // Check size ; 5736 : if (!stbi__mad3sizes_valid(4, w, h, 0)) - 002f2 45 33 c9 xor r9d, r9d - 002f5 44 8b 85 e4 00 + 002f7 45 33 c9 xor r9d, r9d + 002fa 44 8b 85 e4 00 00 00 mov r8d, DWORD PTR h$[rbp] - 002fc 8b 95 c4 00 00 + 00301 8b 95 c4 00 00 00 mov edx, DWORD PTR w$[rbp] - 00302 b9 04 00 00 00 mov ecx, 4 - 00307 e8 00 00 00 00 call stbi__mad3sizes_valid - 0030c 85 c0 test eax, eax - 0030e 75 34 jne SHORT $LN41@stbi__psd_ + 00307 b9 04 00 00 00 mov ecx, 4 + 0030c e8 00 00 00 00 call stbi__mad3sizes_valid + 00311 85 c0 test eax, eax + 00313 75 34 jne SHORT $LN41@stbi__psd_ ; 5737 : return stbi__errpuc("too large", "Corrupt PSD"); - 00310 48 8d 0d 00 00 + 00315 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 00317 e8 00 00 00 00 call stbi__err - 0031c 85 c0 test eax, eax - 0031e 74 0d je SHORT $LN85@stbi__psd_ - 00320 48 c7 85 78 04 + 0031c e8 00 00 00 00 call stbi__err + 00321 85 c0 test eax, eax + 00323 74 0d je SHORT $LN85@stbi__psd_ + 00325 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv177[rbp], 0 - 0032b eb 0b jmp SHORT $LN86@stbi__psd_ + 00330 eb 0b jmp SHORT $LN86@stbi__psd_ $LN85@stbi__psd_: - 0032d 48 c7 85 78 04 + 00332 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv177[rbp], 0 $LN86@stbi__psd_: - 00338 48 8b 85 78 04 + 0033d 48 8b 85 78 04 00 00 mov rax, QWORD PTR tv177[rbp] - 0033f e9 e2 08 00 00 jmp $LN1@stbi__psd_ + 00344 e9 e4 08 00 00 jmp $LN1@stbi__psd_ $LN41@stbi__psd_: ; 5738 : @@ -49251,86 +49618,86 @@ $LN41@stbi__psd_: ; 5740 : ; 5741 : if (!compression && bitdepth == 16 && bpc == 16) { - 00344 83 7d 44 00 cmp DWORD PTR compression$[rbp], 0 - 00348 75 42 jne SHORT $LN42@stbi__psd_ - 0034a 83 bd a4 00 00 + 00349 83 7d 44 00 cmp DWORD PTR compression$[rbp], 0 + 0034d 75 42 jne SHORT $LN42@stbi__psd_ + 0034f 83 bd a4 00 00 00 10 cmp DWORD PTR bitdepth$[rbp], 16 - 00351 75 39 jne SHORT $LN42@stbi__psd_ - 00353 83 bd d0 04 00 + 00356 75 39 jne SHORT $LN42@stbi__psd_ + 00358 83 bd d0 04 00 00 10 cmp DWORD PTR bpc$[rbp], 16 - 0035a 75 30 jne SHORT $LN42@stbi__psd_ + 0035f 75 30 jne SHORT $LN42@stbi__psd_ ; 5742 : out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0); - 0035c 45 33 c9 xor r9d, r9d - 0035f 44 8b 85 e4 00 + 00361 45 33 c9 xor r9d, r9d + 00364 44 8b 85 e4 00 00 00 mov r8d, DWORD PTR h$[rbp] - 00366 8b 95 c4 00 00 + 0036b 8b 95 c4 00 00 00 mov edx, DWORD PTR w$[rbp] - 0036c b9 08 00 00 00 mov ecx, 8 - 00371 e8 00 00 00 00 call stbi__malloc_mad3 - 00376 48 89 85 08 01 + 00371 b9 08 00 00 00 mov ecx, 8 + 00376 e8 00 00 00 00 call stbi__malloc_mad3 + 0037b 48 89 85 08 01 00 00 mov QWORD PTR out$[rbp], rax ; 5743 : ri->bits_per_channel = 16; - 0037d 48 8b 85 c8 04 + 00382 48 8b 85 c8 04 00 00 mov rax, QWORD PTR ri$[rbp] - 00384 c7 00 10 00 00 + 00389 c7 00 10 00 00 00 mov DWORD PTR [rax], 16 ; 5744 : } - 0038a eb 21 jmp SHORT $LN43@stbi__psd_ + 0038f eb 21 jmp SHORT $LN43@stbi__psd_ $LN42@stbi__psd_: ; 5745 : else ; 5746 : out = (stbi_uc*)stbi__malloc(4 * w * h); - 0038c 8b 85 c4 00 00 + 00391 8b 85 c4 00 00 00 mov eax, DWORD PTR w$[rbp] - 00392 c1 e0 02 shl eax, 2 - 00395 0f af 85 e4 00 + 00397 c1 e0 02 shl eax, 2 + 0039a 0f af 85 e4 00 00 00 imul eax, DWORD PTR h$[rbp] - 0039c 48 98 cdqe - 0039e 48 8b c8 mov rcx, rax - 003a1 e8 00 00 00 00 call stbi__malloc - 003a6 48 89 85 08 01 + 003a1 48 98 cdqe + 003a3 48 8b c8 mov rcx, rax + 003a6 e8 00 00 00 00 call stbi__malloc + 003ab 48 89 85 08 01 00 00 mov QWORD PTR out$[rbp], rax $LN43@stbi__psd_: ; 5747 : ; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); - 003ad 48 83 bd 08 01 + 003b2 48 83 bd 08 01 00 00 00 cmp QWORD PTR out$[rbp], 0 - 003b5 75 34 jne SHORT $LN44@stbi__psd_ - 003b7 48 8d 0d 00 00 + 003ba 75 34 jne SHORT $LN44@stbi__psd_ + 003bc 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 003be e8 00 00 00 00 call stbi__err - 003c3 85 c0 test eax, eax - 003c5 74 0d je SHORT $LN87@stbi__psd_ - 003c7 48 c7 85 78 04 + 003c3 e8 00 00 00 00 call stbi__err + 003c8 85 c0 test eax, eax + 003ca 74 0d je SHORT $LN87@stbi__psd_ + 003cc 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv196[rbp], 0 - 003d2 eb 0b jmp SHORT $LN88@stbi__psd_ + 003d7 eb 0b jmp SHORT $LN88@stbi__psd_ $LN87@stbi__psd_: - 003d4 48 c7 85 78 04 + 003d9 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv196[rbp], 0 $LN88@stbi__psd_: - 003df 48 8b 85 78 04 + 003e4 48 8b 85 78 04 00 00 mov rax, QWORD PTR tv196[rbp] - 003e6 e9 3b 08 00 00 jmp $LN1@stbi__psd_ + 003eb e9 3d 08 00 00 jmp $LN1@stbi__psd_ $LN44@stbi__psd_: ; 5749 : pixelCount = w * h; - 003eb 8b 85 c4 00 00 + 003f0 8b 85 c4 00 00 00 mov eax, DWORD PTR w$[rbp] - 003f1 0f af 85 e4 00 + 003f6 0f af 85 e4 00 00 00 imul eax, DWORD PTR h$[rbp] - 003f8 89 45 04 mov DWORD PTR pixelCount$[rbp], eax + 003fd 89 45 04 mov DWORD PTR pixelCount$[rbp], eax ; 5750 : ; 5751 : // Initialize the data to zero. @@ -49339,8 +49706,8 @@ $LN44@stbi__psd_: ; 5754 : // Finally, the image data. ; 5755 : if (compression) { - 003fb 83 7d 44 00 cmp DWORD PTR compression$[rbp], 0 - 003ff 0f 84 22 01 00 + 00400 83 7d 44 00 cmp DWORD PTR compression$[rbp], 0 + 00404 0f 84 24 01 00 00 je $LN45@stbi__psd_ ; 5756 : // RLE as used by .PSD and .TIFF @@ -49355,135 +49722,137 @@ $LN44@stbi__psd_: ; 5765 : // which we're going to just skip. ; 5766 : stbi__skip(s, h * channelCount * 2); - 00405 8b 85 e4 00 00 + 0040a 8b 85 e4 00 00 00 mov eax, DWORD PTR h$[rbp] - 0040b 0f af 45 24 imul eax, DWORD PTR channelCount$[rbp] - 0040f d1 e0 shl eax, 1 - 00411 8b d0 mov edx, eax - 00413 48 8b 8d a0 04 + 00410 0f af 45 24 imul eax, DWORD PTR channelCount$[rbp] + 00414 d1 e0 shl eax, 1 + 00416 8b d0 mov edx, eax + 00418 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 0041a e8 00 00 00 00 call stbi__skip + 0041f e8 00 00 00 00 call stbi__skip + 00424 90 npad 1 ; 5767 : ; 5768 : // Read the RLE data by channel. ; 5769 : for (channel = 0; channel < 4; channel++) { - 0041f c7 45 64 00 00 + 00425 c7 45 64 00 00 00 00 mov DWORD PTR channel$[rbp], 0 - 00426 eb 08 jmp SHORT $LN4@stbi__psd_ + 0042c eb 08 jmp SHORT $LN4@stbi__psd_ $LN2@stbi__psd_: - 00428 8b 45 64 mov eax, DWORD PTR channel$[rbp] - 0042b ff c0 inc eax - 0042d 89 45 64 mov DWORD PTR channel$[rbp], eax + 0042e 8b 45 64 mov eax, DWORD PTR channel$[rbp] + 00431 ff c0 inc eax + 00433 89 45 64 mov DWORD PTR channel$[rbp], eax $LN4@stbi__psd_: - 00430 83 7d 64 04 cmp DWORD PTR channel$[rbp], 4 - 00434 0f 8d e8 00 00 + 00436 83 7d 64 04 cmp DWORD PTR channel$[rbp], 4 + 0043a 0f 8d e9 00 00 00 jge $LN3@stbi__psd_ ; 5770 : stbi_uc* p; ; 5771 : ; 5772 : p = out + channel; - 0043a 48 63 45 64 movsxd rax, DWORD PTR channel$[rbp] - 0043e 48 8b 8d 08 01 + 00440 48 63 45 64 movsxd rax, DWORD PTR channel$[rbp] + 00444 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR out$[rbp] - 00445 48 03 c8 add rcx, rax - 00448 48 8b c1 mov rax, rcx - 0044b 48 89 85 28 01 + 0044b 48 03 c8 add rcx, rax + 0044e 48 8b c1 mov rax, rcx + 00451 48 89 85 28 01 00 00 mov QWORD PTR p$1[rbp], rax ; 5773 : if (channel >= channelCount) { - 00452 8b 45 24 mov eax, DWORD PTR channelCount$[rbp] - 00455 39 45 64 cmp DWORD PTR channel$[rbp], eax - 00458 7c 67 jl SHORT $LN47@stbi__psd_ + 00458 8b 45 24 mov eax, DWORD PTR channelCount$[rbp] + 0045b 39 45 64 cmp DWORD PTR channel$[rbp], eax + 0045e 7c 67 jl SHORT $LN47@stbi__psd_ ; 5774 : // Fill this channel with default data. ; 5775 : for (i = 0; i < pixelCount; i++, p += 4) - 0045a c7 85 84 00 00 + 00460 c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00464 eb 20 jmp SHORT $LN7@stbi__psd_ + 0046a eb 20 jmp SHORT $LN7@stbi__psd_ $LN5@stbi__psd_: - 00466 8b 85 84 00 00 + 0046c 8b 85 84 00 00 00 mov eax, DWORD PTR i$[rbp] - 0046c ff c0 inc eax - 0046e 89 85 84 00 00 + 00472 ff c0 inc eax + 00474 89 85 84 00 00 00 mov DWORD PTR i$[rbp], eax - 00474 48 8b 85 28 01 + 0047a 48 8b 85 28 01 00 00 mov rax, QWORD PTR p$1[rbp] - 0047b 48 83 c0 04 add rax, 4 - 0047f 48 89 85 28 01 + 00481 48 83 c0 04 add rax, 4 + 00485 48 89 85 28 01 00 00 mov QWORD PTR p$1[rbp], rax $LN7@stbi__psd_: - 00486 8b 45 04 mov eax, DWORD PTR pixelCount$[rbp] - 00489 39 85 84 00 00 + 0048c 8b 45 04 mov eax, DWORD PTR pixelCount$[rbp] + 0048f 39 85 84 00 00 00 cmp DWORD PTR i$[rbp], eax - 0048f 7d 2e jge SHORT $LN6@stbi__psd_ + 00495 7d 2e jge SHORT $LN6@stbi__psd_ ; 5776 : *p = (channel == 3 ? 255 : 0); - 00491 83 7d 64 03 cmp DWORD PTR channel$[rbp], 3 - 00495 75 0c jne SHORT $LN89@stbi__psd_ - 00497 c7 85 74 04 00 + 00497 83 7d 64 03 cmp DWORD PTR channel$[rbp], 3 + 0049b 75 0c jne SHORT $LN89@stbi__psd_ + 0049d c7 85 74 04 00 00 ff 00 00 00 mov DWORD PTR tv212[rbp], 255 ; 000000ffH - 004a1 eb 0a jmp SHORT $LN90@stbi__psd_ + 004a7 eb 0a jmp SHORT $LN90@stbi__psd_ $LN89@stbi__psd_: - 004a3 c7 85 74 04 00 + 004a9 c7 85 74 04 00 00 00 00 00 00 mov DWORD PTR tv212[rbp], 0 $LN90@stbi__psd_: - 004ad 48 8b 85 28 01 + 004b3 48 8b 85 28 01 00 00 mov rax, QWORD PTR p$1[rbp] - 004b4 0f b6 8d 74 04 + 004ba 0f b6 8d 74 04 00 00 movzx ecx, BYTE PTR tv212[rbp] - 004bb 88 08 mov BYTE PTR [rax], cl - 004bd eb a7 jmp SHORT $LN5@stbi__psd_ + 004c1 88 08 mov BYTE PTR [rax], cl + 004c3 eb a7 jmp SHORT $LN5@stbi__psd_ $LN6@stbi__psd_: ; 5777 : } - 004bf eb 5c jmp SHORT $LN48@stbi__psd_ + 004c5 eb 5d jmp SHORT $LN48@stbi__psd_ $LN47@stbi__psd_: ; 5778 : else { ; 5779 : // Read the RLE data. ; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { - 004c1 44 8b 45 04 mov r8d, DWORD PTR pixelCount$[rbp] - 004c5 48 8b 95 28 01 + 004c7 44 8b 45 04 mov r8d, DWORD PTR pixelCount$[rbp] + 004cb 48 8b 95 28 01 00 00 mov rdx, QWORD PTR p$1[rbp] - 004cc 48 8b 8d a0 04 + 004d2 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 004d3 e8 00 00 00 00 call stbi__psd_decode_rle - 004d8 85 c0 test eax, eax - 004da 75 41 jne SHORT $LN49@stbi__psd_ + 004d9 e8 00 00 00 00 call stbi__psd_decode_rle + 004de 85 c0 test eax, eax + 004e0 75 42 jne SHORT $LN49@stbi__psd_ ; 5781 : STBI_FREE(out); - 004dc 48 8b 8d 08 01 + 004e2 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR out$[rbp] - 004e3 ff 15 00 00 00 + 004e9 ff 15 00 00 00 00 call QWORD PTR __imp_free + 004ef 90 npad 1 ; 5782 : return stbi__errpuc("corrupt", "bad RLE data"); - 004e9 48 8d 0d 00 00 + 004f0 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07DPPMCAKL@corrupt@ - 004f0 e8 00 00 00 00 call stbi__err - 004f5 85 c0 test eax, eax - 004f7 74 0d je SHORT $LN91@stbi__psd_ - 004f9 48 c7 85 78 04 + 004f7 e8 00 00 00 00 call stbi__err + 004fc 85 c0 test eax, eax + 004fe 74 0d je SHORT $LN91@stbi__psd_ + 00500 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv223[rbp], 0 - 00504 eb 0b jmp SHORT $LN92@stbi__psd_ + 0050b eb 0b jmp SHORT $LN92@stbi__psd_ $LN91@stbi__psd_: - 00506 48 c7 85 78 04 + 0050d 48 c7 85 78 04 00 00 00 00 00 00 mov QWORD PTR tv223[rbp], 0 $LN92@stbi__psd_: - 00511 48 8b 85 78 04 + 00518 48 8b 85 78 04 00 00 mov rax, QWORD PTR tv223[rbp] - 00518 e9 09 07 00 00 jmp $LN1@stbi__psd_ + 0051f e9 09 07 00 00 jmp $LN1@stbi__psd_ $LN49@stbi__psd_: $LN48@stbi__psd_: @@ -49491,12 +49860,12 @@ $LN48@stbi__psd_: ; 5784 : } ; 5785 : } - 0051d e9 06 ff ff ff jmp $LN2@stbi__psd_ + 00524 e9 05 ff ff ff jmp $LN2@stbi__psd_ $LN3@stbi__psd_: ; 5786 : } - 00522 e9 9c 02 00 00 jmp $LN46@stbi__psd_ + 00529 e9 9c 02 00 00 jmp $LN46@stbi__psd_ $LN45@stbi__psd_: ; 5787 : else { @@ -49506,308 +49875,308 @@ $LN45@stbi__psd_: ; 5791 : // Read the data by channel. ; 5792 : for (channel = 0; channel < 4; channel++) { - 00527 c7 45 64 00 00 + 0052e c7 45 64 00 00 00 00 mov DWORD PTR channel$[rbp], 0 - 0052e eb 08 jmp SHORT $LN10@stbi__psd_ + 00535 eb 08 jmp SHORT $LN10@stbi__psd_ $LN8@stbi__psd_: - 00530 8b 45 64 mov eax, DWORD PTR channel$[rbp] - 00533 ff c0 inc eax - 00535 89 45 64 mov DWORD PTR channel$[rbp], eax + 00537 8b 45 64 mov eax, DWORD PTR channel$[rbp] + 0053a ff c0 inc eax + 0053c 89 45 64 mov DWORD PTR channel$[rbp], eax $LN10@stbi__psd_: - 00538 83 7d 64 04 cmp DWORD PTR channel$[rbp], 4 - 0053c 0f 8d 81 02 00 + 0053f 83 7d 64 04 cmp DWORD PTR channel$[rbp], 4 + 00543 0f 8d 81 02 00 00 jge $LN9@stbi__psd_ ; 5793 : if (channel >= channelCount) { - 00542 8b 45 24 mov eax, DWORD PTR channelCount$[rbp] - 00545 39 45 64 cmp DWORD PTR channel$[rbp], eax - 00548 0f 8c 38 01 00 + 00549 8b 45 24 mov eax, DWORD PTR channelCount$[rbp] + 0054c 39 45 64 cmp DWORD PTR channel$[rbp], eax + 0054f 0f 8c 38 01 00 00 jl $LN50@stbi__psd_ ; 5794 : // Fill this channel with default data. ; 5795 : if (bitdepth == 16 && bpc == 16) { - 0054e 83 bd a4 00 00 + 00555 83 bd a4 00 00 00 10 cmp DWORD PTR bitdepth$[rbp], 16 - 00555 0f 85 9c 00 00 + 0055c 0f 85 9c 00 00 00 jne $LN52@stbi__psd_ - 0055b 83 bd d0 04 00 + 00562 83 bd d0 04 00 00 10 cmp DWORD PTR bpc$[rbp], 16 - 00562 0f 85 8f 00 00 + 00569 0f 85 8f 00 00 00 jne $LN52@stbi__psd_ ; 5796 : stbi__uint16* q = ((stbi__uint16*)out) + channel; - 00568 48 63 45 64 movsxd rax, DWORD PTR channel$[rbp] - 0056c 48 8b 8d 08 01 + 0056f 48 63 45 64 movsxd rax, DWORD PTR channel$[rbp] + 00573 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR out$[rbp] - 00573 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] - 00577 48 89 85 48 01 + 0057a 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] + 0057e 48 89 85 48 01 00 00 mov QWORD PTR q$2[rbp], rax ; 5797 : stbi__uint16 val = channel == 3 ? 65535 : 0; - 0057e 83 7d 64 03 cmp DWORD PTR channel$[rbp], 3 - 00582 75 0c jne SHORT $LN93@stbi__psd_ - 00584 c7 85 74 04 00 + 00585 83 7d 64 03 cmp DWORD PTR channel$[rbp], 3 + 00589 75 0c jne SHORT $LN93@stbi__psd_ + 0058b c7 85 74 04 00 00 ff ff 00 00 mov DWORD PTR tv233[rbp], 65535 ; 0000ffffH - 0058e eb 0a jmp SHORT $LN94@stbi__psd_ + 00595 eb 0a jmp SHORT $LN94@stbi__psd_ $LN93@stbi__psd_: - 00590 c7 85 74 04 00 + 00597 c7 85 74 04 00 00 00 00 00 00 mov DWORD PTR tv233[rbp], 0 $LN94@stbi__psd_: - 0059a 0f b7 85 74 04 + 005a1 0f b7 85 74 04 00 00 movzx eax, WORD PTR tv233[rbp] - 005a1 66 89 85 64 01 + 005a8 66 89 85 64 01 00 00 mov WORD PTR val$3[rbp], ax ; 5798 : for (i = 0; i < pixelCount; i++, q += 4) - 005a8 c7 85 84 00 00 + 005af c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 005b2 eb 20 jmp SHORT $LN13@stbi__psd_ + 005b9 eb 20 jmp SHORT $LN13@stbi__psd_ $LN11@stbi__psd_: - 005b4 8b 85 84 00 00 + 005bb 8b 85 84 00 00 00 mov eax, DWORD PTR i$[rbp] - 005ba ff c0 inc eax - 005bc 89 85 84 00 00 + 005c1 ff c0 inc eax + 005c3 89 85 84 00 00 00 mov DWORD PTR i$[rbp], eax - 005c2 48 8b 85 48 01 + 005c9 48 8b 85 48 01 00 00 mov rax, QWORD PTR q$2[rbp] - 005c9 48 83 c0 08 add rax, 8 - 005cd 48 89 85 48 01 + 005d0 48 83 c0 08 add rax, 8 + 005d4 48 89 85 48 01 00 00 mov QWORD PTR q$2[rbp], rax $LN13@stbi__psd_: - 005d4 8b 45 04 mov eax, DWORD PTR pixelCount$[rbp] - 005d7 39 85 84 00 00 + 005db 8b 45 04 mov eax, DWORD PTR pixelCount$[rbp] + 005de 39 85 84 00 00 00 cmp DWORD PTR i$[rbp], eax - 005dd 7d 13 jge SHORT $LN12@stbi__psd_ + 005e4 7d 13 jge SHORT $LN12@stbi__psd_ ; 5799 : *q = val; - 005df 48 8b 85 48 01 + 005e6 48 8b 85 48 01 00 00 mov rax, QWORD PTR q$2[rbp] - 005e6 0f b7 8d 64 01 + 005ed 0f b7 8d 64 01 00 00 movzx ecx, WORD PTR val$3[rbp] - 005ed 66 89 08 mov WORD PTR [rax], cx - 005f0 eb c2 jmp SHORT $LN11@stbi__psd_ + 005f4 66 89 08 mov WORD PTR [rax], cx + 005f7 eb c2 jmp SHORT $LN11@stbi__psd_ $LN12@stbi__psd_: ; 5800 : } - 005f2 e9 8a 00 00 00 jmp $LN53@stbi__psd_ + 005f9 e9 8a 00 00 00 jmp $LN53@stbi__psd_ $LN52@stbi__psd_: ; 5801 : else { ; 5802 : stbi_uc* p = out + channel; - 005f7 48 63 45 64 movsxd rax, DWORD PTR channel$[rbp] - 005fb 48 8b 8d 08 01 + 005fe 48 63 45 64 movsxd rax, DWORD PTR channel$[rbp] + 00602 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR out$[rbp] - 00602 48 03 c8 add rcx, rax - 00605 48 8b c1 mov rax, rcx - 00608 48 89 85 88 01 + 00609 48 03 c8 add rcx, rax + 0060c 48 8b c1 mov rax, rcx + 0060f 48 89 85 88 01 00 00 mov QWORD PTR p$4[rbp], rax ; 5803 : stbi_uc val = channel == 3 ? 255 : 0; - 0060f 83 7d 64 03 cmp DWORD PTR channel$[rbp], 3 - 00613 75 0c jne SHORT $LN95@stbi__psd_ - 00615 c7 85 74 04 00 + 00616 83 7d 64 03 cmp DWORD PTR channel$[rbp], 3 + 0061a 75 0c jne SHORT $LN95@stbi__psd_ + 0061c c7 85 74 04 00 00 ff 00 00 00 mov DWORD PTR tv241[rbp], 255 ; 000000ffH - 0061f eb 0a jmp SHORT $LN96@stbi__psd_ + 00626 eb 0a jmp SHORT $LN96@stbi__psd_ $LN95@stbi__psd_: - 00621 c7 85 74 04 00 + 00628 c7 85 74 04 00 00 00 00 00 00 mov DWORD PTR tv241[rbp], 0 $LN96@stbi__psd_: - 0062b 0f b6 85 74 04 + 00632 0f b6 85 74 04 00 00 movzx eax, BYTE PTR tv241[rbp] - 00632 88 85 a4 01 00 + 00639 88 85 a4 01 00 00 mov BYTE PTR val$5[rbp], al ; 5804 : for (i = 0; i < pixelCount; i++, p += 4) - 00638 c7 85 84 00 00 + 0063f c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00642 eb 20 jmp SHORT $LN16@stbi__psd_ + 00649 eb 20 jmp SHORT $LN16@stbi__psd_ $LN14@stbi__psd_: - 00644 8b 85 84 00 00 + 0064b 8b 85 84 00 00 00 mov eax, DWORD PTR i$[rbp] - 0064a ff c0 inc eax - 0064c 89 85 84 00 00 + 00651 ff c0 inc eax + 00653 89 85 84 00 00 00 mov DWORD PTR i$[rbp], eax - 00652 48 8b 85 88 01 + 00659 48 8b 85 88 01 00 00 mov rax, QWORD PTR p$4[rbp] - 00659 48 83 c0 04 add rax, 4 - 0065d 48 89 85 88 01 + 00660 48 83 c0 04 add rax, 4 + 00664 48 89 85 88 01 00 00 mov QWORD PTR p$4[rbp], rax $LN16@stbi__psd_: - 00664 8b 45 04 mov eax, DWORD PTR pixelCount$[rbp] - 00667 39 85 84 00 00 + 0066b 8b 45 04 mov eax, DWORD PTR pixelCount$[rbp] + 0066e 39 85 84 00 00 00 cmp DWORD PTR i$[rbp], eax - 0066d 7d 12 jge SHORT $LN15@stbi__psd_ + 00674 7d 12 jge SHORT $LN15@stbi__psd_ ; 5805 : *p = val; - 0066f 48 8b 85 88 01 + 00676 48 8b 85 88 01 00 00 mov rax, QWORD PTR p$4[rbp] - 00676 0f b6 8d a4 01 + 0067d 0f b6 8d a4 01 00 00 movzx ecx, BYTE PTR val$5[rbp] - 0067d 88 08 mov BYTE PTR [rax], cl - 0067f eb c3 jmp SHORT $LN14@stbi__psd_ + 00684 88 08 mov BYTE PTR [rax], cl + 00686 eb c3 jmp SHORT $LN14@stbi__psd_ $LN15@stbi__psd_: $LN53@stbi__psd_: ; 5806 : } ; 5807 : } - 00681 e9 38 01 00 00 jmp $LN51@stbi__psd_ + 00688 e9 38 01 00 00 jmp $LN51@stbi__psd_ $LN50@stbi__psd_: ; 5808 : else { ; 5809 : if (ri->bits_per_channel == 16) { // output bpc - 00686 48 8b 85 c8 04 + 0068d 48 8b 85 c8 04 00 00 mov rax, QWORD PTR ri$[rbp] - 0068d 83 38 10 cmp DWORD PTR [rax], 16 - 00690 75 6a jne SHORT $LN54@stbi__psd_ + 00694 83 38 10 cmp DWORD PTR [rax], 16 + 00697 75 6a jne SHORT $LN54@stbi__psd_ ; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; - 00692 48 63 45 64 movsxd rax, DWORD PTR channel$[rbp] - 00696 48 8b 8d 08 01 + 00699 48 63 45 64 movsxd rax, DWORD PTR channel$[rbp] + 0069d 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR out$[rbp] - 0069d 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] - 006a1 48 89 85 c8 01 + 006a4 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] + 006a8 48 89 85 c8 01 00 00 mov QWORD PTR q$6[rbp], rax ; 5811 : for (i = 0; i < pixelCount; i++, q += 4) - 006a8 c7 85 84 00 00 + 006af c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 006b2 eb 20 jmp SHORT $LN19@stbi__psd_ + 006b9 eb 20 jmp SHORT $LN19@stbi__psd_ $LN17@stbi__psd_: - 006b4 8b 85 84 00 00 + 006bb 8b 85 84 00 00 00 mov eax, DWORD PTR i$[rbp] - 006ba ff c0 inc eax - 006bc 89 85 84 00 00 + 006c1 ff c0 inc eax + 006c3 89 85 84 00 00 00 mov DWORD PTR i$[rbp], eax - 006c2 48 8b 85 c8 01 + 006c9 48 8b 85 c8 01 00 00 mov rax, QWORD PTR q$6[rbp] - 006c9 48 83 c0 08 add rax, 8 - 006cd 48 89 85 c8 01 + 006d0 48 83 c0 08 add rax, 8 + 006d4 48 89 85 c8 01 00 00 mov QWORD PTR q$6[rbp], rax $LN19@stbi__psd_: - 006d4 8b 45 04 mov eax, DWORD PTR pixelCount$[rbp] - 006d7 39 85 84 00 00 + 006db 8b 45 04 mov eax, DWORD PTR pixelCount$[rbp] + 006de 39 85 84 00 00 00 cmp DWORD PTR i$[rbp], eax - 006dd 7d 18 jge SHORT $LN18@stbi__psd_ + 006e4 7d 18 jge SHORT $LN18@stbi__psd_ ; 5812 : *q = (stbi__uint16)stbi__get16be(s); - 006df 48 8b 8d a0 04 + 006e6 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 006e6 e8 00 00 00 00 call stbi__get16be - 006eb 48 8b 8d c8 01 + 006ed e8 00 00 00 00 call stbi__get16be + 006f2 48 8b 8d c8 01 00 00 mov rcx, QWORD PTR q$6[rbp] - 006f2 66 89 01 mov WORD PTR [rcx], ax - 006f5 eb bd jmp SHORT $LN17@stbi__psd_ + 006f9 66 89 01 mov WORD PTR [rcx], ax + 006fc eb bd jmp SHORT $LN17@stbi__psd_ $LN18@stbi__psd_: ; 5813 : } - 006f7 e9 c2 00 00 00 jmp $LN55@stbi__psd_ + 006fe e9 c2 00 00 00 jmp $LN55@stbi__psd_ $LN54@stbi__psd_: ; 5814 : else { ; 5815 : stbi_uc* p = out + channel; - 006fc 48 63 45 64 movsxd rax, DWORD PTR channel$[rbp] - 00700 48 8b 8d 08 01 + 00703 48 63 45 64 movsxd rax, DWORD PTR channel$[rbp] + 00707 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR out$[rbp] - 00707 48 03 c8 add rcx, rax - 0070a 48 8b c1 mov rax, rcx - 0070d 48 89 85 e8 01 + 0070e 48 03 c8 add rcx, rax + 00711 48 8b c1 mov rax, rcx + 00714 48 89 85 e8 01 00 00 mov QWORD PTR p$7[rbp], rax ; 5816 : if (bitdepth == 16) { // input bpc - 00714 83 bd a4 00 00 + 0071b 83 bd a4 00 00 00 10 cmp DWORD PTR bitdepth$[rbp], 16 - 0071b 75 53 jne SHORT $LN56@stbi__psd_ + 00722 75 53 jne SHORT $LN56@stbi__psd_ ; 5817 : for (i = 0; i < pixelCount; i++, p += 4) - 0071d c7 85 84 00 00 + 00724 c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00727 eb 20 jmp SHORT $LN22@stbi__psd_ + 0072e eb 20 jmp SHORT $LN22@stbi__psd_ $LN20@stbi__psd_: - 00729 8b 85 84 00 00 + 00730 8b 85 84 00 00 00 mov eax, DWORD PTR i$[rbp] - 0072f ff c0 inc eax - 00731 89 85 84 00 00 + 00736 ff c0 inc eax + 00738 89 85 84 00 00 00 mov DWORD PTR i$[rbp], eax - 00737 48 8b 85 e8 01 + 0073e 48 8b 85 e8 01 00 00 mov rax, QWORD PTR p$7[rbp] - 0073e 48 83 c0 04 add rax, 4 - 00742 48 89 85 e8 01 + 00745 48 83 c0 04 add rax, 4 + 00749 48 89 85 e8 01 00 00 mov QWORD PTR p$7[rbp], rax $LN22@stbi__psd_: - 00749 8b 45 04 mov eax, DWORD PTR pixelCount$[rbp] - 0074c 39 85 84 00 00 + 00750 8b 45 04 mov eax, DWORD PTR pixelCount$[rbp] + 00753 39 85 84 00 00 00 cmp DWORD PTR i$[rbp], eax - 00752 7d 1a jge SHORT $LN21@stbi__psd_ + 00759 7d 1a jge SHORT $LN21@stbi__psd_ ; 5818 : *p = (stbi_uc)(stbi__get16be(s) >> 8); - 00754 48 8b 8d a0 04 + 0075b 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 0075b e8 00 00 00 00 call stbi__get16be - 00760 c1 f8 08 sar eax, 8 - 00763 48 8b 8d e8 01 + 00762 e8 00 00 00 00 call stbi__get16be + 00767 c1 f8 08 sar eax, 8 + 0076a 48 8b 8d e8 01 00 00 mov rcx, QWORD PTR p$7[rbp] - 0076a 88 01 mov BYTE PTR [rcx], al - 0076c eb bb jmp SHORT $LN20@stbi__psd_ + 00771 88 01 mov BYTE PTR [rcx], al + 00773 eb bb jmp SHORT $LN20@stbi__psd_ $LN21@stbi__psd_: ; 5819 : } - 0076e eb 4e jmp SHORT $LN57@stbi__psd_ + 00775 eb 4e jmp SHORT $LN57@stbi__psd_ $LN56@stbi__psd_: ; 5820 : else { ; 5821 : for (i = 0; i < pixelCount; i++, p += 4) - 00770 c7 85 84 00 00 + 00777 c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0077a eb 20 jmp SHORT $LN25@stbi__psd_ + 00781 eb 20 jmp SHORT $LN25@stbi__psd_ $LN23@stbi__psd_: - 0077c 8b 85 84 00 00 + 00783 8b 85 84 00 00 00 mov eax, DWORD PTR i$[rbp] - 00782 ff c0 inc eax - 00784 89 85 84 00 00 + 00789 ff c0 inc eax + 0078b 89 85 84 00 00 00 mov DWORD PTR i$[rbp], eax - 0078a 48 8b 85 e8 01 + 00791 48 8b 85 e8 01 00 00 mov rax, QWORD PTR p$7[rbp] - 00791 48 83 c0 04 add rax, 4 - 00795 48 89 85 e8 01 + 00798 48 83 c0 04 add rax, 4 + 0079c 48 89 85 e8 01 00 00 mov QWORD PTR p$7[rbp], rax $LN25@stbi__psd_: - 0079c 8b 45 04 mov eax, DWORD PTR pixelCount$[rbp] - 0079f 39 85 84 00 00 + 007a3 8b 45 04 mov eax, DWORD PTR pixelCount$[rbp] + 007a6 39 85 84 00 00 00 cmp DWORD PTR i$[rbp], eax - 007a5 7d 17 jge SHORT $LN24@stbi__psd_ + 007ac 7d 17 jge SHORT $LN24@stbi__psd_ ; 5822 : *p = stbi__get8(s); - 007a7 48 8b 8d a0 04 + 007ae 48 8b 8d a0 04 00 00 mov rcx, QWORD PTR s$[rbp] - 007ae e8 00 00 00 00 call stbi__get8 - 007b3 48 8b 8d e8 01 + 007b5 e8 00 00 00 00 call stbi__get8 + 007ba 48 8b 8d e8 01 00 00 mov rcx, QWORD PTR p$7[rbp] - 007ba 88 01 mov BYTE PTR [rcx], al - 007bc eb be jmp SHORT $LN23@stbi__psd_ + 007c1 88 01 mov BYTE PTR [rcx], al + 007c3 eb be jmp SHORT $LN23@stbi__psd_ $LN24@stbi__psd_: $LN57@stbi__psd_: $LN55@stbi__psd_: @@ -49818,7 +50187,7 @@ $LN51@stbi__psd_: ; 5825 : } ; 5826 : } - 007be e9 6d fd ff ff jmp $LN8@stbi__psd_ + 007c5 e9 6d fd ff ff jmp $LN8@stbi__psd_ $LN9@stbi__psd_: $LN46@stbi__psd_: @@ -49827,325 +50196,325 @@ $LN46@stbi__psd_: ; 5829 : // remove weird white matte from PSD ; 5830 : if (channelCount >= 4) { - 007c3 83 7d 24 04 cmp DWORD PTR channelCount$[rbp], 4 - 007c7 0f 8c 82 03 00 + 007ca 83 7d 24 04 cmp DWORD PTR channelCount$[rbp], 4 + 007ce 0f 8c 82 03 00 00 jl $LN58@stbi__psd_ ; 5831 : if (ri->bits_per_channel == 16) { - 007cd 48 8b 85 c8 04 + 007d4 48 8b 85 c8 04 00 00 mov rax, QWORD PTR ri$[rbp] - 007d4 83 38 10 cmp DWORD PTR [rax], 16 - 007d7 0f 85 bc 01 00 + 007db 83 38 10 cmp DWORD PTR [rax], 16 + 007de 0f 85 bc 01 00 00 jne $LN59@stbi__psd_ ; 5832 : for (i = 0; i < w * h; ++i) { - 007dd c7 85 84 00 00 + 007e4 c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 007e7 eb 0e jmp SHORT $LN28@stbi__psd_ + 007ee eb 0e jmp SHORT $LN28@stbi__psd_ $LN26@stbi__psd_: - 007e9 8b 85 84 00 00 + 007f0 8b 85 84 00 00 00 mov eax, DWORD PTR i$[rbp] - 007ef ff c0 inc eax - 007f1 89 85 84 00 00 + 007f6 ff c0 inc eax + 007f8 89 85 84 00 00 00 mov DWORD PTR i$[rbp], eax $LN28@stbi__psd_: - 007f7 8b 85 c4 00 00 + 007fe 8b 85 c4 00 00 00 mov eax, DWORD PTR w$[rbp] - 007fd 0f af 85 e4 00 + 00804 0f af 85 e4 00 00 00 imul eax, DWORD PTR h$[rbp] - 00804 39 85 84 00 00 + 0080b 39 85 84 00 00 00 cmp DWORD PTR i$[rbp], eax - 0080a 0f 8d 84 01 00 + 00811 0f 8d 84 01 00 00 jge $LN27@stbi__psd_ ; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; - 00810 8b 85 84 00 00 + 00817 8b 85 84 00 00 00 mov eax, DWORD PTR i$[rbp] - 00816 c1 e0 02 shl eax, 2 - 00819 48 98 cdqe - 0081b 48 8b 8d 08 01 + 0081d c1 e0 02 shl eax, 2 + 00820 48 98 cdqe + 00822 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR out$[rbp] - 00822 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] - 00826 48 89 85 08 02 + 00829 48 8d 04 41 lea rax, QWORD PTR [rcx+rax*2] + 0082d 48 89 85 08 02 00 00 mov QWORD PTR pixel$8[rbp], rax ; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { - 0082d b8 02 00 00 00 mov eax, 2 - 00832 48 6b c0 03 imul rax, rax, 3 - 00836 48 8b 8d 08 02 + 00834 b8 02 00 00 00 mov eax, 2 + 00839 48 6b c0 03 imul rax, rax, 3 + 0083d 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR pixel$8[rbp] - 0083d 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 00841 85 c0 test eax, eax - 00843 0f 84 46 01 00 + 00844 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 00848 85 c0 test eax, eax + 0084a 0f 84 46 01 00 00 je $LN61@stbi__psd_ - 00849 b8 02 00 00 00 mov eax, 2 - 0084e 48 6b c0 03 imul rax, rax, 3 - 00852 48 8b 8d 08 02 + 00850 b8 02 00 00 00 mov eax, 2 + 00855 48 6b c0 03 imul rax, rax, 3 + 00859 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR pixel$8[rbp] - 00859 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 0085d 3d ff ff 00 00 cmp eax, 65535 ; 0000ffffH - 00862 0f 84 27 01 00 + 00860 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 00864 3d ff ff 00 00 cmp eax, 65535 ; 0000ffffH + 00869 0f 84 27 01 00 00 je $LN61@stbi__psd_ ; 5835 : float a = pixel[3] / 65535.0f; - 00868 b8 02 00 00 00 mov eax, 2 - 0086d 48 6b c0 03 imul rax, rax, 3 - 00871 48 8b 8d 08 02 + 0086f b8 02 00 00 00 mov eax, 2 + 00874 48 6b c0 03 imul rax, rax, 3 + 00878 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR pixel$8[rbp] - 00878 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 0087c f3 0f 2a c0 cvtsi2ss xmm0, eax - 00880 f3 0f 5e 05 00 + 0087f 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 00883 f3 0f 2a c0 cvtsi2ss xmm0, eax + 00887 f3 0f 5e 05 00 00 00 00 divss xmm0, DWORD PTR __real@477fff00 - 00888 f3 0f 11 85 24 + 0088f f3 0f 11 85 24 02 00 00 movss DWORD PTR a$9[rbp], xmm0 ; 5836 : float ra = 1.0f / a; - 00890 f3 0f 10 05 00 + 00897 f3 0f 10 05 00 00 00 00 movss xmm0, DWORD PTR __real@3f800000 - 00898 f3 0f 5e 85 24 + 0089f f3 0f 5e 85 24 02 00 00 divss xmm0, DWORD PTR a$9[rbp] - 008a0 f3 0f 11 85 44 + 008a7 f3 0f 11 85 44 02 00 00 movss DWORD PTR ra$10[rbp], xmm0 ; 5837 : float inv_a = 65535.0f * (1 - ra); - 008a8 f3 0f 10 05 00 + 008af f3 0f 10 05 00 00 00 00 movss xmm0, DWORD PTR __real@3f800000 - 008b0 f3 0f 5c 85 44 + 008b7 f3 0f 5c 85 44 02 00 00 subss xmm0, DWORD PTR ra$10[rbp] - 008b8 f3 0f 10 0d 00 + 008bf f3 0f 10 0d 00 00 00 00 movss xmm1, DWORD PTR __real@477fff00 - 008c0 f3 0f 59 c8 mulss xmm1, xmm0 - 008c4 0f 28 c1 movaps xmm0, xmm1 - 008c7 f3 0f 11 85 64 + 008c7 f3 0f 59 c8 mulss xmm1, xmm0 + 008cb 0f 28 c1 movaps xmm0, xmm1 + 008ce f3 0f 11 85 64 02 00 00 movss DWORD PTR inv_a$11[rbp], xmm0 ; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); - 008cf b8 02 00 00 00 mov eax, 2 - 008d4 48 6b c0 00 imul rax, rax, 0 - 008d8 48 8b 8d 08 02 + 008d6 b8 02 00 00 00 mov eax, 2 + 008db 48 6b c0 00 imul rax, rax, 0 + 008df 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR pixel$8[rbp] - 008df 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 008e3 f3 0f 2a c0 cvtsi2ss xmm0, eax - 008e7 f3 0f 59 85 44 + 008e6 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 008ea f3 0f 2a c0 cvtsi2ss xmm0, eax + 008ee f3 0f 59 85 44 02 00 00 mulss xmm0, DWORD PTR ra$10[rbp] - 008ef f3 0f 58 85 64 + 008f6 f3 0f 58 85 64 02 00 00 addss xmm0, DWORD PTR inv_a$11[rbp] - 008f7 f3 0f 2c c0 cvttss2si eax, xmm0 - 008fb b9 02 00 00 00 mov ecx, 2 - 00900 48 6b c9 00 imul rcx, rcx, 0 - 00904 48 8b 95 08 02 + 008fe f3 0f 2c c0 cvttss2si eax, xmm0 + 00902 b9 02 00 00 00 mov ecx, 2 + 00907 48 6b c9 00 imul rcx, rcx, 0 + 0090b 48 8b 95 08 02 00 00 mov rdx, QWORD PTR pixel$8[rbp] - 0090b 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00912 66 89 04 0a mov WORD PTR [rdx+rcx], ax ; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); - 0090f b8 02 00 00 00 mov eax, 2 - 00914 48 6b c0 01 imul rax, rax, 1 - 00918 48 8b 8d 08 02 + 00916 b8 02 00 00 00 mov eax, 2 + 0091b 48 6b c0 01 imul rax, rax, 1 + 0091f 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR pixel$8[rbp] - 0091f 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 00923 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00927 f3 0f 59 85 44 + 00926 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 0092a f3 0f 2a c0 cvtsi2ss xmm0, eax + 0092e f3 0f 59 85 44 02 00 00 mulss xmm0, DWORD PTR ra$10[rbp] - 0092f f3 0f 58 85 64 + 00936 f3 0f 58 85 64 02 00 00 addss xmm0, DWORD PTR inv_a$11[rbp] - 00937 f3 0f 2c c0 cvttss2si eax, xmm0 - 0093b b9 02 00 00 00 mov ecx, 2 - 00940 48 6b c9 01 imul rcx, rcx, 1 - 00944 48 8b 95 08 02 + 0093e f3 0f 2c c0 cvttss2si eax, xmm0 + 00942 b9 02 00 00 00 mov ecx, 2 + 00947 48 6b c9 01 imul rcx, rcx, 1 + 0094b 48 8b 95 08 02 00 00 mov rdx, QWORD PTR pixel$8[rbp] - 0094b 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00952 66 89 04 0a mov WORD PTR [rdx+rcx], ax ; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); - 0094f b8 02 00 00 00 mov eax, 2 - 00954 48 6b c0 02 imul rax, rax, 2 - 00958 48 8b 8d 08 02 + 00956 b8 02 00 00 00 mov eax, 2 + 0095b 48 6b c0 02 imul rax, rax, 2 + 0095f 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR pixel$8[rbp] - 0095f 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] - 00963 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00967 f3 0f 59 85 44 + 00966 0f b7 04 01 movzx eax, WORD PTR [rcx+rax] + 0096a f3 0f 2a c0 cvtsi2ss xmm0, eax + 0096e f3 0f 59 85 44 02 00 00 mulss xmm0, DWORD PTR ra$10[rbp] - 0096f f3 0f 58 85 64 + 00976 f3 0f 58 85 64 02 00 00 addss xmm0, DWORD PTR inv_a$11[rbp] - 00977 f3 0f 2c c0 cvttss2si eax, xmm0 - 0097b b9 02 00 00 00 mov ecx, 2 - 00980 48 6b c9 02 imul rcx, rcx, 2 - 00984 48 8b 95 08 02 + 0097e f3 0f 2c c0 cvttss2si eax, xmm0 + 00982 b9 02 00 00 00 mov ecx, 2 + 00987 48 6b c9 02 imul rcx, rcx, 2 + 0098b 48 8b 95 08 02 00 00 mov rdx, QWORD PTR pixel$8[rbp] - 0098b 66 89 04 0a mov WORD PTR [rdx+rcx], ax + 00992 66 89 04 0a mov WORD PTR [rdx+rcx], ax $LN61@stbi__psd_: ; 5841 : } ; 5842 : } - 0098f e9 55 fe ff ff jmp $LN26@stbi__psd_ + 00996 e9 55 fe ff ff jmp $LN26@stbi__psd_ $LN27@stbi__psd_: ; 5843 : } - 00994 e9 b6 01 00 00 jmp $LN60@stbi__psd_ + 0099b e9 b6 01 00 00 jmp $LN60@stbi__psd_ $LN59@stbi__psd_: ; 5844 : else { ; 5845 : for (i = 0; i < w * h; ++i) { - 00999 c7 85 84 00 00 + 009a0 c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 009a3 eb 0e jmp SHORT $LN31@stbi__psd_ + 009aa eb 0e jmp SHORT $LN31@stbi__psd_ $LN29@stbi__psd_: - 009a5 8b 85 84 00 00 + 009ac 8b 85 84 00 00 00 mov eax, DWORD PTR i$[rbp] - 009ab ff c0 inc eax - 009ad 89 85 84 00 00 + 009b2 ff c0 inc eax + 009b4 89 85 84 00 00 00 mov DWORD PTR i$[rbp], eax $LN31@stbi__psd_: - 009b3 8b 85 c4 00 00 + 009ba 8b 85 c4 00 00 00 mov eax, DWORD PTR w$[rbp] - 009b9 0f af 85 e4 00 + 009c0 0f af 85 e4 00 00 00 imul eax, DWORD PTR h$[rbp] - 009c0 39 85 84 00 00 + 009c7 39 85 84 00 00 00 cmp DWORD PTR i$[rbp], eax - 009c6 0f 8d 83 01 00 + 009cd 0f 8d 83 01 00 00 jge $LN30@stbi__psd_ ; 5846 : unsigned char* pixel = out + 4 * i; - 009cc 8b 85 84 00 00 + 009d3 8b 85 84 00 00 00 mov eax, DWORD PTR i$[rbp] - 009d2 c1 e0 02 shl eax, 2 - 009d5 48 98 cdqe - 009d7 48 8b 8d 08 01 + 009d9 c1 e0 02 shl eax, 2 + 009dc 48 98 cdqe + 009de 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR out$[rbp] - 009de 48 03 c8 add rcx, rax - 009e1 48 8b c1 mov rax, rcx - 009e4 48 89 85 88 02 + 009e5 48 03 c8 add rcx, rax + 009e8 48 8b c1 mov rax, rcx + 009eb 48 89 85 88 02 00 00 mov QWORD PTR pixel$12[rbp], rax ; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { - 009eb b8 01 00 00 00 mov eax, 1 - 009f0 48 6b c0 03 imul rax, rax, 3 - 009f4 48 8b 8d 88 02 + 009f2 b8 01 00 00 00 mov eax, 1 + 009f7 48 6b c0 03 imul rax, rax, 3 + 009fb 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR pixel$12[rbp] - 009fb 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 009ff 85 c0 test eax, eax - 00a01 0f 84 43 01 00 + 00a02 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00a06 85 c0 test eax, eax + 00a08 0f 84 43 01 00 00 je $LN62@stbi__psd_ - 00a07 b8 01 00 00 00 mov eax, 1 - 00a0c 48 6b c0 03 imul rax, rax, 3 - 00a10 48 8b 8d 88 02 + 00a0e b8 01 00 00 00 mov eax, 1 + 00a13 48 6b c0 03 imul rax, rax, 3 + 00a17 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR pixel$12[rbp] - 00a17 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00a1b 3d ff 00 00 00 cmp eax, 255 ; 000000ffH - 00a20 0f 84 24 01 00 + 00a1e 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00a22 3d ff 00 00 00 cmp eax, 255 ; 000000ffH + 00a27 0f 84 24 01 00 00 je $LN62@stbi__psd_ ; 5848 : float a = pixel[3] / 255.0f; - 00a26 b8 01 00 00 00 mov eax, 1 - 00a2b 48 6b c0 03 imul rax, rax, 3 - 00a2f 48 8b 8d 88 02 + 00a2d b8 01 00 00 00 mov eax, 1 + 00a32 48 6b c0 03 imul rax, rax, 3 + 00a36 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR pixel$12[rbp] - 00a36 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00a3a f3 0f 2a c0 cvtsi2ss xmm0, eax - 00a3e f3 0f 5e 05 00 + 00a3d 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00a41 f3 0f 2a c0 cvtsi2ss xmm0, eax + 00a45 f3 0f 5e 05 00 00 00 00 divss xmm0, DWORD PTR __real@437f0000 - 00a46 f3 0f 11 85 a4 + 00a4d f3 0f 11 85 a4 02 00 00 movss DWORD PTR a$13[rbp], xmm0 ; 5849 : float ra = 1.0f / a; - 00a4e f3 0f 10 05 00 + 00a55 f3 0f 10 05 00 00 00 00 movss xmm0, DWORD PTR __real@3f800000 - 00a56 f3 0f 5e 85 a4 + 00a5d f3 0f 5e 85 a4 02 00 00 divss xmm0, DWORD PTR a$13[rbp] - 00a5e f3 0f 11 85 c4 + 00a65 f3 0f 11 85 c4 02 00 00 movss DWORD PTR ra$14[rbp], xmm0 ; 5850 : float inv_a = 255.0f * (1 - ra); - 00a66 f3 0f 10 05 00 + 00a6d f3 0f 10 05 00 00 00 00 movss xmm0, DWORD PTR __real@3f800000 - 00a6e f3 0f 5c 85 c4 + 00a75 f3 0f 5c 85 c4 02 00 00 subss xmm0, DWORD PTR ra$14[rbp] - 00a76 f3 0f 10 0d 00 + 00a7d f3 0f 10 0d 00 00 00 00 movss xmm1, DWORD PTR __real@437f0000 - 00a7e f3 0f 59 c8 mulss xmm1, xmm0 - 00a82 0f 28 c1 movaps xmm0, xmm1 - 00a85 f3 0f 11 85 e4 + 00a85 f3 0f 59 c8 mulss xmm1, xmm0 + 00a89 0f 28 c1 movaps xmm0, xmm1 + 00a8c f3 0f 11 85 e4 02 00 00 movss DWORD PTR inv_a$15[rbp], xmm0 ; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); - 00a8d b8 01 00 00 00 mov eax, 1 - 00a92 48 6b c0 00 imul rax, rax, 0 - 00a96 48 8b 8d 88 02 + 00a94 b8 01 00 00 00 mov eax, 1 + 00a99 48 6b c0 00 imul rax, rax, 0 + 00a9d 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR pixel$12[rbp] - 00a9d 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00aa1 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00aa5 f3 0f 59 85 c4 + 00aa4 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00aa8 f3 0f 2a c0 cvtsi2ss xmm0, eax + 00aac f3 0f 59 85 c4 02 00 00 mulss xmm0, DWORD PTR ra$14[rbp] - 00aad f3 0f 58 85 e4 + 00ab4 f3 0f 58 85 e4 02 00 00 addss xmm0, DWORD PTR inv_a$15[rbp] - 00ab5 f3 0f 2c c0 cvttss2si eax, xmm0 - 00ab9 b9 01 00 00 00 mov ecx, 1 - 00abe 48 6b c9 00 imul rcx, rcx, 0 - 00ac2 48 8b 95 88 02 + 00abc f3 0f 2c c0 cvttss2si eax, xmm0 + 00ac0 b9 01 00 00 00 mov ecx, 1 + 00ac5 48 6b c9 00 imul rcx, rcx, 0 + 00ac9 48 8b 95 88 02 00 00 mov rdx, QWORD PTR pixel$12[rbp] - 00ac9 88 04 0a mov BYTE PTR [rdx+rcx], al + 00ad0 88 04 0a mov BYTE PTR [rdx+rcx], al ; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); - 00acc b8 01 00 00 00 mov eax, 1 - 00ad1 48 6b c0 01 imul rax, rax, 1 - 00ad5 48 8b 8d 88 02 + 00ad3 b8 01 00 00 00 mov eax, 1 + 00ad8 48 6b c0 01 imul rax, rax, 1 + 00adc 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR pixel$12[rbp] - 00adc 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00ae0 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00ae4 f3 0f 59 85 c4 + 00ae3 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00ae7 f3 0f 2a c0 cvtsi2ss xmm0, eax + 00aeb f3 0f 59 85 c4 02 00 00 mulss xmm0, DWORD PTR ra$14[rbp] - 00aec f3 0f 58 85 e4 + 00af3 f3 0f 58 85 e4 02 00 00 addss xmm0, DWORD PTR inv_a$15[rbp] - 00af4 f3 0f 2c c0 cvttss2si eax, xmm0 - 00af8 b9 01 00 00 00 mov ecx, 1 - 00afd 48 6b c9 01 imul rcx, rcx, 1 - 00b01 48 8b 95 88 02 + 00afb f3 0f 2c c0 cvttss2si eax, xmm0 + 00aff b9 01 00 00 00 mov ecx, 1 + 00b04 48 6b c9 01 imul rcx, rcx, 1 + 00b08 48 8b 95 88 02 00 00 mov rdx, QWORD PTR pixel$12[rbp] - 00b08 88 04 0a mov BYTE PTR [rdx+rcx], al + 00b0f 88 04 0a mov BYTE PTR [rdx+rcx], al ; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); - 00b0b b8 01 00 00 00 mov eax, 1 - 00b10 48 6b c0 02 imul rax, rax, 2 - 00b14 48 8b 8d 88 02 + 00b12 b8 01 00 00 00 mov eax, 1 + 00b17 48 6b c0 02 imul rax, rax, 2 + 00b1b 48 8b 8d 88 02 00 00 mov rcx, QWORD PTR pixel$12[rbp] - 00b1b 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00b1f f3 0f 2a c0 cvtsi2ss xmm0, eax - 00b23 f3 0f 59 85 c4 + 00b22 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00b26 f3 0f 2a c0 cvtsi2ss xmm0, eax + 00b2a f3 0f 59 85 c4 02 00 00 mulss xmm0, DWORD PTR ra$14[rbp] - 00b2b f3 0f 58 85 e4 + 00b32 f3 0f 58 85 e4 02 00 00 addss xmm0, DWORD PTR inv_a$15[rbp] - 00b33 f3 0f 2c c0 cvttss2si eax, xmm0 - 00b37 b9 01 00 00 00 mov ecx, 1 - 00b3c 48 6b c9 02 imul rcx, rcx, 2 - 00b40 48 8b 95 88 02 + 00b3a f3 0f 2c c0 cvttss2si eax, xmm0 + 00b3e b9 01 00 00 00 mov ecx, 1 + 00b43 48 6b c9 02 imul rcx, rcx, 2 + 00b47 48 8b 95 88 02 00 00 mov rdx, QWORD PTR pixel$12[rbp] - 00b47 88 04 0a mov BYTE PTR [rdx+rcx], al + 00b4e 88 04 0a mov BYTE PTR [rdx+rcx], al $LN62@stbi__psd_: ; 5854 : } ; 5855 : } - 00b4a e9 56 fe ff ff jmp $LN29@stbi__psd_ + 00b51 e9 56 fe ff ff jmp $LN29@stbi__psd_ $LN30@stbi__psd_: $LN60@stbi__psd_: $LN58@stbi__psd_: @@ -50156,66 +50525,66 @@ $LN58@stbi__psd_: ; 5859 : // convert to desired output format ; 5860 : if (req_comp && req_comp != 4) { - 00b4f 83 bd c0 04 00 + 00b56 83 bd c0 04 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 00b56 0f 84 8e 00 00 + 00b5d 0f 84 8e 00 00 00 je $LN63@stbi__psd_ - 00b5c 83 bd c0 04 00 + 00b63 83 bd c0 04 00 00 04 cmp DWORD PTR req_comp$[rbp], 4 - 00b63 0f 84 81 00 00 + 00b6a 0f 84 81 00 00 00 je $LN63@stbi__psd_ ; 5861 : if (ri->bits_per_channel == 16) - 00b69 48 8b 85 c8 04 + 00b70 48 8b 85 c8 04 00 00 mov rax, QWORD PTR ri$[rbp] - 00b70 83 38 10 cmp DWORD PTR [rax], 16 - 00b73 75 32 jne SHORT $LN64@stbi__psd_ + 00b77 83 38 10 cmp DWORD PTR [rax], 16 + 00b7a 75 32 jne SHORT $LN64@stbi__psd_ ; 5862 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h); - 00b75 8b 85 e4 00 00 + 00b7c 8b 85 e4 00 00 00 mov eax, DWORD PTR h$[rbp] - 00b7b 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00b7f 44 8b 8d c4 00 + 00b82 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00b86 44 8b 8d c4 00 00 00 mov r9d, DWORD PTR w$[rbp] - 00b86 44 8b 85 c0 04 + 00b8d 44 8b 85 c0 04 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 00b8d ba 04 00 00 00 mov edx, 4 - 00b92 48 8b 8d 08 01 + 00b94 ba 04 00 00 00 mov edx, 4 + 00b99 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR out$[rbp] - 00b99 e8 00 00 00 00 call stbi__convert_format16 - 00b9e 48 89 85 08 01 + 00ba0 e8 00 00 00 00 call stbi__convert_format16 + 00ba5 48 89 85 08 01 00 00 mov QWORD PTR out$[rbp], rax - 00ba5 eb 30 jmp SHORT $LN65@stbi__psd_ + 00bac eb 30 jmp SHORT $LN65@stbi__psd_ $LN64@stbi__psd_: ; 5863 : else ; 5864 : out = stbi__convert_format(out, 4, req_comp, w, h); - 00ba7 8b 85 e4 00 00 + 00bae 8b 85 e4 00 00 00 mov eax, DWORD PTR h$[rbp] - 00bad 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00bb1 44 8b 8d c4 00 + 00bb4 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00bb8 44 8b 8d c4 00 00 00 mov r9d, DWORD PTR w$[rbp] - 00bb8 44 8b 85 c0 04 + 00bbf 44 8b 85 c0 04 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 00bbf ba 04 00 00 00 mov edx, 4 - 00bc4 48 8b 8d 08 01 + 00bc6 ba 04 00 00 00 mov edx, 4 + 00bcb 48 8b 8d 08 01 00 00 mov rcx, QWORD PTR out$[rbp] - 00bcb e8 00 00 00 00 call stbi__convert_format - 00bd0 48 89 85 08 01 + 00bd2 e8 00 00 00 00 call stbi__convert_format + 00bd7 48 89 85 08 01 00 00 mov QWORD PTR out$[rbp], rax $LN65@stbi__psd_: ; 5865 : if (out == NULL) return out; // stbi__convert_format frees input on failure - 00bd7 48 83 bd 08 01 + 00bde 48 83 bd 08 01 00 00 00 cmp QWORD PTR out$[rbp], 0 - 00bdf 75 09 jne SHORT $LN66@stbi__psd_ - 00be1 48 8b 85 08 01 + 00be6 75 09 jne SHORT $LN66@stbi__psd_ + 00be8 48 8b 85 08 01 00 00 mov rax, QWORD PTR out$[rbp] - 00be8 eb 3c jmp SHORT $LN1@stbi__psd_ + 00bef eb 3c jmp SHORT $LN1@stbi__psd_ $LN66@stbi__psd_: $LN63@stbi__psd_: @@ -50223,45 +50592,45 @@ $LN63@stbi__psd_: ; 5867 : ; 5868 : if (comp) *comp = 4; - 00bea 48 83 bd b8 04 + 00bf1 48 83 bd b8 04 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 00bf2 74 0d je SHORT $LN67@stbi__psd_ - 00bf4 48 8b 85 b8 04 + 00bf9 74 0d je SHORT $LN67@stbi__psd_ + 00bfb 48 8b 85 b8 04 00 00 mov rax, QWORD PTR comp$[rbp] - 00bfb c7 00 04 00 00 + 00c02 c7 00 04 00 00 00 mov DWORD PTR [rax], 4 $LN67@stbi__psd_: ; 5869 : *y = h; - 00c01 48 8b 85 b0 04 + 00c08 48 8b 85 b0 04 00 00 mov rax, QWORD PTR y$[rbp] - 00c08 8b 8d e4 00 00 + 00c0f 8b 8d e4 00 00 00 mov ecx, DWORD PTR h$[rbp] - 00c0e 89 08 mov DWORD PTR [rax], ecx + 00c15 89 08 mov DWORD PTR [rax], ecx ; 5870 : *x = w; - 00c10 48 8b 85 a8 04 + 00c17 48 8b 85 a8 04 00 00 mov rax, QWORD PTR x$[rbp] - 00c17 8b 8d c4 00 00 + 00c1e 8b 8d c4 00 00 00 mov ecx, DWORD PTR w$[rbp] - 00c1d 89 08 mov DWORD PTR [rax], ecx + 00c24 89 08 mov DWORD PTR [rax], ecx ; 5871 : ; 5872 : return out; - 00c1f 48 8b 85 08 01 + 00c26 48 8b 85 08 01 00 00 mov rax, QWORD PTR out$[rbp] $LN1@stbi__psd_: ; 5873 : } - 00c26 48 8d a5 88 04 + 00c2d 48 8d a5 88 04 00 00 lea rsp, QWORD PTR [rbp+1160] - 00c2d 5f pop rdi - 00c2e 5d pop rbp - 00c2f c3 ret 0 + 00c34 5f pop rdi + 00c35 5d pop rbp + 00c36 c3 ret 0 stbi__psd_load ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -50284,42 +50653,44 @@ stbi__psd_test PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 5622 : int r = (stbi__get32be(s) == 0x38425053); - 0001f 48 8b 8d 00 01 + 00020 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__get32be - 0002b 3d 53 50 42 38 cmp eax, 943870035 ; 38425053H - 00030 75 0c jne SHORT $LN3@stbi__psd_ - 00032 c7 85 d4 00 00 + 00027 e8 00 00 00 00 call stbi__get32be + 0002c 3d 53 50 42 38 cmp eax, 943870035 ; 38425053H + 00031 75 0c jne SHORT $LN3@stbi__psd_ + 00033 c7 85 d4 00 00 00 01 00 00 00 mov DWORD PTR tv67[rbp], 1 - 0003c eb 0a jmp SHORT $LN4@stbi__psd_ + 0003d eb 0a jmp SHORT $LN4@stbi__psd_ $LN3@stbi__psd_: - 0003e c7 85 d4 00 00 + 0003f c7 85 d4 00 00 00 00 00 00 00 mov DWORD PTR tv67[rbp], 0 $LN4@stbi__psd_: - 00048 8b 85 d4 00 00 + 00049 8b 85 d4 00 00 00 mov eax, DWORD PTR tv67[rbp] - 0004e 89 45 04 mov DWORD PTR r$[rbp], eax + 0004f 89 45 04 mov DWORD PTR r$[rbp], eax ; 5623 : stbi__rewind(s); - 00051 48 8b 8d 00 01 + 00052 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00058 e8 00 00 00 00 call stbi__rewind + 00059 e8 00 00 00 00 call stbi__rewind + 0005e 90 npad 1 ; 5624 : return r; - 0005d 8b 45 04 mov eax, DWORD PTR r$[rbp] + 0005f 8b 45 04 mov eax, DWORD PTR r$[rbp] ; 5625 : } - 00060 48 8d a5 e8 00 + 00062 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00067 5f pop rdi - 00068 5d pop rbp - 00069 c3 ret 0 + 00069 5f pop rdi + 0006a 5d pop rbp + 0006b c3 ret 0 stbi__psd_test ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -50355,379 +50726,393 @@ stbi__tga_info PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 5287 : int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; ; 5288 : int sz, tga_colormap_type; ; 5289 : stbi__get8(s); // discard Offset - 0002e 48 8b 8d e0 01 + 0002f 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00035 e8 00 00 00 00 call stbi__get8 + 00036 e8 00 00 00 00 call stbi__get8 + 0003b 90 npad 1 ; 5290 : tga_colormap_type = stbi__get8(s); // colormap type - 0003a 48 8b 8d e0 01 + 0003c 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00041 e8 00 00 00 00 call stbi__get8 - 00046 0f b6 c0 movzx eax, al - 00049 89 85 e4 00 00 + 00043 e8 00 00 00 00 call stbi__get8 + 00048 0f b6 c0 movzx eax, al + 0004b 89 85 e4 00 00 00 mov DWORD PTR tga_colormap_type$[rbp], eax ; 5291 : if (tga_colormap_type > 1) { - 0004f 83 bd e4 00 00 + 00051 83 bd e4 00 00 00 01 cmp DWORD PTR tga_colormap_type$[rbp], 1 - 00056 7e 13 jle SHORT $LN2@stbi__tga_ + 00058 7e 14 jle SHORT $LN2@stbi__tga_ ; 5292 : stbi__rewind(s); - 00058 48 8b 8d e0 01 + 0005a 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0005f e8 00 00 00 00 call stbi__rewind + 00061 e8 00 00 00 00 call stbi__rewind + 00066 90 npad 1 ; 5293 : return 0; // only RGB or indexed allowed - 00064 33 c0 xor eax, eax - 00066 e9 53 02 00 00 jmp $LN1@stbi__tga_ + 00067 33 c0 xor eax, eax + 00069 e9 5e 02 00 00 jmp $LN1@stbi__tga_ $LN2@stbi__tga_: ; 5294 : } ; 5295 : tga_image_type = stbi__get8(s); // image type - 0006b 48 8b 8d e0 01 + 0006e 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00072 e8 00 00 00 00 call stbi__get8 - 00077 0f b6 c0 movzx eax, al - 0007a 89 45 64 mov DWORD PTR tga_image_type$[rbp], eax + 00075 e8 00 00 00 00 call stbi__get8 + 0007a 0f b6 c0 movzx eax, al + 0007d 89 45 64 mov DWORD PTR tga_image_type$[rbp], eax ; 5296 : if (tga_colormap_type == 1) { // colormapped (paletted) image - 0007d 83 bd e4 00 00 + 00080 83 bd e4 00 00 00 01 cmp DWORD PTR tga_colormap_type$[rbp], 1 - 00084 0f 85 a4 00 00 + 00087 0f 85 a8 00 00 00 jne $LN3@stbi__tga_ ; 5297 : if (tga_image_type != 1 && tga_image_type != 9) { - 0008a 83 7d 64 01 cmp DWORD PTR tga_image_type$[rbp], 1 - 0008e 74 19 je SHORT $LN5@stbi__tga_ - 00090 83 7d 64 09 cmp DWORD PTR tga_image_type$[rbp], 9 - 00094 74 13 je SHORT $LN5@stbi__tga_ + 0008d 83 7d 64 01 cmp DWORD PTR tga_image_type$[rbp], 1 + 00091 74 1a je SHORT $LN5@stbi__tga_ + 00093 83 7d 64 09 cmp DWORD PTR tga_image_type$[rbp], 9 + 00097 74 14 je SHORT $LN5@stbi__tga_ ; 5298 : stbi__rewind(s); - 00096 48 8b 8d e0 01 + 00099 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0009d e8 00 00 00 00 call stbi__rewind + 000a0 e8 00 00 00 00 call stbi__rewind + 000a5 90 npad 1 ; 5299 : return 0; - 000a2 33 c0 xor eax, eax - 000a4 e9 15 02 00 00 jmp $LN1@stbi__tga_ + 000a6 33 c0 xor eax, eax + 000a8 e9 1f 02 00 00 jmp $LN1@stbi__tga_ $LN5@stbi__tga_: ; 5300 : } ; 5301 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries - 000a9 ba 04 00 00 00 mov edx, 4 - 000ae 48 8b 8d e0 01 + 000ad ba 04 00 00 00 mov edx, 4 + 000b2 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000b5 e8 00 00 00 00 call stbi__skip + 000b9 e8 00 00 00 00 call stbi__skip + 000be 90 npad 1 ; 5302 : sz = stbi__get8(s); // check bits per palette color entry - 000ba 48 8b 8d e0 01 + 000bf 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000c1 e8 00 00 00 00 call stbi__get8 - 000c6 0f b6 c0 movzx eax, al - 000c9 89 85 c4 00 00 + 000c6 e8 00 00 00 00 call stbi__get8 + 000cb 0f b6 c0 movzx eax, al + 000ce 89 85 c4 00 00 00 mov DWORD PTR sz$[rbp], eax ; 5303 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) { - 000cf 83 bd c4 00 00 + 000d4 83 bd c4 00 00 00 08 cmp DWORD PTR sz$[rbp], 8 - 000d6 74 37 je SHORT $LN6@stbi__tga_ - 000d8 83 bd c4 00 00 + 000db 74 38 je SHORT $LN6@stbi__tga_ + 000dd 83 bd c4 00 00 00 0f cmp DWORD PTR sz$[rbp], 15 - 000df 74 2e je SHORT $LN6@stbi__tga_ - 000e1 83 bd c4 00 00 + 000e4 74 2f je SHORT $LN6@stbi__tga_ + 000e6 83 bd c4 00 00 00 10 cmp DWORD PTR sz$[rbp], 16 - 000e8 74 25 je SHORT $LN6@stbi__tga_ - 000ea 83 bd c4 00 00 + 000ed 74 26 je SHORT $LN6@stbi__tga_ + 000ef 83 bd c4 00 00 00 18 cmp DWORD PTR sz$[rbp], 24 - 000f1 74 1c je SHORT $LN6@stbi__tga_ - 000f3 83 bd c4 00 00 + 000f6 74 1d je SHORT $LN6@stbi__tga_ + 000f8 83 bd c4 00 00 00 20 cmp DWORD PTR sz$[rbp], 32 ; 00000020H - 000fa 74 13 je SHORT $LN6@stbi__tga_ + 000ff 74 14 je SHORT $LN6@stbi__tga_ ; 5304 : stbi__rewind(s); - 000fc 48 8b 8d e0 01 + 00101 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00103 e8 00 00 00 00 call stbi__rewind + 00108 e8 00 00 00 00 call stbi__rewind + 0010d 90 npad 1 ; 5305 : return 0; - 00108 33 c0 xor eax, eax - 0010a e9 af 01 00 00 jmp $LN1@stbi__tga_ + 0010e 33 c0 xor eax, eax + 00110 e9 b7 01 00 00 jmp $LN1@stbi__tga_ $LN6@stbi__tga_: ; 5306 : } ; 5307 : stbi__skip(s, 4); // skip image x and y origin - 0010f ba 04 00 00 00 mov edx, 4 - 00114 48 8b 8d e0 01 + 00115 ba 04 00 00 00 mov edx, 4 + 0011a 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0011b e8 00 00 00 00 call stbi__skip + 00121 e8 00 00 00 00 call stbi__skip + 00126 90 npad 1 ; 5308 : tga_colormap_bpp = sz; - 00120 8b 85 c4 00 00 + 00127 8b 85 c4 00 00 00 mov eax, DWORD PTR sz$[rbp] - 00126 89 85 a4 00 00 + 0012d 89 85 a4 00 00 00 mov DWORD PTR tga_colormap_bpp$[rbp], eax ; 5309 : } - 0012c eb 46 jmp SHORT $LN4@stbi__tga_ + 00133 eb 48 jmp SHORT $LN4@stbi__tga_ $LN3@stbi__tga_: ; 5310 : else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE ; 5311 : if ((tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11)) { - 0012e 83 7d 64 02 cmp DWORD PTR tga_image_type$[rbp], 2 - 00132 74 25 je SHORT $LN7@stbi__tga_ - 00134 83 7d 64 03 cmp DWORD PTR tga_image_type$[rbp], 3 - 00138 74 1f je SHORT $LN7@stbi__tga_ - 0013a 83 7d 64 0a cmp DWORD PTR tga_image_type$[rbp], 10 - 0013e 74 19 je SHORT $LN7@stbi__tga_ - 00140 83 7d 64 0b cmp DWORD PTR tga_image_type$[rbp], 11 - 00144 74 13 je SHORT $LN7@stbi__tga_ + 00135 83 7d 64 02 cmp DWORD PTR tga_image_type$[rbp], 2 + 00139 74 26 je SHORT $LN7@stbi__tga_ + 0013b 83 7d 64 03 cmp DWORD PTR tga_image_type$[rbp], 3 + 0013f 74 20 je SHORT $LN7@stbi__tga_ + 00141 83 7d 64 0a cmp DWORD PTR tga_image_type$[rbp], 10 + 00145 74 1a je SHORT $LN7@stbi__tga_ + 00147 83 7d 64 0b cmp DWORD PTR tga_image_type$[rbp], 11 + 0014b 74 14 je SHORT $LN7@stbi__tga_ ; 5312 : stbi__rewind(s); - 00146 48 8b 8d e0 01 + 0014d 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0014d e8 00 00 00 00 call stbi__rewind + 00154 e8 00 00 00 00 call stbi__rewind + 00159 90 npad 1 ; 5313 : return 0; // only RGB or grey allowed, +/- RLE - 00152 33 c0 xor eax, eax - 00154 e9 65 01 00 00 jmp $LN1@stbi__tga_ + 0015a 33 c0 xor eax, eax + 0015c e9 6b 01 00 00 jmp $LN1@stbi__tga_ $LN7@stbi__tga_: ; 5314 : } ; 5315 : stbi__skip(s, 9); // skip colormap specification and image x/y origin - 00159 ba 09 00 00 00 mov edx, 9 - 0015e 48 8b 8d e0 01 + 00161 ba 09 00 00 00 mov edx, 9 + 00166 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00165 e8 00 00 00 00 call stbi__skip + 0016d e8 00 00 00 00 call stbi__skip + 00172 90 npad 1 ; 5316 : tga_colormap_bpp = 0; - 0016a c7 85 a4 00 00 + 00173 c7 85 a4 00 00 00 00 00 00 00 mov DWORD PTR tga_colormap_bpp$[rbp], 0 $LN4@stbi__tga_: ; 5317 : } ; 5318 : tga_w = stbi__get16le(s); - 00174 48 8b 8d e0 01 + 0017d 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0017b e8 00 00 00 00 call stbi__get16le - 00180 89 45 04 mov DWORD PTR tga_w$[rbp], eax + 00184 e8 00 00 00 00 call stbi__get16le + 00189 89 45 04 mov DWORD PTR tga_w$[rbp], eax ; 5319 : if (tga_w < 1) { - 00183 83 7d 04 01 cmp DWORD PTR tga_w$[rbp], 1 - 00187 7d 13 jge SHORT $LN8@stbi__tga_ + 0018c 83 7d 04 01 cmp DWORD PTR tga_w$[rbp], 1 + 00190 7d 14 jge SHORT $LN8@stbi__tga_ ; 5320 : stbi__rewind(s); - 00189 48 8b 8d e0 01 + 00192 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00190 e8 00 00 00 00 call stbi__rewind + 00199 e8 00 00 00 00 call stbi__rewind + 0019e 90 npad 1 ; 5321 : return 0; // test width - 00195 33 c0 xor eax, eax - 00197 e9 22 01 00 00 jmp $LN1@stbi__tga_ + 0019f 33 c0 xor eax, eax + 001a1 e9 26 01 00 00 jmp $LN1@stbi__tga_ $LN8@stbi__tga_: ; 5322 : } ; 5323 : tga_h = stbi__get16le(s); - 0019c 48 8b 8d e0 01 + 001a6 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001a3 e8 00 00 00 00 call stbi__get16le - 001a8 89 45 24 mov DWORD PTR tga_h$[rbp], eax + 001ad e8 00 00 00 00 call stbi__get16le + 001b2 89 45 24 mov DWORD PTR tga_h$[rbp], eax ; 5324 : if (tga_h < 1) { - 001ab 83 7d 24 01 cmp DWORD PTR tga_h$[rbp], 1 - 001af 7d 13 jge SHORT $LN9@stbi__tga_ + 001b5 83 7d 24 01 cmp DWORD PTR tga_h$[rbp], 1 + 001b9 7d 14 jge SHORT $LN9@stbi__tga_ ; 5325 : stbi__rewind(s); - 001b1 48 8b 8d e0 01 + 001bb 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001b8 e8 00 00 00 00 call stbi__rewind + 001c2 e8 00 00 00 00 call stbi__rewind + 001c7 90 npad 1 ; 5326 : return 0; // test height - 001bd 33 c0 xor eax, eax - 001bf e9 fa 00 00 00 jmp $LN1@stbi__tga_ + 001c8 33 c0 xor eax, eax + 001ca e9 fd 00 00 00 jmp $LN1@stbi__tga_ $LN9@stbi__tga_: ; 5327 : } ; 5328 : tga_bits_per_pixel = stbi__get8(s); // bits per pixel - 001c4 48 8b 8d e0 01 + 001cf 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001cb e8 00 00 00 00 call stbi__get8 - 001d0 0f b6 c0 movzx eax, al - 001d3 89 85 84 00 00 + 001d6 e8 00 00 00 00 call stbi__get8 + 001db 0f b6 c0 movzx eax, al + 001de 89 85 84 00 00 00 mov DWORD PTR tga_bits_per_pixel$[rbp], eax ; 5329 : stbi__get8(s); // ignore alpha bits - 001d9 48 8b 8d e0 01 + 001e4 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 001e0 e8 00 00 00 00 call stbi__get8 + 001eb e8 00 00 00 00 call stbi__get8 + 001f0 90 npad 1 ; 5330 : if (tga_colormap_bpp != 0) { - 001e5 83 bd a4 00 00 + 001f1 83 bd a4 00 00 00 00 cmp DWORD PTR tga_colormap_bpp$[rbp], 0 - 001ec 74 3a je SHORT $LN10@stbi__tga_ + 001f8 74 3b je SHORT $LN10@stbi__tga_ ; 5331 : if ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { - 001ee 83 bd 84 00 00 + 001fa 83 bd 84 00 00 00 08 cmp DWORD PTR tga_bits_per_pixel$[rbp], 8 - 001f5 74 1c je SHORT $LN12@stbi__tga_ - 001f7 83 bd 84 00 00 + 00201 74 1d je SHORT $LN12@stbi__tga_ + 00203 83 bd 84 00 00 00 10 cmp DWORD PTR tga_bits_per_pixel$[rbp], 16 - 001fe 74 13 je SHORT $LN12@stbi__tga_ + 0020a 74 14 je SHORT $LN12@stbi__tga_ ; 5332 : // when using a colormap, tga_bits_per_pixel is the size of the indexes ; 5333 : // I don't think anything but 8 or 16bit indexes makes sense ; 5334 : stbi__rewind(s); - 00200 48 8b 8d e0 01 + 0020c 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00207 e8 00 00 00 00 call stbi__rewind + 00213 e8 00 00 00 00 call stbi__rewind + 00218 90 npad 1 ; 5335 : return 0; - 0020c 33 c0 xor eax, eax - 0020e e9 ab 00 00 00 jmp $LN1@stbi__tga_ + 00219 33 c0 xor eax, eax + 0021b e9 ac 00 00 00 jmp $LN1@stbi__tga_ $LN12@stbi__tga_: ; 5336 : } ; 5337 : tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); - 00213 45 33 c0 xor r8d, r8d - 00216 33 d2 xor edx, edx - 00218 8b 8d a4 00 00 + 00220 45 33 c0 xor r8d, r8d + 00223 33 d2 xor edx, edx + 00225 8b 8d a4 00 00 00 mov ecx, DWORD PTR tga_colormap_bpp$[rbp] - 0021e e8 00 00 00 00 call stbi__tga_get_comp - 00223 89 45 44 mov DWORD PTR tga_comp$[rbp], eax + 0022b e8 00 00 00 00 call stbi__tga_get_comp + 00230 89 45 44 mov DWORD PTR tga_comp$[rbp], eax ; 5338 : } - 00226 eb 39 jmp SHORT $LN11@stbi__tga_ + 00233 eb 39 jmp SHORT $LN11@stbi__tga_ $LN10@stbi__tga_: ; 5339 : else { ; 5340 : tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); - 00228 83 7d 64 03 cmp DWORD PTR tga_image_type$[rbp], 3 - 0022c 74 12 je SHORT $LN18@stbi__tga_ - 0022e 83 7d 64 0b cmp DWORD PTR tga_image_type$[rbp], 11 - 00232 74 0c je SHORT $LN18@stbi__tga_ - 00234 c7 85 b4 01 00 + 00235 83 7d 64 03 cmp DWORD PTR tga_image_type$[rbp], 3 + 00239 74 12 je SHORT $LN18@stbi__tga_ + 0023b 83 7d 64 0b cmp DWORD PTR tga_image_type$[rbp], 11 + 0023f 74 0c je SHORT $LN18@stbi__tga_ + 00241 c7 85 b4 01 00 00 00 00 00 00 mov DWORD PTR tv153[rbp], 0 - 0023e eb 0a jmp SHORT $LN19@stbi__tga_ + 0024b eb 0a jmp SHORT $LN19@stbi__tga_ $LN18@stbi__tga_: - 00240 c7 85 b4 01 00 + 0024d c7 85 b4 01 00 00 01 00 00 00 mov DWORD PTR tv153[rbp], 1 $LN19@stbi__tga_: - 0024a 45 33 c0 xor r8d, r8d - 0024d 8b 95 b4 01 00 + 00257 45 33 c0 xor r8d, r8d + 0025a 8b 95 b4 01 00 00 mov edx, DWORD PTR tv153[rbp] - 00253 8b 8d 84 00 00 + 00260 8b 8d 84 00 00 00 mov ecx, DWORD PTR tga_bits_per_pixel$[rbp] - 00259 e8 00 00 00 00 call stbi__tga_get_comp - 0025e 89 45 44 mov DWORD PTR tga_comp$[rbp], eax + 00266 e8 00 00 00 00 call stbi__tga_get_comp + 0026b 89 45 44 mov DWORD PTR tga_comp$[rbp], eax $LN11@stbi__tga_: ; 5341 : } ; 5342 : if (!tga_comp) { - 00261 83 7d 44 00 cmp DWORD PTR tga_comp$[rbp], 0 - 00265 75 10 jne SHORT $LN13@stbi__tga_ + 0026e 83 7d 44 00 cmp DWORD PTR tga_comp$[rbp], 0 + 00272 75 11 jne SHORT $LN13@stbi__tga_ ; 5343 : stbi__rewind(s); - 00267 48 8b 8d e0 01 + 00274 48 8b 8d e0 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0026e e8 00 00 00 00 call stbi__rewind + 0027b e8 00 00 00 00 call stbi__rewind + 00280 90 npad 1 ; 5344 : return 0; - 00273 33 c0 xor eax, eax - 00275 eb 47 jmp SHORT $LN1@stbi__tga_ + 00281 33 c0 xor eax, eax + 00283 eb 47 jmp SHORT $LN1@stbi__tga_ $LN13@stbi__tga_: ; 5345 : } ; 5346 : if (x) *x = tga_w; - 00277 48 83 bd e8 01 + 00285 48 83 bd e8 01 00 00 00 cmp QWORD PTR x$[rbp], 0 - 0027f 74 0c je SHORT $LN14@stbi__tga_ - 00281 48 8b 85 e8 01 + 0028d 74 0c je SHORT $LN14@stbi__tga_ + 0028f 48 8b 85 e8 01 00 00 mov rax, QWORD PTR x$[rbp] - 00288 8b 4d 04 mov ecx, DWORD PTR tga_w$[rbp] - 0028b 89 08 mov DWORD PTR [rax], ecx + 00296 8b 4d 04 mov ecx, DWORD PTR tga_w$[rbp] + 00299 89 08 mov DWORD PTR [rax], ecx $LN14@stbi__tga_: ; 5347 : if (y) *y = tga_h; - 0028d 48 83 bd f0 01 + 0029b 48 83 bd f0 01 00 00 00 cmp QWORD PTR y$[rbp], 0 - 00295 74 0c je SHORT $LN15@stbi__tga_ - 00297 48 8b 85 f0 01 + 002a3 74 0c je SHORT $LN15@stbi__tga_ + 002a5 48 8b 85 f0 01 00 00 mov rax, QWORD PTR y$[rbp] - 0029e 8b 4d 24 mov ecx, DWORD PTR tga_h$[rbp] - 002a1 89 08 mov DWORD PTR [rax], ecx + 002ac 8b 4d 24 mov ecx, DWORD PTR tga_h$[rbp] + 002af 89 08 mov DWORD PTR [rax], ecx $LN15@stbi__tga_: ; 5348 : if (comp) *comp = tga_comp; - 002a3 48 83 bd f8 01 + 002b1 48 83 bd f8 01 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 002ab 74 0c je SHORT $LN16@stbi__tga_ - 002ad 48 8b 85 f8 01 + 002b9 74 0c je SHORT $LN16@stbi__tga_ + 002bb 48 8b 85 f8 01 00 00 mov rax, QWORD PTR comp$[rbp] - 002b4 8b 4d 44 mov ecx, DWORD PTR tga_comp$[rbp] - 002b7 89 08 mov DWORD PTR [rax], ecx + 002c2 8b 4d 44 mov ecx, DWORD PTR tga_comp$[rbp] + 002c5 89 08 mov DWORD PTR [rax], ecx $LN16@stbi__tga_: ; 5349 : return 1; // seems to have passed everything - 002b9 b8 01 00 00 00 mov eax, 1 + 002c7 b8 01 00 00 00 mov eax, 1 $LN1@stbi__tga_: ; 5350 : } - 002be 48 8d a5 c8 01 + 002cc 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 002c5 5f pop rdi - 002c6 5d pop rbp - 002c7 c3 ret 0 + 002d3 5f pop rdi + 002d4 5d pop rbp + 002d5 c3 ret 0 stbi__tga_info ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -50767,17 +51152,17 @@ index2$11 = 932 temp$12 = 964 tga_pixel$13 = 1000 temp$14 = 1028 -tv296 = 1620 tv192 = 1620 +tv296 = 1620 tv153 = 1620 -tv275 = 1624 -tv219 = 1624 -tv207 = 1624 tv181 = 1624 -tv171 = 1624 -tv160 = 1624 -tv139 = 1624 +tv219 = 1624 tv134 = 1624 +tv139 = 1624 +tv160 = 1624 +tv171 = 1624 +tv275 = 1624 +tv207 = 1624 __$ArrayPad$ = 1632 s$ = 1680 x$ = 1688 @@ -50812,115 +51197,116 @@ stbi__tga_load PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 5406 : // read in the TGA header stuff ; 5407 : int tga_offset = stbi__get8(s); - 00058 48 8b 8d 90 06 + 00059 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 0005f e8 00 00 00 00 call stbi__get8 - 00064 0f b6 c0 movzx eax, al - 00067 89 45 04 mov DWORD PTR tga_offset$[rbp], eax + 00060 e8 00 00 00 00 call stbi__get8 + 00065 0f b6 c0 movzx eax, al + 00068 89 45 04 mov DWORD PTR tga_offset$[rbp], eax ; 5408 : int tga_indexed = stbi__get8(s); - 0006a 48 8b 8d 90 06 + 0006b 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 00071 e8 00 00 00 00 call stbi__get8 - 00076 0f b6 c0 movzx eax, al - 00079 89 45 24 mov DWORD PTR tga_indexed$[rbp], eax + 00072 e8 00 00 00 00 call stbi__get8 + 00077 0f b6 c0 movzx eax, al + 0007a 89 45 24 mov DWORD PTR tga_indexed$[rbp], eax ; 5409 : int tga_image_type = stbi__get8(s); - 0007c 48 8b 8d 90 06 + 0007d 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 00083 e8 00 00 00 00 call stbi__get8 - 00088 0f b6 c0 movzx eax, al - 0008b 89 45 44 mov DWORD PTR tga_image_type$[rbp], eax + 00084 e8 00 00 00 00 call stbi__get8 + 00089 0f b6 c0 movzx eax, al + 0008c 89 45 44 mov DWORD PTR tga_image_type$[rbp], eax ; 5410 : int tga_is_RLE = 0; - 0008e c7 45 64 00 00 + 0008f c7 45 64 00 00 00 00 mov DWORD PTR tga_is_RLE$[rbp], 0 ; 5411 : int tga_palette_start = stbi__get16le(s); - 00095 48 8b 8d 90 06 + 00096 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 0009c e8 00 00 00 00 call stbi__get16le - 000a1 89 85 84 00 00 + 0009d e8 00 00 00 00 call stbi__get16le + 000a2 89 85 84 00 00 00 mov DWORD PTR tga_palette_start$[rbp], eax ; 5412 : int tga_palette_len = stbi__get16le(s); - 000a7 48 8b 8d 90 06 + 000a8 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 000ae e8 00 00 00 00 call stbi__get16le - 000b3 89 85 a4 00 00 + 000af e8 00 00 00 00 call stbi__get16le + 000b4 89 85 a4 00 00 00 mov DWORD PTR tga_palette_len$[rbp], eax ; 5413 : int tga_palette_bits = stbi__get8(s); - 000b9 48 8b 8d 90 06 + 000ba 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 000c0 e8 00 00 00 00 call stbi__get8 - 000c5 0f b6 c0 movzx eax, al - 000c8 89 85 c4 00 00 + 000c1 e8 00 00 00 00 call stbi__get8 + 000c6 0f b6 c0 movzx eax, al + 000c9 89 85 c4 00 00 00 mov DWORD PTR tga_palette_bits$[rbp], eax ; 5414 : int tga_x_origin = stbi__get16le(s); - 000ce 48 8b 8d 90 06 + 000cf 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 000d5 e8 00 00 00 00 call stbi__get16le - 000da 89 85 e4 00 00 + 000d6 e8 00 00 00 00 call stbi__get16le + 000db 89 85 e4 00 00 00 mov DWORD PTR tga_x_origin$[rbp], eax ; 5415 : int tga_y_origin = stbi__get16le(s); - 000e0 48 8b 8d 90 06 + 000e1 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 000e7 e8 00 00 00 00 call stbi__get16le - 000ec 89 85 04 01 00 + 000e8 e8 00 00 00 00 call stbi__get16le + 000ed 89 85 04 01 00 00 mov DWORD PTR tga_y_origin$[rbp], eax ; 5416 : int tga_width = stbi__get16le(s); - 000f2 48 8b 8d 90 06 + 000f3 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 000f9 e8 00 00 00 00 call stbi__get16le - 000fe 89 85 24 01 00 + 000fa e8 00 00 00 00 call stbi__get16le + 000ff 89 85 24 01 00 00 mov DWORD PTR tga_width$[rbp], eax ; 5417 : int tga_height = stbi__get16le(s); - 00104 48 8b 8d 90 06 + 00105 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 0010b e8 00 00 00 00 call stbi__get16le - 00110 89 85 44 01 00 + 0010c e8 00 00 00 00 call stbi__get16le + 00111 89 85 44 01 00 00 mov DWORD PTR tga_height$[rbp], eax ; 5418 : int tga_bits_per_pixel = stbi__get8(s); - 00116 48 8b 8d 90 06 + 00117 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 0011d e8 00 00 00 00 call stbi__get8 - 00122 0f b6 c0 movzx eax, al - 00125 89 85 64 01 00 + 0011e e8 00 00 00 00 call stbi__get8 + 00123 0f b6 c0 movzx eax, al + 00126 89 85 64 01 00 00 mov DWORD PTR tga_bits_per_pixel$[rbp], eax ; 5419 : int tga_comp, tga_rgb16 = 0; - 0012b c7 85 a4 01 00 + 0012c c7 85 a4 01 00 00 00 00 00 00 mov DWORD PTR tga_rgb16$[rbp], 0 ; 5420 : int tga_inverted = stbi__get8(s); - 00135 48 8b 8d 90 06 + 00136 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 0013c e8 00 00 00 00 call stbi__get8 - 00141 0f b6 c0 movzx eax, al - 00144 89 85 c4 01 00 + 0013d e8 00 00 00 00 call stbi__get8 + 00142 0f b6 c0 movzx eax, al + 00145 89 85 c4 01 00 00 mov DWORD PTR tga_inverted$[rbp], eax ; 5421 : // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) @@ -50928,33 +51314,33 @@ stbi__tga_load PROC ; COMDAT ; 5423 : unsigned char* tga_data; ; 5424 : unsigned char* tga_palette = NULL; - 0014a 48 c7 85 08 02 + 0014b 48 c7 85 08 02 00 00 00 00 00 00 mov QWORD PTR tga_palette$[rbp], 0 ; 5425 : int i, j; ; 5426 : unsigned char raw_data[4] = { 0 }; - 00155 48 8d 85 64 02 + 00156 48 8d 85 64 02 00 00 lea rax, QWORD PTR raw_data$[rbp] - 0015c 48 8b f8 mov rdi, rax - 0015f 33 c0 xor eax, eax - 00161 b9 04 00 00 00 mov ecx, 4 - 00166 f3 aa rep stosb + 0015d 48 8b f8 mov rdi, rax + 00160 33 c0 xor eax, eax + 00162 b9 04 00 00 00 mov ecx, 4 + 00167 f3 aa rep stosb ; 5427 : int RLE_count = 0; - 00168 c7 85 84 02 00 + 00169 c7 85 84 02 00 00 00 00 00 00 mov DWORD PTR RLE_count$[rbp], 0 ; 5428 : int RLE_repeating = 0; - 00172 c7 85 a4 02 00 + 00173 c7 85 a4 02 00 00 00 00 00 00 mov DWORD PTR RLE_repeating$[rbp], 0 ; 5429 : int read_next_pixel = 1; - 0017c c7 85 c4 02 00 + 0017d c7 85 c4 02 00 00 01 00 00 00 mov DWORD PTR read_next_pixel$[rbp], 1 ; 5430 : STBI_NOTUSED(ri); @@ -50963,403 +51349,406 @@ stbi__tga_load PROC ; COMDAT ; 5433 : ; 5434 : if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - 00186 81 bd 44 01 00 + 00187 81 bd 44 01 00 00 00 00 00 01 cmp DWORD PTR tga_height$[rbp], 16777216 ; 01000000H - 00190 7e 34 jle SHORT $LN29@stbi__tga_ - 00192 48 8d 0d 00 00 + 00191 7e 34 jle SHORT $LN29@stbi__tga_ + 00193 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 00199 e8 00 00 00 00 call stbi__err - 0019e 85 c0 test eax, eax - 001a0 74 0d je SHORT $LN62@stbi__tga_ - 001a2 48 c7 85 58 06 + 0019a e8 00 00 00 00 call stbi__err + 0019f 85 c0 test eax, eax + 001a1 74 0d je SHORT $LN62@stbi__tga_ + 001a3 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv134[rbp], 0 - 001ad eb 0b jmp SHORT $LN63@stbi__tga_ + 001ae eb 0b jmp SHORT $LN63@stbi__tga_ $LN62@stbi__tga_: - 001af 48 c7 85 58 06 + 001b0 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv134[rbp], 0 $LN63@stbi__tga_: - 001ba 48 8b 85 58 06 + 001bb 48 8b 85 58 06 00 00 mov rax, QWORD PTR tv134[rbp] - 001c1 e9 c4 09 00 00 jmp $LN1@stbi__tga_ + 001c2 e9 ce 09 00 00 jmp $LN1@stbi__tga_ $LN29@stbi__tga_: ; 5435 : if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - 001c6 81 bd 24 01 00 + 001c7 81 bd 24 01 00 00 00 00 00 01 cmp DWORD PTR tga_width$[rbp], 16777216 ; 01000000H - 001d0 7e 34 jle SHORT $LN30@stbi__tga_ - 001d2 48 8d 0d 00 00 + 001d1 7e 34 jle SHORT $LN30@stbi__tga_ + 001d3 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 001d9 e8 00 00 00 00 call stbi__err - 001de 85 c0 test eax, eax - 001e0 74 0d je SHORT $LN64@stbi__tga_ - 001e2 48 c7 85 58 06 + 001da e8 00 00 00 00 call stbi__err + 001df 85 c0 test eax, eax + 001e1 74 0d je SHORT $LN64@stbi__tga_ + 001e3 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv139[rbp], 0 - 001ed eb 0b jmp SHORT $LN65@stbi__tga_ + 001ee eb 0b jmp SHORT $LN65@stbi__tga_ $LN64@stbi__tga_: - 001ef 48 c7 85 58 06 + 001f0 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv139[rbp], 0 $LN65@stbi__tga_: - 001fa 48 8b 85 58 06 + 001fb 48 8b 85 58 06 00 00 mov rax, QWORD PTR tv139[rbp] - 00201 e9 84 09 00 00 jmp $LN1@stbi__tga_ + 00202 e9 8e 09 00 00 jmp $LN1@stbi__tga_ $LN30@stbi__tga_: ; 5436 : ; 5437 : // do a tiny bit of precessing ; 5438 : if (tga_image_type >= 8) - 00206 83 7d 44 08 cmp DWORD PTR tga_image_type$[rbp], 8 - 0020a 7c 10 jl SHORT $LN31@stbi__tga_ + 00207 83 7d 44 08 cmp DWORD PTR tga_image_type$[rbp], 8 + 0020b 7c 10 jl SHORT $LN31@stbi__tga_ ; 5439 : { ; 5440 : tga_image_type -= 8; - 0020c 8b 45 44 mov eax, DWORD PTR tga_image_type$[rbp] - 0020f 83 e8 08 sub eax, 8 - 00212 89 45 44 mov DWORD PTR tga_image_type$[rbp], eax + 0020d 8b 45 44 mov eax, DWORD PTR tga_image_type$[rbp] + 00210 83 e8 08 sub eax, 8 + 00213 89 45 44 mov DWORD PTR tga_image_type$[rbp], eax ; 5441 : tga_is_RLE = 1; - 00215 c7 45 64 01 00 + 00216 c7 45 64 01 00 00 00 mov DWORD PTR tga_is_RLE$[rbp], 1 $LN31@stbi__tga_: ; 5442 : } ; 5443 : tga_inverted = 1 - ((tga_inverted >> 5) & 1); - 0021c 8b 85 c4 01 00 + 0021d 8b 85 c4 01 00 00 mov eax, DWORD PTR tga_inverted$[rbp] - 00222 c1 f8 05 sar eax, 5 - 00225 83 e0 01 and eax, 1 - 00228 b9 01 00 00 00 mov ecx, 1 - 0022d 2b c8 sub ecx, eax - 0022f 8b c1 mov eax, ecx - 00231 89 85 c4 01 00 + 00223 c1 f8 05 sar eax, 5 + 00226 83 e0 01 and eax, 1 + 00229 b9 01 00 00 00 mov ecx, 1 + 0022e 2b c8 sub ecx, eax + 00230 8b c1 mov eax, ecx + 00232 89 85 c4 01 00 00 mov DWORD PTR tga_inverted$[rbp], eax ; 5444 : ; 5445 : // If I'm paletted, then I'll use the number of bits from the palette ; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); - 00237 83 7d 24 00 cmp DWORD PTR tga_indexed$[rbp], 0 - 0023b 74 1c je SHORT $LN32@stbi__tga_ - 0023d 4c 8d 85 a4 01 + 00238 83 7d 24 00 cmp DWORD PTR tga_indexed$[rbp], 0 + 0023c 74 1c je SHORT $LN32@stbi__tga_ + 0023e 4c 8d 85 a4 01 00 00 lea r8, QWORD PTR tga_rgb16$[rbp] - 00244 33 d2 xor edx, edx - 00246 8b 8d c4 00 00 + 00245 33 d2 xor edx, edx + 00247 8b 8d c4 00 00 00 mov ecx, DWORD PTR tga_palette_bits$[rbp] - 0024c e8 00 00 00 00 call stbi__tga_get_comp - 00251 89 85 84 01 00 + 0024d e8 00 00 00 00 call stbi__tga_get_comp + 00252 89 85 84 01 00 00 mov DWORD PTR tga_comp$[rbp], eax - 00257 eb 3a jmp SHORT $LN33@stbi__tga_ + 00258 eb 3a jmp SHORT $LN33@stbi__tga_ $LN32@stbi__tga_: ; 5447 : else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); - 00259 83 7d 44 03 cmp DWORD PTR tga_image_type$[rbp], 3 - 0025d 75 0c jne SHORT $LN66@stbi__tga_ - 0025f c7 85 54 06 00 + 0025a 83 7d 44 03 cmp DWORD PTR tga_image_type$[rbp], 3 + 0025e 75 0c jne SHORT $LN66@stbi__tga_ + 00260 c7 85 54 06 00 00 01 00 00 00 mov DWORD PTR tv153[rbp], 1 - 00269 eb 0a jmp SHORT $LN67@stbi__tga_ + 0026a eb 0a jmp SHORT $LN67@stbi__tga_ $LN66@stbi__tga_: - 0026b c7 85 54 06 00 + 0026c c7 85 54 06 00 00 00 00 00 00 mov DWORD PTR tv153[rbp], 0 $LN67@stbi__tga_: - 00275 4c 8d 85 a4 01 + 00276 4c 8d 85 a4 01 00 00 lea r8, QWORD PTR tga_rgb16$[rbp] - 0027c 8b 95 54 06 00 + 0027d 8b 95 54 06 00 00 mov edx, DWORD PTR tv153[rbp] - 00282 8b 8d 64 01 00 + 00283 8b 8d 64 01 00 00 mov ecx, DWORD PTR tga_bits_per_pixel$[rbp] - 00288 e8 00 00 00 00 call stbi__tga_get_comp - 0028d 89 85 84 01 00 + 00289 e8 00 00 00 00 call stbi__tga_get_comp + 0028e 89 85 84 01 00 00 mov DWORD PTR tga_comp$[rbp], eax $LN33@stbi__tga_: ; 5448 : ; 5449 : if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency - 00293 83 bd 84 01 00 + 00294 83 bd 84 01 00 00 00 cmp DWORD PTR tga_comp$[rbp], 0 - 0029a 75 34 jne SHORT $LN34@stbi__tga_ + 0029b 75 34 jne SHORT $LN34@stbi__tga_ ; 5450 : return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); - 0029c 48 8d 0d 00 00 + 0029d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0L@DMAPJJO@bad?5format@ - 002a3 e8 00 00 00 00 call stbi__err - 002a8 85 c0 test eax, eax - 002aa 74 0d je SHORT $LN68@stbi__tga_ - 002ac 48 c7 85 58 06 + 002a4 e8 00 00 00 00 call stbi__err + 002a9 85 c0 test eax, eax + 002ab 74 0d je SHORT $LN68@stbi__tga_ + 002ad 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv160[rbp], 0 - 002b7 eb 0b jmp SHORT $LN69@stbi__tga_ + 002b8 eb 0b jmp SHORT $LN69@stbi__tga_ $LN68@stbi__tga_: - 002b9 48 c7 85 58 06 + 002ba 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv160[rbp], 0 $LN69@stbi__tga_: - 002c4 48 8b 85 58 06 + 002c5 48 8b 85 58 06 00 00 mov rax, QWORD PTR tv160[rbp] - 002cb e9 ba 08 00 00 jmp $LN1@stbi__tga_ + 002cc e9 c4 08 00 00 jmp $LN1@stbi__tga_ $LN34@stbi__tga_: ; 5451 : ; 5452 : // tga info ; 5453 : *x = tga_width; - 002d0 48 8b 85 98 06 + 002d1 48 8b 85 98 06 00 00 mov rax, QWORD PTR x$[rbp] - 002d7 8b 8d 24 01 00 + 002d8 8b 8d 24 01 00 00 mov ecx, DWORD PTR tga_width$[rbp] - 002dd 89 08 mov DWORD PTR [rax], ecx + 002de 89 08 mov DWORD PTR [rax], ecx ; 5454 : *y = tga_height; - 002df 48 8b 85 a0 06 + 002e0 48 8b 85 a0 06 00 00 mov rax, QWORD PTR y$[rbp] - 002e6 8b 8d 44 01 00 + 002e7 8b 8d 44 01 00 00 mov ecx, DWORD PTR tga_height$[rbp] - 002ec 89 08 mov DWORD PTR [rax], ecx + 002ed 89 08 mov DWORD PTR [rax], ecx ; 5455 : if (comp) *comp = tga_comp; - 002ee 48 83 bd a8 06 + 002ef 48 83 bd a8 06 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 002f6 74 0f je SHORT $LN35@stbi__tga_ - 002f8 48 8b 85 a8 06 + 002f7 74 0f je SHORT $LN35@stbi__tga_ + 002f9 48 8b 85 a8 06 00 00 mov rax, QWORD PTR comp$[rbp] - 002ff 8b 8d 84 01 00 + 00300 8b 8d 84 01 00 00 mov ecx, DWORD PTR tga_comp$[rbp] - 00305 89 08 mov DWORD PTR [rax], ecx + 00306 89 08 mov DWORD PTR [rax], ecx $LN35@stbi__tga_: ; 5456 : ; 5457 : if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) - 00307 45 33 c9 xor r9d, r9d - 0030a 44 8b 85 84 01 + 00308 45 33 c9 xor r9d, r9d + 0030b 44 8b 85 84 01 00 00 mov r8d, DWORD PTR tga_comp$[rbp] - 00311 8b 95 44 01 00 + 00312 8b 95 44 01 00 00 mov edx, DWORD PTR tga_height$[rbp] - 00317 8b 8d 24 01 00 + 00318 8b 8d 24 01 00 00 mov ecx, DWORD PTR tga_width$[rbp] - 0031d e8 00 00 00 00 call stbi__mad3sizes_valid - 00322 85 c0 test eax, eax - 00324 75 34 jne SHORT $LN36@stbi__tga_ + 0031e e8 00 00 00 00 call stbi__mad3sizes_valid + 00323 85 c0 test eax, eax + 00325 75 34 jne SHORT $LN36@stbi__tga_ ; 5458 : return stbi__errpuc("too large", "Corrupt TGA"); - 00326 48 8d 0d 00 00 + 00327 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 0032d e8 00 00 00 00 call stbi__err - 00332 85 c0 test eax, eax - 00334 74 0d je SHORT $LN70@stbi__tga_ - 00336 48 c7 85 58 06 + 0032e e8 00 00 00 00 call stbi__err + 00333 85 c0 test eax, eax + 00335 74 0d je SHORT $LN70@stbi__tga_ + 00337 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv171[rbp], 0 - 00341 eb 0b jmp SHORT $LN71@stbi__tga_ + 00342 eb 0b jmp SHORT $LN71@stbi__tga_ $LN70@stbi__tga_: - 00343 48 c7 85 58 06 + 00344 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv171[rbp], 0 $LN71@stbi__tga_: - 0034e 48 8b 85 58 06 + 0034f 48 8b 85 58 06 00 00 mov rax, QWORD PTR tv171[rbp] - 00355 e9 30 08 00 00 jmp $LN1@stbi__tga_ + 00356 e9 3a 08 00 00 jmp $LN1@stbi__tga_ $LN36@stbi__tga_: ; 5459 : ; 5460 : tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); - 0035a 45 33 c9 xor r9d, r9d - 0035d 44 8b 85 84 01 + 0035b 45 33 c9 xor r9d, r9d + 0035e 44 8b 85 84 01 00 00 mov r8d, DWORD PTR tga_comp$[rbp] - 00364 8b 95 44 01 00 + 00365 8b 95 44 01 00 00 mov edx, DWORD PTR tga_height$[rbp] - 0036a 8b 8d 24 01 00 + 0036b 8b 8d 24 01 00 00 mov ecx, DWORD PTR tga_width$[rbp] - 00370 e8 00 00 00 00 call stbi__malloc_mad3 - 00375 48 89 85 e8 01 + 00371 e8 00 00 00 00 call stbi__malloc_mad3 + 00376 48 89 85 e8 01 00 00 mov QWORD PTR tga_data$[rbp], rax ; 5461 : if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); - 0037c 48 83 bd e8 01 + 0037d 48 83 bd e8 01 00 00 00 cmp QWORD PTR tga_data$[rbp], 0 - 00384 75 34 jne SHORT $LN37@stbi__tga_ - 00386 48 8d 0d 00 00 + 00385 75 34 jne SHORT $LN37@stbi__tga_ + 00387 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 0038d e8 00 00 00 00 call stbi__err - 00392 85 c0 test eax, eax - 00394 74 0d je SHORT $LN72@stbi__tga_ - 00396 48 c7 85 58 06 + 0038e e8 00 00 00 00 call stbi__err + 00393 85 c0 test eax, eax + 00395 74 0d je SHORT $LN72@stbi__tga_ + 00397 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv181[rbp], 0 - 003a1 eb 0b jmp SHORT $LN73@stbi__tga_ + 003a2 eb 0b jmp SHORT $LN73@stbi__tga_ $LN72@stbi__tga_: - 003a3 48 c7 85 58 06 + 003a4 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv181[rbp], 0 $LN73@stbi__tga_: - 003ae 48 8b 85 58 06 + 003af 48 8b 85 58 06 00 00 mov rax, QWORD PTR tv181[rbp] - 003b5 e9 d0 07 00 00 jmp $LN1@stbi__tga_ + 003b6 e9 da 07 00 00 jmp $LN1@stbi__tga_ $LN37@stbi__tga_: ; 5462 : ; 5463 : // skip to the data's starting position (offset usually = 0) ; 5464 : stbi__skip(s, tga_offset); - 003ba 8b 55 04 mov edx, DWORD PTR tga_offset$[rbp] - 003bd 48 8b 8d 90 06 + 003bb 8b 55 04 mov edx, DWORD PTR tga_offset$[rbp] + 003be 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 003c4 e8 00 00 00 00 call stbi__skip + 003c5 e8 00 00 00 00 call stbi__skip + 003ca 90 npad 1 ; 5465 : ; 5466 : if (!tga_indexed && !tga_is_RLE && !tga_rgb16) { - 003c9 83 7d 24 00 cmp DWORD PTR tga_indexed$[rbp], 0 - 003cd 0f 85 d5 00 00 + 003cb 83 7d 24 00 cmp DWORD PTR tga_indexed$[rbp], 0 + 003cf 0f 85 d6 00 00 00 jne $LN38@stbi__tga_ - 003d3 83 7d 64 00 cmp DWORD PTR tga_is_RLE$[rbp], 0 - 003d7 0f 85 cb 00 00 + 003d5 83 7d 64 00 cmp DWORD PTR tga_is_RLE$[rbp], 0 + 003d9 0f 85 cc 00 00 00 jne $LN38@stbi__tga_ - 003dd 83 bd a4 01 00 + 003df 83 bd a4 01 00 00 00 cmp DWORD PTR tga_rgb16$[rbp], 0 - 003e4 0f 85 be 00 00 + 003e6 0f 85 bf 00 00 00 jne $LN38@stbi__tga_ ; 5467 : for (i = 0; i < tga_height; ++i) { - 003ea c7 85 24 02 00 + 003ec c7 85 24 02 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 003f4 eb 0e jmp SHORT $LN4@stbi__tga_ + 003f6 eb 0e jmp SHORT $LN4@stbi__tga_ $LN2@stbi__tga_: - 003f6 8b 85 24 02 00 + 003f8 8b 85 24 02 00 00 mov eax, DWORD PTR i$[rbp] - 003fc ff c0 inc eax - 003fe 89 85 24 02 00 + 003fe ff c0 inc eax + 00400 89 85 24 02 00 00 mov DWORD PTR i$[rbp], eax $LN4@stbi__tga_: - 00404 8b 85 44 01 00 + 00406 8b 85 44 01 00 00 mov eax, DWORD PTR tga_height$[rbp] - 0040a 39 85 24 02 00 + 0040c 39 85 24 02 00 00 cmp DWORD PTR i$[rbp], eax - 00410 0f 8d 8d 00 00 + 00412 0f 8d 8e 00 00 00 jge $LN3@stbi__tga_ ; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; - 00416 83 bd c4 01 00 + 00418 83 bd c4 01 00 00 00 cmp DWORD PTR tga_inverted$[rbp], 0 - 0041d 74 1a je SHORT $LN74@stbi__tga_ - 0041f 8b 85 24 02 00 + 0041f 74 1a je SHORT $LN74@stbi__tga_ + 00421 8b 85 24 02 00 00 mov eax, DWORD PTR i$[rbp] - 00425 8b 8d 44 01 00 + 00427 8b 8d 44 01 00 00 mov ecx, DWORD PTR tga_height$[rbp] - 0042b 2b c8 sub ecx, eax - 0042d 8b c1 mov eax, ecx - 0042f ff c8 dec eax - 00431 89 85 54 06 00 + 0042d 2b c8 sub ecx, eax + 0042f 8b c1 mov eax, ecx + 00431 ff c8 dec eax + 00433 89 85 54 06 00 00 mov DWORD PTR tv192[rbp], eax - 00437 eb 0c jmp SHORT $LN75@stbi__tga_ + 00439 eb 0c jmp SHORT $LN75@stbi__tga_ $LN74@stbi__tga_: - 00439 8b 85 24 02 00 + 0043b 8b 85 24 02 00 00 mov eax, DWORD PTR i$[rbp] - 0043f 89 85 54 06 00 + 00441 89 85 54 06 00 00 mov DWORD PTR tv192[rbp], eax $LN75@stbi__tga_: - 00445 8b 85 54 06 00 + 00447 8b 85 54 06 00 00 mov eax, DWORD PTR tv192[rbp] - 0044b 89 85 e4 02 00 + 0044d 89 85 e4 02 00 00 mov DWORD PTR row$5[rbp], eax ; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; - 00451 8b 85 e4 02 00 + 00453 8b 85 e4 02 00 00 mov eax, DWORD PTR row$5[rbp] - 00457 0f af 85 24 01 + 00459 0f af 85 24 01 00 00 imul eax, DWORD PTR tga_width$[rbp] - 0045e 0f af 85 84 01 + 00460 0f af 85 84 01 00 00 imul eax, DWORD PTR tga_comp$[rbp] - 00465 48 98 cdqe - 00467 48 8b 8d e8 01 + 00467 48 98 cdqe + 00469 48 8b 8d e8 01 00 00 mov rcx, QWORD PTR tga_data$[rbp] - 0046e 48 03 c8 add rcx, rax - 00471 48 8b c1 mov rax, rcx - 00474 48 89 85 08 03 + 00470 48 03 c8 add rcx, rax + 00473 48 8b c1 mov rax, rcx + 00476 48 89 85 08 03 00 00 mov QWORD PTR tga_row$6[rbp], rax ; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); - 0047b 8b 85 24 01 00 + 0047d 8b 85 24 01 00 00 mov eax, DWORD PTR tga_width$[rbp] - 00481 0f af 85 84 01 + 00483 0f af 85 84 01 00 00 imul eax, DWORD PTR tga_comp$[rbp] - 00488 44 8b c0 mov r8d, eax - 0048b 48 8b 95 08 03 + 0048a 44 8b c0 mov r8d, eax + 0048d 48 8b 95 08 03 00 00 mov rdx, QWORD PTR tga_row$6[rbp] - 00492 48 8b 8d 90 06 + 00494 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 00499 e8 00 00 00 00 call stbi__getn + 0049b e8 00 00 00 00 call stbi__getn + 004a0 90 npad 1 ; 5471 : } - 0049e e9 53 ff ff ff jmp $LN2@stbi__tga_ + 004a1 e9 52 ff ff ff jmp $LN2@stbi__tga_ $LN3@stbi__tga_: ; 5472 : } - 004a3 e9 87 05 00 00 jmp $LN39@stbi__tga_ + 004a6 e9 8f 05 00 00 jmp $LN39@stbi__tga_ $LN38@stbi__tga_: ; 5473 : else { ; 5474 : // do I need to load a palette? ; 5475 : if (tga_indexed) - 004a8 83 7d 24 00 cmp DWORD PTR tga_indexed$[rbp], 0 - 004ac 0f 84 d1 01 00 + 004ab 83 7d 24 00 cmp DWORD PTR tga_indexed$[rbp], 0 + 004af 0f 84 d7 01 00 00 je $LN40@stbi__tga_ ; 5476 : { ; 5477 : if (tga_palette_len == 0) { /* you have to have at least one entry! */ - 004b2 83 bd a4 00 00 + 004b5 83 bd a4 00 00 00 00 cmp DWORD PTR tga_palette_len$[rbp], 0 - 004b9 75 41 jne SHORT $LN41@stbi__tga_ + 004bc 75 42 jne SHORT $LN41@stbi__tga_ ; 5478 : STBI_FREE(tga_data); - 004bb 48 8b 8d e8 01 + 004be 48 8b 8d e8 01 00 00 mov rcx, QWORD PTR tga_data$[rbp] - 004c2 ff 15 00 00 00 + 004c5 ff 15 00 00 00 00 call QWORD PTR __imp_free + 004cb 90 npad 1 ; 5479 : return stbi__errpuc("bad palette", "Corrupt TGA"); - 004c8 48 8d 0d 00 00 + 004cc 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@ILLOCNCO@bad?5palette@ - 004cf e8 00 00 00 00 call stbi__err - 004d4 85 c0 test eax, eax - 004d6 74 0d je SHORT $LN76@stbi__tga_ - 004d8 48 c7 85 58 06 + 004d3 e8 00 00 00 00 call stbi__err + 004d8 85 c0 test eax, eax + 004da 74 0d je SHORT $LN76@stbi__tga_ + 004dc 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv207[rbp], 0 - 004e3 eb 0b jmp SHORT $LN77@stbi__tga_ + 004e7 eb 0b jmp SHORT $LN77@stbi__tga_ $LN76@stbi__tga_: - 004e5 48 c7 85 58 06 + 004e9 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv207[rbp], 0 $LN77@stbi__tga_: - 004f0 48 8b 85 58 06 + 004f4 48 8b 85 58 06 00 00 mov rax, QWORD PTR tv207[rbp] - 004f7 e9 8e 06 00 00 jmp $LN1@stbi__tga_ + 004fb e9 95 06 00 00 jmp $LN1@stbi__tga_ $LN41@stbi__tga_: ; 5480 : } @@ -51367,184 +51756,189 @@ $LN41@stbi__tga_: ; 5482 : // any data to skip? (offset usually = 0) ; 5483 : stbi__skip(s, tga_palette_start); - 004fc 8b 95 84 00 00 + 00500 8b 95 84 00 00 00 mov edx, DWORD PTR tga_palette_start$[rbp] - 00502 48 8b 8d 90 06 + 00506 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 00509 e8 00 00 00 00 call stbi__skip + 0050d e8 00 00 00 00 call stbi__skip + 00512 90 npad 1 ; 5484 : // load the palette ; 5485 : tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); - 0050e 45 33 c0 xor r8d, r8d - 00511 8b 95 84 01 00 + 00513 45 33 c0 xor r8d, r8d + 00516 8b 95 84 01 00 00 mov edx, DWORD PTR tga_comp$[rbp] - 00517 8b 8d a4 00 00 + 0051c 8b 8d a4 00 00 00 mov ecx, DWORD PTR tga_palette_len$[rbp] - 0051d e8 00 00 00 00 call stbi__malloc_mad2 - 00522 48 89 85 08 02 + 00522 e8 00 00 00 00 call stbi__malloc_mad2 + 00527 48 89 85 08 02 00 00 mov QWORD PTR tga_palette$[rbp], rax ; 5486 : if (!tga_palette) { - 00529 48 83 bd 08 02 + 0052e 48 83 bd 08 02 00 00 00 cmp QWORD PTR tga_palette$[rbp], 0 - 00531 75 41 jne SHORT $LN42@stbi__tga_ + 00536 75 42 jne SHORT $LN42@stbi__tga_ ; 5487 : STBI_FREE(tga_data); - 00533 48 8b 8d e8 01 + 00538 48 8b 8d e8 01 00 00 mov rcx, QWORD PTR tga_data$[rbp] - 0053a ff 15 00 00 00 + 0053f ff 15 00 00 00 00 call QWORD PTR __imp_free + 00545 90 npad 1 ; 5488 : return stbi__errpuc("outofmem", "Out of memory"); - 00540 48 8d 0d 00 00 + 00546 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 00547 e8 00 00 00 00 call stbi__err - 0054c 85 c0 test eax, eax - 0054e 74 0d je SHORT $LN78@stbi__tga_ - 00550 48 c7 85 58 06 + 0054d e8 00 00 00 00 call stbi__err + 00552 85 c0 test eax, eax + 00554 74 0d je SHORT $LN78@stbi__tga_ + 00556 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv219[rbp], 0 - 0055b eb 0b jmp SHORT $LN79@stbi__tga_ + 00561 eb 0b jmp SHORT $LN79@stbi__tga_ $LN78@stbi__tga_: - 0055d 48 c7 85 58 06 + 00563 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv219[rbp], 0 $LN79@stbi__tga_: - 00568 48 8b 85 58 06 + 0056e 48 8b 85 58 06 00 00 mov rax, QWORD PTR tv219[rbp] - 0056f e9 16 06 00 00 jmp $LN1@stbi__tga_ + 00575 e9 1b 06 00 00 jmp $LN1@stbi__tga_ $LN42@stbi__tga_: ; 5489 : } ; 5490 : if (tga_rgb16) { - 00574 83 bd a4 01 00 + 0057a 83 bd a4 01 00 00 00 cmp DWORD PTR tga_rgb16$[rbp], 0 - 0057b 0f 84 8d 00 00 + 00581 0f 84 8e 00 00 00 je $LN43@stbi__tga_ ; 5491 : stbi_uc* pal_entry = tga_palette; - 00581 48 8b 85 08 02 + 00587 48 8b 85 08 02 00 00 mov rax, QWORD PTR tga_palette$[rbp] - 00588 48 89 85 28 03 + 0058e 48 89 85 28 03 00 00 mov QWORD PTR pal_entry$7[rbp], rax ; 5492 : STBI_ASSERT(tga_comp == STBI_rgb); - 0058f 83 bd 84 01 00 + 00595 83 bd 84 01 00 00 03 cmp DWORD PTR tga_comp$[rbp], 3 - 00596 74 1c je SHORT $LN80@stbi__tga_ - 00598 41 b8 74 15 00 + 0059c 74 1c je SHORT $LN80@stbi__tga_ + 0059e 41 b8 74 15 00 00 mov r8d, 5492 ; 00001574H - 0059e 48 8d 15 00 00 + 005a4 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 005a5 48 8d 0d 00 00 + 005ab 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1CK@GOOINIO@?$AAt?$AAg?$AAa?$AA_?$AAc?$AAo?$AAm?$AAp?$AA?5?$AA?$DN?$AA?$DN?$AA?5?$AAS?$AAT?$AAB@ - 005ac ff 15 00 00 00 + 005b2 ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 005b2 33 c0 xor eax, eax + 005b8 33 c0 xor eax, eax $LN80@stbi__tga_: ; 5493 : for (i = 0; i < tga_palette_len; ++i) { - 005b4 c7 85 24 02 00 + 005ba c7 85 24 02 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 005be eb 0e jmp SHORT $LN7@stbi__tga_ + 005c4 eb 0e jmp SHORT $LN7@stbi__tga_ $LN5@stbi__tga_: - 005c0 8b 85 24 02 00 + 005c6 8b 85 24 02 00 00 mov eax, DWORD PTR i$[rbp] - 005c6 ff c0 inc eax - 005c8 89 85 24 02 00 + 005cc ff c0 inc eax + 005ce 89 85 24 02 00 00 mov DWORD PTR i$[rbp], eax $LN7@stbi__tga_: - 005ce 8b 85 a4 00 00 + 005d4 8b 85 a4 00 00 00 mov eax, DWORD PTR tga_palette_len$[rbp] - 005d4 39 85 24 02 00 + 005da 39 85 24 02 00 00 cmp DWORD PTR i$[rbp], eax - 005da 7d 30 jge SHORT $LN6@stbi__tga_ + 005e0 7d 31 jge SHORT $LN6@stbi__tga_ ; 5494 : stbi__tga_read_rgb16(s, pal_entry); - 005dc 48 8b 95 28 03 + 005e2 48 8b 95 28 03 00 00 mov rdx, QWORD PTR pal_entry$7[rbp] - 005e3 48 8b 8d 90 06 + 005e9 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 005ea e8 00 00 00 00 call stbi__tga_read_rgb16 + 005f0 e8 00 00 00 00 call stbi__tga_read_rgb16 + 005f5 90 npad 1 ; 5495 : pal_entry += tga_comp; - 005ef 48 63 85 84 01 + 005f6 48 63 85 84 01 00 00 movsxd rax, DWORD PTR tga_comp$[rbp] - 005f6 48 8b 8d 28 03 + 005fd 48 8b 8d 28 03 00 00 mov rcx, QWORD PTR pal_entry$7[rbp] - 005fd 48 03 c8 add rcx, rax - 00600 48 8b c1 mov rax, rcx - 00603 48 89 85 28 03 + 00604 48 03 c8 add rcx, rax + 00607 48 8b c1 mov rax, rcx + 0060a 48 89 85 28 03 00 00 mov QWORD PTR pal_entry$7[rbp], rax ; 5496 : } - 0060a eb b4 jmp SHORT $LN5@stbi__tga_ + 00611 eb b3 jmp SHORT $LN5@stbi__tga_ $LN6@stbi__tga_: ; 5497 : } - 0060c eb 75 jmp SHORT $LN44@stbi__tga_ + 00613 eb 77 jmp SHORT $LN44@stbi__tga_ $LN43@stbi__tga_: ; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { - 0060e 8b 85 a4 00 00 + 00615 8b 85 a4 00 00 00 mov eax, DWORD PTR tga_palette_len$[rbp] - 00614 0f af 85 84 01 + 0061b 0f af 85 84 01 00 00 imul eax, DWORD PTR tga_comp$[rbp] - 0061b 44 8b c0 mov r8d, eax - 0061e 48 8b 95 08 02 + 00622 44 8b c0 mov r8d, eax + 00625 48 8b 95 08 02 00 00 mov rdx, QWORD PTR tga_palette$[rbp] - 00625 48 8b 8d 90 06 + 0062c 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 0062c e8 00 00 00 00 call stbi__getn - 00631 85 c0 test eax, eax - 00633 75 4e jne SHORT $LN45@stbi__tga_ + 00633 e8 00 00 00 00 call stbi__getn + 00638 85 c0 test eax, eax + 0063a 75 50 jne SHORT $LN45@stbi__tga_ ; 5499 : STBI_FREE(tga_data); - 00635 48 8b 8d e8 01 + 0063c 48 8b 8d e8 01 00 00 mov rcx, QWORD PTR tga_data$[rbp] - 0063c ff 15 00 00 00 + 00643 ff 15 00 00 00 00 call QWORD PTR __imp_free + 00649 90 npad 1 ; 5500 : STBI_FREE(tga_palette); - 00642 48 8b 8d 08 02 + 0064a 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR tga_palette$[rbp] - 00649 ff 15 00 00 00 + 00651 ff 15 00 00 00 00 call QWORD PTR __imp_free + 00657 90 npad 1 ; 5501 : return stbi__errpuc("bad palette", "Corrupt TGA"); - 0064f 48 8d 0d 00 00 + 00658 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@ILLOCNCO@bad?5palette@ - 00656 e8 00 00 00 00 call stbi__err - 0065b 85 c0 test eax, eax - 0065d 74 0d je SHORT $LN81@stbi__tga_ - 0065f 48 c7 85 58 06 + 0065f e8 00 00 00 00 call stbi__err + 00664 85 c0 test eax, eax + 00666 74 0d je SHORT $LN81@stbi__tga_ + 00668 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv275[rbp], 0 - 0066a eb 0b jmp SHORT $LN82@stbi__tga_ + 00673 eb 0b jmp SHORT $LN82@stbi__tga_ $LN81@stbi__tga_: - 0066c 48 c7 85 58 06 + 00675 48 c7 85 58 06 00 00 00 00 00 00 mov QWORD PTR tv275[rbp], 0 $LN82@stbi__tga_: - 00677 48 8b 85 58 06 + 00680 48 8b 85 58 06 00 00 mov rax, QWORD PTR tv275[rbp] - 0067e e9 07 05 00 00 jmp $LN1@stbi__tga_ + 00687 e9 09 05 00 00 jmp $LN1@stbi__tga_ $LN45@stbi__tga_: $LN44@stbi__tga_: $LN40@stbi__tga_: @@ -51554,87 +51948,87 @@ $LN40@stbi__tga_: ; 5504 : // load the data ; 5505 : for (i = 0; i < tga_width * tga_height; ++i) - 00683 c7 85 24 02 00 + 0068c c7 85 24 02 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 0068d eb 0e jmp SHORT $LN10@stbi__tga_ + 00696 eb 0e jmp SHORT $LN10@stbi__tga_ $LN8@stbi__tga_: - 0068f 8b 85 24 02 00 + 00698 8b 85 24 02 00 00 mov eax, DWORD PTR i$[rbp] - 00695 ff c0 inc eax - 00697 89 85 24 02 00 + 0069e ff c0 inc eax + 006a0 89 85 24 02 00 00 mov DWORD PTR i$[rbp], eax $LN10@stbi__tga_: - 0069d 8b 85 24 01 00 + 006a6 8b 85 24 01 00 00 mov eax, DWORD PTR tga_width$[rbp] - 006a3 0f af 85 44 01 + 006ac 0f af 85 44 01 00 00 imul eax, DWORD PTR tga_height$[rbp] - 006aa 39 85 24 02 00 + 006b3 39 85 24 02 00 00 cmp DWORD PTR i$[rbp], eax - 006b0 0f 8d 46 02 00 + 006b9 0f 8d 47 02 00 00 jge $LN9@stbi__tga_ ; 5506 : { ; 5507 : // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? ; 5508 : if (tga_is_RLE) - 006b6 83 7d 64 00 cmp DWORD PTR tga_is_RLE$[rbp], 0 - 006ba 74 5f je SHORT $LN46@stbi__tga_ + 006bf 83 7d 64 00 cmp DWORD PTR tga_is_RLE$[rbp], 0 + 006c3 74 5f je SHORT $LN46@stbi__tga_ ; 5509 : { ; 5510 : if (RLE_count == 0) - 006bc 83 bd 84 02 00 + 006c5 83 bd 84 02 00 00 00 cmp DWORD PTR RLE_count$[rbp], 0 - 006c3 75 41 jne SHORT $LN48@stbi__tga_ + 006cc 75 41 jne SHORT $LN48@stbi__tga_ ; 5511 : { ; 5512 : // yep, get the next byte as a RLE command ; 5513 : int RLE_cmd = stbi__get8(s); - 006c5 48 8b 8d 90 06 + 006ce 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 006cc e8 00 00 00 00 call stbi__get8 - 006d1 0f b6 c0 movzx eax, al - 006d4 89 85 44 03 00 + 006d5 e8 00 00 00 00 call stbi__get8 + 006da 0f b6 c0 movzx eax, al + 006dd 89 85 44 03 00 00 mov DWORD PTR RLE_cmd$8[rbp], eax ; 5514 : RLE_count = 1 + (RLE_cmd & 127); - 006da 8b 85 44 03 00 + 006e3 8b 85 44 03 00 00 mov eax, DWORD PTR RLE_cmd$8[rbp] - 006e0 83 e0 7f and eax, 127 ; 0000007fH - 006e3 ff c0 inc eax - 006e5 89 85 84 02 00 + 006e9 83 e0 7f and eax, 127 ; 0000007fH + 006ec ff c0 inc eax + 006ee 89 85 84 02 00 00 mov DWORD PTR RLE_count$[rbp], eax ; 5515 : RLE_repeating = RLE_cmd >> 7; - 006eb 8b 85 44 03 00 + 006f4 8b 85 44 03 00 00 mov eax, DWORD PTR RLE_cmd$8[rbp] - 006f1 c1 f8 07 sar eax, 7 - 006f4 89 85 a4 02 00 + 006fa c1 f8 07 sar eax, 7 + 006fd 89 85 a4 02 00 00 mov DWORD PTR RLE_repeating$[rbp], eax ; 5516 : read_next_pixel = 1; - 006fa c7 85 c4 02 00 + 00703 c7 85 c4 02 00 00 01 00 00 00 mov DWORD PTR read_next_pixel$[rbp], 1 ; 5517 : } - 00704 eb 13 jmp SHORT $LN49@stbi__tga_ + 0070d eb 13 jmp SHORT $LN49@stbi__tga_ $LN48@stbi__tga_: ; 5518 : else if (!RLE_repeating) - 00706 83 bd a4 02 00 + 0070f 83 bd a4 02 00 00 00 cmp DWORD PTR RLE_repeating$[rbp], 0 - 0070d 75 0a jne SHORT $LN50@stbi__tga_ + 00716 75 0a jne SHORT $LN50@stbi__tga_ ; 5519 : { ; 5520 : read_next_pixel = 1; - 0070f c7 85 c4 02 00 + 00718 c7 85 c4 02 00 00 01 00 00 00 mov DWORD PTR read_next_pixel$[rbp], 1 $LN50@stbi__tga_: $LN49@stbi__tga_: @@ -51642,14 +52036,14 @@ $LN49@stbi__tga_: ; 5521 : } ; 5522 : } - 00719 eb 0a jmp SHORT $LN47@stbi__tga_ + 00722 eb 0a jmp SHORT $LN47@stbi__tga_ $LN46@stbi__tga_: ; 5523 : else ; 5524 : { ; 5525 : read_next_pixel = 1; - 0071b c7 85 c4 02 00 + 00724 c7 85 c4 02 00 00 01 00 00 00 mov DWORD PTR read_next_pixel$[rbp], 1 $LN47@stbi__tga_: @@ -51657,183 +52051,184 @@ $LN47@stbi__tga_: ; 5527 : // OK, if I need to read a pixel, do it now ; 5528 : if (read_next_pixel) - 00725 83 bd c4 02 00 + 0072e 83 bd c4 02 00 00 00 cmp DWORD PTR read_next_pixel$[rbp], 0 - 0072c 0f 84 5e 01 00 + 00735 0f 84 5f 01 00 00 je $LN51@stbi__tga_ ; 5529 : { ; 5530 : // load however much data we did have ; 5531 : if (tga_indexed) - 00732 83 7d 24 00 cmp DWORD PTR tga_indexed$[rbp], 0 - 00736 0f 84 c3 00 00 + 0073b 83 7d 24 00 cmp DWORD PTR tga_indexed$[rbp], 0 + 0073f 0f 84 c3 00 00 00 je $LN52@stbi__tga_ ; 5532 : { ; 5533 : // read in index, then perform the lookup ; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); - 0073c 83 bd 64 01 00 + 00745 83 bd 64 01 00 00 08 cmp DWORD PTR tga_bits_per_pixel$[rbp], 8 - 00743 75 17 jne SHORT $LN83@stbi__tga_ - 00745 48 8b 8d 90 06 + 0074c 75 17 jne SHORT $LN83@stbi__tga_ + 0074e 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 0074c e8 00 00 00 00 call stbi__get8 - 00751 0f b6 c0 movzx eax, al - 00754 89 85 54 06 00 + 00755 e8 00 00 00 00 call stbi__get8 + 0075a 0f b6 c0 movzx eax, al + 0075d 89 85 54 06 00 00 mov DWORD PTR tv296[rbp], eax - 0075a eb 12 jmp SHORT $LN84@stbi__tga_ + 00763 eb 12 jmp SHORT $LN84@stbi__tga_ $LN83@stbi__tga_: - 0075c 48 8b 8d 90 06 + 00765 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 00763 e8 00 00 00 00 call stbi__get16le - 00768 89 85 54 06 00 + 0076c e8 00 00 00 00 call stbi__get16le + 00771 89 85 54 06 00 00 mov DWORD PTR tv296[rbp], eax $LN84@stbi__tga_: - 0076e 8b 85 54 06 00 + 00777 8b 85 54 06 00 00 mov eax, DWORD PTR tv296[rbp] - 00774 89 85 64 03 00 + 0077d 89 85 64 03 00 00 mov DWORD PTR pal_idx$9[rbp], eax ; 5535 : if (pal_idx >= tga_palette_len) { - 0077a 8b 85 a4 00 00 + 00783 8b 85 a4 00 00 00 mov eax, DWORD PTR tga_palette_len$[rbp] - 00780 39 85 64 03 00 + 00789 39 85 64 03 00 00 cmp DWORD PTR pal_idx$9[rbp], eax - 00786 7c 0a jl SHORT $LN54@stbi__tga_ + 0078f 7c 0a jl SHORT $LN54@stbi__tga_ ; 5536 : // invalid index ; 5537 : pal_idx = 0; - 00788 c7 85 64 03 00 + 00791 c7 85 64 03 00 00 00 00 00 00 mov DWORD PTR pal_idx$9[rbp], 0 $LN54@stbi__tga_: ; 5538 : } ; 5539 : pal_idx *= tga_comp; - 00792 8b 85 64 03 00 + 0079b 8b 85 64 03 00 00 mov eax, DWORD PTR pal_idx$9[rbp] - 00798 0f af 85 84 01 + 007a1 0f af 85 84 01 00 00 imul eax, DWORD PTR tga_comp$[rbp] - 0079f 89 85 64 03 00 + 007a8 89 85 64 03 00 00 mov DWORD PTR pal_idx$9[rbp], eax ; 5540 : for (j = 0; j < tga_comp; ++j) { - 007a5 c7 85 44 02 00 + 007ae c7 85 44 02 00 00 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 007af eb 0e jmp SHORT $LN13@stbi__tga_ + 007b8 eb 0e jmp SHORT $LN13@stbi__tga_ $LN11@stbi__tga_: - 007b1 8b 85 44 02 00 + 007ba 8b 85 44 02 00 00 mov eax, DWORD PTR j$[rbp] - 007b7 ff c0 inc eax - 007b9 89 85 44 02 00 + 007c0 ff c0 inc eax + 007c2 89 85 44 02 00 00 mov DWORD PTR j$[rbp], eax $LN13@stbi__tga_: - 007bf 8b 85 84 01 00 + 007c8 8b 85 84 01 00 00 mov eax, DWORD PTR tga_comp$[rbp] - 007c5 39 85 44 02 00 + 007ce 39 85 44 02 00 00 cmp DWORD PTR j$[rbp], eax - 007cb 7d 2d jge SHORT $LN12@stbi__tga_ + 007d4 7d 2d jge SHORT $LN12@stbi__tga_ ; 5541 : raw_data[j] = tga_palette[pal_idx + j]; - 007cd 8b 85 44 02 00 + 007d6 8b 85 44 02 00 00 mov eax, DWORD PTR j$[rbp] - 007d3 8b 8d 64 03 00 + 007dc 8b 8d 64 03 00 00 mov ecx, DWORD PTR pal_idx$9[rbp] - 007d9 03 c8 add ecx, eax - 007db 8b c1 mov eax, ecx - 007dd 48 98 cdqe - 007df 48 63 8d 44 02 + 007e2 03 c8 add ecx, eax + 007e4 8b c1 mov eax, ecx + 007e6 48 98 cdqe + 007e8 48 63 8d 44 02 00 00 movsxd rcx, DWORD PTR j$[rbp] - 007e6 48 8b 95 08 02 + 007ef 48 8b 95 08 02 00 00 mov rdx, QWORD PTR tga_palette$[rbp] - 007ed 0f b6 04 02 movzx eax, BYTE PTR [rdx+rax] - 007f1 88 84 0d 64 02 + 007f6 0f b6 04 02 movzx eax, BYTE PTR [rdx+rax] + 007fa 88 84 0d 64 02 00 00 mov BYTE PTR raw_data$[rbp+rcx], al ; 5542 : } - 007f8 eb b7 jmp SHORT $LN11@stbi__tga_ + 00801 eb b7 jmp SHORT $LN11@stbi__tga_ $LN12@stbi__tga_: ; 5543 : } - 007fa e9 87 00 00 00 jmp $LN53@stbi__tga_ + 00803 e9 88 00 00 00 jmp $LN53@stbi__tga_ $LN52@stbi__tga_: ; 5544 : else if (tga_rgb16) { - 007ff 83 bd a4 01 00 + 00808 83 bd a4 01 00 00 00 cmp DWORD PTR tga_rgb16$[rbp], 0 - 00806 74 3a je SHORT $LN55@stbi__tga_ + 0080f 74 3b je SHORT $LN55@stbi__tga_ ; 5545 : STBI_ASSERT(tga_comp == STBI_rgb); - 00808 83 bd 84 01 00 + 00811 83 bd 84 01 00 00 03 cmp DWORD PTR tga_comp$[rbp], 3 - 0080f 74 1c je SHORT $LN85@stbi__tga_ - 00811 41 b8 a9 15 00 + 00818 74 1c je SHORT $LN85@stbi__tga_ + 0081a 41 b8 a9 15 00 00 mov r8d, 5545 ; 000015a9H - 00817 48 8d 15 00 00 + 00820 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_1KA@LPJPGBDN@?$AAD?$AA?3?$AA?2?$AAN?$AAi?$AAt?$AAl?$AAo?$AAa?$AAd?$AAI?$AAn?$AAd?$AAu?$AAs@ - 0081e 48 8d 0d 00 00 + 00827 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_1CK@GOOINIO@?$AAt?$AAg?$AAa?$AA_?$AAc?$AAo?$AAm?$AAp?$AA?5?$AA?$DN?$AA?$DN?$AA?5?$AAS?$AAT?$AAB@ - 00825 ff 15 00 00 00 + 0082e ff 15 00 00 00 00 call QWORD PTR __imp__wassert - 0082b 33 c0 xor eax, eax + 00834 33 c0 xor eax, eax $LN85@stbi__tga_: ; 5546 : stbi__tga_read_rgb16(s, raw_data); - 0082d 48 8d 95 64 02 + 00836 48 8d 95 64 02 00 00 lea rdx, QWORD PTR raw_data$[rbp] - 00834 48 8b 8d 90 06 + 0083d 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 0083b e8 00 00 00 00 call stbi__tga_read_rgb16 + 00844 e8 00 00 00 00 call stbi__tga_read_rgb16 + 00849 90 npad 1 ; 5547 : } - 00840 eb 44 jmp SHORT $LN56@stbi__tga_ + 0084a eb 44 jmp SHORT $LN56@stbi__tga_ $LN55@stbi__tga_: ; 5548 : else { ; 5549 : // read in the data raw ; 5550 : for (j = 0; j < tga_comp; ++j) { - 00842 c7 85 44 02 00 + 0084c c7 85 44 02 00 00 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 0084c eb 0e jmp SHORT $LN16@stbi__tga_ + 00856 eb 0e jmp SHORT $LN16@stbi__tga_ $LN14@stbi__tga_: - 0084e 8b 85 44 02 00 + 00858 8b 85 44 02 00 00 mov eax, DWORD PTR j$[rbp] - 00854 ff c0 inc eax - 00856 89 85 44 02 00 + 0085e ff c0 inc eax + 00860 89 85 44 02 00 00 mov DWORD PTR j$[rbp], eax $LN16@stbi__tga_: - 0085c 8b 85 84 01 00 + 00866 8b 85 84 01 00 00 mov eax, DWORD PTR tga_comp$[rbp] - 00862 39 85 44 02 00 + 0086c 39 85 44 02 00 00 cmp DWORD PTR j$[rbp], eax - 00868 7d 1c jge SHORT $LN15@stbi__tga_ + 00872 7d 1c jge SHORT $LN15@stbi__tga_ ; 5551 : raw_data[j] = stbi__get8(s); - 0086a 48 8b 8d 90 06 + 00874 48 8b 8d 90 06 00 00 mov rcx, QWORD PTR s$[rbp] - 00871 e8 00 00 00 00 call stbi__get8 - 00876 48 63 8d 44 02 + 0087b e8 00 00 00 00 call stbi__get8 + 00880 48 63 8d 44 02 00 00 movsxd rcx, DWORD PTR j$[rbp] - 0087d 88 84 0d 64 02 + 00887 88 84 0d 64 02 00 00 mov BYTE PTR raw_data$[rbp+rcx], al ; 5552 : } - 00884 eb c8 jmp SHORT $LN14@stbi__tga_ + 0088e eb c8 jmp SHORT $LN14@stbi__tga_ $LN15@stbi__tga_: $LN56@stbi__tga_: $LN53@stbi__tga_: @@ -51842,7 +52237,7 @@ $LN53@stbi__tga_: ; 5554 : // clear the reading flag for the next pixel ; 5555 : read_next_pixel = 0; - 00886 c7 85 c4 02 00 + 00890 c7 85 c4 02 00 00 00 00 00 00 mov DWORD PTR read_next_pixel$[rbp], 0 $LN51@stbi__tga_: @@ -51851,189 +52246,189 @@ $LN51@stbi__tga_: ; 5558 : // copy data ; 5559 : for (j = 0; j < tga_comp; ++j) - 00890 c7 85 44 02 00 + 0089a c7 85 44 02 00 00 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 0089a eb 0e jmp SHORT $LN19@stbi__tga_ + 008a4 eb 0e jmp SHORT $LN19@stbi__tga_ $LN17@stbi__tga_: - 0089c 8b 85 44 02 00 + 008a6 8b 85 44 02 00 00 mov eax, DWORD PTR j$[rbp] - 008a2 ff c0 inc eax - 008a4 89 85 44 02 00 + 008ac ff c0 inc eax + 008ae 89 85 44 02 00 00 mov DWORD PTR j$[rbp], eax $LN19@stbi__tga_: - 008aa 8b 85 84 01 00 + 008b4 8b 85 84 01 00 00 mov eax, DWORD PTR tga_comp$[rbp] - 008b0 39 85 44 02 00 + 008ba 39 85 44 02 00 00 cmp DWORD PTR j$[rbp], eax - 008b6 7d 31 jge SHORT $LN18@stbi__tga_ + 008c0 7d 31 jge SHORT $LN18@stbi__tga_ ; 5560 : tga_data[i * tga_comp + j] = raw_data[j]; - 008b8 48 63 85 44 02 + 008c2 48 63 85 44 02 00 00 movsxd rax, DWORD PTR j$[rbp] - 008bf 8b 8d 24 02 00 + 008c9 8b 8d 24 02 00 00 mov ecx, DWORD PTR i$[rbp] - 008c5 0f af 8d 84 01 + 008cf 0f af 8d 84 01 00 00 imul ecx, DWORD PTR tga_comp$[rbp] - 008cc 03 8d 44 02 00 + 008d6 03 8d 44 02 00 00 add ecx, DWORD PTR j$[rbp] - 008d2 48 63 c9 movsxd rcx, ecx - 008d5 48 8b 95 e8 01 + 008dc 48 63 c9 movsxd rcx, ecx + 008df 48 8b 95 e8 01 00 00 mov rdx, QWORD PTR tga_data$[rbp] - 008dc 0f b6 84 05 64 + 008e6 0f b6 84 05 64 02 00 00 movzx eax, BYTE PTR raw_data$[rbp+rax] - 008e4 88 04 0a mov BYTE PTR [rdx+rcx], al - 008e7 eb b3 jmp SHORT $LN17@stbi__tga_ + 008ee 88 04 0a mov BYTE PTR [rdx+rcx], al + 008f1 eb b3 jmp SHORT $LN17@stbi__tga_ $LN18@stbi__tga_: ; 5561 : ; 5562 : // in case we're in RLE mode, keep counting down ; 5563 : --RLE_count; - 008e9 8b 85 84 02 00 + 008f3 8b 85 84 02 00 00 mov eax, DWORD PTR RLE_count$[rbp] - 008ef ff c8 dec eax - 008f1 89 85 84 02 00 + 008f9 ff c8 dec eax + 008fb 89 85 84 02 00 00 mov DWORD PTR RLE_count$[rbp], eax ; 5564 : } - 008f7 e9 93 fd ff ff jmp $LN8@stbi__tga_ + 00901 e9 92 fd ff ff jmp $LN8@stbi__tga_ $LN9@stbi__tga_: ; 5565 : // do I need to invert the image? ; 5566 : if (tga_inverted) - 008fc 83 bd c4 01 00 + 00906 83 bd c4 01 00 00 00 cmp DWORD PTR tga_inverted$[rbp], 0 - 00903 0f 84 0f 01 00 + 0090d 0f 84 0f 01 00 00 je $LN57@stbi__tga_ ; 5567 : { ; 5568 : for (j = 0; j * 2 < tga_height; ++j) - 00909 c7 85 44 02 00 + 00913 c7 85 44 02 00 00 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 00913 eb 0e jmp SHORT $LN22@stbi__tga_ + 0091d eb 0e jmp SHORT $LN22@stbi__tga_ $LN20@stbi__tga_: - 00915 8b 85 44 02 00 + 0091f 8b 85 44 02 00 00 mov eax, DWORD PTR j$[rbp] - 0091b ff c0 inc eax - 0091d 89 85 44 02 00 + 00925 ff c0 inc eax + 00927 89 85 44 02 00 00 mov DWORD PTR j$[rbp], eax $LN22@stbi__tga_: - 00923 8b 85 44 02 00 + 0092d 8b 85 44 02 00 00 mov eax, DWORD PTR j$[rbp] - 00929 d1 e0 shl eax, 1 - 0092b 3b 85 44 01 00 + 00933 d1 e0 shl eax, 1 + 00935 3b 85 44 01 00 00 cmp eax, DWORD PTR tga_height$[rbp] - 00931 0f 8d e1 00 00 + 0093b 0f 8d e1 00 00 00 jge $LN21@stbi__tga_ ; 5569 : { ; 5570 : int index1 = j * tga_width * tga_comp; - 00937 8b 85 44 02 00 + 00941 8b 85 44 02 00 00 mov eax, DWORD PTR j$[rbp] - 0093d 0f af 85 24 01 + 00947 0f af 85 24 01 00 00 imul eax, DWORD PTR tga_width$[rbp] - 00944 0f af 85 84 01 + 0094e 0f af 85 84 01 00 00 imul eax, DWORD PTR tga_comp$[rbp] - 0094b 89 85 84 03 00 + 00955 89 85 84 03 00 00 mov DWORD PTR index1$10[rbp], eax ; 5571 : int index2 = (tga_height - 1 - j) * tga_width * tga_comp; - 00951 8b 85 44 01 00 + 0095b 8b 85 44 01 00 00 mov eax, DWORD PTR tga_height$[rbp] - 00957 ff c8 dec eax - 00959 2b 85 44 02 00 + 00961 ff c8 dec eax + 00963 2b 85 44 02 00 00 sub eax, DWORD PTR j$[rbp] - 0095f 0f af 85 24 01 + 00969 0f af 85 24 01 00 00 imul eax, DWORD PTR tga_width$[rbp] - 00966 0f af 85 84 01 + 00970 0f af 85 84 01 00 00 imul eax, DWORD PTR tga_comp$[rbp] - 0096d 89 85 a4 03 00 + 00977 89 85 a4 03 00 00 mov DWORD PTR index2$11[rbp], eax ; 5572 : for (i = tga_width * tga_comp; i > 0; --i) - 00973 8b 85 24 01 00 + 0097d 8b 85 24 01 00 00 mov eax, DWORD PTR tga_width$[rbp] - 00979 0f af 85 84 01 + 00983 0f af 85 84 01 00 00 imul eax, DWORD PTR tga_comp$[rbp] - 00980 89 85 24 02 00 + 0098a 89 85 24 02 00 00 mov DWORD PTR i$[rbp], eax - 00986 eb 0e jmp SHORT $LN25@stbi__tga_ + 00990 eb 0e jmp SHORT $LN25@stbi__tga_ $LN23@stbi__tga_: - 00988 8b 85 24 02 00 + 00992 8b 85 24 02 00 00 mov eax, DWORD PTR i$[rbp] - 0098e ff c8 dec eax - 00990 89 85 24 02 00 + 00998 ff c8 dec eax + 0099a 89 85 24 02 00 00 mov DWORD PTR i$[rbp], eax $LN25@stbi__tga_: - 00996 83 bd 24 02 00 + 009a0 83 bd 24 02 00 00 00 cmp DWORD PTR i$[rbp], 0 - 0099d 7e 74 jle SHORT $LN24@stbi__tga_ + 009a7 7e 74 jle SHORT $LN24@stbi__tga_ ; 5573 : { ; 5574 : unsigned char temp = tga_data[index1]; - 0099f 48 63 85 84 03 + 009a9 48 63 85 84 03 00 00 movsxd rax, DWORD PTR index1$10[rbp] - 009a6 48 8b 8d e8 01 + 009b0 48 8b 8d e8 01 00 00 mov rcx, QWORD PTR tga_data$[rbp] - 009ad 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 009b1 88 85 c4 03 00 + 009b7 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 009bb 88 85 c4 03 00 00 mov BYTE PTR temp$12[rbp], al ; 5575 : tga_data[index1] = tga_data[index2]; - 009b7 48 63 85 a4 03 + 009c1 48 63 85 a4 03 00 00 movsxd rax, DWORD PTR index2$11[rbp] - 009be 48 63 8d 84 03 + 009c8 48 63 8d 84 03 00 00 movsxd rcx, DWORD PTR index1$10[rbp] - 009c5 48 8b 95 e8 01 + 009cf 48 8b 95 e8 01 00 00 mov rdx, QWORD PTR tga_data$[rbp] - 009cc 48 8b bd e8 01 + 009d6 48 8b bd e8 01 00 00 mov rdi, QWORD PTR tga_data$[rbp] - 009d3 0f b6 04 07 movzx eax, BYTE PTR [rdi+rax] - 009d7 88 04 0a mov BYTE PTR [rdx+rcx], al + 009dd 0f b6 04 07 movzx eax, BYTE PTR [rdi+rax] + 009e1 88 04 0a mov BYTE PTR [rdx+rcx], al ; 5576 : tga_data[index2] = temp; - 009da 48 63 85 a4 03 + 009e4 48 63 85 a4 03 00 00 movsxd rax, DWORD PTR index2$11[rbp] - 009e1 48 8b 8d e8 01 + 009eb 48 8b 8d e8 01 00 00 mov rcx, QWORD PTR tga_data$[rbp] - 009e8 0f b6 95 c4 03 + 009f2 0f b6 95 c4 03 00 00 movzx edx, BYTE PTR temp$12[rbp] - 009ef 88 14 01 mov BYTE PTR [rcx+rax], dl + 009f9 88 14 01 mov BYTE PTR [rcx+rax], dl ; 5577 : ++index1; - 009f2 8b 85 84 03 00 + 009fc 8b 85 84 03 00 00 mov eax, DWORD PTR index1$10[rbp] - 009f8 ff c0 inc eax - 009fa 89 85 84 03 00 + 00a02 ff c0 inc eax + 00a04 89 85 84 03 00 00 mov DWORD PTR index1$10[rbp], eax ; 5578 : ++index2; - 00a00 8b 85 a4 03 00 + 00a0a 8b 85 a4 03 00 00 mov eax, DWORD PTR index2$11[rbp] - 00a06 ff c0 inc eax - 00a08 89 85 a4 03 00 + 00a10 ff c0 inc eax + 00a12 89 85 a4 03 00 00 mov DWORD PTR index2$11[rbp], eax ; 5579 : } - 00a0e e9 75 ff ff ff jmp $LN23@stbi__tga_ + 00a18 e9 75 ff ff ff jmp $LN23@stbi__tga_ $LN24@stbi__tga_: ; 5580 : } - 00a13 e9 fd fe ff ff jmp $LN20@stbi__tga_ + 00a1d e9 fd fe ff ff jmp $LN20@stbi__tga_ $LN21@stbi__tga_: $LN57@stbi__tga_: @@ -52041,17 +52436,18 @@ $LN57@stbi__tga_: ; 5582 : // clear my palette, if I had one ; 5583 : if (tga_palette != NULL) - 00a18 48 83 bd 08 02 + 00a22 48 83 bd 08 02 00 00 00 cmp QWORD PTR tga_palette$[rbp], 0 - 00a20 74 0d je SHORT $LN58@stbi__tga_ + 00a2a 74 0e je SHORT $LN58@stbi__tga_ ; 5584 : { ; 5585 : STBI_FREE(tga_palette); - 00a22 48 8b 8d 08 02 + 00a2c 48 8b 8d 08 02 00 00 mov rcx, QWORD PTR tga_palette$[rbp] - 00a29 ff 15 00 00 00 + 00a33 ff 15 00 00 00 00 call QWORD PTR __imp_free + 00a39 90 npad 1 $LN58@stbi__tga_: $LN39@stbi__tga_: @@ -52061,91 +52457,91 @@ $LN39@stbi__tga_: ; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order ; 5590 : if (tga_comp >= 3 && !tga_rgb16) - 00a2f 83 bd 84 01 00 + 00a3a 83 bd 84 01 00 00 03 cmp DWORD PTR tga_comp$[rbp], 3 - 00a36 0f 8c c5 00 00 + 00a41 0f 8c c5 00 00 00 jl $LN59@stbi__tga_ - 00a3c 83 bd a4 01 00 + 00a47 83 bd a4 01 00 00 00 cmp DWORD PTR tga_rgb16$[rbp], 0 - 00a43 0f 85 b8 00 00 + 00a4e 0f 85 b8 00 00 00 jne $LN59@stbi__tga_ ; 5591 : { ; 5592 : unsigned char* tga_pixel = tga_data; - 00a49 48 8b 85 e8 01 + 00a54 48 8b 85 e8 01 00 00 mov rax, QWORD PTR tga_data$[rbp] - 00a50 48 89 85 e8 03 + 00a5b 48 89 85 e8 03 00 00 mov QWORD PTR tga_pixel$13[rbp], rax ; 5593 : for (i = 0; i < tga_width * tga_height; ++i) - 00a57 c7 85 24 02 00 + 00a62 c7 85 24 02 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00a61 eb 0e jmp SHORT $LN28@stbi__tga_ + 00a6c eb 0e jmp SHORT $LN28@stbi__tga_ $LN26@stbi__tga_: - 00a63 8b 85 24 02 00 + 00a6e 8b 85 24 02 00 00 mov eax, DWORD PTR i$[rbp] - 00a69 ff c0 inc eax - 00a6b 89 85 24 02 00 + 00a74 ff c0 inc eax + 00a76 89 85 24 02 00 00 mov DWORD PTR i$[rbp], eax $LN28@stbi__tga_: - 00a71 8b 85 24 01 00 + 00a7c 8b 85 24 01 00 00 mov eax, DWORD PTR tga_width$[rbp] - 00a77 0f af 85 44 01 + 00a82 0f af 85 44 01 00 00 imul eax, DWORD PTR tga_height$[rbp] - 00a7e 39 85 24 02 00 + 00a89 39 85 24 02 00 00 cmp DWORD PTR i$[rbp], eax - 00a84 7d 7b jge SHORT $LN27@stbi__tga_ + 00a8f 7d 7b jge SHORT $LN27@stbi__tga_ ; 5594 : { ; 5595 : unsigned char temp = tga_pixel[0]; - 00a86 b8 01 00 00 00 mov eax, 1 - 00a8b 48 6b c0 00 imul rax, rax, 0 - 00a8f 48 8b 8d e8 03 + 00a91 b8 01 00 00 00 mov eax, 1 + 00a96 48 6b c0 00 imul rax, rax, 0 + 00a9a 48 8b 8d e8 03 00 00 mov rcx, QWORD PTR tga_pixel$13[rbp] - 00a96 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 00a9a 88 85 04 04 00 + 00aa1 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 00aa5 88 85 04 04 00 00 mov BYTE PTR temp$14[rbp], al ; 5596 : tga_pixel[0] = tga_pixel[2]; - 00aa0 b8 01 00 00 00 mov eax, 1 - 00aa5 48 6b c0 02 imul rax, rax, 2 - 00aa9 b9 01 00 00 00 mov ecx, 1 - 00aae 48 6b c9 00 imul rcx, rcx, 0 - 00ab2 48 8b 95 e8 03 + 00aab b8 01 00 00 00 mov eax, 1 + 00ab0 48 6b c0 02 imul rax, rax, 2 + 00ab4 b9 01 00 00 00 mov ecx, 1 + 00ab9 48 6b c9 00 imul rcx, rcx, 0 + 00abd 48 8b 95 e8 03 00 00 mov rdx, QWORD PTR tga_pixel$13[rbp] - 00ab9 48 8b bd e8 03 + 00ac4 48 8b bd e8 03 00 00 mov rdi, QWORD PTR tga_pixel$13[rbp] - 00ac0 0f b6 04 07 movzx eax, BYTE PTR [rdi+rax] - 00ac4 88 04 0a mov BYTE PTR [rdx+rcx], al + 00acb 0f b6 04 07 movzx eax, BYTE PTR [rdi+rax] + 00acf 88 04 0a mov BYTE PTR [rdx+rcx], al ; 5597 : tga_pixel[2] = temp; - 00ac7 b8 01 00 00 00 mov eax, 1 - 00acc 48 6b c0 02 imul rax, rax, 2 - 00ad0 48 8b 8d e8 03 + 00ad2 b8 01 00 00 00 mov eax, 1 + 00ad7 48 6b c0 02 imul rax, rax, 2 + 00adb 48 8b 8d e8 03 00 00 mov rcx, QWORD PTR tga_pixel$13[rbp] - 00ad7 0f b6 95 04 04 + 00ae2 0f b6 95 04 04 00 00 movzx edx, BYTE PTR temp$14[rbp] - 00ade 88 14 01 mov BYTE PTR [rcx+rax], dl + 00ae9 88 14 01 mov BYTE PTR [rcx+rax], dl ; 5598 : tga_pixel += tga_comp; - 00ae1 48 63 85 84 01 + 00aec 48 63 85 84 01 00 00 movsxd rax, DWORD PTR tga_comp$[rbp] - 00ae8 48 8b 8d e8 03 + 00af3 48 8b 8d e8 03 00 00 mov rcx, QWORD PTR tga_pixel$13[rbp] - 00aef 48 03 c8 add rcx, rax - 00af2 48 8b c1 mov rax, rcx - 00af5 48 89 85 e8 03 + 00afa 48 03 c8 add rcx, rax + 00afd 48 8b c1 mov rax, rcx + 00b00 48 89 85 e8 03 00 00 mov QWORD PTR tga_pixel$13[rbp], rax ; 5599 : } - 00afc e9 62 ff ff ff jmp $LN26@stbi__tga_ + 00b07 e9 62 ff ff ff jmp $LN26@stbi__tga_ $LN27@stbi__tga_: $LN59@stbi__tga_: @@ -52154,30 +52550,30 @@ $LN59@stbi__tga_: ; 5602 : // convert to target component count ; 5603 : if (req_comp && req_comp != tga_comp) - 00b01 83 bd b0 06 00 + 00b0c 83 bd b0 06 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 00b08 74 3f je SHORT $LN60@stbi__tga_ - 00b0a 8b 85 84 01 00 + 00b13 74 3f je SHORT $LN60@stbi__tga_ + 00b15 8b 85 84 01 00 00 mov eax, DWORD PTR tga_comp$[rbp] - 00b10 39 85 b0 06 00 + 00b1b 39 85 b0 06 00 00 cmp DWORD PTR req_comp$[rbp], eax - 00b16 74 31 je SHORT $LN60@stbi__tga_ + 00b21 74 31 je SHORT $LN60@stbi__tga_ ; 5604 : tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); - 00b18 8b 85 44 01 00 + 00b23 8b 85 44 01 00 00 mov eax, DWORD PTR tga_height$[rbp] - 00b1e 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00b22 44 8b 8d 24 01 + 00b29 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00b2d 44 8b 8d 24 01 00 00 mov r9d, DWORD PTR tga_width$[rbp] - 00b29 44 8b 85 b0 06 + 00b34 44 8b 85 b0 06 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 00b30 8b 95 84 01 00 + 00b3b 8b 95 84 01 00 00 mov edx, DWORD PTR tga_comp$[rbp] - 00b36 48 8b 8d e8 01 + 00b41 48 8b 8d e8 01 00 00 mov rcx, QWORD PTR tga_data$[rbp] - 00b3d e8 00 00 00 00 call stbi__convert_format - 00b42 48 89 85 e8 01 + 00b48 e8 00 00 00 00 call stbi__convert_format + 00b4d 48 89 85 e8 01 00 00 mov QWORD PTR tga_data$[rbp], rax $LN60@stbi__tga_: @@ -52186,23 +52582,23 @@ $LN60@stbi__tga_: ; 5607 : // Microsoft's C compilers happy... [8^( ; 5608 : tga_palette_start = tga_palette_len = tga_palette_bits = - 00b49 c7 85 04 01 00 + 00b54 c7 85 04 01 00 00 00 00 00 00 mov DWORD PTR tga_y_origin$[rbp], 0 - 00b53 8b 85 04 01 00 + 00b5e 8b 85 04 01 00 00 mov eax, DWORD PTR tga_y_origin$[rbp] - 00b59 89 85 e4 00 00 + 00b64 89 85 e4 00 00 00 mov DWORD PTR tga_x_origin$[rbp], eax - 00b5f 8b 85 e4 00 00 + 00b6a 8b 85 e4 00 00 00 mov eax, DWORD PTR tga_x_origin$[rbp] - 00b65 89 85 c4 00 00 + 00b70 89 85 c4 00 00 00 mov DWORD PTR tga_palette_bits$[rbp], eax - 00b6b 8b 85 c4 00 00 + 00b76 8b 85 c4 00 00 00 mov eax, DWORD PTR tga_palette_bits$[rbp] - 00b71 89 85 a4 00 00 + 00b7c 89 85 a4 00 00 00 mov DWORD PTR tga_palette_len$[rbp], eax - 00b77 8b 85 a4 00 00 + 00b82 8b 85 a4 00 00 00 mov eax, DWORD PTR tga_palette_len$[rbp] - 00b7d 89 85 84 00 00 + 00b88 89 85 84 00 00 00 mov DWORD PTR tga_palette_start$[rbp], eax ; 5609 : tga_x_origin = tga_y_origin = 0; @@ -52210,27 +52606,27 @@ $LN60@stbi__tga_: ; 5611 : // OK, done ; 5612 : return tga_data; - 00b83 48 8b 85 e8 01 + 00b8e 48 8b 85 e8 01 00 00 mov rax, QWORD PTR tga_data$[rbp] $LN1@stbi__tga_: ; 5613 : } - 00b8a 48 8b f8 mov rdi, rax - 00b8d 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 00b91 48 8d 15 00 00 + 00b95 48 8b f8 mov rdi, rax + 00b98 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 00b9c 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__tga_load$rtcFrameData - 00b98 e8 00 00 00 00 call _RTC_CheckStackVars - 00b9d 48 8b c7 mov rax, rdi - 00ba0 48 8b 8d 60 06 + 00ba3 e8 00 00 00 00 call _RTC_CheckStackVars + 00ba8 48 8b c7 mov rax, rdi + 00bab 48 8b 8d 60 06 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00ba7 48 33 cd xor rcx, rbp - 00baa e8 00 00 00 00 call __security_check_cookie - 00baf 48 8d a5 78 06 + 00bb2 48 33 cd xor rcx, rbp + 00bb5 e8 00 00 00 00 call __security_check_cookie + 00bba 48 8d a5 78 06 00 00 lea rsp, QWORD PTR [rbp+1656] - 00bb6 5f pop rdi - 00bb7 5d pop rbp - 00bb8 c3 ret 0 + 00bc1 5f pop rdi + 00bc2 5d pop rbp + 00bc3 c3 ret 0 stbi__tga_load ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -52254,179 +52650,184 @@ stbi__tga_test PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 5354 : int res = 0; - 0001f c7 45 04 00 00 + 00020 c7 45 04 00 00 00 00 mov DWORD PTR res$[rbp], 0 ; 5355 : int sz, tga_color_type; ; 5356 : stbi__get8(s); // discard Offset - 00026 48 8b 8d 40 01 + 00027 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0002d e8 00 00 00 00 call stbi__get8 + 0002e e8 00 00 00 00 call stbi__get8 + 00033 90 npad 1 ; 5357 : tga_color_type = stbi__get8(s); // color type - 00032 48 8b 8d 40 01 + 00034 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00039 e8 00 00 00 00 call stbi__get8 - 0003e 0f b6 c0 movzx eax, al - 00041 89 45 44 mov DWORD PTR tga_color_type$[rbp], eax + 0003b e8 00 00 00 00 call stbi__get8 + 00040 0f b6 c0 movzx eax, al + 00043 89 45 44 mov DWORD PTR tga_color_type$[rbp], eax ; 5358 : if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed - 00044 83 7d 44 01 cmp DWORD PTR tga_color_type$[rbp], 1 - 00048 7e 05 jle SHORT $LN2@stbi__tga_ - 0004a e9 23 01 00 00 jmp $errorEnd$13 + 00046 83 7d 44 01 cmp DWORD PTR tga_color_type$[rbp], 1 + 0004a 7e 05 jle SHORT $LN2@stbi__tga_ + 0004c e9 26 01 00 00 jmp $errorEnd$13 $LN2@stbi__tga_: ; 5359 : sz = stbi__get8(s); // image type - 0004f 48 8b 8d 40 01 + 00051 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00056 e8 00 00 00 00 call stbi__get8 - 0005b 0f b6 c0 movzx eax, al - 0005e 89 45 24 mov DWORD PTR sz$[rbp], eax + 00058 e8 00 00 00 00 call stbi__get8 + 0005d 0f b6 c0 movzx eax, al + 00060 89 45 24 mov DWORD PTR sz$[rbp], eax ; 5360 : if (tga_color_type == 1) { // colormapped (paletted) image - 00061 83 7d 44 01 cmp DWORD PTR tga_color_type$[rbp], 1 - 00065 75 6a jne SHORT $LN3@stbi__tga_ + 00063 83 7d 44 01 cmp DWORD PTR tga_color_type$[rbp], 1 + 00067 75 6c jne SHORT $LN3@stbi__tga_ ; 5361 : if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 - 00067 83 7d 24 01 cmp DWORD PTR sz$[rbp], 1 - 0006b 74 0b je SHORT $LN5@stbi__tga_ - 0006d 83 7d 24 09 cmp DWORD PTR sz$[rbp], 9 - 00071 74 05 je SHORT $LN5@stbi__tga_ - 00073 e9 fa 00 00 00 jmp $errorEnd$13 + 00069 83 7d 24 01 cmp DWORD PTR sz$[rbp], 1 + 0006d 74 0b je SHORT $LN5@stbi__tga_ + 0006f 83 7d 24 09 cmp DWORD PTR sz$[rbp], 9 + 00073 74 05 je SHORT $LN5@stbi__tga_ + 00075 e9 fd 00 00 00 jmp $errorEnd$13 $LN5@stbi__tga_: ; 5362 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries - 00078 ba 04 00 00 00 mov edx, 4 - 0007d 48 8b 8d 40 01 + 0007a ba 04 00 00 00 mov edx, 4 + 0007f 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00084 e8 00 00 00 00 call stbi__skip + 00086 e8 00 00 00 00 call stbi__skip + 0008b 90 npad 1 ; 5363 : sz = stbi__get8(s); // check bits per palette color entry - 00089 48 8b 8d 40 01 + 0008c 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00090 e8 00 00 00 00 call stbi__get8 - 00095 0f b6 c0 movzx eax, al - 00098 89 45 24 mov DWORD PTR sz$[rbp], eax + 00093 e8 00 00 00 00 call stbi__get8 + 00098 0f b6 c0 movzx eax, al + 0009b 89 45 24 mov DWORD PTR sz$[rbp], eax ; 5364 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; - 0009b 83 7d 24 08 cmp DWORD PTR sz$[rbp], 8 - 0009f 74 1d je SHORT $LN6@stbi__tga_ - 000a1 83 7d 24 0f cmp DWORD PTR sz$[rbp], 15 - 000a5 74 17 je SHORT $LN6@stbi__tga_ - 000a7 83 7d 24 10 cmp DWORD PTR sz$[rbp], 16 - 000ab 74 11 je SHORT $LN6@stbi__tga_ - 000ad 83 7d 24 18 cmp DWORD PTR sz$[rbp], 24 - 000b1 74 0b je SHORT $LN6@stbi__tga_ - 000b3 83 7d 24 20 cmp DWORD PTR sz$[rbp], 32 ; 00000020H - 000b7 74 05 je SHORT $LN6@stbi__tga_ - 000b9 e9 b4 00 00 00 jmp $errorEnd$13 + 0009e 83 7d 24 08 cmp DWORD PTR sz$[rbp], 8 + 000a2 74 1d je SHORT $LN6@stbi__tga_ + 000a4 83 7d 24 0f cmp DWORD PTR sz$[rbp], 15 + 000a8 74 17 je SHORT $LN6@stbi__tga_ + 000aa 83 7d 24 10 cmp DWORD PTR sz$[rbp], 16 + 000ae 74 11 je SHORT $LN6@stbi__tga_ + 000b0 83 7d 24 18 cmp DWORD PTR sz$[rbp], 24 + 000b4 74 0b je SHORT $LN6@stbi__tga_ + 000b6 83 7d 24 20 cmp DWORD PTR sz$[rbp], 32 ; 00000020H + 000ba 74 05 je SHORT $LN6@stbi__tga_ + 000bc e9 b6 00 00 00 jmp $errorEnd$13 $LN6@stbi__tga_: ; 5365 : stbi__skip(s, 4); // skip image x and y origin - 000be ba 04 00 00 00 mov edx, 4 - 000c3 48 8b 8d 40 01 + 000c1 ba 04 00 00 00 mov edx, 4 + 000c6 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000ca e8 00 00 00 00 call stbi__skip + 000cd e8 00 00 00 00 call stbi__skip + 000d2 90 npad 1 ; 5366 : } - 000cf eb 2e jmp SHORT $LN4@stbi__tga_ + 000d3 eb 2f jmp SHORT $LN4@stbi__tga_ $LN3@stbi__tga_: ; 5367 : else { // "normal" image w/o colormap ; 5368 : if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE - 000d1 83 7d 24 02 cmp DWORD PTR sz$[rbp], 2 - 000d5 74 17 je SHORT $LN7@stbi__tga_ - 000d7 83 7d 24 03 cmp DWORD PTR sz$[rbp], 3 - 000db 74 11 je SHORT $LN7@stbi__tga_ - 000dd 83 7d 24 0a cmp DWORD PTR sz$[rbp], 10 - 000e1 74 0b je SHORT $LN7@stbi__tga_ - 000e3 83 7d 24 0b cmp DWORD PTR sz$[rbp], 11 - 000e7 74 05 je SHORT $LN7@stbi__tga_ - 000e9 e9 84 00 00 00 jmp $errorEnd$13 + 000d5 83 7d 24 02 cmp DWORD PTR sz$[rbp], 2 + 000d9 74 17 je SHORT $LN7@stbi__tga_ + 000db 83 7d 24 03 cmp DWORD PTR sz$[rbp], 3 + 000df 74 11 je SHORT $LN7@stbi__tga_ + 000e1 83 7d 24 0a cmp DWORD PTR sz$[rbp], 10 + 000e5 74 0b je SHORT $LN7@stbi__tga_ + 000e7 83 7d 24 0b cmp DWORD PTR sz$[rbp], 11 + 000eb 74 05 je SHORT $LN7@stbi__tga_ + 000ed e9 85 00 00 00 jmp $errorEnd$13 $LN7@stbi__tga_: ; 5369 : stbi__skip(s, 9); // skip colormap specification and image x/y origin - 000ee ba 09 00 00 00 mov edx, 9 - 000f3 48 8b 8d 40 01 + 000f2 ba 09 00 00 00 mov edx, 9 + 000f7 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000fa e8 00 00 00 00 call stbi__skip + 000fe e8 00 00 00 00 call stbi__skip + 00103 90 npad 1 $LN4@stbi__tga_: ; 5370 : } ; 5371 : if (stbi__get16le(s) < 1) goto errorEnd; // test width - 000ff 48 8b 8d 40 01 + 00104 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00106 e8 00 00 00 00 call stbi__get16le - 0010b 83 f8 01 cmp eax, 1 - 0010e 7d 02 jge SHORT $LN8@stbi__tga_ - 00110 eb 60 jmp SHORT $errorEnd$13 + 0010b e8 00 00 00 00 call stbi__get16le + 00110 83 f8 01 cmp eax, 1 + 00113 7d 02 jge SHORT $LN8@stbi__tga_ + 00115 eb 60 jmp SHORT $errorEnd$13 $LN8@stbi__tga_: ; 5372 : if (stbi__get16le(s) < 1) goto errorEnd; // test height - 00112 48 8b 8d 40 01 + 00117 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00119 e8 00 00 00 00 call stbi__get16le - 0011e 83 f8 01 cmp eax, 1 - 00121 7d 02 jge SHORT $LN9@stbi__tga_ - 00123 eb 4d jmp SHORT $errorEnd$13 + 0011e e8 00 00 00 00 call stbi__get16le + 00123 83 f8 01 cmp eax, 1 + 00126 7d 02 jge SHORT $LN9@stbi__tga_ + 00128 eb 4d jmp SHORT $errorEnd$13 $LN9@stbi__tga_: ; 5373 : sz = stbi__get8(s); // bits per pixel - 00125 48 8b 8d 40 01 + 0012a 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0012c e8 00 00 00 00 call stbi__get8 - 00131 0f b6 c0 movzx eax, al - 00134 89 45 24 mov DWORD PTR sz$[rbp], eax + 00131 e8 00 00 00 00 call stbi__get8 + 00136 0f b6 c0 movzx eax, al + 00139 89 45 24 mov DWORD PTR sz$[rbp], eax ; 5374 : if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index - 00137 83 7d 44 01 cmp DWORD PTR tga_color_type$[rbp], 1 - 0013b 75 0e jne SHORT $LN10@stbi__tga_ - 0013d 83 7d 24 08 cmp DWORD PTR sz$[rbp], 8 - 00141 74 08 je SHORT $LN10@stbi__tga_ - 00143 83 7d 24 10 cmp DWORD PTR sz$[rbp], 16 - 00147 74 02 je SHORT $LN10@stbi__tga_ - 00149 eb 27 jmp SHORT $errorEnd$13 + 0013c 83 7d 44 01 cmp DWORD PTR tga_color_type$[rbp], 1 + 00140 75 0e jne SHORT $LN10@stbi__tga_ + 00142 83 7d 24 08 cmp DWORD PTR sz$[rbp], 8 + 00146 74 08 je SHORT $LN10@stbi__tga_ + 00148 83 7d 24 10 cmp DWORD PTR sz$[rbp], 16 + 0014c 74 02 je SHORT $LN10@stbi__tga_ + 0014e eb 27 jmp SHORT $errorEnd$13 $LN10@stbi__tga_: ; 5375 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; - 0014b 83 7d 24 08 cmp DWORD PTR sz$[rbp], 8 - 0014f 74 1a je SHORT $LN11@stbi__tga_ - 00151 83 7d 24 0f cmp DWORD PTR sz$[rbp], 15 - 00155 74 14 je SHORT $LN11@stbi__tga_ - 00157 83 7d 24 10 cmp DWORD PTR sz$[rbp], 16 - 0015b 74 0e je SHORT $LN11@stbi__tga_ - 0015d 83 7d 24 18 cmp DWORD PTR sz$[rbp], 24 - 00161 74 08 je SHORT $LN11@stbi__tga_ - 00163 83 7d 24 20 cmp DWORD PTR sz$[rbp], 32 ; 00000020H - 00167 74 02 je SHORT $LN11@stbi__tga_ - 00169 eb 07 jmp SHORT $errorEnd$13 + 00150 83 7d 24 08 cmp DWORD PTR sz$[rbp], 8 + 00154 74 1a je SHORT $LN11@stbi__tga_ + 00156 83 7d 24 0f cmp DWORD PTR sz$[rbp], 15 + 0015a 74 14 je SHORT $LN11@stbi__tga_ + 0015c 83 7d 24 10 cmp DWORD PTR sz$[rbp], 16 + 00160 74 0e je SHORT $LN11@stbi__tga_ + 00162 83 7d 24 18 cmp DWORD PTR sz$[rbp], 24 + 00166 74 08 je SHORT $LN11@stbi__tga_ + 00168 83 7d 24 20 cmp DWORD PTR sz$[rbp], 32 ; 00000020H + 0016c 74 02 je SHORT $LN11@stbi__tga_ + 0016e eb 07 jmp SHORT $errorEnd$13 $LN11@stbi__tga_: ; 5376 : ; 5377 : res = 1; // if we got this far, everything's good and we can return 1 instead of 0 - 0016b c7 45 04 01 00 + 00170 c7 45 04 01 00 00 00 mov DWORD PTR res$[rbp], 1 $errorEnd$13: @@ -52434,21 +52835,22 @@ $errorEnd$13: ; 5379 : errorEnd: ; 5380 : stbi__rewind(s); - 00172 48 8b 8d 40 01 + 00177 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00179 e8 00 00 00 00 call stbi__rewind + 0017e e8 00 00 00 00 call stbi__rewind + 00183 90 npad 1 ; 5381 : return res; - 0017e 8b 45 04 mov eax, DWORD PTR res$[rbp] + 00184 8b 45 04 mov eax, DWORD PTR res$[rbp] ; 5382 : } - 00181 48 8d a5 28 01 + 00187 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 00188 5f pop rdi - 00189 5d pop rbp - 0018a c3 ret 0 + 0018e 5f pop rdi + 0018f 5d pop rbp + 00190 c3 ret 0 stbi__tga_test ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -52490,133 +52892,135 @@ stbi__bmp_info PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 6905 : void* p; ; 6906 : stbi__bmp_data info; ; 6907 : ; 6908 : info.all_a = 255; - 00058 c7 45 44 ff 00 + 00059 c7 45 44 ff 00 00 00 mov DWORD PTR info$[rbp+28], 255 ; 000000ffH ; 6909 : p = stbi__bmp_parse_header(s, &info); - 0005f 48 8d 55 28 lea rdx, QWORD PTR info$[rbp] - 00063 48 8b 8d 40 01 + 00060 48 8d 55 28 lea rdx, QWORD PTR info$[rbp] + 00064 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0006a e8 00 00 00 00 call stbi__bmp_parse_header - 0006f 48 89 45 08 mov QWORD PTR p$[rbp], rax + 0006b e8 00 00 00 00 call stbi__bmp_parse_header + 00070 48 89 45 08 mov QWORD PTR p$[rbp], rax ; 6910 : if (p == NULL) { - 00073 48 83 7d 08 00 cmp QWORD PTR p$[rbp], 0 - 00078 75 13 jne SHORT $LN2@stbi__bmp_ + 00074 48 83 7d 08 00 cmp QWORD PTR p$[rbp], 0 + 00079 75 14 jne SHORT $LN2@stbi__bmp_ ; 6911 : stbi__rewind(s); - 0007a 48 8b 8d 40 01 + 0007b 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00081 e8 00 00 00 00 call stbi__rewind + 00082 e8 00 00 00 00 call stbi__rewind + 00087 90 npad 1 ; 6912 : return 0; - 00086 33 c0 xor eax, eax - 00088 e9 91 00 00 00 jmp $LN1@stbi__bmp_ + 00088 33 c0 xor eax, eax + 0008a e9 91 00 00 00 jmp $LN1@stbi__bmp_ $LN2@stbi__bmp_: ; 6913 : } ; 6914 : if (x) *x = s->img_x; - 0008d 48 83 bd 48 01 + 0008f 48 83 bd 48 01 00 00 00 cmp QWORD PTR x$[rbp], 0 - 00095 74 12 je SHORT $LN3@stbi__bmp_ - 00097 48 8b 85 48 01 + 00097 74 12 je SHORT $LN3@stbi__bmp_ + 00099 48 8b 85 48 01 00 00 mov rax, QWORD PTR x$[rbp] - 0009e 48 8b 8d 40 01 + 000a0 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000a5 8b 09 mov ecx, DWORD PTR [rcx] - 000a7 89 08 mov DWORD PTR [rax], ecx + 000a7 8b 09 mov ecx, DWORD PTR [rcx] + 000a9 89 08 mov DWORD PTR [rax], ecx $LN3@stbi__bmp_: ; 6915 : if (y) *y = s->img_y; - 000a9 48 83 bd 50 01 + 000ab 48 83 bd 50 01 00 00 00 cmp QWORD PTR y$[rbp], 0 - 000b1 74 13 je SHORT $LN4@stbi__bmp_ - 000b3 48 8b 85 50 01 + 000b3 74 13 je SHORT $LN4@stbi__bmp_ + 000b5 48 8b 85 50 01 00 00 mov rax, QWORD PTR y$[rbp] - 000ba 48 8b 8d 40 01 + 000bc 48 8b 8d 40 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000c1 8b 49 04 mov ecx, DWORD PTR [rcx+4] - 000c4 89 08 mov DWORD PTR [rax], ecx + 000c3 8b 49 04 mov ecx, DWORD PTR [rcx+4] + 000c6 89 08 mov DWORD PTR [rax], ecx $LN4@stbi__bmp_: ; 6916 : if (comp) { - 000c6 48 83 bd 58 01 + 000c8 48 83 bd 58 01 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 000ce 74 49 je SHORT $LN5@stbi__bmp_ + 000d0 74 49 je SHORT $LN5@stbi__bmp_ ; 6917 : if (info.bpp == 24 && info.ma == 0xff000000) - 000d0 83 7d 28 18 cmp DWORD PTR info$[rbp], 24 - 000d4 75 18 jne SHORT $LN6@stbi__bmp_ - 000d6 81 7d 40 00 00 + 000d2 83 7d 28 18 cmp DWORD PTR info$[rbp], 24 + 000d6 75 18 jne SHORT $LN6@stbi__bmp_ + 000d8 81 7d 40 00 00 00 ff cmp DWORD PTR info$[rbp+24], -16777216 ; ff000000H - 000dd 75 0f jne SHORT $LN6@stbi__bmp_ + 000df 75 0f jne SHORT $LN6@stbi__bmp_ ; 6918 : *comp = 3; - 000df 48 8b 85 58 01 + 000e1 48 8b 85 58 01 00 00 mov rax, QWORD PTR comp$[rbp] - 000e6 c7 00 03 00 00 + 000e8 c7 00 03 00 00 00 mov DWORD PTR [rax], 3 - 000ec eb 2b jmp SHORT $LN7@stbi__bmp_ + 000ee eb 2b jmp SHORT $LN7@stbi__bmp_ $LN6@stbi__bmp_: ; 6919 : else ; 6920 : *comp = info.ma ? 4 : 3; - 000ee 83 7d 40 00 cmp DWORD PTR info$[rbp+24], 0 - 000f2 74 0c je SHORT $LN9@stbi__bmp_ - 000f4 c7 85 14 01 00 + 000f0 83 7d 40 00 cmp DWORD PTR info$[rbp+24], 0 + 000f4 74 0c je SHORT $LN9@stbi__bmp_ + 000f6 c7 85 14 01 00 00 04 00 00 00 mov DWORD PTR tv77[rbp], 4 - 000fe eb 0a jmp SHORT $LN10@stbi__bmp_ + 00100 eb 0a jmp SHORT $LN10@stbi__bmp_ $LN9@stbi__bmp_: - 00100 c7 85 14 01 00 + 00102 c7 85 14 01 00 00 03 00 00 00 mov DWORD PTR tv77[rbp], 3 $LN10@stbi__bmp_: - 0010a 48 8b 85 58 01 + 0010c 48 8b 85 58 01 00 00 mov rax, QWORD PTR comp$[rbp] - 00111 8b 8d 14 01 00 + 00113 8b 8d 14 01 00 00 mov ecx, DWORD PTR tv77[rbp] - 00117 89 08 mov DWORD PTR [rax], ecx + 00119 89 08 mov DWORD PTR [rax], ecx $LN7@stbi__bmp_: $LN5@stbi__bmp_: ; 6921 : } ; 6922 : return 1; - 00119 b8 01 00 00 00 mov eax, 1 + 0011b b8 01 00 00 00 mov eax, 1 $LN1@stbi__bmp_: ; 6923 : } - 0011e 48 8b f8 mov rdi, rax - 00121 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00125 48 8d 15 00 00 + 00120 48 8b f8 mov rdi, rax + 00123 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00127 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__bmp_info$rtcFrameData - 0012c e8 00 00 00 00 call _RTC_CheckStackVars - 00131 48 8b c7 mov rax, rdi - 00134 48 8b 8d 18 01 + 0012e e8 00 00 00 00 call _RTC_CheckStackVars + 00133 48 8b c7 mov rax, rdi + 00136 48 8b 8d 18 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 0013b 48 33 cd xor rcx, rbp - 0013e e8 00 00 00 00 call __security_check_cookie - 00143 48 8d a5 28 01 + 0013d 48 33 cd xor rcx, rbp + 00140 e8 00 00 00 00 call __security_check_cookie + 00145 48 8d a5 28 01 00 00 lea rsp, QWORD PTR [rbp+296] - 0014a 5f pop rdi - 0014b 5d pop rbp - 0014c c3 ret 0 + 0014c 5f pop rdi + 0014d 5d pop rbp + 0014e c3 ret 0 stbi__bmp_info ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -52664,23 +53068,23 @@ a$27 = 2244 t$28 = 2276 p1$29 = 2312 p2$30 = 2344 -tv562 = 3316 -tv522 = 3316 -tv505 = 3316 -tv384 = 3316 -tv257 = 3316 -tv188 = 3316 tv70 = 3316 -tv474 = 3320 -tv445 = 3320 -tv276 = 3320 -tv223 = 3320 -tv215 = 3320 -tv203 = 3320 -tv179 = 3320 -tv172 = 3320 +tv188 = 3316 +tv257 = 3316 +tv384 = 3316 +tv505 = 3316 +tv522 = 3316 +tv562 = 3316 tv86 = 3320 +tv172 = 3320 +tv179 = 3320 +tv203 = 3320 +tv215 = 3320 +tv223 = 3320 tv80 = 3320 +tv445 = 3320 +tv474 = 3320 +tv276 = 3320 __$ArrayPad$ = 3328 s$ = 3376 x$ = 3384 @@ -52715,23 +53119,24 @@ stbi__bmp_load PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 5057 : stbi_uc* out; ; 5058 : unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a; - 00058 c7 45 24 00 00 + 00059 c7 45 24 00 00 00 00 mov DWORD PTR mr$[rbp], 0 - 0005f c7 45 44 00 00 + 00060 c7 45 44 00 00 00 00 mov DWORD PTR mg$[rbp], 0 - 00066 c7 45 64 00 00 + 00067 c7 45 64 00 00 00 00 mov DWORD PTR mb$[rbp], 0 - 0006d c7 85 84 00 00 + 0006e c7 85 84 00 00 00 00 00 00 00 mov DWORD PTR ma$[rbp], 0 ; 5059 : stbi_uc pal[256][4]; ; 5060 : int psize = 0, i, j, width; - 00077 c7 85 e4 04 00 + 00078 c7 85 e4 04 00 00 00 00 00 00 mov DWORD PTR psize$[rbp], 0 ; 5061 : int flip_vertically, pad, target; @@ -52740,193 +53145,193 @@ stbi__bmp_load PROC ; COMDAT ; 5064 : ; 5065 : info.all_a = 255; - 00081 c7 85 e4 05 00 + 00082 c7 85 e4 05 00 00 ff 00 00 00 mov DWORD PTR info$[rbp+28], 255 ; 000000ffH ; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) - 0008b 48 8d 95 c8 05 + 0008c 48 8d 95 c8 05 00 00 lea rdx, QWORD PTR info$[rbp] - 00092 48 8b 8d 30 0d + 00093 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 00099 e8 00 00 00 00 call stbi__bmp_parse_header - 0009e 48 85 c0 test rax, rax - 000a1 75 07 jne SHORT $LN35@stbi__bmp_ + 0009a e8 00 00 00 00 call stbi__bmp_parse_header + 0009f 48 85 c0 test rax, rax + 000a2 75 07 jne SHORT $LN35@stbi__bmp_ ; 5067 : return NULL; // error code already set - 000a3 33 c0 xor eax, eax - 000a5 e9 5c 12 00 00 jmp $LN1@stbi__bmp_ + 000a4 33 c0 xor eax, eax + 000a6 e9 67 12 00 00 jmp $LN1@stbi__bmp_ $LN35@stbi__bmp_: ; 5068 : ; 5069 : flip_vertically = ((int)s->img_y) > 0; - 000aa 48 8b 85 30 0d + 000ab 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 000b1 83 78 04 00 cmp DWORD PTR [rax+4], 0 - 000b5 7e 0c jle SHORT $LN97@stbi__bmp_ - 000b7 c7 85 f4 0c 00 + 000b2 83 78 04 00 cmp DWORD PTR [rax+4], 0 + 000b6 7e 0c jle SHORT $LN97@stbi__bmp_ + 000b8 c7 85 f4 0c 00 00 01 00 00 00 mov DWORD PTR tv70[rbp], 1 - 000c1 eb 0a jmp SHORT $LN98@stbi__bmp_ + 000c2 eb 0a jmp SHORT $LN98@stbi__bmp_ $LN97@stbi__bmp_: - 000c3 c7 85 f4 0c 00 + 000c4 c7 85 f4 0c 00 00 00 00 00 00 mov DWORD PTR tv70[rbp], 0 $LN98@stbi__bmp_: - 000cd 8b 85 f4 0c 00 + 000ce 8b 85 f4 0c 00 00 mov eax, DWORD PTR tv70[rbp] - 000d3 89 85 64 05 00 + 000d4 89 85 64 05 00 00 mov DWORD PTR flip_vertically$[rbp], eax ; 5070 : s->img_y = abs((int)s->img_y); - 000d9 48 8b 85 30 0d + 000da 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 000e0 8b 48 04 mov ecx, DWORD PTR [rax+4] - 000e3 e8 00 00 00 00 call abs - 000e8 48 8b 8d 30 0d + 000e1 8b 48 04 mov ecx, DWORD PTR [rax+4] + 000e4 e8 00 00 00 00 call abs + 000e9 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 000ef 89 41 04 mov DWORD PTR [rcx+4], eax + 000f0 89 41 04 mov DWORD PTR [rcx+4], eax ; 5071 : ; 5072 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - 000f2 48 8b 85 30 0d + 000f3 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 000f9 81 78 04 00 00 + 000fa 81 78 04 00 00 00 01 cmp DWORD PTR [rax+4], 16777216 ; 01000000H - 00100 76 34 jbe SHORT $LN36@stbi__bmp_ - 00102 48 8d 0d 00 00 + 00101 76 34 jbe SHORT $LN36@stbi__bmp_ + 00103 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 00109 e8 00 00 00 00 call stbi__err - 0010e 85 c0 test eax, eax - 00110 74 0d je SHORT $LN99@stbi__bmp_ - 00112 48 c7 85 f8 0c + 0010a e8 00 00 00 00 call stbi__err + 0010f 85 c0 test eax, eax + 00111 74 0d je SHORT $LN99@stbi__bmp_ + 00113 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv80[rbp], 0 - 0011d eb 0b jmp SHORT $LN100@stbi__bmp_ + 0011e eb 0b jmp SHORT $LN100@stbi__bmp_ $LN99@stbi__bmp_: - 0011f 48 c7 85 f8 0c + 00120 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv80[rbp], 0 $LN100@stbi__bmp_: - 0012a 48 8b 85 f8 0c + 0012b 48 8b 85 f8 0c 00 00 mov rax, QWORD PTR tv80[rbp] - 00131 e9 d0 11 00 00 jmp $LN1@stbi__bmp_ + 00132 e9 db 11 00 00 jmp $LN1@stbi__bmp_ $LN36@stbi__bmp_: ; 5073 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - 00136 48 8b 85 30 0d + 00137 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 0013d 81 38 00 00 00 + 0013e 81 38 00 00 00 01 cmp DWORD PTR [rax], 16777216 ; 01000000H - 00143 76 34 jbe SHORT $LN37@stbi__bmp_ - 00145 48 8d 0d 00 00 + 00144 76 34 jbe SHORT $LN37@stbi__bmp_ + 00146 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 0014c e8 00 00 00 00 call stbi__err - 00151 85 c0 test eax, eax - 00153 74 0d je SHORT $LN101@stbi__bmp_ - 00155 48 c7 85 f8 0c + 0014d e8 00 00 00 00 call stbi__err + 00152 85 c0 test eax, eax + 00154 74 0d je SHORT $LN101@stbi__bmp_ + 00156 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv86[rbp], 0 - 00160 eb 0b jmp SHORT $LN102@stbi__bmp_ + 00161 eb 0b jmp SHORT $LN102@stbi__bmp_ $LN101@stbi__bmp_: - 00162 48 c7 85 f8 0c + 00163 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv86[rbp], 0 $LN102@stbi__bmp_: - 0016d 48 8b 85 f8 0c + 0016e 48 8b 85 f8 0c 00 00 mov rax, QWORD PTR tv86[rbp] - 00174 e9 8d 11 00 00 jmp $LN1@stbi__bmp_ + 00175 e9 98 11 00 00 jmp $LN1@stbi__bmp_ $LN37@stbi__bmp_: ; 5074 : ; 5075 : mr = info.mr; - 00179 8b 85 d4 05 00 + 0017a 8b 85 d4 05 00 00 mov eax, DWORD PTR info$[rbp+12] - 0017f 89 45 24 mov DWORD PTR mr$[rbp], eax + 00180 89 45 24 mov DWORD PTR mr$[rbp], eax ; 5076 : mg = info.mg; - 00182 8b 85 d8 05 00 + 00183 8b 85 d8 05 00 00 mov eax, DWORD PTR info$[rbp+16] - 00188 89 45 44 mov DWORD PTR mg$[rbp], eax + 00189 89 45 44 mov DWORD PTR mg$[rbp], eax ; 5077 : mb = info.mb; - 0018b 8b 85 dc 05 00 + 0018c 8b 85 dc 05 00 00 mov eax, DWORD PTR info$[rbp+20] - 00191 89 45 64 mov DWORD PTR mb$[rbp], eax + 00192 89 45 64 mov DWORD PTR mb$[rbp], eax ; 5078 : ma = info.ma; - 00194 8b 85 e0 05 00 + 00195 8b 85 e0 05 00 00 mov eax, DWORD PTR info$[rbp+24] - 0019a 89 85 84 00 00 + 0019b 89 85 84 00 00 00 mov DWORD PTR ma$[rbp], eax ; 5079 : all_a = info.all_a; - 001a0 8b 85 e4 05 00 + 001a1 8b 85 e4 05 00 00 mov eax, DWORD PTR info$[rbp+28] - 001a6 89 85 a4 00 00 + 001a7 89 85 a4 00 00 00 mov DWORD PTR all_a$[rbp], eax ; 5080 : ; 5081 : if (info.hsz == 12) { - 001ac 83 bd d0 05 00 + 001ad 83 bd d0 05 00 00 0c cmp DWORD PTR info$[rbp+8], 12 - 001b3 75 2c jne SHORT $LN38@stbi__bmp_ + 001b4 75 2c jne SHORT $LN38@stbi__bmp_ ; 5082 : if (info.bpp < 24) - 001b5 83 bd c8 05 00 + 001b6 83 bd c8 05 00 00 18 cmp DWORD PTR info$[rbp], 24 - 001bc 7d 21 jge SHORT $LN40@stbi__bmp_ + 001bd 7d 21 jge SHORT $LN40@stbi__bmp_ ; 5083 : psize = (info.offset - info.extra_read - 24) / 3; - 001be 8b 85 e8 05 00 + 001bf 8b 85 e8 05 00 00 mov eax, DWORD PTR info$[rbp+32] - 001c4 8b 8d cc 05 00 + 001c5 8b 8d cc 05 00 00 mov ecx, DWORD PTR info$[rbp+4] - 001ca 2b c8 sub ecx, eax - 001cc 8b c1 mov eax, ecx - 001ce 83 e8 18 sub eax, 24 - 001d1 99 cdq - 001d2 b9 03 00 00 00 mov ecx, 3 - 001d7 f7 f9 idiv ecx - 001d9 89 85 e4 04 00 + 001cb 2b c8 sub ecx, eax + 001cd 8b c1 mov eax, ecx + 001cf 83 e8 18 sub eax, 24 + 001d2 99 cdq + 001d3 b9 03 00 00 00 mov ecx, 3 + 001d8 f7 f9 idiv ecx + 001da 89 85 e4 04 00 00 mov DWORD PTR psize$[rbp], eax $LN40@stbi__bmp_: ; 5084 : } - 001df eb 28 jmp SHORT $LN39@stbi__bmp_ + 001e0 eb 28 jmp SHORT $LN39@stbi__bmp_ $LN38@stbi__bmp_: ; 5085 : else { ; 5086 : if (info.bpp < 16) - 001e1 83 bd c8 05 00 + 001e2 83 bd c8 05 00 00 10 cmp DWORD PTR info$[rbp], 16 - 001e8 7d 1f jge SHORT $LN41@stbi__bmp_ + 001e9 7d 1f jge SHORT $LN41@stbi__bmp_ ; 5087 : psize = (info.offset - info.extra_read - info.hsz) >> 2; - 001ea 8b 85 e8 05 00 + 001eb 8b 85 e8 05 00 00 mov eax, DWORD PTR info$[rbp+32] - 001f0 8b 8d cc 05 00 + 001f1 8b 8d cc 05 00 00 mov ecx, DWORD PTR info$[rbp+4] - 001f6 2b c8 sub ecx, eax - 001f8 8b c1 mov eax, ecx - 001fa 2b 85 d0 05 00 + 001f7 2b c8 sub ecx, eax + 001f9 8b c1 mov eax, ecx + 001fb 2b 85 d0 05 00 00 sub eax, DWORD PTR info$[rbp+8] - 00200 c1 f8 02 sar eax, 2 - 00203 89 85 e4 04 00 + 00201 c1 f8 02 sar eax, 2 + 00204 89 85 e4 04 00 00 mov DWORD PTR psize$[rbp], eax $LN41@stbi__bmp_: $LN39@stbi__bmp_: @@ -52934,72 +53339,72 @@ $LN39@stbi__bmp_: ; 5088 : } ; 5089 : if (psize == 0) { - 00209 83 bd e4 04 00 + 0020a 83 bd e4 04 00 00 00 cmp DWORD PTR psize$[rbp], 0 - 00210 0f 85 0b 01 00 + 00211 0f 85 0c 01 00 00 jne $LN42@stbi__bmp_ ; 5090 : // accept some number of extra bytes after the header, but if the offset points either to before ; 5091 : // the header ends or implies a large amount of extra data, reject the file as malformed ; 5092 : int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); - 00216 48 8b 85 30 0d + 00217 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 0021d 48 8b 8d 30 0d + 0021e 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 00224 48 8b 89 d0 00 + 00225 48 8b 89 d0 00 00 00 mov rcx, QWORD PTR [rcx+208] - 0022b 48 8b 80 c0 00 + 0022c 48 8b 80 c0 00 00 00 mov rax, QWORD PTR [rax+192] - 00232 48 2b c1 sub rax, rcx - 00235 48 8b 8d 30 0d + 00233 48 2b c1 sub rax, rcx + 00236 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 0023c 03 81 b8 00 00 + 0023d 03 81 b8 00 00 00 add eax, DWORD PTR [rcx+184] - 00242 89 85 04 06 00 + 00243 89 85 04 06 00 00 mov DWORD PTR bytes_read_so_far$5[rbp], eax ; 5093 : int header_limit = 1024; // max we actually read is below 256 bytes currently. - 00248 c7 85 24 06 00 + 00249 c7 85 24 06 00 00 00 04 00 00 mov DWORD PTR header_limit$6[rbp], 1024 ; 00000400H ; 5094 : int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. - 00252 c7 85 44 06 00 + 00253 c7 85 44 06 00 00 00 04 00 00 mov DWORD PTR extra_data_limit$7[rbp], 1024 ; 00000400H ; 5095 : if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { - 0025c 83 bd 04 06 00 + 0025d 83 bd 04 06 00 00 00 cmp DWORD PTR bytes_read_so_far$5[rbp], 0 - 00263 7e 0e jle SHORT $LN44@stbi__bmp_ - 00265 8b 85 24 06 00 + 00264 7e 0e jle SHORT $LN44@stbi__bmp_ + 00266 8b 85 24 06 00 00 mov eax, DWORD PTR header_limit$6[rbp] - 0026b 39 85 04 06 00 + 0026c 39 85 04 06 00 00 cmp DWORD PTR bytes_read_so_far$5[rbp], eax - 00271 7e 34 jle SHORT $LN43@stbi__bmp_ + 00272 7e 34 jle SHORT $LN43@stbi__bmp_ $LN44@stbi__bmp_: ; 5096 : return stbi__errpuc("bad header", "Corrupt BMP"); - 00273 48 8d 0d 00 00 + 00274 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0L@PJHPAMCH@bad?5header@ - 0027a e8 00 00 00 00 call stbi__err - 0027f 85 c0 test eax, eax - 00281 74 0d je SHORT $LN103@stbi__bmp_ - 00283 48 c7 85 f8 0c + 0027b e8 00 00 00 00 call stbi__err + 00280 85 c0 test eax, eax + 00282 74 0d je SHORT $LN103@stbi__bmp_ + 00284 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv172[rbp], 0 - 0028e eb 0b jmp SHORT $LN104@stbi__bmp_ + 0028f eb 0b jmp SHORT $LN104@stbi__bmp_ $LN103@stbi__bmp_: - 00290 48 c7 85 f8 0c + 00291 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv172[rbp], 0 $LN104@stbi__bmp_: - 0029b 48 8b 85 f8 0c + 0029c 48 8b 85 f8 0c 00 00 mov rax, QWORD PTR tv172[rbp] - 002a2 e9 5f 10 00 00 jmp $LN1@stbi__bmp_ + 002a3 e9 6a 10 00 00 jmp $LN1@stbi__bmp_ $LN43@stbi__bmp_: ; 5097 : } @@ -53009,60 +53414,61 @@ $LN43@stbi__bmp_: ; 5101 : // ensures the number computed in the second half of the test can't overflow. ; 5102 : if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { - 002a7 8b 85 04 06 00 + 002a8 8b 85 04 06 00 00 mov eax, DWORD PTR bytes_read_so_far$5[rbp] - 002ad 39 85 cc 05 00 + 002ae 39 85 cc 05 00 00 cmp DWORD PTR info$[rbp+4], eax - 002b3 7c 18 jl SHORT $LN47@stbi__bmp_ - 002b5 8b 85 04 06 00 + 002b4 7c 18 jl SHORT $LN47@stbi__bmp_ + 002b6 8b 85 04 06 00 00 mov eax, DWORD PTR bytes_read_so_far$5[rbp] - 002bb 8b 8d cc 05 00 + 002bc 8b 8d cc 05 00 00 mov ecx, DWORD PTR info$[rbp+4] - 002c1 2b c8 sub ecx, eax - 002c3 8b c1 mov eax, ecx - 002c5 3b 85 44 06 00 + 002c2 2b c8 sub ecx, eax + 002c4 8b c1 mov eax, ecx + 002c6 3b 85 44 06 00 00 cmp eax, DWORD PTR extra_data_limit$7[rbp] - 002cb 7e 36 jle SHORT $LN45@stbi__bmp_ + 002cc 7e 36 jle SHORT $LN45@stbi__bmp_ $LN47@stbi__bmp_: ; 5103 : return stbi__errpuc("bad offset", "Corrupt BMP"); - 002cd 48 8d 0d 00 00 + 002ce 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0L@JDPIFELH@bad?5offset@ - 002d4 e8 00 00 00 00 call stbi__err - 002d9 85 c0 test eax, eax - 002db 74 0d je SHORT $LN105@stbi__bmp_ - 002dd 48 c7 85 f8 0c + 002d5 e8 00 00 00 00 call stbi__err + 002da 85 c0 test eax, eax + 002dc 74 0d je SHORT $LN105@stbi__bmp_ + 002de 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv179[rbp], 0 - 002e8 eb 0b jmp SHORT $LN106@stbi__bmp_ + 002e9 eb 0b jmp SHORT $LN106@stbi__bmp_ $LN105@stbi__bmp_: - 002ea 48 c7 85 f8 0c + 002eb 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv179[rbp], 0 $LN106@stbi__bmp_: - 002f5 48 8b 85 f8 0c + 002f6 48 8b 85 f8 0c 00 00 mov rax, QWORD PTR tv179[rbp] - 002fc e9 05 10 00 00 jmp $LN1@stbi__bmp_ + 002fd e9 10 10 00 00 jmp $LN1@stbi__bmp_ ; 5104 : } - 00301 eb 1e jmp SHORT $LN46@stbi__bmp_ + 00302 eb 1f jmp SHORT $LN46@stbi__bmp_ $LN45@stbi__bmp_: ; 5105 : else { ; 5106 : stbi__skip(s, info.offset - bytes_read_so_far); - 00303 8b 85 04 06 00 + 00304 8b 85 04 06 00 00 mov eax, DWORD PTR bytes_read_so_far$5[rbp] - 00309 8b 8d cc 05 00 + 0030a 8b 8d cc 05 00 00 mov ecx, DWORD PTR info$[rbp+4] - 0030f 2b c8 sub ecx, eax - 00311 8b c1 mov eax, ecx - 00313 8b d0 mov edx, eax - 00315 48 8b 8d 30 0d + 00310 2b c8 sub ecx, eax + 00312 8b c1 mov eax, ecx + 00314 8b d0 mov edx, eax + 00316 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 0031c e8 00 00 00 00 call stbi__skip + 0031d e8 00 00 00 00 call stbi__skip + 00322 90 npad 1 $LN46@stbi__bmp_: $LN42@stbi__bmp_: @@ -53071,67 +53477,67 @@ $LN42@stbi__bmp_: ; 5109 : ; 5110 : if (info.bpp == 24 && ma == 0xff000000) - 00321 83 bd c8 05 00 + 00323 83 bd c8 05 00 00 18 cmp DWORD PTR info$[rbp], 24 - 00328 75 1c jne SHORT $LN48@stbi__bmp_ - 0032a 81 bd 84 00 00 + 0032a 75 1c jne SHORT $LN48@stbi__bmp_ + 0032c 81 bd 84 00 00 00 00 00 00 ff cmp DWORD PTR ma$[rbp], -16777216 ; ff000000H - 00334 75 10 jne SHORT $LN48@stbi__bmp_ + 00336 75 10 jne SHORT $LN48@stbi__bmp_ ; 5111 : s->img_n = 3; - 00336 48 8b 85 30 0d + 00338 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 0033d c7 40 08 03 00 + 0033f c7 40 08 03 00 00 00 mov DWORD PTR [rax+8], 3 - 00344 eb 2f jmp SHORT $LN49@stbi__bmp_ + 00346 eb 2f jmp SHORT $LN49@stbi__bmp_ $LN48@stbi__bmp_: ; 5112 : else ; 5113 : s->img_n = ma ? 4 : 3; - 00346 83 bd 84 00 00 + 00348 83 bd 84 00 00 00 00 cmp DWORD PTR ma$[rbp], 0 - 0034d 74 0c je SHORT $LN107@stbi__bmp_ - 0034f c7 85 f4 0c 00 + 0034f 74 0c je SHORT $LN107@stbi__bmp_ + 00351 c7 85 f4 0c 00 00 04 00 00 00 mov DWORD PTR tv188[rbp], 4 - 00359 eb 0a jmp SHORT $LN108@stbi__bmp_ + 0035b eb 0a jmp SHORT $LN108@stbi__bmp_ $LN107@stbi__bmp_: - 0035b c7 85 f4 0c 00 + 0035d c7 85 f4 0c 00 00 03 00 00 00 mov DWORD PTR tv188[rbp], 3 $LN108@stbi__bmp_: - 00365 48 8b 85 30 0d + 00367 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 0036c 8b 8d f4 0c 00 + 0036e 8b 8d f4 0c 00 00 mov ecx, DWORD PTR tv188[rbp] - 00372 89 48 08 mov DWORD PTR [rax+8], ecx + 00374 89 48 08 mov DWORD PTR [rax+8], ecx $LN49@stbi__bmp_: ; 5114 : if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 - 00375 83 bd 50 0d 00 + 00377 83 bd 50 0d 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 0037c 74 17 je SHORT $LN50@stbi__bmp_ - 0037e 83 bd 50 0d 00 + 0037e 74 17 je SHORT $LN50@stbi__bmp_ + 00380 83 bd 50 0d 00 00 03 cmp DWORD PTR req_comp$[rbp], 3 - 00385 7c 0e jl SHORT $LN50@stbi__bmp_ + 00387 7c 0e jl SHORT $LN50@stbi__bmp_ ; 5115 : target = req_comp; - 00387 8b 85 50 0d 00 + 00389 8b 85 50 0d 00 00 mov eax, DWORD PTR req_comp$[rbp] - 0038d 89 85 a4 05 00 + 0038f 89 85 a4 05 00 00 mov DWORD PTR target$[rbp], eax - 00393 eb 10 jmp SHORT $LN51@stbi__bmp_ + 00395 eb 10 jmp SHORT $LN51@stbi__bmp_ $LN50@stbi__bmp_: ; 5116 : else ; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert - 00395 48 8b 85 30 0d + 00397 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 0039c 8b 40 08 mov eax, DWORD PTR [rax+8] - 0039f 89 85 a4 05 00 + 0039e 8b 40 08 mov eax, DWORD PTR [rax+8] + 003a1 89 85 a4 05 00 00 mov DWORD PTR target$[rbp], eax $LN51@stbi__bmp_: @@ -53139,927 +53545,934 @@ $LN51@stbi__bmp_: ; 5119 : // sanity-check size ; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) - 003a5 45 33 c9 xor r9d, r9d - 003a8 48 8b 85 30 0d + 003a7 45 33 c9 xor r9d, r9d + 003aa 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 003af 44 8b 40 04 mov r8d, DWORD PTR [rax+4] - 003b3 48 8b 85 30 0d + 003b1 44 8b 40 04 mov r8d, DWORD PTR [rax+4] + 003b5 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 003ba 8b 10 mov edx, DWORD PTR [rax] - 003bc 8b 8d a4 05 00 + 003bc 8b 10 mov edx, DWORD PTR [rax] + 003be 8b 8d a4 05 00 00 mov ecx, DWORD PTR target$[rbp] - 003c2 e8 00 00 00 00 call stbi__mad3sizes_valid - 003c7 85 c0 test eax, eax - 003c9 75 34 jne SHORT $LN52@stbi__bmp_ + 003c4 e8 00 00 00 00 call stbi__mad3sizes_valid + 003c9 85 c0 test eax, eax + 003cb 75 34 jne SHORT $LN52@stbi__bmp_ ; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); - 003cb 48 8d 0d 00 00 + 003cd 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 003d2 e8 00 00 00 00 call stbi__err - 003d7 85 c0 test eax, eax - 003d9 74 0d je SHORT $LN109@stbi__bmp_ - 003db 48 c7 85 f8 0c + 003d4 e8 00 00 00 00 call stbi__err + 003d9 85 c0 test eax, eax + 003db 74 0d je SHORT $LN109@stbi__bmp_ + 003dd 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv203[rbp], 0 - 003e6 eb 0b jmp SHORT $LN110@stbi__bmp_ + 003e8 eb 0b jmp SHORT $LN110@stbi__bmp_ $LN109@stbi__bmp_: - 003e8 48 c7 85 f8 0c + 003ea 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv203[rbp], 0 $LN110@stbi__bmp_: - 003f3 48 8b 85 f8 0c + 003f5 48 8b 85 f8 0c 00 00 mov rax, QWORD PTR tv203[rbp] - 003fa e9 07 0f 00 00 jmp $LN1@stbi__bmp_ + 003fc e9 11 0f 00 00 jmp $LN1@stbi__bmp_ $LN52@stbi__bmp_: ; 5122 : ; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); - 003ff 45 33 c9 xor r9d, r9d - 00402 48 8b 85 30 0d + 00401 45 33 c9 xor r9d, r9d + 00404 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 00409 44 8b 40 04 mov r8d, DWORD PTR [rax+4] - 0040d 48 8b 85 30 0d + 0040b 44 8b 40 04 mov r8d, DWORD PTR [rax+4] + 0040f 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 00414 8b 10 mov edx, DWORD PTR [rax] - 00416 8b 8d a4 05 00 + 00416 8b 10 mov edx, DWORD PTR [rax] + 00418 8b 8d a4 05 00 00 mov ecx, DWORD PTR target$[rbp] - 0041c e8 00 00 00 00 call stbi__malloc_mad3 - 00421 48 89 45 08 mov QWORD PTR out$[rbp], rax + 0041e e8 00 00 00 00 call stbi__malloc_mad3 + 00423 48 89 45 08 mov QWORD PTR out$[rbp], rax ; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); - 00425 48 83 7d 08 00 cmp QWORD PTR out$[rbp], 0 - 0042a 75 34 jne SHORT $LN53@stbi__bmp_ - 0042c 48 8d 0d 00 00 + 00427 48 83 7d 08 00 cmp QWORD PTR out$[rbp], 0 + 0042c 75 34 jne SHORT $LN53@stbi__bmp_ + 0042e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 00433 e8 00 00 00 00 call stbi__err - 00438 85 c0 test eax, eax - 0043a 74 0d je SHORT $LN111@stbi__bmp_ - 0043c 48 c7 85 f8 0c + 00435 e8 00 00 00 00 call stbi__err + 0043a 85 c0 test eax, eax + 0043c 74 0d je SHORT $LN111@stbi__bmp_ + 0043e 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv215[rbp], 0 - 00447 eb 0b jmp SHORT $LN112@stbi__bmp_ + 00449 eb 0b jmp SHORT $LN112@stbi__bmp_ $LN111@stbi__bmp_: - 00449 48 c7 85 f8 0c + 0044b 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv215[rbp], 0 $LN112@stbi__bmp_: - 00454 48 8b 85 f8 0c + 00456 48 8b 85 f8 0c 00 00 mov rax, QWORD PTR tv215[rbp] - 0045b e9 a6 0e 00 00 jmp $LN1@stbi__bmp_ + 0045d e9 b0 0e 00 00 jmp $LN1@stbi__bmp_ $LN53@stbi__bmp_: ; 5125 : if (info.bpp < 16) { - 00460 83 bd c8 05 00 + 00462 83 bd c8 05 00 00 10 cmp DWORD PTR info$[rbp], 16 - 00467 0f 8d c8 06 00 + 00469 0f 8d ce 06 00 00 jge $LN54@stbi__bmp_ ; 5126 : int z = 0; - 0046d c7 85 64 06 00 + 0046f c7 85 64 06 00 00 00 00 00 00 mov DWORD PTR z$8[rbp], 0 ; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } - 00477 83 bd e4 04 00 + 00479 83 bd e4 04 00 00 00 cmp DWORD PTR psize$[rbp], 0 - 0047e 74 0c je SHORT $LN57@stbi__bmp_ - 00480 81 bd e4 04 00 + 00480 74 0c je SHORT $LN57@stbi__bmp_ + 00482 81 bd e4 04 00 00 00 01 00 00 cmp DWORD PTR psize$[rbp], 256 ; 00000100H - 0048a 7e 3e jle SHORT $LN56@stbi__bmp_ + 0048c 7e 3f jle SHORT $LN56@stbi__bmp_ $LN57@stbi__bmp_: - 0048c 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 00490 ff 15 00 00 00 + 0048e 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 00492 ff 15 00 00 00 00 call QWORD PTR __imp_free - 00496 48 8d 0d 00 00 + 00498 90 npad 1 + 00499 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07MALOAKCI@invalid@ - 0049d e8 00 00 00 00 call stbi__err - 004a2 85 c0 test eax, eax - 004a4 74 0d je SHORT $LN113@stbi__bmp_ - 004a6 48 c7 85 f8 0c + 004a0 e8 00 00 00 00 call stbi__err + 004a5 85 c0 test eax, eax + 004a7 74 0d je SHORT $LN113@stbi__bmp_ + 004a9 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv223[rbp], 0 - 004b1 eb 0b jmp SHORT $LN114@stbi__bmp_ + 004b4 eb 0b jmp SHORT $LN114@stbi__bmp_ $LN113@stbi__bmp_: - 004b3 48 c7 85 f8 0c + 004b6 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv223[rbp], 0 $LN114@stbi__bmp_: - 004be 48 8b 85 f8 0c + 004c1 48 8b 85 f8 0c 00 00 mov rax, QWORD PTR tv223[rbp] - 004c5 e9 3c 0e 00 00 jmp $LN1@stbi__bmp_ + 004c8 e9 45 0e 00 00 jmp $LN1@stbi__bmp_ $LN56@stbi__bmp_: ; 5128 : for (i = 0; i < psize; ++i) { - 004ca c7 85 04 05 00 + 004cd c7 85 04 05 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 004d4 eb 0e jmp SHORT $LN4@stbi__bmp_ + 004d7 eb 0e jmp SHORT $LN4@stbi__bmp_ $LN2@stbi__bmp_: - 004d6 8b 85 04 05 00 + 004d9 8b 85 04 05 00 00 mov eax, DWORD PTR i$[rbp] - 004dc ff c0 inc eax - 004de 89 85 04 05 00 + 004df ff c0 inc eax + 004e1 89 85 04 05 00 00 mov DWORD PTR i$[rbp], eax $LN4@stbi__bmp_: - 004e4 8b 85 e4 04 00 + 004e7 8b 85 e4 04 00 00 mov eax, DWORD PTR psize$[rbp] - 004ea 39 85 04 05 00 + 004ed 39 85 04 05 00 00 cmp DWORD PTR i$[rbp], eax - 004f0 0f 8d ab 00 00 + 004f3 0f 8d ac 00 00 00 jge $LN3@stbi__bmp_ ; 5129 : pal[i][2] = stbi__get8(s); - 004f6 48 8b 8d 30 0d + 004f9 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 004fd e8 00 00 00 00 call stbi__get8 - 00502 48 63 8d 04 05 + 00500 e8 00 00 00 00 call stbi__get8 + 00505 48 63 8d 04 05 00 00 movsxd rcx, DWORD PTR i$[rbp] - 00509 48 8d 8c 8d d0 + 0050c 48 8d 8c 8d d0 00 00 00 lea rcx, QWORD PTR pal$[rbp+rcx*4] - 00511 ba 01 00 00 00 mov edx, 1 - 00516 48 6b d2 02 imul rdx, rdx, 2 - 0051a 88 04 11 mov BYTE PTR [rcx+rdx], al + 00514 ba 01 00 00 00 mov edx, 1 + 00519 48 6b d2 02 imul rdx, rdx, 2 + 0051d 88 04 11 mov BYTE PTR [rcx+rdx], al ; 5130 : pal[i][1] = stbi__get8(s); - 0051d 48 8b 8d 30 0d + 00520 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 00524 e8 00 00 00 00 call stbi__get8 - 00529 48 63 8d 04 05 + 00527 e8 00 00 00 00 call stbi__get8 + 0052c 48 63 8d 04 05 00 00 movsxd rcx, DWORD PTR i$[rbp] - 00530 48 8d 8c 8d d0 + 00533 48 8d 8c 8d d0 00 00 00 lea rcx, QWORD PTR pal$[rbp+rcx*4] - 00538 ba 01 00 00 00 mov edx, 1 - 0053d 48 6b d2 01 imul rdx, rdx, 1 - 00541 88 04 11 mov BYTE PTR [rcx+rdx], al + 0053b ba 01 00 00 00 mov edx, 1 + 00540 48 6b d2 01 imul rdx, rdx, 1 + 00544 88 04 11 mov BYTE PTR [rcx+rdx], al ; 5131 : pal[i][0] = stbi__get8(s); - 00544 48 8b 8d 30 0d + 00547 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 0054b e8 00 00 00 00 call stbi__get8 - 00550 48 63 8d 04 05 + 0054e e8 00 00 00 00 call stbi__get8 + 00553 48 63 8d 04 05 00 00 movsxd rcx, DWORD PTR i$[rbp] - 00557 48 8d 8c 8d d0 + 0055a 48 8d 8c 8d d0 00 00 00 lea rcx, QWORD PTR pal$[rbp+rcx*4] - 0055f ba 01 00 00 00 mov edx, 1 - 00564 48 6b d2 00 imul rdx, rdx, 0 - 00568 88 04 11 mov BYTE PTR [rcx+rdx], al + 00562 ba 01 00 00 00 mov edx, 1 + 00567 48 6b d2 00 imul rdx, rdx, 0 + 0056b 88 04 11 mov BYTE PTR [rcx+rdx], al ; 5132 : if (info.hsz != 12) stbi__get8(s); - 0056b 83 bd d0 05 00 + 0056e 83 bd d0 05 00 00 0c cmp DWORD PTR info$[rbp+8], 12 - 00572 74 0c je SHORT $LN58@stbi__bmp_ - 00574 48 8b 8d 30 0d + 00575 74 0d je SHORT $LN58@stbi__bmp_ + 00577 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 0057b e8 00 00 00 00 call stbi__get8 + 0057e e8 00 00 00 00 call stbi__get8 + 00583 90 npad 1 $LN58@stbi__bmp_: ; 5133 : pal[i][3] = 255; - 00580 48 63 85 04 05 + 00584 48 63 85 04 05 00 00 movsxd rax, DWORD PTR i$[rbp] - 00587 48 8d 84 85 d0 + 0058b 48 8d 84 85 d0 00 00 00 lea rax, QWORD PTR pal$[rbp+rax*4] - 0058f b9 01 00 00 00 mov ecx, 1 - 00594 48 6b c9 03 imul rcx, rcx, 3 - 00598 c6 04 08 ff mov BYTE PTR [rax+rcx], 255 ; 000000ffH + 00593 b9 01 00 00 00 mov ecx, 1 + 00598 48 6b c9 03 imul rcx, rcx, 3 + 0059c c6 04 08 ff mov BYTE PTR [rax+rcx], 255 ; 000000ffH ; 5134 : } - 0059c e9 35 ff ff ff jmp $LN2@stbi__bmp_ + 005a0 e9 34 ff ff ff jmp $LN2@stbi__bmp_ $LN3@stbi__bmp_: ; 5135 : stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); - 005a1 83 bd d0 05 00 + 005a5 83 bd d0 05 00 00 0c cmp DWORD PTR info$[rbp+8], 12 - 005a8 75 0c jne SHORT $LN115@stbi__bmp_ - 005aa c7 85 f4 0c 00 + 005ac 75 0c jne SHORT $LN115@stbi__bmp_ + 005ae c7 85 f4 0c 00 00 03 00 00 00 mov DWORD PTR tv257[rbp], 3 - 005b4 eb 0a jmp SHORT $LN116@stbi__bmp_ + 005b8 eb 0a jmp SHORT $LN116@stbi__bmp_ $LN115@stbi__bmp_: - 005b6 c7 85 f4 0c 00 + 005ba c7 85 f4 0c 00 00 04 00 00 00 mov DWORD PTR tv257[rbp], 4 $LN116@stbi__bmp_: - 005c0 8b 85 e8 05 00 + 005c4 8b 85 e8 05 00 00 mov eax, DWORD PTR info$[rbp+32] - 005c6 8b 8d cc 05 00 + 005ca 8b 8d cc 05 00 00 mov ecx, DWORD PTR info$[rbp+4] - 005cc 2b c8 sub ecx, eax - 005ce 8b c1 mov eax, ecx - 005d0 2b 85 d0 05 00 + 005d0 2b c8 sub ecx, eax + 005d2 8b c1 mov eax, ecx + 005d4 2b 85 d0 05 00 00 sub eax, DWORD PTR info$[rbp+8] - 005d6 8b 8d e4 04 00 + 005da 8b 8d e4 04 00 00 mov ecx, DWORD PTR psize$[rbp] - 005dc 0f af 8d f4 0c + 005e0 0f af 8d f4 0c 00 00 imul ecx, DWORD PTR tv257[rbp] - 005e3 2b c1 sub eax, ecx - 005e5 8b d0 mov edx, eax - 005e7 48 8b 8d 30 0d + 005e7 2b c1 sub eax, ecx + 005e9 8b d0 mov edx, eax + 005eb 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 005ee e8 00 00 00 00 call stbi__skip + 005f2 e8 00 00 00 00 call stbi__skip + 005f7 90 npad 1 ; 5136 : if (info.bpp == 1) width = (s->img_x + 7) >> 3; - 005f3 83 bd c8 05 00 + 005f8 83 bd c8 05 00 00 01 cmp DWORD PTR info$[rbp], 1 - 005fa 75 17 jne SHORT $LN59@stbi__bmp_ - 005fc 48 8b 85 30 0d + 005ff 75 17 jne SHORT $LN59@stbi__bmp_ + 00601 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 00603 8b 00 mov eax, DWORD PTR [rax] - 00605 83 c0 07 add eax, 7 - 00608 c1 e8 03 shr eax, 3 - 0060b 89 85 44 05 00 + 00608 8b 00 mov eax, DWORD PTR [rax] + 0060a 83 c0 07 add eax, 7 + 0060d c1 e8 03 shr eax, 3 + 00610 89 85 44 05 00 00 mov DWORD PTR width$[rbp], eax - 00611 eb 76 jmp SHORT $LN60@stbi__bmp_ + 00616 eb 77 jmp SHORT $LN60@stbi__bmp_ $LN59@stbi__bmp_: ; 5137 : else if (info.bpp == 4) width = (s->img_x + 1) >> 1; - 00613 83 bd c8 05 00 + 00618 83 bd c8 05 00 00 04 cmp DWORD PTR info$[rbp], 4 - 0061a 75 15 jne SHORT $LN61@stbi__bmp_ - 0061c 48 8b 85 30 0d + 0061f 75 15 jne SHORT $LN61@stbi__bmp_ + 00621 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 00623 8b 00 mov eax, DWORD PTR [rax] - 00625 ff c0 inc eax - 00627 d1 e8 shr eax, 1 - 00629 89 85 44 05 00 + 00628 8b 00 mov eax, DWORD PTR [rax] + 0062a ff c0 inc eax + 0062c d1 e8 shr eax, 1 + 0062e 89 85 44 05 00 00 mov DWORD PTR width$[rbp], eax - 0062f eb 58 jmp SHORT $LN62@stbi__bmp_ + 00634 eb 59 jmp SHORT $LN62@stbi__bmp_ $LN61@stbi__bmp_: ; 5138 : else if (info.bpp == 8) width = s->img_x; - 00631 83 bd c8 05 00 + 00636 83 bd c8 05 00 00 08 cmp DWORD PTR info$[rbp], 8 - 00638 75 11 jne SHORT $LN63@stbi__bmp_ - 0063a 48 8b 85 30 0d + 0063d 75 11 jne SHORT $LN63@stbi__bmp_ + 0063f 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 00641 8b 00 mov eax, DWORD PTR [rax] - 00643 89 85 44 05 00 + 00646 8b 00 mov eax, DWORD PTR [rax] + 00648 89 85 44 05 00 00 mov DWORD PTR width$[rbp], eax - 00649 eb 3e jmp SHORT $LN64@stbi__bmp_ + 0064e eb 3f jmp SHORT $LN64@stbi__bmp_ $LN63@stbi__bmp_: ; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } - 0064b 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 0064f ff 15 00 00 00 + 00650 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 00654 ff 15 00 00 00 00 call QWORD PTR __imp_free - 00655 48 8d 0d 00 00 + 0065a 90 npad 1 + 0065b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_07JNJHIMGH@bad?5bpp@ - 0065c e8 00 00 00 00 call stbi__err - 00661 85 c0 test eax, eax - 00663 74 0d je SHORT $LN117@stbi__bmp_ - 00665 48 c7 85 f8 0c + 00662 e8 00 00 00 00 call stbi__err + 00667 85 c0 test eax, eax + 00669 74 0d je SHORT $LN117@stbi__bmp_ + 0066b 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv276[rbp], 0 - 00670 eb 0b jmp SHORT $LN118@stbi__bmp_ + 00676 eb 0b jmp SHORT $LN118@stbi__bmp_ $LN117@stbi__bmp_: - 00672 48 c7 85 f8 0c + 00678 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv276[rbp], 0 $LN118@stbi__bmp_: - 0067d 48 8b 85 f8 0c + 00683 48 8b 85 f8 0c 00 00 mov rax, QWORD PTR tv276[rbp] - 00684 e9 7d 0c 00 00 jmp $LN1@stbi__bmp_ + 0068a e9 83 0c 00 00 jmp $LN1@stbi__bmp_ $LN64@stbi__bmp_: $LN62@stbi__bmp_: $LN60@stbi__bmp_: ; 5140 : pad = (-width) & 3; - 00689 8b 85 44 05 00 + 0068f 8b 85 44 05 00 00 mov eax, DWORD PTR width$[rbp] - 0068f f7 d8 neg eax - 00691 83 e0 03 and eax, 3 - 00694 89 85 84 05 00 + 00695 f7 d8 neg eax + 00697 83 e0 03 and eax, 3 + 0069a 89 85 84 05 00 00 mov DWORD PTR pad$[rbp], eax ; 5141 : if (info.bpp == 1) { - 0069a 83 bd c8 05 00 + 006a0 83 bd c8 05 00 00 01 cmp DWORD PTR info$[rbp], 1 - 006a1 0f 85 d5 01 00 + 006a7 0f 85 d6 01 00 00 jne $LN65@stbi__bmp_ ; 5142 : for (j = 0; j < (int)s->img_y; ++j) { - 006a7 c7 85 24 05 00 + 006ad c7 85 24 05 00 00 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 006b1 eb 0e jmp SHORT $LN7@stbi__bmp_ + 006b7 eb 0e jmp SHORT $LN7@stbi__bmp_ $LN5@stbi__bmp_: - 006b3 8b 85 24 05 00 + 006b9 8b 85 24 05 00 00 mov eax, DWORD PTR j$[rbp] - 006b9 ff c0 inc eax - 006bb 89 85 24 05 00 + 006bf ff c0 inc eax + 006c1 89 85 24 05 00 00 mov DWORD PTR j$[rbp], eax $LN7@stbi__bmp_: - 006c1 48 8b 85 30 0d + 006c7 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 006c8 8b 40 04 mov eax, DWORD PTR [rax+4] - 006cb 39 85 24 05 00 + 006ce 8b 40 04 mov eax, DWORD PTR [rax+4] + 006d1 39 85 24 05 00 00 cmp DWORD PTR j$[rbp], eax - 006d1 0f 8d a0 01 00 + 006d7 0f 8d a1 01 00 00 jge $LN6@stbi__bmp_ ; 5143 : int bit_offset = 7, v = stbi__get8(s); - 006d7 c7 85 84 06 00 + 006dd c7 85 84 06 00 00 07 00 00 00 mov DWORD PTR bit_offset$9[rbp], 7 - 006e1 48 8b 8d 30 0d + 006e7 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 006e8 e8 00 00 00 00 call stbi__get8 - 006ed 0f b6 c0 movzx eax, al - 006f0 89 85 a4 06 00 + 006ee e8 00 00 00 00 call stbi__get8 + 006f3 0f b6 c0 movzx eax, al + 006f6 89 85 a4 06 00 00 mov DWORD PTR v$10[rbp], eax ; 5144 : for (i = 0; i < (int)s->img_x; ++i) { - 006f6 c7 85 04 05 00 + 006fc c7 85 04 05 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00700 eb 0e jmp SHORT $LN10@stbi__bmp_ + 00706 eb 0e jmp SHORT $LN10@stbi__bmp_ $LN8@stbi__bmp_: - 00702 8b 85 04 05 00 + 00708 8b 85 04 05 00 00 mov eax, DWORD PTR i$[rbp] - 00708 ff c0 inc eax - 0070a 89 85 04 05 00 + 0070e ff c0 inc eax + 00710 89 85 04 05 00 00 mov DWORD PTR i$[rbp], eax $LN10@stbi__bmp_: - 00710 48 8b 85 30 0d + 00716 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 00717 8b 00 mov eax, DWORD PTR [rax] - 00719 39 85 04 05 00 + 0071d 8b 00 mov eax, DWORD PTR [rax] + 0071f 39 85 04 05 00 00 cmp DWORD PTR i$[rbp], eax - 0071f 0f 8d 3b 01 00 + 00725 0f 8d 3b 01 00 00 jge $LN9@stbi__bmp_ ; 5145 : int color = (v >> bit_offset) & 0x1; - 00725 8b 85 84 06 00 + 0072b 8b 85 84 06 00 00 mov eax, DWORD PTR bit_offset$9[rbp] - 0072b 0f b6 c8 movzx ecx, al - 0072e 8b 85 a4 06 00 + 00731 0f b6 c8 movzx ecx, al + 00734 8b 85 a4 06 00 00 mov eax, DWORD PTR v$10[rbp] - 00734 d3 f8 sar eax, cl - 00736 83 e0 01 and eax, 1 - 00739 89 85 c4 06 00 + 0073a d3 f8 sar eax, cl + 0073c 83 e0 01 and eax, 1 + 0073f 89 85 c4 06 00 00 mov DWORD PTR color$11[rbp], eax ; 5146 : out[z++] = pal[color][0]; - 0073f 48 63 85 c4 06 + 00745 48 63 85 c4 06 00 00 movsxd rax, DWORD PTR color$11[rbp] - 00746 48 8d 84 85 d0 + 0074c 48 8d 84 85 d0 00 00 00 lea rax, QWORD PTR pal$[rbp+rax*4] - 0074e b9 01 00 00 00 mov ecx, 1 - 00753 48 6b c9 00 imul rcx, rcx, 0 - 00757 48 63 95 64 06 + 00754 b9 01 00 00 00 mov ecx, 1 + 00759 48 6b c9 00 imul rcx, rcx, 0 + 0075d 48 63 95 64 06 00 00 movsxd rdx, DWORD PTR z$8[rbp] - 0075e 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] - 00762 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 00766 41 88 04 10 mov BYTE PTR [r8+rdx], al - 0076a 8b 85 64 06 00 + 00764 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] + 00768 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 0076c 41 88 04 10 mov BYTE PTR [r8+rdx], al + 00770 8b 85 64 06 00 00 mov eax, DWORD PTR z$8[rbp] - 00770 ff c0 inc eax - 00772 89 85 64 06 00 + 00776 ff c0 inc eax + 00778 89 85 64 06 00 00 mov DWORD PTR z$8[rbp], eax ; 5147 : out[z++] = pal[color][1]; - 00778 48 63 85 c4 06 + 0077e 48 63 85 c4 06 00 00 movsxd rax, DWORD PTR color$11[rbp] - 0077f 48 8d 84 85 d0 + 00785 48 8d 84 85 d0 00 00 00 lea rax, QWORD PTR pal$[rbp+rax*4] - 00787 b9 01 00 00 00 mov ecx, 1 - 0078c 48 6b c9 01 imul rcx, rcx, 1 - 00790 48 63 95 64 06 + 0078d b9 01 00 00 00 mov ecx, 1 + 00792 48 6b c9 01 imul rcx, rcx, 1 + 00796 48 63 95 64 06 00 00 movsxd rdx, DWORD PTR z$8[rbp] - 00797 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] - 0079b 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 0079f 41 88 04 10 mov BYTE PTR [r8+rdx], al - 007a3 8b 85 64 06 00 + 0079d 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] + 007a1 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 007a5 41 88 04 10 mov BYTE PTR [r8+rdx], al + 007a9 8b 85 64 06 00 00 mov eax, DWORD PTR z$8[rbp] - 007a9 ff c0 inc eax - 007ab 89 85 64 06 00 + 007af ff c0 inc eax + 007b1 89 85 64 06 00 00 mov DWORD PTR z$8[rbp], eax ; 5148 : out[z++] = pal[color][2]; - 007b1 48 63 85 c4 06 + 007b7 48 63 85 c4 06 00 00 movsxd rax, DWORD PTR color$11[rbp] - 007b8 48 8d 84 85 d0 + 007be 48 8d 84 85 d0 00 00 00 lea rax, QWORD PTR pal$[rbp+rax*4] - 007c0 b9 01 00 00 00 mov ecx, 1 - 007c5 48 6b c9 02 imul rcx, rcx, 2 - 007c9 48 63 95 64 06 + 007c6 b9 01 00 00 00 mov ecx, 1 + 007cb 48 6b c9 02 imul rcx, rcx, 2 + 007cf 48 63 95 64 06 00 00 movsxd rdx, DWORD PTR z$8[rbp] - 007d0 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] - 007d4 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 007d8 41 88 04 10 mov BYTE PTR [r8+rdx], al - 007dc 8b 85 64 06 00 + 007d6 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] + 007da 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 007de 41 88 04 10 mov BYTE PTR [r8+rdx], al + 007e2 8b 85 64 06 00 00 mov eax, DWORD PTR z$8[rbp] - 007e2 ff c0 inc eax - 007e4 89 85 64 06 00 + 007e8 ff c0 inc eax + 007ea 89 85 64 06 00 00 mov DWORD PTR z$8[rbp], eax ; 5149 : if (target == 4) out[z++] = 255; - 007ea 83 bd a4 05 00 + 007f0 83 bd a4 05 00 00 04 cmp DWORD PTR target$[rbp], 4 - 007f1 75 1d jne SHORT $LN67@stbi__bmp_ - 007f3 48 63 85 64 06 + 007f7 75 1d jne SHORT $LN67@stbi__bmp_ + 007f9 48 63 85 64 06 00 00 movsxd rax, DWORD PTR z$8[rbp] - 007fa 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 007fe c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 00802 8b 85 64 06 00 + 00800 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 00804 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00808 8b 85 64 06 00 00 mov eax, DWORD PTR z$8[rbp] - 00808 ff c0 inc eax - 0080a 89 85 64 06 00 + 0080e ff c0 inc eax + 00810 89 85 64 06 00 00 mov DWORD PTR z$8[rbp], eax $LN67@stbi__bmp_: ; 5150 : if (i + 1 == (int)s->img_x) break; - 00810 8b 85 04 05 00 + 00816 8b 85 04 05 00 00 mov eax, DWORD PTR i$[rbp] - 00816 ff c0 inc eax - 00818 48 8b 8d 30 0d + 0081c ff c0 inc eax + 0081e 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 0081f 3b 01 cmp eax, DWORD PTR [rcx] - 00821 75 02 jne SHORT $LN68@stbi__bmp_ - 00823 eb 3b jmp SHORT $LN9@stbi__bmp_ + 00825 3b 01 cmp eax, DWORD PTR [rcx] + 00827 75 02 jne SHORT $LN68@stbi__bmp_ + 00829 eb 3b jmp SHORT $LN9@stbi__bmp_ $LN68@stbi__bmp_: ; 5151 : if ((--bit_offset) < 0) { - 00825 8b 85 84 06 00 + 0082b 8b 85 84 06 00 00 mov eax, DWORD PTR bit_offset$9[rbp] - 0082b ff c8 dec eax - 0082d 89 85 84 06 00 + 00831 ff c8 dec eax + 00833 89 85 84 06 00 00 mov DWORD PTR bit_offset$9[rbp], eax - 00833 83 bd 84 06 00 + 00839 83 bd 84 06 00 00 00 cmp DWORD PTR bit_offset$9[rbp], 0 - 0083a 7d 1f jge SHORT $LN69@stbi__bmp_ + 00840 7d 1f jge SHORT $LN69@stbi__bmp_ ; 5152 : bit_offset = 7; - 0083c c7 85 84 06 00 + 00842 c7 85 84 06 00 00 07 00 00 00 mov DWORD PTR bit_offset$9[rbp], 7 ; 5153 : v = stbi__get8(s); - 00846 48 8b 8d 30 0d + 0084c 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 0084d e8 00 00 00 00 call stbi__get8 - 00852 0f b6 c0 movzx eax, al - 00855 89 85 a4 06 00 + 00853 e8 00 00 00 00 call stbi__get8 + 00858 0f b6 c0 movzx eax, al + 0085b 89 85 a4 06 00 00 mov DWORD PTR v$10[rbp], eax $LN69@stbi__bmp_: ; 5154 : } ; 5155 : } - 0085b e9 a2 fe ff ff jmp $LN8@stbi__bmp_ + 00861 e9 a2 fe ff ff jmp $LN8@stbi__bmp_ $LN9@stbi__bmp_: ; 5156 : stbi__skip(s, pad); - 00860 8b 95 84 05 00 + 00866 8b 95 84 05 00 00 mov edx, DWORD PTR pad$[rbp] - 00866 48 8b 8d 30 0d + 0086c 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 0086d e8 00 00 00 00 call stbi__skip + 00873 e8 00 00 00 00 call stbi__skip + 00878 90 npad 1 ; 5157 : } - 00872 e9 3c fe ff ff jmp $LN5@stbi__bmp_ + 00879 e9 3b fe ff ff jmp $LN5@stbi__bmp_ $LN6@stbi__bmp_: ; 5158 : } - 00877 e9 b4 02 00 00 jmp $LN66@stbi__bmp_ + 0087e e9 b5 02 00 00 jmp $LN66@stbi__bmp_ $LN65@stbi__bmp_: ; 5159 : else { ; 5160 : for (j = 0; j < (int)s->img_y; ++j) { - 0087c c7 85 24 05 00 + 00883 c7 85 24 05 00 00 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 00886 eb 0e jmp SHORT $LN13@stbi__bmp_ + 0088d eb 0e jmp SHORT $LN13@stbi__bmp_ $LN11@stbi__bmp_: - 00888 8b 85 24 05 00 + 0088f 8b 85 24 05 00 00 mov eax, DWORD PTR j$[rbp] - 0088e ff c0 inc eax - 00890 89 85 24 05 00 + 00895 ff c0 inc eax + 00897 89 85 24 05 00 00 mov DWORD PTR j$[rbp], eax $LN13@stbi__bmp_: - 00896 48 8b 85 30 0d + 0089d 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 0089d 8b 40 04 mov eax, DWORD PTR [rax+4] - 008a0 39 85 24 05 00 + 008a4 8b 40 04 mov eax, DWORD PTR [rax+4] + 008a7 39 85 24 05 00 00 cmp DWORD PTR j$[rbp], eax - 008a6 0f 8d 84 02 00 + 008ad 0f 8d 85 02 00 00 jge $LN12@stbi__bmp_ ; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { - 008ac c7 85 04 05 00 + 008b3 c7 85 04 05 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 008b6 eb 0f jmp SHORT $LN16@stbi__bmp_ + 008bd eb 0f jmp SHORT $LN16@stbi__bmp_ $LN14@stbi__bmp_: - 008b8 8b 85 04 05 00 + 008bf 8b 85 04 05 00 00 mov eax, DWORD PTR i$[rbp] - 008be 83 c0 02 add eax, 2 - 008c1 89 85 04 05 00 + 008c5 83 c0 02 add eax, 2 + 008c8 89 85 04 05 00 00 mov DWORD PTR i$[rbp], eax $LN16@stbi__bmp_: - 008c7 48 8b 85 30 0d + 008ce 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 008ce 8b 00 mov eax, DWORD PTR [rax] - 008d0 39 85 04 05 00 + 008d5 8b 00 mov eax, DWORD PTR [rax] + 008d7 39 85 04 05 00 00 cmp DWORD PTR i$[rbp], eax - 008d6 0f 8d 3d 02 00 + 008dd 0f 8d 3d 02 00 00 jge $LN15@stbi__bmp_ ; 5162 : int v = stbi__get8(s), v2 = 0; - 008dc 48 8b 8d 30 0d + 008e3 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 008e3 e8 00 00 00 00 call stbi__get8 - 008e8 0f b6 c0 movzx eax, al - 008eb 89 85 e4 06 00 + 008ea e8 00 00 00 00 call stbi__get8 + 008ef 0f b6 c0 movzx eax, al + 008f2 89 85 e4 06 00 00 mov DWORD PTR v$12[rbp], eax - 008f1 c7 85 04 07 00 + 008f8 c7 85 04 07 00 00 00 00 00 00 mov DWORD PTR v2$13[rbp], 0 ; 5163 : if (info.bpp == 4) { - 008fb 83 bd c8 05 00 + 00902 83 bd c8 05 00 00 04 cmp DWORD PTR info$[rbp], 4 - 00902 75 1e jne SHORT $LN70@stbi__bmp_ + 00909 75 1e jne SHORT $LN70@stbi__bmp_ ; 5164 : v2 = v & 15; - 00904 8b 85 e4 06 00 + 0090b 8b 85 e4 06 00 00 mov eax, DWORD PTR v$12[rbp] - 0090a 83 e0 0f and eax, 15 - 0090d 89 85 04 07 00 + 00911 83 e0 0f and eax, 15 + 00914 89 85 04 07 00 00 mov DWORD PTR v2$13[rbp], eax ; 5165 : v >>= 4; - 00913 8b 85 e4 06 00 + 0091a 8b 85 e4 06 00 00 mov eax, DWORD PTR v$12[rbp] - 00919 c1 f8 04 sar eax, 4 - 0091c 89 85 e4 06 00 + 00920 c1 f8 04 sar eax, 4 + 00923 89 85 e4 06 00 00 mov DWORD PTR v$12[rbp], eax $LN70@stbi__bmp_: ; 5166 : } ; 5167 : out[z++] = pal[v][0]; - 00922 48 63 85 e4 06 + 00929 48 63 85 e4 06 00 00 movsxd rax, DWORD PTR v$12[rbp] - 00929 48 8d 84 85 d0 + 00930 48 8d 84 85 d0 00 00 00 lea rax, QWORD PTR pal$[rbp+rax*4] - 00931 b9 01 00 00 00 mov ecx, 1 - 00936 48 6b c9 00 imul rcx, rcx, 0 - 0093a 48 63 95 64 06 + 00938 b9 01 00 00 00 mov ecx, 1 + 0093d 48 6b c9 00 imul rcx, rcx, 0 + 00941 48 63 95 64 06 00 00 movsxd rdx, DWORD PTR z$8[rbp] - 00941 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] - 00945 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 00949 41 88 04 10 mov BYTE PTR [r8+rdx], al - 0094d 8b 85 64 06 00 + 00948 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] + 0094c 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 00950 41 88 04 10 mov BYTE PTR [r8+rdx], al + 00954 8b 85 64 06 00 00 mov eax, DWORD PTR z$8[rbp] - 00953 ff c0 inc eax - 00955 89 85 64 06 00 + 0095a ff c0 inc eax + 0095c 89 85 64 06 00 00 mov DWORD PTR z$8[rbp], eax ; 5168 : out[z++] = pal[v][1]; - 0095b 48 63 85 e4 06 + 00962 48 63 85 e4 06 00 00 movsxd rax, DWORD PTR v$12[rbp] - 00962 48 8d 84 85 d0 + 00969 48 8d 84 85 d0 00 00 00 lea rax, QWORD PTR pal$[rbp+rax*4] - 0096a b9 01 00 00 00 mov ecx, 1 - 0096f 48 6b c9 01 imul rcx, rcx, 1 - 00973 48 63 95 64 06 + 00971 b9 01 00 00 00 mov ecx, 1 + 00976 48 6b c9 01 imul rcx, rcx, 1 + 0097a 48 63 95 64 06 00 00 movsxd rdx, DWORD PTR z$8[rbp] - 0097a 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] - 0097e 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 00982 41 88 04 10 mov BYTE PTR [r8+rdx], al - 00986 8b 85 64 06 00 + 00981 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] + 00985 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 00989 41 88 04 10 mov BYTE PTR [r8+rdx], al + 0098d 8b 85 64 06 00 00 mov eax, DWORD PTR z$8[rbp] - 0098c ff c0 inc eax - 0098e 89 85 64 06 00 + 00993 ff c0 inc eax + 00995 89 85 64 06 00 00 mov DWORD PTR z$8[rbp], eax ; 5169 : out[z++] = pal[v][2]; - 00994 48 63 85 e4 06 + 0099b 48 63 85 e4 06 00 00 movsxd rax, DWORD PTR v$12[rbp] - 0099b 48 8d 84 85 d0 + 009a2 48 8d 84 85 d0 00 00 00 lea rax, QWORD PTR pal$[rbp+rax*4] - 009a3 b9 01 00 00 00 mov ecx, 1 - 009a8 48 6b c9 02 imul rcx, rcx, 2 - 009ac 48 63 95 64 06 + 009aa b9 01 00 00 00 mov ecx, 1 + 009af 48 6b c9 02 imul rcx, rcx, 2 + 009b3 48 63 95 64 06 00 00 movsxd rdx, DWORD PTR z$8[rbp] - 009b3 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] - 009b7 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 009bb 41 88 04 10 mov BYTE PTR [r8+rdx], al - 009bf 8b 85 64 06 00 + 009ba 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] + 009be 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 009c2 41 88 04 10 mov BYTE PTR [r8+rdx], al + 009c6 8b 85 64 06 00 00 mov eax, DWORD PTR z$8[rbp] - 009c5 ff c0 inc eax - 009c7 89 85 64 06 00 + 009cc ff c0 inc eax + 009ce 89 85 64 06 00 00 mov DWORD PTR z$8[rbp], eax ; 5170 : if (target == 4) out[z++] = 255; - 009cd 83 bd a4 05 00 + 009d4 83 bd a4 05 00 00 04 cmp DWORD PTR target$[rbp], 4 - 009d4 75 1d jne SHORT $LN71@stbi__bmp_ - 009d6 48 63 85 64 06 + 009db 75 1d jne SHORT $LN71@stbi__bmp_ + 009dd 48 63 85 64 06 00 00 movsxd rax, DWORD PTR z$8[rbp] - 009dd 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 009e1 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 009e5 8b 85 64 06 00 + 009e4 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 009e8 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 009ec 8b 85 64 06 00 00 mov eax, DWORD PTR z$8[rbp] - 009eb ff c0 inc eax - 009ed 89 85 64 06 00 + 009f2 ff c0 inc eax + 009f4 89 85 64 06 00 00 mov DWORD PTR z$8[rbp], eax $LN71@stbi__bmp_: ; 5171 : if (i + 1 == (int)s->img_x) break; - 009f3 8b 85 04 05 00 + 009fa 8b 85 04 05 00 00 mov eax, DWORD PTR i$[rbp] - 009f9 ff c0 inc eax - 009fb 48 8b 8d 30 0d + 00a00 ff c0 inc eax + 00a02 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 00a02 3b 01 cmp eax, DWORD PTR [rcx] - 00a04 75 05 jne SHORT $LN72@stbi__bmp_ - 00a06 e9 0e 01 00 00 jmp $LN15@stbi__bmp_ + 00a09 3b 01 cmp eax, DWORD PTR [rcx] + 00a0b 75 05 jne SHORT $LN72@stbi__bmp_ + 00a0d e9 0e 01 00 00 jmp $LN15@stbi__bmp_ $LN72@stbi__bmp_: ; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; - 00a0b 83 bd c8 05 00 + 00a12 83 bd c8 05 00 00 08 cmp DWORD PTR info$[rbp], 8 - 00a12 75 17 jne SHORT $LN119@stbi__bmp_ - 00a14 48 8b 8d 30 0d + 00a19 75 17 jne SHORT $LN119@stbi__bmp_ + 00a1b 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 00a1b e8 00 00 00 00 call stbi__get8 - 00a20 0f b6 c0 movzx eax, al - 00a23 89 85 f4 0c 00 + 00a22 e8 00 00 00 00 call stbi__get8 + 00a27 0f b6 c0 movzx eax, al + 00a2a 89 85 f4 0c 00 00 mov DWORD PTR tv384[rbp], eax - 00a29 eb 0c jmp SHORT $LN120@stbi__bmp_ + 00a30 eb 0c jmp SHORT $LN120@stbi__bmp_ $LN119@stbi__bmp_: - 00a2b 8b 85 04 07 00 + 00a32 8b 85 04 07 00 00 mov eax, DWORD PTR v2$13[rbp] - 00a31 89 85 f4 0c 00 + 00a38 89 85 f4 0c 00 00 mov DWORD PTR tv384[rbp], eax $LN120@stbi__bmp_: - 00a37 8b 85 f4 0c 00 + 00a3e 8b 85 f4 0c 00 00 mov eax, DWORD PTR tv384[rbp] - 00a3d 89 85 e4 06 00 + 00a44 89 85 e4 06 00 00 mov DWORD PTR v$12[rbp], eax ; 5173 : out[z++] = pal[v][0]; - 00a43 48 63 85 e4 06 + 00a4a 48 63 85 e4 06 00 00 movsxd rax, DWORD PTR v$12[rbp] - 00a4a 48 8d 84 85 d0 + 00a51 48 8d 84 85 d0 00 00 00 lea rax, QWORD PTR pal$[rbp+rax*4] - 00a52 b9 01 00 00 00 mov ecx, 1 - 00a57 48 6b c9 00 imul rcx, rcx, 0 - 00a5b 48 63 95 64 06 + 00a59 b9 01 00 00 00 mov ecx, 1 + 00a5e 48 6b c9 00 imul rcx, rcx, 0 + 00a62 48 63 95 64 06 00 00 movsxd rdx, DWORD PTR z$8[rbp] - 00a62 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] - 00a66 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 00a6a 41 88 04 10 mov BYTE PTR [r8+rdx], al - 00a6e 8b 85 64 06 00 + 00a69 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] + 00a6d 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 00a71 41 88 04 10 mov BYTE PTR [r8+rdx], al + 00a75 8b 85 64 06 00 00 mov eax, DWORD PTR z$8[rbp] - 00a74 ff c0 inc eax - 00a76 89 85 64 06 00 + 00a7b ff c0 inc eax + 00a7d 89 85 64 06 00 00 mov DWORD PTR z$8[rbp], eax ; 5174 : out[z++] = pal[v][1]; - 00a7c 48 63 85 e4 06 + 00a83 48 63 85 e4 06 00 00 movsxd rax, DWORD PTR v$12[rbp] - 00a83 48 8d 84 85 d0 + 00a8a 48 8d 84 85 d0 00 00 00 lea rax, QWORD PTR pal$[rbp+rax*4] - 00a8b b9 01 00 00 00 mov ecx, 1 - 00a90 48 6b c9 01 imul rcx, rcx, 1 - 00a94 48 63 95 64 06 + 00a92 b9 01 00 00 00 mov ecx, 1 + 00a97 48 6b c9 01 imul rcx, rcx, 1 + 00a9b 48 63 95 64 06 00 00 movsxd rdx, DWORD PTR z$8[rbp] - 00a9b 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] - 00a9f 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 00aa3 41 88 04 10 mov BYTE PTR [r8+rdx], al - 00aa7 8b 85 64 06 00 + 00aa2 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] + 00aa6 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 00aaa 41 88 04 10 mov BYTE PTR [r8+rdx], al + 00aae 8b 85 64 06 00 00 mov eax, DWORD PTR z$8[rbp] - 00aad ff c0 inc eax - 00aaf 89 85 64 06 00 + 00ab4 ff c0 inc eax + 00ab6 89 85 64 06 00 00 mov DWORD PTR z$8[rbp], eax ; 5175 : out[z++] = pal[v][2]; - 00ab5 48 63 85 e4 06 + 00abc 48 63 85 e4 06 00 00 movsxd rax, DWORD PTR v$12[rbp] - 00abc 48 8d 84 85 d0 + 00ac3 48 8d 84 85 d0 00 00 00 lea rax, QWORD PTR pal$[rbp+rax*4] - 00ac4 b9 01 00 00 00 mov ecx, 1 - 00ac9 48 6b c9 02 imul rcx, rcx, 2 - 00acd 48 63 95 64 06 + 00acb b9 01 00 00 00 mov ecx, 1 + 00ad0 48 6b c9 02 imul rcx, rcx, 2 + 00ad4 48 63 95 64 06 00 00 movsxd rdx, DWORD PTR z$8[rbp] - 00ad4 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] - 00ad8 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] - 00adc 41 88 04 10 mov BYTE PTR [r8+rdx], al - 00ae0 8b 85 64 06 00 + 00adb 4c 8b 45 08 mov r8, QWORD PTR out$[rbp] + 00adf 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx] + 00ae3 41 88 04 10 mov BYTE PTR [r8+rdx], al + 00ae7 8b 85 64 06 00 00 mov eax, DWORD PTR z$8[rbp] - 00ae6 ff c0 inc eax - 00ae8 89 85 64 06 00 + 00aed ff c0 inc eax + 00aef 89 85 64 06 00 00 mov DWORD PTR z$8[rbp], eax ; 5176 : if (target == 4) out[z++] = 255; - 00aee 83 bd a4 05 00 + 00af5 83 bd a4 05 00 00 04 cmp DWORD PTR target$[rbp], 4 - 00af5 75 1d jne SHORT $LN73@stbi__bmp_ - 00af7 48 63 85 64 06 + 00afc 75 1d jne SHORT $LN73@stbi__bmp_ + 00afe 48 63 85 64 06 00 00 movsxd rax, DWORD PTR z$8[rbp] - 00afe 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 00b02 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 00b06 8b 85 64 06 00 + 00b05 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 00b09 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 00b0d 8b 85 64 06 00 00 mov eax, DWORD PTR z$8[rbp] - 00b0c ff c0 inc eax - 00b0e 89 85 64 06 00 + 00b13 ff c0 inc eax + 00b15 89 85 64 06 00 00 mov DWORD PTR z$8[rbp], eax $LN73@stbi__bmp_: ; 5177 : } - 00b14 e9 9f fd ff ff jmp $LN14@stbi__bmp_ + 00b1b e9 9f fd ff ff jmp $LN14@stbi__bmp_ $LN15@stbi__bmp_: ; 5178 : stbi__skip(s, pad); - 00b19 8b 95 84 05 00 + 00b20 8b 95 84 05 00 00 mov edx, DWORD PTR pad$[rbp] - 00b1f 48 8b 8d 30 0d + 00b26 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 00b26 e8 00 00 00 00 call stbi__skip + 00b2d e8 00 00 00 00 call stbi__skip + 00b32 90 npad 1 ; 5179 : } - 00b2b e9 58 fd ff ff jmp $LN11@stbi__bmp_ + 00b33 e9 57 fd ff ff jmp $LN11@stbi__bmp_ $LN12@stbi__bmp_: $LN66@stbi__bmp_: ; 5180 : } ; 5181 : } - 00b30 e9 ab 05 00 00 jmp $LN55@stbi__bmp_ + 00b38 e9 af 05 00 00 jmp $LN55@stbi__bmp_ $LN54@stbi__bmp_: ; 5182 : else { ; 5183 : int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0; - 00b35 c7 85 24 07 00 + 00b3d c7 85 24 07 00 00 00 00 00 00 mov DWORD PTR rshift$14[rbp], 0 - 00b3f c7 85 44 07 00 + 00b47 c7 85 44 07 00 00 00 00 00 00 mov DWORD PTR gshift$15[rbp], 0 - 00b49 c7 85 64 07 00 + 00b51 c7 85 64 07 00 00 00 00 00 00 mov DWORD PTR bshift$16[rbp], 0 - 00b53 c7 85 84 07 00 + 00b5b c7 85 84 07 00 00 00 00 00 00 mov DWORD PTR ashift$17[rbp], 0 - 00b5d c7 85 a4 07 00 + 00b65 c7 85 a4 07 00 00 00 00 00 00 mov DWORD PTR rcount$18[rbp], 0 - 00b67 c7 85 c4 07 00 + 00b6f c7 85 c4 07 00 00 00 00 00 00 mov DWORD PTR gcount$19[rbp], 0 - 00b71 c7 85 e4 07 00 + 00b79 c7 85 e4 07 00 00 00 00 00 00 mov DWORD PTR bcount$20[rbp], 0 - 00b7b c7 85 04 08 00 + 00b83 c7 85 04 08 00 00 00 00 00 00 mov DWORD PTR acount$21[rbp], 0 ; 5184 : int z = 0; - 00b85 c7 85 24 08 00 + 00b8d c7 85 24 08 00 00 00 00 00 00 mov DWORD PTR z$22[rbp], 0 ; 5185 : int easy = 0; - 00b8f c7 85 44 08 00 + 00b97 c7 85 44 08 00 00 00 00 00 00 mov DWORD PTR easy$23[rbp], 0 ; 5186 : stbi__skip(s, info.offset - info.extra_read - info.hsz); - 00b99 8b 85 e8 05 00 + 00ba1 8b 85 e8 05 00 00 mov eax, DWORD PTR info$[rbp+32] - 00b9f 8b 8d cc 05 00 + 00ba7 8b 8d cc 05 00 00 mov ecx, DWORD PTR info$[rbp+4] - 00ba5 2b c8 sub ecx, eax - 00ba7 8b c1 mov eax, ecx - 00ba9 2b 85 d0 05 00 + 00bad 2b c8 sub ecx, eax + 00baf 8b c1 mov eax, ecx + 00bb1 2b 85 d0 05 00 00 sub eax, DWORD PTR info$[rbp+8] - 00baf 8b d0 mov edx, eax - 00bb1 48 8b 8d 30 0d + 00bb7 8b d0 mov edx, eax + 00bb9 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 00bb8 e8 00 00 00 00 call stbi__skip + 00bc0 e8 00 00 00 00 call stbi__skip + 00bc5 90 npad 1 ; 5187 : if (info.bpp == 24) width = 3 * s->img_x; - 00bbd 83 bd c8 05 00 + 00bc6 83 bd c8 05 00 00 18 cmp DWORD PTR info$[rbp], 24 - 00bc4 75 12 jne SHORT $LN74@stbi__bmp_ - 00bc6 48 8b 85 30 0d + 00bcd 75 12 jne SHORT $LN74@stbi__bmp_ + 00bcf 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 00bcd 6b 00 03 imul eax, DWORD PTR [rax], 3 - 00bd0 89 85 44 05 00 + 00bd6 6b 00 03 imul eax, DWORD PTR [rax], 3 + 00bd9 89 85 44 05 00 00 mov DWORD PTR width$[rbp], eax - 00bd6 eb 26 jmp SHORT $LN75@stbi__bmp_ + 00bdf eb 26 jmp SHORT $LN75@stbi__bmp_ $LN74@stbi__bmp_: ; 5188 : else if (info.bpp == 16) width = 2 * s->img_x; - 00bd8 83 bd c8 05 00 + 00be1 83 bd c8 05 00 00 10 cmp DWORD PTR info$[rbp], 16 - 00bdf 75 13 jne SHORT $LN76@stbi__bmp_ - 00be1 48 8b 85 30 0d + 00be8 75 13 jne SHORT $LN76@stbi__bmp_ + 00bea 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 00be8 8b 00 mov eax, DWORD PTR [rax] - 00bea d1 e0 shl eax, 1 - 00bec 89 85 44 05 00 + 00bf1 8b 00 mov eax, DWORD PTR [rax] + 00bf3 d1 e0 shl eax, 1 + 00bf5 89 85 44 05 00 00 mov DWORD PTR width$[rbp], eax - 00bf2 eb 0a jmp SHORT $LN77@stbi__bmp_ + 00bfb eb 0a jmp SHORT $LN77@stbi__bmp_ $LN76@stbi__bmp_: ; 5189 : else /* bpp = 32 and pad = 0 */ width = 0; - 00bf4 c7 85 44 05 00 + 00bfd c7 85 44 05 00 00 00 00 00 00 mov DWORD PTR width$[rbp], 0 $LN77@stbi__bmp_: $LN75@stbi__bmp_: ; 5190 : pad = (-width) & 3; - 00bfe 8b 85 44 05 00 + 00c07 8b 85 44 05 00 00 mov eax, DWORD PTR width$[rbp] - 00c04 f7 d8 neg eax - 00c06 83 e0 03 and eax, 3 - 00c09 89 85 84 05 00 + 00c0d f7 d8 neg eax + 00c0f 83 e0 03 and eax, 3 + 00c12 89 85 84 05 00 00 mov DWORD PTR pad$[rbp], eax ; 5191 : if (info.bpp == 24) { - 00c0f 83 bd c8 05 00 + 00c18 83 bd c8 05 00 00 18 cmp DWORD PTR info$[rbp], 24 - 00c16 75 0c jne SHORT $LN78@stbi__bmp_ + 00c1f 75 0c jne SHORT $LN78@stbi__bmp_ ; 5192 : easy = 1; - 00c18 c7 85 44 08 00 + 00c21 c7 85 44 08 00 00 01 00 00 00 mov DWORD PTR easy$23[rbp], 1 ; 5193 : } - 00c22 eb 3a jmp SHORT $LN79@stbi__bmp_ + 00c2b eb 3a jmp SHORT $LN79@stbi__bmp_ $LN78@stbi__bmp_: ; 5194 : else if (info.bpp == 32) { - 00c24 83 bd c8 05 00 + 00c2d 83 bd c8 05 00 00 20 cmp DWORD PTR info$[rbp], 32 ; 00000020H - 00c2b 75 31 jne SHORT $LN80@stbi__bmp_ + 00c34 75 31 jne SHORT $LN80@stbi__bmp_ ; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) - 00c2d 81 7d 64 ff 00 + 00c36 81 7d 64 ff 00 00 00 cmp DWORD PTR mb$[rbp], 255 ; 000000ffH - 00c34 75 28 jne SHORT $LN81@stbi__bmp_ - 00c36 81 7d 44 00 ff + 00c3d 75 28 jne SHORT $LN81@stbi__bmp_ + 00c3f 81 7d 44 00 ff 00 00 cmp DWORD PTR mg$[rbp], 65280 ; 0000ff00H - 00c3d 75 1f jne SHORT $LN81@stbi__bmp_ - 00c3f 81 7d 24 00 00 + 00c46 75 1f jne SHORT $LN81@stbi__bmp_ + 00c48 81 7d 24 00 00 ff 00 cmp DWORD PTR mr$[rbp], 16711680 ; 00ff0000H - 00c46 75 16 jne SHORT $LN81@stbi__bmp_ - 00c48 81 bd 84 00 00 + 00c4f 75 16 jne SHORT $LN81@stbi__bmp_ + 00c51 81 bd 84 00 00 00 00 00 00 ff cmp DWORD PTR ma$[rbp], -16777216 ; ff000000H - 00c52 75 0a jne SHORT $LN81@stbi__bmp_ + 00c5b 75 0a jne SHORT $LN81@stbi__bmp_ ; 5196 : easy = 2; - 00c54 c7 85 44 08 00 + 00c5d c7 85 44 08 00 00 02 00 00 00 mov DWORD PTR easy$23[rbp], 2 $LN81@stbi__bmp_: $LN80@stbi__bmp_: @@ -54068,484 +54481,487 @@ $LN79@stbi__bmp_: ; 5197 : } ; 5198 : if (!easy) { - 00c5e 83 bd 44 08 00 + 00c67 83 bd 44 08 00 00 00 cmp DWORD PTR easy$23[rbp], 0 - 00c65 0f 85 34 01 00 + 00c6e 0f 85 36 01 00 00 jne $LN82@stbi__bmp_ ; 5199 : if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } - 00c6b 83 7d 24 00 cmp DWORD PTR mr$[rbp], 0 - 00c6f 74 0c je SHORT $LN84@stbi__bmp_ - 00c71 83 7d 44 00 cmp DWORD PTR mg$[rbp], 0 - 00c75 74 06 je SHORT $LN84@stbi__bmp_ - 00c77 83 7d 64 00 cmp DWORD PTR mb$[rbp], 0 - 00c7b 75 3e jne SHORT $LN83@stbi__bmp_ + 00c74 83 7d 24 00 cmp DWORD PTR mr$[rbp], 0 + 00c78 74 0c je SHORT $LN84@stbi__bmp_ + 00c7a 83 7d 44 00 cmp DWORD PTR mg$[rbp], 0 + 00c7e 74 06 je SHORT $LN84@stbi__bmp_ + 00c80 83 7d 64 00 cmp DWORD PTR mb$[rbp], 0 + 00c84 75 3f jne SHORT $LN83@stbi__bmp_ $LN84@stbi__bmp_: - 00c7d 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 00c81 ff 15 00 00 00 + 00c86 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 00c8a ff 15 00 00 00 00 call QWORD PTR __imp_free - 00c87 48 8d 0d 00 00 + 00c90 90 npad 1 + 00c91 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09DAEBACAB@bad?5masks@ - 00c8e e8 00 00 00 00 call stbi__err - 00c93 85 c0 test eax, eax - 00c95 74 0d je SHORT $LN121@stbi__bmp_ - 00c97 48 c7 85 f8 0c + 00c98 e8 00 00 00 00 call stbi__err + 00c9d 85 c0 test eax, eax + 00c9f 74 0d je SHORT $LN121@stbi__bmp_ + 00ca1 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv445[rbp], 0 - 00ca2 eb 0b jmp SHORT $LN122@stbi__bmp_ + 00cac eb 0b jmp SHORT $LN122@stbi__bmp_ $LN121@stbi__bmp_: - 00ca4 48 c7 85 f8 0c + 00cae 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv445[rbp], 0 $LN122@stbi__bmp_: - 00caf 48 8b 85 f8 0c + 00cb9 48 8b 85 f8 0c 00 00 mov rax, QWORD PTR tv445[rbp] - 00cb6 e9 4b 06 00 00 jmp $LN1@stbi__bmp_ + 00cc0 e9 4d 06 00 00 jmp $LN1@stbi__bmp_ $LN83@stbi__bmp_: ; 5200 : // right shift amt to put high bit in position #7 ; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); - 00cbb 8b 4d 24 mov ecx, DWORD PTR mr$[rbp] - 00cbe e8 00 00 00 00 call stbi__high_bit - 00cc3 83 e8 07 sub eax, 7 - 00cc6 89 85 24 07 00 + 00cc5 8b 4d 24 mov ecx, DWORD PTR mr$[rbp] + 00cc8 e8 00 00 00 00 call stbi__high_bit + 00ccd 83 e8 07 sub eax, 7 + 00cd0 89 85 24 07 00 00 mov DWORD PTR rshift$14[rbp], eax - 00ccc 8b 4d 24 mov ecx, DWORD PTR mr$[rbp] - 00ccf e8 00 00 00 00 call stbi__bitcount - 00cd4 89 85 a4 07 00 + 00cd6 8b 4d 24 mov ecx, DWORD PTR mr$[rbp] + 00cd9 e8 00 00 00 00 call stbi__bitcount + 00cde 89 85 a4 07 00 00 mov DWORD PTR rcount$18[rbp], eax ; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); - 00cda 8b 4d 44 mov ecx, DWORD PTR mg$[rbp] - 00cdd e8 00 00 00 00 call stbi__high_bit - 00ce2 83 e8 07 sub eax, 7 - 00ce5 89 85 44 07 00 + 00ce4 8b 4d 44 mov ecx, DWORD PTR mg$[rbp] + 00ce7 e8 00 00 00 00 call stbi__high_bit + 00cec 83 e8 07 sub eax, 7 + 00cef 89 85 44 07 00 00 mov DWORD PTR gshift$15[rbp], eax - 00ceb 8b 4d 44 mov ecx, DWORD PTR mg$[rbp] - 00cee e8 00 00 00 00 call stbi__bitcount - 00cf3 89 85 c4 07 00 + 00cf5 8b 4d 44 mov ecx, DWORD PTR mg$[rbp] + 00cf8 e8 00 00 00 00 call stbi__bitcount + 00cfd 89 85 c4 07 00 00 mov DWORD PTR gcount$19[rbp], eax ; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); - 00cf9 8b 4d 64 mov ecx, DWORD PTR mb$[rbp] - 00cfc e8 00 00 00 00 call stbi__high_bit - 00d01 83 e8 07 sub eax, 7 - 00d04 89 85 64 07 00 + 00d03 8b 4d 64 mov ecx, DWORD PTR mb$[rbp] + 00d06 e8 00 00 00 00 call stbi__high_bit + 00d0b 83 e8 07 sub eax, 7 + 00d0e 89 85 64 07 00 00 mov DWORD PTR bshift$16[rbp], eax - 00d0a 8b 4d 64 mov ecx, DWORD PTR mb$[rbp] - 00d0d e8 00 00 00 00 call stbi__bitcount - 00d12 89 85 e4 07 00 + 00d14 8b 4d 64 mov ecx, DWORD PTR mb$[rbp] + 00d17 e8 00 00 00 00 call stbi__bitcount + 00d1c 89 85 e4 07 00 00 mov DWORD PTR bcount$20[rbp], eax ; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); - 00d18 8b 8d 84 00 00 + 00d22 8b 8d 84 00 00 00 mov ecx, DWORD PTR ma$[rbp] - 00d1e e8 00 00 00 00 call stbi__high_bit - 00d23 83 e8 07 sub eax, 7 - 00d26 89 85 84 07 00 + 00d28 e8 00 00 00 00 call stbi__high_bit + 00d2d 83 e8 07 sub eax, 7 + 00d30 89 85 84 07 00 00 mov DWORD PTR ashift$17[rbp], eax - 00d2c 8b 8d 84 00 00 + 00d36 8b 8d 84 00 00 00 mov ecx, DWORD PTR ma$[rbp] - 00d32 e8 00 00 00 00 call stbi__bitcount - 00d37 89 85 04 08 00 + 00d3c e8 00 00 00 00 call stbi__bitcount + 00d41 89 85 04 08 00 00 mov DWORD PTR acount$21[rbp], eax ; 5205 : if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } - 00d3d 83 bd a4 07 00 + 00d47 83 bd a4 07 00 00 08 cmp DWORD PTR rcount$18[rbp], 8 - 00d44 7f 1b jg SHORT $LN86@stbi__bmp_ - 00d46 83 bd c4 07 00 + 00d4e 7f 1b jg SHORT $LN86@stbi__bmp_ + 00d50 83 bd c4 07 00 00 08 cmp DWORD PTR gcount$19[rbp], 8 - 00d4d 7f 12 jg SHORT $LN86@stbi__bmp_ - 00d4f 83 bd e4 07 00 + 00d57 7f 12 jg SHORT $LN86@stbi__bmp_ + 00d59 83 bd e4 07 00 00 08 cmp DWORD PTR bcount$20[rbp], 8 - 00d56 7f 09 jg SHORT $LN86@stbi__bmp_ - 00d58 83 bd 04 08 00 + 00d60 7f 09 jg SHORT $LN86@stbi__bmp_ + 00d62 83 bd 04 08 00 00 08 cmp DWORD PTR acount$21[rbp], 8 - 00d5f 7e 3e jle SHORT $LN85@stbi__bmp_ + 00d69 7e 3f jle SHORT $LN85@stbi__bmp_ $LN86@stbi__bmp_: - 00d61 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 00d65 ff 15 00 00 00 + 00d6b 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 00d6f ff 15 00 00 00 00 call QWORD PTR __imp_free - 00d6b 48 8d 0d 00 00 + 00d75 90 npad 1 + 00d76 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_09DAEBACAB@bad?5masks@ - 00d72 e8 00 00 00 00 call stbi__err - 00d77 85 c0 test eax, eax - 00d79 74 0d je SHORT $LN123@stbi__bmp_ - 00d7b 48 c7 85 f8 0c + 00d7d e8 00 00 00 00 call stbi__err + 00d82 85 c0 test eax, eax + 00d84 74 0d je SHORT $LN123@stbi__bmp_ + 00d86 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv474[rbp], 0 - 00d86 eb 0b jmp SHORT $LN124@stbi__bmp_ + 00d91 eb 0b jmp SHORT $LN124@stbi__bmp_ $LN123@stbi__bmp_: - 00d88 48 c7 85 f8 0c + 00d93 48 c7 85 f8 0c 00 00 00 00 00 00 mov QWORD PTR tv474[rbp], 0 $LN124@stbi__bmp_: - 00d93 48 8b 85 f8 0c + 00d9e 48 8b 85 f8 0c 00 00 mov rax, QWORD PTR tv474[rbp] - 00d9a e9 67 05 00 00 jmp $LN1@stbi__bmp_ + 00da5 e9 68 05 00 00 jmp $LN1@stbi__bmp_ $LN85@stbi__bmp_: $LN82@stbi__bmp_: ; 5206 : } ; 5207 : for (j = 0; j < (int)s->img_y; ++j) { - 00d9f c7 85 24 05 00 + 00daa c7 85 24 05 00 00 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 00da9 eb 0e jmp SHORT $LN19@stbi__bmp_ + 00db4 eb 0e jmp SHORT $LN19@stbi__bmp_ $LN17@stbi__bmp_: - 00dab 8b 85 24 05 00 + 00db6 8b 85 24 05 00 00 mov eax, DWORD PTR j$[rbp] - 00db1 ff c0 inc eax - 00db3 89 85 24 05 00 + 00dbc ff c0 inc eax + 00dbe 89 85 24 05 00 00 mov DWORD PTR j$[rbp], eax $LN19@stbi__bmp_: - 00db9 48 8b 85 30 0d + 00dc4 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 00dc0 8b 40 04 mov eax, DWORD PTR [rax+4] - 00dc3 39 85 24 05 00 + 00dcb 8b 40 04 mov eax, DWORD PTR [rax+4] + 00dce 39 85 24 05 00 00 cmp DWORD PTR j$[rbp], eax - 00dc9 0f 8d 11 03 00 + 00dd4 0f 8d 12 03 00 00 jge $LN18@stbi__bmp_ ; 5208 : if (easy) { - 00dcf 83 bd 44 08 00 + 00dda 83 bd 44 08 00 00 00 cmp DWORD PTR easy$23[rbp], 0 - 00dd6 0f 84 1b 01 00 + 00de1 0f 84 1b 01 00 00 je $LN87@stbi__bmp_ ; 5209 : for (i = 0; i < (int)s->img_x; ++i) { - 00ddc c7 85 04 05 00 + 00de7 c7 85 04 05 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00de6 eb 0e jmp SHORT $LN22@stbi__bmp_ + 00df1 eb 0e jmp SHORT $LN22@stbi__bmp_ $LN20@stbi__bmp_: - 00de8 8b 85 04 05 00 + 00df3 8b 85 04 05 00 00 mov eax, DWORD PTR i$[rbp] - 00dee ff c0 inc eax - 00df0 89 85 04 05 00 + 00df9 ff c0 inc eax + 00dfb 89 85 04 05 00 00 mov DWORD PTR i$[rbp], eax $LN22@stbi__bmp_: - 00df6 48 8b 85 30 0d + 00e01 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 00dfd 8b 00 mov eax, DWORD PTR [rax] - 00dff 39 85 04 05 00 + 00e08 8b 00 mov eax, DWORD PTR [rax] + 00e0a 39 85 04 05 00 00 cmp DWORD PTR i$[rbp], eax - 00e05 0f 8d e7 00 00 + 00e10 0f 8d e7 00 00 00 jge $LN21@stbi__bmp_ ; 5210 : unsigned char a; ; 5211 : out[z + 2] = stbi__get8(s); - 00e0b 48 8b 8d 30 0d + 00e16 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 00e12 e8 00 00 00 00 call stbi__get8 - 00e17 8b 8d 24 08 00 + 00e1d e8 00 00 00 00 call stbi__get8 + 00e22 8b 8d 24 08 00 00 mov ecx, DWORD PTR z$22[rbp] - 00e1d 83 c1 02 add ecx, 2 - 00e20 48 63 c9 movsxd rcx, ecx - 00e23 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] - 00e27 88 04 0a mov BYTE PTR [rdx+rcx], al + 00e28 83 c1 02 add ecx, 2 + 00e2b 48 63 c9 movsxd rcx, ecx + 00e2e 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] + 00e32 88 04 0a mov BYTE PTR [rdx+rcx], al ; 5212 : out[z + 1] = stbi__get8(s); - 00e2a 48 8b 8d 30 0d + 00e35 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 00e31 e8 00 00 00 00 call stbi__get8 - 00e36 8b 8d 24 08 00 + 00e3c e8 00 00 00 00 call stbi__get8 + 00e41 8b 8d 24 08 00 00 mov ecx, DWORD PTR z$22[rbp] - 00e3c ff c1 inc ecx - 00e3e 48 63 c9 movsxd rcx, ecx - 00e41 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] - 00e45 88 04 0a mov BYTE PTR [rdx+rcx], al + 00e47 ff c1 inc ecx + 00e49 48 63 c9 movsxd rcx, ecx + 00e4c 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] + 00e50 88 04 0a mov BYTE PTR [rdx+rcx], al ; 5213 : out[z + 0] = stbi__get8(s); - 00e48 48 8b 8d 30 0d + 00e53 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 00e4f e8 00 00 00 00 call stbi__get8 - 00e54 8b 8d 24 08 00 + 00e5a e8 00 00 00 00 call stbi__get8 + 00e5f 8b 8d 24 08 00 00 mov ecx, DWORD PTR z$22[rbp] - 00e5a 48 63 c9 movsxd rcx, ecx - 00e5d 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] - 00e61 88 04 0a mov BYTE PTR [rdx+rcx], al + 00e65 48 63 c9 movsxd rcx, ecx + 00e68 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] + 00e6c 88 04 0a mov BYTE PTR [rdx+rcx], al ; 5214 : z += 3; - 00e64 8b 85 24 08 00 + 00e6f 8b 85 24 08 00 00 mov eax, DWORD PTR z$22[rbp] - 00e6a 83 c0 03 add eax, 3 - 00e6d 89 85 24 08 00 + 00e75 83 c0 03 add eax, 3 + 00e78 89 85 24 08 00 00 mov DWORD PTR z$22[rbp], eax ; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); - 00e73 83 bd 44 08 00 + 00e7e 83 bd 44 08 00 00 02 cmp DWORD PTR easy$23[rbp], 2 - 00e7a 75 17 jne SHORT $LN125@stbi__bmp_ - 00e7c 48 8b 8d 30 0d + 00e85 75 17 jne SHORT $LN125@stbi__bmp_ + 00e87 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 00e83 e8 00 00 00 00 call stbi__get8 - 00e88 0f b6 c0 movzx eax, al - 00e8b 89 85 f4 0c 00 + 00e8e e8 00 00 00 00 call stbi__get8 + 00e93 0f b6 c0 movzx eax, al + 00e96 89 85 f4 0c 00 00 mov DWORD PTR tv505[rbp], eax - 00e91 eb 0a jmp SHORT $LN126@stbi__bmp_ + 00e9c eb 0a jmp SHORT $LN126@stbi__bmp_ $LN125@stbi__bmp_: - 00e93 c7 85 f4 0c 00 + 00e9e c7 85 f4 0c 00 00 ff 00 00 00 mov DWORD PTR tv505[rbp], 255 ; 000000ffH $LN126@stbi__bmp_: - 00e9d 0f b6 85 f4 0c + 00ea8 0f b6 85 f4 0c 00 00 movzx eax, BYTE PTR tv505[rbp] - 00ea4 88 85 64 08 00 + 00eaf 88 85 64 08 00 00 mov BYTE PTR a$24[rbp], al ; 5216 : all_a |= a; - 00eaa 0f b6 85 64 08 + 00eb5 0f b6 85 64 08 00 00 movzx eax, BYTE PTR a$24[rbp] - 00eb1 8b 8d a4 00 00 + 00ebc 8b 8d a4 00 00 00 mov ecx, DWORD PTR all_a$[rbp] - 00eb7 0b c8 or ecx, eax - 00eb9 8b c1 mov eax, ecx - 00ebb 89 85 a4 00 00 + 00ec2 0b c8 or ecx, eax + 00ec4 8b c1 mov eax, ecx + 00ec6 89 85 a4 00 00 00 mov DWORD PTR all_a$[rbp], eax ; 5217 : if (target == 4) out[z++] = a; - 00ec1 83 bd a4 05 00 + 00ecc 83 bd a4 05 00 00 04 cmp DWORD PTR target$[rbp], 4 - 00ec8 75 23 jne SHORT $LN89@stbi__bmp_ - 00eca 48 63 85 24 08 + 00ed3 75 23 jne SHORT $LN89@stbi__bmp_ + 00ed5 48 63 85 24 08 00 00 movsxd rax, DWORD PTR z$22[rbp] - 00ed1 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 00ed5 0f b6 95 64 08 + 00edc 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 00ee0 0f b6 95 64 08 00 00 movzx edx, BYTE PTR a$24[rbp] - 00edc 88 14 01 mov BYTE PTR [rcx+rax], dl - 00edf 8b 85 24 08 00 + 00ee7 88 14 01 mov BYTE PTR [rcx+rax], dl + 00eea 8b 85 24 08 00 00 mov eax, DWORD PTR z$22[rbp] - 00ee5 ff c0 inc eax - 00ee7 89 85 24 08 00 + 00ef0 ff c0 inc eax + 00ef2 89 85 24 08 00 00 mov DWORD PTR z$22[rbp], eax $LN89@stbi__bmp_: ; 5218 : } - 00eed e9 f6 fe ff ff jmp $LN20@stbi__bmp_ + 00ef8 e9 f6 fe ff ff jmp $LN20@stbi__bmp_ $LN21@stbi__bmp_: ; 5219 : } - 00ef2 e9 d2 01 00 00 jmp $LN88@stbi__bmp_ + 00efd e9 d2 01 00 00 jmp $LN88@stbi__bmp_ $LN87@stbi__bmp_: ; 5220 : else { ; 5221 : int bpp = info.bpp; - 00ef7 8b 85 c8 05 00 + 00f02 8b 85 c8 05 00 00 mov eax, DWORD PTR info$[rbp] - 00efd 89 85 84 08 00 + 00f08 89 85 84 08 00 00 mov DWORD PTR bpp$25[rbp], eax ; 5222 : for (i = 0; i < (int)s->img_x; ++i) { - 00f03 c7 85 04 05 00 + 00f0e c7 85 04 05 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 00f0d eb 0e jmp SHORT $LN25@stbi__bmp_ + 00f18 eb 0e jmp SHORT $LN25@stbi__bmp_ $LN23@stbi__bmp_: - 00f0f 8b 85 04 05 00 + 00f1a 8b 85 04 05 00 00 mov eax, DWORD PTR i$[rbp] - 00f15 ff c0 inc eax - 00f17 89 85 04 05 00 + 00f20 ff c0 inc eax + 00f22 89 85 04 05 00 00 mov DWORD PTR i$[rbp], eax $LN25@stbi__bmp_: - 00f1d 48 8b 85 30 0d + 00f28 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 00f24 8b 00 mov eax, DWORD PTR [rax] - 00f26 39 85 04 05 00 + 00f2f 8b 00 mov eax, DWORD PTR [rax] + 00f31 39 85 04 05 00 00 cmp DWORD PTR i$[rbp], eax - 00f2c 0f 8d 97 01 00 + 00f37 0f 8d 97 01 00 00 jge $LN24@stbi__bmp_ ; 5223 : stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s)); - 00f32 83 bd 84 08 00 + 00f3d 83 bd 84 08 00 00 10 cmp DWORD PTR bpp$25[rbp], 16 - 00f39 75 14 jne SHORT $LN127@stbi__bmp_ - 00f3b 48 8b 8d 30 0d + 00f44 75 14 jne SHORT $LN127@stbi__bmp_ + 00f46 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 00f42 e8 00 00 00 00 call stbi__get16le - 00f47 89 85 f4 0c 00 + 00f4d e8 00 00 00 00 call stbi__get16le + 00f52 89 85 f4 0c 00 00 mov DWORD PTR tv522[rbp], eax - 00f4d eb 12 jmp SHORT $LN128@stbi__bmp_ + 00f58 eb 12 jmp SHORT $LN128@stbi__bmp_ $LN127@stbi__bmp_: - 00f4f 48 8b 8d 30 0d + 00f5a 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 00f56 e8 00 00 00 00 call stbi__get32le - 00f5b 89 85 f4 0c 00 + 00f61 e8 00 00 00 00 call stbi__get32le + 00f66 89 85 f4 0c 00 00 mov DWORD PTR tv522[rbp], eax $LN128@stbi__bmp_: - 00f61 8b 85 f4 0c 00 + 00f6c 8b 85 f4 0c 00 00 mov eax, DWORD PTR tv522[rbp] - 00f67 89 85 a4 08 00 + 00f72 89 85 a4 08 00 00 mov DWORD PTR v$26[rbp], eax ; 5224 : unsigned int a; ; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); - 00f6d 8b 45 24 mov eax, DWORD PTR mr$[rbp] - 00f70 8b 8d a4 08 00 + 00f78 8b 45 24 mov eax, DWORD PTR mr$[rbp] + 00f7b 8b 8d a4 08 00 00 mov ecx, DWORD PTR v$26[rbp] - 00f76 23 c8 and ecx, eax - 00f78 8b c1 mov eax, ecx - 00f7a 44 8b 85 a4 07 + 00f81 23 c8 and ecx, eax + 00f83 8b c1 mov eax, ecx + 00f85 44 8b 85 a4 07 00 00 mov r8d, DWORD PTR rcount$18[rbp] - 00f81 8b 95 24 07 00 + 00f8c 8b 95 24 07 00 00 mov edx, DWORD PTR rshift$14[rbp] - 00f87 8b c8 mov ecx, eax - 00f89 e8 00 00 00 00 call stbi__shiftsigned - 00f8e 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00f93 48 63 8d 24 08 + 00f92 8b c8 mov ecx, eax + 00f94 e8 00 00 00 00 call stbi__shiftsigned + 00f99 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00f9e 48 63 8d 24 08 00 00 movsxd rcx, DWORD PTR z$22[rbp] - 00f9a 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] - 00f9e 88 04 0a mov BYTE PTR [rdx+rcx], al - 00fa1 8b 85 24 08 00 + 00fa5 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] + 00fa9 88 04 0a mov BYTE PTR [rdx+rcx], al + 00fac 8b 85 24 08 00 00 mov eax, DWORD PTR z$22[rbp] - 00fa7 ff c0 inc eax - 00fa9 89 85 24 08 00 + 00fb2 ff c0 inc eax + 00fb4 89 85 24 08 00 00 mov DWORD PTR z$22[rbp], eax ; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); - 00faf 8b 45 44 mov eax, DWORD PTR mg$[rbp] - 00fb2 8b 8d a4 08 00 + 00fba 8b 45 44 mov eax, DWORD PTR mg$[rbp] + 00fbd 8b 8d a4 08 00 00 mov ecx, DWORD PTR v$26[rbp] - 00fb8 23 c8 and ecx, eax - 00fba 8b c1 mov eax, ecx - 00fbc 44 8b 85 c4 07 + 00fc3 23 c8 and ecx, eax + 00fc5 8b c1 mov eax, ecx + 00fc7 44 8b 85 c4 07 00 00 mov r8d, DWORD PTR gcount$19[rbp] - 00fc3 8b 95 44 07 00 + 00fce 8b 95 44 07 00 00 mov edx, DWORD PTR gshift$15[rbp] - 00fc9 8b c8 mov ecx, eax - 00fcb e8 00 00 00 00 call stbi__shiftsigned - 00fd0 25 ff 00 00 00 and eax, 255 ; 000000ffH - 00fd5 48 63 8d 24 08 + 00fd4 8b c8 mov ecx, eax + 00fd6 e8 00 00 00 00 call stbi__shiftsigned + 00fdb 25 ff 00 00 00 and eax, 255 ; 000000ffH + 00fe0 48 63 8d 24 08 00 00 movsxd rcx, DWORD PTR z$22[rbp] - 00fdc 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] - 00fe0 88 04 0a mov BYTE PTR [rdx+rcx], al - 00fe3 8b 85 24 08 00 + 00fe7 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] + 00feb 88 04 0a mov BYTE PTR [rdx+rcx], al + 00fee 8b 85 24 08 00 00 mov eax, DWORD PTR z$22[rbp] - 00fe9 ff c0 inc eax - 00feb 89 85 24 08 00 + 00ff4 ff c0 inc eax + 00ff6 89 85 24 08 00 00 mov DWORD PTR z$22[rbp], eax ; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); - 00ff1 8b 45 64 mov eax, DWORD PTR mb$[rbp] - 00ff4 8b 8d a4 08 00 + 00ffc 8b 45 64 mov eax, DWORD PTR mb$[rbp] + 00fff 8b 8d a4 08 00 00 mov ecx, DWORD PTR v$26[rbp] - 00ffa 23 c8 and ecx, eax - 00ffc 8b c1 mov eax, ecx - 00ffe 44 8b 85 e4 07 + 01005 23 c8 and ecx, eax + 01007 8b c1 mov eax, ecx + 01009 44 8b 85 e4 07 00 00 mov r8d, DWORD PTR bcount$20[rbp] - 01005 8b 95 64 07 00 + 01010 8b 95 64 07 00 00 mov edx, DWORD PTR bshift$16[rbp] - 0100b 8b c8 mov ecx, eax - 0100d e8 00 00 00 00 call stbi__shiftsigned - 01012 25 ff 00 00 00 and eax, 255 ; 000000ffH - 01017 48 63 8d 24 08 + 01016 8b c8 mov ecx, eax + 01018 e8 00 00 00 00 call stbi__shiftsigned + 0101d 25 ff 00 00 00 and eax, 255 ; 000000ffH + 01022 48 63 8d 24 08 00 00 movsxd rcx, DWORD PTR z$22[rbp] - 0101e 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] - 01022 88 04 0a mov BYTE PTR [rdx+rcx], al - 01025 8b 85 24 08 00 + 01029 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] + 0102d 88 04 0a mov BYTE PTR [rdx+rcx], al + 01030 8b 85 24 08 00 00 mov eax, DWORD PTR z$22[rbp] - 0102b ff c0 inc eax - 0102d 89 85 24 08 00 + 01036 ff c0 inc eax + 01038 89 85 24 08 00 00 mov DWORD PTR z$22[rbp], eax ; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); - 01033 83 bd 84 00 00 + 0103e 83 bd 84 00 00 00 00 cmp DWORD PTR ma$[rbp], 0 - 0103a 74 2c je SHORT $LN129@stbi__bmp_ - 0103c 8b 85 84 00 00 + 01045 74 2c je SHORT $LN129@stbi__bmp_ + 01047 8b 85 84 00 00 00 mov eax, DWORD PTR ma$[rbp] - 01042 8b 8d a4 08 00 + 0104d 8b 8d a4 08 00 00 mov ecx, DWORD PTR v$26[rbp] - 01048 23 c8 and ecx, eax - 0104a 8b c1 mov eax, ecx - 0104c 44 8b 85 04 08 + 01053 23 c8 and ecx, eax + 01055 8b c1 mov eax, ecx + 01057 44 8b 85 04 08 00 00 mov r8d, DWORD PTR acount$21[rbp] - 01053 8b 95 84 07 00 + 0105e 8b 95 84 07 00 00 mov edx, DWORD PTR ashift$17[rbp] - 01059 8b c8 mov ecx, eax - 0105b e8 00 00 00 00 call stbi__shiftsigned - 01060 89 85 f4 0c 00 + 01064 8b c8 mov ecx, eax + 01066 e8 00 00 00 00 call stbi__shiftsigned + 0106b 89 85 f4 0c 00 00 mov DWORD PTR tv562[rbp], eax - 01066 eb 0a jmp SHORT $LN130@stbi__bmp_ + 01071 eb 0a jmp SHORT $LN130@stbi__bmp_ $LN129@stbi__bmp_: - 01068 c7 85 f4 0c 00 + 01073 c7 85 f4 0c 00 00 ff 00 00 00 mov DWORD PTR tv562[rbp], 255 ; 000000ffH $LN130@stbi__bmp_: - 01072 8b 85 f4 0c 00 + 0107d 8b 85 f4 0c 00 00 mov eax, DWORD PTR tv562[rbp] - 01078 89 85 c4 08 00 + 01083 89 85 c4 08 00 00 mov DWORD PTR a$27[rbp], eax ; 5229 : all_a |= a; - 0107e 8b 85 c4 08 00 + 01089 8b 85 c4 08 00 00 mov eax, DWORD PTR a$27[rbp] - 01084 8b 8d a4 00 00 + 0108f 8b 8d a4 00 00 00 mov ecx, DWORD PTR all_a$[rbp] - 0108a 0b c8 or ecx, eax - 0108c 8b c1 mov eax, ecx - 0108e 89 85 a4 00 00 + 01095 0b c8 or ecx, eax + 01097 8b c1 mov eax, ecx + 01099 89 85 a4 00 00 00 mov DWORD PTR all_a$[rbp], eax ; 5230 : if (target == 4) out[z++] = STBI__BYTECAST(a); - 01094 83 bd a4 05 00 + 0109f 83 bd a4 05 00 00 04 cmp DWORD PTR target$[rbp], 4 - 0109b 75 27 jne SHORT $LN90@stbi__bmp_ - 0109d 8b 85 c4 08 00 + 010a6 75 27 jne SHORT $LN90@stbi__bmp_ + 010a8 8b 85 c4 08 00 00 mov eax, DWORD PTR a$27[rbp] - 010a3 25 ff 00 00 00 and eax, 255 ; 000000ffH - 010a8 48 63 8d 24 08 + 010ae 25 ff 00 00 00 and eax, 255 ; 000000ffH + 010b3 48 63 8d 24 08 00 00 movsxd rcx, DWORD PTR z$22[rbp] - 010af 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] - 010b3 88 04 0a mov BYTE PTR [rdx+rcx], al - 010b6 8b 85 24 08 00 + 010ba 48 8b 55 08 mov rdx, QWORD PTR out$[rbp] + 010be 88 04 0a mov BYTE PTR [rdx+rcx], al + 010c1 8b 85 24 08 00 00 mov eax, DWORD PTR z$22[rbp] - 010bc ff c0 inc eax - 010be 89 85 24 08 00 + 010c7 ff c0 inc eax + 010c9 89 85 24 08 00 00 mov DWORD PTR z$22[rbp], eax $LN90@stbi__bmp_: ; 5231 : } - 010c4 e9 46 fe ff ff jmp $LN23@stbi__bmp_ + 010cf e9 46 fe ff ff jmp $LN23@stbi__bmp_ $LN24@stbi__bmp_: $LN88@stbi__bmp_: ; 5232 : } ; 5233 : stbi__skip(s, pad); - 010c9 8b 95 84 05 00 + 010d4 8b 95 84 05 00 00 mov edx, DWORD PTR pad$[rbp] - 010cf 48 8b 8d 30 0d + 010da 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 010d6 e8 00 00 00 00 call stbi__skip + 010e1 e8 00 00 00 00 call stbi__skip + 010e6 90 npad 1 ; 5234 : } - 010db e9 cb fc ff ff jmp $LN17@stbi__bmp_ + 010e7 e9 ca fc ff ff jmp $LN17@stbi__bmp_ $LN18@stbi__bmp_: $LN55@stbi__bmp_: @@ -54554,170 +54970,170 @@ $LN55@stbi__bmp_: ; 5237 : // if alpha channel is all 0s, replace with all 255s ; 5238 : if (target == 4 && all_a == 0) - 010e0 83 bd a4 05 00 + 010ec 83 bd a4 05 00 00 04 cmp DWORD PTR target$[rbp], 4 - 010e7 75 53 jne SHORT $LN91@stbi__bmp_ - 010e9 83 bd a4 00 00 + 010f3 75 53 jne SHORT $LN91@stbi__bmp_ + 010f5 83 bd a4 00 00 00 00 cmp DWORD PTR all_a$[rbp], 0 - 010f0 75 4a jne SHORT $LN91@stbi__bmp_ + 010fc 75 4a jne SHORT $LN91@stbi__bmp_ ; 5239 : for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4) - 010f2 48 8b 85 30 0d + 010fe 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 010f9 8b 00 mov eax, DWORD PTR [rax] - 010fb c1 e0 02 shl eax, 2 - 010fe 48 8b 8d 30 0d + 01105 8b 00 mov eax, DWORD PTR [rax] + 01107 c1 e0 02 shl eax, 2 + 0110a 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 01105 0f af 41 04 imul eax, DWORD PTR [rcx+4] - 01109 ff c8 dec eax - 0110b 89 85 04 05 00 + 01111 0f af 41 04 imul eax, DWORD PTR [rcx+4] + 01115 ff c8 dec eax + 01117 89 85 04 05 00 00 mov DWORD PTR i$[rbp], eax - 01111 eb 0f jmp SHORT $LN28@stbi__bmp_ + 0111d eb 0f jmp SHORT $LN28@stbi__bmp_ $LN26@stbi__bmp_: - 01113 8b 85 04 05 00 + 0111f 8b 85 04 05 00 00 mov eax, DWORD PTR i$[rbp] - 01119 83 e8 04 sub eax, 4 - 0111c 89 85 04 05 00 + 01125 83 e8 04 sub eax, 4 + 01128 89 85 04 05 00 00 mov DWORD PTR i$[rbp], eax $LN28@stbi__bmp_: - 01122 83 bd 04 05 00 + 0112e 83 bd 04 05 00 00 00 cmp DWORD PTR i$[rbp], 0 - 01129 7c 11 jl SHORT $LN27@stbi__bmp_ + 01135 7c 11 jl SHORT $LN27@stbi__bmp_ ; 5240 : out[i] = 255; - 0112b 48 63 85 04 05 + 01137 48 63 85 04 05 00 00 movsxd rax, DWORD PTR i$[rbp] - 01132 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 01136 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH - 0113a eb d7 jmp SHORT $LN26@stbi__bmp_ + 0113e 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 01142 c6 04 01 ff mov BYTE PTR [rcx+rax], 255 ; 000000ffH + 01146 eb d7 jmp SHORT $LN26@stbi__bmp_ $LN27@stbi__bmp_: $LN91@stbi__bmp_: ; 5241 : ; 5242 : if (flip_vertically) { - 0113c 83 bd 64 05 00 + 01148 83 bd 64 05 00 00 00 cmp DWORD PTR flip_vertically$[rbp], 0 - 01143 0f 84 21 01 00 + 0114f 0f 84 21 01 00 00 je $LN92@stbi__bmp_ ; 5243 : stbi_uc t; ; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { - 01149 c7 85 24 05 00 + 01155 c7 85 24 05 00 00 00 00 00 00 mov DWORD PTR j$[rbp], 0 - 01153 eb 0e jmp SHORT $LN31@stbi__bmp_ + 0115f eb 0e jmp SHORT $LN31@stbi__bmp_ $LN29@stbi__bmp_: - 01155 8b 85 24 05 00 + 01161 8b 85 24 05 00 00 mov eax, DWORD PTR j$[rbp] - 0115b ff c0 inc eax - 0115d 89 85 24 05 00 + 01167 ff c0 inc eax + 01169 89 85 24 05 00 00 mov DWORD PTR j$[rbp], eax $LN31@stbi__bmp_: - 01163 48 8b 85 30 0d + 0116f 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 0116a 8b 40 04 mov eax, DWORD PTR [rax+4] - 0116d d1 f8 sar eax, 1 - 0116f 39 85 24 05 00 + 01176 8b 40 04 mov eax, DWORD PTR [rax+4] + 01179 d1 f8 sar eax, 1 + 0117b 39 85 24 05 00 00 cmp DWORD PTR j$[rbp], eax - 01175 0f 8d ef 00 00 + 01181 0f 8d ef 00 00 00 jge $LN30@stbi__bmp_ ; 5245 : stbi_uc* p1 = out + j * s->img_x * target; - 0117b 48 8b 85 30 0d + 01187 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 01182 8b 8d 24 05 00 + 0118e 8b 8d 24 05 00 00 mov ecx, DWORD PTR j$[rbp] - 01188 0f af 08 imul ecx, DWORD PTR [rax] - 0118b 8b c1 mov eax, ecx - 0118d 0f af 85 a4 05 + 01194 0f af 08 imul ecx, DWORD PTR [rax] + 01197 8b c1 mov eax, ecx + 01199 0f af 85 a4 05 00 00 imul eax, DWORD PTR target$[rbp] - 01194 8b c0 mov eax, eax - 01196 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 0119a 48 03 c8 add rcx, rax - 0119d 48 8b c1 mov rax, rcx - 011a0 48 89 85 08 09 + 011a0 8b c0 mov eax, eax + 011a2 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 011a6 48 03 c8 add rcx, rax + 011a9 48 8b c1 mov rax, rcx + 011ac 48 89 85 08 09 00 00 mov QWORD PTR p1$29[rbp], rax ; 5246 : stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target; - 011a7 48 8b 85 30 0d + 011b3 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 011ae 8b 40 04 mov eax, DWORD PTR [rax+4] - 011b1 ff c8 dec eax - 011b3 2b 85 24 05 00 + 011ba 8b 40 04 mov eax, DWORD PTR [rax+4] + 011bd ff c8 dec eax + 011bf 2b 85 24 05 00 00 sub eax, DWORD PTR j$[rbp] - 011b9 48 8b 8d 30 0d + 011c5 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 011c0 0f af 01 imul eax, DWORD PTR [rcx] - 011c3 0f af 85 a4 05 + 011cc 0f af 01 imul eax, DWORD PTR [rcx] + 011cf 0f af 85 a4 05 00 00 imul eax, DWORD PTR target$[rbp] - 011ca 8b c0 mov eax, eax - 011cc 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 011d0 48 03 c8 add rcx, rax - 011d3 48 8b c1 mov rax, rcx - 011d6 48 89 85 28 09 + 011d6 8b c0 mov eax, eax + 011d8 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 011dc 48 03 c8 add rcx, rax + 011df 48 8b c1 mov rax, rcx + 011e2 48 89 85 28 09 00 00 mov QWORD PTR p2$30[rbp], rax ; 5247 : for (i = 0; i < (int)s->img_x * target; ++i) { - 011dd c7 85 04 05 00 + 011e9 c7 85 04 05 00 00 00 00 00 00 mov DWORD PTR i$[rbp], 0 - 011e7 eb 0e jmp SHORT $LN34@stbi__bmp_ + 011f3 eb 0e jmp SHORT $LN34@stbi__bmp_ $LN32@stbi__bmp_: - 011e9 8b 85 04 05 00 + 011f5 8b 85 04 05 00 00 mov eax, DWORD PTR i$[rbp] - 011ef ff c0 inc eax - 011f1 89 85 04 05 00 + 011fb ff c0 inc eax + 011fd 89 85 04 05 00 00 mov DWORD PTR i$[rbp], eax $LN34@stbi__bmp_: - 011f7 48 8b 85 30 0d + 01203 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 011fe 8b 00 mov eax, DWORD PTR [rax] - 01200 0f af 85 a4 05 + 0120a 8b 00 mov eax, DWORD PTR [rax] + 0120c 0f af 85 a4 05 00 00 imul eax, DWORD PTR target$[rbp] - 01207 39 85 04 05 00 + 01213 39 85 04 05 00 00 cmp DWORD PTR i$[rbp], eax - 0120d 7d 56 jge SHORT $LN33@stbi__bmp_ + 01219 7d 56 jge SHORT $LN33@stbi__bmp_ ; 5248 : t = p1[i]; p1[i] = p2[i]; p2[i] = t; - 0120f 48 63 85 04 05 + 0121b 48 63 85 04 05 00 00 movsxd rax, DWORD PTR i$[rbp] - 01216 48 8b 8d 08 09 + 01222 48 8b 8d 08 09 00 00 mov rcx, QWORD PTR p1$29[rbp] - 0121d 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] - 01221 88 85 e4 08 00 + 01229 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax] + 0122d 88 85 e4 08 00 00 mov BYTE PTR t$28[rbp], al - 01227 48 63 85 04 05 + 01233 48 63 85 04 05 00 00 movsxd rax, DWORD PTR i$[rbp] - 0122e 48 63 8d 04 05 + 0123a 48 63 8d 04 05 00 00 movsxd rcx, DWORD PTR i$[rbp] - 01235 48 8b 95 08 09 + 01241 48 8b 95 08 09 00 00 mov rdx, QWORD PTR p1$29[rbp] - 0123c 4c 8b 85 28 09 + 01248 4c 8b 85 28 09 00 00 mov r8, QWORD PTR p2$30[rbp] - 01243 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] - 01248 88 04 0a mov BYTE PTR [rdx+rcx], al - 0124b 48 63 85 04 05 + 0124f 41 0f b6 04 00 movzx eax, BYTE PTR [r8+rax] + 01254 88 04 0a mov BYTE PTR [rdx+rcx], al + 01257 48 63 85 04 05 00 00 movsxd rax, DWORD PTR i$[rbp] - 01252 48 8b 8d 28 09 + 0125e 48 8b 8d 28 09 00 00 mov rcx, QWORD PTR p2$30[rbp] - 01259 0f b6 95 e4 08 + 01265 0f b6 95 e4 08 00 00 movzx edx, BYTE PTR t$28[rbp] - 01260 88 14 01 mov BYTE PTR [rcx+rax], dl + 0126c 88 14 01 mov BYTE PTR [rcx+rax], dl ; 5249 : } - 01263 eb 84 jmp SHORT $LN32@stbi__bmp_ + 0126f eb 84 jmp SHORT $LN32@stbi__bmp_ $LN33@stbi__bmp_: ; 5250 : } - 01265 e9 eb fe ff ff jmp $LN29@stbi__bmp_ + 01271 e9 eb fe ff ff jmp $LN29@stbi__bmp_ $LN30@stbi__bmp_: $LN92@stbi__bmp_: @@ -54725,38 +55141,38 @@ $LN92@stbi__bmp_: ; 5252 : ; 5253 : if (req_comp && req_comp != target) { - 0126a 83 bd 50 0d 00 + 01276 83 bd 50 0d 00 00 00 cmp DWORD PTR req_comp$[rbp], 0 - 01271 74 4d je SHORT $LN93@stbi__bmp_ - 01273 8b 85 a4 05 00 + 0127d 74 4d je SHORT $LN93@stbi__bmp_ + 0127f 8b 85 a4 05 00 00 mov eax, DWORD PTR target$[rbp] - 01279 39 85 50 0d 00 + 01285 39 85 50 0d 00 00 cmp DWORD PTR req_comp$[rbp], eax - 0127f 74 3f je SHORT $LN93@stbi__bmp_ + 0128b 74 3f je SHORT $LN93@stbi__bmp_ ; 5254 : out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); - 01281 48 8b 85 30 0d + 0128d 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 01288 8b 40 04 mov eax, DWORD PTR [rax+4] - 0128b 89 44 24 20 mov DWORD PTR [rsp+32], eax - 0128f 48 8b 85 30 0d + 01294 8b 40 04 mov eax, DWORD PTR [rax+4] + 01297 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0129b 48 8b 85 30 0d 00 00 mov rax, QWORD PTR s$[rbp] - 01296 44 8b 08 mov r9d, DWORD PTR [rax] - 01299 44 8b 85 50 0d + 012a2 44 8b 08 mov r9d, DWORD PTR [rax] + 012a5 44 8b 85 50 0d 00 00 mov r8d, DWORD PTR req_comp$[rbp] - 012a0 8b 95 a4 05 00 + 012ac 8b 95 a4 05 00 00 mov edx, DWORD PTR target$[rbp] - 012a6 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] - 012aa e8 00 00 00 00 call stbi__convert_format - 012af 48 89 45 08 mov QWORD PTR out$[rbp], rax + 012b2 48 8b 4d 08 mov rcx, QWORD PTR out$[rbp] + 012b6 e8 00 00 00 00 call stbi__convert_format + 012bb 48 89 45 08 mov QWORD PTR out$[rbp], rax ; 5255 : if (out == NULL) return out; // stbi__convert_format frees input on failure - 012b3 48 83 7d 08 00 cmp QWORD PTR out$[rbp], 0 - 012b8 75 06 jne SHORT $LN94@stbi__bmp_ - 012ba 48 8b 45 08 mov rax, QWORD PTR out$[rbp] - 012be eb 46 jmp SHORT $LN1@stbi__bmp_ + 012bf 48 83 7d 08 00 cmp QWORD PTR out$[rbp], 0 + 012c4 75 06 jne SHORT $LN94@stbi__bmp_ + 012c6 48 8b 45 08 mov rax, QWORD PTR out$[rbp] + 012ca eb 46 jmp SHORT $LN1@stbi__bmp_ $LN94@stbi__bmp_: $LN93@stbi__bmp_: @@ -54764,57 +55180,57 @@ $LN93@stbi__bmp_: ; 5257 : ; 5258 : *x = s->img_x; - 012c0 48 8b 85 38 0d + 012cc 48 8b 85 38 0d 00 00 mov rax, QWORD PTR x$[rbp] - 012c7 48 8b 8d 30 0d + 012d3 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 012ce 8b 09 mov ecx, DWORD PTR [rcx] - 012d0 89 08 mov DWORD PTR [rax], ecx + 012da 8b 09 mov ecx, DWORD PTR [rcx] + 012dc 89 08 mov DWORD PTR [rax], ecx ; 5259 : *y = s->img_y; - 012d2 48 8b 85 40 0d + 012de 48 8b 85 40 0d 00 00 mov rax, QWORD PTR y$[rbp] - 012d9 48 8b 8d 30 0d + 012e5 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 012e0 8b 49 04 mov ecx, DWORD PTR [rcx+4] - 012e3 89 08 mov DWORD PTR [rax], ecx + 012ec 8b 49 04 mov ecx, DWORD PTR [rcx+4] + 012ef 89 08 mov DWORD PTR [rax], ecx ; 5260 : if (comp) *comp = s->img_n; - 012e5 48 83 bd 48 0d + 012f1 48 83 bd 48 0d 00 00 00 cmp QWORD PTR comp$[rbp], 0 - 012ed 74 13 je SHORT $LN95@stbi__bmp_ - 012ef 48 8b 85 48 0d + 012f9 74 13 je SHORT $LN95@stbi__bmp_ + 012fb 48 8b 85 48 0d 00 00 mov rax, QWORD PTR comp$[rbp] - 012f6 48 8b 8d 30 0d + 01302 48 8b 8d 30 0d 00 00 mov rcx, QWORD PTR s$[rbp] - 012fd 8b 49 08 mov ecx, DWORD PTR [rcx+8] - 01300 89 08 mov DWORD PTR [rax], ecx + 01309 8b 49 08 mov ecx, DWORD PTR [rcx+8] + 0130c 89 08 mov DWORD PTR [rax], ecx $LN95@stbi__bmp_: ; 5261 : return out; - 01302 48 8b 45 08 mov rax, QWORD PTR out$[rbp] + 0130e 48 8b 45 08 mov rax, QWORD PTR out$[rbp] $LN1@stbi__bmp_: ; 5262 : } - 01306 48 8b f8 mov rdi, rax - 01309 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 0130d 48 8d 15 00 00 + 01312 48 8b f8 mov rdi, rax + 01315 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 01319 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__bmp_load$rtcFrameData - 01314 e8 00 00 00 00 call _RTC_CheckStackVars - 01319 48 8b c7 mov rax, rdi - 0131c 48 8b 8d 00 0d + 01320 e8 00 00 00 00 call _RTC_CheckStackVars + 01325 48 8b c7 mov rax, rdi + 01328 48 8b 8d 00 0d 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 01323 48 33 cd xor rcx, rbp - 01326 e8 00 00 00 00 call __security_check_cookie - 0132b 48 8d a5 18 0d + 0132f 48 33 cd xor rcx, rbp + 01332 e8 00 00 00 00 call __security_check_cookie + 01337 48 8d a5 18 0d 00 00 lea rsp, QWORD PTR [rbp+3352] - 01332 5f pop rdi - 01333 5d pop rbp - 01334 c3 ret 0 + 0133e 5f pop rdi + 0133f 5d pop rbp + 01340 c3 ret 0 stbi__bmp_load ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -54836,31 +55252,33 @@ stbi__bmp_test PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 4883 : int r = stbi__bmp_test_raw(s); - 0001f 48 8b 8d 00 01 + 00020 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__bmp_test_raw - 0002b 89 45 04 mov DWORD PTR r$[rbp], eax + 00027 e8 00 00 00 00 call stbi__bmp_test_raw + 0002c 89 45 04 mov DWORD PTR r$[rbp], eax ; 4884 : stbi__rewind(s); - 0002e 48 8b 8d 00 01 + 0002f 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00035 e8 00 00 00 00 call stbi__rewind + 00036 e8 00 00 00 00 call stbi__rewind + 0003b 90 npad 1 ; 4885 : return r; - 0003a 8b 45 04 mov eax, DWORD PTR r$[rbp] + 0003c 8b 45 04 mov eax, DWORD PTR r$[rbp] ; 4886 : } - 0003d 48 8d a5 e8 00 + 0003f 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00044 5f pop rdi - 00045 5d pop rbp - 00046 c3 ret 0 + 00046 5f pop rdi + 00047 5d pop rbp + 00048 c3 ret 0 stbi__bmp_test ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -54894,69 +55312,71 @@ stbi__png_is16 PROC ; COMDAT 0003d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00044 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00049 90 npad 1 ; 4851 : stbi__png p; ; 4852 : p.s = s; - 00049 48 8b 85 20 01 + 0004a 48 8b 85 20 01 00 00 mov rax, QWORD PTR s$[rbp] - 00050 48 89 45 08 mov QWORD PTR p$[rbp], rax + 00051 48 89 45 08 mov QWORD PTR p$[rbp], rax ; 4853 : if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) - 00054 45 33 c9 xor r9d, r9d - 00057 45 33 c0 xor r8d, r8d - 0005a 33 d2 xor edx, edx - 0005c 48 8d 4d 08 lea rcx, QWORD PTR p$[rbp] - 00060 e8 00 00 00 00 call stbi__png_info_raw - 00065 85 c0 test eax, eax - 00067 75 04 jne SHORT $LN2@stbi__png_ + 00055 45 33 c9 xor r9d, r9d + 00058 45 33 c0 xor r8d, r8d + 0005b 33 d2 xor edx, edx + 0005d 48 8d 4d 08 lea rcx, QWORD PTR p$[rbp] + 00061 e8 00 00 00 00 call stbi__png_info_raw + 00066 85 c0 test eax, eax + 00068 75 04 jne SHORT $LN2@stbi__png_ ; 4854 : return 0; - 00069 33 c0 xor eax, eax - 0006b eb 18 jmp SHORT $LN1@stbi__png_ + 0006a 33 c0 xor eax, eax + 0006c eb 19 jmp SHORT $LN1@stbi__png_ $LN2@stbi__png_: ; 4855 : if (p.depth != 16) { - 0006d 83 7d 28 10 cmp DWORD PTR p$[rbp+32], 16 - 00071 74 0d je SHORT $LN3@stbi__png_ + 0006e 83 7d 28 10 cmp DWORD PTR p$[rbp+32], 16 + 00072 74 0e je SHORT $LN3@stbi__png_ ; 4856 : stbi__rewind(p.s); - 00073 48 8b 4d 08 mov rcx, QWORD PTR p$[rbp] - 00077 e8 00 00 00 00 call stbi__rewind + 00074 48 8b 4d 08 mov rcx, QWORD PTR p$[rbp] + 00078 e8 00 00 00 00 call stbi__rewind + 0007d 90 npad 1 ; 4857 : return 0; - 0007c 33 c0 xor eax, eax - 0007e eb 05 jmp SHORT $LN1@stbi__png_ + 0007e 33 c0 xor eax, eax + 00080 eb 05 jmp SHORT $LN1@stbi__png_ $LN3@stbi__png_: ; 4858 : } ; 4859 : return 1; - 00080 b8 01 00 00 00 mov eax, 1 + 00082 b8 01 00 00 00 mov eax, 1 $LN1@stbi__png_: ; 4860 : } - 00085 48 8b f8 mov rdi, rax - 00088 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 0008c 48 8d 15 00 00 + 00087 48 8b f8 mov rdi, rax + 0008a 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 0008e 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__png_is16$rtcFrameData - 00093 e8 00 00 00 00 call _RTC_CheckStackVars - 00098 48 8b c7 mov rax, rdi - 0009b 48 8b 8d f8 00 + 00095 e8 00 00 00 00 call _RTC_CheckStackVars + 0009a 48 8b c7 mov rax, rdi + 0009d 48 8b 8d f8 00 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000a2 48 33 cd xor rcx, rbp - 000a5 e8 00 00 00 00 call __security_check_cookie - 000aa 48 8d a5 08 01 + 000a4 48 33 cd xor rcx, rbp + 000a7 e8 00 00 00 00 call __security_check_cookie + 000ac 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000b1 5f pop rdi - 000b2 5d pop rbp - 000b3 c3 ret 0 + 000b3 5f pop rdi + 000b4 5d pop rbp + 000b5 c3 ret 0 stbi__png_is16 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -54996,42 +55416,43 @@ stbi__png_info PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 4844 : stbi__png p; ; 4845 : p.s = s; - 00058 48 8b 85 20 01 + 00059 48 8b 85 20 01 00 00 mov rax, QWORD PTR s$[rbp] - 0005f 48 89 45 08 mov QWORD PTR p$[rbp], rax + 00060 48 89 45 08 mov QWORD PTR p$[rbp], rax ; 4846 : return stbi__png_info_raw(&p, x, y, comp); - 00063 4c 8b 8d 38 01 + 00064 4c 8b 8d 38 01 00 00 mov r9, QWORD PTR comp$[rbp] - 0006a 4c 8b 85 30 01 + 0006b 4c 8b 85 30 01 00 00 mov r8, QWORD PTR y$[rbp] - 00071 48 8b 95 28 01 + 00072 48 8b 95 28 01 00 00 mov rdx, QWORD PTR x$[rbp] - 00078 48 8d 4d 08 lea rcx, QWORD PTR p$[rbp] - 0007c e8 00 00 00 00 call stbi__png_info_raw + 00079 48 8d 4d 08 lea rcx, QWORD PTR p$[rbp] + 0007d e8 00 00 00 00 call stbi__png_info_raw ; 4847 : } - 00081 48 8b f8 mov rdi, rax - 00084 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00088 48 8d 15 00 00 + 00082 48 8b f8 mov rdi, rax + 00085 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00089 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__png_info$rtcFrameData - 0008f e8 00 00 00 00 call _RTC_CheckStackVars - 00094 48 8b c7 mov rax, rdi - 00097 48 8b 8d f8 00 + 00090 e8 00 00 00 00 call _RTC_CheckStackVars + 00095 48 8b c7 mov rax, rdi + 00098 48 8b 8d f8 00 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 0009e 48 33 cd xor rcx, rbp - 000a1 e8 00 00 00 00 call __security_check_cookie - 000a6 48 8d a5 08 01 + 0009f 48 33 cd xor rcx, rbp + 000a2 e8 00 00 00 00 call __security_check_cookie + 000a7 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000ad 5f pop rdi - 000ae 5d pop rbp - 000af c3 ret 0 + 000ae 5f pop rdi + 000af 5d pop rbp + 000b0 c3 ret 0 stbi__png_info ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -55073,48 +55494,49 @@ stbi__png_load PROC ; COMDAT 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 4817 : stbi__png p; ; 4818 : p.s = s; - 00058 48 8b 85 20 01 + 00059 48 8b 85 20 01 00 00 mov rax, QWORD PTR s$[rbp] - 0005f 48 89 45 08 mov QWORD PTR p$[rbp], rax + 00060 48 89 45 08 mov QWORD PTR p$[rbp], rax ; 4819 : return stbi__do_png(&p, x, y, comp, req_comp, ri); - 00063 48 8b 85 48 01 + 00064 48 8b 85 48 01 00 00 mov rax, QWORD PTR ri$[rbp] - 0006a 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 0006f 8b 85 40 01 00 + 0006b 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 00070 8b 85 40 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00075 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00079 4c 8b 8d 38 01 + 00076 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0007a 4c 8b 8d 38 01 00 00 mov r9, QWORD PTR comp$[rbp] - 00080 4c 8b 85 30 01 + 00081 4c 8b 85 30 01 00 00 mov r8, QWORD PTR y$[rbp] - 00087 48 8b 95 28 01 + 00088 48 8b 95 28 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0008e 48 8d 4d 08 lea rcx, QWORD PTR p$[rbp] - 00092 e8 00 00 00 00 call stbi__do_png + 0008f 48 8d 4d 08 lea rcx, QWORD PTR p$[rbp] + 00093 e8 00 00 00 00 call stbi__do_png ; 4820 : } - 00097 48 8b f8 mov rdi, rax - 0009a 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 0009e 48 8d 15 00 00 + 00098 48 8b f8 mov rdi, rax + 0009b 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 0009f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__png_load$rtcFrameData - 000a5 e8 00 00 00 00 call _RTC_CheckStackVars - 000aa 48 8b c7 mov rax, rdi - 000ad 48 8b 8d f8 00 + 000a6 e8 00 00 00 00 call _RTC_CheckStackVars + 000ab 48 8b c7 mov rax, rdi + 000ae 48 8b 8d f8 00 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000b4 48 33 cd xor rcx, rbp - 000b7 e8 00 00 00 00 call __security_check_cookie - 000bc 48 8d a5 08 01 + 000b5 48 33 cd xor rcx, rbp + 000b8 e8 00 00 00 00 call __security_check_cookie + 000bd 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000c3 5f pop rdi - 000c4 5d pop rbp - 000c5 c3 ret 0 + 000c4 5f pop rdi + 000c5 5d pop rbp + 000c6 c3 ret 0 stbi__png_load ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -55136,32 +55558,34 @@ stbi__png_test PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 4824 : int r; ; 4825 : r = stbi__check_png_header(s); - 0001f 48 8b 8d 00 01 + 00020 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00026 e8 00 00 00 00 call stbi__check_png_header - 0002b 89 45 04 mov DWORD PTR r$[rbp], eax + 00027 e8 00 00 00 00 call stbi__check_png_header + 0002c 89 45 04 mov DWORD PTR r$[rbp], eax ; 4826 : stbi__rewind(s); - 0002e 48 8b 8d 00 01 + 0002f 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00035 e8 00 00 00 00 call stbi__rewind + 00036 e8 00 00 00 00 call stbi__rewind + 0003b 90 npad 1 ; 4827 : return r; - 0003a 8b 45 04 mov eax, DWORD PTR r$[rbp] + 0003c 8b 45 04 mov eax, DWORD PTR r$[rbp] ; 4828 : } - 0003d 48 8d a5 e8 00 + 0003f 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00044 5f pop rdi - 00045 5d pop rbp - 00046 c3 ret 0 + 00046 5f pop rdi + 00047 5d pop rbp + 00048 c3 ret 0 stbi__png_test ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -55190,69 +55614,72 @@ stbi__jpeg_info PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 3561 : int result; ; 3562 : stbi__jpeg* j = (stbi__jpeg*)(stbi__malloc(sizeof(stbi__jpeg))); - 0002e b9 88 48 00 00 mov ecx, 18568 ; 00004888H - 00033 e8 00 00 00 00 call stbi__malloc - 00038 48 89 45 28 mov QWORD PTR j$[rbp], rax + 0002f b9 88 48 00 00 mov ecx, 18568 ; 00004888H + 00034 e8 00 00 00 00 call stbi__malloc + 00039 48 89 45 28 mov QWORD PTR j$[rbp], rax ; 3563 : if (!j) return stbi__err("outofmem", "Out of memory"); - 0003c 48 83 7d 28 00 cmp QWORD PTR j$[rbp], 0 - 00041 75 0e jne SHORT $LN2@stbi__jpeg - 00043 48 8d 0d 00 00 + 0003d 48 83 7d 28 00 cmp QWORD PTR j$[rbp], 0 + 00042 75 0e jne SHORT $LN2@stbi__jpeg + 00044 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 0004a e8 00 00 00 00 call stbi__err - 0004f eb 4d jmp SHORT $LN1@stbi__jpeg + 0004b e8 00 00 00 00 call stbi__err + 00050 eb 4f jmp SHORT $LN1@stbi__jpeg $LN2@stbi__jpeg: ; 3564 : memset(j, 0, sizeof(stbi__jpeg)); - 00051 41 b8 88 48 00 + 00052 41 b8 88 48 00 00 mov r8d, 18568 ; 00004888H - 00057 33 d2 xor edx, edx - 00059 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] - 0005d e8 00 00 00 00 call memset + 00058 33 d2 xor edx, edx + 0005a 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] + 0005e e8 00 00 00 00 call memset + 00063 90 npad 1 ; 3565 : j->s = s; - 00062 48 8b 45 28 mov rax, QWORD PTR j$[rbp] - 00066 48 8b 8d 20 01 + 00064 48 8b 45 28 mov rax, QWORD PTR j$[rbp] + 00068 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0006d 48 89 08 mov QWORD PTR [rax], rcx + 0006f 48 89 08 mov QWORD PTR [rax], rcx ; 3566 : result = stbi__jpeg_info_raw(j, x, y, comp); - 00070 4c 8b 8d 38 01 + 00072 4c 8b 8d 38 01 00 00 mov r9, QWORD PTR comp$[rbp] - 00077 4c 8b 85 30 01 + 00079 4c 8b 85 30 01 00 00 mov r8, QWORD PTR y$[rbp] - 0007e 48 8b 95 28 01 + 00080 48 8b 95 28 01 00 00 mov rdx, QWORD PTR x$[rbp] - 00085 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] - 00089 e8 00 00 00 00 call stbi__jpeg_info_raw - 0008e 89 45 04 mov DWORD PTR result$[rbp], eax + 00087 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] + 0008b e8 00 00 00 00 call stbi__jpeg_info_raw + 00090 89 45 04 mov DWORD PTR result$[rbp], eax ; 3567 : STBI_FREE(j); - 00091 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] - 00095 ff 15 00 00 00 + 00093 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] + 00097 ff 15 00 00 00 00 call QWORD PTR __imp_free + 0009d 90 npad 1 ; 3568 : return result; - 0009b 8b 45 04 mov eax, DWORD PTR result$[rbp] + 0009e 8b 45 04 mov eax, DWORD PTR result$[rbp] $LN1@stbi__jpeg: ; 3569 : } - 0009e 48 8d a5 08 01 + 000a1 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000a5 5f pop rdi - 000a6 5d pop rbp - 000a7 c3 ret 0 + 000a8 5f pop rdi + 000a9 5d pop rbp + 000aa c3 ret 0 stbi__jpeg_info ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -55284,91 +55711,95 @@ stbi__jpeg_load PROC ; COMDAT 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 3521 : unsigned char* result; ; 3522 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); - 0002e b9 88 48 00 00 mov ecx, 18568 ; 00004888H - 00033 e8 00 00 00 00 call stbi__malloc - 00038 48 89 45 28 mov QWORD PTR j$[rbp], rax + 0002f b9 88 48 00 00 mov ecx, 18568 ; 00004888H + 00034 e8 00 00 00 00 call stbi__malloc + 00039 48 89 45 28 mov QWORD PTR j$[rbp], rax ; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); - 0003c 48 83 7d 28 00 cmp QWORD PTR j$[rbp], 0 - 00041 75 31 jne SHORT $LN2@stbi__jpeg - 00043 48 8d 0d 00 00 + 0003d 48 83 7d 28 00 cmp QWORD PTR j$[rbp], 0 + 00042 75 31 jne SHORT $LN2@stbi__jpeg + 00044 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 0004a e8 00 00 00 00 call stbi__err - 0004f 85 c0 test eax, eax - 00051 74 0d je SHORT $LN4@stbi__jpeg - 00053 48 c7 85 f8 00 + 0004b e8 00 00 00 00 call stbi__err + 00050 85 c0 test eax, eax + 00052 74 0d je SHORT $LN4@stbi__jpeg + 00054 48 c7 85 f8 00 00 00 00 00 00 00 mov QWORD PTR tv70[rbp], 0 - 0005e eb 0b jmp SHORT $LN5@stbi__jpeg + 0005f eb 0b jmp SHORT $LN5@stbi__jpeg $LN4@stbi__jpeg: - 00060 48 c7 85 f8 00 + 00061 48 c7 85 f8 00 00 00 00 00 00 00 mov QWORD PTR tv70[rbp], 0 $LN5@stbi__jpeg: - 0006b 48 8b 85 f8 00 + 0006c 48 8b 85 f8 00 00 00 mov rax, QWORD PTR tv70[rbp] - 00072 eb 62 jmp SHORT $LN1@stbi__jpeg + 00073 eb 65 jmp SHORT $LN1@stbi__jpeg $LN2@stbi__jpeg: ; 3524 : memset(j, 0, sizeof(stbi__jpeg)); - 00074 41 b8 88 48 00 + 00075 41 b8 88 48 00 00 mov r8d, 18568 ; 00004888H - 0007a 33 d2 xor edx, edx - 0007c 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] - 00080 e8 00 00 00 00 call memset + 0007b 33 d2 xor edx, edx + 0007d 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] + 00081 e8 00 00 00 00 call memset + 00086 90 npad 1 ; 3525 : STBI_NOTUSED(ri); ; 3526 : j->s = s; - 00085 48 8b 45 28 mov rax, QWORD PTR j$[rbp] - 00089 48 8b 8d 20 01 + 00087 48 8b 45 28 mov rax, QWORD PTR j$[rbp] + 0008b 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00090 48 89 08 mov QWORD PTR [rax], rcx + 00092 48 89 08 mov QWORD PTR [rax], rcx ; 3527 : stbi__setup_jpeg(j); - 00093 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] - 00097 e8 00 00 00 00 call stbi__setup_jpeg + 00095 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] + 00099 e8 00 00 00 00 call stbi__setup_jpeg + 0009e 90 npad 1 ; 3528 : result = load_jpeg_image(j, x, y, comp, req_comp); - 0009c 8b 85 40 01 00 + 0009f 8b 85 40 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 000a2 89 44 24 20 mov DWORD PTR [rsp+32], eax - 000a6 4c 8b 8d 38 01 + 000a5 89 44 24 20 mov DWORD PTR [rsp+32], eax + 000a9 4c 8b 8d 38 01 00 00 mov r9, QWORD PTR comp$[rbp] - 000ad 4c 8b 85 30 01 + 000b0 4c 8b 85 30 01 00 00 mov r8, QWORD PTR y$[rbp] - 000b4 48 8b 95 28 01 + 000b7 48 8b 95 28 01 00 00 mov rdx, QWORD PTR x$[rbp] - 000bb 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] - 000bf e8 00 00 00 00 call load_jpeg_image - 000c4 48 89 45 08 mov QWORD PTR result$[rbp], rax + 000be 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] + 000c2 e8 00 00 00 00 call load_jpeg_image + 000c7 48 89 45 08 mov QWORD PTR result$[rbp], rax ; 3529 : STBI_FREE(j); - 000c8 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] - 000cc ff 15 00 00 00 + 000cb 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] + 000cf ff 15 00 00 00 00 call QWORD PTR __imp_free + 000d5 90 npad 1 ; 3530 : return result; - 000d2 48 8b 45 08 mov rax, QWORD PTR result$[rbp] + 000d6 48 8b 45 08 mov rax, QWORD PTR result$[rbp] $LN1@stbi__jpeg: ; 3531 : } - 000d6 48 8d a5 08 01 + 000da 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000dd 5f pop rdi - 000de 5d pop rbp - 000df c3 ret 0 + 000e1 5f pop rdi + 000e2 5d pop rbp + 000e3 c3 ret 0 stbi__jpeg_load ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -55391,75 +55822,80 @@ stbi__jpeg_test PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 3535 : int r; ; 3536 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); - 0001f b9 88 48 00 00 mov ecx, 18568 ; 00004888H - 00024 e8 00 00 00 00 call stbi__malloc - 00029 48 89 45 28 mov QWORD PTR j$[rbp], rax + 00020 b9 88 48 00 00 mov ecx, 18568 ; 00004888H + 00025 e8 00 00 00 00 call stbi__malloc + 0002a 48 89 45 28 mov QWORD PTR j$[rbp], rax ; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); - 0002d 48 83 7d 28 00 cmp QWORD PTR j$[rbp], 0 - 00032 75 0e jne SHORT $LN2@stbi__jpeg - 00034 48 8d 0d 00 00 + 0002e 48 83 7d 28 00 cmp QWORD PTR j$[rbp], 0 + 00033 75 0e jne SHORT $LN2@stbi__jpeg + 00035 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 0003b e8 00 00 00 00 call stbi__err - 00040 eb 52 jmp SHORT $LN1@stbi__jpeg + 0003c e8 00 00 00 00 call stbi__err + 00041 eb 56 jmp SHORT $LN1@stbi__jpeg $LN2@stbi__jpeg: ; 3538 : memset(j, 0, sizeof(stbi__jpeg)); - 00042 41 b8 88 48 00 + 00043 41 b8 88 48 00 00 mov r8d, 18568 ; 00004888H - 00048 33 d2 xor edx, edx - 0004a 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] - 0004e e8 00 00 00 00 call memset + 00049 33 d2 xor edx, edx + 0004b 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] + 0004f e8 00 00 00 00 call memset + 00054 90 npad 1 ; 3539 : j->s = s; - 00053 48 8b 45 28 mov rax, QWORD PTR j$[rbp] - 00057 48 8b 8d 20 01 + 00055 48 8b 45 28 mov rax, QWORD PTR j$[rbp] + 00059 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0005e 48 89 08 mov QWORD PTR [rax], rcx + 00060 48 89 08 mov QWORD PTR [rax], rcx ; 3540 : stbi__setup_jpeg(j); - 00061 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] - 00065 e8 00 00 00 00 call stbi__setup_jpeg + 00063 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] + 00067 e8 00 00 00 00 call stbi__setup_jpeg + 0006c 90 npad 1 ; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); - 0006a ba 01 00 00 00 mov edx, 1 - 0006f 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] - 00073 e8 00 00 00 00 call stbi__decode_jpeg_header - 00078 89 45 04 mov DWORD PTR r$[rbp], eax + 0006d ba 01 00 00 00 mov edx, 1 + 00072 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] + 00076 e8 00 00 00 00 call stbi__decode_jpeg_header + 0007b 89 45 04 mov DWORD PTR r$[rbp], eax ; 3542 : stbi__rewind(s); - 0007b 48 8b 8d 20 01 + 0007e 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00082 e8 00 00 00 00 call stbi__rewind + 00085 e8 00 00 00 00 call stbi__rewind + 0008a 90 npad 1 ; 3543 : STBI_FREE(j); - 00087 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] - 0008b ff 15 00 00 00 + 0008b 48 8b 4d 28 mov rcx, QWORD PTR j$[rbp] + 0008f ff 15 00 00 00 00 call QWORD PTR __imp_free + 00095 90 npad 1 ; 3544 : return r; - 00091 8b 45 04 mov eax, DWORD PTR r$[rbp] + 00096 8b 45 04 mov eax, DWORD PTR r$[rbp] $LN1@stbi__jpeg: ; 3545 : } - 00094 48 8d a5 08 01 + 00099 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 0009b 5f pop rdi - 0009c 5d pop rbp - 0009d c3 ret 0 + 000a0 5f pop rdi + 000a1 5d pop rbp + 000a2 c3 ret 0 stbi__jpeg_test ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -55480,39 +55916,40 @@ stbi__rewind PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 339 : // conceptually rewind SHOULD rewind to the beginning of the stream, ; 340 : // but we just rewind to the beginning of the initial buffer, because ; 341 : // we only use it after doing 'test', which only ever looks at at most 92 bytes ; 342 : s->img_buffer = s->img_buffer_original; - 0001f 48 8b 85 e0 00 + 00020 48 8b 85 e0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00026 48 8b 8d e0 00 + 00027 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 0002d 48 8b 89 d0 00 + 0002e 48 8b 89 d0 00 00 00 mov rcx, QWORD PTR [rcx+208] - 00034 48 89 88 c0 00 + 00035 48 89 88 c0 00 00 00 mov QWORD PTR [rax+192], rcx ; 343 : s->img_buffer_end = s->img_buffer_original_end; - 0003b 48 8b 85 e0 00 + 0003c 48 8b 85 e0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00042 48 8b 8d e0 00 + 00043 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 00049 48 8b 89 d8 00 + 0004a 48 8b 89 d8 00 00 00 mov rcx, QWORD PTR [rcx+216] - 00050 48 89 88 c8 00 + 00051 48 89 88 c8 00 00 00 mov QWORD PTR [rax+200], rcx ; 344 : } - 00057 48 8d a5 c8 00 + 00058 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0005e 5f pop rdi - 0005f 5d pop rbp - 00060 c3 ret 0 + 0005f 5f pop rdi + 00060 5d pop rbp + 00061 c3 ret 0 stbi__rewind ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -55535,24 +55972,26 @@ stbi__start_file PROC ; COMDAT 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 330 : stbi__start_callbacks(s, &stbi__stdio_callbacks, (void*)f); - 00024 4c 8b 85 e8 00 + 00025 4c 8b 85 e8 00 00 00 mov r8, QWORD PTR f$[rbp] - 0002b 48 8d 15 00 00 + 0002c 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__stdio_callbacks - 00032 48 8b 8d e0 00 + 00033 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 00039 e8 00 00 00 00 call stbi__start_callbacks + 0003a e8 00 00 00 00 call stbi__start_callbacks + 0003f 90 npad 1 ; 331 : } - 0003e 48 8d a5 c8 00 + 00040 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00045 5f pop rdi - 00046 5d pop rbp - 00047 c3 ret 0 + 00047 5f pop rdi + 00048 5d pop rbp + 00049 c3 ret 0 stbi__start_file ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -55574,38 +56013,39 @@ stbi__stdio_eof PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 318 : return feof((FILE*)user) || ferror((FILE*)user); - 0001f 48 8b 8d f0 00 + 00020 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR user$[rbp] - 00026 ff 15 00 00 00 + 00027 ff 15 00 00 00 00 call QWORD PTR __imp_feof - 0002c 85 c0 test eax, eax - 0002e 75 1d jne SHORT $LN3@stbi__stdi - 00030 48 8b 8d f0 00 + 0002d 85 c0 test eax, eax + 0002f 75 1d jne SHORT $LN3@stbi__stdi + 00031 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR user$[rbp] - 00037 ff 15 00 00 00 + 00038 ff 15 00 00 00 00 call QWORD PTR __imp_ferror - 0003d 85 c0 test eax, eax - 0003f 75 0c jne SHORT $LN3@stbi__stdi - 00041 c7 85 c0 00 00 + 0003e 85 c0 test eax, eax + 00040 75 0c jne SHORT $LN3@stbi__stdi + 00042 c7 85 c0 00 00 00 00 00 00 00 mov DWORD PTR tv70[rbp], 0 - 0004b eb 0a jmp SHORT $LN4@stbi__stdi + 0004c eb 0a jmp SHORT $LN4@stbi__stdi $LN3@stbi__stdi: - 0004d c7 85 c0 00 00 + 0004e c7 85 c0 00 00 00 01 00 00 00 mov DWORD PTR tv70[rbp], 1 $LN4@stbi__stdi: - 00057 8b 85 c0 00 00 + 00058 8b 85 c0 00 00 00 mov eax, DWORD PTR tv70[rbp] ; 319 : } - 0005d 48 8d a5 d8 00 + 0005e 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 00064 5f pop rdi - 00065 5d pop rbp - 00066 c3 ret 0 + 00065 5f pop rdi + 00066 5d pop rbp + 00067 c3 ret 0 stbi__stdio_eof ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -55629,49 +56069,52 @@ stbi__stdio_skip PROC ; COMDAT 00017 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001e e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00023 90 npad 1 ; 308 : int ch; ; 309 : fseek((FILE*)user, n, SEEK_CUR); - 00023 41 b8 01 00 00 + 00024 41 b8 01 00 00 00 mov r8d, 1 - 00029 8b 95 08 01 00 + 0002a 8b 95 08 01 00 00 mov edx, DWORD PTR n$[rbp] - 0002f 48 8b 8d 00 01 + 00030 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR user$[rbp] - 00036 ff 15 00 00 00 + 00037 ff 15 00 00 00 00 call QWORD PTR __imp_fseek + 0003d 90 npad 1 ; 310 : ch = fgetc((FILE*)user); /* have to read a byte to reset feof()'s flag */ - 0003c 48 8b 8d 00 01 + 0003e 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR user$[rbp] - 00043 ff 15 00 00 00 + 00045 ff 15 00 00 00 00 call QWORD PTR __imp_fgetc - 00049 89 45 04 mov DWORD PTR ch$[rbp], eax + 0004b 89 45 04 mov DWORD PTR ch$[rbp], eax ; 311 : if (ch != EOF) { - 0004c 83 7d 04 ff cmp DWORD PTR ch$[rbp], -1 - 00050 74 10 je SHORT $LN2@stbi__stdi + 0004e 83 7d 04 ff cmp DWORD PTR ch$[rbp], -1 + 00052 74 11 je SHORT $LN2@stbi__stdi ; 312 : ungetc(ch, (FILE*)user); /* push byte back onto stream if valid. */ - 00052 48 8b 95 00 01 + 00054 48 8b 95 00 01 00 00 mov rdx, QWORD PTR user$[rbp] - 00059 8b 4d 04 mov ecx, DWORD PTR ch$[rbp] - 0005c ff 15 00 00 00 + 0005b 8b 4d 04 mov ecx, DWORD PTR ch$[rbp] + 0005e ff 15 00 00 00 00 call QWORD PTR __imp_ungetc + 00064 90 npad 1 $LN2@stbi__stdi: ; 313 : } ; 314 : } - 00062 48 8d a5 e8 00 + 00065 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00069 5f pop rdi - 0006a 5d pop rbp - 0006b c3 ret 0 + 0006c 5f pop rdi + 0006d 5d pop rbp + 0006e c3 ret 0 stbi__stdio_skip ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -55696,27 +56139,28 @@ stbi__stdio_read PROC ; COMDAT 0001d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00024 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00029 90 npad 1 ; 303 : return (int)fread(data, 1, size, (FILE*)user); - 00029 48 63 85 f0 00 + 0002a 48 63 85 f0 00 00 00 movsxd rax, DWORD PTR size$[rbp] - 00030 4c 8b 8d e0 00 + 00031 4c 8b 8d e0 00 00 00 mov r9, QWORD PTR user$[rbp] - 00037 4c 8b c0 mov r8, rax - 0003a ba 01 00 00 00 mov edx, 1 - 0003f 48 8b 8d e8 00 + 00038 4c 8b c0 mov r8, rax + 0003b ba 01 00 00 00 mov edx, 1 + 00040 48 8b 8d e8 00 00 00 mov rcx, QWORD PTR data$[rbp] - 00046 ff 15 00 00 00 + 00047 ff 15 00 00 00 00 call QWORD PTR __imp_fread ; 304 : } - 0004c 48 8d a5 c8 00 + 0004d 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00053 5f pop rdi - 00054 5d pop rbp - 00055 c3 ret 0 + 00054 5f pop rdi + 00055 5d pop rbp + 00056 c3 ret 0 stbi__stdio_read ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -55743,91 +56187,93 @@ stbi__start_callbacks PROC ; COMDAT 0001e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00025 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002a 90 npad 1 ; 289 : s->io = *c; - 0002a 48 8b 85 f0 00 + 0002b 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00031 48 8d 78 10 lea rdi, QWORD PTR [rax+16] - 00035 48 8b b5 f8 00 + 00032 48 8d 78 10 lea rdi, QWORD PTR [rax+16] + 00036 48 8b b5 f8 00 00 00 mov rsi, QWORD PTR c$[rbp] - 0003c b9 18 00 00 00 mov ecx, 24 - 00041 f3 a4 rep movsb + 0003d b9 18 00 00 00 mov ecx, 24 + 00042 f3 a4 rep movsb ; 290 : s->io_user_data = user; - 00043 48 8b 85 f0 00 + 00044 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 0004a 48 8b 8d 00 01 + 0004b 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR user$[rbp] - 00051 48 89 48 28 mov QWORD PTR [rax+40], rcx + 00052 48 89 48 28 mov QWORD PTR [rax+40], rcx ; 291 : s->buflen = sizeof(s->buffer_start); - 00055 48 8b 85 f0 00 + 00056 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 0005c c7 40 34 80 00 + 0005d c7 40 34 80 00 00 00 mov DWORD PTR [rax+52], 128 ; 00000080H ; 292 : s->read_from_callbacks = 1; - 00063 48 8b 85 f0 00 + 00064 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 0006a c7 40 30 01 00 + 0006b c7 40 30 01 00 00 00 mov DWORD PTR [rax+48], 1 ; 293 : s->callback_already_read = 0; - 00071 48 8b 85 f0 00 + 00072 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00078 c7 80 b8 00 00 + 00079 c7 80 b8 00 00 00 00 00 00 00 mov DWORD PTR [rax+184], 0 ; 294 : s->img_buffer = s->img_buffer_original = s->buffer_start; - 00082 48 8b 85 f0 00 + 00083 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00089 48 83 c0 38 add rax, 56 ; 00000038H - 0008d 48 89 85 c0 00 + 0008a 48 83 c0 38 add rax, 56 ; 00000038H + 0008e 48 89 85 c0 00 00 00 mov QWORD PTR tv72[rbp], rax - 00094 48 8b 85 f0 00 + 00095 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 0009b 48 8b 8d c0 00 + 0009c 48 8b 8d c0 00 00 00 mov rcx, QWORD PTR tv72[rbp] - 000a2 48 89 88 d0 00 + 000a3 48 89 88 d0 00 00 00 mov QWORD PTR [rax+208], rcx - 000a9 48 8b 85 f0 00 + 000aa 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 000b0 48 8b 8d c0 00 + 000b1 48 8b 8d c0 00 00 00 mov rcx, QWORD PTR tv72[rbp] - 000b7 48 89 88 c0 00 + 000b8 48 89 88 c0 00 00 00 mov QWORD PTR [rax+192], rcx ; 295 : stbi__refill_buffer(s); - 000be 48 8b 8d f0 00 + 000bf 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 000c5 e8 00 00 00 00 call stbi__refill_buffer + 000c6 e8 00 00 00 00 call stbi__refill_buffer + 000cb 90 npad 1 ; 296 : s->img_buffer_original_end = s->img_buffer_end; - 000ca 48 8b 85 f0 00 + 000cc 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 000d1 48 8b 8d f0 00 + 000d3 48 8b 8d f0 00 00 00 mov rcx, QWORD PTR s$[rbp] - 000d8 48 8b 89 c8 00 + 000da 48 8b 89 c8 00 00 00 mov rcx, QWORD PTR [rcx+200] - 000df 48 89 88 d8 00 + 000e1 48 89 88 d8 00 00 00 mov QWORD PTR [rax+216], rcx ; 297 : } - 000e6 48 8d a5 d0 00 + 000e8 48 8d a5 d0 00 00 00 lea rsp, QWORD PTR [rbp+208] - 000ed 5f pop rdi - 000ee 5e pop rsi - 000ef 5d pop rbp - 000f0 c3 ret 0 + 000ef 5f pop rdi + 000f0 5e pop rsi + 000f1 5d pop rbp + 000f2 c3 ret 0 stbi__start_callbacks ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -55853,72 +56299,73 @@ stbi__start_mem PROC ; COMDAT 0001d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00024 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00029 90 npad 1 ; 279 : s->io.read = NULL; - 00029 48 8b 85 f0 00 + 0002a 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00030 48 c7 40 10 00 + 00031 48 c7 40 10 00 00 00 00 mov QWORD PTR [rax+16], 0 ; 280 : s->read_from_callbacks = 0; - 00038 48 8b 85 f0 00 + 00039 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 0003f c7 40 30 00 00 + 00040 c7 40 30 00 00 00 00 mov DWORD PTR [rax+48], 0 ; 281 : s->callback_already_read = 0; - 00046 48 8b 85 f0 00 + 00047 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 0004d c7 80 b8 00 00 + 0004e c7 80 b8 00 00 00 00 00 00 00 mov DWORD PTR [rax+184], 0 ; 282 : s->img_buffer = s->img_buffer_original = (stbi_uc*)buffer; - 00057 48 8b 85 f0 00 + 00058 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 0005e 48 8b 8d f8 00 + 0005f 48 8b 8d f8 00 00 00 mov rcx, QWORD PTR buffer$[rbp] - 00065 48 89 88 d0 00 + 00066 48 89 88 d0 00 00 00 mov QWORD PTR [rax+208], rcx - 0006c 48 8b 85 f0 00 + 0006d 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 00073 48 8b 8d f8 00 + 00074 48 8b 8d f8 00 00 00 mov rcx, QWORD PTR buffer$[rbp] - 0007a 48 89 88 c0 00 + 0007b 48 89 88 c0 00 00 00 mov QWORD PTR [rax+192], rcx ; 283 : s->img_buffer_end = s->img_buffer_original_end = (stbi_uc*)buffer + len; - 00081 48 63 85 00 01 + 00082 48 63 85 00 01 00 00 movsxd rax, DWORD PTR len$[rbp] - 00088 48 8b 8d f8 00 + 00089 48 8b 8d f8 00 00 00 mov rcx, QWORD PTR buffer$[rbp] - 0008f 48 03 c8 add rcx, rax - 00092 48 89 8d c0 00 + 00090 48 03 c8 add rcx, rax + 00093 48 89 8d c0 00 00 00 mov QWORD PTR tv72[rbp], rcx - 00099 48 8b 85 f0 00 + 0009a 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 000a0 48 8b 8d c0 00 + 000a1 48 8b 8d c0 00 00 00 mov rcx, QWORD PTR tv72[rbp] - 000a7 48 89 88 d8 00 + 000a8 48 89 88 d8 00 00 00 mov QWORD PTR [rax+216], rcx - 000ae 48 8b 85 f0 00 + 000af 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp] - 000b5 48 8b 8d c0 00 + 000b6 48 8b 8d c0 00 00 00 mov rcx, QWORD PTR tv72[rbp] - 000bc 48 89 88 c8 00 + 000bd 48 89 88 c8 00 00 00 mov QWORD PTR [rax+200], rcx ; 284 : } - 000c3 48 8d a5 d8 00 + 000c4 48 8d a5 d8 00 00 00 lea rsp, QWORD PTR [rbp+216] - 000ca 5f pop rdi - 000cb 5d pop rbp - 000cc c3 ret 0 + 000cb 5f pop rdi + 000cc 5d pop rbp + 000cd c3 ret 0 stbi__start_mem ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -55940,122 +56387,123 @@ stbi__refill_buffer PROC ; COMDAT 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 1059 : int n = (s->io.read)(s->io_user_data, (char*)s->buffer_start, s->buflen); - 0001f 48 8b 85 00 01 + 00020 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00026 48 83 c0 38 add rax, 56 ; 00000038H - 0002a 48 8b 8d 00 01 + 00027 48 83 c0 38 add rax, 56 ; 00000038H + 0002b 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00031 44 8b 41 34 mov r8d, DWORD PTR [rcx+52] - 00035 48 8b d0 mov rdx, rax - 00038 48 8b 85 00 01 + 00032 44 8b 41 34 mov r8d, DWORD PTR [rcx+52] + 00036 48 8b d0 mov rdx, rax + 00039 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 0003f 48 8b 48 28 mov rcx, QWORD PTR [rax+40] - 00043 48 8b 85 00 01 + 00040 48 8b 48 28 mov rcx, QWORD PTR [rax+40] + 00044 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 0004a ff 50 10 call QWORD PTR [rax+16] - 0004d 89 45 04 mov DWORD PTR n$[rbp], eax + 0004b ff 50 10 call QWORD PTR [rax+16] + 0004e 89 45 04 mov DWORD PTR n$[rbp], eax ; 1060 : s->callback_already_read += (int)(s->img_buffer - s->img_buffer_original); - 00050 48 8b 85 00 01 + 00051 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00057 48 8b 8d 00 01 + 00058 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 0005e 48 8b 89 d0 00 + 0005f 48 8b 89 d0 00 00 00 mov rcx, QWORD PTR [rcx+208] - 00065 48 8b 80 c0 00 + 00066 48 8b 80 c0 00 00 00 mov rax, QWORD PTR [rax+192] - 0006c 48 2b c1 sub rax, rcx - 0006f 48 8b 8d 00 01 + 0006d 48 2b c1 sub rax, rcx + 00070 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00076 03 81 b8 00 00 + 00077 03 81 b8 00 00 00 add eax, DWORD PTR [rcx+184] - 0007c 48 8b 8d 00 01 + 0007d 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00083 89 81 b8 00 00 + 00084 89 81 b8 00 00 00 mov DWORD PTR [rcx+184], eax ; 1061 : if (n == 0) { - 00089 83 7d 04 00 cmp DWORD PTR n$[rbp], 0 - 0008d 75 53 jne SHORT $LN2@stbi__refi + 0008a 83 7d 04 00 cmp DWORD PTR n$[rbp], 0 + 0008e 75 53 jne SHORT $LN2@stbi__refi ; 1062 : // at end of file, treat same as if from memory, but need to handle case ; 1063 : // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file ; 1064 : s->read_from_callbacks = 0; - 0008f 48 8b 85 00 01 + 00090 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 00096 c7 40 30 00 00 + 00097 c7 40 30 00 00 00 00 mov DWORD PTR [rax+48], 0 ; 1065 : s->img_buffer = s->buffer_start; - 0009d 48 8b 85 00 01 + 0009e 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 000a4 48 83 c0 38 add rax, 56 ; 00000038H - 000a8 48 8b 8d 00 01 + 000a5 48 83 c0 38 add rax, 56 ; 00000038H + 000a9 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000af 48 89 81 c0 00 + 000b0 48 89 81 c0 00 00 00 mov QWORD PTR [rcx+192], rax ; 1066 : s->img_buffer_end = s->buffer_start + 1; - 000b6 48 8b 85 00 01 + 000b7 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 000bd 48 83 c0 39 add rax, 57 ; 00000039H - 000c1 48 8b 8d 00 01 + 000be 48 83 c0 39 add rax, 57 ; 00000039H + 000c2 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000c8 48 89 81 c8 00 + 000c9 48 89 81 c8 00 00 00 mov QWORD PTR [rcx+200], rax ; 1067 : *s->img_buffer = 0; - 000cf 48 8b 85 00 01 + 000d0 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 000d6 48 8b 80 c0 00 + 000d7 48 8b 80 c0 00 00 00 mov rax, QWORD PTR [rax+192] - 000dd c6 00 00 mov BYTE PTR [rax], 0 + 000de c6 00 00 mov BYTE PTR [rax], 0 ; 1068 : } - 000e0 eb 37 jmp SHORT $LN3@stbi__refi + 000e1 eb 37 jmp SHORT $LN3@stbi__refi $LN2@stbi__refi: ; 1069 : else { ; 1070 : s->img_buffer = s->buffer_start; - 000e2 48 8b 85 00 01 + 000e3 48 8b 85 00 01 00 00 mov rax, QWORD PTR s$[rbp] - 000e9 48 83 c0 38 add rax, 56 ; 00000038H - 000ed 48 8b 8d 00 01 + 000ea 48 83 c0 38 add rax, 56 ; 00000038H + 000ee 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 000f4 48 89 81 c0 00 + 000f5 48 89 81 c0 00 00 00 mov QWORD PTR [rcx+192], rax ; 1071 : s->img_buffer_end = s->buffer_start + n; - 000fb 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] - 000ff 48 8b 8d 00 01 + 000fc 48 63 45 04 movsxd rax, DWORD PTR n$[rbp] + 00100 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00106 48 8d 44 01 38 lea rax, QWORD PTR [rcx+rax+56] - 0010b 48 8b 8d 00 01 + 00107 48 8d 44 01 38 lea rax, QWORD PTR [rcx+rax+56] + 0010c 48 8b 8d 00 01 00 00 mov rcx, QWORD PTR s$[rbp] - 00112 48 89 81 c8 00 + 00113 48 89 81 c8 00 00 00 mov QWORD PTR [rcx+200], rax $LN3@stbi__refi: ; 1072 : } ; 1073 : } - 00119 48 8d a5 e8 00 + 0011a 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00120 5f pop rdi - 00121 5d pop rbp - 00122 c3 ret 0 + 00121 5f pop rdi + 00122 5d pop rbp + 00123 c3 ret 0 stbi__refill_buffer ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -56076,36 +56524,37 @@ stbi__sse2_available PROC ; COMDAT 0000f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00016 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001b 90 npad 1 ; 208 : int info3 = stbi__cpuid3(); - 0001b e8 00 00 00 00 call stbi__cpuid3 - 00020 89 45 04 mov DWORD PTR info3$[rbp], eax + 0001c e8 00 00 00 00 call stbi__cpuid3 + 00021 89 45 04 mov DWORD PTR info3$[rbp], eax ; 209 : return ((info3 >> 26) & 1) != 0; - 00023 8b 45 04 mov eax, DWORD PTR info3$[rbp] - 00026 c1 f8 1a sar eax, 26 - 00029 83 e0 01 and eax, 1 - 0002c 85 c0 test eax, eax - 0002e 74 0c je SHORT $LN3@stbi__sse2 - 00030 c7 85 d4 00 00 + 00024 8b 45 04 mov eax, DWORD PTR info3$[rbp] + 00027 c1 f8 1a sar eax, 26 + 0002a 83 e0 01 and eax, 1 + 0002d 85 c0 test eax, eax + 0002f 74 0c je SHORT $LN3@stbi__sse2 + 00031 c7 85 d4 00 00 00 01 00 00 00 mov DWORD PTR tv68[rbp], 1 - 0003a eb 0a jmp SHORT $LN4@stbi__sse2 + 0003b eb 0a jmp SHORT $LN4@stbi__sse2 $LN3@stbi__sse2: - 0003c c7 85 d4 00 00 + 0003d c7 85 d4 00 00 00 00 00 00 00 mov DWORD PTR tv68[rbp], 0 $LN4@stbi__sse2: - 00046 8b 85 d4 00 00 + 00047 8b 85 d4 00 00 00 mov eax, DWORD PTR tv68[rbp] ; 210 : } - 0004c 48 8d a5 e8 00 + 0004d 48 8d a5 e8 00 00 00 lea rsp, QWORD PTR [rbp+232] - 00053 5f pop rdi - 00054 5d pop rbp - 00055 c3 ret 0 + 00054 5f pop rdi + 00055 5d pop rbp + 00056 c3 ret 0 stbi__sse2_available ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -56136,43 +56585,44 @@ stbi__cpuid3 PROC ; COMDAT 00032 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00039 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0003e 90 npad 1 ; 186 : int info[4]; ; 187 : __cpuid(info, 1); - 0003e b8 01 00 00 00 mov eax, 1 - 00043 33 c9 xor ecx, ecx - 00045 0f a2 cpuid - 00047 4c 8d 45 08 lea r8, QWORD PTR info$[rbp] - 0004b 41 89 00 mov DWORD PTR [r8], eax - 0004e 41 89 58 04 mov DWORD PTR [r8+4], ebx - 00052 41 89 48 08 mov DWORD PTR [r8+8], ecx - 00056 41 89 50 0c mov DWORD PTR [r8+12], edx + 0003f b8 01 00 00 00 mov eax, 1 + 00044 33 c9 xor ecx, ecx + 00046 0f a2 cpuid + 00048 4c 8d 45 08 lea r8, QWORD PTR info$[rbp] + 0004c 41 89 00 mov DWORD PTR [r8], eax + 0004f 41 89 58 04 mov DWORD PTR [r8+4], ebx + 00053 41 89 48 08 mov DWORD PTR [r8+8], ecx + 00057 41 89 50 0c mov DWORD PTR [r8+12], edx ; 188 : return info[3]; - 0005a b8 04 00 00 00 mov eax, 4 - 0005f 48 6b c0 03 imul rax, rax, 3 - 00063 8b 44 05 08 mov eax, DWORD PTR info$[rbp+rax] + 0005b b8 04 00 00 00 mov eax, 4 + 00060 48 6b c0 03 imul rax, rax, 3 + 00064 8b 44 05 08 mov eax, DWORD PTR info$[rbp+rax] ; 189 : } - 00067 8b f8 mov edi, eax - 00069 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 0006d 48 8d 15 00 00 + 00068 8b f8 mov edi, eax + 0006a 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 0006e 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__cpuid3$rtcFrameData - 00074 e8 00 00 00 00 call _RTC_CheckStackVars - 00079 8b c7 mov eax, edi - 0007b 48 8b 8d e8 00 + 00075 e8 00 00 00 00 call _RTC_CheckStackVars + 0007a 8b c7 mov eax, edi + 0007c 48 8b 8d e8 00 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00082 48 33 cd xor rcx, rbp - 00085 e8 00 00 00 00 call __security_check_cookie - 0008a 48 8d a5 f0 00 + 00083 48 33 cd xor rcx, rbp + 00086 e8 00 00 00 00 call __security_check_cookie + 0008b 48 8d a5 f0 00 00 00 lea rsp, QWORD PTR [rbp+240] - 00091 5f pop rdi - 00092 5b pop rbx - 00093 5d pop rbp - 00094 c3 ret 0 + 00092 5f pop rdi + 00093 5b pop rbx + 00094 5d pop rbp + 00095 c3 ret 0 stbi__cpuid3 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -56214,72 +56664,73 @@ $LN5: 00051 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00058 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0005d 90 npad 1 ; 4068 : stbi__zbuf a; ; 4069 : a.zbuffer = (stbi_uc*)ibuffer; - 0005d 48 8b 85 50 16 + 0005e 48 8b 85 50 16 00 00 mov rax, QWORD PTR ibuffer$[rbp] - 00064 48 89 45 10 mov QWORD PTR a$[rbp], rax + 00065 48 89 45 10 mov QWORD PTR a$[rbp], rax ; 4070 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; - 00068 48 63 85 58 16 + 00069 48 63 85 58 16 00 00 movsxd rax, DWORD PTR ilen$[rbp] - 0006f 48 8b 8d 50 16 + 00070 48 8b 8d 50 16 00 00 mov rcx, QWORD PTR ibuffer$[rbp] - 00076 48 03 c8 add rcx, rax - 00079 48 8b c1 mov rax, rcx - 0007c 48 89 45 18 mov QWORD PTR a$[rbp+8], rax + 00077 48 03 c8 add rcx, rax + 0007a 48 8b c1 mov rax, rcx + 0007d 48 89 45 18 mov QWORD PTR a$[rbp+8], rax ; 4071 : if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) - 00080 c7 44 24 20 00 + 00081 c7 44 24 20 00 00 00 00 mov DWORD PTR [rsp+32], 0 - 00088 45 33 c9 xor r9d, r9d - 0008b 44 8b 85 48 16 + 00089 45 33 c9 xor r9d, r9d + 0008c 44 8b 85 48 16 00 00 mov r8d, DWORD PTR olen$[rbp] - 00092 48 8b 95 40 16 + 00093 48 8b 95 40 16 00 00 mov rdx, QWORD PTR obuffer$[rbp] - 00099 48 8d 4d 10 lea rcx, QWORD PTR a$[rbp] - 0009d e8 00 00 00 00 call stbi__do_zlib - 000a2 85 c0 test eax, eax - 000a4 74 12 je SHORT $LN2@stbi_zlib_ + 0009a 48 8d 4d 10 lea rcx, QWORD PTR a$[rbp] + 0009e e8 00 00 00 00 call stbi__do_zlib + 000a3 85 c0 test eax, eax + 000a5 74 12 je SHORT $LN2@stbi_zlib_ ; 4072 : return (int)(a.zout - a.zout_start); - 000a6 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] - 000aa 48 8b 4d 28 mov rcx, QWORD PTR a$[rbp+24] - 000ae 48 2b c8 sub rcx, rax - 000b1 48 8b c1 mov rax, rcx - 000b4 eb 07 jmp SHORT $LN1@stbi_zlib_ - 000b6 eb 05 jmp SHORT $LN3@stbi_zlib_ + 000a7 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] + 000ab 48 8b 4d 28 mov rcx, QWORD PTR a$[rbp+24] + 000af 48 2b c8 sub rcx, rax + 000b2 48 8b c1 mov rax, rcx + 000b5 eb 07 jmp SHORT $LN1@stbi_zlib_ + 000b7 eb 05 jmp SHORT $LN3@stbi_zlib_ $LN2@stbi_zlib_: ; 4073 : else ; 4074 : return -1; - 000b8 b8 ff ff ff ff mov eax, -1 + 000b9 b8 ff ff ff ff mov eax, -1 $LN3@stbi_zlib_: $LN1@stbi_zlib_: ; 4075 : } - 000bd 48 8b f8 mov rdi, rax - 000c0 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 000c4 48 8d 15 00 00 + 000be 48 8b f8 mov rdi, rax + 000c1 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 000c5 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_zlib_decode_noheader_buffer$rtcFrameData - 000cb e8 00 00 00 00 call _RTC_CheckStackVars - 000d0 48 8b c7 mov rax, rdi - 000d3 48 8b 8d 18 16 + 000cc e8 00 00 00 00 call _RTC_CheckStackVars + 000d1 48 8b c7 mov rax, rdi + 000d4 48 8b 8d 18 16 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000da 48 33 cd xor rcx, rbp - 000dd e8 00 00 00 00 call __security_check_cookie - 000e2 48 8d a5 28 16 + 000db 48 33 cd xor rcx, rbp + 000de e8 00 00 00 00 call __security_check_cookie + 000e3 48 8d a5 28 16 00 00 lea rsp, QWORD PTR [rbp+5672] - 000e9 5f pop rdi - 000ea 5d pop rbp - 000eb c3 ret 0 + 000ea 5f pop rdi + 000eb 5d pop rbp + 000ec c3 ret 0 stbi_zlib_decode_noheader_buffer ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -56320,110 +56771,112 @@ $LN7: 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 4051 : stbi__zbuf a; ; 4052 : char* p = (char*)stbi__malloc(16384); - 00058 b9 00 40 00 00 mov ecx, 16384 ; 00004000H - 0005d e8 00 00 00 00 call stbi__malloc - 00062 48 89 85 28 10 + 00059 b9 00 40 00 00 mov ecx, 16384 ; 00004000H + 0005e e8 00 00 00 00 call stbi__malloc + 00063 48 89 85 28 10 00 00 mov QWORD PTR p$[rbp], rax ; 4053 : if (p == NULL) return NULL; - 00069 48 83 bd 28 10 + 0006a 48 83 bd 28 10 00 00 00 cmp QWORD PTR p$[rbp], 0 - 00071 75 07 jne SHORT $LN2@stbi_zlib_ - 00073 33 c0 xor eax, eax - 00075 e9 80 00 00 00 jmp $LN1@stbi_zlib_ + 00072 75 07 jne SHORT $LN2@stbi_zlib_ + 00074 33 c0 xor eax, eax + 00076 e9 81 00 00 00 jmp $LN1@stbi_zlib_ $LN2@stbi_zlib_: ; 4054 : a.zbuffer = (stbi_uc*)buffer; - 0007a 48 8b 85 60 16 + 0007b 48 8b 85 60 16 00 00 mov rax, QWORD PTR buffer$[rbp] - 00081 48 89 45 10 mov QWORD PTR a$[rbp], rax + 00082 48 89 45 10 mov QWORD PTR a$[rbp], rax ; 4055 : a.zbuffer_end = (stbi_uc*)buffer + len; - 00085 48 63 85 68 16 + 00086 48 63 85 68 16 00 00 movsxd rax, DWORD PTR len$[rbp] - 0008c 48 8b 8d 60 16 + 0008d 48 8b 8d 60 16 00 00 mov rcx, QWORD PTR buffer$[rbp] - 00093 48 03 c8 add rcx, rax - 00096 48 8b c1 mov rax, rcx - 00099 48 89 45 18 mov QWORD PTR a$[rbp+8], rax + 00094 48 03 c8 add rcx, rax + 00097 48 8b c1 mov rax, rcx + 0009a 48 89 45 18 mov QWORD PTR a$[rbp+8], rax ; 4056 : if (stbi__do_zlib(&a, p, 16384, 1, 0)) { - 0009d c7 44 24 20 00 + 0009e c7 44 24 20 00 00 00 00 mov DWORD PTR [rsp+32], 0 - 000a5 41 b9 01 00 00 + 000a6 41 b9 01 00 00 00 mov r9d, 1 - 000ab 41 b8 00 40 00 + 000ac 41 b8 00 40 00 00 mov r8d, 16384 ; 00004000H - 000b1 48 8b 95 28 10 + 000b2 48 8b 95 28 10 00 00 mov rdx, QWORD PTR p$[rbp] - 000b8 48 8d 4d 10 lea rcx, QWORD PTR a$[rbp] - 000bc e8 00 00 00 00 call stbi__do_zlib - 000c1 85 c0 test eax, eax - 000c3 74 29 je SHORT $LN3@stbi_zlib_ + 000b9 48 8d 4d 10 lea rcx, QWORD PTR a$[rbp] + 000bd e8 00 00 00 00 call stbi__do_zlib + 000c2 85 c0 test eax, eax + 000c4 74 29 je SHORT $LN3@stbi_zlib_ ; 4057 : if (outlen) *outlen = (int)(a.zout - a.zout_start); - 000c5 48 83 bd 70 16 + 000c6 48 83 bd 70 16 00 00 00 cmp QWORD PTR outlen$[rbp], 0 - 000cd 74 17 je SHORT $LN5@stbi_zlib_ - 000cf 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] - 000d3 48 8b 4d 28 mov rcx, QWORD PTR a$[rbp+24] - 000d7 48 2b c8 sub rcx, rax - 000da 48 8b c1 mov rax, rcx - 000dd 48 8b 8d 70 16 + 000ce 74 17 je SHORT $LN5@stbi_zlib_ + 000d0 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] + 000d4 48 8b 4d 28 mov rcx, QWORD PTR a$[rbp+24] + 000d8 48 2b c8 sub rcx, rax + 000db 48 8b c1 mov rax, rcx + 000de 48 8b 8d 70 16 00 00 mov rcx, QWORD PTR outlen$[rbp] - 000e4 89 01 mov DWORD PTR [rcx], eax + 000e5 89 01 mov DWORD PTR [rcx], eax $LN5@stbi_zlib_: ; 4058 : return a.zout_start; - 000e6 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] - 000ea eb 0e jmp SHORT $LN1@stbi_zlib_ + 000e7 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] + 000eb eb 0f jmp SHORT $LN1@stbi_zlib_ ; 4059 : } - 000ec eb 0c jmp SHORT $LN4@stbi_zlib_ + 000ed eb 0d jmp SHORT $LN4@stbi_zlib_ $LN3@stbi_zlib_: ; 4060 : else { ; 4061 : STBI_FREE(a.zout_start); - 000ee 48 8b 4d 30 mov rcx, QWORD PTR a$[rbp+32] - 000f2 ff 15 00 00 00 + 000ef 48 8b 4d 30 mov rcx, QWORD PTR a$[rbp+32] + 000f3 ff 15 00 00 00 00 call QWORD PTR __imp_free + 000f9 90 npad 1 ; 4062 : return NULL; - 000f8 33 c0 xor eax, eax + 000fa 33 c0 xor eax, eax $LN4@stbi_zlib_: $LN1@stbi_zlib_: ; 4063 : } ; 4064 : } - 000fa 48 8b f8 mov rdi, rax - 000fd 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 00101 48 8d 15 00 00 + 000fc 48 8b f8 mov rdi, rax + 000ff 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 00103 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_zlib_decode_noheader_malloc$rtcFrameData - 00108 e8 00 00 00 00 call _RTC_CheckStackVars - 0010d 48 8b c7 mov rax, rdi - 00110 48 8b 8d 38 16 + 0010a e8 00 00 00 00 call _RTC_CheckStackVars + 0010f 48 8b c7 mov rax, rdi + 00112 48 8b 8d 38 16 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00117 48 33 cd xor rcx, rbp - 0011a e8 00 00 00 00 call __security_check_cookie - 0011f 48 8d a5 48 16 + 00119 48 33 cd xor rcx, rbp + 0011c e8 00 00 00 00 call __security_check_cookie + 00121 48 8d a5 48 16 00 00 lea rsp, QWORD PTR [rbp+5704] - 00126 5f pop rdi - 00127 5d pop rbp - 00128 c3 ret 0 + 00128 5f pop rdi + 00129 5d pop rbp + 0012a c3 ret 0 stbi_zlib_decode_noheader_malloc ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -56465,72 +56918,73 @@ $LN5: 00051 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00058 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0005d 90 npad 1 ; 4040 : stbi__zbuf a; ; 4041 : a.zbuffer = (stbi_uc*)ibuffer; - 0005d 48 8b 85 50 16 + 0005e 48 8b 85 50 16 00 00 mov rax, QWORD PTR ibuffer$[rbp] - 00064 48 89 45 10 mov QWORD PTR a$[rbp], rax + 00065 48 89 45 10 mov QWORD PTR a$[rbp], rax ; 4042 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; - 00068 48 63 85 58 16 + 00069 48 63 85 58 16 00 00 movsxd rax, DWORD PTR ilen$[rbp] - 0006f 48 8b 8d 50 16 + 00070 48 8b 8d 50 16 00 00 mov rcx, QWORD PTR ibuffer$[rbp] - 00076 48 03 c8 add rcx, rax - 00079 48 8b c1 mov rax, rcx - 0007c 48 89 45 18 mov QWORD PTR a$[rbp+8], rax + 00077 48 03 c8 add rcx, rax + 0007a 48 8b c1 mov rax, rcx + 0007d 48 89 45 18 mov QWORD PTR a$[rbp+8], rax ; 4043 : if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) - 00080 c7 44 24 20 01 + 00081 c7 44 24 20 01 00 00 00 mov DWORD PTR [rsp+32], 1 - 00088 45 33 c9 xor r9d, r9d - 0008b 44 8b 85 48 16 + 00089 45 33 c9 xor r9d, r9d + 0008c 44 8b 85 48 16 00 00 mov r8d, DWORD PTR olen$[rbp] - 00092 48 8b 95 40 16 + 00093 48 8b 95 40 16 00 00 mov rdx, QWORD PTR obuffer$[rbp] - 00099 48 8d 4d 10 lea rcx, QWORD PTR a$[rbp] - 0009d e8 00 00 00 00 call stbi__do_zlib - 000a2 85 c0 test eax, eax - 000a4 74 12 je SHORT $LN2@stbi_zlib_ + 0009a 48 8d 4d 10 lea rcx, QWORD PTR a$[rbp] + 0009e e8 00 00 00 00 call stbi__do_zlib + 000a3 85 c0 test eax, eax + 000a5 74 12 je SHORT $LN2@stbi_zlib_ ; 4044 : return (int)(a.zout - a.zout_start); - 000a6 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] - 000aa 48 8b 4d 28 mov rcx, QWORD PTR a$[rbp+24] - 000ae 48 2b c8 sub rcx, rax - 000b1 48 8b c1 mov rax, rcx - 000b4 eb 07 jmp SHORT $LN1@stbi_zlib_ - 000b6 eb 05 jmp SHORT $LN3@stbi_zlib_ + 000a7 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] + 000ab 48 8b 4d 28 mov rcx, QWORD PTR a$[rbp+24] + 000af 48 2b c8 sub rcx, rax + 000b2 48 8b c1 mov rax, rcx + 000b5 eb 07 jmp SHORT $LN1@stbi_zlib_ + 000b7 eb 05 jmp SHORT $LN3@stbi_zlib_ $LN2@stbi_zlib_: ; 4045 : else ; 4046 : return -1; - 000b8 b8 ff ff ff ff mov eax, -1 + 000b9 b8 ff ff ff ff mov eax, -1 $LN3@stbi_zlib_: $LN1@stbi_zlib_: ; 4047 : } - 000bd 48 8b f8 mov rdi, rax - 000c0 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 000c4 48 8d 15 00 00 + 000be 48 8b f8 mov rdi, rax + 000c1 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 000c5 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_zlib_decode_buffer$rtcFrameData - 000cb e8 00 00 00 00 call _RTC_CheckStackVars - 000d0 48 8b c7 mov rax, rdi - 000d3 48 8b 8d 18 16 + 000cc e8 00 00 00 00 call _RTC_CheckStackVars + 000d1 48 8b c7 mov rax, rdi + 000d4 48 8b 8d 18 16 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000da 48 33 cd xor rcx, rbp - 000dd e8 00 00 00 00 call __security_check_cookie - 000e2 48 8d a5 28 16 + 000db 48 33 cd xor rcx, rbp + 000de e8 00 00 00 00 call __security_check_cookie + 000e3 48 8d a5 28 16 00 00 lea rsp, QWORD PTR [rbp+5672] - 000e9 5f pop rdi - 000ea 5d pop rbp - 000eb c3 ret 0 + 000ea 5f pop rdi + 000eb 5d pop rbp + 000ec c3 ret 0 stbi_zlib_decode_buffer ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -56556,26 +57010,27 @@ $LN3: 0001c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00023 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00028 90 npad 1 ; 4018 : return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); - 00028 4c 8b 8d f0 00 + 00029 4c 8b 8d f0 00 00 00 mov r9, QWORD PTR outlen$[rbp] - 0002f 41 b8 00 40 00 + 00030 41 b8 00 40 00 00 mov r8d, 16384 ; 00004000H - 00035 8b 95 e8 00 00 + 00036 8b 95 e8 00 00 00 mov edx, DWORD PTR len$[rbp] - 0003b 48 8b 8d e0 00 + 0003c 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR buffer$[rbp] - 00042 e8 00 00 00 00 call stbi_zlib_decode_malloc_guesssize + 00043 e8 00 00 00 00 call stbi_zlib_decode_malloc_guesssize ; 4019 : } - 00047 48 8d a5 c8 00 + 00048 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0004e 5f pop rdi - 0004f 5d pop rbp - 00050 c3 ret 0 + 0004f 5f pop rdi + 00050 5d pop rbp + 00051 c3 ret 0 stbi_zlib_decode_malloc ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -56619,113 +57074,115 @@ $LN7: 00051 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00058 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0005d 90 npad 1 ; 4023 : stbi__zbuf a; ; 4024 : char* p = (char*)stbi__malloc(initial_size); - 0005d 48 63 85 70 16 + 0005e 48 63 85 70 16 00 00 movsxd rax, DWORD PTR initial_size$[rbp] - 00064 48 8b c8 mov rcx, rax - 00067 e8 00 00 00 00 call stbi__malloc - 0006c 48 89 85 28 10 + 00065 48 8b c8 mov rcx, rax + 00068 e8 00 00 00 00 call stbi__malloc + 0006d 48 89 85 28 10 00 00 mov QWORD PTR p$[rbp], rax ; 4025 : if (p == NULL) return NULL; - 00073 48 83 bd 28 10 + 00074 48 83 bd 28 10 00 00 00 cmp QWORD PTR p$[rbp], 0 - 0007b 75 07 jne SHORT $LN2@stbi_zlib_ - 0007d 33 c0 xor eax, eax - 0007f e9 83 00 00 00 jmp $LN1@stbi_zlib_ + 0007c 75 07 jne SHORT $LN2@stbi_zlib_ + 0007e 33 c0 xor eax, eax + 00080 e9 84 00 00 00 jmp $LN1@stbi_zlib_ $LN2@stbi_zlib_: ; 4026 : a.zbuffer = (stbi_uc*)buffer; - 00084 48 8b 85 60 16 + 00085 48 8b 85 60 16 00 00 mov rax, QWORD PTR buffer$[rbp] - 0008b 48 89 45 10 mov QWORD PTR a$[rbp], rax + 0008c 48 89 45 10 mov QWORD PTR a$[rbp], rax ; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; - 0008f 48 63 85 68 16 + 00090 48 63 85 68 16 00 00 movsxd rax, DWORD PTR len$[rbp] - 00096 48 8b 8d 60 16 + 00097 48 8b 8d 60 16 00 00 mov rcx, QWORD PTR buffer$[rbp] - 0009d 48 03 c8 add rcx, rax - 000a0 48 8b c1 mov rax, rcx - 000a3 48 89 45 18 mov QWORD PTR a$[rbp+8], rax + 0009e 48 03 c8 add rcx, rax + 000a1 48 8b c1 mov rax, rcx + 000a4 48 89 45 18 mov QWORD PTR a$[rbp+8], rax ; 4028 : if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { - 000a7 8b 85 80 16 00 + 000a8 8b 85 80 16 00 00 mov eax, DWORD PTR parse_header$[rbp] - 000ad 89 44 24 20 mov DWORD PTR [rsp+32], eax - 000b1 41 b9 01 00 00 + 000ae 89 44 24 20 mov DWORD PTR [rsp+32], eax + 000b2 41 b9 01 00 00 00 mov r9d, 1 - 000b7 44 8b 85 70 16 + 000b8 44 8b 85 70 16 00 00 mov r8d, DWORD PTR initial_size$[rbp] - 000be 48 8b 95 28 10 + 000bf 48 8b 95 28 10 00 00 mov rdx, QWORD PTR p$[rbp] - 000c5 48 8d 4d 10 lea rcx, QWORD PTR a$[rbp] - 000c9 e8 00 00 00 00 call stbi__do_zlib - 000ce 85 c0 test eax, eax - 000d0 74 29 je SHORT $LN3@stbi_zlib_ + 000c6 48 8d 4d 10 lea rcx, QWORD PTR a$[rbp] + 000ca e8 00 00 00 00 call stbi__do_zlib + 000cf 85 c0 test eax, eax + 000d1 74 29 je SHORT $LN3@stbi_zlib_ ; 4029 : if (outlen) *outlen = (int)(a.zout - a.zout_start); - 000d2 48 83 bd 78 16 + 000d3 48 83 bd 78 16 00 00 00 cmp QWORD PTR outlen$[rbp], 0 - 000da 74 17 je SHORT $LN5@stbi_zlib_ - 000dc 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] - 000e0 48 8b 4d 28 mov rcx, QWORD PTR a$[rbp+24] - 000e4 48 2b c8 sub rcx, rax - 000e7 48 8b c1 mov rax, rcx - 000ea 48 8b 8d 78 16 + 000db 74 17 je SHORT $LN5@stbi_zlib_ + 000dd 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] + 000e1 48 8b 4d 28 mov rcx, QWORD PTR a$[rbp+24] + 000e5 48 2b c8 sub rcx, rax + 000e8 48 8b c1 mov rax, rcx + 000eb 48 8b 8d 78 16 00 00 mov rcx, QWORD PTR outlen$[rbp] - 000f1 89 01 mov DWORD PTR [rcx], eax + 000f2 89 01 mov DWORD PTR [rcx], eax $LN5@stbi_zlib_: ; 4030 : return a.zout_start; - 000f3 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] - 000f7 eb 0e jmp SHORT $LN1@stbi_zlib_ + 000f4 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] + 000f8 eb 0f jmp SHORT $LN1@stbi_zlib_ ; 4031 : } - 000f9 eb 0c jmp SHORT $LN4@stbi_zlib_ + 000fa eb 0d jmp SHORT $LN4@stbi_zlib_ $LN3@stbi_zlib_: ; 4032 : else { ; 4033 : STBI_FREE(a.zout_start); - 000fb 48 8b 4d 30 mov rcx, QWORD PTR a$[rbp+32] - 000ff ff 15 00 00 00 + 000fc 48 8b 4d 30 mov rcx, QWORD PTR a$[rbp+32] + 00100 ff 15 00 00 00 00 call QWORD PTR __imp_free + 00106 90 npad 1 ; 4034 : return NULL; - 00105 33 c0 xor eax, eax + 00107 33 c0 xor eax, eax $LN4@stbi_zlib_: $LN1@stbi_zlib_: ; 4035 : } ; 4036 : } - 00107 48 8b f8 mov rdi, rax - 0010a 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 0010e 48 8d 15 00 00 + 00109 48 8b f8 mov rdi, rax + 0010c 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 00110 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_zlib_decode_malloc_guesssize_headerflag$rtcFrameData - 00115 e8 00 00 00 00 call _RTC_CheckStackVars - 0011a 48 8b c7 mov rax, rdi - 0011d 48 8b 8d 38 16 + 00117 e8 00 00 00 00 call _RTC_CheckStackVars + 0011c 48 8b c7 mov rax, rdi + 0011f 48 8b 8d 38 16 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00124 48 33 cd xor rcx, rbp - 00127 e8 00 00 00 00 call __security_check_cookie - 0012c 48 8d a5 48 16 + 00126 48 33 cd xor rcx, rbp + 00129 e8 00 00 00 00 call __security_check_cookie + 0012e 48 8d a5 48 16 00 00 lea rsp, QWORD PTR [rbp+5704] - 00133 5f pop rdi - 00134 5d pop rbp - 00135 c3 ret 0 + 00135 5f pop rdi + 00136 5d pop rbp + 00137 c3 ret 0 stbi_zlib_decode_malloc_guesssize_headerflag ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -56768,112 +57225,114 @@ $LN7: 00051 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00058 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0005d 90 npad 1 ; 4001 : stbi__zbuf a; ; 4002 : char* p = (char*)stbi__malloc(initial_size); - 0005d 48 63 85 70 16 + 0005e 48 63 85 70 16 00 00 movsxd rax, DWORD PTR initial_size$[rbp] - 00064 48 8b c8 mov rcx, rax - 00067 e8 00 00 00 00 call stbi__malloc - 0006c 48 89 85 28 10 + 00065 48 8b c8 mov rcx, rax + 00068 e8 00 00 00 00 call stbi__malloc + 0006d 48 89 85 28 10 00 00 mov QWORD PTR p$[rbp], rax ; 4003 : if (p == NULL) return NULL; - 00073 48 83 bd 28 10 + 00074 48 83 bd 28 10 00 00 00 cmp QWORD PTR p$[rbp], 0 - 0007b 75 07 jne SHORT $LN2@stbi_zlib_ - 0007d 33 c0 xor eax, eax - 0007f e9 81 00 00 00 jmp $LN1@stbi_zlib_ + 0007c 75 07 jne SHORT $LN2@stbi_zlib_ + 0007e 33 c0 xor eax, eax + 00080 e9 82 00 00 00 jmp $LN1@stbi_zlib_ $LN2@stbi_zlib_: ; 4004 : a.zbuffer = (stbi_uc*)buffer; - 00084 48 8b 85 60 16 + 00085 48 8b 85 60 16 00 00 mov rax, QWORD PTR buffer$[rbp] - 0008b 48 89 45 10 mov QWORD PTR a$[rbp], rax + 0008c 48 89 45 10 mov QWORD PTR a$[rbp], rax ; 4005 : a.zbuffer_end = (stbi_uc*)buffer + len; - 0008f 48 63 85 68 16 + 00090 48 63 85 68 16 00 00 movsxd rax, DWORD PTR len$[rbp] - 00096 48 8b 8d 60 16 + 00097 48 8b 8d 60 16 00 00 mov rcx, QWORD PTR buffer$[rbp] - 0009d 48 03 c8 add rcx, rax - 000a0 48 8b c1 mov rax, rcx - 000a3 48 89 45 18 mov QWORD PTR a$[rbp+8], rax + 0009e 48 03 c8 add rcx, rax + 000a1 48 8b c1 mov rax, rcx + 000a4 48 89 45 18 mov QWORD PTR a$[rbp+8], rax ; 4006 : if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { - 000a7 c7 44 24 20 01 + 000a8 c7 44 24 20 01 00 00 00 mov DWORD PTR [rsp+32], 1 - 000af 41 b9 01 00 00 + 000b0 41 b9 01 00 00 00 mov r9d, 1 - 000b5 44 8b 85 70 16 + 000b6 44 8b 85 70 16 00 00 mov r8d, DWORD PTR initial_size$[rbp] - 000bc 48 8b 95 28 10 + 000bd 48 8b 95 28 10 00 00 mov rdx, QWORD PTR p$[rbp] - 000c3 48 8d 4d 10 lea rcx, QWORD PTR a$[rbp] - 000c7 e8 00 00 00 00 call stbi__do_zlib - 000cc 85 c0 test eax, eax - 000ce 74 29 je SHORT $LN3@stbi_zlib_ + 000c4 48 8d 4d 10 lea rcx, QWORD PTR a$[rbp] + 000c8 e8 00 00 00 00 call stbi__do_zlib + 000cd 85 c0 test eax, eax + 000cf 74 29 je SHORT $LN3@stbi_zlib_ ; 4007 : if (outlen) *outlen = (int)(a.zout - a.zout_start); - 000d0 48 83 bd 78 16 + 000d1 48 83 bd 78 16 00 00 00 cmp QWORD PTR outlen$[rbp], 0 - 000d8 74 17 je SHORT $LN5@stbi_zlib_ - 000da 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] - 000de 48 8b 4d 28 mov rcx, QWORD PTR a$[rbp+24] - 000e2 48 2b c8 sub rcx, rax - 000e5 48 8b c1 mov rax, rcx - 000e8 48 8b 8d 78 16 + 000d9 74 17 je SHORT $LN5@stbi_zlib_ + 000db 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] + 000df 48 8b 4d 28 mov rcx, QWORD PTR a$[rbp+24] + 000e3 48 2b c8 sub rcx, rax + 000e6 48 8b c1 mov rax, rcx + 000e9 48 8b 8d 78 16 00 00 mov rcx, QWORD PTR outlen$[rbp] - 000ef 89 01 mov DWORD PTR [rcx], eax + 000f0 89 01 mov DWORD PTR [rcx], eax $LN5@stbi_zlib_: ; 4008 : return a.zout_start; - 000f1 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] - 000f5 eb 0e jmp SHORT $LN1@stbi_zlib_ + 000f2 48 8b 45 30 mov rax, QWORD PTR a$[rbp+32] + 000f6 eb 0f jmp SHORT $LN1@stbi_zlib_ ; 4009 : } - 000f7 eb 0c jmp SHORT $LN4@stbi_zlib_ + 000f8 eb 0d jmp SHORT $LN4@stbi_zlib_ $LN3@stbi_zlib_: ; 4010 : else { ; 4011 : STBI_FREE(a.zout_start); - 000f9 48 8b 4d 30 mov rcx, QWORD PTR a$[rbp+32] - 000fd ff 15 00 00 00 + 000fa 48 8b 4d 30 mov rcx, QWORD PTR a$[rbp+32] + 000fe ff 15 00 00 00 00 call QWORD PTR __imp_free + 00104 90 npad 1 ; 4012 : return NULL; - 00103 33 c0 xor eax, eax + 00105 33 c0 xor eax, eax $LN4@stbi_zlib_: $LN1@stbi_zlib_: ; 4013 : } ; 4014 : } - 00105 48 8b f8 mov rdi, rax - 00108 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 0010c 48 8d 15 00 00 + 00107 48 8b f8 mov rdi, rax + 0010a 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 0010e 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_zlib_decode_malloc_guesssize$rtcFrameData - 00113 e8 00 00 00 00 call _RTC_CheckStackVars - 00118 48 8b c7 mov rax, rdi - 0011b 48 8b 8d 38 16 + 00115 e8 00 00 00 00 call _RTC_CheckStackVars + 0011a 48 8b c7 mov rax, rdi + 0011d 48 8b 8d 38 16 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00122 48 33 cd xor rcx, rbp - 00125 e8 00 00 00 00 call __security_check_cookie - 0012a 48 8d a5 48 16 + 00124 48 33 cd xor rcx, rbp + 00127 e8 00 00 00 00 call __security_check_cookie + 0012c 48 8d a5 48 16 00 00 lea rsp, QWORD PTR [rbp+5704] - 00131 5f pop rdi - 00132 5d pop rbp - 00133 c3 ret 0 + 00133 5f pop rdi + 00134 5d pop rbp + 00135 c3 ret 0 stbi_zlib_decode_malloc_guesssize ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -56895,39 +57354,40 @@ $LN3: 00012 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00019 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001e 90 npad 1 ; 579 : stbi__vertically_flip_on_load_local = flag_true_if_should_flip; - 0001e b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_local - 00023 8b c0 mov eax, eax - 00025 8b 0d 00 00 00 + 0001f b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_local + 00024 8b c0 mov eax, eax + 00026 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 0002b 65 48 8b 14 25 + 0002c 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 00034 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00038 8b 95 e0 00 00 + 00035 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00039 8b 95 e0 00 00 00 mov edx, DWORD PTR flag_true_if_should_flip$[rbp] - 0003e 89 14 08 mov DWORD PTR [rax+rcx], edx + 0003f 89 14 08 mov DWORD PTR [rax+rcx], edx ; 580 : stbi__vertically_flip_on_load_set = 1; - 00041 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_set - 00046 8b c0 mov eax, eax - 00048 8b 0d 00 00 00 + 00042 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_set + 00047 8b c0 mov eax, eax + 00049 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 0004e 65 48 8b 14 25 + 0004f 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 00057 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 0005b c7 04 08 01 00 + 00058 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 0005c c7 04 08 01 00 00 00 mov DWORD PTR [rax+rcx], 1 ; 581 : } - 00062 48 8d a5 c8 00 + 00063 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00069 5f pop rdi - 0006a 5d pop rbp - 0006b c3 ret 0 + 0006a 5f pop rdi + 0006b 5d pop rbp + 0006c c3 ret 0 stbi_set_flip_vertically_on_load_thread ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -56949,39 +57409,40 @@ $LN3: 00012 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00019 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001e 90 npad 1 ; 4535 : stbi__de_iphone_flag_local = flag_true_if_should_convert; - 0001e b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__de_iphone_flag_local - 00023 8b c0 mov eax, eax - 00025 8b 0d 00 00 00 + 0001f b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__de_iphone_flag_local + 00024 8b c0 mov eax, eax + 00026 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 0002b 65 48 8b 14 25 + 0002c 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 00034 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00038 8b 95 e0 00 00 + 00035 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00039 8b 95 e0 00 00 00 mov edx, DWORD PTR flag_true_if_should_convert$[rbp] - 0003e 89 14 08 mov DWORD PTR [rax+rcx], edx + 0003f 89 14 08 mov DWORD PTR [rax+rcx], edx ; 4536 : stbi__de_iphone_flag_set = 1; - 00041 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__de_iphone_flag_set - 00046 8b c0 mov eax, eax - 00048 8b 0d 00 00 00 + 00042 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__de_iphone_flag_set + 00047 8b c0 mov eax, eax + 00049 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 0004e 65 48 8b 14 25 + 0004f 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 00057 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 0005b c7 04 08 01 00 + 00058 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 0005c c7 04 08 01 00 00 00 mov DWORD PTR [rax+rcx], 1 ; 4537 : } - 00062 48 8d a5 c8 00 + 00063 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00069 5f pop rdi - 0006a 5d pop rbp - 0006b c3 ret 0 + 0006a 5f pop rdi + 0006b 5d pop rbp + 0006c c3 ret 0 stbi_convert_iphone_png_to_rgb_thread ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57003,39 +57464,40 @@ $LN3: 00012 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00019 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001e 90 npad 1 ; 4529 : stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; - 0001e b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__unpremultiply_on_load_local - 00023 8b c0 mov eax, eax - 00025 8b 0d 00 00 00 + 0001f b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__unpremultiply_on_load_local + 00024 8b c0 mov eax, eax + 00026 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 0002b 65 48 8b 14 25 + 0002c 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 00034 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00038 8b 95 e0 00 00 + 00035 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00039 8b 95 e0 00 00 00 mov edx, DWORD PTR flag_true_if_should_unpremultiply$[rbp] - 0003e 89 14 08 mov DWORD PTR [rax+rcx], edx + 0003f 89 14 08 mov DWORD PTR [rax+rcx], edx ; 4530 : stbi__unpremultiply_on_load_set = 1; - 00041 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__unpremultiply_on_load_set - 00046 8b c0 mov eax, eax - 00048 8b 0d 00 00 00 + 00042 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__unpremultiply_on_load_set + 00047 8b c0 mov eax, eax + 00049 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 0004e 65 48 8b 14 25 + 0004f 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 00057 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 0005b c7 04 08 01 00 + 00058 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 0005c c7 04 08 01 00 00 00 mov DWORD PTR [rax+rcx], 1 ; 4531 : } - 00062 48 8d a5 c8 00 + 00063 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00069 5f pop rdi - 0006a 5d pop rbp - 0006b c3 ret 0 + 0006a 5f pop rdi + 0006b 5d pop rbp + 0006c c3 ret 0 stbi_set_unpremultiply_on_load_thread ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57057,21 +57519,22 @@ $LN3: 00012 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00019 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001e 90 npad 1 ; 569 : stbi__vertically_flip_on_load_global = flag_true_if_should_flip; - 0001e 8b 85 e0 00 00 + 0001f 8b 85 e0 00 00 00 mov eax, DWORD PTR flag_true_if_should_flip$[rbp] - 00024 89 05 00 00 00 + 00025 89 05 00 00 00 00 mov DWORD PTR stbi__vertically_flip_on_load_global, eax ; 570 : } - 0002a 48 8d a5 c8 00 + 0002b 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00031 5f pop rdi - 00032 5d pop rbp - 00033 c3 ret 0 + 00032 5f pop rdi + 00033 5d pop rbp + 00034 c3 ret 0 stbi_set_flip_vertically_on_load ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57093,21 +57556,22 @@ $LN3: 00012 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00019 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001e 90 npad 1 ; 4517 : stbi__de_iphone_flag_global = flag_true_if_should_convert; - 0001e 8b 85 e0 00 00 + 0001f 8b 85 e0 00 00 00 mov eax, DWORD PTR flag_true_if_should_convert$[rbp] - 00024 89 05 00 00 00 + 00025 89 05 00 00 00 00 mov DWORD PTR stbi__de_iphone_flag_global, eax ; 4518 : } - 0002a 48 8d a5 c8 00 + 0002b 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00031 5f pop rdi - 00032 5d pop rbp - 00033 c3 ret 0 + 00032 5f pop rdi + 00033 5d pop rbp + 00034 c3 ret 0 stbi_convert_iphone_png_to_rgb ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57129,21 +57593,22 @@ $LN3: 00012 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00019 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001e 90 npad 1 ; 4512 : stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; - 0001e 8b 85 e0 00 00 + 0001f 8b 85 e0 00 00 00 mov eax, DWORD PTR flag_true_if_should_unpremultiply$[rbp] - 00024 89 05 00 00 00 + 00025 89 05 00 00 00 00 mov DWORD PTR stbi__unpremultiply_on_load_global, eax ; 4513 : } - 0002a 48 8d a5 c8 00 + 0002b 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00031 5f pop rdi - 00032 5d pop rbp - 00033 c3 ret 0 + 00032 5f pop rdi + 00033 5d pop rbp + 00034 c3 ret 0 stbi_set_unpremultiply_on_load ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57180,62 +57645,65 @@ $LN3: 0003d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00044 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00049 90 npad 1 ; 7293 : int r; ; 7294 : stbi__context s; ; 7295 : long pos = ftell(f); - 00049 48 8b 8d 20 02 + 0004a 48 8b 8d 20 02 00 00 mov rcx, QWORD PTR f$[rbp] - 00050 ff 15 00 00 00 + 00051 ff 15 00 00 00 00 call QWORD PTR __imp_ftell - 00056 89 85 24 01 00 + 00057 89 85 24 01 00 00 mov DWORD PTR pos$[rbp], eax ; 7296 : stbi__start_file(&s, f); - 0005c 48 8b 95 20 02 + 0005d 48 8b 95 20 02 00 00 mov rdx, QWORD PTR f$[rbp] - 00063 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] - 00067 e8 00 00 00 00 call stbi__start_file + 00064 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] + 00068 e8 00 00 00 00 call stbi__start_file + 0006d 90 npad 1 ; 7297 : r = stbi__is_16_main(&s); - 0006c 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] - 00070 e8 00 00 00 00 call stbi__is_16_main - 00075 89 45 04 mov DWORD PTR r$[rbp], eax + 0006e 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] + 00072 e8 00 00 00 00 call stbi__is_16_main + 00077 89 45 04 mov DWORD PTR r$[rbp], eax ; 7298 : fseek(f, pos, SEEK_SET); - 00078 45 33 c0 xor r8d, r8d - 0007b 8b 95 24 01 00 + 0007a 45 33 c0 xor r8d, r8d + 0007d 8b 95 24 01 00 00 mov edx, DWORD PTR pos$[rbp] - 00081 48 8b 8d 20 02 + 00083 48 8b 8d 20 02 00 00 mov rcx, QWORD PTR f$[rbp] - 00088 ff 15 00 00 00 + 0008a ff 15 00 00 00 00 call QWORD PTR __imp_fseek + 00090 90 npad 1 ; 7299 : return r; - 0008e 8b 45 04 mov eax, DWORD PTR r$[rbp] + 00091 8b 45 04 mov eax, DWORD PTR r$[rbp] ; 7300 : } - 00091 8b f8 mov edi, eax - 00093 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00097 48 8d 15 00 00 + 00094 8b f8 mov edi, eax + 00096 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 0009a 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_is_16_bit_from_file$rtcFrameData - 0009e e8 00 00 00 00 call _RTC_CheckStackVars - 000a3 8b c7 mov eax, edi - 000a5 48 8b 8d f8 01 + 000a1 e8 00 00 00 00 call _RTC_CheckStackVars + 000a6 8b c7 mov eax, edi + 000a8 48 8b 8d f8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000ac 48 33 cd xor rcx, rbp - 000af e8 00 00 00 00 call __security_check_cookie - 000b4 48 8d a5 08 02 + 000af 48 33 cd xor rcx, rbp + 000b2 e8 00 00 00 00 call __security_check_cookie + 000b7 48 8d a5 08 02 00 00 lea rsp, QWORD PTR [rbp+520] - 000bb 5f pop rdi - 000bc 5d pop rbp - 000bd c3 ret 0 + 000be 5f pop rdi + 000bf 5d pop rbp + 000c0 c3 ret 0 stbi_is_16_bit_from_file ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57259,51 +57727,53 @@ $LN4: 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 7283 : FILE* f = stbi__fopen(filename, "rb"); - 0001f 48 8d 15 00 00 + 00020 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_02JDPG@rb@ - 00026 48 8b 8d 20 01 + 00027 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR filename$[rbp] - 0002d e8 00 00 00 00 call stbi__fopen - 00032 48 89 45 08 mov QWORD PTR f$[rbp], rax + 0002e e8 00 00 00 00 call stbi__fopen + 00033 48 89 45 08 mov QWORD PTR f$[rbp], rax ; 7284 : int result; ; 7285 : if (!f) return stbi__err("can't fopen", "Unable to open file"); - 00036 48 83 7d 08 00 cmp QWORD PTR f$[rbp], 0 - 0003b 75 0e jne SHORT $LN2@stbi_is_16 - 0003d 48 8d 0d 00 00 + 00037 48 83 7d 08 00 cmp QWORD PTR f$[rbp], 0 + 0003c 75 0e jne SHORT $LN2@stbi_is_16 + 0003e 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@JPDHFAGK@can?8t?5fopen@ - 00044 e8 00 00 00 00 call stbi__err - 00049 eb 19 jmp SHORT $LN1@stbi_is_16 + 00045 e8 00 00 00 00 call stbi__err + 0004a eb 1a jmp SHORT $LN1@stbi_is_16 $LN2@stbi_is_16: ; 7286 : result = stbi_is_16_bit_from_file(f); - 0004b 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] - 0004f e8 00 00 00 00 call stbi_is_16_bit_from_file - 00054 89 45 24 mov DWORD PTR result$[rbp], eax + 0004c 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] + 00050 e8 00 00 00 00 call stbi_is_16_bit_from_file + 00055 89 45 24 mov DWORD PTR result$[rbp], eax ; 7287 : fclose(f); - 00057 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] - 0005b ff 15 00 00 00 + 00058 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] + 0005c ff 15 00 00 00 00 call QWORD PTR __imp_fclose + 00062 90 npad 1 ; 7288 : return result; - 00061 8b 45 24 mov eax, DWORD PTR result$[rbp] + 00063 8b 45 24 mov eax, DWORD PTR result$[rbp] $LN1@stbi_is_16: ; 7289 : } - 00064 48 8d a5 08 01 + 00066 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 0006b 5f pop rdi - 0006c 5d pop rbp - 0006d c3 ret 0 + 0006d 5f pop rdi + 0006e 5d pop rbp + 0006f c3 ret 0 stbi_is_16_bit ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57346,68 +57816,71 @@ $LN3: 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 7272 : int r; ; 7273 : stbi__context s; ; 7274 : long pos = ftell(f); - 00058 48 8b 8d 20 02 + 00059 48 8b 8d 20 02 00 00 mov rcx, QWORD PTR f$[rbp] - 0005f ff 15 00 00 00 + 00060 ff 15 00 00 00 00 call QWORD PTR __imp_ftell - 00065 89 85 24 01 00 + 00066 89 85 24 01 00 00 mov DWORD PTR pos$[rbp], eax ; 7275 : stbi__start_file(&s, f); - 0006b 48 8b 95 20 02 + 0006c 48 8b 95 20 02 00 00 mov rdx, QWORD PTR f$[rbp] - 00072 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] - 00076 e8 00 00 00 00 call stbi__start_file + 00073 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] + 00077 e8 00 00 00 00 call stbi__start_file + 0007c 90 npad 1 ; 7276 : r = stbi__info_main(&s, x, y, comp); - 0007b 4c 8b 8d 38 02 + 0007d 4c 8b 8d 38 02 00 00 mov r9, QWORD PTR comp$[rbp] - 00082 4c 8b 85 30 02 + 00084 4c 8b 85 30 02 00 00 mov r8, QWORD PTR y$[rbp] - 00089 48 8b 95 28 02 + 0008b 48 8b 95 28 02 00 00 mov rdx, QWORD PTR x$[rbp] - 00090 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] - 00094 e8 00 00 00 00 call stbi__info_main - 00099 89 45 04 mov DWORD PTR r$[rbp], eax + 00092 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] + 00096 e8 00 00 00 00 call stbi__info_main + 0009b 89 45 04 mov DWORD PTR r$[rbp], eax ; 7277 : fseek(f, pos, SEEK_SET); - 0009c 45 33 c0 xor r8d, r8d - 0009f 8b 95 24 01 00 + 0009e 45 33 c0 xor r8d, r8d + 000a1 8b 95 24 01 00 00 mov edx, DWORD PTR pos$[rbp] - 000a5 48 8b 8d 20 02 + 000a7 48 8b 8d 20 02 00 00 mov rcx, QWORD PTR f$[rbp] - 000ac ff 15 00 00 00 + 000ae ff 15 00 00 00 00 call QWORD PTR __imp_fseek + 000b4 90 npad 1 ; 7278 : return r; - 000b2 8b 45 04 mov eax, DWORD PTR r$[rbp] + 000b5 8b 45 04 mov eax, DWORD PTR r$[rbp] ; 7279 : } - 000b5 8b f8 mov edi, eax - 000b7 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 000bb 48 8d 15 00 00 + 000b8 8b f8 mov edi, eax + 000ba 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 000be 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_info_from_file$rtcFrameData - 000c2 e8 00 00 00 00 call _RTC_CheckStackVars - 000c7 8b c7 mov eax, edi - 000c9 48 8b 8d f8 01 + 000c5 e8 00 00 00 00 call _RTC_CheckStackVars + 000ca 8b c7 mov eax, edi + 000cc 48 8b 8d f8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000d0 48 33 cd xor rcx, rbp - 000d3 e8 00 00 00 00 call __security_check_cookie - 000d8 48 8d a5 08 02 + 000d3 48 33 cd xor rcx, rbp + 000d6 e8 00 00 00 00 call __security_check_cookie + 000db 48 8d a5 08 02 00 00 lea rsp, QWORD PTR [rbp+520] - 000df 5f pop rdi - 000e0 5d pop rbp - 000e1 c3 ret 0 + 000e2 5f pop rdi + 000e3 5d pop rbp + 000e4 c3 ret 0 stbi_info_from_file ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57437,57 +57910,59 @@ $LN4: 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 7262 : FILE* f = stbi__fopen(filename, "rb"); - 0002e 48 8d 15 00 00 + 0002f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_02JDPG@rb@ - 00035 48 8b 8d 20 01 + 00036 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR filename$[rbp] - 0003c e8 00 00 00 00 call stbi__fopen - 00041 48 89 45 08 mov QWORD PTR f$[rbp], rax + 0003d e8 00 00 00 00 call stbi__fopen + 00042 48 89 45 08 mov QWORD PTR f$[rbp], rax ; 7263 : int result; ; 7264 : if (!f) return stbi__err("can't fopen", "Unable to open file"); - 00045 48 83 7d 08 00 cmp QWORD PTR f$[rbp], 0 - 0004a 75 0e jne SHORT $LN2@stbi_info - 0004c 48 8d 0d 00 00 + 00046 48 83 7d 08 00 cmp QWORD PTR f$[rbp], 0 + 0004b 75 0e jne SHORT $LN2@stbi_info + 0004d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@JPDHFAGK@can?8t?5fopen@ - 00053 e8 00 00 00 00 call stbi__err - 00058 eb 2e jmp SHORT $LN1@stbi_info + 00054 e8 00 00 00 00 call stbi__err + 00059 eb 2f jmp SHORT $LN1@stbi_info $LN2@stbi_info: ; 7265 : result = stbi_info_from_file(f, x, y, comp); - 0005a 4c 8b 8d 38 01 + 0005b 4c 8b 8d 38 01 00 00 mov r9, QWORD PTR comp$[rbp] - 00061 4c 8b 85 30 01 + 00062 4c 8b 85 30 01 00 00 mov r8, QWORD PTR y$[rbp] - 00068 48 8b 95 28 01 + 00069 48 8b 95 28 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0006f 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] - 00073 e8 00 00 00 00 call stbi_info_from_file - 00078 89 45 24 mov DWORD PTR result$[rbp], eax + 00070 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] + 00074 e8 00 00 00 00 call stbi_info_from_file + 00079 89 45 24 mov DWORD PTR result$[rbp], eax ; 7266 : fclose(f); - 0007b 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] - 0007f ff 15 00 00 00 + 0007c 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] + 00080 ff 15 00 00 00 00 call QWORD PTR __imp_fclose + 00086 90 npad 1 ; 7267 : return result; - 00085 8b 45 24 mov eax, DWORD PTR result$[rbp] + 00087 8b 45 24 mov eax, DWORD PTR result$[rbp] $LN1@stbi_info: ; 7268 : } - 00088 48 8d a5 08 01 + 0008a 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 0008f 5f pop rdi - 00090 5d pop rbp - 00091 c3 ret 0 + 00091 5f pop rdi + 00092 5d pop rbp + 00093 c3 ret 0 stbi_info ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57524,39 +57999,41 @@ $LN3: 00042 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00049 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0004e 90 npad 1 ; 7326 : stbi__context s; ; 7327 : stbi__start_callbacks(&s, (stbi_io_callbacks*)c, user); - 0004e 4c 8b 85 e8 01 + 0004f 4c 8b 85 e8 01 00 00 mov r8, QWORD PTR user$[rbp] - 00055 48 8b 95 e0 01 + 00056 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR c$[rbp] - 0005c 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00060 e8 00 00 00 00 call stbi__start_callbacks + 0005d 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 00061 e8 00 00 00 00 call stbi__start_callbacks + 00066 90 npad 1 ; 7328 : return stbi__is_16_main(&s); - 00065 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00069 e8 00 00 00 00 call stbi__is_16_main + 00067 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0006b e8 00 00 00 00 call stbi__is_16_main ; 7329 : } - 0006e 48 8b f8 mov rdi, rax - 00071 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00075 48 8d 15 00 00 + 00070 48 8b f8 mov rdi, rax + 00073 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00077 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_is_16_bit_from_callbacks$rtcFrameData - 0007c e8 00 00 00 00 call _RTC_CheckStackVars - 00081 48 8b c7 mov rax, rdi - 00084 48 8b 8d b8 01 + 0007e e8 00 00 00 00 call _RTC_CheckStackVars + 00083 48 8b c7 mov rax, rdi + 00086 48 8b 8d b8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 0008b 48 33 cd xor rcx, rbp - 0008e e8 00 00 00 00 call __security_check_cookie - 00093 48 8d a5 c8 01 + 0008d 48 33 cd xor rcx, rbp + 00090 e8 00 00 00 00 call __security_check_cookie + 00095 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 0009a 5f pop rdi - 0009b 5d pop rbp - 0009c c3 ret 0 + 0009c 5f pop rdi + 0009d 5d pop rbp + 0009e c3 ret 0 stbi_is_16_bit_from_callbacks ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57593,39 +58070,41 @@ $LN3: 00041 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00048 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0004d 90 npad 1 ; 7319 : stbi__context s; ; 7320 : stbi__start_mem(&s, buffer, len); - 0004d 44 8b 85 e8 01 + 0004e 44 8b 85 e8 01 00 00 mov r8d, DWORD PTR len$[rbp] - 00054 48 8b 95 e0 01 + 00055 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR buffer$[rbp] - 0005b 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 0005f e8 00 00 00 00 call stbi__start_mem + 0005c 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 00060 e8 00 00 00 00 call stbi__start_mem + 00065 90 npad 1 ; 7321 : return stbi__is_16_main(&s); - 00064 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00068 e8 00 00 00 00 call stbi__is_16_main + 00066 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0006a e8 00 00 00 00 call stbi__is_16_main ; 7322 : } - 0006d 48 8b f8 mov rdi, rax - 00070 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00074 48 8d 15 00 00 + 0006f 48 8b f8 mov rdi, rax + 00072 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00076 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_is_16_bit_from_memory$rtcFrameData - 0007b e8 00 00 00 00 call _RTC_CheckStackVars - 00080 48 8b c7 mov rax, rdi - 00083 48 8b 8d b8 01 + 0007d e8 00 00 00 00 call _RTC_CheckStackVars + 00082 48 8b c7 mov rax, rdi + 00085 48 8b 8d b8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 0008a 48 33 cd xor rcx, rbp - 0008d e8 00 00 00 00 call __security_check_cookie - 00092 48 8d a5 c8 01 + 0008c 48 33 cd xor rcx, rbp + 0008f e8 00 00 00 00 call __security_check_cookie + 00094 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 00099 5f pop rdi - 0009a 5d pop rbp - 0009b c3 ret 0 + 0009b 5f pop rdi + 0009c 5d pop rbp + 0009d c3 ret 0 stbi_is_16_bit_from_memory ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57667,45 +58146,47 @@ $LN3: 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 7312 : stbi__context s; ; 7313 : stbi__start_callbacks(&s, (stbi_io_callbacks*)c, user); - 00058 4c 8b 85 e8 01 + 00059 4c 8b 85 e8 01 00 00 mov r8, QWORD PTR user$[rbp] - 0005f 48 8b 95 e0 01 + 00060 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR c$[rbp] - 00066 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 0006a e8 00 00 00 00 call stbi__start_callbacks + 00067 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0006b e8 00 00 00 00 call stbi__start_callbacks + 00070 90 npad 1 ; 7314 : return stbi__info_main(&s, x, y, comp); - 0006f 4c 8b 8d 00 02 + 00071 4c 8b 8d 00 02 00 00 mov r9, QWORD PTR comp$[rbp] - 00076 4c 8b 85 f8 01 + 00078 4c 8b 85 f8 01 00 00 mov r8, QWORD PTR y$[rbp] - 0007d 48 8b 95 f0 01 + 0007f 48 8b 95 f0 01 00 00 mov rdx, QWORD PTR x$[rbp] - 00084 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00088 e8 00 00 00 00 call stbi__info_main + 00086 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0008a e8 00 00 00 00 call stbi__info_main ; 7315 : } - 0008d 48 8b f8 mov rdi, rax - 00090 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00094 48 8d 15 00 00 + 0008f 48 8b f8 mov rdi, rax + 00092 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00096 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_info_from_callbacks$rtcFrameData - 0009b e8 00 00 00 00 call _RTC_CheckStackVars - 000a0 48 8b c7 mov rax, rdi - 000a3 48 8b 8d b8 01 + 0009d e8 00 00 00 00 call _RTC_CheckStackVars + 000a2 48 8b c7 mov rax, rdi + 000a5 48 8b 8d b8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000aa 48 33 cd xor rcx, rbp - 000ad e8 00 00 00 00 call __security_check_cookie - 000b2 48 8d a5 c8 01 + 000ac 48 33 cd xor rcx, rbp + 000af e8 00 00 00 00 call __security_check_cookie + 000b4 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 000b9 5f pop rdi - 000ba 5d pop rbp - 000bb c3 ret 0 + 000bb 5f pop rdi + 000bc 5d pop rbp + 000bd c3 ret 0 stbi_info_from_callbacks ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57747,45 +58228,47 @@ $LN3: 0004b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00052 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00057 90 npad 1 ; 7305 : stbi__context s; ; 7306 : stbi__start_mem(&s, buffer, len); - 00057 44 8b 85 e8 01 + 00058 44 8b 85 e8 01 00 00 mov r8d, DWORD PTR len$[rbp] - 0005e 48 8b 95 e0 01 + 0005f 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR buffer$[rbp] - 00065 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00069 e8 00 00 00 00 call stbi__start_mem + 00066 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0006a e8 00 00 00 00 call stbi__start_mem + 0006f 90 npad 1 ; 7307 : return stbi__info_main(&s, x, y, comp); - 0006e 4c 8b 8d 00 02 + 00070 4c 8b 8d 00 02 00 00 mov r9, QWORD PTR comp$[rbp] - 00075 4c 8b 85 f8 01 + 00077 4c 8b 85 f8 01 00 00 mov r8, QWORD PTR y$[rbp] - 0007c 48 8b 95 f0 01 + 0007e 48 8b 95 f0 01 00 00 mov rdx, QWORD PTR x$[rbp] - 00083 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00087 e8 00 00 00 00 call stbi__info_main + 00085 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 00089 e8 00 00 00 00 call stbi__info_main ; 7308 : } - 0008c 48 8b f8 mov rdi, rax - 0008f 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00093 48 8d 15 00 00 + 0008e 48 8b f8 mov rdi, rax + 00091 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00095 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_info_from_memory$rtcFrameData - 0009a e8 00 00 00 00 call _RTC_CheckStackVars - 0009f 48 8b c7 mov rax, rdi - 000a2 48 8b 8d b8 01 + 0009c e8 00 00 00 00 call _RTC_CheckStackVars + 000a1 48 8b c7 mov rax, rdi + 000a4 48 8b 8d b8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000a9 48 33 cd xor rcx, rbp - 000ac e8 00 00 00 00 call __security_check_cookie - 000b1 48 8d a5 c8 01 + 000ab 48 33 cd xor rcx, rbp + 000ae e8 00 00 00 00 call __security_check_cookie + 000b3 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 000b8 5f pop rdi - 000b9 5d pop rbp - 000ba c3 ret 0 + 000ba 5f pop rdi + 000bb 5d pop rbp + 000bc c3 ret 0 stbi_info_from_memory ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57807,21 +58290,23 @@ $LN3: 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 554 : STBI_FREE(retval_from_stbi_load); - 0001f 48 8b 8d e0 00 + 00020 48 8b 8d e0 00 00 00 mov rcx, QWORD PTR retval_from_stbi_load$[rbp] - 00026 ff 15 00 00 00 + 00027 ff 15 00 00 00 00 call QWORD PTR __imp_free + 0002d 90 npad 1 ; 555 : } - 0002c 48 8d a5 c8 00 + 0002e 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00033 5f pop rdi - 00034 5d pop rbp - 00035 c3 ret 0 + 00035 5f pop rdi + 00036 5d pop rbp + 00037 c3 ret 0 stbi_image_free ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57841,25 +58326,26 @@ $LN3: 0000f 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00016 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001b 90 npad 1 ; 425 : return stbi__g_failure_reason; - 0001b b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__g_failure_reason - 00020 8b c0 mov eax, eax - 00022 8b 0d 00 00 00 + 0001c b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__g_failure_reason + 00021 8b c0 mov eax, eax + 00023 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 00028 65 48 8b 14 25 + 00029 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 00031 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 00035 48 8b 04 08 mov rax, QWORD PTR [rax+rcx] + 00032 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 00036 48 8b 04 08 mov rax, QWORD PTR [rax+rcx] ; 426 : } - 00039 48 8d a5 c8 00 + 0003a 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00040 5f pop rdi - 00041 5d pop rbp - 00042 c3 ret 0 + 00041 5f pop rdi + 00042 5d pop rbp + 00043 c3 ret 0 stbi_failure_reason ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57896,43 +58382,46 @@ $LN3: 0003d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00044 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00049 90 npad 1 ; 1005 : #ifndef STBI_NO_HDR ; 1006 : long pos = ftell(f); - 00049 48 8b 8d 20 02 + 0004a 48 8b 8d 20 02 00 00 mov rcx, QWORD PTR f$[rbp] - 00050 ff 15 00 00 00 + 00051 ff 15 00 00 00 00 call QWORD PTR __imp_ftell - 00056 89 45 04 mov DWORD PTR pos$[rbp], eax + 00057 89 45 04 mov DWORD PTR pos$[rbp], eax ; 1007 : int res; ; 1008 : stbi__context s; ; 1009 : stbi__start_file(&s, f); - 00059 48 8b 95 20 02 + 0005a 48 8b 95 20 02 00 00 mov rdx, QWORD PTR f$[rbp] - 00060 48 8d 4d 50 lea rcx, QWORD PTR s$[rbp] - 00064 e8 00 00 00 00 call stbi__start_file + 00061 48 8d 4d 50 lea rcx, QWORD PTR s$[rbp] + 00065 e8 00 00 00 00 call stbi__start_file + 0006a 90 npad 1 ; 1010 : res = stbi__hdr_test(&s); - 00069 48 8d 4d 50 lea rcx, QWORD PTR s$[rbp] - 0006d e8 00 00 00 00 call stbi__hdr_test - 00072 89 45 24 mov DWORD PTR res$[rbp], eax + 0006b 48 8d 4d 50 lea rcx, QWORD PTR s$[rbp] + 0006f e8 00 00 00 00 call stbi__hdr_test + 00074 89 45 24 mov DWORD PTR res$[rbp], eax ; 1011 : fseek(f, pos, SEEK_SET); - 00075 45 33 c0 xor r8d, r8d - 00078 8b 55 04 mov edx, DWORD PTR pos$[rbp] - 0007b 48 8b 8d 20 02 + 00077 45 33 c0 xor r8d, r8d + 0007a 8b 55 04 mov edx, DWORD PTR pos$[rbp] + 0007d 48 8b 8d 20 02 00 00 mov rcx, QWORD PTR f$[rbp] - 00082 ff 15 00 00 00 + 00084 ff 15 00 00 00 00 call QWORD PTR __imp_fseek + 0008a 90 npad 1 ; 1012 : return res; - 00088 8b 45 24 mov eax, DWORD PTR res$[rbp] + 0008b 8b 45 24 mov eax, DWORD PTR res$[rbp] ; 1013 : #else ; 1014 : STBI_NOTUSED(f); @@ -57940,21 +58429,21 @@ $LN3: ; 1016 : #endif ; 1017 : } - 0008b 8b f8 mov edi, eax - 0008d 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00091 48 8d 15 00 00 + 0008e 8b f8 mov edi, eax + 00090 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00094 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_is_hdr_from_file$rtcFrameData - 00098 e8 00 00 00 00 call _RTC_CheckStackVars - 0009d 8b c7 mov eax, edi - 0009f 48 8b 8d f8 01 + 0009b e8 00 00 00 00 call _RTC_CheckStackVars + 000a0 8b c7 mov eax, edi + 000a2 48 8b 8d f8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000a6 48 33 cd xor rcx, rbp - 000a9 e8 00 00 00 00 call __security_check_cookie - 000ae 48 8d a5 08 02 + 000a9 48 33 cd xor rcx, rbp + 000ac e8 00 00 00 00 call __security_check_cookie + 000b1 48 8d a5 08 02 00 00 lea rsp, QWORD PTR [rbp+520] - 000b5 5f pop rdi - 000b6 5d pop rbp - 000b7 c3 ret 0 + 000b8 5f pop rdi + 000b9 5d pop rbp + 000ba c3 ret 0 stbi_is_hdr_from_file ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -57978,51 +58467,53 @@ $LN4: 00013 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001a e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0001f 90 npad 1 ; 994 : FILE* f = stbi__fopen(filename, "rb"); - 0001f 48 8d 15 00 00 + 00020 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_02JDPG@rb@ - 00026 48 8b 8d 20 01 + 00027 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR filename$[rbp] - 0002d e8 00 00 00 00 call stbi__fopen - 00032 48 89 45 08 mov QWORD PTR f$[rbp], rax + 0002e e8 00 00 00 00 call stbi__fopen + 00033 48 89 45 08 mov QWORD PTR f$[rbp], rax ; 995 : int result = 0; - 00036 c7 45 24 00 00 + 00037 c7 45 24 00 00 00 00 mov DWORD PTR result$[rbp], 0 ; 996 : if (f) { - 0003d 48 83 7d 08 00 cmp QWORD PTR f$[rbp], 0 - 00042 74 16 je SHORT $LN2@stbi_is_hd + 0003e 48 83 7d 08 00 cmp QWORD PTR f$[rbp], 0 + 00043 74 17 je SHORT $LN2@stbi_is_hd ; 997 : result = stbi_is_hdr_from_file(f); - 00044 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] - 00048 e8 00 00 00 00 call stbi_is_hdr_from_file - 0004d 89 45 24 mov DWORD PTR result$[rbp], eax + 00045 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] + 00049 e8 00 00 00 00 call stbi_is_hdr_from_file + 0004e 89 45 24 mov DWORD PTR result$[rbp], eax ; 998 : fclose(f); - 00050 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] - 00054 ff 15 00 00 00 + 00051 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] + 00055 ff 15 00 00 00 00 call QWORD PTR __imp_fclose + 0005b 90 npad 1 $LN2@stbi_is_hd: ; 999 : } ; 1000 : return result; - 0005a 8b 45 24 mov eax, DWORD PTR result$[rbp] + 0005c 8b 45 24 mov eax, DWORD PTR result$[rbp] ; 1001 : } - 0005d 48 8d a5 08 01 + 0005f 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 00064 5f pop rdi - 00065 5d pop rbp - 00066 c3 ret 0 + 00066 5f pop rdi + 00067 5d pop rbp + 00068 c3 ret 0 stbi_is_hdr ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58059,22 +58550,24 @@ $LN3: 00041 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00048 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0004d 90 npad 1 ; 980 : #ifndef STBI_NO_HDR ; 981 : stbi__context s; ; 982 : stbi__start_mem(&s, buffer, len); - 0004d 44 8b 85 e8 01 + 0004e 44 8b 85 e8 01 00 00 mov r8d, DWORD PTR len$[rbp] - 00054 48 8b 95 e0 01 + 00055 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR buffer$[rbp] - 0005b 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 0005f e8 00 00 00 00 call stbi__start_mem + 0005c 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 00060 e8 00 00 00 00 call stbi__start_mem + 00065 90 npad 1 ; 983 : return stbi__hdr_test(&s); - 00064 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00068 e8 00 00 00 00 call stbi__hdr_test + 00066 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0006a e8 00 00 00 00 call stbi__hdr_test ; 984 : #else ; 985 : STBI_NOTUSED(buffer); @@ -58083,21 +58576,21 @@ $LN3: ; 988 : #endif ; 989 : } - 0006d 48 8b f8 mov rdi, rax - 00070 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00074 48 8d 15 00 00 + 0006f 48 8b f8 mov rdi, rax + 00072 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00076 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_is_hdr_from_memory$rtcFrameData - 0007b e8 00 00 00 00 call _RTC_CheckStackVars - 00080 48 8b c7 mov rax, rdi - 00083 48 8b 8d b8 01 + 0007d e8 00 00 00 00 call _RTC_CheckStackVars + 00082 48 8b c7 mov rax, rdi + 00085 48 8b 8d b8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 0008a 48 33 cd xor rcx, rbp - 0008d e8 00 00 00 00 call __security_check_cookie - 00092 48 8d a5 c8 01 + 0008c 48 33 cd xor rcx, rbp + 0008f e8 00 00 00 00 call __security_check_cookie + 00094 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 00099 5f pop rdi - 0009a 5d pop rbp - 0009b c3 ret 0 + 0009b 5f pop rdi + 0009c 5d pop rbp + 0009d c3 ret 0 stbi_is_hdr_from_memory ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58134,22 +58627,24 @@ $LN3: 00042 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00049 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0004e 90 npad 1 ; 1022 : #ifndef STBI_NO_HDR ; 1023 : stbi__context s; ; 1024 : stbi__start_callbacks(&s, (stbi_io_callbacks*)clbk, user); - 0004e 4c 8b 85 e8 01 + 0004f 4c 8b 85 e8 01 00 00 mov r8, QWORD PTR user$[rbp] - 00055 48 8b 95 e0 01 + 00056 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR clbk$[rbp] - 0005c 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00060 e8 00 00 00 00 call stbi__start_callbacks + 0005d 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 00061 e8 00 00 00 00 call stbi__start_callbacks + 00066 90 npad 1 ; 1025 : return stbi__hdr_test(&s); - 00065 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00069 e8 00 00 00 00 call stbi__hdr_test + 00067 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0006b e8 00 00 00 00 call stbi__hdr_test ; 1026 : #else ; 1027 : STBI_NOTUSED(clbk); @@ -58158,21 +58653,21 @@ $LN3: ; 1030 : #endif ; 1031 : } - 0006e 48 8b f8 mov rdi, rax - 00071 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] - 00075 48 8d 15 00 00 + 00070 48 8b f8 mov rdi, rax + 00073 48 8d 4d e0 lea rcx, QWORD PTR [rbp-32] + 00077 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_is_hdr_from_callbacks$rtcFrameData - 0007c e8 00 00 00 00 call _RTC_CheckStackVars - 00081 48 8b c7 mov rax, rdi - 00084 48 8b 8d b8 01 + 0007e e8 00 00 00 00 call _RTC_CheckStackVars + 00083 48 8b c7 mov rax, rdi + 00086 48 8b 8d b8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 0008b 48 33 cd xor rcx, rbp - 0008e e8 00 00 00 00 call __security_check_cookie - 00093 48 8d a5 c8 01 + 0008d 48 33 cd xor rcx, rbp + 00090 e8 00 00 00 00 call __security_check_cookie + 00095 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 0009a 5f pop rdi - 0009b 5d pop rbp - 0009c c3 ret 0 + 0009c 5f pop rdi + 0009d 5d pop rbp + 0009e c3 ret 0 stbi_is_hdr_from_callbacks ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58195,15 +58690,16 @@ $LN3: 00014 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001b e8 00 00 00 00 call __CheckForDebuggerJustMyCode - 00020 f3 0f 10 85 e0 + 00020 90 npad 1 + 00021 f3 0f 10 85 e0 00 00 00 movss xmm0, DWORD PTR scale$[rbp] - 00028 f3 0f 11 05 00 + 00029 f3 0f 11 05 00 00 00 00 movss DWORD PTR stbi__l2h_scale, xmm0 - 00030 48 8d a5 c8 00 + 00031 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00037 5f pop rdi - 00038 5d pop rbp - 00039 c3 ret 0 + 00038 5f pop rdi + 00039 5d pop rbp + 0003a c3 ret 0 stbi_ldr_to_hdr_scale ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58226,15 +58722,16 @@ $LN3: 00014 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001b e8 00 00 00 00 call __CheckForDebuggerJustMyCode - 00020 f3 0f 10 85 e0 + 00020 90 npad 1 + 00021 f3 0f 10 85 e0 00 00 00 movss xmm0, DWORD PTR gamma$[rbp] - 00028 f3 0f 11 05 00 + 00029 f3 0f 11 05 00 00 00 00 movss DWORD PTR stbi__l2h_gamma, xmm0 - 00030 48 8d a5 c8 00 + 00031 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 00037 5f pop rdi - 00038 5d pop rbp - 00039 c3 ret 0 + 00038 5f pop rdi + 00039 5d pop rbp + 0003a c3 ret 0 stbi_ldr_to_hdr_gamma ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58257,17 +58754,18 @@ $LN3: 00014 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001b e8 00 00 00 00 call __CheckForDebuggerJustMyCode - 00020 f3 0f 10 05 00 + 00020 90 npad 1 + 00021 f3 0f 10 05 00 00 00 00 movss xmm0, DWORD PTR __real@3f800000 - 00028 f3 0f 5e 85 e0 + 00029 f3 0f 5e 85 e0 00 00 00 divss xmm0, DWORD PTR scale$[rbp] - 00030 f3 0f 11 05 00 + 00031 f3 0f 11 05 00 00 00 00 movss DWORD PTR stbi__h2l_scale_i, xmm0 - 00038 48 8d a5 c8 00 + 00039 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0003f 5f pop rdi - 00040 5d pop rbp - 00041 c3 ret 0 + 00040 5f pop rdi + 00041 5d pop rbp + 00042 c3 ret 0 stbi_hdr_to_ldr_scale ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58290,17 +58788,18 @@ $LN3: 00014 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 0001b e8 00 00 00 00 call __CheckForDebuggerJustMyCode - 00020 f3 0f 10 05 00 + 00020 90 npad 1 + 00021 f3 0f 10 05 00 00 00 00 movss xmm0, DWORD PTR __real@3f800000 - 00028 f3 0f 5e 85 e0 + 00029 f3 0f 5e 85 e0 00 00 00 divss xmm0, DWORD PTR gamma$[rbp] - 00030 f3 0f 11 05 00 + 00031 f3 0f 11 05 00 00 00 00 movss DWORD PTR stbi__h2l_gamma_i, xmm0 - 00038 48 8d a5 c8 00 + 00039 48 8d a5 c8 00 00 00 lea rsp, QWORD PTR [rbp+200] - 0003f 5f pop rdi - 00040 5d pop rbp - 00041 c3 ret 0 + 00040 5f pop rdi + 00041 5d pop rbp + 00042 c3 ret 0 stbi_hdr_to_ldr_gamma ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58342,46 +58841,48 @@ $LN3: 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 966 : stbi__context s; ; 967 : stbi__start_file(&s, f); - 00058 48 8b 95 e0 01 + 00059 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR f$[rbp] - 0005f 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00063 e8 00 00 00 00 call stbi__start_file + 00060 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 00064 e8 00 00 00 00 call stbi__start_file + 00069 90 npad 1 ; 968 : return stbi__loadf_main(&s, x, y, comp, req_comp); - 00068 8b 85 00 02 00 + 0006a 8b 85 00 02 00 00 mov eax, DWORD PTR req_comp$[rbp] - 0006e 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00072 4c 8b 8d f8 01 + 00070 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00074 4c 8b 8d f8 01 00 00 mov r9, QWORD PTR comp$[rbp] - 00079 4c 8b 85 f0 01 + 0007b 4c 8b 85 f0 01 00 00 mov r8, QWORD PTR y$[rbp] - 00080 48 8b 95 e8 01 + 00082 48 8b 95 e8 01 00 00 mov rdx, QWORD PTR x$[rbp] - 00087 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 0008b e8 00 00 00 00 call stbi__loadf_main + 00089 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0008d e8 00 00 00 00 call stbi__loadf_main ; 969 : } - 00090 48 8b f8 mov rdi, rax - 00093 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 00097 48 8d 15 00 00 + 00092 48 8b f8 mov rdi, rax + 00095 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 00099 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_loadf_from_file$rtcFrameData - 0009e e8 00 00 00 00 call _RTC_CheckStackVars - 000a3 48 8b c7 mov rax, rdi - 000a6 48 8b 8d b8 01 + 000a0 e8 00 00 00 00 call _RTC_CheckStackVars + 000a5 48 8b c7 mov rax, rdi + 000a8 48 8b 8d b8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000ad 48 33 cd xor rcx, rbp - 000b0 e8 00 00 00 00 call __security_check_cookie - 000b5 48 8d a5 c8 01 + 000af 48 33 cd xor rcx, rbp + 000b2 e8 00 00 00 00 call __security_check_cookie + 000b7 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 000bc 5f pop rdi - 000bd 5d pop rbp - 000be c3 ret 0 + 000be 5f pop rdi + 000bf 5d pop rbp + 000c0 c3 ret 0 stbi_loadf_from_file ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58413,73 +58914,75 @@ $LN6: 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 956 : float* result; ; 957 : FILE* f = stbi__fopen(filename, "rb"); - 0002e 48 8d 15 00 00 + 0002f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_02JDPG@rb@ - 00035 48 8b 8d 20 01 + 00036 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR filename$[rbp] - 0003c e8 00 00 00 00 call stbi__fopen - 00041 48 89 45 28 mov QWORD PTR f$[rbp], rax + 0003d e8 00 00 00 00 call stbi__fopen + 00042 48 89 45 28 mov QWORD PTR f$[rbp], rax ; 958 : if (!f) return stbi__errpf("can't fopen", "Unable to open file"); - 00045 48 83 7d 28 00 cmp QWORD PTR f$[rbp], 0 - 0004a 75 31 jne SHORT $LN2@stbi_loadf - 0004c 48 8d 0d 00 00 + 00046 48 83 7d 28 00 cmp QWORD PTR f$[rbp], 0 + 0004b 75 31 jne SHORT $LN2@stbi_loadf + 0004d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@JPDHFAGK@can?8t?5fopen@ - 00053 e8 00 00 00 00 call stbi__err - 00058 85 c0 test eax, eax - 0005a 74 0d je SHORT $LN4@stbi_loadf - 0005c 48 c7 85 f8 00 + 00054 e8 00 00 00 00 call stbi__err + 00059 85 c0 test eax, eax + 0005b 74 0d je SHORT $LN4@stbi_loadf + 0005d 48 c7 85 f8 00 00 00 00 00 00 00 mov QWORD PTR tv71[rbp], 0 - 00067 eb 0b jmp SHORT $LN5@stbi_loadf + 00068 eb 0b jmp SHORT $LN5@stbi_loadf $LN4@stbi_loadf: - 00069 48 c7 85 f8 00 + 0006a 48 c7 85 f8 00 00 00 00 00 00 00 mov QWORD PTR tv71[rbp], 0 $LN5@stbi_loadf: - 00074 48 8b 85 f8 00 + 00075 48 8b 85 f8 00 00 00 mov rax, QWORD PTR tv71[rbp] - 0007b eb 3a jmp SHORT $LN1@stbi_loadf + 0007c eb 3b jmp SHORT $LN1@stbi_loadf $LN2@stbi_loadf: ; 959 : result = stbi_loadf_from_file(f, x, y, comp, req_comp); - 0007d 8b 85 40 01 00 + 0007e 8b 85 40 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00083 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00087 4c 8b 8d 38 01 + 00084 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00088 4c 8b 8d 38 01 00 00 mov r9, QWORD PTR comp$[rbp] - 0008e 4c 8b 85 30 01 + 0008f 4c 8b 85 30 01 00 00 mov r8, QWORD PTR y$[rbp] - 00095 48 8b 95 28 01 + 00096 48 8b 95 28 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0009c 48 8b 4d 28 mov rcx, QWORD PTR f$[rbp] - 000a0 e8 00 00 00 00 call stbi_loadf_from_file - 000a5 48 89 45 08 mov QWORD PTR result$[rbp], rax + 0009d 48 8b 4d 28 mov rcx, QWORD PTR f$[rbp] + 000a1 e8 00 00 00 00 call stbi_loadf_from_file + 000a6 48 89 45 08 mov QWORD PTR result$[rbp], rax ; 960 : fclose(f); - 000a9 48 8b 4d 28 mov rcx, QWORD PTR f$[rbp] - 000ad ff 15 00 00 00 + 000aa 48 8b 4d 28 mov rcx, QWORD PTR f$[rbp] + 000ae ff 15 00 00 00 00 call QWORD PTR __imp_fclose + 000b4 90 npad 1 ; 961 : return result; - 000b3 48 8b 45 08 mov rax, QWORD PTR result$[rbp] + 000b5 48 8b 45 08 mov rax, QWORD PTR result$[rbp] $LN1@stbi_loadf: ; 962 : } - 000b7 48 8d a5 08 01 + 000b9 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000be 5f pop rdi - 000bf 5d pop rbp - 000c0 c3 ret 0 + 000c0 5f pop rdi + 000c1 5d pop rbp + 000c2 c3 ret 0 stbi_loadf ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58522,48 +59025,50 @@ $LN3: 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 948 : stbi__context s; ; 949 : stbi__start_callbacks(&s, (stbi_io_callbacks*)clbk, user); - 00058 4c 8b 85 e8 01 + 00059 4c 8b 85 e8 01 00 00 mov r8, QWORD PTR user$[rbp] - 0005f 48 8b 95 e0 01 + 00060 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR clbk$[rbp] - 00066 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 0006a e8 00 00 00 00 call stbi__start_callbacks + 00067 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0006b e8 00 00 00 00 call stbi__start_callbacks + 00070 90 npad 1 ; 950 : return stbi__loadf_main(&s, x, y, comp, req_comp); - 0006f 8b 85 08 02 00 + 00071 8b 85 08 02 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00075 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00079 4c 8b 8d 00 02 + 00077 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0007b 4c 8b 8d 00 02 00 00 mov r9, QWORD PTR comp$[rbp] - 00080 4c 8b 85 f8 01 + 00082 4c 8b 85 f8 01 00 00 mov r8, QWORD PTR y$[rbp] - 00087 48 8b 95 f0 01 + 00089 48 8b 95 f0 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0008e 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00092 e8 00 00 00 00 call stbi__loadf_main + 00090 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 00094 e8 00 00 00 00 call stbi__loadf_main ; 951 : } - 00097 48 8b f8 mov rdi, rax - 0009a 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 0009e 48 8d 15 00 00 + 00099 48 8b f8 mov rdi, rax + 0009c 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 000a0 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_loadf_from_callbacks$rtcFrameData - 000a5 e8 00 00 00 00 call _RTC_CheckStackVars - 000aa 48 8b c7 mov rax, rdi - 000ad 48 8b 8d b8 01 + 000a7 e8 00 00 00 00 call _RTC_CheckStackVars + 000ac 48 8b c7 mov rax, rdi + 000af 48 8b 8d b8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000b4 48 33 cd xor rcx, rbp - 000b7 e8 00 00 00 00 call __security_check_cookie - 000bc 48 8d a5 c8 01 + 000b6 48 33 cd xor rcx, rbp + 000b9 e8 00 00 00 00 call __security_check_cookie + 000be 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 000c3 5f pop rdi - 000c4 5d pop rbp - 000c5 c3 ret 0 + 000c5 5f pop rdi + 000c6 5d pop rbp + 000c7 c3 ret 0 stbi_loadf_from_callbacks ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58606,48 +59111,50 @@ $LN3: 0004b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00052 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00057 90 npad 1 ; 941 : stbi__context s; ; 942 : stbi__start_mem(&s, buffer, len); - 00057 44 8b 85 e8 01 + 00058 44 8b 85 e8 01 00 00 mov r8d, DWORD PTR len$[rbp] - 0005e 48 8b 95 e0 01 + 0005f 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR buffer$[rbp] - 00065 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00069 e8 00 00 00 00 call stbi__start_mem + 00066 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0006a e8 00 00 00 00 call stbi__start_mem + 0006f 90 npad 1 ; 943 : return stbi__loadf_main(&s, x, y, comp, req_comp); - 0006e 8b 85 08 02 00 + 00070 8b 85 08 02 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00074 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00078 4c 8b 8d 00 02 + 00076 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0007a 4c 8b 8d 00 02 00 00 mov r9, QWORD PTR comp$[rbp] - 0007f 4c 8b 85 f8 01 + 00081 4c 8b 85 f8 01 00 00 mov r8, QWORD PTR y$[rbp] - 00086 48 8b 95 f0 01 + 00088 48 8b 95 f0 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0008d 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00091 e8 00 00 00 00 call stbi__loadf_main + 0008f 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 00093 e8 00 00 00 00 call stbi__loadf_main ; 944 : } - 00096 48 8b f8 mov rdi, rax - 00099 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 0009d 48 8d 15 00 00 + 00098 48 8b f8 mov rdi, rax + 0009b 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 0009f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_loadf_from_memory$rtcFrameData - 000a4 e8 00 00 00 00 call _RTC_CheckStackVars - 000a9 48 8b c7 mov rax, rdi - 000ac 48 8b 8d b8 01 + 000a6 e8 00 00 00 00 call _RTC_CheckStackVars + 000ab 48 8b c7 mov rax, rdi + 000ae 48 8b 8d b8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000b3 48 33 cd xor rcx, rbp - 000b6 e8 00 00 00 00 call __security_check_cookie - 000bb 48 8d a5 c8 01 + 000b5 48 33 cd xor rcx, rbp + 000b8 e8 00 00 00 00 call __security_check_cookie + 000bd 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 000c2 5f pop rdi - 000c3 5d pop rbp - 000c4 c3 ret 0 + 000c4 5f pop rdi + 000c5 5d pop rbp + 000c6 c3 ret 0 stbi_loadf_from_memory ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58690,77 +59197,80 @@ $LN4: 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 853 : stbi__uint16* result; ; 854 : stbi__context s; ; 855 : stbi__start_file(&s, f); - 00058 48 8b 95 00 02 + 00059 48 8b 95 00 02 00 00 mov rdx, QWORD PTR f$[rbp] - 0005f 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] - 00063 e8 00 00 00 00 call stbi__start_file + 00060 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] + 00064 e8 00 00 00 00 call stbi__start_file + 00069 90 npad 1 ; 856 : result = stbi__load_and_postprocess_16bit(&s, x, y, comp, req_comp); - 00068 8b 85 20 02 00 + 0006a 8b 85 20 02 00 00 mov eax, DWORD PTR req_comp$[rbp] - 0006e 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00072 4c 8b 8d 18 02 + 00070 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00074 4c 8b 8d 18 02 00 00 mov r9, QWORD PTR comp$[rbp] - 00079 4c 8b 85 10 02 + 0007b 4c 8b 85 10 02 00 00 mov r8, QWORD PTR y$[rbp] - 00080 48 8b 95 08 02 + 00082 48 8b 95 08 02 00 00 mov rdx, QWORD PTR x$[rbp] - 00087 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] - 0008b e8 00 00 00 00 call stbi__load_and_postprocess_16bit - 00090 48 89 45 08 mov QWORD PTR result$[rbp], rax + 00089 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] + 0008d e8 00 00 00 00 call stbi__load_and_postprocess_16bit + 00092 48 89 45 08 mov QWORD PTR result$[rbp], rax ; 857 : if (result) { - 00094 48 83 7d 08 00 cmp QWORD PTR result$[rbp], 0 - 00099 74 2b je SHORT $LN2@stbi_load_ + 00096 48 83 7d 08 00 cmp QWORD PTR result$[rbp], 0 + 0009b 74 2c je SHORT $LN2@stbi_load_ ; 858 : // need to 'unget' all the characters in the IO buffer ; 859 : fseek(f, -(int)(s.img_buffer_end - s.img_buffer), SEEK_CUR); - 0009b 48 8b 85 f0 00 + 0009d 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp+192] - 000a2 48 8b 8d f8 00 + 000a4 48 8b 8d f8 00 00 00 mov rcx, QWORD PTR s$[rbp+200] - 000a9 48 2b c8 sub rcx, rax - 000ac 48 8b c1 mov rax, rcx - 000af f7 d8 neg eax - 000b1 41 b8 01 00 00 + 000ab 48 2b c8 sub rcx, rax + 000ae 48 8b c1 mov rax, rcx + 000b1 f7 d8 neg eax + 000b3 41 b8 01 00 00 00 mov r8d, 1 - 000b7 8b d0 mov edx, eax - 000b9 48 8b 8d 00 02 + 000b9 8b d0 mov edx, eax + 000bb 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR f$[rbp] - 000c0 ff 15 00 00 00 + 000c2 ff 15 00 00 00 00 call QWORD PTR __imp_fseek + 000c8 90 npad 1 $LN2@stbi_load_: ; 860 : } ; 861 : return result; - 000c6 48 8b 45 08 mov rax, QWORD PTR result$[rbp] + 000c9 48 8b 45 08 mov rax, QWORD PTR result$[rbp] ; 862 : } - 000ca 48 8b f8 mov rdi, rax - 000cd 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 000d1 48 8d 15 00 00 + 000cd 48 8b f8 mov rdi, rax + 000d0 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 000d4 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_load_from_file_16$rtcFrameData - 000d8 e8 00 00 00 00 call _RTC_CheckStackVars - 000dd 48 8b c7 mov rax, rdi - 000e0 48 8b 8d d8 01 + 000db e8 00 00 00 00 call _RTC_CheckStackVars + 000e0 48 8b c7 mov rax, rdi + 000e3 48 8b 8d d8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000e7 48 33 cd xor rcx, rbp - 000ea e8 00 00 00 00 call __security_check_cookie - 000ef 48 8d a5 e8 01 + 000ea 48 33 cd xor rcx, rbp + 000ed e8 00 00 00 00 call __security_check_cookie + 000f2 48 8d a5 e8 01 00 00 lea rsp, QWORD PTR [rbp+488] - 000f6 5f pop rdi - 000f7 5d pop rbp - 000f8 c3 ret 0 + 000f9 5f pop rdi + 000fa 5d pop rbp + 000fb c3 ret 0 stbi_load_from_file_16 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58792,73 +59302,75 @@ $LN6: 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 866 : FILE* f = stbi__fopen(filename, "rb"); - 0002e 48 8d 15 00 00 + 0002f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_02JDPG@rb@ - 00035 48 8b 8d 20 01 + 00036 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR filename$[rbp] - 0003c e8 00 00 00 00 call stbi__fopen - 00041 48 89 45 08 mov QWORD PTR f$[rbp], rax + 0003d e8 00 00 00 00 call stbi__fopen + 00042 48 89 45 08 mov QWORD PTR f$[rbp], rax ; 867 : stbi__uint16* result; ; 868 : if (!f) return (stbi_us*)stbi__errpuc("can't fopen", "Unable to open file"); - 00045 48 83 7d 08 00 cmp QWORD PTR f$[rbp], 0 - 0004a 75 31 jne SHORT $LN2@stbi_load_ - 0004c 48 8d 0d 00 00 + 00046 48 83 7d 08 00 cmp QWORD PTR f$[rbp], 0 + 0004b 75 31 jne SHORT $LN2@stbi_load_ + 0004d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@JPDHFAGK@can?8t?5fopen@ - 00053 e8 00 00 00 00 call stbi__err - 00058 85 c0 test eax, eax - 0005a 74 0d je SHORT $LN4@stbi_load_ - 0005c 48 c7 85 f8 00 + 00054 e8 00 00 00 00 call stbi__err + 00059 85 c0 test eax, eax + 0005b 74 0d je SHORT $LN4@stbi_load_ + 0005d 48 c7 85 f8 00 00 00 00 00 00 00 mov QWORD PTR tv71[rbp], 0 - 00067 eb 0b jmp SHORT $LN5@stbi_load_ + 00068 eb 0b jmp SHORT $LN5@stbi_load_ $LN4@stbi_load_: - 00069 48 c7 85 f8 00 + 0006a 48 c7 85 f8 00 00 00 00 00 00 00 mov QWORD PTR tv71[rbp], 0 $LN5@stbi_load_: - 00074 48 8b 85 f8 00 + 00075 48 8b 85 f8 00 00 00 mov rax, QWORD PTR tv71[rbp] - 0007b eb 3a jmp SHORT $LN1@stbi_load_ + 0007c eb 3b jmp SHORT $LN1@stbi_load_ $LN2@stbi_load_: ; 869 : result = stbi_load_from_file_16(f, x, y, comp, req_comp); - 0007d 8b 85 40 01 00 + 0007e 8b 85 40 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00083 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00087 4c 8b 8d 38 01 + 00084 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00088 4c 8b 8d 38 01 00 00 mov r9, QWORD PTR comp$[rbp] - 0008e 4c 8b 85 30 01 + 0008f 4c 8b 85 30 01 00 00 mov r8, QWORD PTR y$[rbp] - 00095 48 8b 95 28 01 + 00096 48 8b 95 28 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0009c 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] - 000a0 e8 00 00 00 00 call stbi_load_from_file_16 - 000a5 48 89 45 28 mov QWORD PTR result$[rbp], rax + 0009d 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] + 000a1 e8 00 00 00 00 call stbi_load_from_file_16 + 000a6 48 89 45 28 mov QWORD PTR result$[rbp], rax ; 870 : fclose(f); - 000a9 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] - 000ad ff 15 00 00 00 + 000aa 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] + 000ae ff 15 00 00 00 00 call QWORD PTR __imp_fclose + 000b4 90 npad 1 ; 871 : return result; - 000b3 48 8b 45 28 mov rax, QWORD PTR result$[rbp] + 000b5 48 8b 45 28 mov rax, QWORD PTR result$[rbp] $LN1@stbi_load_: ; 872 : } - 000b7 48 8d a5 08 01 + 000b9 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000be 5f pop rdi - 000bf 5d pop rbp - 000c0 c3 ret 0 + 000c0 5f pop rdi + 000c1 5d pop rbp + 000c2 c3 ret 0 stbi_load_16 ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58901,48 +59413,50 @@ $LN3: 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 885 : stbi__context s; ; 886 : stbi__start_callbacks(&s, (stbi_io_callbacks*)clbk, user); - 00058 4c 8b 85 e8 01 + 00059 4c 8b 85 e8 01 00 00 mov r8, QWORD PTR user$[rbp] - 0005f 48 8b 95 e0 01 + 00060 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR clbk$[rbp] - 00066 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 0006a e8 00 00 00 00 call stbi__start_callbacks + 00067 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0006b e8 00 00 00 00 call stbi__start_callbacks + 00070 90 npad 1 ; 887 : return stbi__load_and_postprocess_16bit(&s, x, y, channels_in_file, desired_channels); - 0006f 8b 85 08 02 00 + 00071 8b 85 08 02 00 00 mov eax, DWORD PTR desired_channels$[rbp] - 00075 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00079 4c 8b 8d 00 02 + 00077 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0007b 4c 8b 8d 00 02 00 00 mov r9, QWORD PTR channels_in_file$[rbp] - 00080 4c 8b 85 f8 01 + 00082 4c 8b 85 f8 01 00 00 mov r8, QWORD PTR y$[rbp] - 00087 48 8b 95 f0 01 + 00089 48 8b 95 f0 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0008e 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00092 e8 00 00 00 00 call stbi__load_and_postprocess_16bit + 00090 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 00094 e8 00 00 00 00 call stbi__load_and_postprocess_16bit ; 888 : } - 00097 48 8b f8 mov rdi, rax - 0009a 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 0009e 48 8d 15 00 00 + 00099 48 8b f8 mov rdi, rax + 0009c 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 000a0 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_load_16_from_callbacks$rtcFrameData - 000a5 e8 00 00 00 00 call _RTC_CheckStackVars - 000aa 48 8b c7 mov rax, rdi - 000ad 48 8b 8d b8 01 + 000a7 e8 00 00 00 00 call _RTC_CheckStackVars + 000ac 48 8b c7 mov rax, rdi + 000af 48 8b 8d b8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000b4 48 33 cd xor rcx, rbp - 000b7 e8 00 00 00 00 call __security_check_cookie - 000bc 48 8d a5 c8 01 + 000b6 48 33 cd xor rcx, rbp + 000b9 e8 00 00 00 00 call __security_check_cookie + 000be 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 000c3 5f pop rdi - 000c4 5d pop rbp - 000c5 c3 ret 0 + 000c5 5f pop rdi + 000c6 5d pop rbp + 000c7 c3 ret 0 stbi_load_16_from_callbacks ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -58985,48 +59499,50 @@ $LN3: 0004b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00052 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00057 90 npad 1 ; 878 : stbi__context s; ; 879 : stbi__start_mem(&s, buffer, len); - 00057 44 8b 85 e8 01 + 00058 44 8b 85 e8 01 00 00 mov r8d, DWORD PTR len$[rbp] - 0005e 48 8b 95 e0 01 + 0005f 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR buffer$[rbp] - 00065 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00069 e8 00 00 00 00 call stbi__start_mem + 00066 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0006a e8 00 00 00 00 call stbi__start_mem + 0006f 90 npad 1 ; 880 : return stbi__load_and_postprocess_16bit(&s, x, y, channels_in_file, desired_channels); - 0006e 8b 85 08 02 00 + 00070 8b 85 08 02 00 00 mov eax, DWORD PTR desired_channels$[rbp] - 00074 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00078 4c 8b 8d 00 02 + 00076 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0007a 4c 8b 8d 00 02 00 00 mov r9, QWORD PTR channels_in_file$[rbp] - 0007f 4c 8b 85 f8 01 + 00081 4c 8b 85 f8 01 00 00 mov r8, QWORD PTR y$[rbp] - 00086 48 8b 95 f0 01 + 00088 48 8b 95 f0 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0008d 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00091 e8 00 00 00 00 call stbi__load_and_postprocess_16bit + 0008f 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 00093 e8 00 00 00 00 call stbi__load_and_postprocess_16bit ; 881 : } - 00096 48 8b f8 mov rdi, rax - 00099 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 0009d 48 8d 15 00 00 + 00098 48 8b f8 mov rdi, rax + 0009b 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 0009f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_load_16_from_memory$rtcFrameData - 000a4 e8 00 00 00 00 call _RTC_CheckStackVars - 000a9 48 8b c7 mov rax, rdi - 000ac 48 8b 8d b8 01 + 000a6 e8 00 00 00 00 call _RTC_CheckStackVars + 000ab 48 8b c7 mov rax, rdi + 000ae 48 8b 8d b8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000b3 48 33 cd xor rcx, rbp - 000b6 e8 00 00 00 00 call __security_check_cookie - 000bb 48 8d a5 c8 01 + 000b5 48 33 cd xor rcx, rbp + 000b8 e8 00 00 00 00 call __security_check_cookie + 000bd 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 000c2 5f pop rdi - 000c3 5d pop rbp - 000c4 c3 ret 0 + 000c4 5f pop rdi + 000c5 5d pop rbp + 000c6 c3 ret 0 stbi_load_16_from_memory ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -59073,114 +59589,117 @@ $LN6: 0004b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00052 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00057 90 npad 1 ; 907 : unsigned char* result; ; 908 : stbi__context s; ; 909 : stbi__start_mem(&s, buffer, len); - 00057 44 8b 85 08 02 + 00058 44 8b 85 08 02 00 00 mov r8d, DWORD PTR len$[rbp] - 0005e 48 8b 95 00 02 + 0005f 48 8b 95 00 02 00 00 mov rdx, QWORD PTR buffer$[rbp] - 00065 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] - 00069 e8 00 00 00 00 call stbi__start_mem + 00066 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] + 0006a e8 00 00 00 00 call stbi__start_mem + 0006f 90 npad 1 ; 910 : ; 911 : result = (unsigned char*)stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp); - 0006e 8b 85 38 02 00 + 00070 8b 85 38 02 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00074 89 44 24 30 mov DWORD PTR [rsp+48], eax - 00078 48 8b 85 30 02 + 00076 89 44 24 30 mov DWORD PTR [rsp+48], eax + 0007a 48 8b 85 30 02 00 00 mov rax, QWORD PTR comp$[rbp] - 0007f 48 89 44 24 28 mov QWORD PTR [rsp+40], rax - 00084 48 8b 85 28 02 + 00081 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 00086 48 8b 85 28 02 00 00 mov rax, QWORD PTR z$[rbp] - 0008b 48 89 44 24 20 mov QWORD PTR [rsp+32], rax - 00090 4c 8b 8d 20 02 + 0008d 48 89 44 24 20 mov QWORD PTR [rsp+32], rax + 00092 4c 8b 8d 20 02 00 00 mov r9, QWORD PTR y$[rbp] - 00097 4c 8b 85 18 02 + 00099 4c 8b 85 18 02 00 00 mov r8, QWORD PTR x$[rbp] - 0009e 48 8b 95 10 02 + 000a0 48 8b 95 10 02 00 00 mov rdx, QWORD PTR delays$[rbp] - 000a5 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] - 000a9 e8 00 00 00 00 call stbi__load_gif_main - 000ae 48 89 45 08 mov QWORD PTR result$[rbp], rax + 000a7 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] + 000ab e8 00 00 00 00 call stbi__load_gif_main + 000b0 48 89 45 08 mov QWORD PTR result$[rbp], rax ; 912 : if (stbi__vertically_flip_on_load) { - 000b2 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_set - 000b7 8b c0 mov eax, eax - 000b9 8b 0d 00 00 00 + 000b4 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_set + 000b9 8b c0 mov eax, eax + 000bb 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 000bf 65 48 8b 14 25 + 000c1 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 000c8 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 000cc 83 3c 08 00 cmp DWORD PTR [rax+rcx], 0 - 000d0 74 25 je SHORT $LN4@stbi_load_ - 000d2 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_local - 000d7 8b c0 mov eax, eax - 000d9 8b 0d 00 00 00 + 000ca 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 000ce 83 3c 08 00 cmp DWORD PTR [rax+rcx], 0 + 000d2 74 25 je SHORT $LN4@stbi_load_ + 000d4 b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__vertically_flip_on_load_local + 000d9 8b c0 mov eax, eax + 000db 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - 000df 65 48 8b 14 25 + 000e1 65 48 8b 14 25 58 00 00 00 mov rdx, QWORD PTR gs:88 - 000e8 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] - 000ec 8b 04 08 mov eax, DWORD PTR [rax+rcx] - 000ef 89 85 d4 01 00 + 000ea 48 8b 0c ca mov rcx, QWORD PTR [rdx+rcx*8] + 000ee 8b 04 08 mov eax, DWORD PTR [rax+rcx] + 000f1 89 85 d4 01 00 00 mov DWORD PTR tv88[rbp], eax - 000f5 eb 0c jmp SHORT $LN5@stbi_load_ + 000f7 eb 0c jmp SHORT $LN5@stbi_load_ $LN4@stbi_load_: - 000f7 8b 05 00 00 00 + 000f9 8b 05 00 00 00 00 mov eax, DWORD PTR stbi__vertically_flip_on_load_global - 000fd 89 85 d4 01 00 + 000ff 89 85 d4 01 00 00 mov DWORD PTR tv88[rbp], eax $LN5@stbi_load_: - 00103 83 bd d4 01 00 + 00105 83 bd d4 01 00 00 00 cmp DWORD PTR tv88[rbp], 0 - 0010a 74 33 je SHORT $LN2@stbi_load_ + 0010c 74 34 je SHORT $LN2@stbi_load_ ; 913 : stbi__vertical_flip_slices(result, *x, *y, *z, *comp); - 0010c 48 8b 85 30 02 + 0010e 48 8b 85 30 02 00 00 mov rax, QWORD PTR comp$[rbp] - 00113 8b 00 mov eax, DWORD PTR [rax] - 00115 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00119 48 8b 85 28 02 + 00115 8b 00 mov eax, DWORD PTR [rax] + 00117 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0011b 48 8b 85 28 02 00 00 mov rax, QWORD PTR z$[rbp] - 00120 44 8b 08 mov r9d, DWORD PTR [rax] - 00123 48 8b 85 20 02 + 00122 44 8b 08 mov r9d, DWORD PTR [rax] + 00125 48 8b 85 20 02 00 00 mov rax, QWORD PTR y$[rbp] - 0012a 44 8b 00 mov r8d, DWORD PTR [rax] - 0012d 48 8b 85 18 02 + 0012c 44 8b 00 mov r8d, DWORD PTR [rax] + 0012f 48 8b 85 18 02 00 00 mov rax, QWORD PTR x$[rbp] - 00134 8b 10 mov edx, DWORD PTR [rax] - 00136 48 8b 4d 08 mov rcx, QWORD PTR result$[rbp] - 0013a e8 00 00 00 00 call stbi__vertical_flip_slices + 00136 8b 10 mov edx, DWORD PTR [rax] + 00138 48 8b 4d 08 mov rcx, QWORD PTR result$[rbp] + 0013c e8 00 00 00 00 call stbi__vertical_flip_slices + 00141 90 npad 1 $LN2@stbi_load_: ; 914 : } ; 915 : ; 916 : return result; - 0013f 48 8b 45 08 mov rax, QWORD PTR result$[rbp] + 00142 48 8b 45 08 mov rax, QWORD PTR result$[rbp] ; 917 : } - 00143 48 8b f8 mov rdi, rax - 00146 48 8d 4d c0 lea rcx, QWORD PTR [rbp-64] - 0014a 48 8d 15 00 00 + 00146 48 8b f8 mov rdi, rax + 00149 48 8d 4d c0 lea rcx, QWORD PTR [rbp-64] + 0014d 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_load_gif_from_memory$rtcFrameData - 00151 e8 00 00 00 00 call _RTC_CheckStackVars - 00156 48 8b c7 mov rax, rdi - 00159 48 8b 8d d8 01 + 00154 e8 00 00 00 00 call _RTC_CheckStackVars + 00159 48 8b c7 mov rax, rdi + 0015c 48 8b 8d d8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 00160 48 33 cd xor rcx, rbp - 00163 e8 00 00 00 00 call __security_check_cookie - 00168 48 8d a5 e8 01 + 00163 48 33 cd xor rcx, rbp + 00166 e8 00 00 00 00 call __security_check_cookie + 0016b 48 8d a5 e8 01 00 00 lea rsp, QWORD PTR [rbp+488] - 0016f 5f pop rdi - 00170 5d pop rbp - 00171 c3 ret 0 + 00172 5f pop rdi + 00173 5d pop rbp + 00174 c3 ret 0 stbi_load_gif_from_memory ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -59223,77 +59742,80 @@ $LN4: 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 840 : unsigned char* result; ; 841 : stbi__context s; ; 842 : stbi__start_file(&s, f); - 00058 48 8b 95 00 02 + 00059 48 8b 95 00 02 00 00 mov rdx, QWORD PTR f$[rbp] - 0005f 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] - 00063 e8 00 00 00 00 call stbi__start_file + 00060 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] + 00064 e8 00 00 00 00 call stbi__start_file + 00069 90 npad 1 ; 843 : result = stbi__load_and_postprocess_8bit(&s, x, y, comp, req_comp); - 00068 8b 85 20 02 00 + 0006a 8b 85 20 02 00 00 mov eax, DWORD PTR req_comp$[rbp] - 0006e 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00072 4c 8b 8d 18 02 + 00070 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00074 4c 8b 8d 18 02 00 00 mov r9, QWORD PTR comp$[rbp] - 00079 4c 8b 85 10 02 + 0007b 4c 8b 85 10 02 00 00 mov r8, QWORD PTR y$[rbp] - 00080 48 8b 95 08 02 + 00082 48 8b 95 08 02 00 00 mov rdx, QWORD PTR x$[rbp] - 00087 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] - 0008b e8 00 00 00 00 call stbi__load_and_postprocess_8bit - 00090 48 89 45 08 mov QWORD PTR result$[rbp], rax + 00089 48 8d 4d 30 lea rcx, QWORD PTR s$[rbp] + 0008d e8 00 00 00 00 call stbi__load_and_postprocess_8bit + 00092 48 89 45 08 mov QWORD PTR result$[rbp], rax ; 844 : if (result) { - 00094 48 83 7d 08 00 cmp QWORD PTR result$[rbp], 0 - 00099 74 2b je SHORT $LN2@stbi_load_ + 00096 48 83 7d 08 00 cmp QWORD PTR result$[rbp], 0 + 0009b 74 2c je SHORT $LN2@stbi_load_ ; 845 : // need to 'unget' all the characters in the IO buffer ; 846 : fseek(f, -(int)(s.img_buffer_end - s.img_buffer), SEEK_CUR); - 0009b 48 8b 85 f0 00 + 0009d 48 8b 85 f0 00 00 00 mov rax, QWORD PTR s$[rbp+192] - 000a2 48 8b 8d f8 00 + 000a4 48 8b 8d f8 00 00 00 mov rcx, QWORD PTR s$[rbp+200] - 000a9 48 2b c8 sub rcx, rax - 000ac 48 8b c1 mov rax, rcx - 000af f7 d8 neg eax - 000b1 41 b8 01 00 00 + 000ab 48 2b c8 sub rcx, rax + 000ae 48 8b c1 mov rax, rcx + 000b1 f7 d8 neg eax + 000b3 41 b8 01 00 00 00 mov r8d, 1 - 000b7 8b d0 mov edx, eax - 000b9 48 8b 8d 00 02 + 000b9 8b d0 mov edx, eax + 000bb 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR f$[rbp] - 000c0 ff 15 00 00 00 + 000c2 ff 15 00 00 00 00 call QWORD PTR __imp_fseek + 000c8 90 npad 1 $LN2@stbi_load_: ; 847 : } ; 848 : return result; - 000c6 48 8b 45 08 mov rax, QWORD PTR result$[rbp] + 000c9 48 8b 45 08 mov rax, QWORD PTR result$[rbp] ; 849 : } - 000ca 48 8b f8 mov rdi, rax - 000cd 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 000d1 48 8d 15 00 00 + 000cd 48 8b f8 mov rdi, rax + 000d0 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 000d4 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_load_from_file$rtcFrameData - 000d8 e8 00 00 00 00 call _RTC_CheckStackVars - 000dd 48 8b c7 mov rax, rdi - 000e0 48 8b 8d d8 01 + 000db e8 00 00 00 00 call _RTC_CheckStackVars + 000e0 48 8b c7 mov rax, rdi + 000e3 48 8b 8d d8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000e7 48 33 cd xor rcx, rbp - 000ea e8 00 00 00 00 call __security_check_cookie - 000ef 48 8d a5 e8 01 + 000ea 48 33 cd xor rcx, rbp + 000ed e8 00 00 00 00 call __security_check_cookie + 000f2 48 8d a5 e8 01 00 00 lea rsp, QWORD PTR [rbp+488] - 000f6 5f pop rdi - 000f7 5d pop rbp - 000f8 c3 ret 0 + 000f9 5f pop rdi + 000fa 5d pop rbp + 000fb c3 ret 0 stbi_load_from_file ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -59325,63 +59847,65 @@ $LN4: 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 828 : FILE* f = stbi__fopen(filename, "rb"); - 0002e 48 8d 15 00 00 + 0002f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_02JDPG@rb@ - 00035 48 8b 8d 20 01 + 00036 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR filename$[rbp] - 0003c e8 00 00 00 00 call stbi__fopen - 00041 48 89 45 08 mov QWORD PTR f$[rbp], rax + 0003d e8 00 00 00 00 call stbi__fopen + 00042 48 89 45 08 mov QWORD PTR f$[rbp], rax ; 829 : unsigned char* result; ; 830 : if (!f) - 00045 48 83 7d 08 00 cmp QWORD PTR f$[rbp], 0 - 0004a 75 12 jne SHORT $LN2@stbi_load_ + 00046 48 83 7d 08 00 cmp QWORD PTR f$[rbp], 0 + 0004b 75 12 jne SHORT $LN2@stbi_load_ ; 831 : { ; 832 : *target = "can't fopen, Unable to open file"; return; - 0004c 48 8b 85 38 01 + 0004d 48 8b 85 38 01 00 00 mov rax, QWORD PTR target$[rbp] - 00053 48 8d 0d 00 00 + 00054 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0CB@DDANHPKI@can?8t?5fopen?0?5Unable?5to?5open?5fil@ - 0005a 88 08 mov BYTE PTR [rax], cl - 0005c eb 36 jmp SHORT $LN1@stbi_load_ + 0005b 88 08 mov BYTE PTR [rax], cl + 0005d eb 37 jmp SHORT $LN1@stbi_load_ $LN2@stbi_load_: ; 833 : } ; 834 : result = stbi_load_from_file(f, x, y, comp, req_comp); - 0005e 8b 85 48 01 00 + 0005f 8b 85 48 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00064 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00068 4c 8b 8d 40 01 + 00065 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00069 4c 8b 8d 40 01 00 00 mov r9, QWORD PTR comp$[rbp] - 0006f 4c 8b 85 30 01 + 00070 4c 8b 85 30 01 00 00 mov r8, QWORD PTR y$[rbp] - 00076 48 8b 95 28 01 + 00077 48 8b 95 28 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0007d 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] - 00081 e8 00 00 00 00 call stbi_load_from_file - 00086 48 89 45 28 mov QWORD PTR result$[rbp], rax + 0007e 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] + 00082 e8 00 00 00 00 call stbi_load_from_file + 00087 48 89 45 28 mov QWORD PTR result$[rbp], rax ; 835 : fclose(f); - 0008a 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] - 0008e ff 15 00 00 00 + 0008b 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] + 0008f ff 15 00 00 00 00 call QWORD PTR __imp_fclose + 00095 90 npad 1 $LN1@stbi_load_: ; 836 : } - 00094 48 8d a5 08 01 + 00096 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 0009b 5f pop rdi - 0009c 5d pop rbp - 0009d c3 ret 0 + 0009d 5f pop rdi + 0009e 5d pop rbp + 0009f c3 ret 0 stbi_load_to_target ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -59413,73 +59937,75 @@ $LN6: 00022 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00029 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 0002e 90 npad 1 ; 818 : FILE* f = stbi__fopen(filename, "rb"); - 0002e 48 8d 15 00 00 + 0002f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_02JDPG@rb@ - 00035 48 8b 8d 20 01 + 00036 48 8b 8d 20 01 00 00 mov rcx, QWORD PTR filename$[rbp] - 0003c e8 00 00 00 00 call stbi__fopen - 00041 48 89 45 08 mov QWORD PTR f$[rbp], rax + 0003d e8 00 00 00 00 call stbi__fopen + 00042 48 89 45 08 mov QWORD PTR f$[rbp], rax ; 819 : unsigned char* result; ; 820 : if (!f) return stbi__errpuc("can't fopen", "Unable to open file"); - 00045 48 83 7d 08 00 cmp QWORD PTR f$[rbp], 0 - 0004a 75 31 jne SHORT $LN2@stbi_load - 0004c 48 8d 0d 00 00 + 00046 48 83 7d 08 00 cmp QWORD PTR f$[rbp], 0 + 0004b 75 31 jne SHORT $LN2@stbi_load + 0004d 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:??_C@_0M@JPDHFAGK@can?8t?5fopen@ - 00053 e8 00 00 00 00 call stbi__err - 00058 85 c0 test eax, eax - 0005a 74 0d je SHORT $LN4@stbi_load - 0005c 48 c7 85 f8 00 + 00054 e8 00 00 00 00 call stbi__err + 00059 85 c0 test eax, eax + 0005b 74 0d je SHORT $LN4@stbi_load + 0005d 48 c7 85 f8 00 00 00 00 00 00 00 mov QWORD PTR tv71[rbp], 0 - 00067 eb 0b jmp SHORT $LN5@stbi_load + 00068 eb 0b jmp SHORT $LN5@stbi_load $LN4@stbi_load: - 00069 48 c7 85 f8 00 + 0006a 48 c7 85 f8 00 00 00 00 00 00 00 mov QWORD PTR tv71[rbp], 0 $LN5@stbi_load: - 00074 48 8b 85 f8 00 + 00075 48 8b 85 f8 00 00 00 mov rax, QWORD PTR tv71[rbp] - 0007b eb 3a jmp SHORT $LN1@stbi_load + 0007c eb 3b jmp SHORT $LN1@stbi_load $LN2@stbi_load: ; 821 : result = stbi_load_from_file(f, x, y, comp, req_comp); - 0007d 8b 85 40 01 00 + 0007e 8b 85 40 01 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00083 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00087 4c 8b 8d 38 01 + 00084 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00088 4c 8b 8d 38 01 00 00 mov r9, QWORD PTR comp$[rbp] - 0008e 4c 8b 85 30 01 + 0008f 4c 8b 85 30 01 00 00 mov r8, QWORD PTR y$[rbp] - 00095 48 8b 95 28 01 + 00096 48 8b 95 28 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0009c 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] - 000a0 e8 00 00 00 00 call stbi_load_from_file - 000a5 48 89 45 28 mov QWORD PTR result$[rbp], rax + 0009d 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] + 000a1 e8 00 00 00 00 call stbi_load_from_file + 000a6 48 89 45 28 mov QWORD PTR result$[rbp], rax ; 822 : fclose(f); - 000a9 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] - 000ad ff 15 00 00 00 + 000aa 48 8b 4d 08 mov rcx, QWORD PTR f$[rbp] + 000ae ff 15 00 00 00 00 call QWORD PTR __imp_fclose + 000b4 90 npad 1 ; 823 : return result; - 000b3 48 8b 45 28 mov rax, QWORD PTR result$[rbp] + 000b5 48 8b 45 28 mov rax, QWORD PTR result$[rbp] $LN1@stbi_load: ; 824 : } - 000b7 48 8d a5 08 01 + 000b9 48 8d a5 08 01 00 00 lea rsp, QWORD PTR [rbp+264] - 000be 5f pop rdi - 000bf 5d pop rbp - 000c0 c3 ret 0 + 000c0 5f pop rdi + 000c1 5d pop rbp + 000c2 c3 ret 0 stbi_load ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -59522,48 +60048,50 @@ $LN3: 0004c 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00053 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00058 90 npad 1 ; 899 : stbi__context s; ; 900 : stbi__start_callbacks(&s, (stbi_io_callbacks*)clbk, user); - 00058 4c 8b 85 e8 01 + 00059 4c 8b 85 e8 01 00 00 mov r8, QWORD PTR user$[rbp] - 0005f 48 8b 95 e0 01 + 00060 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR clbk$[rbp] - 00066 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 0006a e8 00 00 00 00 call stbi__start_callbacks + 00067 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0006b e8 00 00 00 00 call stbi__start_callbacks + 00070 90 npad 1 ; 901 : return stbi__load_and_postprocess_8bit(&s, x, y, comp, req_comp); - 0006f 8b 85 08 02 00 + 00071 8b 85 08 02 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00075 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00079 4c 8b 8d 00 02 + 00077 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0007b 4c 8b 8d 00 02 00 00 mov r9, QWORD PTR comp$[rbp] - 00080 4c 8b 85 f8 01 + 00082 4c 8b 85 f8 01 00 00 mov r8, QWORD PTR y$[rbp] - 00087 48 8b 95 f0 01 + 00089 48 8b 95 f0 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0008e 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00092 e8 00 00 00 00 call stbi__load_and_postprocess_8bit + 00090 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 00094 e8 00 00 00 00 call stbi__load_and_postprocess_8bit ; 902 : } - 00097 48 8b f8 mov rdi, rax - 0009a 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 0009e 48 8d 15 00 00 + 00099 48 8b f8 mov rdi, rax + 0009c 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 000a0 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_load_from_callbacks$rtcFrameData - 000a5 e8 00 00 00 00 call _RTC_CheckStackVars - 000aa 48 8b c7 mov rax, rdi - 000ad 48 8b 8d b8 01 + 000a7 e8 00 00 00 00 call _RTC_CheckStackVars + 000ac 48 8b c7 mov rax, rdi + 000af 48 8b 8d b8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000b4 48 33 cd xor rcx, rbp - 000b7 e8 00 00 00 00 call __security_check_cookie - 000bc 48 8d a5 c8 01 + 000b6 48 33 cd xor rcx, rbp + 000b9 e8 00 00 00 00 call __security_check_cookie + 000be 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 000c3 5f pop rdi - 000c4 5d pop rbp - 000c5 c3 ret 0 + 000c5 5f pop rdi + 000c6 5d pop rbp + 000c7 c3 ret 0 stbi_load_from_callbacks ENDP _TEXT ENDS ; Function compile flags: /Odtp /RTCsu /ZI @@ -59606,48 +60134,50 @@ $LN3: 0004b 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__C5A6C9A6_stb_image@c 00052 e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00057 90 npad 1 ; 892 : stbi__context s; ; 893 : stbi__start_mem(&s, buffer, len); - 00057 44 8b 85 e8 01 + 00058 44 8b 85 e8 01 00 00 mov r8d, DWORD PTR len$[rbp] - 0005e 48 8b 95 e0 01 + 0005f 48 8b 95 e0 01 00 00 mov rdx, QWORD PTR buffer$[rbp] - 00065 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00069 e8 00 00 00 00 call stbi__start_mem + 00066 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 0006a e8 00 00 00 00 call stbi__start_mem + 0006f 90 npad 1 ; 894 : return stbi__load_and_postprocess_8bit(&s, x, y, comp, req_comp); - 0006e 8b 85 08 02 00 + 00070 8b 85 08 02 00 00 mov eax, DWORD PTR req_comp$[rbp] - 00074 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00078 4c 8b 8d 00 02 + 00076 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0007a 4c 8b 8d 00 02 00 00 mov r9, QWORD PTR comp$[rbp] - 0007f 4c 8b 85 f8 01 + 00081 4c 8b 85 f8 01 00 00 mov r8, QWORD PTR y$[rbp] - 00086 48 8b 95 f0 01 + 00088 48 8b 95 f0 01 00 00 mov rdx, QWORD PTR x$[rbp] - 0008d 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] - 00091 e8 00 00 00 00 call stbi__load_and_postprocess_8bit + 0008f 48 8d 4d 10 lea rcx, QWORD PTR s$[rbp] + 00093 e8 00 00 00 00 call stbi__load_and_postprocess_8bit ; 895 : } - 00096 48 8b f8 mov rdi, rax - 00099 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] - 0009d 48 8d 15 00 00 + 00098 48 8b f8 mov rdi, rax + 0009b 48 8d 4d d0 lea rcx, QWORD PTR [rbp-48] + 0009f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi_load_from_memory$rtcFrameData - 000a4 e8 00 00 00 00 call _RTC_CheckStackVars - 000a9 48 8b c7 mov rax, rdi - 000ac 48 8b 8d b8 01 + 000a6 e8 00 00 00 00 call _RTC_CheckStackVars + 000ab 48 8b c7 mov rax, rdi + 000ae 48 8b 8d b8 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp] - 000b3 48 33 cd xor rcx, rbp - 000b6 e8 00 00 00 00 call __security_check_cookie - 000bb 48 8d a5 c8 01 + 000b5 48 33 cd xor rcx, rbp + 000b8 e8 00 00 00 00 call __security_check_cookie + 000bd 48 8d a5 c8 01 00 00 lea rsp, QWORD PTR [rbp+456] - 000c2 5f pop rdi - 000c3 5d pop rbp - 000c4 c3 ret 0 + 000c4 5f pop rdi + 000c5 5d pop rbp + 000c6 c3 ret 0 stbi_load_from_memory ENDP _TEXT ENDS END diff --git a/源代码/StgSharpC/x64/Debug/stb_image.nativecodeanalysis.xml b/源代码/StgSharpC/x64/Debug/stb_image.nativecodeanalysis.xml deleted file mode 100644 index 2dcc657d..00000000 --- a/源代码/StgSharpC/x64/Debug/stb_image.nativecodeanalysis.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\ - stb_image.c - 6525 - 13 - - 6262 - 函数使用堆叠的 "35036" 字节。请考虑将一些数据移动到堆。 - stbi__load_gif_main - stbi__load_gif_main - 6525 - - - - - D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\ - stb_image.c - 6612 - 13 - - 6262 - 函数使用堆叠的 "34980" 字节。请考虑将一些数据移动到堆。 - stbi__gif_load - stbi__gif_load - 6612 - - - \ No newline at end of file diff --git a/源代码/StgSharpC/x64/Debug/stb_image.obj b/源代码/StgSharpC/x64/Debug/stb_image.obj index f3174b6a..360d059c 100644 Binary files a/源代码/StgSharpC/x64/Debug/stb_image.obj and b/源代码/StgSharpC/x64/Debug/stb_image.obj differ diff --git a/源代码/StgSharpC/x64/Debug/stb_image.sbr b/源代码/StgSharpC/x64/Debug/stb_image.sbr index 585d9918..1a74b3ca 100644 Binary files a/源代码/StgSharpC/x64/Debug/stb_image.sbr and b/源代码/StgSharpC/x64/Debug/stb_image.sbr differ diff --git a/源代码/StgSharpC/x64/Debug/vc.nativecodeanalysis.all.xml b/源代码/StgSharpC/x64/Debug/vc.nativecodeanalysis.all.xml deleted file mode 100644 index 3881b5ba..00000000 --- a/源代码/StgSharpC/x64/Debug/vc.nativecodeanalysis.all.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\ - stb_image.c - 6525 - 13 - - 6262 - 函数使用堆叠的 "35036" 字节。请考虑将一些数据移动到堆。 - stbi__load_gif_main - stbi__load_gif_main - 6525 - - - - D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\ - stb_image.c - 6612 - 13 - - 6262 - 函数使用堆叠的 "34980" 字节。请考虑将一些数据移动到堆。 - stbi__gif_load - stbi__gif_load - 6612 - - - - D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\ - StgSharpC.c - 33 - 12 - - 6282 - 运算符不正确。 - loadGlfuncDefault - loadGlfuncDefault - 29 - - \ No newline at end of file diff --git a/源代码/StgSharpC/x64/Debug/vc143.idb b/源代码/StgSharpC/x64/Debug/vc143.idb index e696559a..e5888679 100644 Binary files a/源代码/StgSharpC/x64/Debug/vc143.idb and b/源代码/StgSharpC/x64/Debug/vc143.idb differ diff --git a/源代码/StgSharpC/x64/Debug/vc143.pdb b/源代码/StgSharpC/x64/Debug/vc143.pdb index 4cbab6cb..d602c01c 100644 Binary files a/源代码/StgSharpC/x64/Debug/vc143.pdb and b/源代码/StgSharpC/x64/Debug/vc143.pdb differ diff --git a/源代码/StgSharpC/x64/Debug/vector.cod b/源代码/StgSharpC/x64/Debug/vector.cod index c5e0c442..834df3c5 100644 --- a/源代码/StgSharpC/x64/Debug/vector.cod +++ b/源代码/StgSharpC/x64/Debug/vector.cod @@ -1,4 +1,4 @@ -; Listing generated by Microsoft (R) Optimizing Compiler Version 19.39.33523.0 +; Listing generated by Microsoft (R) Optimizing Compiler Version 19.41.34120.0 include listing.inc @@ -10,20 +10,20 @@ COMM infolog:BYTE:0200H _DATA ENDS msvcjmc SEGMENT __A19B9DB6_ssgc_framework@h DB 01H -__5BC5AF51_mmintrin@h DB 01H -__4B783B3C_concurrencysal@h DB 01H -__137BB1BE_sal@h DB 01H -__805F4069_vadefs@h DB 01H -__1EAACA9B_vcruntime@h DB 01H +__7583A0D2_mmintrin@h DB 01H +__DDA0A690_concurrencysal@h DB 01H +__9ECC08BE_sal@h DB 01H +__E05D733A_vadefs@h DB 01H +__6A355E0E_vcruntime@h DB 01H __1B0272D9_corecrt@h DB 01H __45DED006_corecrt_malloc@h DB 01H __FA77ED4C_malloc@h DB 01H -__9E7FA6CF_xmmintrin@h DB 01H +__EAE0325A_xmmintrin@h DB 01H __0ED14FEE_winpackagefamily@h DB 01H __F92EF742_winapifamily@h DB 01H __22E515EB_sdkddkver@h DB 01H -__1227BCE2_excpt@h DB 01H -__CC8D90C0_stdarg@h DB 01H +__A09A3A7D_excpt@h DB 01H +__AC8FA393_stdarg@h DB 01H __29F49F40_specstrings_undef@h DB 01H __D0F42932_specstrings_strict@h DB 01H __F00405FD_sdv_driverspecs@h DB 01H @@ -34,7 +34,7 @@ __1EC467ED_ctype@h DB 01H __98517906_kernelspecs@h DB 01H __D3497022_basetsd@h DB 01H __61CC25A1_errno@h DB 01H -__0504B279_vcruntime_string@h DB 01H +__890838BD_vcruntime_string@h DB 01H __E4C945B4_corecrt_memcpy_s@h DB 01H __8EAFF484_corecrt_memory@h DB 01H __6490AEC5_corecrt_wstring@h DB 01H @@ -110,26 +110,26 @@ __577CE3E7_ime_cmodes@h DB 01H __1E72C31E_imm@h DB 01H __E15BF856_windows@h DB 01H __61B03275_ssgc_internal@h DB 01H -__F8522E0F_stdint@h DB 01H +__98501D5C_stdint@h DB 01H __874AB8BA_khrplatform@h DB 01H __8DCB230D_gl@h DB 01H __5F89FF5A_wgl@h DB 01H __13F5961F_stddef@h DB 01H __B47D1049_glfw3@h DB 01H -__FB1D2F03_emmintrin@h DB 01H -__24BC478A_pmmintrin@h DB 01H -__94653408_tmmintrin@h DB 01H -__BD5E218B_smmintrin@h DB 01H -__D83CA847_nmmintrin@h DB 01H -__0D875209_wmmintrin@h DB 01H -__C6131F0E_zmmintrin@h DB 01H -__F107BDC4_immintrin@h DB 01H +__8F82BB96_emmintrin@h DB 01H +__5023D31F_pmmintrin@h DB 01H +__E0FAA09D_tmmintrin@h DB 01H +__C9C1B51E_smmintrin@h DB 01H +__ACA33CD2_nmmintrin@h DB 01H +__7918C69C_wmmintrin@h DB 01H +__B28C8B9B_zmmintrin@h DB 01H +__85982951_immintrin@h DB 01H __44420885_corecrt_stdio_config@h DB 01H __AB601D8D_corecrt_wstdio@h DB 01H __C1EC35D3_stdio@h DB 01H __FD6DBD68_corecrt_search@h DB 01H __E2E33A61_corecrt_wstdlib@h DB 01H -__46240030_limits@h DB 01H +__26263363_limits@h DB 01H __6E5ACABA_stdlib@h DB 01H __5274102E_stb_image@h DB 01H __CE2BBC10_StgSharpC@h DB 01H @@ -143,7 +143,7 @@ EXTRN __CheckForDebuggerJustMyCode:PROC ; COMDAT pdata pdata SEGMENT $pdata$normalize DD imagerel $LN3 - DD imagerel $LN3+378 + DD imagerel $LN3+379 DD imagerel $unwind$normalize pdata ENDS ; COMDAT rtc$TMZ @@ -195,159 +195,160 @@ $LN3: 00018 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__ABB5A48E_vector@c 0001f e8 00 00 00 00 call __CheckForDebuggerJustMyCode + 00024 90 npad 1 ; 6 : // ¼ÆËãsourceµij¤¶ȵÄƽ·½ ; 7 : __m128 a_length_sq = _mm_mul_ps(*source, *source); // ÏòÁ¿µã³Ë×ÔÉí - 00024 48 8b 85 00 02 + 00025 48 8b 85 00 02 00 00 mov rax, QWORD PTR source$[rbp] - 0002b 48 8b 8d 00 02 + 0002c 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR source$[rbp] - 00032 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 00035 0f 59 01 mulps xmm0, XMMWORD PTR [rcx] - 00038 0f 29 45 10 movaps XMMWORD PTR a_length_sq$[rbp], xmm0 + 00033 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 00036 0f 59 01 mulps xmm0, XMMWORD PTR [rcx] + 00039 0f 29 45 10 movaps XMMWORD PTR a_length_sq$[rbp], xmm0 ; 8 : a_length_sq = _mm_add_ps(a_length_sq, _mm_shuffle_ps(a_length_sq, a_length_sq, _MM_SHUFFLE(2, 3, 0, 1))); - 0003c 0f 28 45 10 movaps xmm0, XMMWORD PTR a_length_sq$[rbp] - 00040 0f c6 45 10 b1 shufps xmm0, XMMWORD PTR a_length_sq$[rbp], 177 ; 000000b1H - 00045 0f 28 4d 10 movaps xmm1, XMMWORD PTR a_length_sq$[rbp] - 00049 0f 58 c8 addps xmm1, xmm0 - 0004c 0f 28 c1 movaps xmm0, xmm1 - 0004f 0f 29 45 10 movaps XMMWORD PTR a_length_sq$[rbp], xmm0 + 0003d 0f 28 45 10 movaps xmm0, XMMWORD PTR a_length_sq$[rbp] + 00041 0f c6 45 10 b1 shufps xmm0, XMMWORD PTR a_length_sq$[rbp], 177 ; 000000b1H + 00046 0f 28 4d 10 movaps xmm1, XMMWORD PTR a_length_sq$[rbp] + 0004a 0f 58 c8 addps xmm1, xmm0 + 0004d 0f 28 c1 movaps xmm0, xmm1 + 00050 0f 29 45 10 movaps XMMWORD PTR a_length_sq$[rbp], xmm0 ; 9 : a_length_sq = _mm_add_ss(a_length_sq, _mm_shuffle_ps(a_length_sq, a_length_sq, _MM_SHUFFLE(0, 0, 3, 2))); - 00053 0f 28 45 10 movaps xmm0, XMMWORD PTR a_length_sq$[rbp] - 00057 0f c6 45 10 0e shufps xmm0, XMMWORD PTR a_length_sq$[rbp], 14 - 0005c 0f 28 4d 10 movaps xmm1, XMMWORD PTR a_length_sq$[rbp] - 00060 f3 0f 58 c8 addss xmm1, xmm0 - 00064 0f 29 4d 10 movaps XMMWORD PTR a_length_sq$[rbp], xmm1 + 00054 0f 28 45 10 movaps xmm0, XMMWORD PTR a_length_sq$[rbp] + 00058 0f c6 45 10 0e shufps xmm0, XMMWORD PTR a_length_sq$[rbp], 14 + 0005d 0f 28 4d 10 movaps xmm1, XMMWORD PTR a_length_sq$[rbp] + 00061 f3 0f 58 c8 addss xmm1, xmm0 + 00065 0f 29 4d 10 movaps XMMWORD PTR a_length_sq$[rbp], xmm1 ; 10 : ; 11 : // ¹éһ»¯ÏòÁ¿source ; 12 : __m128 a_inv_length = _mm_rsqrt_ps(a_length_sq); // ¼ÆËãsource³¤¶ȵĵ¹Êýƽ·½¸ù - 00068 0f 52 45 10 rsqrtps xmm0, XMMWORD PTR a_length_sq$[rbp] - 0006c 0f 29 45 40 movaps XMMWORD PTR a_inv_length$[rbp], xmm0 + 00069 0f 52 45 10 rsqrtps xmm0, XMMWORD PTR a_length_sq$[rbp] + 0006d 0f 29 45 40 movaps XMMWORD PTR a_inv_length$[rbp], xmm0 ; 13 : *source = _mm_mul_ps(*source, a_inv_length); // ÓÃsource³ËÒÔÆ䳤¶ȵĵ¹Êýƽ·½¸ùµõ½µ¥λÏòÁ¿ - 00070 48 8b 85 00 02 + 00071 48 8b 85 00 02 00 00 mov rax, QWORD PTR source$[rbp] - 00077 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 0007a 0f 59 45 40 mulps xmm0, XMMWORD PTR a_inv_length$[rbp] - 0007e 48 8b 85 00 02 + 00078 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0007b 0f 59 45 40 mulps xmm0, XMMWORD PTR a_inv_length$[rbp] + 0007f 48 8b 85 00 02 00 00 mov rax, QWORD PTR source$[rbp] - 00085 0f 11 00 movups XMMWORD PTR [rax], xmm0 + 00086 0f 11 00 movups XMMWORD PTR [rax], xmm0 ; 14 : ; 15 : // ¼ÆËãtargetÓësourceµĵã»ý ; 16 : __m128 dot_product = _mm_mul_ps(*target, *source); - 00088 48 8b 85 08 02 + 00089 48 8b 85 08 02 00 00 mov rax, QWORD PTR target$[rbp] - 0008f 48 8b 8d 00 02 + 00090 48 8b 8d 00 02 00 00 mov rcx, QWORD PTR source$[rbp] - 00096 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 00099 0f 59 01 mulps xmm0, XMMWORD PTR [rcx] - 0009c 0f 29 45 70 movaps XMMWORD PTR dot_product$[rbp], xmm0 + 00097 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 0009a 0f 59 01 mulps xmm0, XMMWORD PTR [rcx] + 0009d 0f 29 45 70 movaps XMMWORD PTR dot_product$[rbp], xmm0 ; 17 : dot_product = _mm_add_ps(dot_product, _mm_shuffle_ps(dot_product, dot_product, _MM_SHUFFLE(2, 3, 0, 1))); - 000a0 0f 28 45 70 movaps xmm0, XMMWORD PTR dot_product$[rbp] - 000a4 0f c6 45 70 b1 shufps xmm0, XMMWORD PTR dot_product$[rbp], 177 ; 000000b1H - 000a9 0f 28 4d 70 movaps xmm1, XMMWORD PTR dot_product$[rbp] - 000ad 0f 58 c8 addps xmm1, xmm0 - 000b0 0f 28 c1 movaps xmm0, xmm1 - 000b3 0f 29 45 70 movaps XMMWORD PTR dot_product$[rbp], xmm0 + 000a1 0f 28 45 70 movaps xmm0, XMMWORD PTR dot_product$[rbp] + 000a5 0f c6 45 70 b1 shufps xmm0, XMMWORD PTR dot_product$[rbp], 177 ; 000000b1H + 000aa 0f 28 4d 70 movaps xmm1, XMMWORD PTR dot_product$[rbp] + 000ae 0f 58 c8 addps xmm1, xmm0 + 000b1 0f 28 c1 movaps xmm0, xmm1 + 000b4 0f 29 45 70 movaps XMMWORD PTR dot_product$[rbp], xmm0 ; 18 : dot_product = _mm_add_ss(dot_product, _mm_shuffle_ps(dot_product, dot_product, _MM_SHUFFLE(0, 0, 3, 2))); - 000b7 0f 28 45 70 movaps xmm0, XMMWORD PTR dot_product$[rbp] - 000bb 0f c6 45 70 0e shufps xmm0, XMMWORD PTR dot_product$[rbp], 14 - 000c0 0f 28 4d 70 movaps xmm1, XMMWORD PTR dot_product$[rbp] - 000c4 f3 0f 58 c8 addss xmm1, xmm0 - 000c8 0f 29 4d 70 movaps XMMWORD PTR dot_product$[rbp], xmm1 + 000b8 0f 28 45 70 movaps xmm0, XMMWORD PTR dot_product$[rbp] + 000bc 0f c6 45 70 0e shufps xmm0, XMMWORD PTR dot_product$[rbp], 14 + 000c1 0f 28 4d 70 movaps xmm1, XMMWORD PTR dot_product$[rbp] + 000c5 f3 0f 58 c8 addss xmm1, xmm0 + 000c9 0f 29 4d 70 movaps XMMWORD PTR dot_product$[rbp], xmm1 ; 19 : ; 20 : // ´ÓtargetÖмõȥsourceµķ½Ïò·ÖÁ¿£¬ʹÆ䴹ֱÓÚsource ; 21 : __m128 b_orthogonal = _mm_sub_ps(*target, _mm_mul_ps(*source, dot_product)); - 000cc 48 8b 85 00 02 + 000cd 48 8b 85 00 02 00 00 mov rax, QWORD PTR source$[rbp] - 000d3 0f 10 00 movups xmm0, XMMWORD PTR [rax] - 000d6 0f 59 45 70 mulps xmm0, XMMWORD PTR dot_product$[rbp] - 000da 48 8b 85 08 02 + 000d4 0f 10 00 movups xmm0, XMMWORD PTR [rax] + 000d7 0f 59 45 70 mulps xmm0, XMMWORD PTR dot_product$[rbp] + 000db 48 8b 85 08 02 00 00 mov rax, QWORD PTR target$[rbp] - 000e1 0f 10 08 movups xmm1, XMMWORD PTR [rax] - 000e4 0f 5c c8 subps xmm1, xmm0 - 000e7 0f 28 c1 movaps xmm0, xmm1 - 000ea 0f 29 85 a0 00 + 000e2 0f 10 08 movups xmm1, XMMWORD PTR [rax] + 000e5 0f 5c c8 subps xmm1, xmm0 + 000e8 0f 28 c1 movaps xmm0, xmm1 + 000eb 0f 29 85 a0 00 00 00 movaps XMMWORD PTR b_orthogonal$[rbp], xmm0 ; 22 : ; 23 : // ¹éһ»¯ÏòÁ¿b_orthogonal ; 24 : __m128 b_length_sq = _mm_mul_ps(b_orthogonal, b_orthogonal); - 000f1 0f 28 85 a0 00 + 000f2 0f 28 85 a0 00 00 00 movaps xmm0, XMMWORD PTR b_orthogonal$[rbp] - 000f8 0f 59 85 a0 00 + 000f9 0f 59 85 a0 00 00 00 mulps xmm0, XMMWORD PTR b_orthogonal$[rbp] - 000ff 0f 29 85 d0 00 + 00100 0f 29 85 d0 00 00 00 movaps XMMWORD PTR b_length_sq$[rbp], xmm0 ; 25 : b_length_sq = _mm_add_ps(b_length_sq, _mm_shuffle_ps(b_length_sq, b_length_sq, _MM_SHUFFLE(2, 3, 0, 1))); - 00106 0f 28 85 d0 00 + 00107 0f 28 85 d0 00 00 00 movaps xmm0, XMMWORD PTR b_length_sq$[rbp] - 0010d 0f c6 85 d0 00 + 0010e 0f c6 85 d0 00 00 00 b1 shufps xmm0, XMMWORD PTR b_length_sq$[rbp], 177 ; 000000b1H - 00115 0f 28 8d d0 00 + 00116 0f 28 8d d0 00 00 00 movaps xmm1, XMMWORD PTR b_length_sq$[rbp] - 0011c 0f 58 c8 addps xmm1, xmm0 - 0011f 0f 28 c1 movaps xmm0, xmm1 - 00122 0f 29 85 d0 00 + 0011d 0f 58 c8 addps xmm1, xmm0 + 00120 0f 28 c1 movaps xmm0, xmm1 + 00123 0f 29 85 d0 00 00 00 movaps XMMWORD PTR b_length_sq$[rbp], xmm0 ; 26 : b_length_sq = _mm_add_ss(b_length_sq, _mm_shuffle_ps(b_length_sq, b_length_sq, _MM_SHUFFLE(0, 0, 3, 2))); - 00129 0f 28 85 d0 00 + 0012a 0f 28 85 d0 00 00 00 movaps xmm0, XMMWORD PTR b_length_sq$[rbp] - 00130 0f c6 85 d0 00 + 00131 0f c6 85 d0 00 00 00 0e shufps xmm0, XMMWORD PTR b_length_sq$[rbp], 14 - 00138 0f 28 8d d0 00 + 00139 0f 28 8d d0 00 00 00 movaps xmm1, XMMWORD PTR b_length_sq$[rbp] - 0013f f3 0f 58 c8 addss xmm1, xmm0 - 00143 0f 29 8d d0 00 + 00140 f3 0f 58 c8 addss xmm1, xmm0 + 00144 0f 29 8d d0 00 00 00 movaps XMMWORD PTR b_length_sq$[rbp], xmm1 ; 27 : ; 28 : __m128 b_inv_length = _mm_rsqrt_ps(b_length_sq); - 0014a 0f 52 85 d0 00 + 0014b 0f 52 85 d0 00 00 00 rsqrtps xmm0, XMMWORD PTR b_length_sq$[rbp] - 00151 0f 29 85 00 01 + 00152 0f 29 85 00 01 00 00 movaps XMMWORD PTR b_inv_length$[rbp], xmm0 ; 29 : *target = _mm_mul_ps(b_orthogonal, b_inv_length); - 00158 0f 28 85 a0 00 + 00159 0f 28 85 a0 00 00 00 movaps xmm0, XMMWORD PTR b_orthogonal$[rbp] - 0015f 0f 59 85 00 01 + 00160 0f 59 85 00 01 00 00 mulps xmm0, XMMWORD PTR b_inv_length$[rbp] - 00166 48 8b 85 08 02 + 00167 48 8b 85 08 02 00 00 mov rax, QWORD PTR target$[rbp] - 0016d 0f 11 00 movups XMMWORD PTR [rax], xmm0 + 0016e 0f 11 00 movups XMMWORD PTR [rax], xmm0 ; 30 : ; 31 : } - 00170 48 8d a5 e8 01 + 00171 48 8d a5 e8 01 00 00 lea rsp, QWORD PTR [rbp+488] - 00177 5f pop rdi - 00178 5d pop rbp - 00179 c3 ret 0 + 00178 5f pop rdi + 00179 5d pop rbp + 0017a c3 ret 0 normalize ENDP _TEXT ENDS END diff --git a/源代码/StgSharpC/x64/Debug/vector.nativecodeanalysis.xml b/源代码/StgSharpC/x64/Debug/vector.nativecodeanalysis.xml deleted file mode 100644 index dcdf0885..00000000 --- a/源代码/StgSharpC/x64/Debug/vector.nativecodeanalysis.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/源代码/StgSharpC/x64/Debug/vector.obj b/源代码/StgSharpC/x64/Debug/vector.obj index c12a8c78..1829ee08 100644 Binary files a/源代码/StgSharpC/x64/Debug/vector.obj and b/源代码/StgSharpC/x64/Debug/vector.obj differ diff --git a/源代码/StgSharpC/x64/Debug/vector.sbr b/源代码/StgSharpC/x64/Debug/vector.sbr index 4e24d705..d539510e 100644 Binary files a/源代码/StgSharpC/x64/Debug/vector.sbr and b/源代码/StgSharpC/x64/Debug/vector.sbr differ diff --git a/源代码/StgSharpC/x64/Release/StgSharpC.cod b/源代码/StgSharpC/x64/Release/StgSharpC.cod index 8dff95e2..b5215be2 100644 --- a/源代码/StgSharpC/x64/Release/StgSharpC.cod +++ b/源代码/StgSharpC/x64/Release/StgSharpC.cod @@ -5,7 +5,6 @@ include listing.inc INCLUDELIB OLDNAMES PUBLIC infolog -PUBLIC ??_C@_05JMLLFKBP@?$CFllu?6@ ; `string' PUBLIC ??_C@_0BL@MOJGOJJP@Failed?5to?5load?5OpenGL?5api?3@ ; `string' PUBLIC ??_C@_03OFAPEBGM@?$CFs?6@ ; `string' EXTRN glfwGetProcAddress:PROC @@ -23,16 +22,13 @@ CONST ENDS CONST SEGMENT ??_C@_0BL@MOJGOJJP@Failed?5to?5load?5OpenGL?5api?3@ DB 'Failed to load Op' DB 'enGL api:', 00H ; `string' -CONST ENDS -; COMDAT ??_C@_05JMLLFKBP@?$CFllu?6@ -CONST SEGMENT -??_C@_05JMLLFKBP@?$CFllu?6@ DB '%llu', 0aH, 00H ; `string' PUBLIC readLog PUBLIC unloadImageData PUBLIC loadImageData PUBLIC linkShaderProgram PUBLIC loadGlfuncDefault PUBLIC initGL +PUBLIC glCheckShaderStat PUBLIC printf PUBLIC _vfprintf_l PUBLIC __local_stdio_printf_options @@ -51,17 +47,23 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$loadGlfuncDefault DD imagerel $LN19 - DD imagerel $LN19+31 + DD imagerel $LN19+16 DD imagerel $unwind$loadGlfuncDefault pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$initGL DD imagerel $LN4 - DD imagerel $LN4+52 + DD imagerel $LN4+67 DD imagerel $unwind$initGL pdata ENDS ; COMDAT pdata pdata SEGMENT +$pdata$glCheckShaderStat DD imagerel $LN6 + DD imagerel $LN6+122 + DD imagerel $unwind$glCheckShaderStat +pdata ENDS +; COMDAT pdata +pdata SEGMENT $pdata$printf DD imagerel $LN6 DD imagerel $LN6+85 DD imagerel $unwind$printf @@ -87,6 +89,15 @@ $unwind$printf DD 041b01H xdata ENDS ; COMDAT xdata xdata SEGMENT +$unwind$glCheckShaderStat DD 051819H + DD 070056209H + DD 050036004H + DD 03002H + DD imagerel __GSHandlerCheck + DD 028H +xdata ENDS +; COMDAT xdata +xdata SEGMENT $unwind$initGL DD 020601H DD 030023206H xdata ENDS @@ -108,24 +119,18 @@ xdata SEGMENT $unwind$loadImageData DD 020601H DD 030025206H ; Function compile flags: /Ogtpy -; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_stdio_config.h ; COMDAT __local_stdio_printf_options _TEXT SEGMENT __local_stdio_printf_options PROC ; COMDAT - -; 91 : static unsigned __int64 _OptionsStorage; -; 92 : return &_OptionsStorage; - +; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_stdio_config.h +; Line 92 00000 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:?_OptionsStorage@?1??__local_stdio_printf_options@@9@9 ; `__local_stdio_printf_options'::`2'::_OptionsStorage - -; 93 : } - +; Line 93 00007 c3 ret 0 __local_stdio_printf_options ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\stdio.h ; COMDAT _vfprintf_l _TEXT SEGMENT _Stream$ = 64 @@ -133,9 +138,8 @@ _Format$ = 72 _Locale$dead$ = 80 _ArgList$ = 88 _vfprintf_l PROC ; COMDAT - -; 644 : { - +; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\stdio.h +; Line 644 $LN4: 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 74 24 10 mov QWORD PTR [rsp+16], rsi @@ -144,9 +148,7 @@ $LN4: 0000f 49 8b d9 mov rbx, r9 00012 48 8b fa mov rdi, rdx 00015 48 8b f1 mov rsi, rcx - -; 645 : return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Stream, _Format, _Locale, _ArgList); - +; Line 645 00018 e8 00 00 00 00 call __local_stdio_printf_options 0001d 45 33 c9 xor r9d, r9d 00020 48 89 5c 24 20 mov QWORD PTR [rsp+32], rbx @@ -155,9 +157,7 @@ $LN4: 0002b 48 8b 08 mov rcx, QWORD PTR [rax] 0002e ff 15 00 00 00 00 call QWORD PTR __imp___stdio_common_vfprintf - -; 646 : } - +; Line 646 00034 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] 00039 48 8b 74 24 48 mov rsi, QWORD PTR [rsp+72] 0003e 48 83 c4 30 add rsp, 48 ; 00000030H @@ -166,14 +166,12 @@ $LN4: _vfprintf_l ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\stdio.h ; COMDAT printf _TEXT SEGMENT _Format$ = 80 printf PROC ; COMDAT - -; 956 : { - +; File C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\stdio.h +; Line 956 $LN6: 00000 48 89 4c 24 08 mov QWORD PTR [rsp+8], rcx 00005 48 89 54 24 10 mov QWORD PTR [rsp+16], rdx @@ -184,22 +182,14 @@ $LN6: 00016 57 push rdi 00017 48 83 ec 30 sub rsp, 48 ; 00000030H 0001b 48 8b f9 mov rdi, rcx - -; 957 : int _Result; -; 958 : va_list _ArgList; -; 959 : __crt_va_start(_ArgList, _Format); - +; Line 959 0001e 48 8d 74 24 58 lea rsi, QWORD PTR _Format$[rsp+8] - -; 960 : _Result = _vfprintf_l(stdout, _Format, NULL, _ArgList); - +; Line 960 00023 b9 01 00 00 00 mov ecx, 1 00028 ff 15 00 00 00 00 call QWORD PTR __imp___acrt_iob_func 0002e 48 8b d8 mov rbx, rax - -; 645 : return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Stream, _Format, _Locale, _ArgList); - +; Line 645 00031 e8 00 00 00 00 call __local_stdio_printf_options 00036 45 33 c9 xor r9d, r9d 00039 48 89 74 24 20 mov QWORD PTR [rsp+32], rsi @@ -208,11 +198,7 @@ $LN6: 00044 48 8b 08 mov rcx, QWORD PTR [rax] 00047 ff 15 00 00 00 00 call QWORD PTR __imp___stdio_common_vfprintf - -; 961 : __crt_va_end(_ArgList); -; 962 : return _Result; -; 963 : } - +; Line 963 0004d 48 83 c4 30 add rsp, 48 ; 00000030H 00051 5f pop rdi 00052 5e pop rsi @@ -221,91 +207,122 @@ $LN6: printf ENDP _TEXT ENDS ; Function compile flags: /Ogtpy +; COMDAT glCheckShaderStat +_TEXT SEGMENT +stat$ = 32 +__$ArrayPad$ = 40 +context$ = 96 +shaderHandle$ = 104 +key$ = 112 +logRef$ = 120 +glCheckShaderStat PROC ; COMDAT ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\StgSharpC.c +; Line 11 +$LN6: + 00000 40 53 push rbx + 00002 55 push rbp + 00003 56 push rsi + 00004 57 push rdi + 00005 48 83 ec 38 sub rsp, 56 ; 00000038H + 00009 48 8b 05 00 00 + 00 00 mov rax, QWORD PTR __security_cookie + 00010 48 33 c4 xor rax, rsp + 00013 48 89 44 24 28 mov QWORD PTR __$ArrayPad$[rsp], rax + 00018 41 8b c0 mov eax, r8d +; Line 12 + 0001b c7 44 24 20 00 + 00 00 00 mov DWORD PTR stat$[rsp], 0 + 00023 48 8b fa mov rdi, rdx +; Line 13 + 00026 4c 8d 44 24 20 lea r8, QWORD PTR stat$[rsp] + 0002b 48 8b d9 mov rbx, rcx + 0002e 8b d0 mov edx, eax + 00030 8b cf mov ecx, edi + 00032 49 8b f1 mov rsi, r9 + 00035 ff 93 40 1b 00 + 00 call QWORD PTR [rbx+6976] +; Line 14 + 0003b 8b 44 24 20 mov eax, DWORD PTR stat$[rsp] + 0003f 48 8d 2d 00 00 + 00 00 lea rbp, OFFSET FLAT:infolog + 00046 85 c0 test eax, eax + 00048 75 17 jne SHORT $LN2@glCheckSha +; Line 16 + 0004a 4c 8b cd mov r9, rbp + 0004d 45 33 c0 xor r8d, r8d + 00050 ba 00 02 00 00 mov edx, 512 ; 00000200H + 00055 8b cf mov ecx, edi + 00057 ff 93 20 1b 00 + 00 call QWORD PTR [rbx+6944] + 0005d 8b 44 24 20 mov eax, DWORD PTR stat$[rsp] +$LN2@glCheckSha: +; Line 18 + 00061 48 89 2e mov QWORD PTR [rsi], rbp +; Line 20 + 00064 48 8b 4c 24 28 mov rcx, QWORD PTR __$ArrayPad$[rsp] + 00069 48 33 cc xor rcx, rsp + 0006c e8 00 00 00 00 call __security_check_cookie + 00071 48 83 c4 38 add rsp, 56 ; 00000038H + 00075 5f pop rdi + 00076 5e pop rsi + 00077 5d pop rbp + 00078 5b pop rbx + 00079 c3 ret 0 +glCheckShaderStat ENDP +_TEXT ENDS +; Function compile flags: /Ogtpy ; COMDAT initGL _TEXT SEGMENT majorVersion$ = 48 minorVersion$ = 56 initGL PROC ; COMDAT - -; 11 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\StgSharpC.c +; Line 23 $LN4: 00000 40 53 push rbx 00002 48 83 ec 20 sub rsp, 32 ; 00000020H 00006 8b da mov ebx, edx - -; 12 : glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion); - +; Line 24 00008 8b d1 mov edx, ecx 0000a b9 02 20 02 00 mov ecx, 139266 ; 00022002H 0000f e8 00 00 00 00 call glfwWindowHint - -; 13 : glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minorVersion); - +; Line 25 00014 8b d3 mov edx, ebx 00016 b9 03 20 02 00 mov ecx, 139267 ; 00022003H 0001b e8 00 00 00 00 call glfwWindowHint - -; 14 : glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - +; Line 26 00020 ba 01 20 03 00 mov edx, 204801 ; 00032001H 00025 b9 08 20 02 00 mov ecx, 139272 ; 00022008H - -; 15 : } - - 0002a 48 83 c4 20 add rsp, 32 ; 00000020H - 0002e 5b pop rbx - -; 14 : glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - - 0002f e9 00 00 00 00 jmp glfwWindowHint + 0002a e8 00 00 00 00 call glfwWindowHint +; Line 27 + 0002f ba 01 00 00 00 mov edx, 1 + 00034 b9 03 00 02 00 mov ecx, 131075 ; 00020003H +; Line 28 + 00039 48 83 c4 20 add rsp, 32 ; 00000020H + 0003d 5b pop rbx +; Line 27 + 0003e e9 00 00 00 00 jmp glfwWindowHint initGL ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\StgSharpC.c ; COMDAT loadGlfuncDefault _TEXT SEGMENT procName$ = 48 loadGlfuncDefault PROC ; COMDAT - -; 18 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\StgSharpC.c +; Line 31 $LN19: 00000 48 83 ec 28 sub rsp, 40 ; 00000028H - -; 19 : void* ret = glfwGetProcAddress(procName); - +; Line 32 00004 e8 00 00 00 00 call glfwGetProcAddress - -; 20 : printf("%llu\n", (uint64_t)ret); - - 00009 48 8b d0 mov rdx, rax - 0000c 48 8d 0d 00 00 - 00 00 lea rcx, OFFSET FLAT:??_C@_05JMLLFKBP@?$CFllu?6@ - 00013 e8 00 00 00 00 call printf - -; 21 : if (ret = NULL) -; 22 : { -; 23 : *infolog = "Failed to load OpenGL api:"; -; 24 : for (size_t i = 0; i < sizeof(procName); i++) -; 25 : { -; 26 : infolog[30 + i] = procName[i]; -; 27 : } -; 28 : printf("%s\n", infolog); -; 29 : } -; 30 : return (GLFWglproc)ret; - - 00018 33 c0 xor eax, eax - -; 31 : } - - 0001a 48 83 c4 28 add rsp, 40 ; 00000028H - 0001e c3 ret 0 +; Line 43 + 00009 33 c0 xor eax, eax +; Line 44 + 0000b 48 83 c4 28 add rsp, 40 ; 00000028H + 0000f c3 ret 0 loadGlfuncDefault ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\StgSharpC.c ; COMDAT linkShaderProgram _TEXT SEGMENT success$ = 32 @@ -313,9 +330,8 @@ __$ArrayPad$ = 40 context$ = 64 shaderProgram$ = 72 linkShaderProgram PROC ; COMDAT - -; 34 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\StgSharpC.c +; Line 47 $LN7: 00000 48 89 5c 24 18 mov QWORD PTR [rsp+24], rbx 00005 57 push rdi @@ -326,31 +342,20 @@ $LN7: 00014 48 89 44 24 28 mov QWORD PTR __$ArrayPad$[rsp], rax 00019 48 8b f9 mov rdi, rcx 0001c 8b da mov ebx, edx - -; 35 : context->LinkProgram(shaderProgram); - +; Line 48 0001e 8b ca mov ecx, edx 00020 ff 97 80 22 00 00 call QWORD PTR [rdi+8832] - -; 36 : -; 37 : int success; -; 38 : context->GetProgramiv(shaderProgram, GL_LINK_STATUS, &success); - +; Line 51 00026 4c 8d 44 24 20 lea r8, QWORD PTR success$[rsp] 0002b ba 82 8b 00 00 mov edx, 35714 ; 00008b82H 00030 8b cb mov ecx, ebx 00032 ff 97 48 1a 00 00 call QWORD PTR [rdi+6728] - -; 39 : if (!success) - +; Line 52 00038 83 7c 24 20 00 cmp DWORD PTR success$[rsp], 0 0003d 75 1b jne SHORT $LN2@linkShader - -; 40 : { -; 41 : context->GetProgramInfoLog(shaderProgram, 512, NULL, infolog); - +; Line 54 0003f 4c 8d 0d 00 00 00 00 lea r9, OFFSET FLAT:infolog 00046 45 33 c0 xor r8d, r8d @@ -358,24 +363,14 @@ $LN7: 0004e 8b cb mov ecx, ebx 00050 ff 97 98 19 00 00 call QWORD PTR [rdi+6552] - -; 42 : return 0; - +; Line 55 00056 33 c0 xor eax, eax 00058 eb 02 jmp SHORT $LN3@linkShader $LN2@linkShader: - -; 43 : } -; 44 : else -; 45 : { -; 46 : return shaderProgram; - +; Line 59 0005a 8b c3 mov eax, ebx $LN3@linkShader: - -; 47 : } -; 48 : } - +; Line 61 0005c 48 8b 4c 24 28 mov rcx, QWORD PTR __$ArrayPad$[rsp] 00061 48 33 cc xor rcx, rsp 00064 e8 00 00 00 00 call __security_check_cookie @@ -386,27 +381,19 @@ $LN3@linkShader: linkShaderProgram ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\StgSharpC.c ; COMDAT loadImageData _TEXT SEGMENT location$ = 64 out$ = 72 loader$ = 80 loadImageData PROC ; COMDAT - -; 51 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\StgSharpC.c +; Line 64 $LN5: 00000 40 53 push rbx 00002 48 83 ec 30 sub rsp, 48 ; 00000030H 00006 4d 8b d0 mov r10, r8 - -; 52 : if (loader == NULL) -; 53 : { -; 54 : loader = stbi_load; -; 55 : } -; 56 : out->pixelPtr = loader(location, &(out->width), &(out->height), &(out->channel), 0); - +; Line 69 00009 c7 44 24 20 00 00 00 00 mov DWORD PTR [rsp+32], 0 00011 4d 85 d2 test r10, r10 @@ -418,46 +405,36 @@ $LN5: 00026 4c 8d 42 04 lea r8, QWORD PTR [rdx+4] 0002a ff d0 call rax 0002c 48 89 43 10 mov QWORD PTR [rbx+16], rax - -; 57 : } - +; Line 70 00030 48 83 c4 30 add rsp, 48 ; 00000030H 00034 5b pop rbx 00035 c3 ret 0 loadImageData ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\StgSharpC.c ; COMDAT unloadImageData _TEXT SEGMENT out$ = 8 unloadImageData PROC ; COMDAT - -; 61 : free(out->pixelPtr); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\StgSharpC.c +; Line 74 00000 48 8b 49 10 mov rcx, QWORD PTR [rcx+16] 00004 48 ff 25 00 00 00 00 rex_jmp QWORD PTR __imp_free unloadImageData ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\StgSharpC.c ; COMDAT readLog _TEXT SEGMENT readLog PROC ; COMDAT - -; 66 : infolog[511] = '\0'; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\StgSharpC.c +; Line 79 00000 c6 05 ff 01 00 00 00 mov BYTE PTR infolog+511, 0 - -; 67 : return &infolog; - +; Line 80 00007 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:infolog - -; 68 : } - +; Line 81 0000e c3 ret 0 readLog ENDP _TEXT ENDS diff --git a/源代码/StgSharpC/x64/Release/StgSharpC.iobj b/源代码/StgSharpC/x64/Release/StgSharpC.iobj index 976294e3..bf5eda33 100644 Binary files a/源代码/StgSharpC/x64/Release/StgSharpC.iobj and b/源代码/StgSharpC/x64/Release/StgSharpC.iobj differ diff --git a/源代码/StgSharpC/x64/Release/StgSharpC.log b/源代码/StgSharpC/x64/Release/StgSharpC.log index 95c9c521..9f799e82 100644 --- a/源代码/StgSharpC/x64/Release/StgSharpC.log +++ b/源代码/StgSharpC/x64/Release/StgSharpC.log @@ -1,6 +1,29 @@  dllmain.c mat2.c mat3.c +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat2.c(6,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat2.c(6,57): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat2.c(7,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat2.c(7,57): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat2.c(16,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat2.c(16,57): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat2.c(17,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat2.c(17,57): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(7,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(7,57): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(8,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(16,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(16,57): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(17,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(17,57): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(18,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(19,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(28,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(28,57): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(29,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(29,57): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(30,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat3.c(31,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 mat4.c D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat4.c(8,32): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\mat4.c(8,57): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 @@ -40,12 +63,4408 @@ C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\wingdi.h(36,1): w D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\glfw3.h(133,1): 参见“WINGDIAPI”的前一个定义 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(23,18): warning C4047: “=”:“char”与“char [27]”的间接级别不同 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(67,5): warning C4047: “return”:“char *”与“char (*)[512]”的间接级别不同 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(10,70): warning C4028: 形参 2 与声明不同 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(10,89): warning C4028: 形参 3 与声明不同 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(11,1): warning C4029: 声明的形参表不同于定义 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(13,26): warning C4244: “函数”: 从“uint64_t”转换到“GLuint”,可能丢失数据 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(16,35): warning C4244: “函数”: 从“uint64_t”转换到“GLuint”,可能丢失数据 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(36,18): warning C4047: “=”:“char”与“char [27]”的间接级别不同 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC\StgSharpC.c(80,5): warning C4047: “return”:“char *”与“char (*)[512]”的间接级别不同 vector.c + 正在启动传递 1 + 已处理 /DEFAULTLIB: glfw3.lib + 已处理 /DEFAULTLIB: MSVCRT + 已处理 /DEFAULTLIB: OLDNAMES + 正在搜索库 + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\opengl32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\kernel32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\user32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\gdi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\shell32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\ole32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\oleaut32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\uuid.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbc32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbccp32.lib: + 正在搜索 glfw3.lib: + 已找到 glfwWindowHint + 已在 StgSharpC.obj 中引用 + 已加载 glfw3.lib(window.obj) + 已处理 /DEFAULTLIB: uuid.lib + 已找到 glfwGetProcAddress + 已在 StgSharpC.obj 中引用 + 已加载 glfw3.lib(context.obj) + 已找到 _glfwPlatformGetTls + 已在 glfw3.lib(window.obj) 中引用 + 已在 glfw3.lib(context.obj) 中引用 + 已加载 glfw3.lib(win32_thread.obj) + 已找到 _glfwInputKey + 已在 glfw3.lib(window.obj) 中引用 + 已加载 glfw3.lib(input.obj) + 已找到 _glfwInputError + 已在 glfw3.lib(window.obj) 中引用 + 已在 glfw3.lib(context.obj) 中引用 + 已在 glfw3.lib(win32_thread.obj) 中引用 + 已在 glfw3.lib(input.obj) 中引用 + 已加载 glfw3.lib(init.obj) + 已找到 _glfwPlatformGetTimerValue + 已在 glfw3.lib(input.obj) 中引用 + 已在 glfw3.lib(init.obj) 中引用 + 已加载 glfw3.lib(win32_time.obj) + 已找到 _glfwSelectPlatform + 已在 glfw3.lib(init.obj) 中引用 + 已加载 glfw3.lib(platform.obj) + 已找到 _glfwFreeMonitor + 已在 glfw3.lib(init.obj) 中引用 + 已加载 glfw3.lib(monitor.obj) + 已找到 _glfwTerminateVulkan + 已在 glfw3.lib(init.obj) 中引用 + 已加载 glfw3.lib(vulkan.obj) + 已找到 _glfwConnectWin32 + 已在 glfw3.lib(platform.obj) 中引用 + 已加载 glfw3.lib(win32_init.obj) + 已找到 _glfwConnectNull + 已在 glfw3.lib(platform.obj) 中引用 + 已加载 glfw3.lib(null_init.obj) + 已找到 _glfwPlatformLoadModule + 已在 glfw3.lib(vulkan.obj) 中引用 + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 glfw3.lib(win32_module.obj) + 已找到 _glfwPollMonitorsWin32 + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 glfw3.lib(win32_monitor.obj) + 已找到 _glfwCreateWindowWin32 + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 glfw3.lib(win32_window.obj) + 已找到 _glfwInitJoysticksWin32 + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 glfw3.lib(win32_joystick.obj) + 已找到 _glfwTerminateWGL + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 glfw3.lib(wgl_context.obj) + 已找到 _glfwTerminateEGL + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(null_init.obj) 中引用 + 已加载 glfw3.lib(egl_context.obj) + 已找到 _glfwTerminateOSMesa + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(null_init.obj) 中引用 + 已加载 glfw3.lib(osmesa_context.obj) + 已找到 _glfwPollMonitorsNull + 已在 glfw3.lib(null_init.obj) 中引用 + 已加载 glfw3.lib(null_monitor.obj) + 已找到 _glfwCreateWindowNull + 已在 glfw3.lib(null_init.obj) 中引用 + 已加载 glfw3.lib(null_window.obj) + 已找到 _glfwInitJoysticksNull + 已在 glfw3.lib(null_init.obj) 中引用 + 已加载 glfw3.lib(null_joystick.obj) + 正在搜索 glfw3dll.lib: + 正在搜索 glfw3_mt.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\MSVCRT.lib: + 已找到 __security_check_cookie + 已在 glfw3.lib(wgl_context.obj) 中引用 + 已在 glfw3.lib(egl_context.obj) 中引用 + 已在 glfw3.lib(osmesa_context.obj) 中引用 + 已在 glfw3.lib(null_window.obj) 中引用 + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已在 glfw3.lib(win32_joystick.obj) 中引用 + 已在 dllmain.obj 中引用 + 已在 glfw3.lib(window.obj) 中引用 + 已在 glfw3.lib(input.obj) 中引用 + 已在 glfw3.lib(init.obj) 中引用 + 已加载 MSVCRT.lib(amdsecgs.obj) + 已找到 __report_rangecheckfailure + 已在 StgSharpC.obj 中引用 + 已加载 MSVCRT.lib(gs_report.obj) + 已找到 _DllMainCRTStartup + 已加载 MSVCRT.lib(dll_dllmain.obj) + 已找到 __GSHandlerCheck + 已在 glfw3.lib(egl_context.obj) 中引用 + 已在 glfw3.lib(osmesa_context.obj) 中引用 + 已在 glfw3.lib(null_window.obj) 中引用 + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已在 glfw3.lib(win32_joystick.obj) 中引用 + 已在 glfw3.lib(wgl_context.obj) 中引用 + 已在 glfw3.lib(window.obj) 中引用 + 已在 glfw3.lib(input.obj) 中引用 + 已在 glfw3.lib(init.obj) 中引用 + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 MSVCRT.lib(gshandler.obj) + 已找到 __security_cookie + 已在 MSVCRT.lib(gs_report.obj) 中引用 + 已在 glfw3.lib(egl_context.obj) 中引用 + 已在 glfw3.lib(osmesa_context.obj) 中引用 + 已在 glfw3.lib(null_window.obj) 中引用 + 已在 MSVCRT.lib(amdsecgs.obj) 中引用 + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已在 glfw3.lib(win32_joystick.obj) 中引用 + 已在 glfw3.lib(wgl_context.obj) 中引用 + 已在 glfw3.lib(window.obj) 中引用 + 已在 glfw3.lib(input.obj) 中引用 + 已在 glfw3.lib(init.obj) 中引用 + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 MSVCRT.lib(gs_cookie.obj) + 已找到 _fltused + 已在 glfw3.lib(null_window.obj) 中引用 + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已在 glfw3.lib(win32_joystick.obj) 中引用 + 已在 glfw3.lib(null_monitor.obj) 中引用 + 已在 glfw3.lib(window.obj) 中引用 + 已在 glfw3.lib(input.obj) 中引用 + 已在 glfw3.lib(init.obj) 中引用 + 已在 glfw3.lib(monitor.obj) 中引用 + 已加载 MSVCRT.lib(fltused.obj) + 已找到 __security_init_cookie + 已在 MSVCRT.lib(dll_dllmain.obj) 中引用 + 已加载 MSVCRT.lib(gs_support.obj) + 已找到 "void __cdecl __scrt_initialize_type_info(void)" (?__scrt_initialize_type_info@@YAXXZ) + 已在 MSVCRT.lib(dll_dllmain.obj) 中引用 + 已加载 MSVCRT.lib(tncleanup.obj) + 已找到 __scrt_initialize_default_local_stdio_options + 已在 MSVCRT.lib(dll_dllmain.obj) 中引用 + 已加载 MSVCRT.lib(default_local_stdio_options.obj) + 已找到 __scrt_is_nonwritable_in_current_image + 已在 MSVCRT.lib(dll_dllmain.obj) 中引用 + 已加载 MSVCRT.lib(utility.obj) + 已找到 __scrt_get_dyn_tls_init_callback + 已在 MSVCRT.lib(dll_dllmain.obj) 中引用 + 已加载 MSVCRT.lib(dyn_tls_init.obj) + 已找到 __scrt_fastfail + 已在 MSVCRT.lib(dll_dllmain.obj) 中引用 + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 MSVCRT.lib(utility_desktop.obj) + 已找到 _RTC_Initialize + 已在 MSVCRT.lib(dll_dllmain.obj) 中引用 + 已加载 MSVCRT.lib(initsect.obj) + 已找到 __xi_a + 已在 MSVCRT.lib(dll_dllmain.obj) 中引用 + 已加载 MSVCRT.lib(initializers.obj) + 已处理 /DEFAULTLIB: kernel32.lib + 已处理 /DISALLOWLIB: msvcrtd.lib + 已处理 /DISALLOWLIB: libcmt.lib + 已处理 /DISALLOWLIB: libcmtd.lib + 已处理 /DEFAULTLIB: vcruntime.lib + 已处理 /DISALLOWLIB: vcruntimed.lib + 已处理 /DISALLOWLIB: libvcruntime.lib + 已处理 /DISALLOWLIB: libvcruntimed.lib + 已处理 /DEFAULTLIB: ucrt.lib + 已处理 /DISALLOWLIB: ucrtd.lib + 已处理 /DISALLOWLIB: libucrt.lib + 已处理 /DISALLOWLIB: libucrtd.lib + 已找到 __guard_dispatch_icall_fptr + 已在 MSVCRT.lib(dll_dllmain.obj) 中引用 + 已在 MSVCRT.lib(utility.obj) 中引用 + 已在 MSVCRT.lib(initsect.obj) 中引用 + 已加载 MSVCRT.lib(guard_support.obj) + 已找到 __isa_available_init + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 MSVCRT.lib(cpu_disp.obj) + 已找到 _get_startup_argv_mode + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 MSVCRT.lib(argv_mode.obj) + 已找到 __scrt_is_ucrt_dll_in_use + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 MSVCRT.lib(ucrt_detection.obj) + 已找到 _guard_dispatch_icall_nop + 已在 MSVCRT.lib(guard_support.obj) 中引用 + 已加载 MSVCRT.lib(guard_dispatch.obj) + 已找到 _guard_xfg_dispatch_icall_nop + 已在 MSVCRT.lib(guard_support.obj) 中引用 + 已加载 MSVCRT.lib(guard_xfg_dispatch.obj) + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\OLDNAMES.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\vcruntime.lib: + 已找到 memset + 已在 glfw3.lib(null_init.obj) 中引用 + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已在 glfw3.lib(win32_joystick.obj) 中引用 + 已在 MSVCRT.lib(utility_desktop.obj) 中引用 + 已在 glfw3.lib(window.obj) 中引用 + 已在 glfw3.lib(input.obj) 中引用 + 已在 glfw3.lib(init.obj) 中引用 + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 vcruntime.lib(VCRUNTIME140.dll) + 已找到 strstr + 已在 glfw3.lib(context.obj) 中引用 + 已在 glfw3.lib(win32_joystick.obj) 中引用 + 已加载 vcruntime.lib(VCRUNTIME140.dll) + 已找到 memcpy + 已在 glfw3.lib(input.obj) 中引用 + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已在 glfw3.lib(null_monitor.obj) 中引用 + 已加载 vcruntime.lib(VCRUNTIME140.dll) + 已找到 memmove + 已在 glfw3.lib(monitor.obj) 中引用 + 已加载 vcruntime.lib(VCRUNTIME140.dll) + 已找到 __C_specific_handler + 已在 MSVCRT.lib(dll_dllmain.obj) 中引用 + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 vcruntime.lib(VCRUNTIME140.dll) + 已找到 __std_type_info_destroy_list + 已在 MSVCRT.lib(tncleanup.obj) 中引用 + 已加载 vcruntime.lib(VCRUNTIME140.dll) + 已找到 __current_exception + 已在 MSVCRT.lib(utility_desktop.obj) 中引用 + 已加载 vcruntime.lib(VCRUNTIME140.dll) + 已找到 __current_exception_context + 已在 MSVCRT.lib(utility_desktop.obj) 中引用 + 已加载 vcruntime.lib(VCRUNTIME140.dll) + 已找到 __IMPORT_DESCRIPTOR_VCRUNTIME140 + 已在 vcruntime.lib(VCRUNTIME140.dll) 中引用 + 已在 vcruntime.lib(VCRUNTIME140.dll) 中引用 + 已在 vcruntime.lib(VCRUNTIME140.dll) 中引用 + 已在 vcruntime.lib(VCRUNTIME140.dll) 中引用 + 已在 vcruntime.lib(VCRUNTIME140.dll) 中引用 + 已在 vcruntime.lib(VCRUNTIME140.dll) 中引用 + 已在 vcruntime.lib(VCRUNTIME140.dll) 中引用 + 已在 vcruntime.lib(VCRUNTIME140.dll) 中引用 + 已加载 vcruntime.lib(VCRUNTIME140.dll) + 已找到 __NULL_IMPORT_DESCRIPTOR + 已在 vcruntime.lib(VCRUNTIME140.dll) 中引用 + 已加载 vcruntime.lib(VCRUNTIME140.dll) + 已找到 VCRUNTIME140_NULL_THUNK_DATA + 已在 vcruntime.lib(VCRUNTIME140.dll) 中引用 + 已加载 vcruntime.lib(VCRUNTIME140.dll) + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64\ucrt.lib: + 已找到 __imp__aligned_free + 已在 mat2.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + 已找到 __imp_ftell + 已在 stb_image.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __imp_ferror + 已在 stb_image.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __imp_fclose + 已在 stb_image.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __imp_realloc + 已在 stb_image.obj 中引用 + 已在 glfw3.lib(init.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + 已找到 __imp_fseek + 已在 stb_image.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __imp_fgetc + 已在 stb_image.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __imp_strncmp + 已在 glfw3.lib(egl_context.obj) 中引用 + 已在 stb_image.obj 中引用 + 已在 glfw3.lib(context.obj) 中引用 + 已在 glfw3.lib(input.obj) 中引用 + 已在 glfw3.lib(init.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + 已找到 __imp_fopen_s + 已在 stb_image.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __imp_strtol + 已在 stb_image.obj 中引用 + 已在 glfw3.lib(init.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) + 已找到 __imp_ldexp + 已在 stb_image.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + 已找到 __imp_free + 已在 stb_image.obj 中引用 + 已在 glfw3.lib(init.obj) 中引用 + 已在 glfw3.lib(null_init.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + 已找到 __imp_ungetc + 已在 stb_image.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __imp_feof + 已在 stb_image.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __imp_fread + 已在 stb_image.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __imp_malloc + 已在 stb_image.obj 中引用 + 已在 glfw3.lib(init.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + 已找到 __imp___acrt_iob_func + 已在 StgSharpC.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __imp___stdio_common_vfprintf + 已在 StgSharpC.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __imp_strncpy + 已在 glfw3.lib(window.obj) 中引用 + 已在 glfw3.lib(input.obj) 中引用 + 已在 glfw3.lib(monitor.obj) 中引用 + 已在 glfw3.lib(win32_joystick.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + 已找到 __imp___stdio_common_vsscanf + 已在 glfw3.lib(context.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __imp_strcspn + 已在 glfw3.lib(input.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + 已找到 __imp_strspn + 已在 glfw3.lib(input.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + 已找到 __imp_strtoul + 已在 glfw3.lib(input.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) + 已找到 __imp_strtok + 已在 glfw3.lib(init.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + 已找到 __imp___stdio_common_vsprintf + 已在 glfw3.lib(init.obj) 中引用 + 已在 glfw3.lib(win32_joystick.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __imp_qsort + 已在 glfw3.lib(monitor.obj) 中引用 + 已在 glfw3.lib(win32_joystick.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-utility-l1-1-0.dll) + 已找到 powf + 已在 glfw3.lib(monitor.obj) 中引用 + 已在 glfw3.lib(null_monitor.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + 已找到 strcmp + 已在 glfw3.lib(vulkan.obj) 中引用 + 已在 glfw3.lib(win32_joystick.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + 已找到 _initterm + 已在 MSVCRT.lib(dll_dllmain.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 已找到 _initterm_e + 已在 MSVCRT.lib(dll_dllmain.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 已找到 _seh_filter_dll + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 已找到 _configure_narrow_argv + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 已找到 _initialize_narrow_environment + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 已找到 _initialize_onexit_table + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 已找到 _register_onexit_function + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 已找到 _execute_onexit_table + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 已找到 _crt_atexit + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 已找到 _crt_at_quick_exit + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 已找到 _cexit + 已在 MSVCRT.lib(utility.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 已找到 terminate + 已在 MSVCRT.lib(utility_desktop.obj) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 已找到 __IMPORT_DESCRIPTOR_api-ms-win-crt-heap-l1-1-0 + 已在 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + 已找到 __IMPORT_DESCRIPTOR_api-ms-win-crt-stdio-l1-1-0 + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 __IMPORT_DESCRIPTOR_api-ms-win-crt-string-l1-1-0 + 已在 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + 已找到 __IMPORT_DESCRIPTOR_api-ms-win-crt-convert-l1-1-0 + 已在 ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) + 已找到 __IMPORT_DESCRIPTOR_api-ms-win-crt-math-l1-1-0 + 已在 ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + 已找到 __IMPORT_DESCRIPTOR_api-ms-win-crt-utility-l1-1-0 + 已在 ucrt.lib(api-ms-win-crt-utility-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-utility-l1-1-0.dll) + 已找到 __IMPORT_DESCRIPTOR_api-ms-win-crt-runtime-l1-1-0 + 已在 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中引用 + 已在 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 已找到 api-ms-win-crt-heap-l1-1-0_NULL_THUNK_DATA + 已在 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + 已找到 api-ms-win-crt-stdio-l1-1-0_NULL_THUNK_DATA + 已在 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + 已找到 api-ms-win-crt-string-l1-1-0_NULL_THUNK_DATA + 已在 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + 已找到 api-ms-win-crt-convert-l1-1-0_NULL_THUNK_DATA + 已在 ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) + 已找到 api-ms-win-crt-math-l1-1-0_NULL_THUNK_DATA + 已在 ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + 已找到 api-ms-win-crt-utility-l1-1-0_NULL_THUNK_DATA + 已在 ucrt.lib(api-ms-win-crt-utility-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-utility-l1-1-0.dll) + 已找到 api-ms-win-crt-runtime-l1-1-0_NULL_THUNK_DATA + 已在 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中引用 + 已加载 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\opengl32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\kernel32.lib: + 已找到 __imp_InitializeCriticalSection + 已在 glfw3.lib(win32_thread.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_EnterCriticalSection + 已在 glfw3.lib(win32_thread.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_LeaveCriticalSection + 已在 glfw3.lib(win32_thread.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_DeleteCriticalSection + 已在 glfw3.lib(win32_thread.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_TlsAlloc + 已在 glfw3.lib(win32_thread.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_TlsGetValue + 已在 glfw3.lib(win32_thread.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_TlsSetValue + 已在 glfw3.lib(win32_thread.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_TlsFree + 已在 glfw3.lib(win32_thread.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_QueryPerformanceCounter + 已在 glfw3.lib(win32_time.obj) 中引用 + 已在 MSVCRT.lib(gs_support.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_QueryPerformanceFrequency + 已在 glfw3.lib(win32_time.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_VerSetConditionMask + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_GetLastError + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(wgl_context.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_GetModuleHandleExW + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_FormatMessageW + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_MultiByteToWideChar + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_WideCharToMultiByte + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已在 glfw3.lib(win32_joystick.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_FreeLibrary + 已在 glfw3.lib(win32_module.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_GetProcAddress + 已在 glfw3.lib(win32_module.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_LoadLibraryA + 已在 glfw3.lib(win32_module.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_GetModuleHandleW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已在 MSVCRT.lib(utility_desktop.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_GlobalAlloc + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_GlobalUnlock + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_GlobalLock + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_GlobalFree + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_SetThreadExecutionState + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_RtlCaptureContext + 已在 MSVCRT.lib(gs_report.obj) 中引用 + 已在 MSVCRT.lib(utility_desktop.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_RtlLookupFunctionEntry + 已在 MSVCRT.lib(gs_report.obj) 中引用 + 已在 MSVCRT.lib(utility_desktop.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_RtlVirtualUnwind + 已在 MSVCRT.lib(gs_report.obj) 中引用 + 已在 MSVCRT.lib(utility_desktop.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_UnhandledExceptionFilter + 已在 MSVCRT.lib(gs_report.obj) 中引用 + 已在 MSVCRT.lib(utility_desktop.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_SetUnhandledExceptionFilter + 已在 MSVCRT.lib(gs_report.obj) 中引用 + 已在 MSVCRT.lib(utility_desktop.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_GetCurrentProcess + 已在 MSVCRT.lib(gs_report.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_TerminateProcess + 已在 MSVCRT.lib(gs_report.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_IsProcessorFeaturePresent + 已在 MSVCRT.lib(gs_report.obj) 中引用 + 已在 MSVCRT.lib(utility_desktop.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_GetCurrentProcessId + 已在 MSVCRT.lib(gs_support.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_GetCurrentThreadId + 已在 MSVCRT.lib(gs_support.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_GetSystemTimeAsFileTime + 已在 MSVCRT.lib(gs_support.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_InitializeSListHead + 已在 MSVCRT.lib(tncleanup.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_IsDebuggerPresent + 已在 MSVCRT.lib(utility_desktop.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __imp_GetStartupInfoW + 已在 MSVCRT.lib(utility_desktop.obj) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 __IMPORT_DESCRIPTOR_KERNEL32 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 已找到 KERNEL32_NULL_THUNK_DATA + 已在 kernel32.lib(KERNEL32.dll) 中引用 + 已加载 kernel32.lib(KERNEL32.dll) + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\user32.lib: + 已找到 __imp_TranslateMessage + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_DispatchMessageW + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_PeekMessageW + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_RegisterDeviceNotificationW + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_UnregisterDeviceNotification + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_DefWindowProcW + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_UnregisterClassW + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_RegisterClassExW + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_CreateWindowExW + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_DestroyWindow + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_ShowWindow + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_ToUnicode + 已在 glfw3.lib(win32_init.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_MapVirtualKeyW + 已在 glfw3.lib(win32_init.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetDC + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已在 glfw3.lib(wgl_context.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_ReleaseDC + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_ChangeDisplaySettingsExW + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_EnumDisplaySettingsW + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_EnumDisplaySettingsExW + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_EnumDisplayDevicesW + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetMonitorInfoW + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_EnumDisplayMonitors + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_TrackMouseEvent + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetMessageTime + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SendMessageW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_PostMessageW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_WaitMessage + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetLayeredWindowAttributes + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SetLayeredWindowAttributes + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_FlashWindow + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_MoveWindow + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SetWindowPos + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetWindowPlacement + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SetWindowPlacement + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_IsWindowVisible + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_IsIconic + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_BringWindowToTop + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_IsZoomed + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_OpenClipboard + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_CloseClipboard + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SetClipboardData + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetClipboardData + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_EmptyClipboard + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SetFocus + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetActiveWindow + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetKeyState + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SetCapture + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_ReleaseCapture + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_MsgWaitForMultipleObjects + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetSystemMetrics + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SetForegroundWindow + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SetPropW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetPropW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_RemovePropW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SetWindowTextW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetClientRect + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetWindowRect + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_AdjustWindowRectEx + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SetCursorPos + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SetCursor + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetCursorPos + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_ClientToScreen + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_ScreenToClient + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_WindowFromPoint + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_ClipCursor + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SetRect + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_OffsetRect + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_PtInRect + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetWindowLongW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SetWindowLongW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetClassLongPtrW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_LoadCursorW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_DestroyIcon + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_LoadImageW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_CreateIconIndirect + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_SystemParametersInfoW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_MonitorFromWindow + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetRawInputData + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_RegisterRawInputDevices + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetRawInputDeviceInfoA + 已在 glfw3.lib(win32_joystick.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __imp_GetRawInputDeviceList + 已在 glfw3.lib(win32_joystick.obj) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 __IMPORT_DESCRIPTOR_USER32 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已在 user32.lib(USER32.dll) 中引用 + 已加载 user32.lib(USER32.dll) + 已找到 USER32_NULL_THUNK_DATA + 已在 user32.lib(USER32.dll) 中引用 + 已加载 user32.lib(USER32.dll) + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\gdi32.lib: + 已找到 __imp_CreateDCW + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 __imp_DeleteDC + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 __imp_GetDeviceCaps + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 __imp_GetDeviceGammaRamp + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 __imp_SetDeviceGammaRamp + 已在 glfw3.lib(win32_monitor.obj) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 __imp_CreateBitmap + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 __imp_CreateRectRgn + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 __imp_DeleteObject + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 __imp_CreateDIBSection + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 __imp_ChoosePixelFormat + 已在 glfw3.lib(wgl_context.obj) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 __imp_DescribePixelFormat + 已在 glfw3.lib(wgl_context.obj) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 __imp_SetPixelFormat + 已在 glfw3.lib(wgl_context.obj) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 __imp_SwapBuffers + 已在 glfw3.lib(wgl_context.obj) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 __IMPORT_DESCRIPTOR_GDI32 + 已在 gdi32.lib(GDI32.dll) 中引用 + 已在 gdi32.lib(GDI32.dll) 中引用 + 已在 gdi32.lib(GDI32.dll) 中引用 + 已在 gdi32.lib(GDI32.dll) 中引用 + 已在 gdi32.lib(GDI32.dll) 中引用 + 已在 gdi32.lib(GDI32.dll) 中引用 + 已在 gdi32.lib(GDI32.dll) 中引用 + 已在 gdi32.lib(GDI32.dll) 中引用 + 已在 gdi32.lib(GDI32.dll) 中引用 + 已在 gdi32.lib(GDI32.dll) 中引用 + 已在 gdi32.lib(GDI32.dll) 中引用 + 已在 gdi32.lib(GDI32.dll) 中引用 + 已在 gdi32.lib(GDI32.dll) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 已找到 GDI32_NULL_THUNK_DATA + 已在 gdi32.lib(GDI32.dll) 中引用 + 已加载 gdi32.lib(GDI32.dll) + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\shell32.lib: + 已找到 __imp_DragQueryFileW + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 shell32.lib(SHELL32.dll) + 已找到 __imp_DragQueryPoint + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 shell32.lib(SHELL32.dll) + 已找到 __imp_DragFinish + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 shell32.lib(SHELL32.dll) + 已找到 __imp_DragAcceptFiles + 已在 glfw3.lib(win32_window.obj) 中引用 + 已加载 shell32.lib(SHELL32.dll) + 已找到 __IMPORT_DESCRIPTOR_SHELL32 + 已在 shell32.lib(SHELL32.dll) 中引用 + 已在 shell32.lib(SHELL32.dll) 中引用 + 已在 shell32.lib(SHELL32.dll) 中引用 + 已在 shell32.lib(SHELL32.dll) 中引用 + 已加载 shell32.lib(SHELL32.dll) + 已找到 SHELL32_NULL_THUNK_DATA + 已在 shell32.lib(SHELL32.dll) 中引用 + 已加载 shell32.lib(SHELL32.dll) + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\ole32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\oleaut32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\uuid.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbc32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbccp32.lib: + 正在搜索 glfw3.lib: + 正在搜索 glfw3dll.lib: + 正在搜索 glfw3_mt.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\MSVCRT.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\OLDNAMES.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\vcruntime.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64\ucrt.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\opengl32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\kernel32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\user32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\gdi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib: + 已完成库搜索 + 正在生成 .exp 文件 正在创建库 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC.lib 和对象 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC.exp + 已完成 .exp 文件生成 + 正在搜索库 + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\opengl32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\kernel32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\user32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\gdi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\shell32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\ole32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\oleaut32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\uuid.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbc32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbccp32.lib: + 正在搜索 glfw3.lib: + 正在搜索 glfw3dll.lib: + 正在搜索 glfw3_mt.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\MSVCRT.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\OLDNAMES.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\vcruntime.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64\ucrt.lib: + 已完成库搜索 + 正在搜索库 + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\opengl32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\kernel32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\user32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\gdi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\shell32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\ole32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\oleaut32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\uuid.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbc32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbccp32.lib: + 正在搜索 glfw3.lib: + 正在搜索 glfw3dll.lib: + 正在搜索 glfw3_mt.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\MSVCRT.lib: + 已找到 __scrt_stub_for_acrt_initialize + 已加载 MSVCRT.lib(ucrt_stubs.obj) + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\OLDNAMES.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\vcruntime.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64\ucrt.lib: + 已完成库搜索 + 正在搜索库 + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\opengl32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\kernel32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\user32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\gdi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\shell32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\ole32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\oleaut32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\uuid.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbc32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbccp32.lib: + 正在搜索 glfw3.lib: + 正在搜索 glfw3dll.lib: + 正在搜索 glfw3_mt.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\MSVCRT.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\OLDNAMES.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\vcruntime.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64\ucrt.lib: + 已完成库搜索 + 正在搜索库 + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\opengl32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\kernel32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\user32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\gdi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\shell32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\ole32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\oleaut32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\uuid.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbc32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbccp32.lib: + 正在搜索 glfw3.lib: + 正在搜索 glfw3dll.lib: + 正在搜索 glfw3_mt.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\MSVCRT.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\OLDNAMES.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\vcruntime.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64\ucrt.lib: + 已完成库搜索 + 已完成传递 1 + 已丢弃 "unsigned __int64 `__local_stdio_printf_options'::`2'::_OptionsStorage" (?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA)(从 MSVCRT.lib(default_local_stdio_options.obj) 中) + 已丢弃 "unsigned __int64 `__local_stdio_scanf_options'::`2'::_OptionsStorage" (?_OptionsStorage@?1??__local_stdio_scanf_options@@9@4_KA)(从 MSVCRT.lib(default_local_stdio_options.obj) 中) + 已丢弃 __castguard_check_failure_user_handled_fptr(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 "`string'" (??_C@_0BA@KMGHNAFM@Invalid?5time?5?$CFf@)(从 glfw3.lib(input.obj) 中) + 已丢弃 __real@3f800000(从 glfw3.lib(input.obj) 中) + 已丢弃 __real@7fefffffffffffff(从 glfw3.lib(input.obj) 中) + 已丢弃 "`string'" (??_C@_07CAIJGPF@file?3?1?1@)(从 glfw3.lib(init.obj) 中) + 已丢弃 "`string'" (??_C@_02PCIJFNDE@?$AN?6@)(从 glfw3.lib(init.obj) 中) + 已丢弃 __real@3f800000(从 glfw3.lib(monitor.obj) 中) + 已丢弃 "`string'" (??_C@_0P@IENCOMCD@VK_KHR_surface@)(从 glfw3.lib(win32_window.obj) 中) + 已丢弃 "`string'" (??_C@_0BF@COCMEDFO@VK_KHR_win32_surface@)(从 glfw3.lib(win32_window.obj) 中) + 已丢弃 __real@3f800000(从 glfw3.lib(win32_window.obj) 中) + 已丢弃 __real@42c00000(从 glfw3.lib(win32_window.obj) 中) + 已丢弃 __real@3f000000(从 glfw3.lib(win32_joystick.obj) 中) + 已丢弃 __real@3f800000(从 glfw3.lib(win32_joystick.obj) 中) + 已丢弃 "`string'" (??_C@_07PBILKAFL@Success@)(从 glfw3.lib(egl_context.obj) 中) + 已丢弃 __real@3f000000(从 glfw3.lib(null_monitor.obj) 中) + 已丢弃 __real@477fff00(从 glfw3.lib(null_monitor.obj) 中) + 已丢弃 "`string'" (??_C@_0BE@IGCIBFAF@Invalid?5scancode?5?$CFi@)(从 glfw3.lib(null_window.obj) 中) + 已丢弃 "`string'" (??_C@_01IHBHIGKO@?0@)(从 glfw3.lib(null_window.obj) 中) + 已丢弃 "`string'" (??_C@_01MCMALHOG@a@)(从 glfw3.lib(null_window.obj) 中) + 已丢弃 "`string'" (??_C@_01OJONOECF@b@)(从 glfw3.lib(null_window.obj) 中) + 已丢弃 "`string'" (??_C@_01FJMABOPO@x@)(从 glfw3.lib(null_window.obj) 中) + 已丢弃 "`string'" (??_C@_01EANLCPLP@y@)(从 glfw3.lib(null_window.obj) 中) + 已丢弃 "`string'" (??_C@_00CNPNBAHC@@)(从 glfw3.lib(null_joystick.obj) 中) + 已丢弃 __CastGuardVftablesStart(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __CastGuardVftablesEnd(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃“.pdata”(从 glfw3.lib(init.obj) 中) + 已丢弃“.pdata”(从 glfw3.lib(init.obj) 中) + 已丢弃“.pdata”(从 glfw3.lib(init.obj) 中) + 已丢弃“.pdata”(从 glfw3.lib(init.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(gs_support.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(utility.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(utility.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(utility.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃“.pdata”(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃“.idata$4”(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃“.idata$4”(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$4”(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 __imp___current_exception(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃 __imp___current_exception_context(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃 __imp_ftell(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 __imp_strtok(从 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中) + 已丢弃 __imp__register_onexit_function(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 __imp__crt_atexit(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 __imp__crt_at_quick_exit(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 __imp_terminate(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 __imp_GetStartupInfoW(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃“.idata$6”(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃“.idata$6”(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃“.xdata”(从 glfw3.lib(init.obj) 中) + 已丢弃“.xdata”(从 glfw3.lib(init.obj) 中) + 已丢弃“.xdata”(从 glfw3.lib(init.obj) 中) + 已丢弃“.xdata”(从 glfw3.lib(init.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(gs_support.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(utility.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(utility.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(utility.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃“.xdata”(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __local_stdio_printf_options(从 glfw3.lib(init.obj) 中) + 已丢弃 _glfwEncodeUTF8(从 glfw3.lib(init.obj) 中) + 已丢弃 _glfwParseUriList(从 glfw3.lib(init.obj) 中) + 已丢弃 __local_stdio_printf_options(从 glfw3.lib(win32_joystick.obj) 中) + 已丢弃 __report_securityfailureEx(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃 "int __cdecl dllmain_raw(struct HINSTANCE__ * const,unsigned long,void * const)" (?dllmain_raw@@YAHQEAUHINSTANCE__@@KQEAX@Z)(从 MSVCRT.lib(dll_dllmain.obj) 中) + 已丢弃 _CRT_INIT(从 MSVCRT.lib(dll_dllmain.obj) 中) + 已丢弃 __get_entropy(从 MSVCRT.lib(gs_support.obj) 中) + 已丢弃 __local_stdio_printf_options(从 MSVCRT.lib(default_local_stdio_options.obj) 中) + 已丢弃 __local_stdio_scanf_options(从 MSVCRT.lib(default_local_stdio_options.obj) 中) + 已丢弃 "public: static int __cdecl __scrt_narrow_argv_policy::configure_argv(void)" (?configure_argv@__scrt_narrow_argv_policy@@SAHXZ)(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 "struct _IMAGE_SECTION_HEADER * __cdecl find_pe_section(unsigned char * const,unsigned __int64)" (?find_pe_section@@YAPEAU_IMAGE_SECTION_HEADER@@QEAE_K@Z)(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 "public: static int __cdecl __scrt_narrow_environment_policy::initialize_environment(void)" (?initialize_environment@__scrt_narrow_environment_policy@@SAHXZ)(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 "bool __cdecl is_potentially_valid_image_base(void * const)" (?is_potentially_valid_image_base@@YA_NQEAX@Z)(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 NtCurrentTeb(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 _onexit(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 at_quick_exit(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 atexit(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 __scrt_get_show_window_mode(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 __scrt_initialize_mta(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 __scrt_initialize_winrt(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 __scrt_is_managed_app(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 __scrt_set_unhandled_exception_filter(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 __scrt_unhandled_exception_filter(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 ReadNoFence64(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 ReadPointerNoFence(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_debugbreak(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_fastfail(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_nop(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_os_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_os_handled_wrapper(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_user_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_user_handled_wrapper(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_compat_check(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_set_user_handler(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_slow_path_check_debugbreak(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_slow_path_check_fastfail(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_slow_path_check_nop(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_slow_path_check_os_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_slow_path_check_user_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_slow_path_compat_check(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 _guard_icall_checks_enforced(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 _guard_rf_checks_enforced(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __current_exception(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃 __current_exception_context(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃 ftell(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 strtok(从 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中) + 已丢弃 _register_onexit_function(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 _crt_atexit(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 _crt_at_quick_exit(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 terminate(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 GetStartupInfoW(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 __guard_xfg_check_icall_fptr(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __guard_xfg_dispatch_icall_fptr(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __guard_xfg_table_dispatch_icall_fptr(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_os_handled_fptr(从 MSVCRT.lib(guard_support.obj) 中) 正在生成代码 - Previous IPDB was built with incompatible compiler, fall back to full compilation. - All 176 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. 已完成代码的生成 + 正在搜索库 + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\opengl32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\kernel32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\user32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\gdi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\shell32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\ole32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\oleaut32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\uuid.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbc32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbccp32.lib: + 正在搜索 glfw3.lib: + 正在搜索 glfw3dll.lib: + 正在搜索 glfw3_mt.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\MSVCRT.lib: + 已找到 __chkstk + 已在 stb_image.obj 中引用 + 已加载 MSVCRT.lib(chkstk.obj) + 已找到 _tls_index + 已在 stb_image.obj 中引用 + 已加载 MSVCRT.lib(tlssup.obj) + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\OLDNAMES.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\vcruntime.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64\ucrt.lib: + 已找到 pow + 已在 stb_image.obj 中引用 + 已加载 ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\opengl32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\kernel32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\user32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\gdi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\shell32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\ole32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\oleaut32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\uuid.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbc32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbccp32.lib: + 正在搜索 glfw3.lib: + 正在搜索 glfw3dll.lib: + 正在搜索 glfw3_mt.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\MSVCRT.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\OLDNAMES.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\vcruntime.lib: + 已完成库搜索 + 正在搜索库 + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\opengl32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\kernel32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\user32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\gdi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\shell32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\ole32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\oleaut32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\uuid.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbc32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbccp32.lib: + 正在搜索 glfw3.lib: + 正在搜索 glfw3dll.lib: + 正在搜索 glfw3_mt.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\MSVCRT.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\OLDNAMES.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\vcruntime.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64\ucrt.lib: + 已完成库搜索 + 正在搜索库 + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\opengl32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\kernel32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\user32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\gdi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\shell32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\ole32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\oleaut32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\uuid.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbc32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbccp32.lib: + 正在搜索 glfw3.lib: + 正在搜索 glfw3dll.lib: + 正在搜索 glfw3_mt.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\MSVCRT.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\OLDNAMES.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\vcruntime.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64\ucrt.lib: + 已完成库搜索 + 正在搜索库 + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\opengl32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\kernel32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\user32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\gdi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\shell32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\ole32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\oleaut32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\uuid.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbc32.lib: + 正在搜索 C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbccp32.lib: + 正在搜索 glfw3.lib: + 正在搜索 glfw3dll.lib: + 正在搜索 glfw3_mt.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\MSVCRT.lib: + 已找到 _load_config_used + 已加载 MSVCRT.lib(loadcfg.obj) + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\OLDNAMES.lib: + 正在搜索 C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\vcruntime.lib: + 已找到 __guard_memcpy_fptr + 已在 MSVCRT.lib(loadcfg.obj) 中引用 + 已加载 vcruntime.lib(softmemtag.obj) + 已完成库搜索 + 未使用的库: + C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\opengl32.lib + C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib + C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib + C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib + C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\ole32.lib + C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\oleaut32.lib + C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\uuid.lib + C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbc32.lib + C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\odbccp32.lib + glfw3dll.lib + glfw3_mt.lib + C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\lib\x64\OLDNAMES.lib + 正在处理 /ORDER 选项 + 未在 /ORDER 文件中列出的外部代码对象: + ??_C@_0CN@PEBHJDOE@OSMesa?3?5Failed?5to?5load?5required@ ; glfw3.lib(osmesa_context.obj) + ??_C@_0BCO@LKAFPMMB@03000000120c0000101e00000000000@ ; glfw3.lib(input.obj) + ??_C@_0BM@BADCNPOM@Invalid?5value?5for?5parameter@ ; glfw3.lib(init.obj) + glfwIconifyWindow ; glfw3.lib(window.obj) + ??_C@_0DG@CGDLBFFB@Win32?3?5Failed?5to?5allocate?5globa@ ; glfw3.lib(win32_window.obj) + ??_C@_0L@GMPLCCII@user32?4dll@ ; glfw3.lib(win32_init.obj) + glfwGetPlatform ; glfw3.lib(platform.obj) + ??_C@_0L@DMFDIJCG@shcore?4dll@ ; glfw3.lib(win32_init.obj) + __imp_UnregisterDeviceNotification ; user32.lib(USER32.dll) + ??_C@_0CC@DOIEFDD@EGL?3?5Failed?5to?5initialize?5EGL?3?5@ ; glfw3.lib(egl_context.obj) + ??_C@_0N@JENFOGFI@XInput?5Wheel@ ; glfw3.lib(win32_joystick.obj) + ??_C@_0BCO@BGDMHMEJ@030000006f0e0000280100000000000@ ; glfw3.lib(input.obj) + __imp_SetPropW ; user32.lib(USER32.dll) + glfwGetVersion ; glfw3.lib(init.obj) + _glfwInputJoystick ; glfw3.lib(input.obj) + __imp_SetWindowPlacement ; user32.lib(USER32.dll) + _glfwTerminateEGL ; glfw3.lib(egl_context.obj) + glfwPollEvents ; glfw3.lib(window.obj) + ??_C@_0BO@PCKHNBJ@Invalid?5OpenGL?5profile?50x?$CF08X@ ; glfw3.lib(context.obj) + ??_C@_0BH@HPKNFNCE@GetSystemMetricsForDpi@ ; glfw3.lib(win32_init.obj) + _glfwGetVideoModeWin32 ; glfw3.lib(win32_monitor.obj) + ??_C@_0BH@MDCGBFEN@An?5event?5is?5unsignaled@ ; glfw3.lib(vulkan.obj) + ??_C@_0CI@FJDKHGC@OSMesa?3?5Failed?5to?5retrieve?5dept@ ; glfw3.lib(osmesa_context.obj) + ungetc ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_0BBO@LNNKKDPA@030000008f0e0000753000000000000@ ; glfw3.lib(input.obj) + ScreenToClient ; user32.lib(USER32.dll) + ??_C@_04JFCNHLLM@back@ ; glfw3.lib(input.obj) + ??_C@_0BC@HEACFLN@OSMesaMakeCurrent@ ; glfw3.lib(osmesa_context.obj) + glfwGetEGLSurface ; glfw3.lib(egl_context.obj) + ToUnicode ; user32.lib(USER32.dll) + ??_C@_0BBM@KEDGELHN@03000000c82d0000203800000000000@ ; glfw3.lib(input.obj) + _glfwInputJoystickAxis ; glfw3.lib(input.obj) + __xmm@00000001000000010000000100000001 ; glfw3.lib(window.obj) + ??_C@_01BMBHCPLG@5@ ; glfw3.lib(null_window.obj) + _DllMainCRTStartup ; MSVCRT.lib(dll_dllmain.obj) + __imp_DefWindowProcW ; user32.lib(USER32.dll) + __xmm@00000003000000030000000300000003 ; dllmain.obj + _glfwGetClipboardStringWin32 ; glfw3.lib(win32_window.obj) + _glfwFreeMonitorNull ; glfw3.lib(null_monitor.obj) + __xmm@00380037003600350034003300320031 ; glfw3.lib(win32_init.obj) + _glfwSetCursorWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0CK@DKAFEDIC@OpenGL?5version?5string?5retrieval@ ; glfw3.lib(context.obj) + InitializeCriticalSection ; kernel32.lib(KERNEL32.dll) + glfwGetJoystickGUID ; glfw3.lib(input.obj) + ??_C@_0BCN@ECJBHADL@030000004c050000e60c00000000000@ ; glfw3.lib(input.obj) + _glfwCreateCursorNull ; glfw3.lib(null_window.obj) + glfwRawMouseMotionSupported ; glfw3.lib(input.obj) + ??_C@_0DN@GNDEENDO@EGL?5failed?5to?5allocate?5resource@ ; glfw3.lib(egl_context.obj) + ??_C@_01NEMOKFLO@?$DN@ ; glfw3.lib(null_window.obj) + IsDebuggerPresent ; kernel32.lib(KERNEL32.dll) + GetCurrentThreadId ; kernel32.lib(KERNEL32.dll) + _glfwCreateContextEGL ; glfw3.lib(egl_context.obj) + __imp_DragFinish ; shell32.lib(SHELL32.dll) + _glfwShowWindowWin32 ; glfw3.lib(win32_window.obj) + PostMessageW ; user32.lib(USER32.dll) + glfwGetWin32Window ; glfw3.lib(win32_window.obj) + glfwWindowShouldClose ; glfw3.lib(window.obj) + __imp_LoadImageW ; user32.lib(USER32.dll) + ??_C@_0BCG@HFMJCAPB@030000005c1a0000333000000000000@ ; glfw3.lib(input.obj) + terminate ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + __guard_xfg_table_dispatch_icall_fptr ; MSVCRT.lib(guard_support.obj) + ??_C@_0BBP@DGIHCNJO@030000003807000056a800000000000@ ; glfw3.lib(input.obj) + ??_C@_0BE@IGCIBFAF@Invalid?5scancode?5?$CFi@ ; glfw3.lib(win32_window.obj) + ??_C@_0EP@OJIEDFOO@The?5display?5used?5by?5a?5swapchain@ ; glfw3.lib(vulkan.obj) + ??_C@_0FH@FIPMKLID@A?5surface?5has?5changed?5in?5such?5a@ ; glfw3.lib(vulkan.obj) + ??_C@_0BBG@DBBHKPMM@030000008f0e0000091000000000000@ ; glfw3.lib(input.obj) + __C_specific_handler ; vcruntime.lib(VCRUNTIME140.dll) + _guard_check_icall_nop ; MSVCRT.lib(guard_support.obj) + ??_C@_0M@PPADKGOK@eglGetError@ ; glfw3.lib(egl_context.obj) + __imp_strcspn ; ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + ??_C@_0BBL@NHKNENLJ@03000000bc200000632100000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCI@MBOCFMGI@0300000038100000181400000000000@ ; glfw3.lib(input.obj) + glfwSetWindowSizeLimits ; glfw3.lib(window.obj) + ??_C@_0BCK@KFEKGGJ@0300000045750000221100000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCN@GIEEMMPB@03000000341a0000360800000000000@ ; glfw3.lib(input.obj) + DragQueryFileW ; shell32.lib(SHELL32.dll) + __xmm@f9c31a9df9c31a9df9c31a9df9c31a9d ; dllmain.obj + ??_C@_0BDA@PJFOCFDI@0300000038070000503200000000000@ ; glfw3.lib(input.obj) + ??_C@_0CE@IKOICJPN@Win32?3?5Failed?5to?5set?5video?5mode@ ; glfw3.lib(win32_monitor.obj) + ??_C@_0O@FNFBHCOO@0?9pixel?5image@ ; stb_image.obj + GlobalFree ; kernel32.lib(KERNEL32.dll) + ??_C@_0BBN@DJKOMBLI@03000000d6200000e55700000000000@ ; glfw3.lib(input.obj) + ??_C@_0DC@CDLECLKD@WGL?3?5Driver?5does?5not?5support?5Op@ ; glfw3.lib(wgl_context.obj) + __imp_GetRawInputDeviceList ; user32.lib(USER32.dll) + ??_C@_0BCF@LMGAPCEG@0300000045130000001000000000000@ ; glfw3.lib(input.obj) + GetProcAddress ; kernel32.lib(KERNEL32.dll) + glfwGetVersionString ; glfw3.lib(platform.obj) + ??_C@_0CC@NIBJMOI@EGL?3?5Failed?5to?5bind?5OpenGL?5ES?3?5@ ; glfw3.lib(egl_context.obj) + ??_C@_0CA@JBEOCDFN@invalid?5decoded?5scanline?5length@ ; stb_image.obj + _glfwGetMonitorWorkareaNull ; glfw3.lib(null_monitor.obj) + __imp_GetModuleHandleExW ; kernel32.lib(KERNEL32.dll) + _glfwCreateContextWGL ; glfw3.lib(wgl_context.obj) + SetWindowPlacement ; user32.lib(USER32.dll) + _glfwIsWindowsVersionOrGreaterWin32 ; glfw3.lib(win32_init.obj) + _glfwWindowVisibleNull ; glfw3.lib(null_window.obj) + ??_C@_09MNNCNKEO@outofdata@ ; stb_image.obj + _glfwPollMonitorsNull ; glfw3.lib(null_monitor.obj) + ??_C@_01JOAMLHOP@?9@ ; glfw3.lib(null_window.obj) + ??_C@_0DC@KIAJNHJN@Requested?5OpenGL?5version?5?$CFi?4?$CFi?0@ ; glfw3.lib(context.obj) + ??_C@_0BBK@FPHOHOII@030000006e050000132000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BDG@JHAIGEPC@0300000079000000431800000000000@ ; glfw3.lib(input.obj) + __scrt_dllmain_before_initialize_c ; MSVCRT.lib(utility.obj) + GlobalUnlock ; kernel32.lib(KERNEL32.dll) + ??_C@_01NBENCBCI@?$CK@ ; glfw3.lib(null_window.obj) + __local_stdio_scanf_options ; glfw3.lib(context.obj) + ??_C@_0BDA@CMOFFENL@030000000d0f0000850000000000000@ ; glfw3.lib(input.obj) + DeleteCriticalSection ; kernel32.lib(KERNEL32.dll) + ??_C@_0EE@LGMAAPCC@WGL?3?5The?5share?5context?5is?5not?5c@ ; glfw3.lib(wgl_context.obj) + _glfwWaitEventsWin32 ; glfw3.lib(win32_window.obj) + _glfwPollMonitorsWin32 ; glfw3.lib(win32_monitor.obj) + ??_C@_0BBM@MJENJJEJ@78696e7075740200000000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BI@LDADLCB@DwmGetColorizationColor@ ; glfw3.lib(win32_init.obj) + ??_C@_0BCF@BIADCONP@03000000d81d00000b0000000000000@ ; glfw3.lib(input.obj) + ??_C@_09EOHLEIKL@bad?5sizes@ ; stb_image.obj + ??_C@_0CG@LDJIJKNI@Win32?3?5Failed?5to?5create?5helper?5@ ; glfw3.lib(win32_init.obj) + ??_C@_0O@IHOLGAKK@Invalid?5flags@ ; glfw3.lib(win32_monitor.obj) + ??_C@_0CA@NIHAEPLD@EGL_ANGLE_platform_angle_opengl@ ; glfw3.lib(egl_context.obj) + glfwInitAllocator ; glfw3.lib(init.obj) + __imp_EnumDisplayMonitors ; user32.lib(USER32.dll) + ??_C@_0O@KAFOJCHN@xinput1_3?4dll@ ; glfw3.lib(win32_init.obj) + _glfwRestoreVideoModeWin32 ; glfw3.lib(win32_monitor.obj) + _initialize_narrow_environment ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ??_C@_0DE@OKHDGAJN@Context?5creation?5APIs?5do?5not?5ma@ ; glfw3.lib(context.obj) + ??_C@_0BCB@GKHPJHJF@03000000f0250000c48300000000000@ ; glfw3.lib(input.obj) + __scrt_stub_for_acrt_thread_detach ; MSVCRT.lib(ucrt_stubs.obj) + glfwSetJoystickCallback ; glfw3.lib(input.obj) + __imp_DragAcceptFiles ; shell32.lib(SHELL32.dll) + ??_C@_0BH@NFNALLIN@EGL?3?5Library?5not?5found@ ; glfw3.lib(egl_context.obj) + ??_C@_0BCB@NICJKIFJ@03000000c82d000020ab00000000000@ ; glfw3.lib(input.obj) + ??_C@_0BI@DCNDPIOH@unsupported?5data?5layout@ ; stb_image.obj + _glfwGetWindowOpacityWin32 ; glfw3.lib(win32_window.obj) + __report_gsfailure ; MSVCRT.lib(gs_report.obj) + ??_C@_0CG@CHGOPGBD@Mapping?5of?5a?5memory?5object?5has?5@ ; glfw3.lib(vulkan.obj) + ??_C@_0CK@DDNMEIKD@No?5version?5found?5in?5OpenGL?5vers@ ; glfw3.lib(context.obj) + ??_C@_0MO@IJHIOCMG@03000000c82d0000286700000000000@ ; glfw3.lib(input.obj) + ??_C@_0CJ@GILDAIDE@Win32?3?5Failed?5to?5retrieve?5raw?5i@ ; glfw3.lib(win32_window.obj) + __imp_DestroyWindow ; user32.lib(USER32.dll) + ldexp ; ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + ??_C@_0N@PILJCBOD@glGetStringi@ ; glfw3.lib(context.obj) + SetThreadExecutionState ; kernel32.lib(KERNEL32.dll) + ??_C@_0BA@BGJPOLDF@eglSwapInterval@ ; glfw3.lib(egl_context.obj) + ??_C@_08DIAPIMGJ@bad?5dist@ ; stb_image.obj + ??_C@_0L@FACOJKPJ@dwmapi?4dll@ ; glfw3.lib(win32_init.obj) + glfwSetWindowRefreshCallback ; glfw3.lib(window.obj) + ??_C@_0EC@MCALKGHI@Vulkan?3?5Failed?5to?5retrieve?5vkEn@ ; glfw3.lib(vulkan.obj) + ??_C@_0BCC@ICCBMGAM@03000000a306000022f600000000000@ ; glfw3.lib(input.obj) + ??_C@_0BDM@BFJPFEKL@0300000049190000030400000000000@ ; glfw3.lib(input.obj) + ??_C@_0BF@DOIMLJHJ@VK_MVK_macos_surface@ ; glfw3.lib(vulkan.obj) + ??_C@_0O@KBHBNJOK@multiple?5IHDR@ ; stb_image.obj + ReadNoFence64 ; MSVCRT.lib(guard_support.obj) + ??_C@_0BBK@JNJGFNNI@03000000c0110000059100000000000@ ; glfw3.lib(input.obj) + _glfwMaximizeWindowNull ; glfw3.lib(null_window.obj) + ??_C@_0BB@IIMLINA@bad?5huffman?5code@ ; stb_image.obj + GetModuleHandleExW ; kernel32.lib(KERNEL32.dll) + ??_C@_0BJ@MBCLFEBK@EGL_ANGLE_platform_angle@ ; glfw3.lib(egl_context.obj) + ??_C@_0BCH@PKIHDDBI@03000000ac0500005b0500000000000@ ; glfw3.lib(input.obj) + ??_C@_01LPLHEDKD@d@ ; glfw3.lib(null_window.obj) + ??_C@_0CC@BFGHOMNL@WGL_ARB_create_context_robustne@ ; glfw3.lib(wgl_context.obj) + __imp_WindowFromPoint ; user32.lib(USER32.dll) + ??_C@_0BCB@EEEEOCLB@03000000300f0000120100000000000@ ; glfw3.lib(input.obj) + __imp_fclose ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_01LFCBOECM@?4@ ; glfw3.lib(null_window.obj) + __imp_TerminateProcess ; kernel32.lib(KERNEL32.dll) + GetMonitorInfoW ; user32.lib(USER32.dll) + ??_C@_0DA@LIIDOJC@Vulkan?3?5Failed?5to?5query?5instanc@ ; glfw3.lib(vulkan.obj) + ??_C@_0BCG@KCOGNPFA@030000000d0f00008b0000000000000@ ; glfw3.lib(input.obj) + __imp_MultiByteToWideChar ; kernel32.lib(KERNEL32.dll) + _glfwInputWindowContentScale ; glfw3.lib(window.obj) + ??_C@_0BCG@FGNJGHJF@03000000c82d0000652800000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCH@KGOLOPPA@030000000d0f00005b0000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCN@JLGOFCN@0300000017270000443100000000000@ ; glfw3.lib(input.obj) + __xmm@08a914e808a914e808a914e808a914e8 ; dllmain.obj + __xmm@12d0046b12d0046b12d0046b12d0046b ; dllmain.obj + CreateDIBSection ; gdi32.lib(GDI32.dll) + GetClipboardData ; user32.lib(USER32.dll) + ??_C@_0BCD@GAEBDFLF@0300000063250000750500000000000@ ; glfw3.lib(input.obj) + ??_C@_0PF@DFFMCMNA@030000006f0e0000240100000000000@ ; glfw3.lib(input.obj) + ??_C@_0BE@BMOJHNDI@WGL_ARB_multisample@ ; glfw3.lib(wgl_context.obj) + __imp_RemovePropW ; user32.lib(USER32.dll) + _glfw_max ; glfw3.lib(init.obj) + __real@40400000 ; dllmain.obj + ??_C@_0ME@JKMAKHPN@030000007e050000072000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCO@NGLDHPOC@030000006b140000010d00000000000@ ; glfw3.lib(input.obj) + _glfw_fmaxf ; glfw3.lib(init.obj) + ClientToScreen ; user32.lib(USER32.dll) + ??_C@_0BC@EOBKJDCM@GL_ARB_robustness@ ; glfw3.lib(context.obj) + ??_C@_0BBM@CNGNJMCJ@03000000c82d0000006000000000000@ ; glfw3.lib(input.obj) + _glfwRequestWindowAttentionNull ; glfw3.lib(null_window.obj) + ??_C@_0BDB@OHAMDKML@0300000038070000818400000000000@ ; glfw3.lib(input.obj) + ChangeDisplaySettingsExW ; user32.lib(USER32.dll) + RegisterDeviceNotificationW ; user32.lib(USER32.dll) + _glfwGetWindowFrameSizeWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0BK@MBEPKAIA@Invalid?5window?5opacity?5?$CFf@ ; glfw3.lib(window.obj) + __imp_ReleaseDC ; user32.lib(USER32.dll) + _glfwSetCursorPosWin32 ; glfw3.lib(win32_window.obj) + _glfwGetVideoModesWin32 ; glfw3.lib(win32_monitor.obj) + ??_C@_0BA@MCNBDLPD@bad?5compression@ ; stb_image.obj + glfwGetWGLContext ; glfw3.lib(wgl_context.obj) + ??_C@_0BBM@IDFPDLMB@0300000066f70000010000000000000@ ; glfw3.lib(input.obj) + ReleaseDC ; user32.lib(USER32.dll) + __imp_EnterCriticalSection ; kernel32.lib(KERNEL32.dll) + _glfwGetMonitorContentScaleWin32 ; glfw3.lib(win32_monitor.obj) + ?_OptionsStorage@?1??__local_stdio_printf_options@@9@9 + ??_C@_0BF@LOGLPPDD@RtlVerifyVersionInfo@ ; glfw3.lib(win32_init.obj) + ??_C@_0O@LCPOPKLJ@rightshoulder@ ; glfw3.lib(input.obj) + ??_C@_03OFAPEBGM@?$CFs?6@ ; StgSharpC.obj + DeleteObject ; gdi32.lib(GDI32.dll) + ??_C@_0BL@OAABODH@Invalid?5gamma?5ramp?5size?5?$CFi@ ; glfw3.lib(monitor.obj) + _glfwSetWindowDecoratedNull ; glfw3.lib(null_window.obj) + ??_C@_0LO@FCDDJGBI@03000000a3060000070100000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBP@CNEONNDL@0300000032150000050700000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCK@DCNKADHN@030000006b140000005500000000000@ ; glfw3.lib(input.obj) + __real@3f800000 ; dllmain.obj + glfwSetCursorPos ; glfw3.lib(input.obj) + _glfwSetWindowAspectRatioNull ; glfw3.lib(null_window.obj) + ??_C@_0BBB@JKCCMJLF@0300000085210000020100000000000@ ; glfw3.lib(input.obj) + DestroyIcon ; user32.lib(USER32.dll) + ??_C@_0BCE@LONHMMNE@030000000d0f0000660000000000000@ ; glfw3.lib(input.obj) + _glfwTerminateOSMesa ; glfw3.lib(osmesa_context.obj) + ??_C@_0BG@ELBNFOBA@XInputGetCapabilities@ ; glfw3.lib(win32_init.obj) + ??_C@_0CM@CMAENEMJ@3?44?40?5Win32?5WGL?5Null?5EGL?5OSMesa@ ; glfw3.lib(platform.obj) + ??_C@_0BD@IOGGBMNK@wrong?5color?5format@ ; stb_image.obj + ??_C@_0DC@IPDIACJO@WGL?3?5Failed?5to?5set?5pixel?5format@ ; glfw3.lib(wgl_context.obj) + ??_C@_07IDKIDMGJ@bad?5PNM@ ; stb_image.obj + ??_C@_0CD@HJEBEGLD@A?5platform?9specific?5error?5occur@ ; glfw3.lib(init.obj) + ??_C@_0PB@DCMCKKFD@030000006f0e0000030200000000000@ ; glfw3.lib(input.obj) + __imp_SetCapture ; user32.lib(USER32.dll) + ??_C@_0BAO@BBCMHMGF@0300000032150000000900000000000@ ; glfw3.lib(input.obj) + ??_C@_0BJ@EJOHFDHH@The?5system?5uses?5DualView@ ; glfw3.lib(win32_monitor.obj) + _glfwWindowIconifiedWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0CC@HJEJGDAP@Invalid?5window?5minimum?5size?5?$CFix@ ; glfw3.lib(window.obj) + _glfwInitOSMesa ; glfw3.lib(osmesa_context.obj) + ??_C@_0BAP@BKIFCCAA@030000008f0e00000f3100000000000@ ; glfw3.lib(input.obj) + ??_C@_1O@IBNLCBOC@?$AAG?$AAL?$AAF?$AAW?$AA3?$AA0@ ; glfw3.lib(win32_window.obj) + ??_C@_01LBDDMOBJ@?$FN@ ; glfw3.lib(null_window.obj) + _glfwGetMappingNameWin32 ; glfw3.lib(win32_joystick.obj) + ??_C@_0BF@COCMEDFO@VK_KHR_win32_surface@ ; glfw3.lib(vulkan.obj) + ??_C@_0O@EMKFPNOG@OpenGL?5ES?9CL?5@ ; glfw3.lib(context.obj) + __xmm@00000000000000040000000000000000 ; dllmain.obj + glfwWindowHintString ; glfw3.lib(window.obj) + ??_C@_0DG@EPNPJJLB@WGL?3?5Failed?5to?5retrieve?5PFD?5for@ ; glfw3.lib(wgl_context.obj) + GetWindowLongW ; user32.lib(USER32.dll) + glfwSetWindowSizeCallback ; glfw3.lib(window.obj) + ??_C@_03FOKDFDHG@?$CLX?5@ ; stb_image.obj + __current_exception ; vcruntime.lib(VCRUNTIME140.dll) + ??_C@_0O@LNFLKCMF@xinput1_4?4dll@ ; glfw3.lib(win32_init.obj) + GetRawInputDeviceList ; user32.lib(USER32.dll) + ??_C@_0BB@GHMBNOIP@wglCreateContext@ ; glfw3.lib(wgl_context.obj) + _glfwCreateContextOSMesa ; glfw3.lib(osmesa_context.obj) + _glfwParseUriList ; glfw3.lib(init.obj) + ??_C@_0DF@FCIHEFHD@Vulkan?3?5Window?5surface?5creation@ ; glfw3.lib(vulkan.obj) + ??_C@_0CE@CNKFDGDO@EGL?3?5Stereo?5rendering?5not?5suppo@ ; glfw3.lib(egl_context.obj) + ??_C@_0LF@CJKOEMML@030000009b280000050000000000000@ ; glfw3.lib(input.obj) + _glfwPlatformGetModuleSymbol ; glfw3.lib(win32_module.obj) + GetCursorPos ; user32.lib(USER32.dll) + ??_C@_0CF@OFADCJLJ@A?5requested?5feature?5is?5not?5supp@ ; glfw3.lib(vulkan.obj) + ??_C@_0CJ@JDBBFPLM@Extension?5name?5cannot?5be?5an?5emp@ ; glfw3.lib(context.obj) + ??_C@_0BCB@CDINELNI@03000000f025000021c100000000000@ ; glfw3.lib(input.obj) + glfwCreateStandardCursor ; glfw3.lib(input.obj) + __imp_DeleteCriticalSection ; kernel32.lib(KERNEL32.dll) + __imp_InitializeCriticalSection ; kernel32.lib(KERNEL32.dll) + _glfwGetEGLNativeWindowWin32 ; glfw3.lib(win32_window.obj) + _glfwFreeMonitor ; glfw3.lib(monitor.obj) + __imp_GetActiveWindow ; user32.lib(USER32.dll) + __imp_PtInRect ; user32.lib(USER32.dll) + ??_C@_0BG@NOLDLPP@unsupported?5bit?5depth@ ; stb_image.obj + ??_C@_01BDACAMKP@h@ ; glfw3.lib(null_window.obj) + _glfwTerminateVulkan ; glfw3.lib(vulkan.obj) + __imp_strtok ; ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + _glfwCreateWindowNull ; glfw3.lib(null_window.obj) + MapVirtualKeyW ; user32.lib(USER32.dll) + ?_OptionsStorage@?1??__local_stdio_scanf_options@@9@4_KA ; MSVCRT.lib(default_local_stdio_options.obj) + ??_C@_0CE@GCBEILKL@Win32?3?5Failed?5to?5create?5RGBA?5bi@ ; glfw3.lib(win32_window.obj) + _onexit ; MSVCRT.lib(utility.obj) + ??_C@_0BCD@JIBGPOCI@030000004c050000a00b00000000000@ ; glfw3.lib(input.obj) + _glfwWindowFocusedNull ; glfw3.lib(null_window.obj) + ??_C@_0CH@DNHGEPME@vkEnumerateInstanceExtensionPro@ ; glfw3.lib(vulkan.obj) + _glfwInitJoysticksWin32 ; glfw3.lib(win32_joystick.obj) + ??_C@_0P@JLGKOCGN@bad?5DHT?5header@ ; stb_image.obj + __imp_SwapBuffers ; gdi32.lib(GDI32.dll) + ??_C@_0N@KBPNPPBJ@bad?5req_comp@ ; stb_image.obj + __xmm@0000201c0000201b0000201a00002019 ; glfw3.lib(wgl_context.obj) + glfwGetGamepadName ; glfw3.lib(input.obj) + __dyn_tls_init_callback + ??_C@_0BBK@CPBMMLKK@03000000fa190000f0ff00000000000@ ; glfw3.lib(input.obj) + ??_C@_0CG@GMPEPNKL@WGL?3?5Failed?5to?5retrieve?5DC?5for?5@ ; glfw3.lib(wgl_context.obj) + _glfwPlatformLockMutex ; glfw3.lib(win32_thread.obj) + __imp_SystemParametersInfoW ; user32.lib(USER32.dll) + ??_C@_09MEKLKMGE@leftstick@ ; glfw3.lib(input.obj) + _glfwInputWindowPos ; glfw3.lib(window.obj) + glfwJoystickPresent ; glfw3.lib(input.obj) + ??_C@_0CG@CHEOMKGJ@A?5device?5memory?5allocation?5has?5@ ; glfw3.lib(vulkan.obj) + ??_C@_0BBK@ECLGAJHG@03000000790000001a1800000000000@ ; glfw3.lib(input.obj) + ?__scrt_initialize_type_info@@YAXXZ ; MSVCRT.lib(tncleanup.obj) + IsIconic ; user32.lib(USER32.dll) + ??_C@_0BJ@KDFAHDEK@ERROR?3?5UNKNOWN?5EGL?5ERROR@ ; glfw3.lib(egl_context.obj) + ??_C@_0BCI@EGALPOHP@03000000a30600000cff00000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCC@HHLPIDID@030000000d0f0000550000000000000@ ; glfw3.lib(input.obj) + __xmm@00000009000000080000000c00000004 ; glfw3.lib(win32_joystick.obj) + ??_C@_0BDA@KMJLBBJI@030000000d0f0000490000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BF@NEMNBLEB@An?5event?5is?5signaled@ ; glfw3.lib(vulkan.obj) + ??_C@_0BBE@DMHFNEP@0300000071010000190400000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCE@JNCBHNAG@030000000d0f00006e0000000000000@ ; glfw3.lib(input.obj) + ??_C@_0CD@EGEEPFHF@Win32?3?5Gamma?5ramp?5size?5must?5be?5@ ; glfw3.lib(win32_monitor.obj) + ??_C@_0BCJ@BECCDJOO@030000005e040000130b00000000000@ ; glfw3.lib(input.obj) + glfwSetErrorCallback ; glfw3.lib(init.obj) + ??_C@_01JBBJJEPG@p@ ; glfw3.lib(null_window.obj) + ??_C@_0BL@MOJGOJJP@Failed?5to?5load?5OpenGL?5api?3@ ; StgSharpC.obj + ??_C@_0BD@ENICNPLM@SetProcessDPIAware@ ; glfw3.lib(win32_init.obj) + _glfwRequestWindowAttentionWin32 ; glfw3.lib(win32_window.obj) + _glfw_calloc ; glfw3.lib(init.obj) + ??_C@_0BDO@LBKBGMKN@030000005e040000a10200000000000@ ; glfw3.lib(input.obj) + __castguard_slow_path_check_nop ; MSVCRT.lib(guard_support.obj) + __castguard_slow_path_check_user_handled ; MSVCRT.lib(guard_support.obj) + ??_C@_0P@NNGPHMMK@unknown?5marker@ ; stb_image.obj + RegisterRawInputDevices ; user32.lib(USER32.dll) + ??_C@_0EP@EKHGPGGO@WGL?3?5OpenGL?5ES?5requested?5but?5WG@ ; glfw3.lib(wgl_context.obj) + __real@42112e0be8240000 ; glfw3.lib(input.obj) + ??_C@_0BF@GIAALCNJ@bad?5Image?5Descriptor@ ; stb_image.obj + glfwGetWindowSize ; glfw3.lib(window.obj) + glfwGetWin32Adapter ; glfw3.lib(win32_monitor.obj) + ??_C@_0BCN@FPGGBFLP@030000006f0e0000300100000000000@ ; glfw3.lib(input.obj) + GetLastError ; kernel32.lib(KERNEL32.dll) + strtoul ; ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) + ??_C@_0O@DEFOLMLB@bad?5size?5list@ ; stb_image.obj + ??_C@_0CJ@HDJDHLNO@Failed?5to?5enumerate?5DirectInput@ ; glfw3.lib(win32_joystick.obj) + _glfwWindowIconifiedNull ; glfw3.lib(null_window.obj) + ??_C@_0BC@CNFMOKHC@max?5value?5?$DO?565535@ ; stb_image.obj + __GSHandlerCheckCommon ; MSVCRT.lib(gshandler.obj) + __xmm@00000004000000040000000800000008 ; dllmain.obj + ??_C@_0DF@BPPFPGID@EGL?3?5Failed?5to?5find?5support?5for@ ; glfw3.lib(egl_context.obj) + ??_C@_0BBL@BGGBHDMD@03000000c0110000055500000000000@ ; glfw3.lib(input.obj) + __imp_GetStartupInfoW ; kernel32.lib(KERNEL32.dll) + __imp__crt_at_quick_exit ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ??_C@_03HKAKGGJN@?9Y?5@ ; stb_image.obj + ??_C@_0BD@MAEGKKAE@eglGetConfigAttrib@ ; glfw3.lib(egl_context.obj) + ??_C@_0PH@JHCLCGIM@030000000d0f0000160000000000780@ ; glfw3.lib(input.obj) + ??_C@_0BK@HMMKMEOH@DwmEnableBlurBehindWindow@ ; glfw3.lib(win32_init.obj) + ??_C@_0N@JCPAJAKB@invalid?5PLTE@ ; stb_image.obj + ??_C@_0BCD@OHMJGKKC@03000000790000004f1800000000000@ ; glfw3.lib(input.obj) + ??_C@_0NL@JGIMNLNL@030000004c050000371300000000000@ ; glfw3.lib(input.obj) + ??_C@_0CC@BPDGBBAB@Invalid?5window?5aspect?5ratio?5?$CFi?3@ ; glfw3.lib(window.obj) + __imp_memset ; vcruntime.lib(VCRUNTIME140.dll) + __xmm@01290128012701260125012401230122 ; glfw3.lib(win32_init.obj) + _glfwTerminateJoysticksNull ; glfw3.lib(null_joystick.obj) + ??_C@_0BCD@GAJAFIPA@030000004c050000c40500000000000@ ; glfw3.lib(input.obj) + __real@3ee8ba2e ; glfw3.lib(null_monitor.obj) + ??_C@_0BA@ENDPGCHB@tRNS?5with?5alpha@ ; stb_image.obj + __xmm@00000002000000020000000200000002 ; dllmain.obj + glfwSetCursorEnterCallback ; glfw3.lib(input.obj) + ??_C@_0BCB@CDNPOFJG@03000000341a0000030200000000000@ ; glfw3.lib(input.obj) + _glfwSetClipboardStringNull ; glfw3.lib(null_window.obj) + realloc ; ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + glfwGetTimerValue ; glfw3.lib(input.obj) + ??_C@_0BBH@EKFHCAMB@03000000e8200000605800000000000@ ; glfw3.lib(input.obj) + ??_C@_0BI@DHFJCMBA@bad?5SOS?5component?5count@ ; stb_image.obj + ??_C@_0BCI@HBCHBLOC@03000000bc200000005500000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCN@MBGMCHKG@030000006f0e0000140100000000000@ ; glfw3.lib(input.obj) + ??_C@_0M@JPDHFAGK@can?8t?5fopen@ ; stb_image.obj + ??_C@_0CA@MHMAANIG@Win32?3?5Platform?5not?5initialized@ ; glfw3.lib(win32_window.obj) + LoadLibraryA ; kernel32.lib(KERNEL32.dll) + ??_C@_0OJ@OIDHFCIJ@030000006f0e0000090100000000000@ ; glfw3.lib(input.obj) + ??_C@_0BO@NOJEGBJM@Missing?5function?5in?5allocator@ ; glfw3.lib(init.obj) + glfwGetWindowAttrib ; glfw3.lib(window.obj) + ??_C@_1BA@PICGEGJB@?$AAD?$AAI?$AAS?$AAP?$AAL?$AAA?$AAY@ ; glfw3.lib(win32_monitor.obj) + ftell ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_0BJ@KIPDFNMM@EGL_EXT_platform_wayland@ ; glfw3.lib(egl_context.obj) + ??_C@_01OJONOECF@b@ ; glfw3.lib(input.obj) + _glfwGetClipboardStringNull ; glfw3.lib(null_window.obj) + __imp_IsZoomed ; user32.lib(USER32.dll) + __imp_TrackMouseEvent ; user32.lib(USER32.dll) + ??_C@_07MALOAKCI@invalid@ ; stb_image.obj + __scrt_initialize_onexit_tables ; MSVCRT.lib(utility.obj) + ??_C@_0PF@JBCCEDOB@03000000300f0000001100000000000@ ; glfw3.lib(input.obj) + ??_C@_0LP@DBLEIEDM@03000000a30c0000240000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBP@KNBKPMNJ@0300000038070000808100000000000@ ; glfw3.lib(input.obj) + __xmm@00000004000000080000000800000008 ; dllmain.obj + glfwSetMouseButtonCallback ; glfw3.lib(input.obj) + ??_C@_0BCO@DODDAFEB@03000000efbe0000edfe00000000000@ ; glfw3.lib(input.obj) + ??_C@_0CB@HHJIGJHK@Win32?3?5Failed?5to?5load?5user32?4dl@ ; glfw3.lib(win32_init.obj) + glfwSetWindowMonitor ; glfw3.lib(window.obj) + __imp_RtlLookupFunctionEntry ; kernel32.lib(KERNEL32.dll) + ??_C@_0CK@DCPJCPHH@EGL?3?5Failed?5to?5load?5required?5en@ ; glfw3.lib(egl_context.obj) + ??_C@_0P@PKABKPLF@Invalid?5key?5?$CFi@ ; glfw3.lib(input.obj) + ??_C@_08CBHCFJJK@platform@ ; glfw3.lib(input.obj) + _glfwAllocJoystick ; glfw3.lib(input.obj) + ??_C@_0BCD@BBICEOLK@78696e7075740300000000000000000@ ; glfw3.lib(input.obj) + ??_C@_0CJ@MHLGDLLP@EGL?3?5Failed?5to?5create?5window?5su@ ; glfw3.lib(egl_context.obj) + ??_C@_0BBG@NOFGFFJE@03000000bc200000601200000000000@ ; glfw3.lib(input.obj) + __imp___C_specific_handler ; vcruntime.lib(VCRUNTIME140.dll) + ??_C@_06NDOKKIDJ@?$CD?$DPRGBE@ ; stb_image.obj + ??_C@_0BCE@LLLAMHO@030000004f04000007d000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BA@OBKOPAFL@bad?5zlib?5header@ ; stb_image.obj + _glfwInputMonitor ; glfw3.lib(monitor.obj) + ??_C@_0BB@CNEIGGLC@Null?5SuperNoop?50@ ; glfw3.lib(null_monitor.obj) + ??_C@_0CE@PCLEMLLO@The?5requested?5format?5is?5unavail@ ; glfw3.lib(init.obj) + __report_securityfailure ; MSVCRT.lib(gs_report.obj) + __real@46ffff00 ; glfw3.lib(win32_joystick.obj) + __imp_qsort ; ucrt.lib(api-ms-win-crt-utility-l1-1-0.dll) + __imp_CloseClipboard ; user32.lib(USER32.dll) + _glfwDestroyCursorNull ; glfw3.lib(null_window.obj) + glfwGetWindowMonitor ; glfw3.lib(window.obj) + ??_C@_0BBO@HLNJIBPP@78696e7075740100000000000000000@ ; glfw3.lib(input.obj) + __scrt_stub_for_acrt_uninitialize_critical ; MSVCRT.lib(ucrt_stubs.obj) + FlashWindow ; user32.lib(USER32.dll) + _glfwFramebufferTransparentNull ; glfw3.lib(null_window.obj) + _glfwWindowFocusedWin32 ; glfw3.lib(win32_window.obj) + strncpy ; ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + __imp_CreateWindowExW ; user32.lib(USER32.dll) + __imp_DestroyIcon ; user32.lib(USER32.dll) + ??_C@_0CA@LDAANPIM@Entry?5point?5retrieval?5is?5broken@ ; glfw3.lib(context.obj) + __scrt_unhandled_exception_filter ; MSVCRT.lib(utility_desktop.obj) + glfwGetPrimaryMonitor ; glfw3.lib(monitor.obj) + ??_C@_0MH@GNCKGMLL@03000000c82d0000801000000000000@ ; glfw3.lib(input.obj) + __castguard_check_failure_user_handled ; MSVCRT.lib(guard_support.obj) + ??_C@_0BBN@EJPLMIPB@03000000bd12000003c000001001000@ ; glfw3.lib(input.obj) + ??_C@_0BDE@CKLILCMC@030000005e040000ff0200000000000@ ; glfw3.lib(input.obj) + SetCursor ; user32.lib(USER32.dll) + _glfwPlatformLoadModule ; glfw3.lib(win32_module.obj) + ??_C@_0CL@JEJIBJNG@Win32?3?5Failed?5to?5convert?5string@ ; glfw3.lib(win32_init.obj) + __imp_ChangeDisplaySettingsExW ; user32.lib(USER32.dll) + ??_C@_0CI@NAJLKNKH@OSMesa?3?5Failed?5to?5retrieve?5colo@ ; glfw3.lib(osmesa_context.obj) + __imp_RtlCaptureContext ; kernel32.lib(KERNEL32.dll) + ??_C@_0BA@MDMBDDFG@bad?5comp?5method@ ; stb_image.obj + ??_C@_0BCE@MNGEPDHI@03000000786901006e7000000000000@ ; glfw3.lib(input.obj) + ??_C@_07DPPMCAKL@corrupt@ ; stb_image.obj + ??_C@_0BBM@OJGJOKHO@0300000034120000adbe00000000000@ ; glfw3.lib(input.obj) + ??_C@_0CE@KAEELGKL@WGL?3?5Failed?5to?5create?5dummy?5con@ ; glfw3.lib(wgl_context.obj) + __imp_CreateDIBSection ; gdi32.lib(GDI32.dll) + ??_C@_0BBK@GEMHLGCN@0300000049190000020400000000000@ ; glfw3.lib(input.obj) + ??_C@_0BN@FNDGKECA@GL_KHR_context_flush_control@ ; glfw3.lib(context.obj) + ??_C@_0CB@HAFFDHLH@The?5requested?5API?5is?5unavailabl@ ; glfw3.lib(init.obj) + ??_C@_0BBF@BFOGCKNH@030000000d0f00002d0000000000000@ ; glfw3.lib(input.obj) + ??_C@_0CD@JDEAKJCI@EGL?3?5Failed?5to?5load?5client?5libr@ ; glfw3.lib(egl_context.obj) + ??_C@_0BH@OBINMOBC@integer?5parse?5overflow@ ; stb_image.obj + __imp_GetRawInputData ; user32.lib(USER32.dll) + __imp_GlobalAlloc ; kernel32.lib(KERNEL32.dll) + _glfwSetWindowSizeLimitsNull ; glfw3.lib(null_window.obj) + _glfwSetWindowSizeWin32 ; glfw3.lib(win32_window.obj) + CreateDCW ; gdi32.lib(GDI32.dll) + __xmm@00000006000000020000000300000001 ; glfw3.lib(win32_joystick.obj) + ??_C@_0BAC@DNICHFEF@03000000341a0000010800000000000@ ; glfw3.lib(input.obj) + ??_C@_0CB@FLGENKMO@WGL?3?5Failed?5to?5load?5opengl32?4dl@ ; glfw3.lib(wgl_context.obj) + ??_C@_0BL@PBGFNEKP@Invalid?5platform?5ID?50x?$CF08X@ ; glfw3.lib(platform.obj) + SetDeviceGammaRamp ; gdi32.lib(GDI32.dll) + SetWindowTextW ; user32.lib(USER32.dll) + _glfwSetWindowMousePassthroughWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0CF@GFMDJIA@WGL?3?5Failed?5to?5create?5OpenGL?5co@ ; glfw3.lib(wgl_context.obj) + _glfwSetWindowOpacityWin32 ; glfw3.lib(win32_window.obj) + glfwExtensionSupported ; glfw3.lib(context.obj) + ??_C@_0BCF@BMOGEGNJ@03000000c82d0000016000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCG@GLPHDIGN@03000000d620000010a700000000000@ ; glfw3.lib(input.obj) + InitializeSListHead ; kernel32.lib(KERNEL32.dll) + __imp__execute_onexit_table ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ??_C@_0CE@BEELAIPG@The?5GLFW?5library?5is?5not?5initial@ ; glfw3.lib(init.obj) + ??_C@_02JDPG@rb@ ; stb_image.obj + glfwGetRequiredInstanceExtensions ; glfw3.lib(vulkan.obj) + _glfwPlatformGetTimerValue ; glfw3.lib(win32_time.obj) + ??_C@_0M@JGMCBLGG@bad?5AC?5huff@ ; stb_image.obj + __scrt_stub_for_initialize_mta ; MSVCRT.lib(utility_desktop.obj) + glfwSetWindowUserPointer ; glfw3.lib(window.obj) + ??_C@_0BCG@JDIGBKMP@030000000d0f00006a0000000000000@ ; glfw3.lib(input.obj) + strspn ; ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + SetFocus ; user32.lib(USER32.dll) + ??_C@_0BDC@PMNHHHHJ@03000000c82d0000012100000000000@ ; glfw3.lib(input.obj) + _guard_icall_checks_enforced ; MSVCRT.lib(guard_support.obj) + ??_C@_0BBP@NCCKJBD@030000006d04000016c200000000000@ ; glfw3.lib(input.obj) + ??_C@_07EEJOMGGP@bad?5SOS@ ; stb_image.obj + TlsAlloc ; kernel32.lib(KERNEL32.dll) + fread ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_09FLKFJBLM@ntdll?4dll@ ; glfw3.lib(win32_init.obj) + ??_C@_0BCH@LIIGHPB@03000000d62000006d5700000000000@ ; glfw3.lib(input.obj) + SetRect ; user32.lib(USER32.dll) + SetWindowLongW ; user32.lib(USER32.dll) + ??_C@_0BBD@DBNHIIMF@0300000025090000e80300000000000@ ; glfw3.lib(input.obj) + ??_C@_0BP@CDGGFNNF@EGL_KHR_get_all_proc_addresses@ ; glfw3.lib(egl_context.obj) + ??_C@_0BF@JHMFGJBN@Graphics?5mode?5failed@ ; glfw3.lib(win32_monitor.obj) + ??_C@_0LO@BOPGPFGO@03000000ff000000cb0100000000000@ ; glfw3.lib(input.obj) + ??_C@_0L@PJHPAMCH@bad?5header@ ; stb_image.obj + ??_C@_0BI@POJNLJDO@Invalid?5mouse?5button?5?$CFi@ ; glfw3.lib(input.obj) + ??_C@_0OH@PKEJNDDF@030000000d0f0000870000000000000@ ; glfw3.lib(input.obj) + ??_C@_01GBGANLPD@0@ ; glfw3.lib(null_window.obj) + ??_C@_0BF@FMIKFMMH@EGL_EXT_platform_x11@ ; glfw3.lib(egl_context.obj) + ??_C@_0OG@DMCABHAN@030000009b280000600000000000000@ ; glfw3.lib(input.obj) + __imp_LoadCursorW ; user32.lib(USER32.dll) + glfwSetJoystickUserPointer ; glfw3.lib(input.obj) + _glfwIsWindows10BuildOrGreaterWin32 ; glfw3.lib(win32_init.obj) + ??_C@_0KB@PHAGMDLE@03000000a30c0000250000000000000@ ; glfw3.lib(input.obj) + __castguard_check_failure_os_handled_fptr ; MSVCRT.lib(guard_support.obj) + ??_C@_0CC@HDNEDJNI@A?5validation?5layer?5found?5an?5err@ ; glfw3.lib(vulkan.obj) + ??_C@_0BCH@KDJCJEOK@03000000300f0000070100000000000@ ; glfw3.lib(input.obj) + DragAcceptFiles ; shell32.lib(SHELL32.dll) + ??_C@_0BCF@MBPBHECE@03000000c82d0000009000000000000@ ; glfw3.lib(input.obj) + ??_C@_0CI@MPJNGPNP@EGL?3?5Failed?5to?5make?5context?5cur@ ; glfw3.lib(egl_context.obj) + glfwGetJoystickButtons ; glfw3.lib(input.obj) + _glfwUpdateGamepadGUIDNull ; glfw3.lib(null_joystick.obj) + GetMessageTime ; user32.lib(USER32.dll) + __imp_terminate ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ??_C@_0BCO@GFHGFBHD@030000004f04000004b300000000000@ ; glfw3.lib(input.obj) + ??_C@_07IANEBNLB@not?5BMP@ ; stb_image.obj + __imp_malloc ; ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + ??_C@_0BCO@NPMGKBDH@030000006f0e00002f0100000000000@ ; glfw3.lib(input.obj) + ??_C@_0BA@MDNKOBMC@bad?5codelengths@ ; stb_image.obj + glfwGetTime ; glfw3.lib(input.obj) + _glfwPlatformUnlockMutex ; glfw3.lib(win32_thread.obj) + ??_C@_07CAIJGPF@file?3?1?1@ ; glfw3.lib(init.obj) + glfwSetInputMode ; glfw3.lib(input.obj) + __imp_LoadLibraryA ; kernel32.lib(KERNEL32.dll) + _glfwWaitEventsNull ; glfw3.lib(null_window.obj) + _glfwPlatformGetTimerFrequency ; glfw3.lib(win32_time.obj) + _glfwInputKey ; glfw3.lib(input.obj) + _glfwGetCursorPosWin32 ; glfw3.lib(win32_window.obj) + glfwGetJoystickHats ; glfw3.lib(input.obj) + glfwSetWindowFocusCallback ; glfw3.lib(window.obj) + _glfwInputErrorWin32 ; glfw3.lib(win32_init.obj) + ??_C@_0BCE@DAIILIHH@0300000011010000311400000000000@ ; glfw3.lib(input.obj) + __imp_SetLayeredWindowAttributes ; user32.lib(USER32.dll) + _glfwSetClipboardStringWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0P@FBBCPGMN@invalid?5filter@ ; stb_image.obj + _glfwCreateCursorWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0O@GLACEBNI@xinput1_2?4dll@ ; glfw3.lib(win32_init.obj) + ??_C@_0P@DOGMHEBI@no?5preset?5dict@ ; stb_image.obj + GetWindowRect ; user32.lib(USER32.dll) + WindowFromPoint ; user32.lib(USER32.dll) + _crt_atexit ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + GetDeviceGammaRamp ; gdi32.lib(GDI32.dll) + ??_C@_07ECNCNLIK@not?5PSD@ ; stb_image.obj + __imp_ToUnicode ; user32.lib(USER32.dll) + ??_C@_0O@NALGGDJF@Out?5of?5memory@ ; glfw3.lib(init.obj) + ??_C@_0CC@NOHNODHG@Invalid?5window?5maximum?5size?5?$CFix@ ; glfw3.lib(window.obj) + ??_C@_0CK@JKJFDJLH@WGL?3?5Failed?5to?5make?5dummy?5conte@ ; glfw3.lib(wgl_context.obj) + ??_C@_0OG@IHHMBDDK@030000009b280000320000000000000@ ; glfw3.lib(input.obj) + __real@3fdd1745c0000000 ; dllmain.obj + ??_C@_0BH@NCJDMLMG@WGL_ARB_create_context@ ; glfw3.lib(wgl_context.obj) + glfwWindowHint ; glfw3.lib(window.obj) + RemovePropW ; user32.lib(USER32.dll) + ??_C@_0BBJ@GCDIHNCJ@03000000b8050000041000000000000@ ; glfw3.lib(input.obj) + __imp___current_exception_context ; vcruntime.lib(VCRUNTIME140.dll) + __imp_FreeLibrary ; kernel32.lib(KERNEL32.dll) + ??_C@_0BBI@BNPIODHF@03000000101c0000171c00000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCA@OLMCGDIA@03000000c82d0000202800000000000@ ; glfw3.lib(input.obj) + _glfwSetWindowIconNull ; glfw3.lib(null_window.obj) + ??_C@_0BCF@HEDDGGCD@030000004f04000015b300000000000@ ; glfw3.lib(input.obj) + __imp_fgetc ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + glfwGetPhysicalDevicePresentationSupport ; glfw3.lib(vulkan.obj) + ??_C@_0BCG@MGGCIPBD@03000000bd12000002e000000000000@ ; glfw3.lib(input.obj) + ??_C@_0N@OJEJPFOD@504944564944@ ; glfw3.lib(win32_joystick.obj) + ??_C@_0EK@HBJBDMAL@Cannot?5make?5current?5with?5a?5wind@ ; glfw3.lib(context.obj) + ??_C@_0EE@ICKHNPHB@An?5EGLDisplay?5argument?5does?5not@ ; glfw3.lib(egl_context.obj) + ??_C@_0BBM@PJHGKLCN@03000000300f00000b0100000000000@ ; glfw3.lib(input.obj) + ??_C@_0DA@IIGLKABA@Win32?3?5Failed?5to?5convert?5joysti@ ; glfw3.lib(win32_joystick.obj) + ??_C@_0L@CEBLLDFF@GLESv2?4dll@ ; glfw3.lib(egl_context.obj) + ??_C@_0CH@KLCPDMM@EGL?5is?5not?5or?5could?5not?5be?5init@ ; glfw3.lib(egl_context.obj) + ??_C@_0KI@EKGGNLIH@030000004f04000087b600000000000@ ; glfw3.lib(input.obj) + ??_C@_0M@GNEHAHOH@bad?5SOS?5len@ ; stb_image.obj + __imp_ldexp ; ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + _glfwChooseFBConfig ; glfw3.lib(context.obj) + ??_C@_0BCD@MDFEPGHO@030000006b140000010c00000000000@ ; glfw3.lib(input.obj) + __imp_SetRect ; user32.lib(USER32.dll) + glfwSetCursor ; glfw3.lib(input.obj) + ??_C@_0CO@HAIMLOLL@EGL?3?5Failed?5to?5find?5support?5for@ ; glfw3.lib(egl_context.obj) + GetLayeredWindowAttributes ; user32.lib(USER32.dll) + _glfwPostEmptyEventWin32 ; glfw3.lib(win32_window.obj) + IsProcessorFeaturePresent ; kernel32.lib(KERNEL32.dll) + ??_C@_0OJ@OOLHGLBN@03000000d8140000086200000000000@ ; glfw3.lib(input.obj) + glfwGetMonitorWorkarea ; glfw3.lib(monitor.obj) + ??_C@_0BBL@MNJAPGHD@03000000bc200000631200000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBJ@MLHIDNOG@03000000b8050000061000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBP@BICCDPK@030000000d0f00004d0000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBP@CEOMIJKI@030000006d040000d1ca00000000000@ ; glfw3.lib(input.obj) + __imp_MapVirtualKeyW ; user32.lib(USER32.dll) + __imp_SetCursor ; user32.lib(USER32.dll) + __imp_strtol ; ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) + ??_C@_0ME@PAHEPGN@030000007e050000072000000100000@ ; glfw3.lib(input.obj) + _glfwSetRawMouseMotionWin32 ; glfw3.lib(win32_window.obj) + _glfwSetWindowFloatingNull ; glfw3.lib(null_window.obj) + ??_C@_01NOFIACDB@w@ ; glfw3.lib(null_window.obj) + QueryPerformanceFrequency ; kernel32.lib(KERNEL32.dll) + __castguard_check_failure_debugbreak ; MSVCRT.lib(guard_support.obj) + __imp___stdio_common_vsscanf ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_0BF@HABDPBMA@wglGetCurrentContext@ ; glfw3.lib(wgl_context.obj) + ?initialize_environment@__scrt_narrow_environment_policy@@SAHXZ ; MSVCRT.lib(utility.obj) + glfwWaitEvents ; glfw3.lib(window.obj) + ??_C@_0LJ@DONCMJNG@03000000c82d0000035100000000000@ ; glfw3.lib(input.obj) + free ; ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + __imp_SetWindowTextW ; user32.lib(USER32.dll) + ??_C@_0BBJ@KBEDPJIE@030000008f0e0000030000000000000@ ; glfw3.lib(input.obj) + _glfwInitJoysticksNull ; glfw3.lib(null_joystick.obj) + __xmm@fa7efa7efa7efa7efa7efa7efa7efa7e ; dllmain.obj + LoadImageW ; user32.lib(USER32.dll) + DestroyWindow ; user32.lib(USER32.dll) + __imp_IsDebuggerPresent ; kernel32.lib(KERNEL32.dll) + __imp_GetSystemTimeAsFileTime ; kernel32.lib(KERNEL32.dll) + MsgWaitForMultipleObjects ; user32.lib(USER32.dll) + ??_C@_0CA@LFIDGAHJ@Invalid?5OpenGL?5ES?5version?5?$CFi?4?$CFi@ ; glfw3.lib(context.obj) + _glfwSetWindowMousePassthroughNull ; glfw3.lib(null_window.obj) + ??_C@_0PF@BCABPIDK@030000006e050000072000000000000@ ; glfw3.lib(input.obj) + __imp_GetSystemMetrics ; user32.lib(USER32.dll) + ??_C@_0BDA@HBJEDFJC@0300000038070000508200000000000@ ; glfw3.lib(input.obj) + ??_C@_08GGMBIFE@bad?5file@ ; stb_image.obj + ??_C@_0CJ@KOFEFGNB@The?5requested?5API?5version?5is?5un@ ; glfw3.lib(init.obj) + ??_C@_0BBP@NILOBHMB@0300000032150000070700000000000@ ; glfw3.lib(input.obj) + ??_C@_0BF@CJMIIMBG@GL_ARB_compatibility@ ; glfw3.lib(context.obj) + ??_C@_0O@KOJFNJDA@GLESv1_CM?4dll@ ; glfw3.lib(egl_context.obj) + _glfwPollJoystickNull ; glfw3.lib(null_joystick.obj) + ??_C@_0EF@NMJGLODJ@Cannot?5query?5extension?5without?5@ ; glfw3.lib(context.obj) + GetCurrentProcess ; kernel32.lib(KERNEL32.dll) + ??_C@_0MA@LPHGGGL@0300000025090000012800000000000@ ; glfw3.lib(input.obj) + __imp_GetKeyState ; user32.lib(USER32.dll) + ??_C@_0BBG@BDLNPAJM@03000000242f0000730000000000000@ ; glfw3.lib(input.obj) + _glfwPollEventsNull ; glfw3.lib(null_window.obj) + _glfwInputCursorEnter ; glfw3.lib(input.obj) + __scrt_uninitialize_crt ; MSVCRT.lib(utility.obj) + ??_C@_01FDFGLJHB@2@ ; glfw3.lib(null_window.obj) + ??_C@_07KFDJIKCK@?$CD?$DPRGBE?6@ ; stb_image.obj + __imp_realloc ; ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + glfwSetDropCallback ; glfw3.lib(input.obj) + __xmm@00000000000000010003600100030001 ; glfw3.lib(window.obj) + _glfwSetRawMouseMotionNull ; glfw3.lib(null_window.obj) + __scrt_is_ucrt_dll_in_use ; MSVCRT.lib(ucrt_detection.obj) + ??_C@_01JEJKBAGA@g@ ; glfw3.lib(null_window.obj) + GetWindowPlacement ; user32.lib(USER32.dll) + _glfwWindowHoveredNull ; glfw3.lib(null_window.obj) + ??_C@_0EE@FBMMOIJB@A?5NativeWindowType?5argument?5doe@ ; glfw3.lib(egl_context.obj) + ??_C@_0PP@COADMKLJ@030000006d0400000ac200000000000@ ; glfw3.lib(input.obj) + _glfwFreeJoystick ; glfw3.lib(input.obj) + ??_C@_07IEJCHBDI@bad?5BMP@ ; stb_image.obj + ??_C@_06EOBKMJJD@righty@ ; glfw3.lib(input.obj) + glfwSetClipboardString ; glfw3.lib(input.obj) + __xmm@11c8e09e11c8e09e11c8e09e11c8e09e ; dllmain.obj + LeaveCriticalSection ; kernel32.lib(KERNEL32.dll) + __imp_GetClipboardData ; user32.lib(USER32.dll) + __scrt_is_nonwritable_in_current_image ; MSVCRT.lib(utility.obj) + ??_C@_0BCG@NFDJDGAI@0300000079000000d21800000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBB@HMBGBDKD@03000000fa190000070600000000000@ ; glfw3.lib(input.obj) + ??_C@_0P@PNPBPNLI@eglMakeCurrent@ ; glfw3.lib(egl_context.obj) + ??_C@_0BCF@IAGAPBPO@030000000d0f0000090000000000000@ ; glfw3.lib(input.obj) + _glfwRefreshContextAttribs ; glfw3.lib(context.obj) + ??_C@_0BBK@KLAOAEFP@0300000063250000230600000000000@ ; glfw3.lib(input.obj) + _glfwPlatformFreeModule ; glfw3.lib(win32_module.obj) + ??_C@_0BH@JFGBLLKC@FORMAT?$DN32?9bit_rle_rgbe@ ; stb_image.obj + ??_C@_0CJ@HAGOIHNO@WGL?3?5Failed?5to?5set?5selected?5pix@ ; glfw3.lib(wgl_context.obj) + __imp_UnregisterClassW ; user32.lib(USER32.dll) + ?_OptionsStorage@?1??__local_stdio_scanf_options@@9@9 + fclose ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_0M@ONOEDIJO@dinput8?4dll@ ; glfw3.lib(win32_init.obj) + atexit ; MSVCRT.lib(utility.obj) + ??_C@_04KBFEPHFH@S?$IA?v4@ ; stb_image.obj + ??_C@_0BDD@MHIPFANA@0300000049190000190400000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBO@ILBJPILH@030000006f0e0000141300000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBK@LLHMDGJD@03000000120c0000f61c00000000000@ ; glfw3.lib(input.obj) + SetLayeredWindowAttributes ; user32.lib(USER32.dll) + __imp_TlsSetValue ; kernel32.lib(KERNEL32.dll) + WaitMessage ; user32.lib(USER32.dll) + ??_C@_0CI@JDDJIGNN@Invalid?5context?5release?5behavio@ ; glfw3.lib(context.obj) + GetRawInputData ; user32.lib(USER32.dll) + __real@ffefffffffffffff ; glfw3.lib(input.obj) + ??_C@_0BL@MIAEELOL@OSMesaCreateContextAttribs@ ; glfw3.lib(osmesa_context.obj) + _glfwTerminateJoysticksWin32 ; glfw3.lib(win32_joystick.obj) + ??_C@_0BCG@PCDGGODL@03000000c62400001a8900000000000@ ; glfw3.lib(input.obj) + ??_C@_0BD@IJCCAMHG@DirectInput8Create@ ; glfw3.lib(win32_init.obj) + ??_C@_0BBO@PNIOEBFD@0300000079000000020000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BH@JADLEPAM@EGL_EXT_present_opaque@ ; glfw3.lib(egl_context.obj) + EnumDisplaySettingsExW ; user32.lib(USER32.dll) + ??_C@_01KICIPPFI@?2@ ; glfw3.lib(null_window.obj) + __GSHandlerCheck ; MSVCRT.lib(gshandler.obj) + ??_C@_0OO@CIFMNJJH@030000004f0400000ab100000000000@ ; glfw3.lib(input.obj) + __imp_VerSetConditionMask ; kernel32.lib(KERNEL32.dll) + __imp___stdio_common_vsprintf ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_0BM@IGBABBBF@Failed?5to?5write?5to?5registry@ ; glfw3.lib(win32_monitor.obj) + ??_C@_0BA@PCPJHDKJ@tRNS?5after?5IDAT@ ; stb_image.obj + ??_C@_0BBM@NFNOIOJB@0300000063250000260500000000000@ ; glfw3.lib(input.obj) + ??_C@_08NOGIMCHF@outofmem@ ; stb_image.obj + __imp_RegisterDeviceNotificationW ; user32.lib(USER32.dll) + ??_C@_07EAKGIKCB@EGL?4dll@ ; glfw3.lib(egl_context.obj) + __imp_SetFocus ; user32.lib(USER32.dll) + ??_C@_0BC@FFKMKEGM@wglGetProcAddress@ ; glfw3.lib(wgl_context.obj) + ??_C@_0ED@FEABOOIM@Context?5profiles?5are?5only?5defin@ ; glfw3.lib(context.obj) + CreateWindowExW ; user32.lib(USER32.dll) + glfwSetMonitorCallback ; glfw3.lib(monitor.obj) + __imp_strncmp ; ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + _glfwGetVideoModesNull ; glfw3.lib(null_monitor.obj) + ??_C@_0BCE@MPKCEKIF@030000006b14000001a100000000000@ ; glfw3.lib(input.obj) + __imp___std_type_info_destroy_list ; vcruntime.lib(VCRUNTIME140.dll) + ??_C@_0GG@ODICGIHF@The?5current?5surface?5of?5the?5call@ ; glfw3.lib(egl_context.obj) + __imp_ftell ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + glfwGetMonitorPos ; glfw3.lib(monitor.obj) + ferror ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + _glfwPollEventsWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0BBP@HFNLKKMF@030000000d0f0000540000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCB@GILNGNCB@0300000025090000668800000000000@ ; glfw3.lib(input.obj) + _glfwInputScroll ; glfw3.lib(input.obj) + ??_C@_0EH@CMDCLIEA@Forward?9compatibility?5is?5only?5d@ ; glfw3.lib(context.obj) + strtok ; ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + ??_C@_0M@EENLKPDI@bad?5APP?5len@ ; stb_image.obj + __imp_EmptyClipboard ; user32.lib(USER32.dll) + ??_C@_01MHEDDDHA@v@ ; glfw3.lib(null_window.obj) + __imp_BringWindowToTop ; user32.lib(USER32.dll) + ??_C@_0CH@GBHCOIGC@A?5fence?5or?5query?5has?5not?5yet?5co@ ; glfw3.lib(vulkan.obj) + ??_C@_0BCG@GAMGMHOH@03000000c82d0000026100000000000@ ; glfw3.lib(input.obj) + ??_C@_0BH@MDMCFBDG@eglCreateWindowSurface@ ; glfw3.lib(egl_context.obj) + _glfwGetKeyScancodeWin32 ; glfw3.lib(win32_window.obj) + __imp_strtoul ; ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) + ??_C@_0DF@EFFMOKHE@Requested?5OpenGL?5ES?5version?5?$CFi?4@ ; glfw3.lib(context.obj) + __xmm@013501340133013201310130012f012e ; glfw3.lib(win32_init.obj) + ??_C@_05NDJBMDKM@lefty@ ; glfw3.lib(input.obj) + _glfwFramebufferTransparentWin32 ; glfw3.lib(win32_window.obj) + ReadPointerNoFence ; MSVCRT.lib(guard_support.obj) + ??_C@_0BCO@JIFBCBLK@0300000055090000147200000000000@ ; glfw3.lib(input.obj) + ??_C@_0BF@INJHJNOL@OSMesaGetProcAddress@ ; glfw3.lib(osmesa_context.obj) + _glfwPlatformSetTls ; glfw3.lib(win32_thread.obj) + ??_C@_0BCK@OFGGBLGN@03000000d62000001d5700000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBN@MLCKKOPD@030000002a060000102400000000000@ ; glfw3.lib(input.obj) + glfwCreateCursor ; glfw3.lib(input.obj) + ??_C@_0M@EPMOIECP@bad?5DNL?5len@ ; stb_image.obj + ??_C@_0CH@CKFBCGDL@OSMesa?3?5Failed?5to?5make?5context?5@ ; glfw3.lib(osmesa_context.obj) + ??_C@_0CP@FOBJNCLA@vkGetPhysicalDeviceWin32Present@ ; glfw3.lib(win32_window.obj) + ??_C@_0BCA@KPDCPHP@78696e7075740500000000000000000@ ; glfw3.lib(input.obj) + ??_C@_01GEODFPGF@?8@ ; glfw3.lib(null_window.obj) + _glfwSetCursorPosNull ; glfw3.lib(null_window.obj) + ??_C@_0BDC@BPGFOMKB@03000000782300000a1000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCA@LOJNHICN@03000000a30600000b0400000000000@ ; glfw3.lib(input.obj) + ??_C@_01MCMALHOG@a@ ; glfw3.lib(input.obj) + ??_C@_0EO@EKFIJHGG@An?5unrecognized?5attribute?5or?5at@ ; glfw3.lib(egl_context.obj) + __imp_PostMessageW ; user32.lib(USER32.dll) + ??_C@_0CK@NHHHNGID@The?5specified?5cursor?5shape?5is?5u@ ; glfw3.lib(init.obj) + ??_C@_0BB@PIPBCKIA@read?5past?5buffer@ ; stb_image.obj + CreateIconIndirect ; user32.lib(USER32.dll) + glfwInitHint ; glfw3.lib(init.obj) + GetDeviceCaps ; gdi32.lib(GDI32.dll) + ??_C@_01KMDKNFGN@?1@ ; glfw3.lib(null_window.obj) + SwapBuffers ; gdi32.lib(GDI32.dll) + __imp__seh_filter_dll ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + RtlVirtualUnwind ; kernel32.lib(KERNEL32.dll) + __stdio_common_vsprintf ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + __imp_GetWindowRect ; user32.lib(USER32.dll) + ??_C@_0BAP@FBAIDBI@0300000015200000018200000000000@ ; glfw3.lib(input.obj) + glfwSetGamma ; glfw3.lib(monitor.obj) + _glfwSetWindowResizableNull ; glfw3.lib(null_window.obj) + ??_C@_0BCE@JJDBCGKI@03000000c82d0000003100000000000@ ; glfw3.lib(input.obj) + ??_C@_06LJIHDFHI@bad?5TQ@ ; stb_image.obj + ??_C@_0DD@OOKDLCED@A?5requested?5format?5is?5not?5suppo@ ; glfw3.lib(vulkan.obj) + VerSetConditionMask ; kernel32.lib(KERNEL32.dll) + ??_C@_0CI@LDEHPBDB@Win32?3?5Failed?5to?5create?5standar@ ; glfw3.lib(win32_window.obj) + _glfwGetRequiredInstanceExtensionsWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0FE@ILJLDKCD@A?5swapchain?5no?5longer?5matches?5t@ ; glfw3.lib(vulkan.obj) + ??_C@_0L@GICFCFGJ@OSMesa?4dll@ ; glfw3.lib(osmesa_context.obj) + ??_C@_0BO@NDHCIMGN@WGL?3?5Platform?5not?5initialized@ ; glfw3.lib(wgl_context.obj) + __imp_SetClipboardData ; user32.lib(USER32.dll) + ??_C@_01FJMABOPO@x@ ; glfw3.lib(input.obj) + DragQueryPoint ; shell32.lib(SHELL32.dll) + __xmm@80808080808080808080808080808080 ; dllmain.obj + _glfw_min ; glfw3.lib(init.obj) + ??_C@_0BA@PLHGLONG@IDAT?5size?5limit@ ; stb_image.obj + _glfwUpdateKeyNamesWin32 ; glfw3.lib(win32_init.obj) + ??_C@_0CD@FOMFMBIL@WGL_EXT_create_context_es2_prof@ ; glfw3.lib(wgl_context.obj) + ??_C@_0O@MKGNGALN@invalid?5width@ ; stb_image.obj + glfwRestoreWindow ; glfw3.lib(window.obj) + ??_C@_0BCN@BNINGACN@030000006f0e0000140200000000000@ ; glfw3.lib(input.obj) + ??_C@_0BO@JCPCDDEA@Invalid?5cursor?5position?5?$CFf?5?$CFf@ ; glfw3.lib(input.obj) + ??_C@_01IIACKFLH@q@ ; glfw3.lib(null_window.obj) + _glfwSetWindowIconWin32 ; glfw3.lib(win32_window.obj) + glfwGetInstanceProcAddress ; glfw3.lib(vulkan.obj) + ??_C@_0MA@ECCMLEBD@03000000bd12000015d000000000000@ ; glfw3.lib(input.obj) + _glfwSetVideoModeWin32 ; glfw3.lib(win32_monitor.obj) + ??_C@_0BDB@JPJOJNNC@0300000032150000001100000000000@ ; glfw3.lib(input.obj) + __scrt_stub_for_acrt_uninitialize ; MSVCRT.lib(ucrt_stubs.obj) + ??_C@_0BCJ@BOGEPGKL@0300000032150000020400000000000@ ; glfw3.lib(input.obj) + __imp_GetDeviceGammaRamp ; gdi32.lib(GDI32.dll) + __imp_WaitMessage ; user32.lib(USER32.dll) + ??_C@_0NA@FFFKKMHD@030000001008000001e100000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCG@OOIEPIIL@030000000d0f00006b0000000000000@ ; glfw3.lib(input.obj) + ??_C@_0CD@CBFNHKPK@78696e707574?$CF02x000000000000000@ ; glfw3.lib(win32_joystick.obj) + ??_C@_0CE@KNFDBMCE@Invalid?5image?5dimensions?5for?5cu@ ; glfw3.lib(input.obj) + _glfwSetWindowPosWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0NN@GDFALEBB@03000000bd12000013d000000000000@ ; glfw3.lib(input.obj) + glfwSetGammaRamp ; glfw3.lib(monitor.obj) + ??_C@_0BN@DHKEBMCG@Invalid?5OpenGL?5version?5?$CFi?4?$CFi@ ; glfw3.lib(context.obj) + ClipCursor ; user32.lib(USER32.dll) + ??_C@_0BCG@MGNGMDPB@03000000c62400002b8900000000000@ ; glfw3.lib(input.obj) + ??_C@_0DA@LMPKCOPB@WGL?3?5Failed?5to?5retrieve?5pixel?5f@ ; glfw3.lib(wgl_context.obj) + ??_C@_0BA@GHGALGFD@xinput9_1_0?4dll@ ; glfw3.lib(win32_init.obj) + ??_C@_0M@DMDNBACF@bad?5png?5sig@ ; stb_image.obj + _glfwCreateUTF8FromWideStringWin32 ; glfw3.lib(win32_init.obj) + GetCurrentProcessId ; kernel32.lib(KERNEL32.dll) + _glfwCreateStandardCursorNull ; glfw3.lib(null_window.obj) + __xmm@01010000010100000101000001010000 ; dllmain.obj + ??_C@_01CBDEGOCN@j@ ; glfw3.lib(null_window.obj) + glfwGetCursorPos ; glfw3.lib(input.obj) + ??_C@_0BCP@HPMIMEAF@03000000a306000023f600000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBL@NMDIMCBK@03000000c0110000065500000000000@ ; glfw3.lib(input.obj) + _initterm_e ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ??_C@_0BAE@PFJOMAIP@03000000791d0000010300000000000@ ; glfw3.lib(input.obj) + ??_C@_0CE@MPCJCEEO@Invalid?5image?5count?5for?5window?5@ ; glfw3.lib(window.obj) + ??_C@_0BCD@KBOGKJIK@03000000d81d00000f0000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BK@PDCFBJPK@Invalid?5input?5mode?50x?$CF08X@ ; glfw3.lib(input.obj) + FreeLibrary ; kernel32.lib(KERNEL32.dll) + at_quick_exit ; MSVCRT.lib(utility.obj) + _glfwUpdateGamepadGUIDWin32 ; glfw3.lib(win32_joystick.obj) + ??_C@_01EKENIIDA@3@ ; glfw3.lib(null_window.obj) + ??_C@_0BA@LGGPEDOH@GetDpiForWindow@ ; glfw3.lib(win32_init.obj) + ??_C@_0BC@BNOBCLNJ@eglDestroyContext@ ; glfw3.lib(egl_context.obj) + ??_C@_0BG@PJBJDAGM@can?8t?5merge?5dc?5and?5ac@ ; stb_image.obj + ??_C@_05MKIKPCON@leftx@ ; glfw3.lib(input.obj) + ??_C@_0CE@JBLPENML@Invalid?5context?5creation?5API?50x@ ; glfw3.lib(context.obj) + ??_C@_0EH@BEBOCAGI@Cannot?5set?5swap?5interval?5withou@ ; glfw3.lib(context.obj) + ??_C@_0BL@OIILILNJ@Arguments?5are?5inconsistent@ ; glfw3.lib(egl_context.obj) + _glfwGetHMONITORContentScaleWin32 ; glfw3.lib(win32_monitor.obj) + memcpy ; vcruntime.lib(VCRUNTIME140.dll) + ??_C@_0CJ@NMCAPCBP@03000000?$CF02x?$CF02x0000?$CF02x?$CF02x000@ ; glfw3.lib(win32_joystick.obj) + ??_C@_0N@CLKIAFGP@righttrigger@ ; glfw3.lib(input.obj) + ??_C@_0BE@DAPHADHL@bad?5component?5count@ ; stb_image.obj + __xmm@f493f493f493f493f493f493f493f493 ; dllmain.obj + ??_C@_0LE@DMNOHJBL@03000000300f0000121000000000000@ ; glfw3.lib(input.obj) + __imp_SetWindowPos ; user32.lib(USER32.dll) + ??_C@_0BAF@EBPNLKIJ@0300000032150000000300000000000@ ; glfw3.lib(input.obj) + __imp_QueryPerformanceFrequency ; kernel32.lib(KERNEL32.dll) + ??_C@_0BP@JAOBDJGN@WGL_ARB_create_context_profile@ ; glfw3.lib(wgl_context.obj) + __imp_ClipCursor ; user32.lib(USER32.dll) + _crt_at_quick_exit ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + __xmm@0000201e0000201d0000202300002022 ; glfw3.lib(wgl_context.obj) + TlsSetValue ; kernel32.lib(KERNEL32.dll) + ??_C@_0O@GCGJMHDL@wglShareLists@ ; glfw3.lib(wgl_context.obj) + _glfwGetCursorPosNull ; glfw3.lib(null_window.obj) + ??_C@_0BH@IPANDFMH@OSMesaCreateContextExt@ ; glfw3.lib(osmesa_context.obj) + glfwGetError ; glfw3.lib(init.obj) + __imp_TranslateMessage ; user32.lib(USER32.dll) + ??_C@_01LAKCGALK@9@ ; glfw3.lib(null_window.obj) + ??_C@_0BBM@FNOHJIMD@030000000d0f0000c10000000000000@ ; glfw3.lib(input.obj) + __stdio_common_vsscanf ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + __imp_InitializeSListHead ; kernel32.lib(KERNEL32.dll) + ??_C@_0BE@FABDLJKH@XInput?5Arcade?5Stick@ ; glfw3.lib(win32_joystick.obj) + ??_C@_0DF@KADNFCFI@Vulkan?3?5Failed?5to?5query?5instanc@ ; glfw3.lib(vulkan.obj) + __castguard_check_failure_user_handled_fptr ; MSVCRT.lib(guard_support.obj) + _glfwGetWindowPosNull ; glfw3.lib(null_window.obj) + _glfwCreateWindowSurfaceWin32 ; glfw3.lib(win32_window.obj) + _glfw_strdup ; glfw3.lib(init.obj) + ??_C@_0BCE@PHFLGEEP@03000000d81d0000100000000000000@ ; glfw3.lib(input.obj) + glfwSetWindowContentScaleCallback ; glfw3.lib(window.obj) + __imp_DescribePixelFormat ; gdi32.lib(GDI32.dll) + ??_C@_0BBN@DDIMFOMP@0300000020380000090000000000000@ ; glfw3.lib(input.obj) + _glfwPlatformInitTimer ; glfw3.lib(win32_time.obj) + ??_C@_1BK@OPNBOCAD@?$AAG?$AAL?$AAF?$AAW?$AA3?$AA?5?$AAH?$AAe?$AAl?$AAp?$AAe?$AAr@ ; glfw3.lib(win32_init.obj) + ??_C@_0BC@BHMPBBMG@not?5enough?5pixels@ ; stb_image.obj + ??_C@_0BDM@IEGKPAEF@03000000222c0000022300000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBD@FGLPEKLC@0300000038070000803400000000000@ ; glfw3.lib(input.obj) + ??_C@_0FM@BBONGFMN@The?5requested?5version?5of?5Vulkan@ ; glfw3.lib(vulkan.obj) + _glfwSetGammaRampNull ; glfw3.lib(null_monitor.obj) + glfwGetMonitorUserPointer ; glfw3.lib(monitor.obj) + __xmm@00000200000002000000020000000200 ; dllmain.obj + __castguard_slow_path_check_fastfail ; MSVCRT.lib(guard_support.obj) + ??_C@_0JL@IDKPNGMK@03000000c82d0000189000000000000@ ; glfw3.lib(input.obj) + _seh_filter_dll ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ??_C@_0PH@HDPKEOEB@0300000026090000888800000000000@ ; glfw3.lib(input.obj) + ??_C@_0BK@MLLMMLGE@OSMesa?3?5Library?5not?5found@ ; glfw3.lib(osmesa_context.obj) + glfwSetWindowShouldClose ; glfw3.lib(window.obj) + ??_C@_0DL@GNLICFMC@The?5application?5must?5destroy?5al@ ; glfw3.lib(egl_context.obj) + _glfwDetectJoystickDisconnectionWin32 ; glfw3.lib(win32_joystick.obj) + _glfwSetGammaRampWin32 ; glfw3.lib(win32_monitor.obj) + _glfwSetWindowAspectRatioWin32 ; glfw3.lib(win32_window.obj) + SetPixelFormat ; gdi32.lib(GDI32.dll) + __imp_ClientToScreen ; user32.lib(USER32.dll) + ??_C@_0BP@OHFKOFFD@Win32?3?5Failed?5to?5create?5cursor@ ; glfw3.lib(win32_window.obj) + ??_C@_0BN@GDKHKIAN@wglGetPixelFormatAttribivARB@ ; glfw3.lib(wgl_context.obj) + _glfwConnectWin32 ; glfw3.lib(win32_init.obj) + ??_C@_0BF@BPPLLLDH@OSMesaGetDepthBuffer@ ; glfw3.lib(osmesa_context.obj) + ??_C@_05MPLLHCJG@bad?5V@ ; stb_image.obj + glfwGetJoystickUserPointer ; glfw3.lib(input.obj) + _glfwShowWindowNull ; glfw3.lib(null_window.obj) + _glfwWindowHoveredWin32 ; glfw3.lib(win32_window.obj) + _glfwAllocMonitor ; glfw3.lib(monitor.obj) + ??_C@_0O@HFAAEHFL@libGLESv2?4dll@ ; glfw3.lib(egl_context.obj) + ??_C@_0CM@GKIHKJDL@A?5return?5array?5was?5too?5small?5fo@ ; glfw3.lib(vulkan.obj) + ??_C@_0BP@KPGBLOB@Win32?3?5Unknown?5standard?5cursor@ ; glfw3.lib(win32_window.obj) + _glfwSplitBPP ; glfw3.lib(monitor.obj) + ??_C@_0O@NIPGCINC@Unknown?5error@ ; glfw3.lib(win32_monitor.obj) + fseek ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + _glfwInputDrop ; glfw3.lib(input.obj) + GetActiveWindow ; user32.lib(USER32.dll) + OffsetRect ; user32.lib(USER32.dll) + glfwGetCurrentContext ; glfw3.lib(context.obj) + ??_C@_0BBN@OLDKGLCG@03000000300f0000110100000000000@ ; glfw3.lib(input.obj) + ??_C@_0OH@FOPKIOOK@030000000d0f0000880000000000000@ ; glfw3.lib(input.obj) + glfwGetVideoModes ; glfw3.lib(monitor.obj) + _glfwInputError ; glfw3.lib(init.obj) + _glfwAllocGammaArrays ; glfw3.lib(monitor.obj) + ??_C@_0BCD@DJDMNCGP@0300000088880000080300000000000@ ; glfw3.lib(input.obj) + ??_C@_0M@LPHNODCG@bad?5DRI?5len@ ; stb_image.obj + __real@43e0000000000000 ; glfw3.lib(input.obj) + ??_C@_0BCH@DHEFONIG@0300000038070000665200000000000@ ; glfw3.lib(input.obj) + _glfwRestoreWindowWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0BH@PHEJANJA@Invalid?5joystick?5ID?5?$CFi@ ; glfw3.lib(input.obj) + __scrt_stub_for_is_c_termination_complete ; MSVCRT.lib(ucrt_stubs.obj) + _get_startup_argv_mode ; MSVCRT.lib(argv_mode.obj) + ??_C@_0BH@FDAKHMHL@VK_KHR_wayland_surface@ ; glfw3.lib(vulkan.obj) + ??_C@_0CE@MEIEKJIC@Win32?3?5Failed?5to?5allocate?5TLS?5i@ ; glfw3.lib(win32_thread.obj) + ??_C@_0CG@JJEBGGIE@Win32?3?5Failed?5to?5set?5device?5axi@ ; glfw3.lib(win32_joystick.obj) + _glfwPlatformDestroyMutex ; glfw3.lib(win32_thread.obj) + __imp_RtlVirtualUnwind ; kernel32.lib(KERNEL32.dll) + __xmm@00ff00ff00ff00ff00ff00ff00ff00ff ; dllmain.obj + PtInRect ; user32.lib(USER32.dll) + _glfwInputWindowSize ; glfw3.lib(window.obj) + __scrt_initialize_winrt ; MSVCRT.lib(utility_desktop.obj) + AdjustWindowRectEx ; user32.lib(USER32.dll) + ??_C@_0BDE@MNGLEAIF@0300000038070000848300000000000@ ; glfw3.lib(input.obj) + __imp_GetRawInputDeviceInfoA ; user32.lib(USER32.dll) + ??_C@_0BBJ@OPMOLAIB@030000009d0d0000133000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBI@EPDBKPKA@0300000080830000030000000000000@ ; glfw3.lib(input.obj) + __xmm@166f166f166f166f166f166f166f166f ; dllmain.obj + _glfwSetCursorNull ; glfw3.lib(null_window.obj) + ??_C@_07LDLFNPGN@Windows@ ; glfw3.lib(win32_joystick.obj) + __imp_free ; ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + ??_C@_05BLPKENEJ@bad?5H@ ; stb_image.obj + GetDC ; user32.lib(USER32.dll) + ??_C@_0P@DEBOOHKH@eglSwapBuffers@ ; glfw3.lib(egl_context.obj) + ??_C@_0CE@FEGPCKPN@WGL?3?5Failed?5to?5make?5context?5cur@ ; glfw3.lib(wgl_context.obj) + ??_C@_07CKIELOEH@no?5PLTE@ ; stb_image.obj + _glfwGetMonitorContentScaleNull ; glfw3.lib(null_monitor.obj) + __imp_GetDC ; user32.lib(USER32.dll) + SetClipboardData ; user32.lib(USER32.dll) + __imp_ungetc ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_0CO@CNHHHABN@Win32?3?5Failed?5to?5register?5helpe@ ; glfw3.lib(win32_init.obj) + ??_C@_0BN@HJHDCKKP@Win32?3?5Failed?5to?5create?5icon@ ; glfw3.lib(win32_window.obj) + ??_C@_0BBM@ENBFFJGN@03000000f0250000c28300000000000@ ; glfw3.lib(input.obj) + CreateBitmap ; gdi32.lib(GDI32.dll) + __raise_securityfailure ; MSVCRT.lib(gs_report.obj) + ??_C@_0BBJ@HBGMHFLL@0300000010080000030000000000000@ ; glfw3.lib(input.obj) + SetPropW ; user32.lib(USER32.dll) + ??_C@_0CC@MGDCJJKB@Win32?3?5Failed?5to?5create?5interfa@ ; glfw3.lib(win32_joystick.obj) + __xmm@80000000000000008000000000000000 ; glfw3.lib(win32_window.obj) + _glfwFreeMonitorWin32 ; glfw3.lib(win32_monitor.obj) + ??_C@_0BCB@CIAKNBHG@030000008305000031b000000000000@ ; glfw3.lib(input.obj) + ??_C@_0JL@GGABLAON@03000000a30c0000270000000000000@ ; glfw3.lib(input.obj) + fopen_s ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_0OB@DNKPJMLF@0300000038100000121400000000000@ ; glfw3.lib(input.obj) + glfwSetWindowTitle ; glfw3.lib(window.obj) + MoveWindow ; user32.lib(USER32.dll) + _glfwCreateWideStringFromUTF8Win32 ; glfw3.lib(win32_init.obj) + ??_C@_0BE@OHIPHHMJ@GL_ARB_debug_output@ ; glfw3.lib(context.obj) + ??_C@_0DJ@KAONABFK@A?5wait?5operation?5has?5not?5comple@ ; glfw3.lib(vulkan.obj) + ??_C@_0EF@PCMNMHKP@The?5requested?5feature?5has?5not?5y@ ; glfw3.lib(init.obj) + ??_C@_0BEF@OFEGMHGG@030000006f0e0000800100000000000@ ; glfw3.lib(input.obj) + ??_C@_0BDG@HFKCDPDO@030000004f0400000ed000000000000@ ; glfw3.lib(input.obj) + glfwGetMouseButton ; glfw3.lib(input.obj) + __imp_IsProcessorFeaturePresent ; kernel32.lib(KERNEL32.dll) + ??_C@_0CJ@NBJEEEJD@EGL?3?5Failed?5to?5clear?5current?5co@ ; glfw3.lib(egl_context.obj) + __imp_GlobalLock ; kernel32.lib(KERNEL32.dll) + EnumDisplaySettingsW ; user32.lib(USER32.dll) + ??_C@_01DHDKHMHF@6@ ; glfw3.lib(null_window.obj) + ??_C@_06LDHPELJC@dpdown@ ; glfw3.lib(input.obj) + __imp_UnhandledExceptionFilter ; kernel32.lib(KERNEL32.dll) + ??_C@_0BCC@ICCBFEBO@030000000d0f0000ee0000000000000@ ; glfw3.lib(input.obj) + _glfwGetFramebufferSizeNull ; glfw3.lib(null_window.obj) + __xmm@e09ee565e09ee565e09ee565e09ee565 ; dllmain.obj + _RTC_Initialize ; MSVCRT.lib(initsect.obj) + ??_C@_0N@IECDHMDI@zlib?5corrupt@ ; stb_image.obj + ??_C@_0L@NCPEAJBD@?$CD?$DPRADIANCE@ ; stb_image.obj + ??_C@_0BM@OCGPLDNC@ChangeWindowMessageFilterEx@ ; glfw3.lib(win32_init.obj) + ??_C@_0BCG@DHLFHLM@03000000c82d0000026000000000000@ ; glfw3.lib(input.obj) + EnumDisplayDevicesW ; user32.lib(USER32.dll) + RegisterClassExW ; user32.lib(USER32.dll) + __imp_GetCurrentThreadId ; kernel32.lib(KERNEL32.dll) + __stdio_common_vfprintf ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + DragFinish ; shell32.lib(SHELL32.dll) + ??_C@_0CM@IALNOPFK@Win32?3?5Failed?5to?5retrieve?5own?5m@ ; glfw3.lib(win32_init.obj) + ??_C@_0BBJ@PKNJJDLA@0300000025090000888800000000000@ ; glfw3.lib(input.obj) + ??_C@_0LO@EDCIDLIK@0300000079000000110000000000000@ ; glfw3.lib(input.obj) + __real@408f400000000000 ; glfw3.lib(win32_window.obj) + ??_C@_0OD@GOLNACF@030000000d0f0000270000000000000@ ; glfw3.lib(input.obj) + __imp_GetMonitorInfoW ; user32.lib(USER32.dll) + glfwGetWindowOpacity ; glfw3.lib(window.obj) + ??_C@_0BBL@EFBOJJAL@0300000066f70000050000000000000@ ; glfw3.lib(input.obj) + ??_C@_1BE@LDFMCOHA@?$AAG?$AAL?$AAF?$AAW?$AA_?$AAI?$AAC?$AAO?$AAN@ ; glfw3.lib(win32_window.obj) + _glfw_free ; glfw3.lib(init.obj) + ??_C@_0OM@HGBIMFGF@03000000300f0000161100000000000@ ; glfw3.lib(input.obj) + ??_C@_0L@DMAPJJO@bad?5format@ ; stb_image.obj + __guard_xfg_dispatch_icall_fptr ; MSVCRT.lib(guard_support.obj) + ??_C@_0PC@EBDFKGFN@0300000079000000441800000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCL@PCNFJELE@030000006e0500000a2000000000000@ ; glfw3.lib(input.obj) + QueryPerformanceCounter ; kernel32.lib(KERNEL32.dll) + _glfwGetWindowSizeNull ; glfw3.lib(null_window.obj) + ??_C@_0BCJ@NOGEFCJN@0300000032150000010400000000000@ ; glfw3.lib(input.obj) + glfwGetKey ; glfw3.lib(input.obj) + ??_C@_01KGKMHCOC@e@ ; glfw3.lib(null_window.obj) + ??_C@_0KI@EPMKBGDM@0300000000f00000f10000000000000@ ; glfw3.lib(input.obj) + ??_C@_0CA@KCGCFCEG@Invalid?5window?5attribute?50x?$CF08X@ ; glfw3.lib(window.obj) + ??_C@_0BCG@NCIHPENA@03000000c62400001b8900000000000@ ; glfw3.lib(input.obj) + malloc ; ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + SetUnhandledExceptionFilter ; kernel32.lib(KERNEL32.dll) + DispatchMessageW ; user32.lib(USER32.dll) + GetKeyState ; user32.lib(USER32.dll) + FormatMessageW ; kernel32.lib(KERNEL32.dll) + __imp___acrt_iob_func ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_0BBP@NMPDIJKG@78696e7075740800000000000000000@ ; glfw3.lib(input.obj) + GetRawInputDeviceInfoA ; user32.lib(USER32.dll) + ??_C@_0KL@BLLPLAOA@0300000079000000241800000000000@ ; glfw3.lib(input.obj) + ??_C@_0BD@KGLHBPN@WGL_EXT_colorspace@ ; glfw3.lib(wgl_context.obj) + ??_C@_02PCIJFNDE@?$AN?6@ ; glfw3.lib(input.obj) + ??_C@_0BCG@LIMAPBKF@03000000a30600000b0400000001000@ ; glfw3.lib(input.obj) + ?configure_argv@__scrt_narrow_argv_policy@@SAHXZ ; MSVCRT.lib(utility.obj) + ??_C@_0BA@EPLGABLH@Xbox?5Controller@ ; glfw3.lib(win32_joystick.obj) + __imp_TlsAlloc ; kernel32.lib(KERNEL32.dll) + ??_C@_0M@ILLOCNCO@bad?5palette@ ; stb_image.obj + glfwTerminate ; glfw3.lib(init.obj) + SetCursorPos ; user32.lib(USER32.dll) + ??_C@_0BB@FOKGPEKG@bad?5code?5lengths@ ; stb_image.obj + glfwGetInputMode ; glfw3.lib(input.obj) + ??_C@_0LI@CLAPJPEB@03000000c82d0000015100000000000@ ; glfw3.lib(input.obj) + _glfwSetWindowPosNull ; glfw3.lib(null_window.obj) + __imp_GetWindowPlacement ; user32.lib(USER32.dll) + _RTC_Terminate ; MSVCRT.lib(initsect.obj) + ??_C@_0BCA@MGCGIKLM@030000006b140000020300000000000@ ; glfw3.lib(input.obj) + __imp_SetThreadExecutionState ; kernel32.lib(KERNEL32.dll) + ??_C@_0BA@KLNDOKJD@expected?5marker@ ; stb_image.obj + __real@41cb3333 ; glfw3.lib(win32_monitor.obj) + glfwGetKeyName ; glfw3.lib(input.obj) + strtol ; ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) + ??_C@_0CO@KALOHMEN@WGL?3?5Unknown?5pixel?5format?5attri@ ; glfw3.lib(wgl_context.obj) + ??_C@_0CL@LJNEEKEI@Win32?3?5Failed?5to?5create?5Vulkan?5@ ; glfw3.lib(win32_window.obj) + EmptyClipboard ; user32.lib(USER32.dll) + glfwRequestWindowAttention ; glfw3.lib(window.obj) + ??_C@_0JK@EKFMIBLA@03000000c82d000021ab00000000000@ ; glfw3.lib(input.obj) + glfwGetGammaRamp ; glfw3.lib(monitor.obj) + __scrt_set_unhandled_exception_filter ; MSVCRT.lib(utility_desktop.obj) + ??_C@_0CL@JHIPHFAC@Win32?3?5Failed?5to?5query?5device?5c@ ; glfw3.lib(win32_joystick.obj) + _glfwWaitEventsTimeoutNull ; glfw3.lib(null_window.obj) + ??_C@_07IMHMNOIB@BMP?5RLE@ ; stb_image.obj + ??_C@_0DB@JJADGKIE@Raw?5mouse?5motion?5is?5not?5support@ ; glfw3.lib(input.obj) + qsort ; ucrt.lib(api-ms-win-crt-utility-l1-1-0.dll) + ??_C@_09OJDLMMBJ@too?5large@ ; stb_image.obj + ??_C@_07NCIOKENI@not?5HDR@ ; stb_image.obj + ??_C@_0CB@BIHPPBFK@03000000?$CF?44s0000?$CF?44s00000000000@ ; glfw3.lib(win32_joystick.obj) + ??_C@_0BCF@KHBKMEME@03000000c82d0000016100000000000@ ; glfw3.lib(input.obj) + glfwSetWindowIconifyCallback ; glfw3.lib(window.obj) + SetWindowPos ; user32.lib(USER32.dll) + ??_C@_0L@ELKKGGMD@libEGL?4dll@ ; glfw3.lib(egl_context.obj) + __current_exception_context ; vcruntime.lib(VCRUNTIME140.dll) + ??_C@_0CN@FGAGPCCP@Win32?3?5Failed?5to?5convert?5clipbo@ ; glfw3.lib(win32_window.obj) + ??_C@_0BBP@LNLJDDIF@030000004f04000003d000000000000@ ; glfw3.lib(input.obj) + _register_onexit_function ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + _execute_onexit_table ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ??_C@_0BBK@DBILHFPC@030000005509000000b400000000000@ ; glfw3.lib(input.obj) + ??_C@_07FLLKAONK@dpright@ ; glfw3.lib(input.obj) + __xmm@00002018000020170000201600002015 ; glfw3.lib(wgl_context.obj) + __imp_DragQueryPoint ; shell32.lib(SHELL32.dll) + ??_C@_0OC@FELEMKIB@03000000120c0000f60e00000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBK@FBBILDLI@0300000038070000853200000000000@ ; glfw3.lib(input.obj) + ??_C@_0BF@OOKNCFMF@OSMesaDestroyContext@ ; glfw3.lib(osmesa_context.obj) + ??_C@_0BDF@FFJELFPB@030000006b140000020d00000000000@ ; glfw3.lib(input.obj) + _glfwWaitEventsTimeoutWin32 ; glfw3.lib(win32_window.obj) + glfwPostEmptyEvent ; glfw3.lib(window.obj) + __scrt_stub_for_acrt_thread_attach ; MSVCRT.lib(ucrt_stubs.obj) + UnregisterClassW ; user32.lib(USER32.dll) + ??_C@_0BBF@DJBNPOOL@0300000066660000670600000000000@ ; glfw3.lib(input.obj) + glfwGetOSMesaColorBuffer ; glfw3.lib(osmesa_context.obj) + __imp_MonitorFromWindow ; user32.lib(USER32.dll) + glfwDestroyWindow ; glfw3.lib(window.obj) + ??_C@_07IBAPPAHJ@glClear@ ; glfw3.lib(context.obj) + ??_C@_0FB@EPGEGHDL@An?5EGLSurface?5argument?5does?5not@ ; glfw3.lib(egl_context.obj) + _glfwDetectJoystickConnectionWin32 ; glfw3.lib(win32_joystick.obj) + ??_C@_0BF@DMNOCJMB@VK_EXT_metal_surface@ ; glfw3.lib(vulkan.obj) + ??_C@_06CLMBLEP@no?5SOI@ ; stb_image.obj + ??_C@_0CI@JNBCHAIF@WGL?3?5Failed?5to?5create?5OpenGL?5ES@ ; glfw3.lib(wgl_context.obj) + ??_C@_0JF@MFNKBEDG@03000000c82d0000095100000000000@ ; glfw3.lib(input.obj) + _glfwGetMonitorPosWin32 ; glfw3.lib(win32_monitor.obj) + ??_C@_0M@HOIDFNFN@?$CD?$DPRADIANCE?6@ ; stb_image.obj + ??_C@_0NN@EKBBEDOM@03000000c82d0000065000000000000@ ; glfw3.lib(input.obj) + MonitorFromWindow ; user32.lib(USER32.dll) + ??_C@_0BM@OMEGJAIK@ERROR?3?5UNKNOWN?5VULKAN?5ERROR@ ; glfw3.lib(vulkan.obj) + ??_C@_0OI@FJCLICAJ@03000000b5070000140300000000000@ ; glfw3.lib(input.obj) + ??_C@_0CE@OJFJMLEI@The?5specified?5window?5has?5no?5con@ ; glfw3.lib(init.obj) + __guard_check_icall_fptr ; MSVCRT.lib(guard_support.obj) + ??_C@_09MBBNGCKB@bad?5ctype@ ; stb_image.obj + _glfwSetWindowFloatingWin32 ; glfw3.lib(win32_window.obj) + _glfwInputWindowFocus ; glfw3.lib(window.obj) + GetSystemTimeAsFileTime ; kernel32.lib(KERNEL32.dll) + ??_C@_0PI@OKGGAFMJ@03000000341a0000010400000000000@ ; glfw3.lib(input.obj) + MultiByteToWideChar ; kernel32.lib(KERNEL32.dll) + ??_C@_0BD@CBEDEJPH@unknown?5image?5type@ ; stb_image.obj + ??_C@_0LC@FKHGODJA@03000000c82d0000129000000000000@ ; glfw3.lib(input.obj) + ??_C@_0CN@IHJGMBHI@The?5logical?5or?5physical?5device?5@ ; glfw3.lib(vulkan.obj) + ??_C@_0BCD@KNBJHBAH@030000005e0400000a0b00000000000@ ; glfw3.lib(input.obj) + _glfwRestoreWindowNull ; glfw3.lib(null_window.obj) + ??_C@_0JL@MEEFIFEH@03000000a30c0000280000000000000@ ; glfw3.lib(input.obj) + TranslateMessage ; user32.lib(USER32.dll) + ??_C@_0BF@HHLAJKBF@OSMesaGetColorBuffer@ ; glfw3.lib(osmesa_context.obj) + __imp__configure_narrow_argv ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + _glfwGetVulkanResultString ; glfw3.lib(vulkan.obj) + ??_C@_0BCP@ONIMJMJ@0300000066660000048800000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCE@HLGICLNK@030000008f0e00000d3100000000000@ ; glfw3.lib(input.obj) + SetCapture ; user32.lib(USER32.dll) + glfwSetWindowSize ; glfw3.lib(window.obj) + _glfwInputMonitorWindow ; glfw3.lib(monitor.obj) + ??_C@_0DF@FEPNJFGL@Vulkan?3?5Loader?5does?5not?5export?5@ ; glfw3.lib(vulkan.obj) + ??_C@_0BBH@LCHOLIJA@030000000d0f00005e0000000000000@ ; glfw3.lib(input.obj) + glfwSetFramebufferSizeCallback ; glfw3.lib(window.obj) + ??_C@_01FMEDJKGI@o@ ; glfw3.lib(null_window.obj) + ??_C@_0KB@CIFFNJNE@0300000000f00000030000000000000@ ; glfw3.lib(input.obj) + glfwInitVulkanLoader ; glfw3.lib(init.obj) + glfwPlatformSupported ; glfw3.lib(platform.obj) + __imp_GetProcAddress ; kernel32.lib(KERNEL32.dll) + ??_C@_0O@DHHDCCLF@glGetIntegerv@ ; glfw3.lib(context.obj) + _glfwInputMouseClick ; glfw3.lib(input.obj) + sscanf ; glfw3.lib(context.obj) + ??_C@_06FHABPINC@rightx@ ; glfw3.lib(input.obj) + ??_C@_0LK@DEPDOLNO@0300000028040000014000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BC@ICHKG@eglDestroySurface@ ; glfw3.lib(egl_context.obj) + ??_C@_0BCD@JLFNAMGI@030000006b140000030300000000000@ ; glfw3.lib(input.obj) + ??_C@_0BAE@KADGKHDN@030000000d0f0000700000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BDB@KNKJIBDH@030000006f0e0000320100000000000@ ; glfw3.lib(input.obj) + _glfwInputWindowDamage ; glfw3.lib(window.obj) + ??_C@_0CE@OJEBIEPE@OSMesa?3?5OpenGL?5profiles?5unavail@ ; glfw3.lib(osmesa_context.obj) + glfwSetCharCallback ; glfw3.lib(input.obj) + __imp_MsgWaitForMultipleObjects ; user32.lib(USER32.dll) + _glfwGetWindowPosWin32 ; glfw3.lib(win32_window.obj) + __imp_WideCharToMultiByte ; kernel32.lib(KERNEL32.dll) + ??_C@_0DF@NPMNAJFG@WGL?3?5Driver?5does?5not?5support?5Op@ ; glfw3.lib(wgl_context.obj) + ??_C@_0N@IGFNFAOP@eglTerminate@ ; glfw3.lib(egl_context.obj) + __imp_GetCurrentProcessId ; kernel32.lib(KERNEL32.dll) + _glfwPlatformDestroyTls ; glfw3.lib(win32_thread.obj) + ??_C@_0EN@CIIGDABJ@EGL?3?5The?5context?5must?5be?5curren@ ; glfw3.lib(egl_context.obj) + ReleaseCapture ; user32.lib(USER32.dll) + ??_C@_0BE@NAMJKDNF@missing?5color?5table@ ; stb_image.obj + ??_C@_0BBJ@FKANGOML@0300000025090000050000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBN@HKPLBABN@78696e7075740600000000000000000@ ; glfw3.lib(input.obj) + __scrt_is_managed_app ; MSVCRT.lib(utility_desktop.obj) + glfwDefaultWindowHints ; glfw3.lib(window.obj) + __castguard_set_user_handler ; MSVCRT.lib(guard_support.obj) + feof ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_0BCB@OOEANFEH@03000000300f0000100100000000000@ ; glfw3.lib(input.obj) + ??_C@_0CF@KMMHNOMI@Extension?5string?5retrieval?5is?5b@ ; glfw3.lib(context.obj) + ??_C@_0BCL@EMNJKCNM@030000004f04000023b300000000000@ ; glfw3.lib(input.obj) + ??_C@_08FOJKHHJA@?$CFd?4?$CFd?4?$CFd@ ; glfw3.lib(context.obj) + ??_C@_1CI@MPNNJFCJ@?$AAG?$AAL?$AAF?$AAW?$AA?5?$AAm?$AAe?$AAs?$AAs?$AAa?$AAg?$AAe?$AA?5?$AAw?$AAi@ ; glfw3.lib(win32_init.obj) + __real@3ff0000000000000 ; dllmain.obj + __imp__aligned_free ; ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + __security_init_cookie ; MSVCRT.lib(gs_support.obj) + ??_C@_0BBH@LKFOHLNE@030000000d0f00005f0000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBJ@CMBLEBDK@03000000242f00008a0000000000000@ ; glfw3.lib(input.obj) + ??_C@_0NO@NNNFDMKP@030000006d0400001ac200000000000@ ; glfw3.lib(input.obj) + __castguard_slow_path_check_os_handled ; MSVCRT.lib(guard_support.obj) + __imp_PeekMessageW ; user32.lib(USER32.dll) + __guard_dispatch_icall_fptr ; MSVCRT.lib(guard_support.obj) + _glfw_fminf ; glfw3.lib(init.obj) + ??_C@_0BM@KPJJBADD@Graphics?5mode?5not?5supported@ ; glfw3.lib(win32_monitor.obj) + _glfwGetVideoModeNull ; glfw3.lib(null_monitor.obj) + ??_C@_0BEP@LJAOBMNM@030000006f0e0000840100000000000@ ; glfw3.lib(input.obj) + __imp_SetCursorPos ; user32.lib(USER32.dll) + __imp_SetPixelFormat ; gdi32.lib(GDI32.dll) + ??_C@_0CM@DGJKGOGD@WGL?3?5Failed?5to?5find?5a?5suitable?5@ ; glfw3.lib(wgl_context.obj) + __scrt_stub_for_acrt_initialize ; MSVCRT.lib(ucrt_stubs.obj) + glfwGetJoystickName ; glfw3.lib(input.obj) + ??_C@_0BBD@HKHEBCPH@030000006e050000052000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BJ@KEAIGPHD@eglGetPlatformDisplayEXT@ ; glfw3.lib(egl_context.obj) + ??_C@_0CD@IGHBCNOG@Win32?3?5Failed?5to?5query?5monitor?5@ ; glfw3.lib(win32_monitor.obj) + WideCharToMultiByte ; kernel32.lib(KERNEL32.dll) + __imp_DeleteDC ; gdi32.lib(GDI32.dll) + _glfwSetWindowMonitorNull ; glfw3.lib(null_window.obj) + ??_C@_0BCB@EPBJCJPK@030000000d050000030800000000000@ ; glfw3.lib(input.obj) + glfwGetJoystickAxes ; glfw3.lib(input.obj) + ??_C@_0BJ@ODLLHDDH@WGL_EXT_framebuffer_sRGB@ ; glfw3.lib(wgl_context.obj) + ??_C@_0FA@OHOPKHFK@WGL?3?5OpenGL?5profile?5requested?5b@ ; glfw3.lib(wgl_context.obj) + GetPropW ; user32.lib(USER32.dll) + glfwSetWindowCloseCallback ; glfw3.lib(window.obj) + __scrt_get_dyn_tls_init_callback ; MSVCRT.lib(dyn_tls_init.obj) + ?__scrt_uninitialize_type_info@@YAXXZ ; MSVCRT.lib(tncleanup.obj) + ??_C@_0BD@DKPJMBMG@VK_KHR_xcb_surface@ ; glfw3.lib(vulkan.obj) + ??_C@_0N@KDLCCKCH@bad?5tRNS?5len@ ; stb_image.obj + __CastGuardVftablesStart ; MSVCRT.lib(guard_support.obj) + __report_rangecheckfailure ; MSVCRT.lib(gs_report.obj) + ??_C@_0CH@PNNMGINB@Invalid?5context?5robustness?5mode@ ; glfw3.lib(context.obj) + ??_C@_06IFCEAHIA@no?5SOF@ ; stb_image.obj + ??_C@_0BO@LHMLBOLK@SetProcessDpiAwarenessContext@ ; glfw3.lib(win32_init.obj) + ??_C@_0BBN@FMDJFAID@0300000002200000009000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BE@HBNNGLHP@XInput?5Flight?5Stick@ ; glfw3.lib(win32_joystick.obj) + _glfwGetWindowContentScaleNull ; glfw3.lib(null_window.obj) + ChoosePixelFormat ; gdi32.lib(GDI32.dll) + _glfwSetWindowOpacityNull ; glfw3.lib(null_window.obj) + __xmm@eb1a08a9eb1a08a9eb1a08a9eb1a08a9 ; dllmain.obj + ??_C@_07MLPECBNA@no?5IDAT@ ; stb_image.obj + UnregisterDeviceNotification ; user32.lib(USER32.dll) + ??_C@_0BBF@GOLEDGAH@030000006d04000011c200000000000@ ; glfw3.lib(input.obj) + ??_C@_0OJ@NCDOGEIN@030000000d0f0000920000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCM@OALNNLEB@030000005e0400008e0200000000000@ ; glfw3.lib(input.obj) + ??_C@_0CI@KAHNKLLC@One?5or?5more?5argument?5values?5are@ ; glfw3.lib(egl_context.obj) + __imp_strspn ; ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + _guard_rf_checks_enforced ; MSVCRT.lib(guard_support.obj) + ??_C@_0BC@GHLIKKMD@bad?5filter?5method@ ; stb_image.obj + ??_C@_0BC@HONLJDPH@eglGetProcAddress@ ; glfw3.lib(egl_context.obj) + ??_C@_0CE@HKNBGEPI@A?5host?5memory?5allocation?5has?5fa@ ; glfw3.lib(vulkan.obj) + ??_C@_0P@HJKEKLKD@eglQueryString@ ; glfw3.lib(egl_context.obj) + ??_C@_0BCP@NIMGPLGA@0300000038070000638200000000000@ ; glfw3.lib(input.obj) + __xmm@0000202400002021000020200000201f ; glfw3.lib(wgl_context.obj) + ??_C@_0BDG@FAKOKHMO@030000004f04000000b300000000000@ ; glfw3.lib(input.obj) + __isa_available_default ; dllmain.obj + ??_C@_0BK@KJGCMOHN@Invalid?5window?5size?5?$CFix?$CFi@ ; glfw3.lib(window.obj) + __scrt_dllmain_uninitialize_critical ; MSVCRT.lib(utility.obj) + ??_C@_0ED@GAJEHCGA@An?5EGLContext?5argument?5does?5not@ ; glfw3.lib(egl_context.obj) + ??_C@_0BBC@LOLNAEDE@03000000ac0500002c0200000000000@ ; glfw3.lib(input.obj) + ??_C@_01OHGJGJJP@?$FL@ ; glfw3.lib(null_window.obj) + ??_C@_0BBL@BABJOOFG@03000000ffff0000000000000000000@ ; glfw3.lib(input.obj) + __imp_SetForegroundWindow ; user32.lib(USER32.dll) + __imp_pow ; ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + ??_C@_0BDN@CCAJAJCK@0300000079000000001800000000000@ ; glfw3.lib(input.obj) + glfwGetTimerFrequency ; glfw3.lib(input.obj) + __xmm@ffffffffffffffffffffffffffffffff ; MSVCRT.lib(utility.obj) + RtlCaptureContext ; kernel32.lib(KERNEL32.dll) + _glfwGetEGLNativeDisplayNull ; glfw3.lib(null_window.obj) + memset ; vcruntime.lib(VCRUNTIME140.dll) + ??_C@_0BJ@IIGAEGGE@Wireless?5Xbox?5Controller@ ; glfw3.lib(win32_joystick.obj) + ??_C@_0BCP@EHCNAHCG@03000000d62000009f3100000000000@ ; glfw3.lib(input.obj) + __real@42ff0000 ; glfw3.lib(win32_joystick.obj) + ??_C@_0BBF@CLNKBPGE@030000008f0e0000120000000000000@ ; glfw3.lib(input.obj) + ??_C@_0JO@HBLEAOAI@03000000c0110000135200000000000@ ; glfw3.lib(input.obj) + ??_C@_0CA@CJLAIOKE@WGL_ARB_create_context_no_error@ ; glfw3.lib(wgl_context.obj) + glfwGetWindowFrameSize ; glfw3.lib(window.obj) + __scrt_dllmain_crt_thread_attach ; MSVCRT.lib(utility.obj) + ??_C@_0NO@KCLNENJG@03000000c82d0000303200000000000@ ; glfw3.lib(input.obj) + ??_C@_0CJ@FFMMFAIL@Invalid?5image?5dimensions?5for?5wi@ ; glfw3.lib(window.obj) + glfwSetMonitorUserPointer ; glfw3.lib(monitor.obj) + __CastGuardVftablesEnd ; MSVCRT.lib(guard_support.obj) + __imp_QueryPerformanceCounter ; kernel32.lib(KERNEL32.dll) + GetClassLongPtrW ; user32.lib(USER32.dll) + _glfwPollJoystickWin32 ; glfw3.lib(win32_joystick.obj) + __imp__register_onexit_function ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + glfwFocusWindow ; glfw3.lib(window.obj) + _glfwIconifyWindowWin32 ; glfw3.lib(win32_window.obj) + _glfwGetWindowContentScaleWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0OO@GFAPAFAG@0300000011010000191400000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBO@IBHMMFFH@030000008f0e0000080000000000000@ ; glfw3.lib(input.obj) + ??_C@_0KC@KGMCONBG@03000000c82d0000302800000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCB@MKBJECLN@030000000d0f00009c0000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCC@CBIJNOOO@03000000a306000020f600000000000@ ; glfw3.lib(input.obj) + ??_C@_0BA@LCMKGGHA@XInput?5Drum?5Kit@ ; glfw3.lib(win32_joystick.obj) + glfwGetMonitorName ; glfw3.lib(monitor.obj) + ??_C@_0BCD@KBJOCLC@03000000c82d0000036000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCH@GKMNBEOK@03000000c0110000035500001101000@ ; glfw3.lib(input.obj) + ??_C@_04ELNJHLFH@PICT@ ; stb_image.obj + ??_C@_0BF@JCGDPBAA@bad?5interlace?5method@ ; stb_image.obj + ??_C@_01DICPFPGM@k@ ; glfw3.lib(null_window.obj) + ??_C@_0BCA@IDEGIHPL@030000006d04000018c200000000000@ ; glfw3.lib(input.obj) + ??_C@_0CB@LDOHHBIH@OSMesa?3?5Failed?5to?5create?5contex@ ; glfw3.lib(osmesa_context.obj) + __real@bf800000 ; glfw3.lib(input.obj) + TlsFree ; kernel32.lib(KERNEL32.dll) + glfwGetOSMesaContext ; glfw3.lib(osmesa_context.obj) + ??_C@_0N@MEFCLEJO@leftshoulder@ ; glfw3.lib(input.obj) + __imp__initterm_e ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + _glfwGetWindowFrameSizeNull ; glfw3.lib(null_window.obj) + powf ; ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + ??_C@_0N@IILPFLFM@vulkan?91?4dll@ ; glfw3.lib(vulkan.obj) + ??_C@_0BBB@PJOPHLEI@0300000036280000010000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BA@KMGHNAFM@Invalid?5time?5?$CFf@ ; glfw3.lib(window.obj) + fgetc ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_0P@JEAFOMAF@first?5not?5IHDR@ ; stb_image.obj + _glfwInitGamepadMappings ; glfw3.lib(input.obj) + _glfwInputWindowCloseRequest ; glfw3.lib(window.obj) + ??_C@_0CA@HGIOILGO@EGL_ANGLE_platform_angle_vulkan@ ; glfw3.lib(egl_context.obj) + ??_C@_0BBD@LABNEKLL@0300000038070000188800000000000@ ; glfw3.lib(input.obj) + glfwCreateWindowSurface ; glfw3.lib(vulkan.obj) + __scrt_initialize_default_local_stdio_options ; MSVCRT.lib(default_local_stdio_options.obj) + ??_C@_0M@CICAFFCH@bad?5COM?5len@ ; stb_image.obj + __imp_GlobalUnlock ; kernel32.lib(KERNEL32.dll) + ??_C@_0MI@KAOJFFGI@030000007d040000054000000000000@ ; glfw3.lib(input.obj) + ??_C@_0DH@LCNJGHOP@05000000?$CF02x?$CF02x?$CF02x?$CF02x?$CF02x?$CF02@ ; glfw3.lib(win32_joystick.obj) + _glfwGetPhysicalDevicePresentationSupportNull ; glfw3.lib(null_window.obj) + ??_C@_0BJ@IHHANIOG@Allocation?5size?5overflow@ ; glfw3.lib(init.obj) + _glfwDestroyWindowWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0BG@HBCIDECD@vkGetInstanceProcAddr@ ; glfw3.lib(vulkan.obj) + ??_C@_0BK@JOBLJGNA@wglGetExtensionsStringARB@ ; glfw3.lib(wgl_context.obj) + glfwJoystickIsGamepad ; glfw3.lib(input.obj) + __imp_CreateRectRgn ; gdi32.lib(GDI32.dll) + _load_config_used ; MSVCRT.lib(loadcfg.obj) + ??_C@_0BCN@IMCBAJO@030000006f0e0000026300000000000@ ; glfw3.lib(input.obj) + _glfwSetWindowTitleWin32 ; glfw3.lib(win32_window.obj) + __imp_GetDeviceCaps ; gdi32.lib(GDI32.dll) + __crt_debugger_hook ; MSVCRT.lib(utility_desktop.obj) + ??_C@_00CNPNBAHC@@ ; stb_image.obj + ??_C@_0BCG@EICBBMKF@03000000c82d0000159000000000000@ ; glfw3.lib(input.obj) + ??_C@_07KMJLPAII@not?5GIF@ ; stb_image.obj + _glfwPlatformCreateMutex ; glfw3.lib(win32_thread.obj) + RtlLookupFunctionEntry ; kernel32.lib(KERNEL32.dll) + ??_C@_0EI@PJFDHBJK@Cannot?5swap?5buffers?5of?5a?5window@ ; glfw3.lib(context.obj) + ??_C@_0LK@IEAMBPJF@03000000a0050000323200000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBI@BAKFEMPI@03000000a30600001af500000000000@ ; glfw3.lib(input.obj) + __imp_RegisterRawInputDevices ; user32.lib(USER32.dll) + ??_C@_0N@DJABBOOH@unknown?5code@ ; stb_image.obj + ??_C@_0DK@CDBDDLLM@WGL?3?5Driver?5does?5not?5support?5th@ ; glfw3.lib(wgl_context.obj) + ??_C@_0LN@ELDHBANA@0300000083050000602000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BH@BAPIEFAH@Invalid?5gamma?5value?5?$CFf@ ; glfw3.lib(monitor.obj) + ??_C@_0BCF@OCBMGCLB@030000004c050000680200000000000@ ; glfw3.lib(input.obj) + ??_C@_0L@DHLNGPDM@rightstick@ ; glfw3.lib(input.obj) + ??_C@_0BL@IDFNAMEG@Invalid?5window?5hint?50x?$CF08X@ ; glfw3.lib(window.obj) + ??_C@_01GLPGHMHM@z@ ; glfw3.lib(null_window.obj) + _glfwWindowMaximizedNull ; glfw3.lib(null_window.obj) + _glfwInitWGL ; glfw3.lib(wgl_context.obj) + __castguard_slow_path_check_debugbreak ; MSVCRT.lib(guard_support.obj) + __castguard_check_failure_nop ; MSVCRT.lib(guard_support.obj) + ??_C@_0M@OPOBFDCB@glGetString@ ; glfw3.lib(context.obj) + ??_C@_0BBB@MOEBBOIH@030000008305000009a000000000000@ ; glfw3.lib(input.obj) + TlsGetValue ; kernel32.lib(KERNEL32.dll) + LoadCursorW ; user32.lib(USER32.dll) + SystemParametersInfoW ; user32.lib(USER32.dll) + _glfwDestroyWindowNull ; glfw3.lib(null_window.obj) + _glfwTerminateNull ; glfw3.lib(null_init.obj) + __scrt_dllmain_after_initialize_c ; MSVCRT.lib(utility.obj) + ??_C@_0BAA@HNPCOCLG@030000000d0f0000110000000000000@ ; glfw3.lib(input.obj) + __xmm@00000002000000000000000400000000 ; dllmain.obj + ??_C@_0NF@EPHCAKNM@030000007d040000084000000000000@ ; glfw3.lib(input.obj) + ??_C@_0PI@JDIGFFDA@030000004b120000014d00000000000@ ; glfw3.lib(input.obj) + __xmm@80000000800000008000000080000000 ; dllmain.obj + _glfwSetWindowTitleNull ; glfw3.lib(null_window.obj) + ??_C@_0CH@NEGEBDM@A?5requested?5extension?5is?5not?5su@ ; glfw3.lib(vulkan.obj) + ??_C@_0BBJ@MEIBJIGF@0300000010080000010000000000000@ ; glfw3.lib(input.obj) + __imp_SetUnhandledExceptionFilter ; kernel32.lib(KERNEL32.dll) + ??_C@_08PEMNBIMD@DwmFlush@ ; glfw3.lib(win32_init.obj) + strncmp ; ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + ??_C@_0DH@EKEHMEFD@Too?5many?5objects?5of?5the?5type?5ha@ ; glfw3.lib(vulkan.obj) + __scrt_release_startup_lock ; MSVCRT.lib(utility.obj) + ??_C@_01EFFIKLCJ@n@ ; glfw3.lib(null_window.obj) + __imp_IsIconic ; user32.lib(USER32.dll) + ??_C@_0BBL@JKCMMIPG@0300000038070000388800000000000@ ; glfw3.lib(input.obj) + __imp__cexit ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ??_C@_0BF@NPDKPIKE@WGL_EXT_swap_control@ ; glfw3.lib(wgl_context.obj) + __imp_CreateIconIndirect ; user32.lib(USER32.dll) + __std_type_info_destroy_list ; vcruntime.lib(VCRUNTIME140.dll) + glfwGetMonitors ; glfw3.lib(monitor.obj) + ??_C@_0OB@DOLNAILH@0300000026090000262500000000000@ ; glfw3.lib(input.obj) + _glfwGetRequiredInstanceExtensionsNull ; glfw3.lib(null_window.obj) + ??_C@_0ME@GIJLHGEN@030000007e050000062000000100000@ ; glfw3.lib(input.obj) + __imp_GetCursorPos ; user32.lib(USER32.dll) + __isa_available_init ; MSVCRT.lib(cpu_disp.obj) + __real@3fe0000000000000 ; glfw3.lib(input.obj) + _glfwGetEGLPlatformNull ; glfw3.lib(null_window.obj) + __scrt_fastfail ; MSVCRT.lib(utility_desktop.obj) + _glfwFocusWindowNull ; glfw3.lib(null_window.obj) + ??_C@_0BO@FABLLHKK@WGL_ARB_context_flush_control@ ; glfw3.lib(wgl_context.obj) + glfwHideWindow ; glfw3.lib(window.obj) + __imp_TlsGetValue ; kernel32.lib(KERNEL32.dll) + ??_C@_0EL@BBAGGFOK@An?5EGLConfig?5argument?5does?5not?5@ ; glfw3.lib(egl_context.obj) + ??_C@_0O@ENGHJHNB@OpenGL?5ES?9CM?5@ ; glfw3.lib(context.obj) + _glfwSetCursorModeWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0CB@EJFBPGFM@A?5surface?5is?5no?5longer?5availabl@ ; glfw3.lib(vulkan.obj) + __imp__initialize_narrow_environment ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ??_C@_0LL@KLNOPNHB@030000008f0e0000133000000000000@ ; glfw3.lib(input.obj) + ??_C@_0DD@JDDDNHLP@Null?3?5Gamma?5ramp?5size?5must?5matc@ ; glfw3.lib(null_monitor.obj) + __real@7f7fffff ; glfw3.lib(monitor.obj) + _glfwGetScancodeNameWin32 ; glfw3.lib(win32_window.obj) + _glfwGetFramebufferSizeWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0O@CNHKKDIM@bad?5DQT?5table@ ; stb_image.obj + ??_C@_0BAK@PBDFELHA@030000000d0f0000220000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BP@PHOHHIJJ@EGL?3?5Failed?5to?5bind?5OpenGL?3?5?$CFs@ ; glfw3.lib(egl_context.obj) + ??_C@_0CD@CODEPNKE@EGL?3?5Failed?5to?5get?5EGL?5display?3@ ; glfw3.lib(egl_context.obj) + ??_C@_01HHGOMJKL@l@ ; glfw3.lib(null_window.obj) + ??_C@_01MIFGBAGJ@?$CL@ ; glfw3.lib(null_window.obj) + ??_C@_0BB@KEKMNHDF@eglCreateContext@ ; glfw3.lib(egl_context.obj) + ??_C@_0BP@BFHGHOIO@Win32?3?5Failed?5to?5create?5window@ ; glfw3.lib(win32_window.obj) + strcspn ; ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + _glfwGetWindowSizeWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0BJ@PGPMJKGJ@Vulkan?3?5Loader?5not?5found@ ; glfw3.lib(vulkan.obj) + ??_C@_0PJ@FPHAKAJD@0300000079000000451800000000000@ ; glfw3.lib(input.obj) + _glfwCompareVideoModes ; glfw3.lib(monitor.obj) + ??_C@_0BM@PKHPFLOM@There?5is?5no?5current?5context@ ; glfw3.lib(init.obj) + ??_C@_0BBE@JFJIACOB@03000000ac0500004d0400000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCC@FJIJNHMA@03000000d62000006dca00000000000@ ; glfw3.lib(input.obj) + _glfwGetEGLPlatformWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0M@FLKHLCCP@lefttrigger@ ; glfw3.lib(input.obj) + ??_C@_0O@DJDONBGH@libOSMesa?4dll@ ; glfw3.lib(osmesa_context.obj) + ??_C@_0O@BMJFLKOA@eglGetDisplay@ ; glfw3.lib(egl_context.obj) + ??_C@_0P@IENCOMCD@VK_KHR_surface@ ; glfw3.lib(vulkan.obj) + _initterm ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + NtCurrentTeb ; MSVCRT.lib(utility.obj) + ??_C@_0BI@INMBJMIJ@vkCreateWin32SurfaceKHR@ ; glfw3.lib(win32_window.obj) + ??_C@_0BBP@ECGIDGCJ@03000000120c0000210e00000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBI@BKECFDAD@0300000079000000070000000000000@ ; glfw3.lib(input.obj) + __imp__initterm ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ??_C@_0OC@CPLNMNJF@030000004c050000da0c00000000000@ ; glfw3.lib(input.obj) + ??_C@_0BC@CLDFFND@GL_EXT_robustness@ ; glfw3.lib(context.obj) + ??_C@_0BCG@LJNCMOGI@03000000c62400002a8900000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCB@HKBKHEFP@0300000045130000083000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BK@PMMAHJAK@ERROR?3?5UNKNOWN?5GLFW?5ERROR@ ; glfw3.lib(init.obj) + ??_C@_0BCN@POFKMMNB@03000000d6200000955700000000000@ ; glfw3.lib(input.obj) + __imp_memcpy ; vcruntime.lib(VCRUNTIME140.dll) + _glfwWindowVisibleWin32 ; glfw3.lib(win32_window.obj) + __scrt_acquire_startup_lock ; MSVCRT.lib(utility.obj) + _glfwInputWindowMaximize ; glfw3.lib(window.obj) + __xmm@00002003000020130000200100002010 ; glfw3.lib(wgl_context.obj) + __imp_fread ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_01FAMBOPH@4@ ; glfw3.lib(null_window.obj) + __xmm@e9cf12d0e9cf12d0e9cf12d0e9cf12d0 ; dllmain.obj + _glfwCenterCursorInContentArea ; glfw3.lib(input.obj) + _glfwFreeGammaArrays ; glfw3.lib(monitor.obj) + _glfwStringInExtensionString ; glfw3.lib(context.obj) + ??_C@_0CH@MMCOKIKC@EGL?5cannot?5access?5a?5requested?5r@ ; glfw3.lib(egl_context.obj) + ??_C@_0BBK@NKANFPJB@0300000045750000040100000000000@ ; glfw3.lib(input.obj) + __imp_IsWindowVisible ; user32.lib(USER32.dll) + ??_C@_0DM@FCAOPKO@WGL?3?5Failed?5to?5enable?5sharing?5w@ ; glfw3.lib(wgl_context.obj) + ??_C@_0LF@DNFJHMLL@0300000000050000289b00000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCN@BCBEDKCA@030000006f0e0000190100000000000@ ; glfw3.lib(input.obj) + ??_C@_0M@KHBIBJBG@unknown?5BMP@ ; stb_image.obj + ??_C@_0BJ@HDECIKCI@Invalid?5init?5hint?50x?$CF08X@ ; glfw3.lib(init.obj) + glfwMakeContextCurrent ; glfw3.lib(context.obj) + _glfwSetWindowResizableWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0BE@EJHIPKNO@1?12?14?18?116?9bit?5only@ ; stb_image.obj + ??_C@_0N@BOFJCHAP@bad?5DQT?5type@ ; stb_image.obj + glfwSetTime ; glfw3.lib(input.obj) + ??_C@_01LKDEMHDF@s@ ; glfw3.lib(null_window.obj) + ??_C@_01KDCPPGHE@r@ ; glfw3.lib(null_window.obj) + ??_C@_0O@ONJGDDHG@xinput1_1?4dll@ ; glfw3.lib(win32_init.obj) + ??_C@_0L@HJOCIPHF@eglBindAPI@ ; glfw3.lib(egl_context.obj) + ??_C@_03HAFBONIK@IG_@ ; glfw3.lib(win32_joystick.obj) + ??_C@_0BCC@JCAIEANG@03000000a3060000210600000000000@ ; glfw3.lib(input.obj) + ??_C@_0BB@CEDNNLBG@tRNS?5before?5PLTE@ ; stb_image.obj + ??_C@_0BCN@NICPPBBL@0300000038070000625200000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBD@DCBELLKM@03000000bd12000003c000000000000@ ; glfw3.lib(input.obj) + _glfwGetKeyScancodeNull ; glfw3.lib(null_window.obj) + __real@405e000000000000 ; glfw3.lib(win32_window.obj) + GlobalLock ; kernel32.lib(KERNEL32.dll) + ??_C@_0BCC@FCCEALDM@03000000450c0000204300000000000@ ; glfw3.lib(input.obj) + glfwGetProcAddress ; glfw3.lib(context.obj) + ShowWindow ; user32.lib(USER32.dll) + ??_C@_0M@NOCCBFAC@bad?5DC?5huff@ ; stb_image.obj + ??_C@_0LC@FALCBLOD@03000000c82d0000622800000000000@ ; glfw3.lib(input.obj) + __imp_FormatMessageW ; kernel32.lib(KERNEL32.dll) + ??_C@_0CH@EMJGILEP@EGL?3?5Failed?5to?5find?5support?5for@ ; glfw3.lib(egl_context.obj) + ??_C@_0BF@NOEEEFMF@bad?5bits_per_channel@ ; stb_image.obj + _glfwInputCursorPos ; glfw3.lib(input.obj) + ??_C@_0BBC@LKELPOKL@03000000ef050000030000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BE@IBFIPFO@output?5buffer?5limit@ ; stb_image.obj + _glfwCreateWindowWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0MH@JBIEFOEI@03000000c82d0000031000000000000@ ; glfw3.lib(input.obj) + __imp_AdjustWindowRectEx ; user32.lib(USER32.dll) + glfwSwapInterval ; glfw3.lib(context.obj) + _glfwPlatformGetTls ; glfw3.lib(win32_thread.obj) + glfwGetKeyScancode ; glfw3.lib(input.obj) + __guard_xfg_check_icall_fptr ; MSVCRT.lib(guard_support.obj) + glfwSetWindowMaximizeCallback ; glfw3.lib(window.obj) + _glfwGetEGLNativeDisplayWin32 ; glfw3.lib(win32_window.obj) + ??_C@_01HIHLOKLC@1@ ; glfw3.lib(null_window.obj) + __imp_LeaveCriticalSection ; kernel32.lib(KERNEL32.dll) + glfwGetOSMesaDepthBuffer ; glfw3.lib(osmesa_context.obj) + ??_C@_0CC@NBPCCDGB@Invalid?5window?5hint?5string?50x?$CF0@ ; glfw3.lib(window.obj) + ??_C@_0CK@FKJPIIOF@Win32?3?5Failed?5to?5enumerate?5devi@ ; glfw3.lib(win32_joystick.obj) + ??_C@_0BBI@IMFOKND@03000000d9040000020000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BH@DGFLCCMF@SetProcessDpiAwareness@ ; glfw3.lib(win32_init.obj) + _glfwInitEGL ; glfw3.lib(egl_context.obj) + ??_C@_0BCB@PGBBGDNC@03000000c82d0000402800000000000@ ; glfw3.lib(input.obj) + ??_C@_0L@JDPIFELH@bad?5offset@ ; stb_image.obj + _aligned_free ; ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + __imp_memmove ; vcruntime.lib(VCRUNTIME140.dll) + _glfwFocusWindowWin32 ; glfw3.lib(win32_window.obj) + DeleteDC ; gdi32.lib(GDI32.dll) + ??_C@_0BB@OGAIJNNO@wglDeleteContext@ ; glfw3.lib(wgl_context.obj) + __imp_MoveWindow ; user32.lib(USER32.dll) + __imp_ShowWindow ; user32.lib(USER32.dll) + ??_C@_0MI@LCKMPFJJ@03000000c82d0000510600000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCF@NLOPKJKL@03000000d62000002a7900000000000@ ; glfw3.lib(input.obj) + ??_C@_0BH@LOKBIIOJ@illegal?5code?5in?5raster@ ; stb_image.obj + ??_C@_0CI@HCGBBANC@The?5requested?5platform?5is?5not?5s@ ; glfw3.lib(platform.obj) + ??_C@_0BAK@EANFDDAF@030000009f000000adbb00000000000@ ; glfw3.lib(input.obj) + __imp_OpenClipboard ; user32.lib(USER32.dll) + ??_C@_0BP@EMCHFHHH@Invalid?5standard?5cursor?50x?$CF08X@ ; glfw3.lib(input.obj) + ??_C@_05HLIEEKJG@guide@ ; glfw3.lib(input.obj) + __real@3f000000 ; dllmain.obj + ??_C@_0BI@KJPLJBHH@DwmIsCompositionEnabled@ ; glfw3.lib(win32_init.obj) + glfwGetClipboardString ; glfw3.lib(input.obj) + ??_C@_0ON@KEJKIAHI@03000000222c0000002000000000000@ ; glfw3.lib(input.obj) + __imp_powf ; ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + IsWindowVisible ; user32.lib(USER32.dll) + ??_C@_01KBJDNOO@i@ ; glfw3.lib(null_window.obj) + ??_C@_0CJ@JPDPLHCM@EGL?3?5Failed?5to?5find?5a?5suitable?5@ ; glfw3.lib(egl_context.obj) + ??_C@_0BCC@NMJPCJOC@03000000b8050000021000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCA@BCGGNNCE@03000000c82d000011ab00000000000@ ; glfw3.lib(input.obj) + _glfwHideWindowWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0BG@GOAKKGGB@EGL_KHR_gl_colorspace@ ; glfw3.lib(egl_context.obj) + _glfwSetWindowDecoratedWin32 ; glfw3.lib(win32_window.obj) + _glfwIsValidContextConfig ; glfw3.lib(context.obj) + ??_C@_0DO@OLPMIGEJ@The?5requested?5feature?5cannot?5be@ ; glfw3.lib(init.obj) + ??_C@_0HI@IJLNGEMH@0300000073070000040100000000000@ ; glfw3.lib(input.obj) + __castguard_check_failure_os_handled ; MSVCRT.lib(guard_support.obj) + _glfwSetWindowSizeNull ; glfw3.lib(null_window.obj) + _glfwEncodeUTF8 ; glfw3.lib(init.obj) + ??_C@_01IHBHIGKO@?0@ ; glfw3.lib(input.obj) + ??_C@_0ON@DOLMEDL@0300000079000000461800000000000@ ; glfw3.lib(input.obj) + __imp_SetWindowLongW ; user32.lib(USER32.dll) + ??_C@_0BBG@ODDFOEO@03000000ff110000413300000000000@ ; glfw3.lib(input.obj) + ??_C@_0CJ@JFEDIEDE@Win32?3?5Failed?5to?5remove?5raw?5inp@ ; glfw3.lib(win32_window.obj) + glfwSwapBuffers ; glfw3.lib(context.obj) + __imp_CreateBitmap ; gdi32.lib(GDI32.dll) + ??_C@_0PP@HNFBKAIN@030000006f0e0000070200000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBL@JOPBPDPP@03000000d620000011a700000000000@ ; glfw3.lib(input.obj) + ??_C@_0CE@PKGOIGHB@Win32?3?5Failed?5to?5create?5mask?5bi@ ; glfw3.lib(win32_window.obj) + CloseClipboard ; user32.lib(USER32.dll) + ??_C@_0BK@OEGBAIFC@Computer?5restart?5required@ ; glfw3.lib(win32_monitor.obj) + ??_C@_0JJ@DHPDMCKL@03000000c82d0000003000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BDA@ENLICDAF@030000006b140000130d00000000000@ ; glfw3.lib(input.obj) + glfwSetWindowAspectRatio ; glfw3.lib(window.obj) + ??_C@_0BCF@OOFHHKMG@03000000c82d0000006100000000000@ ; glfw3.lib(input.obj) + _glfwWindowMaximizedWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0BCJ@OFAKENFF@03000000242f00002d0000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BL@PDDHMPGF@wglCreateContextAttribsARB@ ; glfw3.lib(wgl_context.obj) + ??_C@_0EH@LGPPFAO@Cannot?5query?5entry?5point?5withou@ ; glfw3.lib(context.obj) + glfwGetFramebufferSize ; glfw3.lib(window.obj) + ??_C@_0BCB@KIGAAAPL@03000000f0250000c38300000000000@ ; glfw3.lib(input.obj) + glfwGetWindowPos ; glfw3.lib(window.obj) + __xmm@00080008000800080008000800080008 ; dllmain.obj + ??_C@_0CA@FNCFBEIG@Win32?3?5Failed?5to?5open?5clipboard@ ; glfw3.lib(win32_window.obj) + ??_C@_0BK@HGDBIG@wglGetExtensionsStringEXT@ ; glfw3.lib(wgl_context.obj) + ??_C@_0OA@BPMCGMAH@78696e7075740300000000000000000@ ; glfw3.lib(input.obj) + DefWindowProcW ; user32.lib(USER32.dll) + sprintf ; glfw3.lib(win32_joystick.obj) + UnhandledExceptionFilter ; kernel32.lib(KERNEL32.dll) + ??_C@_0DO@PGEACBCJ@Win32?3?5Vulkan?5instance?5missing?5@ ; glfw3.lib(win32_window.obj) + ??_C@_0BCE@CFNIKJCA@03000000c82d0000103800000000000@ ; glfw3.lib(input.obj) + __imp_strncpy ; ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + __imp_FlashWindow ; user32.lib(USER32.dll) + glfwGetGamepadState ; glfw3.lib(input.obj) + __imp_OffsetRect ; user32.lib(USER32.dll) + ??_C@_01PAPGNFGE@c@ ; glfw3.lib(null_window.obj) + ??_C@_0BA@BMKCDCKD@wglGetCurrentDC@ ; glfw3.lib(wgl_context.obj) + ??_C@_0CE@OHDHEPIL@Win32?3?5Failed?5to?5lock?5global?5ha@ ; glfw3.lib(win32_window.obj) + ??_C@_0BF@OGGDOHFN@WGL_ARB_pixel_format@ ; glfw3.lib(wgl_context.obj) + ??_C@_0BCA@PDBJCLJJ@030000006d04000019c200000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCJ@GDBCPJIF@030000000d0f0000840000000000000@ ; glfw3.lib(input.obj) + _glfwInputJoystickButton ; glfw3.lib(input.obj) + glfwSetCursorPosCallback ; glfw3.lib(input.obj) + ??_C@_0BCC@CJMNKOGI@03000000e3050000960500000000000@ ; glfw3.lib(input.obj) + ??_C@_0O@MGDACKOJ@no?5clear?5code@ ; stb_image.obj + ??_C@_0ME@PNFMJONN@030000007e050000062000000000000@ ; glfw3.lib(input.obj) + _glfwChooseVideoMode ; glfw3.lib(monitor.obj) + __imp_SetDeviceGammaRamp ; gdi32.lib(GDI32.dll) + ??_C@_0BD@NKJFFLKL@unsupported?5format@ ; stb_image.obj + ??_C@_01COCBENDE@7@ ; glfw3.lib(null_window.obj) + ??_C@_0BG@DGJLFNBN@Unknown?5XInput?5Device@ ; glfw3.lib(win32_joystick.obj) + glfwInit ; glfw3.lib(init.obj) + ??_C@_0BD@IINOPBDD@wglSwapIntervalEXT@ ; glfw3.lib(wgl_context.obj) + glfwSetWindowIcon ; glfw3.lib(window.obj) + pow ; ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + ??_C@_0CF@OGLFKBHA@WGL?3?5Failed?5to?5describe?5pixel?5f@ ; glfw3.lib(wgl_context.obj) + ??_C@_0JC@NGKIIHPA@03000000921200004b4600000000000@ ; glfw3.lib(input.obj) + TrackMouseEvent ; user32.lib(USER32.dll) + ??_C@_0FO@KAELFDNN@Vulkan?3?5Window?5surface?5creation@ ; glfw3.lib(vulkan.obj) + GetModuleHandleW ; kernel32.lib(KERNEL32.dll) + __imp_GetPropW ; user32.lib(USER32.dll) + ??_C@_07JNJHIMGH@bad?5bpp@ ; stb_image.obj + ??_C@_0BDH@LGMFPGNL@030000005e040000ea0200000000000@ ; glfw3.lib(input.obj) + ??_C@_0CN@JHECHMPF@OSMesa?3?5OpenGL?5ES?5is?5not?5availa@ ; glfw3.lib(osmesa_context.obj) + ??_C@_0O@OMNEJBKO@eglGetConfigs@ ; glfw3.lib(egl_context.obj) + _glfwGetMappingNameNull ; glfw3.lib(null_joystick.obj) + ??_C@_0M@DOFMJEMP@bad?5SOF?5len@ ; stb_image.obj + ??_C@_0P@PNCLKCLJ@bad?5DNL?5height@ ; stb_image.obj + __imp__initialize_onexit_table ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + _glfwGetEGLNativeWindowNull ; glfw3.lib(null_window.obj) + glfwGetVideoMode ; glfw3.lib(monitor.obj) + ??_C@_0BCH@BOPAENED@030000006e050000032000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BDA@LBDFNLMA@03000000c0110000014000000000000@ ; glfw3.lib(input.obj) + glfwSetKeyCallback ; glfw3.lib(input.obj) + ??_C@_0BCC@BGKKLNHG@030000005f140000c50100000000000@ ; glfw3.lib(input.obj) + __imp_EnumDisplaySettingsExW ; user32.lib(USER32.dll) + _glfwGetWindowOpacityNull ; glfw3.lib(null_window.obj) + _glfwRawMouseMotionSupportedWin32 ; glfw3.lib(win32_window.obj) + __imp_strcmp ; ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + ??_C@_0OJ@KFMPHKBC@0300000010000000820000000000000@ ; glfw3.lib(input.obj) + ??_C@_0O@IFDGNEHH@XInput?5Guitar@ ; glfw3.lib(win32_joystick.obj) + _glfwInputJoystickHat ; glfw3.lib(input.obj) + __imp_feof ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + EnumDisplayMonitors ; user32.lib(USER32.dll) + ??_C@_0DC@HFHALHIB@WGL?3?5The?5driver?5does?5not?5appear@ ; glfw3.lib(wgl_context.obj) + ??_C@_07PBILKAFL@Success@ ; glfw3.lib(vulkan.obj) + ??_C@_0CC@GOIKODMM@EGL?3?5Failed?5to?5create?5context?3?5@ ; glfw3.lib(egl_context.obj) + ??_C@_0CN@GOPDCGGI@OpenGL?5ES?5version?5string?5retrie@ ; glfw3.lib(context.obj) + SendMessageW ; user32.lib(USER32.dll) + ??_C@_0BCG@JCENNNEN@0300000063250000230500000000000@ ; glfw3.lib(input.obj) + ??_C@_0PI@JHAKKPHF@030000008f0e0000103000000000000@ ; glfw3.lib(input.obj) + ??_C@_0BJ@CIMJOHKL@WGL_ARB_framebuffer_sRGB@ ; glfw3.lib(wgl_context.obj) + ??_C@_0GC@KIFEGHB@03000000fa2d0000010000000000000@ ; glfw3.lib(input.obj) + _glfwSetCursorModeNull ; glfw3.lib(null_window.obj) + ??_C@_0BK@EIOPBJJH@Invalid?5client?5API?50x?$CF08X@ ; glfw3.lib(context.obj) + _glfwDestroyCursorWin32 ; glfw3.lib(win32_window.obj) + _glfwGetMonitorWorkareaWin32 ; glfw3.lib(win32_monitor.obj) + ??_C@_0BI@BFOJALMM@Invalid?5refresh?5rate?5?$CFi@ ; glfw3.lib(window.obj) + ??_C@_01OMGOGALD@u@ ; glfw3.lib(null_window.obj) + _glfwInitVulkan ; glfw3.lib(vulkan.obj) + __xmm@1c5a1c5a1c5a1c5a1c5a1c5a1c5a1c5a ; dllmain.obj + ??_C@_0BCO@ICLHBGLC@03000000d6200000600000000000000@ ; glfw3.lib(input.obj) + _glfwPlatformCreateTls ; glfw3.lib(win32_thread.obj) + _glfw_realloc ; glfw3.lib(init.obj) + ??_C@_0BCD@CGKCHHKM@78696e7075740400000000000000000@ ; glfw3.lib(input.obj) + __guard_memcpy_fptr ; vcruntime.lib(softmemtag.obj) + ??_C@_0P@GJNJCPDJ@too?5many?5codes@ ; stb_image.obj + ??_C@_0FN@NPOMMKHN@WGL?3?5A?5forward?5compatible?5OpenG@ ; glfw3.lib(wgl_context.obj) + _cexit ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + GetSystemMetrics ; user32.lib(USER32.dll) + ??_C@_0CC@NGDHIGBI@eglCreatePlatformWindowSurfaceE@ ; glfw3.lib(egl_context.obj) + ??_C@_0BCN@JADNPMFA@030000006f0e0000110100000000000@ ; glfw3.lib(input.obj) + __imp___stdio_common_vfprintf ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + __imp_DispatchMessageW ; user32.lib(USER32.dll) + ??_C@_0BP@NMKFFDCO@EGL_ANGLE_platform_angle_metal@ ; glfw3.lib(egl_context.obj) + glfwVulkanSupported ; glfw3.lib(vulkan.obj) + __imp__crt_atexit ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + _glfwCreateStandardCursorWin32 ; glfw3.lib(win32_window.obj) + glfwCreateWindow ; glfw3.lib(window.obj) + ??_C@_0BBE@BNPLHIOK@03000000ac0500003d0300000000000@ ; glfw3.lib(input.obj) + _glfwPostEmptyEventNull ; glfw3.lib(null_window.obj) + ??_C@_0BL@IKJGDNLO@Invalid?5cursor?5mode?50x?$CF08X@ ; glfw3.lib(input.obj) + ??_C@_0BDD@DODHFLKI@030000007e050000092000000000000@ ; glfw3.lib(input.obj) + ??_C@_0MJ@DMAMFLIE@030000001008000001e500000000000@ ; glfw3.lib(input.obj) + ??_C@_0PI@MHCFEKFM@03000000ff110000313300000000000@ ; glfw3.lib(input.obj) + ??_C@_0CH@GAPNPCHF@Win32?3?5Failed?5to?5register?5windo@ ; glfw3.lib(win32_window.obj) + ??_C@_0BBC@NNMIKKEI@03000000341a0000090800000000000@ ; glfw3.lib(input.obj) + _glfwInputFramebufferSize ; glfw3.lib(window.obj) + ??_C@_0EE@NKCAIGPH@A?5NativePixmapType?5argument?5doe@ ; glfw3.lib(egl_context.obj) + ??_C@_0BB@MAMHPNNC@GetDpiForMonitor@ ; glfw3.lib(win32_init.obj) + __imp_SendMessageW ; user32.lib(USER32.dll) + glfwWaitEventsTimeout ; glfw3.lib(window.obj) + glfwMaximizeWindow ; glfw3.lib(window.obj) + glfwSetCharModsCallback ; glfw3.lib(input.obj) + SetForegroundWindow ; user32.lib(USER32.dll) + __real@42c00000 ; glfw3.lib(win32_monitor.obj) + ??_C@_09DAEBACAB@bad?5masks@ ; stb_image.obj + ??_C@_0BCD@PNMMMGBA@030000008f0e0000143100000000000@ ; glfw3.lib(input.obj) + ??_C@_01INIBCBCB@f@ ; glfw3.lib(null_window.obj) + ??_C@_0BCA@JHGJKADI@03000000f0250000c18300000000000@ ; glfw3.lib(input.obj) + __imp_ReleaseCapture ; user32.lib(USER32.dll) + ??_C@_0MP@NNGGKFCK@0300000025090000001700000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCE@CONCKJMB@03000000c82d0000019000000000000@ ; glfw3.lib(input.obj) + ??_C@_0P@MADFBLIB@libGLES_CM?4dll@ ; glfw3.lib(egl_context.obj) + __imp_GetLastError ; kernel32.lib(KERNEL32.dll) + glfwGetWindowUserPointer ; glfw3.lib(window.obj) + ??_C@_0CG@DAAALEIC@The?5requested?5platform?5is?5unava@ ; glfw3.lib(init.obj) + _glfwSelectPlatform ; glfw3.lib(platform.obj) + ??_C@_0BCN@IFHHFAPH@030000006f0e00001a0100000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCP@LIBLBNIN@03000000d6200000c75700000000000@ ; glfw3.lib(input.obj) + _glfwHideWindowNull ; glfw3.lib(null_window.obj) + ??_C@_0BDA@PPKEBMHL@030000006d040000d2ca00000000000@ ; glfw3.lib(input.obj) + __imp_DeleteObject ; gdi32.lib(GDI32.dll) + _glfwGetGammaRampNull ; glfw3.lib(null_monitor.obj) + ??_C@_06DJHOIPC@?$CFs?3?5?$CFs@ ; glfw3.lib(win32_init.obj) + strstr ; vcruntime.lib(VCRUNTIME140.dll) + __scrt_initialize_mta ; MSVCRT.lib(utility_desktop.obj) + GetClientRect ; user32.lib(USER32.dll) + ??_C@_0OH@IPHKKKC@03000000790000001b1800000000000@ ; glfw3.lib(input.obj) + ??_C@_0BBJ@FKKMPNGK@03000000341a0000060800000000000@ ; glfw3.lib(input.obj) + _glfwMaximizeWindowWin32 ; glfw3.lib(win32_window.obj) + __imp_GetClientRect ; user32.lib(USER32.dll) + ??_C@_0BBD@GHNGPLFD@0300000038070000808400000000000@ ; glfw3.lib(input.obj) + ??_C@_0CL@GPJNIICL@Win32?3?5Failed?5to?5register?5raw?5i@ ; glfw3.lib(win32_window.obj) + __imp_CreateDCW ; gdi32.lib(GDI32.dll) + _glfwSetWindowMonitorWin32 ; glfw3.lib(win32_window.obj) + _glfwSetWindowSizeLimitsWin32 ; glfw3.lib(win32_window.obj) + BringWindowToTop ; user32.lib(USER32.dll) + glfwGetMonitorPhysicalSize ; glfw3.lib(monitor.obj) + ??_C@_0P@FCCEJHCC@XInputGetState@ ; glfw3.lib(win32_init.obj) + __imp_TlsFree ; kernel32.lib(KERNEL32.dll) + glfwSetWindowPosCallback ; glfw3.lib(window.obj) + ??_C@_0BBF@IGGJOAJN@03000000341a0000020800000000000@ ; glfw3.lib(input.obj) + ??_C@_0L@JLFHOCGA@OpenGL?5ES?5@ ; glfw3.lib(context.obj) + ??_C@_01ICJEACDI@?$DL@ ; glfw3.lib(null_window.obj) + ??_C@_0P@BBBFNDGG@wglMakeCurrent@ ; glfw3.lib(wgl_context.obj) + ??_C@_0FN@PJBCJBIL@The?5requested?5window?5is?5already@ ; glfw3.lib(vulkan.obj) + IsZoomed ; user32.lib(USER32.dll) + ??_C@_0BH@GIBFIFPN@EGL_KHR_create_context@ ; glfw3.lib(egl_context.obj) + _glfwTerminateWin32 ; glfw3.lib(win32_init.obj) + ??_C@_0BCA@NJAENDKN@03000000341a0000230800000000000@ ; glfw3.lib(input.obj) + ??_C@_0BB@LNEGOMA@no?5header?5height@ ; stb_image.obj + CreateRectRgn ; gdi32.lib(GDI32.dll) + _glfwGetPhysicalDevicePresentationSupportWin32 ; glfw3.lib(win32_window.obj) + ??_C@_0BO@IDEEMGNC@EGL_KHR_context_flush_control@ ; glfw3.lib(egl_context.obj) + ??_C@_0BP@OHJGLFIP@Win32?3?5Failed?5to?5create?5device@ ; glfw3.lib(win32_joystick.obj) + ??_C@_0BE@EFOBHOAB@VK_KHR_xlib_surface@ ; glfw3.lib(vulkan.obj) + __scrt_dllmain_exception_filter ; MSVCRT.lib(utility.obj) + ??_C@_0CF@EKIADPFB@WGL?3?5Failed?5to?5clear?5current?5co@ ; glfw3.lib(wgl_context.obj) + _glfwInputChar ; glfw3.lib(input.obj) + ??_C@_0BBG@IEDKEHBE@03000000790000000a0000000000000@ ; glfw3.lib(input.obj) + _glfwGetGammaRampWin32 ; glfw3.lib(win32_monitor.obj) + ??_C@_0BCK@MNABGIK@030000006b140000010300000000000@ ; glfw3.lib(input.obj) + ??_C@_19JBPKICJI@?$AAG?$AAL?$AAF?$AAW@ ; glfw3.lib(win32_window.obj) + __imp_GetWindowLongW ; user32.lib(USER32.dll) + ??_C@_0BH@PDIOJKKP@EGL?3?5API?5not?5available@ ; glfw3.lib(egl_context.obj) + glfwUpdateGamepadMappings ; glfw3.lib(input.obj) + _glfwInitWin32 ; glfw3.lib(win32_init.obj) + ??_C@_03LPIGJBNC@lib@ ; glfw3.lib(egl_context.obj) + ??_C@_06EBHLNDKL@dpleft@ ; glfw3.lib(input.obj) + ??_C@_01EANLCPLP@y@ ; glfw3.lib(input.obj) + __imp_ferror ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + __imp_GetLayeredWindowAttributes ; user32.lib(USER32.dll) + _glfwIconifyWindowNull ; glfw3.lib(null_window.obj) + ??_C@_0BDB@PPKHIPGK@0300000038070000813400000000000@ ; glfw3.lib(input.obj) + ??_C@_0BCB@GBOFCHI@03000000a30600000c0400000000000@ ; glfw3.lib(input.obj) + ??_C@_0KC@BDMHLJAH@0300000010280000090000000000000@ ; glfw3.lib(input.obj) + ??_C@_0N@DOKAJOHF@opengl32?4dll@ ; glfw3.lib(wgl_context.obj) + ??_C@_0BCG@JIGLIOKN@03000000d1180000009400000000000@ ; glfw3.lib(input.obj) + _glfwTerminateWGL ; glfw3.lib(wgl_context.obj) + _configure_narrow_argv ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + __imp_ScreenToClient ; user32.lib(USER32.dll) + __imp_fopen_s ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ??_C@_0DC@KKLJAJOK@OSMesa?3?5Forward?9compatible?5cont@ ; glfw3.lib(osmesa_context.obj) + ??_C@_0BG@IPJFJLIC@EGL_EXT_platform_base@ ; glfw3.lib(egl_context.obj) + __imp_GetClassLongPtrW ; user32.lib(USER32.dll) + __scrt_initialize_crt ; MSVCRT.lib(utility.obj) + ??_C@_0BC@DBAKKFEN@Invalid?5parameter@ ; glfw3.lib(win32_monitor.obj) + __imp_EnumDisplayDevicesW ; user32.lib(USER32.dll) + ??_C@_0CI@MMBFOOEA@Win32?3?5Failed?5to?5set?5device?5dat@ ; glfw3.lib(win32_joystick.obj) + glfwSetWindowOpacity ; glfw3.lib(window.obj) + glfwGetMonitorContentScale ; glfw3.lib(monitor.obj) + __xmm@11c8f9c311c8f9c311c8f9c311c8f9c3 ; dllmain.obj + __imp_GetMessageTime ; user32.lib(USER32.dll) + __imp_fseek ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + glfwGetWin32Monitor ; glfw3.lib(win32_monitor.obj) + ??_C@_01KJLJFBPL@8@ ; glfw3.lib(null_window.obj) + ??_C@_0O@EEJFKEKH@eglInitialize@ ; glfw3.lib(egl_context.obj) + _glfwInputWindowMonitor ; glfw3.lib(window.obj) + glfwGetEGLContext ; glfw3.lib(egl_context.obj) + glfwSetScrollCallback ; glfw3.lib(input.obj) + ??_C@_0BCD@BABDCDPH@030000004c050000cc0900000000000@ ; glfw3.lib(input.obj) + ??_C@_01GOHFPIOK@m@ ; glfw3.lib(null_window.obj) + GlobalAlloc ; kernel32.lib(KERNEL32.dll) + ??_C@_0BCB@FAGFKFBC@03000000c82d0000013000000000000@ ; glfw3.lib(input.obj) + __castguard_check_failure_fastfail ; MSVCRT.lib(guard_support.obj) + OpenClipboard ; user32.lib(USER32.dll) + __imp_GetModuleHandleW ; kernel32.lib(KERNEL32.dll) + ??_C@_0IN@KIPMJDI@03000000c82d0000045100000000000@ ; glfw3.lib(input.obj) + _glfwGetMonitorPosNull ; glfw3.lib(null_monitor.obj) + ??_C@_0BDE@NDAIINLM@0300000038070000843300000000000@ ; glfw3.lib(input.obj) + ??_C@_0BB@JDDMDGFO@XInput?5Dance?5Pad@ ; glfw3.lib(win32_joystick.obj) + ??_C@_0BBG@IKJMKIKH@03000000790000001c1800000000000@ ; glfw3.lib(input.obj) + _glfwInputWindowIconify ; glfw3.lib(window.obj) + glfwDestroyCursor ; glfw3.lib(input.obj) + glfwGetWindowContentScale ; glfw3.lib(window.obj) + ??_C@_0BCO@NNBOKIIL@030000006f0e00001e0100000000000@ ; glfw3.lib(input.obj) + ??_C@_0DI@GNLCAHHB@A?5requested?5layer?5is?5not?5presen@ ; glfw3.lib(vulkan.obj) + ??_C@_0L@BCINMEBJ@only?58?9bit@ ; stb_image.obj + ??_C@_0CJ@EFIFNOJC@Win32?3?5Failed?5to?5convert?5string@ ; glfw3.lib(win32_init.obj) + ??_C@_0N@POJLKMKK@bad?5IHDR?5len@ ; stb_image.obj + __imp_GlobalFree ; kernel32.lib(KERNEL32.dll) + __real@7fefffffffffffff ; glfw3.lib(window.obj) + ??_C@_0N@ODCBCBFN@BMP?5JPEG?1PNG@ ; stb_image.obj + ??_C@_05FAGFPHJG@start@ ; glfw3.lib(input.obj) + ??_C@_0BCH@HONEFEFO@030000000d0f00005c0000000000000@ ; glfw3.lib(input.obj) + _glfwCreateWindowSurfaceNull ; glfw3.lib(null_window.obj) + __scrt_get_show_window_mode ; MSVCRT.lib(utility_desktop.obj) + memmove ; vcruntime.lib(VCRUNTIME140.dll) + __imp_strstr ; vcruntime.lib(VCRUNTIME140.dll) + __scrt_dllmain_crt_thread_detach ; MSVCRT.lib(utility.obj) + __imp_EnumDisplaySettingsW ; user32.lib(USER32.dll) + ??_C@_0BN@OHLJPDPM@EGL_ANGLE_platform_angle_d3d@ ; glfw3.lib(egl_context.obj) + _initialize_onexit_table ; ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ??_C@_07BIDACDEF@0?5width@ ; stb_image.obj + ??_C@_0BBL@HCLFABAI@03000000bc200000641200000000000@ ; glfw3.lib(input.obj) + ??_C@_0OM@PAPEIDEH@030000000d0f0000400000000000000@ ; glfw3.lib(input.obj) + glfwShowWindow ; glfw3.lib(window.obj) + __real@437f0000 ; dllmain.obj + ??_C@_0CE@KDBKFLEE@Invalid?5argument?5for?5enum?5param@ ; glfw3.lib(init.obj) + __imp_RegisterClassExW ; user32.lib(USER32.dll) + __xmm@00000008000000080000000800000008 ; glfw3.lib(window.obj) + ??_C@_0CB@DDANHPKI@can?8t?5fopen?0?5Unable?5to?5open?5fil@ ; stb_image.obj + __acrt_iob_func ; ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + __imp_GetCurrentProcess ; kernel32.lib(KERNEL32.dll) + ??_C@_0BJ@MBAAGFCG@AdjustWindowRectExForDpi@ ; glfw3.lib(win32_init.obj) + _CRT_INIT ; MSVCRT.lib(dll_dllmain.obj) + __imp_ChoosePixelFormat ; gdi32.lib(GDI32.dll) + glfwGetEGLDisplay ; glfw3.lib(egl_context.obj) + _glfwInitNull ; glfw3.lib(null_init.obj) + EnterCriticalSection ; kernel32.lib(KERNEL32.dll) + glfwSetWindowPos ; glfw3.lib(window.obj) + __real@477fff00 ; dllmain.obj + ??_C@_0BDN@OKDOLNP@03000000222c0000002300000000000@ ; glfw3.lib(input.obj) + DescribePixelFormat ; gdi32.lib(GDI32.dll) + ??_C@_0FH@MCDKNJAI@Initialization?5of?5an?5object?5cou@ ; glfw3.lib(vulkan.obj) + __report_securityfailureEx ; MSVCRT.lib(gs_report.obj) + ??_C@_0M@MHDBFHD@unsupported@ ; stb_image.obj + ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA ; MSVCRT.lib(default_local_stdio_options.obj) + _glfwRawMouseMotionSupportedNull ; glfw3.lib(null_window.obj) + __scrt_dllmain_uninitialize_c ; MSVCRT.lib(utility.obj) + ??_C@_09IFDKCGFO@bad?5delta@ ; stb_image.obj + ??_C@_0BCJ@JCLGLLDN@03000000d620000013a700000000000@ ; glfw3.lib(input.obj) + PeekMessageW ; user32.lib(USER32.dll) + ??_C@_0BBO@FCIHICKG@03000000b5070000120300000000000@ ; glfw3.lib(input.obj) + GetStartupInfoW ; kernel32.lib(KERNEL32.dll) + glfwSetWindowAttrib ; glfw3.lib(window.obj) + ??_C@_0CA@OJFEOPKP@EGL_KHR_create_context_no_error@ ; glfw3.lib(egl_context.obj) + _glfwConnectNull ; glfw3.lib(null_init.obj) + ??_C@_0BK@NKEDGNNN@EnableNonClientDpiScaling@ ; glfw3.lib(win32_init.obj) + __imp___current_exception ; vcruntime.lib(VCRUNTIME140.dll) + ??_C@_04EDFFKKLO@dpup@ ; glfw3.lib(input.obj) + _glfwGetScancodeNameNull ; glfw3.lib(null_window.obj) + ??_C@_0BM@KHOPPJNJ@EGL?3?5No?5EGLConfigs?5returned@ ; glfw3.lib(egl_context.obj) + __imp_DragQueryFileW ; shell32.lib(SHELL32.dll) + TerminateProcess ; kernel32.lib(KERNEL32.dll) + ??_C@_0BE@PJBNGDBE@wrong?5channel?5count@ ; stb_image.obj + ??_C@_0BCG@NPOEDNBE@030000000d0f00008a0000000000000@ ; glfw3.lib(input.obj) + ??_C@_0CN@FALFGDO@No?5version?5found?5in?5OpenGL?5ES?5v@ ; glfw3.lib(context.obj) + ??_C@_0O@CHBCDKKC@wrong?5version@ ; stb_image.obj + strcmp ; ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + ??_C@_01PFHFFBPC@t@ ; glfw3.lib(null_window.obj) + ??_C@_0BCB@JPNPNPJC@0300000079000000220100000000000@ ; glfw3.lib(input.obj) + 已完成对 /ORDER 选项的处理 + 已丢弃 "`string'" (??_C@_07CAIJGPF@file?3?1?1@)(从 glfw3.lib(init.obj) 中) + 已丢弃 "`string'" (??_C@_0CB@DDANHPKI@can?8t?5fopen?0?5Unable?5to?5open?5fil@)(从 stb_image.obj 中) + 已丢弃 "`string'" (??_C@_0BL@MOJGOJJP@Failed?5to?5load?5OpenGL?5api?3@)(从 StgSharpC.obj 中) + 已丢弃 "`string'" (??_C@_03OFAPEBGM@?$CFs?6@)(从 StgSharpC.obj 中) + 已丢弃 __CastGuardVftablesStart(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __CastGuardVftablesEnd(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 $unwind$stbi__cpuid3(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__sse2_available(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__start_callbacks(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__start_file(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__fopen(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__get8(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__at_eof(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__build_fast_ac(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__jpeg_huff_decode(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__extend_receive(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__jpeg_get_bits(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__jpeg_get_bit(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__skip_jpeg_junk_at_end(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__jpeg_load(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__jpeg_test(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__zreceive(从 stb_image.obj 中) + 已丢弃 $chain$0$stbi__zreceive(从 stb_image.obj 中) + 已丢弃 $chain$1$stbi__zreceive(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__zhuffman_decode(从 stb_image.obj 中) + 已丢弃 $unwind$stbi_zlib_decode_malloc_guesssize_headerflag(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__get_chunk_header(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__paeth(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__expand_png_palette(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__de_iphone(从 stb_image.obj 中) + 已丢弃 $chain$0$stbi__de_iphone(从 stb_image.obj 中) + 已丢弃 $chain$1$stbi__de_iphone(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__do_png(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__png_load(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__png_test(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__bmp_test_raw(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__bmp_test(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__psd_test(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__pic_test_core(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__pic_test(从 stb_image.obj 中) + 已丢弃 $chain$2$stbi__pic_test(从 stb_image.obj 中) + 已丢弃 $chain$3$stbi__pic_test(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__gif_test(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__hdr_test_core(从 stb_image.obj 中) + 已丢弃 $unwind$stbi__pnm_test(从 stb_image.obj 中) + 已丢弃 $unwind$_vfprintf_l(从 StgSharpC.obj 中) + 已丢弃 $unwind$printf(从 StgSharpC.obj 中) + 已丢弃 $unwind$_glfwParseUriList(从 glfw3.lib(init.obj) 中) + 已丢弃 $chain$1$_glfwParseUriList(从 glfw3.lib(init.obj) 中) + 已丢弃 $chain$2$_glfwParseUriList(从 glfw3.lib(init.obj) 中) + 已丢弃 $chain$3$_glfwParseUriList(从 glfw3.lib(init.obj) 中) + 已丢弃 $unwind$__report_securityfailure(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃 $unwind$__report_securityfailureEx(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃 $unwind$__report_rangecheckfailure(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃 $unwind$capture_current_context(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃 $unwind$__get_entropy(从 MSVCRT.lib(gs_support.obj) 中) + 已丢弃 $unwind$atexit(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 $unwind$_onexit(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 $unwind$?configure_argv@__scrt_narrow_argv_policy@@SAHXZ(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 $unwind$__scrt_get_show_window_mode(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 $unwind$__scrt_is_managed_app(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 $unwind$__scrt_unhandled_exception_filter(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 $unwind$__castguard_check_failure_os_handled_wrapper(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 $unwind$__castguard_check_failure_user_handled_wrapper(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 $unwind$__castguard_check_failure_os_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 $unwind$__castguard_check_failure_user_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 $unwind$__castguard_slow_path_check_os_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 $unwind$__castguard_slow_path_check_user_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 "unsigned __int64 `__local_stdio_printf_options'::`2'::_OptionsStorage" (?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA)(从 MSVCRT.lib(default_local_stdio_options.obj) 中) + 已丢弃 "unsigned __int64 `__local_stdio_scanf_options'::`2'::_OptionsStorage" (?_OptionsStorage@?1??__local_stdio_scanf_options@@9@4_KA)(从 MSVCRT.lib(default_local_stdio_options.obj) 中) + 已丢弃 __castguard_check_failure_user_handled_fptr(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __isa_available_default(从 dllmain.obj 中) + 已丢弃 $pdata$_glfwParseUriList(从 glfw3.lib(init.obj) 中) + 已丢弃 $pdata$1$_glfwParseUriList(从 glfw3.lib(init.obj) 中) + 已丢弃 $pdata$2$_glfwParseUriList(从 glfw3.lib(init.obj) 中) + 已丢弃 $pdata$3$_glfwParseUriList(从 glfw3.lib(init.obj) 中) + 已丢弃 $pdata$__report_securityfailure(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃 $pdata$__report_securityfailureEx(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃 $pdata$__report_rangecheckfailure(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃 $pdata$capture_current_context(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃 $pdata$__get_entropy(从 MSVCRT.lib(gs_support.obj) 中) + 已丢弃 $pdata$atexit(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 $pdata$_onexit(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 $pdata$?configure_argv@__scrt_narrow_argv_policy@@SAHXZ(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 $pdata$__scrt_get_show_window_mode(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 $pdata$__scrt_is_managed_app(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 $pdata$__scrt_unhandled_exception_filter(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 $pdata$__castguard_check_failure_os_handled_wrapper(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 $pdata$__castguard_check_failure_user_handled_wrapper(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 $pdata$__castguard_check_failure_os_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 $pdata$__castguard_check_failure_user_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 $pdata$__castguard_slow_path_check_os_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 $pdata$__castguard_slow_path_check_user_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 $pdata$stbi__pnm_test(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__hdr_test_core(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__gif_test(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__pic_test(从 stb_image.obj 中) + 已丢弃 $pdata$2$stbi__pic_test(从 stb_image.obj 中) + 已丢弃 $pdata$3$stbi__pic_test(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__pic_test_core(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__psd_test(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__bmp_test(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__bmp_test_raw(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__png_test(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__png_load(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__do_png(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__de_iphone(从 stb_image.obj 中) + 已丢弃 $pdata$0$stbi__de_iphone(从 stb_image.obj 中) + 已丢弃 $pdata$1$stbi__de_iphone(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__expand_png_palette(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__paeth(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__get_chunk_header(从 stb_image.obj 中) + 已丢弃 $pdata$stbi_zlib_decode_malloc_guesssize_headerflag(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__zhuffman_decode(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__zreceive(从 stb_image.obj 中) + 已丢弃 $pdata$0$stbi__zreceive(从 stb_image.obj 中) + 已丢弃 $pdata$1$stbi__zreceive(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__jpeg_test(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__jpeg_load(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__skip_jpeg_junk_at_end(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__jpeg_get_bit(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__jpeg_get_bits(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__extend_receive(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__jpeg_huff_decode(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__build_fast_ac(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__at_eof(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__get8(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__fopen(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__start_file(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__start_callbacks(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__sse2_available(从 stb_image.obj 中) + 已丢弃 $pdata$stbi__cpuid3(从 stb_image.obj 中) + 已丢弃 $pdata$printf(从 StgSharpC.obj 中) + 已丢弃 $pdata$_vfprintf_l(从 StgSharpC.obj 中) + 已丢弃“.idata$4”(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃“.idata$4”(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃“.idata$4”(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃“.idata$4”(从 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中) + 已丢弃 __imp_GetStartupInfoW(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 __imp___current_exception_context(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃 __imp___current_exception(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃 __imp__register_onexit_function(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 __imp_terminate(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 __imp__crt_at_quick_exit(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 __imp__crt_atexit(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 __imp___acrt_iob_func(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 __imp_ftell(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 __imp___stdio_common_vfprintf(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 __imp_strtok(从 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃“.idata$6”(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃“.idata$6”(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 stbi__cpuid3(从 stb_image.obj 中) + 已丢弃 stbi__sse2_available(从 stb_image.obj 中) + 已丢弃 stbi__start_callbacks(从 stb_image.obj 中) + 已丢弃 stbi__start_file(从 stb_image.obj 中) + 已丢弃 stbi__rewind(从 stb_image.obj 中) + 已丢弃 stbi__err(从 stb_image.obj 中) + 已丢弃 stbi__malloc(从 stb_image.obj 中) + 已丢弃 stbi__addsizes_valid(从 stb_image.obj 中) + 已丢弃 stbi__mul2sizes_valid(从 stb_image.obj 中) + 已丢弃 stbi__mad2sizes_valid(从 stb_image.obj 中) + 已丢弃 stbi__mad3sizes_valid(从 stb_image.obj 中) + 已丢弃 stbi__malloc_mad2(从 stb_image.obj 中) + 已丢弃 stbi__malloc_mad3(从 stb_image.obj 中) + 已丢弃 stbi__fopen(从 stb_image.obj 中) + 已丢弃 stbi__get8(从 stb_image.obj 中) + 已丢弃 stbi__at_eof(从 stb_image.obj 中) + 已丢弃 stbi__compute_y(从 stb_image.obj 中) + 已丢弃 stbi__compute_y_16(从 stb_image.obj 中) + 已丢弃 stbi__build_fast_ac(从 stb_image.obj 中) + 已丢弃 stbi__jpeg_huff_decode(从 stb_image.obj 中) + 已丢弃 stbi__extend_receive(从 stb_image.obj 中) + 已丢弃 stbi__jpeg_get_bits(从 stb_image.obj 中) + 已丢弃 stbi__jpeg_get_bit(从 stb_image.obj 中) + 已丢弃 stbi__clamp(从 stb_image.obj 中) + 已丢弃 stbi__jpeg_reset(从 stb_image.obj 中) + 已丢弃 stbi__jpeg_dequantize(从 stb_image.obj 中) + 已丢弃 stbi__skip_jpeg_junk_at_end(从 stb_image.obj 中) + 已丢弃 stbi__cleanup_jpeg(从 stb_image.obj 中) + 已丢弃 stbi__blinn_8x8(从 stb_image.obj 中) + 已丢弃 stbi__jpeg_load(从 stb_image.obj 中) + 已丢弃 stbi__jpeg_test(从 stb_image.obj 中) + 已丢弃 stbi__bitreverse16(从 stb_image.obj 中) + 已丢弃 stbi__bit_reverse(从 stb_image.obj 中) + 已丢弃 stbi__zeof(从 stb_image.obj 中) + 已丢弃 stbi__zget8(从 stb_image.obj 中) + 已丢弃 stbi__zreceive(从 stb_image.obj 中) + 已丢弃 stbi__zhuffman_decode(从 stb_image.obj 中) + 已丢弃 stbi__parse_zlib_header(从 stb_image.obj 中) + 已丢弃 stbi__do_zlib(从 stb_image.obj 中) + 已丢弃 stbi_zlib_decode_malloc_guesssize_headerflag(从 stb_image.obj 中) + 已丢弃 stbi__get_chunk_header(从 stb_image.obj 中) + 已丢弃 stbi__paeth(从 stb_image.obj 中) + 已丢弃 stbi__compute_transparency(从 stb_image.obj 中) + 已丢弃 stbi__compute_transparency16(从 stb_image.obj 中) + 已丢弃 stbi__expand_png_palette(从 stb_image.obj 中) + 已丢弃 stbi__de_iphone(从 stb_image.obj 中) + 已丢弃 stbi__do_png(从 stb_image.obj 中) + 已丢弃 stbi__png_load(从 stb_image.obj 中) + 已丢弃 stbi__png_test(从 stb_image.obj 中) + 已丢弃 stbi__bmp_test_raw(从 stb_image.obj 中) + 已丢弃 stbi__bmp_test(从 stb_image.obj 中) + 已丢弃 stbi__bitcount(从 stb_image.obj 中) + 已丢弃 stbi__shiftsigned(从 stb_image.obj 中) + 已丢弃 stbi__tga_get_comp(从 stb_image.obj 中) + 已丢弃 stbi__psd_test(从 stb_image.obj 中) + 已丢弃 stbi__pic_test_core(从 stb_image.obj 中) + 已丢弃 stbi__copyval(从 stb_image.obj 中) + 已丢弃 stbi__pic_test(从 stb_image.obj 中) + 已丢弃 stbi__gif_test(从 stb_image.obj 中) + 已丢弃 stbi__hdr_test_core(从 stb_image.obj 中) + 已丢弃 stbi__pnm_test(从 stb_image.obj 中) + 已丢弃 stbi__pnm_isspace(从 stb_image.obj 中) + 已丢弃 stbi__pnm_isdigit(从 stb_image.obj 中) + 已丢弃 _vfprintf_l(从 StgSharpC.obj 中) + 已丢弃 printf(从 StgSharpC.obj 中) + 已丢弃 _glfwEncodeUTF8(从 glfw3.lib(init.obj) 中) + 已丢弃 _glfwParseUriList(从 glfw3.lib(init.obj) 中) + 已丢弃 __report_rangecheckfailure(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃 __report_securityfailure(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃 __report_securityfailureEx(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃 capture_current_context(从 MSVCRT.lib(gs_report.obj) 中) + 已丢弃 "int __cdecl dllmain_raw(struct HINSTANCE__ * const,unsigned long,void * const)" (?dllmain_raw@@YAHQEAUHINSTANCE__@@KQEAX@Z)(从 MSVCRT.lib(dll_dllmain.obj) 中) + 已丢弃 _CRT_INIT(从 MSVCRT.lib(dll_dllmain.obj) 中) + 已丢弃 __get_entropy(从 MSVCRT.lib(gs_support.obj) 中) + 已丢弃 "public: static int __cdecl __scrt_narrow_argv_policy::configure_argv(void)" (?configure_argv@__scrt_narrow_argv_policy@@SAHXZ)(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 "struct _IMAGE_SECTION_HEADER * __cdecl find_pe_section(unsigned char * const,unsigned __int64)" (?find_pe_section@@YAPEAU_IMAGE_SECTION_HEADER@@QEAE_K@Z)(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 "public: static int __cdecl __scrt_narrow_environment_policy::initialize_environment(void)" (?initialize_environment@__scrt_narrow_environment_policy@@SAHXZ)(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 "bool __cdecl is_potentially_valid_image_base(void * const)" (?is_potentially_valid_image_base@@YA_NQEAX@Z)(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 NtCurrentTeb(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 _onexit(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 at_quick_exit(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 atexit(从 MSVCRT.lib(utility.obj) 中) + 已丢弃 __scrt_get_show_window_mode(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 __scrt_initialize_mta(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 __scrt_initialize_winrt(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 __scrt_is_managed_app(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 __scrt_set_unhandled_exception_filter(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 __scrt_stub_for_initialize_mta(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 __scrt_unhandled_exception_filter(从 MSVCRT.lib(utility_desktop.obj) 中) + 已丢弃 ReadNoFence64(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 ReadPointerNoFence(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_debugbreak(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_fastfail(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_nop(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_os_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_os_handled_wrapper(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_user_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_check_failure_user_handled_wrapper(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_compat_check(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_set_user_handler(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_slow_path_check_debugbreak(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_slow_path_check_fastfail(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_slow_path_check_nop(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_slow_path_check_os_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_slow_path_check_user_handled(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __castguard_slow_path_compat_check(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 _guard_icall_checks_enforced(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 _guard_rf_checks_enforced(从 MSVCRT.lib(guard_support.obj) 中) + 已丢弃 __current_exception(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃 __current_exception_context(从 vcruntime.lib(VCRUNTIME140.dll) 中) + 已丢弃 _aligned_free(从 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) 中) + 已丢弃 ftell(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 ferror(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 fclose(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 realloc(从 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) 中) + 已丢弃 fseek(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 fgetc(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 strncmp(从 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中) + 已丢弃 fopen_s(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 strtol(从 ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) 中) + 已丢弃 ldexp(从 ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) 中) + 已丢弃 free(从 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) 中) + 已丢弃 ungetc(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 feof(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 fread(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 malloc(从 ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) 中) + 已丢弃 __acrt_iob_func(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 __stdio_common_vfprintf(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 strncpy(从 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中) + 已丢弃 __stdio_common_vsscanf(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 strcspn(从 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中) + 已丢弃 strspn(从 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中) + 已丢弃 strtoul(从 ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) 中) + 已丢弃 strtok(从 ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) 中) + 已丢弃 __stdio_common_vsprintf(从 ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) 中) + 已丢弃 qsort(从 ucrt.lib(api-ms-win-crt-utility-l1-1-0.dll) 中) + 已丢弃 _register_onexit_function(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 _crt_atexit(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 _crt_at_quick_exit(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 terminate(从 ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) 中) + 已丢弃 InitializeCriticalSection(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 EnterCriticalSection(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 LeaveCriticalSection(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 DeleteCriticalSection(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 TlsAlloc(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 TlsGetValue(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 TlsSetValue(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 TlsFree(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 QueryPerformanceCounter(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 QueryPerformanceFrequency(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 VerSetConditionMask(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 GetLastError(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 GetModuleHandleExW(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 FormatMessageW(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 MultiByteToWideChar(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 WideCharToMultiByte(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 FreeLibrary(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 GetProcAddress(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 LoadLibraryA(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 GetModuleHandleW(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 GlobalAlloc(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 GlobalUnlock(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 GlobalLock(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 GlobalFree(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 SetThreadExecutionState(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 RtlCaptureContext(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 RtlLookupFunctionEntry(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 RtlVirtualUnwind(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 UnhandledExceptionFilter(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 SetUnhandledExceptionFilter(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 GetCurrentProcess(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 TerminateProcess(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 IsProcessorFeaturePresent(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 GetCurrentProcessId(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 GetCurrentThreadId(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 GetSystemTimeAsFileTime(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 InitializeSListHead(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 IsDebuggerPresent(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 GetStartupInfoW(从 kernel32.lib(KERNEL32.dll) 中) + 已丢弃 TranslateMessage(从 user32.lib(USER32.dll) 中) + 已丢弃 DispatchMessageW(从 user32.lib(USER32.dll) 中) + 已丢弃 PeekMessageW(从 user32.lib(USER32.dll) 中) + 已丢弃 RegisterDeviceNotificationW(从 user32.lib(USER32.dll) 中) + 已丢弃 UnregisterDeviceNotification(从 user32.lib(USER32.dll) 中) + 已丢弃 DefWindowProcW(从 user32.lib(USER32.dll) 中) + 已丢弃 UnregisterClassW(从 user32.lib(USER32.dll) 中) + 已丢弃 RegisterClassExW(从 user32.lib(USER32.dll) 中) + 已丢弃 CreateWindowExW(从 user32.lib(USER32.dll) 中) + 已丢弃 DestroyWindow(从 user32.lib(USER32.dll) 中) + 已丢弃 ShowWindow(从 user32.lib(USER32.dll) 中) + 已丢弃 ToUnicode(从 user32.lib(USER32.dll) 中) + 已丢弃 MapVirtualKeyW(从 user32.lib(USER32.dll) 中) + 已丢弃 GetDC(从 user32.lib(USER32.dll) 中) + 已丢弃 ReleaseDC(从 user32.lib(USER32.dll) 中) + 已丢弃 ChangeDisplaySettingsExW(从 user32.lib(USER32.dll) 中) + 已丢弃 EnumDisplaySettingsW(从 user32.lib(USER32.dll) 中) + 已丢弃 EnumDisplaySettingsExW(从 user32.lib(USER32.dll) 中) + 已丢弃 EnumDisplayDevicesW(从 user32.lib(USER32.dll) 中) + 已丢弃 GetMonitorInfoW(从 user32.lib(USER32.dll) 中) + 已丢弃 EnumDisplayMonitors(从 user32.lib(USER32.dll) 中) + 已丢弃 TrackMouseEvent(从 user32.lib(USER32.dll) 中) + 已丢弃 GetMessageTime(从 user32.lib(USER32.dll) 中) + 已丢弃 SendMessageW(从 user32.lib(USER32.dll) 中) + 已丢弃 PostMessageW(从 user32.lib(USER32.dll) 中) + 已丢弃 WaitMessage(从 user32.lib(USER32.dll) 中) + 已丢弃 GetLayeredWindowAttributes(从 user32.lib(USER32.dll) 中) + 已丢弃 SetLayeredWindowAttributes(从 user32.lib(USER32.dll) 中) + 已丢弃 FlashWindow(从 user32.lib(USER32.dll) 中) + 已丢弃 MoveWindow(从 user32.lib(USER32.dll) 中) + 已丢弃 SetWindowPos(从 user32.lib(USER32.dll) 中) + 已丢弃 GetWindowPlacement(从 user32.lib(USER32.dll) 中) + 已丢弃 SetWindowPlacement(从 user32.lib(USER32.dll) 中) + 已丢弃 IsWindowVisible(从 user32.lib(USER32.dll) 中) + 已丢弃 IsIconic(从 user32.lib(USER32.dll) 中) + 已丢弃 BringWindowToTop(从 user32.lib(USER32.dll) 中) + 已丢弃 IsZoomed(从 user32.lib(USER32.dll) 中) + 已丢弃 OpenClipboard(从 user32.lib(USER32.dll) 中) + 已丢弃 CloseClipboard(从 user32.lib(USER32.dll) 中) + 已丢弃 SetClipboardData(从 user32.lib(USER32.dll) 中) + 已丢弃 GetClipboardData(从 user32.lib(USER32.dll) 中) + 已丢弃 EmptyClipboard(从 user32.lib(USER32.dll) 中) + 已丢弃 SetFocus(从 user32.lib(USER32.dll) 中) + 已丢弃 GetActiveWindow(从 user32.lib(USER32.dll) 中) + 已丢弃 GetKeyState(从 user32.lib(USER32.dll) 中) + 已丢弃 SetCapture(从 user32.lib(USER32.dll) 中) + 已丢弃 ReleaseCapture(从 user32.lib(USER32.dll) 中) + 已丢弃 MsgWaitForMultipleObjects(从 user32.lib(USER32.dll) 中) + 已丢弃 GetSystemMetrics(从 user32.lib(USER32.dll) 中) + 已丢弃 SetForegroundWindow(从 user32.lib(USER32.dll) 中) + 已丢弃 SetPropW(从 user32.lib(USER32.dll) 中) + 已丢弃 GetPropW(从 user32.lib(USER32.dll) 中) + 已丢弃 RemovePropW(从 user32.lib(USER32.dll) 中) + 已丢弃 SetWindowTextW(从 user32.lib(USER32.dll) 中) + 已丢弃 GetClientRect(从 user32.lib(USER32.dll) 中) + 已丢弃 GetWindowRect(从 user32.lib(USER32.dll) 中) + 已丢弃 AdjustWindowRectEx(从 user32.lib(USER32.dll) 中) + 已丢弃 SetCursorPos(从 user32.lib(USER32.dll) 中) + 已丢弃 SetCursor(从 user32.lib(USER32.dll) 中) + 已丢弃 GetCursorPos(从 user32.lib(USER32.dll) 中) + 已丢弃 ClientToScreen(从 user32.lib(USER32.dll) 中) + 已丢弃 ScreenToClient(从 user32.lib(USER32.dll) 中) + 已丢弃 WindowFromPoint(从 user32.lib(USER32.dll) 中) + 已丢弃 ClipCursor(从 user32.lib(USER32.dll) 中) + 已丢弃 SetRect(从 user32.lib(USER32.dll) 中) + 已丢弃 OffsetRect(从 user32.lib(USER32.dll) 中) + 已丢弃 PtInRect(从 user32.lib(USER32.dll) 中) + 已丢弃 GetWindowLongW(从 user32.lib(USER32.dll) 中) + 已丢弃 SetWindowLongW(从 user32.lib(USER32.dll) 中) + 已丢弃 GetClassLongPtrW(从 user32.lib(USER32.dll) 中) + 已丢弃 LoadCursorW(从 user32.lib(USER32.dll) 中) + 已丢弃 DestroyIcon(从 user32.lib(USER32.dll) 中) + 已丢弃 LoadImageW(从 user32.lib(USER32.dll) 中) + 已丢弃 CreateIconIndirect(从 user32.lib(USER32.dll) 中) + 已丢弃 SystemParametersInfoW(从 user32.lib(USER32.dll) 中) + 已丢弃 MonitorFromWindow(从 user32.lib(USER32.dll) 中) + 已丢弃 GetRawInputData(从 user32.lib(USER32.dll) 中) + 已丢弃 RegisterRawInputDevices(从 user32.lib(USER32.dll) 中) + 已丢弃 GetRawInputDeviceInfoA(从 user32.lib(USER32.dll) 中) + 已丢弃 GetRawInputDeviceList(从 user32.lib(USER32.dll) 中) + 已丢弃 CreateDCW(从 gdi32.lib(GDI32.dll) 中) + 已丢弃 DeleteDC(从 gdi32.lib(GDI32.dll) 中) + 已丢弃 GetDeviceCaps(从 gdi32.lib(GDI32.dll) 中) + 已丢弃 GetDeviceGammaRamp(从 gdi32.lib(GDI32.dll) 中) + 已丢弃 SetDeviceGammaRamp(从 gdi32.lib(GDI32.dll) 中) + 已丢弃 CreateBitmap(从 gdi32.lib(GDI32.dll) 中) + 已丢弃 CreateRectRgn(从 gdi32.lib(GDI32.dll) 中) + 已丢弃 DeleteObject(从 gdi32.lib(GDI32.dll) 中) + 已丢弃 CreateDIBSection(从 gdi32.lib(GDI32.dll) 中) + 已丢弃 ChoosePixelFormat(从 gdi32.lib(GDI32.dll) 中) + 已丢弃 DescribePixelFormat(从 gdi32.lib(GDI32.dll) 中) + 已丢弃 SetPixelFormat(从 gdi32.lib(GDI32.dll) 中) + 已丢弃 SwapBuffers(从 gdi32.lib(GDI32.dll) 中) + 已丢弃 DragQueryFileW(从 shell32.lib(SHELL32.dll) 中) + 已丢弃 DragQueryPoint(从 shell32.lib(SHELL32.dll) 中) + 已丢弃 DragFinish(从 shell32.lib(SHELL32.dll) 中) + 已丢弃 DragAcceptFiles(从 shell32.lib(SHELL32.dll) 中) + 已选择符号: + _glfwFreeMonitorWin32 (在 glfw3.lib(win32_monitor.obj) 中) + 已替换符号: + _glfwSetCursorNull (在 glfw3.lib(null_window.obj) 中) + _glfwGetRequiredInstanceExtensionsNull (在 glfw3.lib(null_window.obj) 中) + _glfwWaitEventsNull (在 glfw3.lib(null_window.obj) 中) + _glfwSetCursorModeNull (在 glfw3.lib(null_window.obj) 中) + _glfwSetWindowIconNull (在 glfw3.lib(null_window.obj) 中) + _glfwSetWindowMousePassthroughNull (在 glfw3.lib(null_window.obj) 中) + _glfwRequestWindowAttentionNull (在 glfw3.lib(null_window.obj) 中) + _glfwSetRawMouseMotionNull (在 glfw3.lib(null_window.obj) 中) + swapIntervalOSMesa (在 glfw3.lib(osmesa_context.obj) 中) + swapBuffersOSMesa (在 glfw3.lib(osmesa_context.obj) 中) + _glfwSetWindowTitleNull (在 glfw3.lib(null_window.obj) 中) + _glfwDestroyCursorNull (在 glfw3.lib(null_window.obj) 中) + _glfwPostEmptyEventNull (在 glfw3.lib(null_window.obj) 中) + _glfwWaitEventsTimeoutNull (在 glfw3.lib(null_window.obj) 中) + _glfwPollEventsNull (在 glfw3.lib(null_window.obj) 中) + _glfwUpdateGamepadGUIDNull (在 glfw3.lib(null_joystick.obj) 中) + _glfwTerminateJoysticksNull (在 glfw3.lib(null_joystick.obj) 中) + 已选择符号: + extensionSupportedOSMesa (在 glfw3.lib(osmesa_context.obj) 中) + 已替换符号: + _glfwGetPhysicalDevicePresentationSupportNull (在 glfw3.lib(null_window.obj) 中) + _glfwGetEGLPlatformNull (在 glfw3.lib(null_window.obj) 中) + _glfwGetEGLNativeWindowNull (在 glfw3.lib(null_window.obj) 中) + _glfwGetEGLNativeDisplayNull (在 glfw3.lib(null_window.obj) 中) + _glfwPollJoystickNull (在 glfw3.lib(null_joystick.obj) 中) + 已选择符号: + __scrt_stub_for_acrt_initialize (在 MSVCRT.lib(ucrt_stubs.obj) 中) + 已替换符号: + __scrt_stub_for_acrt_uninitialize_critical (在 MSVCRT.lib(ucrt_stubs.obj) 中) + __scrt_stub_for_acrt_uninitialize (在 MSVCRT.lib(ucrt_stubs.obj) 中) + __scrt_stub_for_acrt_thread_attach (在 MSVCRT.lib(ucrt_stubs.obj) 中) + __scrt_stub_for_acrt_thread_detach (在 MSVCRT.lib(ucrt_stubs.obj) 中) + 已选择符号: + _glfwRawMouseMotionSupportedWin32 (在 glfw3.lib(win32_window.obj) 中) + 已替换符号: + _glfwInitJoysticksNull (在 glfw3.lib(null_joystick.obj) 中) + _glfwCreateStandardCursorNull (在 glfw3.lib(null_window.obj) 中) + _glfwCreateCursorNull (在 glfw3.lib(null_window.obj) 中) + _glfwRawMouseMotionSupportedNull (在 glfw3.lib(null_window.obj) 中) + 已选择符号: + DllMain (在 dllmain.obj 中) + 已替换符号: + _get_startup_argv_mode (在 MSVCRT.lib(argv_mode.obj) 中) + 已选择符号: + _glfwGetMonitorContentScaleNull (在 glfw3.lib(null_monitor.obj) 中) + 已替换符号: + _glfwGetWindowContentScaleNull (在 glfw3.lib(null_window.obj) 中) + 已选择符号: + _glfwGetFramebufferSizeNull (在 glfw3.lib(null_window.obj) 中) + 已替换符号: + _glfwGetWindowSizeNull (在 glfw3.lib(null_window.obj) 中) + 已选择符号: + _glfwSetWindowDecoratedWin32 (在 glfw3.lib(win32_window.obj) 中) + 已替换符号: + _glfwSetWindowResizableWin32 (在 glfw3.lib(win32_window.obj) 中) + 已选择符号: + deinit_mat2 (在 mat2.obj 中) + 已替换符号: + deinit_mat4 (在 mat4.obj 中) + 已选择符号: + _glfwGetFramebufferSizeWin32 (在 glfw3.lib(win32_window.obj) 中) + 已替换符号: + _glfwGetWindowSizeWin32 (在 glfw3.lib(win32_window.obj) 中) + 已选择符号: + _glfwSetWindowAspectRatioNull (在 glfw3.lib(null_window.obj) 中) + 已替换符号: + _glfwSetWindowSizeLimitsNull (在 glfw3.lib(null_window.obj) 中) + 已选择符号: + $unwind$_glfwGetWindowSizeWin32 (在 glfw3.lib(win32_window.obj) 中) + 已替换符号: + $unwind$_glfwGetFramebufferSizeWin32 (在 glfw3.lib(win32_window.obj) 中) + 已选择符号: + $unwind$stbi__get_marker (在 stb_image.obj 中) + 已替换符号: + $unwind$glfwDestroyCursor (在 glfw3.lib(input.obj) 中) + $unwind$glfwCreateStandardCursor (在 glfw3.lib(input.obj) 中) + $unwind$glfwExtensionSupported (在 glfw3.lib(context.obj) 中) + $unwind$swapBuffersWGL (在 glfw3.lib(wgl_context.obj) 中) + 已选择符号: + $unwind$stbi__stdio_skip (在 stb_image.obj 中) + 已替换符号: + $unwind$glfwSetJoystickCallback (在 glfw3.lib(input.obj) 中) + $unwind$_glfwPlatformCreateMutex (在 glfw3.lib(win32_thread.obj) 中) + $unwind$acquireMonitor (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwPlatformDestroyTls (在 glfw3.lib(win32_thread.obj) 中) + $unwind$glfwShowWindow (在 glfw3.lib(window.obj) 中) + $unwind$glfwDestroyWindow (在 glfw3.lib(window.obj) 中) + $unwind$_glfwDestroyWindowWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$destroyContextOSMesa (在 glfw3.lib(osmesa_context.obj) 中) + $unwind$_glfwGetVideoModesNull (在 glfw3.lib(null_monitor.obj) 中) + $unwind$__scrt_release_startup_lock (在 MSVCRT.lib(utility.obj) 中) + $unwind$_glfwDestroyWindowNull (在 glfw3.lib(null_window.obj) 中) + $unwind$_glfwSetCursorWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$__scrt_uninitialize_crt (在 MSVCRT.lib(utility.obj) 中) + $unwind$__scrt_initialize_onexit_tables (在 MSVCRT.lib(utility.obj) 中) + $unwind$_glfwCreateCursorWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$glfwGetError (在 glfw3.lib(init.obj) 中) + $unwind$initGL (在 StgSharpC.obj 中) + $unwind$stbi__tga_read_rgb16 (在 stb_image.obj 中) + $unwind$_glfwIconifyWindowNull (在 glfw3.lib(null_window.obj) 中) + $unwind$glfwGetProcAddress (在 glfw3.lib(context.obj) 中) + $unwind$_glfwGetWindowOpacityWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwWindowFocusedWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwRestoreWindowNull (在 glfw3.lib(null_window.obj) 中) + $unwind$_glfwHideWindowNull (在 glfw3.lib(null_window.obj) 中) + $unwind$_glfwFocusWindowWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwPlatformDestroyMutex (在 glfw3.lib(win32_thread.obj) 中) + $unwind$__raise_securityfailure (在 MSVCRT.lib(gs_report.obj) 中) + $unwind$_glfwFreeJoystick (在 glfw3.lib(input.obj) 中) + $unwind$_glfwCenterCursorInContentArea (在 glfw3.lib(input.obj) 中) + $unwind$_glfwPlatformCreateTls (在 glfw3.lib(win32_thread.obj) 中) + $unwind$findValidMapping (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetGamepadName (在 glfw3.lib(input.obj) 中) + $unwind$destroyContextEGL (在 glfw3.lib(egl_context.obj) 中) + $unwind$refreshVideoModes (在 glfw3.lib(monitor.obj) 中) + $unwind$glfwMakeContextCurrent (在 glfw3.lib(context.obj) 中) + $unwind$glfwSwapInterval (在 glfw3.lib(context.obj) 中) + $unwind$getProcAddressWGL (在 glfw3.lib(wgl_context.obj) 中) + $unwind$stbi__stdio_eof (在 stb_image.obj 中) + $unwind$destroyContextWGL (在 glfw3.lib(wgl_context.obj) 中) + $unwind$_glfwInitVulkan (在 glfw3.lib(vulkan.obj) 中) + $unwind$glfwGetRequiredInstanceExtensions (在 glfw3.lib(vulkan.obj) 中) + $unwind$makeContextCurrentWGL (在 glfw3.lib(wgl_context.obj) 中) + $unwind$_glfwFreeGammaArrays (在 glfw3.lib(monitor.obj) 中) + $unwind$_glfwSetClipboardStringNull (在 glfw3.lib(null_window.obj) 中) + $unwind$swapIntervalWGL (在 glfw3.lib(wgl_context.obj) 中) + $unwind$extensionSupportedWGL (在 glfw3.lib(wgl_context.obj) 中) + $unwind$makeContextCurrentEGL (在 glfw3.lib(egl_context.obj) 中) + $unwind$swapBuffersEGL (在 glfw3.lib(egl_context.obj) 中) + $unwind$_glfw_calloc (在 glfw3.lib(init.obj) 中) + $unwind$extensionSupportedEGL (在 glfw3.lib(egl_context.obj) 中) + $unwind$closeJoystick (在 glfw3.lib(win32_joystick.obj) 中) + $unwind$glfwJoystickPresent (在 glfw3.lib(input.obj) 中) + $unwind$_glfwInitNull (在 glfw3.lib(null_init.obj) 中) + $unwind$_glfw_realloc (在 glfw3.lib(init.obj) 中) + $unwind$getProcAddressEGL (在 glfw3.lib(egl_context.obj) 中) + $unwind$glfwGetJoystickName (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetJoystickGUID (在 glfw3.lib(input.obj) 中) + $unwind$releaseMonitor (在 glfw3.lib(win32_window.obj) 中) + $unwind$glfwJoystickIsGamepad (在 glfw3.lib(input.obj) 中) + 已选择符号: + $unwind$loadImageData (在 StgSharpC.obj 中) + 已替换符号: + $unwind$makeContextCurrentOSMesa (在 glfw3.lib(osmesa_context.obj) 中) + $unwind$_glfwCreateStandardCursorWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$enableCursor (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwRestoreVideoModeWin32 (在 glfw3.lib(win32_monitor.obj) 中) + 已选择符号: + $unwind$glfwGetTime (在 glfw3.lib(input.obj) 中) + 已替换符号: + $unwind$disableRawMouseMotion (在 glfw3.lib(win32_window.obj) 中) + $unwind$enableRawMouseMotion (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwWaitEventsTimeoutWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwSetRawMouseMotionWin32 (在 glfw3.lib(win32_window.obj) 中) + 已选择符号: + $unwind$_glfwInputJoystickHat (在 glfw3.lib(input.obj) 中) + 已替换符号: + $unwind$compareVideoModes (在 glfw3.lib(monitor.obj) 中) + 已选择符号: + $unwind$loadGlfuncDefault (在 StgSharpC.obj 中) + 已替换符号: + $unwind$glfwSetCursorEnterCallback (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetWindowOpacity (在 glfw3.lib(window.obj) 中) + $unwind$glfwGetWindowMonitor (在 glfw3.lib(window.obj) 中) + $unwind$glfwGetWindowAttrib (在 glfw3.lib(window.obj) 中) + $unwind$glfwGetWindowUserPointer (在 glfw3.lib(window.obj) 中) + $unwind$glfwSetWindowPosCallback (在 glfw3.lib(window.obj) 中) + $unwind$glfwSetWindowSizeCallback (在 glfw3.lib(window.obj) 中) + $unwind$glfwSetWindowCloseCallback (在 glfw3.lib(window.obj) 中) + $unwind$glfwSetWindowRefreshCallback (在 glfw3.lib(window.obj) 中) + $unwind$glfwSetWindowFocusCallback (在 glfw3.lib(window.obj) 中) + $unwind$glfwSetWindowIconifyCallback (在 glfw3.lib(window.obj) 中) + $unwind$glfwSetWindowMaximizeCallback (在 glfw3.lib(window.obj) 中) + $unwind$glfwSetFramebufferSizeCallback (在 glfw3.lib(window.obj) 中) + $unwind$glfwSetWindowContentScaleCallback (在 glfw3.lib(window.obj) 中) + $unwind$glfwSetCursorPosCallback (在 glfw3.lib(input.obj) 中) + $unwind$glfwSetMouseButtonCallback (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetCurrentContext (在 glfw3.lib(context.obj) 中) + $unwind$?dllmain_crt_dispatch@@YAHQEAUHINSTANCE__@@KQEAX@Z (在 MSVCRT.lib(dll_dllmain.obj) 中) + $unwind$glfwDefaultWindowHints (在 glfw3.lib(window.obj) 中) + $unwind$__scrt_initialize_default_local_stdio_options (在 MSVCRT.lib(default_local_stdio_options.obj) 中) + $unwind$glfwSetCharModsCallback (在 glfw3.lib(input.obj) 中) + $unwind$_glfwTerminateWin32 (在 glfw3.lib(win32_init.obj) 中) + $unwind$__scrt_acquire_startup_lock (在 MSVCRT.lib(utility.obj) 中) + $unwind$glfwSetCharCallback (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetWin32Monitor (在 glfw3.lib(win32_monitor.obj) 中) + $unwind$_glfwIsValidContextConfig (在 glfw3.lib(context.obj) 中) + $unwind$glfwGetWin32Adapter (在 glfw3.lib(win32_monitor.obj) 中) + $unwind$glfwGetInputMode (在 glfw3.lib(input.obj) 中) + $unwind$glfwSetKeyCallback (在 glfw3.lib(input.obj) 中) + $unwind$glfwRawMouseMotionSupported (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetKeyName (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetKeyScancode (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetKey (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetMouseButton (在 glfw3.lib(input.obj) 中) + $unwind$__GSHandlerCheck (在 MSVCRT.lib(gshandler.obj) 中) + $unwind$__scrt_dllmain_before_initialize_c (在 MSVCRT.lib(utility.obj) 中) + $unwind$__scrt_dllmain_after_initialize_c (在 MSVCRT.lib(utility.obj) 中) + $unwind$__scrt_dllmain_uninitialize_c (在 MSVCRT.lib(utility.obj) 中) + $unwind$glfwGetWGLContext (在 glfw3.lib(wgl_context.obj) 中) + $unwind$__scrt_initialize_crt (在 MSVCRT.lib(utility.obj) 中) + $unwind$__scrt_dllmain_crt_thread_detach (在 MSVCRT.lib(utility.obj) 中) + $unwind$__scrt_dllmain_crt_thread_attach (在 MSVCRT.lib(utility.obj) 中) + $unwind$__scrt_dllmain_uninitialize_critical (在 MSVCRT.lib(utility.obj) 中) + $unwind$_glfwTerminateNull (在 glfw3.lib(null_init.obj) 中) + $unwind$terminate (在 glfw3.lib(init.obj) 中) + $unwind$glfwGetMonitors (在 glfw3.lib(monitor.obj) 中) + $unwind$glfwGetPrimaryMonitor (在 glfw3.lib(monitor.obj) 中) + $unwind$glfwGetTimerValue (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetTimerFrequency (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetMonitorName (在 glfw3.lib(monitor.obj) 中) + $unwind$updateCursorImage (在 glfw3.lib(win32_window.obj) 中) + $unwind$glfwGetMonitorUserPointer (在 glfw3.lib(monitor.obj) 中) + $unwind$_glfwSelectPlatform (在 glfw3.lib(platform.obj) 中) + $unwind$glfwGetOSMesaContext (在 glfw3.lib(osmesa_context.obj) 中) + $unwind$_glfwPollMonitorsNull (在 glfw3.lib(null_monitor.obj) 中) + $unwind$glfwPlatformSupported (在 glfw3.lib(platform.obj) 中) + $unwind$glfwGetClipboardString (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetPlatform (在 glfw3.lib(platform.obj) 中) + $unwind$glfwSetMonitorCallback (在 glfw3.lib(monitor.obj) 中) + $unwind$_glfwPlatformGetTimerValue (在 glfw3.lib(win32_time.obj) 中) + $unwind$glfwInit (在 glfw3.lib(init.obj) 中) + $unwind$_glfwGetClipboardStringWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwTerminateOSMesa (在 glfw3.lib(osmesa_context.obj) 中) + $unwind$glfwGetEGLSurface (在 glfw3.lib(egl_context.obj) 中) + $unwind$_glfwGetScancodeNameWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwSetCursorPosWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwWaitEventsWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$glfwGetEGLContext (在 glfw3.lib(egl_context.obj) 中) + $unwind$glfwGetEGLDisplay (在 glfw3.lib(egl_context.obj) 中) + $unwind$glfwVulkanSupported (在 glfw3.lib(vulkan.obj) 中) + $unwind$_glfwFramebufferTransparentWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$glfwGetJoystickUserPointer (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetWin32Window (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwGetScancodeNameNull (在 glfw3.lib(null_window.obj) 中) + $unwind$_glfwTerminateEGL (在 glfw3.lib(egl_context.obj) 中) + $unwind$glfwSetDropCallback (在 glfw3.lib(input.obj) 中) + $unwind$glfwWindowShouldClose (在 glfw3.lib(window.obj) 中) + $unwind$glfwSetScrollCallback (在 glfw3.lib(input.obj) 中) + 已选择符号: + $unwind$?fin$0@?0??dllmain_crt_process_attach@@YAHQEAUHINSTANCE__@@QEAX@Z@4HA (在 MSVCRT.lib(dll_dllmain.obj) 中) + 已替换符号: + $unwind$?fin$1@?0??dllmain_crt_process_detach@@YAH_N@Z@4HA (在 MSVCRT.lib(dll_dllmain.obj) 中) + $unwind$?fin$0@?0??dllmain_crt_process_detach@@YAH_N@Z@4HA (在 MSVCRT.lib(dll_dllmain.obj) 中) + 已选择符号: + $unwind$stbi__resample_row_v_2 (在 stb_image.obj 中) + 已替换符号: + $unwind$__GSHandlerCheckCommon (在 MSVCRT.lib(gshandler.obj) 中) + $unwind$chooseImage (在 glfw3.lib(win32_window.obj) 中) + 已选择符号: + $unwind$_glfwSetWindowFloatingWin32 (在 glfw3.lib(win32_window.obj) 中) + 已替换符号: + $unwind$_glfwInitOSMesa (在 glfw3.lib(osmesa_context.obj) 中) + 已选择符号: + $unwind$_glfwCreateWideStringFromUTF8Win32 (在 glfw3.lib(win32_init.obj) 中) + 已替换符号: + $unwind$_glfwSetClipboardStringWin32 (在 glfw3.lib(win32_window.obj) 中) + 已选择符号: + $unwind$_glfwConnectWin32 (在 glfw3.lib(win32_init.obj) 中) + 已替换符号: + $unwind$_glfwConnectNull (在 glfw3.lib(null_init.obj) 中) + 已选择符号: + $unwind$stbi__zexpand (在 stb_image.obj 中) + 已替换符号: + $unwind$_glfwGetWindowPosWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$stbi__parse_uncompressed_block (在 stb_image.obj 中) + $unwind$_glfwSetCursorModeWin32 (在 glfw3.lib(win32_window.obj) 中) + 已选择符号: + $unwind$sscanf (在 glfw3.lib(context.obj) 中) + 已替换符号: + $unwind$sprintf (在 glfw3.lib(win32_joystick.obj) 中) + 已选择符号: + $unwind$stbi__check_png_header (在 stb_image.obj 中) + 已替换符号: + $unwind$_glfwSetWindowSizeLimitsNull (在 glfw3.lib(null_window.obj) 中) + $unwind$stbi__pic_is4 (在 stb_image.obj 中) + $unwind$_glfwAllocGammaArrays (在 glfw3.lib(monitor.obj) 中) + $unwind$glfwGetPhysicalDevicePresentationSupport (在 glfw3.lib(vulkan.obj) 中) + $unwind$_DllMainCRTStartup (在 MSVCRT.lib(dll_dllmain.obj) 中) + $unwind$stbi__hdr_convert (在 stb_image.obj 中) + $unwind$_glfwTerminateJoysticksWin32 (在 glfw3.lib(win32_joystick.obj) 中) + $unwind$getKeyMods (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwInputChar (在 glfw3.lib(input.obj) 中) + $unwind$_glfwSetWindowSizeNull (在 glfw3.lib(null_window.obj) 中) + $unwind$_glfwGetCursorPosWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwSetWindowAspectRatioNull (在 glfw3.lib(null_window.obj) 中) + 已选择符号: + $unwind$stbi__refill_buffer (在 stb_image.obj 中) + 已替换符号: + $unwind$_glfw_strdup (在 glfw3.lib(init.obj) 中) + $unwind$_glfwInitGamepadMappings (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetJoystickHats (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetJoystickButtons (在 glfw3.lib(input.obj) 中) + $unwind$stbi__gif_test_raw (在 stb_image.obj 中) + $unwind$stbi__get16be (在 stb_image.obj 中) + $unwind$stbi__get32be (在 stb_image.obj 中) + $unwind$stbi__get16le (在 stb_image.obj 中) + $unwind$stbi__get32le (在 stb_image.obj 中) + $unwind$_glfwStringInExtensionString (在 glfw3.lib(context.obj) 中) + $unwind$glfwGetInstanceProcAddress (在 glfw3.lib(vulkan.obj) 中) + $unwind$stbi__out_gif_code (在 stb_image.obj 中) + $unwind$createKeyTables (在 glfw3.lib(win32_init.obj) 中) + $unwind$_glfwGetWindowContentScaleWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$_glfwGetEGLPlatformWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$_RTC_Initialize (在 MSVCRT.lib(initsect.obj) 中) + $unwind$glfwGetJoystickAxes (在 glfw3.lib(input.obj) 中) + $unwind$_glfwSetWindowTitleWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$stbi__decode_jpeg_image (在 stb_image.obj 中) + $unwind$_glfwFocusWindowNull (在 glfw3.lib(null_window.obj) 中) + $unwind$glfwSetGammaRamp (在 glfw3.lib(monitor.obj) 中) + $unwind$_RTC_Terminate (在 MSVCRT.lib(initsect.obj) 中) + $unwind$_glfwGetPhysicalDevicePresentationSupportWin32 (在 glfw3.lib(win32_window.obj) 中) + $unwind$glfwSetInputMode (在 glfw3.lib(input.obj) 中) + $unwind$glfwGetVideoModes (在 glfw3.lib(monitor.obj) 中) + $unwind$_glfwSetGammaRampNull (在 glfw3.lib(null_monitor.obj) 中) + 已选择符号: + $unwind$stbi__decode_jpeg_header (在 stb_image.obj 中) + 已替换符号: + $unwind$glfwCreateCursor (在 glfw3.lib(input.obj) 中) + 已选择符号: + $unwind$stbi__process_scan_header (在 stb_image.obj 中) + 已替换符号: + $unwind$_glfwGetMonitorContentScaleWin32 (在 glfw3.lib(win32_monitor.obj) 中) + 已选择符号: + $unwind$stbi__convert_16_to_8 (在 stb_image.obj 中) + 已替换符号: + $unwind$__scrt_dllmain_exception_filter (在 MSVCRT.lib(utility.obj) 中) + $unwind$_glfwSetWindowMonitorNull (在 glfw3.lib(null_window.obj) 中) + $unwind$_glfwCreateWindowNull (在 glfw3.lib(null_window.obj) 中) + $unwind$helperWindowProc (在 glfw3.lib(win32_init.obj) 中) + $unwind$glfwCreateWindowSurface (在 glfw3.lib(vulkan.obj) 中) + $unwind$_glfwAllocMonitor (在 glfw3.lib(monitor.obj) 中) + 已选择符号: + $unwind$glfwGetOSMesaColorBuffer (在 glfw3.lib(osmesa_context.obj) 中) + 已替换符号: + $unwind$glfwGetOSMesaDepthBuffer (在 glfw3.lib(osmesa_context.obj) 中) + 已选择符号: + $unwind$stbi__parse_zlib (在 stb_image.obj 中) + 已替换符号: + $unwind$stbi__hdr_test (在 stb_image.obj 中) + 已选择符号: + $unwind$stbi__readval (在 stb_image.obj 中) + 已替换符号: + $unwind$_glfwSetWindowIconWin32 (在 glfw3.lib(win32_window.obj) 中) + 已选择符号: + $unwind$stbi__getn (在 stb_image.obj 中) + 已替换符号: + $unwind$stbi__psd_decode_rle (在 stb_image.obj 中) + $unwind$stbi__pnm_getinteger (在 stb_image.obj 中) + $unwind$stbi__pnm_skip_whitespace (在 stb_image.obj 中) + 已选择符号: + $unwind$createNativeWindow (在 glfw3.lib(win32_window.obj) 中) + 已替换符号: + $unwind$_glfwCreateContextEGL (在 glfw3.lib(egl_context.obj) 中) + 已选择符号: + $chain$1$stbi__hdr_load (在 stb_image.obj 中) + 已替换符号: + $chain$3$stbi__hdr_load (在 stb_image.obj 中) + 已选择符号: + $chain$6$load_jpeg_image (在 stb_image.obj 中) + 已替换符号: + $chain$12$load_jpeg_image (在 stb_image.obj 中) + $chain$10$load_jpeg_image (在 stb_image.obj 中) + 已选择符号: + $chain$1$stbi__zbuild_huffman (在 stb_image.obj 中) + 已替换符号: + $chain$3$stbi__zbuild_huffman (在 stb_image.obj 中) + 已选择符号: + $chain$1$stbi__gif_header (在 stb_image.obj 中) + 已替换符号: + $chain$3$stbi__gif_header (在 stb_image.obj 中) + 已选择符号: + $chain$2$stbi__get_marker (在 stb_image.obj 中) + 已替换符号: + $chain$4$stbi__get_marker (在 stb_image.obj 中) + 已选择符号: + $chain$7$load_jpeg_image (在 stb_image.obj 中) + 已替换符号: + $chain$9$load_jpeg_image (在 stb_image.obj 中) + 已选择符号: + $chain$8$load_jpeg_image (在 stb_image.obj 中) + 已替换符号: + $chain$11$load_jpeg_image (在 stb_image.obj 中) + 已选择符号: + $chain$1$stbi__create_png_image_raw (在 stb_image.obj 中) + 已替换符号: + $chain$3$stbi__create_png_image_raw (在 stb_image.obj 中) + 已选择符号: + $chain$3$chooseEGLConfig (在 glfw3.lib(egl_context.obj) 中) + 已替换符号: + $chain$5$chooseEGLConfig (在 glfw3.lib(egl_context.obj) 中) + 已选择符号: + $chain$3$_glfwAllocJoystick (在 glfw3.lib(input.obj) 中) + 已替换符号: + $chain$5$_glfwAllocJoystick (在 glfw3.lib(input.obj) 中) + 已选择符号: + $chain$1$glfwCreateWindow (在 glfw3.lib(window.obj) 中) + 已替换符号: + $chain$3$glfwCreateWindow (在 glfw3.lib(window.obj) 中) + 已选择符号: + $chain$2$_glfwSetClipboardStringWin32 (在 glfw3.lib(win32_window.obj) 中) + 已替换符号: + $chain$4$_glfwSetClipboardStringWin32 (在 glfw3.lib(win32_window.obj) 中) + 已选择符号: + $chain$3$_glfwInitEGL (在 glfw3.lib(egl_context.obj) 中) + 已替换符号: + $chain$5$_glfwInitEGL (在 glfw3.lib(egl_context.obj) 中) + $chain$9$_glfwInitEGL (在 glfw3.lib(egl_context.obj) 中) + $chain$7$_glfwInitEGL (在 glfw3.lib(egl_context.obj) 中) + 已选择符号: + $chain$3$_glfwInitVulkan (在 glfw3.lib(vulkan.obj) 中) + 已替换符号: + $chain$5$_glfwInitVulkan (在 glfw3.lib(vulkan.obj) 中) + 已选择符号: + $chain$7$glfwExtensionSupported (在 glfw3.lib(context.obj) 中) + 已替换符号: + $chain$9$glfwExtensionSupported (在 glfw3.lib(context.obj) 中) + 已选择符号: + $pdata$_glfwGetWindowSizeWin32 (在 glfw3.lib(win32_window.obj) 中) + 已替换符号: + $pdata$_glfwGetFramebufferSizeWin32 (在 glfw3.lib(win32_window.obj) 中) + 已选择符号: + $pdata$_glfwSetWindowSizeLimitsNull (在 glfw3.lib(null_window.obj) 中) + 已替换符号: + $pdata$_glfwSetWindowAspectRatioNull (在 glfw3.lib(null_window.obj) 中) + ICF 总节省量: 3047 字节 + 正在启动传递 2 + * CIL library *(* CIL module *) + StgSharpC.exp + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + kernel32.lib(KERNEL32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + user32.lib(USER32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + gdi32.lib(GDI32.dll) + shell32.lib(SHELL32.dll) + shell32.lib(SHELL32.dll) + shell32.lib(SHELL32.dll) + shell32.lib(SHELL32.dll) + shell32.lib(SHELL32.dll) + shell32.lib(SHELL32.dll) + glfw3.lib(context.obj) + glfw3.lib(init.obj) + glfw3.lib(input.obj) + glfw3.lib(monitor.obj) + glfw3.lib(platform.obj) + glfw3.lib(vulkan.obj) + glfw3.lib(window.obj) + glfw3.lib(egl_context.obj) + glfw3.lib(osmesa_context.obj) + glfw3.lib(null_init.obj) + glfw3.lib(null_monitor.obj) + glfw3.lib(null_window.obj) + glfw3.lib(null_joystick.obj) + glfw3.lib(win32_module.obj) + glfw3.lib(win32_time.obj) + glfw3.lib(win32_thread.obj) + glfw3.lib(win32_init.obj) + glfw3.lib(win32_joystick.obj) + glfw3.lib(win32_monitor.obj) + glfw3.lib(win32_window.obj) + glfw3.lib(wgl_context.obj) + MSVCRT.lib(amdsecgs.obj) + MSVCRT.lib(chkstk.obj) + MSVCRT.lib(guard_dispatch.obj) + MSVCRT.lib(guard_xfg_dispatch.obj) + MSVCRT.lib(gs_cookie.obj) + MSVCRT.lib(gs_report.obj) + MSVCRT.lib(gs_support.obj) + MSVCRT.lib(guard_support.obj) + MSVCRT.lib(loadcfg.obj) + MSVCRT.lib(dyn_tls_init.obj) + MSVCRT.lib(ucrt_detection.obj) + MSVCRT.lib(cpu_disp.obj) + MSVCRT.lib(argv_mode.obj) + MSVCRT.lib(default_local_stdio_options.obj) + MSVCRT.lib(fltused.obj) + MSVCRT.lib(tncleanup.obj) + MSVCRT.lib(dll_dllmain.obj) + MSVCRT.lib(tlssup.obj) + MSVCRT.lib(initializers.obj) + MSVCRT.lib(utility.obj) + MSVCRT.lib(ucrt_stubs.obj) + MSVCRT.lib(utility_desktop.obj) + MSVCRT.lib(initsect.obj) + MSVCRT.lib(gshandler.obj) + vcruntime.lib(VCRUNTIME140.dll) + vcruntime.lib(VCRUNTIME140.dll) + vcruntime.lib(VCRUNTIME140.dll) + vcruntime.lib(VCRUNTIME140.dll) + vcruntime.lib(VCRUNTIME140.dll) + vcruntime.lib(VCRUNTIME140.dll) + vcruntime.lib(VCRUNTIME140.dll) + vcruntime.lib(VCRUNTIME140.dll) + vcruntime.lib(VCRUNTIME140.dll) + vcruntime.lib(VCRUNTIME140.dll) + vcruntime.lib(VCRUNTIME140.dll) + vcruntime.lib(softmemtag.obj) + ucrt.lib(api-ms-win-crt-utility-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-utility-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-utility-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-string-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-math-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) + ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll) + 已完成传递 2 StgSharpC.vcxproj -> D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpC.dll diff --git a/源代码/StgSharpC/x64/Release/StgSharpC.obj b/源代码/StgSharpC/x64/Release/StgSharpC.obj index 7116ac6e..c0501660 100644 Binary files a/源代码/StgSharpC/x64/Release/StgSharpC.obj and b/源代码/StgSharpC/x64/Release/StgSharpC.obj differ diff --git a/源代码/StgSharpC/x64/Release/StgSharpC.tlog/CL.command.1.tlog b/源代码/StgSharpC/x64/Release/StgSharpC.tlog/CL.command.1.tlog index 09845775..d6c4ddaf 100644 Binary files a/源代码/StgSharpC/x64/Release/StgSharpC.tlog/CL.command.1.tlog and b/源代码/StgSharpC/x64/Release/StgSharpC.tlog/CL.command.1.tlog differ diff --git a/源代码/StgSharpC/x64/Release/StgSharpC.tlog/link.command.1.tlog b/源代码/StgSharpC/x64/Release/StgSharpC.tlog/link.command.1.tlog index ef20382d..5beacc6a 100644 Binary files a/源代码/StgSharpC/x64/Release/StgSharpC.tlog/link.command.1.tlog and b/源代码/StgSharpC/x64/Release/StgSharpC.tlog/link.command.1.tlog differ diff --git a/源代码/StgSharpC/x64/Release/StgSharpC.tlog/link.read.1.tlog b/源代码/StgSharpC/x64/Release/StgSharpC.tlog/link.read.1.tlog index 7990633a..80e84f0e 100644 Binary files a/源代码/StgSharpC/x64/Release/StgSharpC.tlog/link.read.1.tlog and b/源代码/StgSharpC/x64/Release/StgSharpC.tlog/link.read.1.tlog differ diff --git a/源代码/StgSharpC/x64/Release/dllmain.cod b/源代码/StgSharpC/x64/Release/dllmain.cod index a274bf1f..fc325547 100644 --- a/源代码/StgSharpC/x64/Release/dllmain.cod +++ b/源代码/StgSharpC/x64/Release/dllmain.cod @@ -205,37 +205,16 @@ CONST SEGMENT __real@3f000000 DD 03f000000r ; 0.5 CONST ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\dllmain.c ; COMDAT DllMain _TEXT SEGMENT hModule$ = 8 ul_reason_for_call$ = 16 lpReserved$ = 24 DllMain PROC ; COMDAT - -; 15 : switch (ul_reason_for_call) -; 16 : { -; 17 : case DLL_PROCESS_ATTACH: -; 18 : -; 19 : return 1; -; 20 : -; 21 : case DLL_THREAD_ATTACH: -; 22 : return 1; -; 23 : -; 24 : case DLL_THREAD_DETACH: -; 25 : return 1; -; 26 : -; 27 : case DLL_PROCESS_DETACH: -; 28 : return 1; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\dllmain.c +; Line 28 00000 b8 01 00 00 00 mov eax, 1 - -; 29 : -; 30 : break; -; 31 : } -; 32 : return TRUE; -; 33 : } - +; Line 33 00005 c3 ret 0 DllMain ENDP _TEXT ENDS diff --git a/源代码/StgSharpC/x64/Release/dllmain.obj b/源代码/StgSharpC/x64/Release/dllmain.obj index 0a0d2163..2be10b7b 100644 Binary files a/源代码/StgSharpC/x64/Release/dllmain.obj and b/源代码/StgSharpC/x64/Release/dllmain.obj differ diff --git a/源代码/StgSharpC/x64/Release/mat2.cod b/源代码/StgSharpC/x64/Release/mat2.cod index c735ecc3..046d56d6 100644 --- a/源代码/StgSharpC/x64/Release/mat2.cod +++ b/源代码/StgSharpC/x64/Release/mat2.cod @@ -9,102 +9,73 @@ PUBLIC deinit_mat2 PUBLIC transpose2to4 PUBLIC transpose2to3 ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat2.c ; COMDAT transpose2to3 _TEXT SEGMENT source$ = 8 target$ = 16 transpose2to3 PROC ; COMDAT - -; 6 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(1, 0, 1, 0)); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat2.c +; Line 6 00000 0f 10 21 movups xmm4, XMMWORD PTR [rcx] - 00003 0f 10 59 04 movups xmm3, XMMWORD PTR [rcx+4] - 00007 0f 28 d4 movaps xmm2, xmm4 - 0000a 0f 57 c0 xorps xmm0, xmm0 - 0000d 0f c6 d3 44 shufps xmm2, xmm3, 68 ; 00000044H - -; 7 : __m128 t1 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(3, 2, 3, 2)); -; 8 : -; 9 : target->colum[0] = _mm_shuffle_ps(t0, zeroVec, _MM_SHUFFLE(2, 0, 2, 0)); - - 00011 0f 28 ca movaps xmm1, xmm2 + 00003 0f 10 59 10 movups xmm3, XMMWORD PTR [rcx+16] + 00007 0f 28 cc movaps xmm1, xmm4 + 0000a 0f 57 d2 xorps xmm2, xmm2 + 0000d 0f c6 cb 44 shufps xmm1, xmm3, 68 ; 00000044H +; Line 9 + 00011 0f 28 c1 movaps xmm0, xmm1 00014 0f c6 e3 ee shufps xmm4, xmm3, 238 ; 000000eeH - 00018 0f c6 c8 88 shufps xmm1, xmm0, 136 ; 00000088H - -; 10 : target->colum[1] = _mm_shuffle_ps(t0, zeroVec, _MM_SHUFFLE(3, 1, 3, 1)); - - 0001c 0f c6 d0 dd shufps xmm2, xmm0, 221 ; 000000ddH - -; 11 : target->colum[2] = _mm_shuffle_ps(t1, zeroVec, _MM_SHUFFLE(2, 0, 2, 0)); - - 00020 0f c6 e0 88 shufps xmm4, xmm0, 136 ; 00000088H - 00024 0f 11 0a movups XMMWORD PTR [rdx], xmm1 - 00027 0f 11 52 10 movups XMMWORD PTR [rdx+16], xmm2 + 00018 0f c6 c2 88 shufps xmm0, xmm2, 136 ; 00000088H +; Line 10 + 0001c 0f c6 ca dd shufps xmm1, xmm2, 221 ; 000000ddH +; Line 11 + 00020 0f c6 e2 88 shufps xmm4, xmm2, 136 ; 00000088H + 00024 0f 11 02 movups XMMWORD PTR [rdx], xmm0 + 00027 0f 11 4a 10 movups XMMWORD PTR [rdx+16], xmm1 0002b 0f 11 62 20 movups XMMWORD PTR [rdx+32], xmm4 - -; 12 : } - +; Line 12 0002f c3 ret 0 transpose2to3 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat2.c ; COMDAT transpose2to4 _TEXT SEGMENT source$ = 8 target$ = 16 transpose2to4 PROC ; COMDAT - -; 16 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(1, 0, 1, 0)); - - 00000 0f 10 41 04 movups xmm0, XMMWORD PTR [rcx+4] +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat2.c +; Line 16 + 00000 0f 10 41 10 movups xmm0, XMMWORD PTR [rcx+16] 00004 0f 10 19 movups xmm3, XMMWORD PTR [rcx] - 00007 0f 28 d3 movaps xmm2, xmm3 - -; 17 : __m128 t1 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(3, 2, 3, 2)); - - 0000a 0f c6 d8 ee shufps xmm3, xmm0, 238 ; 000000eeH - 0000e 0f c6 d0 44 shufps xmm2, xmm0, 68 ; 00000044H - 00012 0f 57 c0 xorps xmm0, xmm0 - -; 18 : -; 19 : target->colum[0] = _mm_shuffle_ps(t0, zeroVec, _MM_SHUFFLE(2, 0, 2, 0)); - - 00015 0f 28 ca movaps xmm1, xmm2 - -; 20 : target->colum[1] = _mm_shuffle_ps(t0, zeroVec, _MM_SHUFFLE(3, 1, 3, 1)); - - 00018 0f c6 d0 dd shufps xmm2, xmm0, 221 ; 000000ddH - 0001c 0f c6 c8 88 shufps xmm1, xmm0, 136 ; 00000088H - 00020 0f 11 0a movups XMMWORD PTR [rdx], xmm1 - -; 21 : target->colum[2] = _mm_shuffle_ps(t1, zeroVec, _MM_SHUFFLE(2, 0, 2, 0)); - - 00023 0f 28 cb movaps xmm1, xmm3 - 00026 0f c6 c8 88 shufps xmm1, xmm0, 136 ; 00000088H - -; 22 : target->colum[3] = _mm_shuffle_ps(t1, zeroVec, _MM_SHUFFLE(3, 1, 3, 1)); - - 0002a 0f c6 d8 dd shufps xmm3, xmm0, 221 ; 000000ddH - 0002e 0f 11 4a 20 movups XMMWORD PTR [rdx+32], xmm1 + 00007 0f 57 c9 xorps xmm1, xmm1 + 0000a 0f 28 d3 movaps xmm2, xmm3 +; Line 17 + 0000d 0f c6 d8 ee shufps xmm3, xmm0, 238 ; 000000eeH + 00011 0f c6 d0 44 shufps xmm2, xmm0, 68 ; 00000044H +; Line 19 + 00015 0f 28 c2 movaps xmm0, xmm2 +; Line 20 + 00018 0f c6 d1 dd shufps xmm2, xmm1, 221 ; 000000ddH + 0001c 0f c6 c1 88 shufps xmm0, xmm1, 136 ; 00000088H + 00020 0f 11 02 movups XMMWORD PTR [rdx], xmm0 +; Line 21 + 00023 0f 28 c3 movaps xmm0, xmm3 + 00026 0f c6 c1 88 shufps xmm0, xmm1, 136 ; 00000088H +; Line 22 + 0002a 0f c6 d9 dd shufps xmm3, xmm1, 221 ; 000000ddH + 0002e 0f 11 42 20 movups XMMWORD PTR [rdx+32], xmm0 00032 0f 11 52 10 movups XMMWORD PTR [rdx+16], xmm2 00036 0f 11 5a 30 movups XMMWORD PTR [rdx+48], xmm3 - -; 23 : } - +; Line 23 0003a c3 ret 0 transpose2to4 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat2.c ; COMDAT deinit_mat2 _TEXT SEGMENT mat$ = 8 deinit_mat2 PROC ; COMDAT - -; 27 : _aligned_free(mat); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat2.c +; Line 27 00000 48 ff 25 00 00 00 00 rex_jmp QWORD PTR __imp__aligned_free deinit_mat2 ENDP diff --git a/源代码/StgSharpC/x64/Release/mat2.obj b/源代码/StgSharpC/x64/Release/mat2.obj index 346a09fd..0e5c19d1 100644 Binary files a/源代码/StgSharpC/x64/Release/mat2.obj and b/源代码/StgSharpC/x64/Release/mat2.obj differ diff --git a/源代码/StgSharpC/x64/Release/mat3.cod b/源代码/StgSharpC/x64/Release/mat3.cod index a92e78b8..aaaceb93 100644 --- a/源代码/StgSharpC/x64/Release/mat3.cod +++ b/源代码/StgSharpC/x64/Release/mat3.cod @@ -12,7 +12,7 @@ PUBLIC transpose3to2 ; COMDAT pdata pdata SEGMENT $pdata$transpose3to3 DD imagerel $LN4 - DD imagerel $LN4+83 + DD imagerel $LN4+79 DD imagerel $unwind$transpose3to3 ; COMDAT xdata xdata SEGMENT @@ -20,293 +20,179 @@ $unwind$transpose3to3 DD 031001H DD 06810H DD 02204H ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c ; COMDAT transpose3to2 _TEXT SEGMENT source$ = 8 target$ = 16 transpose3to2 PROC ; COMDAT - -; 7 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(1, 0, 1, 0)); - - 00000 0f 10 41 34 movups xmm0, XMMWORD PTR [rcx+52] - 00004 0f 10 51 30 movups xmm2, XMMWORD PTR [rcx+48] - -; 8 : __m128 t2 = _mm_shuffle_ps(ALIGN(source->m[0][2]), zeroVec, _MM_SHUFFLE(1, 0, 1, 0)); - - 00008 0f 10 49 38 movups xmm1, XMMWORD PTR [rcx+56] - 0000c 0f c6 d0 44 shufps xmm2, xmm0, 68 ; 00000044H - 00010 0f 57 c0 xorps xmm0, xmm0 - 00013 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - -; 9 : -; 10 : target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0)); - - 00017 0f 28 c2 movaps xmm0, xmm2 - 0001a 0f c6 c1 88 shufps xmm0, xmm1, 136 ; 00000088H - -; 11 : target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1)); - - 0001e 0f c6 d1 dd shufps xmm2, xmm1, 221 ; 000000ddH - 00022 0f 11 02 movups XMMWORD PTR [rdx], xmm0 - 00025 0f 11 52 10 movups XMMWORD PTR [rdx+16], xmm2 - -; 12 : } - - 00029 c3 ret 0 +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c +; Line 7 + 00000 0f 10 41 10 movups xmm0, XMMWORD PTR [rcx+16] + 00004 0f 10 11 movups xmm2, XMMWORD PTR [rcx] +; Line 8 + 00007 0f 10 49 20 movups xmm1, XMMWORD PTR [rcx+32] + 0000b 0f c6 d0 44 shufps xmm2, xmm0, 68 ; 00000044H + 0000f 0f 57 c0 xorps xmm0, xmm0 + 00012 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H +; Line 10 + 00016 0f 28 c2 movaps xmm0, xmm2 + 00019 0f c6 c1 88 shufps xmm0, xmm1, 136 ; 00000088H +; Line 11 + 0001d 0f c6 d1 dd shufps xmm2, xmm1, 221 ; 000000ddH + 00021 0f 11 02 movups XMMWORD PTR [rdx], xmm0 + 00024 0f 11 52 10 movups XMMWORD PTR [rdx+16], xmm2 +; Line 12 + 00028 c3 ret 0 transpose3to2 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c ; COMDAT transpose3to3 _TEXT SEGMENT source$ = 32 target$ = 40 transpose3to3 PROC ; COMDAT - -; 15 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c +; Line 15 $LN4: 00000 48 83 ec 18 sub rsp, 24 - -; 16 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(1, 0, 1, 0)); -; 17 : __m128 t1 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(3, 2, 3, 2)); -; 18 : __m128 t2 = _mm_shuffle_ps(ALIGN(source->m[0][2]), zeroVec, _MM_SHUFFLE(1, 0, 1, 0)); - - 00004 0f 10 61 38 movups xmm4, XMMWORD PTR [rcx+56] - 00008 0f 10 69 34 movups xmm5, XMMWORD PTR [rcx+52] +; Line 16 + 00004 0f 10 61 10 movups xmm4, XMMWORD PTR [rcx+16] +; Line 18 + 00008 0f 10 69 20 movups xmm5, XMMWORD PTR [rcx+32] 0000c 0f 29 34 24 movaps XMMWORD PTR [rsp], xmm6 - 00010 0f 57 c0 xorps xmm0, xmm0 - 00013 0f 10 71 30 movups xmm6, XMMWORD PTR [rcx+48] - 00017 0f 28 cc movaps xmm1, xmm4 - 0001a 0f 57 d2 xorps xmm2, xmm2 - 0001d 0f 28 de movaps xmm3, xmm6 - 00020 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - 00024 0f c6 dd 44 shufps xmm3, xmm5, 68 ; 00000044H - 00028 0f c6 f5 ee shufps xmm6, xmm5, 238 ; 000000eeH - -; 19 : __m128 t3 = _mm_shuffle_ps(ALIGN(source->m[0][2]), zeroVec, _MM_SHUFFLE(3, 2, 3, 2)); -; 20 : -; 21 : target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0)); - - 0002c 0f 28 c3 movaps xmm0, xmm3 - 0002f 0f c6 e2 ee shufps xmm4, xmm2, 238 ; 000000eeH - -; 22 : target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1)); -; 23 : target->colum[2] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(2, 0, 2, 0)); - - 00033 0f c6 f4 88 shufps xmm6, xmm4, 136 ; 00000088H - 00037 0f c6 c1 88 shufps xmm0, xmm1, 136 ; 00000088H - 0003b 0f c6 d9 dd shufps xmm3, xmm1, 221 ; 000000ddH - 0003f 0f 11 72 20 movups XMMWORD PTR [rdx+32], xmm6 - -; 24 : } - - 00043 0f 28 34 24 movaps xmm6, XMMWORD PTR [rsp] - 00047 0f 11 02 movups XMMWORD PTR [rdx], xmm0 - 0004a 0f 11 5a 10 movups XMMWORD PTR [rdx+16], xmm3 - 0004e 48 83 c4 18 add rsp, 24 - 00052 c3 ret 0 + 00010 0f 57 db xorps xmm3, xmm3 + 00013 0f 10 31 movups xmm6, XMMWORD PTR [rcx] + 00016 0f 28 cd movaps xmm1, xmm5 +; Line 19 + 00019 0f c6 eb ee shufps xmm5, xmm3, 238 ; 000000eeH + 0001d 0f 28 d6 movaps xmm2, xmm6 + 00020 0f c6 cb 44 shufps xmm1, xmm3, 68 ; 00000044H + 00024 0f c6 d4 44 shufps xmm2, xmm4, 68 ; 00000044H + 00028 0f c6 f4 ee shufps xmm6, xmm4, 238 ; 000000eeH +; Line 21 + 0002c 0f 28 c2 movaps xmm0, xmm2 +; Line 23 + 0002f 0f c6 f5 88 shufps xmm6, xmm5, 136 ; 00000088H + 00033 0f c6 c1 88 shufps xmm0, xmm1, 136 ; 00000088H + 00037 0f c6 d1 dd shufps xmm2, xmm1, 221 ; 000000ddH + 0003b 0f 11 72 20 movups XMMWORD PTR [rdx+32], xmm6 +; Line 24 + 0003f 0f 28 34 24 movaps xmm6, XMMWORD PTR [rsp] + 00043 0f 11 02 movups XMMWORD PTR [rdx], xmm0 + 00046 0f 11 52 10 movups XMMWORD PTR [rdx+16], xmm2 + 0004a 48 83 c4 18 add rsp, 24 + 0004e c3 ret 0 transpose3to3 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c ; COMDAT transpose3to4 _TEXT SEGMENT source$ = 8 target$ = 16 transpose3to4 PROC ; COMDAT - -; 28 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(1, 0, 1, 0)); - - 00000 0f 10 41 34 movups xmm0, XMMWORD PTR [rcx+52] - 00004 0f 10 61 30 movups xmm4, XMMWORD PTR [rcx+48] - -; 29 : __m128 t1 = _mm_shuffle_ps(ALIGN(source->m[0][0]), ALIGN(source->m[0][1]), _MM_SHUFFLE(3, 2, 3, 2)); -; 30 : __m128 t2 = _mm_shuffle_ps(ALIGN(source->m[0][2]), zeroVec, _MM_SHUFFLE(1, 0, 1, 0)); - - 00008 0f 10 51 38 movups xmm2, XMMWORD PTR [rcx+56] - 0000c 0f 28 dc movaps xmm3, xmm4 - 0000f 0f c6 e0 ee shufps xmm4, xmm0, 238 ; 000000eeH - 00013 0f c6 d8 44 shufps xmm3, xmm0, 68 ; 00000044H - 00017 0f 28 ca movaps xmm1, xmm2 - 0001a 0f 57 c0 xorps xmm0, xmm0 - 0001d 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - -; 31 : __m128 t3 = _mm_shuffle_ps(ALIGN(source->m[0][2]), zeroVec, _MM_SHUFFLE(3, 2, 3, 2)); - - 00021 0f c6 d0 ee shufps xmm2, xmm0, 238 ; 000000eeH - -; 32 : -; 33 : target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0)); - - 00025 0f 28 c3 movaps xmm0, xmm3 - 00028 0f c6 c1 88 shufps xmm0, xmm1, 136 ; 00000088H - 0002c 0f 11 02 movups XMMWORD PTR [rdx], xmm0 - -; 34 : target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1)); -; 35 : target->colum[2] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(2, 0, 2, 0)); - - 0002f 0f 28 c4 movaps xmm0, xmm4 - 00032 0f c6 c2 88 shufps xmm0, xmm2, 136 ; 00000088H - 00036 0f c6 d9 dd shufps xmm3, xmm1, 221 ; 000000ddH - -; 36 : target->colum[3] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(3, 1, 3, 1)); - - 0003a 0f c6 e2 dd shufps xmm4, xmm2, 221 ; 000000ddH - 0003e 0f 11 42 20 movups XMMWORD PTR [rdx+32], xmm0 - 00042 0f 11 5a 10 movups XMMWORD PTR [rdx+16], xmm3 - 00046 0f 11 62 30 movups XMMWORD PTR [rdx+48], xmm4 - -; 37 : } - - 0004a c3 ret 0 +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c +; Line 28 + 00000 0f 10 41 10 movups xmm0, XMMWORD PTR [rcx+16] + 00004 0f 10 21 movups xmm4, XMMWORD PTR [rcx] +; Line 30 + 00007 0f 10 51 20 movups xmm2, XMMWORD PTR [rcx+32] + 0000b 0f 28 dc movaps xmm3, xmm4 + 0000e 0f c6 e0 ee shufps xmm4, xmm0, 238 ; 000000eeH + 00012 0f c6 d8 44 shufps xmm3, xmm0, 68 ; 00000044H + 00016 0f 28 ca movaps xmm1, xmm2 + 00019 0f 57 c0 xorps xmm0, xmm0 + 0001c 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H +; Line 31 + 00020 0f c6 d0 ee shufps xmm2, xmm0, 238 ; 000000eeH +; Line 33 + 00024 0f 28 c3 movaps xmm0, xmm3 + 00027 0f c6 c1 88 shufps xmm0, xmm1, 136 ; 00000088H + 0002b 0f 11 02 movups XMMWORD PTR [rdx], xmm0 +; Line 35 + 0002e 0f 28 c4 movaps xmm0, xmm4 + 00031 0f c6 c2 88 shufps xmm0, xmm2, 136 ; 00000088H + 00035 0f c6 d9 dd shufps xmm3, xmm1, 221 ; 000000ddH +; Line 36 + 00039 0f c6 e2 dd shufps xmm4, xmm2, 221 ; 000000ddH + 0003d 0f 11 42 20 movups XMMWORD PTR [rdx+32], xmm0 + 00041 0f 11 5a 10 movups XMMWORD PTR [rdx+16], xmm3 + 00045 0f 11 62 30 movups XMMWORD PTR [rdx+48], xmm4 +; Line 37 + 00049 c3 ret 0 transpose3to4 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c ; COMDAT det_mat3_internal _TEXT SEGMENT c0$ = 8 c1$ = 16 c2$ = 24 det_mat3_internal PROC ; COMDAT - -; 41 : //let adding row aligned -; 42 : __m128 addc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 0, 2, 1)); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c +; Line 42 00000 0f 10 1a movups xmm3, XMMWORD PTR [rdx] - -; 43 : __m128 addc2 = _mm_shuffle_ps(c2, c2, _MM_SHUFFLE(3, 1, 0, 2)); - +; Line 43 00003 41 0f 10 10 movups xmm2, XMMWORD PTR [r8] 00007 0f 28 e3 movaps xmm4, xmm3 0000a 0f c6 e3 c9 shufps xmm4, xmm3, 201 ; 000000c9H 0000e 0f 28 c2 movaps xmm0, xmm2 - -; 44 : -; 45 : //let sub row aligned -; 46 : __m128 subc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 1, 0, 2)); -; 47 : __m128 subc2 = _mm_shuffle_ps(c2, c2, _MM_SHUFFLE(3, 0, 2, 1)); -; 48 : -; 49 : //multple all add row -; 50 : __m128 cache = _mm_mul_ps(c0, addc1); - +; Line 50 00011 0f 59 21 mulps xmm4, XMMWORD PTR [rcx] 00014 0f c6 c2 d2 shufps xmm0, xmm2, 210 ; 000000d2H 00018 0f c6 db d2 shufps xmm3, xmm3, 210 ; 000000d2H - -; 51 : cache = _mm_mul_ps(cache, addc2); -; 52 : -; 53 : //multiple all sub row -; 54 : __m128 sub = _mm_mul_ps(c0, subc1); - +; Line 54 0001c 0f 59 19 mulps xmm3, XMMWORD PTR [rcx] 0001f 0f 59 e0 mulps xmm4, xmm0 00022 0f c6 d2 c9 shufps xmm2, xmm2, 201 ; 000000c9H - -; 55 : sub = _mm_mul_ps(sub, subc2); - +; Line 55 00026 0f 59 da mulps xmm3, xmm2 - -; 56 : -; 57 : //main-corner sub sub-corner -; 58 : cache = _mm_sub_ps(cache, sub); - +; Line 58 00029 0f 5c e3 subps xmm4, xmm3 - -; 59 : -; 60 : __m128 ret = _mm_hadd_ps(cache, cache); //element 1 add element 2 - +; Line 60 0002c 0f 28 c4 movaps xmm0, xmm4 0002f f2 0f 7c c4 haddps xmm0, xmm4 - -; 61 : ret = _mm_add_ps(ret, cache); //(e1 add e2) add element 3 - +; Line 61 00033 0f 58 c4 addps xmm0, xmm4 - -; 62 : -; 63 : return ret.m128_f32[2]; - +; Line 63 00036 0f c6 c0 aa shufps xmm0, xmm0, 170 ; 000000aaH - -; 64 : } - +; Line 64 0003a c3 ret 0 det_mat3_internal ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c ; COMDAT det_mat3 _TEXT SEGMENT mat$ = 8 det_mat3 PROC ; COMDAT - -; 68 : return det_mat3_internal( - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c +; Line 68 00000 0f 10 59 10 movups xmm3, XMMWORD PTR [rcx+16] 00004 0f 10 51 20 movups xmm2, XMMWORD PTR [rcx+32] - -; 42 : __m128 addc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 0, 2, 1)); - +; Line 42 00008 0f 28 e3 movaps xmm4, xmm3 0000b 0f c6 e3 c9 shufps xmm4, xmm3, 201 ; 000000c9H - -; 43 : __m128 addc2 = _mm_shuffle_ps(c2, c2, _MM_SHUFFLE(3, 1, 0, 2)); - +; Line 43 0000f 0f 28 c2 movaps xmm0, xmm2 - -; 44 : -; 45 : //let sub row aligned -; 46 : __m128 subc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 1, 0, 2)); -; 47 : __m128 subc2 = _mm_shuffle_ps(c2, c2, _MM_SHUFFLE(3, 0, 2, 1)); -; 48 : -; 49 : //multple all add row -; 50 : __m128 cache = _mm_mul_ps(c0, addc1); - +; Line 50 00012 0f 59 21 mulps xmm4, XMMWORD PTR [rcx] 00015 0f c6 c2 d2 shufps xmm0, xmm2, 210 ; 000000d2H 00019 0f c6 db d2 shufps xmm3, xmm3, 210 ; 000000d2H - -; 51 : cache = _mm_mul_ps(cache, addc2); -; 52 : -; 53 : //multiple all sub row -; 54 : __m128 sub = _mm_mul_ps(c0, subc1); - +; Line 54 0001d 0f 59 19 mulps xmm3, XMMWORD PTR [rcx] 00020 0f 59 e0 mulps xmm4, xmm0 00023 0f c6 d2 c9 shufps xmm2, xmm2, 201 ; 000000c9H - -; 55 : sub = _mm_mul_ps(sub, subc2); - +; Line 55 00027 0f 59 da mulps xmm3, xmm2 - -; 56 : -; 57 : //main-corner sub sub-corner -; 58 : cache = _mm_sub_ps(cache, sub); - +; Line 58 0002a 0f 5c e3 subps xmm4, xmm3 - -; 59 : -; 60 : __m128 ret = _mm_hadd_ps(cache, cache); //element 1 add element 2 - +; Line 60 0002d 0f 28 c4 movaps xmm0, xmm4 00030 f2 0f 7c c4 haddps xmm0, xmm4 - -; 61 : ret = _mm_add_ps(ret, cache); //(e1 add e2) add element 3 - +; Line 61 00034 0f 58 c4 addps xmm0, xmm4 - -; 68 : return det_mat3_internal( - +; Line 68 00037 0f c6 c0 aa shufps xmm0, xmm0, 170 ; 000000aaH - -; 69 : mat->colum[0], -; 70 : mat->colum[1], -; 71 : mat->colum[2] -; 72 : ); -; 73 : } - +; Line 73 0003b c3 ret 0 det_mat3 ENDP _TEXT ENDS diff --git a/源代码/StgSharpC/x64/Release/mat3.obj b/源代码/StgSharpC/x64/Release/mat3.obj index 6c95f0b8..2eb9a1ea 100644 Binary files a/源代码/StgSharpC/x64/Release/mat3.obj and b/源代码/StgSharpC/x64/Release/mat3.obj differ diff --git a/源代码/StgSharpC/x64/Release/mat4.cod b/源代码/StgSharpC/x64/Release/mat4.cod index 655f2c5d..80c22365 100644 --- a/源代码/StgSharpC/x64/Release/mat4.cod +++ b/源代码/StgSharpC/x64/Release/mat4.cod @@ -36,58 +36,42 @@ $unwind$det_mat4 DD 0b3501H DD 04680eH DD 0a207H ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c ; COMDAT transpose4to2 _TEXT SEGMENT source$ = 8 target$ = 16 transpose4to2 PROC ; COMDAT - -; 8 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0)); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c +; Line 8 00000 0f 10 41 10 movups xmm0, XMMWORD PTR [rcx+16] 00004 0f 10 11 movups xmm2, XMMWORD PTR [rcx] - -; 9 : __m128 t2 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(1, 0, 1, 0)); - +; Line 9 00007 0f 10 49 20 movups xmm1, XMMWORD PTR [rcx+32] 0000b 0f c6 d0 44 shufps xmm2, xmm0, 68 ; 00000044H 0000f 0f 10 41 30 movups xmm0, XMMWORD PTR [rcx+48] 00013 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - -; 10 : -; 11 : target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0)); - +; Line 11 00017 0f 28 c2 movaps xmm0, xmm2 0001a 0f c6 c1 88 shufps xmm0, xmm1, 136 ; 00000088H - -; 12 : target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1)); - +; Line 12 0001e 0f c6 d1 dd shufps xmm2, xmm1, 221 ; 000000ddH 00022 0f 11 02 movups XMMWORD PTR [rdx], xmm0 00025 0f 11 52 10 movups XMMWORD PTR [rdx+16], xmm2 - -; 13 : } - +; Line 13 00029 c3 ret 0 transpose4to2 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c ; COMDAT transpose4to4 _TEXT SEGMENT source$ = 8 target$ = 16 transpose4to4 PROC ; COMDAT - -; 17 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0)); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c +; Line 17 00000 0f 10 41 10 movups xmm0, XMMWORD PTR [rcx+16] 00004 0f 10 21 movups xmm4, XMMWORD PTR [rcx] - -; 18 : __m128 t1 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(3, 2, 3, 2)); -; 19 : __m128 t2 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(1, 0, 1, 0)); - +; Line 19 00007 0f 10 51 20 movups xmm2, XMMWORD PTR [rcx+32] 0000b 0f 28 dc movaps xmm3, xmm4 0000e 0f c6 e0 ee shufps xmm4, xmm0, 238 ; 000000eeH @@ -95,57 +79,38 @@ transpose4to4 PROC ; COMDAT 00016 0f 28 ca movaps xmm1, xmm2 00019 0f 10 41 30 movups xmm0, XMMWORD PTR [rcx+48] 0001d 0f c6 c8 44 shufps xmm1, xmm0, 68 ; 00000044H - -; 20 : __m128 t3 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(3, 2, 3, 2)); - +; Line 20 00021 0f c6 d0 ee shufps xmm2, xmm0, 238 ; 000000eeH - -; 21 : -; 22 : target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0)); - +; Line 22 00025 0f 28 c3 movaps xmm0, xmm3 00028 0f c6 c1 88 shufps xmm0, xmm1, 136 ; 00000088H 0002c 0f 11 02 movups XMMWORD PTR [rdx], xmm0 - -; 23 : target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1)); -; 24 : target->colum[2] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(2, 0, 2, 0)); - +; Line 24 0002f 0f 28 c4 movaps xmm0, xmm4 00032 0f c6 c2 88 shufps xmm0, xmm2, 136 ; 00000088H 00036 0f c6 d9 dd shufps xmm3, xmm1, 221 ; 000000ddH - -; 25 : target->colum[3] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(3, 1, 3, 1)); - +; Line 25 0003a 0f c6 e2 dd shufps xmm4, xmm2, 221 ; 000000ddH 0003e 0f 11 42 20 movups XMMWORD PTR [rdx+32], xmm0 00042 0f 11 5a 10 movups XMMWORD PTR [rdx+16], xmm3 00046 0f 11 62 30 movups XMMWORD PTR [rdx+48], xmm4 - -; 26 : } - +; Line 26 0004a c3 ret 0 transpose4to4 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c ; COMDAT transpose4to3 _TEXT SEGMENT source$ = 32 target$ = 40 transpose4to3 PROC ; COMDAT - -; 29 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c +; Line 29 $LN4: 00000 48 83 ec 18 sub rsp, 24 - -; 30 : __m128 t0 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(1, 0, 1, 0)); - +; Line 30 00004 0f 10 61 10 movups xmm4, XMMWORD PTR [rcx+16] - -; 31 : __m128 t1 = _mm_shuffle_ps(ALIGN(source->colum[0]), ALIGN(source->colum[1]), _MM_SHUFFLE(3, 2, 3, 2)); -; 32 : __m128 t2 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(1, 0, 1, 0)); - +; Line 32 00008 0f 10 69 20 movups xmm5, XMMWORD PTR [rcx+32] 0000c 0f 10 59 30 movups xmm3, XMMWORD PTR [rcx+48] 00010 0f 29 34 24 movaps XMMWORD PTR [rsp], xmm6 @@ -153,28 +118,18 @@ $LN4: 00017 0f 10 31 movups xmm6, XMMWORD PTR [rcx] 0001a 0f c6 cb 44 shufps xmm1, xmm3, 68 ; 00000044H 0001e 0f 28 d6 movaps xmm2, xmm6 - -; 33 : __m128 t3 = _mm_shuffle_ps(ALIGN(source->colum[2]), ALIGN(source->colum[3]), _MM_SHUFFLE(3, 2, 3, 2)); - +; Line 33 00021 0f c6 eb ee shufps xmm5, xmm3, 238 ; 000000eeH 00025 0f c6 d4 44 shufps xmm2, xmm4, 68 ; 00000044H 00029 0f c6 f4 ee shufps xmm6, xmm4, 238 ; 000000eeH - -; 34 : -; 35 : target->colum[0] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(2, 0, 2, 0)); - +; Line 35 0002d 0f 28 c2 movaps xmm0, xmm2 - -; 36 : target->colum[1] = _mm_shuffle_ps(t0, t2, _MM_SHUFFLE(3, 1, 3, 1)); -; 37 : target->colum[2] = _mm_shuffle_ps(t1, t3, _MM_SHUFFLE(2, 0, 2, 0)); - +; Line 37 00030 0f c6 f5 88 shufps xmm6, xmm5, 136 ; 00000088H 00034 0f c6 c1 88 shufps xmm0, xmm1, 136 ; 00000088H 00038 0f c6 d1 dd shufps xmm2, xmm1, 221 ; 000000ddH 0003c 0f 11 72 20 movups XMMWORD PTR [rdx+32], xmm6 - -; 38 : } - +; Line 38 00040 0f 28 34 24 movaps xmm6, XMMWORD PTR [rsp] 00044 0f 11 02 movups XMMWORD PTR [rdx], xmm0 00047 0f 11 52 10 movups XMMWORD PTR [rdx+16], xmm2 @@ -183,252 +138,141 @@ $LN4: transpose4to3 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c ; COMDAT det_mat4 _TEXT SEGMENT matPtr$ = 96 transpose$ = 104 det_mat4 PROC ; COMDAT - -; 41 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c +; Line 41 $LN12: 00000 48 8b c4 mov rax, rsp 00003 48 83 ec 58 sub rsp, 88 ; 00000058H - -; 42 : __m128 mc0 = ALIGN(matPtr->colum[0]); - +; Line 42 00007 0f 10 29 movups xmm5, XMMWORD PTR [rcx] 0000a 0f 29 70 e8 movaps XMMWORD PTR [rax-24], xmm6 - -; 47 : __m128 cogeneration = _mm_set_ps( - +; Line 47 0000e 0f 10 71 30 movups xmm6, XMMWORD PTR [rcx+48] 00012 0f 29 78 d8 movaps XMMWORD PTR [rax-40], xmm7 00016 44 0f 29 40 c8 movaps XMMWORD PTR [rax-56], xmm8 ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c - -; 43 : __m128 addc2 = _mm_shuffle_ps(c2, c2, _MM_SHUFFLE(3, 1, 0, 2)); - +; Line 43 0001b 0f 28 de movaps xmm3, xmm6 ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c - -; 47 : __m128 cogeneration = _mm_set_ps( - +; Line 47 0001e 44 0f 10 41 20 movups xmm8, XMMWORD PTR [rcx+32] ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c - -; 43 : __m128 addc2 = _mm_shuffle_ps(c2, c2, _MM_SHUFFLE(3, 1, 0, 2)); - +; Line 43 00023 0f c6 de d2 shufps xmm3, xmm6, 210 ; 000000d2H 00027 44 0f 29 48 b8 movaps XMMWORD PTR [rax-72], xmm9 - -; 42 : __m128 addc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 0, 2, 1)); - +; Line 42 0002c 45 0f 28 c8 movaps xmm9, xmm8 00030 44 0f 29 14 24 movaps XMMWORD PTR [rsp], xmm10 ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c - -; 43 : __m128 mc1 = ALIGN(matPtr->colum[1]); - +; Line 43 00035 44 0f 10 51 10 movups xmm10, XMMWORD PTR [rcx+16] ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c - -; 42 : __m128 addc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 0, 2, 1)); - +; Line 42 0003a 45 0f c6 c8 c9 shufps xmm9, xmm8, 201 ; 000000c9H - -; 44 : -; 45 : //let sub row aligned -; 46 : __m128 subc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 1, 0, 2)); - +; Line 46 0003f 45 0f c6 c0 d2 shufps xmm8, xmm8, 210 ; 000000d2H - -; 42 : __m128 addc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 0, 2, 1)); - +; Line 42 00044 41 0f 28 d2 movaps xmm2, xmm10 00048 41 0f c6 d2 c9 shufps xmm2, xmm10, 201 ; 000000c9H - -; 54 : __m128 sub = _mm_mul_ps(c0, subc1); - +; Line 54 0004d 41 0f 28 c0 movaps xmm0, xmm8 00051 41 0f 59 c2 mulps xmm0, xmm10 00055 41 0f 28 c9 movaps xmm1, xmm9 00059 41 0f 59 ca mulps xmm1, xmm10 0005d 0f c6 f6 c9 shufps xmm6, xmm6, 201 ; 000000c9H - -; 55 : sub = _mm_mul_ps(sub, subc2); - +; Line 55 00061 0f 59 c6 mulps xmm0, xmm6 00064 0f 59 cb mulps xmm1, xmm3 - -; 46 : __m128 subc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 1, 0, 2)); - +; Line 46 00067 45 0f c6 d2 d2 shufps xmm10, xmm10, 210 ; 000000d2H - -; 47 : __m128 subc2 = _mm_shuffle_ps(c2, c2, _MM_SHUFFLE(3, 0, 2, 1)); -; 48 : -; 49 : //multple all add row -; 50 : __m128 cache = _mm_mul_ps(c0, addc1); - +; Line 50 0006c 0f 59 d5 mulps xmm2, xmm5 - -; 58 : cache = _mm_sub_ps(cache, sub); - +; Line 58 0006f 0f 5c c8 subps xmm1, xmm0 - -; 54 : __m128 sub = _mm_mul_ps(c0, subc1); - +; Line 54 00072 44 0f 59 d5 mulps xmm10, xmm5 00076 41 0f 28 c0 movaps xmm0, xmm8 0007a 0f 59 c5 mulps xmm0, xmm5 - -; 60 : __m128 ret = _mm_hadd_ps(cache, cache); //element 1 add element 2 - +; Line 60 0007d 0f 28 f9 movaps xmm7, xmm1 00080 f2 0f 7c f9 haddps xmm7, xmm1 - -; 55 : sub = _mm_mul_ps(sub, subc2); - +; Line 55 00084 0f 59 c6 mulps xmm0, xmm6 - -; 61 : ret = _mm_add_ps(ret, cache); //(e1 add e2) add element 3 - +; Line 61 00087 0f 58 f9 addps xmm7, xmm1 - -; 50 : __m128 cache = _mm_mul_ps(c0, addc1); - +; Line 50 0008a 41 0f 28 c9 movaps xmm1, xmm9 0008e 0f 59 cd mulps xmm1, xmm5 ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c - -; 47 : __m128 cogeneration = _mm_set_ps( - +; Line 47 00091 0f c6 ff aa shufps xmm7, xmm7, 170 ; 000000aaH ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c - -; 51 : cache = _mm_mul_ps(cache, addc2); - +; Line 51 00095 0f 59 cb mulps xmm1, xmm3 - -; 58 : cache = _mm_sub_ps(cache, sub); - +; Line 58 00098 0f 5c c8 subps xmm1, xmm0 - -; 55 : sub = _mm_mul_ps(sub, subc2); - +; Line 55 0009b 41 0f 28 c2 movaps xmm0, xmm10 0009f 0f 59 c6 mulps xmm0, xmm6 ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c - -; 57 : } - +; Line 57 000a2 0f 28 70 e8 movaps xmm6, XMMWORD PTR [rax-24] ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c - -; 55 : sub = _mm_mul_ps(sub, subc2); - +; Line 55 000a6 45 0f 59 d1 mulps xmm10, xmm9 ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c - -; 57 : } - +; Line 57 000aa 44 0f 28 48 b8 movaps xmm9, XMMWORD PTR [rax-72] ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c - -; 60 : __m128 ret = _mm_hadd_ps(cache, cache); //element 1 add element 2 - +; Line 60 000af 0f 28 e1 movaps xmm4, xmm1 000b2 f2 0f 7c e1 haddps xmm4, xmm1 - -; 61 : ret = _mm_add_ps(ret, cache); //(e1 add e2) add element 3 - +; Line 61 000b6 0f 58 e1 addps xmm4, xmm1 - -; 51 : cache = _mm_mul_ps(cache, addc2); - +; Line 51 000b9 0f 28 ca movaps xmm1, xmm2 000bc 0f 59 cb mulps xmm1, xmm3 000bf 41 0f 59 d0 mulps xmm2, xmm8 ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c - -; 57 : } - +; Line 57 000c3 44 0f 28 40 c8 movaps xmm8, XMMWORD PTR [rax-56] ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c - -; 58 : cache = _mm_sub_ps(cache, sub); - +; Line 58 000c8 0f 5c c8 subps xmm1, xmm0 ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c - -; 47 : __m128 cogeneration = _mm_set_ps( - +; Line 47 000cb 0f c6 e4 aa shufps xmm4, xmm4, 170 ; 000000aaH ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c - -; 58 : cache = _mm_sub_ps(cache, sub); - +; Line 58 000cf 41 0f 5c d2 subps xmm2, xmm10 ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c - -; 57 : } - +; Line 57 000d3 44 0f 28 14 24 movaps xmm10, XMMWORD PTR [rsp] ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c - -; 60 : __m128 ret = _mm_hadd_ps(cache, cache); //element 1 add element 2 - +; Line 60 000d8 0f 28 d9 movaps xmm3, xmm1 000db f2 0f 7c d9 haddps xmm3, xmm1 000df 0f 28 c2 movaps xmm0, xmm2 - -; 61 : ret = _mm_add_ps(ret, cache); //(e1 add e2) add element 3 - +; Line 61 000e2 0f 58 d9 addps xmm3, xmm1 - -; 60 : __m128 ret = _mm_hadd_ps(cache, cache); //element 1 add element 2 - +; Line 60 000e5 f2 0f 7c c2 haddps xmm0, xmm2 ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c - -; 47 : __m128 cogeneration = _mm_set_ps( - +; Line 47 000e9 0f c6 db aa shufps xmm3, xmm3, 170 ; 000000aaH 000ed 0f 28 cb movaps xmm1, xmm3 ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat3.c - -; 61 : ret = _mm_add_ps(ret, cache); //(e1 add e2) add element 3 - +; Line 61 000f0 0f 58 c2 addps xmm0, xmm2 ; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c - -; 47 : __m128 cogeneration = _mm_set_ps( - +; Line 47 000f3 0f 28 df movaps xmm3, xmm7 - -; 57 : } - +; Line 57 000f6 0f 28 78 d8 movaps xmm7, XMMWORD PTR [rax-40] 000fa 0f 14 dc unpcklps xmm3, xmm4 000fd 0f c6 c0 aa shufps xmm0, xmm0, 170 ; 000000aaH @@ -446,14 +290,12 @@ $LN12: det_mat4 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c ; COMDAT deinit_mat4 _TEXT SEGMENT matPtr$ = 8 deinit_mat4 PROC ; COMDAT - -; 61 : _aligned_free(matPtr); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\mat4.c +; Line 61 00000 48 ff 25 00 00 00 00 rex_jmp QWORD PTR __imp__aligned_free deinit_mat4 ENDP diff --git a/源代码/StgSharpC/x64/Release/mat4.obj b/源代码/StgSharpC/x64/Release/mat4.obj index 58067b86..e8da9ac6 100644 Binary files a/源代码/StgSharpC/x64/Release/mat4.obj and b/源代码/StgSharpC/x64/Release/mat4.obj differ diff --git a/源代码/StgSharpC/x64/Release/stb_image.cod b/源代码/StgSharpC/x64/Release/stb_image.cod index 19d0686a..baf61525 100644 --- a/源代码/StgSharpC/x64/Release/stb_image.cod +++ b/源代码/StgSharpC/x64/Release/stb_image.cod @@ -678,7 +678,7 @@ stbi__depth_scale_table DB 00H DB 00H DB 00H DB 01H - ORG $+7 + ORG $+15 stbi__zdefault_distance DB 05H DB 05H DB 05H @@ -738,6 +738,7 @@ stbi__zdefault_distance DB 05H DD 081H DD 01H stbi__h2l_gamma_i DD 03ee8ba2er ; 0.454545 + ORG $+8 stbi__zdist_extra DD 00H DD 00H DD 00H @@ -1272,7 +1273,7 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__pnm_load DD imagerel stbi__pnm_load - DD imagerel stbi__pnm_load+640 + DD imagerel stbi__pnm_load+432 DD imagerel $unwind$stbi__pnm_load pdata ENDS ; COMDAT pdata @@ -1284,11 +1285,35 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__hdr_load DD imagerel stbi__hdr_load - DD imagerel stbi__hdr_load+2206 + DD imagerel stbi__hdr_load+436 DD imagerel $unwind$stbi__hdr_load pdata ENDS ; COMDAT pdata pdata SEGMENT +$pdata$0$stbi__hdr_load DD imagerel stbi__hdr_load+436 + DD imagerel stbi__hdr_load+1668 + DD imagerel $chain$0$stbi__hdr_load +pdata ENDS +; COMDAT pdata +pdata SEGMENT +$pdata$1$stbi__hdr_load DD imagerel stbi__hdr_load+1668 + DD imagerel stbi__hdr_load+1702 + DD imagerel $chain$1$stbi__hdr_load +pdata ENDS +; COMDAT pdata +pdata SEGMENT +$pdata$2$stbi__hdr_load DD imagerel stbi__hdr_load+1702 + DD imagerel stbi__hdr_load+2055 + DD imagerel $chain$2$stbi__hdr_load +pdata ENDS +; COMDAT pdata +pdata SEGMENT +$pdata$3$stbi__hdr_load DD imagerel stbi__hdr_load+2055 + DD imagerel stbi__hdr_load+2097 + DD imagerel $chain$3$stbi__hdr_load +pdata ENDS +; COMDAT pdata +pdata SEGMENT $pdata$stbi__hdr_convert DD imagerel stbi__hdr_convert DD imagerel stbi__hdr_convert+302 DD imagerel $unwind$stbi__hdr_convert @@ -1476,49 +1501,49 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$2$stbi__psd_load DD imagerel stbi__psd_load+157 - DD imagerel stbi__psd_load+924 + DD imagerel stbi__psd_load+654 DD imagerel $chain$2$stbi__psd_load pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$4$stbi__psd_load DD imagerel stbi__psd_load+924 - DD imagerel stbi__psd_load+1015 +$pdata$4$stbi__psd_load DD imagerel stbi__psd_load+654 + DD imagerel stbi__psd_load+745 DD imagerel $chain$4$stbi__psd_load pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$5$stbi__psd_load DD imagerel stbi__psd_load+1015 - DD imagerel stbi__psd_load+1265 +$pdata$5$stbi__psd_load DD imagerel stbi__psd_load+745 + DD imagerel stbi__psd_load+913 DD imagerel $chain$5$stbi__psd_load pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$6$stbi__psd_load DD imagerel stbi__psd_load+1265 - DD imagerel stbi__psd_load+1278 +$pdata$6$stbi__psd_load DD imagerel stbi__psd_load+913 + DD imagerel stbi__psd_load+926 DD imagerel $chain$6$stbi__psd_load pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$7$stbi__psd_load DD imagerel stbi__psd_load+1278 - DD imagerel stbi__psd_load+1300 +$pdata$7$stbi__psd_load DD imagerel stbi__psd_load+926 + DD imagerel stbi__psd_load+948 DD imagerel $chain$7$stbi__psd_load pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$9$stbi__psd_load DD imagerel stbi__psd_load+1300 - DD imagerel stbi__psd_load+3196 +$pdata$9$stbi__psd_load DD imagerel stbi__psd_load+948 + DD imagerel stbi__psd_load+2844 DD imagerel $chain$9$stbi__psd_load pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$10$stbi__psd_load DD imagerel stbi__psd_load+3196 - DD imagerel stbi__psd_load+3238 +$pdata$10$stbi__psd_load DD imagerel stbi__psd_load+2844 + DD imagerel stbi__psd_load+2886 DD imagerel $chain$10$stbi__psd_load pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$11$stbi__psd_load DD imagerel stbi__psd_load+3238 - DD imagerel stbi__psd_load+3287 +$pdata$11$stbi__psd_load DD imagerel stbi__psd_load+2886 + DD imagerel stbi__psd_load+2935 DD imagerel $chain$11$stbi__psd_load pdata ENDS ; COMDAT pdata @@ -1536,7 +1561,7 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__tga_load DD imagerel stbi__tga_load - DD imagerel stbi__tga_load+2677 + DD imagerel stbi__tga_load+2463 DD imagerel $unwind$stbi__tga_load pdata ENDS ; COMDAT pdata @@ -1566,47 +1591,35 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__bmp_load DD imagerel stbi__bmp_load - DD imagerel stbi__bmp_load+4870 + DD imagerel stbi__bmp_load+4162 DD imagerel $unwind$stbi__bmp_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__bmp_parse_header DD imagerel stbi__bmp_parse_header - DD imagerel stbi__bmp_parse_header+130 + DD imagerel stbi__bmp_parse_header+140 DD imagerel $unwind$stbi__bmp_parse_header pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$1$stbi__bmp_parse_header DD imagerel stbi__bmp_parse_header+130 - DD imagerel stbi__bmp_parse_header+447 - DD imagerel $chain$1$stbi__bmp_parse_header +$pdata$0$stbi__bmp_parse_header DD imagerel stbi__bmp_parse_header+140 + DD imagerel stbi__bmp_parse_header+343 + DD imagerel $chain$0$stbi__bmp_parse_header pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$2$stbi__bmp_parse_header DD imagerel stbi__bmp_parse_header+447 - DD imagerel stbi__bmp_parse_header+557 +$pdata$2$stbi__bmp_parse_header DD imagerel stbi__bmp_parse_header+343 + DD imagerel stbi__bmp_parse_header+937 DD imagerel $chain$2$stbi__bmp_parse_header pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$3$stbi__bmp_parse_header DD imagerel stbi__bmp_parse_header+557 - DD imagerel stbi__bmp_parse_header+575 +$pdata$3$stbi__bmp_parse_header DD imagerel stbi__bmp_parse_header+937 + DD imagerel stbi__bmp_parse_header+990 DD imagerel $chain$3$stbi__bmp_parse_header pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$5$stbi__bmp_parse_header DD imagerel stbi__bmp_parse_header+575 - DD imagerel stbi__bmp_parse_header+1376 - DD imagerel $chain$5$stbi__bmp_parse_header -pdata ENDS -; COMDAT pdata -pdata SEGMENT -$pdata$6$stbi__bmp_parse_header DD imagerel stbi__bmp_parse_header+1376 - DD imagerel stbi__bmp_parse_header+1421 - DD imagerel $chain$6$stbi__bmp_parse_header -pdata ENDS -; COMDAT pdata -pdata SEGMENT $pdata$stbi__bmp_test DD imagerel stbi__bmp_test DD imagerel stbi__bmp_test+275 DD imagerel $unwind$stbi__bmp_test @@ -1638,7 +1651,7 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__parse_png_file DD imagerel stbi__parse_png_file - DD imagerel stbi__parse_png_file+3874 + DD imagerel stbi__parse_png_file+3866 DD imagerel $unwind$stbi__parse_png_file pdata ENDS ; COMDAT pdata @@ -1788,13 +1801,13 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$3$stbi__compute_huffman_codes DD imagerel stbi__compute_huffman_codes+773 - DD imagerel stbi__compute_huffman_codes+1637 + DD imagerel stbi__compute_huffman_codes+1530 DD imagerel $chain$3$stbi__compute_huffman_codes pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__parse_huffman_block DD imagerel stbi__parse_huffman_block - DD imagerel stbi__parse_huffman_block+1067 + DD imagerel stbi__parse_huffman_block+907 DD imagerel $unwind$stbi__parse_huffman_block pdata ENDS ; COMDAT pdata @@ -1818,23 +1831,11 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__zhuffman_decode DD imagerel stbi__zhuffman_decode - DD imagerel stbi__zhuffman_decode+45 + DD imagerel stbi__zhuffman_decode+100 DD imagerel $unwind$stbi__zhuffman_decode pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$0$stbi__zhuffman_decode DD imagerel stbi__zhuffman_decode+45 - DD imagerel stbi__zhuffman_decode+141 - DD imagerel $chain$0$stbi__zhuffman_decode -pdata ENDS -; COMDAT pdata -pdata SEGMENT -$pdata$1$stbi__zhuffman_decode DD imagerel stbi__zhuffman_decode+141 - DD imagerel stbi__zhuffman_decode+205 - DD imagerel $chain$1$stbi__zhuffman_decode -pdata ENDS -; COMDAT pdata -pdata SEGMENT $pdata$stbi__zreceive DD imagerel stbi__zreceive DD imagerel stbi__zreceive+28 DD imagerel $unwind$stbi__zreceive @@ -1884,71 +1885,83 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_test DD imagerel stbi__jpeg_test - DD imagerel stbi__jpeg_test+274 + DD imagerel stbi__jpeg_test+247 DD imagerel $unwind$stbi__jpeg_test pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_load DD imagerel stbi__jpeg_load - DD imagerel stbi__jpeg_load+285 + DD imagerel stbi__jpeg_load+193 DD imagerel $unwind$stbi__jpeg_load pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$load_jpeg_image DD imagerel load_jpeg_image - DD imagerel load_jpeg_image+124 + DD imagerel load_jpeg_image+93 DD imagerel $unwind$load_jpeg_image pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$0$load_jpeg_image DD imagerel load_jpeg_image+124 - DD imagerel load_jpeg_image+252 - DD imagerel $chain$0$load_jpeg_image +$pdata$1$load_jpeg_image DD imagerel load_jpeg_image+93 + DD imagerel load_jpeg_image+334 + DD imagerel $chain$1$load_jpeg_image pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$4$load_jpeg_image DD imagerel load_jpeg_image+252 - DD imagerel load_jpeg_image+453 +$pdata$4$load_jpeg_image DD imagerel load_jpeg_image+334 + DD imagerel load_jpeg_image+540 DD imagerel $chain$4$load_jpeg_image pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$5$load_jpeg_image DD imagerel load_jpeg_image+453 - DD imagerel load_jpeg_image+481 +$pdata$5$load_jpeg_image DD imagerel load_jpeg_image+540 + DD imagerel load_jpeg_image+560 DD imagerel $chain$5$load_jpeg_image pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$6$load_jpeg_image DD imagerel load_jpeg_image+481 - DD imagerel load_jpeg_image+2115 +$pdata$6$load_jpeg_image DD imagerel load_jpeg_image+560 + DD imagerel load_jpeg_image+632 DD imagerel $chain$6$load_jpeg_image pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$7$load_jpeg_image DD imagerel load_jpeg_image+2115 - DD imagerel load_jpeg_image+2123 +$pdata$7$load_jpeg_image DD imagerel load_jpeg_image+632 + DD imagerel load_jpeg_image+639 DD imagerel $chain$7$load_jpeg_image pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$8$load_jpeg_image DD imagerel load_jpeg_image+2123 - DD imagerel load_jpeg_image+2152 +$pdata$8$load_jpeg_image DD imagerel load_jpeg_image+639 + DD imagerel load_jpeg_image+2456 DD imagerel $chain$8$load_jpeg_image pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$9$load_jpeg_image DD imagerel load_jpeg_image+2152 - DD imagerel load_jpeg_image+2208 +$pdata$9$load_jpeg_image DD imagerel load_jpeg_image+2456 + DD imagerel load_jpeg_image+2472 DD imagerel $chain$9$load_jpeg_image pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$10$load_jpeg_image DD imagerel load_jpeg_image+2208 - DD imagerel load_jpeg_image+2247 +$pdata$10$load_jpeg_image DD imagerel load_jpeg_image+2472 + DD imagerel load_jpeg_image+2501 DD imagerel $chain$10$load_jpeg_image pdata ENDS ; COMDAT pdata pdata SEGMENT +$pdata$11$load_jpeg_image DD imagerel load_jpeg_image+2501 + DD imagerel load_jpeg_image+2642 + DD imagerel $chain$11$load_jpeg_image +pdata ENDS +; COMDAT pdata +pdata SEGMENT +$pdata$12$load_jpeg_image DD imagerel load_jpeg_image+2642 + DD imagerel load_jpeg_image+2684 + DD imagerel $chain$12$load_jpeg_image +pdata ENDS +; COMDAT pdata +pdata SEGMENT $pdata$stbi__setup_jpeg DD imagerel stbi__setup_jpeg DD imagerel stbi__setup_jpeg+114 DD imagerel $unwind$stbi__setup_jpeg @@ -2076,11 +2089,29 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__decode_jpeg_header DD imagerel stbi__decode_jpeg_header - DD imagerel stbi__decode_jpeg_header+896 + DD imagerel stbi__decode_jpeg_header+119 DD imagerel $unwind$stbi__decode_jpeg_header pdata ENDS ; COMDAT pdata pdata SEGMENT +$pdata$0$stbi__decode_jpeg_header DD imagerel stbi__decode_jpeg_header+119 + DD imagerel stbi__decode_jpeg_header+614 + DD imagerel $chain$0$stbi__decode_jpeg_header +pdata ENDS +; COMDAT pdata +pdata SEGMENT +$pdata$2$stbi__decode_jpeg_header DD imagerel stbi__decode_jpeg_header+614 + DD imagerel stbi__decode_jpeg_header+653 + DD imagerel $chain$2$stbi__decode_jpeg_header +pdata ENDS +; COMDAT pdata +pdata SEGMENT +$pdata$3$stbi__decode_jpeg_header DD imagerel stbi__decode_jpeg_header+653 + DD imagerel stbi__decode_jpeg_header+674 + DD imagerel $chain$3$stbi__decode_jpeg_header +pdata ENDS +; COMDAT pdata +pdata SEGMENT $pdata$stbi__process_frame_header DD imagerel stbi__process_frame_header DD imagerel stbi__process_frame_header+437 DD imagerel $unwind$stbi__process_frame_header @@ -2238,31 +2269,43 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__jpeg_decode_block_prog_dc DD imagerel stbi__jpeg_decode_block_prog_dc - DD imagerel stbi__jpeg_decode_block_prog_dc+891 + DD imagerel stbi__jpeg_decode_block_prog_dc+104 DD imagerel $unwind$stbi__jpeg_decode_block_prog_dc pdata ENDS ; COMDAT pdata pdata SEGMENT +$pdata$0$stbi__jpeg_decode_block_prog_dc DD imagerel stbi__jpeg_decode_block_prog_dc+104 + DD imagerel stbi__jpeg_decode_block_prog_dc+761 + DD imagerel $chain$0$stbi__jpeg_decode_block_prog_dc +pdata ENDS +; COMDAT pdata +pdata SEGMENT +$pdata$1$stbi__jpeg_decode_block_prog_dc DD imagerel stbi__jpeg_decode_block_prog_dc+761 + DD imagerel stbi__jpeg_decode_block_prog_dc+782 + DD imagerel $chain$1$stbi__jpeg_decode_block_prog_dc +pdata ENDS +; COMDAT pdata +pdata SEGMENT $pdata$stbi__jpeg_decode_block DD imagerel stbi__jpeg_decode_block - DD imagerel stbi__jpeg_decode_block+617 + DD imagerel stbi__jpeg_decode_block+621 DD imagerel $unwind$stbi__jpeg_decode_block pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$0$stbi__jpeg_decode_block DD imagerel stbi__jpeg_decode_block+617 - DD imagerel stbi__jpeg_decode_block+790 +$pdata$0$stbi__jpeg_decode_block DD imagerel stbi__jpeg_decode_block+621 + DD imagerel stbi__jpeg_decode_block+717 DD imagerel $chain$0$stbi__jpeg_decode_block pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$4$stbi__jpeg_decode_block DD imagerel stbi__jpeg_decode_block+790 - DD imagerel stbi__jpeg_decode_block+1389 +$pdata$4$stbi__jpeg_decode_block DD imagerel stbi__jpeg_decode_block+717 + DD imagerel stbi__jpeg_decode_block+1325 DD imagerel $chain$4$stbi__jpeg_decode_block pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$6$stbi__jpeg_decode_block DD imagerel stbi__jpeg_decode_block+1389 - DD imagerel stbi__jpeg_decode_block+1438 +$pdata$6$stbi__jpeg_decode_block DD imagerel stbi__jpeg_decode_block+1325 + DD imagerel stbi__jpeg_decode_block+1374 DD imagerel $chain$6$stbi__jpeg_decode_block pdata ENDS ; COMDAT pdata @@ -2454,31 +2497,19 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__get8 DD imagerel stbi__get8 - DD imagerel stbi__get8+62 + DD imagerel stbi__get8+89 DD imagerel $unwind$stbi__get8 pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$0$stbi__get8 DD imagerel stbi__get8+62 - DD imagerel stbi__get8+155 - DD imagerel $chain$0$stbi__get8 -pdata ENDS -; COMDAT pdata -pdata SEGMENT -$pdata$1$stbi__get8 DD imagerel stbi__get8+155 - DD imagerel stbi__get8+163 - DD imagerel $chain$1$stbi__get8 -pdata ENDS -; COMDAT pdata -pdata SEGMENT $pdata$stbi__refill_buffer DD imagerel stbi__refill_buffer DD imagerel stbi__refill_buffer+116 DD imagerel $unwind$stbi__refill_buffer pdata ENDS ; COMDAT pdata pdata SEGMENT -$pdata$stbi_load_from_file DD imagerel $LN9 - DD imagerel $LN9+157 +$pdata$stbi_load_from_file DD imagerel $LN17 + DD imagerel $LN17+288 DD imagerel $unwind$stbi_load_from_file pdata ENDS ; COMDAT pdata @@ -2526,11 +2557,17 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__load_main DD imagerel stbi__load_main - DD imagerel stbi__load_main+2002 + DD imagerel stbi__load_main+1884 DD imagerel $unwind$stbi__load_main pdata ENDS ; COMDAT pdata pdata SEGMENT +$pdata$stbi__start_file DD imagerel stbi__start_file + DD imagerel stbi__start_file+104 + DD imagerel $unwind$stbi__start_file +pdata ENDS +; COMDAT pdata +pdata SEGMENT $pdata$stbi__stdio_eof DD imagerel stbi__stdio_eof DD imagerel stbi__stdio_eof+49 DD imagerel $unwind$stbi__stdio_eof @@ -2544,7 +2581,7 @@ pdata ENDS ; COMDAT pdata pdata SEGMENT $pdata$stbi__start_callbacks DD imagerel stbi__start_callbacks - DD imagerel stbi__start_callbacks+200 + DD imagerel stbi__start_callbacks+104 DD imagerel $unwind$stbi__start_callbacks pdata ENDS ; COMDAT pdata @@ -2577,9 +2614,8 @@ $unwind$stbi__sse2_available DD 020601H xdata ENDS ; COMDAT xdata xdata SEGMENT -$unwind$stbi__start_callbacks DD 040a01H - DD 06340aH - DD 07006320aH +$unwind$stbi__start_callbacks DD 020601H + DD 030023206H xdata ENDS ; COMDAT xdata xdata SEGMENT @@ -2593,6 +2629,11 @@ $unwind$stbi__stdio_eof DD 020601H xdata ENDS ; COMDAT xdata xdata SEGMENT +$unwind$stbi__start_file DD 020601H + DD 030023206H +xdata ENDS +; COMDAT xdata +xdata SEGMENT $unwind$stbi__load_main DD 0a2619H DD 0150114H DD 0e00bf00dH @@ -2665,11 +2706,11 @@ $unwind$stbi_load DD 061a19H xdata ENDS ; COMDAT xdata xdata SEGMENT -$unwind$stbi_load_from_file DD 072019H - DD 024010eH - DD 07005e007H - DD 050036004H - DD 03002H +$unwind$stbi_load_from_file DD 082319H + DD 0250115H + DD 0e007f009H + DD 060047005H + DD 050023003H DD imagerel __GSHandlerCheck DD 0110H xdata ENDS @@ -2681,21 +2722,6 @@ $unwind$stbi__refill_buffer DD 040a01H xdata ENDS ; COMDAT xdata xdata SEGMENT -$chain$1$stbi__get8 DD 021H - DD imagerel stbi__get8 - DD imagerel stbi__get8+62 - DD imagerel $unwind$stbi__get8 -xdata ENDS -; COMDAT xdata -xdata SEGMENT -$chain$0$stbi__get8 DD 020521H - DD 067405H - DD imagerel stbi__get8 - DD imagerel stbi__get8+62 - DD imagerel $unwind$stbi__get8 -xdata ENDS -; COMDAT xdata -xdata SEGMENT $unwind$stbi__get8 DD 020601H DD 030023206H xdata ENDS @@ -2940,7 +2966,7 @@ $chain$6$stbi__jpeg_decode_block DD 060021H DD 0bc400H DD 0a6400H DD imagerel stbi__jpeg_decode_block - DD imagerel stbi__jpeg_decode_block+617 + DD imagerel stbi__jpeg_decode_block+621 DD imagerel $unwind$stbi__jpeg_decode_block xdata ENDS ; COMDAT xdata @@ -2950,7 +2976,7 @@ $chain$4$stbi__jpeg_decode_block DD 061b21H DD 0cd405H DD 0bc400H DD imagerel stbi__jpeg_decode_block - DD imagerel stbi__jpeg_decode_block+617 + DD imagerel stbi__jpeg_decode_block+621 DD imagerel $unwind$stbi__jpeg_decode_block xdata ENDS ; COMDAT xdata @@ -2958,7 +2984,7 @@ xdata SEGMENT $chain$0$stbi__jpeg_decode_block DD 020521H DD 0bc405H DD imagerel stbi__jpeg_decode_block - DD imagerel stbi__jpeg_decode_block+617 + DD imagerel stbi__jpeg_decode_block+621 DD imagerel $unwind$stbi__jpeg_decode_block xdata ENDS ; COMDAT xdata @@ -2970,12 +2996,26 @@ $unwind$stbi__jpeg_decode_block DD 060c01H xdata ENDS ; COMDAT xdata xdata SEGMENT -$unwind$stbi__jpeg_decode_block_prog_dc DD 0a7401H - DD 09f474H - DD 08546fH - DD 0a340dH - DD 0e009320dH - DD 060067007H +$chain$1$stbi__jpeg_decode_block_prog_dc DD 021H + DD imagerel stbi__jpeg_decode_block_prog_dc + DD imagerel stbi__jpeg_decode_block_prog_dc+104 + DD imagerel $unwind$stbi__jpeg_decode_block_prog_dc +xdata ENDS +; COMDAT xdata +xdata SEGMENT +$chain$0$stbi__jpeg_decode_block_prog_dc DD 020521H + DD 06e405H + DD imagerel stbi__jpeg_decode_block_prog_dc + DD imagerel stbi__jpeg_decode_block_prog_dc+104 + DD imagerel $unwind$stbi__jpeg_decode_block_prog_dc +xdata ENDS +; COMDAT xdata +xdata SEGMENT +$unwind$stbi__jpeg_decode_block_prog_dc DD 081401H + DD 096414H + DD 085414H + DD 073414H + DD 070103214H xdata ENDS ; COMDAT xdata xdata SEGMENT @@ -3206,11 +3246,33 @@ $unwind$stbi__process_frame_header DD 060e01H xdata ENDS ; COMDAT xdata xdata SEGMENT -$unwind$stbi__decode_jpeg_header DD 081401H - DD 086414H - DD 075414H - DD 063414H - DD 070103214H +$chain$3$stbi__decode_jpeg_header DD 021H + DD imagerel stbi__decode_jpeg_header + DD imagerel stbi__decode_jpeg_header+119 + DD imagerel $unwind$stbi__decode_jpeg_header +xdata ENDS +; COMDAT xdata +xdata SEGMENT +$chain$2$stbi__decode_jpeg_header DD 020021H + DD 063400H + DD imagerel stbi__decode_jpeg_header + DD imagerel stbi__decode_jpeg_header+119 + DD imagerel $unwind$stbi__decode_jpeg_header +xdata ENDS +; COMDAT xdata +xdata SEGMENT +$chain$0$stbi__decode_jpeg_header DD 020521H + DD 063405H + DD imagerel stbi__decode_jpeg_header + DD imagerel stbi__decode_jpeg_header+119 + DD imagerel $unwind$stbi__decode_jpeg_header +xdata ENDS +; COMDAT xdata +xdata SEGMENT +$unwind$stbi__decode_jpeg_header DD 060f01H + DD 08640fH + DD 07540fH + DD 0700b320fH xdata ENDS ; COMDAT xdata xdata SEGMENT @@ -3371,98 +3433,117 @@ $unwind$stbi__setup_jpeg DD 020601H xdata ENDS ; COMDAT xdata xdata SEGMENT -$chain$10$load_jpeg_image DD 021H +$chain$12$load_jpeg_image DD 021H DD imagerel load_jpeg_image - DD imagerel load_jpeg_image+124 + DD imagerel load_jpeg_image+93 DD imagerel $unwind$load_jpeg_image xdata ENDS ; COMDAT xdata xdata SEGMENT -$chain$9$load_jpeg_image DD 0a0021H +$chain$11$load_jpeg_image DD 0a0021H DD 02fe400H DD 030c400H DD 0317400H DD 0325400H DD 0333400H DD imagerel load_jpeg_image - DD imagerel load_jpeg_image+124 + DD imagerel load_jpeg_image+93 DD imagerel $unwind$load_jpeg_image xdata ENDS ; COMDAT xdata xdata SEGMENT -$chain$8$load_jpeg_image DD 021H +$chain$10$load_jpeg_image DD 021H DD imagerel load_jpeg_image - DD imagerel load_jpeg_image+124 + DD imagerel load_jpeg_image+93 DD imagerel $unwind$load_jpeg_image xdata ENDS ; COMDAT xdata xdata SEGMENT -$chain$7$load_jpeg_image DD 021H - DD imagerel load_jpeg_image+124 - DD imagerel load_jpeg_image+252 - DD imagerel $chain$0$load_jpeg_image +$chain$9$load_jpeg_image DD 040021H + DD 030c400H + DD 0333400H + DD imagerel load_jpeg_image + DD imagerel load_jpeg_image+93 + DD imagerel $unwind$load_jpeg_image xdata ENDS ; COMDAT xdata xdata SEGMENT -$chain$6$load_jpeg_image DD 080021H +$chain$8$load_jpeg_image DD 0a0021H DD 02fe400H + DD 030c400H DD 0317400H DD 0325400H DD 0333400H - DD imagerel load_jpeg_image+124 - DD imagerel load_jpeg_image+252 - DD imagerel $chain$0$load_jpeg_image + DD imagerel load_jpeg_image + DD imagerel load_jpeg_image+93 + DD imagerel $unwind$load_jpeg_image +xdata ENDS +; COMDAT xdata +xdata SEGMENT +$chain$7$load_jpeg_image DD 040021H + DD 030c400H + DD 0333400H + DD imagerel load_jpeg_image + DD imagerel load_jpeg_image+93 + DD imagerel $unwind$load_jpeg_image +xdata ENDS +; COMDAT xdata +xdata SEGMENT +$chain$6$load_jpeg_image DD 021H + DD imagerel load_jpeg_image + DD imagerel load_jpeg_image+93 + DD imagerel $unwind$load_jpeg_image xdata ENDS ; COMDAT xdata xdata SEGMENT $chain$5$load_jpeg_image DD 021H - DD imagerel load_jpeg_image+124 - DD imagerel load_jpeg_image+252 - DD imagerel $chain$0$load_jpeg_image + DD imagerel load_jpeg_image+93 + DD imagerel load_jpeg_image+334 + DD imagerel $chain$1$load_jpeg_image xdata ENDS ; COMDAT xdata xdata SEGMENT -$chain$4$load_jpeg_image DD 082621H - DD 02fe426H - DD 031741eH - DD 0325413H - DD 0333408H - DD imagerel load_jpeg_image+124 - DD imagerel load_jpeg_image+252 - DD imagerel $chain$0$load_jpeg_image +$chain$4$load_jpeg_image DD 061e21H + DD 02fe41eH + DD 0317413H + DD 0325408H + DD imagerel load_jpeg_image+93 + DD imagerel load_jpeg_image+334 + DD imagerel $chain$1$load_jpeg_image xdata ENDS ; COMDAT xdata xdata SEGMENT -$chain$0$load_jpeg_image DD 020821H +$chain$1$load_jpeg_image DD 040821H DD 030c408H + DD 0333404H DD imagerel load_jpeg_image - DD imagerel load_jpeg_image+124 + DD imagerel load_jpeg_image+93 DD imagerel $unwind$load_jpeg_image xdata ENDS ; COMDAT xdata xdata SEGMENT -$unwind$load_jpeg_image DD 051f19H - DD 034010dH - DD 0d004f006H - DD 06002H +$unwind$load_jpeg_image DD 052119H + DD 034010fH + DD 0d006f008H + DD 06004H DD imagerel __GSHandlerCheck DD 0160H xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$stbi__jpeg_load DD 0a1a01H - DD 0d741aH - DD 0c641aH - DD 0b541aH - DD 0a341aH - DD 0e016721aH + DD 0b741aH + DD 0a641aH + DD 09541aH + DD 08341aH + DD 0e016521aH xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$stbi__jpeg_test DD 065901H - DD 083459H - DD 09640aH - DD 07006520aH + DD 066459H + DD 07340aH + DD 07006320aH xdata ENDS ; COMDAT xdata xdata SEGMENT @@ -3526,23 +3607,8 @@ $unwind$stbi__zreceive DD 010201H xdata ENDS ; COMDAT xdata xdata SEGMENT -$chain$1$stbi__zhuffman_decode DD 021H - DD imagerel stbi__zhuffman_decode - DD imagerel stbi__zhuffman_decode+45 - DD imagerel $unwind$stbi__zhuffman_decode -xdata ENDS -; COMDAT xdata -xdata SEGMENT -$chain$0$stbi__zhuffman_decode DD 020521H - DD 063405H - DD imagerel stbi__zhuffman_decode - DD imagerel stbi__zhuffman_decode+45 - DD imagerel $unwind$stbi__zhuffman_decode -xdata ENDS -; COMDAT xdata -xdata SEGMENT -$unwind$stbi__zhuffman_decode DD 020601H - DD 070023206H +$unwind$stbi__zhuffman_decode DD 010401H + DD 04204H xdata ENDS ; COMDAT xdata xdata SEGMENT @@ -3569,12 +3635,12 @@ xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$stbi__parse_huffman_block DD 0c2b01H - DD 08e42bH - DD 0b6418H - DD 0a5418H - DD 093418H - DD 0f0143218H - DD 07010c012H + DD 09e42bH + DD 085423H + DD 0b6413H + DD 0a3413H + DD 0f00f3213H + DD 0700bc00dH xdata ENDS ; COMDAT xdata xdata SEGMENT @@ -3824,50 +3890,33 @@ $unwind$stbi__bmp_test DD 040a01H xdata ENDS ; COMDAT xdata xdata SEGMENT -$chain$6$stbi__bmp_parse_header DD 021H - DD imagerel stbi__bmp_parse_header - DD imagerel stbi__bmp_parse_header+130 - DD imagerel $unwind$stbi__bmp_parse_header -xdata ENDS -; COMDAT xdata -xdata SEGMENT -$chain$5$stbi__bmp_parse_header DD 060021H - DD 0af400H - DD 09e400H - DD 085400H - DD imagerel stbi__bmp_parse_header - DD imagerel stbi__bmp_parse_header+130 - DD imagerel $unwind$stbi__bmp_parse_header -xdata ENDS -; COMDAT xdata -xdata SEGMENT $chain$3$stbi__bmp_parse_header DD 021H - DD imagerel stbi__bmp_parse_header+130 - DD imagerel stbi__bmp_parse_header+447 - DD imagerel $chain$1$stbi__bmp_parse_header -xdata ENDS -; COMDAT xdata -xdata SEGMENT -$chain$2$stbi__bmp_parse_header DD 020521H - DD 09e405H - DD imagerel stbi__bmp_parse_header+130 - DD imagerel stbi__bmp_parse_header+447 - DD imagerel $chain$1$stbi__bmp_parse_header -xdata ENDS -; COMDAT xdata -xdata SEGMENT -$chain$1$stbi__bmp_parse_header DD 040d21H - DD 0af40dH - DD 085405H DD imagerel stbi__bmp_parse_header - DD imagerel stbi__bmp_parse_header+130 + DD imagerel stbi__bmp_parse_header+140 DD imagerel $unwind$stbi__bmp_parse_header xdata ENDS ; COMDAT xdata xdata SEGMENT -$unwind$stbi__bmp_parse_header DD 040801H - DD 070043208H - DD 030026003H +$chain$2$stbi__bmp_parse_header DD 020021H + DD 065400H + DD imagerel stbi__bmp_parse_header + DD imagerel stbi__bmp_parse_header+140 + DD imagerel $unwind$stbi__bmp_parse_header +xdata ENDS +; COMDAT xdata +xdata SEGMENT +$chain$0$stbi__bmp_parse_header DD 020521H + DD 065405H + DD imagerel stbi__bmp_parse_header + DD imagerel stbi__bmp_parse_header+140 + DD imagerel $unwind$stbi__bmp_parse_header +xdata ENDS +; COMDAT xdata +xdata SEGMENT +$unwind$stbi__bmp_parse_header DD 060f01H + DD 08640fH + DD 07340fH + DD 0700b320fH xdata ENDS ; COMDAT xdata xdata SEGMENT @@ -3909,12 +3958,13 @@ $unwind$stbi__tga_read_rgb16 DD 020601H xdata ENDS ; COMDAT xdata xdata SEGMENT -$unwind$stbi__tga_load DD 0a2619H - DD 0130114H - DD 0e00bf00dH - DD 0c007d009H - DD 060047005H - DD 030025003H +$unwind$stbi__tga_load DD 0b9719H + DD 0135497H + DD 0140113H + DD 0e00af00cH + DD 0c006d008H + DD 060037004H + DD 03002H DD imagerel __GSHandlerCheck DD 088H xdata ENDS @@ -3937,7 +3987,7 @@ xdata ENDS ; COMDAT xdata xdata SEGMENT $chain$11$stbi__psd_load DD 020021H - DD 0e6400H + DD 0ad400H DD imagerel stbi__psd_load DD imagerel stbi__psd_load+157 DD imagerel $unwind$stbi__psd_load @@ -3945,9 +3995,9 @@ xdata ENDS ; COMDAT xdata xdata SEGMENT $chain$10$stbi__psd_load DD 060021H - DD 0af400H - DD 0be400H - DD 0e6400H + DD 08f400H + DD 09e400H + DD 0ad400H DD imagerel stbi__psd_load DD imagerel stbi__psd_load+157 DD imagerel $unwind$stbi__psd_load @@ -3955,12 +4005,12 @@ xdata ENDS ; COMDAT xdata xdata SEGMENT $chain$9$stbi__psd_load DD 0c0021H - DD 0af400H - DD 0be400H - DD 0cd400H - DD 0dc400H - DD 0e6400H - DD 0125400H + DD 08f400H + DD 09e400H + DD 0ad400H + DD 0bc400H + DD 0c6400H + DD 0105400H DD imagerel stbi__psd_load DD imagerel stbi__psd_load+157 DD imagerel $unwind$stbi__psd_load @@ -3969,39 +4019,39 @@ xdata ENDS xdata SEGMENT $chain$7$stbi__psd_load DD 021H DD imagerel stbi__psd_load+157 - DD imagerel stbi__psd_load+924 + DD imagerel stbi__psd_load+654 DD imagerel $chain$2$stbi__psd_load xdata ENDS ; COMDAT xdata xdata SEGMENT $chain$6$stbi__psd_load DD 021H - DD imagerel stbi__psd_load+924 - DD imagerel stbi__psd_load+1015 + DD imagerel stbi__psd_load+654 + DD imagerel stbi__psd_load+745 DD imagerel $chain$4$stbi__psd_load xdata ENDS ; COMDAT xdata xdata SEGMENT $chain$5$stbi__psd_load DD 020521H - DD 0cd405H - DD imagerel stbi__psd_load+924 - DD imagerel stbi__psd_load+1015 + DD 0c6405H + DD imagerel stbi__psd_load+654 + DD imagerel stbi__psd_load+745 DD imagerel $chain$4$stbi__psd_load xdata ENDS ; COMDAT xdata xdata SEGMENT $chain$4$stbi__psd_load DD 041421H - DD 0dc414H - DD 0125408H + DD 0bc414H + DD 0105408H DD imagerel stbi__psd_load+157 - DD imagerel stbi__psd_load+924 + DD imagerel stbi__psd_load+654 DD imagerel $chain$2$stbi__psd_load xdata ENDS ; COMDAT xdata xdata SEGMENT -$chain$2$stbi__psd_load DD 066521H - DD 0af465H - DD 0be45dH - DD 0e6405H +$chain$2$stbi__psd_load DD 065f21H + DD 08f45fH + DD 09e457H + DD 0ad405H DD imagerel stbi__psd_load DD imagerel stbi__psd_load+157 DD imagerel $unwind$stbi__psd_load @@ -4009,7 +4059,7 @@ xdata ENDS ; COMDAT xdata xdata SEGMENT $unwind$stbi__psd_load DD 031501H - DD 07011e215H + DD 07011c215H DD 03010H xdata ENDS ; COMDAT xdata @@ -4262,14 +4312,44 @@ $unwind$stbi__hdr_convert DD 060f01H xdata ENDS ; COMDAT xdata xdata SEGMENT -$unwind$stbi__hdr_load DD 0a2d19H - DD 08f011cH - DD 0e00bf00dH - DD 0c007d009H - DD 060047005H - DD 050023003H +$chain$3$stbi__hdr_load DD 021H + DD imagerel stbi__hdr_load + DD imagerel stbi__hdr_load+436 + DD imagerel $unwind$stbi__hdr_load +xdata ENDS +; COMDAT xdata +xdata SEGMENT +$chain$2$stbi__hdr_load DD 020021H + DD 08dd400H + DD imagerel stbi__hdr_load + DD imagerel stbi__hdr_load+436 + DD imagerel $unwind$stbi__hdr_load +xdata ENDS +; COMDAT xdata +xdata SEGMENT +$chain$1$stbi__hdr_load DD 021H + DD imagerel stbi__hdr_load + DD imagerel stbi__hdr_load+436 + DD imagerel $unwind$stbi__hdr_load +xdata ENDS +; COMDAT xdata +xdata SEGMENT +$chain$0$stbi__hdr_load DD 020821H + DD 08dd408H + DD imagerel stbi__hdr_load + DD imagerel stbi__hdr_load+436 + DD imagerel $unwind$stbi__hdr_load +xdata ENDS +; COMDAT xdata +xdata SEGMENT +$unwind$stbi__hdr_load DD 092419H + DD 08e0112H + DD 0e009f00bH + DD 07005c007H + DD 050036004H + DD 03002H DD imagerel __GSHandlerCheck - DD 0460H + DD 0450H xdata ENDS ; COMDAT xdata xdata SEGMENT @@ -4317,225 +4397,103 @@ $unwind$stbi__pnm_info DD 071c19H DD imagerel __GSHandlerCheck DD 028H ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__cpuid3 _TEXT SEGMENT stbi__cpuid3 PROC ; COMDAT - -; 185 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 185 00000 40 53 push rbx 00002 48 83 ec 10 sub rsp, 16 - -; 186 : int info[4]; -; 187 : __cpuid(info, 1); - +; Line 187 00006 b8 01 00 00 00 mov eax, 1 0000b 33 c9 xor ecx, ecx 0000d 0f a2 cpuid - -; 188 : return info[3]; - +; Line 188 0000f 8b c2 mov eax, edx - -; 189 : } - +; Line 189 00011 48 83 c4 10 add rsp, 16 00015 5b pop rbx 00016 c3 ret 0 stbi__cpuid3 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__sse2_available _TEXT SEGMENT stbi__sse2_available PROC ; COMDAT - -; 207 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 207 00000 40 53 push rbx 00002 48 83 ec 10 sub rsp, 16 - -; 187 : __cpuid(info, 1); - +; Line 187 00006 33 c9 xor ecx, ecx 00008 b8 01 00 00 00 mov eax, 1 0000d 0f a2 cpuid - -; 208 : int info3 = stbi__cpuid3(); -; 209 : return ((info3 >> 26) & 1) != 0; - +; Line 209 0000f c1 fa 1a sar edx, 26 00012 83 e2 01 and edx, 1 00015 8b c2 mov eax, edx - -; 210 : } - +; Line 210 00017 48 83 c4 10 add rsp, 16 0001b 5b pop rbx 0001c c3 ret 0 stbi__sse2_available ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__start_callbacks _TEXT SEGMENT s$ = 48 c$dead$ = 56 user$ = 64 stbi__start_callbacks PROC ; COMDAT - -; 288 : { - - 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx - 00005 57 push rdi - 00006 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 289 : s->io = *c; - - 0000a 0f 10 05 00 00 +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 288 + 00000 40 53 push rbx + 00002 48 83 ec 20 sub rsp, 32 ; 00000020H +; Line 289 + 00006 0f 10 05 00 00 00 00 movups xmm0, XMMWORD PTR stbi__stdio_callbacks - -; 294 : s->img_buffer = s->img_buffer_original = s->buffer_start; - - 00011 48 8d 79 38 lea rdi, QWORD PTR [rcx+56] - 00015 49 8b c0 mov rax, r8 - 00018 48 8b d9 mov rbx, rcx - -; 1059 : int n = (s->io.read)(s->io_user_data, (char*)s->buffer_start, s->buflen); - - 0001b 41 b8 80 00 00 - 00 mov r8d, 128 ; 00000080H - -; 289 : s->io = *c; - - 00021 0f 11 41 10 movups XMMWORD PTR [rcx+16], xmm0 - -; 1059 : int n = (s->io.read)(s->io_user_data, (char*)s->buffer_start, s->buflen); - - 00025 48 8b d7 mov rdx, rdi - -; 289 : s->io = *c; - - 00028 f2 0f 10 05 10 +; Line 294 + 0000d 48 8d 41 38 lea rax, QWORD PTR [rcx+56] + 00011 48 8b d9 mov rbx, rcx + 00014 0f 11 41 10 movups XMMWORD PTR [rcx+16], xmm0 + 00018 f2 0f 10 05 10 00 00 00 movsd xmm0, QWORD PTR stbi__stdio_callbacks+16 - 00030 f2 0f 11 41 20 movsd QWORD PTR [rcx+32], xmm0 - -; 290 : s->io_user_data = user; - - 00035 48 89 41 28 mov QWORD PTR [rcx+40], rax - -; 291 : s->buflen = sizeof(s->buffer_start); - - 00039 c7 41 34 80 00 + 00020 f2 0f 11 41 20 movsd QWORD PTR [rcx+32], xmm0 + 00025 4c 89 41 28 mov QWORD PTR [rcx+40], r8 + 00029 c7 41 34 80 00 00 00 mov DWORD PTR [rcx+52], 128 ; 00000080H - -; 292 : s->read_from_callbacks = 1; - - 00040 c7 41 30 01 00 + 00030 c7 41 30 01 00 00 00 mov DWORD PTR [rcx+48], 1 - -; 293 : s->callback_already_read = 0; - - 00047 c7 81 b8 00 00 + 00037 c7 81 b8 00 00 00 00 00 00 00 mov DWORD PTR [rcx+184], 0 - -; 294 : s->img_buffer = s->img_buffer_original = s->buffer_start; - - 00051 48 89 b9 d0 00 - 00 00 mov QWORD PTR [rcx+208], rdi - 00058 48 89 b9 c0 00 - 00 00 mov QWORD PTR [rcx+192], rdi - -; 1059 : int n = (s->io.read)(s->io_user_data, (char*)s->buffer_start, s->buflen); - - 0005f 48 8b c8 mov rcx, rax - 00062 ff 53 10 call QWORD PTR [rbx+16] - -; 1060 : s->callback_already_read += (int)(s->img_buffer - s->img_buffer_original); - - 00065 8b 8b c0 00 00 - 00 mov ecx, DWORD PTR [rbx+192] - 0006b 2b 8b d0 00 00 - 00 sub ecx, DWORD PTR [rbx+208] - 00071 01 8b b8 00 00 - 00 add DWORD PTR [rbx+184], ecx - 00077 48 89 bb c0 00 - 00 00 mov QWORD PTR [rbx+192], rdi - -; 1061 : if (n == 0) { - - 0007e 85 c0 test eax, eax - 00080 75 23 jne SHORT $LN4@stbi__star - -; 1062 : // at end of file, treat same as if from memory, but need to handle case -; 1063 : // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file -; 1064 : s->read_from_callbacks = 0; - - 00082 89 43 30 mov DWORD PTR [rbx+48], eax - -; 1065 : s->img_buffer = s->buffer_start; -; 1066 : s->img_buffer_end = s->buffer_start + 1; - - 00085 48 8d 43 39 lea rax, QWORD PTR [rbx+57] - 00089 48 89 83 c8 00 - 00 00 mov QWORD PTR [rbx+200], rax - -; 1067 : *s->img_buffer = 0; - - 00090 c6 07 00 mov BYTE PTR [rdi], 0 - -; 295 : stbi__refill_buffer(s); -; 296 : s->img_buffer_original_end = s->img_buffer_end; - - 00093 48 89 83 d8 00 + 00041 48 89 81 d0 00 + 00 00 mov QWORD PTR [rcx+208], rax + 00048 48 89 81 c0 00 + 00 00 mov QWORD PTR [rcx+192], rax +; Line 295 + 0004f e8 00 00 00 00 call stbi__refill_buffer +; Line 296 + 00054 48 8b 83 c8 00 + 00 00 mov rax, QWORD PTR [rbx+200] + 0005b 48 89 83 d8 00 00 00 mov QWORD PTR [rbx+216], rax - -; 297 : } - - 0009a 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] - 0009f 48 83 c4 20 add rsp, 32 ; 00000020H - 000a3 5f pop rdi - 000a4 c3 ret 0 -$LN4@stbi__star: - -; 1071 : s->img_buffer_end = s->buffer_start + n; - - 000a5 48 63 c8 movsxd rcx, eax - 000a8 48 83 c1 38 add rcx, 56 ; 00000038H - 000ac 48 03 cb add rcx, rbx - 000af 48 89 8b c8 00 - 00 00 mov QWORD PTR [rbx+200], rcx - -; 295 : stbi__refill_buffer(s); -; 296 : s->img_buffer_original_end = s->img_buffer_end; - - 000b6 48 89 8b d8 00 - 00 00 mov QWORD PTR [rbx+216], rcx - -; 297 : } - - 000bd 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] - 000c2 48 83 c4 20 add rsp, 32 ; 00000020H - 000c6 5f pop rdi - 000c7 c3 ret 0 +; Line 297 + 00062 48 83 c4 20 add rsp, 32 ; 00000020H + 00066 5b pop rbx + 00067 c3 ret 0 stbi__start_callbacks ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__stdio_read _TEXT SEGMENT user$ = 8 data$ = 16 size$ = 24 stbi__stdio_read PROC ; COMDAT - -; 302 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 302 00000 48 8b c2 mov rax, rdx - -; 303 : return (int)fread(data, 1, size, (FILE*)user); - +; Line 303 00003 4d 63 c0 movsxd r8, r8d 00006 4c 8b c9 mov r9, rcx 00009 ba 01 00 00 00 mov edx, 1 @@ -4545,78 +4503,55 @@ stbi__stdio_read PROC ; COMDAT stbi__stdio_read ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__stdio_skip _TEXT SEGMENT user$ = 48 n$ = 56 stbi__stdio_skip PROC ; COMDAT - -; 307 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 307 00000 40 53 push rbx 00002 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 308 : int ch; -; 309 : fseek((FILE*)user, n, SEEK_CUR); - +; Line 309 00006 41 b8 01 00 00 00 mov r8d, 1 0000c 48 8b d9 mov rbx, rcx 0000f ff 15 00 00 00 00 call QWORD PTR __imp_fseek - -; 310 : ch = fgetc((FILE*)user); /* have to read a byte to reset feof()'s flag */ - +; Line 310 00015 48 8b cb mov rcx, rbx 00018 ff 15 00 00 00 00 call QWORD PTR __imp_fgetc - -; 311 : if (ch != EOF) { - +; Line 311 0001e 83 f8 ff cmp eax, -1 00021 74 11 je SHORT $LN2@stbi__stdi - -; 312 : ungetc(ch, (FILE*)user); /* push byte back onto stream if valid. */ - +; Line 312 00023 48 8b d3 mov rdx, rbx 00026 8b c8 mov ecx, eax - -; 313 : } -; 314 : } - +; Line 314 00028 48 83 c4 20 add rsp, 32 ; 00000020H 0002c 5b pop rbx - -; 312 : ungetc(ch, (FILE*)user); /* push byte back onto stream if valid. */ - +; Line 312 0002d 48 ff 25 00 00 00 00 rex_jmp QWORD PTR __imp_ungetc $LN2@stbi__stdi: - -; 313 : } -; 314 : } - +; Line 314 00034 48 83 c4 20 add rsp, 32 ; 00000020H 00038 5b pop rbx 00039 c3 ret 0 stbi__stdio_skip ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__stdio_eof _TEXT SEGMENT user$ = 48 stbi__stdio_eof PROC ; COMDAT - -; 317 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 317 00000 40 53 push rbx 00002 48 83 ec 20 sub rsp, 32 ; 00000020H 00006 48 8b d9 mov rbx, rcx - -; 318 : return feof((FILE*)user) || ferror((FILE*)user); - +; Line 318 00009 ff 15 00 00 00 00 call QWORD PTR __imp_feof 0000f 85 c0 test eax, eax @@ -4626,77 +4561,97 @@ stbi__stdio_eof PROC ; COMDAT 00 call QWORD PTR __imp_ferror 0001c 85 c0 test eax, eax 0001e 75 06 jne SHORT $LN3@stbi__stdi - -; 319 : } - +; Line 319 00020 48 83 c4 20 add rsp, 32 ; 00000020H 00024 5b pop rbx 00025 c3 ret 0 $LN3@stbi__stdi: - -; 318 : return feof((FILE*)user) || ferror((FILE*)user); - +; Line 318 00026 b8 01 00 00 00 mov eax, 1 - -; 319 : } - +; Line 319 0002b 48 83 c4 20 add rsp, 32 ; 00000020H 0002f 5b pop rbx 00030 c3 ret 0 stbi__stdio_eof ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__start_file _TEXT SEGMENT -s$ = 8 -f$ = 16 +s$ = 48 +f$ = 56 stbi__start_file PROC ; COMDAT - -; 330 : stbi__start_callbacks(s, &stbi__stdio_callbacks, (void*)f); - - 00000 4c 8b c2 mov r8, rdx - 00003 e9 00 00 00 00 jmp stbi__start_callbacks +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 329 + 00000 40 53 push rbx + 00002 48 83 ec 20 sub rsp, 32 ; 00000020H +; Line 289 + 00006 0f 10 05 00 00 + 00 00 movups xmm0, XMMWORD PTR stbi__stdio_callbacks +; Line 294 + 0000d 48 8d 41 38 lea rax, QWORD PTR [rcx+56] +; Line 329 + 00011 48 8b d9 mov rbx, rcx +; Line 289 + 00014 0f 11 41 10 movups XMMWORD PTR [rcx+16], xmm0 + 00018 f2 0f 10 05 10 + 00 00 00 movsd xmm0, QWORD PTR stbi__stdio_callbacks+16 + 00020 f2 0f 11 41 20 movsd QWORD PTR [rcx+32], xmm0 +; Line 290 + 00025 48 89 51 28 mov QWORD PTR [rcx+40], rdx +; Line 291 + 00029 c7 41 34 80 00 + 00 00 mov DWORD PTR [rcx+52], 128 ; 00000080H +; Line 292 + 00030 c7 41 30 01 00 + 00 00 mov DWORD PTR [rcx+48], 1 +; Line 293 + 00037 c7 81 b8 00 00 + 00 00 00 00 00 mov DWORD PTR [rcx+184], 0 +; Line 294 + 00041 48 89 81 d0 00 + 00 00 mov QWORD PTR [rcx+208], rax + 00048 48 89 81 c0 00 + 00 00 mov QWORD PTR [rcx+192], rax +; Line 295 + 0004f e8 00 00 00 00 call stbi__refill_buffer +; Line 296 + 00054 48 8b 83 c8 00 + 00 00 mov rax, QWORD PTR [rbx+200] + 0005b 48 89 83 d8 00 + 00 00 mov QWORD PTR [rbx+216], rax +; Line 331 + 00062 48 83 c4 20 add rsp, 32 ; 00000020H + 00066 5b pop rbx + 00067 c3 ret 0 stbi__start_file ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__rewind _TEXT SEGMENT s$ = 8 stbi__rewind PROC ; COMDAT - -; 339 : // conceptually rewind SHOULD rewind to the beginning of the stream, -; 340 : // but we just rewind to the beginning of the initial buffer, because -; 341 : // we only use it after doing 'test', which only ever looks at at most 92 bytes -; 342 : s->img_buffer = s->img_buffer_original; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 342 00000 48 8b 81 d0 00 00 00 mov rax, QWORD PTR [rcx+208] 00007 48 89 81 c0 00 00 00 mov QWORD PTR [rcx+192], rax - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 0000e 48 8b 81 d8 00 00 00 mov rax, QWORD PTR [rcx+216] 00015 48 89 81 c8 00 00 00 mov QWORD PTR [rcx+200], rax - -; 344 : } - +; Line 344 0001c c3 ret 0 stbi__rewind ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__err _TEXT SEGMENT str$ = 8 stbi__err PROC ; COMDAT - -; 431 : stbi__g_failure_reason = str; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 431 00000 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00006 65 48 8b 04 25 @@ -4705,94 +4660,67 @@ stbi__err PROC ; COMDAT 00 mov r8d, OFFSET FLAT:stbi__g_failure_reason 00015 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00019 49 89 0c 00 mov QWORD PTR [r8+rax], rcx - -; 432 : return 0; - +; Line 432 0001d 33 c0 xor eax, eax - -; 433 : } - +; Line 433 0001f c3 ret 0 stbi__err ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__malloc _TEXT SEGMENT size$ = 8 stbi__malloc PROC ; COMDAT - -; 438 : return STBI_MALLOC(size); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 438 00000 48 ff 25 00 00 00 00 rex_jmp QWORD PTR __imp_malloc stbi__malloc ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__addsizes_valid _TEXT SEGMENT a$ = 8 b$ = 16 stbi__addsizes_valid PROC ; COMDAT - -; 455 : if (b < 0) return 0; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 455 00000 33 c0 xor eax, eax 00002 44 8b c1 mov r8d, ecx 00005 85 d2 test edx, edx 00007 78 0d js SHORT $LN1@stbi__adds - -; 456 : // now 0 <= b <= INT_MAX, hence also -; 457 : // 0 <= INT_MAX - b <= INTMAX. -; 458 : // And "a + b <= INT_MAX" (which might overflow) is the -; 459 : // same as a <= INT_MAX - b (no overflow) -; 460 : return a <= INT_MAX - b; - +; Line 460 00009 b9 ff ff ff 7f mov ecx, 2147483647 ; 7fffffffH 0000e 2b ca sub ecx, edx 00010 44 3b c1 cmp r8d, ecx 00013 0f 9e c0 setle al $LN1@stbi__adds: - -; 461 : } - +; Line 461 00016 c3 ret 0 stbi__addsizes_valid ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__mul2sizes_valid _TEXT SEGMENT a$ = 8 b$ = 16 stbi__mul2sizes_valid PROC ; COMDAT - -; 466 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 466 00000 44 8b c2 mov r8d, edx 00003 44 8b c9 mov r9d, ecx - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00006 85 c9 test ecx, ecx 00008 78 21 js SHORT $LN3@stbi__mul2 0000a 85 d2 test edx, edx 0000c 78 1d js SHORT $LN3@stbi__mul2 - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0000e 75 06 jne SHORT $LN4@stbi__mul2 00010 b8 01 00 00 00 mov eax, 1 - -; 471 : } - +; Line 471 00015 c3 ret 0 $LN4@stbi__mul2: - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 00016 33 d2 xor edx, edx 00018 33 c9 xor ecx, ecx 0001a b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH @@ -4800,95 +4728,63 @@ $LN4@stbi__mul2: 00022 44 3b c8 cmp r9d, eax 00025 0f 9e c1 setle cl 00028 8b c1 mov eax, ecx - -; 471 : } - +; Line 471 0002a c3 ret 0 $LN3@stbi__mul2: - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 0002b 33 c0 xor eax, eax - -; 471 : } - +; Line 471 0002d c3 ret 0 stbi__mul2sizes_valid ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__mad2sizes_valid _TEXT SEGMENT a$ = 8 b$ = 16 add$ = 24 stbi__mad2sizes_valid PROC ; COMDAT - -; 476 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 476 00000 44 8b d2 mov r10d, edx - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00003 85 c9 test ecx, ecx 00005 78 2f js SHORT $LN3@stbi__mad2 00007 85 d2 test edx, edx 00009 78 2b js SHORT $LN3@stbi__mad2 - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0000b 41 b9 ff ff ff 7f mov r9d, 2147483647 ; 7fffffffH 00011 74 0c je SHORT $LN13@stbi__mad2 - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 00013 33 d2 xor edx, edx 00015 41 8b c1 mov eax, r9d 00018 41 f7 f2 div r10d - -; 477 : return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add); - +; Line 477 0001b 3b c8 cmp ecx, eax 0001d 7f 17 jg SHORT $LN3@stbi__mad2 $LN13@stbi__mad2: - -; 455 : if (b < 0) return 0; - +; Line 455 0001f 45 85 c0 test r8d, r8d 00022 78 12 js SHORT $LN3@stbi__mad2 - -; 477 : return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add); - +; Line 477 00024 41 0f af ca imul ecx, r10d - -; 460 : return a <= INT_MAX - b; - +; Line 460 00028 45 2b c8 sub r9d, r8d - -; 477 : return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add); - +; Line 477 0002b 41 3b c9 cmp ecx, r9d 0002e 7f 06 jg SHORT $LN3@stbi__mad2 00030 b8 01 00 00 00 mov eax, 1 - -; 478 : } - +; Line 478 00035 c3 ret 0 $LN3@stbi__mad2: - -; 477 : return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add); - +; Line 477 00036 33 c0 xor eax, eax - -; 478 : } - +; Line 478 00038 c3 ret 0 stbi__mad2sizes_valid ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__mad3sizes_valid _TEXT SEGMENT a$ = 8 @@ -4896,99 +4792,63 @@ b$ = 16 c$ = 24 add$ = 32 stbi__mad3sizes_valid PROC ; COMDAT - -; 483 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 483 00000 44 8b da mov r11d, edx - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00003 85 c9 test ecx, ecx 00005 78 4a js SHORT $LN3@stbi__mad3 00007 85 d2 test edx, edx 00009 78 46 js SHORT $LN3@stbi__mad3 - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0000b 41 ba ff ff ff 7f mov r10d, 2147483647 ; 7fffffffH 00011 74 0c je SHORT $LN19@stbi__mad3 - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 00013 33 d2 xor edx, edx 00015 41 8b c2 mov eax, r10d 00018 41 f7 f3 div r11d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 0001b 3b c8 cmp ecx, eax 0001d 7f 32 jg SHORT $LN3@stbi__mad3 $LN19@stbi__mad3: 0001f 41 0f af cb imul ecx, r11d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00023 85 c9 test ecx, ecx 00025 78 2a js SHORT $LN3@stbi__mad3 00027 45 85 c0 test r8d, r8d 0002a 78 25 js SHORT $LN3@stbi__mad3 - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0002c 74 0c je SHORT $LN18@stbi__mad3 - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 0002e 33 d2 xor edx, edx 00030 41 8b c2 mov eax, r10d 00033 41 f7 f0 div r8d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00036 3b c8 cmp ecx, eax 00038 7f 17 jg SHORT $LN3@stbi__mad3 $LN18@stbi__mad3: - -; 455 : if (b < 0) return 0; - +; Line 455 0003a 45 85 c9 test r9d, r9d 0003d 78 12 js SHORT $LN3@stbi__mad3 - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 0003f 41 0f af c8 imul ecx, r8d - -; 460 : return a <= INT_MAX - b; - +; Line 460 00043 45 2b d1 sub r10d, r9d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00046 41 3b ca cmp ecx, r10d 00049 7f 06 jg SHORT $LN3@stbi__mad3 0004b b8 01 00 00 00 mov eax, 1 - -; 485 : stbi__addsizes_valid(a * b * c, add); -; 486 : } - +; Line 486 00050 c3 ret 0 $LN3@stbi__mad3: - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00051 33 c0 xor eax, eax - -; 485 : stbi__addsizes_valid(a * b * c, add); -; 486 : } - +; Line 486 00053 c3 ret 0 stbi__mad3sizes_valid ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__mad4sizes_valid _TEXT SEGMENT a$ = 8 @@ -4997,125 +4857,83 @@ c$ = 24 d$ = 32 add$dead$ = 40 stbi__mad4sizes_valid PROC ; COMDAT - -; 491 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 491 00000 44 8b d2 mov r10d, edx - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00003 85 c9 test ecx, ecx 00005 78 54 js SHORT $LN3@stbi__mad4 00007 85 d2 test edx, edx 00009 78 50 js SHORT $LN3@stbi__mad4 - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0000b 74 0e je SHORT $LN25@stbi__mad4 - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 0000d 33 d2 xor edx, edx 0000f b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00014 41 f7 f2 div r10d - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 492 00017 3b c8 cmp ecx, eax 00019 7f 40 jg SHORT $LN3@stbi__mad4 $LN25@stbi__mad4: 0001b 41 0f af ca imul ecx, r10d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 0001f 85 c9 test ecx, ecx 00021 78 38 js SHORT $LN3@stbi__mad4 00023 45 85 c0 test r8d, r8d 00026 78 33 js SHORT $LN3@stbi__mad4 - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 00028 74 0e je SHORT $LN24@stbi__mad4 - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 0002a 33 d2 xor edx, edx 0002c b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00031 41 f7 f0 div r8d - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 492 00034 3b c8 cmp ecx, eax 00036 7f 23 jg SHORT $LN3@stbi__mad4 $LN24@stbi__mad4: 00038 41 0f af c8 imul ecx, r8d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 0003c 85 c9 test ecx, ecx 0003e 78 1b js SHORT $LN3@stbi__mad4 00040 45 85 c9 test r9d, r9d 00043 78 16 js SHORT $LN3@stbi__mad4 - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 00045 74 0e je SHORT $LN23@stbi__mad4 - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 00047 33 d2 xor edx, edx 00049 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 0004e 41 f7 f1 div r9d - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 492 00051 3b c8 cmp ecx, eax 00053 7f 06 jg SHORT $LN3@stbi__mad4 $LN23@stbi__mad4: 00055 b8 01 00 00 00 mov eax, 1 - -; 493 : stbi__mul2sizes_valid(a * b * c, d) && stbi__addsizes_valid(a * b * c * d, add); -; 494 : } - +; Line 494 0005a c3 ret 0 $LN3@stbi__mad4: - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 492 0005b 33 c0 xor eax, eax - -; 493 : stbi__mul2sizes_valid(a * b * c, d) && stbi__addsizes_valid(a * b * c * d, add); -; 494 : } - +; Line 494 0005d c3 ret 0 stbi__mad4sizes_valid ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__malloc_mad2 _TEXT SEGMENT a$ = 8 b$ = 16 add$ = 24 stbi__malloc_mad2 PROC ; COMDAT - -; 500 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 500 00000 44 8b ca mov r9d, edx 00003 44 8b d9 mov r11d, ecx - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00006 85 c9 test ecx, ecx 00008 78 44 js SHORT $LN19@stbi__mall 0000a 85 d2 test edx, edx 0000c 78 40 js SHORT $LN19@stbi__mall - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0000e 41 ba ff ff ff 7f mov r10d, 2147483647 ; 7fffffffH 00014 75 09 jne SHORT $LN11@stbi__mall @@ -5123,62 +4941,38 @@ stbi__malloc_mad2 PROC ; COMDAT 0001a 41 8b c9 mov ecx, r9d 0001d eb 14 jmp SHORT $LN20@stbi__mall $LN11@stbi__mall: - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 0001f 33 d2 xor edx, edx 00021 41 8b c2 mov eax, r10d 00024 41 f7 f1 div r9d - -; 477 : return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add); - +; Line 477 00027 41 8b c9 mov ecx, r9d 0002a 41 0f af cb imul ecx, r11d 0002e 44 3b d8 cmp r11d, eax 00031 7f 1b jg SHORT $LN19@stbi__mall $LN20@stbi__mall: - -; 455 : if (b < 0) return 0; - +; Line 455 00033 45 85 c0 test r8d, r8d 00036 78 16 js SHORT $LN19@stbi__mall - -; 456 : // now 0 <= b <= INT_MAX, hence also -; 457 : // 0 <= INT_MAX - b <= INTMAX. -; 458 : // And "a + b <= INT_MAX" (which might overflow) is the -; 459 : // same as a <= INT_MAX - b (no overflow) -; 460 : return a <= INT_MAX - b; - +; Line 460 00038 45 2b d0 sub r10d, r8d - -; 477 : return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add); - +; Line 477 0003b 41 3b ca cmp ecx, r10d 0003e 7f 0e jg SHORT $LN19@stbi__mall - -; 502 : return stbi__malloc(a * b + add); - +; Line 502 00040 42 8d 04 01 lea eax, DWORD PTR [rcx+r8] 00044 48 63 c8 movsxd rcx, eax - -; 438 : return STBI_MALLOC(size); - +; Line 438 00047 48 ff 25 00 00 00 00 rex_jmp QWORD PTR __imp_malloc $LN19@stbi__mall: - -; 501 : if (!stbi__mad2sizes_valid(a, b, add)) return NULL; - +; Line 501 0004e 33 c0 xor eax, eax - -; 503 : } - +; Line 503 00050 c3 ret 0 stbi__malloc_mad2 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__malloc_mad3 _TEXT SEGMENT a$ = 8 @@ -5186,104 +4980,68 @@ b$ = 16 c$ = 24 add$ = 32 stbi__malloc_mad3 PROC ; COMDAT - -; 507 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 507 00000 44 8b da mov r11d, edx - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00003 85 c9 test ecx, ecx 00005 78 57 js SHORT $LN23@stbi__mall 00007 85 d2 test edx, edx 00009 78 53 js SHORT $LN23@stbi__mall - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0000b 41 ba ff ff ff 7f mov r10d, 2147483647 ; 7fffffffH 00011 74 0c je SHORT $LN25@stbi__mall - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 00013 33 d2 xor edx, edx 00015 41 8b c2 mov eax, r10d 00018 41 f7 f3 div r11d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 0001b 3b c8 cmp ecx, eax 0001d 7f 3f jg SHORT $LN23@stbi__mall $LN25@stbi__mall: 0001f 41 0f af cb imul ecx, r11d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00023 85 c9 test ecx, ecx 00025 78 37 js SHORT $LN23@stbi__mall 00027 45 85 c0 test r8d, r8d 0002a 78 32 js SHORT $LN23@stbi__mall - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0002c 74 0c je SHORT $LN24@stbi__mall - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 0002e 33 d2 xor edx, edx 00030 41 8b c2 mov eax, r10d 00033 41 f7 f0 div r8d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00036 3b c8 cmp ecx, eax 00038 7f 24 jg SHORT $LN23@stbi__mall $LN24@stbi__mall: - -; 455 : if (b < 0) return 0; - +; Line 455 0003a 45 85 c9 test r9d, r9d 0003d 78 1f js SHORT $LN23@stbi__mall - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 0003f 8b c1 mov eax, ecx - -; 460 : return a <= INT_MAX - b; - +; Line 460 00041 45 2b d1 sub r10d, r9d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00044 41 0f af c0 imul eax, r8d 00048 41 3b c2 cmp eax, r10d 0004b 7f 11 jg SHORT $LN23@stbi__mall - -; 509 : return stbi__malloc(a * b * c + add); - +; Line 509 0004d 41 0f af c8 imul ecx, r8d 00051 41 03 c9 add ecx, r9d 00054 48 63 c9 movsxd rcx, ecx - -; 438 : return STBI_MALLOC(size); - +; Line 438 00057 48 ff 25 00 00 00 00 rex_jmp QWORD PTR __imp_malloc $LN23@stbi__mall: - -; 508 : if (!stbi__mad3sizes_valid(a, b, c, add)) return NULL; - +; Line 508 0005e 33 c0 xor eax, eax - -; 510 : } - +; Line 510 00060 c3 ret 0 stbi__malloc_mad3 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__malloc_mad4 _TEXT SEGMENT a$ = 8 @@ -5292,117 +5050,79 @@ c$ = 24 d$ = 32 add$dead$ = 40 stbi__malloc_mad4 PROC ; COMDAT - -; 514 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 514 00000 44 8b d2 mov r10d, edx - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00003 85 c9 test ecx, ecx 00005 78 65 js SHORT $LN28@stbi__mall 00007 85 d2 test edx, edx 00009 78 61 js SHORT $LN28@stbi__mall - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0000b 74 0e je SHORT $LN31@stbi__mall - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 0000d 33 d2 xor edx, edx 0000f b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00014 41 f7 f2 div r10d - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 492 00017 3b c8 cmp ecx, eax 00019 7f 51 jg SHORT $LN28@stbi__mall $LN31@stbi__mall: 0001b 41 0f af ca imul ecx, r10d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 0001f 85 c9 test ecx, ecx 00021 78 49 js SHORT $LN28@stbi__mall 00023 45 85 c0 test r8d, r8d 00026 78 44 js SHORT $LN28@stbi__mall - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 00028 74 0e je SHORT $LN30@stbi__mall - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 0002a 33 d2 xor edx, edx 0002c b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00031 41 f7 f0 div r8d - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 492 00034 3b c8 cmp ecx, eax 00036 7f 34 jg SHORT $LN28@stbi__mall $LN30@stbi__mall: 00038 44 8b d1 mov r10d, ecx 0003b 45 0f af d0 imul r10d, r8d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 0003f 45 85 d2 test r10d, r10d 00042 78 28 js SHORT $LN28@stbi__mall 00044 45 85 c9 test r9d, r9d 00047 78 23 js SHORT $LN28@stbi__mall - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 00049 74 0f je SHORT $LN2@stbi__mall - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 0004b 33 d2 xor edx, edx 0004d b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00052 41 f7 f1 div r9d - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 492 00055 44 3b d0 cmp r10d, eax 00058 7f 12 jg SHORT $LN28@stbi__mall $LN2@stbi__mall: - -; 516 : return stbi__malloc(a * b * c * d + add); - +; Line 516 0005a 41 0f af c8 imul ecx, r8d 0005e 41 0f af c9 imul ecx, r9d 00062 48 63 c9 movsxd rcx, ecx - -; 438 : return STBI_MALLOC(size); - +; Line 438 00065 48 ff 25 00 00 00 00 rex_jmp QWORD PTR __imp_malloc $LN28@stbi__mall: - -; 515 : if (!stbi__mad4sizes_valid(a, b, c, d, add)) return NULL; - +; Line 515 0006c 33 c0 xor eax, eax - -; 517 : } - +; Line 517 0006e c3 ret 0 stbi__malloc_mad4 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__addints_valid _TEXT SEGMENT a$ = 8 b$ = 16 stbi__addints_valid PROC ; COMDAT - -; 523 : if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 523 00000 44 8b c1 mov r8d, ecx 00003 8b c2 mov eax, edx 00005 41 f7 d0 not r8d @@ -5411,14 +5131,10 @@ stbi__addints_valid PROC ; COMDAT 0000d 44 8b c9 mov r9d, ecx 00010 79 06 jns SHORT $LN2@stbi__addi 00012 b8 01 00 00 00 mov eax, 1 - -; 526 : } - +; Line 526 00017 c3 ret 0 $LN2@stbi__addi: - -; 524 : if (a < 0 && b < 0) return a >= INT_MIN - b; // same as a + b >= INT_MIN; INT_MIN - b cannot overflow since b < 0. - +; Line 524 00018 45 85 c9 test r9d, r9d 0001b 79 16 jns SHORT $LN3@stbi__addi 0001d 85 d2 test edx, edx @@ -5428,47 +5144,35 @@ $LN2@stbi__addi: 00028 33 d2 xor edx, edx 0002a 44 3b c8 cmp r9d, eax 0002d 0f 9d c2 setge dl - -; 526 : } - +; Line 526 00030 8b c2 mov eax, edx 00032 c3 ret 0 $LN3@stbi__addi: - -; 525 : return a <= INT_MAX - b; - +; Line 525 00033 b9 ff ff ff 7f mov ecx, 2147483647 ; 7fffffffH 00038 2b ca sub ecx, edx 0003a 33 d2 xor edx, edx 0003c 44 3b c9 cmp r9d, ecx 0003f 0f 9e c2 setle dl - -; 526 : } - +; Line 526 00042 8b c2 mov eax, edx 00044 c3 ret 0 stbi__addints_valid ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__mul2shorts_valid _TEXT SEGMENT a$ = 8 b$ = 16 stbi__mul2shorts_valid PROC ; COMDAT - -; 530 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 530 00000 44 0f bf c2 movsx r8d, dx - -; 531 : if (b == 0 || b == -1) return 1; // multiplication by 0 is always 0; check for -1 so SHRT_MIN/b doesn't overflow - +; Line 531 00004 41 8d 40 01 lea eax, DWORD PTR [r8+1] 00008 66 83 f8 01 cmp ax, 1 0000c 76 40 jbe SHORT $LN3@stbi__mul2 - -; 532 : if ((a >= 0) == (b >= 0)) return a <= SHRT_MAX / b; // product is positive, so similar to mul2sizes_valid - +; Line 532 0000e 44 0f bf c9 movsx r9d, cx 00012 45 8b d0 mov r10d, r8d 00015 66 41 33 c8 xor cx, r8w @@ -5479,54 +5183,42 @@ stbi__mul2shorts_valid PROC ; COMDAT 00026 41 f7 fa idiv r10d 00029 33 c9 xor ecx, ecx $LN8@stbi__mul2: - -; 535 : } - +; Line 535 0002b 44 3b c8 cmp r9d, eax 0002e 0f 9e c1 setle cl 00031 8b c1 mov eax, ecx 00033 c3 ret 0 $LN4@stbi__mul2: - -; 533 : if (b < 0) return a <= SHRT_MIN / b; // same as a * b >= SHRT_MIN - +; Line 533 00034 b8 00 80 ff ff mov eax, -32768 ; ffffffffffff8000H 00039 33 c9 xor ecx, ecx 0003b 99 cdq 0003c 41 f7 fa idiv r10d 0003f 66 45 85 c0 test r8w, r8w 00043 78 e6 js SHORT $LN8@stbi__mul2 - -; 534 : return a >= SHRT_MIN / b; - +; Line 534 00045 44 3b c8 cmp r9d, eax 00048 0f 9d c1 setge cl 0004b 8b c1 mov eax, ecx - -; 535 : } - +; Line 535 0004d c3 ret 0 $LN3@stbi__mul2: - -; 531 : if (b == 0 || b == -1) return 1; // multiplication by 0 is always 0; check for -1 so SHRT_MIN/b doesn't overflow - +; Line 531 0004e b8 01 00 00 00 mov eax, 1 - -; 535 : } - +; Line 535 00053 c3 ret 0 stbi__mul2shorts_valid ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__load_main _TEXT SEGMENT -x$GSCopy$1$ = 64 +y$GSCopy$1$ = 64 +x$GSCopy$1$ = 72 ri$GSCopy$1$ = 80 -comp$GSCopy$1$ = 88 -tv1050 = 96 -info$11 = 96 -p$12 = 112 +$T1 = 88 +comp$GSCopy$1$ = 96 +tv1167 = 104 +p$2 = 112 __$ArrayPad$ = 152 s$ = 240 x$ = 248 @@ -5536,9 +5228,8 @@ req_comp$ = 272 ri$ = 280 bpc$dead$ = 288 stbi__load_main PROC ; COMDAT - -; 589 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 589 00000 40 53 push rbx 00002 55 push rbp 00003 56 push rsi @@ -5556,2237 +5247,732 @@ stbi__load_main PROC ; COMDAT 00 00 00 mov QWORD PTR __$ArrayPad$[rsp], rax 00026 48 8b 84 24 18 01 00 00 mov rax, QWORD PTR ri$[rsp] - -; 590 : memset(ri, 0, sizeof(*ri)); // make sure it's initialized if we add new fields -; 591 : ri->bits_per_channel = 8; // default is 8 so most paths don't have to be changed -; 592 : ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order - - 0002e 45 33 e4 xor r12d, r12d - 00031 8b ac 24 10 01 +; Line 591 + 0002e 41 bc 08 00 00 + 00 mov r12d, 8 + 00034 8b ac 24 10 01 00 00 mov ebp, DWORD PTR req_comp$[rsp] - 00038 4d 8b e9 mov r13, r9 - 0003b 4c 89 4c 24 58 mov QWORD PTR comp$GSCopy$1$[rsp], r9 - 00040 4d 8b f8 mov r15, r8 - 00043 48 8b da mov rbx, rdx - 00046 48 89 54 24 40 mov QWORD PTR x$GSCopy$1$[rsp], rdx - 0004b 48 c7 00 08 00 - 00 00 mov QWORD PTR [rax], 8 - 00052 48 8b f9 mov rdi, rcx - 00055 44 89 60 08 mov DWORD PTR [rax+8], r12d - 00059 48 89 44 24 50 mov QWORD PTR ri$GSCopy$1$[rsp], rax - -; 4825 : r = stbi__check_png_header(s); - - 0005e e8 00 00 00 00 call stbi__check_png_header - -; 342 : s->img_buffer = s->img_buffer_original; - - 00063 48 8b 8f d0 00 - 00 00 mov rcx, QWORD PTR [rdi+208] - 0006a 48 8d b7 c0 00 - 00 00 lea rsi, QWORD PTR [rdi+192] - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - - 00071 48 8b 97 d8 00 - 00 00 mov rdx, QWORD PTR [rdi+216] - 00078 4c 8d b7 c8 00 - 00 00 lea r14, QWORD PTR [rdi+200] - 0007f 48 89 0e mov QWORD PTR [rsi], rcx - 00082 49 89 16 mov QWORD PTR [r14], rdx - -; 593 : ri->num_channels = 0; -; 594 : -; 595 : // test the formats with a very explicit header first (at least a FOURCC -; 596 : // or distinctive magic number first) -; 597 : #ifndef STBI_NO_PNG -; 598 : if (stbi__png_test(s)) return stbi__png_load(s, x, y, comp, req_comp, ri); - - 00085 85 c0 test eax, eax - 00087 0f 84 5d 01 00 +; Line 592 + 0003b 45 33 ff xor r15d, r15d + 0003e 4d 8b e9 mov r13, r9 + 00041 4c 89 4c 24 60 mov QWORD PTR comp$GSCopy$1$[rsp], r9 + 00046 4c 89 44 24 40 mov QWORD PTR y$GSCopy$1$[rsp], r8 + 0004b 48 8b da mov rbx, rdx + 0004e 4c 89 20 mov QWORD PTR [rax], r12 + 00051 48 8b f1 mov rsi, rcx + 00054 44 89 78 08 mov DWORD PTR [rax+8], r15d + 00058 48 89 54 24 48 mov QWORD PTR x$GSCopy$1$[rsp], rdx + 0005d 48 89 44 24 50 mov QWORD PTR ri$GSCopy$1$[rsp], rax +; Line 4825 + 00062 e8 00 00 00 00 call stbi__check_png_header +; Line 342 + 00067 48 8b 8e d0 00 + 00 00 mov rcx, QWORD PTR [rsi+208] + 0006e 48 8d be c0 00 + 00 00 lea rdi, QWORD PTR [rsi+192] +; Line 343 + 00075 48 8b 96 d8 00 + 00 00 mov rdx, QWORD PTR [rsi+216] + 0007c 4c 8d b6 c8 00 + 00 00 lea r14, QWORD PTR [rsi+200] + 00083 48 89 0f mov QWORD PTR [rdi], rcx + 00086 49 89 16 mov QWORD PTR [r14], rdx +; Line 598 + 00089 85 c0 test eax, eax + 0008b 0f 84 5f 01 00 00 je $LN2@stbi__load - -; 4818 : p.s = s; - - 0008d 48 89 7c 24 70 mov QWORD PTR p$12[rsp], rdi - -; 4785 : void* result = NULL; - - 00092 41 8b dc mov ebx, r12d - -; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); - - 00095 83 fd 04 cmp ebp, 4 - 00098 0f 87 1f 01 00 +; Line 4818 + 00091 48 89 74 24 70 mov QWORD PTR p$2[rsp], rsi +; Line 4785 + 00096 41 8b df mov ebx, r15d +; Line 4786 + 00099 83 fd 04 cmp ebp, 4 + 0009c 0f 87 22 01 00 00 ja $LN22@stbi__load - -; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { - - 0009e 44 8b c5 mov r8d, ebp - 000a1 48 8d 4c 24 70 lea rcx, QWORD PTR p$12[rsp] - 000a6 33 d2 xor edx, edx - 000a8 e8 00 00 00 00 call stbi__parse_png_file - 000ad 85 c0 test eax, eax - 000af 0f 84 99 00 00 - 00 je $LN163@stbi__load - -; 4788 : if (p->depth <= 8) - - 000b5 8b 84 24 90 00 - 00 00 mov eax, DWORD PTR p$12[rsp+32] - 000bc 83 f8 08 cmp eax, 8 - 000bf 7f 07 jg SHORT $LN24@stbi__load - -; 4789 : ri->bits_per_channel = 8; - - 000c1 41 8d 44 24 08 lea eax, QWORD PTR [r12+8] - 000c6 eb 09 jmp SHORT $LN27@stbi__load -$LN24@stbi__load: - -; 4790 : else if (p->depth == 16) - - 000c8 83 f8 10 cmp eax, 16 - 000cb 0f 85 bf 00 00 +; Line 4787 + 000a2 44 8b c5 mov r8d, ebp + 000a5 48 8d 4c 24 70 lea rcx, QWORD PTR p$2[rsp] + 000aa 33 d2 xor edx, edx + 000ac e8 00 00 00 00 call stbi__parse_png_file + 000b1 85 c0 test eax, eax + 000b3 0f 84 9d 00 00 + 00 je $LN197@stbi__load +; Line 4788 + 000b9 8b 84 24 90 00 + 00 00 mov eax, DWORD PTR p$2[rsp+32] + 000c0 41 3b c4 cmp eax, r12d + 000c3 7e 0c jle SHORT $LN27@stbi__load +; Line 4790 + 000c5 83 f8 10 cmp eax, 16 + 000c8 0f 85 ca 00 00 00 jne $LN26@stbi__load +; Line 4791 + 000ce 44 8b e0 mov r12d, eax $LN27@stbi__load: - -; 4791 : ri->bits_per_channel = 16; -; 4792 : else -; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); -; 4794 : result = p->out; - - 000d1 48 8b 4c 24 50 mov rcx, QWORD PTR ri$GSCopy$1$[rsp] - 000d6 89 01 mov DWORD PTR [rcx], eax - 000d8 48 8b 9c 24 88 - 00 00 00 mov rbx, QWORD PTR p$12[rsp+24] - -; 4795 : p->out = NULL; -; 4796 : if (req_comp && req_comp != p->s->img_out_n) { - - 000e0 48 8b 4c 24 70 mov rcx, QWORD PTR p$12[rsp] - 000e5 4c 89 a4 24 88 - 00 00 00 mov QWORD PTR p$12[rsp+24], r12 - 000ed 85 ed test ebp, ebp - 000ef 74 41 je SHORT $LN31@stbi__load - 000f1 8b 51 0c mov edx, DWORD PTR [rcx+12] - 000f4 3b ea cmp ebp, edx - 000f6 74 3a je SHORT $LN31@stbi__load - -; 4797 : if (ri->bits_per_channel == 8) - - 000f8 44 8b 09 mov r9d, DWORD PTR [rcx] - 000fb 83 f8 08 cmp eax, 8 - 000fe 8b 41 04 mov eax, DWORD PTR [rcx+4] - 00101 44 8b c5 mov r8d, ebp - 00104 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00108 48 8b cb mov rcx, rbx - 0010b 75 07 jne SHORT $LN29@stbi__load - -; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); - - 0010d e8 00 00 00 00 call stbi__convert_format - 00112 eb 05 jmp SHORT $LN209@stbi__load +; Line 4794 + 000d1 48 8b 44 24 50 mov rax, QWORD PTR ri$GSCopy$1$[rsp] + 000d6 44 89 20 mov DWORD PTR [rax], r12d + 000d9 48 8b 9c 24 88 + 00 00 00 mov rbx, QWORD PTR p$2[rsp+24] +; Line 4796 + 000e1 48 8b 4c 24 70 mov rcx, QWORD PTR p$2[rsp] + 000e6 4c 89 bc 24 88 + 00 00 00 mov QWORD PTR p$2[rsp+24], r15 + 000ee 85 ed test ebp, ebp + 000f0 74 42 je SHORT $LN31@stbi__load + 000f2 8b 51 0c mov edx, DWORD PTR [rcx+12] + 000f5 3b ea cmp ebp, edx + 000f7 74 3b je SHORT $LN31@stbi__load +; Line 4797 + 000f9 8b 41 04 mov eax, DWORD PTR [rcx+4] + 000fc 44 8b c5 mov r8d, ebp + 000ff 44 8b 09 mov r9d, DWORD PTR [rcx] + 00102 48 8b cb mov rcx, rbx + 00105 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00109 41 83 fc 08 cmp r12d, 8 + 0010d 75 07 jne SHORT $LN29@stbi__load +; Line 4798 + 0010f e8 00 00 00 00 call stbi__convert_format + 00114 eb 05 jmp SHORT $LN242@stbi__load $LN29@stbi__load: - -; 4799 : else -; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); - - 00114 e8 00 00 00 00 call stbi__convert_format16 -$LN209@stbi__load: - -; 4801 : p->s->img_out_n = req_comp; - - 00119 48 8b d8 mov rbx, rax - 0011c 48 8b 44 24 70 mov rax, QWORD PTR p$12[rsp] - 00121 89 68 0c mov DWORD PTR [rax+12], ebp - -; 4802 : if (result == NULL) return result; - - 00124 48 85 db test rbx, rbx - 00127 0f 84 b5 00 00 +; Line 4800 + 00116 e8 00 00 00 00 call stbi__convert_format16 +$LN242@stbi__load: +; Line 4801 + 0011b 48 8b d8 mov rbx, rax + 0011e 48 8b 44 24 70 mov rax, QWORD PTR p$2[rsp] + 00123 89 68 0c mov DWORD PTR [rax+12], ebp +; Line 4802 + 00126 48 85 db test rbx, rbx + 00129 0f 84 b9 00 00 00 je $LN20@stbi__load - 0012d 48 8b 4c 24 70 mov rcx, QWORD PTR p$12[rsp] + 0012f 48 8b 4c 24 70 mov rcx, QWORD PTR p$2[rsp] $LN31@stbi__load: - -; 4803 : } -; 4804 : *x = p->s->img_x; - - 00132 8b 01 mov eax, DWORD PTR [rcx] - 00134 4c 8b 74 24 40 mov r14, QWORD PTR x$GSCopy$1$[rsp] - 00139 41 89 06 mov DWORD PTR [r14], eax - -; 4805 : *y = p->s->img_y; - - 0013c 8b 41 04 mov eax, DWORD PTR [rcx+4] - 0013f 41 89 07 mov DWORD PTR [r15], eax - -; 4806 : if (n) *n = p->s->img_n; - - 00142 4d 85 ed test r13, r13 - 00145 74 07 je SHORT $LN163@stbi__load - 00147 8b 41 08 mov eax, DWORD PTR [rcx+8] - 0014a 41 89 45 00 mov DWORD PTR [r13], eax -$LN163@stbi__load: - -; 4807 : } -; 4808 : STBI_FREE(p->out); p->out = NULL; - - 0014e 48 8b 8c 24 88 - 00 00 00 mov rcx, QWORD PTR p$12[rsp+24] - 00156 ff 15 00 00 00 +; Line 4804 + 00134 8b 01 mov eax, DWORD PTR [rcx] + 00136 4c 8b 74 24 48 mov r14, QWORD PTR x$GSCopy$1$[rsp] +; Line 4805 + 0013b 4c 8b 64 24 40 mov r12, QWORD PTR y$GSCopy$1$[rsp] + 00140 41 89 06 mov DWORD PTR [r14], eax + 00143 8b 41 04 mov eax, DWORD PTR [rcx+4] + 00146 41 89 04 24 mov DWORD PTR [r12], eax +; Line 4806 + 0014a 4d 85 ed test r13, r13 + 0014d 74 07 je SHORT $LN197@stbi__load + 0014f 8b 41 08 mov eax, DWORD PTR [rcx+8] + 00152 41 89 45 00 mov DWORD PTR [r13], eax +$LN197@stbi__load: +; Line 4808 + 00156 48 8b 8c 24 88 + 00 00 00 mov rcx, QWORD PTR p$2[rsp+24] + 0015e ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; - - 0015c 48 8b 8c 24 80 - 00 00 00 mov rcx, QWORD PTR p$12[rsp+16] - 00164 4c 89 a4 24 88 - 00 00 00 mov QWORD PTR p$12[rsp+24], r12 - 0016c ff 15 00 00 00 +; Line 4809 + 00164 48 8b 8c 24 80 + 00 00 00 mov rcx, QWORD PTR p$2[rsp+16] + 0016c 4c 89 bc 24 88 + 00 00 00 mov QWORD PTR p$2[rsp+24], r15 + 00174 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4810 : STBI_FREE(p->idata); p->idata = NULL; - - 00172 48 8b 4c 24 78 mov rcx, QWORD PTR p$12[rsp+8] - 00177 4c 89 a4 24 80 - 00 00 00 mov QWORD PTR p$12[rsp+16], r12 - 0017f ff 15 00 00 00 +; Line 4810 + 0017a 48 8b 4c 24 78 mov rcx, QWORD PTR p$2[rsp+8] + 0017f 4c 89 bc 24 80 + 00 00 00 mov QWORD PTR p$2[rsp+16], r15 + 00187 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 593 : ri->num_channels = 0; -; 594 : -; 595 : // test the formats with a very explicit header first (at least a FOURCC -; 596 : // or distinctive magic number first) -; 597 : #ifndef STBI_NO_PNG -; 598 : if (stbi__png_test(s)) return stbi__png_load(s, x, y, comp, req_comp, ri); - - 00185 48 8b c3 mov rax, rbx - -; 4812 : return result; - - 00188 4c 8b e3 mov r12, rbx - -; 593 : ri->num_channels = 0; -; 594 : -; 595 : // test the formats with a very explicit header first (at least a FOURCC -; 596 : // or distinctive magic number first) -; 597 : #ifndef STBI_NO_PNG -; 598 : if (stbi__png_test(s)) return stbi__png_load(s, x, y, comp, req_comp, ri); - - 0018b e9 1e 06 00 00 jmp $LN1@stbi__load +; Line 598 + 0018d 48 8b c3 mov rax, rbx +; Line 4812 + 00190 4c 8b fb mov r15, rbx +; Line 598 + 00193 e9 a0 05 00 00 jmp $LN1@stbi__load $LN26@stbi__load: - -; 431 : stbi__g_failure_reason = str; - - 00190 65 48 8b 04 25 +; Line 431 + 00198 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00199 8b 0d 00 00 00 + 001a1 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - -; 593 : ri->num_channels = 0; -; 594 : -; 595 : // test the formats with a very explicit header first (at least a FOURCC -; 596 : // or distinctive magic number first) -; 597 : #ifndef STBI_NO_PNG -; 598 : if (stbi__png_test(s)) return stbi__png_load(s, x, y, comp, req_comp, ri); - - 0019f 41 bd 00 00 00 - 00 mov r13d, OFFSET FLAT:stbi__g_failure_reason - -; 431 : stbi__g_failure_reason = str; - - 001a5 48 8b 14 c8 mov rdx, QWORD PTR [rax+rcx*8] - 001a9 48 8d 05 00 00 +; Line 598 + 001a7 41 b8 00 00 00 + 00 mov r8d, OFFSET FLAT:stbi__g_failure_reason +; Line 431 + 001ad 48 8b 14 c8 mov rdx, QWORD PTR [rax+rcx*8] + 001b1 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_0BF@NOEEEFMF@bad?5bits_per_channel@ - -; 593 : ri->num_channels = 0; -; 594 : -; 595 : // test the formats with a very explicit header first (at least a FOURCC -; 596 : // or distinctive magic number first) -; 597 : #ifndef STBI_NO_PNG -; 598 : if (stbi__png_test(s)) return stbi__png_load(s, x, y, comp, req_comp, ri); - - 001b0 49 89 44 15 00 mov QWORD PTR [r13+rdx], rax - 001b5 49 8b c4 mov rax, r12 - 001b8 e9 f1 05 00 00 jmp $LN1@stbi__load +; Line 598 + 001b8 49 89 04 10 mov QWORD PTR [r8+rdx], rax + 001bc 49 8b c7 mov rax, r15 + 001bf e9 74 05 00 00 jmp $LN1@stbi__load $LN22@stbi__load: - -; 431 : stbi__g_failure_reason = str; - - 001bd 65 48 8b 04 25 +; Line 431 + 001c4 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 001c6 8b 0d 00 00 00 + 001cd 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - -; 593 : ri->num_channels = 0; -; 594 : -; 595 : // test the formats with a very explicit header first (at least a FOURCC -; 596 : // or distinctive magic number first) -; 597 : #ifndef STBI_NO_PNG -; 598 : if (stbi__png_test(s)) return stbi__png_load(s, x, y, comp, req_comp, ri); - - 001cc 41 bd 00 00 00 - 00 mov r13d, OFFSET FLAT:stbi__g_failure_reason - -; 431 : stbi__g_failure_reason = str; - - 001d2 48 8b 14 c8 mov rdx, QWORD PTR [rax+rcx*8] - 001d6 48 8d 05 00 00 +; Line 598 + 001d3 41 b8 00 00 00 + 00 mov r8d, OFFSET FLAT:stbi__g_failure_reason +; Line 431 + 001d9 48 8b 14 c8 mov rdx, QWORD PTR [rax+rcx*8] + 001dd 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_0N@KBPNPPBJ@bad?5req_comp@ - -; 593 : ri->num_channels = 0; -; 594 : -; 595 : // test the formats with a very explicit header first (at least a FOURCC -; 596 : // or distinctive magic number first) -; 597 : #ifndef STBI_NO_PNG -; 598 : if (stbi__png_test(s)) return stbi__png_load(s, x, y, comp, req_comp, ri); - - 001dd 49 89 44 15 00 mov QWORD PTR [r13+rdx], rax +; Line 598 + 001e4 49 89 04 10 mov QWORD PTR [r8+rdx], rax $LN20@stbi__load: - 001e2 49 8b c4 mov rax, r12 - 001e5 e9 c4 05 00 00 jmp $LN1@stbi__load + 001e8 49 8b c7 mov rax, r15 + 001eb e9 48 05 00 00 jmp $LN1@stbi__load $LN2@stbi__load: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 001ea 48 3b ca cmp rcx, rdx - 001ed 73 09 jae SHORT $LN47@stbi__load - -; 1078 : return *s->img_buffer++; - - 001ef 0f b6 11 movzx edx, BYTE PTR [rcx] - 001f2 48 8d 41 01 lea rax, QWORD PTR [rcx+1] - 001f6 eb 1b jmp SHORT $LN211@stbi__load +; Line 1077 + 001f0 c7 44 24 58 01 + 00 00 00 mov DWORD PTR $T1[rsp], 1 + 001f8 48 3b ca cmp rcx, rdx + 001fb 73 09 jae SHORT $LN47@stbi__load +; Line 1078 + 001fd 0f b6 11 movzx edx, BYTE PTR [rcx] + 00200 48 8d 41 01 lea rax, QWORD PTR [rcx+1] + 00204 eb 1b jmp SHORT $LN244@stbi__load $LN47@stbi__load: - -; 1079 : if (s->read_from_callbacks) { - - 001f8 44 39 67 30 cmp DWORD PTR [rdi+48], r12d - 001fc 0f 84 f5 00 00 - 00 je $LN153@stbi__load - -; 1080 : stbi__refill_buffer(s); - - 00202 48 8b cf mov rcx, rdi - 00205 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 0020a 48 8b 06 mov rax, QWORD PTR [rsi] - 0020d 0f b6 10 movzx edx, BYTE PTR [rax] - 00210 48 ff c0 inc rax -$LN211@stbi__load: - -; 4870 : if (stbi__get8(s) != 'B') return 0; - - 00213 48 89 06 mov QWORD PTR [rsi], rax - 00216 80 fa 42 cmp dl, 66 ; 00000042H - 00219 0f 85 d8 00 00 - 00 jne $LN153@stbi__load - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 0021f 49 3b 06 cmp rax, QWORD PTR [r14] - 00222 72 15 jb SHORT $LN212@stbi__load - -; 1079 : if (s->read_from_callbacks) { - - 00224 44 39 67 30 cmp DWORD PTR [rdi+48], r12d - 00228 0f 84 c9 00 00 - 00 je $LN153@stbi__load - -; 1080 : stbi__refill_buffer(s); - - 0022e 48 8b cf mov rcx, rdi - 00231 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00236 48 8b 06 mov rax, QWORD PTR [rsi] -$LN212@stbi__load: - -; 4871 : if (stbi__get8(s) != 'M') return 0; - - 00239 0f b6 08 movzx ecx, BYTE PTR [rax] - 0023c 48 ff c0 inc rax - 0023f 48 89 06 mov QWORD PTR [rsi], rax - 00242 80 f9 4d cmp cl, 77 ; 0000004dH - 00245 0f 85 ac 00 00 - 00 jne $LN153@stbi__load - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 0024b 48 8b cf mov rcx, rdi - 0024e e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00253 48 8b cf mov rcx, rdi - 00256 e8 00 00 00 00 call stbi__get16le - -; 4873 : stbi__get16le(s); // discard reserved - - 0025b 48 8b cf mov rcx, rdi - 0025e e8 00 00 00 00 call stbi__get16le - -; 4874 : stbi__get16le(s); // discard reserved - - 00263 48 8b cf mov rcx, rdi - 00266 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 0026b 48 8b cf mov rcx, rdi - 0026e e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00273 48 8b cf mov rcx, rdi - 00276 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 0027b 48 8b cf mov rcx, rdi - 0027e e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00283 48 8b cf mov rcx, rdi - 00286 8b d8 mov ebx, eax - 00288 e8 00 00 00 00 call stbi__get16le - 0028d c1 e0 10 shl eax, 16 - 00290 03 c3 add eax, ebx - -; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); - - 00292 83 f8 38 cmp eax, 56 ; 00000038H - 00295 77 10 ja SHORT $LN158@stbi__load - 00297 48 ba 00 10 00 +; Line 1079 + 00206 44 39 7e 30 cmp DWORD PTR [rsi+48], r15d + 0020a 0f 84 f7 00 00 + 00 je $LN187@stbi__load +; Line 1080 + 00210 48 8b ce mov rcx, rsi + 00213 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00218 48 8b 07 mov rax, QWORD PTR [rdi] + 0021b 0f b6 10 movzx edx, BYTE PTR [rax] + 0021e 48 ff c0 inc rax +$LN244@stbi__load: +; Line 4870 + 00221 48 89 07 mov QWORD PTR [rdi], rax + 00224 80 fa 42 cmp dl, 66 ; 00000042H + 00227 0f 85 da 00 00 + 00 jne $LN187@stbi__load +; Line 1077 + 0022d 49 3b 06 cmp rax, QWORD PTR [r14] + 00230 72 15 jb SHORT $LN245@stbi__load +; Line 1079 + 00232 44 39 7e 30 cmp DWORD PTR [rsi+48], r15d + 00236 0f 84 cb 00 00 + 00 je $LN187@stbi__load +; Line 1080 + 0023c 48 8b ce mov rcx, rsi + 0023f e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00244 48 8b 07 mov rax, QWORD PTR [rdi] +$LN245@stbi__load: +; Line 4871 + 00247 0f b6 08 movzx ecx, BYTE PTR [rax] + 0024a 48 ff c0 inc rax + 0024d 48 89 07 mov QWORD PTR [rdi], rax + 00250 80 f9 4d cmp cl, 77 ; 0000004dH + 00253 0f 85 ae 00 00 + 00 jne $LN187@stbi__load +; Line 1186 + 00259 48 8b ce mov rcx, rsi + 0025c e8 00 00 00 00 call stbi__get16le +; Line 1187 + 00261 48 8b ce mov rcx, rsi + 00264 e8 00 00 00 00 call stbi__get16le +; Line 4873 + 00269 48 8b ce mov rcx, rsi + 0026c e8 00 00 00 00 call stbi__get16le +; Line 4874 + 00271 48 8b ce mov rcx, rsi + 00274 e8 00 00 00 00 call stbi__get16le +; Line 1186 + 00279 48 8b ce mov rcx, rsi + 0027c e8 00 00 00 00 call stbi__get16le +; Line 1187 + 00281 48 8b ce mov rcx, rsi + 00284 e8 00 00 00 00 call stbi__get16le +; Line 1186 + 00289 48 8b ce mov rcx, rsi + 0028c e8 00 00 00 00 call stbi__get16le +; Line 1187 + 00291 48 8b ce mov rcx, rsi + 00294 8b d8 mov ebx, eax + 00296 e8 00 00 00 00 call stbi__get16le + 0029b c1 e0 10 shl eax, 16 + 0029e 03 c3 add eax, ebx +; Line 4877 + 002a0 83 f8 38 cmp eax, 56 ; 00000038H + 002a3 77 10 ja SHORT $LN192@stbi__load + 002a5 48 ba 00 10 00 00 00 01 00 01 mov rdx, 72058693549559808 ; 0100010000001000H - 002a1 48 0f a3 c2 bt rdx, rax - 002a5 72 0d jb SHORT $LN44@stbi__load -$LN158@stbi__load: - 002a7 83 f8 6c cmp eax, 108 ; 0000006cH - 002aa 74 08 je SHORT $LN44@stbi__load - 002ac 41 8b cc mov ecx, r12d - 002af 83 f8 7c cmp eax, 124 ; 0000007cH - 002b2 75 05 jne SHORT $LN45@stbi__load + 002af 48 0f a3 c2 bt rdx, rax + 002b3 72 0d jb SHORT $LN44@stbi__load +$LN192@stbi__load: + 002b5 83 f8 6c cmp eax, 108 ; 0000006cH + 002b8 74 08 je SHORT $LN44@stbi__load + 002ba 41 8b cf mov ecx, r15d + 002bd 83 f8 7c cmp eax, 124 ; 0000007cH + 002c0 75 05 jne SHORT $LN45@stbi__load $LN44@stbi__load: - 002b4 b9 01 00 00 00 mov ecx, 1 + 002c2 b9 01 00 00 00 mov ecx, 1 $LN45@stbi__load: - -; 342 : s->img_buffer = s->img_buffer_original; - - 002b9 48 8b 87 d0 00 - 00 00 mov rax, QWORD PTR [rdi+208] - 002c0 48 89 06 mov QWORD PTR [rsi], rax - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - - 002c3 48 8b 87 d8 00 - 00 00 mov rax, QWORD PTR [rdi+216] - 002ca 49 89 06 mov QWORD PTR [r14], rax - -; 599 : #endif -; 600 : #ifndef STBI_NO_BMP -; 601 : if (stbi__bmp_test(s)) return stbi__bmp_load(s, x, y, comp, req_comp, ri); - - 002cd 85 c9 test ecx, ecx - 002cf 74 3c je SHORT $LN164@stbi__load - 002d1 48 8b 4c 24 50 mov rcx, QWORD PTR ri$GSCopy$1$[rsp] - 002d6 4d 8b cd mov r9, r13 - 002d9 48 8b 54 24 40 mov rdx, QWORD PTR x$GSCopy$1$[rsp] - 002de 4d 8b c7 mov r8, r15 - 002e1 48 89 4c 24 28 mov QWORD PTR [rsp+40], rcx - 002e6 48 8b cf mov rcx, rdi - 002e9 89 6c 24 20 mov DWORD PTR [rsp+32], ebp - 002ed e8 00 00 00 00 call stbi__bmp_load - 002f2 e9 b7 04 00 00 jmp $LN1@stbi__load -$LN153@stbi__load: - -; 6141 : int r = stbi__gif_test_raw(s); - - 002f7 48 8b 87 d0 00 - 00 00 mov rax, QWORD PTR [rdi+208] - 002fe 48 89 06 mov QWORD PTR [rsi], rax - 00301 48 8b 87 d8 00 - 00 00 mov rax, QWORD PTR [rdi+216] - 00308 49 89 06 mov QWORD PTR [r14], rax - 0030b eb 05 jmp SHORT $LN3@stbi__load -$LN164@stbi__load: - -; 599 : #endif -; 600 : #ifndef STBI_NO_BMP -; 601 : if (stbi__bmp_test(s)) return stbi__bmp_load(s, x, y, comp, req_comp, ri); - - 0030d 48 8b 5c 24 40 mov rbx, QWORD PTR x$GSCopy$1$[rsp] +; Line 342 + 002c7 48 8b 86 d0 00 + 00 00 mov rax, QWORD PTR [rsi+208] + 002ce 48 89 07 mov QWORD PTR [rdi], rax +; Line 343 + 002d1 48 8b 86 d8 00 + 00 00 mov rax, QWORD PTR [rsi+216] + 002d8 49 89 06 mov QWORD PTR [r14], rax +; Line 601 + 002db 85 c9 test ecx, ecx + 002dd 74 3e je SHORT $LN198@stbi__load + 002df 48 8b 44 24 50 mov rax, QWORD PTR ri$GSCopy$1$[rsp] + 002e4 4d 8b cd mov r9, r13 + 002e7 4c 8b 44 24 40 mov r8, QWORD PTR y$GSCopy$1$[rsp] + 002ec 48 8b ce mov rcx, rsi + 002ef 48 8b 54 24 48 mov rdx, QWORD PTR x$GSCopy$1$[rsp] + 002f4 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 002f9 89 6c 24 20 mov DWORD PTR [rsp+32], ebp + 002fd e8 00 00 00 00 call stbi__bmp_load + 00302 e9 31 04 00 00 jmp $LN1@stbi__load +$LN187@stbi__load: +; Line 6141 + 00307 48 8b 86 d0 00 + 00 00 mov rax, QWORD PTR [rsi+208] + 0030e 48 89 07 mov QWORD PTR [rdi], rax + 00311 48 8b 86 d8 00 + 00 00 mov rax, QWORD PTR [rsi+216] + 00318 49 89 06 mov QWORD PTR [r14], rax + 0031b eb 05 jmp SHORT $LN3@stbi__load +$LN198@stbi__load: +; Line 601 + 0031d 48 8b 5c 24 48 mov rbx, QWORD PTR x$GSCopy$1$[rsp] $LN3@stbi__load: - -; 6141 : int r = stbi__gif_test_raw(s); - - 00312 48 8b cf mov rcx, rdi - 00315 e8 00 00 00 00 call stbi__gif_test_raw - -; 342 : s->img_buffer = s->img_buffer_original; - - 0031a 48 8b 8f d0 00 - 00 00 mov rcx, QWORD PTR [rdi+208] - 00321 48 89 0e mov QWORD PTR [rsi], rcx - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - - 00324 48 8b 8f d8 00 - 00 00 mov rcx, QWORD PTR [rdi+216] - 0032b 49 89 0e mov QWORD PTR [r14], rcx - -; 602 : #endif -; 603 : #ifndef STBI_NO_GIF -; 604 : if (stbi__gif_test(s)) return stbi__gif_load(s, x, y, comp, req_comp, ri); - - 0032e 48 8b cf mov rcx, rdi - 00331 85 c0 test eax, eax - 00333 74 17 je SHORT $LN4@stbi__load - 00335 4d 8b cd mov r9, r13 - 00338 89 6c 24 20 mov DWORD PTR [rsp+32], ebp - 0033c 4d 8b c7 mov r8, r15 - 0033f 48 8b d3 mov rdx, rbx - 00342 e8 00 00 00 00 call stbi__gif_load - 00347 e9 62 04 00 00 jmp $LN1@stbi__load +; Line 6141 + 00322 48 8b ce mov rcx, rsi + 00325 e8 00 00 00 00 call stbi__gif_test_raw +; Line 342 + 0032a 48 8b 8e d0 00 + 00 00 mov rcx, QWORD PTR [rsi+208] + 00331 48 89 0f mov QWORD PTR [rdi], rcx +; Line 343 + 00334 48 8b 8e d8 00 + 00 00 mov rcx, QWORD PTR [rsi+216] + 0033b 49 89 0e mov QWORD PTR [r14], rcx +; Line 604 + 0033e 48 8b ce mov rcx, rsi + 00341 85 c0 test eax, eax + 00343 74 19 je SHORT $LN4@stbi__load + 00345 4c 8b 44 24 40 mov r8, QWORD PTR y$GSCopy$1$[rsp] + 0034a 4d 8b cd mov r9, r13 + 0034d 48 8b d3 mov rdx, rbx + 00350 89 6c 24 20 mov DWORD PTR [rsp+32], ebp + 00354 e8 00 00 00 00 call stbi__gif_load + 00359 e9 da 03 00 00 jmp $LN1@stbi__load $LN4@stbi__load: - -; 1168 : stbi__uint32 z = stbi__get16be(s); - - 0034c e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - - 00351 48 8b cf mov rcx, rdi - 00354 8b d8 mov ebx, eax - 00356 e8 00 00 00 00 call stbi__get16be - -; 342 : s->img_buffer = s->img_buffer_original; - - 0035b 48 8b 8f d0 00 - 00 00 mov rcx, QWORD PTR [rdi+208] - -; 1169 : return (z << 16) + stbi__get16be(s); - - 00362 c1 e3 10 shl ebx, 16 - -; 342 : s->img_buffer = s->img_buffer_original; - - 00365 48 89 0e mov QWORD PTR [rsi], rcx - -; 1169 : return (z << 16) + stbi__get16be(s); - - 00368 03 c3 add eax, ebx - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - - 0036a 48 8b 8f d8 00 - 00 00 mov rcx, QWORD PTR [rdi+216] - 00371 49 89 0e mov QWORD PTR [r14], rcx - -; 605 : #endif -; 606 : #ifndef STBI_NO_PSD -; 607 : if (stbi__psd_test(s)) return stbi__psd_load(s, x, y, comp, req_comp, ri, bpc); - - 00374 3d 53 50 42 38 cmp eax, 943870035 ; 38425053H - 00379 75 26 jne SHORT $LN5@stbi__load - 0037b 48 8b 4c 24 50 mov rcx, QWORD PTR ri$GSCopy$1$[rsp] - 00380 4d 8b cd mov r9, r13 - 00383 48 8b 54 24 40 mov rdx, QWORD PTR x$GSCopy$1$[rsp] - 00388 4d 8b c7 mov r8, r15 - 0038b 48 89 4c 24 28 mov QWORD PTR [rsp+40], rcx - 00390 48 8b cf mov rcx, rdi - 00393 89 6c 24 20 mov DWORD PTR [rsp+32], ebp - 00397 e8 00 00 00 00 call stbi__psd_load - 0039c e9 0d 04 00 00 jmp $LN1@stbi__load +; Line 1168 + 0035e e8 00 00 00 00 call stbi__get16be +; Line 1169 + 00363 48 8b ce mov rcx, rsi + 00366 8b d8 mov ebx, eax + 00368 e8 00 00 00 00 call stbi__get16be +; Line 342 + 0036d 48 8b 8e d0 00 + 00 00 mov rcx, QWORD PTR [rsi+208] +; Line 1169 + 00374 c1 e3 10 shl ebx, 16 +; Line 342 + 00377 48 89 0f mov QWORD PTR [rdi], rcx +; Line 1169 + 0037a 03 c3 add eax, ebx +; Line 343 + 0037c 48 8b 8e d8 00 + 00 00 mov rcx, QWORD PTR [rsi+216] + 00383 49 89 0e mov QWORD PTR [r14], rcx +; Line 607 + 00386 48 8b ce mov rcx, rsi + 00389 3d 53 50 42 38 cmp eax, 943870035 ; 38425053H + 0038e 75 25 jne SHORT $LN5@stbi__load + 00390 48 8b 44 24 50 mov rax, QWORD PTR ri$GSCopy$1$[rsp] + 00395 4d 8b cd mov r9, r13 + 00398 4c 8b 44 24 40 mov r8, QWORD PTR y$GSCopy$1$[rsp] + 0039d 48 8b 54 24 48 mov rdx, QWORD PTR x$GSCopy$1$[rsp] + 003a2 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 003a7 89 6c 24 20 mov DWORD PTR [rsp+32], ebp + 003ab e8 00 00 00 00 call stbi__psd_load + 003b0 e9 83 03 00 00 jmp $LN1@stbi__load $LN5@stbi__load: - -; 5898 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) - - 003a1 48 8d 15 00 00 +; Line 5898 + 003b5 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_04KBFEPHFH@S?$IA?v4@ - 003a8 48 8b cf mov rcx, rdi - 003ab e8 00 00 00 00 call stbi__pic_is4 - 003b0 85 c0 test eax, eax - 003b2 0f 84 af 00 00 - 00 je $LN156@stbi__load - -; 5899 : return 0; -; 5900 : -; 5901 : for (i = 0; i < 84; ++i) - - 003b8 bb 54 00 00 00 mov ebx, 84 ; 00000054H - 003bd 0f 1f 00 npad 3 + 003bc e8 00 00 00 00 call stbi__pic_is4 + 003c1 85 c0 test eax, eax + 003c3 0f 84 b0 00 00 + 00 je $LN190@stbi__load +; Line 5901 + 003c9 bb 54 00 00 00 mov ebx, 84 ; 00000054H + 003ce 66 90 npad 2 $LL77@stbi__load: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 003c0 48 8b 06 mov rax, QWORD PTR [rsi] - 003c3 49 3b 06 cmp rax, QWORD PTR [r14] - 003c6 73 08 jae SHORT $LN82@stbi__load - -; 1078 : return *s->img_buffer++; - - 003c8 48 ff c0 inc rax - 003cb 48 89 06 mov QWORD PTR [rsi], rax - 003ce eb 14 jmp SHORT $LN75@stbi__load +; Line 1077 + 003d0 48 8b 07 mov rax, QWORD PTR [rdi] + 003d3 49 3b 06 cmp rax, QWORD PTR [r14] + 003d6 73 08 jae SHORT $LN82@stbi__load +; Line 1078 + 003d8 48 ff c0 inc rax + 003db 48 89 07 mov QWORD PTR [rdi], rax + 003de eb 14 jmp SHORT $LN75@stbi__load $LN82@stbi__load: - -; 1079 : if (s->read_from_callbacks) { - - 003d0 44 39 67 30 cmp DWORD PTR [rdi+48], r12d - 003d4 74 0e je SHORT $LN75@stbi__load - -; 1080 : stbi__refill_buffer(s); - - 003d6 48 8b cf mov rcx, rdi - 003d9 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 003de 48 ff 06 inc QWORD PTR [rsi] - 003e1 48 8b 06 mov rax, QWORD PTR [rsi] +; Line 1079 + 003e0 44 39 7e 30 cmp DWORD PTR [rsi+48], r15d + 003e4 74 0e je SHORT $LN75@stbi__load +; Line 1080 + 003e6 48 8b ce mov rcx, rsi + 003e9 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 003ee 48 ff 07 inc QWORD PTR [rdi] + 003f1 48 8b 07 mov rax, QWORD PTR [rdi] $LN75@stbi__load: - -; 5901 : for (i = 0; i < 84; ++i) - - 003e4 48 83 eb 01 sub rbx, 1 - 003e8 75 d6 jne SHORT $LL77@stbi__load - 003ea 49 8b dc mov rbx, r12 - 003ed 48 8d 15 00 00 +; Line 5901 + 003f4 48 83 eb 01 sub rbx, 1 + 003f8 75 d6 jne SHORT $LL77@stbi__load + 003fa 49 8b df mov rbx, r15 + 003fd 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_04ELNJHLFH@PICT@ $LL88@stbi__load: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 003f4 49 3b 06 cmp rax, QWORD PTR [r14] - 003f7 73 0b jae SHORT $LN92@stbi__load - -; 1078 : return *s->img_buffer++; - - 003f9 0f b6 08 movzx ecx, BYTE PTR [rax] - 003fc 48 ff c0 inc rax - 003ff 48 89 06 mov QWORD PTR [rsi], rax - 00402 eb 25 jmp SHORT $LN91@stbi__load +; Line 1077 + 00404 49 3b 06 cmp rax, QWORD PTR [r14] + 00407 73 0b jae SHORT $LN92@stbi__load +; Line 1078 + 00409 0f b6 08 movzx ecx, BYTE PTR [rax] + 0040c 48 ff c0 inc rax + 0040f 48 89 07 mov QWORD PTR [rdi], rax + 00412 eb 25 jmp SHORT $LN91@stbi__load $LN92@stbi__load: - -; 1079 : if (s->read_from_callbacks) { - - 00404 44 39 67 30 cmp DWORD PTR [rdi+48], r12d - 00408 74 1d je SHORT $LN93@stbi__load - -; 1080 : stbi__refill_buffer(s); - - 0040a 48 8b cf mov rcx, rdi - 0040d e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00412 48 8b 06 mov rax, QWORD PTR [rsi] - 00415 48 8d 15 00 00 +; Line 1079 + 00414 44 39 7e 30 cmp DWORD PTR [rsi+48], r15d + 00418 74 1d je SHORT $LN93@stbi__load +; Line 1080 + 0041a 48 8b ce mov rcx, rsi + 0041d e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00422 48 8b 07 mov rax, QWORD PTR [rdi] + 00425 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_04ELNJHLFH@PICT@ - 0041c 0f b6 08 movzx ecx, BYTE PTR [rax] - 0041f 48 ff c0 inc rax - 00422 48 89 06 mov QWORD PTR [rsi], rax - 00425 eb 02 jmp SHORT $LN91@stbi__load + 0042c 0f b6 08 movzx ecx, BYTE PTR [rax] + 0042f 48 ff c0 inc rax + 00432 48 89 07 mov QWORD PTR [rdi], rax + 00435 eb 02 jmp SHORT $LN91@stbi__load $LN93@stbi__load: - -; 1082 : } -; 1083 : return 0; - - 00427 32 c9 xor cl, cl +; Line 1083 + 00437 32 c9 xor cl, cl $LN91@stbi__load: - -; 5888 : if (stbi__get8(s) != (stbi_uc)str[i]) - - 00429 3a 0c 13 cmp cl, BYTE PTR [rbx+rdx] - 0042c 75 39 jne SHORT $LN156@stbi__load - -; 4878 : return r; -; 4879 : } -; 4880 : -; 4881 : static int stbi__bmp_test(stbi__context* s) -; 4882 : { -; 4883 : int r = stbi__bmp_test_raw(s); -; 4884 : stbi__rewind(s); -; 4885 : return r; -; 4886 : } -; 4887 : -; 4888 : // returns 0..31 for the highest set bit -; 4889 : static int stbi__high_bit(unsigned int z) -; 4890 : { -; 4891 : int n = 0; -; 4892 : if (z == 0) return -1; -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } -; 4898 : return n; -; 4899 : } -; 4900 : -; 4901 : static int stbi__bitcount(unsigned int a) -; 4902 : { -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits -; 4908 : return a & 0xff; -; 4909 : } -; 4910 : -; 4911 : // extract an arbitrarily-aligned N-bit value (N=bits) -; 4912 : // from v, and then make it 8-bits long and fractionally -; 4913 : // extend it to full full range. -; 4914 : static int stbi__shiftsigned(unsigned int v, int shift, int bits) -; 4915 : { -; 4916 : static unsigned int mul_table[9] = { -; 4917 : 0, -; 4918 : 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, -; 4919 : 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, -; 4920 : }; -; 4921 : static unsigned int shift_table[9] = { -; 4922 : 0, 0,0,1,0,2,4,6,0, -; 4923 : }; -; 4924 : if (shift < 0) -; 4925 : v <<= -shift; -; 4926 : else -; 4927 : v >>= shift; -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; -; 4932 : } -; 4933 : -; 4934 : typedef struct -; 4935 : { -; 4936 : int bpp, offset, hsz; -; 4937 : unsigned int mr, mg, mb, ma, all_a; -; 4938 : int extra_read; -; 4939 : } stbi__bmp_data; -; 4940 : -; 4941 : static int stbi__bmp_set_mask_defaults(stbi__bmp_data* info, int compress) -; 4942 : { -; 4943 : // BI_BITFIELDS specifies masks explicitly, don't override -; 4944 : if (compress == 3) -; 4945 : return 1; -; 4946 : -; 4947 : if (compress == 0) { -; 4948 : if (info->bpp == 16) { -; 4949 : info->mr = 31u << 10; -; 4950 : info->mg = 31u << 5; -; 4951 : info->mb = 31u << 0; -; 4952 : } -; 4953 : else if (info->bpp == 32) { -; 4954 : info->mr = 0xffu << 16; -; 4955 : info->mg = 0xffu << 8; -; 4956 : info->mb = 0xffu << 0; -; 4957 : info->ma = 0xffu << 24; -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 -; 4959 : } -; 4960 : else { -; 4961 : // otherwise, use defaults, which is all-0 -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; -; 4963 : } -; 4964 : return 1; -; 4965 : } -; 4966 : return 0; // error -; 4967 : } -; 4968 : -; 4969 : static void* stbi__bmp_parse_header(stbi__context* s, stbi__bmp_data* info) -; 4970 : { -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); -; 4973 : stbi__get32le(s); // discard filesize -; 4974 : stbi__get16le(s); // discard reserved -; 4975 : stbi__get16le(s); // discard reserved -; 4976 : info->offset = stbi__get32le(s); -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; -; 4979 : info->extra_read = 14; -; 4980 : -; 4981 : if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); -; 4982 : -; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); -; 4984 : if (hsz == 12) { -; 4985 : s->img_x = stbi__get16le(s); -; 4986 : s->img_y = stbi__get16le(s); -; 4987 : } -; 4988 : else { -; 4989 : s->img_x = stbi__get32le(s); -; 4990 : s->img_y = stbi__get32le(s); -; 4991 : } -; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); -; 4993 : info->bpp = stbi__get16le(s); -; 4994 : if (hsz != 12) { -; 4995 : int compress = stbi__get32le(s); -; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); -; 4997 : if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes -; 4998 : if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel -; 4999 : stbi__get32le(s); // discard sizeof -; 5000 : stbi__get32le(s); // discard hres -; 5001 : stbi__get32le(s); // discard vres -; 5002 : stbi__get32le(s); // discard colorsused -; 5003 : stbi__get32le(s); // discard max important -; 5004 : if (hsz == 40 || hsz == 56) { -; 5005 : if (hsz == 56) { -; 5006 : stbi__get32le(s); -; 5007 : stbi__get32le(s); -; 5008 : stbi__get32le(s); -; 5009 : stbi__get32le(s); -; 5010 : } -; 5011 : if (info->bpp == 16 || info->bpp == 32) { -; 5012 : if (compress == 0) { -; 5013 : stbi__bmp_set_mask_defaults(info, compress); -; 5014 : } -; 5015 : else if (compress == 3) { -; 5016 : info->mr = stbi__get32le(s); -; 5017 : info->mg = stbi__get32le(s); -; 5018 : info->mb = stbi__get32le(s); -; 5019 : info->extra_read += 12; -; 5020 : // not documented, but generated by photoshop and handled by mspaint -; 5021 : if (info->mr == info->mg && info->mg == info->mb) { -; 5022 : // ?!?!? -; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5024 : } -; 5025 : } -; 5026 : else -; 5027 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5028 : } -; 5029 : } -; 5030 : else { -; 5031 : // V4/V5 header -; 5032 : int i; -; 5033 : if (hsz != 108 && hsz != 124) -; 5034 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5035 : info->mr = stbi__get32le(s); -; 5036 : info->mg = stbi__get32le(s); -; 5037 : info->mb = stbi__get32le(s); -; 5038 : info->ma = stbi__get32le(s); -; 5039 : if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs -; 5040 : stbi__bmp_set_mask_defaults(info, compress); -; 5041 : stbi__get32le(s); // discard color space -; 5042 : for (i = 0; i < 12; ++i) -; 5043 : stbi__get32le(s); // discard color space parameters -; 5044 : if (hsz == 124) { -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; -; 5053 : } -; 5054 : -; 5055 : static void* stbi__bmp_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5056 : { -; 5057 : stbi_uc* out; -; 5058 : unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a; -; 5059 : stbi_uc pal[256][4]; -; 5060 : int psize = 0, i, j, width; -; 5061 : int flip_vertically, pad, target; -; 5062 : stbi__bmp_data info; -; 5063 : STBI_NOTUSED(ri); -; 5064 : -; 5065 : info.all_a = 255; -; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) -; 5067 : return NULL; // error code already set -; 5068 : -; 5069 : flip_vertically = ((int)s->img_y) > 0; -; 5070 : s->img_y = abs((int)s->img_y); -; 5071 : -; 5072 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5073 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5074 : -; 5075 : mr = info.mr; -; 5076 : mg = info.mg; -; 5077 : mb = info.mb; -; 5078 : ma = info.ma; -; 5079 : all_a = info.all_a; -; 5080 : -; 5081 : if (info.hsz == 12) { -; 5082 : if (info.bpp < 24) -; 5083 : psize = (info.offset - info.extra_read - 24) / 3; -; 5084 : } -; 5085 : else { -; 5086 : if (info.bpp < 16) -; 5087 : psize = (info.offset - info.extra_read - info.hsz) >> 2; -; 5088 : } -; 5089 : if (psize == 0) { -; 5090 : // accept some number of extra bytes after the header, but if the offset points either to before -; 5091 : // the header ends or implies a large amount of extra data, reject the file as malformed -; 5092 : int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); -; 5093 : int header_limit = 1024; // max we actually read is below 256 bytes currently. -; 5094 : int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. -; 5095 : if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { -; 5096 : return stbi__errpuc("bad header", "Corrupt BMP"); -; 5097 : } -; 5098 : // we established that bytes_read_so_far is positive and sensible. -; 5099 : // the first half of this test rejects offsets that are either too small positives, or -; 5100 : // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn -; 5101 : // ensures the number computed in the second half of the test can't overflow. -; 5102 : if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { -; 5103 : return stbi__errpuc("bad offset", "Corrupt BMP"); -; 5104 : } -; 5105 : else { -; 5106 : stbi__skip(s, info.offset - bytes_read_so_far); -; 5107 : } -; 5108 : } -; 5109 : -; 5110 : if (info.bpp == 24 && ma == 0xff000000) -; 5111 : s->img_n = 3; -; 5112 : else -; 5113 : s->img_n = ma ? 4 : 3; -; 5114 : if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 -; 5115 : target = req_comp; -; 5116 : else -; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert -; 5118 : -; 5119 : // sanity-check size -; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) -; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); -; 5122 : -; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); -; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5125 : if (info.bpp < 16) { -; 5126 : int z = 0; -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } -; 5128 : for (i = 0; i < psize; ++i) { -; 5129 : pal[i][2] = stbi__get8(s); -; 5130 : pal[i][1] = stbi__get8(s); -; 5131 : pal[i][0] = stbi__get8(s); -; 5132 : if (info.hsz != 12) stbi__get8(s); -; 5133 : pal[i][3] = 255; -; 5134 : } -; 5135 : stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); -; 5136 : if (info.bpp == 1) width = (s->img_x + 7) >> 3; -; 5137 : else if (info.bpp == 4) width = (s->img_x + 1) >> 1; -; 5138 : else if (info.bpp == 8) width = s->img_x; -; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } -; 5140 : pad = (-width) & 3; -; 5141 : if (info.bpp == 1) { -; 5142 : for (j = 0; j < (int)s->img_y; ++j) { -; 5143 : int bit_offset = 7, v = stbi__get8(s); -; 5144 : for (i = 0; i < (int)s->img_x; ++i) { -; 5145 : int color = (v >> bit_offset) & 0x1; -; 5146 : out[z++] = pal[color][0]; -; 5147 : out[z++] = pal[color][1]; -; 5148 : out[z++] = pal[color][2]; -; 5149 : if (target == 4) out[z++] = 255; -; 5150 : if (i + 1 == (int)s->img_x) break; -; 5151 : if ((--bit_offset) < 0) { -; 5152 : bit_offset = 7; -; 5153 : v = stbi__get8(s); -; 5154 : } -; 5155 : } -; 5156 : stbi__skip(s, pad); -; 5157 : } -; 5158 : } -; 5159 : else { -; 5160 : for (j = 0; j < (int)s->img_y; ++j) { -; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { -; 5162 : int v = stbi__get8(s), v2 = 0; -; 5163 : if (info.bpp == 4) { -; 5164 : v2 = v & 15; -; 5165 : v >>= 4; -; 5166 : } -; 5167 : out[z++] = pal[v][0]; -; 5168 : out[z++] = pal[v][1]; -; 5169 : out[z++] = pal[v][2]; -; 5170 : if (target == 4) out[z++] = 255; -; 5171 : if (i + 1 == (int)s->img_x) break; -; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; -; 5173 : out[z++] = pal[v][0]; -; 5174 : out[z++] = pal[v][1]; -; 5175 : out[z++] = pal[v][2]; -; 5176 : if (target == 4) out[z++] = 255; -; 5177 : } -; 5178 : stbi__skip(s, pad); -; 5179 : } -; 5180 : } -; 5181 : } -; 5182 : else { -; 5183 : int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0; -; 5184 : int z = 0; -; 5185 : int easy = 0; -; 5186 : stbi__skip(s, info.offset - info.extra_read - info.hsz); -; 5187 : if (info.bpp == 24) width = 3 * s->img_x; -; 5188 : else if (info.bpp == 16) width = 2 * s->img_x; -; 5189 : else /* bpp = 32 and pad = 0 */ width = 0; -; 5190 : pad = (-width) & 3; -; 5191 : if (info.bpp == 24) { -; 5192 : easy = 1; -; 5193 : } -; 5194 : else if (info.bpp == 32) { -; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) -; 5196 : easy = 2; -; 5197 : } -; 5198 : if (!easy) { -; 5199 : if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); -; 5205 : if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5206 : } -; 5207 : for (j = 0; j < (int)s->img_y; ++j) { -; 5208 : if (easy) { -; 5209 : for (i = 0; i < (int)s->img_x; ++i) { -; 5210 : unsigned char a; -; 5211 : out[z + 2] = stbi__get8(s); -; 5212 : out[z + 1] = stbi__get8(s); -; 5213 : out[z + 0] = stbi__get8(s); -; 5214 : z += 3; -; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); -; 5216 : all_a |= a; -; 5217 : if (target == 4) out[z++] = a; -; 5218 : } -; 5219 : } -; 5220 : else { -; 5221 : int bpp = info.bpp; -; 5222 : for (i = 0; i < (int)s->img_x; ++i) { -; 5223 : stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s)); -; 5224 : unsigned int a; -; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); -; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); -; 5229 : all_a |= a; -; 5230 : if (target == 4) out[z++] = STBI__BYTECAST(a); -; 5231 : } -; 5232 : } -; 5233 : stbi__skip(s, pad); -; 5234 : } -; 5235 : } -; 5236 : -; 5237 : // if alpha channel is all 0s, replace with all 255s -; 5238 : if (target == 4 && all_a == 0) -; 5239 : for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4) -; 5240 : out[i] = 255; -; 5241 : -; 5242 : if (flip_vertically) { -; 5243 : stbi_uc t; -; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { -; 5245 : stbi_uc* p1 = out + j * s->img_x * target; -; 5246 : stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target; -; 5247 : for (i = 0; i < (int)s->img_x * target; ++i) { -; 5248 : t = p1[i]; p1[i] = p2[i]; p2[i] = t; -; 5249 : } -; 5250 : } -; 5251 : } -; 5252 : -; 5253 : if (req_comp && req_comp != target) { -; 5254 : out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); -; 5255 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5256 : } -; 5257 : -; 5258 : *x = s->img_x; -; 5259 : *y = s->img_y; -; 5260 : if (comp) *comp = s->img_n; -; 5261 : return out; -; 5262 : } -; 5263 : #endif -; 5264 : -; 5265 : // Targa Truevision - TGA -; 5266 : // by Jonathan Dummer -; 5267 : #ifndef STBI_NO_TGA -; 5268 : // returns STBI_rgb or whatever, 0 on error -; 5269 : static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -; 5270 : { -; 5271 : // only RGB or RGBA (incl. 16bit) or grey allowed -; 5272 : if (is_rgb16) *is_rgb16 = 0; -; 5273 : switch (bits_per_pixel) { -; 5274 : case 8: return STBI_grey; -; 5275 : case 16: if (is_grey) return STBI_grey_alpha; -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; -; 5278 : return STBI_rgb; -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; -; 5281 : default: return 0; -; 5282 : } -; 5283 : } -; 5284 : -; 5285 : static int stbi__tga_info(stbi__context* s, int* x, int* y, int* comp) -; 5286 : { -; 5287 : int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; -; 5288 : int sz, tga_colormap_type; -; 5289 : stbi__get8(s); // discard Offset -; 5290 : tga_colormap_type = stbi__get8(s); // colormap type -; 5291 : if (tga_colormap_type > 1) { -; 5292 : stbi__rewind(s); -; 5293 : return 0; // only RGB or indexed allowed -; 5294 : } -; 5295 : tga_image_type = stbi__get8(s); // image type -; 5296 : if (tga_colormap_type == 1) { // colormapped (paletted) image -; 5297 : if (tga_image_type != 1 && tga_image_type != 9) { -; 5298 : stbi__rewind(s); -; 5299 : return 0; -; 5300 : } -; 5301 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5302 : sz = stbi__get8(s); // check bits per palette color entry -; 5303 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) { -; 5304 : stbi__rewind(s); -; 5305 : return 0; -; 5306 : } -; 5307 : stbi__skip(s, 4); // skip image x and y origin -; 5308 : tga_colormap_bpp = sz; -; 5309 : } -; 5310 : else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE -; 5311 : if ((tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11)) { -; 5312 : stbi__rewind(s); -; 5313 : return 0; // only RGB or grey allowed, +/- RLE -; 5314 : } -; 5315 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5316 : tga_colormap_bpp = 0; -; 5317 : } -; 5318 : tga_w = stbi__get16le(s); -; 5319 : if (tga_w < 1) { -; 5320 : stbi__rewind(s); -; 5321 : return 0; // test width -; 5322 : } -; 5323 : tga_h = stbi__get16le(s); -; 5324 : if (tga_h < 1) { -; 5325 : stbi__rewind(s); -; 5326 : return 0; // test height -; 5327 : } -; 5328 : tga_bits_per_pixel = stbi__get8(s); // bits per pixel -; 5329 : stbi__get8(s); // ignore alpha bits -; 5330 : if (tga_colormap_bpp != 0) { -; 5331 : if ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { -; 5332 : // when using a colormap, tga_bits_per_pixel is the size of the indexes -; 5333 : // I don't think anything but 8 or 16bit indexes makes sense -; 5334 : stbi__rewind(s); -; 5335 : return 0; -; 5336 : } -; 5337 : tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); -; 5338 : } -; 5339 : else { -; 5340 : tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); -; 5341 : } -; 5342 : if (!tga_comp) { -; 5343 : stbi__rewind(s); -; 5344 : return 0; -; 5345 : } -; 5346 : if (x) *x = tga_w; -; 5347 : if (y) *y = tga_h; -; 5348 : if (comp) *comp = tga_comp; -; 5349 : return 1; // seems to have passed everything -; 5350 : } -; 5351 : -; 5352 : static int stbi__tga_test(stbi__context* s) -; 5353 : { -; 5354 : int res = 0; -; 5355 : int sz, tga_color_type; -; 5356 : stbi__get8(s); // discard Offset -; 5357 : tga_color_type = stbi__get8(s); // color type -; 5358 : if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed -; 5359 : sz = stbi__get8(s); // image type -; 5360 : if (tga_color_type == 1) { // colormapped (paletted) image -; 5361 : if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 -; 5362 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5363 : sz = stbi__get8(s); // check bits per palette color entry -; 5364 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5365 : stbi__skip(s, 4); // skip image x and y origin -; 5366 : } -; 5367 : else { // "normal" image w/o colormap -; 5368 : if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE -; 5369 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5370 : } -; 5371 : if (stbi__get16le(s) < 1) goto errorEnd; // test width -; 5372 : if (stbi__get16le(s) < 1) goto errorEnd; // test height -; 5373 : sz = stbi__get8(s); // bits per pixel -; 5374 : if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index -; 5375 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5376 : -; 5377 : res = 1; // if we got this far, everything's good and we can return 1 instead of 0 -; 5378 : -; 5379 : errorEnd: -; 5380 : stbi__rewind(s); -; 5381 : return res; -; 5382 : } -; 5383 : -; 5384 : // read 16bit value and convert to 24bit RGB -; 5385 : static void stbi__tga_read_rgb16(stbi__context* s, stbi_uc* out) -; 5386 : { -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); -; 5397 : -; 5398 : // some people claim that the most significant bit might be used for alpha -; 5399 : // (possibly if an alpha-bit is set in the "image descriptor byte") -; 5400 : // but that only made 16bit test images completely translucent.. -; 5401 : // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -; 5402 : } -; 5403 : -; 5404 : static void* stbi__tga_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5405 : { -; 5406 : // read in the TGA header stuff -; 5407 : int tga_offset = stbi__get8(s); -; 5408 : int tga_indexed = stbi__get8(s); -; 5409 : int tga_image_type = stbi__get8(s); -; 5410 : int tga_is_RLE = 0; -; 5411 : int tga_palette_start = stbi__get16le(s); -; 5412 : int tga_palette_len = stbi__get16le(s); -; 5413 : int tga_palette_bits = stbi__get8(s); -; 5414 : int tga_x_origin = stbi__get16le(s); -; 5415 : int tga_y_origin = stbi__get16le(s); -; 5416 : int tga_width = stbi__get16le(s); -; 5417 : int tga_height = stbi__get16le(s); -; 5418 : int tga_bits_per_pixel = stbi__get8(s); -; 5419 : int tga_comp, tga_rgb16 = 0; -; 5420 : int tga_inverted = stbi__get8(s); -; 5421 : // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) -; 5422 : // image data -; 5423 : unsigned char* tga_data; -; 5424 : unsigned char* tga_palette = NULL; -; 5425 : int i, j; -; 5426 : unsigned char raw_data[4] = { 0 }; -; 5427 : int RLE_count = 0; -; 5428 : int RLE_repeating = 0; -; 5429 : int read_next_pixel = 1; -; 5430 : STBI_NOTUSED(ri); -; 5431 : STBI_NOTUSED(tga_x_origin); // @TODO -; 5432 : STBI_NOTUSED(tga_y_origin); // @TODO -; 5433 : -; 5434 : if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5435 : if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5436 : -; 5437 : // do a tiny bit of precessing -; 5438 : if (tga_image_type >= 8) -; 5439 : { -; 5440 : tga_image_type -= 8; -; 5441 : tga_is_RLE = 1; -; 5442 : } -; 5443 : tga_inverted = 1 - ((tga_inverted >> 5) & 1); -; 5444 : -; 5445 : // If I'm paletted, then I'll use the number of bits from the palette -; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); -; 5447 : else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); -; 5448 : -; 5449 : if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency -; 5450 : return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); -; 5451 : -; 5452 : // tga info -; 5453 : *x = tga_width; -; 5454 : *y = tga_height; -; 5455 : if (comp) *comp = tga_comp; -; 5456 : -; 5457 : if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) -; 5458 : return stbi__errpuc("too large", "Corrupt TGA"); -; 5459 : -; 5460 : tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); -; 5461 : if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); -; 5462 : -; 5463 : // skip to the data's starting position (offset usually = 0) -; 5464 : stbi__skip(s, tga_offset); -; 5465 : -; 5466 : if (!tga_indexed && !tga_is_RLE && !tga_rgb16) { -; 5467 : for (i = 0; i < tga_height; ++i) { -; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; -; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; -; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); -; 5471 : } -; 5472 : } -; 5473 : else { -; 5474 : // do I need to load a palette? -; 5475 : if (tga_indexed) -; 5476 : { -; 5477 : if (tga_palette_len == 0) { /* you have to have at least one entry! */ -; 5478 : STBI_FREE(tga_data); -; 5479 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5480 : } -; 5481 : -; 5482 : // any data to skip? (offset usually = 0) -; 5483 : stbi__skip(s, tga_palette_start); -; 5484 : // load the palette -; 5485 : tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); -; 5486 : if (!tga_palette) { -; 5487 : STBI_FREE(tga_data); -; 5488 : return stbi__errpuc("outofmem", "Out of memory"); -; 5489 : } -; 5490 : if (tga_rgb16) { -; 5491 : stbi_uc* pal_entry = tga_palette; -; 5492 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5493 : for (i = 0; i < tga_palette_len; ++i) { -; 5494 : stbi__tga_read_rgb16(s, pal_entry); -; 5495 : pal_entry += tga_comp; -; 5496 : } -; 5497 : } -; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { -; 5499 : STBI_FREE(tga_data); -; 5500 : STBI_FREE(tga_palette); -; 5501 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) -; 5506 : { -; 5507 : // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? -; 5508 : if (tga_is_RLE) -; 5509 : { -; 5510 : if (RLE_count == 0) -; 5511 : { -; 5512 : // yep, get the next byte as a RLE command -; 5513 : int RLE_cmd = stbi__get8(s); -; 5514 : RLE_count = 1 + (RLE_cmd & 127); -; 5515 : RLE_repeating = RLE_cmd >> 7; -; 5516 : read_next_pixel = 1; -; 5517 : } -; 5518 : else if (!RLE_repeating) -; 5519 : { -; 5520 : read_next_pixel = 1; -; 5521 : } -; 5522 : } -; 5523 : else -; 5524 : { -; 5525 : read_next_pixel = 1; -; 5526 : } -; 5527 : // OK, if I need to read a pixel, do it now -; 5528 : if (read_next_pixel) -; 5529 : { -; 5530 : // load however much data we did have -; 5531 : if (tga_indexed) -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); -; 5535 : if (pal_idx >= tga_palette_len) { -; 5536 : // invalid index -; 5537 : pal_idx = 0; -; 5538 : } -; 5539 : pal_idx *= tga_comp; -; 5540 : for (j = 0; j < tga_comp; ++j) { -; 5541 : raw_data[j] = tga_palette[pal_idx + j]; -; 5542 : } -; 5543 : } -; 5544 : else if (tga_rgb16) { -; 5545 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5546 : stbi__tga_read_rgb16(s, raw_data); -; 5547 : } -; 5548 : else { -; 5549 : // read in the data raw -; 5550 : for (j = 0; j < tga_comp; ++j) { -; 5551 : raw_data[j] = stbi__get8(s); -; 5552 : } -; 5553 : } -; 5554 : // clear the reading flag for the next pixel -; 5555 : read_next_pixel = 0; -; 5556 : } // end of reading a pixel -; 5557 : -; 5558 : // copy data -; 5559 : for (j = 0; j < tga_comp; ++j) -; 5560 : tga_data[i * tga_comp + j] = raw_data[j]; -; 5561 : -; 5562 : // in case we're in RLE mode, keep counting down -; 5563 : --RLE_count; -; 5564 : } -; 5565 : // do I need to invert the image? -; 5566 : if (tga_inverted) -; 5567 : { -; 5568 : for (j = 0; j * 2 < tga_height; ++j) -; 5569 : { -; 5570 : int index1 = j * tga_width * tga_comp; -; 5571 : int index2 = (tga_height - 1 - j) * tga_width * tga_comp; -; 5572 : for (i = tga_width * tga_comp; i > 0; --i) -; 5573 : { -; 5574 : unsigned char temp = tga_data[index1]; -; 5575 : tga_data[index1] = tga_data[index2]; -; 5576 : tga_data[index2] = temp; -; 5577 : ++index1; -; 5578 : ++index2; -; 5579 : } -; 5580 : } -; 5581 : } -; 5582 : // clear my palette, if I had one -; 5583 : if (tga_palette != NULL) -; 5584 : { -; 5585 : STBI_FREE(tga_palette); -; 5586 : } -; 5587 : } -; 5588 : -; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order -; 5590 : if (tga_comp >= 3 && !tga_rgb16) -; 5591 : { -; 5592 : unsigned char* tga_pixel = tga_data; -; 5593 : for (i = 0; i < tga_width * tga_height; ++i) -; 5594 : { -; 5595 : unsigned char temp = tga_pixel[0]; -; 5596 : tga_pixel[0] = tga_pixel[2]; -; 5597 : tga_pixel[2] = temp; -; 5598 : tga_pixel += tga_comp; -; 5599 : } -; 5600 : } -; 5601 : -; 5602 : // convert to target component count -; 5603 : if (req_comp && req_comp != tga_comp) -; 5604 : tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); -; 5605 : -; 5606 : // the things I do to get rid of an error message, and yet keep -; 5607 : // Microsoft's C compilers happy... [8^( -; 5608 : tga_palette_start = tga_palette_len = tga_palette_bits = -; 5609 : tga_x_origin = tga_y_origin = 0; -; 5610 : STBI_NOTUSED(tga_palette_start); -; 5611 : // OK, done -; 5612 : return tga_data; -; 5613 : } -; 5614 : #endif -; 5615 : -; 5616 : // ************************************************************************************************* -; 5617 : // Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB -; 5618 : -; 5619 : #ifndef STBI_NO_PSD -; 5620 : static int stbi__psd_test(stbi__context* s) -; 5621 : { -; 5622 : int r = (stbi__get32be(s) == 0x38425053); -; 5623 : stbi__rewind(s); -; 5624 : return r; -; 5625 : } -; 5626 : -; 5627 : static int stbi__psd_decode_rle(stbi__context* s, stbi_uc* p, int pixelCount) -; 5628 : { -; 5629 : int count, nleft, len; -; 5630 : -; 5631 : count = 0; -; 5632 : while ((nleft = pixelCount - count) > 0) { -; 5633 : len = stbi__get8(s); -; 5634 : if (len == 128) { -; 5635 : // No-op. -; 5636 : } -; 5637 : else if (len < 128) { -; 5638 : // Copy next len+1 bytes literally. -; 5639 : len++; -; 5640 : if (len > nleft) return 0; // corrupt data -; 5641 : count += len; -; 5642 : while (len) { -; 5643 : *p = stbi__get8(s); -; 5644 : p += 4; -; 5645 : len--; -; 5646 : } -; 5647 : } -; 5648 : else if (len > 128) { -; 5649 : stbi_uc val; -; 5650 : // Next -len+1 bytes in the dest are replicated from next source byte. -; 5651 : // (Interpret len as a negative 8-bit int.) -; 5652 : len = 257 - len; -; 5653 : if (len > nleft) return 0; // corrupt data -; 5654 : val = stbi__get8(s); -; 5655 : count += len; -; 5656 : while (len) { -; 5657 : *p = val; -; 5658 : p += 4; -; 5659 : len--; -; 5660 : } -; 5661 : } -; 5662 : } -; 5663 : -; 5664 : return 1; -; 5665 : } -; 5666 : -; 5667 : static void* stbi__psd_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc) -; 5668 : { -; 5669 : int pixelCount; -; 5670 : int channelCount, compression; -; 5671 : int channel, i; -; 5672 : int bitdepth; -; 5673 : int w, h; -; 5674 : stbi_uc* out; -; 5675 : STBI_NOTUSED(ri); -; 5676 : -; 5677 : // Check identifier -; 5678 : if (stbi__get32be(s) != 0x38425053) // "8BPS" -; 5679 : return stbi__errpuc("not PSD", "Corrupt PSD image"); -; 5680 : -; 5681 : // Check file type version. -; 5682 : if (stbi__get16be(s) != 1) -; 5683 : return stbi__errpuc("wrong version", "Unsupported version of PSD image"); -; 5684 : -; 5685 : // Skip 6 reserved bytes. -; 5686 : stbi__skip(s, 6); -; 5687 : -; 5688 : // Read the number of channels (R, G, B, A, etc). -; 5689 : channelCount = stbi__get16be(s); -; 5690 : if (channelCount < 0 || channelCount > 16) -; 5691 : return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); -; 5692 : -; 5693 : // Read the rows and columns of the image. -; 5694 : h = stbi__get32be(s); -; 5695 : w = stbi__get32be(s); -; 5696 : -; 5697 : if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5698 : if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5699 : -; 5700 : // Make sure the depth is 8 bits. -; 5701 : bitdepth = stbi__get16be(s); -; 5702 : if (bitdepth != 8 && bitdepth != 16) -; 5703 : return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); -; 5704 : -; 5705 : // Make sure the color mode is RGB. -; 5706 : // Valid options are: -; 5707 : // 0: Bitmap -; 5708 : // 1: Grayscale -; 5709 : // 2: Indexed color -; 5710 : // 3: RGB color -; 5711 : // 4: CMYK color -; 5712 : // 7: Multichannel -; 5713 : // 8: Duotone -; 5714 : // 9: Lab color -; 5715 : if (stbi__get16be(s) != 3) -; 5716 : return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); -; 5717 : -; 5718 : // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) -; 5719 : stbi__skip(s, stbi__get32be(s)); -; 5720 : -; 5721 : // Skip the image resources. (resolution, pen tool paths, etc) -; 5722 : stbi__skip(s, stbi__get32be(s)); -; 5723 : -; 5724 : // Skip the reserved data. -; 5725 : stbi__skip(s, stbi__get32be(s)); -; 5726 : -; 5727 : // Find out if the data is compressed. -; 5728 : // Known values: -; 5729 : // 0: no compression -; 5730 : // 1: RLE compressed -; 5731 : compression = stbi__get16be(s); -; 5732 : if (compression > 1) -; 5733 : return stbi__errpuc("bad compression", "PSD has an unknown compression format"); -; 5734 : -; 5735 : // Check size -; 5736 : if (!stbi__mad3sizes_valid(4, w, h, 0)) -; 5737 : return stbi__errpuc("too large", "Corrupt PSD"); -; 5738 : -; 5739 : // Create the destination image. -; 5740 : -; 5741 : if (!compression && bitdepth == 16 && bpc == 16) { -; 5742 : out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0); -; 5743 : ri->bits_per_channel = 16; -; 5744 : } -; 5745 : else -; 5746 : out = (stbi_uc*)stbi__malloc(4 * w * h); -; 5747 : -; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5749 : pixelCount = w * h; -; 5750 : -; 5751 : // Initialize the data to zero. -; 5752 : //memset( out, 0, pixelCount * 4 ); -; 5753 : -; 5754 : // Finally, the image data. -; 5755 : if (compression) { -; 5756 : // RLE as used by .PSD and .TIFF -; 5757 : // Loop until you get the number of unpacked bytes you are expecting: -; 5758 : // Read the next source byte into n. -; 5759 : // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. -; 5760 : // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. -; 5761 : // Else if n is 128, noop. -; 5762 : // Endloop -; 5763 : -; 5764 : // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, -; 5765 : // which we're going to just skip. -; 5766 : stbi__skip(s, h * channelCount * 2); -; 5767 : -; 5768 : // Read the RLE data by channel. -; 5769 : for (channel = 0; channel < 4; channel++) { -; 5770 : stbi_uc* p; -; 5771 : -; 5772 : p = out + channel; -; 5773 : if (channel >= channelCount) { -; 5774 : // Fill this channel with default data. -; 5775 : for (i = 0; i < pixelCount; i++, p += 4) -; 5776 : *p = (channel == 3 ? 255 : 0); -; 5777 : } -; 5778 : else { -; 5779 : // Read the RLE data. -; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { -; 5781 : STBI_FREE(out); -; 5782 : return stbi__errpuc("corrupt", "bad RLE data"); -; 5783 : } -; 5784 : } -; 5785 : } -; 5786 : } -; 5787 : else { -; 5788 : // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) -; 5789 : // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. -; 5790 : -; 5791 : // Read the data by channel. -; 5792 : for (channel = 0; channel < 4; channel++) { -; 5793 : if (channel >= channelCount) { -; 5794 : // Fill this channel with default data. -; 5795 : if (bitdepth == 16 && bpc == 16) { -; 5796 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5797 : stbi__uint16 val = channel == 3 ? 65535 : 0; -; 5798 : for (i = 0; i < pixelCount; i++, q += 4) -; 5799 : *q = val; -; 5800 : } -; 5801 : else { -; 5802 : stbi_uc* p = out + channel; -; 5803 : stbi_uc val = channel == 3 ? 255 : 0; -; 5804 : for (i = 0; i < pixelCount; i++, p += 4) -; 5805 : *p = val; -; 5806 : } -; 5807 : } -; 5808 : else { -; 5809 : if (ri->bits_per_channel == 16) { // output bpc -; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5811 : for (i = 0; i < pixelCount; i++, q += 4) -; 5812 : *q = (stbi__uint16)stbi__get16be(s); -; 5813 : } -; 5814 : else { -; 5815 : stbi_uc* p = out + channel; -; 5816 : if (bitdepth == 16) { // input bpc -; 5817 : for (i = 0; i < pixelCount; i++, p += 4) -; 5818 : *p = (stbi_uc)(stbi__get16be(s) >> 8); -; 5819 : } -; 5820 : else { -; 5821 : for (i = 0; i < pixelCount; i++, p += 4) -; 5822 : *p = stbi__get8(s); -; 5823 : } -; 5824 : } -; 5825 : } -; 5826 : } -; 5827 : } -; 5828 : -; 5829 : // remove weird white matte from PSD -; 5830 : if (channelCount >= 4) { -; 5831 : if (ri->bits_per_channel == 16) { -; 5832 : for (i = 0; i < w * h; ++i) { -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); -; 5841 : } -; 5842 : } -; 5843 : } -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); -; 5854 : } -; 5855 : } -; 5856 : } -; 5857 : } -; 5858 : -; 5859 : // convert to desired output format -; 5860 : if (req_comp && req_comp != 4) { -; 5861 : if (ri->bits_per_channel == 16) -; 5862 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h); -; 5863 : else -; 5864 : out = stbi__convert_format(out, 4, req_comp, w, h); -; 5865 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5866 : } -; 5867 : -; 5868 : if (comp) *comp = 4; -; 5869 : *y = h; -; 5870 : *x = w; -; 5871 : -; 5872 : return out; -; 5873 : } -; 5874 : #endif -; 5875 : -; 5876 : // ************************************************************************************************* -; 5877 : // Softimage PIC loader -; 5878 : // by Tom Seddon -; 5879 : // -; 5880 : // See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -; 5881 : // See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ -; 5882 : -; 5883 : #ifndef STBI_NO_PIC -; 5884 : static int stbi__pic_is4(stbi__context* s, const char* str) -; 5885 : { -; 5886 : int i; -; 5887 : for (i = 0; i < 4; ++i) - - 0042e 48 ff c3 inc rbx - 00431 48 83 fb 04 cmp rbx, 4 - 00435 7c bd jl SHORT $LL88@stbi__load - -; 5907 : return 1; - - 00437 48 8b 87 d0 00 - 00 00 mov rax, QWORD PTR [rdi+208] - -; 608 : #else -; 609 : STBI_NOTUSED(bpc); -; 610 : #endif -; 611 : #ifndef STBI_NO_PIC -; 612 : if (stbi__pic_test(s)) return stbi__pic_load(s, x, y, comp, req_comp, ri); - - 0043e 4d 8b cd mov r9, r13 - 00441 48 8b 54 24 40 mov rdx, QWORD PTR x$GSCopy$1$[rsp] - 00446 4d 8b c7 mov r8, r15 - -; 5907 : return 1; - - 00449 48 89 06 mov QWORD PTR [rsi], rax - -; 608 : #else -; 609 : STBI_NOTUSED(bpc); -; 610 : #endif -; 611 : #ifndef STBI_NO_PIC -; 612 : if (stbi__pic_test(s)) return stbi__pic_load(s, x, y, comp, req_comp, ri); - - 0044c 48 8b cf mov rcx, rdi - -; 5907 : return 1; - - 0044f 48 8b 87 d8 00 - 00 00 mov rax, QWORD PTR [rdi+216] - 00456 49 89 06 mov QWORD PTR [r14], rax - -; 608 : #else -; 609 : STBI_NOTUSED(bpc); -; 610 : #endif -; 611 : #ifndef STBI_NO_PIC -; 612 : if (stbi__pic_test(s)) return stbi__pic_load(s, x, y, comp, req_comp, ri); - - 00459 89 6c 24 20 mov DWORD PTR [rsp+32], ebp - 0045d e8 00 00 00 00 call stbi__pic_load - 00462 e9 47 03 00 00 jmp $LN1@stbi__load -$LN156@stbi__load: - -; 438 : return STBI_MALLOC(size); - - 00467 48 8b 97 d0 00 - 00 00 mov rdx, QWORD PTR [rdi+208] - 0046e 49 8b ce mov rcx, r14 - 00471 48 8b 87 d8 00 - 00 00 mov rax, QWORD PTR [rdi+216] - 00478 48 8b de mov rbx, rsi - 0047b 48 89 13 mov QWORD PTR [rbx], rdx - 0047e 48 89 01 mov QWORD PTR [rcx], rax - 00481 b9 88 48 00 00 mov ecx, 18568 ; 00004888H - 00486 ff 15 00 00 00 +; Line 5888 + 00439 3a 0c 13 cmp cl, BYTE PTR [rbx+rdx] + 0043c 75 3b jne SHORT $LN190@stbi__load +; Line 5887 + 0043e 48 ff c3 inc rbx + 00441 48 83 fb 04 cmp rbx, 4 + 00445 7c bd jl SHORT $LL88@stbi__load +; Line 5907 + 00447 48 8b 86 d0 00 + 00 00 mov rax, QWORD PTR [rsi+208] +; Line 612 + 0044e 4d 8b cd mov r9, r13 + 00451 4c 8b 44 24 40 mov r8, QWORD PTR y$GSCopy$1$[rsp] + 00456 48 8b ce mov rcx, rsi + 00459 48 8b 54 24 48 mov rdx, QWORD PTR x$GSCopy$1$[rsp] +; Line 5907 + 0045e 48 89 07 mov QWORD PTR [rdi], rax + 00461 48 8b 86 d8 00 + 00 00 mov rax, QWORD PTR [rsi+216] + 00468 49 89 06 mov QWORD PTR [r14], rax +; Line 612 + 0046b 89 6c 24 20 mov DWORD PTR [rsp+32], ebp + 0046f e8 00 00 00 00 call stbi__pic_load + 00474 e9 bf 02 00 00 jmp $LN1@stbi__load +$LN190@stbi__load: +; Line 438 + 00479 48 8b 96 d0 00 + 00 00 mov rdx, QWORD PTR [rsi+208] + 00480 49 8b ce mov rcx, r14 + 00483 48 8b 86 d8 00 + 00 00 mov rax, QWORD PTR [rsi+216] + 0048a 4c 8b c7 mov r8, rdi + 0048d 48 89 17 mov QWORD PTR [rdi], rdx + 00490 48 89 01 mov QWORD PTR [rcx], rax + 00493 b9 88 48 00 00 mov ecx, 18568 ; 00004888H + 00498 ff 15 00 00 00 00 call QWORD PTR __imp_malloc - 0048c 4c 8b e8 mov r13, rax - -; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); - - 0048f 48 85 c0 test rax, rax - 00492 75 3f jne SHORT $LN98@stbi__load - -; 431 : stbi__g_failure_reason = str; - - 00494 65 48 8b 04 25 +; Line 3536 + 0049e 41 b8 00 00 00 + 00 mov r8d, OFFSET FLAT:stbi__g_failure_reason +; Line 438 + 004a4 48 8b d8 mov rbx, rax +; Line 3536 + 004a7 4c 89 44 24 68 mov QWORD PTR tv1167[rsp], r8 +; Line 3537 + 004ac 48 85 c0 test rax, rax + 004af 75 39 jne SHORT $LN98@stbi__load +; Line 431 + 004b1 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 0049d 8b 0d 00 00 00 - 00 mov ecx, DWORD PTR _tls_index - 004a3 41 bd 00 00 00 - 00 mov r13d, OFFSET FLAT:stbi__g_failure_reason - 004a9 48 8b 14 c8 mov rdx, QWORD PTR [rax+rcx*8] - 004ad 48 8d 05 00 00 + 004ba 44 8b 2d 00 00 + 00 00 mov r13d, DWORD PTR _tls_index + 004c1 4a 8b 14 e8 mov rdx, QWORD PTR [rax+r13*8] + 004c5 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 004b4 49 89 44 15 00 mov QWORD PTR [r13+rdx], rax + 004cc 49 89 04 10 mov QWORD PTR [r8+rdx], rax $LN7@stbi__load: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 004b9 48 8b 06 mov rax, QWORD PTR [rsi] - 004bc 49 3b 06 cmp rax, QWORD PTR [r14] - 004bf 0f 83 b2 01 00 - 00 jae $LN132@stbi__load - -; 1078 : return *s->img_buffer++; - - 004c5 0f b6 18 movzx ebx, BYTE PTR [rax] - 004c8 48 ff c0 inc rax - 004cb 48 89 06 mov QWORD PTR [rsi], rax - 004ce e9 c2 01 00 00 jmp $LN131@stbi__load +; Line 1077 + 004d0 48 8b 07 mov rax, QWORD PTR [rdi] + 004d3 49 3b 06 cmp rax, QWORD PTR [r14] + 004d6 0f 83 22 01 00 + 00 jae $LN166@stbi__load +; Line 1078 + 004dc 0f b6 18 movzx ebx, BYTE PTR [rax] + 004df 48 ff c0 inc rax + 004e2 48 89 07 mov QWORD PTR [rdi], rax + 004e5 e9 32 01 00 00 jmp $LN165@stbi__load $LN98@stbi__load: - -; 3538 : memset(j, 0, sizeof(stbi__jpeg)); - - 004d3 48 8d 48 08 lea rcx, QWORD PTR [rax+8] - 004d7 33 d2 xor edx, edx - 004d9 41 b8 68 48 00 - 00 mov r8d, 18536 ; 00004868H - 004df e8 00 00 00 00 call memset - -; 187 : __cpuid(info, 1); - - 004e4 33 c9 xor ecx, ecx - -; 3539 : j->s = s; - - 004e6 49 89 7d 00 mov QWORD PTR [r13], rdi - -; 3305 : j->idct_block_kernel = stbi__idct_block; - - 004ea 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__idct_block - 004f1 49 89 85 70 48 - 00 00 mov QWORD PTR [r13+18544], rax - -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; - - 004f8 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__YCbCr_to_RGB_row - 004ff 49 89 85 78 48 - 00 00 mov QWORD PTR [r13+18552], rax - -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; - - 00506 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__resample_row_hv_2 - 0050d 49 89 85 80 48 - 00 00 mov QWORD PTR [r13+18560], rax - -; 187 : __cpuid(info, 1); - - 00514 b8 01 00 00 00 mov eax, 1 - 00519 0f a2 cpuid - 0051b 89 44 24 60 mov DWORD PTR info$11[rsp], eax - -; 3310 : if (stbi__sse2_available()) { - - 0051f 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__idct_simd - -; 187 : __cpuid(info, 1); - - 00526 89 5c 24 64 mov DWORD PTR info$11[rsp+4], ebx - -; 3310 : if (stbi__sse2_available()) { - - 0052a 48 8d 1d 00 00 - 00 00 lea rbx, OFFSET FLAT:stbi__resample_row_hv_2_simd - 00531 48 8d 0d 00 00 - 00 00 lea rcx, OFFSET FLAT:stbi__YCbCr_to_RGB_simd - 00538 0f ba e2 1a bt edx, 26 - 0053c 73 15 jae SHORT $LN105@stbi__load - -; 3311 : j->idct_block_kernel = stbi__idct_simd; - - 0053e 49 89 85 70 48 - 00 00 mov QWORD PTR [r13+18544], rax - -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - - 00545 49 89 8d 78 48 - 00 00 mov QWORD PTR [r13+18552], rcx - -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; - - 0054c 49 89 9d 80 48 - 00 00 mov QWORD PTR [r13+18560], rbx -$LN105@stbi__load: - -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); - - 00553 ba 01 00 00 00 mov edx, 1 - 00558 49 8b cd mov rcx, r13 - 0055b e8 00 00 00 00 call stbi__decode_jpeg_header - -; 342 : s->img_buffer = s->img_buffer_original; - - 00560 48 8b 97 d0 00 - 00 00 mov rdx, QWORD PTR [rdi+208] - -; 3543 : STBI_FREE(j); - - 00567 49 8b cd mov rcx, r13 - -; 342 : s->img_buffer = s->img_buffer_original; - - 0056a 48 89 16 mov QWORD PTR [rsi], rdx - -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); - - 0056d 8b d8 mov ebx, eax - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - - 0056f 48 8b 97 d8 00 - 00 00 mov rdx, QWORD PTR [rdi+216] - 00576 49 89 16 mov QWORD PTR [r14], rdx - -; 3543 : STBI_FREE(j); - - 00579 ff 15 00 00 00 +; Line 3538 + 004ea 48 8d 48 08 lea rcx, QWORD PTR [rax+8] + 004ee 33 d2 xor edx, edx + 004f0 41 b8 80 48 00 + 00 mov r8d, 18560 ; 00004880H + 004f6 e8 00 00 00 00 call memset +; Line 3540 + 004fb 48 8b cb mov rcx, rbx + 004fe 48 89 33 mov QWORD PTR [rbx], rsi + 00501 e8 00 00 00 00 call stbi__setup_jpeg +; Line 2851 + 00506 48 8b cb mov rcx, rbx + 00509 44 89 bb 48 48 + 00 00 mov DWORD PTR [rbx+18504], r15d + 00510 c7 83 4c 48 00 + 00 ff ff ff ff mov DWORD PTR [rbx+18508], -1 + 0051a c6 83 28 48 00 + 00 ff mov BYTE PTR [rbx+18472], 255 ; 000000ffH + 00521 e8 00 00 00 00 call stbi__get_marker +; Line 2852 + 00526 44 8b 2d 00 00 + 00 00 mov r13d, DWORD PTR _tls_index + 0052d 3c d8 cmp al, 216 ; 000000d8H + 0052f 74 22 je SHORT $LN109@stbi__load +; Line 431 + 00531 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 0053a 48 8d 0d 00 00 + 00 00 lea rcx, OFFSET FLAT:??_C@_06CLMBLEP@no?5SOI@ +; Line 2852 + 00541 44 89 7c 24 58 mov DWORD PTR $T1[rsp], r15d +; Line 431 + 00546 4a 8b 14 e8 mov rdx, QWORD PTR [rax+r13*8] + 0054a 48 8b 44 24 68 mov rax, QWORD PTR tv1167[rsp] + 0054f 48 89 0c 10 mov QWORD PTR [rax+rdx], rcx +$LN109@stbi__load: +; Line 342 + 00553 48 8b 86 d0 00 + 00 00 mov rax, QWORD PTR [rsi+208] +; Line 3543 + 0055a 48 8b cb mov rcx, rbx +; Line 342 + 0055d 48 89 07 mov QWORD PTR [rdi], rax +; Line 343 + 00560 48 8b 86 d8 00 + 00 00 mov rax, QWORD PTR [rsi+216] + 00567 49 89 06 mov QWORD PTR [r14], rax +; Line 3543 + 0056a ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 3544 : return r; - - 0057f 41 bd 00 00 00 - 00 mov r13d, OFFSET FLAT:stbi__g_failure_reason - 00585 41 8b c5 mov eax, r13d - 00588 48 89 44 24 60 mov QWORD PTR tv1050[rsp], rax - -; 613 : #endif -; 614 : -; 615 : // then the formats that can end up attempting to load with just 1 or 2 -; 616 : // bytes matching expectations; these are prone to false positives, so -; 617 : // try them later -; 618 : #ifndef STBI_NO_JPEG -; 619 : if (stbi__jpeg_test(s)) return stbi__jpeg_load(s, x, y, comp, req_comp, ri); - - 0058d 85 db test ebx, ebx - 0058f 0f 84 24 ff ff +; Line 619 + 00570 44 39 7c 24 58 cmp DWORD PTR $T1[rsp], r15d + 00575 0f 84 55 ff ff ff je $LN7@stbi__load - -; 438 : return STBI_MALLOC(size); - - 00595 b9 88 48 00 00 mov ecx, 18568 ; 00004888H - 0059a ff 15 00 00 00 +; Line 438 + 0057b b9 88 48 00 00 mov ecx, 18568 ; 00004888H + 00580 ff 15 00 00 00 00 call QWORD PTR __imp_malloc - 005a0 48 8b f0 mov rsi, rax - -; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); - - 005a3 48 85 c0 test rax, rax - 005a6 75 2b jne SHORT $LN114@stbi__load - -; 431 : stbi__g_failure_reason = str; - - 005a8 8b 0d 00 00 00 - 00 mov ecx, DWORD PTR _tls_index - 005ae 65 48 8b 04 25 + 00586 48 8b d8 mov rbx, rax +; Line 3523 + 00589 48 85 c0 test rax, rax + 0058c 75 25 jne SHORT $LN155@stbi__load +; Line 431 + 0058e 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 005b7 48 8b 14 c8 mov rdx, QWORD PTR [rax+rcx*8] - 005bb 48 8d 05 00 00 + 00597 48 8b 4c 24 68 mov rcx, QWORD PTR tv1167[rsp] + 0059c 4a 8b 14 e8 mov rdx, QWORD PTR [rax+r13*8] + 005a0 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 005c2 48 8b 4c 24 60 mov rcx, QWORD PTR tv1050[rsp] - 005c7 48 89 04 11 mov QWORD PTR [rcx+rdx], rax - -; 593 : ri->num_channels = 0; -; 594 : -; 595 : // test the formats with a very explicit header first (at least a FOURCC -; 596 : // or distinctive magic number first) -; 597 : #ifndef STBI_NO_PNG -; 598 : if (stbi__png_test(s)) return stbi__png_load(s, x, y, comp, req_comp, ri); - - 005cb 49 8b c4 mov rax, r12 - 005ce e9 db 01 00 00 jmp $LN1@stbi__load -$LN114@stbi__load: - -; 3524 : memset(j, 0, sizeof(stbi__jpeg)); - - 005d3 48 8d 48 08 lea rcx, QWORD PTR [rax+8] - 005d7 33 d2 xor edx, edx - 005d9 41 b8 68 48 00 - 00 mov r8d, 18536 ; 00004868H - 005df e8 00 00 00 00 call memset - -; 3305 : j->idct_block_kernel = stbi__idct_block; - - 005e4 48 8d 0d 00 00 - 00 00 lea rcx, OFFSET FLAT:stbi__idct_block - -; 3526 : j->s = s; - - 005eb 48 89 3e mov QWORD PTR [rsi], rdi - -; 3305 : j->idct_block_kernel = stbi__idct_block; - - 005ee 48 89 8e 70 48 - 00 00 mov QWORD PTR [rsi+18544], rcx - -; 187 : __cpuid(info, 1); - - 005f5 b8 01 00 00 00 mov eax, 1 - -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; - - 005fa 48 8d 0d 00 00 - 00 00 lea rcx, OFFSET FLAT:stbi__YCbCr_to_RGB_row - 00601 48 89 8e 78 48 - 00 00 mov QWORD PTR [rsi+18552], rcx - -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; - - 00608 48 8d 0d 00 00 - 00 00 lea rcx, OFFSET FLAT:stbi__resample_row_hv_2 - 0060f 48 89 8e 80 48 - 00 00 mov QWORD PTR [rsi+18560], rcx - -; 187 : __cpuid(info, 1); - - 00616 33 c9 xor ecx, ecx - 00618 0f a2 cpuid - -; 3310 : if (stbi__sse2_available()) { - - 0061a 0f ba e2 1a bt edx, 26 - 0061e 73 2a jae SHORT $LN121@stbi__load - -; 3311 : j->idct_block_kernel = stbi__idct_simd; - - 00620 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__idct_simd - 00627 48 89 86 70 48 - 00 00 mov QWORD PTR [rsi+18544], rax - -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - - 0062e 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__YCbCr_to_RGB_simd - 00635 48 89 86 78 48 - 00 00 mov QWORD PTR [rsi+18552], rax - -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; - - 0063c 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__resample_row_hv_2_simd - 00643 48 89 86 80 48 - 00 00 mov QWORD PTR [rsi+18560], rax -$LN121@stbi__load: - -; 3528 : result = load_jpeg_image(j, x, y, comp, req_comp); - - 0064a 4c 8b 4c 24 58 mov r9, QWORD PTR comp$GSCopy$1$[rsp] - 0064f 4d 8b c7 mov r8, r15 - 00652 48 8b 54 24 40 mov rdx, QWORD PTR x$GSCopy$1$[rsp] - 00657 48 8b ce mov rcx, rsi - 0065a 89 6c 24 20 mov DWORD PTR [rsp+32], ebp - 0065e e8 00 00 00 00 call load_jpeg_image - -; 3529 : STBI_FREE(j); - - 00663 48 8b ce mov rcx, rsi - 00666 4c 8b e0 mov r12, rax - 00669 ff 15 00 00 00 + 005a7 48 89 04 11 mov QWORD PTR [rcx+rdx], rax +; Line 598 + 005ab 49 8b c7 mov rax, r15 + 005ae e9 85 01 00 00 jmp $LN1@stbi__load +$LN155@stbi__load: +; Line 3524 + 005b3 48 8d 48 08 lea rcx, QWORD PTR [rax+8] + 005b7 33 d2 xor edx, edx + 005b9 41 b8 80 48 00 + 00 mov r8d, 18560 ; 00004880H + 005bf e8 00 00 00 00 call memset +; Line 3527 + 005c4 48 8b cb mov rcx, rbx + 005c7 48 89 33 mov QWORD PTR [rbx], rsi + 005ca e8 00 00 00 00 call stbi__setup_jpeg +; Line 3528 + 005cf 4c 8b 44 24 40 mov r8, QWORD PTR y$GSCopy$1$[rsp] + 005d4 48 8b cb mov rcx, rbx + 005d7 48 8b 54 24 48 mov rdx, QWORD PTR x$GSCopy$1$[rsp] + 005dc 4c 8b 4c 24 60 mov r9, QWORD PTR comp$GSCopy$1$[rsp] + 005e1 89 6c 24 20 mov DWORD PTR [rsp+32], ebp + 005e5 e8 00 00 00 00 call load_jpeg_image +; Line 3529 + 005ea 48 8b cb mov rcx, rbx + 005ed 4c 8b f8 mov r15, rax + 005f0 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 613 : #endif -; 614 : -; 615 : // then the formats that can end up attempting to load with just 1 or 2 -; 616 : // bytes matching expectations; these are prone to false positives, so -; 617 : // try them later -; 618 : #ifndef STBI_NO_JPEG -; 619 : if (stbi__jpeg_test(s)) return stbi__jpeg_load(s, x, y, comp, req_comp, ri); - - 0066f 49 8b c4 mov rax, r12 - 00672 e9 37 01 00 00 jmp $LN1@stbi__load -$LN132@stbi__load: - -; 1079 : if (s->read_from_callbacks) { - - 00677 44 39 67 30 cmp DWORD PTR [rdi+48], r12d - 0067b 74 16 je SHORT $LN133@stbi__load - -; 1080 : stbi__refill_buffer(s); - - 0067d 48 8b cf mov rcx, rdi - 00680 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00685 48 8b 06 mov rax, QWORD PTR [rsi] - 00688 0f b6 18 movzx ebx, BYTE PTR [rax] - 0068b 48 ff c0 inc rax - 0068e 48 89 06 mov QWORD PTR [rsi], rax - 00691 eb 02 jmp SHORT $LN131@stbi__load -$LN133@stbi__load: - -; 1082 : } -; 1083 : return 0; - - 00693 32 db xor bl, bl -$LN131@stbi__load: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00695 49 3b 06 cmp rax, QWORD PTR [r14] - 00698 73 0b jae SHORT $LN136@stbi__load - -; 1078 : return *s->img_buffer++; - - 0069a 0f b6 08 movzx ecx, BYTE PTR [rax] - 0069d 48 ff c0 inc rax - 006a0 48 89 06 mov QWORD PTR [rsi], rax - 006a3 eb 1e jmp SHORT $LN135@stbi__load -$LN136@stbi__load: - -; 1079 : if (s->read_from_callbacks) { - - 006a5 44 39 67 30 cmp DWORD PTR [rdi+48], r12d - 006a9 74 16 je SHORT $LN137@stbi__load - -; 1080 : stbi__refill_buffer(s); - - 006ab 48 8b cf mov rcx, rdi - 006ae e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 006b3 48 8b 06 mov rax, QWORD PTR [rsi] - 006b6 0f b6 08 movzx ecx, BYTE PTR [rax] - 006b9 48 ff c0 inc rax - 006bc 48 89 06 mov QWORD PTR [rsi], rax - 006bf eb 02 jmp SHORT $LN135@stbi__load -$LN137@stbi__load: - -; 1082 : } -; 1083 : return 0; - - 006c1 32 c9 xor cl, cl -$LN135@stbi__load: - -; 7067 : if (p != 'P' || (t != '5' && t != '6')) { - - 006c3 80 fb 50 cmp bl, 80 ; 00000050H - 006c6 75 30 jne SHORT $LN129@stbi__load - 006c8 80 e9 35 sub cl, 53 ; 00000035H - 006cb 80 f9 01 cmp cl, 1 - 006ce 77 28 ja SHORT $LN129@stbi__load - -; 620 : #endif -; 621 : #ifndef STBI_NO_PNM -; 622 : if (stbi__pnm_test(s)) return stbi__pnm_load(s, x, y, comp, req_comp, ri); - - 006d0 48 8b 4c 24 50 mov rcx, QWORD PTR ri$GSCopy$1$[rsp] - 006d5 4d 8b c7 mov r8, r15 - 006d8 4c 8b 4c 24 58 mov r9, QWORD PTR comp$GSCopy$1$[rsp] - 006dd 48 8b 54 24 40 mov rdx, QWORD PTR x$GSCopy$1$[rsp] - 006e2 48 89 4c 24 28 mov QWORD PTR [rsp+40], rcx - 006e7 48 8b cf mov rcx, rdi - 006ea 89 6c 24 20 mov DWORD PTR [rsp+32], ebp - 006ee e8 00 00 00 00 call stbi__pnm_load - 006f3 e9 b6 00 00 00 jmp $LN1@stbi__load -$LN129@stbi__load: - -; 342 : s->img_buffer = s->img_buffer_original; - - 006f8 48 8b 87 d0 00 - 00 00 mov rax, QWORD PTR [rdi+208] - -; 623 : #endif -; 624 : -; 625 : #ifndef STBI_NO_HDR -; 626 : if (stbi__hdr_test(s)) { - - 006ff 48 8b cf mov rcx, rdi - -; 342 : s->img_buffer = s->img_buffer_original; - - 00702 48 89 06 mov QWORD PTR [rsi], rax - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - - 00705 48 8b 87 d8 00 - 00 00 mov rax, QWORD PTR [rdi+216] - 0070c 49 89 06 mov QWORD PTR [r14], rax - -; 623 : #endif -; 624 : -; 625 : #ifndef STBI_NO_HDR -; 626 : if (stbi__hdr_test(s)) { - - 0070f e8 00 00 00 00 call stbi__hdr_test - 00714 85 c0 test eax, eax - 00716 74 42 je SHORT $LN9@stbi__load - -; 627 : float* hdr = stbi__hdr_load(s, x, y, comp, req_comp, ri); - - 00718 48 8b 4c 24 50 mov rcx, QWORD PTR ri$GSCopy$1$[rsp] - 0071d 4d 8b c7 mov r8, r15 - 00720 48 8b 5c 24 58 mov rbx, QWORD PTR comp$GSCopy$1$[rsp] - 00725 4c 8b 74 24 40 mov r14, QWORD PTR x$GSCopy$1$[rsp] - 0072a 4c 8b cb mov r9, rbx - 0072d 48 89 4c 24 28 mov QWORD PTR [rsp+40], rcx - 00732 49 8b d6 mov rdx, r14 - 00735 48 8b cf mov rcx, rdi - 00738 89 6c 24 20 mov DWORD PTR [rsp+32], ebp - 0073c e8 00 00 00 00 call stbi__hdr_load - -; 628 : return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp); - - 00741 85 ed test ebp, ebp - 00743 75 02 jne SHORT $LN13@stbi__load - 00745 8b 2b mov ebp, DWORD PTR [rbx] +; Line 619 + 005f6 49 8b c7 mov rax, r15 + 005f9 e9 3a 01 00 00 jmp $LN1@stbi__load +$LN166@stbi__load: +; Line 1079 + 005fe 44 39 7e 30 cmp DWORD PTR [rsi+48], r15d + 00602 74 16 je SHORT $LN167@stbi__load +; Line 1080 + 00604 48 8b ce mov rcx, rsi + 00607 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 0060c 48 8b 07 mov rax, QWORD PTR [rdi] + 0060f 0f b6 18 movzx ebx, BYTE PTR [rax] + 00612 48 ff c0 inc rax + 00615 48 89 07 mov QWORD PTR [rdi], rax + 00618 eb 02 jmp SHORT $LN165@stbi__load +$LN167@stbi__load: +; Line 1083 + 0061a 32 db xor bl, bl +$LN165@stbi__load: +; Line 1077 + 0061c 49 3b 06 cmp rax, QWORD PTR [r14] + 0061f 73 0b jae SHORT $LN170@stbi__load +; Line 1078 + 00621 0f b6 08 movzx ecx, BYTE PTR [rax] + 00624 48 ff c0 inc rax + 00627 48 89 07 mov QWORD PTR [rdi], rax + 0062a eb 1e jmp SHORT $LN169@stbi__load +$LN170@stbi__load: +; Line 1079 + 0062c 44 39 7e 30 cmp DWORD PTR [rsi+48], r15d + 00630 74 16 je SHORT $LN171@stbi__load +; Line 1080 + 00632 48 8b ce mov rcx, rsi + 00635 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 0063a 48 8b 07 mov rax, QWORD PTR [rdi] + 0063d 0f b6 08 movzx ecx, BYTE PTR [rax] + 00640 48 ff c0 inc rax + 00643 48 89 07 mov QWORD PTR [rdi], rax + 00646 eb 02 jmp SHORT $LN169@stbi__load +$LN171@stbi__load: +; Line 1083 + 00648 32 c9 xor cl, cl +$LN169@stbi__load: +; Line 7067 + 0064a 80 fb 50 cmp bl, 80 ; 00000050H + 0064d 75 32 jne SHORT $LN163@stbi__load + 0064f 80 e9 35 sub cl, 53 ; 00000035H + 00652 80 f9 01 cmp cl, 1 + 00655 77 2a ja SHORT $LN163@stbi__load +; Line 622 + 00657 48 8b 44 24 50 mov rax, QWORD PTR ri$GSCopy$1$[rsp] + 0065c 48 8b ce mov rcx, rsi + 0065f 4c 8b 4c 24 60 mov r9, QWORD PTR comp$GSCopy$1$[rsp] + 00664 4c 8b 44 24 40 mov r8, QWORD PTR y$GSCopy$1$[rsp] + 00669 48 8b 54 24 48 mov rdx, QWORD PTR x$GSCopy$1$[rsp] + 0066e 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 00673 89 6c 24 20 mov DWORD PTR [rsp+32], ebp + 00677 e8 00 00 00 00 call stbi__pnm_load + 0067c e9 b7 00 00 00 jmp $LN1@stbi__load +$LN163@stbi__load: +; Line 342 + 00681 48 8b 86 d0 00 + 00 00 mov rax, QWORD PTR [rsi+208] +; Line 626 + 00688 48 8b ce mov rcx, rsi +; Line 342 + 0068b 48 89 07 mov QWORD PTR [rdi], rax +; Line 343 + 0068e 48 8b 86 d8 00 + 00 00 mov rax, QWORD PTR [rsi+216] + 00695 49 89 06 mov QWORD PTR [r14], rax +; Line 626 + 00698 e8 00 00 00 00 call stbi__hdr_test + 0069d 48 8b ce mov rcx, rsi + 006a0 85 c0 test eax, eax + 006a2 74 45 je SHORT $LN9@stbi__load +; Line 627 + 006a4 48 8b 44 24 50 mov rax, QWORD PTR ri$GSCopy$1$[rsp] + 006a9 48 8b 7c 24 60 mov rdi, QWORD PTR comp$GSCopy$1$[rsp] + 006ae 4c 8b 64 24 40 mov r12, QWORD PTR y$GSCopy$1$[rsp] + 006b3 4c 8b cf mov r9, rdi + 006b6 4c 8b 74 24 48 mov r14, QWORD PTR x$GSCopy$1$[rsp] + 006bb 4d 8b c4 mov r8, r12 + 006be 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 006c3 49 8b d6 mov rdx, r14 + 006c6 89 6c 24 20 mov DWORD PTR [rsp+32], ebp + 006ca e8 00 00 00 00 call stbi__hdr_load +; Line 628 + 006cf 85 ed test ebp, ebp + 006d1 75 02 jne SHORT $LN13@stbi__load + 006d3 8b 2f mov ebp, DWORD PTR [rdi] $LN13@stbi__load: - 00747 45 8b 07 mov r8d, DWORD PTR [r15] - 0074a 44 8b cd mov r9d, ebp - 0074d 41 8b 16 mov edx, DWORD PTR [r14] - 00750 48 8b c8 mov rcx, rax - 00753 e8 00 00 00 00 call stbi__hdr_to_ldr - 00758 eb 54 jmp SHORT $LN1@stbi__load + 006d5 45 8b 04 24 mov r8d, DWORD PTR [r12] + 006d9 44 8b cd mov r9d, ebp + 006dc 41 8b 16 mov edx, DWORD PTR [r14] + 006df 48 8b c8 mov rcx, rax + 006e2 e8 00 00 00 00 call stbi__hdr_to_ldr + 006e7 eb 4f jmp SHORT $LN1@stbi__load $LN9@stbi__load: - -; 629 : } -; 630 : #endif -; 631 : -; 632 : #ifndef STBI_NO_TGA -; 633 : // test tga last because it's a crappy test! -; 634 : if (stbi__tga_test(s)) - - 0075a 48 8b cf mov rcx, rdi - 0075d e8 00 00 00 00 call stbi__tga_test - 00762 85 c0 test eax, eax - 00764 74 25 je SHORT $LN10@stbi__load - -; 635 : return stbi__tga_load(s, x, y, comp, req_comp, ri); - - 00766 48 8b 4c 24 50 mov rcx, QWORD PTR ri$GSCopy$1$[rsp] - 0076b 4d 8b c7 mov r8, r15 - 0076e 4c 8b 4c 24 58 mov r9, QWORD PTR comp$GSCopy$1$[rsp] - 00773 48 8b 54 24 40 mov rdx, QWORD PTR x$GSCopy$1$[rsp] - 00778 48 89 4c 24 28 mov QWORD PTR [rsp+40], rcx - 0077d 48 8b cf mov rcx, rdi - 00780 89 6c 24 20 mov DWORD PTR [rsp+32], ebp - 00784 e8 00 00 00 00 call stbi__tga_load - 00789 eb 23 jmp SHORT $LN1@stbi__load +; Line 634 + 006e9 e8 00 00 00 00 call stbi__tga_test + 006ee 85 c0 test eax, eax + 006f0 74 27 je SHORT $LN10@stbi__load +; Line 635 + 006f2 48 8b 44 24 50 mov rax, QWORD PTR ri$GSCopy$1$[rsp] + 006f7 48 8b ce mov rcx, rsi + 006fa 4c 8b 4c 24 60 mov r9, QWORD PTR comp$GSCopy$1$[rsp] + 006ff 4c 8b 44 24 40 mov r8, QWORD PTR y$GSCopy$1$[rsp] + 00704 48 8b 54 24 48 mov rdx, QWORD PTR x$GSCopy$1$[rsp] + 00709 48 89 44 24 28 mov QWORD PTR [rsp+40], rax + 0070e 89 6c 24 20 mov DWORD PTR [rsp+32], ebp + 00712 e8 00 00 00 00 call stbi__tga_load + 00717 eb 1f jmp SHORT $LN1@stbi__load $LN10@stbi__load: - -; 431 : stbi__g_failure_reason = str; - - 0078b 65 48 8b 04 25 +; Line 431 + 00719 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00794 8b 0d 00 00 00 - 00 mov ecx, DWORD PTR _tls_index - 0079a 41 8b dd mov ebx, r13d - 0079d 48 8b 14 c8 mov rdx, QWORD PTR [rax+rcx*8] - 007a1 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:??_C@_0BD@CBEDEJPH@unknown?5image?5type@ - 007a8 48 89 04 13 mov QWORD PTR [rbx+rdx], rax - -; 636 : #endif -; 637 : -; 638 : return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt"); - - 007ac 33 c0 xor eax, eax + 00722 48 8d 0d 00 00 + 00 00 lea rcx, OFFSET FLAT:??_C@_0BD@CBEDEJPH@unknown?5image?5type@ + 00729 4a 8b 14 e8 mov rdx, QWORD PTR [rax+r13*8] + 0072d 48 8b 44 24 68 mov rax, QWORD PTR tv1167[rsp] + 00732 48 89 0c 10 mov QWORD PTR [rax+rdx], rcx +; Line 638 + 00736 33 c0 xor eax, eax $LN1@stbi__load: - -; 639 : } - - 007ae 48 8b 8c 24 98 +; Line 639 + 00738 48 8b 8c 24 98 00 00 00 mov rcx, QWORD PTR __$ArrayPad$[rsp] - 007b6 48 33 cc xor rcx, rsp - 007b9 e8 00 00 00 00 call __security_check_cookie - 007be 48 81 c4 a8 00 + 00740 48 33 cc xor rcx, rsp + 00743 e8 00 00 00 00 call __security_check_cookie + 00748 48 81 c4 a8 00 00 00 add rsp, 168 ; 000000a8H - 007c5 41 5f pop r15 - 007c7 41 5e pop r14 - 007c9 41 5d pop r13 - 007cb 41 5c pop r12 - 007cd 5f pop rdi - 007ce 5e pop rsi - 007cf 5d pop rbp - 007d0 5b pop rbx - 007d1 c3 ret 0 + 0074f 41 5f pop r15 + 00751 41 5e pop r14 + 00753 41 5d pop r13 + 00755 41 5c pop r12 + 00757 5f pop rdi + 00758 5e pop rsi + 00759 5d pop rbp + 0075a 5b pop rbx + 0075b c3 ret 0 stbi__load_main ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__convert_16_to_8 _TEXT SEGMENT orig$ = 48 @@ -7794,9 +5980,8 @@ w$ = 56 h$ = 64 channels$ = 72 stbi__convert_16_to_8 PROC ; COMDAT - -; 642 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 642 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi @@ -7804,33 +5989,20 @@ stbi__convert_16_to_8 PROC ; COMDAT 00010 48 83 ec 20 sub rsp, 32 ; 00000020H 00014 8b da mov ebx, edx 00016 48 8b f1 mov rsi, rcx - -; 643 : int i; -; 644 : int img_len = w * h * channels; - +; Line 644 00019 41 0f af d8 imul ebx, r8d 0001d 41 0f af d9 imul ebx, r9d - -; 645 : stbi_uc* reduced; -; 646 : -; 647 : reduced = (stbi_uc*)stbi__malloc(img_len); - +; Line 647 00021 48 63 eb movsxd rbp, ebx - -; 438 : return STBI_MALLOC(size); - +; Line 438 00024 48 8b cd mov rcx, rbp 00027 ff 15 00 00 00 00 call QWORD PTR __imp_malloc 0002d 48 8b f8 mov rdi, rax - -; 648 : if (reduced == NULL) return stbi__errpuc("outofmem", "Out of memory"); - +; Line 648 00030 48 85 c0 test rax, rax 00033 75 2a jne SHORT $LN5@stbi__conv - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00035 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 0003e 8b 0d 00 00 00 @@ -7840,16 +6012,11 @@ stbi__convert_16_to_8 PROC ; COMDAT 0004d 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ 00054 48 89 04 0a mov QWORD PTR [rdx+rcx], rax - -; 648 : if (reduced == NULL) return stbi__errpuc("outofmem", "Out of memory"); - +; Line 648 00058 33 c0 xor eax, eax 0005a e9 4d 01 00 00 jmp $LN1@stbi__conv $LN5@stbi__conv: - -; 649 : -; 650 : for (i = 0; i < img_len; ++i) - +; Line 650 0005f 45 33 c0 xor r8d, r8d 00062 41 8b d0 mov edx, r8d 00065 85 db test ebx, ebx @@ -7871,9 +6038,7 @@ $LN17@stbi__conv: 00092 83 fb 20 cmp ebx, 32 ; 00000020H 00095 0f 82 ac 00 00 00 jb $LN16@stbi__conv - -; 651 : reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is sufficient approx of 16->8 bit scaling - +; Line 651 0009b 8b cb mov ecx, ebx 0009d 81 e1 1f 00 00 80 and ecx, -2147483617 ; ffffffff8000001fH @@ -7884,14 +6049,9 @@ $LN17@stbi__conv: $LN28@stbi__conv: 000ac 8b c3 mov eax, ebx 000ae 2b c1 sub eax, ecx - -; 649 : -; 650 : for (i = 0; i < img_len; ++i) - +; Line 650 000b0 48 63 c8 movsxd rcx, eax - -; 651 : reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is sufficient approx of 16->8 bit scaling - +; Line 651 000b3 48 8d 46 20 lea rax, QWORD PTR [rsi+32] 000b7 66 0f 1f 84 00 00 00 00 00 npad 9 @@ -7929,18 +6089,13 @@ $LL4@stbi__conv: 00136 49 83 c0 20 add r8, 32 ; 00000020H 0013a 4c 3b c1 cmp r8, rcx 0013d 7c 81 jl SHORT $LL4@stbi__conv - -; 649 : -; 650 : for (i = 0; i < img_len; ++i) - +; Line 650 0013f 8b c3 mov eax, ebx 00141 24 1f and al, 31 00143 3c 04 cmp al, 4 00145 72 3f jb SHORT $LN14@stbi__conv $LN16@stbi__conv: - -; 651 : reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is sufficient approx of 16->8 bit scaling - +; Line 651 00147 8b c3 mov eax, ebx 00149 25 03 00 00 80 and eax, -2147483645 ; ffffffff80000003H 0014e 7d 07 jge SHORT $LN27@stbi__conv @@ -7949,17 +6104,12 @@ $LN16@stbi__conv: 00155 ff c0 inc eax $LN27@stbi__conv: 00157 2b d8 sub ebx, eax - -; 649 : -; 650 : for (i = 0; i < img_len; ++i) - +; Line 650 00159 48 63 c2 movsxd rax, edx 0015c 48 63 cb movsxd rcx, ebx 0015f 90 npad 1 $LL15@stbi__conv: - -; 651 : reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is sufficient approx of 16->8 bit scaling - +; Line 651 00160 f3 0f 7e 04 46 movq xmm0, QWORD PTR [rsi+rax*2] 00165 83 c2 04 add edx, 4 00168 66 0f 71 d0 08 psrlw xmm0, 8 @@ -7971,39 +6121,27 @@ $LL15@stbi__conv: 00181 48 3b c1 cmp rax, rcx 00184 7c da jl SHORT $LL15@stbi__conv $LN14@stbi__conv: - -; 649 : -; 650 : for (i = 0; i < img_len; ++i) - +; Line 650 00186 48 63 c2 movsxd rax, edx 00189 48 3b c5 cmp rax, rbp 0018c 7d 12 jge SHORT $LN3@stbi__conv 0018e 66 90 npad 2 $LL13@stbi__conv: - -; 651 : reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is sufficient approx of 16->8 bit scaling - +; Line 651 00190 0f b6 4c 46 01 movzx ecx, BYTE PTR [rsi+rax*2+1] 00195 88 0c 38 mov BYTE PTR [rax+rdi], cl 00198 48 ff c0 inc rax 0019b 48 3b c5 cmp rax, rbp 0019e 7c f0 jl SHORT $LL13@stbi__conv $LN3@stbi__conv: - -; 652 : -; 653 : STBI_FREE(orig); - +; Line 653 001a0 48 8b ce mov rcx, rsi 001a3 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 654 : return reduced; - +; Line 654 001a9 48 8b c7 mov rax, rdi $LN1@stbi__conv: - -; 655 : } - +; Line 655 001ac 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 001b1 48 8b 6c 24 38 mov rbp, QWORD PTR [rsp+56] 001b6 48 8b 74 24 40 mov rsi, QWORD PTR [rsp+64] @@ -8013,7 +6151,6 @@ $LN1@stbi__conv: stbi__convert_16_to_8 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__vertical_flip _TEXT SEGMENT temp$ = 32 @@ -8023,9 +6160,8 @@ w$ = 2184 h$ = 2192 bytes_per_pixel$ = 2200 stbi__vertical_flip PROC ; COMDAT - -; 674 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 674 00000 4c 8b dc mov r11, rsp 00003 41 54 push r12 00005 41 57 push r15 @@ -8037,17 +6173,9 @@ stbi__vertical_flip PROC ; COMDAT 00018 48 89 84 24 20 08 00 00 mov QWORD PTR __$ArrayPad$[rsp], rax 00020 4c 8b e1 mov r12, rcx - -; 675 : int row; -; 676 : size_t bytes_per_row = (size_t)w * bytes_per_pixel; - +; Line 676 00023 4d 63 f9 movsxd r15, r9d - -; 677 : stbi_uc temp[2048]; -; 678 : stbi_uc* bytes = (stbi_uc*)image; -; 679 : -; 680 : for (row = 0; row < (h >> 1); row++) { - +; Line 680 00026 41 8b c8 mov ecx, r8d 00029 48 63 c2 movsxd rax, edx 0002c d1 f9 sar ecx, 1 @@ -8070,73 +6198,45 @@ stbi__vertical_flip PROC ; COMDAT 0f 1f 84 00 00 00 00 00 npad 13 $LL4@stbi__vert: - -; 681 : stbi_uc* row0 = bytes + row * bytes_per_row; - +; Line 681 00070 49 8b f4 mov rsi, r12 - -; 682 : stbi_uc* row1 = bytes + (h - row - 1) * bytes_per_row; - +; Line 682 00073 48 8b eb mov rbp, rbx - -; 683 : // swap row0 with row1 -; 684 : size_t bytes_left = bytes_per_row; - +; Line 684 00076 4d 8b f7 mov r14, r15 - -; 685 : while (bytes_left) { - +; Line 685 00079 4d 85 ff test r15, r15 0007c 74 47 je SHORT $LN2@stbi__vert 0007e 66 90 npad 2 $LL5@stbi__vert: - -; 686 : size_t bytes_copy = (bytes_left < sizeof(temp)) ? bytes_left : sizeof(temp); - +; Line 686 00080 bf 00 08 00 00 mov edi, 2048 ; 00000800H - -; 687 : memcpy(temp, row0, bytes_copy); - +; Line 687 00085 48 8d 4c 24 20 lea rcx, QWORD PTR temp$[rsp] 0008a 4c 3b f7 cmp r14, rdi 0008d 48 8b d6 mov rdx, rsi 00090 49 0f 42 fe cmovb rdi, r14 00094 4c 8b c7 mov r8, rdi 00097 e8 00 00 00 00 call memcpy - -; 688 : memcpy(row0, row1, bytes_copy); - +; Line 688 0009c 4c 8b c7 mov r8, rdi 0009f 48 8b d5 mov rdx, rbp 000a2 48 8b ce mov rcx, rsi 000a5 e8 00 00 00 00 call memcpy - -; 689 : memcpy(row1, temp, bytes_copy); - +; Line 689 000aa 4c 8b c7 mov r8, rdi 000ad 48 8d 54 24 20 lea rdx, QWORD PTR temp$[rsp] 000b2 48 8b cd mov rcx, rbp 000b5 e8 00 00 00 00 call memcpy - -; 690 : row0 += bytes_copy; - +; Line 690 000ba 48 03 f7 add rsi, rdi - -; 691 : row1 += bytes_copy; - +; Line 691 000bd 48 03 ef add rbp, rdi - -; 692 : bytes_left -= bytes_copy; - +; Line 692 000c0 4c 2b f7 sub r14, rdi 000c3 75 bb jne SHORT $LL5@stbi__vert $LN2@stbi__vert: - -; 677 : stbi_uc temp[2048]; -; 678 : stbi_uc* bytes = (stbi_uc*)image; -; 679 : -; 680 : for (row = 0; row < (h >> 1); row++) { - +; Line 680 000c5 4d 03 e7 add r12, r15 000c8 49 2b df sub rbx, r15 000cb 49 83 ed 01 sub r13, 1 @@ -8154,11 +6254,7 @@ $LN2@stbi__vert: 000f9 48 8b 9c 24 60 08 00 00 mov rbx, QWORD PTR [rsp+2144] $LN3@stbi__vert: - -; 693 : } -; 694 : } -; 695 : } - +; Line 695 00101 48 8b 8c 24 20 08 00 00 mov rcx, QWORD PTR __$ArrayPad$[rsp] 00109 48 33 cc xor rcx, rsp @@ -8171,7 +6267,6 @@ $LN3@stbi__vert: stbi__vertical_flip ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__load_and_postprocess_8bit _TEXT SEGMENT ri$ = 64 @@ -8182,9 +6277,8 @@ y$ = 160 comp$ = 168 req_comp$ = 176 stbi__load_and_postprocess_8bit PROC ; COMDAT - -; 712 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 712 00000 40 53 push rbx 00002 56 push rsi 00003 57 push rdi @@ -8197,10 +6291,7 @@ stbi__load_and_postprocess_8bit PROC ; COMDAT 00016 48 89 44 24 50 mov QWORD PTR __$ArrayPad$[rsp], rax 0001b 8b 9c 24 b0 00 00 00 mov ebx, DWORD PTR req_comp$[rsp] - -; 713 : stbi__result_info ri; -; 714 : void* result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8); - +; Line 714 00022 48 8d 44 24 40 lea rax, QWORD PTR ri$[rsp] 00027 48 89 44 24 28 mov QWORD PTR [rsp+40], rax 0002c 49 8b f1 mov rsi, r9 @@ -8209,26 +6300,14 @@ stbi__load_and_postprocess_8bit PROC ; COMDAT 00036 4c 8b f2 mov r14, rdx 00039 e8 00 00 00 00 call stbi__load_main 0003e 48 8b f8 mov rdi, rax - -; 715 : -; 716 : if (result == NULL) - +; Line 716 00041 48 85 c0 test rax, rax 00044 74 78 je SHORT $LN1@stbi__load $LN2@stbi__load: - -; 717 : return NULL; -; 718 : -; 719 : // it is the responsibility of the loaders to make sure we get either 8 or 16 bit. -; 720 : STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16); -; 721 : -; 722 : if (ri.bits_per_channel != 8) { - +; Line 722 00046 83 7c 24 40 08 cmp DWORD PTR ri$[rsp], 8 0004b 74 25 je SHORT $LN3@stbi__load - -; 723 : result = stbi__convert_16_to_8((stbi__uint16*)result, *x, *y, req_comp == 0 ? *comp : req_comp); - +; Line 723 0004d 85 db test ebx, ebx 0004f 75 05 jne SHORT $LN6@stbi__load 00051 44 8b 0e mov r9d, DWORD PTR [rsi] @@ -8241,19 +6320,11 @@ $LN7@stbi__load: 0005f 41 8b 16 mov edx, DWORD PTR [r14] 00062 e8 00 00 00 00 call stbi__convert_16_to_8 00067 48 8b f8 mov rdi, rax - -; 724 : ri.bits_per_channel = 8; - +; Line 724 0006a c7 44 24 40 08 00 00 00 mov DWORD PTR ri$[rsp], 8 $LN3@stbi__load: - -; 725 : } -; 726 : -; 727 : // @TODO: move stbi__convert_format to here -; 728 : -; 729 : if (stbi__vertically_flip_on_load) { - +; Line 729 00072 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index 00078 65 48 8b 04 25 @@ -8271,32 +6342,22 @@ $LN8@stbi__load: $LN9@stbi__load: 000a0 85 c0 test eax, eax 000a2 74 17 je SHORT $LN4@stbi__load - -; 730 : int channels = req_comp ? req_comp : *comp; - +; Line 730 000a4 85 db test ebx, ebx 000a6 75 02 jne SHORT $LN11@stbi__load 000a8 8b 1e mov ebx, DWORD PTR [rsi] $LN11@stbi__load: - -; 731 : stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi_uc)); - +; Line 731 000aa 45 8b 07 mov r8d, DWORD PTR [r15] 000ad 44 8b cb mov r9d, ebx 000b0 41 8b 16 mov edx, DWORD PTR [r14] 000b3 48 8b cf mov rcx, rdi 000b6 e8 00 00 00 00 call stbi__vertical_flip $LN4@stbi__load: - -; 732 : } -; 733 : -; 734 : return (unsigned char*)result; - +; Line 734 000bb 48 8b c7 mov rax, rdi $LN1@stbi__load: - -; 735 : } - +; Line 735 000be 48 8b 4c 24 50 mov rcx, QWORD PTR __$ArrayPad$[rsp] 000c3 48 33 cc xor rcx, rsp 000c6 e8 00 00 00 00 call __security_check_cookie @@ -8310,7 +6371,6 @@ $LN1@stbi__load: stbi__load_and_postprocess_8bit ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__fopen _TEXT SEGMENT f$ = 32 @@ -8318,35 +6378,14 @@ __$ArrayPad$ = 40 filename$ = 64 mode$dead$ = 72 stbi__fopen PROC ; COMDAT - -; 789 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 789 00000 48 83 ec 38 sub rsp, 56 ; 00000038H 00004 48 8b 05 00 00 00 00 mov rax, QWORD PTR __security_cookie 0000b 48 33 c4 xor rax, rsp 0000e 48 89 44 24 28 mov QWORD PTR __$ArrayPad$[rsp], rax - -; 790 : FILE* f; -; 791 : #if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) -; 792 : wchar_t wMode[64]; -; 793 : wchar_t wFilename[1024]; -; 794 : if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename) / sizeof(*wFilename))) -; 795 : return 0; -; 796 : -; 797 : if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode) / sizeof(*wMode))) -; 798 : return 0; -; 799 : -; 800 : #if defined(_MSC_VER) && _MSC_VER >= 1400 -; 801 : if (0 != _wfopen_s(&f, wFilename, wMode)) -; 802 : f = 0; -; 803 : #else -; 804 : f = _wfopen(wFilename, wMode); -; 805 : #endif -; 806 : -; 807 : #elif defined(_MSC_VER) && _MSC_VER >= 1400 -; 808 : if (0 != fopen_s(&f, filename, mode)) - +; Line 808 00013 48 8b d1 mov rdx, rcx 00016 4c 8d 05 00 00 00 00 lea r8, OFFSET FLAT:??_C@_02JDPG@rb@ @@ -8355,34 +6394,18 @@ stbi__fopen PROC ; COMDAT 00 call QWORD PTR __imp_fopen_s 00028 85 c0 test eax, eax 0002a 74 14 je SHORT $LN4@stbi__fope - -; 809 : f = 0; -; 810 : #else -; 811 : f = fopen(filename, mode); -; 812 : #endif -; 813 : return f; - +; Line 813 0002c 33 c0 xor eax, eax - -; 814 : } - +; Line 814 0002e 48 8b 4c 24 28 mov rcx, QWORD PTR __$ArrayPad$[rsp] 00033 48 33 cc xor rcx, rsp 00036 e8 00 00 00 00 call __security_check_cookie 0003b 48 83 c4 38 add rsp, 56 ; 00000038H 0003f c3 ret 0 $LN4@stbi__fope: - -; 809 : f = 0; -; 810 : #else -; 811 : f = fopen(filename, mode); -; 812 : #endif -; 813 : return f; - +; Line 813 00040 48 8b 44 24 20 mov rax, QWORD PTR f$[rsp] - -; 814 : } - +; Line 814 00045 48 8b 4c 24 28 mov rcx, QWORD PTR __$ArrayPad$[rsp] 0004a 48 33 cc xor rcx, rsp 0004d e8 00 00 00 00 call __security_check_cookie @@ -8391,7 +6414,6 @@ $LN4@stbi__fope: stbi__fopen ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi_load _TEXT SEGMENT f$1 = 48 @@ -8402,9 +6424,8 @@ y$ = 128 comp$ = 136 req_comp$ = 144 stbi_load PROC ; COMDAT - -; 817 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 817 $LN13: 00000 40 53 push rbx 00002 55 push rbp @@ -8419,431 +6440,34 @@ $LN13: 0001a 44 8b b4 24 90 00 00 00 mov r14d, DWORD PTR req_comp$[rsp] 00022 48 8b da mov rbx, rdx - -; 808 : if (0 != fopen_s(&f, filename, mode)) - +; Line 808 00025 48 8b d1 mov rdx, rcx - -; 817 : { - +; Line 817 00028 49 8b f0 mov rsi, r8 - -; 808 : if (0 != fopen_s(&f, filename, mode)) - +; Line 808 0002b 48 8d 4c 24 30 lea rcx, QWORD PTR f$1[rsp] - -; 817 : { - +; Line 817 00030 49 8b e9 mov rbp, r9 - -; 808 : if (0 != fopen_s(&f, filename, mode)) - +; Line 808 00033 4c 8d 05 00 00 00 00 lea r8, OFFSET FLAT:??_C@_02JDPG@rb@ 0003a ff 15 00 00 00 00 call QWORD PTR __imp_fopen_s 00040 85 c0 test eax, eax 00042 74 09 je SHORT $LN9@stbi_load - -; 809 : f = 0; - +; Line 809 00044 33 ff xor edi, edi 00046 48 89 7c 24 30 mov QWORD PTR f$1[rsp], rdi 0004b eb 05 jmp SHORT $LN5@stbi_load $LN9@stbi_load: - -; 432 : return 0; -; 433 : } -; 434 : #endif -; 435 : -; 436 : static void* stbi__malloc(size_t size) -; 437 : { -; 438 : return STBI_MALLOC(size); -; 439 : } -; 440 : -; 441 : // stb_image uses ints pervasively, including for offset calculations. -; 442 : // therefore the largest decoded image size we can support with the -; 443 : // current code, even on 64-bit targets, is INT_MAX. this is not a -; 444 : // significant limitation for the intended use case. -; 445 : // -; 446 : // we do, however, need to make sure our size calculations don't -; 447 : // overflow. hence a few helper functions for size calculations that -; 448 : // multiply integers together, making sure that they're non-negative -; 449 : // and no overflow occurs. -; 450 : -; 451 : // return 1 if the sum is valid, 0 on overflow. -; 452 : // negative terms are considered invalid. -; 453 : static int stbi__addsizes_valid(int a, int b) -; 454 : { -; 455 : if (b < 0) return 0; -; 456 : // now 0 <= b <= INT_MAX, hence also -; 457 : // 0 <= INT_MAX - b <= INTMAX. -; 458 : // And "a + b <= INT_MAX" (which might overflow) is the -; 459 : // same as a <= INT_MAX - b (no overflow) -; 460 : return a <= INT_MAX - b; -; 461 : } -; 462 : -; 463 : // returns 1 if the product is valid, 0 on overflow. -; 464 : // negative factors are considered invalid. -; 465 : static int stbi__mul2sizes_valid(int a, int b) -; 466 : { -; 467 : if (a < 0 || b < 0) return 0; -; 468 : if (b == 0) return 1; // mul-by-0 is always safe -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; -; 471 : } -; 472 : -; 473 : #if !defined(STBI_NO_JPEG) || !defined(STBI_NO_PNG) || !defined(STBI_NO_TGA) || !defined(STBI_NO_HDR) -; 474 : // returns 1 if "a*b + add" has no negative terms/factors and doesn't overflow -; 475 : static int stbi__mad2sizes_valid(int a, int b, int add) -; 476 : { -; 477 : return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add); -; 478 : } -; 479 : #endif -; 480 : -; 481 : // returns 1 if "a*b*c + add" has no negative terms/factors and doesn't overflow -; 482 : static int stbi__mad3sizes_valid(int a, int b, int c, int add) -; 483 : { -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && -; 485 : stbi__addsizes_valid(a * b * c, add); -; 486 : } -; 487 : -; 488 : // returns 1 if "a*b*c*d + add" has no negative terms/factors and doesn't overflow -; 489 : #if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) || !defined(STBI_NO_PNM) -; 490 : static int stbi__mad4sizes_valid(int a, int b, int c, int d, int add) -; 491 : { -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && -; 493 : stbi__mul2sizes_valid(a * b * c, d) && stbi__addsizes_valid(a * b * c * d, add); -; 494 : } -; 495 : #endif -; 496 : -; 497 : #if !defined(STBI_NO_JPEG) || !defined(STBI_NO_PNG) || !defined(STBI_NO_TGA) || !defined(STBI_NO_HDR) -; 498 : // mallocs with size overflow checking -; 499 : static void* stbi__malloc_mad2(int a, int b, int add) -; 500 : { -; 501 : if (!stbi__mad2sizes_valid(a, b, add)) return NULL; -; 502 : return stbi__malloc(a * b + add); -; 503 : } -; 504 : #endif -; 505 : -; 506 : static void* stbi__malloc_mad3(int a, int b, int c, int add) -; 507 : { -; 508 : if (!stbi__mad3sizes_valid(a, b, c, add)) return NULL; -; 509 : return stbi__malloc(a * b * c + add); -; 510 : } -; 511 : -; 512 : #if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) || !defined(STBI_NO_PNM) -; 513 : static void* stbi__malloc_mad4(int a, int b, int c, int d, int add) -; 514 : { -; 515 : if (!stbi__mad4sizes_valid(a, b, c, d, add)) return NULL; -; 516 : return stbi__malloc(a * b * c * d + add); -; 517 : } -; 518 : #endif -; 519 : -; 520 : // returns 1 if the sum of two signed ints is valid (between -2^31 and 2^31-1 inclusive), 0 on overflow. -; 521 : static int stbi__addints_valid(int a, int b) -; 522 : { -; 523 : if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow -; 524 : if (a < 0 && b < 0) return a >= INT_MIN - b; // same as a + b >= INT_MIN; INT_MIN - b cannot overflow since b < 0. -; 525 : return a <= INT_MAX - b; -; 526 : } -; 527 : -; 528 : // returns 1 if the product of two signed shorts is valid, 0 on overflow. -; 529 : static int stbi__mul2shorts_valid(short a, short b) -; 530 : { -; 531 : if (b == 0 || b == -1) return 1; // multiplication by 0 is always 0; check for -1 so SHRT_MIN/b doesn't overflow -; 532 : if ((a >= 0) == (b >= 0)) return a <= SHRT_MAX / b; // product is positive, so similar to mul2sizes_valid -; 533 : if (b < 0) return a <= SHRT_MIN / b; // same as a * b >= SHRT_MIN -; 534 : return a >= SHRT_MIN / b; -; 535 : } -; 536 : -; 537 : // stbi__err - error -; 538 : // stbi__errpf - error returning pointer to float -; 539 : // stbi__errpuc - error returning pointer to unsigned char -; 540 : -; 541 : #ifdef STBI_NO_FAILURE_STRINGS -; 542 : #define stbi__err(x,y) 0 -; 543 : #elif defined(STBI_FAILURE_USERMSG) -; 544 : #define stbi__err(x,y) stbi__err(y) -; 545 : #else -; 546 : #define stbi__err(x,y) stbi__err(x) -; 547 : #endif -; 548 : -; 549 : #define stbi__errpf(x,y) ((float *)(size_t) (stbi__err(x,y)?NULL:NULL)) -; 550 : #define stbi__errpuc(x,y) ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL)) -; 551 : -; 552 : STBIDEF void stbi_image_free(void* retval_from_stbi_load) -; 553 : { -; 554 : STBI_FREE(retval_from_stbi_load); -; 555 : } -; 556 : -; 557 : #ifndef STBI_NO_LINEAR -; 558 : static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp); -; 559 : #endif -; 560 : -; 561 : #ifndef STBI_NO_HDR -; 562 : static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp); -; 563 : #endif -; 564 : -; 565 : static int stbi__vertically_flip_on_load_global = 0; -; 566 : -; 567 : STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip) -; 568 : { -; 569 : stbi__vertically_flip_on_load_global = flag_true_if_should_flip; -; 570 : } -; 571 : -; 572 : #ifndef STBI_THREAD_LOCAL -; 573 : #define stbi__vertically_flip_on_load stbi__vertically_flip_on_load_global -; 574 : #else -; 575 : static STBI_THREAD_LOCAL int stbi__vertically_flip_on_load_local, stbi__vertically_flip_on_load_set; -; 576 : -; 577 : STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip) -; 578 : { -; 579 : stbi__vertically_flip_on_load_local = flag_true_if_should_flip; -; 580 : stbi__vertically_flip_on_load_set = 1; -; 581 : } -; 582 : -; 583 : #define stbi__vertically_flip_on_load (stbi__vertically_flip_on_load_set \ -; 584 : ? stbi__vertically_flip_on_load_local \ -; 585 : : stbi__vertically_flip_on_load_global) -; 586 : #endif // STBI_THREAD_LOCAL -; 587 : -; 588 : static void* stbi__load_main(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc) -; 589 : { -; 590 : memset(ri, 0, sizeof(*ri)); // make sure it's initialized if we add new fields -; 591 : ri->bits_per_channel = 8; // default is 8 so most paths don't have to be changed -; 592 : ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order -; 593 : ri->num_channels = 0; -; 594 : -; 595 : // test the formats with a very explicit header first (at least a FOURCC -; 596 : // or distinctive magic number first) -; 597 : #ifndef STBI_NO_PNG -; 598 : if (stbi__png_test(s)) return stbi__png_load(s, x, y, comp, req_comp, ri); -; 599 : #endif -; 600 : #ifndef STBI_NO_BMP -; 601 : if (stbi__bmp_test(s)) return stbi__bmp_load(s, x, y, comp, req_comp, ri); -; 602 : #endif -; 603 : #ifndef STBI_NO_GIF -; 604 : if (stbi__gif_test(s)) return stbi__gif_load(s, x, y, comp, req_comp, ri); -; 605 : #endif -; 606 : #ifndef STBI_NO_PSD -; 607 : if (stbi__psd_test(s)) return stbi__psd_load(s, x, y, comp, req_comp, ri, bpc); -; 608 : #else -; 609 : STBI_NOTUSED(bpc); -; 610 : #endif -; 611 : #ifndef STBI_NO_PIC -; 612 : if (stbi__pic_test(s)) return stbi__pic_load(s, x, y, comp, req_comp, ri); -; 613 : #endif -; 614 : -; 615 : // then the formats that can end up attempting to load with just 1 or 2 -; 616 : // bytes matching expectations; these are prone to false positives, so -; 617 : // try them later -; 618 : #ifndef STBI_NO_JPEG -; 619 : if (stbi__jpeg_test(s)) return stbi__jpeg_load(s, x, y, comp, req_comp, ri); -; 620 : #endif -; 621 : #ifndef STBI_NO_PNM -; 622 : if (stbi__pnm_test(s)) return stbi__pnm_load(s, x, y, comp, req_comp, ri); -; 623 : #endif -; 624 : -; 625 : #ifndef STBI_NO_HDR -; 626 : if (stbi__hdr_test(s)) { -; 627 : float* hdr = stbi__hdr_load(s, x, y, comp, req_comp, ri); -; 628 : return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp); -; 629 : } -; 630 : #endif -; 631 : -; 632 : #ifndef STBI_NO_TGA -; 633 : // test tga last because it's a crappy test! -; 634 : if (stbi__tga_test(s)) -; 635 : return stbi__tga_load(s, x, y, comp, req_comp, ri); -; 636 : #endif -; 637 : -; 638 : return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt"); -; 639 : } -; 640 : -; 641 : static stbi_uc* stbi__convert_16_to_8(stbi__uint16* orig, int w, int h, int channels) -; 642 : { -; 643 : int i; -; 644 : int img_len = w * h * channels; -; 645 : stbi_uc* reduced; -; 646 : -; 647 : reduced = (stbi_uc*)stbi__malloc(img_len); -; 648 : if (reduced == NULL) return stbi__errpuc("outofmem", "Out of memory"); -; 649 : -; 650 : for (i = 0; i < img_len; ++i) -; 651 : reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is sufficient approx of 16->8 bit scaling -; 652 : -; 653 : STBI_FREE(orig); -; 654 : return reduced; -; 655 : } -; 656 : -; 657 : static stbi__uint16* stbi__convert_8_to_16(stbi_uc* orig, int w, int h, int channels) -; 658 : { -; 659 : int i; -; 660 : int img_len = w * h * channels; -; 661 : stbi__uint16* enlarged; -; 662 : -; 663 : enlarged = (stbi__uint16*)stbi__malloc(img_len * 2); -; 664 : if (enlarged == NULL) return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); -; 665 : -; 666 : for (i = 0; i < img_len; ++i) -; 667 : enlarged[i] = (stbi__uint16)((orig[i] << 8) + orig[i]); // replicate to high and low byte, maps 0->0, 255->0xffff -; 668 : -; 669 : STBI_FREE(orig); -; 670 : return enlarged; -; 671 : } -; 672 : -; 673 : static void stbi__vertical_flip(void* image, int w, int h, int bytes_per_pixel) -; 674 : { -; 675 : int row; -; 676 : size_t bytes_per_row = (size_t)w * bytes_per_pixel; -; 677 : stbi_uc temp[2048]; -; 678 : stbi_uc* bytes = (stbi_uc*)image; -; 679 : -; 680 : for (row = 0; row < (h >> 1); row++) { -; 681 : stbi_uc* row0 = bytes + row * bytes_per_row; -; 682 : stbi_uc* row1 = bytes + (h - row - 1) * bytes_per_row; -; 683 : // swap row0 with row1 -; 684 : size_t bytes_left = bytes_per_row; -; 685 : while (bytes_left) { -; 686 : size_t bytes_copy = (bytes_left < sizeof(temp)) ? bytes_left : sizeof(temp); -; 687 : memcpy(temp, row0, bytes_copy); -; 688 : memcpy(row0, row1, bytes_copy); -; 689 : memcpy(row1, temp, bytes_copy); -; 690 : row0 += bytes_copy; -; 691 : row1 += bytes_copy; -; 692 : bytes_left -= bytes_copy; -; 693 : } -; 694 : } -; 695 : } -; 696 : -; 697 : #ifndef STBI_NO_GIF -; 698 : static void stbi__vertical_flip_slices(void* image, int w, int h, int z, int bytes_per_pixel) -; 699 : { -; 700 : int slice; -; 701 : int slice_size = w * h * bytes_per_pixel; -; 702 : -; 703 : stbi_uc* bytes = (stbi_uc*)image; -; 704 : for (slice = 0; slice < z; ++slice) { -; 705 : stbi__vertical_flip(bytes, w, h, bytes_per_pixel); -; 706 : bytes += slice_size; -; 707 : } -; 708 : } -; 709 : #endif -; 710 : -; 711 : static unsigned char* stbi__load_and_postprocess_8bit(stbi__context* s, int* x, int* y, int* comp, int req_comp) -; 712 : { -; 713 : stbi__result_info ri; -; 714 : void* result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8); -; 715 : -; 716 : if (result == NULL) -; 717 : return NULL; -; 718 : -; 719 : // it is the responsibility of the loaders to make sure we get either 8 or 16 bit. -; 720 : STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16); -; 721 : -; 722 : if (ri.bits_per_channel != 8) { -; 723 : result = stbi__convert_16_to_8((stbi__uint16*)result, *x, *y, req_comp == 0 ? *comp : req_comp); -; 724 : ri.bits_per_channel = 8; -; 725 : } -; 726 : -; 727 : // @TODO: move stbi__convert_format to here -; 728 : -; 729 : if (stbi__vertically_flip_on_load) { -; 730 : int channels = req_comp ? req_comp : *comp; -; 731 : stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi_uc)); -; 732 : } -; 733 : -; 734 : return (unsigned char*)result; -; 735 : } -; 736 : -; 737 : static stbi__uint16* stbi__load_and_postprocess_16bit(stbi__context* s, int* x, int* y, int* comp, int req_comp) -; 738 : { -; 739 : stbi__result_info ri; -; 740 : void* result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16); -; 741 : -; 742 : if (result == NULL) -; 743 : return NULL; -; 744 : -; 745 : // it is the responsibility of the loaders to make sure we get either 8 or 16 bit. -; 746 : STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16); -; 747 : -; 748 : if (ri.bits_per_channel != 16) { -; 749 : result = stbi__convert_8_to_16((stbi_uc*)result, *x, *y, req_comp == 0 ? *comp : req_comp); -; 750 : ri.bits_per_channel = 16; -; 751 : } -; 752 : -; 753 : // @TODO: move stbi__convert_format16 to here -; 754 : // @TODO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision -; 755 : -; 756 : if (stbi__vertically_flip_on_load) { -; 757 : int channels = req_comp ? req_comp : *comp; -; 758 : stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi__uint16)); -; 759 : } -; 760 : -; 761 : return (stbi__uint16*)result; -; 762 : } -; 763 : -; 764 : #if !defined(STBI_NO_HDR) && !defined(STBI_NO_LINEAR) -; 765 : static void stbi__float_postprocess(float* result, int* x, int* y, int* comp, int req_comp) -; 766 : { -; 767 : if (stbi__vertically_flip_on_load && result != NULL) { -; 768 : int channels = req_comp ? req_comp : *comp; -; 769 : stbi__vertical_flip(result, *x, *y, channels * sizeof(float)); -; 770 : } -; 771 : } -; 772 : #endif -; 773 : -; 774 : #ifndef STBI_NO_STDIO -; 775 : -; 776 : #if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) -; 777 : STBI_EXTERN __declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int cp, unsigned long flags, const char* str, int cbmb, wchar_t* widestr, int cchwide); -; 778 : STBI_EXTERN __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, const wchar_t* widestr, int cchwide, char* str, int cbmb, const char* defchar, int* used_default); -; 779 : #endif -; 780 : -; 781 : #if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) -; 782 : STBIDEF int stbi_convert_wchar_to_utf8(char* buffer, size_t bufferlen, const wchar_t* input) -; 783 : { -; 784 : return WideCharToMultiByte(65001 /* UTF8 */, 0, input, -1, buffer, (int)bufferlen, NULL, NULL); -; 785 : } -; 786 : #endif -; 787 : -; 788 : static FILE* stbi__fopen(char const* filename, char const* mode) -; 789 : { -; 790 : FILE* f; -; 791 : #if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) -; 792 : wchar_t wMode[64]; -; 793 : wchar_t wFilename[1024]; -; 794 : if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename) / sizeof(*wFilename))) -; 795 : return 0; -; 796 : -; 797 : if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode) / sizeof(*wMode))) -; 798 : return 0; -; 799 : -; 800 : #if defined(_MSC_VER) && _MSC_VER >= 1400 -; 801 : if (0 != _wfopen_s(&f, wFilename, wMode)) -; 802 : f = 0; -; 803 : #else -; 804 : f = _wfopen(wFilename, wMode); -; 805 : #endif -; 806 : -; 807 : #elif defined(_MSC_VER) && _MSC_VER >= 1400 -; 808 : if (0 != fopen_s(&f, filename, mode)) - +; Line 808 0004d 48 8b 7c 24 30 mov rdi, QWORD PTR f$1[rsp] $LN5@stbi_load: - -; 818 : FILE* f = stbi__fopen(filename, "rb"); - +; Line 818 00052 48 85 ff test rdi, rdi - -; 819 : unsigned char* result; -; 820 : if (!f) return stbi__errpuc("can't fopen", "Unable to open file"); - +; Line 820 00055 75 27 jne SHORT $LN2@stbi_load - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00057 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 00060 8b 0d 00 00 00 @@ -8853,37 +6477,26 @@ $LN5@stbi_load: 0006f 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_0M@JPDHFAGK@can?8t?5fopen@ 00076 48 89 04 0a mov QWORD PTR [rdx+rcx], rax - -; 819 : unsigned char* result; -; 820 : if (!f) return stbi__errpuc("can't fopen", "Unable to open file"); - +; Line 820 0007a 33 c0 xor eax, eax 0007c eb 25 jmp SHORT $LN1@stbi_load $LN2@stbi_load: - -; 821 : result = stbi_load_from_file(f, x, y, comp, req_comp); - +; Line 821 0007e 4c 8b cd mov r9, rbp 00081 44 89 74 24 20 mov DWORD PTR [rsp+32], r14d 00086 4c 8b c6 mov r8, rsi 00089 48 8b d3 mov rdx, rbx 0008c 48 8b cf mov rcx, rdi 0008f e8 00 00 00 00 call stbi_load_from_file - -; 822 : fclose(f); - +; Line 822 00094 48 8b cf mov rcx, rdi 00097 48 8b d8 mov rbx, rax 0009a ff 15 00 00 00 00 call QWORD PTR __imp_fclose - -; 823 : return result; - +; Line 823 000a0 48 8b c3 mov rax, rbx $LN1@stbi_load: - -; 824 : } - +; Line 824 000a3 48 8b 4c 24 38 mov rcx, QWORD PTR __$ArrayPad$[rsp] 000a8 48 33 cc xor rcx, rsp 000ab e8 00 00 00 00 call __security_check_cookie @@ -8897,135 +6510,164 @@ $LN1@stbi_load: stbi_load ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi_load_from_file _TEXT SEGMENT s$ = 48 __$ArrayPad$ = 272 -f$ = 336 -x$ = 344 -y$ = 352 -comp$ = 360 -req_comp$ = 368 +f$ = 352 +x$ = 360 +y$ = 368 +comp$ = 376 +req_comp$ = 384 stbi_load_from_file PROC ; COMDAT - -; 839 : { - -$LN9: - 00000 40 53 push rbx - 00002 55 push rbp +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 839 +$LN17: + 00000 40 55 push rbp + 00002 53 push rbx 00003 56 push rsi 00004 57 push rdi 00005 41 56 push r14 - 00007 48 81 ec 20 01 - 00 00 sub rsp, 288 ; 00000120H - 0000e 48 8b 05 00 00 + 00007 41 57 push r15 + 00009 48 8d 6c 24 d8 lea rbp, QWORD PTR [rsp-40] + 0000e 48 81 ec 28 01 + 00 00 sub rsp, 296 ; 00000128H + 00015 48 8b 05 00 00 00 00 mov rax, QWORD PTR __security_cookie - 00015 48 33 c4 xor rax, rsp - 00018 48 89 84 24 10 - 01 00 00 mov QWORD PTR __$ArrayPad$[rsp], rax - 00020 8b 9c 24 70 01 - 00 00 mov ebx, DWORD PTR req_comp$[rsp] - 00027 49 8b f0 mov rsi, r8 - -; 330 : stbi__start_callbacks(s, &stbi__stdio_callbacks, (void*)f); - - 0002a 4c 8b c1 mov r8, rcx - -; 839 : { - - 0002d 4c 8b f1 mov r14, rcx - -; 330 : stbi__start_callbacks(s, &stbi__stdio_callbacks, (void*)f); - - 00030 48 8d 4c 24 30 lea rcx, QWORD PTR s$[rsp] - -; 839 : { - - 00035 49 8b e9 mov rbp, r9 - 00038 48 8b fa mov rdi, rdx - -; 330 : stbi__start_callbacks(s, &stbi__stdio_callbacks, (void*)f); - - 0003b e8 00 00 00 00 call stbi__start_callbacks - -; 840 : unsigned char* result; -; 841 : stbi__context s; -; 842 : stbi__start_file(&s, f); -; 843 : result = stbi__load_and_postprocess_8bit(&s, x, y, comp, req_comp); - - 00040 4c 8b cd mov r9, rbp - 00043 89 5c 24 20 mov DWORD PTR [rsp+32], ebx - 00047 4c 8b c6 mov r8, rsi - 0004a 48 8d 4c 24 30 lea rcx, QWORD PTR s$[rsp] - 0004f 48 8b d7 mov rdx, rdi - 00052 e8 00 00 00 00 call stbi__load_and_postprocess_8bit - 00057 48 8b d8 mov rbx, rax - -; 844 : if (result) { - - 0005a 48 85 c0 test rax, rax - 0005d 74 20 je SHORT $LN2@stbi_load_ - -; 845 : // need to 'unget' all the characters in the IO buffer -; 846 : fseek(f, -(int)(s.img_buffer_end - s.img_buffer), SEEK_CUR); - - 0005f 8b 94 24 f0 00 - 00 00 mov edx, DWORD PTR s$[rsp+192] - 00066 41 b8 01 00 00 + 0001c 48 33 c4 xor rax, rsp + 0001f 48 89 45 10 mov QWORD PTR __$ArrayPad$[rbp-256], rax +; Line 289 + 00023 0f 10 05 00 00 + 00 00 movups xmm0, XMMWORD PTR stbi__stdio_callbacks +; Line 839 + 0002a 44 8b bd 80 00 + 00 00 mov r15d, DWORD PTR req_comp$[rbp-256] +; Line 294 + 00031 48 8d 44 24 68 lea rax, QWORD PTR s$[rsp+56] + 00036 48 89 45 00 mov QWORD PTR s$[rbp-48], rax +; Line 839 + 0003a 49 8b f0 mov rsi, r8 +; Line 289 + 0003d 0f 29 44 24 40 movaps XMMWORD PTR s$[rsp+16], xmm0 +; Line 294 + 00042 48 8d 44 24 68 lea rax, QWORD PTR s$[rsp+56] + 00047 f2 0f 10 05 10 + 00 00 00 movsd xmm0, QWORD PTR stbi__stdio_callbacks+16 +; Line 839 + 0004f 48 8b da mov rbx, rdx +; Line 1059 + 00052 41 b8 80 00 00 + 00 mov r8d, 128 ; 00000080H +; Line 289 + 00058 f2 0f 11 44 24 + 50 movsd QWORD PTR s$[rsp+32], xmm0 +; Line 1059 + 0005e 48 8d 54 24 68 lea rdx, QWORD PTR s$[rsp+56] +; Line 290 + 00063 48 89 4c 24 58 mov QWORD PTR s$[rsp+40], rcx +; Line 839 + 00068 4d 8b f1 mov r14, r9 +; Line 291 + 0006b c7 44 24 64 80 + 00 00 00 mov DWORD PTR s$[rsp+52], 128 ; 00000080H +; Line 839 + 00073 48 8b f9 mov rdi, rcx +; Line 292 + 00076 c7 44 24 60 01 + 00 00 00 mov DWORD PTR s$[rsp+48], 1 +; Line 293 + 0007e c7 45 e8 00 00 + 00 00 mov DWORD PTR s$[rbp-72], 0 +; Line 294 + 00085 48 89 45 f0 mov QWORD PTR s$[rbp-64], rax +; Line 1059 + 00089 e8 00 00 00 00 call stbi__stdio_read +; Line 1060 + 0008e 8b 4d f0 mov ecx, DWORD PTR s$[rbp-64] + 00091 2b 4d 00 sub ecx, DWORD PTR s$[rbp-48] + 00094 01 4d e8 add DWORD PTR s$[rbp-72], ecx +; Line 1061 + 00097 85 c0 test eax, eax + 00099 75 19 jne SHORT $LN9@stbi_load_ +; Line 1064 + 0009b 89 44 24 60 mov DWORD PTR s$[rsp+48], eax +; Line 1065 + 0009f 48 8d 44 24 68 lea rax, QWORD PTR s$[rsp+56] + 000a4 48 89 45 f0 mov QWORD PTR s$[rbp-64], rax +; Line 1066 + 000a8 48 8d 44 24 69 lea rax, QWORD PTR s$[rsp+57] +; Line 1067 + 000ad c6 44 24 68 00 mov BYTE PTR s$[rsp+56], 0 +; Line 1068 + 000b2 eb 10 jmp SHORT $LN15@stbi_load_ +$LN9@stbi_load_: +; Line 1071 + 000b4 48 98 cdqe + 000b6 48 8d 4c 24 68 lea rcx, QWORD PTR s$[rsp+56] + 000bb 48 89 4d f0 mov QWORD PTR s$[rbp-64], rcx + 000bf 48 8d 44 04 68 lea rax, QWORD PTR s$[rsp+rax+56] +$LN15@stbi_load_: +; Line 843 + 000c4 4d 8b ce mov r9, r14 +; Line 296 + 000c7 48 89 45 f8 mov QWORD PTR s$[rbp-56], rax +; Line 843 + 000cb 4c 8b c6 mov r8, rsi +; Line 296 + 000ce 48 89 45 08 mov QWORD PTR s$[rbp-40], rax +; Line 843 + 000d2 48 8b d3 mov rdx, rbx + 000d5 44 89 7c 24 20 mov DWORD PTR [rsp+32], r15d + 000da 48 8d 4c 24 30 lea rcx, QWORD PTR s$[rsp] + 000df e8 00 00 00 00 call stbi__load_and_postprocess_8bit + 000e4 48 8b d8 mov rbx, rax +; Line 844 + 000e7 48 85 c0 test rax, rax + 000ea 74 18 je SHORT $LN2@stbi_load_ +; Line 846 + 000ec 8b 55 f0 mov edx, DWORD PTR s$[rbp-64] + 000ef 41 b8 01 00 00 00 mov r8d, 1 - 0006c 2b 94 24 f8 00 - 00 00 sub edx, DWORD PTR s$[rsp+200] - 00073 49 8b ce mov rcx, r14 - 00076 ff 15 00 00 00 + 000f5 2b 55 f8 sub edx, DWORD PTR s$[rbp-56] + 000f8 48 8b cf mov rcx, rdi + 000fb ff 15 00 00 00 00 call QWORD PTR __imp_fseek - -; 847 : } -; 848 : return result; - - 0007c 48 8b c3 mov rax, rbx +; Line 848 + 00101 48 8b c3 mov rax, rbx $LN2@stbi_load_: - -; 849 : } - - 0007f 48 8b 8c 24 10 - 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rsp] - 00087 48 33 cc xor rcx, rsp - 0008a e8 00 00 00 00 call __security_check_cookie - 0008f 48 81 c4 20 01 - 00 00 add rsp, 288 ; 00000120H - 00096 41 5e pop r14 - 00098 5f pop rdi - 00099 5e pop rsi - 0009a 5d pop rbp - 0009b 5b pop rbx - 0009c c3 ret 0 +; Line 849 + 00104 48 8b 4d 10 mov rcx, QWORD PTR __$ArrayPad$[rbp-256] + 00108 48 33 cc xor rcx, rsp + 0010b e8 00 00 00 00 call __security_check_cookie + 00110 48 81 c4 28 01 + 00 00 add rsp, 296 ; 00000128H + 00117 41 5f pop r15 + 00119 41 5e pop r14 + 0011b 5f pop rdi + 0011c 5e pop rsi + 0011d 5b pop rbx + 0011e 5d pop rbp + 0011f c3 ret 0 stbi_load_from_file ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__refill_buffer _TEXT SEGMENT s$ = 48 stbi__refill_buffer PROC ; COMDAT - -; 1058 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1058 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1059 : int n = (s->io.read)(s->io_user_data, (char*)s->buffer_start, s->buflen); - +; Line 1059 0000a 44 8b 41 34 mov r8d, DWORD PTR [rcx+52] 0000e 48 8d 79 38 lea rdi, QWORD PTR [rcx+56] 00012 48 8b d9 mov rbx, rcx 00015 48 8b d7 mov rdx, rdi 00018 48 8b 49 28 mov rcx, QWORD PTR [rcx+40] 0001c ff 53 10 call QWORD PTR [rbx+16] - -; 1060 : s->callback_already_read += (int)(s->img_buffer - s->img_buffer_original); - +; Line 1060 0001f 8b 93 c0 00 00 00 mov edx, DWORD PTR [rbx+192] 00025 2b 93 d0 00 00 @@ -9034,52 +6676,30 @@ stbi__refill_buffer PROC ; COMDAT 00 add DWORD PTR [rbx+184], edx 00031 48 89 bb c0 00 00 00 mov QWORD PTR [rbx+192], rdi - -; 1061 : if (n == 0) { - +; Line 1061 00038 85 c0 test eax, eax 0003a 75 1c jne SHORT $LN2@stbi__refi - -; 1062 : // at end of file, treat same as if from memory, but need to handle case -; 1063 : // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file -; 1064 : s->read_from_callbacks = 0; - +; Line 1064 0003c 89 43 30 mov DWORD PTR [rbx+48], eax - -; 1065 : s->img_buffer = s->buffer_start; -; 1066 : s->img_buffer_end = s->buffer_start + 1; - +; Line 1066 0003f 48 8d 43 39 lea rax, QWORD PTR [rbx+57] 00043 48 89 83 c8 00 00 00 mov QWORD PTR [rbx+200], rax - -; 1067 : *s->img_buffer = 0; - +; Line 1067 0004a c6 07 00 mov BYTE PTR [rdi], 0 - -; 1072 : } -; 1073 : } - +; Line 1073 0004d 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00052 48 83 c4 20 add rsp, 32 ; 00000020H 00056 5f pop rdi 00057 c3 ret 0 $LN2@stbi__refi: - -; 1068 : } -; 1069 : else { -; 1070 : s->img_buffer = s->buffer_start; -; 1071 : s->img_buffer_end = s->buffer_start + n; - +; Line 1071 00058 48 63 c8 movsxd rcx, eax 0005b 48 83 c1 38 add rcx, 56 ; 00000038H 0005f 48 03 cb add rcx, rbx 00062 48 89 8b c8 00 00 00 mov QWORD PTR [rbx+200], rcx - -; 1072 : } -; 1073 : } - +; Line 1073 00069 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 0006e 48 83 c4 20 add rsp, 32 ; 00000020H 00072 5f pop rdi @@ -9087,291 +6707,162 @@ $LN2@stbi__refi: stbi__refill_buffer ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__get8 _TEXT SEGMENT s$ = 48 stbi__get8 PROC ; COMDAT - -; 1076 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1076 00000 40 53 push rbx 00002 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00006 48 8b 91 c0 00 00 00 mov rdx, QWORD PTR [rcx+192] 0000d 48 8b d9 mov rbx, rcx 00010 48 3b 91 c8 00 00 00 cmp rdx, QWORD PTR [rcx+200] 00017 73 13 jae SHORT $LN2@stbi__get8 - -; 1078 : return *s->img_buffer++; - +; Line 1078 00019 0f b6 02 movzx eax, BYTE PTR [rdx] 0001c 48 ff c2 inc rdx 0001f 48 89 91 c0 00 00 00 mov QWORD PTR [rcx+192], rdx - -; 1084 : } - +; Line 1084 00026 48 83 c4 20 add rsp, 32 ; 00000020H 0002a 5b pop rbx 0002b c3 ret 0 $LN2@stbi__get8: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0002c 83 79 30 00 cmp DWORD PTR [rcx+48], 0 - 00030 74 69 je SHORT $LN3@stbi__get8 - -; 1059 : int n = (s->io.read)(s->io_user_data, (char*)s->buffer_start, s->buflen); - - 00032 44 8b 41 34 mov r8d, DWORD PTR [rcx+52] - 00036 48 8d 51 38 lea rdx, QWORD PTR [rcx+56] - 0003a 48 8b 49 28 mov rcx, QWORD PTR [rcx+40] - -; 1079 : if (s->read_from_callbacks) { - - 0003e 48 89 7c 24 30 mov QWORD PTR [rsp+48], rdi - -; 1059 : int n = (s->io.read)(s->io_user_data, (char*)s->buffer_start, s->buflen); - - 00043 ff 53 10 call QWORD PTR [rbx+16] - -; 1060 : s->callback_already_read += (int)(s->img_buffer - s->img_buffer_original); - - 00046 8b 8b c0 00 00 - 00 mov ecx, DWORD PTR [rbx+192] - 0004c 2b 8b d0 00 00 - 00 sub ecx, DWORD PTR [rbx+208] - 00052 01 8b b8 00 00 - 00 add DWORD PTR [rbx+184], ecx - -; 1061 : if (n == 0) { - - 00058 85 c0 test eax, eax - 0005a 75 14 jne SHORT $LN6@stbi__get8 - -; 1062 : // at end of file, treat same as if from memory, but need to handle case -; 1063 : // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file -; 1064 : s->read_from_callbacks = 0; - - 0005c 89 43 30 mov DWORD PTR [rbx+48], eax - -; 1065 : s->img_buffer = s->buffer_start; -; 1066 : s->img_buffer_end = s->buffer_start + 1; - - 0005f 48 8d 43 39 lea rax, QWORD PTR [rbx+57] - 00063 48 89 83 c8 00 - 00 00 mov QWORD PTR [rbx+200], rax - -; 1067 : *s->img_buffer = 0; - - 0006a c6 43 38 00 mov BYTE PTR [rbx+56], 0 - -; 1068 : } - - 0006e eb 11 jmp SHORT $LN7@stbi__get8 -$LN6@stbi__get8: - -; 1069 : else { -; 1070 : s->img_buffer = s->buffer_start; -; 1071 : s->img_buffer_end = s->buffer_start + n; - - 00070 48 63 c8 movsxd rcx, eax - 00073 48 83 c1 38 add rcx, 56 ; 00000038H - 00077 48 03 cb add rcx, rbx - 0007a 48 89 8b c8 00 - 00 00 mov QWORD PTR [rbx+200], rcx -$LN7@stbi__get8: - -; 1080 : stbi__refill_buffer(s); -; 1081 : return *s->img_buffer++; - - 00081 0f b6 43 38 movzx eax, BYTE PTR [rbx+56] - 00085 48 8d 4b 39 lea rcx, QWORD PTR [rbx+57] - 00089 48 8b 7c 24 30 mov rdi, QWORD PTR [rsp+48] - 0008e 48 89 8b c0 00 + 00030 74 1f je SHORT $LN3@stbi__get8 +; Line 1080 + 00032 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00037 48 8b 8b c0 00 + 00 00 mov rcx, QWORD PTR [rbx+192] + 0003e 0f b6 01 movzx eax, BYTE PTR [rcx] + 00041 48 ff c1 inc rcx + 00044 48 89 8b c0 00 00 00 mov QWORD PTR [rbx+192], rcx - -; 1084 : } - - 00095 48 83 c4 20 add rsp, 32 ; 00000020H - 00099 5b pop rbx - 0009a c3 ret 0 +; Line 1084 + 0004b 48 83 c4 20 add rsp, 32 ; 00000020H + 0004f 5b pop rbx + 00050 c3 ret 0 $LN3@stbi__get8: - -; 1082 : } -; 1083 : return 0; - - 0009b 32 c0 xor al, al - -; 1084 : } - - 0009d 48 83 c4 20 add rsp, 32 ; 00000020H - 000a1 5b pop rbx - 000a2 c3 ret 0 +; Line 1083 + 00051 32 c0 xor al, al +; Line 1084 + 00053 48 83 c4 20 add rsp, 32 ; 00000020H + 00057 5b pop rbx + 00058 c3 ret 0 stbi__get8 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__at_eof _TEXT SEGMENT s$ = 48 stbi__at_eof PROC ; COMDAT - -; 1090 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1090 00000 40 53 push rbx 00002 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1091 : if (s->io.read) { - +; Line 1091 00006 48 83 79 10 00 cmp QWORD PTR [rcx+16], 0 0000b 48 8b d9 mov rbx, rcx 0000e 74 22 je SHORT $LN4@stbi__at_e - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 00010 48 8b 49 28 mov rcx, QWORD PTR [rcx+40] 00014 ff 53 20 call QWORD PTR [rbx+32] 00017 85 c0 test eax, eax 00019 75 06 jne SHORT $LN3@stbi__at_e - -; 1099 : } - +; Line 1099 0001b 48 83 c4 20 add rsp, 32 ; 00000020H 0001f 5b pop rbx 00020 c3 ret 0 $LN3@stbi__at_e: - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 00021 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00025 75 0b jne SHORT $LN4@stbi__at_e 00027 b8 01 00 00 00 mov eax, 1 - -; 1099 : } - +; Line 1099 0002c 48 83 c4 20 add rsp, 32 ; 00000020H 00030 5b pop rbx 00031 c3 ret 0 $LN4@stbi__at_e: - -; 1096 : } -; 1097 : -; 1098 : return s->img_buffer >= s->img_buffer_end; - +; Line 1098 00032 48 8b 8b c8 00 00 00 mov rcx, QWORD PTR [rbx+200] 00039 33 c0 xor eax, eax 0003b 48 39 8b c0 00 00 00 cmp QWORD PTR [rbx+192], rcx 00042 0f 93 c0 setae al - -; 1099 : } - +; Line 1099 00045 48 83 c4 20 add rsp, 32 ; 00000020H 00049 5b pop rbx 0004a c3 ret 0 stbi__at_eof ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__skip _TEXT SEGMENT s$ = 8 n$ = 16 stbi__skip PROC ; COMDAT - -; 1106 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1106 00000 4c 8b c1 mov r8, rcx - -; 1107 : if (n == 0) return; // already there! - +; Line 1107 00003 85 d2 test edx, edx 00005 74 4b je SHORT $LN1@stbi__skip - -; 1108 : if (n < 0) { - +; Line 1108 00007 79 0f jns SHORT $LN3@stbi__skip - -; 1109 : s->img_buffer = s->img_buffer_end; - +; Line 1109 00009 48 8b 81 c8 00 00 00 mov rax, QWORD PTR [rcx+200] 00010 48 89 81 c0 00 00 00 mov QWORD PTR [rcx+192], rax - -; 1121 : } - +; Line 1121 00017 c3 ret 0 $LN3@stbi__skip: - -; 1110 : return; -; 1111 : } -; 1112 : if (s->io.read) { - +; Line 1112 00018 48 83 79 10 00 cmp QWORD PTR [rcx+16], 0 0001d 74 29 je SHORT $LN5@stbi__skip - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - +; Line 1113 0001f 8b 89 c8 00 00 00 mov ecx, DWORD PTR [rcx+200] 00025 41 2b 88 c0 00 00 00 sub ecx, DWORD PTR [r8+192] - -; 1114 : if (blen < n) { - +; Line 1114 0002c 3b ca cmp ecx, edx 0002e 7d 18 jge SHORT $LN5@stbi__skip - -; 1115 : s->img_buffer = s->img_buffer_end; - +; Line 1115 00030 49 8b 80 c8 00 00 00 mov rax, QWORD PTR [r8+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - +; Line 1116 00037 2b d1 sub edx, ecx 00039 49 8b 48 28 mov rcx, QWORD PTR [r8+40] 0003d 49 89 80 c0 00 00 00 mov QWORD PTR [r8+192], rax 00044 49 ff 60 18 rex_jmp QWORD PTR [r8+24] $LN5@stbi__skip: - -; 1117 : return; -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - +; Line 1120 00048 48 63 c2 movsxd rax, edx 0004b 49 01 80 c0 00 00 00 add QWORD PTR [r8+192], rax $LN1@stbi__skip: - -; 1121 : } - +; Line 1121 00052 c3 ret 0 stbi__skip ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__getn _TEXT SEGMENT s$ = 64 buffer$ = 72 n$ = 80 stbi__getn PROC ; COMDAT - -; 1128 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1128 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi @@ -9380,9 +6871,7 @@ stbi__getn PROC ; COMDAT 00016 41 56 push r14 00018 41 57 push r15 0001a 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1129 : if (s->io.read) { - +; Line 1129 0001e 48 83 79 10 00 cmp QWORD PTR [rcx+16], 0 00023 48 8d b9 c0 00 00 00 lea rdi, QWORD PTR [rcx+192] @@ -9390,90 +6879,57 @@ stbi__getn PROC ; COMDAT 0002d 4c 8b e2 mov r12, rdx 00030 48 8b e9 mov rbp, rcx 00033 74 47 je SHORT $LN7@stbi__getn - -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); - +; Line 1130 00035 44 8b b9 c8 00 00 00 mov r15d, DWORD PTR [rcx+200] 0003c 44 2b 3f sub r15d, DWORD PTR [rdi] - -; 1131 : if (blen < n) { - +; Line 1131 0003f 45 3b fe cmp r15d, r14d 00042 7d 38 jge SHORT $LN7@stbi__getn - -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); - +; Line 1134 00044 48 8b 17 mov rdx, QWORD PTR [rdi] 00047 49 8b cc mov rcx, r12 0004a 49 63 df movsxd rbx, r15d 0004d 4c 8b c3 mov r8, rbx 00050 e8 00 00 00 00 call memcpy - -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); - +; Line 1136 00055 48 8b 4d 28 mov rcx, QWORD PTR [rbp+40] 00059 4a 8d 14 23 lea rdx, QWORD PTR [rbx+r12] 0005d 45 2b f7 sub r14d, r15d 00060 45 8b c6 mov r8d, r14d 00063 ff 55 10 call QWORD PTR [rbp+16] - -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; - +; Line 1138 00066 48 8b 8d c8 00 00 00 mov rcx, QWORD PTR [rbp+200] 0006d 33 d2 xor edx, edx 0006f 41 3b c6 cmp eax, r14d 00072 48 89 0f mov QWORD PTR [rdi], rcx 00075 0f 94 c2 sete dl - -; 1139 : return res; - +; Line 1139 00078 8b c2 mov eax, edx 0007a eb 2a jmp SHORT $LN5@stbi__getn $LN7@stbi__getn: - -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { - +; Line 1143 0007c 48 8b 17 mov rdx, QWORD PTR [rdi] 0007f 49 8b de mov rbx, r14 00082 49 8d 04 16 lea rax, QWORD PTR [r14+rdx] 00086 48 3b 81 c8 00 00 00 cmp rax, QWORD PTR [rcx+200] 0008d 77 15 ja SHORT $LN4@stbi__getn - -; 1144 : memcpy(buffer, s->img_buffer, n); - +; Line 1144 0008f 4c 8b c3 mov r8, rbx 00092 49 8b cc mov rcx, r12 00095 e8 00 00 00 00 call memcpy - -; 1145 : s->img_buffer += n; - +; Line 1145 0009a 48 01 1f add QWORD PTR [rdi], rbx - -; 1146 : return 1; - +; Line 1146 0009d b8 01 00 00 00 mov eax, 1 000a2 eb 02 jmp SHORT $LN5@stbi__getn $LN4@stbi__getn: - -; 1147 : } -; 1148 : else -; 1149 : return 0; - +; Line 1149 000a4 33 c0 xor eax, eax $LN5@stbi__getn: - -; 1150 : } - +; Line 1150 000a6 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] 000ab 48 8b 6c 24 48 mov rbp, QWORD PTR [rsp+72] 000b0 48 8b 74 24 50 mov rsi, QWORD PTR [rsp+80] @@ -9486,53 +6942,37 @@ $LN5@stbi__getn: stbi__getn ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__get16be _TEXT SEGMENT s$ = 48 stbi__get16be PROC ; COMDAT - -; 1157 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1157 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0000a 48 8b 81 c0 00 00 00 mov rax, QWORD PTR [rcx+192] - -; 1157 : { - +; Line 1157 00011 48 8b d9 mov rbx, rcx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00014 48 3b 81 c8 00 00 00 cmp rax, QWORD PTR [rcx+200] 0001b 73 0f jae SHORT $LN4@stbi__get1 - -; 1078 : return *s->img_buffer++; - +; Line 1078 0001d 0f b6 10 movzx edx, BYTE PTR [rax] 00020 48 ff c0 inc rax 00023 48 89 81 c0 00 00 00 mov QWORD PTR [rcx+192], rax 0002a eb 23 jmp SHORT $LN15@stbi__get1 $LN4@stbi__get1: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0002c 83 79 30 00 cmp DWORD PTR [rcx+48], 0 00030 74 1b je SHORT $LN5@stbi__get1 - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00032 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00037 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0003e 0f b6 10 movzx edx, BYTE PTR [rax] @@ -9541,44 +6981,29 @@ $LN4@stbi__get1: 00 00 mov QWORD PTR [rbx+192], rax 0004b eb 02 jmp SHORT $LN15@stbi__get1 $LN5@stbi__get1: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 0004d 32 d2 xor dl, dl $LN15@stbi__get1: - -; 1158 : int z = stbi__get8(s); - +; Line 1158 0004f b9 30 00 00 00 mov ecx, 48 ; 00000030H 00054 4c 8b c3 mov r8, rbx 00057 0f b6 fa movzx edi, dl 0005a 4c 8d 0c 19 lea r9, QWORD PTR [rcx+rbx] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0005e 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00065 72 15 jb SHORT $LN16@stbi__get1 - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00067 41 83 39 00 cmp DWORD PTR [r9], 0 0006b 74 2f je SHORT $LN9@stbi__get1 - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0006d 48 8b cb mov rcx, rbx 00070 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00075 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN16@stbi__get1: - -; 1159 : return (z << 8) + stbi__get8(s); - +; Line 1159 0007c 0f b6 08 movzx ecx, BYTE PTR [rax] 0007f 48 ff c0 inc rax 00082 48 89 83 c0 00 @@ -9586,59 +7011,43 @@ $LN16@stbi__get1: 00089 0f b6 c1 movzx eax, cl 0008c c1 e7 08 shl edi, 8 0008f 03 c7 add eax, edi - -; 1160 : } - +; Line 1160 00091 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00096 48 83 c4 20 add rsp, 32 ; 00000020H 0009a 5f pop rdi 0009b c3 ret 0 $LN9@stbi__get1: 0009c 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] - -; 1083 : return 0; - +; Line 1083 000a1 32 c9 xor cl, cl - -; 1159 : return (z << 8) + stbi__get8(s); - +; Line 1159 000a3 0f b6 c1 movzx eax, cl 000a6 c1 e7 08 shl edi, 8 000a9 03 c7 add eax, edi - -; 1160 : } - +; Line 1160 000ab 48 83 c4 20 add rsp, 32 ; 00000020H 000af 5f pop rdi 000b0 c3 ret 0 stbi__get16be ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__get32be _TEXT SEGMENT s$ = 48 stbi__get32be PROC ; COMDAT - -; 1167 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1167 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H 0000a 48 8b d9 mov rbx, rcx - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 1168 0000d e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 00012 48 8b cb mov rcx, rbx 00015 8b f8 mov edi, eax 00017 e8 00 00 00 00 call stbi__get16be - -; 1170 : } - +; Line 1170 0001c 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00021 c1 e7 10 shl edi, 16 00024 03 c7 add eax, edi @@ -9648,53 +7057,37 @@ stbi__get32be PROC ; COMDAT stbi__get32be ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__get16le _TEXT SEGMENT s$ = 48 stbi__get16le PROC ; COMDAT - -; 1177 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1177 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0000a 48 8b 81 c0 00 00 00 mov rax, QWORD PTR [rcx+192] - -; 1177 : { - +; Line 1177 00011 48 8b d9 mov rbx, rcx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00014 48 3b 81 c8 00 00 00 cmp rax, QWORD PTR [rcx+200] 0001b 73 0f jae SHORT $LN4@stbi__get1 - -; 1078 : return *s->img_buffer++; - +; Line 1078 0001d 0f b6 10 movzx edx, BYTE PTR [rax] 00020 48 ff c0 inc rax 00023 48 89 81 c0 00 00 00 mov QWORD PTR [rcx+192], rax 0002a eb 23 jmp SHORT $LN15@stbi__get1 $LN4@stbi__get1: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0002c 83 79 30 00 cmp DWORD PTR [rcx+48], 0 00030 74 1b je SHORT $LN5@stbi__get1 - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00032 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00037 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0003e 0f b6 10 movzx edx, BYTE PTR [rax] @@ -9703,44 +7096,29 @@ $LN4@stbi__get1: 00 00 mov QWORD PTR [rbx+192], rax 0004b eb 02 jmp SHORT $LN15@stbi__get1 $LN5@stbi__get1: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 0004d 32 d2 xor dl, dl $LN15@stbi__get1: - -; 1178 : int z = stbi__get8(s); - +; Line 1178 0004f b9 30 00 00 00 mov ecx, 48 ; 00000030H 00054 4c 8b c3 mov r8, rbx 00057 0f b6 fa movzx edi, dl 0005a 4c 8d 0c 19 lea r9, QWORD PTR [rcx+rbx] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0005e 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00065 72 15 jb SHORT $LN16@stbi__get1 - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00067 41 83 39 00 cmp DWORD PTR [r9], 0 0006b 74 2f je SHORT $LN9@stbi__get1 - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0006d 48 8b cb mov rcx, rbx 00070 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00075 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN16@stbi__get1: - -; 1179 : return z + (stbi__get8(s) << 8); - +; Line 1179 0007c 0f b6 08 movzx ecx, BYTE PTR [rax] 0007f 48 ff c0 inc rax 00082 48 89 83 c0 00 @@ -9748,60 +7126,43 @@ $LN16@stbi__get1: 00089 0f b6 c1 movzx eax, cl 0008c c1 e0 08 shl eax, 8 0008f 03 c7 add eax, edi - -; 1180 : } - +; Line 1180 00091 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00096 48 83 c4 20 add rsp, 32 ; 00000020H 0009a 5f pop rdi 0009b c3 ret 0 $LN9@stbi__get1: 0009c 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] - -; 1083 : return 0; - +; Line 1083 000a1 32 c9 xor cl, cl - -; 1179 : return z + (stbi__get8(s) << 8); - +; Line 1179 000a3 0f b6 c1 movzx eax, cl 000a6 c1 e0 08 shl eax, 8 000a9 03 c7 add eax, edi - -; 1180 : } - +; Line 1180 000ab 48 83 c4 20 add rsp, 32 ; 00000020H 000af 5f pop rdi 000b0 c3 ret 0 stbi__get16le ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__get32le _TEXT SEGMENT s$ = 48 stbi__get32le PROC ; COMDAT - -; 1185 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1185 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H 0000a 48 8b d9 mov rbx, rcx - -; 1186 : stbi__uint32 z = stbi__get16le(s); - +; Line 1186 0000d e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - +; Line 1187 00012 48 8b cb mov rcx, rbx 00015 8b f8 mov edi, eax 00017 e8 00 00 00 00 call stbi__get16le - -; 1188 : return z; -; 1189 : } - +; Line 1189 0001c 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00021 c1 e0 10 shl eax, 16 00024 03 c7 add eax, edi @@ -9811,16 +7172,14 @@ stbi__get32le PROC ; COMDAT stbi__get32le ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__compute_y _TEXT SEGMENT r$ = 8 g$ = 16 b$ = 24 stbi__compute_y PROC ; COMDAT - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1210 00000 6b c9 4d imul ecx, ecx, 77 ; 0000004dH 00003 69 c2 96 00 00 00 imul eax, edx, 150 ; 00000096H @@ -9828,14 +7187,11 @@ stbi__compute_y PROC ; COMDAT 0000b 41 6b c8 1d imul ecx, r8d, 29 0000f 03 c1 add eax, ecx 00011 c1 f8 08 sar eax, 8 - -; 1211 : } - +; Line 1211 00014 c3 ret 0 stbi__compute_y ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__convert_format _TEXT SEGMENT data$ = 80 @@ -9844,9 +7200,8 @@ req_comp$ = 96 x$ = 104 y$ = 112 stbi__convert_format PROC ; COMDAT - -; 1218 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1218 00000 40 53 push rbx 00002 55 push rbp 00003 56 push rsi @@ -9858,18 +7213,11 @@ stbi__convert_format PROC ; COMDAT 00014 41 8b f0 mov esi, r8d 00017 44 8b ea mov r13d, edx 0001a 48 8b e9 mov rbp, rcx - -; 1219 : int i, j; -; 1220 : unsigned char* good; -; 1221 : -; 1222 : if (req_comp == img_n) return data; - +; Line 1222 0001d 44 3b c2 cmp r8d, edx 00020 75 0f jne SHORT $LN43@stbi__conv 00022 48 8b c1 mov rax, rcx - -; 1259 : } - +; Line 1259 00025 48 83 c4 20 add rsp, 32 ; 00000020H 00029 41 5d pop r13 0002b 41 5c pop r12 @@ -9879,88 +7227,57 @@ stbi__convert_format PROC ; COMDAT 00030 c3 ret 0 $LN43@stbi__conv: 00031 4c 89 7c 24 60 mov QWORD PTR [rsp+96], r15 - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00036 85 f6 test esi, esi 00038 0f 88 11 04 00 00 js $LN145@stbi__conv 0003e 85 db test ebx, ebx 00040 0f 88 09 04 00 00 js $LN145@stbi__conv - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 00046 74 11 je SHORT $LN149@stbi__conv - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 00048 33 d2 xor edx, edx 0004a b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 0004f f7 f3 div ebx - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00051 3b f0 cmp esi, eax 00053 0f 8f f6 03 00 00 jg $LN145@stbi__conv $LN149@stbi__conv: 00059 8b ce mov ecx, esi 0005b 0f af cb imul ecx, ebx - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 0005e 85 c9 test ecx, ecx 00060 0f 88 e9 03 00 00 js $LN145@stbi__conv 00066 45 85 e4 test r12d, r12d 00069 0f 88 e0 03 00 00 js $LN145@stbi__conv - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0006f 74 12 je SHORT $LN60@stbi__conv - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 00071 33 d2 xor edx, edx 00073 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00078 41 f7 f4 div r12d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 0007b 3b c8 cmp ecx, eax 0007d 0f 8f cc 03 00 00 jg $LN145@stbi__conv $LN60@stbi__conv: - -; 509 : return stbi__malloc(a * b * c + add); - +; Line 509 00083 41 0f af cc imul ecx, r12d 00087 48 63 c9 movsxd rcx, ecx - -; 438 : return STBI_MALLOC(size); - +; Line 438 0008a ff 15 00 00 00 00 call QWORD PTR __imp_malloc 00090 4c 8b f8 mov r15, rax - -; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1224 : -; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); -; 1226 : if (good == NULL) { - +; Line 1226 00093 48 85 c0 test rax, rax 00096 0f 84 b3 03 00 00 je $LN145@stbi__conv 0009c 48 89 7c 24 50 mov QWORD PTR [rsp+80], rdi - -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { - +; Line 1231 000a1 33 ff xor edi, edi 000a3 4c 89 74 24 58 mov QWORD PTR [rsp+88], r14 000a8 45 85 e4 test r12d, r12d @@ -9975,13 +7292,9 @@ $LN60@stbi__conv: 000c7 66 0f 1f 84 00 00 00 00 00 npad 9 $LL4@stbi__conv: - -; 1232 : unsigned char* src = data + j * x * img_n; - +; Line 1232 000d0 44 8b cf mov r9d, edi - -; 1233 : unsigned char* dest = good + j * x * req_comp; - +; Line 1233 000d3 8b c7 mov eax, edi 000d5 45 0f af cd imul r9d, r13d 000d9 0f af c6 imul eax, esi @@ -9989,14 +7302,7 @@ $LL4@stbi__conv: 000e0 0f af c3 imul eax, ebx 000e3 4c 03 cd add r9, rbp 000e6 49 03 c7 add rax, r15 - -; 1234 : -; 1235 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1236 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1237 : // convert source image with img_n components to one with req_comp components; -; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1239 : switch (STBI__COMBO(img_n, req_comp)) { - +; Line 1239 000e9 41 83 fe 19 cmp r14d, 25 000ed 0f 87 23 03 00 00 ja $LN57@stbi__conv @@ -10006,9 +7312,7 @@ $LL4@stbi__conv: 000fe 49 03 d0 add rdx, r8 00101 ff e2 jmp rdx $LN45@stbi__conv: - -; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; - +; Line 1240 00103 41 8b d3 mov edx, r11d 00106 45 85 db test r11d, r11d 00109 0f 88 d5 02 00 @@ -10024,9 +7328,7 @@ $LL9@stbi__conv: 00125 79 e9 jns SHORT $LL9@stbi__conv 00127 e9 b8 02 00 00 jmp $LN2@stbi__conv $LN46@stbi__conv: - -; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; - +; Line 1241 0012c 41 8b d3 mov edx, r11d 0012f 45 85 db test r11d, r11d 00132 0f 88 ac 02 00 @@ -10044,9 +7346,7 @@ $LL12@stbi__conv: 00157 79 e7 jns SHORT $LL12@stbi__conv 00159 e9 86 02 00 00 jmp $LN2@stbi__conv $LN47@stbi__conv: - -; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; - +; Line 1242 0015e 41 8b d3 mov edx, r11d 00161 45 85 db test r11d, r11d 00164 0f 88 7a 02 00 @@ -10065,9 +7365,7 @@ $LL15@stbi__conv: 0018b 79 e3 jns SHORT $LL15@stbi__conv 0018d e9 52 02 00 00 jmp $LN2@stbi__conv $LN48@stbi__conv: - -; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; - +; Line 1243 00192 41 8b d3 mov edx, r11d 00195 45 85 db test r11d, r11d 00198 0f 88 46 02 00 @@ -10082,9 +7380,7 @@ $LL18@stbi__conv: 001b1 79 ed jns SHORT $LL18@stbi__conv 001b3 e9 2c 02 00 00 jmp $LN2@stbi__conv $LN49@stbi__conv: - -; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; - +; Line 1244 001b8 41 8b d3 mov edx, r11d 001bb 45 85 db test r11d, r11d 001be 0f 88 20 02 00 @@ -10103,9 +7399,7 @@ $LL21@stbi__conv: 001e7 79 e7 jns SHORT $LL21@stbi__conv 001e9 e9 f6 01 00 00 jmp $LN2@stbi__conv $LN50@stbi__conv: - -; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; - +; Line 1245 001ee 41 8b d3 mov edx, r11d 001f1 45 85 db test r11d, r11d 001f4 0f 88 ea 01 00 @@ -10125,9 +7419,7 @@ $LL24@stbi__conv: 0021f 79 df jns SHORT $LL24@stbi__conv 00221 e9 be 01 00 00 jmp $LN2@stbi__conv $LN51@stbi__conv: - -; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; - +; Line 1246 00226 41 8b d3 mov edx, r11d 00229 45 85 db test r11d, r11d 0022c 0f 88 b2 01 00 @@ -10146,9 +7438,7 @@ $LL27@stbi__conv: 00257 79 d9 jns SHORT $LL27@stbi__conv 00259 e9 86 01 00 00 jmp $LN2@stbi__conv $LN52@stbi__conv: - -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; - +; Line 1247 0025e 45 8b d3 mov r10d, r11d 00261 45 85 db test r11d, r11d 00264 0f 88 7a 01 00 @@ -10158,34 +7448,22 @@ $LN52@stbi__conv: $LL30@stbi__conv: 00270 41 0f b6 49 01 movzx ecx, BYTE PTR [r9+1] 00275 48 8d 40 01 lea rax, QWORD PTR [rax+1] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1210 00279 44 69 c1 96 00 00 00 imul r8d, ecx, 150 ; 00000096H - -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; - +; Line 1247 00280 41 0f b6 49 02 movzx ecx, BYTE PTR [r9+2] 00285 4d 8d 49 03 lea r9, QWORD PTR [r9+3] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1210 00289 6b d1 1d imul edx, ecx, 29 - -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; - +; Line 1247 0028c 41 0f b6 49 fd movzx ecx, BYTE PTR [r9-3] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1210 00291 44 03 c2 add r8d, edx 00294 6b d1 4d imul edx, ecx, 77 ; 0000004dH 00297 44 03 c2 add r8d, edx 0029a 41 c1 e8 08 shr r8d, 8 - -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; - +; Line 1247 0029e 41 83 ea 01 sub r10d, 1 002a2 44 88 40 ff mov BYTE PTR [rax-1], r8b 002a6 79 c8 jns SHORT $LL30@stbi__conv @@ -10193,9 +7471,7 @@ $LL30@stbi__conv: 00 00 lea r8, OFFSET FLAT:__ImageBase 002af e9 30 01 00 00 jmp $LN2@stbi__conv $LN53@stbi__conv: - -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; - +; Line 1248 002b4 45 8b d3 mov r10d, r11d 002b7 45 85 db test r11d, r11d 002ba 0f 88 24 01 00 @@ -10203,35 +7479,23 @@ $LN53@stbi__conv: $LL33@stbi__conv: 002c0 41 0f b6 49 01 movzx ecx, BYTE PTR [r9+1] 002c5 48 8d 40 02 lea rax, QWORD PTR [rax+2] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1210 002c9 44 69 c1 96 00 00 00 imul r8d, ecx, 150 ; 00000096H - -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; - +; Line 1248 002d0 41 0f b6 49 02 movzx ecx, BYTE PTR [r9+2] 002d5 4d 8d 49 03 lea r9, QWORD PTR [r9+3] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1210 002d9 6b d1 1d imul edx, ecx, 29 - -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; - +; Line 1248 002dc 41 0f b6 49 fd movzx ecx, BYTE PTR [r9-3] 002e1 c6 40 ff ff mov BYTE PTR [rax-1], 255 ; 000000ffH - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1210 002e5 44 03 c2 add r8d, edx 002e8 6b d1 4d imul edx, ecx, 77 ; 0000004dH 002eb 44 03 c2 add r8d, edx 002ee 41 c1 e8 08 shr r8d, 8 - -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; - +; Line 1248 002f2 41 83 ea 01 sub r10d, 1 002f6 44 88 40 fe mov BYTE PTR [rax-2], r8b 002fa 79 c4 jns SHORT $LL33@stbi__conv @@ -10239,9 +7503,7 @@ $LL33@stbi__conv: 00 00 lea r8, OFFSET FLAT:__ImageBase 00303 e9 dc 00 00 00 jmp $LN2@stbi__conv $LN54@stbi__conv: - -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; - +; Line 1249 00308 45 8b d3 mov r10d, r11d 0030b 45 85 db test r11d, r11d 0030e 0f 88 d0 00 00 @@ -10252,34 +7514,22 @@ $LN54@stbi__conv: $LL36@stbi__conv: 00320 41 0f b6 49 01 movzx ecx, BYTE PTR [r9+1] 00325 48 8d 40 01 lea rax, QWORD PTR [rax+1] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1210 00329 44 69 c1 96 00 00 00 imul r8d, ecx, 150 ; 00000096H - -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; - +; Line 1249 00330 41 0f b6 49 02 movzx ecx, BYTE PTR [r9+2] 00335 4d 8d 49 04 lea r9, QWORD PTR [r9+4] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1210 00339 6b d1 1d imul edx, ecx, 29 - -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; - +; Line 1249 0033c 41 0f b6 49 fc movzx ecx, BYTE PTR [r9-4] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1210 00341 44 03 c2 add r8d, edx 00344 6b d1 4d imul edx, ecx, 77 ; 0000004dH 00347 44 03 c2 add r8d, edx 0034a 41 c1 e8 08 shr r8d, 8 - -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; - +; Line 1249 0034e 41 83 ea 01 sub r10d, 1 00352 44 88 40 ff mov BYTE PTR [rax-1], r8b 00356 79 c8 jns SHORT $LL36@stbi__conv @@ -10287,9 +7537,7 @@ $LL36@stbi__conv: 00 00 lea r8, OFFSET FLAT:__ImageBase 0035f e9 80 00 00 00 jmp $LN2@stbi__conv $LN55@stbi__conv: - -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; - +; Line 1250 00364 45 8b d3 mov r10d, r11d 00367 45 85 db test r11d, r11d 0036a 78 78 js SHORT $LN2@stbi__conv @@ -10297,34 +7545,22 @@ $LN55@stbi__conv: $LL39@stbi__conv: 00370 41 0f b6 49 01 movzx ecx, BYTE PTR [r9+1] 00375 48 8d 40 02 lea rax, QWORD PTR [rax+2] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1210 00379 44 69 c1 96 00 00 00 imul r8d, ecx, 150 ; 00000096H - -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; - +; Line 1250 00380 41 0f b6 49 02 movzx ecx, BYTE PTR [r9+2] 00385 4d 8d 49 04 lea r9, QWORD PTR [r9+4] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1210 00389 6b d1 1d imul edx, ecx, 29 - -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; - +; Line 1250 0038c 41 0f b6 49 fc movzx ecx, BYTE PTR [r9-4] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1210 00391 44 03 c2 add r8d, edx 00394 6b d1 4d imul edx, ecx, 77 ; 0000004dH 00397 44 03 c2 add r8d, edx 0039a 41 c1 e8 08 shr r8d, 8 - -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; - +; Line 1250 0039e 41 83 ea 01 sub r10d, 1 003a2 44 88 40 fe mov BYTE PTR [rax-2], r8b 003a6 41 0f b6 49 ff movzx ecx, BYTE PTR [r9-1] @@ -10334,9 +7570,7 @@ $LL39@stbi__conv: 00 00 lea r8, OFFSET FLAT:__ImageBase 003b7 eb 2b jmp SHORT $LN2@stbi__conv $LN56@stbi__conv: - -; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; - +; Line 1251 003b9 41 8b d3 mov edx, r11d 003bc 45 85 db test r11d, r11d 003bf 78 23 js SHORT $LN2@stbi__conv @@ -10352,37 +7586,23 @@ $LL42@stbi__conv: 003df 88 48 ff mov BYTE PTR [rax-1], cl 003e2 79 dd jns SHORT $LL42@stbi__conv $LN2@stbi__conv: - -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { - +; Line 1231 003e4 ff c7 inc edi 003e6 41 3b fc cmp edi, r12d 003e9 0f 8c e1 fc ff ff jl $LL4@stbi__conv $LN3@stbi__conv: - -; 1253 : } -; 1254 : #undef STBI__CASE -; 1255 : } -; 1256 : -; 1257 : STBI_FREE(data); - +; Line 1257 003ef 48 8b cd mov rcx, rbp 003f2 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 1258 : return good; - +; Line 1258 003f8 49 8b c7 mov rax, r15 $LN179@stbi__conv: 003fb 4c 8b 74 24 58 mov r14, QWORD PTR [rsp+88] 00400 48 8b 7c 24 50 mov rdi, QWORD PTR [rsp+80] 00405 4c 8b 7c 24 60 mov r15, QWORD PTR [rsp+96] - -; 1259 : } - +; Line 1259 0040a 48 83 c4 20 add rsp, 32 ; 00000020H 0040e 41 5d pop r13 00410 41 5c pop r12 @@ -10391,18 +7611,14 @@ $LN179@stbi__conv: 00414 5b pop rbx 00415 c3 ret 0 $LN57@stbi__conv: - -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); - +; Line 1252 00416 48 8b cd mov rcx, rbp 00419 ff 15 00 00 00 00 call QWORD PTR __imp_free 0041f 49 8b cf mov rcx, r15 00422 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00428 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0042e 65 48 8b 04 25 @@ -10412,21 +7628,15 @@ $LN57@stbi__conv: 00440 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0M@MHDBFHD@unsupported@ 00447 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); - +; Line 1252 0044b 33 c0 xor eax, eax 0044d eb ac jmp SHORT $LN179@stbi__conv $LN145@stbi__conv: - -; 1227 : STBI_FREE(data); - +; Line 1227 0044f 48 8b cd mov rcx, rbp 00452 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00458 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0045e 65 48 8b 04 25 @@ -10437,13 +7647,9 @@ $LN145@stbi__conv: 00475 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ 0047c 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1228 : return stbi__errpuc("outofmem", "Out of memory"); - +; Line 1228 00480 33 c0 xor eax, eax - -; 1259 : } - +; Line 1259 00482 48 83 c4 20 add rsp, 32 ; 00000020H 00486 41 5d pop r13 00488 41 5c pop r12 @@ -10482,16 +7688,14 @@ $LN150@stbi__conv: stbi__convert_format ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__compute_y_16 _TEXT SEGMENT r$ = 8 g$ = 16 b$ = 24 stbi__compute_y_16 PROC ; COMDAT - -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1267 00000 6b c9 4d imul ecx, ecx, 77 ; 0000004dH 00003 69 c2 96 00 00 00 imul eax, edx, 150 ; 00000096H @@ -10499,14 +7703,11 @@ stbi__compute_y_16 PROC ; COMDAT 0000b 41 6b c8 1d imul ecx, r8d, 29 0000f 03 c1 add eax, ecx 00011 c1 f8 08 sar eax, 8 - -; 1268 : } - +; Line 1268 00014 c3 ret 0 stbi__compute_y_16 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__convert_format16 _TEXT SEGMENT data$ = 64 @@ -10515,9 +7716,8 @@ req_comp$ = 80 x$ = 88 y$ = 96 stbi__convert_format16 PROC ; COMDAT - -; 1275 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1275 00000 48 89 6c 24 20 mov QWORD PTR [rsp+32], rbp 00005 56 push rsi 00006 57 push rdi @@ -10527,18 +7727,11 @@ stbi__convert_format16 PROC ; COMDAT 00010 41 8b e8 mov ebp, r8d 00013 44 8b e2 mov r12d, edx 00016 48 8b f9 mov rdi, rcx - -; 1276 : int i, j; -; 1277 : stbi__uint16* good; -; 1278 : -; 1279 : if (req_comp == img_n) return data; - +; Line 1279 00019 44 3b c2 cmp r8d, edx 0001c 75 11 jne SHORT $LN43@stbi__conv 0001e 48 8b c1 mov rax, rcx - -; 1316 : } - +; Line 1316 00021 48 8b 6c 24 58 mov rbp, QWORD PTR [rsp+88] 00026 48 83 c4 20 add rsp, 32 ; 00000020H 0002a 41 5c pop r12 @@ -10546,36 +7739,24 @@ stbi__convert_format16 PROC ; COMDAT 0002d 5e pop rsi 0002e c3 ret 0 $LN43@stbi__conv: - -; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1281 : -; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); - +; Line 1282 0002f 8b c5 mov eax, ebp 00031 4c 89 74 24 48 mov QWORD PTR [rsp+72], r14 00036 0f af c6 imul eax, esi 00039 0f af 44 24 60 imul eax, DWORD PTR y$[rsp] 0003e 8d 0c 00 lea ecx, DWORD PTR [rax+rax] - -; 438 : return STBI_MALLOC(size); - +; Line 438 00041 ff 15 00 00 00 00 call QWORD PTR __imp_malloc 00047 4c 8b f0 mov r14, rax - -; 1283 : if (good == NULL) { - +; Line 1283 0004a 48 85 c0 test rax, rax 0004d 75 33 jne SHORT $LN44@stbi__conv - -; 1284 : STBI_FREE(data); - +; Line 1284 0004f 48 8b cf mov rcx, rdi 00052 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00058 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0005e 65 48 8b 04 25 @@ -10585,18 +7766,12 @@ $LN43@stbi__conv: 00070 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ 00077 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); - +; Line 1285 0007b 33 c0 xor eax, eax 0007d e9 56 02 00 00 jmp $LN150@stbi__conv $LN44@stbi__conv: 00082 48 89 5c 24 40 mov QWORD PTR [rsp+64], rbx - -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { - +; Line 1288 00087 33 db xor ebx, ebx 00089 4c 89 7c 24 50 mov QWORD PTR [rsp+80], r15 0008e 39 5c 24 60 cmp DWORD PTR y$[rsp], ebx @@ -10614,28 +7789,17 @@ $LN44@stbi__conv: 1f 84 00 00 00 00 00 npad 12 $LL4@stbi__conv: - -; 1289 : stbi__uint16* src = data + j * x * img_n; - +; Line 1289 000c0 8b c3 mov eax, ebx 000c2 41 0f af c4 imul eax, r12d 000c6 0f af c6 imul eax, esi 000c9 4c 8d 0c 47 lea r9, QWORD PTR [rdi+rax*2] - -; 1290 : stbi__uint16* dest = good + j * x * req_comp; - +; Line 1290 000cd 8b c3 mov eax, ebx 000cf 0f af c5 imul eax, ebp 000d2 0f af c6 imul eax, esi 000d5 49 8d 04 46 lea rax, QWORD PTR [r14+rax*2] - -; 1291 : -; 1292 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1293 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1294 : // convert source image with img_n components to one with req_comp components; -; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1296 : switch (STBI__COMBO(img_n, req_comp)) { - +; Line 1296 000d9 41 83 ff 19 cmp r15d, 25 000dd 0f 87 58 03 00 00 ja $LN57@stbi__conv @@ -10645,9 +7809,7 @@ $LL4@stbi__conv: 000ee 49 03 d2 add rdx, r10 000f1 ff e2 jmp rdx $LN45@stbi__conv: - -; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; - +; Line 1297 000f3 41 8b d3 mov edx, r11d 000f6 45 85 db test r11d, r11d 000f9 0f 88 b7 01 00 @@ -10663,9 +7825,7 @@ $LL9@stbi__conv: 00117 79 e7 jns SHORT $LL9@stbi__conv 00119 e9 98 01 00 00 jmp $LN2@stbi__conv $LN46@stbi__conv: - -; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; - +; Line 1298 0011e 41 8b d3 mov edx, r11d 00121 45 85 db test r11d, r11d 00124 0f 88 8c 01 00 @@ -10683,9 +7843,7 @@ $LL12@stbi__conv: 0014a 79 e4 jns SHORT $LL12@stbi__conv 0014c e9 65 01 00 00 jmp $LN2@stbi__conv $LN47@stbi__conv: - -; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; - +; Line 1299 00151 41 8b d3 mov edx, r11d 00154 45 85 db test r11d, r11d 00157 0f 88 59 01 00 @@ -10703,9 +7861,7 @@ $LL15@stbi__conv: 0017f 79 df jns SHORT $LL15@stbi__conv 00181 e9 30 01 00 00 jmp $LN2@stbi__conv $LN48@stbi__conv: - -; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; - +; Line 1300 00186 41 8b d3 mov edx, r11d 00189 45 85 db test r11d, r11d 0018c 0f 88 24 01 00 @@ -10719,9 +7875,7 @@ $LL18@stbi__conv: 001a4 79 ec jns SHORT $LL18@stbi__conv 001a6 e9 0b 01 00 00 jmp $LN2@stbi__conv $LN49@stbi__conv: - -; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; - +; Line 1301 001ab 41 8b d3 mov edx, r11d 001ae 45 85 db test r11d, r11d 001b1 0f 88 ff 00 00 @@ -10739,9 +7893,7 @@ $LL21@stbi__conv: 001da 79 e4 jns SHORT $LL21@stbi__conv 001dc e9 d5 00 00 00 jmp $LN2@stbi__conv $LN50@stbi__conv: - -; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; - +; Line 1302 001e1 41 8b d3 mov edx, r11d 001e4 45 85 db test r11d, r11d 001e7 0f 88 c9 00 00 @@ -10760,9 +7912,7 @@ $LL24@stbi__conv: 00213 79 db jns SHORT $LL24@stbi__conv 00215 e9 9c 00 00 00 jmp $LN2@stbi__conv $LN51@stbi__conv: - -; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; - +; Line 1303 0021a 41 8b d3 mov edx, r11d 0021d 45 85 db test r11d, r11d 00220 0f 88 90 00 00 @@ -10783,9 +7933,7 @@ $LL27@stbi__conv: 00259 79 d5 jns SHORT $LL27@stbi__conv 0025b eb 59 jmp SHORT $LN2@stbi__conv $LN52@stbi__conv: - -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; - +; Line 1304 0025d 45 8b d3 mov r10d, r11d 00260 45 85 db test r11d, r11d 00263 78 4a js SHORT $LN129@stbi__conv @@ -10795,43 +7943,27 @@ $LN52@stbi__conv: $LL30@stbi__conv: 00270 41 0f b7 49 02 movzx ecx, WORD PTR [r9+2] 00275 48 8d 40 02 lea rax, QWORD PTR [rax+2] - -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1267 00279 44 69 c1 96 00 00 00 imul r8d, ecx, 150 ; 00000096H - -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; - +; Line 1304 00280 41 0f b7 49 04 movzx ecx, WORD PTR [r9+4] 00285 4d 8d 49 06 lea r9, QWORD PTR [r9+6] - -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1267 00289 6b d1 1d imul edx, ecx, 29 - -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; - +; Line 1304 0028c 41 0f b7 49 fa movzx ecx, WORD PTR [r9-6] - -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1267 00291 44 03 c2 add r8d, edx 00294 6b d1 4d imul edx, ecx, 77 ; 0000004dH 00297 44 03 c2 add r8d, edx 0029a 41 c1 e8 08 shr r8d, 8 - -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; - +; Line 1304 0029e 41 83 ea 01 sub r10d, 1 002a2 66 44 89 40 fe mov WORD PTR [rax-2], r8w 002a7 79 c7 jns SHORT $LL30@stbi__conv $LN154@stbi__conv: - -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { - +; Line 1288 002a9 41 b8 ff ff 00 00 mov r8d, 65535 ; 0000ffffH $LN129@stbi__conv: @@ -10843,28 +7975,18 @@ $LN2@stbi__conv: 002bc 0f 8c fe fd ff ff jl $LL4@stbi__conv $LN3@stbi__conv: - -; 1310 : } -; 1311 : #undef STBI__CASE -; 1312 : } -; 1313 : -; 1314 : STBI_FREE(data); - +; Line 1314 002c2 48 8b cf mov rcx, rdi 002c5 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 1315 : return good; - +; Line 1315 002cb 49 8b c6 mov rax, r14 $LN152@stbi__conv: 002ce 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] 002d3 4c 8b 7c 24 50 mov r15, QWORD PTR [rsp+80] $LN150@stbi__conv: 002d8 4c 8b 74 24 48 mov r14, QWORD PTR [rsp+72] - -; 1316 : } - +; Line 1316 002dd 48 8b 6c 24 58 mov rbp, QWORD PTR [rsp+88] 002e2 48 83 c4 20 add rsp, 32 ; 00000020H 002e6 41 5c pop r12 @@ -10872,9 +7994,7 @@ $LN150@stbi__conv: 002e9 5e pop rsi 002ea c3 ret 0 $LN53@stbi__conv: - -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; - +; Line 1305 002eb 45 8b d3 mov r10d, r11d 002ee 45 85 db test r11d, r11d 002f1 78 bc js SHORT $LN129@stbi__conv @@ -10884,34 +8004,22 @@ $LN53@stbi__conv: $LL33@stbi__conv: 00300 41 0f b7 49 02 movzx ecx, WORD PTR [r9+2] 00305 48 8d 40 04 lea rax, QWORD PTR [rax+4] - -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1267 00309 44 69 c1 96 00 00 00 imul r8d, ecx, 150 ; 00000096H - -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; - +; Line 1305 00310 41 0f b7 49 04 movzx ecx, WORD PTR [r9+4] 00315 4d 8d 49 06 lea r9, QWORD PTR [r9+6] - -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1267 00319 6b d1 1d imul edx, ecx, 29 - -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; - +; Line 1305 0031c 41 0f b7 49 fa movzx ecx, WORD PTR [r9-6] - -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1267 00321 44 03 c2 add r8d, edx 00324 6b d1 4d imul edx, ecx, 77 ; 0000004dH 00327 44 03 c2 add r8d, edx 0032a 41 c1 e8 08 shr r8d, 8 - -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; - +; Line 1305 0032e 41 83 ea 01 sub r10d, 1 00332 66 44 89 40 fc mov WORD PTR [rax-4], r8w 00337 41 b8 ff ff 00 @@ -10920,9 +8028,7 @@ $LL33@stbi__conv: 00342 79 bc jns SHORT $LL33@stbi__conv 00344 e9 66 ff ff ff jmp $LN129@stbi__conv $LN54@stbi__conv: - -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; - +; Line 1306 00349 45 8b d3 mov r10d, r11d 0034c 45 85 db test r11d, r11d 0034f 0f 88 5a ff ff @@ -10933,42 +8039,28 @@ $LN54@stbi__conv: $LL36@stbi__conv: 00360 41 0f b7 49 02 movzx ecx, WORD PTR [r9+2] 00365 48 8d 40 02 lea rax, QWORD PTR [rax+2] - -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1267 00369 44 69 c1 96 00 00 00 imul r8d, ecx, 150 ; 00000096H - -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; - +; Line 1306 00370 41 0f b7 49 04 movzx ecx, WORD PTR [r9+4] 00375 4d 8d 49 08 lea r9, QWORD PTR [r9+8] - -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1267 00379 6b d1 1d imul edx, ecx, 29 - -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; - +; Line 1306 0037c 41 0f b7 49 f8 movzx ecx, WORD PTR [r9-8] - -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1267 00381 44 03 c2 add r8d, edx 00384 6b d1 4d imul edx, ecx, 77 ; 0000004dH 00387 44 03 c2 add r8d, edx 0038a 41 c1 e8 08 shr r8d, 8 - -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; - +; Line 1306 0038e 41 83 ea 01 sub r10d, 1 00392 66 44 89 40 fe mov WORD PTR [rax-2], r8w 00397 79 c7 jns SHORT $LL36@stbi__conv 00399 e9 0b ff ff ff jmp $LN154@stbi__conv $LN55@stbi__conv: - -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; - +; Line 1307 0039e 45 8b d3 mov r10d, r11d 003a1 45 85 db test r11d, r11d 003a4 0f 88 05 ff ff @@ -10978,34 +8070,22 @@ $LN55@stbi__conv: $LL39@stbi__conv: 003b0 41 0f b7 49 02 movzx ecx, WORD PTR [r9+2] 003b5 48 8d 40 04 lea rax, QWORD PTR [rax+4] - -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1267 003b9 44 69 c1 96 00 00 00 imul r8d, ecx, 150 ; 00000096H - -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; - +; Line 1307 003c0 41 0f b7 49 04 movzx ecx, WORD PTR [r9+4] 003c5 4d 8d 49 08 lea r9, QWORD PTR [r9+8] - -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1267 003c9 6b d1 1d imul edx, ecx, 29 - -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; - +; Line 1307 003cc 41 0f b7 49 f8 movzx ecx, WORD PTR [r9-8] - -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); - +; Line 1267 003d1 44 03 c2 add r8d, edx 003d4 6b d1 4d imul edx, ecx, 77 ; 0000004dH 003d7 44 03 c2 add r8d, edx 003da 41 c1 e8 08 shr r8d, 8 - -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; - +; Line 1307 003de 41 83 ea 01 sub r10d, 1 003e2 66 44 89 40 fc mov WORD PTR [rax-4], r8w 003e7 41 0f b7 49 fe movzx ecx, WORD PTR [r9-2] @@ -11013,9 +8093,7 @@ $LL39@stbi__conv: 003f0 79 be jns SHORT $LL39@stbi__conv 003f2 e9 b2 fe ff ff jmp $LN154@stbi__conv $LN56@stbi__conv: - -; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; - +; Line 1308 003f7 41 8b d3 mov edx, r11d 003fa 45 85 db test r11d, r11d 003fd 0f 88 b3 fe ff @@ -11034,23 +8112,17 @@ $LL42@stbi__conv: 0042b 41 0f b7 49 fc movzx ecx, WORD PTR [r9-4] 00430 66 89 48 fe mov WORD PTR [rax-2], cx 00434 79 da jns SHORT $LL42@stbi__conv - -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; - +; Line 1307 00436 e9 7b fe ff ff jmp $LN2@stbi__conv $LN57@stbi__conv: - -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); - +; Line 1309 0043b 48 8b cf mov rcx, rdi 0043e ff 15 00 00 00 00 call QWORD PTR __imp_free 00444 49 8b ce mov rcx, r14 00447 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0044d 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00453 65 48 8b 04 25 @@ -11060,16 +8132,12 @@ $LN57@stbi__conv: 00465 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0M@MHDBFHD@unsupported@ 0046c 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); - +; Line 1309 00470 33 c0 xor eax, eax 00472 e9 57 fe ff ff jmp $LN152@stbi__conv 00477 90 npad 1 $LN125@stbi__conv: - -; 1316 : } - +; Line 1316 00478 00 00 00 00 DD $LN45@stbi__conv 0047c 00 00 00 00 DD $LN46@stbi__conv 00480 00 00 00 00 DD $LN47@stbi__conv @@ -11099,7 +8167,6 @@ $LN125@stbi__conv: stbi__convert_format16 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__hdr_to_ldr _TEXT SEGMENT tv691 = 32 @@ -11111,9 +8178,8 @@ x$ = 168 y$ = 176 comp$ = 184 stbi__hdr_to_ldr PROC ; COMDAT - -; 1347 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1347 00000 48 89 4c 24 08 mov QWORD PTR [rsp+8], rcx 00005 53 push rbx 00006 56 push rsi @@ -11123,97 +8189,63 @@ stbi__hdr_to_ldr PROC ; COMDAT 0000f 49 63 f1 movsxd rsi, r9d 00012 8b da mov ebx, edx 00014 48 8b f9 mov rdi, rcx - -; 1348 : int i, k, n; -; 1349 : stbi_uc* output; -; 1350 : if (!data) return NULL; - +; Line 1350 00017 48 85 c9 test rcx, rcx 0001a 0f 84 1d 02 00 00 je $LN67@stbi__hdr_ - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00020 85 d2 test edx, edx 00022 0f 88 e9 01 00 00 js $LN50@stbi__hdr_ 00028 45 85 c0 test r8d, r8d 0002b 0f 88 e0 01 00 00 js $LN50@stbi__hdr_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 00031 74 12 je SHORT $LN54@stbi__hdr_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 00033 33 d2 xor edx, edx 00035 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 0003a 41 f7 f0 div r8d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 0003d 3b d8 cmp ebx, eax 0003f 0f 8f cc 01 00 00 jg $LN50@stbi__hdr_ $LN54@stbi__hdr_: 00045 41 0f af d8 imul ebx, r8d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00049 85 db test ebx, ebx 0004b 0f 88 c0 01 00 00 js $LN50@stbi__hdr_ 00051 45 85 c9 test r9d, r9d 00054 0f 88 b7 01 00 00 js $LN50@stbi__hdr_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0005a 74 11 je SHORT $LN53@stbi__hdr_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 0005c 33 d2 xor edx, edx 0005e b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00063 f7 f6 div esi - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00065 3b d8 cmp ebx, eax 00067 0f 8f a4 01 00 00 jg $LN50@stbi__hdr_ $LN53@stbi__hdr_: - -; 509 : return stbi__malloc(a * b * c + add); - +; Line 509 0006d 8b c3 mov eax, ebx 0006f 0f af c6 imul eax, esi 00072 48 63 c8 movsxd rcx, eax - -; 438 : return STBI_MALLOC(size); - +; Line 438 00075 ff 15 00 00 00 00 call QWORD PTR __imp_malloc 0007b 48 89 44 24 30 mov QWORD PTR output$1$[rsp], rax 00080 4c 8b c0 mov r8, rax - -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } - +; Line 1352 00083 48 85 c0 test rax, rax 00086 0f 84 85 01 00 00 je $LN50@stbi__hdr_ - -; 1353 : // compute number of non-alpha components -; 1354 : if (comp & 1) n = comp; else n = comp - 1; - +; Line 1354 0008c 40 f6 c6 01 test sil, 1 - -; 1355 : for (i = 0; i < x * y; ++i) { - +; Line 1355 00090 8d 4e ff lea ecx, DWORD PTR [rsi-1] 00093 8b c6 mov eax, esi 00095 0f 44 c1 cmove eax, ecx @@ -11250,15 +8282,11 @@ $LN53@stbi__hdr_: 00108 4c 89 54 24 38 mov QWORD PTR tv698[rsp], r10 0010d 48 89 54 24 28 mov QWORD PTR tv693[rsp], rdx $LL4@stbi__hdr_: - -; 1356 : for (k = 0; k < n; ++k) { - +; Line 1356 00112 33 ed xor ebp, ebp 00114 4d 85 e4 test r12, r12 00117 7e 62 jle SHORT $LN6@stbi__hdr_ - -; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; - +; Line 1357 00119 33 db xor ebx, ebx 0011b 49 8b ff mov rdi, r15 0011e 8b e8 mov ebp, eax @@ -11271,18 +8299,13 @@ $LL7@stbi__hdr_: 00133 0f 57 c9 xorps xmm1, xmm1 00136 f2 0f 5a d0 cvtsd2ss xmm2, xmm0 0013a 48 83 c7 04 add rdi, 4 - -; 1358 : if (z < 0) z = 0; -; 1359 : if (z > 255) z = 255; - +; Line 1359 0013e 0f 28 c6 movaps xmm0, xmm6 00141 f3 0f 59 d6 mulss xmm2, xmm6 00145 f3 0f 58 d7 addss xmm2, xmm7 00149 f3 0f 5f ca maxss xmm1, xmm2 0014d f3 0f 5d c1 minss xmm0, xmm1 - -; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); - +; Line 1360 00151 f3 0f 2c c0 cvttss2si eax, xmm0 00155 41 88 04 1e mov BYTE PTR [r14+rbx], al 00159 48 ff c3 inc rbx @@ -11295,15 +8318,10 @@ $LL7@stbi__hdr_: 00171 4c 8b 44 24 30 mov r8, QWORD PTR output$1$[rsp] 00176 4c 8b 54 24 38 mov r10, QWORD PTR tv698[rsp] $LN6@stbi__hdr_: - -; 1361 : } -; 1362 : if (k < comp) { - +; Line 1362 0017b 3b ee cmp ebp, esi 0017d 7d 2b jge SHORT $LN2@stbi__hdr_ - -; 1363 : float z = data[i * comp + k] * 255 + 0.5f; - +; Line 1363 0017f 41 8b c5 mov eax, r13d 00182 0f 57 c9 xorps xmm1, xmm1 00185 03 c5 add eax, ebp @@ -11311,24 +8329,16 @@ $LN6@stbi__hdr_: 0018a f3 0f 10 04 8f movss xmm0, DWORD PTR [rdi+rcx*4] 0018f f3 0f 59 c6 mulss xmm0, xmm6 00193 f3 0f 58 c7 addss xmm0, xmm7 - -; 1364 : if (z < 0) z = 0; - +; Line 1364 00197 f3 0f 5f c8 maxss xmm1, xmm0 - -; 1365 : if (z > 255) z = 255; - +; Line 1365 0019b 0f 28 c6 movaps xmm0, xmm6 0019e f3 0f 5d c1 minss xmm0, xmm1 - -; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); - +; Line 1366 001a2 f3 0f 2c c0 cvttss2si eax, xmm0 001a6 42 88 04 01 mov BYTE PTR [rcx+r8], al $LN2@stbi__hdr_: - -; 1355 : for (i = 0; i < x * y; ++i) { - +; Line 1355 001aa 8b 44 24 20 mov eax, DWORD PTR tv691[rsp] 001ae 44 03 ee add r13d, esi 001b1 4d 03 fa add r15, r10 @@ -11350,21 +8360,13 @@ $LN2@stbi__hdr_: 001f0 48 8b ac 24 a8 00 00 00 mov rbp, QWORD PTR [rsp+168] $LN3@stbi__hdr_: - -; 1367 : } -; 1368 : } -; 1369 : STBI_FREE(data); - +; Line 1369 001f8 48 8b cf mov rcx, rdi 001fb ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 1370 : return output; - +; Line 1370 00201 48 8b 44 24 30 mov rax, QWORD PTR output$1$[rsp] - -; 1371 : } - +; Line 1371 00206 48 81 c4 80 00 00 00 add rsp, 128 ; 00000080H 0020d 5f pop rdi @@ -11372,16 +8374,11 @@ $LN3@stbi__hdr_: 0020f 5b pop rbx 00210 c3 ret 0 $LN50@stbi__hdr_: - -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } - +; Line 1352 00211 48 8b cf mov rcx, rdi 00214 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0021a 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 00223 8b 0d 00 00 00 @@ -11392,9 +8389,7 @@ $LN50@stbi__hdr_: 00 00 lea rax, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ 00239 48 89 04 0a mov QWORD PTR [rdx+rcx], rax $LN67@stbi__hdr_: - -; 1371 : } - +; Line 1371 0023d 33 c0 xor eax, eax 0023f 48 81 c4 80 00 00 00 add rsp, 128 ; 00000080H @@ -11405,39 +8400,29 @@ $LN67@stbi__hdr_: stbi__hdr_to_ldr ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__build_huffman _TEXT SEGMENT h$ = 64 count$ = 72 stbi__build_huffman PROC ; COMDAT - -; 1466 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1466 00000 40 53 push rbx 00002 56 push rsi 00003 41 57 push r15 00005 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1467 : int i, j, k = 0; - +; Line 1467 00009 33 f6 xor esi, esi 0000b 4c 8b f9 mov r15, rcx 0000e 44 8b d6 mov r10d, esi - -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { - +; Line 1470 00011 8b de mov ebx, esi 00013 8b c6 mov eax, esi 00015 66 66 66 0f 1f 84 00 00 00 00 00 npad 11 $LL4@stbi__buil: - -; 1471 : for (j = 0; j < count[i]; ++j) { - +; Line 1471 00020 4c 63 c3 movsxd r8, ebx 00023 44 8b ce mov r9d, esi 00026 46 8b 1c 82 mov r11d, DWORD PTR [rdx+r8*4] @@ -11445,52 +8430,31 @@ $LL4@stbi__buil: 0002d 7e 25 jle SHORT $LN2@stbi__buil 0002f 8d 4b 01 lea ecx, DWORD PTR [rbx+1] $LL7@stbi__buil: - -; 1472 : h->size[k++] = (stbi_uc)(i + 1); - +; Line 1472 00032 41 88 8c 07 00 05 00 00 mov BYTE PTR [r15+rax+1280], cl 0003a 41 ff c2 inc r10d 0003d 48 ff c0 inc rax - -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); - +; Line 1473 00040 48 3d 01 01 00 00 cmp rax, 257 ; 00000101H 00046 0f 8d 51 01 00 00 jge $LN34@stbi__buil - -; 1471 : for (j = 0; j < count[i]; ++j) { - +; Line 1471 0004c 41 ff c1 inc r9d 0004f 45 3b cb cmp r9d, r11d 00052 7c de jl SHORT $LL7@stbi__buil $LN2@stbi__buil: - -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { - +; Line 1470 00054 ff c3 inc ebx 00056 83 fb 10 cmp ebx, 16 00059 7c c5 jl SHORT $LL4@stbi__buil - -; 1474 : } -; 1475 : } -; 1476 : h->size[k] = 0; - +; Line 1476 0005b 49 63 c2 movsxd rax, r10d - -; 1477 : -; 1478 : // compute actual symbols (from jpeg spec) -; 1479 : code = 0; - +; Line 1479 0005e 8b d6 mov edx, esi 00060 48 89 7c 24 48 mov QWORD PTR [rsp+72], rdi - -; 1480 : k = 0; -; 1481 : for (j = 1; j <= 16; ++j) { - +; Line 1481 00065 41 ba 01 00 00 00 mov r10d, 1 0006b 4c 89 74 24 50 mov QWORD PTR [rsp+80], r14 @@ -11504,9 +8468,7 @@ $LN2@stbi__buil: 00088 0f 1f 84 00 00 00 00 00 npad 8 $LL10@stbi__buil: - -; 1484 : if (h->size[k] == j) { - +; Line 1484 00090 49 8d 8f 00 05 00 00 lea rcx, QWORD PTR [r15+1280] 00097 8b c3 mov eax, ebx @@ -11516,10 +8478,7 @@ $LL10@stbi__buil: 000a2 0f b6 01 movzx eax, BYTE PTR [rcx] 000a5 41 3b c2 cmp eax, r10d 000a8 75 47 jne SHORT $LN21@stbi__buil - -; 1482 : // compute delta to add to code to compute symbol id -; 1483 : h->delta[j] = k - code; - +; Line 1483 000aa 4d 8d 87 00 02 00 00 lea r8, QWORD PTR [r15+512] 000b1 4f 8d 04 48 lea r8, QWORD PTR [r8+r9*2] @@ -11527,10 +8486,7 @@ $LL10@stbi__buil: 84 00 00 00 00 00 npad 11 $LL11@stbi__buil: - -; 1485 : while (h->size[k] == j) -; 1486 : h->code[k++] = (stbi__uint16)(code++); - +; Line 1486 000c0 66 41 89 10 mov WORD PTR [r8], dx 000c4 48 8d 49 01 lea rcx, QWORD PTR [rcx+1] 000c8 0f b6 01 movzx eax, BYTE PTR [rcx] @@ -11541,9 +8497,7 @@ $LL11@stbi__buil: 000d7 ff c2 inc edx 000d9 41 3b c2 cmp eax, r10d 000dc 74 e2 je SHORT $LL11@stbi__buil - -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); - +; Line 1487 000de 41 8b ca mov ecx, r10d 000e1 b8 01 00 00 00 mov eax, 1 000e6 d3 e0 shl eax, cl @@ -11551,33 +8505,20 @@ $LL11@stbi__buil: 000eb 0f 83 da 00 00 00 jae $LN35@stbi__buil $LN21@stbi__buil: - -; 1488 : } -; 1489 : // compute largest code + 1 for this size, preshifted as needed later -; 1490 : h->maxcode[j] = code << (16 - j); - +; Line 1490 000f1 8b cf mov ecx, edi 000f3 8b c2 mov eax, edx 000f5 d3 e0 shl eax, cl - -; 1491 : code <<= 1; - +; Line 1491 000f7 03 d2 add edx, edx 000f9 41 89 06 mov DWORD PTR [r14], eax 000fc 41 ff c2 inc r10d 000ff 49 83 c6 04 add r14, 4 00103 83 ef 01 sub edi, 1 00106 79 88 jns SHORT $LL10@stbi__buil - -; 1492 : } -; 1493 : h->maxcode[j] = 0xffffffff; - +; Line 1493 00108 49 63 c2 movsxd rax, r10d - -; 1494 : -; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated -; 1496 : memset(h->fast, 255, 1 << FAST_BITS); - +; Line 1496 0010b ba ff 00 00 00 mov edx, 255 ; 000000ffH 00110 41 b8 00 02 00 00 mov r8d, 512 ; 00000200H @@ -11586,9 +8527,7 @@ $LN21@stbi__buil: 06 00 00 ff ff ff ff mov DWORD PTR [r15+rax*4+1540], -1 ; ffffffffH 00125 e8 00 00 00 00 call memset - -; 1497 : for (i = 0; i < k; ++i) { - +; Line 1497 0012a 85 db test ebx, ebx 0012c 7e 57 jle SHORT $LN14@stbi__buil 0012e 48 89 6c 24 40 mov QWORD PTR [rsp+64], rbp @@ -11597,44 +8536,30 @@ $LN21@stbi__buil: 0013a 49 8d af 00 02 00 00 lea rbp, QWORD PTR [r15+512] $LL15@stbi__buil: - -; 1498 : int s = h->size[i]; - +; Line 1498 00141 0f b6 07 movzx eax, BYTE PTR [rdi] - -; 1499 : if (s <= FAST_BITS) { - +; Line 1499 00144 83 f8 09 cmp eax, 9 00147 77 2a ja SHORT $LN13@stbi__buil - -; 1500 : int c = h->code[i] << (FAST_BITS - s); - +; Line 1500 00149 0f b7 55 00 movzx edx, WORD PTR [rbp] 0014d b9 09 00 00 00 mov ecx, 9 00152 2b c8 sub ecx, eax - -; 1501 : int m = 1 << (FAST_BITS - s); - +; Line 1501 00154 b8 01 00 00 00 mov eax, 1 00159 d3 e0 shl eax, cl 0015b d3 e2 shl edx, cl - -; 1502 : for (j = 0; j < m; ++j) { - +; Line 1502 0015d 85 c0 test eax, eax 0015f 7e 12 jle SHORT $LN13@stbi__buil - -; 1503 : h->fast[c + j] = (stbi_uc)i; - +; Line 1503 00161 48 63 ca movsxd rcx, edx 00164 40 0f b6 d6 movzx edx, sil 00168 49 03 cf add rcx, r15 0016b 4c 63 c0 movsxd r8, eax 0016e e8 00 00 00 00 call memset $LN13@stbi__buil: - -; 1497 : for (i = 0; i < k; ++i) { - +; Line 1497 00173 ff c6 inc esi 00175 48 83 c5 02 add rbp, 2 00179 48 ff c7 inc rdi @@ -11642,28 +8567,19 @@ $LN13@stbi__buil: 0017e 7c c1 jl SHORT $LL15@stbi__buil 00180 48 8b 6c 24 40 mov rbp, QWORD PTR [rsp+64] $LN14@stbi__buil: - -; 1504 : } -; 1505 : } -; 1506 : } -; 1507 : return 1; - +; Line 1507 00185 b8 01 00 00 00 mov eax, 1 $LN68@stbi__buil: 0018a 48 8b 7c 24 48 mov rdi, QWORD PTR [rsp+72] 0018f 4c 8b 74 24 50 mov r14, QWORD PTR [rsp+80] - -; 1508 : } - +; Line 1508 00194 48 83 c4 20 add rsp, 32 ; 00000020H 00198 41 5f pop r15 0019a 5e pop rsi 0019b 5b pop rbx 0019c c3 ret 0 $LN34@stbi__buil: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0019d 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 001a3 65 48 8b 04 25 @@ -11673,22 +8589,16 @@ $LN34@stbi__buil: 001b5 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0O@DEFOLMLB@bad?5size?5list@ 001bc 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); - +; Line 1473 001c0 33 c0 xor eax, eax - -; 1508 : } - +; Line 1508 001c2 48 83 c4 20 add rsp, 32 ; 00000020H 001c6 41 5f pop r15 001c8 5e pop rsi 001c9 5b pop rbx 001ca c3 ret 0 $LN35@stbi__buil: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 001cb 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 001d1 65 48 8b 04 25 @@ -11698,29 +8608,22 @@ $LN35@stbi__buil: 001e3 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BB@FOKGPEKG@bad?5code?5lengths@ 001ea 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); - +; Line 1487 001ee 33 c0 xor eax, eax 001f0 eb 98 jmp SHORT $LN68@stbi__buil stbi__build_huffman ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__build_fast_ac _TEXT SEGMENT fast_ac$ = 16 h$ = 24 stbi__build_fast_ac PROC ; COMDAT - -; 1513 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1513 00000 48 89 6c 24 18 mov QWORD PTR [rsp+24], rbp 00005 56 push rsi - -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { - +; Line 1515 00006 33 ed xor ebp, ebp 00008 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx 0000d 44 8b d5 mov r10d, ebp @@ -11730,53 +8633,33 @@ stbi__build_fast_ac PROC ; COMDAT 0001b 4c 8b da mov r11, rdx 0001e 66 90 npad 2 $LL4@stbi__buil: - -; 1516 : stbi_uc fast = h->fast[i]; - +; Line 1516 00020 41 0f b6 03 movzx eax, BYTE PTR [r11] - -; 1517 : fast_ac[i] = 0; - +; Line 1517 00024 66 41 89 29 mov WORD PTR [r9], bp - -; 1518 : if (fast < 255) { - +; Line 1518 00028 3c ff cmp al, 255 ; 000000ffH 0002a 0f 83 82 00 00 00 jae $LN2@stbi__buil - -; 1519 : int rs = h->values[fast]; - +; Line 1519 00030 44 0f b6 84 30 00 04 00 00 movzx r8d, BYTE PTR [rax+rsi+1024] - -; 1520 : int run = (rs >> 4) & 15; -; 1521 : int magbits = rs & 15; -; 1522 : int len = h->size[fast]; - +; Line 1522 00039 0f b6 9c 30 00 05 00 00 movzx ebx, BYTE PTR [rax+rsi+1280] 00041 41 8b f8 mov edi, r8d 00044 c1 ef 04 shr edi, 4 00047 41 83 e0 0f and r8d, 15 - -; 1523 : -; 1524 : if (magbits && len + magbits <= FAST_BITS) { - +; Line 1524 0004b 74 65 je SHORT $LN2@stbi__buil 0004d 42 8d 04 03 lea eax, DWORD PTR [rbx+r8] 00051 83 f8 09 cmp eax, 9 00054 77 5c ja SHORT $LN2@stbi__buil - -; 1525 : // magnitude code followed by receive_extend code -; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); - +; Line 1526 00056 8b cb mov ecx, ebx 00058 41 8b c2 mov eax, r10d 0005b d3 e0 shl eax, cl - -; 1527 : int m = 1 << (magbits - 1); - +; Line 1527 0005d ba 01 00 00 00 mov edx, 1 00062 25 ff 01 00 00 and eax, 511 ; 000001ffH 00067 b9 09 00 00 00 mov ecx, 9 @@ -11784,9 +8667,7 @@ $LL4@stbi__buil: 0006f d3 f8 sar eax, cl 00071 41 8d 48 ff lea ecx, DWORD PTR [r8-1] 00075 d3 e2 shl edx, cl - -; 1528 : if (k < m) k += (~0U << magbits) + 1; - +; Line 1528 00077 3b c2 cmp eax, edx 00079 7d 13 jge SHORT $LN7@stbi__buil 0007b 41 8b c8 mov ecx, r8d @@ -11796,18 +8677,13 @@ $LL4@stbi__buil: 0008a 2b ca sub ecx, edx 0008c 03 c1 add eax, ecx $LN7@stbi__buil: - -; 1529 : // if the result is small enough, we can fit it in fast_ac table -; 1530 : if (k >= -128 && k <= 127) - +; Line 1530 0008e 8d 88 80 00 00 00 lea ecx, DWORD PTR [rax+128] 00094 81 f9 ff 00 00 00 cmp ecx, 255 ; 000000ffH 0009a 77 16 ja SHORT $LN2@stbi__buil - -; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); - +; Line 1531 0009c 66 c1 e0 04 shl ax, 4 000a0 66 03 c7 add ax, di 000a3 66 c1 e0 04 shl ax, 4 @@ -11815,10 +8691,7 @@ $LN7@stbi__buil: 000aa 66 41 03 c0 add ax, r8w 000ae 66 41 89 01 mov WORD PTR [r9], ax $LN2@stbi__buil: - -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { - +; Line 1515 000b2 41 ff c2 inc r10d 000b5 49 ff c3 inc r11 000b8 49 83 c1 02 add r9, 2 @@ -11828,36 +8701,26 @@ $LN2@stbi__buil: ff jl $LL4@stbi__buil 000c9 48 8b 7c 24 18 mov rdi, QWORD PTR [rsp+24] 000ce 48 8b 5c 24 10 mov rbx, QWORD PTR [rsp+16] - -; 1532 : } -; 1533 : } -; 1534 : } -; 1535 : } - +; Line 1535 000d3 48 8b 6c 24 20 mov rbp, QWORD PTR [rsp+32] 000d8 5e pop rsi 000d9 c3 ret 0 stbi__build_fast_ac ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__grow_buffer_unsafe _TEXT SEGMENT j$ = 48 stbi__grow_buffer_unsafe PROC ; COMDAT - -; 1538 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1538 00000 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H 0000a 48 8b f9 mov rdi, rcx 0000d 48 89 74 24 30 mov QWORD PTR [rsp+48], rsi $LL4@stbi__grow: - -; 1539 : do { -; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); - +; Line 1540 00012 83 bf 2c 48 00 00 00 cmp DWORD PTR [rdi+18476], 0 00019 74 07 je SHORT $LN10@stbi__grow @@ -11865,36 +8728,26 @@ $LL4@stbi__grow: 0001d e9 04 01 00 00 jmp $LN8@stbi__grow $LN10@stbi__grow: 00022 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00025 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0002c 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00033 73 0f jae SHORT $LN13@stbi__grow - -; 1078 : return *s->img_buffer++; - +; Line 1078 00035 0f b6 08 movzx ecx, BYTE PTR [rax] 00038 48 ff c0 inc rax 0003b 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00042 eb 26 jmp SHORT $LN12@stbi__grow $LN13@stbi__grow: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00044 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00048 74 1e je SHORT $LN14@stbi__grow - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0004a 48 8b cb mov rcx, rbx 0004d e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00052 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00059 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -11903,58 +8756,38 @@ $LN13@stbi__grow: 00 00 mov QWORD PTR [rbx+192], rax 00066 eb 02 jmp SHORT $LN12@stbi__grow $LN14@stbi__grow: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00068 32 c9 xor cl, cl $LN12@stbi__grow: - -; 1539 : do { -; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); - +; Line 1540 0006a 0f b6 f1 movzx esi, cl - -; 1541 : if (b == 0xff) { - +; Line 1541 0006d 81 fe ff 00 00 00 cmp esi, 255 ; 000000ffH 00073 0f 85 ad 00 00 00 jne $LN8@stbi__grow - -; 1542 : int c = stbi__get8(j->s); - +; Line 1542 00079 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0007c 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00083 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0008a 73 0f jae SHORT $LN17@stbi__grow - -; 1078 : return *s->img_buffer++; - +; Line 1078 0008c 0f b6 08 movzx ecx, BYTE PTR [rax] 0008f 48 ff c0 inc rax 00092 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00099 eb 26 jmp SHORT $LN16@stbi__grow $LN17@stbi__grow: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0009b 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0009f 74 1e je SHORT $LN18@stbi__grow - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000a1 48 8b cb mov rcx, rbx 000a4 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000a9 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000b0 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -11963,54 +8796,37 @@ $LN17@stbi__grow: 00 00 mov QWORD PTR [rbx+192], rax 000bd eb 02 jmp SHORT $LN16@stbi__grow $LN18@stbi__grow: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000bf 32 c9 xor cl, cl $LN16@stbi__grow: - -; 1542 : int c = stbi__get8(j->s); - +; Line 1542 000c1 0f b6 c1 movzx eax, cl - -; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes - +; Line 1543 000c4 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 000c9 75 57 jne SHORT $LN6@stbi__grow 000cb 0f 1f 44 00 00 npad 5 $LL5@stbi__grow: 000d0 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000d3 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000da 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 000e1 73 0f jae SHORT $LN21@stbi__grow - -; 1078 : return *s->img_buffer++; - +; Line 1078 000e3 0f b6 08 movzx ecx, BYTE PTR [rax] 000e6 48 ff c0 inc rax 000e9 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 000f0 eb 26 jmp SHORT $LN20@stbi__grow $LN21@stbi__grow: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000f2 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 000f6 74 1e je SHORT $LN22@stbi__grow - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000f8 48 8b cb mov rcx, rbx 000fb e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00100 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00107 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -12019,56 +8835,36 @@ $LN21@stbi__grow: 00 00 mov QWORD PTR [rbx+192], rax 00114 eb 02 jmp SHORT $LN20@stbi__grow $LN22@stbi__grow: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00116 32 c9 xor cl, cl $LN20@stbi__grow: - -; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes - +; Line 1543 00118 0f b6 c1 movzx eax, cl 0011b 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 00120 74 ae je SHORT $LL5@stbi__grow $LN6@stbi__grow: - -; 1544 : if (c != 0) { - +; Line 1544 00122 85 c0 test eax, eax 00124 75 37 jne SHORT $LN26@stbi__grow $LN8@stbi__grow: - -; 1545 : j->marker = (unsigned char)c; -; 1546 : j->nomore = 1; -; 1547 : return; -; 1548 : } -; 1549 : } -; 1550 : j->code_buffer |= b << (24 - j->code_bits); - +; Line 1550 00126 8b 87 24 48 00 00 mov eax, DWORD PTR [rdi+18468] 0012c b9 18 00 00 00 mov ecx, 24 00131 2b c8 sub ecx, eax - -; 1551 : j->code_bits += 8; - +; Line 1551 00133 83 c0 08 add eax, 8 00136 d3 e6 shl esi, cl 00138 09 b7 20 48 00 00 or DWORD PTR [rdi+18464], esi 0013e 89 87 24 48 00 00 mov DWORD PTR [rdi+18468], eax - -; 1552 : } while (j->code_bits <= 24); - +; Line 1552 00144 83 f8 18 cmp eax, 24 00147 0f 8e c5 fe ff ff jle $LL4@stbi__grow 0014d 48 8b 74 24 30 mov rsi, QWORD PTR [rsp+48] - -; 1553 : } - +; Line 1553 00152 48 8b 5c 24 38 mov rbx, QWORD PTR [rsp+56] 00157 48 83 c4 20 add rsp, 32 ; 00000020H 0015b 5f pop rdi @@ -12086,24 +8882,17 @@ $LN26@stbi__grow: stbi__grow_buffer_unsafe ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__jpeg_huff_decode _TEXT SEGMENT j$ = 48 h$ = 56 stbi__jpeg_huff_decode PROC ; COMDAT - -; 1560 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1560 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1561 : unsigned int temp; -; 1562 : int c, k; -; 1563 : -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - +; Line 1564 0000a 83 b9 24 48 00 00 10 cmp DWORD PTR [rcx+18468], 16 00011 48 8b fa mov rdi, rdx @@ -12111,29 +8900,17 @@ stbi__jpeg_huff_decode PROC ; COMDAT 00017 7d 05 jge SHORT $LN5@stbi__jpeg 00019 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN5@stbi__jpeg: - -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); - +; Line 1568 0001e 44 8b 8b 20 48 00 00 mov r9d, DWORD PTR [rbx+18464] 00025 41 8b c1 mov eax, r9d 00028 48 c1 e8 17 shr rax, 23 - -; 1569 : k = h->fast[c]; - +; Line 1569 0002c 0f b6 0c 38 movzx ecx, BYTE PTR [rax+rdi] - -; 1570 : if (k < 255) { - +; Line 1570 00030 80 f9 ff cmp cl, 255 ; 000000ffH 00033 73 39 jae SHORT $LN6@stbi__jpeg - -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) - +; Line 1572 00035 8b 83 24 48 00 00 mov eax, DWORD PTR [rbx+18468] 0003b 8b d1 mov edx, ecx @@ -12141,47 +8918,26 @@ $LN5@stbi__jpeg: 05 00 00 movzx ecx, BYTE PTR [rcx+rdi+1280] 00045 3b c8 cmp ecx, eax 00047 7f 5e jg SHORT $LN12@stbi__jpeg - -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; - +; Line 1574 00049 41 d3 e1 shl r9d, cl - -; 1575 : j->code_bits -= s; - +; Line 1575 0004c 2b c1 sub eax, ecx 0004e 44 89 8b 20 48 00 00 mov DWORD PTR [rbx+18464], r9d 00055 89 83 24 48 00 00 mov DWORD PTR [rbx+18468], eax - -; 1576 : return h->values[k]; - +; Line 1576 0005b 0f b6 84 3a 00 04 00 00 movzx eax, BYTE PTR [rdx+rdi+1024] - -; 1608 : } - +; Line 1608 00063 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00068 48 83 c4 20 add rsp, 32 ; 00000020H 0006c 5f pop rdi 0006d c3 ret 0 $LN6@stbi__jpeg: - -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; - +; Line 1585 0006e 41 8b c9 mov ecx, r9d - -; 1587 : if (temp < h->maxcode[k]) - +; Line 1587 00071 48 8d 87 2c 06 00 00 lea rax, QWORD PTR [rdi+1580] 00078 c1 e9 10 shr ecx, 16 @@ -12190,56 +8946,34 @@ $LN6@stbi__jpeg: 00081 3b 08 cmp ecx, DWORD PTR [rax] 00083 72 0b jb SHORT $LN16@stbi__jpeg $LL4@stbi__jpeg: - -; 1586 : for (k = FAST_BITS + 1; ; ++k) - +; Line 1586 00085 41 ff c0 inc r8d 00088 48 8d 40 04 lea rax, QWORD PTR [rax+4] - -; 1587 : if (temp < h->maxcode[k]) - +; Line 1587 0008c 3b 08 cmp ecx, DWORD PTR [rax] 0008e 73 f5 jae SHORT $LL4@stbi__jpeg $LN16@stbi__jpeg: - -; 1588 : break; -; 1589 : if (k == 17) { - +; Line 1589 00090 44 8b 93 24 48 00 00 mov r10d, DWORD PTR [rbx+18468] 00097 41 83 f8 11 cmp r8d, 17 0009b 75 1a jne SHORT $LN9@stbi__jpeg - -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; - +; Line 1591 0009d 41 8d 42 f0 lea eax, DWORD PTR [r10-16] 000a1 89 83 24 48 00 00 mov DWORD PTR [rbx+18468], eax $LN12@stbi__jpeg: - -; 1608 : } - +; Line 1608 000a7 b8 ff ff ff ff mov eax, -1 000ac 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 000b1 48 83 c4 20 add rsp, 32 ; 00000020H 000b5 5f pop rdi 000b6 c3 ret 0 $LN9@stbi__jpeg: - -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) - +; Line 1595 000b7 45 3b c2 cmp r8d, r10d 000ba 7f eb jg SHORT $LN12@stbi__jpeg - -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; - +; Line 1599 000bc b9 20 00 00 00 mov ecx, 32 ; 00000020H 000c1 49 63 c0 movsxd rax, r8d 000c4 41 2b c8 sub ecx, r8d @@ -12250,24 +8984,13 @@ $LN9@stbi__jpeg: 000d4 44 23 1c 81 and r11d, DWORD PTR [rcx+rax*4] 000d8 44 03 9c 87 4c 06 00 00 add r11d, DWORD PTR [rdi+rax*4+1612] - -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! - +; Line 1600 000e0 41 81 fb ff 00 00 00 cmp r11d, 255 ; 000000ffH 000e7 77 be ja SHORT $LN12@stbi__jpeg - -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; - +; Line 1605 000e9 45 2b d0 sub r10d, r8d - -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; - +; Line 1607 000ec 49 63 c3 movsxd rax, r11d 000ef 44 89 93 24 48 00 00 mov DWORD PTR [rbx+18468], r10d @@ -12277,9 +9000,7 @@ $LN9@stbi__jpeg: 00 00 mov DWORD PTR [rbx+18464], r9d 00103 0f b6 84 38 00 04 00 00 movzx eax, BYTE PTR [rax+rdi+1024] - -; 1608 : } - +; Line 1608 0010b 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00110 48 83 c4 20 add rsp, 32 ; 00000020H 00114 5f pop rdi @@ -12287,74 +9008,53 @@ $LN9@stbi__jpeg: stbi__jpeg_huff_decode ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__extend_receive _TEXT SEGMENT j$ = 48 n$ = 56 stbi__extend_receive PROC ; COMDAT - -; 1616 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1616 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H 0000a 48 63 fa movsxd rdi, edx 0000d 48 8b d9 mov rbx, rcx - -; 1617 : unsigned int k; -; 1618 : int sgn; -; 1619 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); - +; Line 1619 00010 39 b9 24 48 00 00 cmp DWORD PTR [rcx+18468], edi 00016 7d 05 jge SHORT $LN2@stbi__exte 00018 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN2@stbi__exte: - -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing - +; Line 1620 0001d 44 8b 93 24 48 00 00 mov r10d, DWORD PTR [rbx+18468] 00024 44 3b d7 cmp r10d, edi 00027 7d 0d jge SHORT $LN3@stbi__exte 00029 33 c0 xor eax, eax - -; 1628 : } - +; Line 1628 0002b 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00030 48 83 c4 20 add rsp, 32 ; 00000020H 00034 5f pop rdi 00035 c3 ret 0 $LN3@stbi__exte: - -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) - +; Line 1622 00036 44 8b 8b 20 48 00 00 mov r9d, DWORD PTR [rbx+18464] - -; 1623 : k = stbi_lrot(j->code_buffer, n); -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; - +; Line 1624 0003d 4c 8d 1d 00 00 00 00 lea r11, OFFSET FLAT:__ImageBase 00044 45 8b c1 mov r8d, r9d 00047 8b cf mov ecx, edi 00049 41 d3 c0 rol r8d, cl - -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; - +; Line 1626 0004c 44 2b d7 sub r10d, edi 0004f 48 8d 0c bd 00 00 00 00 lea rcx, QWORD PTR [rdi*4] 00057 41 c1 e9 1f shr r9d, 31 0005b 42 8b 94 19 00 00 00 00 mov edx, DWORD PTR stbi__bmask[rcx+r11] - -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); - +; Line 1627 00063 41 ff c9 dec r9d 00066 8b c2 mov eax, edx 00068 44 89 93 24 48 @@ -12366,9 +9066,7 @@ $LN3@stbi__exte: 00 mov DWORD PTR [rbx+18464], eax 0007d 42 8b 84 19 00 00 00 00 mov eax, DWORD PTR stbi__jbias[rcx+r11] - -; 1628 : } - +; Line 1628 00085 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 0008a 41 23 c1 and eax, r9d 0008d 03 c2 add eax, edx @@ -12378,58 +9076,42 @@ $LN3@stbi__exte: stbi__extend_receive ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__jpeg_get_bits _TEXT SEGMENT j$ = 48 n$ = 56 stbi__jpeg_get_bits PROC ; COMDAT - -; 1632 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1632 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H 0000a 48 63 fa movsxd rdi, edx 0000d 48 8b d9 mov rbx, rcx - -; 1633 : unsigned int k; -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); - +; Line 1634 00010 39 b9 24 48 00 00 cmp DWORD PTR [rcx+18468], edi 00016 7d 05 jge SHORT $LN2@stbi__jpeg 00018 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN2@stbi__jpeg: - -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing - +; Line 1635 0001d 44 8b 83 24 48 00 00 mov r8d, DWORD PTR [rbx+18468] 00024 44 3b c7 cmp r8d, edi 00027 7d 0d jge SHORT $LN3@stbi__jpeg 00029 33 c0 xor eax, eax - -; 1640 : return k; -; 1641 : } - +; Line 1641 0002b 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00030 48 83 c4 20 add rsp, 32 ; 00000020H 00034 5f pop rdi 00035 c3 ret 0 $LN3@stbi__jpeg: - -; 1636 : k = stbi_lrot(j->code_buffer, n); - +; Line 1636 00036 8b 93 20 48 00 00 mov edx, DWORD PTR [rbx+18464] 0003c 8b cf mov ecx, edi 0003e d3 c2 rol edx, cl - -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; - +; Line 1639 00040 44 2b c7 sub r8d, edi 00043 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:stbi__bmask @@ -12442,10 +9124,7 @@ $LN3@stbi__jpeg: 0005a 89 8b 20 48 00 00 mov DWORD PTR [rbx+18464], ecx 00060 23 c2 and eax, edx - -; 1640 : return k; -; 1641 : } - +; Line 1641 00062 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00067 48 83 c4 20 add rsp, 32 ; 00000020H 0006b 5f pop rdi @@ -12453,70 +9132,51 @@ $LN3@stbi__jpeg: stbi__jpeg_get_bits ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__jpeg_get_bit _TEXT SEGMENT j$ = 48 stbi__jpeg_get_bit PROC ; COMDAT - -; 1644 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1644 00000 40 53 push rbx 00002 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1645 : unsigned int k; -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); - +; Line 1646 00006 83 b9 24 48 00 00 01 cmp DWORD PTR [rcx+18468], 1 0000d 48 8b d9 mov rbx, rcx 00010 7d 05 jge SHORT $LN2@stbi__jpeg 00012 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN2@stbi__jpeg: - -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing - +; Line 1647 00017 8b 93 24 48 00 00 mov edx, DWORD PTR [rbx+18468] 0001d 83 fa 01 cmp edx, 1 00020 7d 08 jge SHORT $LN3@stbi__jpeg 00022 33 c0 xor eax, eax - -; 1652 : } - +; Line 1652 00024 48 83 c4 20 add rsp, 32 ; 00000020H 00028 5b pop rbx 00029 c3 ret 0 $LN3@stbi__jpeg: - -; 1648 : k = j->code_buffer; - +; Line 1648 0002a 8b 83 20 48 00 00 mov eax, DWORD PTR [rbx+18464] - -; 1649 : j->code_buffer <<= 1; - +; Line 1649 00030 8d 0c 00 lea ecx, DWORD PTR [rax+rax] - -; 1650 : --j->code_bits; -; 1651 : return k & 0x80000000; - +; Line 1651 00033 25 00 00 00 80 and eax, -2147483648 ; 80000000H 00038 89 8b 20 48 00 00 mov DWORD PTR [rbx+18464], ecx 0003e 8d 4a ff lea ecx, DWORD PTR [rdx-1] 00041 89 8b 24 48 00 00 mov DWORD PTR [rbx+18468], ecx - -; 1652 : } - +; Line 1652 00047 48 83 c4 20 add rsp, 32 ; 00000020H 0004b 5b pop rbx 0004c c3 ret 0 stbi__jpeg_get_bit ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__jpeg_decode_block _TEXT SEGMENT j$ = 80 @@ -12527,21 +9187,15 @@ fac$ = 112 b$ = 120 dequant$ = 128 stbi__jpeg_decode_block PROC ; COMDAT - -; 1673 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1673 00000 40 53 push rbx 00002 55 push rbp 00003 57 push rdi 00004 41 56 push r14 00006 41 57 push r15 00008 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1674 : int diff, dc, k; -; 1675 : int t; -; 1676 : -; 1677 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - +; Line 1677 0000c 83 b9 24 48 00 00 10 cmp DWORD PTR [rcx+18468], 16 00013 4d 8b f1 mov r14, r9 @@ -12551,26 +9205,17 @@ stbi__jpeg_decode_block PROC ; COMDAT 0001f 7d 05 jge SHORT $LN5@stbi__jpeg 00021 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN5@stbi__jpeg: - -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - +; Line 1564 00026 83 bb 24 48 00 00 10 cmp DWORD PTR [rbx+18468], 16 0002d 7d 08 jge SHORT $LN25@stbi__jpeg 0002f 48 8b cb mov rcx, rbx 00032 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN25@stbi__jpeg: - -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); - +; Line 1568 00037 44 8b 8b 20 48 00 00 mov r9d, DWORD PTR [rbx+18464] - -; 1570 : if (k < 255) { - +; Line 1570 0003e 48 8d 2d 00 00 00 00 lea rbp, OFFSET FLAT:__ImageBase 00045 41 8b c1 mov eax, r9d @@ -12578,10 +9223,7 @@ $LN25@stbi__jpeg: 0004c 0f b6 0c 38 movzx ecx, BYTE PTR [rax+rdi] 00050 80 f9 ff cmp cl, 255 ; 000000ffH 00053 73 33 jae SHORT $LN26@stbi__jpeg - -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) - +; Line 1572 00055 8b 83 24 48 00 00 mov eax, DWORD PTR [rbx+18468] 0005b 8b d1 mov edx, ecx @@ -12589,80 +9231,49 @@ $LN25@stbi__jpeg: 05 00 00 movzx ecx, BYTE PTR [rcx+rdi+1280] 00065 3b c8 cmp ecx, eax 00067 7f 59 jg SHORT $LN7@stbi__jpeg - -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; - +; Line 1574 00069 41 d3 e1 shl r9d, cl - -; 1575 : j->code_bits -= s; - +; Line 1575 0006c 2b c1 sub eax, ecx 0006e 44 89 8b 20 48 00 00 mov DWORD PTR [rbx+18464], r9d 00075 89 83 24 48 00 00 mov DWORD PTR [rbx+18468], eax - -; 1576 : return h->values[k]; - +; Line 1576 0007b 0f b6 84 3a 00 04 00 00 movzx eax, BYTE PTR [rdx+rdi+1024] 00083 e9 bc 00 00 00 jmp $LN21@stbi__jpeg $LN26@stbi__jpeg: - -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; - +; Line 1585 00088 41 8b c9 mov ecx, r9d - -; 1587 : if (temp < h->maxcode[k]) - +; Line 1587 0008b 48 8d 87 2c 06 00 00 lea rax, QWORD PTR [rdi+1580] 00092 c1 e9 10 shr ecx, 16 00095 41 b8 0a 00 00 00 mov r8d, 10 0009b 3b 08 cmp ecx, DWORD PTR [rax] - 0009d 72 0c jb SHORT $LN80@stbi__jpeg + 0009d 72 0c jb SHORT $LN74@stbi__jpeg 0009f 90 npad 1 $LL24@stbi__jpeg: - -; 1586 : for (k = FAST_BITS + 1; ; ++k) - +; Line 1586 000a0 41 ff c0 inc r8d 000a3 48 8d 40 04 lea rax, QWORD PTR [rax+4] - -; 1587 : if (temp < h->maxcode[k]) - +; Line 1587 000a7 3b 08 cmp ecx, DWORD PTR [rax] 000a9 73 f5 jae SHORT $LL24@stbi__jpeg -$LN80@stbi__jpeg: - -; 1588 : break; -; 1589 : if (k == 17) { - +$LN74@stbi__jpeg: +; Line 1589 000ab 44 8b 93 24 48 00 00 mov r10d, DWORD PTR [rbx+18468] 000b2 41 83 f8 11 cmp r8d, 17 000b6 75 3b jne SHORT $LN29@stbi__jpeg - -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; - +; Line 1591 000b8 41 8d 42 f0 lea eax, DWORD PTR [r10-16] 000bc 89 83 24 48 00 00 mov DWORD PTR [rbx+18468], eax $LN7@stbi__jpeg: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 000c2 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 000c8 65 48 8b 04 25 @@ -12672,14 +9283,9 @@ $LN7@stbi__jpeg: 000da 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ 000e1 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1678 : t = stbi__jpeg_huff_decode(j, hdc); -; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); - +; Line 1679 000e5 33 c0 xor eax, eax - -; 1727 : } - +; Line 1727 000e7 48 83 c4 20 add rsp, 32 ; 00000020H 000eb 41 5f pop r15 000ed 41 5e pop r14 @@ -12688,17 +9294,10 @@ $LN7@stbi__jpeg: 000f1 5b pop rbx 000f2 c3 ret 0 $LN29@stbi__jpeg: - -; 1595 : if (k > j->code_bits) - +; Line 1595 000f3 45 3b c2 cmp r8d, r10d 000f6 7f ca jg SHORT $LN7@stbi__jpeg - -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; - +; Line 1599 000f8 49 63 c0 movsxd rax, r8d 000fb b9 20 00 00 00 mov ecx, 32 ; 00000020H 00100 41 2b c8 sub ecx, r8d @@ -12708,24 +9307,13 @@ $LN29@stbi__jpeg: 00 00 00 and r11d, DWORD PTR stbi__bmask[rbp+rax*4] 00111 44 03 9c 87 4c 06 00 00 add r11d, DWORD PTR [rdi+rax*4+1612] - -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! - +; Line 1600 00119 41 81 fb ff 00 00 00 cmp r11d, 255 ; 000000ffH 00120 77 a0 ja SHORT $LN7@stbi__jpeg - -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; - +; Line 1605 00122 45 2b d0 sub r10d, r8d - -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; - +; Line 1607 00125 49 63 c3 movsxd rax, r11d 00128 41 8b c8 mov ecx, r8d 0012b 44 89 93 24 48 @@ -12736,19 +9324,12 @@ $LN29@stbi__jpeg: 0013c 0f b6 84 38 00 04 00 00 movzx eax, BYTE PTR [rax+rdi+1024] $LN21@stbi__jpeg: - -; 1678 : t = stbi__jpeg_huff_decode(j, hdc); -; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); - +; Line 1679 00144 0f b6 f8 movzx edi, al 00147 83 ff 0f cmp edi, 15 0014a 0f 87 72 ff ff ff ja $LN7@stbi__jpeg - -; 1680 : -; 1681 : // 0 all the ac values now so we can do it 32-bits at a time -; 1682 : memset(data, 0, 64 * sizeof(data[0])); - +; Line 1682 00150 0f 57 c0 xorps xmm0, xmm0 00153 41 0f 11 07 movups XMMWORD PTR [r15], xmm0 00157 41 0f 11 47 10 movups XMMWORD PTR [r15+16], xmm0 @@ -12758,43 +9339,28 @@ $LN21@stbi__jpeg: 0016b 41 0f 11 47 50 movups XMMWORD PTR [r15+80], xmm0 00170 41 0f 11 47 60 movups XMMWORD PTR [r15+96], xmm0 00175 41 0f 11 47 70 movups XMMWORD PTR [r15+112], xmm0 - -; 1683 : -; 1684 : diff = t ? stbi__extend_receive(j, t) : 0; - +; Line 1684 0017a 84 c0 test al, al 0017c 74 68 je SHORT $LN19@stbi__jpeg - -; 1619 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); - +; Line 1619 0017e 39 bb 24 48 00 00 cmp DWORD PTR [rbx+18468], edi 00184 7d 08 jge SHORT $LN37@stbi__jpeg 00186 48 8b cb mov rcx, rbx 00189 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN37@stbi__jpeg: - -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing - +; Line 1620 0018e 44 8b 93 24 48 00 00 mov r10d, DWORD PTR [rbx+18468] 00195 44 3b d7 cmp r10d, edi 00198 7c 4c jl SHORT $LN19@stbi__jpeg - -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) - +; Line 1622 0019a 44 8b 8b 20 48 00 00 mov r9d, DWORD PTR [rbx+18464] - -; 1623 : k = stbi_lrot(j->code_buffer, n); - +; Line 1623 001a1 8b cf mov ecx, edi 001a3 45 8b c1 mov r8d, r9d - -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; - +; Line 1626 001a6 44 2b d7 sub r10d, edi 001a9 41 d3 c0 rol r8d, cl 001ac 48 8d 0c bd 00 @@ -12804,9 +9370,7 @@ $LN37@stbi__jpeg: 001bb 8b c2 mov eax, edx 001bd 41 c1 e9 1f shr r9d, 31 001c1 f7 d0 not eax - -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); - +; Line 1627 001c3 41 ff c9 dec r9d 001c6 44 89 93 24 48 00 00 mov DWORD PTR [rbx+18468], r10d @@ -12817,45 +9381,29 @@ $LN37@stbi__jpeg: 001db 89 83 20 48 00 00 mov DWORD PTR [rbx+18464], eax 001e1 44 03 ca add r9d, edx - -; 1628 : } - +; Line 1628 001e4 eb 03 jmp SHORT $LN20@stbi__jpeg $LN19@stbi__jpeg: - -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); - +; Line 1685 001e6 45 33 c9 xor r9d, r9d $LN20@stbi__jpeg: 001e9 48 63 44 24 78 movsxd rax, DWORD PTR b$[rsp] 001ee 4c 8d 04 40 lea r8, QWORD PTR [rax+rax*2] - -; 523 : if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow - +; Line 523 001f2 41 8b c1 mov eax, r9d - -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); - +; Line 1685 001f5 49 c1 e0 05 shl r8, 5 - -; 523 : if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow - +; Line 523 001f9 f7 d0 not eax - -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); - +; Line 1685 001fb 41 8b 94 18 b8 46 00 00 mov edx, DWORD PTR [r8+rbx+18104] - -; 523 : if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow - +; Line 523 00203 8b ca mov ecx, edx 00205 f7 d1 not ecx 00207 33 c8 xor ecx, eax 00209 78 5e js SHORT $LN8@stbi__jpeg - -; 524 : if (a < 0 && b < 0) return a >= INT_MIN - b; // same as a + b >= INT_MIN; INT_MIN - b cannot overflow since b < 0. - +; Line 524 0020b 85 d2 test edx, edx 0020d 79 16 jns SHORT $LN42@stbi__jpeg 0020f 45 85 c9 test r9d, r9d @@ -12867,23 +9415,17 @@ $LN20@stbi__jpeg: 00220 0f 9d c1 setge cl 00223 eb 0f jmp SHORT $LN40@stbi__jpeg $LN42@stbi__jpeg: - -; 525 : return a <= INT_MAX - b; - +; Line 525 00225 33 c9 xor ecx, ecx 00227 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 0022c 41 2b c1 sub eax, r9d 0022f 3b d0 cmp edx, eax 00231 0f 9e c1 setle cl $LN40@stbi__jpeg: - -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); - +; Line 1685 00234 85 c9 test ecx, ecx 00236 75 31 jne SHORT $LN8@stbi__jpeg - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00238 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0023e 65 48 8b 04 25 @@ -12893,13 +9435,9 @@ $LN40@stbi__jpeg: 00250 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_09IFDKCGFO@bad?5delta@ 00257 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); - +; Line 1685 0025b 33 c0 xor eax, eax - -; 1727 : } - +; Line 1727 0025d 48 83 c4 20 add rsp, 32 ; 00000020H 00261 41 5f pop r15 00263 41 5e pop r14 @@ -12908,1067 +9446,627 @@ $LN40@stbi__jpeg: 00267 5b pop rbx 00268 c3 ret 0 $LN8@stbi__jpeg: - 00269 4c 89 64 24 58 mov QWORD PTR [rsp+88], r12 - -; 1686 : dc = j->img_comp[b].dc_pred + diff; - - 0026e 42 8d 0c 0a lea ecx, DWORD PTR [rdx+r9] - -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - +; Line 1686 + 00269 46 8d 1c 0a lea r11d, DWORD PTR [rdx+r9] + 0026d 4c 89 64 24 58 mov QWORD PTR [rsp+88], r12 +; Line 1688 00272 4c 8b a4 24 80 00 00 00 mov r12, QWORD PTR dequant$[rsp] - 0027a 41 89 8c 18 b8 - 46 00 00 mov DWORD PTR [r8+rbx+18104], ecx - 00282 45 0f bf 04 24 movsx r8d, WORD PTR [r12] - -; 531 : if (b == 0 || b == -1) return 1; // multiplication by 0 is always 0; check for -1 so SHRT_MIN/b doesn't overflow - - 00287 41 8d 40 01 lea eax, DWORD PTR [r8+1] - 0028b 66 83 f8 01 cmp ax, 1 - 0028f 0f 86 81 00 00 - 00 jbe $LN48@stbi__jpeg - -; 532 : if ((a >= 0) == (b >= 0)) return a <= SHRT_MAX / b; // product is positive, so similar to mul2sizes_valid - - 00295 0f b7 c1 movzx eax, cx - 00298 44 0f bf c9 movsx r9d, cx - 0029c 66 41 33 c0 xor ax, r8w - 002a0 45 8b d0 mov r10d, r8d - 002a3 66 0f ba e0 0f bt ax, 15 - 002a8 72 13 jb SHORT $LN49@stbi__jpeg - 002aa b8 ff 7f 00 00 mov eax, 32767 ; 00007fffH - 002af 99 cdq - 002b0 41 f7 fa idiv r10d - 002b3 33 d2 xor edx, edx - 002b5 44 3b c8 cmp r9d, eax - 002b8 0f 9e c2 setle dl - 002bb eb 1f jmp SHORT $LN46@stbi__jpeg -$LN49@stbi__jpeg: - -; 533 : if (b < 0) return a <= SHRT_MIN / b; // same as a * b >= SHRT_MIN - - 002bd b8 00 80 ff ff mov eax, -32768 ; ffffffffffff8000H - 002c2 99 cdq - 002c3 41 f7 fa idiv r10d - 002c6 33 d2 xor edx, edx - 002c8 66 45 85 c0 test r8w, r8w - 002cc 79 08 jns SHORT $LN50@stbi__jpeg - 002ce 44 3b c8 cmp r9d, eax - 002d1 0f 9e c2 setle dl - 002d4 eb 06 jmp SHORT $LN46@stbi__jpeg -$LN50@stbi__jpeg: - -; 534 : return a >= SHRT_MIN / b; - - 002d6 44 3b c8 cmp r9d, eax - 002d9 0f 9d c2 setge dl -$LN46@stbi__jpeg: - -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - 002dc 85 d2 test edx, edx - 002de 75 36 jne SHORT $LN48@stbi__jpeg - -; 431 : stbi__g_failure_reason = str; - - 002e0 8b 15 00 00 00 + 0027a 41 0f b7 cb movzx ecx, r11w + 0027e 45 89 9c 18 b8 + 46 00 00 mov DWORD PTR [r8+rbx+18104], r11d + 00286 41 0f bf 3c 24 movsx edi, WORD PTR [r12] + 0028b 0f b7 d7 movzx edx, di + 0028e e8 00 00 00 00 call stbi__mul2shorts_valid + 00293 85 c0 test eax, eax + 00295 75 36 jne SHORT $LN9@stbi__jpeg +; Line 431 + 00297 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 002e6 65 48 8b 04 25 + 0029d 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 002ef 4c 8b 64 24 58 mov r12, QWORD PTR [rsp+88] - 002f4 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 002f9 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 002fd 48 8d 15 00 00 + 002a6 4c 8b 64 24 58 mov r12, QWORD PTR [rsp+88] + 002ab b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 002b0 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 002b4 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BG@PJBJDAGM@can?8t?5merge?5dc?5and?5ac@ - 00304 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - 00308 33 c0 xor eax, eax - -; 1727 : } - - 0030a 48 83 c4 20 add rsp, 32 ; 00000020H - 0030e 41 5f pop r15 - 00310 41 5e pop r14 - 00312 5f pop rdi - 00313 5d pop rbp - 00314 5b pop rbx - 00315 c3 ret 0 -$LN48@stbi__jpeg: - 00316 4c 89 6c 24 60 mov QWORD PTR [rsp+96], r13 - -; 1689 : data[0] = (short)(dc * dequant[0]); -; 1690 : -; 1691 : // decode AC components, see JPEG spec -; 1692 : k = 1; - - 0031b bf 01 00 00 00 mov edi, 1 - 00320 4c 8b 6c 24 70 mov r13, QWORD PTR fac$[rsp] - 00325 0f bf c9 movsx ecx, cx - 00328 41 0f af c8 imul ecx, r8d - 0032c 48 89 74 24 50 mov QWORD PTR [rsp+80], rsi - 00331 66 41 89 0f mov WORD PTR [r15], cx + 002bb 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 1688 + 002bf 33 c0 xor eax, eax +; Line 1727 + 002c1 48 83 c4 20 add rsp, 32 ; 00000020H + 002c5 41 5f pop r15 + 002c7 41 5e pop r14 + 002c9 5f pop rdi + 002ca 5d pop rbp + 002cb 5b pop rbx + 002cc c3 ret 0 +$LN9@stbi__jpeg: + 002cd 4c 89 6c 24 60 mov QWORD PTR [rsp+96], r13 +; Line 1692 + 002d2 4c 8b 6c 24 70 mov r13, QWORD PTR fac$[rsp] + 002d7 41 0f bf cb movsx ecx, r11w + 002db 0f af cf imul ecx, edi + 002de bf 01 00 00 00 mov edi, 1 + 002e3 48 89 74 24 50 mov QWORD PTR [rsp+80], rsi + 002e8 66 41 89 0f mov WORD PTR [r15], cx + 002ec 0f 1f 40 00 npad 4 $LL4@stbi__jpeg: - -; 1693 : do { -; 1694 : unsigned int zig; -; 1695 : int c, r, s; -; 1696 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - - 00335 83 bb 24 48 00 +; Line 1696 + 002f0 83 bb 24 48 00 00 10 cmp DWORD PTR [rbx+18468], 16 - 0033c 7d 08 jge SHORT $LN10@stbi__jpeg - 0033e 48 8b cb mov rcx, rbx - 00341 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 002f7 7d 08 jge SHORT $LN10@stbi__jpeg + 002f9 48 8b cb mov rcx, rbx + 002fc e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN10@stbi__jpeg: - -; 1697 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); - - 00346 44 8b 8b 20 48 +; Line 1697 + 00301 44 8b 8b 20 48 00 00 mov r9d, DWORD PTR [rbx+18464] - -; 1698 : r = fac[c]; - - 0034d 8b 93 24 48 00 +; Line 1698 + 00308 8b 93 24 48 00 00 mov edx, DWORD PTR [rbx+18468] - 00353 41 8b c1 mov eax, r9d - 00356 48 c1 e8 17 shr rax, 23 - 0035a 45 0f bf 44 45 + 0030e 41 8b c1 mov eax, r9d + 00311 48 c1 e8 17 shr rax, 23 + 00315 45 0f bf 44 45 00 movsx r8d, WORD PTR [r13+rax*2] - -; 1699 : if (r) { // fast-AC path - - 00360 45 85 c0 test r8d, r8d - 00363 74 48 je SHORT $LN11@stbi__jpeg - -; 1700 : k += (r >> 4) & 15; // run - - 00365 41 8b c0 mov eax, r8d - -; 1701 : s = r & 15; // combined length - - 00368 41 8b c8 mov ecx, r8d - 0036b c1 f8 04 sar eax, 4 - 0036e 83 e1 0f and ecx, 15 - 00371 83 e0 0f and eax, 15 - 00374 03 f8 add edi, eax - -; 1702 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); - - 00376 3b ca cmp ecx, edx - 00378 0f 8f f9 01 00 - 00 jg $LN83@stbi__jpeg - -; 1703 : j->code_buffer <<= s; -; 1704 : j->code_bits -= s; - - 0037e 2b d1 sub edx, ecx - -; 1705 : // decode into unzigzag'd location -; 1706 : zig = stbi__jpeg_dezigzag[k++]; - - 00380 48 63 c7 movsxd rax, edi - 00383 89 93 24 48 00 +; Line 1699 + 0031b 45 85 c0 test r8d, r8d + 0031e 74 48 je SHORT $LN11@stbi__jpeg +; Line 1700 + 00320 41 8b c0 mov eax, r8d +; Line 1701 + 00323 41 8b c8 mov ecx, r8d + 00326 c1 f8 04 sar eax, 4 + 00329 83 e1 0f and ecx, 15 + 0032c 83 e0 0f and eax, 15 + 0032f 03 f8 add edi, eax +; Line 1702 + 00331 3b ca cmp ecx, edx + 00333 0f 8f fe 01 00 + 00 jg $LN77@stbi__jpeg +; Line 1704 + 00339 2b d1 sub edx, ecx +; Line 1706 + 0033b 48 63 c7 movsxd rax, edi + 0033e 89 93 24 48 00 00 mov DWORD PTR [rbx+18468], edx - 00389 ff c7 inc edi - 0038b 41 d3 e1 shl r9d, cl - 0038e 44 89 8b 20 48 + 00344 ff c7 inc edi + 00346 41 d3 e1 shl r9d, cl + 00349 44 89 8b 20 48 00 00 mov DWORD PTR [rbx+18464], r9d - -; 1707 : data[zig] = (short)((r >> 8) * dequant[zig]); - - 00395 0f b6 94 28 00 +; Line 1707 + 00350 0f b6 94 28 00 00 00 00 movzx edx, BYTE PTR stbi__jpeg_dezigzag[rax+rbp] - 0039d 48 03 d2 add rdx, rdx - 003a0 41 c1 f8 08 sar r8d, 8 - 003a4 41 0f bf c0 movsx eax, r8w - -; 1708 : } - - 003a8 e9 8a 01 00 00 jmp $LN137@stbi__jpeg + 00358 48 03 d2 add rdx, rdx + 0035b 41 c1 f8 08 sar r8d, 8 + 0035f 41 0f bf c0 movsx eax, r8w +; Line 1708 + 00363 e9 8f 01 00 00 jmp $LN127@stbi__jpeg $LN11@stbi__jpeg: - -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - - 003ad 83 fa 10 cmp edx, 16 - 003b0 7d 08 jge SHORT $LN60@stbi__jpeg - 003b2 48 8b cb mov rcx, rbx - 003b5 e8 00 00 00 00 call stbi__grow_buffer_unsafe -$LN60@stbi__jpeg: - -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); - - 003ba 44 8b 9b 20 48 +; Line 1564 + 00368 83 fa 10 cmp edx, 16 + 0036b 7d 08 jge SHORT $LN54@stbi__jpeg + 0036d 48 8b cb mov rcx, rbx + 00370 e8 00 00 00 00 call stbi__grow_buffer_unsafe +$LN54@stbi__jpeg: +; Line 1568 + 00375 44 8b 9b 20 48 00 00 mov r11d, DWORD PTR [rbx+18464] - 003c1 41 8b c3 mov eax, r11d - 003c4 48 c1 e8 17 shr rax, 23 - -; 1569 : k = h->fast[c]; - - 003c8 42 0f b6 0c 30 movzx ecx, BYTE PTR [rax+r14] - -; 1570 : if (k < 255) { - - 003cd 80 f9 ff cmp cl, 255 ; 000000ffH - 003d0 73 23 jae SHORT $LN61@stbi__jpeg - -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) - - 003d2 44 8b 93 24 48 + 0037c 41 8b c3 mov eax, r11d + 0037f 48 c1 e8 17 shr rax, 23 +; Line 1569 + 00383 42 0f b6 0c 30 movzx ecx, BYTE PTR [rax+r14] +; Line 1570 + 00388 80 f9 ff cmp cl, 255 ; 000000ffH + 0038b 73 26 jae SHORT $LN55@stbi__jpeg +; Line 1572 + 0038d 44 8b 93 24 48 00 00 mov r10d, DWORD PTR [rbx+18468] - 003d9 8b c1 mov eax, ecx - 003db 42 0f b6 8c 31 + 00394 8b c1 mov eax, ecx + 00396 42 0f b6 8c 31 00 05 00 00 movzx ecx, BYTE PTR [rcx+r14+1280] - 003e4 41 3b ca cmp ecx, r10d - 003e7 0f 8f 8a 01 00 - 00 jg $LN83@stbi__jpeg - -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; - - 003ed 41 d3 e3 shl r11d, cl - -; 1575 : j->code_bits -= s; - - 003f0 44 2b d1 sub r10d, ecx - -; 1576 : return h->values[k]; - - 003f3 eb 7c jmp SHORT $LN138@stbi__jpeg -$LN61@stbi__jpeg: - -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; - - 003f5 41 8b cb mov ecx, r11d - -; 1587 : if (temp < h->maxcode[k]) - - 003f8 49 8d 86 2c 06 + 0039f 41 3b ca cmp ecx, r10d + 003a2 0f 8f 8f 01 00 + 00 jg $LN77@stbi__jpeg +; Line 1574 + 003a8 41 d3 e3 shl r11d, cl +; Line 1575 + 003ab 44 2b d1 sub r10d, ecx +; Line 1576 + 003ae e9 7e 00 00 00 jmp $LN128@stbi__jpeg +$LN55@stbi__jpeg: +; Line 1585 + 003b3 41 8b cb mov ecx, r11d +; Line 1587 + 003b6 49 8d 86 2c 06 00 00 lea rax, QWORD PTR [r14+1580] - 003ff c1 e9 10 shr ecx, 16 - 00402 41 b8 0a 00 00 + 003bd c1 e9 10 shr ecx, 16 + 003c0 41 b8 0a 00 00 00 mov r8d, 10 - 00408 45 8b c8 mov r9d, r8d - 0040b 3b 08 cmp ecx, DWORD PTR [rax] - 0040d 72 0f jb SHORT $LN81@stbi__jpeg - 0040f 90 npad 1 -$LL59@stbi__jpeg: - -; 1586 : for (k = FAST_BITS + 1; ; ++k) - - 00410 41 ff c0 inc r8d - 00413 48 8d 40 04 lea rax, QWORD PTR [rax+4] - 00417 49 ff c1 inc r9 - -; 1587 : if (temp < h->maxcode[k]) - - 0041a 3b 08 cmp ecx, DWORD PTR [rax] - 0041c 73 f2 jae SHORT $LL59@stbi__jpeg -$LN81@stbi__jpeg: - -; 1588 : break; -; 1589 : if (k == 17) { - - 0041e 44 8b 93 24 48 + 003c6 45 8b c8 mov r9d, r8d + 003c9 3b 08 cmp ecx, DWORD PTR [rax] + 003cb 72 11 jb SHORT $LN75@stbi__jpeg + 003cd 0f 1f 00 npad 3 +$LL53@stbi__jpeg: +; Line 1586 + 003d0 41 ff c0 inc r8d + 003d3 48 8d 40 04 lea rax, QWORD PTR [rax+4] + 003d7 49 ff c1 inc r9 +; Line 1587 + 003da 3b 08 cmp ecx, DWORD PTR [rax] + 003dc 73 f2 jae SHORT $LL53@stbi__jpeg +$LN75@stbi__jpeg: +; Line 1589 + 003de 44 8b 93 24 48 00 00 mov r10d, DWORD PTR [rbx+18468] - 00425 41 83 f8 11 cmp r8d, 17 - 00429 0f 84 3e 01 00 - 00 je $LN95@stbi__jpeg - -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) - - 0042f 45 3b c2 cmp r8d, r10d - 00432 0f 8f 3f 01 00 - 00 jg $LN83@stbi__jpeg - -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; - - 00438 b9 20 00 00 00 mov ecx, 32 ; 00000020H - 0043d 41 8b d3 mov edx, r11d - 00440 41 2b c8 sub ecx, r8d - 00443 d3 ea shr edx, cl - 00445 42 23 94 8d 00 + 003e5 41 83 f8 11 cmp r8d, 17 + 003e9 0f 84 3e 01 00 + 00 je $LN89@stbi__jpeg +; Line 1595 + 003ef 45 3b c2 cmp r8d, r10d + 003f2 0f 8f 3f 01 00 + 00 jg $LN77@stbi__jpeg +; Line 1599 + 003f8 b9 20 00 00 00 mov ecx, 32 ; 00000020H + 003fd 41 8b d3 mov edx, r11d + 00400 41 2b c8 sub ecx, r8d + 00403 d3 ea shr edx, cl + 00405 42 23 94 8d 00 00 00 00 and edx, DWORD PTR stbi__bmask[rbp+r9*4] - 0044d 47 8b 8c 8e 4c + 0040d 47 8b 8c 8e 4c 06 00 00 mov r9d, DWORD PTR [r14+r9*4+1612] - 00455 44 03 ca add r9d, edx - -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! - - 00458 41 81 f9 ff 00 + 00415 44 03 ca add r9d, edx +; Line 1600 + 00418 41 81 f9 ff 00 00 00 cmp r9d, 255 ; 000000ffH - 0045f 0f 87 12 01 00 - 00 ja $LN83@stbi__jpeg - -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; - - 00465 45 2b d0 sub r10d, r8d - -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; - - 00468 49 63 c1 movsxd rax, r9d - 0046b 41 8b c8 mov ecx, r8d - 0046e 41 d3 e3 shl r11d, cl -$LN138@stbi__jpeg: - -; 1712 : s = rs & 15; - - 00471 44 89 93 24 48 + 0041f 0f 87 12 01 00 + 00 ja $LN77@stbi__jpeg +; Line 1605 + 00425 45 2b d0 sub r10d, r8d +; Line 1607 + 00428 49 63 c1 movsxd rax, r9d + 0042b 41 8b c8 mov ecx, r8d + 0042e 41 d3 e3 shl r11d, cl +$LN128@stbi__jpeg: +; Line 1712 + 00431 44 89 93 24 48 00 00 mov DWORD PTR [rbx+18468], r10d - 00478 44 89 9b 20 48 + 00438 44 89 9b 20 48 00 00 mov DWORD PTR [rbx+18464], r11d - 0047f 42 0f b6 84 30 + 0043f 42 0f b6 84 30 00 04 00 00 movzx eax, BYTE PTR [rax+r14+1024] - 00488 8b f0 mov esi, eax - 0048a 83 e6 0f and esi, 15 - -; 1714 : if (s == 0) { - - 0048d 75 13 jne SHORT $LN15@stbi__jpeg - -; 1715 : if (rs != 0xf0) break; // end block - - 0048f 3d f0 00 00 00 cmp eax, 240 ; 000000f0H - 00494 0f 85 b3 00 00 + 00448 8b f0 mov esi, eax + 0044a 83 e6 0f and esi, 15 +; Line 1714 + 0044d 75 13 jne SHORT $LN15@stbi__jpeg +; Line 1715 + 0044f 3d f0 00 00 00 cmp eax, 240 ; 000000f0H + 00454 0f 85 b3 00 00 00 jne $LN3@stbi__jpeg - -; 1716 : k += 16; - - 0049a 83 c7 10 add edi, 16 - -; 1717 : } - - 0049d e9 a2 00 00 00 jmp $LN2@stbi__jpeg +; Line 1716 + 0045a 83 c7 10 add edi, 16 +; Line 1717 + 0045d e9 a2 00 00 00 jmp $LN2@stbi__jpeg $LN15@stbi__jpeg: - -; 1713 : r = rs >> 4; - - 004a2 c1 e8 04 shr eax, 4 - -; 1718 : else { -; 1719 : k += r; - - 004a5 03 f8 add edi, eax - -; 1720 : // decode into unzigzag'd location -; 1721 : zig = stbi__jpeg_dezigzag[k++]; - - 004a7 48 63 c7 movsxd rax, edi - 004aa ff c7 inc edi - 004ac 0f b6 ac 28 00 +; Line 1713 + 00462 c1 e8 04 shr eax, 4 +; Line 1719 + 00465 03 f8 add edi, eax +; Line 1721 + 00467 48 63 c7 movsxd rax, edi + 0046a ff c7 inc edi + 0046c 0f b6 ac 28 00 00 00 00 movzx ebp, BYTE PTR stbi__jpeg_dezigzag[rax+rbp] - -; 1619 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); - - 004b4 44 3b d6 cmp r10d, esi - 004b7 7d 08 jge SHORT $LN72@stbi__jpeg - 004b9 48 8b cb mov rcx, rbx - 004bc e8 00 00 00 00 call stbi__grow_buffer_unsafe -$LN72@stbi__jpeg: - -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing - - 004c1 44 8b 93 24 48 +; Line 1619 + 00474 44 3b d6 cmp r10d, esi + 00477 7d 08 jge SHORT $LN66@stbi__jpeg + 00479 48 8b cb mov rcx, rbx + 0047c e8 00 00 00 00 call stbi__grow_buffer_unsafe +$LN66@stbi__jpeg: +; Line 1620 + 00481 44 8b 93 24 48 00 00 mov r10d, DWORD PTR [rbx+18468] - 004c8 44 3b d6 cmp r10d, esi - 004cb 7d 05 jge SHORT $LN73@stbi__jpeg - 004cd 45 33 c9 xor r9d, r9d - 004d0 eb 52 jmp SHORT $LN71@stbi__jpeg -$LN73@stbi__jpeg: - -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) - - 004d2 44 8b 8b 20 48 + 00488 44 3b d6 cmp r10d, esi + 0048b 7d 05 jge SHORT $LN67@stbi__jpeg + 0048d 45 33 c9 xor r9d, r9d + 00490 eb 52 jmp SHORT $LN65@stbi__jpeg +$LN67@stbi__jpeg: +; Line 1622 + 00492 44 8b 8b 20 48 00 00 mov r9d, DWORD PTR [rbx+18464] - -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; - - 004d9 4c 8d 1d 00 00 +; Line 1624 + 00499 4c 8d 1d 00 00 00 00 lea r11, OFFSET FLAT:__ImageBase - 004e0 45 8b c1 mov r8d, r9d - 004e3 8b ce mov ecx, esi - 004e5 41 d3 c0 rol r8d, cl - -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; - - 004e8 44 2b d6 sub r10d, esi - 004eb 41 c1 e9 1f shr r9d, 31 - 004ef 48 8d 0c b5 00 + 004a0 45 8b c1 mov r8d, r9d + 004a3 8b ce mov ecx, esi + 004a5 41 d3 c0 rol r8d, cl +; Line 1626 + 004a8 44 2b d6 sub r10d, esi + 004ab 41 c1 e9 1f shr r9d, 31 + 004af 48 8d 0c b5 00 00 00 00 lea rcx, QWORD PTR [rsi*4] - 004f7 42 8b 94 19 00 + 004b7 42 8b 94 19 00 00 00 00 mov edx, DWORD PTR stbi__bmask[rcx+r11] - -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); - - 004ff 41 ff c9 dec r9d - 00502 46 23 8c 19 00 +; Line 1627 + 004bf 41 ff c9 dec r9d + 004c2 46 23 8c 19 00 00 00 00 and r9d, DWORD PTR stbi__jbias[rcx+r11] - 0050a 8b c2 mov eax, edx - 0050c f7 d0 not eax - 0050e 44 89 93 24 48 + 004ca 8b c2 mov eax, edx + 004cc f7 d0 not eax + 004ce 44 89 93 24 48 00 00 mov DWORD PTR [rbx+18468], r10d - 00515 41 23 c0 and eax, r8d - 00518 41 23 d0 and edx, r8d - 0051b 89 83 20 48 00 + 004d5 41 23 c0 and eax, r8d + 004d8 41 23 d0 and edx, r8d + 004db 89 83 20 48 00 00 mov DWORD PTR [rbx+18464], eax - 00521 44 03 ca add r9d, edx -$LN71@stbi__jpeg: - -; 1722 : data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]); - - 00524 48 8d 14 6d 00 + 004e1 44 03 ca add r9d, edx +$LN65@stbi__jpeg: +; Line 1722 + 004e4 48 8d 14 6d 00 00 00 00 lea rdx, QWORD PTR [rbp*2] - 0052c 41 0f bf c1 movsx eax, r9w - 00530 48 8d 2d 00 00 + 004ec 41 0f bf c1 movsx eax, r9w + 004f0 48 8d 2d 00 00 00 00 lea rbp, OFFSET FLAT:__ImageBase -$LN137@stbi__jpeg: - -; 1723 : } -; 1724 : } -; 1725 : } while (k < 64); - - 00537 42 0f bf 0c 22 movsx ecx, WORD PTR [rdx+r12] - 0053c 0f af c8 imul ecx, eax - 0053f 66 42 89 0c 3a mov WORD PTR [rdx+r15], cx +$LN127@stbi__jpeg: +; Line 1725 + 004f7 42 0f bf 0c 22 movsx ecx, WORD PTR [rdx+r12] + 004fc 0f af c8 imul ecx, eax + 004ff 66 42 89 0c 3a mov WORD PTR [rdx+r15], cx $LN2@stbi__jpeg: - 00544 83 ff 40 cmp edi, 64 ; 00000040H - 00547 0f 8c e8 fd ff + 00504 83 ff 40 cmp edi, 64 ; 00000040H + 00507 0f 8c e3 fd ff ff jl $LL4@stbi__jpeg $LN3@stbi__jpeg: - -; 1726 : return 1; - - 0054d b8 01 00 00 00 mov eax, 1 -$LN136@stbi__jpeg: - 00552 48 8b 74 24 50 mov rsi, QWORD PTR [rsp+80] - 00557 4c 8b 6c 24 60 mov r13, QWORD PTR [rsp+96] - 0055c 4c 8b 64 24 58 mov r12, QWORD PTR [rsp+88] - -; 1727 : } - - 00561 48 83 c4 20 add rsp, 32 ; 00000020H - 00565 41 5f pop r15 - 00567 41 5e pop r14 - 00569 5f pop rdi - 0056a 5d pop rbp - 0056b 5b pop rbx - 0056c c3 ret 0 -$LN95@stbi__jpeg: - -; 1591 : j->code_bits -= 16; - - 0056d 41 8d 42 f0 lea eax, DWORD PTR [r10-16] - 00571 89 83 24 48 00 +; Line 1726 + 0050d b8 01 00 00 00 mov eax, 1 +$LN126@stbi__jpeg: + 00512 48 8b 74 24 50 mov rsi, QWORD PTR [rsp+80] + 00517 4c 8b 6c 24 60 mov r13, QWORD PTR [rsp+96] + 0051c 4c 8b 64 24 58 mov r12, QWORD PTR [rsp+88] +; Line 1727 + 00521 48 83 c4 20 add rsp, 32 ; 00000020H + 00525 41 5f pop r15 + 00527 41 5e pop r14 + 00529 5f pop rdi + 0052a 5d pop rbp + 0052b 5b pop rbx + 0052c c3 ret 0 +$LN89@stbi__jpeg: +; Line 1591 + 0052d 41 8d 42 f0 lea eax, DWORD PTR [r10-16] + 00531 89 83 24 48 00 00 mov DWORD PTR [rbx+18468], eax -$LN83@stbi__jpeg: - -; 431 : stbi__g_failure_reason = str; - - 00577 8b 15 00 00 00 +$LN77@stbi__jpeg: +; Line 431 + 00537 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 0057d 65 48 8b 04 25 + 0053d 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00586 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 0058b 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 0058f 48 8d 15 00 00 + 00546 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 0054b 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 0054f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ - 00596 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1709 : else { -; 1710 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1711 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); - - 0059a 33 c0 xor eax, eax - 0059c eb b4 jmp SHORT $LN136@stbi__jpeg + 00556 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 1711 + 0055a 33 c0 xor eax, eax + 0055c eb b4 jmp SHORT $LN126@stbi__jpeg stbi__jpeg_decode_block ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__jpeg_decode_block_prog_dc _TEXT SEGMENT -j$ = 64 -data$ = 72 -hdc$ = 80 -b$ = 88 +j$ = 48 +data$ = 56 +hdc$ = 64 +b$ = 72 stbi__jpeg_decode_block_prog_dc PROC ; COMDAT - -; 1730 : { - - 00000 48 89 5c 24 18 mov QWORD PTR [rsp+24], rbx - 00005 56 push rsi - 00006 57 push rdi - 00007 41 56 push r14 - 00009 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1731 : int diff, dc; -; 1732 : int t; -; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - 0000d 83 b9 38 48 00 +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1730 + 00000 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx + 00005 48 89 6c 24 18 mov QWORD PTR [rsp+24], rbp + 0000a 48 89 74 24 20 mov QWORD PTR [rsp+32], rsi + 0000f 57 push rdi + 00010 48 83 ec 20 sub rsp, 32 ; 00000020H +; Line 1733 + 00014 83 b9 38 48 00 00 00 cmp DWORD PTR [rcx+18488], 0 - 00014 49 8b f8 mov rdi, r8 - 00017 4d 63 f1 movsxd r14, r9d - 0001a 48 8b f2 mov rsi, rdx - 0001d 48 8b d9 mov rbx, rcx - 00020 74 33 je SHORT $LN2@stbi__jpeg - -; 431 : stbi__g_failure_reason = str; - - 00022 8b 15 00 00 00 + 0001b 49 8b f0 mov rsi, r8 + 0001e 49 63 e9 movsxd rbp, r9d + 00021 48 8b fa mov rdi, rdx + 00024 48 8b d9 mov rbx, rcx + 00027 74 2a je SHORT $LN2@stbi__jpeg +; Line 431 + 00029 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00028 65 48 8b 04 25 + 0002f 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00031 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00036 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 0003a 48 8d 15 00 00 + 00038 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 0003d 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00041 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BG@PJBJDAGM@can?8t?5merge?5dc?5and?5ac@ - 00041 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1731 : int diff, dc; -; 1732 : int t; -; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - 00045 33 c0 xor eax, eax - -; 1756 : } - - 00047 48 8b 5c 24 50 mov rbx, QWORD PTR [rsp+80] - 0004c 48 83 c4 20 add rsp, 32 ; 00000020H - 00050 41 5e pop r14 - 00052 5f pop rdi - 00053 5e pop rsi - 00054 c3 ret 0 + 00048 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 1733 + 0004c 33 c0 xor eax, eax + 0004e e9 a6 02 00 00 jmp $LN1@stbi__jpeg $LN2@stbi__jpeg: - -; 1734 : -; 1735 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - - 00055 83 b9 24 48 00 +; Line 1735 + 00053 83 b9 24 48 00 00 10 cmp DWORD PTR [rcx+18468], 16 - 0005c 7d 05 jge SHORT $LN3@stbi__jpeg - 0005e e8 00 00 00 00 call stbi__grow_buffer_unsafe + 0005a 7d 05 jge SHORT $LN3@stbi__jpeg + 0005c e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN3@stbi__jpeg: - -; 1736 : -; 1737 : if (j->succ_high == 0) { - - 00063 83 bb 3c 48 00 +; Line 1737 + 00061 83 bb 3c 48 00 00 00 cmp DWORD PTR [rbx+18492], 0 - 0006a 48 89 6c 24 40 mov QWORD PTR [rsp+64], rbp - 0006f 4c 89 7c 24 48 mov QWORD PTR [rsp+72], r15 - 00074 0f 85 98 02 00 + 00068 4c 89 74 24 30 mov QWORD PTR [rsp+48], r14 + 0006d 0f 85 30 02 00 00 jne $LN4@stbi__jpeg - -; 1738 : // first scan for DC coefficient, must be first -; 1739 : memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now - - 0007a 0f 57 c0 xorps xmm0, xmm0 - 0007d 0f 11 06 movups XMMWORD PTR [rsi], xmm0 - 00080 0f 11 46 10 movups XMMWORD PTR [rsi+16], xmm0 - 00084 0f 11 46 20 movups XMMWORD PTR [rsi+32], xmm0 - 00088 0f 11 46 30 movups XMMWORD PTR [rsi+48], xmm0 - 0008c 0f 11 46 40 movups XMMWORD PTR [rsi+64], xmm0 - 00090 0f 11 46 50 movups XMMWORD PTR [rsi+80], xmm0 - 00094 0f 11 46 60 movups XMMWORD PTR [rsi+96], xmm0 - 00098 0f 11 46 70 movups XMMWORD PTR [rsi+112], xmm0 - -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - - 0009c 83 bb 24 48 00 +; Line 1739 + 00073 0f 57 c0 xorps xmm0, xmm0 + 00076 0f 11 07 movups XMMWORD PTR [rdi], xmm0 + 00079 0f 11 47 10 movups XMMWORD PTR [rdi+16], xmm0 + 0007d 0f 11 47 20 movups XMMWORD PTR [rdi+32], xmm0 + 00081 0f 11 47 30 movups XMMWORD PTR [rdi+48], xmm0 + 00085 0f 11 47 40 movups XMMWORD PTR [rdi+64], xmm0 + 00089 0f 11 47 50 movups XMMWORD PTR [rdi+80], xmm0 + 0008d 0f 11 47 60 movups XMMWORD PTR [rdi+96], xmm0 + 00091 0f 11 47 70 movups XMMWORD PTR [rdi+112], xmm0 +; Line 1564 + 00095 83 bb 24 48 00 00 10 cmp DWORD PTR [rbx+18468], 16 - 000a3 7d 08 jge SHORT $LN20@stbi__jpeg - 000a5 48 8b cb mov rcx, rbx - 000a8 e8 00 00 00 00 call stbi__grow_buffer_unsafe + 0009c 7d 08 jge SHORT $LN20@stbi__jpeg + 0009e 48 8b cb mov rcx, rbx + 000a1 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN20@stbi__jpeg: - -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); - - 000ad 44 8b 93 20 48 +; Line 1568 + 000a6 44 8b 93 20 48 00 00 mov r10d, DWORD PTR [rbx+18464] - -; 1569 : k = h->fast[c]; -; 1570 : if (k < 255) { - - 000b4 4c 8d 3d 00 00 - 00 00 lea r15, OFFSET FLAT:__ImageBase - 000bb 41 8b c2 mov eax, r10d - 000be 48 c1 e8 17 shr rax, 23 - 000c2 0f b6 0c 38 movzx ecx, BYTE PTR [rax+rdi] - 000c6 80 f9 ff cmp cl, 255 ; 000000ffH - 000c9 73 21 jae SHORT $LN21@stbi__jpeg - -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) - - 000cb 44 8b 8b 24 48 +; Line 1570 + 000ad 4c 8d 35 00 00 + 00 00 lea r14, OFFSET FLAT:__ImageBase + 000b4 41 8b c2 mov eax, r10d + 000b7 48 c1 e8 17 shr rax, 23 + 000bb 0f b6 0c 30 movzx ecx, BYTE PTR [rax+rsi] + 000bf 80 f9 ff cmp cl, 255 ; 000000ffH + 000c2 73 21 jae SHORT $LN21@stbi__jpeg +; Line 1572 + 000c4 44 8b 8b 24 48 00 00 mov r9d, DWORD PTR [rbx+18468] - 000d2 8b c1 mov eax, ecx - 000d4 0f b6 8c 39 00 - 05 00 00 movzx ecx, BYTE PTR [rcx+rdi+1280] - 000dc 41 3b c9 cmp ecx, r9d - 000df 7f 44 jg SHORT $LN7@stbi__jpeg - -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; - - 000e1 41 d3 e2 shl r10d, cl - -; 1575 : j->code_bits -= s; - - 000e4 44 2b c9 sub r9d, ecx - -; 1576 : return h->values[k]; - - 000e7 e9 9e 00 00 00 jmp $LN86@stbi__jpeg + 000cb 8b c1 mov eax, ecx + 000cd 0f b6 8c 31 00 + 05 00 00 movzx ecx, BYTE PTR [rcx+rsi+1280] + 000d5 41 3b c9 cmp ecx, r9d + 000d8 7f 48 jg SHORT $LN7@stbi__jpeg +; Line 1574 + 000da 41 d3 e2 shl r10d, cl +; Line 1575 + 000dd 44 2b c9 sub r9d, ecx +; Line 1576 + 000e0 e9 a2 00 00 00 jmp $LN68@stbi__jpeg $LN21@stbi__jpeg: - -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; - - 000ec 41 8b ca mov ecx, r10d - -; 1587 : if (temp < h->maxcode[k]) - - 000ef 48 8d 87 2c 06 - 00 00 lea rax, QWORD PTR [rdi+1580] - 000f6 c1 e9 10 shr ecx, 16 - 000f9 41 b8 0a 00 00 +; Line 1585 + 000e5 41 8b ca mov ecx, r10d +; Line 1587 + 000e8 48 8d 86 2c 06 + 00 00 lea rax, QWORD PTR [rsi+1580] + 000ef c1 e9 10 shr ecx, 16 + 000f2 41 b8 0a 00 00 00 mov r8d, 10 - 000ff 3b 08 cmp ecx, DWORD PTR [rax] - 00101 72 0b jb SHORT $LN54@stbi__jpeg + 000f8 3b 08 cmp ecx, DWORD PTR [rax] + 000fa 72 0f jb SHORT $LN44@stbi__jpeg + 000fc 0f 1f 40 00 npad 4 $LL19@stbi__jpeg: - -; 1586 : for (k = FAST_BITS + 1; ; ++k) - - 00103 41 ff c0 inc r8d - 00106 48 8d 40 04 lea rax, QWORD PTR [rax+4] - -; 1587 : if (temp < h->maxcode[k]) - - 0010a 3b 08 cmp ecx, DWORD PTR [rax] - 0010c 73 f5 jae SHORT $LL19@stbi__jpeg -$LN54@stbi__jpeg: - -; 1588 : break; -; 1589 : if (k == 17) { - - 0010e 44 8b 8b 24 48 +; Line 1586 + 00100 41 ff c0 inc r8d + 00103 48 8d 40 04 lea rax, QWORD PTR [rax+4] +; Line 1587 + 00107 3b 08 cmp ecx, DWORD PTR [rax] + 00109 73 f5 jae SHORT $LL19@stbi__jpeg +$LN44@stbi__jpeg: +; Line 1589 + 0010b 44 8b 8b 24 48 00 00 mov r9d, DWORD PTR [rbx+18468] - 00115 41 83 f8 11 cmp r8d, 17 - 00119 75 34 jne SHORT $LN24@stbi__jpeg - -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; - - 0011b 41 8d 41 f0 lea eax, DWORD PTR [r9-16] - 0011f 89 83 24 48 00 + 00112 41 83 f8 11 cmp r8d, 17 + 00116 75 34 jne SHORT $LN24@stbi__jpeg +; Line 1591 + 00118 41 8d 41 f0 lea eax, DWORD PTR [r9-16] + 0011c 89 83 24 48 00 00 mov DWORD PTR [rbx+18468], eax $LN7@stbi__jpeg: - -; 431 : stbi__g_failure_reason = str; - - 00125 8b 15 00 00 00 +; Line 431 + 00122 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 0012b 65 48 8b 04 25 + 00128 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00134 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00139 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 0013d 48 8d 15 00 00 + 00131 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00136 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 0013a 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BG@PJBJDAGM@can?8t?5merge?5dc?5and?5ac@ - 00144 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1740 : t = stbi__jpeg_huff_decode(j, hdc); -; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - 00148 33 c0 xor eax, eax - 0014a e9 14 02 00 00 jmp $LN85@stbi__jpeg + 00141 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 1741 + 00145 33 c0 xor eax, eax + 00147 e9 a8 01 00 00 jmp $LN67@stbi__jpeg $LN24@stbi__jpeg: - -; 1595 : if (k > j->code_bits) - - 0014f 45 3b c1 cmp r8d, r9d - 00152 7f d1 jg SHORT $LN7@stbi__jpeg - -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; - - 00154 49 63 c0 movsxd rax, r8d - 00157 b9 20 00 00 00 mov ecx, 32 ; 00000020H - 0015c 41 2b c8 sub ecx, r8d - 0015f 45 8b da mov r11d, r10d - 00162 41 d3 eb shr r11d, cl - 00165 45 23 9c 87 00 - 00 00 00 and r11d, DWORD PTR stbi__bmask[r15+rax*4] - 0016d 44 03 9c 87 4c - 06 00 00 add r11d, DWORD PTR [rdi+rax*4+1612] - -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! - - 00175 41 81 fb ff 00 +; Line 1595 + 0014c 45 3b c1 cmp r8d, r9d + 0014f 7f d1 jg SHORT $LN7@stbi__jpeg +; Line 1599 + 00151 49 63 c0 movsxd rax, r8d + 00154 b9 20 00 00 00 mov ecx, 32 ; 00000020H + 00159 41 2b c8 sub ecx, r8d + 0015c 45 8b da mov r11d, r10d + 0015f 41 d3 eb shr r11d, cl + 00162 45 23 9c 86 00 + 00 00 00 and r11d, DWORD PTR stbi__bmask[r14+rax*4] + 0016a 44 03 9c 86 4c + 06 00 00 add r11d, DWORD PTR [rsi+rax*4+1612] +; Line 1600 + 00172 41 81 fb ff 00 00 00 cmp r11d, 255 ; 000000ffH - 0017c 77 a7 ja SHORT $LN7@stbi__jpeg - -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; - - 0017e 45 2b c8 sub r9d, r8d - -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; - - 00181 49 63 c3 movsxd rax, r11d - 00184 41 8b c8 mov ecx, r8d - 00187 41 d3 e2 shl r10d, cl -$LN86@stbi__jpeg: - -; 1740 : t = stbi__jpeg_huff_decode(j, hdc); -; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - 0018a 44 89 8b 24 48 + 00179 77 a7 ja SHORT $LN7@stbi__jpeg +; Line 1605 + 0017b 45 2b c8 sub r9d, r8d +; Line 1607 + 0017e 49 63 c3 movsxd rax, r11d + 00181 41 8b c8 mov ecx, r8d + 00184 41 d3 e2 shl r10d, cl +$LN68@stbi__jpeg: +; Line 1741 + 00187 44 89 8b 24 48 00 00 mov DWORD PTR [rbx+18468], r9d - 00191 44 89 93 20 48 + 0018e 44 89 93 20 48 00 00 mov DWORD PTR [rbx+18464], r10d - 00198 0f b6 84 38 00 - 04 00 00 movzx eax, BYTE PTR [rax+rdi+1024] - 001a0 0f b6 e8 movzx ebp, al - 001a3 83 fd 0f cmp ebp, 15 - 001a6 0f 87 79 ff ff + 00195 0f b6 84 30 00 + 04 00 00 movzx eax, BYTE PTR [rax+rsi+1024] + 0019d 0f b6 f0 movzx esi, al + 001a0 83 fe 0f cmp esi, 15 + 001a3 0f 87 79 ff ff ff ja $LN7@stbi__jpeg - -; 1742 : diff = t ? stbi__extend_receive(j, t) : 0; - - 001ac 33 ff xor edi, edi - 001ae 84 c0 test al, al - 001b0 74 66 je SHORT $LN12@stbi__jpeg - -; 1619 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); - - 001b2 44 3b cd cmp r9d, ebp - 001b5 7d 08 jge SHORT $LN32@stbi__jpeg - 001b7 48 8b cb mov rcx, rbx - 001ba e8 00 00 00 00 call stbi__grow_buffer_unsafe +; Line 1742 + 001a9 84 c0 test al, al + 001ab 74 66 je SHORT $LN12@stbi__jpeg +; Line 1619 + 001ad 44 3b ce cmp r9d, esi + 001b0 7d 08 jge SHORT $LN32@stbi__jpeg + 001b2 48 8b cb mov rcx, rbx + 001b5 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN32@stbi__jpeg: - -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing - - 001bf 44 8b 93 24 48 - 00 00 mov r10d, DWORD PTR [rbx+18468] - 001c6 44 3b d5 cmp r10d, ebp - 001c9 7c 4d jl SHORT $LN12@stbi__jpeg - -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) - - 001cb 44 8b 8b 20 48 - 00 00 mov r9d, DWORD PTR [rbx+18464] - -; 1623 : k = stbi_lrot(j->code_buffer, n); - - 001d2 8b cd mov ecx, ebp - 001d4 45 8b c1 mov r8d, r9d - -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; - - 001d7 44 2b d5 sub r10d, ebp - 001da 41 d3 c0 rol r8d, cl - 001dd 48 8d 0c ad 00 - 00 00 00 lea rcx, QWORD PTR [rbp*4] - 001e5 42 8b 94 39 00 - 00 00 00 mov edx, DWORD PTR stbi__bmask[rcx+r15] - 001ed 8b c2 mov eax, edx - 001ef 41 c1 e9 1f shr r9d, 31 - 001f3 f7 d0 not eax - -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); - - 001f5 41 ff c9 dec r9d - 001f8 44 89 93 24 48 - 00 00 mov DWORD PTR [rbx+18468], r10d - 001ff 46 23 8c 39 00 - 00 00 00 and r9d, DWORD PTR stbi__jbias[rcx+r15] - 00207 41 23 c0 and eax, r8d - 0020a 41 23 d0 and edx, r8d - 0020d 89 83 20 48 00 +; Line 1620 + 001ba 44 8b 8b 24 48 + 00 00 mov r9d, DWORD PTR [rbx+18468] + 001c1 44 3b ce cmp r9d, esi + 001c4 7c 4d jl SHORT $LN12@stbi__jpeg +; Line 1622 + 001c6 44 8b 93 20 48 + 00 00 mov r10d, DWORD PTR [rbx+18464] +; Line 1623 + 001cd 8b ce mov ecx, esi + 001cf 45 8b c2 mov r8d, r10d +; Line 1626 + 001d2 44 2b ce sub r9d, esi + 001d5 41 d3 c0 rol r8d, cl + 001d8 48 8d 0c b5 00 + 00 00 00 lea rcx, QWORD PTR [rsi*4] + 001e0 42 8b 94 31 00 + 00 00 00 mov edx, DWORD PTR stbi__bmask[rcx+r14] + 001e8 8b c2 mov eax, edx + 001ea 41 c1 ea 1f shr r10d, 31 + 001ee f7 d0 not eax +; Line 1627 + 001f0 41 ff ca dec r10d + 001f3 44 89 8b 24 48 + 00 00 mov DWORD PTR [rbx+18468], r9d + 001fa 46 23 94 31 00 + 00 00 00 and r10d, DWORD PTR stbi__jbias[rcx+r14] + 00202 41 23 c0 and eax, r8d + 00205 41 23 d0 and edx, r8d + 00208 89 83 20 48 00 00 mov DWORD PTR [rbx+18464], eax - 00213 44 03 ca add r9d, edx - -; 1628 : } - - 00216 eb 03 jmp SHORT $LN13@stbi__jpeg + 0020e 44 03 d2 add r10d, edx +; Line 1628 + 00211 eb 03 jmp SHORT $LN13@stbi__jpeg $LN12@stbi__jpeg: - -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); - - 00218 44 8b cf mov r9d, edi +; Line 1744 + 00213 45 33 d2 xor r10d, r10d $LN13@stbi__jpeg: - 0021b 4f 8d 14 76 lea r10, QWORD PTR [r14+r14*2] - -; 523 : if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow - - 0021f 41 8b c9 mov ecx, r9d - -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); - - 00222 49 c1 e2 05 shl r10, 5 - -; 523 : if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow - - 00226 f7 d1 not ecx - -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); - - 00228 41 8b 94 1a b8 - 46 00 00 mov edx, DWORD PTR [r10+rbx+18104] - -; 523 : if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow - - 00230 8b c2 mov eax, edx - 00232 f7 d0 not eax - 00234 33 c8 xor ecx, eax - 00236 78 57 js SHORT $LN8@stbi__jpeg - -; 524 : if (a < 0 && b < 0) return a >= INT_MIN - b; // same as a + b >= INT_MIN; INT_MIN - b cannot overflow since b < 0. - - 00238 85 d2 test edx, edx - 0023a 79 16 jns SHORT $LN37@stbi__jpeg - 0023c 45 85 c9 test r9d, r9d - 0023f 79 11 jns SHORT $LN37@stbi__jpeg - 00241 b8 00 00 00 80 mov eax, -2147483648 ; ffffffff80000000H - 00246 8b cf mov ecx, edi - 00248 41 2b c1 sub eax, r9d - 0024b 3b d0 cmp edx, eax - 0024d 0f 9d c1 setge cl - 00250 eb 0f jmp SHORT $LN35@stbi__jpeg -$LN37@stbi__jpeg: - -; 525 : return a <= INT_MAX - b; - - 00252 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00257 8b cf mov ecx, edi - 00259 41 2b c1 sub eax, r9d - 0025c 3b d0 cmp edx, eax - 0025e 0f 9e c1 setle cl -$LN35@stbi__jpeg: - -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); - - 00261 85 c9 test ecx, ecx - 00263 75 2a jne SHORT $LN8@stbi__jpeg - -; 431 : stbi__g_failure_reason = str; - - 00265 8b 15 00 00 00 + 00216 4c 8d 1c 6d 00 + 00 00 00 lea r11, QWORD PTR [rbp*2] + 0021e 41 8b d2 mov edx, r10d + 00221 4c 03 dd add r11, rbp + 00224 49 c1 e3 05 shl r11, 5 + 00228 41 8b b4 1b b8 + 46 00 00 mov esi, DWORD PTR [r11+rbx+18104] + 00230 8b ce mov ecx, esi + 00232 e8 00 00 00 00 call stbi__addints_valid + 00237 85 c0 test eax, eax + 00239 75 2a jne SHORT $LN8@stbi__jpeg +; Line 431 + 0023b 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 0026b 65 48 8b 04 25 + 00241 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00274 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00279 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 0027d 48 8d 15 00 00 + 0024a b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 0024f 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00253 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_09IFDKCGFO@bad?5delta@ - 00284 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); - - 00288 33 c0 xor eax, eax - 0028a e9 d4 00 00 00 jmp $LN85@stbi__jpeg + 0025a 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 1744 + 0025e 33 c0 xor eax, eax + 00260 e9 8f 00 00 00 jmp $LN67@stbi__jpeg $LN8@stbi__jpeg: - -; 1745 : dc = j->img_comp[b].dc_pred + diff; - - 0028f 46 8d 04 0a lea r8d, DWORD PTR [rdx+r9] - -; 1746 : j->img_comp[b].dc_pred = dc; -; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - 00293 41 b9 01 00 00 - 00 mov r9d, 1 - 00299 45 89 84 1a b8 - 46 00 00 mov DWORD PTR [r10+rbx+18104], r8d - 002a1 8b 8b 40 48 00 +; Line 1745 + 00265 41 03 f2 add esi, r10d +; Line 1746 + 00268 41 89 b4 1b b8 + 46 00 00 mov DWORD PTR [r11+rbx+18104], esi +; Line 1747 + 00270 41 bb 01 00 00 + 00 mov r11d, 1 + 00276 8b 8b 40 48 00 00 mov ecx, DWORD PTR [rbx+18496] - 002a7 66 41 d3 e1 shl r9w, cl - -; 531 : if (b == 0 || b == -1) return 1; // multiplication by 0 is always 0; check for -1 so SHRT_MIN/b doesn't overflow - - 002ab 41 8d 41 01 lea eax, DWORD PTR [r9+1] - 002af 66 83 f8 01 cmp ax, 1 - 002b3 76 4d jbe SHORT $LN43@stbi__jpeg - -; 532 : if ((a >= 0) == (b >= 0)) return a <= SHRT_MAX / b; // product is positive, so similar to mul2sizes_valid - - 002b5 41 0f b7 c1 movzx eax, r9w - 002b9 45 0f bf d1 movsx r10d, r9w - 002bd 66 41 33 c0 xor ax, r8w - 002c1 41 0f bf c8 movsx ecx, r8w - 002c5 66 0f ba e0 0f bt ax, 15 - 002ca 72 11 jb SHORT $LN44@stbi__jpeg - 002cc b8 ff 7f 00 00 mov eax, 32767 ; 00007fffH - 002d1 99 cdq - 002d2 41 f7 fa idiv r10d - 002d5 3b c8 cmp ecx, eax - 002d7 40 0f 9e c7 setle dil - 002db eb 1d jmp SHORT $LN41@stbi__jpeg -$LN44@stbi__jpeg: - -; 533 : if (b < 0) return a <= SHRT_MIN / b; // same as a * b >= SHRT_MIN - - 002dd b8 00 80 ff ff mov eax, -32768 ; ffffffffffff8000H - 002e2 99 cdq - 002e3 41 f7 fa idiv r10d - 002e6 66 45 85 c9 test r9w, r9w - 002ea 79 08 jns SHORT $LN45@stbi__jpeg - 002ec 3b c8 cmp ecx, eax - 002ee 40 0f 9e c7 setle dil - 002f2 eb 06 jmp SHORT $LN41@stbi__jpeg -$LN45@stbi__jpeg: - -; 534 : return a >= SHRT_MIN / b; - - 002f4 3b c8 cmp ecx, eax - 002f6 40 0f 9d c7 setge dil -$LN41@stbi__jpeg: - -; 1746 : j->img_comp[b].dc_pred = dc; -; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - 002fa 85 ff test edi, edi - 002fc 0f 84 23 fe ff + 0027c 66 41 d3 e3 shl r11w, cl + 00280 0f b7 ce movzx ecx, si + 00283 41 0f b7 d3 movzx edx, r11w + 00287 e8 00 00 00 00 call stbi__mul2shorts_valid + 0028c 85 c0 test eax, eax + 0028e 0f 84 8e fe ff ff je $LN7@stbi__jpeg -$LN43@stbi__jpeg: - -; 1748 : data[0] = (short)(dc * (1 << j->succ_low)); - - 00302 41 0f bf c0 movsx eax, r8w - 00306 41 0f bf c9 movsx ecx, r9w - 0030a 0f af c8 imul ecx, eax - 0030d 66 89 0e mov WORD PTR [rsi], cx - -; 1749 : } - - 00310 eb 4c jmp SHORT $LN10@stbi__jpeg +; Line 1748 + 00294 0f bf c6 movsx eax, si + 00297 41 0f bf cb movsx ecx, r11w + 0029b 0f af c8 imul ecx, eax + 0029e 66 89 0f mov WORD PTR [rdi], cx +; Line 1749 + 002a1 eb 4c jmp SHORT $LN10@stbi__jpeg $LN4@stbi__jpeg: - -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); - - 00312 83 bb 24 48 00 +; Line 1646 + 002a3 83 bb 24 48 00 00 01 cmp DWORD PTR [rbx+18468], 1 - 00319 7d 08 jge SHORT $LN50@stbi__jpeg - 0031b 48 8b cb mov rcx, rbx - 0031e e8 00 00 00 00 call stbi__grow_buffer_unsafe -$LN50@stbi__jpeg: - -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing - - 00323 44 8b 83 24 48 + 002aa 7d 08 jge SHORT $LN40@stbi__jpeg + 002ac 48 8b cb mov rcx, rbx + 002af e8 00 00 00 00 call stbi__grow_buffer_unsafe +$LN40@stbi__jpeg: +; Line 1647 + 002b4 44 8b 83 24 48 00 00 mov r8d, DWORD PTR [rbx+18468] - 0032a 41 83 f8 01 cmp r8d, 1 - 0032e 7c 2e jl SHORT $LN10@stbi__jpeg - -; 1648 : k = j->code_buffer; - - 00330 8b 93 20 48 00 + 002bb 41 83 f8 01 cmp r8d, 1 + 002bf 7c 2e jl SHORT $LN10@stbi__jpeg +; Line 1648 + 002c1 8b 93 20 48 00 00 mov edx, DWORD PTR [rbx+18464] - -; 1649 : j->code_buffer <<= 1; - - 00336 8d 0c 12 lea ecx, DWORD PTR [rdx+rdx] - 00339 89 8b 20 48 00 +; Line 1649 + 002c7 8d 0c 12 lea ecx, DWORD PTR [rdx+rdx] + 002ca 89 8b 20 48 00 00 mov DWORD PTR [rbx+18464], ecx - -; 1650 : --j->code_bits; - - 0033f 41 8d 48 ff lea ecx, DWORD PTR [r8-1] - 00343 89 8b 24 48 00 +; Line 1650 + 002d0 41 8d 48 ff lea ecx, DWORD PTR [r8-1] + 002d4 89 8b 24 48 00 00 mov DWORD PTR [rbx+18468], ecx - -; 1750 : else { -; 1751 : // refinement scan for DC coefficient -; 1752 : if (stbi__jpeg_get_bit(j)) - - 00349 85 d2 test edx, edx - 0034b 79 11 jns SHORT $LN10@stbi__jpeg - -; 1753 : data[0] += (short)(1 << j->succ_low); - - 0034d 8b 8b 40 48 00 +; Line 1752 + 002da 85 d2 test edx, edx + 002dc 79 11 jns SHORT $LN10@stbi__jpeg +; Line 1753 + 002de 8b 8b 40 48 00 00 mov ecx, DWORD PTR [rbx+18496] - 00353 ba 01 00 00 00 mov edx, 1 - 00358 66 d3 e2 shl dx, cl - 0035b 66 01 16 add WORD PTR [rsi], dx + 002e4 ba 01 00 00 00 mov edx, 1 + 002e9 66 d3 e2 shl dx, cl + 002ec 66 01 17 add WORD PTR [rdi], dx $LN10@stbi__jpeg: - -; 1754 : } -; 1755 : return 1; - - 0035e b8 01 00 00 00 mov eax, 1 -$LN85@stbi__jpeg: - 00363 48 8b 6c 24 40 mov rbp, QWORD PTR [rsp+64] - 00368 4c 8b 7c 24 48 mov r15, QWORD PTR [rsp+72] - -; 1756 : } - - 0036d 48 8b 5c 24 50 mov rbx, QWORD PTR [rsp+80] - 00372 48 83 c4 20 add rsp, 32 ; 00000020H - 00376 41 5e pop r14 - 00378 5f pop rdi - 00379 5e pop rsi - 0037a c3 ret 0 +; Line 1755 + 002ef b8 01 00 00 00 mov eax, 1 +$LN67@stbi__jpeg: + 002f4 4c 8b 74 24 30 mov r14, QWORD PTR [rsp+48] +$LN1@stbi__jpeg: +; Line 1756 + 002f9 48 8b 5c 24 38 mov rbx, QWORD PTR [rsp+56] + 002fe 48 8b 6c 24 40 mov rbp, QWORD PTR [rsp+64] + 00303 48 8b 74 24 48 mov rsi, QWORD PTR [rsp+72] + 00308 48 83 c4 20 add rsp, 32 ; 00000020H + 0030c 5f pop rdi + 0030d c3 ret 0 stbi__jpeg_decode_block_prog_dc ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__jpeg_decode_block_prog_ac _TEXT SEGMENT j$ = 96 @@ -13976,9 +10074,8 @@ data$ = 104 hac$ = 112 fac$ = 120 stbi__jpeg_decode_block_prog_ac PROC ; COMDAT - -; 1761 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1761 00000 4c 89 44 24 18 mov QWORD PTR [rsp+24], r8 00005 48 89 54 24 10 mov QWORD PTR [rsp+16], rdx 0000a 53 push rbx @@ -13987,10 +10084,7 @@ stbi__jpeg_decode_block_prog_ac PROC ; COMDAT 0000d 41 54 push r12 0000f 41 57 push r15 00011 48 83 ec 30 sub rsp, 48 ; 00000030H - -; 1762 : int k; -; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - +; Line 1763 00015 48 63 b9 34 48 00 00 movsxd rdi, DWORD PTR [rcx+18484] 0001c 4d 8b f9 mov r15, r9 @@ -13999,9 +10093,7 @@ stbi__jpeg_decode_block_prog_ac PROC ; COMDAT 00025 48 8b d9 mov rbx, rcx 00028 85 ff test edi, edi 0002a 75 31 jne SHORT $LN13@stbi__jpeg - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0002c 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00032 65 48 8b 04 25 @@ -14011,14 +10103,9 @@ stbi__jpeg_decode_block_prog_ac PROC ; COMDAT 00044 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BG@PJBJDAGM@can?8t?5merge?5dc?5and?5ac@ 0004b 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1762 : int k; -; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - +; Line 1763 0004f 33 c0 xor eax, eax - -; 1885 : } - +; Line 1885 00051 48 83 c4 30 add rsp, 48 ; 00000030H 00055 41 5f pop r15 00057 41 5c pop r12 @@ -14027,10 +10114,7 @@ stbi__jpeg_decode_block_prog_ac PROC ; COMDAT 0005b 5b pop rbx 0005c c3 ret 0 $LN13@stbi__jpeg: - -; 1764 : -; 1765 : if (j->succ_high == 0) { - +; Line 1765 0005d 83 b9 3c 48 00 00 00 cmp DWORD PTR [rcx+18492], 0 00064 8b 81 44 48 00 @@ -14042,91 +10126,56 @@ $LN13@stbi__jpeg: 00 00 mov r14d, DWORD PTR [rcx+18496] 00080 0f 85 e1 02 00 00 jne $LN14@stbi__jpeg - -; 1766 : int shift = j->succ_low; -; 1767 : -; 1768 : if (j->eob_run) { - +; Line 1768 00086 85 c0 test eax, eax 00088 74 12 je SHORT $LN16@stbi__jpeg - -; 1769 : --j->eob_run; - +; Line 1769 0008a ff c8 dec eax 0008c 89 81 44 48 00 00 mov DWORD PTR [rcx+18500], eax - -; 1770 : return 1; - +; Line 1770 00092 b8 01 00 00 00 mov eax, 1 00097 e9 4c 06 00 00 jmp $LN209@stbi__jpeg $LN16@stbi__jpeg: - -; 1771 : } -; 1772 : -; 1773 : k = j->spec_start; - +; Line 1773 0009c 4c 8d 2d 00 00 00 00 lea r13, OFFSET FLAT:__ImageBase $LL4@stbi__jpeg: - -; 1774 : do { -; 1775 : unsigned int zig; -; 1776 : int c, r, s; -; 1777 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - +; Line 1777 000a3 83 bb 24 48 00 00 10 cmp DWORD PTR [rbx+18468], 16 000aa 7d 08 jge SHORT $LN17@stbi__jpeg 000ac 48 8b cb mov rcx, rbx 000af e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN17@stbi__jpeg: - -; 1778 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); - +; Line 1778 000b4 44 8b 8b 20 48 00 00 mov r9d, DWORD PTR [rbx+18464] - -; 1779 : r = fac[c]; - +; Line 1779 000bb 44 8b 83 24 48 00 00 mov r8d, DWORD PTR [rbx+18468] 000c2 41 8b c1 mov eax, r9d 000c5 48 c1 e8 17 shr rax, 23 000c9 41 0f bf 14 47 movsx edx, WORD PTR [r15+rax*2] - -; 1780 : if (r) { // fast-AC path - +; Line 1780 000ce 85 d2 test edx, edx 000d0 74 5b je SHORT $LN18@stbi__jpeg - -; 1781 : k += (r >> 4) & 15; // run - +; Line 1781 000d2 8b c2 mov eax, edx - -; 1782 : s = r & 15; // combined length - +; Line 1782 000d4 8b ca mov ecx, edx 000d6 c1 f8 04 sar eax, 4 000d9 83 e1 0f and ecx, 15 000dc 83 e0 0f and eax, 15 000df 03 f8 add edi, eax - -; 1783 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); - +; Line 1783 000e1 41 3b c8 cmp ecx, r8d 000e4 0f 8f d9 05 00 00 jg $LN149@stbi__jpeg - -; 1784 : j->code_buffer <<= s; -; 1785 : j->code_bits -= s; - +; Line 1785 000ea 44 2b c1 sub r8d, ecx 000ed 41 d3 e1 shl r9d, cl - -; 1786 : zig = stbi__jpeg_dezigzag[k++]; -; 1787 : data[zig] = (short)((r >> 8) * (1 << shift)); - +; Line 1787 000f0 41 8b ce mov ecx, r14d 000f3 44 89 83 24 48 00 00 mov DWORD PTR [rbx+18468], r8d @@ -14143,42 +10192,26 @@ $LN17@stbi__jpeg: 0011c 44 89 8b 20 48 00 00 mov DWORD PTR [rbx+18464], r9d 00123 66 41 89 14 44 mov WORD PTR [r12+rax*2], dx - -; 1788 : } - +; Line 1788 00128 e9 8d 01 00 00 jmp $LN2@stbi__jpeg $LN18@stbi__jpeg: - -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - +; Line 1564 0012d 41 83 f8 10 cmp r8d, 16 00131 7d 08 jge SHORT $LN58@stbi__jpeg 00133 48 8b cb mov rcx, rbx 00136 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN58@stbi__jpeg: - -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); - +; Line 1568 0013b 44 8b 9b 20 48 00 00 mov r11d, DWORD PTR [rbx+18464] 00142 41 8b c3 mov eax, r11d 00145 48 c1 e8 17 shr rax, 23 - -; 1569 : k = h->fast[c]; - +; Line 1569 00149 0f b6 0c 30 movzx ecx, BYTE PTR [rax+rsi] - -; 1570 : if (k < 255) { - +; Line 1570 0014d 80 f9 ff cmp cl, 255 ; 000000ffH 00150 73 22 jae SHORT $LN59@stbi__jpeg - -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) - +; Line 1572 00152 44 8b 93 24 48 00 00 mov r10d, DWORD PTR [rbx+18468] 00159 8b c1 mov eax, ecx @@ -14187,35 +10220,16 @@ $LN58@stbi__jpeg: 00163 41 3b ca cmp ecx, r10d 00166 0f 8f 57 05 00 00 jg $LN149@stbi__jpeg - -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; - +; Line 1574 0016c 41 d3 e3 shl r11d, cl - -; 1575 : j->code_bits -= s; - +; Line 1575 0016f 44 2b d1 sub r10d, ecx - -; 1576 : return h->values[k]; - +; Line 1576 00172 eb 7d jmp SHORT $LN210@stbi__jpeg $LN59@stbi__jpeg: - -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; - +; Line 1585 00174 41 8b cb mov ecx, r11d - -; 1587 : if (temp < h->maxcode[k]) - +; Line 1587 00177 48 8d 86 2c 06 00 00 lea rax, QWORD PTR [rsi+1580] 0017e c1 e9 10 shr ecx, 16 @@ -14226,42 +10240,25 @@ $LN59@stbi__jpeg: 0018c 72 10 jb SHORT $LN119@stbi__jpeg 0018e 66 90 npad 2 $LL57@stbi__jpeg: - -; 1586 : for (k = FAST_BITS + 1; ; ++k) - +; Line 1586 00190 41 ff c0 inc r8d 00193 48 8d 40 04 lea rax, QWORD PTR [rax+4] 00197 49 ff c1 inc r9 - -; 1587 : if (temp < h->maxcode[k]) - +; Line 1587 0019a 3b 08 cmp ecx, DWORD PTR [rax] 0019c 73 f2 jae SHORT $LL57@stbi__jpeg $LN119@stbi__jpeg: - -; 1588 : break; -; 1589 : if (k == 17) { - +; Line 1589 0019e 44 8b 93 24 48 00 00 mov r10d, DWORD PTR [rbx+18468] 001a5 41 83 f8 11 cmp r8d, 17 001a9 0f 84 af 01 00 00 je $LN145@stbi__jpeg - -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) - +; Line 1595 001af 45 3b c2 cmp r8d, r10d 001b2 0f 8f 0b 05 00 00 jg $LN149@stbi__jpeg - -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; - +; Line 1599 001b8 b9 20 00 00 00 mov ecx, 32 ; 00000020H 001bd 41 8b d3 mov edx, r11d 001c0 41 2b c8 sub ecx, r8d @@ -14271,32 +10268,19 @@ $LN119@stbi__jpeg: 001cd 46 8b 8c 8e 4c 06 00 00 mov r9d, DWORD PTR [rsi+r9*4+1612] 001d5 44 03 ca add r9d, edx - -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! - +; Line 1600 001d8 41 81 f9 ff 00 00 00 cmp r9d, 255 ; 000000ffH 001df 0f 87 de 04 00 00 ja $LN149@stbi__jpeg - -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; - +; Line 1605 001e5 45 2b d0 sub r10d, r8d - -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; - +; Line 1607 001e8 49 63 c1 movsxd rax, r9d 001eb 41 8b c8 mov ecx, r8d 001ee 41 d3 e3 shl r11d, cl $LN210@stbi__jpeg: - -; 1792 : s = rs & 15; - +; Line 1792 001f1 44 89 93 24 48 00 00 mov DWORD PTR [rbx+18468], r10d 001f8 44 89 9b 20 48 @@ -14304,55 +10288,34 @@ $LN210@stbi__jpeg: 001ff 0f b6 b4 30 00 04 00 00 movzx esi, BYTE PTR [rax+rsi+1024] 00207 8b ee mov ebp, esi - -; 1793 : r = rs >> 4; - +; Line 1793 00209 c1 ee 04 shr esi, 4 0020c 83 e5 0f and ebp, 15 - -; 1794 : if (s == 0) { - +; Line 1794 0020f 75 11 jne SHORT $LN22@stbi__jpeg - -; 1795 : if (r < 15) { - +; Line 1795 00211 83 fe 0f cmp esi, 15 00214 0f 82 b6 00 00 00 jb $LN122@stbi__jpeg - -; 1800 : break; -; 1801 : } -; 1802 : k += 16; - +; Line 1802 0021a 83 c7 10 add edi, 16 - -; 1803 : } - +; Line 1803 0021d e9 93 00 00 00 jmp $LN211@stbi__jpeg $LN22@stbi__jpeg: - -; 1804 : else { -; 1805 : k += r; - +; Line 1805 00222 03 fe add edi, esi - -; 1806 : zig = stbi__jpeg_dezigzag[k++]; - +; Line 1806 00224 48 63 c7 movsxd rax, edi 00227 ff c7 inc edi 00229 42 0f b6 b4 28 00 00 00 00 movzx esi, BYTE PTR stbi__jpeg_dezigzag[rax+r13] - -; 1619 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); - +; Line 1619 00232 44 3b d5 cmp r10d, ebp 00235 7d 08 jge SHORT $LN74@stbi__jpeg 00237 48 8b cb mov rcx, rbx 0023a e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN74@stbi__jpeg: - -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing - +; Line 1620 0023f 44 8b 93 24 48 00 00 mov r10d, DWORD PTR [rbx+18468] 00246 44 3b d5 cmp r10d, ebp @@ -14360,22 +10323,13 @@ $LN74@stbi__jpeg: 0024b 45 33 c9 xor r9d, r9d 0024e eb 4b jmp SHORT $LN73@stbi__jpeg $LN75@stbi__jpeg: - -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) - +; Line 1622 00250 44 8b 8b 20 48 00 00 mov r9d, DWORD PTR [rbx+18464] - -; 1623 : k = stbi_lrot(j->code_buffer, n); - +; Line 1623 00257 8b cd mov ecx, ebp 00259 45 8b c1 mov r8d, r9d - -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; - +; Line 1626 0025c 44 2b d5 sub r10d, ebp 0025f 41 d3 c0 rol r8d, cl 00262 48 8d 0c ad 00 @@ -14385,9 +10339,7 @@ $LN75@stbi__jpeg: 00272 8b c2 mov eax, edx 00274 41 c1 e9 1f shr r9d, 31 00278 f7 d0 not eax - -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); - +; Line 1627 0027a 41 ff c9 dec r9d 0027d 44 89 93 24 48 00 00 mov DWORD PTR [rbx+18468], r10d @@ -14399,9 +10351,7 @@ $LN75@stbi__jpeg: 00 mov DWORD PTR [rbx+18464], eax 00298 44 03 ca add r9d, edx $LN73@stbi__jpeg: - -; 1807 : data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift)); - +; Line 1807 0029b 41 8b ce mov ecx, r14d 0029e 41 0f bf c1 movsx eax, r9w 002a2 ba 01 00 00 00 mov edx, 1 @@ -14410,42 +10360,28 @@ $LN73@stbi__jpeg: 002ad 0f af c8 imul ecx, eax 002b0 66 41 89 0c 74 mov WORD PTR [r12+rsi*2], cx $LN211@stbi__jpeg: - -; 1808 : } -; 1809 : } -; 1810 : } while (k <= j->spec_end); - +; Line 1810 002b5 48 8b 74 24 70 mov rsi, QWORD PTR hac$[rsp] $LN2@stbi__jpeg: 002ba 3b bb 38 48 00 00 cmp edi, DWORD PTR [rbx+18488] 002c0 0f 8e dd fd ff ff jle $LL4@stbi__jpeg - -; 1882 : } -; 1883 : } -; 1884 : return 1; - +; Line 1884 002c6 b8 01 00 00 00 mov eax, 1 002cb e9 18 04 00 00 jmp $LN209@stbi__jpeg $LN122@stbi__jpeg: - -; 1796 : j->eob_run = (1 << r); - +; Line 1796 002d0 8b ce mov ecx, esi 002d2 41 b8 01 00 00 00 mov r8d, 1 002d8 41 d3 e0 shl r8d, cl 002db 44 89 83 44 48 00 00 mov DWORD PTR [rbx+18500], r8d - -; 1797 : if (r) - +; Line 1797 002e2 85 f6 test esi, esi 002e4 74 64 je SHORT $LN25@stbi__jpeg - -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); - +; Line 1634 002e6 44 3b d6 cmp r10d, esi 002e9 7d 0f jge SHORT $LN70@stbi__jpeg 002eb 48 8b cb mov rcx, rbx @@ -14453,44 +10389,28 @@ $LN122@stbi__jpeg: 002f3 44 8b 83 44 48 00 00 mov r8d, DWORD PTR [rbx+18500] $LN70@stbi__jpeg: - -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing - +; Line 1635 002fa 44 8b 8b 24 48 00 00 mov r9d, DWORD PTR [rbx+18468] 00301 44 3b ce cmp r9d, esi 00304 7d 17 jge SHORT $LN71@stbi__jpeg 00306 33 c9 xor ecx, ecx - -; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); - +; Line 1798 00308 44 03 c1 add r8d, ecx - -; 1799 : --j->eob_run; - +; Line 1799 0030b 41 8d 40 ff lea eax, DWORD PTR [r8-1] 0030f 89 83 44 48 00 00 mov DWORD PTR [rbx+18500], eax - -; 1882 : } -; 1883 : } -; 1884 : return 1; - +; Line 1884 00315 8d 41 01 lea eax, QWORD PTR [rcx+1] 00318 e9 cb 03 00 00 jmp $LN209@stbi__jpeg $LN71@stbi__jpeg: - -; 1636 : k = stbi_lrot(j->code_buffer, n); - +; Line 1636 0031d 8b 93 20 48 00 00 mov edx, DWORD PTR [rbx+18464] 00323 8b ce mov ecx, esi 00325 d3 c2 rol edx, cl - -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; - +; Line 1639 00327 44 2b ce sub r9d, esi 0032a 41 8b 8c b5 00 00 00 00 mov ecx, DWORD PTR stbi__bmask[r13+rsi*4] @@ -14502,62 +10422,35 @@ $LN71@stbi__jpeg: 0033f 23 ca and ecx, edx 00341 89 83 20 48 00 00 mov DWORD PTR [rbx+18464], eax - -; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); - +; Line 1798 00347 44 03 c1 add r8d, ecx $LN25@stbi__jpeg: - -; 1799 : --j->eob_run; - +; Line 1799 0034a 41 8d 40 ff lea eax, DWORD PTR [r8-1] 0034e 89 83 44 48 00 00 mov DWORD PTR [rbx+18500], eax - -; 1882 : } -; 1883 : } -; 1884 : return 1; - +; Line 1884 00354 b8 01 00 00 00 mov eax, 1 00359 e9 8a 03 00 00 jmp $LN209@stbi__jpeg $LN145@stbi__jpeg: - -; 1591 : j->code_bits -= 16; - +; Line 1591 0035e 41 8d 42 f0 lea eax, DWORD PTR [r10-16] - -; 1789 : else { -; 1790 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1791 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); - +; Line 1791 00362 e9 56 03 00 00 jmp $LN212@stbi__jpeg $LN14@stbi__jpeg: - -; 1811 : } -; 1812 : else { -; 1813 : // refinement scan for these AC coefficients -; 1814 : -; 1815 : short bit = (short)(1 << j->succ_low); - +; Line 1815 00367 bd 01 00 00 00 mov ebp, 1 0036c 41 8b ce mov ecx, r14d 0036f 66 d3 e5 shl bp, cl - -; 1816 : -; 1817 : if (j->eob_run) { - +; Line 1817 00372 85 c0 test eax, eax 00374 0f 84 9d 00 00 00 je $LN26@stbi__jpeg - -; 1818 : --j->eob_run; - +; Line 1818 0037a ff c8 dec eax 0037c 89 83 44 48 00 00 mov DWORD PTR [rbx+18500], eax - -; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { - +; Line 1819 00382 3b bb 38 48 00 00 cmp edi, DWORD PTR [rbx+18488] 00388 0f 8f 24 03 00 @@ -14569,81 +10462,54 @@ $LN14@stbi__jpeg: 0039c 4c 03 f7 add r14, rdi 0039f 90 npad 1 $LL7@stbi__jpeg: - -; 1820 : short* p = &data[stbi__jpeg_dezigzag[k]]; - +; Line 1820 003a0 41 0f b6 06 movzx eax, BYTE PTR [r14] - -; 1821 : if (*p != 0) - +; Line 1821 003a4 66 41 83 3c 44 00 cmp WORD PTR [r12+rax*2], 0 003aa 49 8d 34 44 lea rsi, QWORD PTR [r12+rax*2] 003ae 74 50 je SHORT $LN5@stbi__jpeg - -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); - +; Line 1646 003b0 83 bb 24 48 00 00 01 cmp DWORD PTR [rbx+18468], 1 003b7 7d 08 jge SHORT $LN78@stbi__jpeg 003b9 48 8b cb mov rcx, rbx 003bc e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN78@stbi__jpeg: - -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing - +; Line 1647 003c1 8b 93 24 48 00 00 mov edx, DWORD PTR [rbx+18468] 003c7 83 fa 01 cmp edx, 1 003ca 7c 34 jl SHORT $LN5@stbi__jpeg - -; 1648 : k = j->code_buffer; - +; Line 1648 003cc 8b 8b 20 48 00 00 mov ecx, DWORD PTR [rbx+18464] - -; 1649 : j->code_buffer <<= 1; - +; Line 1649 003d2 8d 04 09 lea eax, DWORD PTR [rcx+rcx] 003d5 89 83 20 48 00 00 mov DWORD PTR [rbx+18464], eax - -; 1650 : --j->code_bits; - +; Line 1650 003db 8d 42 ff lea eax, DWORD PTR [rdx-1] 003de 89 83 24 48 00 00 mov DWORD PTR [rbx+18468], eax - -; 1822 : if (stbi__jpeg_get_bit(j)) - +; Line 1822 003e4 85 c9 test ecx, ecx 003e6 79 18 jns SHORT $LN5@stbi__jpeg - -; 1823 : if ((*p & bit) == 0) { - +; Line 1823 003e8 0f b7 06 movzx eax, WORD PTR [rsi] 003eb 66 85 c5 test ax, bp 003ee 75 10 jne SHORT $LN5@stbi__jpeg - -; 1824 : if (*p > 0) - +; Line 1824 003f0 66 85 c0 test ax, ax 003f3 7e 05 jle SHORT $LN31@stbi__jpeg - -; 1825 : *p += bit; - +; Line 1825 003f5 66 03 c5 add ax, bp 003f8 eb 03 jmp SHORT $LN213@stbi__jpeg $LN31@stbi__jpeg: - -; 1826 : else -; 1827 : *p -= bit; - +; Line 1827 003fa 66 2b c5 sub ax, bp $LN213@stbi__jpeg: - -; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { - +; Line 1819 003fd 66 89 06 mov WORD PTR [rsi], ax $LN5@stbi__jpeg: 00400 ff c7 inc edi @@ -14651,58 +10517,34 @@ $LN5@stbi__jpeg: 00405 3b bb 38 48 00 00 cmp edi, DWORD PTR [rbx+18488] 0040b 7e 93 jle SHORT $LL7@stbi__jpeg - -; 1882 : } -; 1883 : } -; 1884 : return 1; - +; Line 1884 0040d b8 01 00 00 00 mov eax, 1 00412 e9 d1 02 00 00 jmp $LN209@stbi__jpeg $LN26@stbi__jpeg: - -; 1828 : } -; 1829 : } -; 1830 : } -; 1831 : else { -; 1832 : k = j->spec_start; - +; Line 1832 00417 4c 8b e7 mov r12, rdi 0041a 4c 8d 2d 00 00 00 00 lea r13, OFFSET FLAT:__ImageBase 00421 45 33 f6 xor r14d, r14d $LL10@stbi__jpeg: - -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - +; Line 1564 00424 83 bb 24 48 00 00 10 cmp DWORD PTR [rbx+18468], 16 0042b 7d 08 jge SHORT $LN85@stbi__jpeg 0042d 48 8b cb mov rcx, rbx 00430 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN85@stbi__jpeg: - -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); - +; Line 1568 00435 8b 93 20 48 00 00 mov edx, DWORD PTR [rbx+18464] 0043b 8b c2 mov eax, edx 0043d 48 c1 e8 17 shr rax, 23 - -; 1569 : k = h->fast[c]; - +; Line 1569 00441 0f b6 0c 30 movzx ecx, BYTE PTR [rax+rsi] - -; 1570 : if (k < 255) { - +; Line 1570 00445 80 f9 ff cmp cl, 255 ; 000000ffH 00448 73 2a jae SHORT $LN86@stbi__jpeg - -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) - +; Line 1572 0044a 44 8b 8b 24 48 00 00 mov r9d, DWORD PTR [rbx+18468] 00451 8b c1 mov eax, ecx @@ -14711,37 +10553,18 @@ $LN85@stbi__jpeg: 0045b 41 3b c9 cmp ecx, r9d 0045e 0f 8f 5f 02 00 00 jg $LN149@stbi__jpeg - -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; - +; Line 1574 00464 d3 e2 shl edx, cl 00466 89 93 20 48 00 00 mov DWORD PTR [rbx+18464], edx - -; 1575 : j->code_bits -= s; - +; Line 1575 0046c 44 2b c9 sub r9d, ecx - -; 1576 : return h->values[k]; - +; Line 1576 0046f e9 8b 00 00 00 jmp $LN214@stbi__jpeg $LN86@stbi__jpeg: - -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; - +; Line 1585 00474 c1 ea 10 shr edx, 16 - -; 1587 : if (temp < h->maxcode[k]) - +; Line 1587 00477 48 8d 86 2c 06 00 00 lea rax, QWORD PTR [rsi+1580] 0047e 41 b8 0a 00 00 @@ -14751,42 +10574,25 @@ $LN86@stbi__jpeg: 00489 72 13 jb SHORT $LN123@stbi__jpeg 0048b 0f 1f 44 00 00 npad 5 $LL84@stbi__jpeg: - -; 1586 : for (k = FAST_BITS + 1; ; ++k) - +; Line 1586 00490 41 ff c0 inc r8d 00493 48 8d 40 04 lea rax, QWORD PTR [rax+4] 00497 49 ff c2 inc r10 - -; 1587 : if (temp < h->maxcode[k]) - +; Line 1587 0049a 3b 10 cmp edx, DWORD PTR [rax] 0049c 73 f2 jae SHORT $LL84@stbi__jpeg $LN123@stbi__jpeg: - -; 1588 : break; -; 1589 : if (k == 17) { - +; Line 1589 0049e 44 8b 8b 24 48 00 00 mov r9d, DWORD PTR [rbx+18468] 004a5 41 83 f8 11 cmp r8d, 17 004a9 0f 84 0a 02 00 00 je $LN148@stbi__jpeg - -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) - +; Line 1595 004af 45 3b c1 cmp r8d, r9d 004b2 0f 8f 0b 02 00 00 jg $LN149@stbi__jpeg - -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; - +; Line 1599 004b8 44 8b 9b 20 48 00 00 mov r11d, DWORD PTR [rbx+18464] 004bf b9 20 00 00 00 mov ecx, 32 ; 00000020H @@ -14798,58 +10604,37 @@ $LN123@stbi__jpeg: 004d4 46 8b 94 96 4c 06 00 00 mov r10d, DWORD PTR [rsi+r10*4+1612] 004dc 44 03 d2 add r10d, edx - -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! - +; Line 1600 004df 41 81 fa ff 00 00 00 cmp r10d, 255 ; 000000ffH 004e6 0f 87 d7 01 00 00 ja $LN149@stbi__jpeg - -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; - +; Line 1605 004ec 45 2b c8 sub r9d, r8d - -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; - +; Line 1607 004ef 49 63 c2 movsxd rax, r10d 004f2 41 8b c8 mov ecx, r8d 004f5 41 d3 e3 shl r11d, cl 004f8 44 89 9b 20 48 00 00 mov DWORD PTR [rbx+18464], r11d $LN214@stbi__jpeg: - -; 1837 : s = rs & 15; - +; Line 1837 004ff 44 89 8b 24 48 00 00 mov DWORD PTR [rbx+18468], r9d 00506 0f b6 b4 30 00 04 00 00 movzx esi, BYTE PTR [rax+rsi+1024] 0050e 44 8b fe mov r15d, esi - -; 1838 : r = rs >> 4; - +; Line 1838 00511 c1 ee 04 shr esi, 4 00514 41 83 e7 0f and r15d, 15 - -; 1839 : if (s == 0) { - +; Line 1839 00518 0f 85 94 00 00 00 jne $LN34@stbi__jpeg - -; 1840 : if (r < 15) { - +; Line 1840 0051e 83 fe 0f cmp esi, 15 00521 0f 83 d0 00 00 00 jae $LN116@stbi__jpeg - -; 1841 : j->eob_run = (1 << r) - 1; - +; Line 1841 00527 8b ce mov ecx, esi 00529 41 ba 01 00 00 00 mov r10d, 1 @@ -14857,14 +10642,10 @@ $LN214@stbi__jpeg: 00532 41 ff ca dec r10d 00535 44 89 93 44 48 00 00 mov DWORD PTR [rbx+18500], r10d - -; 1842 : if (r) - +; Line 1842 0053c 85 f6 test esi, esi 0053e 74 6b je SHORT $LN150@stbi__jpeg - -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); - +; Line 1634 00540 44 3b ce cmp r9d, esi 00543 7d 0f jge SHORT $LN97@stbi__jpeg 00545 48 8b cb mov rcx, rbx @@ -14872,44 +10653,26 @@ $LN214@stbi__jpeg: 0054d 44 8b 93 44 48 00 00 mov r10d, DWORD PTR [rbx+18500] $LN97@stbi__jpeg: - -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing - +; Line 1635 00554 44 8b 83 24 48 00 00 mov r8d, DWORD PTR [rbx+18468] 0055b 44 3b c6 cmp r8d, esi 0055e 7d 17 jge SHORT $LN98@stbi__jpeg 00560 41 8b ce mov ecx, r14d - -; 1844 : r = 64; // force end of block - +; Line 1844 00563 be 40 00 00 00 mov esi, 64 ; 00000040H 00568 41 8d 04 0a lea eax, DWORD PTR [r10+rcx] 0056c 89 83 44 48 00 00 mov DWORD PTR [rbx+18500], eax - -; 1845 : } -; 1846 : else { -; 1847 : // r=15 s=0 should write 16 0s, so we just do -; 1848 : // a run of 15 0s and then write s (which is 0), -; 1849 : // so we don't have to do anything special here -; 1850 : } -; 1851 : } - +; Line 1851 00572 e9 80 00 00 00 jmp $LN116@stbi__jpeg $LN98@stbi__jpeg: - -; 1636 : k = stbi_lrot(j->code_buffer, n); - +; Line 1636 00577 8b 93 20 48 00 00 mov edx, DWORD PTR [rbx+18464] 0057d 8b ce mov ecx, esi 0057f d3 c2 rol edx, cl - -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; - +; Line 1639 00581 44 2b c6 sub r8d, esi 00584 41 8b 8c b5 00 00 00 00 mov ecx, DWORD PTR stbi__bmask[r13+rsi*4] @@ -14921,88 +10684,51 @@ $LN98@stbi__jpeg: 00599 23 ca and ecx, edx 0059b 89 83 20 48 00 00 mov DWORD PTR [rbx+18464], eax - -; 1843 : j->eob_run += stbi__jpeg_get_bits(j, r); - +; Line 1843 005a1 41 8d 04 0a lea eax, DWORD PTR [r10+rcx] 005a5 89 83 44 48 00 00 mov DWORD PTR [rbx+18500], eax $LN150@stbi__jpeg: - -; 1844 : r = 64; // force end of block - +; Line 1844 005ab be 40 00 00 00 mov esi, 64 ; 00000040H - -; 1845 : } -; 1846 : else { -; 1847 : // r=15 s=0 should write 16 0s, so we just do -; 1848 : // a run of 15 0s and then write s (which is 0), -; 1849 : // so we don't have to do anything special here -; 1850 : } -; 1851 : } - +; Line 1851 005b0 eb 45 jmp SHORT $LN116@stbi__jpeg $LN34@stbi__jpeg: - -; 1852 : else { -; 1853 : if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); - +; Line 1853 005b2 41 83 ff 01 cmp r15d, 1 005b6 0f 85 07 01 00 00 jne $LN149@stbi__jpeg - -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); - +; Line 1646 005bc 45 3b cf cmp r9d, r15d 005bf 7d 08 jge SHORT $LN103@stbi__jpeg 005c1 48 8b cb mov rcx, rbx 005c4 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN103@stbi__jpeg: - -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing - +; Line 1647 005c9 8b 93 24 48 00 00 mov edx, DWORD PTR [rbx+18468] 005cf 44 0f bf fd movsx r15d, bp 005d3 83 fa 01 cmp edx, 1 005d6 7c 1c jl SHORT $LN40@stbi__jpeg - -; 1648 : k = j->code_buffer; - +; Line 1648 005d8 8b 8b 20 48 00 00 mov ecx, DWORD PTR [rbx+18464] - -; 1649 : j->code_buffer <<= 1; - +; Line 1649 005de 8d 04 09 lea eax, DWORD PTR [rcx+rcx] 005e1 89 83 20 48 00 00 mov DWORD PTR [rbx+18464], eax - -; 1650 : --j->code_bits; - +; Line 1650 005e7 8d 42 ff lea eax, DWORD PTR [rdx-1] 005ea 89 83 24 48 00 00 mov DWORD PTR [rbx+18468], eax - -; 1854 : // sign bit -; 1855 : if (stbi__jpeg_get_bit(j)) - +; Line 1855 005f0 85 c9 test ecx, ecx 005f2 78 03 js SHORT $LN116@stbi__jpeg $LN40@stbi__jpeg: - -; 1856 : s = bit; -; 1857 : else -; 1858 : s = -bit; - +; Line 1858 005f4 41 f7 df neg r15d $LN116@stbi__jpeg: - -; 1859 : } -; 1860 : -; 1861 : // advance by r -; 1862 : while (k <= j->spec_end) { - +; Line 1862 005f7 3b bb 38 48 00 00 cmp edi, DWORD PTR [rbx+18488] 005fd 0f 8f a4 00 00 @@ -15011,128 +10737,78 @@ $LN116@stbi__jpeg: 0f 1f 84 00 00 00 00 00 npad 13 $LL11@stbi__jpeg: - -; 1863 : short* p = &data[stbi__jpeg_dezigzag[k++]]; - +; Line 1863 00610 43 0f b6 84 2c 00 00 00 00 movzx eax, BYTE PTR stbi__jpeg_dezigzag[r12+r13] 00619 ff c7 inc edi 0061b 48 8b 4c 24 68 mov rcx, QWORD PTR data$[rsp] 00620 49 ff c4 inc r12 - -; 1864 : if (*p != 0) { - +; Line 1864 00623 66 83 3c 41 00 cmp WORD PTR [rcx+rax*2], 0 00628 4c 8d 34 41 lea r14, QWORD PTR [rcx+rax*2] 0062c 74 58 je SHORT $LN42@stbi__jpeg - -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); - +; Line 1646 0062e 83 bb 24 48 00 00 01 cmp DWORD PTR [rbx+18468], 1 00635 7d 08 jge SHORT $LN107@stbi__jpeg 00637 48 8b cb mov rcx, rbx 0063a e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN107@stbi__jpeg: - -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing - +; Line 1647 0063f 8b 93 24 48 00 00 mov edx, DWORD PTR [rbx+18468] 00645 83 fa 01 cmp edx, 1 00648 7c 42 jl SHORT $LN43@stbi__jpeg - -; 1648 : k = j->code_buffer; - +; Line 1648 0064a 8b 8b 20 48 00 00 mov ecx, DWORD PTR [rbx+18464] - -; 1649 : j->code_buffer <<= 1; - +; Line 1649 00650 8d 04 09 lea eax, DWORD PTR [rcx+rcx] 00653 89 83 20 48 00 00 mov DWORD PTR [rbx+18464], eax - -; 1650 : --j->code_bits; - +; Line 1650 00659 8d 42 ff lea eax, DWORD PTR [rdx-1] 0065c 89 83 24 48 00 00 mov DWORD PTR [rbx+18468], eax - -; 1865 : if (stbi__jpeg_get_bit(j)) - +; Line 1865 00662 85 c9 test ecx, ecx 00664 79 26 jns SHORT $LN43@stbi__jpeg - -; 1866 : if ((*p & bit) == 0) { - +; Line 1866 00666 41 0f b7 06 movzx eax, WORD PTR [r14] 0066a 66 85 c5 test ax, bp 0066d 75 1d jne SHORT $LN43@stbi__jpeg - -; 1867 : if (*p > 0) - +; Line 1867 0066f 66 85 c0 test ax, ax 00672 7e 09 jle SHORT $LN46@stbi__jpeg - -; 1868 : *p += bit; - +; Line 1868 00674 66 03 c5 add ax, bp 00677 66 41 89 06 mov WORD PTR [r14], ax 0067b eb 0f jmp SHORT $LN43@stbi__jpeg $LN46@stbi__jpeg: - -; 1869 : else -; 1870 : *p -= bit; - +; Line 1870 0067d 66 2b c5 sub ax, bp 00680 66 41 89 06 mov WORD PTR [r14], ax - -; 1871 : } -; 1872 : } - +; Line 1872 00684 eb 06 jmp SHORT $LN43@stbi__jpeg $LN42@stbi__jpeg: - -; 1873 : else { -; 1874 : if (r == 0) { - +; Line 1874 00686 85 f6 test esi, esi 00688 74 10 je SHORT $LN124@stbi__jpeg - -; 1876 : break; -; 1877 : } -; 1878 : --r; - +; Line 1878 0068a ff ce dec esi $LN43@stbi__jpeg: - -; 1859 : } -; 1860 : -; 1861 : // advance by r -; 1862 : while (k <= j->spec_end) { - +; Line 1862 0068c 3b bb 38 48 00 00 cmp edi, DWORD PTR [rbx+18488] 00692 0f 8e 78 ff ff ff jle $LL11@stbi__jpeg - -; 1879 : } -; 1880 : } -; 1881 : } while (k <= j->spec_end); - +; Line 1881 00698 eb 04 jmp SHORT $LN216@stbi__jpeg $LN124@stbi__jpeg: - -; 1875 : *p = (short)s; - +; Line 1875 0069a 66 45 89 3e mov WORD PTR [r14], r15w $LN216@stbi__jpeg: - -; 1879 : } -; 1880 : } -; 1881 : } while (k <= j->spec_end); - +; Line 1881 0069e 45 33 f6 xor r14d, r14d 006a1 3b bb 38 48 00 00 cmp edi, DWORD PTR [rbx+18488] @@ -15141,25 +10817,17 @@ $LN215@stbi__jpeg: 006ac 0f 8e 72 fd ff ff jle $LL10@stbi__jpeg $LN9@stbi__jpeg: - -; 1882 : } -; 1883 : } -; 1884 : return 1; - +; Line 1884 006b2 b8 01 00 00 00 mov eax, 1 006b7 eb 2f jmp SHORT $LN209@stbi__jpeg $LN148@stbi__jpeg: - -; 1591 : j->code_bits -= 16; - +; Line 1591 006b9 41 8d 41 f0 lea eax, DWORD PTR [r9-16] $LN212@stbi__jpeg: 006bd 89 83 24 48 00 00 mov DWORD PTR [rbx+18468], eax $LN149@stbi__jpeg: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 006c3 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 006c9 65 48 8b 04 25 @@ -15169,20 +10837,13 @@ $LN149@stbi__jpeg: 006db 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ 006e2 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 1833 : do { -; 1834 : int r, s; -; 1835 : int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh -; 1836 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); - +; Line 1836 006e6 33 c0 xor eax, eax $LN209@stbi__jpeg: 006e8 4c 8b 6c 24 28 mov r13, QWORD PTR [rsp+40] 006ed 48 8b 6c 24 60 mov rbp, QWORD PTR [rsp+96] 006f2 4c 8b 74 24 20 mov r14, QWORD PTR [rsp+32] - -; 1885 : } - +; Line 1885 006f7 48 83 c4 30 add rsp, 48 ; 00000030H 006fb 41 5f pop r15 006fd 41 5c pop r12 @@ -15193,57 +10854,40 @@ $LN209@stbi__jpeg: stbi__jpeg_decode_block_prog_ac ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__clamp _TEXT SEGMENT x$ = 8 stbi__clamp PROC ; COMDAT - -; 1890 : // trick to use a single test to catch both cases -; 1891 : if ((unsigned int)x > 255) { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1891 00000 ba ff 00 00 00 mov edx, 255 ; 000000ffH 00005 3b ca cmp ecx, edx 00007 76 10 jbe SHORT $LN4@stbi__clam - -; 1892 : if (x < 0) return 0; - +; Line 1892 00009 85 c9 test ecx, ecx 0000b 79 03 jns SHORT $LN3@stbi__clam 0000d 32 c0 xor al, al - -; 1896 : } - +; Line 1896 0000f c3 ret 0 $LN3@stbi__clam: - -; 1893 : if (x > 255) return 255; - +; Line 1893 00010 3b ca cmp ecx, edx 00012 0f b6 c1 movzx eax, cl 00015 0f 4f c2 cmovg eax, edx - -; 1896 : } - +; Line 1896 00018 c3 ret 0 $LN4@stbi__clam: - -; 1894 : } -; 1895 : return (stbi_uc)x; - +; Line 1895 00019 0f b6 c1 movzx eax, cl - -; 1896 : } - +; Line 1896 0001c c3 ret 0 stbi__clamp ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__idct_block _TEXT SEGMENT -$T9 = 0 -$T10 = 0 +$T1 = 0 +$T2 = 0 t3$3$ = 0 tv2514 = 8 tv2499 = 8 @@ -15256,9 +10900,8 @@ out$ = 368 out_stride$ = 376 data$ = 384 stbi__idct_block PROC ; COMDAT - -; 1940 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 1940 00000 48 89 5c 24 18 mov QWORD PTR [rsp+24], rbx 00005 55 push rbp 00006 56 push rsi @@ -15281,17 +10924,7 @@ stbi__idct_block PROC ; COMDAT 0003b 48 c7 44 24 08 04 00 00 00 mov QWORD PTR tv2514[rsp], 4 $LL4@stbi__idct: - -; 1941 : int i, val[64], * v = val; -; 1942 : stbi_uc* o; -; 1943 : short* d = data; -; 1944 : -; 1945 : // columns -; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { -; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing -; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 -; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { - +; Line 1949 00044 0f bf 58 f0 movsx ebx, WORD PTR [rax-16] 00048 66 85 db test bx, bx 0004b 75 49 jne SHORT $LN8@stbi__idct @@ -15307,18 +10940,10 @@ $LL4@stbi__idct: 00068 75 2c jne SHORT $LN8@stbi__idct 0006a 66 39 58 50 cmp WORD PTR [rax+80], bx 0006e 75 26 jne SHORT $LN8@stbi__idct - -; 1950 : // no shortcut 0 seconds -; 1951 : // (1|2|3|4|5|6|7)==0 0 seconds -; 1952 : // all separate -0.047 seconds -; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds -; 1954 : int dcterm = d[0] * 4; - +; Line 1954 00070 0f bf 48 e0 movsx ecx, WORD PTR [rax-32] 00074 c1 e1 02 shl ecx, 2 - -; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; - +; Line 1955 00077 89 8d c0 00 00 00 mov DWORD PTR [rbp+192], ecx 0007d 44 8b e9 mov r13d, ecx @@ -15328,15 +10953,10 @@ $LL4@stbi__idct: 00088 89 4d 20 mov DWORD PTR [rbp+32], ecx 0008b 89 4d 00 mov DWORD PTR [rbp], ecx 0008e 89 4d e0 mov DWORD PTR [rbp-32], ecx - -; 1956 : } - +; Line 1956 00091 e9 3e 01 00 00 jmp $LN2@stbi__idct $LN8@stbi__idct: - -; 1957 : else { -; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) - +; Line 1958 00096 44 0f bf 58 10 movsx r11d, WORD PTR [rax+16] 0009b 44 0f bf 08 movsx r9d, WORD PTR [rax] 0009f 0f bf 50 40 movsx edx, WORD PTR [rax+64] @@ -15362,18 +10982,14 @@ $LN8@stbi__idct: 000e9 45 8d 3c 10 lea r15d, DWORD PTR [r8+rdx] 000ed 44 2b c2 sub r8d, edx 000f0 47 8d 24 2a lea r12d, DWORD PTR [r10+r13] - 000f4 44 89 04 24 mov DWORD PTR $T9[rsp], r8d + 000f4 44 89 04 24 mov DWORD PTR $T1[rsp], r8d 000f8 45 2b ea sub r13d, r10d 000fb 47 8d 04 1e lea r8d, DWORD PTR [r14+r11] 000ff 43 8d 0c 01 lea ecx, DWORD PTR [r9+r8] 00103 44 8b d3 mov r10d, ebx 00106 69 f9 d0 12 00 00 imul edi, ecx, 4816 ; 000012d0H - -; 1959 : // constants scaled things up by 1<<12; let's bring them back -; 1960 : // down, but keep 2 extra bits of precision -; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; - +; Line 1961 0010c 41 81 c7 00 02 00 00 add r15d, 512 ; 00000200H 00113 41 8d 0c 1e lea ecx, DWORD PTR [r14+rbx] @@ -15404,7 +11020,7 @@ $LN8@stbi__idct: 00165 44 03 db add r11d, ebx 00168 44 03 ca add r9d, edx 0016b 44 03 da add r11d, edx - 0016e 8b 14 24 mov edx, DWORD PTR $T9[rsp] + 0016e 8b 14 24 mov edx, DWORD PTR $T1[rsp] 00171 44 03 c1 add r8d, ecx 00174 44 03 d1 add r10d, ecx 00177 44 03 c3 add r8d, ebx @@ -15412,44 +11028,28 @@ $LN8@stbi__idct: 0017d 44 03 d7 add r10d, edi 00180 81 c2 00 02 00 00 add edx, 512 ; 00000200H - -; 1962 : v[0] = (x0 + t3) >> 10; - +; Line 1962 00186 43 8d 0c 07 lea ecx, DWORD PTR [r15+r8] - -; 1963 : v[56] = (x0 - t3) >> 10; - +; Line 1963 0018a 45 2b f8 sub r15d, r8d 0018d c1 f9 0a sar ecx, 10 00190 89 4d e0 mov DWORD PTR [rbp-32], ecx - -; 1964 : v[8] = (x1 + t2) >> 10; - +; Line 1964 00193 43 8d 0c 0c lea ecx, DWORD PTR [r12+r9] 00197 c1 f9 0a sar ecx, 10 - -; 1965 : v[48] = (x1 - t2) >> 10; - +; Line 1965 0019a 45 2b e1 sub r12d, r9d 0019d 89 4d 00 mov DWORD PTR [rbp], ecx - -; 1966 : v[16] = (x2 + t1) >> 10; - +; Line 1966 001a0 43 8d 0c 2a lea ecx, DWORD PTR [r10+r13] 001a4 c1 f9 0a sar ecx, 10 - -; 1967 : v[40] = (x2 - t1) >> 10; - +; Line 1967 001a7 45 2b ea sub r13d, r10d 001aa 89 4d 20 mov DWORD PTR [rbp+32], ecx - -; 1968 : v[24] = (x3 + t0) >> 10; - +; Line 1968 001ad 42 8d 0c 1a lea ecx, DWORD PTR [rdx+r11] 001b1 41 c1 ff 0a sar r15d, 10 - -; 1969 : v[32] = (x3 - t0) >> 10; - +; Line 1969 001b5 41 2b d3 sub edx, r11d 001b8 41 c1 fc 0a sar r12d, 10 001bc c1 f9 0a sar ecx, 10 @@ -15460,17 +11060,7 @@ $LN8@stbi__idct: 001cd 44 89 a5 a0 00 00 00 mov DWORD PTR [rbp+160], r12d $LN2@stbi__idct: - -; 1941 : int i, val[64], * v = val; -; 1942 : stbi_uc* o; -; 1943 : short* d = data; -; 1944 : -; 1945 : // columns -; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { -; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing -; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 -; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { - +; Line 1949 001d4 89 55 60 mov DWORD PTR [rbp+96], edx 001d7 44 89 ad 80 00 00 00 mov DWORD PTR [rbp+128], r13d @@ -15490,18 +11080,10 @@ $LN2@stbi__idct: 00206 75 2c jne SHORT $LN56@stbi__idct 00208 66 39 58 52 cmp WORD PTR [rax+82], bx 0020c 75 26 jne SHORT $LN56@stbi__idct - -; 1950 : // no shortcut 0 seconds -; 1951 : // (1|2|3|4|5|6|7)==0 0 seconds -; 1952 : // all separate -0.047 seconds -; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds -; 1954 : int dcterm = d[0] * 4; - +; Line 1954 0020e 0f bf 48 e2 movsx ecx, WORD PTR [rax-30] 00212 c1 e1 02 shl ecx, 2 - -; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; - +; Line 1955 00215 89 8d c4 00 00 00 mov DWORD PTR [rbp+196], ecx 0021b 44 8b e9 mov r13d, ecx @@ -15511,15 +11093,10 @@ $LN2@stbi__idct: 00226 89 4d 24 mov DWORD PTR [rbp+36], ecx 00229 89 4d 04 mov DWORD PTR [rbp+4], ecx 0022c 89 4d e4 mov DWORD PTR [rbp-28], ecx - -; 1956 : } - +; Line 1956 0022f e9 3f 01 00 00 jmp $LN57@stbi__idct $LN56@stbi__idct: - -; 1957 : else { -; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) - +; Line 1958 00234 44 0f bf 58 12 movsx r11d, WORD PTR [rax+18] 00239 44 0f bf 48 02 movsx r9d, WORD PTR [rax+2] 0023e 0f bf 50 42 movsx edx, WORD PTR [rax+66] @@ -15545,18 +11122,14 @@ $LN56@stbi__idct: 00288 45 8d 3c 10 lea r15d, DWORD PTR [r8+rdx] 0028c 44 2b c2 sub r8d, edx 0028f 47 8d 24 2a lea r12d, DWORD PTR [r10+r13] - 00293 44 89 04 24 mov DWORD PTR $T10[rsp], r8d + 00293 44 89 04 24 mov DWORD PTR $T2[rsp], r8d 00297 45 2b ea sub r13d, r10d 0029a 47 8d 04 1e lea r8d, DWORD PTR [r14+r11] 0029e 43 8d 0c 01 lea ecx, DWORD PTR [r9+r8] 002a2 44 8b d3 mov r10d, ebx 002a5 69 f9 d0 12 00 00 imul edi, ecx, 4816 ; 000012d0H - -; 1959 : // constants scaled things up by 1<<12; let's bring them back -; 1960 : // down, but keep 2 extra bits of precision -; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; - +; Line 1961 002ab 41 81 c7 00 02 00 00 add r15d, 512 ; 00000200H 002b2 41 8d 0c 1e lea ecx, DWORD PTR [r14+rbx] @@ -15587,7 +11160,7 @@ $LN56@stbi__idct: 00304 44 03 db add r11d, ebx 00307 44 03 ca add r9d, edx 0030a 44 03 da add r11d, edx - 0030d 8b 14 24 mov edx, DWORD PTR $T10[rsp] + 0030d 8b 14 24 mov edx, DWORD PTR $T2[rsp] 00310 44 03 c1 add r8d, ecx 00313 44 03 d1 add r10d, ecx 00316 44 03 c3 add r8d, ebx @@ -15595,44 +11168,28 @@ $LN56@stbi__idct: 0031c 44 03 d7 add r10d, edi 0031f 81 c2 00 02 00 00 add edx, 512 ; 00000200H - -; 1962 : v[0] = (x0 + t3) >> 10; - +; Line 1962 00325 43 8d 0c 07 lea ecx, DWORD PTR [r15+r8] - -; 1963 : v[56] = (x0 - t3) >> 10; - +; Line 1963 00329 45 2b f8 sub r15d, r8d 0032c c1 f9 0a sar ecx, 10 0032f 89 4d e4 mov DWORD PTR [rbp-28], ecx - -; 1964 : v[8] = (x1 + t2) >> 10; - +; Line 1964 00332 43 8d 0c 0c lea ecx, DWORD PTR [r12+r9] 00336 c1 f9 0a sar ecx, 10 - -; 1965 : v[48] = (x1 - t2) >> 10; - +; Line 1965 00339 45 2b e1 sub r12d, r9d 0033c 89 4d 04 mov DWORD PTR [rbp+4], ecx - -; 1966 : v[16] = (x2 + t1) >> 10; - +; Line 1966 0033f 43 8d 0c 2a lea ecx, DWORD PTR [r10+r13] 00343 c1 f9 0a sar ecx, 10 - -; 1967 : v[40] = (x2 - t1) >> 10; - +; Line 1967 00346 45 2b ea sub r13d, r10d 00349 89 4d 24 mov DWORD PTR [rbp+36], ecx - -; 1968 : v[24] = (x3 + t0) >> 10; - +; Line 1968 0034c 42 8d 0c 1a lea ecx, DWORD PTR [rdx+r11] 00350 41 c1 ff 0a sar r15d, 10 - -; 1969 : v[32] = (x3 - t0) >> 10; - +; Line 1969 00354 41 2b d3 sub edx, r11d 00357 41 c1 fc 0a sar r12d, 10 0035b c1 f9 0a sar ecx, 10 @@ -15653,12 +11210,7 @@ $LN57@stbi__idct: 01 sub QWORD PTR tv2514[rsp], 1 0038e 0f 85 b0 fc ff ff jne $LL4@stbi__idct - -; 1970 : } -; 1971 : } -; 1972 : -; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { - +; Line 1973 00394 4c 8b 6c 24 10 mov r13, QWORD PTR out$GSCopy$1$[rsp] 00399 4c 8d 5c 24 38 lea r11, QWORD PTR val$[rsp+24] 0039e 4c 89 5c 24 08 mov QWORD PTR tv2499[rsp], r11 @@ -15667,10 +11219,7 @@ $LN57@stbi__idct: 08 00 00 00 mov QWORD PTR tv2511[rsp], 8 003af 90 npad 1 $LL7@stbi__idct: - -; 1974 : // no fast case since the first 1D IDCT spread components out -; 1975 : STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]) - +; Line 1975 003b0 45 8b 43 f0 mov r8d, DWORD PTR [r11-16] 003b4 41 8b 0b mov ecx, DWORD PTR [r11] 003b7 41 8b 73 04 mov esi, DWORD PTR [r11+4] @@ -15698,30 +11247,16 @@ $LL7@stbi__idct: 00404 45 8b 4b ec mov r9d, DWORD PTR [r11-20] 00408 41 8d 2c 0f lea ebp, DWORD PTR [r15+rcx] 0040c 44 2b f9 sub r15d, ecx - -; 1976 : // constants scaled things up by 1<<12, plus we had 1<<2 from first -; 1977 : // loop, plus horizontal and vertical each scale by sqrt(8) so together -; 1978 : // we've got an extra 1<<3, so 1<<17 total we need to remove. -; 1979 : // so we want to round that, which means adding 0.5 * 1<<17, -; 1980 : // aka 65536. Also, we'll end up with -128 to 127 that we want -; 1981 : // to encode as 0..255 by adding 128, so we'll add that before the shift -; 1982 : x0 += 65536 + (128 << 17); - +; Line 1982 0040f 81 c5 00 00 01 01 add ebp, 16842752 ; 01010000H - -; 1983 : x1 += 65536 + (128 << 17); - +; Line 1983 00415 41 81 c4 00 00 01 01 add r12d, 16842752 ; 01010000H - -; 1984 : x2 += 65536 + (128 << 17); - +; Line 1984 0041c 41 81 c6 00 00 01 01 add r14d, 16842752 ; 01010000H - -; 1985 : x3 += 65536 + (128 << 17); - +; Line 1985 00423 41 81 c7 00 00 01 01 add r15d, 16842752 ; 01010000H 0042a 46 8d 04 0f lea r8d, DWORD PTR [rdi+r9] @@ -15757,237 +11292,164 @@ $LL7@stbi__idct: 0048a 41 69 d2 2a 31 00 00 imul edx, r10d, 12586 ; 0000312aH 00491 03 d1 add edx, ecx - -; 1986 : // tried computing the shifts into temps, or'ing the temps to see -; 1987 : // if any were out of range, but that was slower -; 1988 : o[0] = stbi__clamp((x0 + t3) >> 17); - +; Line 1988 00493 8b 0c 24 mov ecx, DWORD PTR t3$3$[rsp] 00496 03 d3 add edx, ebx 00498 8d 04 29 lea eax, DWORD PTR [rcx+rbp] 0049b c1 f8 11 sar eax, 17 - -; 1891 : if ((unsigned int)x > 255) { - +; Line 1891 0049e 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 004a3 76 11 jbe SHORT $LN14@stbi__idct - -; 1892 : if (x < 0) return 0; - +; Line 1892 004a5 85 c0 test eax, eax 004a7 79 04 jns SHORT $LN13@stbi__idct 004a9 32 c0 xor al, al 004ab eb 09 jmp SHORT $LN14@stbi__idct $LN13@stbi__idct: - -; 1893 : if (x > 255) return 255; - +; Line 1893 004ad 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 004b2 7e 02 jle SHORT $LN14@stbi__idct 004b4 b0 ff mov al, 255 ; 000000ffH $LN14@stbi__idct: - -; 1989 : o[7] = stbi__clamp((x0 - t3) >> 17); - +; Line 1989 004b6 2b e9 sub ebp, ecx 004b8 41 88 45 ff mov BYTE PTR [r13-1], al 004bc c1 fd 11 sar ebp, 17 - -; 1891 : if ((unsigned int)x > 255) { - +; Line 1891 004bf 81 fd ff 00 00 00 cmp ebp, 255 ; 000000ffH 004c5 76 14 jbe SHORT $LN19@stbi__idct - -; 1892 : if (x < 0) return 0; - +; Line 1892 004c7 85 ed test ebp, ebp 004c9 79 05 jns SHORT $LN18@stbi__idct 004cb 40 32 ed xor bpl, bpl 004ce eb 0b jmp SHORT $LN19@stbi__idct $LN18@stbi__idct: - -; 1893 : if (x > 255) return 255; - +; Line 1893 004d0 81 fd ff 00 00 00 cmp ebp, 255 ; 000000ffH 004d6 7e 03 jle SHORT $LN19@stbi__idct 004d8 40 b5 ff mov bpl, 255 ; 000000ffH $LN19@stbi__idct: - -; 1990 : o[1] = stbi__clamp((x1 + t2) >> 17); - +; Line 1990 004db 41 8d 04 14 lea eax, DWORD PTR [r12+rdx] 004df 41 88 6d 06 mov BYTE PTR [r13+6], bpl 004e3 c1 f8 11 sar eax, 17 - -; 1891 : if ((unsigned int)x > 255) { - +; Line 1891 004e6 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 004eb 76 11 jbe SHORT $LN24@stbi__idct - -; 1892 : if (x < 0) return 0; - +; Line 1892 004ed 85 c0 test eax, eax 004ef 79 04 jns SHORT $LN23@stbi__idct 004f1 32 c0 xor al, al 004f3 eb 09 jmp SHORT $LN24@stbi__idct $LN23@stbi__idct: - -; 1893 : if (x > 255) return 255; - +; Line 1893 004f5 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 004fa 7e 02 jle SHORT $LN24@stbi__idct 004fc b0 ff mov al, 255 ; 000000ffH $LN24@stbi__idct: - -; 1991 : o[6] = stbi__clamp((x1 - t2) >> 17); - +; Line 1991 004fe 44 2b e2 sub r12d, edx 00501 41 88 45 00 mov BYTE PTR [r13], al 00505 41 c1 fc 11 sar r12d, 17 - -; 1891 : if ((unsigned int)x > 255) { - +; Line 1891 00509 41 81 fc ff 00 00 00 cmp r12d, 255 ; 000000ffH 00510 76 16 jbe SHORT $LN29@stbi__idct - -; 1892 : if (x < 0) return 0; - +; Line 1892 00512 45 85 e4 test r12d, r12d 00515 79 05 jns SHORT $LN28@stbi__idct 00517 45 32 e4 xor r12b, r12b 0051a eb 0c jmp SHORT $LN29@stbi__idct $LN28@stbi__idct: - -; 1893 : if (x > 255) return 255; - +; Line 1893 0051c 41 81 fc ff 00 00 00 cmp r12d, 255 ; 000000ffH 00523 7e 03 jle SHORT $LN29@stbi__idct 00525 41 b4 ff mov r12b, 255 ; 000000ffH $LN29@stbi__idct: - -; 1992 : o[2] = stbi__clamp((x2 + t1) >> 17); - +; Line 1992 00528 43 8d 04 06 lea eax, DWORD PTR [r14+r8] 0052c 45 88 65 05 mov BYTE PTR [r13+5], r12b 00530 c1 f8 11 sar eax, 17 - -; 1891 : if ((unsigned int)x > 255) { - +; Line 1891 00533 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 00538 76 11 jbe SHORT $LN34@stbi__idct - -; 1892 : if (x < 0) return 0; - +; Line 1892 0053a 85 c0 test eax, eax 0053c 79 04 jns SHORT $LN33@stbi__idct 0053e 32 c0 xor al, al 00540 eb 09 jmp SHORT $LN34@stbi__idct $LN33@stbi__idct: - -; 1893 : if (x > 255) return 255; - +; Line 1893 00542 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 00547 7e 02 jle SHORT $LN34@stbi__idct 00549 b0 ff mov al, 255 ; 000000ffH $LN34@stbi__idct: - -; 1993 : o[5] = stbi__clamp((x2 - t1) >> 17); - +; Line 1993 0054b 45 2b f0 sub r14d, r8d 0054e 41 88 45 01 mov BYTE PTR [r13+1], al 00552 41 c1 fe 11 sar r14d, 17 - -; 1891 : if ((unsigned int)x > 255) { - +; Line 1891 00556 41 81 fe ff 00 00 00 cmp r14d, 255 ; 000000ffH 0055d 76 16 jbe SHORT $LN39@stbi__idct - -; 1892 : if (x < 0) return 0; - +; Line 1892 0055f 45 85 f6 test r14d, r14d 00562 79 05 jns SHORT $LN38@stbi__idct 00564 45 32 f6 xor r14b, r14b 00567 eb 0c jmp SHORT $LN39@stbi__idct $LN38@stbi__idct: - -; 1893 : if (x > 255) return 255; - +; Line 1893 00569 41 81 fe ff 00 00 00 cmp r14d, 255 ; 000000ffH 00570 7e 03 jle SHORT $LN39@stbi__idct 00572 41 b6 ff mov r14b, 255 ; 000000ffH $LN39@stbi__idct: - -; 1994 : o[3] = stbi__clamp((x3 + t0) >> 17); - +; Line 1994 00575 43 8d 04 0f lea eax, DWORD PTR [r15+r9] 00579 45 88 75 04 mov BYTE PTR [r13+4], r14b 0057d c1 f8 11 sar eax, 17 - -; 1891 : if ((unsigned int)x > 255) { - +; Line 1891 00580 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 00585 76 11 jbe SHORT $LN44@stbi__idct - -; 1892 : if (x < 0) return 0; - +; Line 1892 00587 85 c0 test eax, eax 00589 79 04 jns SHORT $LN43@stbi__idct 0058b 32 c0 xor al, al 0058d eb 09 jmp SHORT $LN44@stbi__idct $LN43@stbi__idct: - -; 1893 : if (x > 255) return 255; - +; Line 1893 0058f 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 00594 7e 02 jle SHORT $LN44@stbi__idct 00596 b0 ff mov al, 255 ; 000000ffH $LN44@stbi__idct: - -; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); - +; Line 1995 00598 45 2b f9 sub r15d, r9d 0059b 41 88 45 02 mov BYTE PTR [r13+2], al 0059f 41 c1 ff 11 sar r15d, 17 - -; 1891 : if ((unsigned int)x > 255) { - +; Line 1891 005a3 41 81 ff ff 00 00 00 cmp r15d, 255 ; 000000ffH 005aa 76 16 jbe SHORT $LN49@stbi__idct - -; 1892 : if (x < 0) return 0; - +; Line 1892 005ac 45 85 ff test r15d, r15d 005af 79 05 jns SHORT $LN48@stbi__idct 005b1 45 32 ff xor r15b, r15b 005b4 eb 0c jmp SHORT $LN49@stbi__idct $LN48@stbi__idct: - -; 1893 : if (x > 255) return 255; - +; Line 1893 005b6 41 81 ff ff 00 00 00 cmp r15d, 255 ; 000000ffH 005bd 7e 03 jle SHORT $LN49@stbi__idct 005bf 41 b7 ff mov r15b, 255 ; 000000ffH $LN49@stbi__idct: - -; 1970 : } -; 1971 : } -; 1972 : -; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { - +; Line 1973 005c2 4c 8b 5c 24 08 mov r11, QWORD PTR tv2499[rsp] 005c7 48 63 4c 24 18 movsxd rcx, DWORD PTR out_stride$GSCopy$1$[rsp] 005cc 49 83 c3 20 add r11, 32 ; 00000020H - -; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); - +; Line 1995 005d0 45 88 7d 03 mov BYTE PTR [r13+3], r15b 005d4 4c 03 e9 add r13, rcx 005d7 48 83 6c 24 10 @@ -15995,10 +11457,7 @@ $LN49@stbi__idct: 005dd 4c 89 5c 24 08 mov QWORD PTR tv2499[rsp], r11 005e2 0f 85 c8 fd ff ff jne $LL7@stbi__idct - -; 1996 : } -; 1997 : } - +; Line 1997 005e8 48 8b 8c 24 20 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rsp] 005f0 48 33 cc xor rcx, rsp @@ -16018,7 +11477,6 @@ $LN49@stbi__idct: stbi__idct_block ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__idct_simd _TEXT SEGMENT y5o_h$1$ = 0 @@ -16040,122 +11498,16 @@ out$ = 304 out_stride$ = 312 data$ = 320 stbi__idct_simd PROC ; COMDAT - -; 2004 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2004 00000 4c 8b dc mov r11, rsp 00003 48 81 ec 28 01 00 00 sub rsp, 296 ; 00000128H - -; 2005 : // This is constructed to match our regular (generic) integer IDCT exactly. -; 2006 : __m128i row0, row1, row2, row3, row4, row5, row6, row7; -; 2007 : __m128i tmp; -; 2008 : -; 2009 : // dot product constant: even elems=x, odd elems=y -; 2010 : #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) -; 2011 : -; 2012 : // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) -; 2013 : // out(1) = c1[even]*x + c1[odd]*y -; 2014 : #define dct_rot(out0,out1, x,y,c0,c1) \ -; 2015 : __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ -; 2016 : __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ -; 2017 : __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ -; 2018 : __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ -; 2019 : __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ -; 2020 : __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) -; 2021 : -; 2022 : // out = in << 12 (in 16-bit, out 32-bit) -; 2023 : #define dct_widen(out, in) \ -; 2024 : __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ -; 2025 : __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) -; 2026 : -; 2027 : // wide add -; 2028 : #define dct_wadd(out, a, b) \ -; 2029 : __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ -; 2030 : __m128i out##_h = _mm_add_epi32(a##_h, b##_h) -; 2031 : -; 2032 : // wide sub -; 2033 : #define dct_wsub(out, a, b) \ -; 2034 : __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ -; 2035 : __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) -; 2036 : -; 2037 : // butterfly a/b, add bias, then shift by "s" and pack -; 2038 : #define dct_bfly32o(out0, out1, a,b,bias,s) \ -; 2039 : { \ -; 2040 : __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ -; 2041 : __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ -; 2042 : dct_wadd(sum, abiased, b); \ -; 2043 : dct_wsub(dif, abiased, b); \ -; 2044 : out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ -; 2045 : out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ -; 2046 : } -; 2047 : -; 2048 : // 8-bit interleave step (for transposes) -; 2049 : #define dct_interleave8(a, b) \ -; 2050 : tmp = a; \ -; 2051 : a = _mm_unpacklo_epi8(a, b); \ -; 2052 : b = _mm_unpackhi_epi8(tmp, b) -; 2053 : -; 2054 : // 16-bit interleave step (for transposes) -; 2055 : #define dct_interleave16(a, b) \ -; 2056 : tmp = a; \ -; 2057 : a = _mm_unpacklo_epi16(a, b); \ -; 2058 : b = _mm_unpackhi_epi16(tmp, b) -; 2059 : -; 2060 : #define dct_pass(bias,shift) \ -; 2061 : { \ -; 2062 : /* even part */ \ -; 2063 : dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ -; 2064 : __m128i sum04 = _mm_add_epi16(row0, row4); \ -; 2065 : __m128i dif04 = _mm_sub_epi16(row0, row4); \ -; 2066 : dct_widen(t0e, sum04); \ -; 2067 : dct_widen(t1e, dif04); \ -; 2068 : dct_wadd(x0, t0e, t3e); \ -; 2069 : dct_wsub(x3, t0e, t3e); \ -; 2070 : dct_wadd(x1, t1e, t2e); \ -; 2071 : dct_wsub(x2, t1e, t2e); \ -; 2072 : /* odd part */ \ -; 2073 : dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ -; 2074 : dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ -; 2075 : __m128i sum17 = _mm_add_epi16(row1, row7); \ -; 2076 : __m128i sum35 = _mm_add_epi16(row3, row5); \ -; 2077 : dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ -; 2078 : dct_wadd(x4, y0o, y4o); \ -; 2079 : dct_wadd(x5, y1o, y5o); \ -; 2080 : dct_wadd(x6, y2o, y5o); \ -; 2081 : dct_wadd(x7, y3o, y4o); \ -; 2082 : dct_bfly32o(row0,row7, x0,x7,bias,shift); \ -; 2083 : dct_bfly32o(row1,row6, x1,x6,bias,shift); \ -; 2084 : dct_bfly32o(row2,row5, x2,x5,bias,shift); \ -; 2085 : dct_bfly32o(row3,row4, x3,x4,bias,shift); \ -; 2086 : } -; 2087 : -; 2088 : __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); -; 2089 : __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f)); -; 2090 : __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); -; 2091 : __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); -; 2092 : __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f)); -; 2093 : __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f)); -; 2094 : __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f)); -; 2095 : __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f)); -; 2096 : -; 2097 : // rounding biases in column/row passes, see stbi__idct_block for explanation. -; 2098 : __m128i bias_0 = _mm_set1_epi32(512); -; 2099 : __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17)); -; 2100 : -; 2101 : // load -; 2102 : row0 = _mm_load_si128((const __m128i*) (data + 0 * 8)); -; 2103 : row1 = _mm_load_si128((const __m128i*) (data + 1 * 8)); - +; Line 2103 0000a f3 41 0f 6f 58 10 movdqu xmm3, XMMWORD PTR [r8+16] 00010 0f 57 c9 xorps xmm1, xmm1 - -; 2104 : row2 = _mm_load_si128((const __m128i*) (data + 2 * 8)); -; 2105 : row3 = _mm_load_si128((const __m128i*) (data + 3 * 8)); -; 2106 : row4 = _mm_load_si128((const __m128i*) (data + 4 * 8)); -; 2107 : row5 = _mm_load_si128((const __m128i*) (data + 5 * 8)); - +; Line 2107 00013 f3 41 0f 6f 68 50 movdqu xmm5, XMMWORD PTR [r8+80] 00019 f3 41 0f 6f 60 @@ -16166,13 +11518,7 @@ stbi__idct_simd PROC ; COMDAT 0002e f3 41 0f 6f 78 20 movdqu xmm7, XMMWORD PTR [r8+32] 00034 45 0f 29 43 c8 movaps XMMWORD PTR [r11-56], xmm8 - -; 2108 : row6 = _mm_load_si128((const __m128i*) (data + 6 * 8)); -; 2109 : row7 = _mm_load_si128((const __m128i*) (data + 7 * 8)); -; 2110 : -; 2111 : // column pass -; 2112 : dct_pass(bias_0, 10); - +; Line 2112 00039 66 0f 6f f7 movdqa xmm6, xmm7 0003d 66 41 0f 69 78 60 punpckhwd xmm7, XMMWORD PTR [r8+96] @@ -16367,12 +11713,7 @@ stbi__idct_simd PROC ; COMDAT 00341 66 41 0f fa f1 psubd xmm6, xmm9 00346 66 41 0f fa cc psubd xmm1, xmm12 0034b 66 0f 6b d8 packssdw xmm3, xmm0 - -; 2113 : -; 2114 : { -; 2115 : // 16bit 8x8 transpose pass 1 -; 2116 : dct_interleave16(row0, row4); - +; Line 2116 0034f 66 0f 6f 04 24 movdqa xmm0, XMMWORD PTR y5o_h$1$[rsp] 00354 66 0f 72 e1 0a psrad xmm1, 10 00359 66 0f 6f f8 movdqa xmm7, xmm0 @@ -16383,11 +11724,7 @@ stbi__idct_simd PROC ; COMDAT 0036c 66 0f 61 fa punpcklwd xmm7, xmm2 00370 66 41 0f 6b f7 packssdw xmm6, xmm15 00375 66 0f 69 c2 punpckhwd xmm0, xmm2 - -; 2117 : dct_interleave16(row1, row5); -; 2118 : dct_interleave16(row2, row6); -; 2119 : dct_interleave16(row3, row7); - +; Line 2119 00379 66 0f 6f cb movdqa xmm1, xmm3 0037d 66 0f 7f 04 24 movdqa XMMWORD PTR y5o_h$1$[rsp], xmm0 00382 66 41 0f 6f d6 movdqa xmm2, xmm14 @@ -16396,13 +11733,7 @@ stbi__idct_simd PROC ; COMDAT 00390 66 0f 61 c5 punpcklwd xmm0, xmm5 00394 66 0f 61 d6 punpcklwd xmm2, xmm6 00398 66 41 0f 69 d8 punpckhwd xmm3, xmm8 - -; 2120 : -; 2121 : // transpose pass 2 -; 2122 : dct_interleave16(row0, row2); -; 2123 : dct_interleave16(row1, row3); -; 2124 : dct_interleave16(row4, row6); - +; Line 2124 0039d 66 44 0f 6f 04 24 movdqa xmm8, XMMWORD PTR y5o_h$1$[rsp] 003a3 66 44 0f 69 f6 punpckhwd xmm14, xmm6 @@ -16411,13 +11742,7 @@ stbi__idct_simd PROC ; COMDAT 003b0 66 0f 69 f8 punpckhwd xmm7, xmm0 003b4 66 0f 6f c2 movdqa xmm0, xmm2 003b8 66 0f 61 c1 punpcklwd xmm0, xmm1 - -; 2125 : dct_interleave16(row5, row7); -; 2126 : -; 2127 : // transpose pass 3 -; 2128 : dct_interleave16(row0, row1); -; 2129 : dct_interleave16(row2, row3); - +; Line 2129 003bc 66 44 0f 6f ff movdqa xmm15, xmm7 003c1 66 0f 69 d1 punpckhwd xmm2, xmm1 003c5 66 41 0f 6f ce movdqa xmm1, xmm14 @@ -16428,14 +11753,7 @@ stbi__idct_simd PROC ; COMDAT 003db 66 0f 69 f0 punpckhwd xmm6, xmm0 003df 66 44 0f 61 fa punpcklwd xmm15, xmm2 003e4 66 0f 69 fa punpckhwd xmm7, xmm2 - -; 2130 : dct_interleave16(row4, row5); -; 2131 : dct_interleave16(row6, row7); -; 2132 : } -; 2133 : -; 2134 : // row pass -; 2135 : dct_pass(bias_1, 17); - +; Line 2135 003e8 66 45 0f 6f ef movdqa xmm13, xmm15 003ed 66 0f 69 e5 punpckhwd xmm4, xmm5 003f1 66 41 0f 6f e8 movdqa xmm5, xmm8 @@ -16601,12 +11919,7 @@ stbi__idct_simd PROC ; COMDAT 00686 66 0f 6f 44 24 10 movdqa xmm0, XMMWORD PTR abiased_h$1$[rsp] 0068c 66 0f fe c7 paddd xmm0, xmm7 - -; 2136 : -; 2137 : { -; 2138 : // pack -; 2139 : __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 - +; Line 2139 00690 66 44 0f 67 c9 packuswb xmm9, xmm1 00695 66 0f 6f 4c 24 20 movdqa xmm1, XMMWORD PTR p2$1$[rsp] @@ -16618,45 +11931,7 @@ stbi__idct_simd PROC ; COMDAT 006b1 66 0f 72 e1 11 psrad xmm1, 17 006b6 66 0f 72 e0 11 psrad xmm0, 17 006bb 66 0f 6b c8 packssdw xmm1, xmm0 - -; 2140 : __m128i p1 = _mm_packus_epi16(row2, row3); -; 2141 : __m128i p2 = _mm_packus_epi16(row4, row5); -; 2142 : __m128i p3 = _mm_packus_epi16(row6, row7); -; 2143 : -; 2144 : // 8bit 8x8 transpose pass 1 -; 2145 : dct_interleave8(p0, p2); // a0e0a1e1... -; 2146 : dct_interleave8(p1, p3); // c0g0c1g1... -; 2147 : -; 2148 : // transpose pass 2 -; 2149 : dct_interleave8(p0, p1); // a0c0e0g0... -; 2150 : dct_interleave8(p2, p3); // b0d0f0h0... -; 2151 : -; 2152 : // transpose pass 3 -; 2153 : dct_interleave8(p0, p2); // a0b0c0d0... -; 2154 : dct_interleave8(p1, p3); // a4b4c4d4... -; 2155 : -; 2156 : // store -; 2157 : _mm_storel_epi64((__m128i*) out, p0); out += out_stride; -; 2158 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; -; 2159 : _mm_storel_epi64((__m128i*) out, p2); out += out_stride; -; 2160 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; -; 2161 : _mm_storel_epi64((__m128i*) out, p1); out += out_stride; -; 2162 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; -; 2163 : _mm_storel_epi64((__m128i*) out, p3); out += out_stride; -; 2164 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e)); -; 2165 : } -; 2166 : -; 2167 : #undef dct_const -; 2168 : #undef dct_rot -; 2169 : #undef dct_widen -; 2170 : #undef dct_wadd -; 2171 : #undef dct_wsub -; 2172 : #undef dct_bfly32o -; 2173 : #undef dct_interleave8 -; 2174 : #undef dct_interleave16 -; 2175 : #undef dct_pass -; 2176 : } - +; Line 2176 006bf 66 0f fa 64 24 40 psubd xmm4, XMMWORD PTR x7_h$1$[rsp] 006c5 4d 8d 1b lea r11, QWORD PTR [r11] @@ -16749,20 +12024,15 @@ stbi__idct_simd PROC ; COMDAT stbi__idct_simd ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__get_marker _TEXT SEGMENT j$ = 48 stbi__get_marker PROC ; COMDAT - -; 2393 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2393 00000 40 57 push rdi 00002 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 2394 : stbi_uc x; -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } - +; Line 2395 00006 0f b6 81 28 48 00 00 movzx eax, BYTE PTR [rcx+18472] 0000d 48 8b f9 mov rdi, rcx @@ -16770,46 +12040,31 @@ stbi__get_marker PROC ; COMDAT 00012 74 0d je SHORT $LN4@stbi__get_ 00014 c6 81 28 48 00 00 ff mov BYTE PTR [rcx+18472], 255 ; 000000ffH - -; 2401 : } - +; Line 2401 0001b 48 83 c4 20 add rsp, 32 ; 00000020H 0001f 5f pop rdi 00020 c3 ret 0 $LN4@stbi__get_: 00021 48 89 5c 24 30 mov QWORD PTR [rsp+48], rbx - -; 2396 : x = stbi__get8(j->s); - +; Line 2396 00026 48 8b 19 mov rbx, QWORD PTR [rcx] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00029 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00030 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00037 72 15 jb SHORT $LN29@stbi__get_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00039 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0003d 74 79 je SHORT $LN18@stbi__get_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0003f 48 8b cb mov rcx, rbx 00042 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00047 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN29@stbi__get_: - -; 2397 : if (x != 0xff) return STBI__MARKER_none; - +; Line 2397 0004e 0f b6 08 movzx ecx, BYTE PTR [rax] 00051 48 ff c0 inc rax 00054 48 89 83 c0 00 @@ -16817,108 +12072,72 @@ $LN29@stbi__get_: 0005b 80 f9 ff cmp cl, 255 ; 000000ffH 0005e 75 58 jne SHORT $LN18@stbi__get_ $LL2@stbi__get_: - -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes - +; Line 2399 00060 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00063 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0006a 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00071 72 15 jb SHORT $LN30@stbi__get_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00073 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00077 74 2f je SHORT $LN13@stbi__get_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00079 48 8b cb mov rcx, rbx 0007c e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00081 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN30@stbi__get_: - -; 2398 : while (x == 0xff) - +; Line 2398 00088 0f b6 08 movzx ecx, BYTE PTR [rax] 0008b 48 ff c0 inc rax 0008e 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00095 80 f9 ff cmp cl, 255 ; 000000ffH 00098 74 c6 je SHORT $LL2@stbi__get_ - -; 2400 : return x; - +; Line 2400 0009a 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 0009f 0f b6 c1 movzx eax, cl - -; 2401 : } - +; Line 2401 000a2 48 83 c4 20 add rsp, 32 ; 00000020H 000a6 5f pop rdi 000a7 c3 ret 0 $LN13@stbi__get_: 000a8 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] - -; 1083 : return 0; - +; Line 1083 000ad 32 c9 xor cl, cl - -; 2400 : return x; - +; Line 2400 000af 0f b6 c1 movzx eax, cl - -; 2401 : } - +; Line 2401 000b2 48 83 c4 20 add rsp, 32 ; 00000020H 000b6 5f pop rdi 000b7 c3 ret 0 $LN18@stbi__get_: 000b8 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] - -; 2397 : if (x != 0xff) return STBI__MARKER_none; - +; Line 2397 000bd b0 ff mov al, 255 ; 000000ffH - -; 2401 : } - +; Line 2401 000bf 48 83 c4 20 add rsp, 32 ; 00000020H 000c3 5f pop rdi 000c4 c3 ret 0 stbi__get_marker ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__jpeg_reset _TEXT SEGMENT j$ = 8 stbi__jpeg_reset PROC ; COMDAT - -; 2411 : j->code_bits = 0; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2411 00000 45 33 c0 xor r8d, r8d - -; 2412 : j->code_buffer = 0; -; 2413 : j->nomore = 0; -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; -; 2415 : j->marker = STBI__MARKER_none; - +; Line 2415 00003 c6 81 28 48 00 00 ff mov BYTE PTR [rcx+18472], 255 ; 000000ffH 0000a 44 89 81 d8 47 00 00 mov DWORD PTR [rcx+18392], r8d - -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; - +; Line 2416 00011 ba ff ff ff 7f mov edx, 2147483647 ; 7fffffffH 00016 44 89 81 78 47 00 00 mov DWORD PTR [rcx+18296], r8d @@ -16936,21 +12155,14 @@ stbi__jpeg_reset PROC ; COMDAT 00 00 mov DWORD PTR [rcx+18476], r8d 00044 89 91 6c 48 00 00 mov DWORD PTR [rcx+18540], edx - -; 2417 : j->eob_run = 0; - +; Line 2417 0004a 44 89 81 44 48 00 00 mov DWORD PTR [rcx+18500], r8d - -; 2418 : // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, -; 2419 : // since we don't even allow 1<<30 pixels -; 2420 : } - +; Line 2420 00051 c3 ret 0 stbi__jpeg_reset ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__parse_entropy_coded_data _TEXT SEGMENT k$1$ = 64 @@ -16962,9 +12174,8 @@ data$2 = 80 __$ArrayPad$ = 208 z$ = 272 stbi__parse_entropy_coded_data PROC ; COMDAT - -; 2423 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2423 00000 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx 00005 48 89 6c 24 18 mov QWORD PTR [rsp+24], rbp 0000a 48 89 74 24 20 mov QWORD PTR [rsp+32], rsi @@ -16980,28 +12191,19 @@ stbi__parse_entropy_coded_data PROC ; COMDAT 00026 48 33 c4 xor rax, rsp 00029 48 89 84 24 d0 00 00 00 mov QWORD PTR __$ArrayPad$[rsp], rax - -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; - +; Line 2414 00031 c7 81 d8 47 00 00 00 00 00 00 mov DWORD PTR [rcx+18392], 0 - -; 2423 : { - +; Line 2423 0003b 48 8b d9 mov rbx, rcx - -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; - +; Line 2414 0003e c7 81 78 47 00 00 00 00 00 00 mov DWORD PTR [rcx+18296], 0 00048 c7 81 18 47 00 00 00 00 00 00 mov DWORD PTR [rcx+18200], 0 00052 c7 81 b8 46 00 00 00 00 00 00 mov DWORD PTR [rcx+18104], 0 - -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; - +; Line 2416 0005c 8b 81 68 48 00 00 mov eax, DWORD PTR [rcx+18536] 00062 85 c0 test eax, eax @@ -17014,52 +12216,28 @@ stbi__parse_entropy_coded_data PROC ; COMDAT 00 ff mov BYTE PTR [rcx+18472], 255 ; 000000ffH 00080 b9 ff ff ff 7f mov ecx, 2147483647 ; 7fffffffH 00085 0f 45 c8 cmovne ecx, eax - -; 2417 : j->eob_run = 0; - +; Line 2417 00088 c7 83 44 48 00 00 00 00 00 00 mov DWORD PTR [rbx+18500], 0 - -; 2424 : stbi__jpeg_reset(z); -; 2425 : if (!z->progressive) { - +; Line 2425 00092 83 bb 30 48 00 00 00 cmp DWORD PTR [rbx+18480], 0 00099 8b 83 54 48 00 00 mov eax, DWORD PTR [rbx+18516] - -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; - +; Line 2416 0009f 89 8b 6c 48 00 00 mov DWORD PTR [rbx+18540], ecx - -; 2424 : stbi__jpeg_reset(z); -; 2425 : if (!z->progressive) { - +; Line 2425 000a5 0f 85 13 04 00 00 jne $LN44@stbi__pars - -; 2426 : if (z->scan_n == 1) { - +; Line 2426 000ab 83 f8 01 cmp eax, 1 000ae 0f 85 d2 01 00 00 jne $LN46@stbi__pars - -; 2427 : int i, j; -; 2428 : STBI_SIMD_ALIGN(short, data[64]); -; 2429 : int n = z->order[0]; - +; Line 2429 000b4 4c 63 a3 58 48 00 00 movsxd r12, DWORD PTR [rbx+18520] - -; 2430 : // non-interleaved data, we just need to process one block at a time, -; 2431 : // in trivial scanline order -; 2432 : // number of blocks to do just depends on how many actual "pixels" this -; 2433 : // component has, independent of interleaved MCU blocking and such -; 2434 : int w = (z->img_comp[n].x + 7) >> 3; -; 2435 : int h = (z->img_comp[n].y + 7) >> 3; -; 2436 : for (j = 0; j < h; ++j) { - +; Line 2436 000bb 45 33 f6 xor r14d, r14d 000be 4b 8d 34 64 lea rsi, QWORD PTR [r12+r12*2] 000c2 48 c1 e6 05 shl rsi, 5 @@ -17076,9 +12254,7 @@ stbi__parse_entropy_coded_data PROC ; COMDAT 000ea 0f 8e 60 01 00 00 jle $LN271@stbi__pars $LL4@stbi__pars: - -; 2437 : for (i = 0; i < w; ++i) { - +; Line 2437 000f0 33 ff xor edi, edi 000f2 45 85 ff test r15d, r15d 000f5 0f 8e 49 01 00 @@ -17086,10 +12262,7 @@ $LL4@stbi__pars: 000fb 33 ed xor ebp, ebp 000fd 0f 1f 00 npad 3 $LL7@stbi__pars: - -; 2438 : int ha = z->img_comp[n].ha; -; 2439 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; - +; Line 2439 00100 48 63 8e b4 46 00 00 movsxd rcx, DWORD PTR [rsi+18100] 00107 48 63 86 b0 46 @@ -17123,9 +12296,7 @@ $LL7@stbi__pars: 0016f 85 c0 test eax, eax 00171 0f 84 8f 06 00 00 je $LN224@stbi__pars - -; 2440 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); - +; Line 2440 00177 8b 96 c4 46 00 00 mov edx, DWORD PTR [rsi+18116] 0017d 4c 8d 44 24 50 lea r8, QWORD PTR data$2[rsp] @@ -17139,44 +12310,30 @@ $LL7@stbi__pars: 00198 48 03 c8 add rcx, rax 0019b ff 93 70 48 00 00 call QWORD PTR [rbx+18544] - -; 2441 : // every data block is an MCU, so countdown the restart interval -; 2442 : if (--z->todo <= 0) { - +; Line 2442 001a1 ff 8b 6c 48 00 00 dec DWORD PTR [rbx+18540] 001a7 83 bb 6c 48 00 00 00 cmp DWORD PTR [rbx+18540], 0 001ae 0f 8f 82 00 00 00 jg $LN5@stbi__pars - -; 2443 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - +; Line 2443 001b4 83 bb 24 48 00 00 18 cmp DWORD PTR [rbx+18468], 24 001bb 7d 08 jge SHORT $LN50@stbi__pars 001bd 48 8b cb mov rcx, rbx 001c0 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN50@stbi__pars: - -; 2444 : // if it's NOT a restart, then just bail, so we get corrupt data -; 2445 : // rather than no data -; 2446 : if (!STBI__RESTART(z->marker)) return 1; - +; Line 2446 001c5 0f b6 83 28 48 00 00 movzx eax, BYTE PTR [rbx+18472] 001cc 04 30 add al, 48 ; 00000030H 001ce 3c 07 cmp al, 7 001d0 77 7e ja SHORT $LN271@stbi__pars - -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; - +; Line 2414 001d2 c7 83 d8 47 00 00 00 00 00 00 mov DWORD PTR [rbx+18392], 0 - -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; - +; Line 2416 001dc b9 ff ff ff 7f mov ecx, 2147483647 ; 7fffffffH 001e1 c7 83 78 47 00 00 00 00 00 00 mov DWORD PTR [rbx+18296], 0 @@ -17197,49 +12354,27 @@ $LN50@stbi__pars: 00 mov DWORD PTR [rbx+18540], ecx 00225 c6 83 28 48 00 00 ff mov BYTE PTR [rbx+18472], 255 ; 000000ffH - -; 2417 : j->eob_run = 0; - +; Line 2417 0022c c7 83 44 48 00 00 00 00 00 00 mov DWORD PTR [rbx+18500], 0 $LN5@stbi__pars: - -; 2437 : for (i = 0; i < w; ++i) { - +; Line 2437 00236 ff c7 inc edi 00238 83 c5 08 add ebp, 8 0023b 41 3b ff cmp edi, r15d 0023e 0f 8c bc fe ff ff jl $LL7@stbi__pars $LN2@stbi__pars: - -; 2430 : // non-interleaved data, we just need to process one block at a time, -; 2431 : // in trivial scanline order -; 2432 : // number of blocks to do just depends on how many actual "pixels" this -; 2433 : // component has, independent of interleaved MCU blocking and such -; 2434 : int w = (z->img_comp[n].x + 7) >> 3; -; 2435 : int h = (z->img_comp[n].y + 7) >> 3; -; 2436 : for (j = 0; j < h; ++j) { - +; Line 2436 00244 41 ff c6 inc r14d 00247 45 3b f5 cmp r14d, r13d 0024a 0f 8c a0 fe ff ff jl $LL4@stbi__pars $LN271@stbi__pars: - -; 2541 : stbi__jpeg_reset(z); -; 2542 : } -; 2543 : } -; 2544 : } -; 2545 : return 1; - +; Line 2545 00250 b8 01 00 00 00 mov eax, 1 $LN59@stbi__pars: - -; 2546 : } -; 2547 : } -; 2548 : } - +; Line 2548 00255 48 8b 8c 24 d0 00 00 00 mov rcx, QWORD PTR __$ArrayPad$[rsp] 0025d 48 33 cc xor rcx, rsp @@ -17257,18 +12392,7 @@ $LN59@stbi__pars: 00284 5f pop rdi 00285 c3 ret 0 $LN46@stbi__pars: - -; 2447 : stbi__jpeg_reset(z); -; 2448 : } -; 2449 : } -; 2450 : } -; 2451 : return 1; -; 2452 : } -; 2453 : else { // interleaved -; 2454 : int i, j, k, x, y; -; 2455 : STBI_SIMD_ALIGN(short, data[64]); -; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { - +; Line 2456 00286 33 ed xor ebp, ebp 00288 89 6c 24 44 mov DWORD PTR j$1$[rsp], ebp 0028c 39 ab 94 46 00 @@ -17278,19 +12402,14 @@ $LN46@stbi__pars: 1f 84 00 00 00 00 00 npad 12 $LL10@stbi__pars: - -; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { - +; Line 2457 002a0 45 33 ed xor r13d, r13d 002a3 44 39 ab 90 46 00 00 cmp DWORD PTR [rbx+18064], r13d 002aa 0f 8e f7 01 00 00 jle $LN8@stbi__pars $LL13@stbi__pars: - -; 2458 : // scan an interleaved mcu... process scan_n components in order -; 2459 : for (k = 0; k < z->scan_n; ++k) { - +; Line 2459 002b0 33 d2 xor edx, edx 002b2 89 54 24 40 mov DWORD PTR k$1$[rsp], edx 002b6 39 93 54 48 00 @@ -17302,15 +12421,9 @@ $LL13@stbi__pars: 002c9 48 89 44 24 48 mov QWORD PTR tv1823[rsp], rax 002ce 66 90 npad 2 $LL16@stbi__pars: - -; 2460 : int n = z->order[k]; - +; Line 2460 002d0 4c 63 20 movsxd r12, DWORD PTR [rax] - -; 2461 : // scan out an mcu's worth of this component; that's just determined -; 2462 : // by the basic H and V specified for the component -; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { - +; Line 2463 002d3 45 33 ff xor r15d, r15d 002d6 4b 8d 34 64 lea rsi, QWORD PTR [r12+r12*2] 002da 48 c1 e6 05 shl rsi, 5 @@ -17321,9 +12434,7 @@ $LL16@stbi__pars: 00 jle $LN14@stbi__pars 002ee 66 90 npad 2 $LL19@stbi__pars: - -; 2464 : for (x = 0; x < z->img_comp[n].h; ++x) { - +; Line 2464 002f0 8b be a4 46 00 00 mov edi, DWORD PTR [rsi+18084] 002f6 45 33 f6 xor r14d, r14d @@ -17331,12 +12442,7 @@ $LL19@stbi__pars: 002fb 0f 8e c9 00 00 00 jle $LN17@stbi__pars $LL22@stbi__pars: - -; 2465 : int x2 = (i * z->img_comp[n].h + x) * 8; -; 2466 : int y2 = (j * z->img_comp[n].v + y) * 8; -; 2467 : int ha = z->img_comp[n].ha; -; 2468 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; - +; Line 2468 00301 48 63 8e b4 46 00 00 movsxd rcx, DWORD PTR [rsi+18100] 00308 48 63 86 b0 46 @@ -17373,9 +12479,7 @@ $LL22@stbi__pars: 0037a 85 c0 test eax, eax 0037c 0f 84 84 04 00 00 je $LN224@stbi__pars - -; 2469 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); - +; Line 2469 00382 8b 96 c4 46 00 00 mov edx, DWORD PTR [rsi+18116] 00388 4c 8d 44 24 50 lea r8, QWORD PTR data$1[rsp] @@ -17400,11 +12504,7 @@ $LL22@stbi__pars: 003c4 0f 8c 37 ff ff ff jl $LL22@stbi__pars $LN17@stbi__pars: - -; 2461 : // scan out an mcu's worth of this component; that's just determined -; 2462 : // by the basic H and V specified for the component -; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { - +; Line 2463 003ca 41 ff c7 inc r15d 003cd 44 3b be a8 46 00 00 cmp r15d, DWORD PTR [rsi+18088] @@ -17412,10 +12512,7 @@ $LN17@stbi__pars: ff jl $LL19@stbi__pars 003da 8b 54 24 40 mov edx, DWORD PTR k$1$[rsp] $LN14@stbi__pars: - -; 2458 : // scan an interleaved mcu... process scan_n components in order -; 2459 : for (k = 0; k < z->scan_n; ++k) { - +; Line 2459 003de 48 8b 44 24 48 mov rax, QWORD PTR tv1823[rsp] 003e3 ff c2 inc edx 003e5 48 83 c0 04 add rax, 4 @@ -17426,47 +12523,31 @@ $LN14@stbi__pars: 003f8 0f 8c d2 fe ff ff jl $LL16@stbi__pars $LN15@stbi__pars: - -; 2470 : } -; 2471 : } -; 2472 : } -; 2473 : // after all interleaved components, that's an interleaved MCU, -; 2474 : // so now count down the restart interval -; 2475 : if (--z->todo <= 0) { - +; Line 2475 003fe ff 8b 6c 48 00 00 dec DWORD PTR [rbx+18540] 00404 83 bb 6c 48 00 00 00 cmp DWORD PTR [rbx+18540], 0 0040b 0f 8f 86 00 00 00 jg $LN11@stbi__pars - -; 2476 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - +; Line 2476 00411 83 bb 24 48 00 00 18 cmp DWORD PTR [rbx+18468], 24 00418 7d 08 jge SHORT $LN55@stbi__pars 0041a 48 8b cb mov rcx, rbx 0041d e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN55@stbi__pars: - -; 2477 : if (!STBI__RESTART(z->marker)) return 1; - +; Line 2477 00422 0f b6 83 28 48 00 00 movzx eax, BYTE PTR [rbx+18472] 00429 04 30 add al, 48 ; 00000030H 0042b 3c 07 cmp al, 7 0042d 0f 87 1d fe ff ff ja $LN271@stbi__pars - -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; - +; Line 2414 00433 c7 83 d8 47 00 00 00 00 00 00 mov DWORD PTR [rbx+18392], 0 - -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; - +; Line 2416 0043d b9 ff ff ff 7f mov ecx, 2147483647 ; 7fffffffH 00442 c7 83 78 47 00 00 00 00 00 00 mov DWORD PTR [rbx+18296], 0 @@ -17487,73 +12568,35 @@ $LN55@stbi__pars: 00 mov DWORD PTR [rbx+18540], ecx 00486 c6 83 28 48 00 00 ff mov BYTE PTR [rbx+18472], 255 ; 000000ffH - -; 2417 : j->eob_run = 0; - +; Line 2417 0048d c7 83 44 48 00 00 00 00 00 00 mov DWORD PTR [rbx+18500], 0 $LN11@stbi__pars: - -; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { - +; Line 2457 00497 41 ff c5 inc r13d 0049a 44 3b ab 90 46 00 00 cmp r13d, DWORD PTR [rbx+18064] 004a1 0f 8c 09 fe ff ff jl $LL13@stbi__pars $LN8@stbi__pars: - -; 2447 : stbi__jpeg_reset(z); -; 2448 : } -; 2449 : } -; 2450 : } -; 2451 : return 1; -; 2452 : } -; 2453 : else { // interleaved -; 2454 : int i, j, k, x, y; -; 2455 : STBI_SIMD_ALIGN(short, data[64]); -; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { - +; Line 2456 004a7 ff c5 inc ebp 004a9 89 6c 24 44 mov DWORD PTR j$1$[rsp], ebp 004ad 3b ab 94 46 00 00 cmp ebp, DWORD PTR [rbx+18068] 004b3 0f 8c e7 fd ff ff jl $LL10@stbi__pars - -; 2540 : if (!STBI__RESTART(z->marker)) return 1; - +; Line 2540 004b9 e9 92 fd ff ff jmp $LN271@stbi__pars $LN44@stbi__pars: - -; 2478 : stbi__jpeg_reset(z); -; 2479 : } -; 2480 : } -; 2481 : } -; 2482 : return 1; -; 2483 : } -; 2484 : } -; 2485 : else { -; 2486 : if (z->scan_n == 1) { - +; Line 2486 004be 83 f8 01 cmp eax, 1 004c1 0f 85 81 01 00 00 jne $LN58@stbi__pars - -; 2487 : int i, j; -; 2488 : int n = z->order[0]; - +; Line 2488 004c7 4c 63 b3 58 48 00 00 movsxd r14, DWORD PTR [rbx+18520] - -; 2489 : // non-interleaved data, we just need to process one block at a time, -; 2490 : // in trivial scanline order -; 2491 : // number of blocks to do just depends on how many actual "pixels" this -; 2492 : // component has, independent of interleaved MCU blocking and such -; 2493 : int w = (z->img_comp[n].x + 7) >> 3; -; 2494 : int h = (z->img_comp[n].y + 7) >> 3; -; 2495 : for (j = 0; j < h; ++j) { - +; Line 2495 004ce 33 f6 xor esi, esi 004d0 4f 8d 24 76 lea r12, QWORD PTR [r14+r14*2] 004d4 49 c1 e4 05 shl r12, 5 @@ -17570,9 +12613,7 @@ $LN44@stbi__pars: ff jle $LN271@stbi__pars 004ff 90 npad 1 $LL25@stbi__pars: - -; 2496 : for (i = 0; i < w; ++i) { - +; Line 2496 00500 33 ff xor edi, edi 00502 85 ed test ebp, ebp 00504 0f 8e 2e 01 00 @@ -17580,17 +12621,13 @@ $LL25@stbi__pars: 0050a 66 0f 1f 44 00 00 npad 6 $LL28@stbi__pars: - -; 2497 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); - +; Line 2497 00510 8b c6 mov eax, esi 00512 41 0f af 84 1c f8 46 00 00 imul eax, DWORD PTR [r12+rbx+18168] 0051b 03 c7 add eax, edi 0051d c1 e0 06 shl eax, 6 - -; 2498 : if (z->spec_start == 0) { - +; Line 2498 00520 83 bb 34 48 00 00 00 cmp DWORD PTR [rbx+18484], 0 00527 48 63 c8 movsxd rcx, eax @@ -17598,9 +12635,7 @@ $LL28@stbi__pars: 46 00 00 mov rax, QWORD PTR [r12+rbx+18160] 00532 48 8d 14 48 lea rdx, QWORD PTR [rax+rcx*2] 00536 75 23 jne SHORT $LN60@stbi__pars - -; 2499 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) - +; Line 2499 00538 4a 63 84 23 b0 46 00 00 movsxd rax, DWORD PTR [rbx+r12+18096] 00540 45 8b ce mov r9d, r14d @@ -17610,17 +12645,10 @@ $LL28@stbi__pars: 0054d 49 83 c0 08 add r8, 8 00551 4c 03 c3 add r8, rbx 00554 e8 00 00 00 00 call stbi__jpeg_decode_block_prog_dc - -; 2500 : return 0; -; 2501 : } - +; Line 2501 00559 eb 32 jmp SHORT $LN310@stbi__pars $LN60@stbi__pars: - -; 2502 : else { -; 2503 : int ha = z->img_comp[n].ha; -; 2504 : if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) - +; Line 2504 0055b 4a 63 8c 23 b4 46 00 00 movsxd rcx, DWORD PTR [rbx+r12+18100] 00563 4c 69 c1 90 06 @@ -17636,12 +12664,7 @@ $LN60@stbi__pars: 00585 4c 03 cb add r9, rbx 00588 e8 00 00 00 00 call stbi__jpeg_decode_block_prog_ac $LN310@stbi__pars: - -; 2505 : return 0; -; 2506 : } -; 2507 : // every data block is an MCU, so countdown the restart interval -; 2508 : if (--z->todo <= 0) { - +; Line 2508 0058d 85 c0 test eax, eax 0058f 0f 84 71 02 00 00 je $LN224@stbi__pars @@ -17651,33 +12674,24 @@ $LN310@stbi__pars: 00 00 cmp DWORD PTR [rbx+18540], 0 005a2 0f 8f 86 00 00 00 jg $LN26@stbi__pars - -; 2509 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - +; Line 2509 005a8 83 bb 24 48 00 00 18 cmp DWORD PTR [rbx+18468], 24 005af 7d 08 jge SHORT $LN65@stbi__pars 005b1 48 8b cb mov rcx, rbx 005b4 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN65@stbi__pars: - -; 2510 : if (!STBI__RESTART(z->marker)) return 1; - +; Line 2510 005b9 0f b6 83 28 48 00 00 movzx eax, BYTE PTR [rbx+18472] 005c0 04 30 add al, 48 ; 00000030H 005c2 3c 07 cmp al, 7 005c4 0f 87 86 fc ff ff ja $LN271@stbi__pars - -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; - +; Line 2414 005ca c7 83 d8 47 00 00 00 00 00 00 mov DWORD PTR [rbx+18392], 0 - -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; - +; Line 2416 005d4 b9 ff ff ff 7f mov ecx, 2147483647 ; 7fffffffH 005d9 c7 83 78 47 00 00 00 00 00 00 mov DWORD PTR [rbx+18296], 0 @@ -17698,49 +12712,25 @@ $LN65@stbi__pars: 00 mov DWORD PTR [rbx+18540], ecx 0061d c6 83 28 48 00 00 ff mov BYTE PTR [rbx+18472], 255 ; 000000ffH - -; 2417 : j->eob_run = 0; - +; Line 2417 00624 c7 83 44 48 00 00 00 00 00 00 mov DWORD PTR [rbx+18500], 0 $LN26@stbi__pars: - -; 2496 : for (i = 0; i < w; ++i) { - +; Line 2496 0062e ff c7 inc edi 00630 3b fd cmp edi, ebp 00632 0f 8c d8 fe ff ff jl $LL28@stbi__pars $LN23@stbi__pars: - -; 2489 : // non-interleaved data, we just need to process one block at a time, -; 2490 : // in trivial scanline order -; 2491 : // number of blocks to do just depends on how many actual "pixels" this -; 2492 : // component has, independent of interleaved MCU blocking and such -; 2493 : int w = (z->img_comp[n].x + 7) >> 3; -; 2494 : int h = (z->img_comp[n].y + 7) >> 3; -; 2495 : for (j = 0; j < h; ++j) { - +; Line 2495 00638 ff c6 inc esi 0063a 41 3b f7 cmp esi, r15d 0063d 0f 8c bd fe ff ff jl $LL25@stbi__pars - -; 2540 : if (!STBI__RESTART(z->marker)) return 1; - +; Line 2540 00643 e9 08 fc ff ff jmp $LN271@stbi__pars $LN58@stbi__pars: - -; 2511 : stbi__jpeg_reset(z); -; 2512 : } -; 2513 : } -; 2514 : } -; 2515 : return 1; -; 2516 : } -; 2517 : else { // interleaved -; 2518 : int i, j, k, x, y; -; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { - +; Line 2519 00648 45 33 e4 xor r12d, r12d 0064b 44 39 a3 94 46 00 00 cmp DWORD PTR [rbx+18068], r12d @@ -17749,19 +12739,14 @@ $LN58@stbi__pars: 00658 0f 1f 84 00 00 00 00 00 npad 8 $LL31@stbi__pars: - -; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { - +; Line 2520 00660 45 33 ff xor r15d, r15d 00663 44 39 bb 90 46 00 00 cmp DWORD PTR [rbx+18064], r15d 0066a 0f 8e 81 01 00 00 jle $LN29@stbi__pars $LL34@stbi__pars: - -; 2521 : // scan an interleaved mcu... process scan_n components in order -; 2522 : for (k = 0; k < z->scan_n; ++k) { - +; Line 2522 00670 45 33 ed xor r13d, r13d 00673 44 39 ab 54 48 00 00 cmp DWORD PTR [rbx+18516], r13d @@ -17772,15 +12757,9 @@ $LL34@stbi__pars: 00687 48 89 44 24 48 mov QWORD PTR tv1822[rsp], rax 0068c 0f 1f 40 00 npad 4 $LL37@stbi__pars: - -; 2523 : int n = z->order[k]; - +; Line 2523 00690 4c 63 30 movsxd r14, DWORD PTR [rax] - -; 2524 : // scan out an mcu's worth of this component; that's just determined -; 2525 : // by the basic H and V specified for the component -; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { - +; Line 2526 00693 33 ed xor ebp, ebp 00695 4b 8d 34 76 lea rsi, QWORD PTR [r14+r14*2] 00699 48 c1 e6 05 shl rsi, 5 @@ -17791,9 +12770,7 @@ $LL37@stbi__pars: 00 jle $LN35@stbi__pars 006ac 0f 1f 40 00 npad 4 $LL40@stbi__pars: - -; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { - +; Line 2527 006b0 8b 86 a4 46 00 00 mov eax, DWORD PTR [rsi+18084] 006b6 33 ff xor edi, edi @@ -17801,18 +12778,12 @@ $LL40@stbi__pars: 006ba 7e 64 jle SHORT $LN38@stbi__pars 006bc 0f 1f 40 00 npad 4 $LL43@stbi__pars: - -; 2528 : int x2 = (i * z->img_comp[n].h + x); -; 2529 : int y2 = (j * z->img_comp[n].v + y); -; 2530 : short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); - +; Line 2530 006c0 41 0f af c7 imul eax, r15d 006c4 41 8b cc mov ecx, r12d 006c7 0f af 8e a8 46 00 00 imul ecx, DWORD PTR [rsi+18088] - -; 2531 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) - +; Line 2531 006ce 45 8b ce mov r9d, r14d 006d1 03 cd add ecx, ebp 006d3 0f af 8e f8 46 @@ -17835,29 +12806,20 @@ $LL43@stbi__pars: 0070c 85 c0 test eax, eax 0070e 0f 84 f2 00 00 00 je $LN224@stbi__pars - -; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { - +; Line 2527 00714 8b 86 a4 46 00 00 mov eax, DWORD PTR [rsi+18084] 0071a ff c7 inc edi 0071c 3b f8 cmp edi, eax 0071e 7c a0 jl SHORT $LL43@stbi__pars $LN38@stbi__pars: - -; 2524 : // scan out an mcu's worth of this component; that's just determined -; 2525 : // by the basic H and V specified for the component -; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { - +; Line 2526 00720 ff c5 inc ebp 00722 3b ae a8 46 00 00 cmp ebp, DWORD PTR [rsi+18088] 00728 7c 86 jl SHORT $LL40@stbi__pars $LN35@stbi__pars: - -; 2521 : // scan an interleaved mcu... process scan_n components in order -; 2522 : for (k = 0; k < z->scan_n; ++k) { - +; Line 2522 0072a 48 8b 44 24 48 mov rax, QWORD PTR tv1822[rsp] 0072f 41 ff c5 inc r13d 00732 48 83 c0 04 add rax, 4 @@ -17867,47 +12829,31 @@ $LN35@stbi__pars: 00742 0f 8c 48 ff ff ff jl $LL37@stbi__pars $LN269@stbi__pars: - -; 2533 : } -; 2534 : } -; 2535 : } -; 2536 : // after all interleaved components, that's an interleaved MCU, -; 2537 : // so now count down the restart interval -; 2538 : if (--z->todo <= 0) { - +; Line 2538 00748 ff 8b 6c 48 00 00 dec DWORD PTR [rbx+18540] 0074e 83 bb 6c 48 00 00 00 cmp DWORD PTR [rbx+18540], 0 00755 0f 8f 86 00 00 00 jg $LN32@stbi__pars - -; 2539 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - +; Line 2539 0075b 83 bb 24 48 00 00 18 cmp DWORD PTR [rbx+18468], 24 00762 7d 08 jge SHORT $LN70@stbi__pars 00764 48 8b cb mov rcx, rbx 00767 e8 00 00 00 00 call stbi__grow_buffer_unsafe $LN70@stbi__pars: - -; 2540 : if (!STBI__RESTART(z->marker)) return 1; - +; Line 2540 0076c 0f b6 83 28 48 00 00 movzx eax, BYTE PTR [rbx+18472] 00773 04 30 add al, 48 ; 00000030H 00775 3c 07 cmp al, 7 00777 0f 87 d3 fa ff ff ja $LN271@stbi__pars - -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; - +; Line 2414 0077d c7 83 d8 47 00 00 00 00 00 00 mov DWORD PTR [rbx+18392], 0 - -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; - +; Line 2416 00787 b9 ff ff ff 7f mov ecx, 2147483647 ; 7fffffffH 0078c c7 83 78 47 00 00 00 00 00 00 mov DWORD PTR [rbx+18296], 0 @@ -17928,32 +12874,18 @@ $LN70@stbi__pars: 00 mov DWORD PTR [rbx+18540], ecx 007d0 c6 83 28 48 00 00 ff mov BYTE PTR [rbx+18472], 255 ; 000000ffH - -; 2417 : j->eob_run = 0; - +; Line 2417 007d7 c7 83 44 48 00 00 00 00 00 00 mov DWORD PTR [rbx+18500], 0 $LN32@stbi__pars: - -; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { - +; Line 2520 007e1 41 ff c7 inc r15d 007e4 44 3b bb 90 46 00 00 cmp r15d, DWORD PTR [rbx+18064] 007eb 0f 8c 7f fe ff ff jl $LL34@stbi__pars $LN29@stbi__pars: - -; 2511 : stbi__jpeg_reset(z); -; 2512 : } -; 2513 : } -; 2514 : } -; 2515 : return 1; -; 2516 : } -; 2517 : else { // interleaved -; 2518 : int i, j, k, x, y; -; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { - +; Line 2519 007f1 41 ff c4 inc r12d 007f4 44 3b a3 94 46 00 00 cmp r12d, DWORD PTR [rbx+18068] @@ -17961,28 +12893,21 @@ $LN29@stbi__pars: ff jl $LL31@stbi__pars 00801 e9 4a fa ff ff jmp $LN271@stbi__pars $LN224@stbi__pars: - -; 2532 : return 0; - +; Line 2532 00806 33 c0 xor eax, eax 00808 e9 48 fa ff ff jmp $LN59@stbi__pars stbi__parse_entropy_coded_data ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__jpeg_dequantize _TEXT SEGMENT data$ = 8 dequant$ = 16 stbi__jpeg_dequantize PROC ; COMDAT - -; 2551 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2551 00000 4c 8b c2 mov r8, rdx - -; 2552 : int i; -; 2553 : for (i = 0; i < 64; ++i) - +; Line 2553 00003 48 8d 51 7e lea rdx, QWORD PTR [rcx+126] 00007 49 8d 40 7e lea rax, QWORD PTR [r8+126] 0000b 48 3b c8 cmp rcx, rax @@ -17994,9 +12919,7 @@ stbi__jpeg_dequantize PROC ; COMDAT 00 mov r9d, 64 ; 00000040H 0001e 66 90 npad 2 $LL8@stbi__jpeg: - -; 2554 : data[i] *= dequant[i]; - +; Line 2554 00020 41 0f bf 04 08 movsx eax, WORD PTR [r8+rcx] 00025 0f bf 11 movsx edx, WORD PTR [rcx] 00028 48 8d 49 02 lea rcx, QWORD PTR [rcx+2] @@ -18004,24 +12927,17 @@ $LL8@stbi__jpeg: 0002f 66 89 51 fe mov WORD PTR [rcx-2], dx 00033 49 83 e9 01 sub r9, 1 00037 75 e7 jne SHORT $LL8@stbi__jpeg - -; 2555 : } - +; Line 2555 00039 c3 ret 0 $LN10@stbi__jpeg: - -; 2552 : int i; -; 2553 : for (i = 0; i < 64; ++i) - +; Line 2553 0003a 48 8d 41 10 lea rax, QWORD PTR [rcx+16] 0003e 4c 2b c1 sub r8, rcx 00041 b9 02 00 00 00 mov ecx, 2 00046 66 66 0f 1f 84 00 00 00 00 00 npad 10 $LL4@stbi__jpeg: - -; 2554 : data[i] *= dequant[i]; - +; Line 2554 00050 f3 0f 6f 40 f0 movdqu xmm0, XMMWORD PTR [rax-16] 00055 f3 42 0f 6f 4c 00 f0 movdqu xmm1, XMMWORD PTR [rax+r8-16] @@ -18045,37 +12961,27 @@ $LL4@stbi__jpeg: 000a2 f3 0f 7f 48 e0 movdqu XMMWORD PTR [rax-32], xmm1 000a7 48 83 e9 01 sub rcx, 1 000ab 75 a3 jne SHORT $LL4@stbi__jpeg - -; 2555 : } - +; Line 2555 000ad c3 ret 0 stbi__jpeg_dequantize ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__jpeg_finish _TEXT SEGMENT z$ = 80 stbi__jpeg_finish PROC ; COMDAT - -; 2558 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2558 00000 4c 8b dc mov r11, rsp 00003 41 56 push r14 00005 48 83 ec 40 sub rsp, 64 ; 00000040H - -; 2559 : if (z->progressive) { - +; Line 2559 00009 83 b9 30 48 00 00 00 cmp DWORD PTR [rcx+18480], 0 00010 4c 8b f1 mov r14, rcx 00013 0f 84 b4 01 00 00 je $LN3@stbi__jpeg - -; 2560 : // dequantize and idct the data -; 2561 : int i, j, n; -; 2562 : for (n = 0; n < z->s->img_n; ++n) { - +; Line 2562 00019 48 8b 01 mov rax, QWORD PTR [rcx] 0001c 4d 89 6b e0 mov QWORD PTR [r11-32], r13 00020 45 33 ed xor r13d, r13d @@ -18092,38 +12998,28 @@ stbi__jpeg_finish PROC ; COMDAT 00048 4d 89 7b d8 mov QWORD PTR [r11-40], r15 0004c 0f 1f 40 00 npad 4 $LL4@stbi__jpeg: - -; 2563 : int w = (z->img_comp[n].x + 7) >> 3; - +; Line 2563 00050 44 8b 7b cc mov r15d, DWORD PTR [rbx-52] 00054 33 ed xor ebp, ebp - -; 2564 : int h = (z->img_comp[n].y + 7) >> 3; - +; Line 2564 00056 44 8b 63 d0 mov r12d, DWORD PTR [rbx-48] 0005a 41 83 c7 07 add r15d, 7 0005e 41 83 c4 07 add r12d, 7 00062 41 c1 ff 03 sar r15d, 3 00066 41 c1 fc 03 sar r12d, 3 - -; 2565 : for (j = 0; j < h; ++j) { - +; Line 2565 0006a 45 85 e4 test r12d, r12d 0006d 0f 8e 23 01 00 00 jle $LN2@stbi__jpeg $LL7@stbi__jpeg: - -; 2566 : for (i = 0; i < w; ++i) { - +; Line 2566 00073 33 ff xor edi, edi 00075 45 85 ff test r15d, r15d 00078 0f 8e 0d 01 00 00 jle $LN5@stbi__jpeg 0007e 33 f6 xor esi, esi $LL10@stbi__jpeg: - -; 2568 : stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); - +; Line 2568 00080 4c 63 43 bc movsxd r8, DWORD PTR [rbx-68] 00084 8b c5 mov eax, ebp 00086 0f af 43 08 imul eax, DWORD PTR [rbx+8] @@ -18140,9 +13036,7 @@ $LL10@stbi__jpeg: 000ab 49 8d 4a 7e lea rcx, QWORD PTR [r10+126] 000af 4c 3b d0 cmp r10, rax 000b2 77 37 ja SHORT $LN28@stbi__jpeg - -; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); - +; Line 2567 000b4 49 3b c8 cmp rcx, r8 000b7 72 32 jb SHORT $LN28@stbi__jpeg 000b9 49 8b c2 mov rax, r10 @@ -18153,9 +13047,7 @@ $LL10@stbi__jpeg: 84 00 00 00 00 00 npad 11 $LL42@stbi__jpeg: - -; 2554 : data[i] *= dequant[i]; - +; Line 2554 000d0 42 0f bf 0c 00 movsx ecx, WORD PTR [rax+r8] 000d5 0f bf 10 movsx edx, WORD PTR [rax] 000d8 48 8d 40 02 lea rax, QWORD PTR [rax+2] @@ -18163,23 +13055,17 @@ $LL42@stbi__jpeg: 000df 66 89 50 fe mov WORD PTR [rax-2], dx 000e3 49 83 e9 01 sub r9, 1 000e7 75 e7 jne SHORT $LL42@stbi__jpeg - -; 2553 : for (i = 0; i < 64; ++i) - +; Line 2553 000e9 eb 72 jmp SHORT $LN15@stbi__jpeg $LN28@stbi__jpeg: - -; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); - +; Line 2567 000eb 49 8d 42 10 lea rax, QWORD PTR [r10+16] 000ef 4d 2b c2 sub r8, r10 000f2 b9 02 00 00 00 mov ecx, 2 000f7 66 0f 1f 84 00 00 00 00 00 npad 9 $LL16@stbi__jpeg: - -; 2554 : data[i] *= dequant[i]; - +; Line 2554 00100 f3 0f 6f 40 f0 movdqu xmm0, XMMWORD PTR [rax-16] 00105 f3 41 0f 6f 4c 00 f0 movdqu xmm1, XMMWORD PTR [r8+rax-16] @@ -18204,9 +13090,7 @@ $LL16@stbi__jpeg: 00157 48 83 e9 01 sub rcx, 1 0015b 75 a3 jne SHORT $LL16@stbi__jpeg $LN15@stbi__jpeg: - -; 2569 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); - +; Line 2569 0015d 8b 53 d4 mov edx, DWORD PTR [rbx-44] 00160 4d 8b c2 mov r8, r10 00163 8b c2 mov eax, edx @@ -18223,19 +13107,13 @@ $LN15@stbi__jpeg: 00185 0f 8c f5 fe ff ff jl $LL10@stbi__jpeg $LN5@stbi__jpeg: - -; 2565 : for (j = 0; j < h; ++j) { - +; Line 2565 0018b ff c5 inc ebp 0018d 41 3b ec cmp ebp, r12d 00190 0f 8c dd fe ff ff jl $LL7@stbi__jpeg $LN2@stbi__jpeg: - -; 2560 : // dequantize and idct the data -; 2561 : int i, j, n; -; 2562 : for (n = 0; n < z->s->img_n; ++n) { - +; Line 2562 00196 49 8b 06 mov rax, QWORD PTR [r14] 00199 41 ff c5 inc r13d 0019c 48 83 c3 60 add rbx, 96 ; 00000060H @@ -18251,31 +13129,23 @@ $LN2@stbi__jpeg: $LN54@stbi__jpeg: 001c8 4c 8b 6c 24 28 mov r13, QWORD PTR [rsp+40] $LN3@stbi__jpeg: - -; 2570 : } -; 2571 : } -; 2572 : } -; 2573 : } -; 2574 : } - +; Line 2574 001cd 48 83 c4 40 add rsp, 64 ; 00000040H 001d1 41 5e pop r14 001d3 c3 ret 0 stbi__jpeg_finish ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__process_marker _TEXT SEGMENT L$3$ = 32 -sizes$9 = 48 +sizes$1 = 48 __$ArrayPad$ = 112 z$ = 176 m$ = 184 stbi__process_marker PROC ; COMDAT - -; 2577 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2577 00000 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx 00005 48 89 6c 24 18 mov QWORD PTR [rsp+24], rbp 0000a 48 89 74 24 20 mov QWORD PTR [rsp+32], rsi @@ -18292,10 +13162,7 @@ stbi__process_marker PROC ; COMDAT 00029 48 89 44 24 70 mov QWORD PTR __$ArrayPad$[rsp], rax 0002e 48 8b f1 mov rsi, rcx 00031 8b fa mov edi, edx - -; 2578 : int L; -; 2579 : switch (m) { - +; Line 2579 00033 8b ca mov ecx, edx 00035 81 e9 c4 00 00 00 sub ecx, 196 ; 000000c4H @@ -18310,12 +13177,7 @@ stbi__process_marker PROC ; COMDAT 00053 83 f9 22 cmp ecx, 34 ; 00000022H 00056 0f 84 73 05 00 00 je $LN23@stbi__proc - -; 2633 : } -; 2634 : -; 2635 : // check for comment block or APP blocks -; 2636 : if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { - +; Line 2636 0005c 8d 82 20 ff ff ff lea eax, DWORD PTR [rdx-224] 00062 83 f8 0f cmp eax, 15 @@ -18323,9 +13185,7 @@ stbi__process_marker PROC ; COMDAT 00067 81 fa fe 00 00 00 cmp edx, 254 ; 000000feH 0006d 74 2a je SHORT $LN39@stbi__proc - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0006f 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00075 65 48 8b 04 25 @@ -18335,28 +13195,18 @@ stbi__process_marker PROC ; COMDAT 00087 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0P@NNGPHMMK@unknown?5marker@ 0008e 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2676 : } -; 2677 : -; 2678 : return stbi__err("unknown marker", "Corrupt JPEG"); - +; Line 2678 00092 33 c0 xor eax, eax 00094 e9 ee 09 00 00 jmp $LN1@stbi__proc $LN39@stbi__proc: - -; 2637 : L = stbi__get16be(z->s); - +; Line 2637 00099 48 8b 0e mov rcx, QWORD PTR [rsi] 0009c e8 00 00 00 00 call stbi__get16be 000a1 8b d8 mov ebx, eax - -; 2638 : if (L < 2) { - +; Line 2638 000a3 83 f8 02 cmp eax, 2 000a6 7d 45 jge SHORT $LN43@stbi__proc - -; 2639 : if (m == 0xFE) - +; Line 2639 000a8 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index 000ae 65 48 8b 04 25 @@ -18367,40 +13217,25 @@ $LN39@stbi__proc: 000c1 81 ff fe 00 00 00 cmp edi, 254 ; 000000feH 000c7 75 12 jne SHORT $LN42@stbi__proc - -; 431 : stbi__g_failure_reason = str; - +; Line 431 000c9 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_0M@CICAFFCH@bad?5COM?5len@ 000d0 49 89 04 10 mov QWORD PTR [r8+rdx], rax - -; 2640 : return stbi__err("bad COM len", "Corrupt JPEG"); - +; Line 2640 000d4 33 c0 xor eax, eax 000d6 e9 ac 09 00 00 jmp $LN1@stbi__proc $LN42@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 000db 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_0M@EENLKPDI@bad?5APP?5len@ 000e2 49 89 04 10 mov QWORD PTR [r8+rdx], rax - -; 2641 : else -; 2642 : return stbi__err("bad APP len", "Corrupt JPEG"); - +; Line 2642 000e6 33 c0 xor eax, eax 000e8 e9 9a 09 00 00 jmp $LN1@stbi__proc $LN43@stbi__proc: - -; 2643 : } -; 2644 : L -= 2; - +; Line 2644 000ed 83 eb 02 sub ebx, 2 - -; 2645 : -; 2646 : if (m == 0xE0 && L >= 5) { // JFIF APP0 segment - +; Line 2646 000f0 81 ff e0 00 00 00 cmp edi, 224 ; 000000e0H 000f6 0f 85 bd 01 00 @@ -18408,44 +13243,28 @@ $LN43@stbi__proc: 000fc 83 fb 05 cmp ebx, 5 000ff 0f 8c 58 04 00 00 jl $LN50@stbi__proc - -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) - +; Line 2651 00105 48 8b 3e mov rdi, QWORD PTR [rsi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00108 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 0010f 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 00116 73 0f jae SHORT $LN102@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00118 0f b6 08 movzx ecx, BYTE PTR [rax] 0011b 48 ff c0 inc rax 0011e 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 00125 eb 26 jmp SHORT $LN101@stbi__proc $LN102@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00127 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 0012b 74 1e je SHORT $LN103@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0012d 48 8b cf mov rcx, rdi 00130 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00135 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 0013c 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -18454,54 +13273,35 @@ $LN102@stbi__proc: 00 00 mov QWORD PTR [rdi+192], rax 00149 eb 02 jmp SHORT $LN101@stbi__proc $LN103@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 0014b 32 c9 xor cl, cl $LN101@stbi__proc: - -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) - +; Line 2651 0014d 48 8b 3e mov rdi, QWORD PTR [rsi] 00150 45 33 e4 xor r12d, r12d 00153 80 f9 4a cmp cl, 74 ; 0000004aH 00156 45 8b f4 mov r14d, r12d 00159 41 0f 94 c6 sete r14b - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0015d 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00164 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 0016b 73 0f jae SHORT $LN146@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 0016d 0f b6 08 movzx ecx, BYTE PTR [rax] 00170 48 ff c0 inc rax 00173 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 0017a eb 26 jmp SHORT $LN148@stbi__proc $LN146@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0017c 44 39 67 30 cmp DWORD PTR [rdi+48], r12d 00180 74 1e je SHORT $LN147@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00182 48 8b cf mov rcx, rdi 00185 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0018a 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00191 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -18510,53 +13310,34 @@ $LN146@stbi__proc: 00 00 mov QWORD PTR [rdi+192], rax 0019e eb 02 jmp SHORT $LN148@stbi__proc $LN147@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 001a0 32 c9 xor cl, cl $LN148@stbi__proc: - -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) - +; Line 2651 001a2 48 8b 3e mov rdi, QWORD PTR [rsi] 001a5 80 f9 46 cmp cl, 70 ; 00000046H 001a8 41 8b ec mov ebp, r12d 001ab 41 0f 44 ee cmove ebp, r14d - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 001af 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 001b6 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 001bd 73 0f jae SHORT $LN151@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 001bf 0f b6 08 movzx ecx, BYTE PTR [rax] 001c2 48 ff c0 inc rax 001c5 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 001cc eb 26 jmp SHORT $LN153@stbi__proc $LN151@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 001ce 44 39 67 30 cmp DWORD PTR [rdi+48], r12d 001d2 74 1e je SHORT $LN152@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 001d4 48 8b cf mov rcx, rdi 001d7 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 001dc 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 001e3 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -18565,53 +13346,34 @@ $LN151@stbi__proc: 00 00 mov QWORD PTR [rdi+192], rax 001f0 eb 02 jmp SHORT $LN153@stbi__proc $LN152@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 001f2 32 c9 xor cl, cl $LN153@stbi__proc: - -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) - +; Line 2651 001f4 48 8b 3e mov rdi, QWORD PTR [rsi] 001f7 80 f9 49 cmp cl, 73 ; 00000049H 001fa 45 8b f4 mov r14d, r12d 001fd 44 0f 44 f5 cmove r14d, ebp - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00201 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00208 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 0020f 73 0f jae SHORT $LN156@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00211 0f b6 08 movzx ecx, BYTE PTR [rax] 00214 48 ff c0 inc rax 00217 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 0021e eb 26 jmp SHORT $LN158@stbi__proc $LN156@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00220 44 39 67 30 cmp DWORD PTR [rdi+48], r12d 00224 74 1e je SHORT $LN157@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00226 48 8b cf mov rcx, rdi 00229 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0022e 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00235 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -18620,53 +13382,34 @@ $LN156@stbi__proc: 00 00 mov QWORD PTR [rdi+192], rax 00242 eb 02 jmp SHORT $LN158@stbi__proc $LN157@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00244 32 c9 xor cl, cl $LN158@stbi__proc: - -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) - +; Line 2651 00246 48 8b 3e mov rdi, QWORD PTR [rsi] 00249 80 f9 46 cmp cl, 70 ; 00000046H 0024c 41 8b ec mov ebp, r12d 0024f 41 0f 44 ee cmove ebp, r14d - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00253 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 0025a 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 00261 73 0f jae SHORT $LN161@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00263 0f b6 08 movzx ecx, BYTE PTR [rax] 00266 48 ff c0 inc rax 00269 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 00270 eb 26 jmp SHORT $LN163@stbi__proc $LN161@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00272 44 39 67 30 cmp DWORD PTR [rdi+48], r12d 00276 74 1e je SHORT $LN162@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00278 48 8b cf mov rcx, rdi 0027b e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00280 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00287 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -18675,38 +13418,24 @@ $LN161@stbi__proc: 00 00 mov QWORD PTR [rdi+192], rax 00294 eb 02 jmp SHORT $LN163@stbi__proc $LN162@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00296 32 c9 xor cl, cl $LN163@stbi__proc: - -; 2652 : ok = 0; -; 2653 : L -= 5; - +; Line 2653 00298 83 eb 05 sub ebx, 5 0029b 84 c9 test cl, cl 0029d 44 0f 44 e5 cmove r12d, ebp - -; 2654 : if (ok) - +; Line 2654 002a1 45 85 e4 test r12d, r12d 002a4 0f 84 b3 02 00 00 je $LN50@stbi__proc - -; 2655 : z->jfif = 1; - +; Line 2655 002aa c7 86 48 48 00 00 01 00 00 00 mov DWORD PTR [rsi+18504], 1 - -; 2656 : } - +; Line 2656 002b4 e9 a4 02 00 00 jmp $LN50@stbi__proc $LN44@stbi__proc: - -; 2657 : else if (m == 0xEE && L >= 12) { // Adobe APP14 segment - +; Line 2657 002b9 81 ff ee 00 00 00 cmp edi, 238 ; 000000eeH 002bf 0f 85 98 02 00 @@ -18714,44 +13443,28 @@ $LN44@stbi__proc: 002c5 83 fb 0c cmp ebx, 12 002c8 0f 8c 8f 02 00 00 jl $LN50@stbi__proc - -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) - +; Line 2662 002ce 48 8b 3e mov rdi, QWORD PTR [rsi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 002d1 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 002d8 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 002df 73 0f jae SHORT $LN108@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 002e1 0f b6 08 movzx ecx, BYTE PTR [rax] 002e4 48 ff c0 inc rax 002e7 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 002ee eb 26 jmp SHORT $LN107@stbi__proc $LN108@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 002f0 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 002f4 74 1e je SHORT $LN109@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 002f6 48 8b cf mov rcx, rdi 002f9 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 002fe 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00305 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -18760,54 +13473,35 @@ $LN108@stbi__proc: 00 00 mov QWORD PTR [rdi+192], rax 00312 eb 02 jmp SHORT $LN107@stbi__proc $LN109@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00314 32 c9 xor cl, cl $LN107@stbi__proc: - -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) - +; Line 2662 00316 48 8b 3e mov rdi, QWORD PTR [rsi] 00319 45 33 e4 xor r12d, r12d 0031c 80 f9 41 cmp cl, 65 ; 00000041H 0031f 45 8b f4 mov r14d, r12d 00322 41 0f 94 c6 sete r14b - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00326 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 0032d 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 00334 73 0f jae SHORT $LN166@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00336 0f b6 08 movzx ecx, BYTE PTR [rax] 00339 48 ff c0 inc rax 0033c 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 00343 eb 26 jmp SHORT $LN168@stbi__proc $LN166@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00345 44 39 67 30 cmp DWORD PTR [rdi+48], r12d 00349 74 1e je SHORT $LN167@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0034b 48 8b cf mov rcx, rdi 0034e e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00353 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 0035a 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -18816,53 +13510,34 @@ $LN166@stbi__proc: 00 00 mov QWORD PTR [rdi+192], rax 00367 eb 02 jmp SHORT $LN168@stbi__proc $LN167@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00369 32 c9 xor cl, cl $LN168@stbi__proc: - -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) - +; Line 2662 0036b 48 8b 3e mov rdi, QWORD PTR [rsi] 0036e 80 f9 64 cmp cl, 100 ; 00000064H 00371 41 8b ec mov ebp, r12d 00374 41 0f 44 ee cmove ebp, r14d - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00378 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 0037f 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 00386 73 0f jae SHORT $LN171@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00388 0f b6 08 movzx ecx, BYTE PTR [rax] 0038b 48 ff c0 inc rax 0038e 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 00395 eb 26 jmp SHORT $LN173@stbi__proc $LN171@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00397 44 39 67 30 cmp DWORD PTR [rdi+48], r12d 0039b 74 1e je SHORT $LN172@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0039d 48 8b cf mov rcx, rdi 003a0 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 003a5 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 003ac 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -18871,53 +13546,34 @@ $LN171@stbi__proc: 00 00 mov QWORD PTR [rdi+192], rax 003b9 eb 02 jmp SHORT $LN173@stbi__proc $LN172@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 003bb 32 c9 xor cl, cl $LN173@stbi__proc: - -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) - +; Line 2662 003bd 48 8b 3e mov rdi, QWORD PTR [rsi] 003c0 80 f9 6f cmp cl, 111 ; 0000006fH 003c3 45 8b f4 mov r14d, r12d 003c6 44 0f 44 f5 cmove r14d, ebp - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 003ca 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 003d1 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 003d8 73 0f jae SHORT $LN176@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 003da 0f b6 08 movzx ecx, BYTE PTR [rax] 003dd 48 ff c0 inc rax 003e0 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 003e7 eb 26 jmp SHORT $LN178@stbi__proc $LN176@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 003e9 44 39 67 30 cmp DWORD PTR [rdi+48], r12d 003ed 74 1e je SHORT $LN177@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 003ef 48 8b cf mov rcx, rdi 003f2 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 003f7 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 003fe 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -18926,53 +13582,34 @@ $LN176@stbi__proc: 00 00 mov QWORD PTR [rdi+192], rax 0040b eb 02 jmp SHORT $LN178@stbi__proc $LN177@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 0040d 32 c9 xor cl, cl $LN178@stbi__proc: - -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) - +; Line 2662 0040f 48 8b 3e mov rdi, QWORD PTR [rsi] 00412 80 f9 62 cmp cl, 98 ; 00000062H 00415 45 8b fc mov r15d, r12d 00418 45 0f 44 fe cmove r15d, r14d - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0041c 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00423 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 0042a 73 0f jae SHORT $LN181@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 0042c 0f b6 08 movzx ecx, BYTE PTR [rax] 0042f 48 ff c0 inc rax 00432 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 00439 eb 26 jmp SHORT $LN183@stbi__proc $LN181@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0043b 44 39 67 30 cmp DWORD PTR [rdi+48], r12d 0043f 74 1e je SHORT $LN182@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00441 48 8b cf mov rcx, rdi 00444 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00449 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00450 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -18981,53 +13618,34 @@ $LN181@stbi__proc: 00 00 mov QWORD PTR [rdi+192], rax 0045d eb 02 jmp SHORT $LN183@stbi__proc $LN182@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 0045f 32 c9 xor cl, cl $LN183@stbi__proc: - -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) - +; Line 2662 00461 48 8b 3e mov rdi, QWORD PTR [rsi] 00464 80 f9 65 cmp cl, 101 ; 00000065H 00467 41 8b ec mov ebp, r12d 0046a 41 0f 44 ef cmove ebp, r15d - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0046e 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00475 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 0047c 73 0f jae SHORT $LN186@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 0047e 0f b6 08 movzx ecx, BYTE PTR [rax] 00481 48 ff c0 inc rax 00484 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 0048b eb 26 jmp SHORT $LN188@stbi__proc $LN186@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0048d 44 39 67 30 cmp DWORD PTR [rdi+48], r12d 00491 74 1e je SHORT $LN187@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00493 48 8b cf mov rcx, rdi 00496 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0049b 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 004a2 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -19036,105 +13654,69 @@ $LN186@stbi__proc: 00 00 mov QWORD PTR [rdi+192], rax 004af eb 02 jmp SHORT $LN188@stbi__proc $LN187@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 004b1 32 c9 xor cl, cl $LN188@stbi__proc: - -; 2663 : ok = 0; -; 2664 : L -= 6; - +; Line 2664 004b3 83 eb 06 sub ebx, 6 004b6 84 c9 test cl, cl 004b8 44 0f 44 e5 cmove r12d, ebp - -; 2665 : if (ok) { - +; Line 2665 004bc 45 85 e4 test r12d, r12d 004bf 0f 84 98 00 00 00 je $LN50@stbi__proc - -; 2666 : stbi__get8(z->s); // version - +; Line 2666 004c5 48 8b 3e mov rdi, QWORD PTR [rsi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 004c8 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 004cf 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 004d6 73 0c jae SHORT $LN116@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 004d8 48 ff c0 inc rax 004db 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 004e2 eb 15 jmp SHORT $LN117@stbi__proc $LN116@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 004e4 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 004e8 74 0f je SHORT $LN117@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 004ea 48 8b cf mov rcx, rdi 004ed e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 004f2 48 ff 87 c0 00 00 00 inc QWORD PTR [rdi+192] $LN117@stbi__proc: - -; 2667 : stbi__get16be(z->s); // flags0 - +; Line 2667 004f9 48 8b 0e mov rcx, QWORD PTR [rsi] 004fc e8 00 00 00 00 call stbi__get16be - -; 2668 : stbi__get16be(z->s); // flags1 - +; Line 2668 00501 48 8b 0e mov rcx, QWORD PTR [rsi] 00504 e8 00 00 00 00 call stbi__get16be - -; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform - +; Line 2669 00509 48 8b 3e mov rdi, QWORD PTR [rsi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0050c 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00513 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 0051a 73 0f jae SHORT $LN120@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 0051c 0f b6 08 movzx ecx, BYTE PTR [rax] 0051f 48 ff c0 inc rax 00522 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 00529 eb 26 jmp SHORT $LN119@stbi__proc $LN120@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0052b 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 0052f 74 1e je SHORT $LN121@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00531 48 8b cf mov rcx, rdi 00534 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00539 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00540 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -19143,105 +13725,67 @@ $LN120@stbi__proc: 00 00 mov QWORD PTR [rdi+192], rax 0054d eb 02 jmp SHORT $LN119@stbi__proc $LN121@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 0054f 32 c9 xor cl, cl $LN119@stbi__proc: - -; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform - +; Line 2669 00551 0f b6 c1 movzx eax, cl - -; 2670 : L -= 6; - +; Line 2670 00554 83 eb 06 sub ebx, 6 00557 89 86 4c 48 00 00 mov DWORD PTR [rsi+18508], eax $LN50@stbi__proc: - -; 2671 : } -; 2672 : } -; 2673 : -; 2674 : stbi__skip(z->s, L); - +; Line 2674 0055d 4c 8b 06 mov r8, QWORD PTR [rsi] - -; 1107 : if (n == 0) return; // already there! - +; Line 1107 00560 85 db test ebx, ebx 00562 74 61 je SHORT $LN93@stbi__proc - -; 1108 : if (n < 0) { - +; Line 1108 00564 79 18 jns SHORT $LN95@stbi__proc - -; 1109 : s->img_buffer = s->img_buffer_end; - +; Line 1109 00566 49 8b 80 c8 00 00 00 mov rax, QWORD PTR [r8+200] 0056d 49 89 80 c0 00 00 00 mov QWORD PTR [r8+192], rax - -; 2675 : return 1; - +; Line 2675 00574 b8 01 00 00 00 mov eax, 1 00579 e9 09 05 00 00 jmp $LN1@stbi__proc $LN95@stbi__proc: - -; 1112 : if (s->io.read) { - +; Line 1112 0057e 49 83 78 10 00 cmp QWORD PTR [r8+16], 0 00583 74 36 je SHORT $LN206@stbi__proc - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - +; Line 1113 00585 41 8b 88 c8 00 00 00 mov ecx, DWORD PTR [r8+200] 0058c 41 2b 88 c0 00 00 00 sub ecx, DWORD PTR [r8+192] - -; 1114 : if (blen < n) { - +; Line 1114 00593 3b cb cmp ecx, ebx 00595 7d 24 jge SHORT $LN206@stbi__proc - -; 1115 : s->img_buffer = s->img_buffer_end; - +; Line 1115 00597 49 8b 80 c8 00 00 00 mov rax, QWORD PTR [r8+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - +; Line 1116 0059e 2b d9 sub ebx, ecx 005a0 49 8b 48 28 mov rcx, QWORD PTR [r8+40] 005a4 8b d3 mov edx, ebx 005a6 49 89 80 c0 00 00 00 mov QWORD PTR [r8+192], rax 005ad 41 ff 50 18 call QWORD PTR [r8+24] - -; 2675 : return 1; - +; Line 2675 005b1 b8 01 00 00 00 mov eax, 1 005b6 e9 cc 04 00 00 jmp $LN1@stbi__proc $LN206@stbi__proc: - -; 1120 : s->img_buffer += n; - +; Line 1120 005bb 48 63 cb movsxd rcx, ebx 005be 49 01 88 c0 00 00 00 add QWORD PTR [r8+192], rcx $LN93@stbi__proc: - -; 2675 : return 1; - +; Line 2675 005c5 b8 01 00 00 00 mov eax, 1 005ca e9 b8 04 00 00 jmp $LN1@stbi__proc $LN23@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 005cf 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 005d5 65 48 8b 04 25 @@ -19252,26 +13796,16 @@ $LN23@stbi__proc: 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@KLNDOKJD@expected?5marker@ 005ee 48 89 14 01 mov QWORD PTR [rcx+rax], rdx $LN136@stbi__proc: - -; 2679 : } - +; Line 2679 005f2 33 c0 xor eax, eax 005f4 e9 8e 04 00 00 jmp $LN1@stbi__proc $LN24@stbi__proc: - -; 2580 : case STBI__MARKER_none: // no marker found -; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); -; 2582 : -; 2583 : case 0xDD: // DRI - specify restart interval -; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); - +; Line 2584 005f9 48 8b 0e mov rcx, QWORD PTR [rsi] 005fc e8 00 00 00 00 call stbi__get16be 00601 83 f8 04 cmp eax, 4 00604 74 2a je SHORT $LN25@stbi__proc - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00606 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0060c 65 48 8b 04 25 @@ -19281,39 +13815,23 @@ $LN24@stbi__proc: 0061e 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0M@LPHNODCG@bad?5DRI?5len@ 00625 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2580 : case STBI__MARKER_none: // no marker found -; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); -; 2582 : -; 2583 : case 0xDD: // DRI - specify restart interval -; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); - +; Line 2584 00629 33 c0 xor eax, eax 0062b e9 57 04 00 00 jmp $LN1@stbi__proc $LN25@stbi__proc: - -; 2585 : z->restart_interval = stbi__get16be(z->s); - +; Line 2585 00630 48 8b 0e mov rcx, QWORD PTR [rsi] 00633 e8 00 00 00 00 call stbi__get16be 00638 89 86 68 48 00 00 mov DWORD PTR [rsi+18536], eax - -; 2586 : return 1; - +; Line 2586 0063e b8 01 00 00 00 mov eax, 1 00643 e9 3f 04 00 00 jmp $LN1@stbi__proc $LN26@stbi__proc: - -; 2587 : -; 2588 : case 0xDB: // DQT - define quantization table -; 2589 : L = stbi__get16be(z->s) - 2; - +; Line 2589 00648 48 8b 0e mov rcx, QWORD PTR [rsi] 0064b e8 00 00 00 00 call stbi__get16be - -; 2590 : while (L > 0) { - +; Line 2590 00650 45 33 e4 xor r12d, r12d 00653 44 8d 78 fe lea r15d, DWORD PTR [rax-2] 00657 45 85 ff test r15d, r15d @@ -19324,40 +13842,28 @@ $LN26@stbi__proc: 00667 66 0f 1f 84 00 00 00 00 00 npad 9 $LL4@stbi__proc: - -; 2591 : int q = stbi__get8(z->s); - +; Line 2591 00670 48 8b 1e mov rbx, QWORD PTR [rsi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00673 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0067a 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00681 73 0f jae SHORT $LN63@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00683 0f b6 08 movzx ecx, BYTE PTR [rax] 00686 48 ff c0 inc rax 00689 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00690 eb 26 jmp SHORT $LN62@stbi__proc $LN63@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00692 44 39 63 30 cmp DWORD PTR [rbx+48], r12d 00696 74 1e je SHORT $LN64@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00698 48 8b cb mov rcx, rbx 0069b e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 006a0 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 006a7 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -19366,42 +13872,25 @@ $LN63@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 006b4 eb 02 jmp SHORT $LN62@stbi__proc $LN64@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 006b6 32 c9 xor cl, cl $LN62@stbi__proc: - -; 2591 : int q = stbi__get8(z->s); - +; Line 2591 006b8 0f b6 c1 movzx eax, cl - -; 2592 : int p = q >> 4, sixteen = (p != 0); - +; Line 2592 006bb 8b e8 mov ebp, eax - -; 2593 : int t = q & 15, i; - +; Line 2593 006bd 83 e0 0f and eax, 15 006c0 c1 ed 04 shr ebp, 4 - -; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); - +; Line 2594 006c3 83 fd 01 cmp ebp, 1 006c6 0f 87 d2 00 00 00 ja $LN131@stbi__proc - -; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); - +; Line 2595 006cc 83 f8 03 cmp eax, 3 006cf 0f 87 9f 00 00 00 ja $LN132@stbi__proc - -; 2596 : -; 2597 : for (i = 0; i < 64; ++i) -; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); - +; Line 2598 006d5 44 8b f0 mov r14d, eax 006d8 49 8b fc mov rdi, r12 006db 49 c1 e6 06 shl r14, 6 @@ -19415,36 +13904,26 @@ $LL8@stbi__proc: 006ef 8b c8 mov ecx, eax 006f1 eb 48 jmp SHORT $LN53@stbi__proc $LN52@stbi__proc: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 006f3 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 006fa 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00701 73 0f jae SHORT $LN71@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00703 0f b6 08 movzx ecx, BYTE PTR [rax] 00706 48 ff c0 inc rax 00709 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00710 eb 26 jmp SHORT $LN70@stbi__proc $LN71@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00712 44 39 63 30 cmp DWORD PTR [rbx+48], r12d 00716 74 1e je SHORT $LN72@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00718 48 8b cb mov rcx, rbx 0071b e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00720 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00727 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -19453,17 +13932,10 @@ $LN71@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 00734 eb 02 jmp SHORT $LN70@stbi__proc $LN72@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00736 32 c9 xor cl, cl $LN70@stbi__proc: - -; 2596 : -; 2597 : for (i = 0; i < 64; ++i) -; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); - +; Line 2598 00738 0f b6 c9 movzx ecx, cl $LN53@stbi__proc: 0073b 42 0f b6 04 2f movzx eax, BYTE PTR [rdi+r13] @@ -19473,9 +13945,7 @@ $LN53@stbi__proc: 34 00 00 mov WORD PTR [rsi+rax*2+13448], cx 0074e 48 83 ff 40 cmp rdi, 64 ; 00000040H 00752 7c 8c jl SHORT $LL8@stbi__proc - -; 2599 : L -= (sixteen ? 129 : 65); - +; Line 2599 00754 85 ed test ebp, ebp 00756 b8 41 00 00 00 mov eax, 65 ; 00000041H 0075b b9 81 00 00 00 mov ecx, 129 ; 00000081H @@ -19484,14 +13954,10 @@ $LN53@stbi__proc: 00766 45 85 ff test r15d, r15d 00769 0f 8f 01 ff ff ff jg $LL4@stbi__proc - -; 2590 : while (L > 0) { - +; Line 2590 0076f e9 09 03 00 00 jmp $LN5@stbi__proc $LN132@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00774 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0077a 65 48 8b 04 25 @@ -19501,15 +13967,11 @@ $LN132@stbi__proc: 0078c 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0O@CNHKKDIM@bad?5DQT?5table@ 00793 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); - +; Line 2595 00797 33 c0 xor eax, eax 00799 e9 e9 02 00 00 jmp $LN1@stbi__proc $LN131@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0079e 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 007a4 65 48 8b 04 25 @@ -19519,24 +13981,14 @@ $LN131@stbi__proc: 007b6 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0N@BOFJCHAP@bad?5DQT?5type@ 007bd 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); - +; Line 2594 007c1 33 c0 xor eax, eax 007c3 e9 bf 02 00 00 jmp $LN1@stbi__proc $LN29@stbi__proc: - -; 2600 : } -; 2601 : return L == 0; -; 2602 : -; 2603 : case 0xC4: // DHT - define huffman table -; 2604 : L = stbi__get16be(z->s) - 2; - +; Line 2604 007c8 48 8b 0e mov rcx, QWORD PTR [rsi] 007cb e8 00 00 00 00 call stbi__get16be - -; 2605 : while (L > 0) { - +; Line 2605 007d0 33 c9 xor ecx, ecx 007d2 44 8d 78 fe lea r15d, DWORD PTR [rax-2] 007d6 45 85 ff test r15d, r15d @@ -19544,43 +13996,29 @@ $LN29@stbi__proc: 00 jle $LN10@stbi__proc 007df 90 npad 1 $LL9@stbi__proc: - -; 2606 : stbi_uc* v; -; 2607 : int sizes[16], i, n = 0; -; 2608 : int q = stbi__get8(z->s); - +; Line 2608 007e0 48 8b 1e mov rbx, QWORD PTR [rsi] 007e3 44 8b e9 mov r13d, ecx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 007e6 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 007ed 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 007f4 73 0f jae SHORT $LN67@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 007f6 0f b6 08 movzx ecx, BYTE PTR [rax] 007f9 48 ff c0 inc rax 007fc 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00803 eb 26 jmp SHORT $LN66@stbi__proc $LN67@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00805 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00809 74 1e je SHORT $LN68@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0080b 48 8b cb mov rcx, rbx 0080e e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00813 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0081a 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -19589,78 +14027,51 @@ $LN67@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 00827 eb 02 jmp SHORT $LN66@stbi__proc $LN68@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00829 32 c9 xor cl, cl $LN66@stbi__proc: - -; 2606 : stbi_uc* v; -; 2607 : int sizes[16], i, n = 0; -; 2608 : int q = stbi__get8(z->s); - +; Line 2608 0082b 44 0f b6 f1 movzx r14d, cl - -; 2609 : int tc = q >> 4; - +; Line 2609 0082f 45 8b e6 mov r12d, r14d - -; 2610 : int th = q & 15; - +; Line 2610 00832 41 83 e6 0f and r14d, 15 00836 41 c1 ec 04 shr r12d, 4 - -; 2611 : if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG"); - +; Line 2611 0083a 41 83 fc 01 cmp r12d, 1 0083e 0f 87 71 02 00 00 ja $LN31@stbi__proc 00844 41 83 fe 03 cmp r14d, 3 00848 0f 87 67 02 00 00 ja $LN31@stbi__proc - -; 2612 : for (i = 0; i < 16; ++i) { - - 0084e 48 8d 7c 24 30 lea rdi, QWORD PTR sizes$9[rsp] +; Line 2612 + 0084e 48 8d 7c 24 30 lea rdi, QWORD PTR sizes$1[rsp] 00853 bd 10 00 00 00 mov ebp, 16 00858 0f 1f 84 00 00 00 00 00 npad 8 $LL13@stbi__proc: - -; 2613 : sizes[i] = stbi__get8(z->s); - +; Line 2613 00860 48 8b 1e mov rbx, QWORD PTR [rsi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00863 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0086a 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00871 73 0f jae SHORT $LN59@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00873 0f b6 08 movzx ecx, BYTE PTR [rax] 00876 48 ff c0 inc rax 00879 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00880 eb 26 jmp SHORT $LN58@stbi__proc $LN59@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00882 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00886 74 1e je SHORT $LN60@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00888 48 8b cb mov rcx, rbx 0088b e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00890 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00897 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -19669,40 +14080,26 @@ $LN59@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 008a4 eb 02 jmp SHORT $LN58@stbi__proc $LN60@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 008a6 32 c9 xor cl, cl $LN58@stbi__proc: - -; 2613 : sizes[i] = stbi__get8(z->s); - +; Line 2613 008a8 0f b6 c1 movzx eax, cl 008ab 89 07 mov DWORD PTR [rdi], eax - -; 2614 : n += sizes[i]; - +; Line 2614 008ad 44 03 e8 add r13d, eax 008b0 48 83 c7 04 add rdi, 4 008b4 48 83 ed 01 sub rbp, 1 008b8 75 a6 jne SHORT $LL13@stbi__proc - -; 2615 : } -; 2616 : if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values! - +; Line 2616 008ba 41 81 fd 00 01 00 00 cmp r13d, 256 ; 00000100H 008c1 0f 8f ee 01 00 00 jg $LN31@stbi__proc - -; 2617 : L -= 17; - +; Line 2617 008c7 41 83 ef 11 sub r15d, 17 - -; 2618 : if (tc == 0) { - - 008cb 48 8d 54 24 30 lea rdx, QWORD PTR sizes$9[rsp] +; Line 2618 + 008cb 48 8d 54 24 30 lea rdx, QWORD PTR sizes$1[rsp] 008d0 44 89 7c 24 20 mov DWORD PTR L$3$[rsp], r15d 008d5 45 8b fe mov r15d, r14d 008d8 49 69 df 90 06 @@ -19710,42 +14107,28 @@ $LN58@stbi__proc: 008df 48 03 de add rbx, rsi 008e2 45 85 e4 test r12d, r12d 008e5 75 18 jne SHORT $LN33@stbi__proc - -; 2619 : if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0; - +; Line 2619 008e7 48 8d 4b 08 lea rcx, QWORD PTR [rbx+8] 008eb e8 00 00 00 00 call stbi__build_huffman 008f0 85 c0 test eax, eax 008f2 0f 84 fa fc ff ff je $LN136@stbi__proc - -; 2620 : v = z->huff_dc[th].values; - +; Line 2620 008f8 b8 08 04 00 00 mov eax, 1032 ; 00000408H - -; 2621 : } - +; Line 2621 008fd eb 19 jmp SHORT $LN34@stbi__proc $LN33@stbi__proc: - -; 2622 : else { -; 2623 : if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0; - +; Line 2623 008ff 48 8d 8b 48 1a 00 00 lea rcx, QWORD PTR [rbx+6728] 00906 e8 00 00 00 00 call stbi__build_huffman 0090b 85 c0 test eax, eax 0090d 0f 84 df fc ff ff je $LN136@stbi__proc - -; 2624 : v = z->huff_ac[th].values; - +; Line 2624 00913 b8 48 1e 00 00 mov eax, 7752 ; 00001e48H $LN34@stbi__proc: - -; 2625 : } -; 2626 : for (i = 0; i < n; ++i) - +; Line 2626 00918 33 c9 xor ecx, ecx 0091a 49 63 ed movsxd rbp, r13d 0091d 4c 8d 34 18 lea r14, QWORD PTR [rax+rbx] @@ -19755,40 +14138,28 @@ $LN34@stbi__proc: 00928 0f 1f 84 00 00 00 00 00 npad 8 $LL16@stbi__proc: - -; 2627 : v[i] = stbi__get8(z->s); - +; Line 2627 00930 48 8b 1e mov rbx, QWORD PTR [rsi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00933 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0093a 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00941 73 0f jae SHORT $LN55@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00943 0f b6 08 movzx ecx, BYTE PTR [rax] 00946 48 ff c0 inc rax 00949 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00950 eb 26 jmp SHORT $LN54@stbi__proc $LN55@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00952 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00956 74 1e je SHORT $LN56@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00958 48 8b cb mov rcx, rbx 0095b e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00960 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00967 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -19797,30 +14168,21 @@ $LN55@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 00974 eb 02 jmp SHORT $LN54@stbi__proc $LN56@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00976 32 c9 xor cl, cl $LN54@stbi__proc: - -; 2627 : v[i] = stbi__get8(z->s); - +; Line 2627 00978 41 88 0c 3e mov BYTE PTR [r14+rdi], cl 0097c 48 ff c7 inc rdi 0097f 48 3b fd cmp rdi, rbp 00982 7c ac jl SHORT $LL16@stbi__proc 00984 33 c9 xor ecx, ecx $LN15@stbi__proc: - -; 2628 : if (tc != 0) - +; Line 2628 00986 45 85 e4 test r12d, r12d 00989 0f 84 d7 00 00 00 je $LN76@stbi__proc - -; 2629 : stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); - +; Line 2629 0098f 4d 69 f7 90 06 00 00 imul r14, r15, 1680 ; 00000690H 00996 49 c1 e7 0a shl r15, 10 @@ -19832,53 +14194,33 @@ $LN15@stbi__proc: 009aa 49 8d 9e 48 1a 00 00 lea rbx, QWORD PTR [r14+6728] $LL77@stbi__proc: - -; 1516 : stbi_uc fast = h->fast[i]; - +; Line 1516 009b1 0f b6 03 movzx eax, BYTE PTR [rbx] - -; 1517 : fast_ac[i] = 0; - +; Line 1517 009b4 66 41 89 0a mov WORD PTR [r10], cx - -; 1518 : if (fast < 255) { - +; Line 1518 009b8 3c ff cmp al, 255 ; 000000ffH 009ba 0f 83 8f 00 00 00 jae $LN75@stbi__proc - -; 1519 : int rs = h->values[fast]; - +; Line 1519 009c0 46 0f b6 8c 30 48 1e 00 00 movzx r9d, BYTE PTR [rax+r14+7752] - -; 1520 : int run = (rs >> 4) & 15; -; 1521 : int magbits = rs & 15; -; 1522 : int len = h->size[fast]; - +; Line 1522 009c9 42 0f b6 bc 30 48 1f 00 00 movzx edi, BYTE PTR [rax+r14+8008] 009d2 41 8b e9 mov ebp, r9d 009d5 c1 ed 04 shr ebp, 4 009d8 41 83 e1 0f and r9d, 15 - -; 1523 : -; 1524 : if (magbits && len + magbits <= FAST_BITS) { - +; Line 1524 009dc 74 71 je SHORT $LN75@stbi__proc 009de 42 8d 04 0f lea eax, DWORD PTR [rdi+r9] 009e2 83 f8 09 cmp eax, 9 009e5 77 68 ja SHORT $LN75@stbi__proc - -; 1525 : // magnitude code followed by receive_extend code -; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); - +; Line 1526 009e7 8b cf mov ecx, edi 009e9 45 8b c3 mov r8d, r11d 009ec 41 d3 e0 shl r8d, cl - -; 1527 : int m = 1 << (magbits - 1); - +; Line 1527 009ef b8 01 00 00 00 mov eax, 1 009f4 41 81 e0 ff 01 00 00 and r8d, 511 ; 000001ffH @@ -19887,9 +14229,7 @@ $LL77@stbi__proc: 00a03 41 d3 f8 sar r8d, cl 00a06 41 8d 49 ff lea ecx, DWORD PTR [r9-1] 00a0a d3 e0 shl eax, cl - -; 1528 : if (k < m) k += (~0U << magbits) + 1; - +; Line 1528 00a0c 44 3b c0 cmp r8d, eax 00a0f 7d 14 jge SHORT $LN80@stbi__proc 00a11 41 8b c9 mov ecx, r9d @@ -19899,17 +14239,12 @@ $LL77@stbi__proc: 00a20 2b c2 sub eax, edx 00a22 44 03 c0 add r8d, eax $LN80@stbi__proc: - -; 1529 : // if the result is small enough, we can fit it in fast_ac table -; 1530 : if (k >= -128 && k <= 127) - +; Line 1530 00a25 41 8d 80 80 00 00 00 lea eax, DWORD PTR [r8+128] 00a2c 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 00a31 77 1a ja SHORT $LN210@stbi__proc - -; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); - +; Line 1531 00a33 66 41 c1 e0 04 shl r8w, 4 00a38 66 44 03 c5 add r8w, bp 00a3c 66 41 c1 e0 04 shl r8w, 4 @@ -19917,403 +14252,7 @@ $LN80@stbi__proc: 00a45 66 45 03 c1 add r8w, r9w 00a49 66 45 89 02 mov WORD PTR [r10], r8w $LN210@stbi__proc: - -; 1121 : } -; 1122 : #endif -; 1123 : -; 1124 : #if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) -; 1125 : // nothing -; 1126 : #else -; 1127 : static int stbi__getn(stbi__context* s, stbi_uc* buffer, int n) -; 1128 : { -; 1129 : if (s->io.read) { -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1131 : if (blen < n) { -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; -; 1139 : return res; -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { -; 1144 : memcpy(buffer, s->img_buffer, n); -; 1145 : s->img_buffer += n; -; 1146 : return 1; -; 1147 : } -; 1148 : else -; 1149 : return 0; -; 1150 : } -; 1151 : #endif -; 1152 : -; 1153 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1154 : // nothing -; 1155 : #else -; 1156 : static int stbi__get16be(stbi__context* s) -; 1157 : { -; 1158 : int z = stbi__get8(s); -; 1159 : return (z << 8) + stbi__get8(s); -; 1160 : } -; 1161 : #endif -; 1162 : -; 1163 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1164 : // nothing -; 1165 : #else -; 1166 : static stbi__uint32 stbi__get32be(stbi__context* s) -; 1167 : { -; 1168 : stbi__uint32 z = stbi__get16be(s); -; 1169 : return (z << 16) + stbi__get16be(s); -; 1170 : } -; 1171 : #endif -; 1172 : -; 1173 : #if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -; 1174 : // nothing -; 1175 : #else -; 1176 : static int stbi__get16le(stbi__context* s) -; 1177 : { -; 1178 : int z = stbi__get8(s); -; 1179 : return z + (stbi__get8(s) << 8); -; 1180 : } -; 1181 : #endif -; 1182 : -; 1183 : #ifndef STBI_NO_BMP -; 1184 : static stbi__uint32 stbi__get32le(stbi__context* s) -; 1185 : { -; 1186 : stbi__uint32 z = stbi__get16le(s); -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; -; 1188 : return z; -; 1189 : } -; 1190 : #endif -; 1191 : -; 1192 : #define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings -; 1193 : -; 1194 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1195 : // nothing -; 1196 : #else -; 1197 : ////////////////////////////////////////////////////////////////////////////// -; 1198 : // -; 1199 : // generic converter from built-in img_n to req_comp -; 1200 : // individual types do this automatically as much as possible (e.g. jpeg -; 1201 : // does all cases internally since it needs to colorspace convert anyway, -; 1202 : // and it never has alpha, so very few cases ). png can automatically -; 1203 : // interleave an alpha=255 channel, but falls back to this for other cases -; 1204 : // -; 1205 : // assume data buffer is malloced, so malloc a new one and free that one -; 1206 : // only failure mode is malloc failing -; 1207 : -; 1208 : static stbi_uc stbi__compute_y(int r, int g, int b) -; 1209 : { -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1211 : } -; 1212 : #endif -; 1213 : -; 1214 : #if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1215 : // nothing -; 1216 : #else -; 1217 : static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1218 : { -; 1219 : int i, j; -; 1220 : unsigned char* good; -; 1221 : -; 1222 : if (req_comp == img_n) return data; -; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1224 : -; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); -; 1226 : if (good == NULL) { -; 1227 : STBI_FREE(data); -; 1228 : return stbi__errpuc("outofmem", "Out of memory"); -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { -; 1232 : unsigned char* src = data + j * x * img_n; -; 1233 : unsigned char* dest = good + j * x * req_comp; -; 1234 : -; 1235 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1236 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1237 : // convert source image with img_n components to one with req_comp components; -; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1239 : switch (STBI__COMBO(img_n, req_comp)) { -; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; -; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; -; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1253 : } -; 1254 : #undef STBI__CASE -; 1255 : } -; 1256 : -; 1257 : STBI_FREE(data); -; 1258 : return good; -; 1259 : } -; 1260 : #endif -; 1261 : -; 1262 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1263 : // nothing -; 1264 : #else -; 1265 : static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -; 1266 : { -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1268 : } -; 1269 : #endif -; 1270 : -; 1271 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1272 : // nothing -; 1273 : #else -; 1274 : static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1275 : { -; 1276 : int i, j; -; 1277 : stbi__uint16* good; -; 1278 : -; 1279 : if (req_comp == img_n) return data; -; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1281 : -; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); -; 1283 : if (good == NULL) { -; 1284 : STBI_FREE(data); -; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { -; 1289 : stbi__uint16* src = data + j * x * img_n; -; 1290 : stbi__uint16* dest = good + j * x * req_comp; -; 1291 : -; 1292 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1293 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1294 : // convert source image with img_n components to one with req_comp components; -; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1296 : switch (STBI__COMBO(img_n, req_comp)) { -; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; -; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; -; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1310 : } -; 1311 : #undef STBI__CASE -; 1312 : } -; 1313 : -; 1314 : STBI_FREE(data); -; 1315 : return good; -; 1316 : } -; 1317 : #endif -; 1318 : -; 1319 : #ifndef STBI_NO_LINEAR -; 1320 : static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp) -; 1321 : { -; 1322 : int i, k, n; -; 1323 : float* output; -; 1324 : if (!data) return NULL; -; 1325 : output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0); -; 1326 : if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } -; 1327 : // compute number of non-alpha components -; 1328 : if (comp & 1) n = comp; else n = comp - 1; -; 1329 : for (i = 0; i < x * y; ++i) { -; 1330 : for (k = 0; k < n; ++k) { -; 1331 : output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale); -; 1332 : } -; 1333 : } -; 1334 : if (n < comp) { -; 1335 : for (i = 0; i < x * y; ++i) { -; 1336 : output[i * comp + n] = data[i * comp + n] / 255.0f; -; 1337 : } -; 1338 : } -; 1339 : STBI_FREE(data); -; 1340 : return output; -; 1341 : } -; 1342 : #endif -; 1343 : -; 1344 : #ifndef STBI_NO_HDR -; 1345 : #define stbi__float2int(x) ((int) (x)) -; 1346 : static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp) -; 1347 : { -; 1348 : int i, k, n; -; 1349 : stbi_uc* output; -; 1350 : if (!data) return NULL; -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } -; 1353 : // compute number of non-alpha components -; 1354 : if (comp & 1) n = comp; else n = comp - 1; -; 1355 : for (i = 0; i < x * y; ++i) { -; 1356 : for (k = 0; k < n; ++k) { -; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; -; 1358 : if (z < 0) z = 0; -; 1359 : if (z > 255) z = 255; -; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1361 : } -; 1362 : if (k < comp) { -; 1363 : float z = data[i * comp + k] * 255 + 0.5f; -; 1364 : if (z < 0) z = 0; -; 1365 : if (z > 255) z = 255; -; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1367 : } -; 1368 : } -; 1369 : STBI_FREE(data); -; 1370 : return output; -; 1371 : } -; 1372 : #endif -; 1373 : -; 1374 : ////////////////////////////////////////////////////////////////////////////// -; 1375 : // -; 1376 : // "baseline" JPEG/JFIF decoder -; 1377 : // -; 1378 : // simple implementation -; 1379 : // - doesn't support delayed output of y-dimension -; 1380 : // - simple interface (only one output format: 8-bit interleaved RGB) -; 1381 : // - doesn't try to recover corrupt jpegs -; 1382 : // - doesn't allow partial loading, loading multiple at once -; 1383 : // - still fast on x86 (copying globals into locals doesn't help x86) -; 1384 : // - allocates lots of intermediate memory (full size of all components) -; 1385 : // - non-interleaved case requires this anyway -; 1386 : // - allows good upsampling (see next) -; 1387 : // high-quality -; 1388 : // - upsampled channels are bilinearly interpolated, even across blocks -; 1389 : // - quality integer IDCT derived from IJG's 'slow' -; 1390 : // performance -; 1391 : // - fast huffman; reasonable integer IDCT -; 1392 : // - some SIMD kernels for common paths on targets with SSE2/NEON -; 1393 : // - uses a lot of intermediate memory, could cache poorly -; 1394 : -; 1395 : #ifndef STBI_NO_JPEG -; 1396 : -; 1397 : // huffman decoding acceleration -; 1398 : #define FAST_BITS 9 // larger handles more cases; smaller stomps less cache -; 1399 : -; 1400 : typedef struct -; 1401 : { -; 1402 : stbi_uc fast[1 << FAST_BITS]; -; 1403 : // weirdly, repacking this into AoS is a 10% speed loss, instead of a win -; 1404 : stbi__uint16 code[256]; -; 1405 : stbi_uc values[256]; -; 1406 : stbi_uc size[257]; -; 1407 : unsigned int maxcode[18]; -; 1408 : int delta[17]; // old 'firstsymbol' - old 'firstcode' -; 1409 : } stbi__huffman; -; 1410 : -; 1411 : typedef struct -; 1412 : { -; 1413 : stbi__context* s; -; 1414 : stbi__huffman huff_dc[4]; -; 1415 : stbi__huffman huff_ac[4]; -; 1416 : stbi__uint16 dequant[4][64]; -; 1417 : stbi__int16 fast_ac[4][1 << FAST_BITS]; -; 1418 : -; 1419 : // sizes for components, interleaved MCUs -; 1420 : int img_h_max, img_v_max; -; 1421 : int img_mcu_x, img_mcu_y; -; 1422 : int img_mcu_w, img_mcu_h; -; 1423 : -; 1424 : // definition of jpeg image component -; 1425 : struct -; 1426 : { -; 1427 : int id; -; 1428 : int h, v; -; 1429 : int tq; -; 1430 : int hd, ha; -; 1431 : int dc_pred; -; 1432 : -; 1433 : int x, y, w2, h2; -; 1434 : stbi_uc* data; -; 1435 : void* raw_data, * raw_coeff; -; 1436 : stbi_uc* linebuf; -; 1437 : short* coeff; // progressive only -; 1438 : int coeff_w, coeff_h; // number of 8x8 coefficient blocks -; 1439 : } img_comp[4]; -; 1440 : -; 1441 : stbi__uint32 code_buffer; // jpeg entropy-coded buffer -; 1442 : int code_bits; // number of valid bits -; 1443 : unsigned char marker; // marker seen while filling entropy buffer -; 1444 : int nomore; // flag if we saw a marker so must stop -; 1445 : -; 1446 : int progressive; -; 1447 : int spec_start; -; 1448 : int spec_end; -; 1449 : int succ_high; -; 1450 : int succ_low; -; 1451 : int eob_run; -; 1452 : int jfif; -; 1453 : int app14_color_transform; // Adobe APP14 tag -; 1454 : int rgb; -; 1455 : -; 1456 : int scan_n, order[4]; -; 1457 : int restart_interval, todo; -; 1458 : -; 1459 : // kernels -; 1460 : void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]); -; 1461 : void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); -; 1462 : stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); -; 1463 : } stbi__jpeg; -; 1464 : -; 1465 : static int stbi__build_huffman(stbi__huffman* h, int* count) -; 1466 : { -; 1467 : int i, j, k = 0; -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { -; 1471 : for (j = 0; j < count[i]; ++j) { -; 1472 : h->size[k++] = (stbi_uc)(i + 1); -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); -; 1474 : } -; 1475 : } -; 1476 : h->size[k] = 0; -; 1477 : -; 1478 : // compute actual symbols (from jpeg spec) -; 1479 : code = 0; -; 1480 : k = 0; -; 1481 : for (j = 1; j <= 16; ++j) { -; 1482 : // compute delta to add to code to compute symbol id -; 1483 : h->delta[j] = k - code; -; 1484 : if (h->size[k] == j) { -; 1485 : while (h->size[k] == j) -; 1486 : h->code[k++] = (stbi__uint16)(code++); -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); -; 1488 : } -; 1489 : // compute largest code + 1 for this size, preshifted as needed later -; 1490 : h->maxcode[j] = code << (16 - j); -; 1491 : code <<= 1; -; 1492 : } -; 1493 : h->maxcode[j] = 0xffffffff; -; 1494 : -; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated -; 1496 : memset(h->fast, 255, 1 << FAST_BITS); -; 1497 : for (i = 0; i < k; ++i) { -; 1498 : int s = h->size[i]; -; 1499 : if (s <= FAST_BITS) { -; 1500 : int c = h->code[i] << (FAST_BITS - s); -; 1501 : int m = 1 << (FAST_BITS - s); -; 1502 : for (j = 0; j < m; ++j) { -; 1503 : h->fast[c + j] = (stbi_uc)i; -; 1504 : } -; 1505 : } -; 1506 : } -; 1507 : return 1; -; 1508 : } -; 1509 : -; 1510 : // build a table that decodes both magnitude and value of small ACs in -; 1511 : // one go. -; 1512 : static void stbi__build_fast_ac(stbi__int16* fast_ac, stbi__huffman* h) -; 1513 : { -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { - +; Line 1515 00a4d 33 c9 xor ecx, ecx $LN75@stbi__proc: 00a4f 41 ff c3 inc r11d @@ -20324,25 +14263,18 @@ $LN75@stbi__proc: 00a60 0f 8c 4b ff ff ff jl $LL77@stbi__proc $LN76@stbi__proc: - -; 2630 : L -= n; - +; Line 2630 00a66 44 8b 7c 24 20 mov r15d, DWORD PTR L$3$[rsp] 00a6b 45 2b fd sub r15d, r13d 00a6e 45 85 ff test r15d, r15d 00a71 0f 8f 69 fd ff ff jg $LL9@stbi__proc $LN10@stbi__proc: - -; 2631 : } -; 2632 : return L == 0; - +; Line 2632 00a77 41 bc 00 00 00 00 mov r12d, 0 $LN5@stbi__proc: - -; 2679 : } - +; Line 2679 00a7d 45 85 ff test r15d, r15d $LN289@stbi__proc: 00a80 41 0f 94 c4 sete r12b @@ -20378,60 +14310,43 @@ $LN31@stbi__proc: stbi__process_marker ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__process_scan_header _TEXT SEGMENT z$ = 48 stbi__process_scan_header PROC ; COMDAT - -; 2683 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2683 00000 48 89 5c 24 18 mov QWORD PTR [rsp+24], rbx 00005 48 89 74 24 20 mov QWORD PTR [rsp+32], rsi 0000a 57 push rdi 0000b 48 83 ec 20 sub rsp, 32 ; 00000020H 0000f 48 8b f9 mov rdi, rcx - -; 2684 : int i; -; 2685 : int Ls = stbi__get16be(z->s); - +; Line 2685 00012 48 8b 09 mov rcx, QWORD PTR [rcx] 00015 e8 00 00 00 00 call stbi__get16be - -; 2686 : z->scan_n = stbi__get8(z->s); - +; Line 2686 0001a 48 8b 1f mov rbx, QWORD PTR [rdi] 0001d 8b f0 mov esi, eax - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0001f 48 8b 93 c0 00 00 00 mov rdx, QWORD PTR [rbx+192] 00026 48 3b 93 c8 00 00 00 cmp rdx, QWORD PTR [rbx+200] 0002d 73 0f jae SHORT $LN24@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 0002f 0f b6 0a movzx ecx, BYTE PTR [rdx] 00032 48 ff c2 inc rdx 00035 48 89 93 c0 00 00 00 mov QWORD PTR [rbx+192], rdx 0003c eb 26 jmp SHORT $LN23@stbi__proc $LN24@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0003e 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00042 74 1e je SHORT $LN25@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00044 48 8b cb mov rcx, rbx 00047 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0004c 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00053 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -20440,21 +14355,14 @@ $LN24@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 00060 eb 02 jmp SHORT $LN23@stbi__proc $LN25@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00062 32 c9 xor cl, cl $LN23@stbi__proc: - -; 2686 : z->scan_n = stbi__get8(z->s); - +; Line 2686 00064 0f b6 c9 movzx ecx, cl 00067 89 8f 54 48 00 00 mov DWORD PTR [rdi+18516], ecx - -; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); - +; Line 2687 0006d 8d 41 ff lea eax, DWORD PTR [rcx-1] 00070 83 f8 03 cmp eax, 3 00073 0f 87 48 03 00 @@ -20463,16 +14371,12 @@ $LN23@stbi__proc: 0007c 3b 48 08 cmp ecx, DWORD PTR [rax+8] 0007f 0f 8f 3c 03 00 00 jg $LN9@stbi__proc - -; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); - +; Line 2688 00085 8d 04 4d 06 00 00 00 lea eax, DWORD PTR [rcx*2+6] 0008c 3b f0 cmp esi, eax 0008e 74 35 je SHORT $LN10@stbi__proc - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00090 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00096 65 48 8b 04 25 @@ -20482,13 +14386,9 @@ $LN23@stbi__proc: 000a8 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0M@GNEHAHOH@bad?5SOS?5len@ 000af 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); - +; Line 2688 000b3 33 c0 xor eax, eax - -; 2720 : } - +; Line 2720 000b5 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] 000ba 48 8b 74 24 48 mov rsi, QWORD PTR [rsp+72] 000bf 48 83 c4 20 add rsp, 32 ; 00000020H @@ -20496,9 +14396,7 @@ $LN23@stbi__proc: 000c4 c3 ret 0 $LN10@stbi__proc: 000c5 48 89 6c 24 30 mov QWORD PTR [rsp+48], rbp - -; 2689 : for (i = 0; i < z->scan_n; ++i) { - +; Line 2689 000ca 33 ed xor ebp, ebp 000cc 4c 89 74 24 38 mov QWORD PTR [rsp+56], r14 000d1 4c 8d b7 58 48 @@ -20506,40 +14404,28 @@ $LN10@stbi__proc: 000d8 0f 1f 84 00 00 00 00 00 npad 8 $LL4@stbi__proc: - -; 2690 : int id = stbi__get8(z->s), which; - +; Line 2690 000e0 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000e3 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000ea 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 000f1 73 0f jae SHORT $LN32@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 000f3 0f b6 08 movzx ecx, BYTE PTR [rax] 000f6 48 ff c0 inc rax 000f9 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00100 eb 26 jmp SHORT $LN31@stbi__proc $LN32@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00102 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00106 74 1e je SHORT $LN33@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00108 48 8b cb mov rcx, rbx 0010b e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00110 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00117 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -20548,47 +14434,32 @@ $LN32@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 00124 eb 02 jmp SHORT $LN31@stbi__proc $LN33@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00126 32 c9 xor cl, cl $LN31@stbi__proc: - -; 2691 : int q = stbi__get8(z->s); - +; Line 2691 00128 48 8b 1f mov rbx, QWORD PTR [rdi] 0012b 0f b6 f1 movzx esi, cl - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0012e 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00135 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0013c 73 0f jae SHORT $LN36@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 0013e 0f b6 08 movzx ecx, BYTE PTR [rax] 00141 48 ff c0 inc rax 00144 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0014b eb 26 jmp SHORT $LN35@stbi__proc $LN36@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0014d 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00151 74 1e je SHORT $LN37@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00153 48 8b cb mov rcx, rbx 00156 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0015b 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00162 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -20597,15 +14468,10 @@ $LN36@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 0016f eb 02 jmp SHORT $LN35@stbi__proc $LN37@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00171 32 c9 xor cl, cl $LN35@stbi__proc: - -; 2692 : for (which = 0; which < z->s->img_n; ++which) - +; Line 2692 00173 48 8b 07 mov rax, QWORD PTR [rdi] 00176 33 d2 xor edx, edx 00178 44 0f b6 c9 movzx r9d, cl @@ -20613,37 +14479,26 @@ $LN35@stbi__proc: 0017f 8b 48 08 mov ecx, DWORD PTR [rax+8] 00182 85 c9 test ecx, ecx 00184 7e 1b jle SHORT $LN73@stbi__proc - -; 2691 : int q = stbi__get8(z->s); - +; Line 2691 00186 48 8d 87 a0 46 00 00 lea rax, QWORD PTR [rdi+18080] 0018d 0f 1f 00 npad 3 $LL7@stbi__proc: - -; 2693 : if (z->img_comp[which].id == id) - +; Line 2693 00190 39 30 cmp DWORD PTR [rax], esi 00192 74 0d je SHORT $LN73@stbi__proc - -; 2692 : for (which = 0; which < z->s->img_n; ++which) - +; Line 2692 00194 ff c2 inc edx 00196 49 ff c0 inc r8 00199 48 83 c0 60 add rax, 96 ; 00000060H 0019d 3b d1 cmp edx, ecx 0019f 7c ef jl SHORT $LL7@stbi__proc $LN73@stbi__proc: - -; 2694 : break; -; 2695 : if (which == z->s->img_n) return 0; // no match - +; Line 2695 001a1 3b d1 cmp edx, ecx 001a3 0f 84 9d 01 00 00 je $LN64@stbi__proc - -; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); - +; Line 2696 001a9 4b 8d 04 40 lea rax, QWORD PTR [r8+r8*2] 001ad 41 8b c9 mov ecx, r9d 001b0 48 c1 e0 05 shl rax, 5 @@ -20653,18 +14508,14 @@ $LN73@stbi__proc: 001be 83 f9 03 cmp ecx, 3 001c1 0f 87 d9 01 00 00 ja $LN65@stbi__proc - -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); - +; Line 2697 001c7 41 83 e1 0f and r9d, 15 001cb 44 89 8c 38 b4 46 00 00 mov DWORD PTR [rax+rdi+18100], r9d 001d3 41 83 f9 03 cmp r9d, 3 001d7 0f 87 a2 01 00 00 ja $LN66@stbi__proc - -; 2698 : z->order[i] = which; - +; Line 2698 001dd 41 89 16 mov DWORD PTR [r14], edx 001e0 ff c5 inc ebp 001e2 49 83 c6 04 add r14, 4 @@ -20672,44 +14523,28 @@ $LN73@stbi__proc: 00 cmp ebp, DWORD PTR [rdi+18516] 001ec 0f 8c ee fe ff ff jl $LL4@stbi__proc - -; 2699 : } -; 2700 : -; 2701 : { -; 2702 : int aa; -; 2703 : z->spec_start = stbi__get8(z->s); - +; Line 2703 001f2 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 001f5 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 001fc 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00203 73 0f jae SHORT $LN44@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00205 0f b6 08 movzx ecx, BYTE PTR [rax] 00208 48 ff c0 inc rax 0020b 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00212 eb 26 jmp SHORT $LN43@stbi__proc $LN44@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00214 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00218 74 1e je SHORT $LN45@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0021a 48 8b cb mov rcx, rbx 0021d e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00222 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00229 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -20718,49 +14553,34 @@ $LN44@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 00236 eb 02 jmp SHORT $LN43@stbi__proc $LN45@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00238 32 c9 xor cl, cl $LN43@stbi__proc: - -; 2704 : z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 - +; Line 2704 0023a 48 8b 1f mov rbx, QWORD PTR [rdi] 0023d 0f b6 c1 movzx eax, cl 00240 89 87 34 48 00 00 mov DWORD PTR [rdi+18484], eax - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00246 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0024d 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00254 73 0f jae SHORT $LN48@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00256 0f b6 08 movzx ecx, BYTE PTR [rax] 00259 48 ff c0 inc rax 0025c 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00263 eb 26 jmp SHORT $LN47@stbi__proc $LN48@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00265 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00269 74 1e je SHORT $LN49@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0026b 48 8b cb mov rcx, rbx 0026e e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00273 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0027a 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -20769,49 +14589,34 @@ $LN48@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 00287 eb 02 jmp SHORT $LN47@stbi__proc $LN49@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00289 32 c9 xor cl, cl $LN47@stbi__proc: - -; 2705 : aa = stbi__get8(z->s); - +; Line 2705 0028b 48 8b 1f mov rbx, QWORD PTR [rdi] 0028e 0f b6 c1 movzx eax, cl 00291 89 87 38 48 00 00 mov DWORD PTR [rdi+18488], eax - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00297 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0029e 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 002a5 73 0f jae SHORT $LN52@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 002a7 0f b6 08 movzx ecx, BYTE PTR [rax] 002aa 48 ff c0 inc rax 002ad 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 002b4 eb 26 jmp SHORT $LN51@stbi__proc $LN52@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 002b6 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 002ba 74 1e je SHORT $LN53@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 002bc 48 8b cb mov rcx, rbx 002bf e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 002c4 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 002cb 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -20820,17 +14625,10 @@ $LN52@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 002d8 eb 02 jmp SHORT $LN51@stbi__proc $LN53@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 002da 32 c9 xor cl, cl $LN51@stbi__proc: - -; 2706 : z->succ_high = (aa >> 4); -; 2707 : z->succ_low = (aa & 15); -; 2708 : if (z->progressive) { - +; Line 2708 002dc 8b 97 34 48 00 00 mov edx, DWORD PTR [rdi+18484] 002e2 0f b6 c1 movzx eax, cl @@ -20844,9 +14642,7 @@ $LN51@stbi__proc: 002fa 89 87 40 48 00 00 mov DWORD PTR [rdi+18496], eax 00300 74 60 je SHORT $LN15@stbi__proc - -; 2709 : if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) - +; Line 2709 00302 83 fa 3f cmp edx, 63 ; 0000003fH 00305 7f 1c jg SHORT $LN21@stbi__proc 00307 44 8b 87 38 48 @@ -20860,9 +14656,7 @@ $LN51@stbi__proc: 0031e 83 f8 0d cmp eax, 13 00321 76 55 jbe SHORT $LN16@stbi__proc $LN21@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00323 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00329 65 48 8b 04 25 @@ -20874,55 +14668,35 @@ $LN21@stbi__proc: $LN105@stbi__proc: 00342 48 89 14 01 mov QWORD PTR [rcx+rax], rdx $LN64@stbi__proc: - -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); - +; Line 2697 00346 33 c0 xor eax, eax $LN104@stbi__proc: 00348 48 8b 6c 24 30 mov rbp, QWORD PTR [rsp+48] 0034d 4c 8b 74 24 38 mov r14, QWORD PTR [rsp+56] - -; 2720 : } - +; Line 2720 00352 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] 00357 48 8b 74 24 48 mov rsi, QWORD PTR [rsp+72] 0035c 48 83 c4 20 add rsp, 32 ; 00000020H 00360 5f pop rdi 00361 c3 ret 0 $LN15@stbi__proc: - -; 2710 : return stbi__err("bad SOS", "Corrupt JPEG"); -; 2711 : } -; 2712 : else { -; 2713 : if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG"); - +; Line 2713 00362 85 d2 test edx, edx 00364 75 bd jne SHORT $LN21@stbi__proc - -; 2714 : if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG"); - +; Line 2714 00366 85 c9 test ecx, ecx 00368 75 b9 jne SHORT $LN21@stbi__proc 0036a 85 c0 test eax, eax 0036c 75 b5 jne SHORT $LN21@stbi__proc - -; 2715 : z->spec_end = 63; - +; Line 2715 0036e c7 87 38 48 00 00 3f 00 00 00 mov DWORD PTR [rdi+18488], 63 ; 0000003fH $LN16@stbi__proc: - -; 2716 : } -; 2717 : } -; 2718 : -; 2719 : return 1; - +; Line 2719 00378 b8 01 00 00 00 mov eax, 1 0037d eb c9 jmp SHORT $LN104@stbi__proc $LN66@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0037f 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00385 65 48 8b 04 25 @@ -20931,14 +14705,10 @@ $LN66@stbi__proc: 00393 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00397 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0M@JGMCBLGG@bad?5AC?5huff@ - -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); - +; Line 2697 0039e eb a2 jmp SHORT $LN105@stbi__proc $LN65@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 003a0 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 003a6 65 48 8b 04 25 @@ -20947,61 +14717,44 @@ $LN65@stbi__proc: 003b4 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 003b8 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0M@NOCCBFAC@bad?5DC?5huff@ - -; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); - +; Line 2696 003bf eb 81 jmp SHORT $LN105@stbi__proc $LN9@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 003c1 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 003c7 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - -; 2720 : } - +; Line 2720 003d0 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] 003d5 48 8b 74 24 48 mov rsi, QWORD PTR [rsp+72] - -; 431 : stbi__g_failure_reason = str; - +; Line 431 003da b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason 003df 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 003e3 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BI@DHFJCMBA@bad?5SOS?5component?5count@ 003ea 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); - +; Line 2687 003ee 33 c0 xor eax, eax - -; 2720 : } - +; Line 2720 003f0 48 83 c4 20 add rsp, 32 ; 00000020H 003f4 5f pop rdi 003f5 c3 ret 0 stbi__process_scan_header ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__free_jpeg_components _TEXT SEGMENT z$ = 48 ncomp$ = 56 why$ = 64 stbi__free_jpeg_components PROC ; COMDAT - -; 2723 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2723 00000 40 56 push rsi 00002 48 83 ec 20 sub rsp, 32 ; 00000020H 00006 41 8b f0 mov esi, r8d - -; 2724 : int i; -; 2725 : for (i = 0; i < ncomp; ++i) { - +; Line 2725 00009 85 d2 test edx, edx 0000b 7e 72 jle SHORT $LN13@stbi__free 0000d 48 89 5c 24 30 mov QWORD PTR [rsp+48], rbx @@ -21012,68 +14765,41 @@ stbi__free_jpeg_components PROC ; COMDAT 00020 48 89 7c 24 40 mov QWORD PTR [rsp+64], rdi 00025 8b fa mov edi, edx $LL4@stbi__free: - -; 2726 : if (z->img_comp[i].raw_data) { - +; Line 2726 00027 48 8b 0b mov rcx, QWORD PTR [rbx] 0002a 48 85 c9 test rcx, rcx 0002d 74 0d je SHORT $LN5@stbi__free - -; 2727 : STBI_FREE(z->img_comp[i].raw_data); - +; Line 2727 0002f ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 2728 : z->img_comp[i].raw_data = NULL; - +; Line 2728 00035 48 89 2b mov QWORD PTR [rbx], rbp - -; 2729 : z->img_comp[i].data = NULL; - +; Line 2729 00038 48 89 6b f8 mov QWORD PTR [rbx-8], rbp $LN5@stbi__free: - -; 2730 : } -; 2731 : if (z->img_comp[i].raw_coeff) { - +; Line 2731 0003c 48 8b 4b 08 mov rcx, QWORD PTR [rbx+8] 00040 48 85 c9 test rcx, rcx 00043 74 0e je SHORT $LN6@stbi__free - -; 2732 : STBI_FREE(z->img_comp[i].raw_coeff); - +; Line 2732 00045 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 2733 : z->img_comp[i].raw_coeff = 0; - +; Line 2733 0004b 48 89 6b 08 mov QWORD PTR [rbx+8], rbp - -; 2734 : z->img_comp[i].coeff = 0; - +; Line 2734 0004f 48 89 6b 18 mov QWORD PTR [rbx+24], rbp $LN6@stbi__free: - -; 2735 : } -; 2736 : if (z->img_comp[i].linebuf) { - +; Line 2736 00053 48 8b 4b 10 mov rcx, QWORD PTR [rbx+16] 00057 48 85 c9 test rcx, rcx 0005a 74 0a je SHORT $LN2@stbi__free - -; 2737 : STBI_FREE(z->img_comp[i].linebuf); - +; Line 2737 0005c ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 2738 : z->img_comp[i].linebuf = NULL; - +; Line 2738 00062 48 89 6b 10 mov QWORD PTR [rbx+16], rbp $LN2@stbi__free: - -; 2724 : int i; -; 2725 : for (i = 0; i < ncomp; ++i) { - +; Line 2725 00066 48 83 c3 60 add rbx, 96 ; 00000060H 0006a 48 83 ef 01 sub rdi, 1 0006e 75 b7 jne SHORT $LL4@stbi__free @@ -21081,12 +14807,7 @@ $LN2@stbi__free: 00075 48 8b 6c 24 38 mov rbp, QWORD PTR [rsp+56] 0007a 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] $LN13@stbi__free: - -; 2739 : } -; 2740 : } -; 2741 : return why; -; 2742 : } - +; Line 2742 0007f 8b c6 mov eax, esi 00081 48 83 c4 20 add rsp, 32 ; 00000020H 00085 5e pop rsi @@ -21094,15 +14815,13 @@ $LN13@stbi__free: stbi__free_jpeg_components ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__process_frame_header _TEXT SEGMENT z$ = 80 scan$ = 88 stbi__process_frame_header PROC ; COMDAT - -; 2745 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2745 00000 89 54 24 10 mov DWORD PTR [rsp+16], edx 00004 53 push rbx 00005 55 push rbp @@ -21110,27 +14829,19 @@ stbi__process_frame_header PROC ; COMDAT 00007 57 push rdi 00008 41 57 push r15 0000a 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 2746 : stbi__context* s = z->s; - +; Line 2746 0000e 48 8b 19 mov rbx, QWORD PTR [rcx] 00011 4c 8b f9 mov r15, rcx - -; 2747 : int Lf, p, i, q, h_max = 1, v_max = 1, c; - +; Line 2747 00014 bd 01 00 00 00 mov ebp, 1 - -; 2748 : Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG - +; Line 2748 00019 48 8b cb mov rcx, rbx 0001c 8b f5 mov esi, ebp 0001e e8 00 00 00 00 call stbi__get16be 00023 8b f8 mov edi, eax 00025 83 f8 0b cmp eax, 11 00028 7d 30 jge SHORT $LN17@stbi__proc - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0002a 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00030 65 48 8b 04 25 @@ -21140,13 +14851,9 @@ stbi__process_frame_header PROC ; COMDAT 00042 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0M@DOFMJEMP@bad?5SOF?5len@ 00049 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2748 : Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG - +; Line 2748 0004d 33 c0 xor eax, eax - -; 2834 : } - +; Line 2834 0004f 48 83 c4 20 add rsp, 32 ; 00000020H 00053 41 5f pop r15 00055 5f pop rdi @@ -21155,34 +14862,24 @@ stbi__process_frame_header PROC ; COMDAT 00058 5b pop rbx 00059 c3 ret 0 $LN17@stbi__proc: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0005a 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00061 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00068 72 19 jb SHORT $LN266@stbi__proc - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0006a 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0006e 0f 84 5b 07 00 00 je $LN189@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00074 48 8b cb mov rcx, rbx 00077 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0007c 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN266@stbi__proc: - -; 2749 : p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline - +; Line 2749 00083 0f b6 08 movzx ecx, BYTE PTR [rax] 00086 48 ff c0 inc rax 00089 48 89 83 c0 00 @@ -21190,17 +14887,13 @@ $LN266@stbi__proc: 00090 80 f9 08 cmp cl, 8 00093 0f 85 36 07 00 00 jne $LN189@stbi__proc - -; 2750 : s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG - +; Line 2750 00099 48 8b cb mov rcx, rbx 0009c e8 00 00 00 00 call stbi__get16be 000a1 89 43 04 mov DWORD PTR [rbx+4], eax 000a4 85 c0 test eax, eax 000a6 75 30 jne SHORT $LN19@stbi__proc - -; 431 : stbi__g_failure_reason = str; - +; Line 431 000a8 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 000ae 65 48 8b 04 25 @@ -21210,13 +14903,9 @@ $LN266@stbi__proc: 000c0 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BB@LNEGOMA@no?5header?5height@ 000c7 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2750 : s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG - +; Line 2750 000cb 33 c0 xor eax, eax - -; 2834 : } - +; Line 2834 000cd 48 83 c4 20 add rsp, 32 ; 00000020H 000d1 41 5f pop r15 000d3 5f pop rdi @@ -21225,17 +14914,13 @@ $LN266@stbi__proc: 000d6 5b pop rbx 000d7 c3 ret 0 $LN19@stbi__proc: - -; 2751 : s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires - +; Line 2751 000d8 48 8b cb mov rcx, rbx 000db e8 00 00 00 00 call stbi__get16be 000e0 89 03 mov DWORD PTR [rbx], eax 000e2 85 c0 test eax, eax 000e4 75 30 jne SHORT $LN20@stbi__proc - -; 431 : stbi__g_failure_reason = str; - +; Line 431 000e6 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 000ec 65 48 8b 04 25 @@ -21245,13 +14930,9 @@ $LN19@stbi__proc: 000fe 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_07BIDACDEF@0?5width@ 00105 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2751 : s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires - +; Line 2751 00109 33 c0 xor eax, eax - -; 2834 : } - +; Line 2834 0010b 48 83 c4 20 add rsp, 32 ; 00000020H 0010f 41 5f pop r15 00111 5f pop rdi @@ -21260,16 +14941,12 @@ $LN19@stbi__proc: 00114 5b pop rbx 00115 c3 ret 0 $LN20@stbi__proc: - -; 2752 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); - +; Line 2752 00116 81 7b 04 00 00 00 01 cmp DWORD PTR [rbx+4], 16777216 ; 01000000H 0011d 76 30 jbe SHORT $LN21@stbi__proc $LN267@stbi__proc: - -; 2834 : } - +; Line 2834 0011f 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00125 65 48 8b 04 25 @@ -21288,41 +14965,29 @@ $LN267@stbi__proc: 0014d 5b pop rbx 0014e c3 ret 0 $LN21@stbi__proc: - -; 2753 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); - +; Line 2753 0014f 3d 00 00 00 01 cmp eax, 16777216 ; 01000000H 00154 77 c9 ja SHORT $LN267@stbi__proc - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00156 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0015d 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00164 73 0f jae SHORT $LN146@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00166 0f b6 08 movzx ecx, BYTE PTR [rax] 00169 48 ff c0 inc rax 0016c 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00173 eb 26 jmp SHORT $LN145@stbi__proc $LN146@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00175 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00179 74 1e je SHORT $LN147@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0017b 48 8b cb mov rcx, rbx 0017e e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00183 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0018a 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -21331,19 +14996,12 @@ $LN146@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 00197 eb 02 jmp SHORT $LN145@stbi__proc $LN147@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00199 32 c9 xor cl, cl $LN145@stbi__proc: - -; 2754 : c = stbi__get8(s); - +; Line 2754 0019b 0f b6 c9 movzx ecx, cl - -; 2755 : if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG"); - +; Line 2755 0019e 8d 41 ff lea eax, DWORD PTR [rcx-1] 001a1 a9 fc ff ff ff test eax, -4 ; fffffffcH 001a6 0f 85 f3 05 00 @@ -21352,10 +15010,7 @@ $LN145@stbi__proc: 001af 0f 84 ea 05 00 00 je $LN201@stbi__proc 001b5 4c 89 64 24 50 mov QWORD PTR [rsp+80], r12 - -; 2756 : s->img_n = c; -; 2757 : for (i = 0; i < c; ++i) { - +; Line 2757 001ba 45 33 e4 xor r12d, r12d 001bd 89 4b 08 mov DWORD PTR [rbx+8], ecx 001c0 48 85 c9 test rcx, rcx @@ -21364,31 +15019,21 @@ $LN145@stbi__proc: 00 00 lea rax, QWORD PTR [r15+18152] 001cc 0f 1f 40 00 npad 4 $LL4@stbi__proc: - -; 2758 : z->img_comp[i].data = NULL; - +; Line 2758 001d0 4c 89 60 e8 mov QWORD PTR [rax-24], r12 - -; 2759 : z->img_comp[i].linebuf = NULL; - +; Line 2759 001d4 4c 89 20 mov QWORD PTR [rax], r12 001d7 48 8d 40 60 lea rax, QWORD PTR [rax+96] 001db 48 2b ce sub rcx, rsi 001de 75 f0 jne SHORT $LL4@stbi__proc $LN3@stbi__proc: - -; 2760 : } -; 2761 : -; 2762 : if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG"); - +; Line 2762 001e0 8b 43 08 mov eax, DWORD PTR [rbx+8] 001e3 8d 48 04 lea ecx, DWORD PTR [rax+4] 001e6 8d 0c 48 lea ecx, DWORD PTR [rax+rcx*2] 001e9 3b f9 cmp edi, ecx 001eb 74 35 je SHORT $LN24@stbi__proc - -; 431 : stbi__g_failure_reason = str; - +; Line 431 001ed 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 001f3 65 48 8b 04 25 @@ -21399,15 +15044,9 @@ $LN3@stbi__proc: 0020a 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0M@DOFMJEMP@bad?5SOF?5len@ 00211 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2760 : } -; 2761 : -; 2762 : if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG"); - +; Line 2762 00215 33 c0 xor eax, eax - -; 2834 : } - +; Line 2834 00217 48 83 c4 20 add rsp, 32 ; 00000020H 0021b 41 5f pop r15 0021d 5f pop rdi @@ -21417,11 +15056,7 @@ $LN3@stbi__proc: 00221 c3 ret 0 $LN24@stbi__proc: 00222 4c 89 6c 24 60 mov QWORD PTR [rsp+96], r13 - -; 2763 : -; 2764 : z->rgb = 0; -; 2765 : for (i = 0; i < s->img_n; ++i) { - +; Line 2765 00227 45 8b ec mov r13d, r12d 0022a 45 89 a7 50 48 00 00 mov DWORD PTR [r15+18512], r12d @@ -21439,36 +15074,26 @@ $LN24@stbi__proc: 84 00 00 00 00 00 npad 11 $LL7@stbi__proc: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00260 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00267 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0026e 73 0f jae SHORT $LN105@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00270 0f b6 08 movzx ecx, BYTE PTR [rax] 00273 48 ff c0 inc rax 00276 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0027d eb 25 jmp SHORT $LN104@stbi__proc $LN105@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0027f 83 3f 00 cmp DWORD PTR [rdi], 0 00282 74 1e je SHORT $LN106@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00284 48 8b cb mov rcx, rbx 00287 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0028c 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00293 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -21477,62 +15102,42 @@ $LN105@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 002a0 eb 02 jmp SHORT $LN104@stbi__proc $LN106@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 002a2 32 c9 xor cl, cl $LN104@stbi__proc: - -; 2766 : static const unsigned char rgb[3] = { 'R', 'G', 'B' }; -; 2767 : z->img_comp[i].id = stbi__get8(s); - +; Line 2767 002a4 0f b6 d1 movzx edx, cl 002a7 41 89 56 fc mov DWORD PTR [r14-4], edx - -; 2768 : if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) - +; Line 2768 002ab 83 7b 08 03 cmp DWORD PTR [rbx+8], 3 002af 75 10 jne SHORT $LN25@stbi__proc 002b1 41 0f b6 04 24 movzx eax, BYTE PTR [r12] 002b6 3b d0 cmp edx, eax 002b8 75 07 jne SHORT $LN25@stbi__proc - -; 2769 : ++z->rgb; - +; Line 2769 002ba 41 ff 87 50 48 00 00 inc DWORD PTR [r15+18512] $LN25@stbi__proc: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 002c1 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 002c8 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 002cf 73 0f jae SHORT $LN109@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 002d1 0f b6 08 movzx ecx, BYTE PTR [rax] 002d4 48 ff c0 inc rax 002d7 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 002de eb 25 jmp SHORT $LN108@stbi__proc $LN109@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 002e0 83 3f 00 cmp DWORD PTR [rdi], 0 002e3 74 1e je SHORT $LN110@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 002e5 48 8b cb mov rcx, rbx 002e8 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 002ed 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 002f4 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -21541,19 +15146,12 @@ $LN109@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 00301 eb 02 jmp SHORT $LN108@stbi__proc $LN110@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00303 32 c9 xor cl, cl $LN108@stbi__proc: - -; 2770 : q = stbi__get8(s); - +; Line 2770 00305 0f b6 c9 movzx ecx, cl - -; 2771 : z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H", "Corrupt JPEG"); - +; Line 2771 00308 8b c1 mov eax, ecx 0030a c1 e8 04 shr eax, 4 0030d 41 89 06 mov DWORD PTR [r14], eax @@ -21561,26 +15159,20 @@ $LN108@stbi__proc: 00312 83 f8 03 cmp eax, 3 00315 0f 87 66 03 00 00 ja $LN166@stbi__proc - -; 2772 : z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V", "Corrupt JPEG"); - +; Line 2772 0031b 83 e1 0f and ecx, 15 0031e 41 89 4e 04 mov DWORD PTR [r14+4], ecx 00322 8d 41 ff lea eax, DWORD PTR [rcx-1] 00325 83 f8 03 cmp eax, 3 00328 0f 87 32 03 00 00 ja $LN167@stbi__proc - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0032e 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00335 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0033c 73 13 jae SHORT $LN150@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 0033e 0f b6 08 movzx ecx, BYTE PTR [rax] 00341 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] 00345 48 ff c0 inc rax @@ -21588,19 +15180,13 @@ $LN108@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 0034f eb 25 jmp SHORT $LN149@stbi__proc $LN150@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00351 83 3f 00 cmp DWORD PTR [rdi], 0 00354 74 1e je SHORT $LN151@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00356 48 8b cb mov rcx, rbx 00359 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0035e 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00365 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -21609,25 +15195,16 @@ $LN150@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 00372 eb 02 jmp SHORT $LN149@stbi__proc $LN151@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00374 32 c9 xor cl, cl $LN149@stbi__proc: - -; 2773 : z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ", "Corrupt JPEG"); - +; Line 2773 00376 0f b6 c1 movzx eax, cl 00379 41 89 46 08 mov DWORD PTR [r14+8], eax 0037d 83 f8 03 cmp eax, 3 00380 0f 87 9b 02 00 00 ja $LN165@stbi__proc - -; 2763 : -; 2764 : z->rgb = 0; -; 2765 : for (i = 0; i < s->img_n; ++i) { - +; Line 2765 00386 44 8b 4b 08 mov r9d, DWORD PTR [rbx+8] 0038a 41 ff c5 inc r13d 0038d 49 ff c4 inc r12 @@ -21635,83 +15212,53 @@ $LN149@stbi__proc: 00394 45 3b e9 cmp r13d, r9d 00397 0f 8c c3 fe ff ff jl $LL7@stbi__proc - -; 2827 : if (z->img_comp[i].raw_coeff == NULL) - +; Line 2827 0039d 45 33 e4 xor r12d, r12d $LN6@stbi__proc: - -; 2774 : } -; 2775 : -; 2776 : if (scan != STBI__SCAN_load) return 1; - +; Line 2776 003a0 83 7c 24 58 00 cmp DWORD PTR scan$[rsp], 0 003a5 0f 85 ea 03 00 00 jne $LN15@stbi__proc - -; 2777 : -; 2778 : if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); - +; Line 2778 003ab 8b 0b mov ecx, DWORD PTR [rbx] 003ad 44 8b 43 04 mov r8d, DWORD PTR [rbx+4] - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 003b1 85 c9 test ecx, ecx 003b3 0f 88 b8 03 00 00 js $LN195@stbi__proc 003b9 45 85 c0 test r8d, r8d 003bc 0f 88 af 03 00 00 js $LN195@stbi__proc - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 003c2 74 11 je SHORT $LN197@stbi__proc - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 003c4 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 003c9 99 cdq 003ca 41 f7 f8 idiv r8d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 003cd 3b c8 cmp ecx, eax 003cf 0f 8f 9c 03 00 00 jg $LN195@stbi__proc $LN197@stbi__proc: 003d5 41 0f af c8 imul ecx, r8d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 003d9 85 c9 test ecx, ecx 003db 0f 88 90 03 00 00 js $LN195@stbi__proc 003e1 45 85 c9 test r9d, r9d 003e4 0f 88 87 03 00 00 js $LN195@stbi__proc - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 003ea 74 6d je SHORT $LN12@stbi__proc - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 003ec b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 003f1 99 cdq 003f2 41 f7 f9 idiv r9d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 003f5 3b c8 cmp ecx, eax 003f7 0f 8f 74 03 00 00 jg $LN195@stbi__proc - -; 2779 : -; 2780 : for (i = 0; i < s->img_n; ++i) { - +; Line 2780 003fd 45 85 c9 test r9d, r9d 00400 7e 57 jle SHORT $LN12@stbi__proc 00402 4d 8d 87 a8 46 @@ -21720,14 +15267,10 @@ $LN197@stbi__proc: 0040c 49 8b d0 mov rdx, r8 0040f 90 npad 1 $LL10@stbi__proc: - -; 2781 : if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; - +; Line 2781 00410 8b 42 fc mov eax, DWORD PTR [rdx-4] 00413 48 8d 52 60 lea rdx, QWORD PTR [rdx+96] - -; 2782 : if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; - +; Line 2782 00417 3b c5 cmp eax, ebp 00419 8b ce mov ecx, esi 0041b 8b 72 a0 mov esi, DWORD PTR [rdx-96] @@ -21739,47 +15282,27 @@ $LL10@stbi__proc: 0042c 75 e2 jne SHORT $LL10@stbi__proc 0042e 41 8b cc mov ecx, r12d $LL13@stbi__proc: - -; 2788 : if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG"); - +; Line 2788 00431 8b c5 mov eax, ebp 00433 99 cdq 00434 41 f7 78 fc idiv DWORD PTR [r8-4] 00438 85 d2 test edx, edx 0043a 0f 85 41 02 00 00 jne $LN166@stbi__proc - -; 2789 : if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG"); - +; Line 2789 00440 8b c6 mov eax, esi 00442 99 cdq 00443 41 f7 38 idiv DWORD PTR [r8] 00446 85 d2 test edx, edx 00448 0f 85 12 02 00 00 jne $LN167@stbi__proc - -; 2783 : } -; 2784 : -; 2785 : // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios -; 2786 : // and I've never seen a non-corrupted JPEG file actually use them -; 2787 : for (i = 0; i < s->img_n; ++i) { - +; Line 2787 0044e ff c1 inc ecx 00450 49 83 c0 60 add r8, 96 ; 00000060H 00454 41 3b c9 cmp ecx, r9d 00457 7c d8 jl SHORT $LL13@stbi__proc $LN12@stbi__proc: - -; 2790 : } -; 2791 : -; 2792 : // compute interleaved mcu info -; 2793 : z->img_h_max = h_max; -; 2794 : z->img_v_max = v_max; -; 2795 : z->img_mcu_w = h_max * 8; -; 2796 : z->img_mcu_h = v_max * 8; -; 2797 : // these sizes can't be more than 17 bits -; 2798 : z->img_mcu_x = (s->img_x + z->img_mcu_w - 1) / z->img_mcu_w; - +; Line 2798 00459 33 d2 xor edx, edx 0045b 41 89 af 88 46 00 00 mov DWORD PTR [r15+18056], ebp @@ -21793,11 +15316,7 @@ $LN12@stbi__proc: 00 00 mov DWORD PTR [r15+18072], ecx 0047f 45 89 87 9c 46 00 00 mov DWORD PTR [r15+18076], r8d - -; 2799 : z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h; -; 2800 : -; 2801 : for (i = 0; i < s->img_n; ++i) { - +; Line 2801 00486 45 8b f4 mov r14d, r12d 00489 8b 03 mov eax, DWORD PTR [rbx] 0048b ff c8 dec eax @@ -21819,15 +15338,10 @@ $LN12@stbi__proc: 00 00 lea rdi, QWORD PTR [r15+18108] 004bd 0f 1f 00 npad 3 $LL16@stbi__proc: - -; 2802 : // number of effective pixels (e.g. for non-interleaved MCU) -; 2803 : z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max - 1) / h_max; - +; Line 2803 004c0 8b 4f e8 mov ecx, DWORD PTR [rdi-24] 004c3 33 d2 xor edx, edx - -; 2804 : z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max - 1) / v_max; - +; Line 2804 004c5 44 8b 47 ec mov r8d, DWORD PTR [rdi-20] 004c9 8b c1 mov eax, ecx 004cb 0f af 03 imul eax, DWORD PTR [rbx] @@ -21842,110 +15356,66 @@ $LL16@stbi__proc: 004e1 03 c6 add eax, esi 004e3 f7 f6 div esi 004e5 89 47 04 mov DWORD PTR [rdi+4], eax - -; 2805 : // to simplify generation, we'll allocate enough memory to decode -; 2806 : // the bogus oversized data from using interleaved MCUs and their -; 2807 : // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't -; 2808 : // discard the extra data until colorspace conversion -; 2809 : // -; 2810 : // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) -; 2811 : // so these muls can't overflow with 32-bit ints (which we require) -; 2812 : z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; - +; Line 2812 004e8 41 0f af 8f 90 46 00 00 imul ecx, DWORD PTR [r15+18064] 004f0 c1 e1 03 shl ecx, 3 004f3 89 4f 08 mov DWORD PTR [rdi+8], ecx - -; 2813 : z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; - +; Line 2813 004f6 45 0f af 87 94 46 00 00 imul r8d, DWORD PTR [r15+18068] - -; 2814 : z->img_comp[i].coeff = 0; - +; Line 2814 004fe 4c 89 67 34 mov QWORD PTR [rdi+52], r12 - -; 2815 : z->img_comp[i].raw_coeff = 0; - +; Line 2815 00502 4c 89 67 24 mov QWORD PTR [rdi+36], r12 - -; 2816 : z->img_comp[i].linebuf = NULL; - +; Line 2816 00506 4c 89 67 2c mov QWORD PTR [rdi+44], r12 0050a 41 c1 e0 03 shl r8d, 3 0050e 44 89 47 0c mov DWORD PTR [rdi+12], r8d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00512 85 c9 test ecx, ecx 00514 0f 88 c7 01 00 00 js $LN193@stbi__proc 0051a 45 85 c0 test r8d, r8d 0051d 0f 88 be 01 00 00 js $LN193@stbi__proc - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 00523 74 11 je SHORT $LN42@stbi__proc - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 00525 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 0052a 99 cdq 0052b 41 f7 f8 idiv r8d - -; 477 : return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add); - +; Line 477 0052e 3b c8 cmp ecx, eax 00530 0f 8f ab 01 00 00 jg $LN193@stbi__proc $LN42@stbi__proc: - -; 502 : return stbi__malloc(a * b + add); - +; Line 502 00536 41 0f af c8 imul ecx, r8d 0053a 83 c1 0f add ecx, 15 0053d 48 63 c9 movsxd rcx, ecx - -; 438 : return STBI_MALLOC(size); - +; Line 438 00540 ff 15 00 00 00 00 call QWORD PTR __imp_malloc - -; 2817 : z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); - +; Line 2817 00546 48 89 47 1c mov QWORD PTR [rdi+28], rax - -; 2818 : if (z->img_comp[i].raw_data == NULL) - +; Line 2818 0054a 48 85 c0 test rax, rax 0054d 0f 84 94 01 00 00 je $LN205@stbi__proc - -; 2820 : // align blocks for idct using mmx/sse -; 2821 : z->img_comp[i].data = (stbi_uc*)(((size_t)z->img_comp[i].raw_data + 15) & ~15); - +; Line 2821 00553 48 83 c0 0f add rax, 15 00557 48 83 e0 f0 and rax, -16 0055b 48 89 47 14 mov QWORD PTR [rdi+20], rax - -; 2822 : if (z->progressive) { - +; Line 2822 0055f 41 83 bf 30 48 00 00 00 cmp DWORD PTR [r15+18480], 0 00567 0f 84 9b 00 00 00 je $LN14@stbi__proc - -; 2823 : // w2, h2 are multiples of 8 (see above) -; 2824 : z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; - +; Line 2824 0056d 8b 4f 08 mov ecx, DWORD PTR [rdi+8] 00570 8b c1 mov eax, ecx - -; 2825 : z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; - +; Line 2825 00572 44 8b 47 0c mov r8d, DWORD PTR [rdi+12] 00576 99 cdq 00577 83 e2 07 and edx, 7 @@ -21958,91 +15428,60 @@ $LN42@stbi__proc: 00589 03 c2 add eax, edx 0058b c1 f8 03 sar eax, 3 0058e 89 47 40 mov DWORD PTR [rdi+64], eax - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00591 85 c9 test ecx, ecx 00593 0f 88 09 01 00 00 js $LN191@stbi__proc 00599 45 85 c0 test r8d, r8d 0059c 0f 88 00 01 00 00 js $LN191@stbi__proc - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 005a2 74 11 je SHORT $LN192@stbi__proc - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 005a4 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 005a9 99 cdq 005aa 41 f7 f8 idiv r8d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 005ad 3b c8 cmp ecx, eax 005af 0f 8f ed 00 00 00 jg $LN191@stbi__proc $LN192@stbi__proc: 005b5 8b c1 mov eax, ecx 005b7 41 0f af c0 imul eax, r8d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 005bb 85 c0 test eax, eax 005bd 0f 88 df 00 00 00 js $LN191@stbi__proc - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 005c3 3d ff ff ff 3f cmp eax, 1073741823 ; 3fffffffH 005c8 0f 8f d4 00 00 00 jg $LN191@stbi__proc 005ce 03 c0 add eax, eax - -; 460 : return a <= INT_MAX - b; - +; Line 460 005d0 3d f0 ff ff 7f cmp eax, 2147483632 ; 7ffffff0H - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 005d5 0f 8f c7 00 00 00 jg $LN191@stbi__proc - -; 509 : return stbi__malloc(a * b * c + add); - +; Line 509 005db 41 0f af c8 imul ecx, r8d 005df 8d 04 4d 0f 00 00 00 lea eax, DWORD PTR [rcx*2+15] 005e6 48 63 c8 movsxd rcx, eax - -; 438 : return STBI_MALLOC(size); - +; Line 438 005e9 ff 15 00 00 00 00 call QWORD PTR __imp_malloc - -; 2826 : z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); - +; Line 2826 005ef 48 89 47 24 mov QWORD PTR [rdi+36], rax - -; 2827 : if (z->img_comp[i].raw_coeff == NULL) - +; Line 2827 005f3 48 85 c0 test rax, rax 005f6 0f 84 ae 00 00 00 je $LN169@stbi__proc - -; 2829 : z->img_comp[i].coeff = (short*)(((size_t)z->img_comp[i].raw_coeff + 15) & ~15); - +; Line 2829 005fc 48 83 c0 0f add rax, 15 00600 48 83 e0 f0 and rax, -16 00604 48 89 47 34 mov QWORD PTR [rdi+52], rax $LN14@stbi__proc: - -; 2799 : z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h; -; 2800 : -; 2801 : for (i = 0; i < s->img_n; ++i) { - +; Line 2801 00608 41 ff c6 inc r14d 0060b 48 83 c7 60 add rdi, 96 ; 00000060H 0060f 44 3b 73 08 cmp r14d, DWORD PTR [rbx+8] @@ -22051,9 +15490,7 @@ $LN14@stbi__proc: 00619 45 33 e4 xor r12d, r12d 0061c e9 9f fe ff ff jmp $LL16@stbi__proc $LN165@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00621 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00627 65 48 8b 04 25 @@ -22063,9 +15500,7 @@ $LN165@stbi__proc: 00639 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_06LJIHDFHI@bad?5TQ@ $LN268@stbi__proc: - -; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); - +; Line 2819 00640 48 89 14 01 mov QWORD PTR [rcx+rax], rdx $LN62@stbi__proc: 00644 33 c0 xor eax, eax @@ -22073,9 +15508,7 @@ $LN265@stbi__proc: 00646 4c 8b 6c 24 60 mov r13, QWORD PTR [rsp+96] 0064b 4c 8b 74 24 68 mov r14, QWORD PTR [rsp+104] 00650 4c 8b 64 24 50 mov r12, QWORD PTR [rsp+80] - -; 2834 : } - +; Line 2834 00655 48 83 c4 20 add rsp, 32 ; 00000020H 00659 41 5f pop r15 0065b 5f pop rdi @@ -22084,9 +15517,7 @@ $LN265@stbi__proc: 0065e 5b pop rbx 0065f c3 ret 0 $LN167@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00660 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00666 65 48 8b 04 25 @@ -22095,14 +15526,10 @@ $LN167@stbi__proc: 00674 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00678 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_05MPLLHCJG@bad?5V@ - -; 2789 : if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG"); - +; Line 2789 0067f eb bf jmp SHORT $LN268@stbi__proc $LN166@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00681 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00687 65 48 8b 04 25 @@ -22111,29 +15538,19 @@ $LN166@stbi__proc: 00695 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00699 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_05BLPKENEJ@bad?5H@ - -; 2788 : if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG"); - +; Line 2788 006a0 eb 9e jmp SHORT $LN268@stbi__proc $LN191@stbi__proc: - -; 508 : if (!stbi__mad3sizes_valid(a, b, c, add)) return NULL; - +; Line 508 006a2 48 c7 47 24 00 00 00 00 mov QWORD PTR [rdi+36], 0 $LN169@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 006aa 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - -; 2828 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); - +; Line 2828 006b0 45 33 c0 xor r8d, r8d - -; 431 : stbi__g_failure_reason = str; - +; Line 431 006b3 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 006bc b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason @@ -22141,37 +15558,25 @@ $LN169@stbi__proc: 006c5 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ 006cc 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2828 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); - +; Line 2828 006d0 41 8d 56 01 lea edx, DWORD PTR [r14+1] 006d4 49 8b cf mov rcx, r15 006d7 e8 00 00 00 00 call stbi__free_jpeg_components 006dc e9 65 ff ff ff jmp $LN265@stbi__proc $LN193@stbi__proc: - -; 501 : if (!stbi__mad2sizes_valid(a, b, add)) return NULL; - +; Line 501 006e1 4c 89 67 1c mov QWORD PTR [rdi+28], r12 - -; 2818 : if (z->img_comp[i].raw_data == NULL) - +; Line 2818 006e5 eb 03 jmp SHORT $LN168@stbi__proc $LN205@stbi__proc: 006e7 45 33 e4 xor r12d, r12d $LN168@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 006ea 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - -; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); - +; Line 2819 006f0 41 ff c6 inc r14d - -; 431 : stbi__g_failure_reason = str; - +; Line 431 006f3 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 006fc b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason @@ -22179,9 +15584,7 @@ $LN168@stbi__proc: 00705 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ 0070c 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2725 : for (i = 0; i < ncomp; ++i) { - +; Line 2725 00710 45 85 f6 test r14d, r14d 00713 0f 8e 2b ff ff ff jle $LN62@stbi__proc @@ -22189,1719 +15592,48 @@ $LN168@stbi__proc: 00 00 lea rbx, QWORD PTR [r15+18136] 00720 41 8b fe mov edi, r14d $LL63@stbi__proc: - -; 2726 : if (z->img_comp[i].raw_data) { - +; Line 2726 00723 48 8b 0b mov rcx, QWORD PTR [rbx] 00726 48 85 c9 test rcx, rcx 00729 74 0d je SHORT $LN64@stbi__proc - -; 2727 : STBI_FREE(z->img_comp[i].raw_data); - +; Line 2727 0072b ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 2728 : z->img_comp[i].raw_data = NULL; - +; Line 2728 00731 4c 89 23 mov QWORD PTR [rbx], r12 - -; 2729 : z->img_comp[i].data = NULL; - +; Line 2729 00734 4c 89 63 f8 mov QWORD PTR [rbx-8], r12 $LN64@stbi__proc: - -; 2730 : } -; 2731 : if (z->img_comp[i].raw_coeff) { - +; Line 2731 00738 48 8b 4b 08 mov rcx, QWORD PTR [rbx+8] 0073c 48 85 c9 test rcx, rcx 0073f 74 0e je SHORT $LN65@stbi__proc - -; 2732 : STBI_FREE(z->img_comp[i].raw_coeff); - +; Line 2732 00741 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 2733 : z->img_comp[i].raw_coeff = 0; - +; Line 2733 00747 4c 89 63 08 mov QWORD PTR [rbx+8], r12 - -; 2734 : z->img_comp[i].coeff = 0; - +; Line 2734 0074b 4c 89 63 18 mov QWORD PTR [rbx+24], r12 $LN65@stbi__proc: - -; 2735 : } -; 2736 : if (z->img_comp[i].linebuf) { - +; Line 2736 0074f 48 8b 4b 10 mov rcx, QWORD PTR [rbx+16] 00753 48 85 c9 test rcx, rcx 00756 74 0a je SHORT $LN61@stbi__proc - -; 2737 : STBI_FREE(z->img_comp[i].linebuf); - +; Line 2737 00758 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 2738 : z->img_comp[i].linebuf = NULL; - +; Line 2738 0075e 4c 89 63 10 mov QWORD PTR [rbx+16], r12 $LN61@stbi__proc: - -; 1084 : } -; 1085 : -; 1086 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_HDR) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1087 : // nothing -; 1088 : #else -; 1089 : stbi_inline static int stbi__at_eof(stbi__context* s) -; 1090 : { -; 1091 : if (s->io.read) { -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; -; 1096 : } -; 1097 : -; 1098 : return s->img_buffer >= s->img_buffer_end; -; 1099 : } -; 1100 : #endif -; 1101 : -; 1102 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) -; 1103 : // nothing -; 1104 : #else -; 1105 : static void stbi__skip(stbi__context* s, int n) -; 1106 : { -; 1107 : if (n == 0) return; // already there! -; 1108 : if (n < 0) { -; 1109 : s->img_buffer = s->img_buffer_end; -; 1110 : return; -; 1111 : } -; 1112 : if (s->io.read) { -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1114 : if (blen < n) { -; 1115 : s->img_buffer = s->img_buffer_end; -; 1116 : (s->io.skip)(s->io_user_data, n - blen); -; 1117 : return; -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; -; 1121 : } -; 1122 : #endif -; 1123 : -; 1124 : #if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) -; 1125 : // nothing -; 1126 : #else -; 1127 : static int stbi__getn(stbi__context* s, stbi_uc* buffer, int n) -; 1128 : { -; 1129 : if (s->io.read) { -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1131 : if (blen < n) { -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; -; 1139 : return res; -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { -; 1144 : memcpy(buffer, s->img_buffer, n); -; 1145 : s->img_buffer += n; -; 1146 : return 1; -; 1147 : } -; 1148 : else -; 1149 : return 0; -; 1150 : } -; 1151 : #endif -; 1152 : -; 1153 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1154 : // nothing -; 1155 : #else -; 1156 : static int stbi__get16be(stbi__context* s) -; 1157 : { -; 1158 : int z = stbi__get8(s); -; 1159 : return (z << 8) + stbi__get8(s); -; 1160 : } -; 1161 : #endif -; 1162 : -; 1163 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1164 : // nothing -; 1165 : #else -; 1166 : static stbi__uint32 stbi__get32be(stbi__context* s) -; 1167 : { -; 1168 : stbi__uint32 z = stbi__get16be(s); -; 1169 : return (z << 16) + stbi__get16be(s); -; 1170 : } -; 1171 : #endif -; 1172 : -; 1173 : #if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -; 1174 : // nothing -; 1175 : #else -; 1176 : static int stbi__get16le(stbi__context* s) -; 1177 : { -; 1178 : int z = stbi__get8(s); -; 1179 : return z + (stbi__get8(s) << 8); -; 1180 : } -; 1181 : #endif -; 1182 : -; 1183 : #ifndef STBI_NO_BMP -; 1184 : static stbi__uint32 stbi__get32le(stbi__context* s) -; 1185 : { -; 1186 : stbi__uint32 z = stbi__get16le(s); -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; -; 1188 : return z; -; 1189 : } -; 1190 : #endif -; 1191 : -; 1192 : #define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings -; 1193 : -; 1194 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1195 : // nothing -; 1196 : #else -; 1197 : ////////////////////////////////////////////////////////////////////////////// -; 1198 : // -; 1199 : // generic converter from built-in img_n to req_comp -; 1200 : // individual types do this automatically as much as possible (e.g. jpeg -; 1201 : // does all cases internally since it needs to colorspace convert anyway, -; 1202 : // and it never has alpha, so very few cases ). png can automatically -; 1203 : // interleave an alpha=255 channel, but falls back to this for other cases -; 1204 : // -; 1205 : // assume data buffer is malloced, so malloc a new one and free that one -; 1206 : // only failure mode is malloc failing -; 1207 : -; 1208 : static stbi_uc stbi__compute_y(int r, int g, int b) -; 1209 : { -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1211 : } -; 1212 : #endif -; 1213 : -; 1214 : #if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1215 : // nothing -; 1216 : #else -; 1217 : static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1218 : { -; 1219 : int i, j; -; 1220 : unsigned char* good; -; 1221 : -; 1222 : if (req_comp == img_n) return data; -; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1224 : -; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); -; 1226 : if (good == NULL) { -; 1227 : STBI_FREE(data); -; 1228 : return stbi__errpuc("outofmem", "Out of memory"); -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { -; 1232 : unsigned char* src = data + j * x * img_n; -; 1233 : unsigned char* dest = good + j * x * req_comp; -; 1234 : -; 1235 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1236 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1237 : // convert source image with img_n components to one with req_comp components; -; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1239 : switch (STBI__COMBO(img_n, req_comp)) { -; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; -; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; -; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1253 : } -; 1254 : #undef STBI__CASE -; 1255 : } -; 1256 : -; 1257 : STBI_FREE(data); -; 1258 : return good; -; 1259 : } -; 1260 : #endif -; 1261 : -; 1262 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1263 : // nothing -; 1264 : #else -; 1265 : static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -; 1266 : { -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1268 : } -; 1269 : #endif -; 1270 : -; 1271 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1272 : // nothing -; 1273 : #else -; 1274 : static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1275 : { -; 1276 : int i, j; -; 1277 : stbi__uint16* good; -; 1278 : -; 1279 : if (req_comp == img_n) return data; -; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1281 : -; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); -; 1283 : if (good == NULL) { -; 1284 : STBI_FREE(data); -; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { -; 1289 : stbi__uint16* src = data + j * x * img_n; -; 1290 : stbi__uint16* dest = good + j * x * req_comp; -; 1291 : -; 1292 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1293 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1294 : // convert source image with img_n components to one with req_comp components; -; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1296 : switch (STBI__COMBO(img_n, req_comp)) { -; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; -; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; -; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1310 : } -; 1311 : #undef STBI__CASE -; 1312 : } -; 1313 : -; 1314 : STBI_FREE(data); -; 1315 : return good; -; 1316 : } -; 1317 : #endif -; 1318 : -; 1319 : #ifndef STBI_NO_LINEAR -; 1320 : static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp) -; 1321 : { -; 1322 : int i, k, n; -; 1323 : float* output; -; 1324 : if (!data) return NULL; -; 1325 : output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0); -; 1326 : if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } -; 1327 : // compute number of non-alpha components -; 1328 : if (comp & 1) n = comp; else n = comp - 1; -; 1329 : for (i = 0; i < x * y; ++i) { -; 1330 : for (k = 0; k < n; ++k) { -; 1331 : output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale); -; 1332 : } -; 1333 : } -; 1334 : if (n < comp) { -; 1335 : for (i = 0; i < x * y; ++i) { -; 1336 : output[i * comp + n] = data[i * comp + n] / 255.0f; -; 1337 : } -; 1338 : } -; 1339 : STBI_FREE(data); -; 1340 : return output; -; 1341 : } -; 1342 : #endif -; 1343 : -; 1344 : #ifndef STBI_NO_HDR -; 1345 : #define stbi__float2int(x) ((int) (x)) -; 1346 : static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp) -; 1347 : { -; 1348 : int i, k, n; -; 1349 : stbi_uc* output; -; 1350 : if (!data) return NULL; -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } -; 1353 : // compute number of non-alpha components -; 1354 : if (comp & 1) n = comp; else n = comp - 1; -; 1355 : for (i = 0; i < x * y; ++i) { -; 1356 : for (k = 0; k < n; ++k) { -; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; -; 1358 : if (z < 0) z = 0; -; 1359 : if (z > 255) z = 255; -; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1361 : } -; 1362 : if (k < comp) { -; 1363 : float z = data[i * comp + k] * 255 + 0.5f; -; 1364 : if (z < 0) z = 0; -; 1365 : if (z > 255) z = 255; -; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1367 : } -; 1368 : } -; 1369 : STBI_FREE(data); -; 1370 : return output; -; 1371 : } -; 1372 : #endif -; 1373 : -; 1374 : ////////////////////////////////////////////////////////////////////////////// -; 1375 : // -; 1376 : // "baseline" JPEG/JFIF decoder -; 1377 : // -; 1378 : // simple implementation -; 1379 : // - doesn't support delayed output of y-dimension -; 1380 : // - simple interface (only one output format: 8-bit interleaved RGB) -; 1381 : // - doesn't try to recover corrupt jpegs -; 1382 : // - doesn't allow partial loading, loading multiple at once -; 1383 : // - still fast on x86 (copying globals into locals doesn't help x86) -; 1384 : // - allocates lots of intermediate memory (full size of all components) -; 1385 : // - non-interleaved case requires this anyway -; 1386 : // - allows good upsampling (see next) -; 1387 : // high-quality -; 1388 : // - upsampled channels are bilinearly interpolated, even across blocks -; 1389 : // - quality integer IDCT derived from IJG's 'slow' -; 1390 : // performance -; 1391 : // - fast huffman; reasonable integer IDCT -; 1392 : // - some SIMD kernels for common paths on targets with SSE2/NEON -; 1393 : // - uses a lot of intermediate memory, could cache poorly -; 1394 : -; 1395 : #ifndef STBI_NO_JPEG -; 1396 : -; 1397 : // huffman decoding acceleration -; 1398 : #define FAST_BITS 9 // larger handles more cases; smaller stomps less cache -; 1399 : -; 1400 : typedef struct -; 1401 : { -; 1402 : stbi_uc fast[1 << FAST_BITS]; -; 1403 : // weirdly, repacking this into AoS is a 10% speed loss, instead of a win -; 1404 : stbi__uint16 code[256]; -; 1405 : stbi_uc values[256]; -; 1406 : stbi_uc size[257]; -; 1407 : unsigned int maxcode[18]; -; 1408 : int delta[17]; // old 'firstsymbol' - old 'firstcode' -; 1409 : } stbi__huffman; -; 1410 : -; 1411 : typedef struct -; 1412 : { -; 1413 : stbi__context* s; -; 1414 : stbi__huffman huff_dc[4]; -; 1415 : stbi__huffman huff_ac[4]; -; 1416 : stbi__uint16 dequant[4][64]; -; 1417 : stbi__int16 fast_ac[4][1 << FAST_BITS]; -; 1418 : -; 1419 : // sizes for components, interleaved MCUs -; 1420 : int img_h_max, img_v_max; -; 1421 : int img_mcu_x, img_mcu_y; -; 1422 : int img_mcu_w, img_mcu_h; -; 1423 : -; 1424 : // definition of jpeg image component -; 1425 : struct -; 1426 : { -; 1427 : int id; -; 1428 : int h, v; -; 1429 : int tq; -; 1430 : int hd, ha; -; 1431 : int dc_pred; -; 1432 : -; 1433 : int x, y, w2, h2; -; 1434 : stbi_uc* data; -; 1435 : void* raw_data, * raw_coeff; -; 1436 : stbi_uc* linebuf; -; 1437 : short* coeff; // progressive only -; 1438 : int coeff_w, coeff_h; // number of 8x8 coefficient blocks -; 1439 : } img_comp[4]; -; 1440 : -; 1441 : stbi__uint32 code_buffer; // jpeg entropy-coded buffer -; 1442 : int code_bits; // number of valid bits -; 1443 : unsigned char marker; // marker seen while filling entropy buffer -; 1444 : int nomore; // flag if we saw a marker so must stop -; 1445 : -; 1446 : int progressive; -; 1447 : int spec_start; -; 1448 : int spec_end; -; 1449 : int succ_high; -; 1450 : int succ_low; -; 1451 : int eob_run; -; 1452 : int jfif; -; 1453 : int app14_color_transform; // Adobe APP14 tag -; 1454 : int rgb; -; 1455 : -; 1456 : int scan_n, order[4]; -; 1457 : int restart_interval, todo; -; 1458 : -; 1459 : // kernels -; 1460 : void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]); -; 1461 : void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); -; 1462 : stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); -; 1463 : } stbi__jpeg; -; 1464 : -; 1465 : static int stbi__build_huffman(stbi__huffman* h, int* count) -; 1466 : { -; 1467 : int i, j, k = 0; -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { -; 1471 : for (j = 0; j < count[i]; ++j) { -; 1472 : h->size[k++] = (stbi_uc)(i + 1); -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); -; 1474 : } -; 1475 : } -; 1476 : h->size[k] = 0; -; 1477 : -; 1478 : // compute actual symbols (from jpeg spec) -; 1479 : code = 0; -; 1480 : k = 0; -; 1481 : for (j = 1; j <= 16; ++j) { -; 1482 : // compute delta to add to code to compute symbol id -; 1483 : h->delta[j] = k - code; -; 1484 : if (h->size[k] == j) { -; 1485 : while (h->size[k] == j) -; 1486 : h->code[k++] = (stbi__uint16)(code++); -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); -; 1488 : } -; 1489 : // compute largest code + 1 for this size, preshifted as needed later -; 1490 : h->maxcode[j] = code << (16 - j); -; 1491 : code <<= 1; -; 1492 : } -; 1493 : h->maxcode[j] = 0xffffffff; -; 1494 : -; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated -; 1496 : memset(h->fast, 255, 1 << FAST_BITS); -; 1497 : for (i = 0; i < k; ++i) { -; 1498 : int s = h->size[i]; -; 1499 : if (s <= FAST_BITS) { -; 1500 : int c = h->code[i] << (FAST_BITS - s); -; 1501 : int m = 1 << (FAST_BITS - s); -; 1502 : for (j = 0; j < m; ++j) { -; 1503 : h->fast[c + j] = (stbi_uc)i; -; 1504 : } -; 1505 : } -; 1506 : } -; 1507 : return 1; -; 1508 : } -; 1509 : -; 1510 : // build a table that decodes both magnitude and value of small ACs in -; 1511 : // one go. -; 1512 : static void stbi__build_fast_ac(stbi__int16* fast_ac, stbi__huffman* h) -; 1513 : { -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { -; 1516 : stbi_uc fast = h->fast[i]; -; 1517 : fast_ac[i] = 0; -; 1518 : if (fast < 255) { -; 1519 : int rs = h->values[fast]; -; 1520 : int run = (rs >> 4) & 15; -; 1521 : int magbits = rs & 15; -; 1522 : int len = h->size[fast]; -; 1523 : -; 1524 : if (magbits && len + magbits <= FAST_BITS) { -; 1525 : // magnitude code followed by receive_extend code -; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); -; 1527 : int m = 1 << (magbits - 1); -; 1528 : if (k < m) k += (~0U << magbits) + 1; -; 1529 : // if the result is small enough, we can fit it in fast_ac table -; 1530 : if (k >= -128 && k <= 127) -; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); -; 1532 : } -; 1533 : } -; 1534 : } -; 1535 : } -; 1536 : -; 1537 : static void stbi__grow_buffer_unsafe(stbi__jpeg* j) -; 1538 : { -; 1539 : do { -; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); -; 1541 : if (b == 0xff) { -; 1542 : int c = stbi__get8(j->s); -; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes -; 1544 : if (c != 0) { -; 1545 : j->marker = (unsigned char)c; -; 1546 : j->nomore = 1; -; 1547 : return; -; 1548 : } -; 1549 : } -; 1550 : j->code_buffer |= b << (24 - j->code_bits); -; 1551 : j->code_bits += 8; -; 1552 : } while (j->code_bits <= 24); -; 1553 : } -; 1554 : -; 1555 : // (1 << n) - 1 -; 1556 : static const stbi__uint32 stbi__bmask[17] = { 0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535 }; -; 1557 : -; 1558 : // decode a jpeg huffman value from the bitstream -; 1559 : stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg* j, stbi__huffman* h) -; 1560 : { -; 1561 : unsigned int temp; -; 1562 : int c, k; -; 1563 : -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1569 : k = h->fast[c]; -; 1570 : if (k < 255) { -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; -; 1575 : j->code_bits -= s; -; 1576 : return h->values[k]; -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; -; 1586 : for (k = FAST_BITS + 1; ; ++k) -; 1587 : if (temp < h->maxcode[k]) -; 1588 : break; -; 1589 : if (k == 17) { -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; -; 1608 : } -; 1609 : -; 1610 : // bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) -; 1623 : k = stbi_lrot(j->code_buffer, n); -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); -; 1628 : } -; 1629 : -; 1630 : // get some unsigned bits -; 1631 : stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg* j, int n) -; 1632 : { -; 1633 : unsigned int k; -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1636 : k = stbi_lrot(j->code_buffer, n); -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; -; 1640 : return k; -; 1641 : } -; 1642 : -; 1643 : stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg* j) -; 1644 : { -; 1645 : unsigned int k; -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1648 : k = j->code_buffer; -; 1649 : j->code_buffer <<= 1; -; 1650 : --j->code_bits; -; 1651 : return k & 0x80000000; -; 1652 : } -; 1653 : -; 1654 : // given a value that's at position X in the zigzag stream, -; 1655 : // where does it appear in the 8x8 matrix coded as row-major? -; 1656 : static const stbi_uc stbi__jpeg_dezigzag[64 + 15] = -; 1657 : { -; 1658 : 0, 1, 8, 16, 9, 2, 3, 10, -; 1659 : 17, 24, 32, 25, 18, 11, 4, 5, -; 1660 : 12, 19, 26, 33, 40, 48, 41, 34, -; 1661 : 27, 20, 13, 6, 7, 14, 21, 28, -; 1662 : 35, 42, 49, 56, 57, 50, 43, 36, -; 1663 : 29, 22, 15, 23, 30, 37, 44, 51, -; 1664 : 58, 59, 52, 45, 38, 31, 39, 46, -; 1665 : 53, 60, 61, 54, 47, 55, 62, 63, -; 1666 : // let corrupt input sample past end -; 1667 : 63, 63, 63, 63, 63, 63, 63, 63, -; 1668 : 63, 63, 63, 63, 63, 63, 63 -; 1669 : }; -; 1670 : -; 1671 : // decode one 64-entry block-- -; 1672 : static int stbi__jpeg_decode_block(stbi__jpeg* j, short data[64], stbi__huffman* hdc, stbi__huffman* hac, stbi__int16* fac, int b, stbi__uint16* dequant) -; 1673 : { -; 1674 : int diff, dc, k; -; 1675 : int t; -; 1676 : -; 1677 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1678 : t = stbi__jpeg_huff_decode(j, hdc); -; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1680 : -; 1681 : // 0 all the ac values now so we can do it 32-bits at a time -; 1682 : memset(data, 0, 64 * sizeof(data[0])); -; 1683 : -; 1684 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1686 : dc = j->img_comp[b].dc_pred + diff; -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1689 : data[0] = (short)(dc * dequant[0]); -; 1690 : -; 1691 : // decode AC components, see JPEG spec -; 1692 : k = 1; -; 1693 : do { -; 1694 : unsigned int zig; -; 1695 : int c, r, s; -; 1696 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1697 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1698 : r = fac[c]; -; 1699 : if (r) { // fast-AC path -; 1700 : k += (r >> 4) & 15; // run -; 1701 : s = r & 15; // combined length -; 1702 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1703 : j->code_buffer <<= s; -; 1704 : j->code_bits -= s; -; 1705 : // decode into unzigzag'd location -; 1706 : zig = stbi__jpeg_dezigzag[k++]; -; 1707 : data[zig] = (short)((r >> 8) * dequant[zig]); -; 1708 : } -; 1709 : else { -; 1710 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1711 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1712 : s = rs & 15; -; 1713 : r = rs >> 4; -; 1714 : if (s == 0) { -; 1715 : if (rs != 0xf0) break; // end block -; 1716 : k += 16; -; 1717 : } -; 1718 : else { -; 1719 : k += r; -; 1720 : // decode into unzigzag'd location -; 1721 : zig = stbi__jpeg_dezigzag[k++]; -; 1722 : data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]); -; 1723 : } -; 1724 : } -; 1725 : } while (k < 64); -; 1726 : return 1; -; 1727 : } -; 1728 : -; 1729 : static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg* j, short data[64], stbi__huffman* hdc, int b) -; 1730 : { -; 1731 : int diff, dc; -; 1732 : int t; -; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1734 : -; 1735 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1736 : -; 1737 : if (j->succ_high == 0) { -; 1738 : // first scan for DC coefficient, must be first -; 1739 : memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now -; 1740 : t = stbi__jpeg_huff_decode(j, hdc); -; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1742 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1745 : dc = j->img_comp[b].dc_pred + diff; -; 1746 : j->img_comp[b].dc_pred = dc; -; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1748 : data[0] = (short)(dc * (1 << j->succ_low)); -; 1749 : } -; 1750 : else { -; 1751 : // refinement scan for DC coefficient -; 1752 : if (stbi__jpeg_get_bit(j)) -; 1753 : data[0] += (short)(1 << j->succ_low); -; 1754 : } -; 1755 : return 1; -; 1756 : } -; 1757 : -; 1758 : // @OPTIMIZE: store non-zigzagged during the decode passes, -; 1759 : // and only de-zigzag when dequantizing -; 1760 : static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg* j, short data[64], stbi__huffman* hac, stbi__int16* fac) -; 1761 : { -; 1762 : int k; -; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1764 : -; 1765 : if (j->succ_high == 0) { -; 1766 : int shift = j->succ_low; -; 1767 : -; 1768 : if (j->eob_run) { -; 1769 : --j->eob_run; -; 1770 : return 1; -; 1771 : } -; 1772 : -; 1773 : k = j->spec_start; -; 1774 : do { -; 1775 : unsigned int zig; -; 1776 : int c, r, s; -; 1777 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1778 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1779 : r = fac[c]; -; 1780 : if (r) { // fast-AC path -; 1781 : k += (r >> 4) & 15; // run -; 1782 : s = r & 15; // combined length -; 1783 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1784 : j->code_buffer <<= s; -; 1785 : j->code_bits -= s; -; 1786 : zig = stbi__jpeg_dezigzag[k++]; -; 1787 : data[zig] = (short)((r >> 8) * (1 << shift)); -; 1788 : } -; 1789 : else { -; 1790 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1791 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1792 : s = rs & 15; -; 1793 : r = rs >> 4; -; 1794 : if (s == 0) { -; 1795 : if (r < 15) { -; 1796 : j->eob_run = (1 << r); -; 1797 : if (r) -; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1799 : --j->eob_run; -; 1800 : break; -; 1801 : } -; 1802 : k += 16; -; 1803 : } -; 1804 : else { -; 1805 : k += r; -; 1806 : zig = stbi__jpeg_dezigzag[k++]; -; 1807 : data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift)); -; 1808 : } -; 1809 : } -; 1810 : } while (k <= j->spec_end); -; 1811 : } -; 1812 : else { -; 1813 : // refinement scan for these AC coefficients -; 1814 : -; 1815 : short bit = (short)(1 << j->succ_low); -; 1816 : -; 1817 : if (j->eob_run) { -; 1818 : --j->eob_run; -; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { -; 1820 : short* p = &data[stbi__jpeg_dezigzag[k]]; -; 1821 : if (*p != 0) -; 1822 : if (stbi__jpeg_get_bit(j)) -; 1823 : if ((*p & bit) == 0) { -; 1824 : if (*p > 0) -; 1825 : *p += bit; -; 1826 : else -; 1827 : *p -= bit; -; 1828 : } -; 1829 : } -; 1830 : } -; 1831 : else { -; 1832 : k = j->spec_start; -; 1833 : do { -; 1834 : int r, s; -; 1835 : int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh -; 1836 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1837 : s = rs & 15; -; 1838 : r = rs >> 4; -; 1839 : if (s == 0) { -; 1840 : if (r < 15) { -; 1841 : j->eob_run = (1 << r) - 1; -; 1842 : if (r) -; 1843 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1844 : r = 64; // force end of block -; 1845 : } -; 1846 : else { -; 1847 : // r=15 s=0 should write 16 0s, so we just do -; 1848 : // a run of 15 0s and then write s (which is 0), -; 1849 : // so we don't have to do anything special here -; 1850 : } -; 1851 : } -; 1852 : else { -; 1853 : if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1854 : // sign bit -; 1855 : if (stbi__jpeg_get_bit(j)) -; 1856 : s = bit; -; 1857 : else -; 1858 : s = -bit; -; 1859 : } -; 1860 : -; 1861 : // advance by r -; 1862 : while (k <= j->spec_end) { -; 1863 : short* p = &data[stbi__jpeg_dezigzag[k++]]; -; 1864 : if (*p != 0) { -; 1865 : if (stbi__jpeg_get_bit(j)) -; 1866 : if ((*p & bit) == 0) { -; 1867 : if (*p > 0) -; 1868 : *p += bit; -; 1869 : else -; 1870 : *p -= bit; -; 1871 : } -; 1872 : } -; 1873 : else { -; 1874 : if (r == 0) { -; 1875 : *p = (short)s; -; 1876 : break; -; 1877 : } -; 1878 : --r; -; 1879 : } -; 1880 : } -; 1881 : } while (k <= j->spec_end); -; 1882 : } -; 1883 : } -; 1884 : return 1; -; 1885 : } -; 1886 : -; 1887 : // take a -128..127 value and stbi__clamp it and convert to 0..255 -; 1888 : stbi_inline static stbi_uc stbi__clamp(int x) -; 1889 : { -; 1890 : // trick to use a single test to catch both cases -; 1891 : if ((unsigned int)x > 255) { -; 1892 : if (x < 0) return 0; -; 1893 : if (x > 255) return 255; -; 1894 : } -; 1895 : return (stbi_uc)x; -; 1896 : } -; 1897 : -; 1898 : #define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -; 1899 : #define stbi__fsh(x) ((x) * 4096) -; 1900 : -; 1901 : // derived from jidctint -- DCT_ISLOW -; 1902 : #define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ -; 1903 : int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ -; 1904 : p2 = s2; \ -; 1905 : p3 = s6; \ -; 1906 : p1 = (p2+p3) * stbi__f2f(0.5411961f); \ -; 1907 : t2 = p1 + p3*stbi__f2f(-1.847759065f); \ -; 1908 : t3 = p1 + p2*stbi__f2f( 0.765366865f); \ -; 1909 : p2 = s0; \ -; 1910 : p3 = s4; \ -; 1911 : t0 = stbi__fsh(p2+p3); \ -; 1912 : t1 = stbi__fsh(p2-p3); \ -; 1913 : x0 = t0+t3; \ -; 1914 : x3 = t0-t3; \ -; 1915 : x1 = t1+t2; \ -; 1916 : x2 = t1-t2; \ -; 1917 : t0 = s7; \ -; 1918 : t1 = s5; \ -; 1919 : t2 = s3; \ -; 1920 : t3 = s1; \ -; 1921 : p3 = t0+t2; \ -; 1922 : p4 = t1+t3; \ -; 1923 : p1 = t0+t3; \ -; 1924 : p2 = t1+t2; \ -; 1925 : p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ -; 1926 : t0 = t0*stbi__f2f( 0.298631336f); \ -; 1927 : t1 = t1*stbi__f2f( 2.053119869f); \ -; 1928 : t2 = t2*stbi__f2f( 3.072711026f); \ -; 1929 : t3 = t3*stbi__f2f( 1.501321110f); \ -; 1930 : p1 = p5 + p1*stbi__f2f(-0.899976223f); \ -; 1931 : p2 = p5 + p2*stbi__f2f(-2.562915447f); \ -; 1932 : p3 = p3*stbi__f2f(-1.961570560f); \ -; 1933 : p4 = p4*stbi__f2f(-0.390180644f); \ -; 1934 : t3 += p1+p4; \ -; 1935 : t2 += p2+p3; \ -; 1936 : t1 += p2+p4; \ -; 1937 : t0 += p1+p3; -; 1938 : -; 1939 : static void stbi__idct_block(stbi_uc* out, int out_stride, short data[64]) -; 1940 : { -; 1941 : int i, val[64], * v = val; -; 1942 : stbi_uc* o; -; 1943 : short* d = data; -; 1944 : -; 1945 : // columns -; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { -; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing -; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 -; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { -; 1950 : // no shortcut 0 seconds -; 1951 : // (1|2|3|4|5|6|7)==0 0 seconds -; 1952 : // all separate -0.047 seconds -; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds -; 1954 : int dcterm = d[0] * 4; -; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; -; 1956 : } -; 1957 : else { -; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) -; 1959 : // constants scaled things up by 1<<12; let's bring them back -; 1960 : // down, but keep 2 extra bits of precision -; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; -; 1962 : v[0] = (x0 + t3) >> 10; -; 1963 : v[56] = (x0 - t3) >> 10; -; 1964 : v[8] = (x1 + t2) >> 10; -; 1965 : v[48] = (x1 - t2) >> 10; -; 1966 : v[16] = (x2 + t1) >> 10; -; 1967 : v[40] = (x2 - t1) >> 10; -; 1968 : v[24] = (x3 + t0) >> 10; -; 1969 : v[32] = (x3 - t0) >> 10; -; 1970 : } -; 1971 : } -; 1972 : -; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { -; 1974 : // no fast case since the first 1D IDCT spread components out -; 1975 : STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]) -; 1976 : // constants scaled things up by 1<<12, plus we had 1<<2 from first -; 1977 : // loop, plus horizontal and vertical each scale by sqrt(8) so together -; 1978 : // we've got an extra 1<<3, so 1<<17 total we need to remove. -; 1979 : // so we want to round that, which means adding 0.5 * 1<<17, -; 1980 : // aka 65536. Also, we'll end up with -128 to 127 that we want -; 1981 : // to encode as 0..255 by adding 128, so we'll add that before the shift -; 1982 : x0 += 65536 + (128 << 17); -; 1983 : x1 += 65536 + (128 << 17); -; 1984 : x2 += 65536 + (128 << 17); -; 1985 : x3 += 65536 + (128 << 17); -; 1986 : // tried computing the shifts into temps, or'ing the temps to see -; 1987 : // if any were out of range, but that was slower -; 1988 : o[0] = stbi__clamp((x0 + t3) >> 17); -; 1989 : o[7] = stbi__clamp((x0 - t3) >> 17); -; 1990 : o[1] = stbi__clamp((x1 + t2) >> 17); -; 1991 : o[6] = stbi__clamp((x1 - t2) >> 17); -; 1992 : o[2] = stbi__clamp((x2 + t1) >> 17); -; 1993 : o[5] = stbi__clamp((x2 - t1) >> 17); -; 1994 : o[3] = stbi__clamp((x3 + t0) >> 17); -; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); -; 1996 : } -; 1997 : } -; 1998 : -; 1999 : #ifdef STBI_SSE2 -; 2000 : // sse2 integer IDCT. not the fastest possible implementation but it -; 2001 : // produces bit-identical results to the generic C version so it's -; 2002 : // fully "transparent". -; 2003 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2004 : { -; 2005 : // This is constructed to match our regular (generic) integer IDCT exactly. -; 2006 : __m128i row0, row1, row2, row3, row4, row5, row6, row7; -; 2007 : __m128i tmp; -; 2008 : -; 2009 : // dot product constant: even elems=x, odd elems=y -; 2010 : #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) -; 2011 : -; 2012 : // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) -; 2013 : // out(1) = c1[even]*x + c1[odd]*y -; 2014 : #define dct_rot(out0,out1, x,y,c0,c1) \ -; 2015 : __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ -; 2016 : __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ -; 2017 : __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ -; 2018 : __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ -; 2019 : __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ -; 2020 : __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) -; 2021 : -; 2022 : // out = in << 12 (in 16-bit, out 32-bit) -; 2023 : #define dct_widen(out, in) \ -; 2024 : __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ -; 2025 : __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) -; 2026 : -; 2027 : // wide add -; 2028 : #define dct_wadd(out, a, b) \ -; 2029 : __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ -; 2030 : __m128i out##_h = _mm_add_epi32(a##_h, b##_h) -; 2031 : -; 2032 : // wide sub -; 2033 : #define dct_wsub(out, a, b) \ -; 2034 : __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ -; 2035 : __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) -; 2036 : -; 2037 : // butterfly a/b, add bias, then shift by "s" and pack -; 2038 : #define dct_bfly32o(out0, out1, a,b,bias,s) \ -; 2039 : { \ -; 2040 : __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ -; 2041 : __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ -; 2042 : dct_wadd(sum, abiased, b); \ -; 2043 : dct_wsub(dif, abiased, b); \ -; 2044 : out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ -; 2045 : out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ -; 2046 : } -; 2047 : -; 2048 : // 8-bit interleave step (for transposes) -; 2049 : #define dct_interleave8(a, b) \ -; 2050 : tmp = a; \ -; 2051 : a = _mm_unpacklo_epi8(a, b); \ -; 2052 : b = _mm_unpackhi_epi8(tmp, b) -; 2053 : -; 2054 : // 16-bit interleave step (for transposes) -; 2055 : #define dct_interleave16(a, b) \ -; 2056 : tmp = a; \ -; 2057 : a = _mm_unpacklo_epi16(a, b); \ -; 2058 : b = _mm_unpackhi_epi16(tmp, b) -; 2059 : -; 2060 : #define dct_pass(bias,shift) \ -; 2061 : { \ -; 2062 : /* even part */ \ -; 2063 : dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ -; 2064 : __m128i sum04 = _mm_add_epi16(row0, row4); \ -; 2065 : __m128i dif04 = _mm_sub_epi16(row0, row4); \ -; 2066 : dct_widen(t0e, sum04); \ -; 2067 : dct_widen(t1e, dif04); \ -; 2068 : dct_wadd(x0, t0e, t3e); \ -; 2069 : dct_wsub(x3, t0e, t3e); \ -; 2070 : dct_wadd(x1, t1e, t2e); \ -; 2071 : dct_wsub(x2, t1e, t2e); \ -; 2072 : /* odd part */ \ -; 2073 : dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ -; 2074 : dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ -; 2075 : __m128i sum17 = _mm_add_epi16(row1, row7); \ -; 2076 : __m128i sum35 = _mm_add_epi16(row3, row5); \ -; 2077 : dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ -; 2078 : dct_wadd(x4, y0o, y4o); \ -; 2079 : dct_wadd(x5, y1o, y5o); \ -; 2080 : dct_wadd(x6, y2o, y5o); \ -; 2081 : dct_wadd(x7, y3o, y4o); \ -; 2082 : dct_bfly32o(row0,row7, x0,x7,bias,shift); \ -; 2083 : dct_bfly32o(row1,row6, x1,x6,bias,shift); \ -; 2084 : dct_bfly32o(row2,row5, x2,x5,bias,shift); \ -; 2085 : dct_bfly32o(row3,row4, x3,x4,bias,shift); \ -; 2086 : } -; 2087 : -; 2088 : __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); -; 2089 : __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f)); -; 2090 : __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); -; 2091 : __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); -; 2092 : __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f)); -; 2093 : __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f)); -; 2094 : __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f)); -; 2095 : __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f)); -; 2096 : -; 2097 : // rounding biases in column/row passes, see stbi__idct_block for explanation. -; 2098 : __m128i bias_0 = _mm_set1_epi32(512); -; 2099 : __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17)); -; 2100 : -; 2101 : // load -; 2102 : row0 = _mm_load_si128((const __m128i*) (data + 0 * 8)); -; 2103 : row1 = _mm_load_si128((const __m128i*) (data + 1 * 8)); -; 2104 : row2 = _mm_load_si128((const __m128i*) (data + 2 * 8)); -; 2105 : row3 = _mm_load_si128((const __m128i*) (data + 3 * 8)); -; 2106 : row4 = _mm_load_si128((const __m128i*) (data + 4 * 8)); -; 2107 : row5 = _mm_load_si128((const __m128i*) (data + 5 * 8)); -; 2108 : row6 = _mm_load_si128((const __m128i*) (data + 6 * 8)); -; 2109 : row7 = _mm_load_si128((const __m128i*) (data + 7 * 8)); -; 2110 : -; 2111 : // column pass -; 2112 : dct_pass(bias_0, 10); -; 2113 : -; 2114 : { -; 2115 : // 16bit 8x8 transpose pass 1 -; 2116 : dct_interleave16(row0, row4); -; 2117 : dct_interleave16(row1, row5); -; 2118 : dct_interleave16(row2, row6); -; 2119 : dct_interleave16(row3, row7); -; 2120 : -; 2121 : // transpose pass 2 -; 2122 : dct_interleave16(row0, row2); -; 2123 : dct_interleave16(row1, row3); -; 2124 : dct_interleave16(row4, row6); -; 2125 : dct_interleave16(row5, row7); -; 2126 : -; 2127 : // transpose pass 3 -; 2128 : dct_interleave16(row0, row1); -; 2129 : dct_interleave16(row2, row3); -; 2130 : dct_interleave16(row4, row5); -; 2131 : dct_interleave16(row6, row7); -; 2132 : } -; 2133 : -; 2134 : // row pass -; 2135 : dct_pass(bias_1, 17); -; 2136 : -; 2137 : { -; 2138 : // pack -; 2139 : __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 -; 2140 : __m128i p1 = _mm_packus_epi16(row2, row3); -; 2141 : __m128i p2 = _mm_packus_epi16(row4, row5); -; 2142 : __m128i p3 = _mm_packus_epi16(row6, row7); -; 2143 : -; 2144 : // 8bit 8x8 transpose pass 1 -; 2145 : dct_interleave8(p0, p2); // a0e0a1e1... -; 2146 : dct_interleave8(p1, p3); // c0g0c1g1... -; 2147 : -; 2148 : // transpose pass 2 -; 2149 : dct_interleave8(p0, p1); // a0c0e0g0... -; 2150 : dct_interleave8(p2, p3); // b0d0f0h0... -; 2151 : -; 2152 : // transpose pass 3 -; 2153 : dct_interleave8(p0, p2); // a0b0c0d0... -; 2154 : dct_interleave8(p1, p3); // a4b4c4d4... -; 2155 : -; 2156 : // store -; 2157 : _mm_storel_epi64((__m128i*) out, p0); out += out_stride; -; 2158 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; -; 2159 : _mm_storel_epi64((__m128i*) out, p2); out += out_stride; -; 2160 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; -; 2161 : _mm_storel_epi64((__m128i*) out, p1); out += out_stride; -; 2162 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; -; 2163 : _mm_storel_epi64((__m128i*) out, p3); out += out_stride; -; 2164 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e)); -; 2165 : } -; 2166 : -; 2167 : #undef dct_const -; 2168 : #undef dct_rot -; 2169 : #undef dct_widen -; 2170 : #undef dct_wadd -; 2171 : #undef dct_wsub -; 2172 : #undef dct_bfly32o -; 2173 : #undef dct_interleave8 -; 2174 : #undef dct_interleave16 -; 2175 : #undef dct_pass -; 2176 : } -; 2177 : -; 2178 : #endif // STBI_SSE2 -; 2179 : -; 2180 : #ifdef STBI_NEON -; 2181 : -; 2182 : // NEON integer IDCT. should produce bit-identical -; 2183 : // results to the generic C version. -; 2184 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2185 : { -; 2186 : int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; -; 2187 : -; 2188 : int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); -; 2189 : int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); -; 2190 : int16x4_t rot0_2 = vdup_n_s16(stbi__f2f(0.765366865f)); -; 2191 : int16x4_t rot1_0 = vdup_n_s16(stbi__f2f(1.175875602f)); -; 2192 : int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); -; 2193 : int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); -; 2194 : int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); -; 2195 : int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); -; 2196 : int16x4_t rot3_0 = vdup_n_s16(stbi__f2f(0.298631336f)); -; 2197 : int16x4_t rot3_1 = vdup_n_s16(stbi__f2f(2.053119869f)); -; 2198 : int16x4_t rot3_2 = vdup_n_s16(stbi__f2f(3.072711026f)); -; 2199 : int16x4_t rot3_3 = vdup_n_s16(stbi__f2f(1.501321110f)); -; 2200 : -; 2201 : #define dct_long_mul(out, inq, coeff) \ -; 2202 : int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ -; 2203 : int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) -; 2204 : -; 2205 : #define dct_long_mac(out, acc, inq, coeff) \ -; 2206 : int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ -; 2207 : int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) -; 2208 : -; 2209 : #define dct_widen(out, inq) \ -; 2210 : int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ -; 2211 : int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) -; 2212 : -; 2213 : // wide add -; 2214 : #define dct_wadd(out, a, b) \ -; 2215 : int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ -; 2216 : int32x4_t out##_h = vaddq_s32(a##_h, b##_h) -; 2217 : -; 2218 : // wide sub -; 2219 : #define dct_wsub(out, a, b) \ -; 2220 : int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ -; 2221 : int32x4_t out##_h = vsubq_s32(a##_h, b##_h) -; 2222 : -; 2223 : // butterfly a/b, then shift using "shiftop" by "s" and pack -; 2224 : #define dct_bfly32o(out0,out1, a,b,shiftop,s) \ -; 2225 : { \ -; 2226 : dct_wadd(sum, a, b); \ -; 2227 : dct_wsub(dif, a, b); \ -; 2228 : out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ -; 2229 : out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ -; 2230 : } -; 2231 : -; 2232 : #define dct_pass(shiftop, shift) \ -; 2233 : { \ -; 2234 : /* even part */ \ -; 2235 : int16x8_t sum26 = vaddq_s16(row2, row6); \ -; 2236 : dct_long_mul(p1e, sum26, rot0_0); \ -; 2237 : dct_long_mac(t2e, p1e, row6, rot0_1); \ -; 2238 : dct_long_mac(t3e, p1e, row2, rot0_2); \ -; 2239 : int16x8_t sum04 = vaddq_s16(row0, row4); \ -; 2240 : int16x8_t dif04 = vsubq_s16(row0, row4); \ -; 2241 : dct_widen(t0e, sum04); \ -; 2242 : dct_widen(t1e, dif04); \ -; 2243 : dct_wadd(x0, t0e, t3e); \ -; 2244 : dct_wsub(x3, t0e, t3e); \ -; 2245 : dct_wadd(x1, t1e, t2e); \ -; 2246 : dct_wsub(x2, t1e, t2e); \ -; 2247 : /* odd part */ \ -; 2248 : int16x8_t sum15 = vaddq_s16(row1, row5); \ -; 2249 : int16x8_t sum17 = vaddq_s16(row1, row7); \ -; 2250 : int16x8_t sum35 = vaddq_s16(row3, row5); \ -; 2251 : int16x8_t sum37 = vaddq_s16(row3, row7); \ -; 2252 : int16x8_t sumodd = vaddq_s16(sum17, sum35); \ -; 2253 : dct_long_mul(p5o, sumodd, rot1_0); \ -; 2254 : dct_long_mac(p1o, p5o, sum17, rot1_1); \ -; 2255 : dct_long_mac(p2o, p5o, sum35, rot1_2); \ -; 2256 : dct_long_mul(p3o, sum37, rot2_0); \ -; 2257 : dct_long_mul(p4o, sum15, rot2_1); \ -; 2258 : dct_wadd(sump13o, p1o, p3o); \ -; 2259 : dct_wadd(sump24o, p2o, p4o); \ -; 2260 : dct_wadd(sump23o, p2o, p3o); \ -; 2261 : dct_wadd(sump14o, p1o, p4o); \ -; 2262 : dct_long_mac(x4, sump13o, row7, rot3_0); \ -; 2263 : dct_long_mac(x5, sump24o, row5, rot3_1); \ -; 2264 : dct_long_mac(x6, sump23o, row3, rot3_2); \ -; 2265 : dct_long_mac(x7, sump14o, row1, rot3_3); \ -; 2266 : dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ -; 2267 : dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ -; 2268 : dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ -; 2269 : dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ -; 2270 : } -; 2271 : -; 2272 : // load -; 2273 : row0 = vld1q_s16(data + 0 * 8); -; 2274 : row1 = vld1q_s16(data + 1 * 8); -; 2275 : row2 = vld1q_s16(data + 2 * 8); -; 2276 : row3 = vld1q_s16(data + 3 * 8); -; 2277 : row4 = vld1q_s16(data + 4 * 8); -; 2278 : row5 = vld1q_s16(data + 5 * 8); -; 2279 : row6 = vld1q_s16(data + 6 * 8); -; 2280 : row7 = vld1q_s16(data + 7 * 8); -; 2281 : -; 2282 : // add DC bias -; 2283 : row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); -; 2284 : -; 2285 : // column pass -; 2286 : dct_pass(vrshrn_n_s32, 10); -; 2287 : -; 2288 : // 16bit 8x8 transpose -; 2289 : { -; 2290 : // these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -; 2291 : // whether compilers actually get this is another story, sadly. -; 2292 : #define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -; 2293 : #define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -; 2294 : #define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } -; 2295 : -; 2296 : // pass 1 -; 2297 : dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 -; 2298 : dct_trn16(row2, row3); -; 2299 : dct_trn16(row4, row5); -; 2300 : dct_trn16(row6, row7); -; 2301 : -; 2302 : // pass 2 -; 2303 : dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 -; 2304 : dct_trn32(row1, row3); -; 2305 : dct_trn32(row4, row6); -; 2306 : dct_trn32(row5, row7); -; 2307 : -; 2308 : // pass 3 -; 2309 : dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 -; 2310 : dct_trn64(row1, row5); -; 2311 : dct_trn64(row2, row6); -; 2312 : dct_trn64(row3, row7); -; 2313 : -; 2314 : #undef dct_trn16 -; 2315 : #undef dct_trn32 -; 2316 : #undef dct_trn64 -; 2317 : } -; 2318 : -; 2319 : // row pass -; 2320 : // vrshrn_n_s32 only supports shifts up to 16, we need -; 2321 : // 17. so do a non-rounding shift of 16 first then follow -; 2322 : // up with a rounding shift by 1. -; 2323 : dct_pass(vshrn_n_s32, 16); -; 2324 : -; 2325 : { -; 2326 : // pack and round -; 2327 : uint8x8_t p0 = vqrshrun_n_s16(row0, 1); -; 2328 : uint8x8_t p1 = vqrshrun_n_s16(row1, 1); -; 2329 : uint8x8_t p2 = vqrshrun_n_s16(row2, 1); -; 2330 : uint8x8_t p3 = vqrshrun_n_s16(row3, 1); -; 2331 : uint8x8_t p4 = vqrshrun_n_s16(row4, 1); -; 2332 : uint8x8_t p5 = vqrshrun_n_s16(row5, 1); -; 2333 : uint8x8_t p6 = vqrshrun_n_s16(row6, 1); -; 2334 : uint8x8_t p7 = vqrshrun_n_s16(row7, 1); -; 2335 : -; 2336 : // again, these can translate into one instruction, but often don't. -; 2337 : #define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -; 2338 : #define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -; 2339 : #define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } -; 2340 : -; 2341 : // sadly can't use interleaved stores here since we only write -; 2342 : // 8 bytes to each scan line! -; 2343 : -; 2344 : // 8x8 8-bit transpose pass 1 -; 2345 : dct_trn8_8(p0, p1); -; 2346 : dct_trn8_8(p2, p3); -; 2347 : dct_trn8_8(p4, p5); -; 2348 : dct_trn8_8(p6, p7); -; 2349 : -; 2350 : // pass 2 -; 2351 : dct_trn8_16(p0, p2); -; 2352 : dct_trn8_16(p1, p3); -; 2353 : dct_trn8_16(p4, p6); -; 2354 : dct_trn8_16(p5, p7); -; 2355 : -; 2356 : // pass 3 -; 2357 : dct_trn8_32(p0, p4); -; 2358 : dct_trn8_32(p1, p5); -; 2359 : dct_trn8_32(p2, p6); -; 2360 : dct_trn8_32(p3, p7); -; 2361 : -; 2362 : // store -; 2363 : vst1_u8(out, p0); out += out_stride; -; 2364 : vst1_u8(out, p1); out += out_stride; -; 2365 : vst1_u8(out, p2); out += out_stride; -; 2366 : vst1_u8(out, p3); out += out_stride; -; 2367 : vst1_u8(out, p4); out += out_stride; -; 2368 : vst1_u8(out, p5); out += out_stride; -; 2369 : vst1_u8(out, p6); out += out_stride; -; 2370 : vst1_u8(out, p7); -; 2371 : -; 2372 : #undef dct_trn8_8 -; 2373 : #undef dct_trn8_16 -; 2374 : #undef dct_trn8_32 -; 2375 : } -; 2376 : -; 2377 : #undef dct_long_mul -; 2378 : #undef dct_long_mac -; 2379 : #undef dct_widen -; 2380 : #undef dct_wadd -; 2381 : #undef dct_wsub -; 2382 : #undef dct_bfly32o -; 2383 : #undef dct_pass -; 2384 : } -; 2385 : -; 2386 : #endif // STBI_NEON -; 2387 : -; 2388 : #define STBI__MARKER_none 0xff -; 2389 : // if there's a pending marker from the entropy stream, return that -; 2390 : // otherwise, fetch from the stream and get a marker. if there's no -; 2391 : // marker, return 0xff, which is never a valid marker value -; 2392 : static stbi_uc stbi__get_marker(stbi__jpeg* j) -; 2393 : { -; 2394 : stbi_uc x; -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } -; 2396 : x = stbi__get8(j->s); -; 2397 : if (x != 0xff) return STBI__MARKER_none; -; 2398 : while (x == 0xff) -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes -; 2400 : return x; -; 2401 : } -; 2402 : -; 2403 : // in each scan, we'll have scan_n components, and the order -; 2404 : // of the components is specified by order[] -; 2405 : #define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) -; 2406 : -; 2407 : // after a restart interval, stbi__jpeg_reset the entropy decoder and -; 2408 : // the dc prediction -; 2409 : static void stbi__jpeg_reset(stbi__jpeg* j) -; 2410 : { -; 2411 : j->code_bits = 0; -; 2412 : j->code_buffer = 0; -; 2413 : j->nomore = 0; -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; -; 2417 : j->eob_run = 0; -; 2418 : // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, -; 2419 : // since we don't even allow 1<<30 pixels -; 2420 : } -; 2421 : -; 2422 : static int stbi__parse_entropy_coded_data(stbi__jpeg* z) -; 2423 : { -; 2424 : stbi__jpeg_reset(z); -; 2425 : if (!z->progressive) { -; 2426 : if (z->scan_n == 1) { -; 2427 : int i, j; -; 2428 : STBI_SIMD_ALIGN(short, data[64]); -; 2429 : int n = z->order[0]; -; 2430 : // non-interleaved data, we just need to process one block at a time, -; 2431 : // in trivial scanline order -; 2432 : // number of blocks to do just depends on how many actual "pixels" this -; 2433 : // component has, independent of interleaved MCU blocking and such -; 2434 : int w = (z->img_comp[n].x + 7) >> 3; -; 2435 : int h = (z->img_comp[n].y + 7) >> 3; -; 2436 : for (j = 0; j < h; ++j) { -; 2437 : for (i = 0; i < w; ++i) { -; 2438 : int ha = z->img_comp[n].ha; -; 2439 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2440 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2441 : // every data block is an MCU, so countdown the restart interval -; 2442 : if (--z->todo <= 0) { -; 2443 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2444 : // if it's NOT a restart, then just bail, so we get corrupt data -; 2445 : // rather than no data -; 2446 : if (!STBI__RESTART(z->marker)) return 1; -; 2447 : stbi__jpeg_reset(z); -; 2448 : } -; 2449 : } -; 2450 : } -; 2451 : return 1; -; 2452 : } -; 2453 : else { // interleaved -; 2454 : int i, j, k, x, y; -; 2455 : STBI_SIMD_ALIGN(short, data[64]); -; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2458 : // scan an interleaved mcu... process scan_n components in order -; 2459 : for (k = 0; k < z->scan_n; ++k) { -; 2460 : int n = z->order[k]; -; 2461 : // scan out an mcu's worth of this component; that's just determined -; 2462 : // by the basic H and V specified for the component -; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2464 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2465 : int x2 = (i * z->img_comp[n].h + x) * 8; -; 2466 : int y2 = (j * z->img_comp[n].v + y) * 8; -; 2467 : int ha = z->img_comp[n].ha; -; 2468 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2469 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); -; 2470 : } -; 2471 : } -; 2472 : } -; 2473 : // after all interleaved components, that's an interleaved MCU, -; 2474 : // so now count down the restart interval -; 2475 : if (--z->todo <= 0) { -; 2476 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2477 : if (!STBI__RESTART(z->marker)) return 1; -; 2478 : stbi__jpeg_reset(z); -; 2479 : } -; 2480 : } -; 2481 : } -; 2482 : return 1; -; 2483 : } -; 2484 : } -; 2485 : else { -; 2486 : if (z->scan_n == 1) { -; 2487 : int i, j; -; 2488 : int n = z->order[0]; -; 2489 : // non-interleaved data, we just need to process one block at a time, -; 2490 : // in trivial scanline order -; 2491 : // number of blocks to do just depends on how many actual "pixels" this -; 2492 : // component has, independent of interleaved MCU blocking and such -; 2493 : int w = (z->img_comp[n].x + 7) >> 3; -; 2494 : int h = (z->img_comp[n].y + 7) >> 3; -; 2495 : for (j = 0; j < h; ++j) { -; 2496 : for (i = 0; i < w; ++i) { -; 2497 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2498 : if (z->spec_start == 0) { -; 2499 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2500 : return 0; -; 2501 : } -; 2502 : else { -; 2503 : int ha = z->img_comp[n].ha; -; 2504 : if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) -; 2505 : return 0; -; 2506 : } -; 2507 : // every data block is an MCU, so countdown the restart interval -; 2508 : if (--z->todo <= 0) { -; 2509 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2510 : if (!STBI__RESTART(z->marker)) return 1; -; 2511 : stbi__jpeg_reset(z); -; 2512 : } -; 2513 : } -; 2514 : } -; 2515 : return 1; -; 2516 : } -; 2517 : else { // interleaved -; 2518 : int i, j, k, x, y; -; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2521 : // scan an interleaved mcu... process scan_n components in order -; 2522 : for (k = 0; k < z->scan_n; ++k) { -; 2523 : int n = z->order[k]; -; 2524 : // scan out an mcu's worth of this component; that's just determined -; 2525 : // by the basic H and V specified for the component -; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2528 : int x2 = (i * z->img_comp[n].h + x); -; 2529 : int y2 = (j * z->img_comp[n].v + y); -; 2530 : short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); -; 2531 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2532 : return 0; -; 2533 : } -; 2534 : } -; 2535 : } -; 2536 : // after all interleaved components, that's an interleaved MCU, -; 2537 : // so now count down the restart interval -; 2538 : if (--z->todo <= 0) { -; 2539 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2540 : if (!STBI__RESTART(z->marker)) return 1; -; 2541 : stbi__jpeg_reset(z); -; 2542 : } -; 2543 : } -; 2544 : } -; 2545 : return 1; -; 2546 : } -; 2547 : } -; 2548 : } -; 2549 : -; 2550 : static void stbi__jpeg_dequantize(short* data, stbi__uint16* dequant) -; 2551 : { -; 2552 : int i; -; 2553 : for (i = 0; i < 64; ++i) -; 2554 : data[i] *= dequant[i]; -; 2555 : } -; 2556 : -; 2557 : static void stbi__jpeg_finish(stbi__jpeg* z) -; 2558 : { -; 2559 : if (z->progressive) { -; 2560 : // dequantize and idct the data -; 2561 : int i, j, n; -; 2562 : for (n = 0; n < z->s->img_n; ++n) { -; 2563 : int w = (z->img_comp[n].x + 7) >> 3; -; 2564 : int h = (z->img_comp[n].y + 7) >> 3; -; 2565 : for (j = 0; j < h; ++j) { -; 2566 : for (i = 0; i < w; ++i) { -; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2568 : stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); -; 2569 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2570 : } -; 2571 : } -; 2572 : } -; 2573 : } -; 2574 : } -; 2575 : -; 2576 : static int stbi__process_marker(stbi__jpeg* z, int m) -; 2577 : { -; 2578 : int L; -; 2579 : switch (m) { -; 2580 : case STBI__MARKER_none: // no marker found -; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); -; 2582 : -; 2583 : case 0xDD: // DRI - specify restart interval -; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); -; 2585 : z->restart_interval = stbi__get16be(z->s); -; 2586 : return 1; -; 2587 : -; 2588 : case 0xDB: // DQT - define quantization table -; 2589 : L = stbi__get16be(z->s) - 2; -; 2590 : while (L > 0) { -; 2591 : int q = stbi__get8(z->s); -; 2592 : int p = q >> 4, sixteen = (p != 0); -; 2593 : int t = q & 15, i; -; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); -; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); -; 2596 : -; 2597 : for (i = 0; i < 64; ++i) -; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); -; 2599 : L -= (sixteen ? 129 : 65); -; 2600 : } -; 2601 : return L == 0; -; 2602 : -; 2603 : case 0xC4: // DHT - define huffman table -; 2604 : L = stbi__get16be(z->s) - 2; -; 2605 : while (L > 0) { -; 2606 : stbi_uc* v; -; 2607 : int sizes[16], i, n = 0; -; 2608 : int q = stbi__get8(z->s); -; 2609 : int tc = q >> 4; -; 2610 : int th = q & 15; -; 2611 : if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG"); -; 2612 : for (i = 0; i < 16; ++i) { -; 2613 : sizes[i] = stbi__get8(z->s); -; 2614 : n += sizes[i]; -; 2615 : } -; 2616 : if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values! -; 2617 : L -= 17; -; 2618 : if (tc == 0) { -; 2619 : if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0; -; 2620 : v = z->huff_dc[th].values; -; 2621 : } -; 2622 : else { -; 2623 : if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0; -; 2624 : v = z->huff_ac[th].values; -; 2625 : } -; 2626 : for (i = 0; i < n; ++i) -; 2627 : v[i] = stbi__get8(z->s); -; 2628 : if (tc != 0) -; 2629 : stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); -; 2630 : L -= n; -; 2631 : } -; 2632 : return L == 0; -; 2633 : } -; 2634 : -; 2635 : // check for comment block or APP blocks -; 2636 : if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { -; 2637 : L = stbi__get16be(z->s); -; 2638 : if (L < 2) { -; 2639 : if (m == 0xFE) -; 2640 : return stbi__err("bad COM len", "Corrupt JPEG"); -; 2641 : else -; 2642 : return stbi__err("bad APP len", "Corrupt JPEG"); -; 2643 : } -; 2644 : L -= 2; -; 2645 : -; 2646 : if (m == 0xE0 && L >= 5) { // JFIF APP0 segment -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) -; 2652 : ok = 0; -; 2653 : L -= 5; -; 2654 : if (ok) -; 2655 : z->jfif = 1; -; 2656 : } -; 2657 : else if (m == 0xEE && L >= 12) { // Adobe APP14 segment -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) -; 2663 : ok = 0; -; 2664 : L -= 6; -; 2665 : if (ok) { -; 2666 : stbi__get8(z->s); // version -; 2667 : stbi__get16be(z->s); // flags0 -; 2668 : stbi__get16be(z->s); // flags1 -; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform -; 2670 : L -= 6; -; 2671 : } -; 2672 : } -; 2673 : -; 2674 : stbi__skip(z->s, L); -; 2675 : return 1; -; 2676 : } -; 2677 : -; 2678 : return stbi__err("unknown marker", "Corrupt JPEG"); -; 2679 : } -; 2680 : -; 2681 : // after we see SOS -; 2682 : static int stbi__process_scan_header(stbi__jpeg* z) -; 2683 : { -; 2684 : int i; -; 2685 : int Ls = stbi__get16be(z->s); -; 2686 : z->scan_n = stbi__get8(z->s); -; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); -; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); -; 2689 : for (i = 0; i < z->scan_n; ++i) { -; 2690 : int id = stbi__get8(z->s), which; -; 2691 : int q = stbi__get8(z->s); -; 2692 : for (which = 0; which < z->s->img_n; ++which) -; 2693 : if (z->img_comp[which].id == id) -; 2694 : break; -; 2695 : if (which == z->s->img_n) return 0; // no match -; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); -; 2698 : z->order[i] = which; -; 2699 : } -; 2700 : -; 2701 : { -; 2702 : int aa; -; 2703 : z->spec_start = stbi__get8(z->s); -; 2704 : z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 -; 2705 : aa = stbi__get8(z->s); -; 2706 : z->succ_high = (aa >> 4); -; 2707 : z->succ_low = (aa & 15); -; 2708 : if (z->progressive) { -; 2709 : if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) -; 2710 : return stbi__err("bad SOS", "Corrupt JPEG"); -; 2711 : } -; 2712 : else { -; 2713 : if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2714 : if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2715 : z->spec_end = 63; -; 2716 : } -; 2717 : } -; 2718 : -; 2719 : return 1; -; 2720 : } -; 2721 : -; 2722 : static int stbi__free_jpeg_components(stbi__jpeg* z, int ncomp, int why) -; 2723 : { -; 2724 : int i; -; 2725 : for (i = 0; i < ncomp; ++i) { - +; Line 2725 00762 48 83 c3 60 add rbx, 96 ; 00000060H 00766 48 83 ef 01 sub rdi, 1 0076a 75 b7 jne SHORT $LL63@stbi__proc - -; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); - +; Line 2819 0076c e9 d3 fe ff ff jmp $LN62@stbi__proc $LN195@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00771 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00777 65 48 8b 04 25 @@ -23910,24 +15642,14 @@ $LN195@stbi__proc: 00785 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00789 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - -; 2777 : -; 2778 : if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); - +; Line 2778 00790 e9 ab fe ff ff jmp $LN268@stbi__proc $LN15@stbi__proc: - -; 2830 : } -; 2831 : } -; 2832 : -; 2833 : return 1; - +; Line 2833 00795 b8 01 00 00 00 mov eax, 1 0079a e9 a7 fe ff ff jmp $LN265@stbi__proc $LN201@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0079f 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 007a5 65 48 8b 04 25 @@ -23937,13 +15659,9 @@ $LN201@stbi__proc: 007b7 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BE@DAPHADHL@bad?5component?5count@ 007be 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2755 : if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG"); - +; Line 2755 007c2 33 c0 xor eax, eax - -; 2834 : } - +; Line 2834 007c4 48 83 c4 20 add rsp, 32 ; 00000020H 007c8 41 5f pop r15 007ca 5f pop rdi @@ -23952,9 +15670,7 @@ $LN201@stbi__proc: 007cd 5b pop rbx 007ce c3 ret 0 $LN189@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 007cf 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 007d5 65 48 8b 04 25 @@ -23964,13 +15680,9 @@ $LN189@stbi__proc: 007e7 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0L@BCINMEBJ@only?58?9bit@ 007ee 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 2749 : p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline - +; Line 2749 007f2 33 c0 xor eax, eax - -; 2834 : } - +; Line 2834 007f4 48 83 c4 20 add rsp, 32 ; 00000020H 007f8 41 5f pop r15 007fa 5f pop rdi @@ -23981,653 +15693,339 @@ $LN189@stbi__proc: stbi__process_frame_header ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__decode_jpeg_header _TEXT SEGMENT z$ = 48 scan$ = 56 stbi__decode_jpeg_header PROC ; COMDAT - -; 2846 : { - - 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx - 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp - 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi - 0000f 57 push rdi - 00010 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 2396 : x = stbi__get8(j->s); - - 00014 48 8b 19 mov rbx, QWORD PTR [rcx] - -; 2847 : int m; -; 2848 : z->jfif = 0; - - 00017 33 f6 xor esi, esi - 00019 89 b1 48 48 00 - 00 mov DWORD PTR [rcx+18504], esi - 0001f 8b ea mov ebp, edx - -; 2849 : z->app14_color_transform = -1; // valid values are 0,1,2 - - 00021 c7 81 4c 48 00 +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2846 + 00000 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp + 00005 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi + 0000a 57 push rdi + 0000b 48 83 ec 20 sub rsp, 32 ; 00000020H +; Line 2848 + 0000f 33 f6 xor esi, esi +; Line 2849 + 00011 c7 81 4c 48 00 00 ff ff ff ff mov DWORD PTR [rcx+18508], -1 - 0002b 48 8b f9 mov rdi, rcx - -; 2850 : z->marker = STBI__MARKER_none; // initialize cached marker to empty - - 0002e c6 81 28 48 00 + 0001b 89 b1 48 48 00 + 00 mov DWORD PTR [rcx+18504], esi + 00021 8b ea mov ebp, edx + 00023 48 8b f9 mov rdi, rcx +; Line 2850 + 00026 c6 81 28 48 00 00 ff mov BYTE PTR [rcx+18472], 255 ; 000000ffH - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00035 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] - 0003c 48 3b 83 c8 00 - 00 00 cmp rax, QWORD PTR [rbx+200] - 00043 72 18 jb SHORT $LN159@stbi__deco - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - - 00045 39 73 30 cmp DWORD PTR [rbx+48], esi - 00048 0f 84 f8 02 00 - 00 je $LN99@stbi__deco - -; 1080 : stbi__refill_buffer(s); - - 0004e 48 8b cb mov rcx, rbx - 00051 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00056 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] -$LN159@stbi__deco: - -; 2397 : if (x != 0xff) return STBI__MARKER_none; - - 0005d 0f b6 08 movzx ecx, BYTE PTR [rax] - 00060 48 ff c0 inc rax - 00063 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 0006a 80 f9 ff cmp cl, 255 ; 000000ffH - 0006d 0f 85 d3 02 00 - 00 jne $LN99@stbi__deco -$LL13@stbi__deco: - -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes - - 00073 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00076 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] - 0007d 48 3b 83 c8 00 - 00 00 cmp rax, QWORD PTR [rbx+200] - 00084 72 18 jb SHORT $LN160@stbi__deco - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - - 00086 39 73 30 cmp DWORD PTR [rbx+48], esi - 00089 0f 84 b7 02 00 - 00 je $LN99@stbi__deco - -; 1080 : stbi__refill_buffer(s); - - 0008f 48 8b cb mov rcx, rbx - 00092 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00097 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] -$LN160@stbi__deco: - -; 2398 : while (x == 0xff) - - 0009e 0f b6 08 movzx ecx, BYTE PTR [rax] - 000a1 48 ff c0 inc rax - 000a4 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 000ab 80 f9 ff cmp cl, 255 ; 000000ffH - 000ae 74 c3 je SHORT $LL13@stbi__deco - -; 2851 : m = stbi__get_marker(z); -; 2852 : if (!stbi__SOI(m)) return stbi__err("no SOI", "Corrupt JPEG"); - - 000b0 80 f9 d8 cmp cl, 216 ; 000000d8H - 000b3 0f 85 8d 02 00 - 00 jne $LN99@stbi__deco - -; 2853 : if (scan == STBI__SCAN_type) return 1; - - 000b9 83 fd 01 cmp ebp, 1 - 000bc 0f 84 7d 02 00 +; Line 2851 + 0002d e8 00 00 00 00 call stbi__get_marker +; Line 2852 + 00032 3c d8 cmp al, 216 ; 000000d8H + 00034 74 35 je SHORT $LN6@stbi__deco +; Line 431 + 00036 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 0003c 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00045 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 0004a 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 0004e 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_06CLMBLEP@no?5SOI@ + 00055 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 2852 + 00059 33 c0 xor eax, eax +; Line 2867 + 0005b 48 8b 6c 24 38 mov rbp, QWORD PTR [rsp+56] + 00060 48 8b 74 24 40 mov rsi, QWORD PTR [rsp+64] + 00065 48 83 c4 20 add rsp, 32 ; 00000020H + 00069 5f pop rdi + 0006a c3 ret 0 +$LN6@stbi__deco: +; Line 2853 + 0006b 83 fd 01 cmp ebp, 1 + 0006e 0f 84 19 02 00 00 je $LN10@stbi__deco - -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } - - 000c2 0f b6 8f 28 48 - 00 00 movzx ecx, BYTE PTR [rdi+18472] - 000c9 80 f9 ff cmp cl, 255 ; 000000ffH - 000cc 74 09 je SHORT $LN31@stbi__deco - 000ce c6 87 28 48 00 - 00 ff mov BYTE PTR [rdi+18472], 255 ; 000000ffH - 000d5 eb 7a jmp SHORT $LN28@stbi__deco -$LN31@stbi__deco: - -; 2396 : x = stbi__get8(j->s); - - 000d7 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 000da 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] - 000e1 48 3b 83 c8 00 - 00 00 cmp rax, QWORD PTR [rbx+200] - 000e8 72 14 jb SHORT $LN161@stbi__deco - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - - 000ea 39 73 30 cmp DWORD PTR [rbx+48], esi - 000ed 74 60 je SHORT $LN101@stbi__deco - -; 1080 : stbi__refill_buffer(s); - - 000ef 48 8b cb mov rcx, rbx - 000f2 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 000f7 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] -$LN161@stbi__deco: - -; 2397 : if (x != 0xff) return STBI__MARKER_none; - - 000fe 0f b6 08 movzx ecx, BYTE PTR [rax] - 00101 48 ff c0 inc rax - 00104 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 0010b 80 f9 ff cmp cl, 255 ; 000000ffH - 0010e 75 3f jne SHORT $LN101@stbi__deco -$LL29@stbi__deco: - -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes - - 00110 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00113 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] - 0011a 48 3b 83 c8 00 - 00 00 cmp rax, QWORD PTR [rbx+200] - 00121 72 14 jb SHORT $LN162@stbi__deco - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - - 00123 39 73 30 cmp DWORD PTR [rbx+48], esi - 00126 74 23 je SHORT $LN40@stbi__deco - -; 1080 : stbi__refill_buffer(s); - - 00128 48 8b cb mov rcx, rbx - 0012b e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00130 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] -$LN162@stbi__deco: - -; 2398 : while (x == 0xff) - - 00137 0f b6 08 movzx ecx, BYTE PTR [rax] - 0013a 48 ff c0 inc rax - 0013d 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 00144 80 f9 ff cmp cl, 255 ; 000000ffH - 00147 74 c7 je SHORT $LL29@stbi__deco - 00149 eb 06 jmp SHORT $LN28@stbi__deco -$LN40@stbi__deco: - -; 1083 : return 0; - - 0014b 32 c9 xor cl, cl - -; 2400 : return x; - - 0014d eb 02 jmp SHORT $LN28@stbi__deco -$LN101@stbi__deco: - -; 2397 : if (x != 0xff) return STBI__MARKER_none; - - 0014f b1 ff mov cl, 255 ; 000000ffH -$LN28@stbi__deco: - -; 2854 : m = stbi__get_marker(z); - - 00151 0f b6 d1 movzx edx, cl - -; 2855 : while (!stbi__SOF(m)) { - - 00154 81 fa c0 00 00 +; Line 2854 + 00074 48 8b cf mov rcx, rdi + 00077 48 89 5c 24 30 mov QWORD PTR [rsp+48], rbx + 0007c e8 00 00 00 00 call stbi__get_marker + 00081 0f b6 d0 movzx edx, al +; Line 2855 + 00084 81 fa c0 00 00 00 cmp edx, 192 ; 000000c0H - 0015a 0f 84 9e 01 00 + 0008a 0f 84 9e 01 00 00 je $LN3@stbi__deco $LL2@stbi__deco: - 00160 8d 82 3f ff ff + 00090 8d 82 3f ff ff ff lea eax, DWORD PTR [rdx-193] - 00166 83 f8 01 cmp eax, 1 - 00169 0f 86 8f 01 00 + 00096 83 f8 01 cmp eax, 1 + 00099 0f 86 8f 01 00 00 jbe $LN3@stbi__deco - -; 2856 : if (!stbi__process_marker(z, m)) return 0; - - 0016f 48 8b cf mov rcx, rdi - 00172 e8 00 00 00 00 call stbi__process_marker - 00177 85 c0 test eax, eax - 00179 0f 84 ea 01 00 - 00 je $LN115@stbi__deco - -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } - - 0017f 0f b6 8f 28 48 +; Line 2856 + 0009f 48 8b cf mov rcx, rdi + 000a2 e8 00 00 00 00 call stbi__process_marker + 000a7 85 c0 test eax, eax + 000a9 0f 84 da 01 00 + 00 je $LN72@stbi__deco +; Line 2395 + 000af 0f b6 8f 28 48 00 00 movzx ecx, BYTE PTR [rdi+18472] - 00186 80 f9 ff cmp cl, 255 ; 000000ffH - 00189 74 0c je SHORT $LN45@stbi__deco - 0018b c6 87 28 48 00 + 000b6 80 f9 ff cmp cl, 255 ; 000000ffH + 000b9 74 0c je SHORT $LN17@stbi__deco + 000bb c6 87 28 48 00 00 ff mov BYTE PTR [rdi+18472], 255 ; 000000ffH - 00192 e9 7a 00 00 00 jmp $LN42@stbi__deco -$LN45@stbi__deco: - -; 2396 : x = stbi__get8(j->s); - - 00197 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 0019a 48 8b 83 c0 00 + 000c2 e9 7a 00 00 00 jmp $LN14@stbi__deco +$LN17@stbi__deco: +; Line 2396 + 000c7 48 8b 1f mov rbx, QWORD PTR [rdi] +; Line 1077 + 000ca 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 001a1 48 3b 83 c8 00 + 000d1 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 001a8 72 14 jb SHORT $LN163@stbi__deco - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - - 001aa 39 73 30 cmp DWORD PTR [rbx+48], esi - 001ad 74 60 je SHORT $LN103@stbi__deco - -; 1080 : stbi__refill_buffer(s); - - 001af 48 8b cb mov rcx, rbx - 001b2 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 001b7 48 8b 83 c0 00 + 000d8 72 14 jb SHORT $LN102@stbi__deco +; Line 1079 + 000da 39 73 30 cmp DWORD PTR [rbx+48], esi + 000dd 74 60 je SHORT $LN64@stbi__deco +; Line 1080 + 000df 48 8b cb mov rcx, rbx + 000e2 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 000e7 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] -$LN163@stbi__deco: - -; 2397 : if (x != 0xff) return STBI__MARKER_none; - - 001be 0f b6 08 movzx ecx, BYTE PTR [rax] - 001c1 48 ff c0 inc rax - 001c4 48 89 83 c0 00 +$LN102@stbi__deco: +; Line 2397 + 000ee 0f b6 08 movzx ecx, BYTE PTR [rax] + 000f1 48 ff c0 inc rax + 000f4 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 001cb 80 f9 ff cmp cl, 255 ; 000000ffH - 001ce 75 3f jne SHORT $LN103@stbi__deco -$LL43@stbi__deco: - -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes - - 001d0 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 001d3 48 8b 83 c0 00 + 000fb 80 f9 ff cmp cl, 255 ; 000000ffH + 000fe 75 3f jne SHORT $LN64@stbi__deco +$LL15@stbi__deco: +; Line 2399 + 00100 48 8b 1f mov rbx, QWORD PTR [rdi] +; Line 1077 + 00103 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 001da 48 3b 83 c8 00 + 0010a 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 001e1 72 14 jb SHORT $LN164@stbi__deco - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - - 001e3 39 73 30 cmp DWORD PTR [rbx+48], esi - 001e6 74 23 je SHORT $LN54@stbi__deco - -; 1080 : stbi__refill_buffer(s); - - 001e8 48 8b cb mov rcx, rbx - 001eb e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 001f0 48 8b 83 c0 00 + 00111 72 14 jb SHORT $LN103@stbi__deco +; Line 1079 + 00113 39 73 30 cmp DWORD PTR [rbx+48], esi + 00116 74 23 je SHORT $LN26@stbi__deco +; Line 1080 + 00118 48 8b cb mov rcx, rbx + 0011b e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00120 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] -$LN164@stbi__deco: - -; 2398 : while (x == 0xff) - - 001f7 0f b6 08 movzx ecx, BYTE PTR [rax] - 001fa 48 ff c0 inc rax - 001fd 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 00204 80 f9 ff cmp cl, 255 ; 000000ffH - 00207 74 c7 je SHORT $LL43@stbi__deco - 00209 eb 06 jmp SHORT $LN42@stbi__deco -$LN54@stbi__deco: - -; 1083 : return 0; - - 0020b 32 c9 xor cl, cl - -; 2400 : return x; - - 0020d eb 02 jmp SHORT $LN42@stbi__deco $LN103@stbi__deco: - -; 2397 : if (x != 0xff) return STBI__MARKER_none; - - 0020f b1 ff mov cl, 255 ; 000000ffH -$LN42@stbi__deco: - -; 2857 : m = stbi__get_marker(z); - - 00211 0f b6 d1 movzx edx, cl - -; 2858 : while (m == STBI__MARKER_none) { - - 00214 81 fa ff 00 00 +; Line 2398 + 00127 0f b6 08 movzx ecx, BYTE PTR [rax] + 0012a 48 ff c0 inc rax + 0012d 48 89 83 c0 00 + 00 00 mov QWORD PTR [rbx+192], rax + 00134 80 f9 ff cmp cl, 255 ; 000000ffH + 00137 74 c7 je SHORT $LL15@stbi__deco + 00139 eb 06 jmp SHORT $LN14@stbi__deco +$LN26@stbi__deco: +; Line 1083 + 0013b 32 c9 xor cl, cl +; Line 2400 + 0013d eb 02 jmp SHORT $LN14@stbi__deco +$LN64@stbi__deco: +; Line 2397 + 0013f b1 ff mov cl, 255 ; 000000ffH +$LN14@stbi__deco: +; Line 2857 + 00141 0f b6 d1 movzx edx, cl +; Line 2858 + 00144 81 fa ff 00 00 00 cmp edx, 255 ; 000000ffH - 0021a 0f 85 d2 00 00 - 00 jne $LN124@stbi__deco + 0014a 0f 85 d2 00 00 + 00 jne $LN78@stbi__deco $LL4@stbi__deco: - -; 2859 : // some files have extra padding after their blocks, so ok, we'll scan -; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); - - 00220 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1091 : if (s->io.read) { - - 00223 48 39 73 10 cmp QWORD PTR [rbx+16], rsi - 00227 74 14 je SHORT $LN59@stbi__deco - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - - 00229 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] - 0022d ff 53 20 call QWORD PTR [rbx+32] - 00230 85 c0 test eax, eax - 00232 74 1d je SHORT $LN114@stbi__deco - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - - 00234 39 73 30 cmp DWORD PTR [rbx+48], esi - 00237 0f 84 e6 00 00 - 00 je $LN123@stbi__deco -$LN59@stbi__deco: - -; 2859 : // some files have extra padding after their blocks, so ok, we'll scan -; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); - - 0023d 48 8b 83 c8 00 +; Line 2860 + 00150 48 8b 1f mov rbx, QWORD PTR [rdi] +; Line 1091 + 00153 48 39 73 10 cmp QWORD PTR [rbx+16], rsi + 00157 74 14 je SHORT $LN31@stbi__deco +; Line 1092 + 00159 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] + 0015d ff 53 20 call QWORD PTR [rbx+32] + 00160 85 c0 test eax, eax + 00162 74 1d je SHORT $LN71@stbi__deco +; Line 1095 + 00164 39 73 30 cmp DWORD PTR [rbx+48], esi + 00167 0f 84 f9 00 00 + 00 je $LN77@stbi__deco +$LN31@stbi__deco: +; Line 2860 + 0016d 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] - 00244 48 39 83 c0 00 + 00174 48 39 83 c0 00 00 00 cmp QWORD PTR [rbx+192], rax - 0024b 0f 83 d2 00 00 - 00 jae $LN123@stbi__deco -$LN114@stbi__deco: - -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } - - 00251 0f b6 8f 28 48 + 0017b 0f 83 e5 00 00 + 00 jae $LN77@stbi__deco +$LN71@stbi__deco: +; Line 2395 + 00181 0f b6 8f 28 48 00 00 movzx ecx, BYTE PTR [rdi+18472] - 00258 80 f9 ff cmp cl, 255 ; 000000ffH - 0025b 74 0c je SHORT $LN66@stbi__deco - 0025d c6 87 28 48 00 + 00188 80 f9 ff cmp cl, 255 ; 000000ffH + 0018b 74 0c je SHORT $LN38@stbi__deco + 0018d c6 87 28 48 00 00 ff mov BYTE PTR [rdi+18472], 255 ; 000000ffH - 00264 e9 7a 00 00 00 jmp $LN63@stbi__deco -$LN66@stbi__deco: - -; 2396 : x = stbi__get8(j->s); - - 00269 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 0026c 48 8b 83 c0 00 + 00194 e9 7a 00 00 00 jmp $LN35@stbi__deco +$LN38@stbi__deco: +; Line 2396 + 00199 48 8b 1f mov rbx, QWORD PTR [rdi] +; Line 1077 + 0019c 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00273 48 3b 83 c8 00 + 001a3 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 0027a 72 14 jb SHORT $LN165@stbi__deco - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - - 0027c 39 73 30 cmp DWORD PTR [rbx+48], esi - 0027f 74 60 je SHORT $LN105@stbi__deco - -; 1080 : stbi__refill_buffer(s); - - 00281 48 8b cb mov rcx, rbx - 00284 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00289 48 8b 83 c0 00 + 001aa 72 14 jb SHORT $LN104@stbi__deco +; Line 1079 + 001ac 39 73 30 cmp DWORD PTR [rbx+48], esi + 001af 74 60 je SHORT $LN66@stbi__deco +; Line 1080 + 001b1 48 8b cb mov rcx, rbx + 001b4 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 001b9 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] -$LN165@stbi__deco: - -; 2397 : if (x != 0xff) return STBI__MARKER_none; - - 00290 0f b6 08 movzx ecx, BYTE PTR [rax] - 00293 48 ff c0 inc rax - 00296 48 89 83 c0 00 +$LN104@stbi__deco: +; Line 2397 + 001c0 0f b6 08 movzx ecx, BYTE PTR [rax] + 001c3 48 ff c0 inc rax + 001c6 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 0029d 80 f9 ff cmp cl, 255 ; 000000ffH - 002a0 75 3f jne SHORT $LN105@stbi__deco -$LL64@stbi__deco: - -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes - - 002a2 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 002a5 48 8b 83 c0 00 + 001cd 80 f9 ff cmp cl, 255 ; 000000ffH + 001d0 75 3f jne SHORT $LN66@stbi__deco +$LL36@stbi__deco: +; Line 2399 + 001d2 48 8b 1f mov rbx, QWORD PTR [rdi] +; Line 1077 + 001d5 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 002ac 48 3b 83 c8 00 + 001dc 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 002b3 72 14 jb SHORT $LN166@stbi__deco - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - - 002b5 39 73 30 cmp DWORD PTR [rbx+48], esi - 002b8 74 23 je SHORT $LN75@stbi__deco - -; 1080 : stbi__refill_buffer(s); - - 002ba 48 8b cb mov rcx, rbx - 002bd e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 002c2 48 8b 83 c0 00 + 001e3 72 14 jb SHORT $LN105@stbi__deco +; Line 1079 + 001e5 39 73 30 cmp DWORD PTR [rbx+48], esi + 001e8 74 23 je SHORT $LN47@stbi__deco +; Line 1080 + 001ea 48 8b cb mov rcx, rbx + 001ed e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 001f2 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] -$LN166@stbi__deco: - -; 2398 : while (x == 0xff) - - 002c9 0f b6 08 movzx ecx, BYTE PTR [rax] - 002cc 48 ff c0 inc rax - 002cf 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 002d6 80 f9 ff cmp cl, 255 ; 000000ffH - 002d9 74 c7 je SHORT $LL64@stbi__deco - 002db eb 06 jmp SHORT $LN63@stbi__deco -$LN75@stbi__deco: - -; 1083 : return 0; - - 002dd 32 c9 xor cl, cl - -; 2400 : return x; - - 002df eb 02 jmp SHORT $LN63@stbi__deco $LN105@stbi__deco: - -; 2397 : if (x != 0xff) return STBI__MARKER_none; - - 002e1 b1 ff mov cl, 255 ; 000000ffH -$LN63@stbi__deco: - -; 2861 : m = stbi__get_marker(z); - - 002e3 0f b6 d1 movzx edx, cl - 002e6 81 fa ff 00 00 +; Line 2398 + 001f9 0f b6 08 movzx ecx, BYTE PTR [rax] + 001fc 48 ff c0 inc rax + 001ff 48 89 83 c0 00 + 00 00 mov QWORD PTR [rbx+192], rax + 00206 80 f9 ff cmp cl, 255 ; 000000ffH + 00209 74 c7 je SHORT $LL36@stbi__deco + 0020b eb 06 jmp SHORT $LN35@stbi__deco +$LN47@stbi__deco: +; Line 1083 + 0020d 32 c9 xor cl, cl +; Line 2400 + 0020f eb 02 jmp SHORT $LN35@stbi__deco +$LN66@stbi__deco: +; Line 2397 + 00211 b1 ff mov cl, 255 ; 000000ffH +$LN35@stbi__deco: +; Line 2861 + 00213 0f b6 d1 movzx edx, cl + 00216 81 fa ff 00 00 00 cmp edx, 255 ; 000000ffH - 002ec 0f 84 2e ff ff + 0021c 0f 84 2e ff ff ff je $LL4@stbi__deco -$LN124@stbi__deco: - -; 2855 : while (!stbi__SOF(m)) { - - 002f2 81 fa c0 00 00 +$LN78@stbi__deco: +; Line 2855 + 00222 81 fa c0 00 00 00 cmp edx, 192 ; 000000c0H - 002f8 0f 85 62 fe ff + 00228 0f 85 62 fe ff ff jne $LL2@stbi__deco $LN3@stbi__deco: - -; 2862 : } -; 2863 : } -; 2864 : z->progressive = stbi__SOF_progressive(m); - - 002fe 81 fa c2 00 00 +; Line 2864 + 0022e 81 fa c2 00 00 00 cmp edx, 194 ; 000000c2H - 00304 8b ce mov ecx, esi - -; 2865 : if (!stbi__process_frame_header(z, scan)) return 0; - - 00306 8b d5 mov edx, ebp - 00308 0f 94 c1 sete cl - 0030b 89 8f 30 48 00 + 00234 8b ce mov ecx, esi +; Line 2865 + 00236 8b d5 mov edx, ebp + 00238 0f 94 c1 sete cl + 0023b 89 8f 30 48 00 00 mov DWORD PTR [rdi+18480], ecx - 00311 48 8b cf mov rcx, rdi - 00314 e8 00 00 00 00 call stbi__process_frame_header - 00319 85 c0 test eax, eax - 0031b 40 0f 95 c6 setne sil - 0031f 8b c6 mov eax, esi - 00321 eb 48 jmp SHORT $LN1@stbi__deco -$LN123@stbi__deco: - -; 431 : stbi__g_failure_reason = str; - - 00323 8b 15 00 00 00 + 00241 48 8b cf mov rcx, rdi + 00244 e8 00 00 00 00 call stbi__process_frame_header + 00249 85 c0 test eax, eax + 0024b 40 0f 95 c6 setne sil + 0024f 8b c6 mov eax, esi +$LN101@stbi__deco: + 00251 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] +; Line 2867 + 00256 48 8b 6c 24 38 mov rbp, QWORD PTR [rsp+56] + 0025b 48 8b 74 24 40 mov rsi, QWORD PTR [rsp+64] + 00260 48 83 c4 20 add rsp, 32 ; 00000020H + 00264 5f pop rdi + 00265 c3 ret 0 +$LN77@stbi__deco: +; Line 431 + 00266 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00329 65 48 8b 04 25 + 0026c 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00332 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00336 48 8d 15 00 00 + 00275 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 0027a 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 0027e 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_06IFCEAHIA@no?5SOF@ - -; 2859 : // some files have extra padding after their blocks, so ok, we'll scan -; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); - - 0033d eb 21 jmp SHORT $LN167@stbi__deco + 00285 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +$LN72@stbi__deco: +; Line 2860 + 00289 33 c0 xor eax, eax + 0028b eb c4 jmp SHORT $LN101@stbi__deco $LN10@stbi__deco: - -; 2866 : return 1; - - 0033f b8 01 00 00 00 mov eax, 1 - 00344 eb 25 jmp SHORT $LN1@stbi__deco -$LN99@stbi__deco: - -; 431 : stbi__g_failure_reason = str; - - 00346 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 0034c 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00355 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00359 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_06CLMBLEP@no?5SOI@ -$LN167@stbi__deco: - -; 2867 : } - - 00360 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00365 48 89 14 01 mov QWORD PTR [rcx+rax], rdx -$LN115@stbi__deco: - 00369 33 c0 xor eax, eax -$LN1@stbi__deco: - 0036b 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] - 00370 48 8b 6c 24 38 mov rbp, QWORD PTR [rsp+56] - 00375 48 8b 74 24 40 mov rsi, QWORD PTR [rsp+64] - 0037a 48 83 c4 20 add rsp, 32 ; 00000020H - 0037e 5f pop rdi - 0037f c3 ret 0 +; Line 2867 + 0028d 48 8b 6c 24 38 mov rbp, QWORD PTR [rsp+56] + 00292 b8 01 00 00 00 mov eax, 1 + 00297 48 8b 74 24 40 mov rsi, QWORD PTR [rsp+64] + 0029c 48 83 c4 20 add rsp, 32 ; 00000020H + 002a0 5f pop rdi + 002a1 c3 ret 0 stbi__decode_jpeg_header ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__skip_jpeg_junk_at_end _TEXT SEGMENT j$ = 48 stbi__skip_jpeg_junk_at_end PROC ; COMDAT - -; 2870 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2870 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H 0000a 48 8b f9 mov rdi, rcx 0000d 0f 1f 00 npad 3 $LL2@stbi__skip: - -; 2871 : // some JPEGs have junk at end, skip over it but if we find what looks -; 2872 : // like a valid marker, resume there -; 2873 : while (!stbi__at_eof(j->s)) { - +; Line 2873 00010 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1091 : if (s->io.read) { - +; Line 1091 00013 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 00018 74 15 je SHORT $LN12@stbi__skip - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 0001a 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 0001e ff 53 20 call QWORD PTR [rbx+32] 00021 85 c0 test eax, eax 00023 74 1e je SHORT $LN36@stbi__skip - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 00025 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00029 0f 84 e5 00 00 00 je $LN3@stbi__skip $LN12@stbi__skip: - -; 2871 : // some JPEGs have junk at end, skip over it but if we find what looks -; 2872 : // like a valid marker, resume there -; 2873 : while (!stbi__at_eof(j->s)) { - +; Line 2873 0002f 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] 00036 48 39 83 c0 00 @@ -24635,37 +16033,25 @@ $LN12@stbi__skip: 0003d 0f 83 d1 00 00 00 jae $LN3@stbi__skip $LN36@stbi__skip: - -; 2874 : int x = stbi__get8(j->s); - +; Line 2874 00043 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00046 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0004d 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00054 72 15 jb SHORT $LN52@stbi__skip - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00056 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0005a 74 b4 je SHORT $LL2@stbi__skip - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0005c 48 8b cb mov rcx, rbx 0005f e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00064 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN52@stbi__skip: - -; 2875 : while (x == 255) { // might be a marker - +; Line 2875 0006b 0f b6 08 movzx ecx, BYTE PTR [rax] 0006e 48 ff c0 inc rax 00071 48 89 83 c0 00 @@ -24674,73 +16060,49 @@ $LN52@stbi__skip: 0007b 75 93 jne SHORT $LL2@stbi__skip 0007d 0f 1f 00 npad 3 $LL4@stbi__skip: - -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; - +; Line 2876 00080 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1091 : if (s->io.read) { - +; Line 1091 00083 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 00088 74 11 je SHORT $LN21@stbi__skip - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 0008a 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 0008e ff 53 20 call QWORD PTR [rbx+32] 00091 85 c0 test eax, eax 00093 74 16 je SHORT $LN35@stbi__skip - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 00095 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00099 74 79 je SHORT $LN3@stbi__skip $LN21@stbi__skip: - -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; - +; Line 2876 0009b 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] 000a2 48 39 83 c0 00 00 00 cmp QWORD PTR [rbx+192], rax 000a9 73 69 jae SHORT $LN3@stbi__skip $LN35@stbi__skip: - -; 2877 : x = stbi__get8(j->s); - +; Line 2877 000ab 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000ae 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000b5 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 000bc 73 0f jae SHORT $LN24@stbi__skip - -; 1078 : return *s->img_buffer++; - +; Line 1078 000be 0f b6 08 movzx ecx, BYTE PTR [rax] 000c1 48 ff c0 inc rax 000c4 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 000cb eb 26 jmp SHORT $LN23@stbi__skip $LN24@stbi__skip: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000cd 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 000d1 74 1e je SHORT $LN25@stbi__skip - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000d3 48 8b cb mov rcx, rbx 000d6 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000db 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000e2 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -24749,38 +16111,19 @@ $LN24@stbi__skip: 00 00 mov QWORD PTR [rbx+192], rax 000ef eb 02 jmp SHORT $LN23@stbi__skip $LN25@stbi__skip: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000f1 32 c9 xor cl, cl $LN23@stbi__skip: - -; 2877 : x = stbi__get8(j->s); - +; Line 2877 000f3 0f b6 c1 movzx eax, cl - -; 2878 : if (x != 0x00 && x != 0xff) { - +; Line 2878 000f6 84 c9 test cl, cl 000f8 0f 84 12 ff ff ff je $LL2@stbi__skip 000fe 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 00103 0f 84 77 ff ff ff je $LL4@stbi__skip - -; 2879 : // not a stuffed zero or lead-in to another marker, looks -; 2880 : // like an actual marker, return it -; 2881 : return x; -; 2882 : } -; 2883 : // stuffed zero has x=0 now which ends the loop, meaning we go -; 2884 : // back to regular scan loop. -; 2885 : // repeated 0xff keeps trying to read the next byte of the marker. -; 2886 : } -; 2887 : } -; 2888 : return STBI__MARKER_none; -; 2889 : } - +; Line 2889 00109 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 0010e 48 83 c4 20 add rsp, 32 ; 00000020H 00112 5f pop rdi @@ -24794,29 +16137,18 @@ $LN3@stbi__skip: stbi__skip_jpeg_junk_at_end ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__decode_jpeg_image _TEXT SEGMENT j$ = 48 stbi__decode_jpeg_image PROC ; COMDAT - -; 2893 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2893 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 2894 : int m; -; 2895 : for (m = 0; m < 4; m++) { -; 2896 : j->img_comp[m].raw_data = NULL; - +; Line 2896 0000a 33 c0 xor eax, eax - -; 2897 : j->img_comp[m].raw_coeff = NULL; -; 2898 : } -; 2899 : j->restart_interval = 0; -; 2900 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; - +; Line 2900 0000c 33 d2 xor edx, edx 0000e 48 89 81 d8 46 00 00 mov QWORD PTR [rcx+18136], rax @@ -24841,80 +16173,56 @@ stbi__decode_jpeg_image PROC ; COMDAT 00054 85 c0 test eax, eax 00056 0f 84 bc 01 00 00 je $LN58@stbi__deco - -; 2901 : m = stbi__get_marker(j); - +; Line 2901 0005c 48 8b cf mov rcx, rdi 0005f e8 00 00 00 00 call stbi__get_marker 00064 0f b6 c8 movzx ecx, al - -; 2902 : while (!stbi__EOI(m)) { - +; Line 2902 00067 81 f9 d9 00 00 00 cmp ecx, 217 ; 000000d9H 0006d 0f 84 d7 01 00 00 je $LN79@stbi__deco $LL5@stbi__deco: - -; 2903 : if (stbi__SOS(m)) { - +; Line 2903 00073 81 f9 da 00 00 00 cmp ecx, 218 ; 000000daH 00079 0f 85 4f 01 00 00 jne $LN8@stbi__deco - -; 2904 : if (!stbi__process_scan_header(j)) return 0; - +; Line 2904 0007f 48 8b cf mov rcx, rdi 00082 e8 00 00 00 00 call stbi__process_scan_header 00087 85 c0 test eax, eax 00089 0f 84 89 01 00 00 je $LN58@stbi__deco - -; 2905 : if (!stbi__parse_entropy_coded_data(j)) return 0; - +; Line 2905 0008f 48 8b cf mov rcx, rdi 00092 e8 00 00 00 00 call stbi__parse_entropy_coded_data 00097 85 c0 test eax, eax 00099 0f 84 79 01 00 00 je $LN58@stbi__deco - -; 2906 : if (j->marker == STBI__MARKER_none) { - +; Line 2906 0009f 80 bf 28 48 00 00 ff cmp BYTE PTR [rdi+18472], 255 ; 000000ffH 000a6 0f 85 0a 01 00 00 jne $LN12@stbi__deco 000ac 0f 1f 40 00 npad 4 $LL22@stbi__deco: - -; 2873 : while (!stbi__at_eof(j->s)) { - +; Line 2873 000b0 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1091 : if (s->io.read) { - +; Line 1091 000b3 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 000b8 74 15 je SHORT $LN32@stbi__deco - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 000ba 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 000be ff 53 20 call QWORD PTR [rbx+32] 000c1 85 c0 test eax, eax 000c3 74 1e je SHORT $LN75@stbi__deco - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 000c5 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 000c9 0f 84 dc 00 00 00 je $LN23@stbi__deco $LN32@stbi__deco: - -; 2873 : while (!stbi__at_eof(j->s)) { - +; Line 2873 000cf 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] 000d6 48 39 83 c0 00 @@ -24922,37 +16230,25 @@ $LN32@stbi__deco: 000dd 0f 83 c8 00 00 00 jae $LN23@stbi__deco $LN75@stbi__deco: - -; 2874 : int x = stbi__get8(j->s); - +; Line 2874 000e3 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000e6 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000ed 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 000f4 72 15 jb SHORT $LN105@stbi__deco - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000f6 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 000fa 74 b4 je SHORT $LL22@stbi__deco - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000fc 48 8b cb mov rcx, rbx 000ff e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00104 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN105@stbi__deco: - -; 2875 : while (x == 255) { // might be a marker - +; Line 2875 0010b 0f b6 08 movzx ecx, BYTE PTR [rax] 0010e 48 ff c0 inc rax 00111 48 89 83 c0 00 @@ -24961,73 +16257,49 @@ $LN105@stbi__deco: 0011b 75 93 jne SHORT $LL22@stbi__deco 0011d 0f 1f 00 npad 3 $LL24@stbi__deco: - -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; - +; Line 2876 00120 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1091 : if (s->io.read) { - +; Line 1091 00123 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 00128 74 11 je SHORT $LN41@stbi__deco - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 0012a 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 0012e ff 53 20 call QWORD PTR [rbx+32] 00131 85 c0 test eax, eax 00133 74 16 je SHORT $LN74@stbi__deco - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 00135 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00139 74 70 je SHORT $LN23@stbi__deco $LN41@stbi__deco: - -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; - +; Line 2876 0013b 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] 00142 48 39 83 c0 00 00 00 cmp QWORD PTR [rbx+192], rax 00149 73 60 jae SHORT $LN23@stbi__deco $LN74@stbi__deco: - -; 2877 : x = stbi__get8(j->s); - +; Line 2877 0014b 48 8b 1f mov rbx, QWORD PTR [rdi] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0014e 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00155 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0015c 73 0f jae SHORT $LN44@stbi__deco - -; 1078 : return *s->img_buffer++; - +; Line 1078 0015e 0f b6 08 movzx ecx, BYTE PTR [rax] 00161 48 ff c0 inc rax 00164 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0016b eb 26 jmp SHORT $LN43@stbi__deco $LN44@stbi__deco: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0016d 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00171 74 1e je SHORT $LN45@stbi__deco - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00173 48 8b cb mov rcx, rbx 00176 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0017b 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00182 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -25036,92 +16308,58 @@ $LN44@stbi__deco: 00 00 mov QWORD PTR [rbx+192], rax 0018f eb 02 jmp SHORT $LN43@stbi__deco $LN45@stbi__deco: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00191 32 c9 xor cl, cl $LN43@stbi__deco: - -; 2877 : x = stbi__get8(j->s); - +; Line 2877 00193 0f b6 c1 movzx eax, cl - -; 2878 : if (x != 0x00 && x != 0xff) { - +; Line 2878 00196 84 c9 test cl, cl 00198 0f 84 12 ff ff ff je $LL22@stbi__deco 0019e 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 001a3 0f 84 77 ff ff ff je $LL24@stbi__deco - -; 2879 : // not a stuffed zero or lead-in to another marker, looks -; 2880 : // like an actual marker, return it -; 2881 : return x; - +; Line 2881 001a9 eb 05 jmp SHORT $LN21@stbi__deco $LN23@stbi__deco: - -; 2907 : j->marker = stbi__skip_jpeg_junk_at_end(j); - +; Line 2907 001ab b8 ff 00 00 00 mov eax, 255 ; 000000ffH $LN21@stbi__deco: 001b0 88 87 28 48 00 00 mov BYTE PTR [rdi+18472], al $LN12@stbi__deco: - -; 2908 : // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 -; 2909 : } -; 2910 : m = stbi__get_marker(j); - +; Line 2910 001b6 48 8b cf mov rcx, rdi 001b9 e8 00 00 00 00 call stbi__get_marker 001be 0f b6 c8 movzx ecx, al - -; 2911 : if (STBI__RESTART(m)) - +; Line 2911 001c1 8d 81 30 ff ff ff lea eax, DWORD PTR [rcx-208] 001c7 83 f8 07 cmp eax, 7 001ca 77 72 ja SHORT $LN15@stbi__deco - -; 2912 : m = stbi__get_marker(j); -; 2913 : } - +; Line 2913 001cc eb 65 jmp SHORT $LN106@stbi__deco $LN8@stbi__deco: - -; 2914 : else if (stbi__DNL(m)) { - +; Line 2914 001ce 81 f9 dc 00 00 00 cmp ecx, 220 ; 000000dcH 001d4 75 4f jne SHORT $LN14@stbi__deco - -; 2915 : int Ld = stbi__get16be(j->s); - +; Line 2915 001d6 48 8b 0f mov rcx, QWORD PTR [rdi] 001d9 e8 00 00 00 00 call stbi__get16be - -; 2916 : stbi__uint32 NL = stbi__get16be(j->s); - +; Line 2916 001de 48 8b 0f mov rcx, QWORD PTR [rdi] 001e1 8b d8 mov ebx, eax 001e3 e8 00 00 00 00 call stbi__get16be - -; 2917 : if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); - +; Line 2917 001e8 83 fb 04 cmp ebx, 4 001eb 75 7e jne SHORT $LN59@stbi__deco - -; 2918 : if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); - +; Line 2918 001ed 48 8b 0f mov rcx, QWORD PTR [rdi] 001f0 3b 41 04 cmp eax, DWORD PTR [rcx+4] 001f3 74 3e je SHORT $LN106@stbi__deco - -; 431 : stbi__g_failure_reason = str; - +; Line 431 001f5 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 001fb 65 48 8b 04 25 @@ -25130,9 +16368,7 @@ $LN8@stbi__deco: 00209 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 0020d 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0P@PNCLKCLJ@bad?5DNL?5height@ - -; 2929 : } - +; Line 2929 00214 48 89 14 01 mov QWORD PTR [rcx+rax], rdx $LN58@stbi__deco: 00218 33 c0 xor eax, eax @@ -25141,21 +16377,14 @@ $LN58@stbi__deco: 00223 5f pop rdi 00224 c3 ret 0 $LN14@stbi__deco: - -; 2919 : m = stbi__get_marker(j); -; 2920 : } -; 2921 : else { -; 2922 : if (!stbi__process_marker(j, m)) return 1; - +; Line 2922 00225 8b d1 mov edx, ecx 00227 48 8b cf mov rcx, rdi 0022a e8 00 00 00 00 call stbi__process_marker 0022f 85 c0 test eax, eax 00231 74 28 je SHORT $LN19@stbi__deco $LN106@stbi__deco: - -; 2902 : while (!stbi__EOI(m)) { - +; Line 2902 00233 48 8b cf mov rcx, rdi 00236 e8 00 00 00 00 call stbi__get_marker 0023b 0f b6 c8 movzx ecx, al @@ -25165,54 +16394,35 @@ $LN15@stbi__deco: 00244 0f 85 29 fe ff ff jne $LL5@stbi__deco $LN79@stbi__deco: - -; 2923 : m = stbi__get_marker(j); -; 2924 : } -; 2925 : } -; 2926 : if (j->progressive) - +; Line 2926 0024a 83 bf 30 48 00 00 00 cmp DWORD PTR [rdi+18480], 0 00251 74 08 je SHORT $LN19@stbi__deco - -; 2927 : stbi__jpeg_finish(j); - +; Line 2927 00253 48 8b cf mov rcx, rdi 00256 e8 00 00 00 00 call stbi__jpeg_finish $LN19@stbi__deco: - -; 2928 : return 1; - +; Line 2928 0025b b8 01 00 00 00 mov eax, 1 - -; 2929 : } - +; Line 2929 00260 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00265 48 83 c4 20 add rsp, 32 ; 00000020H 00269 5f pop rdi 0026a c3 ret 0 $LN59@stbi__deco: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0026b 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00271 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - -; 2929 : } - +; Line 2929 0027a 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0027f b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason 00284 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00288 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0M@EPMOIECP@bad?5DNL?5len@ - -; 2929 : } - +; Line 2929 0028f 48 89 14 01 mov QWORD PTR [rcx+rax], rdx 00293 33 c0 xor eax, eax 00295 48 83 c4 20 add rsp, 32 ; 00000020H @@ -25221,7 +16431,6 @@ $LN59@stbi__deco: stbi__decode_jpeg_image ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT resample_row_1 _TEXT SEGMENT out$ = 8 @@ -25230,22 +16439,14 @@ in_far$ = 24 w$ = 32 hs$ = 40 resample_row_1 PROC ; COMDAT - -; 2940 : STBI_NOTUSED(out); -; 2941 : STBI_NOTUSED(in_far); -; 2942 : STBI_NOTUSED(w); -; 2943 : STBI_NOTUSED(hs); -; 2944 : return in_near; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2944 00000 48 8b c2 mov rax, rdx - -; 2945 : } - +; Line 2945 00003 c3 ret 0 resample_row_1 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__resample_row_v_2 _TEXT SEGMENT out$ = 16 @@ -25254,18 +16455,12 @@ in_far$ = 32 w$ = 40 hs$ = 48 stbi__resample_row_v_2 PROC ; COMDAT - -; 2948 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2948 00000 40 53 push rbx 00002 4c 8b d2 mov r10, rdx 00005 4c 8b d9 mov r11, rcx - -; 2949 : // need to generate two samples vertically for every one in input -; 2950 : int i; -; 2951 : STBI_NOTUSED(hs); -; 2952 : for (i = 0; i < w; ++i) - +; Line 2952 00008 33 d2 xor edx, edx 0000a 45 85 c9 test r9d, r9d 0000d 0f 8e ac 01 00 @@ -25297,9 +16492,7 @@ $LN11@stbi__resa: 00058 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0005d 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi 00062 48 89 7c 24 20 mov QWORD PTR [rsp+32], rdi - -; 2953 : out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2); - +; Line 2953 00067 66 0f 6f 1d 00 00 00 00 movdqa xmm3, XMMWORD PTR __xmm@00000003000000030000000300000003 0006f 49 8d 68 04 lea rbp, QWORD PTR [r8+4] @@ -25387,12 +16580,7 @@ $LL4@stbi__resa: 001a7 48 3b c1 cmp rax, rcx 001aa 0f 8c f0 fe ff ff jl $LL4@stbi__resa - -; 2949 : // need to generate two samples vertically for every one in input -; 2950 : int i; -; 2951 : STBI_NOTUSED(hs); -; 2952 : for (i = 0; i < w; ++i) - +; Line 2952 001b0 48 8b 7c 24 20 mov rdi, QWORD PTR [rsp+32] 001b5 48 8b 74 24 18 mov rsi, QWORD PTR [rsp+24] 001ba 48 8b 6c 24 10 mov rbp, QWORD PTR [rsp+16] @@ -25409,9 +16597,7 @@ $LN9@stbi__resa: 001da 66 0f 1f 44 00 00 npad 6 $LL8@stbi__resa: - -; 2953 : out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2); - +; Line 2953 001e0 42 0f b6 0c 10 movzx ecx, BYTE PTR [rax+r10] 001e5 44 0f b6 00 movzx r8d, BYTE PTR [rax] 001e9 48 8d 40 01 lea rax, QWORD PTR [rax+1] @@ -25423,17 +16609,13 @@ $LL8@stbi__resa: 00200 49 83 e9 01 sub r9, 1 00204 75 da jne SHORT $LL8@stbi__resa $LN19@stbi__resa: - -; 2954 : return out; -; 2955 : } - +; Line 2955 00206 49 8b c3 mov rax, r11 00209 5b pop rbx 0020a c3 ret 0 stbi__resample_row_v_2 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__resample_row_h_2 _TEXT SEGMENT out$ = 16 @@ -25442,52 +16624,31 @@ in_far$ = 32 w$ = 40 hs$ = 48 stbi__resample_row_h_2 PROC ; COMDAT - -; 2958 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2958 00000 48 83 ec 08 sub rsp, 8 - -; 2959 : // need to generate two samples horizontally for every one in input -; 2960 : int i; -; 2961 : stbi_uc* input = in_near; - +; Line 2961 00004 0f b6 02 movzx eax, BYTE PTR [rdx] 00007 4c 8b da mov r11, rdx 0000a 88 01 mov BYTE PTR [rcx], al 0000c 4c 8b d1 mov r10, rcx - -; 2962 : -; 2963 : if (w == 1) { - +; Line 2963 0000f 41 83 f9 01 cmp r9d, 1 00013 75 0b jne SHORT $LN5@stbi__resa - -; 2964 : // if only one sample, can't do any interpolation -; 2965 : out[0] = out[1] = input[0]; - +; Line 2965 00015 88 41 01 mov BYTE PTR [rcx+1], al - -; 2983 : } - +; Line 2983 00018 48 8b c1 mov rax, rcx 0001b 48 83 c4 08 add rsp, 8 0001f c3 ret 0 $LN5@stbi__resa: - -; 2966 : return out; -; 2967 : } -; 2968 : -; 2969 : out[0] = input[0]; -; 2970 : out[1] = stbi__div4(input[0] * 3 + input[1] + 2); - +; Line 2970 00020 0f b6 02 movzx eax, BYTE PTR [rdx] 00023 0f b6 52 01 movzx edx, BYTE PTR [rdx+1] 00027 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx 0002c 83 c2 02 add edx, 2 0002f 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi - -; 2971 : for (i = 1; i < w - 1; ++i) { - +; Line 2971 00034 49 63 f1 movsxd rsi, r9d 00037 8d 0c 40 lea ecx, DWORD PTR [rax+rax*2] 0003a 03 d1 add edx, ecx @@ -25506,24 +16667,18 @@ $LN5@stbi__resa: 84 00 00 00 00 00 npad 11 $LL4@stbi__resa: - -; 2972 : int n = 3 * input[i] + 2; - +; Line 2972 00070 0f b6 42 ff movzx eax, BYTE PTR [rdx-1] 00074 4d 8d 40 02 lea r8, QWORD PTR [r8+2] 00078 48 8d 52 01 lea rdx, QWORD PTR [rdx+1] 0007c 8d 48 01 lea ecx, DWORD PTR [rax+1] 0007f 8d 0c 48 lea ecx, DWORD PTR [rax+rcx*2] - -; 2973 : out[i * 2 + 0] = stbi__div4(n + input[i - 1]); - +; Line 2973 00082 0f b6 42 fd movzx eax, BYTE PTR [rdx-3] 00086 03 c1 add eax, ecx 00088 c1 e8 02 shr eax, 2 0008b 41 88 40 fe mov BYTE PTR [r8-2], al - -; 2974 : out[i * 2 + 1] = stbi__div4(n + input[i + 1]); - +; Line 2974 0008f 0f b6 42 ff movzx eax, BYTE PTR [rdx-1] 00093 03 c1 add eax, ecx 00095 c1 e8 02 shr eax, 2 @@ -25531,20 +16686,10 @@ $LL4@stbi__resa: 0009c 49 83 e9 01 sub r9, 1 000a0 75 ce jne SHORT $LL4@stbi__resa $LN3@stbi__resa: - -; 2975 : } -; 2976 : out[i * 2 + 0] = stbi__div4(input[w - 2] * 3 + input[w - 1] + 2); - +; Line 2976 000a2 42 0f b6 14 1b movzx edx, BYTE PTR [rbx+r11] 000a7 8d 04 3f lea eax, DWORD PTR [rdi+rdi] - -; 2977 : out[i * 2 + 1] = input[w - 1]; -; 2978 : -; 2979 : STBI_NOTUSED(in_far); -; 2980 : STBI_NOTUSED(hs); -; 2981 : -; 2982 : return out; - +; Line 2982 000aa 48 8b 3c 24 mov rdi, QWORD PTR [rsp] 000ae 83 c2 02 add edx, 2 000b1 4c 63 c0 movsxd r8, eax @@ -25558,16 +16703,13 @@ $LN3@stbi__resa: 000cb 42 0f b6 04 1b movzx eax, BYTE PTR [rbx+r11] 000d0 48 8b 5c 24 10 mov rbx, QWORD PTR [rsp+16] 000d5 43 88 44 10 01 mov BYTE PTR [r8+r10+1], al - -; 2983 : } - +; Line 2983 000da 49 8b c2 mov rax, r10 000dd 48 83 c4 08 add rsp, 8 000e1 c3 ret 0 stbi__resample_row_h_2 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__resample_row_hv_2 _TEXT SEGMENT out$ = 16 @@ -25576,9 +16718,8 @@ in_far$ = 32 w$ = 40 hs$ = 48 stbi__resample_row_hv_2 PROC ; COMDAT - -; 2988 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 2988 00000 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx 00005 56 push rsi 00006 0f b6 02 movzx eax, BYTE PTR [rdx] @@ -25588,41 +16729,25 @@ stbi__resample_row_hv_2 PROC ; COMDAT 00013 49 63 f1 movsxd rsi, r9d 00016 8d 04 40 lea eax, DWORD PTR [rax+rax*2] 00019 41 03 c2 add eax, r10d - -; 2989 : // need to generate 2x2 samples for every one in input -; 2990 : int i, t0, t1; -; 2991 : if (w == 1) { - +; Line 2991 0001c 83 fe 01 cmp esi, 1 0001f 75 15 jne SHORT $LN5@stbi__resa - -; 2992 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); - +; Line 2992 00021 83 c0 02 add eax, 2 00024 c1 e8 02 shr eax, 2 00027 88 41 01 mov BYTE PTR [rcx+1], al 0002a 88 01 mov BYTE PTR [rcx], al - -; 3009 : } - +; Line 3009 0002c 48 8b c1 mov rax, rcx 0002f 48 8b 5c 24 18 mov rbx, QWORD PTR [rsp+24] 00034 5e pop rsi 00035 c3 ret 0 $LN5@stbi__resa: - -; 2993 : return out; -; 2994 : } -; 2995 : -; 2996 : t1 = 3 * in_near[0] + in_far[0]; -; 2997 : out[0] = stbi__div4(t1 + 2); - +; Line 2997 00036 8d 48 02 lea ecx, DWORD PTR [rax+2] 00039 48 89 7c 24 10 mov QWORD PTR [rsp+16], rdi 0003e c1 e9 02 shr ecx, 2 - -; 2998 : for (i = 1; i < w; ++i) { - +; Line 2998 00041 48 8b fe mov rdi, rsi 00044 41 88 0b mov BYTE PTR [r11], cl 00047 48 83 fe 01 cmp rsi, 1 @@ -25633,10 +16758,7 @@ $LN5@stbi__resa: 00057 4d 8d 53 02 lea r10, QWORD PTR [r11+2] 0005b 0f 1f 44 00 00 npad 5 $LL4@stbi__resa: - -; 2999 : t0 = t1; -; 3000 : t1 = 3 * in_near[i] + in_far[i]; - +; Line 3000 00060 41 0f b6 09 movzx ecx, BYTE PTR [r9] 00064 4d 8d 52 02 lea r10, QWORD PTR [r10+2] 00068 44 8b c0 mov r8d, eax @@ -25644,17 +16766,13 @@ $LL4@stbi__resa: 00070 4d 8d 49 01 lea r9, QWORD PTR [r9+1] 00074 8d 04 40 lea eax, DWORD PTR [rax+rax*2] 00077 03 c1 add eax, ecx - -; 3001 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); - +; Line 3001 00079 41 8d 50 04 lea edx, DWORD PTR [r8+4] 0007d 8d 14 50 lea edx, DWORD PTR [rax+rdx*2] 00080 41 03 d0 add edx, r8d 00083 c1 ea 04 shr edx, 4 00086 41 88 52 fd mov BYTE PTR [r10-3], dl - -; 3002 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); - +; Line 3002 0008a 8d 50 04 lea edx, DWORD PTR [rax+4] 0008d 41 8d 14 50 lea edx, DWORD PTR [r8+rdx*2] 00091 03 d0 add edx, eax @@ -25663,19 +16781,10 @@ $LL4@stbi__resa: 0009a 48 83 ef 01 sub rdi, 1 0009e 75 c0 jne SHORT $LL4@stbi__resa $LN3@stbi__resa: - -; 3003 : } -; 3004 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3005 : -; 3006 : STBI_NOTUSED(hs); -; 3007 : -; 3008 : return out; - +; Line 3008 000a0 48 8b 7c 24 10 mov rdi, QWORD PTR [rsp+16] 000a5 8d 50 02 lea edx, DWORD PTR [rax+2] - -; 3009 : } - +; Line 3009 000a8 48 8b 5c 24 18 mov rbx, QWORD PTR [rsp+24] 000ad 8d 04 36 lea eax, DWORD PTR [rsi+rsi] 000b0 48 63 c8 movsxd rcx, eax @@ -25687,7 +16796,6 @@ $LN3@stbi__resa: stbi__resample_row_hv_2 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__resample_row_hv_2_simd _TEXT SEGMENT out$ = 24 @@ -25696,15 +16804,11 @@ in_far$ = 40 w$ = 48 hs$ = 56 stbi__resample_row_hv_2_simd PROC ; COMDAT - -; 3013 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3013 00000 40 56 push rsi 00002 57 push rdi - -; 3014 : // need to generate 2x2 samples for every one in input -; 3015 : int i = 0, t0, t1; - +; Line 3015 00003 0f b6 02 movzx eax, BYTE PTR [rdx] 00006 4d 8b d0 mov r10, r8 00009 49 63 f1 movsxd rsi, r9d @@ -25713,38 +16817,22 @@ stbi__resample_row_hv_2_simd PROC ; COMDAT 00012 44 8d 04 40 lea r8d, DWORD PTR [rax+rax*2] 00016 41 0f b6 02 movzx eax, BYTE PTR [r10] 0001a 44 03 c0 add r8d, eax - -; 3016 : -; 3017 : if (w == 1) { - +; Line 3017 0001d 83 fe 01 cmp esi, 1 00020 75 12 jne SHORT $LN8@stbi__resa - -; 3018 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); - +; Line 3018 00022 41 8d 40 02 lea eax, DWORD PTR [r8+2] 00026 c1 e8 02 shr eax, 2 00029 88 41 01 mov BYTE PTR [rcx+1], al 0002c 88 01 mov BYTE PTR [rcx], al - -; 3125 : } - +; Line 3125 0002e 48 8b c1 mov rax, rcx 00031 5f pop rdi 00032 5e pop rsi 00033 c3 ret 0 $LN8@stbi__resa: 00034 48 89 5c 24 18 mov QWORD PTR [rsp+24], rbx - -; 3019 : return out; -; 3020 : } -; 3021 : -; 3022 : t1 = 3 * in_near[0] + in_far[0]; -; 3023 : // process groups of 8 pixels for as long as we can. -; 3024 : // note we can't handle the last pixel in a row in this loop -; 3025 : // because we need to handle the filter boundary conditions. -; 3026 : for (; i < ((w - 1) & ~7); i += 8) { - +; Line 3026 00039 8d 46 ff lea eax, DWORD PTR [rsi-1] 0003c 48 8b da mov rbx, rdx 0003f 83 e0 f8 and eax, -8 @@ -25752,12 +16840,7 @@ $LN8@stbi__resa: 00045 85 c0 test eax, eax 00047 0f 8e 02 01 00 00 jle $LN18@stbi__resa - -; 3027 : #if defined(STBI_SSE2) -; 3028 : // load and perform the vertical filtering pass -; 3029 : // this uses 3*x + y = 4*x + (y - x) -; 3030 : __m128i zero = _mm_setzero_si128(); - +; Line 3030 0004d 66 0f 6f 2d 00 00 00 00 movdqa xmm5, XMMWORD PTR __xmm@00080008000800080008000800080008 00055 4d 8d 5a 08 lea r11, QWORD PTR [r10+8] @@ -25777,25 +16860,7 @@ $LN8@stbi__resa: 0f 1f 84 00 00 00 00 00 npad 13 $LL4@stbi__resa: - -; 3031 : __m128i farb = _mm_loadl_epi64((__m128i*) (in_far + i)); -; 3032 : __m128i nearb = _mm_loadl_epi64((__m128i*) (in_near + i)); -; 3033 : __m128i farw = _mm_unpacklo_epi8(farb, zero); -; 3034 : __m128i nearw = _mm_unpacklo_epi8(nearb, zero); -; 3035 : __m128i diff = _mm_sub_epi16(farw, nearw); -; 3036 : __m128i nears = _mm_slli_epi16(nearw, 2); -; 3037 : __m128i curr = _mm_add_epi16(nears, diff); // current row -; 3038 : -; 3039 : // horizontal filter works the same based on shifted vers of current -; 3040 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3041 : // insert the previous pixel value (from t1). -; 3042 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3043 : // of next block of 8 pixels added in. -; 3044 : __m128i prv0 = _mm_slli_si128(curr, 2); -; 3045 : __m128i nxt0 = _mm_srli_si128(curr, 2); -; 3046 : __m128i prev = _mm_insert_epi16(prv0, t1, 0); -; 3047 : __m128i next = _mm_insert_epi16(nxt0, 3 * in_near[i + 8] + in_far[i + 8], 7); - +; Line 3047 00090 42 0f b6 04 1b movzx eax, BYTE PTR [rbx+r11] 00095 4d 8d 76 10 lea r14, QWORD PTR [r14+16] 00099 f3 0f 7e 04 2b movq xmm0, QWORD PTR [rbx+rbp] @@ -25813,109 +16878,37 @@ $LL4@stbi__resa: 000ca 66 0f 6f d3 movdqa xmm2, xmm3 000ce 66 0f 6f cb movdqa xmm1, xmm3 000d2 66 0f 73 fa 02 pslldq xmm2, 2 - -; 3048 : -; 3049 : // horizontal filter, polyphase implementation since it's convenient: -; 3050 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3051 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3052 : // note the shared term. -; 3053 : __m128i bias = _mm_set1_epi16(8); -; 3054 : __m128i curs = _mm_slli_epi16(curr, 2); - +; Line 3054 000d7 66 0f 6f c3 movdqa xmm0, xmm3 000db 66 41 0f c4 d0 00 pinsrw xmm2, r8d, 0 000e1 66 0f 71 f0 02 psllw xmm0, 2 - -; 3055 : __m128i prvd = _mm_sub_epi16(prev, curr); - +; Line 3055 000e6 66 0f f9 d3 psubw xmm2, xmm3 - -; 3056 : __m128i nxtd = _mm_sub_epi16(next, curr); -; 3057 : __m128i curb = _mm_add_epi16(curs, bias); - +; Line 3057 000ea 66 0f fd c5 paddw xmm0, xmm5 000ee 66 0f 73 d9 02 psrldq xmm1, 2 - -; 3058 : __m128i even = _mm_add_epi16(prvd, curb); - +; Line 3058 000f3 66 0f fd d0 paddw xmm2, xmm0 000f7 66 0f c4 c9 07 pinsrw xmm1, ecx, 7 000fc 66 0f f9 cb psubw xmm1, xmm3 - -; 3059 : __m128i odd = _mm_add_epi16(nxtd, curb); - +; Line 3059 00100 66 0f fd c8 paddw xmm1, xmm0 - -; 3060 : -; 3061 : // interleave even and odd pixels, then undo scaling. -; 3062 : __m128i int0 = _mm_unpacklo_epi16(even, odd); - +; Line 3062 00104 66 0f 6f c2 movdqa xmm0, xmm2 00108 66 0f 61 c1 punpcklwd xmm0, xmm1 - -; 3063 : __m128i int1 = _mm_unpackhi_epi16(even, odd); - +; Line 3063 0010c 66 0f 69 d1 punpckhwd xmm2, xmm1 - -; 3064 : __m128i de0 = _mm_srli_epi16(int0, 4); - +; Line 3064 00110 66 0f 71 d0 04 psrlw xmm0, 4 - -; 3065 : __m128i de1 = _mm_srli_epi16(int1, 4); - +; Line 3065 00115 66 0f 71 d2 04 psrlw xmm2, 4 - -; 3066 : -; 3067 : // pack and write output -; 3068 : __m128i outv = _mm_packus_epi16(de0, de1); - +; Line 3068 0011a 66 0f 67 c2 packuswb xmm0, xmm2 - -; 3069 : _mm_storeu_si128((__m128i*) (out + i * 2), outv); - +; Line 3069 0011e f3 41 0f 7f 46 f0 movdqu XMMWORD PTR [r14-16], xmm0 - -; 3070 : #elif defined(STBI_NEON) -; 3071 : // load and perform the vertical filtering pass -; 3072 : // this uses 3*x + y = 4*x + (y - x) -; 3073 : uint8x8_t farb = vld1_u8(in_far + i); -; 3074 : uint8x8_t nearb = vld1_u8(in_near + i); -; 3075 : int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); -; 3076 : int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); -; 3077 : int16x8_t curr = vaddq_s16(nears, diff); // current row -; 3078 : -; 3079 : // horizontal filter works the same based on shifted vers of current -; 3080 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3081 : // insert the previous pixel value (from t1). -; 3082 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3083 : // of next block of 8 pixels added in. -; 3084 : int16x8_t prv0 = vextq_s16(curr, curr, 7); -; 3085 : int16x8_t nxt0 = vextq_s16(curr, curr, 1); -; 3086 : int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); -; 3087 : int16x8_t next = vsetq_lane_s16(3 * in_near[i + 8] + in_far[i + 8], nxt0, 7); -; 3088 : -; 3089 : // horizontal filter, polyphase implementation since it's convenient: -; 3090 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3091 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3092 : // note the shared term. -; 3093 : int16x8_t curs = vshlq_n_s16(curr, 2); -; 3094 : int16x8_t prvd = vsubq_s16(prev, curr); -; 3095 : int16x8_t nxtd = vsubq_s16(next, curr); -; 3096 : int16x8_t even = vaddq_s16(curs, prvd); -; 3097 : int16x8_t odd = vaddq_s16(curs, nxtd); -; 3098 : -; 3099 : // undo scaling and round, then store with even/odd phases interleaved -; 3100 : uint8x8x2_t o; -; 3101 : o.val[0] = vqrshrun_n_s16(even, 4); -; 3102 : o.val[1] = vqrshrun_n_s16(odd, 4); -; 3103 : vst2_u8(out + i * 2, o); -; 3104 : #endif -; 3105 : -; 3106 : // "previous" value for next iter -; 3107 : t1 = 3 * in_near[i + 7] + in_far[i + 7]; - +; Line 3107 00124 42 0f b6 44 1b f7 movzx eax, BYTE PTR [rbx+r11-9] 0012a 44 8d 04 40 lea r8d, DWORD PTR [rax+rax*2] @@ -25928,15 +16921,9 @@ $LL4@stbi__resa: 00145 4c 8b 74 24 28 mov r14, QWORD PTR [rsp+40] 0014a 48 8b 6c 24 20 mov rbp, QWORD PTR [rsp+32] $LN18@stbi__resa: - -; 3111 : t1 = 3 * in_near[i] + in_far[i]; - +; Line 3111 0014f 49 63 c9 movsxd rcx, r9d - -; 3112 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3113 : -; 3114 : for (++i; i < w; ++i) { - +; Line 3114 00152 4c 8b de mov r11, rsi 00155 0f b6 04 11 movzx eax, BYTE PTR [rcx+rdx] 00159 42 0f b6 0c 11 movzx ecx, BYTE PTR [rcx+r10] @@ -25953,11 +16940,7 @@ $LN18@stbi__resa: 00181 48 63 d1 movsxd rdx, ecx 00184 48 3b d6 cmp rdx, rsi 00187 7d 57 jge SHORT $LN6@stbi__resa - -; 3108 : } -; 3109 : -; 3110 : t0 = t1; - +; Line 3110 00189 4e 8d 0c 12 lea r9, QWORD PTR [rdx+r10] 0018d 4c 2b da sub r11, rdx 00190 4c 8d 14 57 lea r10, QWORD PTR [rdi+rdx*2] @@ -25965,10 +16948,7 @@ $LN18@stbi__resa: 1f 84 00 00 00 00 00 npad 12 $LL7@stbi__resa: - -; 3115 : t0 = t1; -; 3116 : t1 = 3 * in_near[i] + in_far[i]; - +; Line 3116 001a0 41 0f b6 09 movzx ecx, BYTE PTR [r9] 001a4 4d 8d 52 02 lea r10, QWORD PTR [r10+2] 001a8 44 8b c0 mov r8d, eax @@ -25976,17 +16956,13 @@ $LL7@stbi__resa: 001b0 4d 8d 49 01 lea r9, QWORD PTR [r9+1] 001b4 8d 04 40 lea eax, DWORD PTR [rax+rax*2] 001b7 03 c1 add eax, ecx - -; 3117 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); - +; Line 3117 001b9 41 8d 50 04 lea edx, DWORD PTR [r8+4] 001bd 8d 14 50 lea edx, DWORD PTR [rax+rdx*2] 001c0 41 03 d0 add edx, r8d 001c3 c1 ea 04 shr edx, 4 001c6 41 88 52 fd mov BYTE PTR [r10-3], dl - -; 3118 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); - +; Line 3118 001ca 8d 50 04 lea edx, DWORD PTR [rax+4] 001cd 41 8d 14 50 lea edx, DWORD PTR [r8+rdx*2] 001d1 03 d0 add edx, eax @@ -25995,22 +16971,13 @@ $LL7@stbi__resa: 001da 49 83 eb 01 sub r11, 1 001de 75 c0 jne SHORT $LL7@stbi__resa $LN6@stbi__resa: - -; 3119 : } -; 3120 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3121 : -; 3122 : STBI_NOTUSED(hs); -; 3123 : -; 3124 : return out; - +; Line 3124 001e0 48 8b 5c 24 18 mov rbx, QWORD PTR [rsp+24] 001e5 8d 50 02 lea edx, DWORD PTR [rax+2] 001e8 8d 04 36 lea eax, DWORD PTR [rsi+rsi] 001eb c1 ea 02 shr edx, 2 001ee 48 63 c8 movsxd rcx, eax - -; 3125 : } - +; Line 3125 001f1 48 8b c7 mov rax, rdi 001f4 88 54 39 ff mov BYTE PTR [rcx+rdi-1], dl 001f8 5f pop rdi @@ -26019,7 +16986,6 @@ $LN6@stbi__resa: stbi__resample_row_hv_2_simd ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__resample_row_generic _TEXT SEGMENT out$ = 8 @@ -26028,30 +16994,20 @@ in_far$ = 24 w$ = 32 hs$ = 40 stbi__resample_row_generic PROC ; COMDAT - -; 3129 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3129 00000 4c 8b d9 mov r11, rcx - -; 3130 : // resample with nearest-neighbor -; 3131 : int i, j; -; 3132 : STBI_NOTUSED(in_far); -; 3133 : for (i = 0; i < w; ++i) - +; Line 3133 00003 45 85 c9 test r9d, r9d 00006 7e 33 jle SHORT $LN17@stbi__resa 00008 4c 63 44 24 28 movsxd r8, DWORD PTR hs$[rsp] 0000d 4c 8b d1 mov r10, rcx 00010 45 8b c9 mov r9d, r9d $LL4@stbi__resa: - -; 3134 : for (j = 0; j < hs; ++j) - +; Line 3134 00013 4d 85 c0 test r8, r8 00016 7e 17 jle SHORT $LN2@stbi__resa - -; 3135 : out[i * hs + j] = in_near[i]; - +; Line 3135 00018 33 c0 xor eax, eax 0001a 66 0f 1f 44 00 00 npad 6 @@ -26062,27 +17018,18 @@ $LL7@stbi__resa: 0002a 49 3b c0 cmp rax, r8 0002d 7c f1 jl SHORT $LL7@stbi__resa $LN2@stbi__resa: - -; 3130 : // resample with nearest-neighbor -; 3131 : int i, j; -; 3132 : STBI_NOTUSED(in_far); -; 3133 : for (i = 0; i < w; ++i) - +; Line 3133 0002f 4d 03 d0 add r10, r8 00032 48 ff c2 inc rdx 00035 49 83 e9 01 sub r9, 1 00039 75 d8 jne SHORT $LL4@stbi__resa $LN17@stbi__resa: - -; 3136 : return out; -; 3137 : } - +; Line 3137 0003b 49 8b c3 mov rax, r11 0003e c3 ret 0 stbi__resample_row_generic ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__YCbCr_to_RGB_row _TEXT SEGMENT out$ = 24 @@ -26092,17 +17039,13 @@ pcr$ = 48 count$ = 56 step$ = 64 stbi__YCbCr_to_RGB_row PROC ; COMDAT - -; 3143 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3143 00000 48 89 5c 24 18 mov QWORD PTR [rsp+24], rbx 00005 48 89 6c 24 20 mov QWORD PTR [rsp+32], rbp 0000a 57 push rdi 0000b 41 56 push r14 - -; 3144 : int i; -; 3145 : for (i = 0; i < count; ++i) { - +; Line 3145 0000d 48 63 7c 24 38 movsxd rdi, DWORD PTR count$[rsp] 00012 49 8b d9 mov rbx, r9 00015 49 8b e8 mov rbp, r8 @@ -26114,35 +17057,24 @@ stbi__YCbCr_to_RGB_row PROC ; COMDAT 00029 48 8d 41 02 lea rax, QWORD PTR [rcx+2] 0002d 48 63 74 24 40 movsxd rsi, DWORD PTR step$[rsp] 00032 4c 2b f3 sub r14, rbx - -; 3146 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding - +; Line 3146 00035 48 2b eb sub rbp, rbx 00038 4c 89 7c 24 20 mov QWORD PTR [rsp+32], r15 0003d 45 33 ff xor r15d, r15d $LL4@stbi__YCbC: - -; 3147 : int r, g, b; -; 3148 : int cr = pcr[i] - 128; - +; Line 3148 00040 44 0f b6 03 movzx r8d, BYTE PTR [rbx] - -; 3149 : int cb = pcb[i] - 128; - +; Line 3149 00044 44 0f b6 0c 2b movzx r9d, BYTE PTR [rbx+rbp] 00049 45 0f b6 14 1e movzx r10d, BYTE PTR [r14+rbx] 0004e 41 c1 e2 14 shl r10d, 20 - -; 3150 : r = y_fixed + cr * stbi__float2fixed(1.40200f); - +; Line 3150 00052 41 8d 48 80 lea ecx, DWORD PTR [r8-128] 00056 41 81 c2 00 00 08 00 add r10d, 524288 ; 00080000H 0005d 44 69 d9 00 6f 16 00 imul r11d, ecx, 1470208 ; 00166f00H - -; 3151 : g = y_fixed + (cr * -stbi__float2fixed(0.71414f)) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); - +; Line 3151 00064 b9 80 00 00 00 mov ecx, 128 ; 00000080H 00069 41 2b c9 sub ecx, r9d 0006c 69 d1 00 82 05 @@ -26152,10 +17084,7 @@ $LL4@stbi__YCbC: 0007a 44 69 c1 00 6d 0b 00 imul r8d, ecx, 748800 ; 000b6d00H 00081 45 03 da add r11d, r10d - -; 3152 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3153 : r >>= 20; - +; Line 3153 00084 41 c1 fb 14 sar r11d, 20 00088 81 e2 00 00 ff ff and edx, -65536 ; ffffffffffff0000H @@ -26164,18 +17093,12 @@ $LL4@stbi__YCbC: 00095 41 8d 49 80 lea ecx, DWORD PTR [r9-128] 00099 69 d1 00 5a 1c 00 imul edx, ecx, 1858048 ; 001c5a00H - -; 3154 : g >>= 20; - +; Line 3154 0009f 41 c1 f8 14 sar r8d, 20 000a3 41 03 d2 add edx, r10d - -; 3155 : b >>= 20; - +; Line 3155 000a6 c1 fa 14 sar edx, 20 - -; 3156 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } - +; Line 3156 000a9 41 81 fb ff 00 00 00 cmp r11d, 255 ; 000000ffH 000b0 76 0f jbe SHORT $LN6@stbi__YCbC @@ -26184,9 +17107,7 @@ $LL4@stbi__YCbC: 000ba 41 0f 48 cf cmovs ecx, r15d 000be 44 8b d9 mov r11d, ecx $LN6@stbi__YCbC: - -; 3157 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } - +; Line 3157 000c1 41 81 f8 ff 00 00 00 cmp r8d, 255 ; 000000ffH 000c8 76 0f jbe SHORT $LN9@stbi__YCbC @@ -26195,9 +17116,7 @@ $LN6@stbi__YCbC: 000d2 41 0f 48 cf cmovs ecx, r15d 000d6 44 8b c1 mov r8d, ecx $LN9@stbi__YCbC: - -; 3158 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } - +; Line 3158 000d9 81 fa ff 00 00 00 cmp edx, 255 ; 000000ffH 000df 76 0d jbe SHORT $LN12@stbi__YCbC @@ -26206,41 +17125,25 @@ $LN9@stbi__YCbC: 000e8 41 0f 48 cf cmovs ecx, r15d 000ec 8b d1 mov edx, ecx $LN12@stbi__YCbC: - -; 3159 : out[0] = (stbi_uc)r; - +; Line 3159 000ee 44 88 58 fe mov BYTE PTR [rax-2], r11b 000f2 48 ff c3 inc rbx - -; 3160 : out[1] = (stbi_uc)g; - +; Line 3160 000f5 44 88 40 ff mov BYTE PTR [rax-1], r8b - -; 3161 : out[2] = (stbi_uc)b; - +; Line 3161 000f9 88 10 mov BYTE PTR [rax], dl - -; 3162 : out[3] = 255; - +; Line 3162 000fb c6 40 01 ff mov BYTE PTR [rax+1], 255 ; 000000ffH - -; 3163 : out += step; - +; Line 3163 000ff 48 03 c6 add rax, rsi 00102 48 83 ef 01 sub rdi, 1 00106 0f 85 34 ff ff ff jne $LL4@stbi__YCbC - -; 3144 : int i; -; 3145 : for (i = 0; i < count; ++i) { - +; Line 3145 0010c 4c 8b 7c 24 20 mov r15, QWORD PTR [rsp+32] 00111 48 8b 74 24 18 mov rsi, QWORD PTR [rsp+24] $LN3@stbi__YCbC: - -; 3164 : } -; 3165 : } - +; Line 3165 00116 48 8b 5c 24 28 mov rbx, QWORD PTR [rsp+40] 0011b 48 8b 6c 24 30 mov rbp, QWORD PTR [rsp+48] 00120 41 5e pop r14 @@ -26249,7 +17152,6 @@ $LN3@stbi__YCbC: stbi__YCbCr_to_RGB_row ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__YCbCr_to_RGB_simd _TEXT SEGMENT out$ = 128 @@ -26259,23 +17161,14 @@ pcr$ = 152 count$ = 160 step$ = 168 stbi__YCbCr_to_RGB_simd PROC ; COMDAT - -; 3169 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3169 00000 48 89 6c 24 18 mov QWORD PTR [rsp+24], rbp 00005 56 push rsi 00006 57 push rdi 00007 41 57 push r15 00009 48 83 ec 60 sub rsp, 96 ; 00000060H - -; 3170 : int i = 0; -; 3171 : -; 3172 : #ifdef STBI_SSE2 -; 3173 : // step == 3 is pretty ugly on the final interleave, and i'm not convinced -; 3174 : // it's useful in practice (you wouldn't use it for textures, for example). -; 3175 : // so just accelerate step == 4 case. -; 3176 : if (step == 4) { - +; Line 3176 0000d 4c 63 94 24 a8 00 00 00 movsxd r10, DWORD PTR step$[rsp] 00015 45 33 ff xor r15d, r15d @@ -26287,50 +17180,33 @@ stbi__YCbCr_to_RGB_simd PROC ; COMDAT 00029 41 83 fa 04 cmp r10d, 4 0002d 0f 85 3c 01 00 00 jne $LN3@stbi__YCbC - -; 3177 : // this is a fairly straightforward implementation and not super-optimized. -; 3178 : __m128i signflip = _mm_set1_epi8(-0x80); - +; Line 3178 00033 66 0f 6f 2d 00 00 00 00 movdqa xmm5, XMMWORD PTR __xmm@80808080808080808080808080808080 0003b 0f 29 7c 24 40 movaps XMMWORD PTR [rsp+64], xmm7 - -; 3179 : __m128i cr_const0 = _mm_set1_epi16((short)(1.40200f * 4096.0f + 0.5f)); - +; Line 3179 00040 66 0f 6f 3d 00 00 00 00 movdqa xmm7, XMMWORD PTR __xmm@166f166f166f166f166f166f166f166f 00048 44 0f 29 44 24 30 movaps XMMWORD PTR [rsp+48], xmm8 - -; 3180 : __m128i cr_const1 = _mm_set1_epi16(-(short)(0.71414f * 4096.0f + 0.5f)); - +; Line 3180 0004e 66 44 0f 6f 05 00 00 00 00 movdqa xmm8, XMMWORD PTR __xmm@f493f493f493f493f493f493f493f493 00057 44 0f 29 4c 24 20 movaps XMMWORD PTR [rsp+32], xmm9 - -; 3181 : __m128i cb_const0 = _mm_set1_epi16(-(short)(0.34414f * 4096.0f + 0.5f)); - +; Line 3181 0005d 66 44 0f 6f 0d 00 00 00 00 movdqa xmm9, XMMWORD PTR __xmm@fa7efa7efa7efa7efa7efa7efa7efa7e 00066 44 0f 29 54 24 10 movaps XMMWORD PTR [rsp+16], xmm10 - -; 3182 : __m128i cb_const1 = _mm_set1_epi16((short)(1.77200f * 4096.0f + 0.5f)); - +; Line 3182 0006c 66 44 0f 6f 15 00 00 00 00 movdqa xmm10, XMMWORD PTR __xmm@1c5a1c5a1c5a1c5a1c5a1c5a1c5a1c5a 00075 44 0f 29 1c 24 movaps XMMWORD PTR [rsp], xmm11 - -; 3183 : __m128i y_bias = _mm_set1_epi8((char)(unsigned char)128); -; 3184 : __m128i xw = _mm_set1_epi16(255); // alpha channel - +; Line 3184 0007a 66 44 0f 6f 1d 00 00 00 00 movdqa xmm11, XMMWORD PTR __xmm@00ff00ff00ff00ff00ff00ff00ff00ff - -; 3185 : -; 3186 : for (; i + 7 < count; i += 8) { - +; Line 3186 00083 83 fa 07 cmp edx, 7 00086 0f 8e c7 00 00 00 jle $LN37@stbi__YCbC @@ -26340,26 +17216,12 @@ stbi__YCbCr_to_RGB_simd PROC ; COMDAT 1f 84 00 00 00 00 00 npad 12 $LL4@stbi__YCbC: - -; 3187 : // load -; 3188 : __m128i y_bytes = _mm_loadl_epi64((__m128i*) (y + i)); -; 3189 : __m128i cr_bytes = _mm_loadl_epi64((__m128i*) (pcr + i)); - +; Line 3189 000a0 49 63 c0 movsxd rax, r8d - -; 3190 : __m128i cb_bytes = _mm_loadl_epi64((__m128i*) (pcb + i)); -; 3191 : __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 -; 3192 : __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 -; 3193 : -; 3194 : // unpack to short (and left-shift cr, cb by 8) -; 3195 : __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); -; 3196 : __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); - +; Line 3196 000a3 66 0f 6f d6 movdqa xmm2, xmm6 000a7 41 83 c0 08 add r8d, 8 - -; 3197 : __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); - +; Line 3197 000ab 66 0f 6f e6 movdqa xmm4, xmm6 000af 66 0f 6f cd movdqa xmm1, xmm5 000b3 f3 42 0f 7e 04 @@ -26367,12 +17229,7 @@ $LL4@stbi__YCbC: 000b9 0f 57 c5 xorps xmm0, xmm5 000bc 66 0f 60 d0 punpcklbw xmm2, xmm0 000c0 f3 0f 7e 04 30 movq xmm0, QWORD PTR [rax+rsi] - -; 3198 : -; 3199 : // color transform -; 3200 : __m128i yws = _mm_srli_epi16(yw, 4); -; 3201 : __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); - +; Line 3201 000c5 66 0f 6f da movdqa xmm3, xmm2 000c9 0f 57 c5 xorps xmm0, xmm5 000cc 66 0f e5 df pmulhw xmm3, xmm7 @@ -26380,85 +17237,44 @@ $LL4@stbi__YCbC: 000d4 f3 0f 7e 04 28 movq xmm0, QWORD PTR [rax+rbp] 000d9 41 8d 40 07 lea eax, DWORD PTR [r8+7] 000dd 66 0f 60 c8 punpcklbw xmm1, xmm0 - -; 3202 : __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); -; 3203 : __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); - +; Line 3203 000e1 66 0f 6f c4 movdqa xmm0, xmm4 000e5 66 0f 71 d1 04 psrlw xmm1, 4 - -; 3204 : __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); -; 3205 : __m128i rws = _mm_add_epi16(cr0, yws); - +; Line 3205 000ea 66 0f fd d9 paddw xmm3, xmm1 000ee 66 41 0f e5 c2 pmulhw xmm0, xmm10 000f3 66 41 0f e5 e1 pmulhw xmm4, xmm9 - -; 3206 : __m128i gwt = _mm_add_epi16(cb0, yws); -; 3207 : __m128i bws = _mm_add_epi16(yws, cb1); -; 3208 : __m128i gws = _mm_add_epi16(gwt, cr1); -; 3209 : -; 3210 : // descale -; 3211 : __m128i rw = _mm_srai_epi16(rws, 4); - +; Line 3211 000f8 66 0f 71 e3 04 psraw xmm3, 4 000fd 66 41 0f e5 d0 pmulhw xmm2, xmm8 00102 66 0f fd c1 paddw xmm0, xmm1 00106 66 0f fd e1 paddw xmm4, xmm1 - -; 3212 : __m128i bw = _mm_srai_epi16(bws, 4); - +; Line 3212 0010a 66 0f 71 e0 04 psraw xmm0, 4 - -; 3213 : __m128i gw = _mm_srai_epi16(gws, 4); -; 3214 : -; 3215 : // back to byte, set up for transpose -; 3216 : __m128i brb = _mm_packus_epi16(rw, bw); - +; Line 3216 0010f 66 0f 67 d8 packuswb xmm3, xmm0 00113 66 0f fd e2 paddw xmm4, xmm2 - -; 3217 : __m128i gxb = _mm_packus_epi16(gw, xw); -; 3218 : -; 3219 : // transpose to interleave channels -; 3220 : __m128i t0 = _mm_unpacklo_epi8(brb, gxb); - +; Line 3220 00117 66 0f 6f cb movdqa xmm1, xmm3 0011b 66 0f 71 e4 04 psraw xmm4, 4 00120 66 41 0f 67 e3 packuswb xmm4, xmm11 00125 66 0f 60 cc punpcklbw xmm1, xmm4 - -; 3221 : __m128i t1 = _mm_unpackhi_epi8(brb, gxb); -; 3222 : __m128i o0 = _mm_unpacklo_epi16(t0, t1); - +; Line 3222 00129 66 0f 6f c1 movdqa xmm0, xmm1 0012d 66 0f 68 dc punpckhbw xmm3, xmm4 00131 66 0f 61 c3 punpcklwd xmm0, xmm3 - -; 3223 : __m128i o1 = _mm_unpackhi_epi16(t0, t1); - +; Line 3223 00135 66 0f 69 cb punpckhwd xmm1, xmm3 - -; 3224 : -; 3225 : // store -; 3226 : _mm_storeu_si128((__m128i*) (out + 0), o0); - +; Line 3226 00139 f3 0f 7f 01 movdqu XMMWORD PTR [rcx], xmm0 - -; 3227 : _mm_storeu_si128((__m128i*) (out + 16), o1); - +; Line 3227 0013d f3 0f 7f 49 10 movdqu XMMWORD PTR [rcx+16], xmm1 - -; 3228 : out += 32; - +; Line 3228 00142 48 83 c1 20 add rcx, 32 ; 00000020H 00146 3b c2 cmp eax, edx 00148 0f 8c 52 ff ff ff jl $LL4@stbi__YCbC - -; 3185 : -; 3186 : for (; i + 7 < count; i += 8) { - +; Line 3186 0014e 0f 28 74 24 50 movaps xmm6, XMMWORD PTR [rsp+80] $LN37@stbi__YCbC: 00153 44 0f 28 54 24 @@ -26470,59 +17286,7 @@ $LN37@stbi__YCbC: 00165 0f 28 7c 24 40 movaps xmm7, XMMWORD PTR [rsp+64] 0016a 44 0f 28 1c 24 movaps xmm11, XMMWORD PTR [rsp] $LN3@stbi__YCbC: - -; 3229 : } -; 3230 : } -; 3231 : #endif -; 3232 : -; 3233 : #ifdef STBI_NEON -; 3234 : // in this version, step=3 support would be easy to add. but is there demand? -; 3235 : if (step == 4) { -; 3236 : // this is a fairly straightforward implementation and not super-optimized. -; 3237 : uint8x8_t signflip = vdup_n_u8(0x80); -; 3238 : int16x8_t cr_const0 = vdupq_n_s16((short)(1.40200f * 4096.0f + 0.5f)); -; 3239 : int16x8_t cr_const1 = vdupq_n_s16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3240 : int16x8_t cb_const0 = vdupq_n_s16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3241 : int16x8_t cb_const1 = vdupq_n_s16((short)(1.77200f * 4096.0f + 0.5f)); -; 3242 : -; 3243 : for (; i + 7 < count; i += 8) { -; 3244 : // load -; 3245 : uint8x8_t y_bytes = vld1_u8(y + i); -; 3246 : uint8x8_t cr_bytes = vld1_u8(pcr + i); -; 3247 : uint8x8_t cb_bytes = vld1_u8(pcb + i); -; 3248 : int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); -; 3249 : int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); -; 3250 : -; 3251 : // expand to s16 -; 3252 : int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); -; 3253 : int16x8_t crw = vshll_n_s8(cr_biased, 7); -; 3254 : int16x8_t cbw = vshll_n_s8(cb_biased, 7); -; 3255 : -; 3256 : // color transform -; 3257 : int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); -; 3258 : int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); -; 3259 : int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); -; 3260 : int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); -; 3261 : int16x8_t rws = vaddq_s16(yws, cr0); -; 3262 : int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); -; 3263 : int16x8_t bws = vaddq_s16(yws, cb1); -; 3264 : -; 3265 : // undo scaling, round, convert to byte -; 3266 : uint8x8x4_t o; -; 3267 : o.val[0] = vqrshrun_n_s16(rws, 4); -; 3268 : o.val[1] = vqrshrun_n_s16(gws, 4); -; 3269 : o.val[2] = vqrshrun_n_s16(bws, 4); -; 3270 : o.val[3] = vdup_n_u8(255); -; 3271 : -; 3272 : // store, interleaving r/g/b/a -; 3273 : vst4_u8(out, o); -; 3274 : out += 8 * 4; -; 3275 : } -; 3276 : } -; 3277 : #endif -; 3278 : -; 3279 : for (; i < count; ++i) { - +; Line 3279 0016f 49 63 c0 movsxd rax, r8d 00172 48 8b fa mov rdi, rdx 00175 48 3b c2 cmp rax, rdx @@ -26539,29 +17303,19 @@ $LN3@stbi__YCbC: 0019c 4d 8b f2 mov r14, r10 0019f 48 2b f8 sub rdi, rax $LL7@stbi__YCbC: - -; 3280 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3281 : int r, g, b; -; 3282 : int cr = pcr[i] - 128; - +; Line 3282 001a2 0f b6 13 movzx edx, BYTE PTR [rbx] - -; 3283 : int cb = pcb[i] - 128; - +; Line 3283 001a5 44 0f b6 04 33 movzx r8d, BYTE PTR [rbx+rsi] 001aa 44 0f b6 0c 2b movzx r9d, BYTE PTR [rbx+rbp] 001af 41 c1 e1 14 shl r9d, 20 - -; 3284 : r = y_fixed + cr * stbi__float2fixed(1.40200f); - +; Line 3284 001b3 8d 42 80 lea eax, DWORD PTR [rdx-128] 001b6 41 81 c1 00 00 08 00 add r9d, 524288 ; 00080000H 001bd 44 69 d0 00 6f 16 00 imul r10d, eax, 1470208 ; 00166f00H - -; 3285 : g = y_fixed + cr * -stbi__float2fixed(0.71414f) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); - +; Line 3285 001c4 b8 80 00 00 00 mov eax, 128 ; 00000080H 001c9 41 2b c0 sub eax, r8d 001cc 69 c8 00 82 05 @@ -26571,10 +17325,7 @@ $LL7@stbi__YCbC: 001d9 69 d0 00 6d 0b 00 imul edx, eax, 748800 ; 000b6d00H 001df 45 03 d1 add r10d, r9d - -; 3286 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3287 : r >>= 20; - +; Line 3287 001e2 41 c1 fa 14 sar r10d, 20 001e6 81 e1 00 00 ff ff and ecx, -65536 ; ffffffffffff0000H @@ -26583,18 +17334,12 @@ $LL7@stbi__YCbC: 001f2 41 8d 40 80 lea eax, DWORD PTR [r8-128] 001f6 69 c0 00 5a 1c 00 imul eax, eax, 1858048 ; 001c5a00H - -; 3288 : g >>= 20; - +; Line 3288 001fc c1 fa 14 sar edx, 20 001ff 41 03 c1 add eax, r9d - -; 3289 : b >>= 20; - +; Line 3289 00202 c1 f8 14 sar eax, 20 - -; 3290 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } - +; Line 3290 00205 41 81 fa ff 00 00 00 cmp r10d, 255 ; 000000ffH 0020c 76 0f jbe SHORT $LN10@stbi__YCbC @@ -26603,9 +17348,7 @@ $LL7@stbi__YCbC: 00216 41 0f 48 cf cmovs ecx, r15d 0021a 44 8b d1 mov r10d, ecx $LN10@stbi__YCbC: - -; 3291 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } - +; Line 3291 0021d 81 fa ff 00 00 00 cmp edx, 255 ; 000000ffH 00223 76 0d jbe SHORT $LN13@stbi__YCbC @@ -26614,9 +17357,7 @@ $LN10@stbi__YCbC: 0022c 41 0f 48 cf cmovs ecx, r15d 00230 8b d1 mov edx, ecx $LN13@stbi__YCbC: - -; 3292 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } - +; Line 3292 00232 3d ff 00 00 00 cmp eax, 255 ; 000000ffH 00237 76 0d jbe SHORT $LN16@stbi__YCbC 00239 85 c0 test eax, eax @@ -26624,92 +17365,27 @@ $LN13@stbi__YCbC: 00240 41 0f 48 cf cmovs ecx, r15d 00244 8b c1 mov eax, ecx $LN16@stbi__YCbC: - -; 3293 : out[0] = (stbi_uc)r; - +; Line 3293 00246 45 88 53 fe mov BYTE PTR [r11-2], r10b 0024a 48 ff c3 inc rbx - -; 3294 : out[1] = (stbi_uc)g; - +; Line 3294 0024d 41 88 53 ff mov BYTE PTR [r11-1], dl - -; 3295 : out[2] = (stbi_uc)b; - +; Line 3295 00251 41 88 03 mov BYTE PTR [r11], al - -; 3296 : out[3] = 255; - +; Line 3296 00254 41 c6 43 01 ff mov BYTE PTR [r11+1], 255 ; 000000ffH - -; 3297 : out += step; - +; Line 3297 00259 4d 03 de add r11, r14 0025c 48 83 ef 01 sub rdi, 1 00260 0f 85 3c ff ff ff jne $LL7@stbi__YCbC - -; 3229 : } -; 3230 : } -; 3231 : #endif -; 3232 : -; 3233 : #ifdef STBI_NEON -; 3234 : // in this version, step=3 support would be easy to add. but is there demand? -; 3235 : if (step == 4) { -; 3236 : // this is a fairly straightforward implementation and not super-optimized. -; 3237 : uint8x8_t signflip = vdup_n_u8(0x80); -; 3238 : int16x8_t cr_const0 = vdupq_n_s16((short)(1.40200f * 4096.0f + 0.5f)); -; 3239 : int16x8_t cr_const1 = vdupq_n_s16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3240 : int16x8_t cb_const0 = vdupq_n_s16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3241 : int16x8_t cb_const1 = vdupq_n_s16((short)(1.77200f * 4096.0f + 0.5f)); -; 3242 : -; 3243 : for (; i + 7 < count; i += 8) { -; 3244 : // load -; 3245 : uint8x8_t y_bytes = vld1_u8(y + i); -; 3246 : uint8x8_t cr_bytes = vld1_u8(pcr + i); -; 3247 : uint8x8_t cb_bytes = vld1_u8(pcb + i); -; 3248 : int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); -; 3249 : int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); -; 3250 : -; 3251 : // expand to s16 -; 3252 : int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); -; 3253 : int16x8_t crw = vshll_n_s8(cr_biased, 7); -; 3254 : int16x8_t cbw = vshll_n_s8(cb_biased, 7); -; 3255 : -; 3256 : // color transform -; 3257 : int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); -; 3258 : int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); -; 3259 : int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); -; 3260 : int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); -; 3261 : int16x8_t rws = vaddq_s16(yws, cr0); -; 3262 : int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); -; 3263 : int16x8_t bws = vaddq_s16(yws, cb1); -; 3264 : -; 3265 : // undo scaling, round, convert to byte -; 3266 : uint8x8x4_t o; -; 3267 : o.val[0] = vqrshrun_n_s16(rws, 4); -; 3268 : o.val[1] = vqrshrun_n_s16(gws, 4); -; 3269 : o.val[2] = vqrshrun_n_s16(bws, 4); -; 3270 : o.val[3] = vdup_n_u8(255); -; 3271 : -; 3272 : // store, interleaving r/g/b/a -; 3273 : vst4_u8(out, o); -; 3274 : out += 8 * 4; -; 3275 : } -; 3276 : } -; 3277 : #endif -; 3278 : -; 3279 : for (; i < count; ++i) { - +; Line 3279 00266 4c 8b b4 24 88 00 00 00 mov r14, QWORD PTR [rsp+136] 0026e 48 8b 9c 24 80 00 00 00 mov rbx, QWORD PTR [rsp+128] $LN6@stbi__YCbC: - -; 3298 : } -; 3299 : } - +; Line 3299 00276 48 8b ac 24 90 00 00 00 mov rbp, QWORD PTR [rsp+144] 0027e 48 83 c4 60 add rsp, 96 ; 00000060H @@ -26720,98 +17396,66 @@ $LN6@stbi__YCbC: stbi__YCbCr_to_RGB_simd ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__setup_jpeg _TEXT SEGMENT j$ = 32 stbi__setup_jpeg PROC ; COMDAT - -; 3304 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3304 00000 40 53 push rbx 00002 48 83 ec 10 sub rsp, 16 - -; 3305 : j->idct_block_kernel = stbi__idct_block; - +; Line 3305 00006 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:stbi__idct_block 0000d 4c 8b c1 mov r8, rcx 00010 48 89 81 70 48 00 00 mov QWORD PTR [rcx+18544], rax - -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; - +; Line 3306 00017 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:stbi__YCbCr_to_RGB_row 0001e 48 89 81 78 48 00 00 mov QWORD PTR [rcx+18552], rax - -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; - +; Line 3307 00025 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:stbi__resample_row_hv_2 0002c 48 89 81 80 48 00 00 mov QWORD PTR [rcx+18560], rax - -; 187 : __cpuid(info, 1); - +; Line 187 00033 33 c9 xor ecx, ecx 00035 b8 01 00 00 00 mov eax, 1 0003a 0f a2 cpuid - -; 3308 : -; 3309 : #ifdef STBI_SSE2 -; 3310 : if (stbi__sse2_available()) { - +; Line 3310 0003c 0f ba e2 1a bt edx, 26 00040 73 2a jae SHORT $LN2@stbi__setu - -; 3311 : j->idct_block_kernel = stbi__idct_simd; - +; Line 3311 00042 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:stbi__idct_simd 00049 49 89 80 70 48 00 00 mov QWORD PTR [r8+18544], rax - -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - +; Line 3312 00050 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:stbi__YCbCr_to_RGB_simd 00057 49 89 80 78 48 00 00 mov QWORD PTR [r8+18552], rax - -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; - +; Line 3313 0005e 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:stbi__resample_row_hv_2_simd 00065 49 89 80 80 48 00 00 mov QWORD PTR [r8+18560], rax $LN2@stbi__setu: - -; 3314 : } -; 3315 : #endif -; 3316 : -; 3317 : #ifdef STBI_NEON -; 3318 : j->idct_block_kernel = stbi__idct_simd; -; 3319 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3320 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3321 : #endif -; 3322 : } - +; Line 3322 0006c 48 83 c4 10 add rsp, 16 00070 5b pop rbx 00071 c3 ret 0 stbi__setup_jpeg ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__cleanup_jpeg _TEXT SEGMENT j$ = 8 stbi__cleanup_jpeg PROC ; COMDAT - -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3327 00000 48 8b 11 mov rdx, QWORD PTR [rcx] 00003 45 33 c0 xor r8d, r8d 00006 8b 52 08 mov edx, DWORD PTR [rdx+8] @@ -26819,47 +17463,40 @@ stbi__cleanup_jpeg PROC ; COMDAT stbi__cleanup_jpeg ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__blinn_8x8 _TEXT SEGMENT x$ = 8 y$ = 16 stbi__blinn_8x8 PROC ; COMDAT - -; 3343 : unsigned int t = x * y + 128; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3343 00000 0f b6 c2 movzx eax, dl 00003 44 0f b6 c1 movzx r8d, cl 00007 44 0f af c0 imul r8d, eax 0000b 41 83 e8 80 sub r8d, -128 ; ffffffffffffff80H - -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - +; Line 3344 0000f 41 8b c0 mov eax, r8d 00012 c1 e8 08 shr eax, 8 00015 41 03 c0 add eax, r8d 00018 c1 e8 08 shr eax, 8 - -; 3345 : } - +; Line 3345 0001b c3 ret 0 stbi__blinn_8x8 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT load_jpeg_image _TEXT SEGMENT j$1$ = 48 output$2$ = 56 -tv3179 = 64 -tv3132 = 72 -coutput$4 = 80 +tv5072 = 64 +tv4953 = 72 +coutput$1 = 80 out$1$ = 112 z$GSCopy$1$ = 120 out_x$GSCopy$1$ = 128 out_y$GSCopy$1$ = 136 comp$GSCopy$1$ = 144 -res_comp$5 = 160 +res_comp$2 = 160 __$ArrayPad$ = 352 z$ = 448 out_x$ = 456 @@ -26867,1438 +17504,1195 @@ out_y$ = 464 comp$ = 472 req_comp$ = 480 load_jpeg_image PROC ; COMDAT - -; 3348 : { - - 00000 40 56 push rsi - 00002 41 55 push r13 - 00004 41 57 push r15 - 00006 48 81 ec a0 01 +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3348 + 00000 4c 8b dc mov r11, rsp + 00003 56 push rsi + 00004 41 55 push r13 + 00006 41 57 push r15 + 00008 48 81 ec a0 01 00 00 sub rsp, 416 ; 000001a0H - 0000d 48 8b 05 00 00 + 0000f 48 8b 05 00 00 00 00 mov rax, QWORD PTR __security_cookie - 00014 48 33 c4 xor rax, rsp - 00017 48 89 84 24 60 + 00016 48 33 c4 xor rax, rsp + 00019 48 89 84 24 60 01 00 00 mov QWORD PTR __$ArrayPad$[rsp], rax - -; 3349 : int n, decode_n, is_rgb; -; 3350 : z->s->img_n = 0; // make stbi__cleanup_jpeg safe - - 0001f 48 8b 01 mov rax, QWORD PTR [rcx] - 00022 45 33 ed xor r13d, r13d - -; 3351 : -; 3352 : // validate req_comp -; 3353 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); - - 00025 44 8b bc 24 e0 +; Line 3350 + 00021 48 8b 01 mov rax, QWORD PTR [rcx] + 00024 45 33 ed xor r13d, r13d +; Line 3353 + 00027 44 8b bc 24 e0 01 00 00 mov r15d, DWORD PTR req_comp$[rsp] - 0002d 48 8b f1 mov rsi, rcx - 00030 4c 89 8c 24 90 + 0002f 48 8b f1 mov rsi, rcx + 00032 4c 89 8c 24 90 00 00 00 mov QWORD PTR comp$GSCopy$1$[rsp], r9 - 00038 4c 89 84 24 88 + 0003a 4c 89 84 24 88 00 00 00 mov QWORD PTR out_y$GSCopy$1$[rsp], r8 - 00040 44 89 68 08 mov DWORD PTR [rax+8], r13d - 00044 48 89 94 24 80 + 00042 44 89 68 08 mov DWORD PTR [rax+8], r13d + 00046 48 89 94 24 80 00 00 00 mov QWORD PTR out_x$GSCopy$1$[rsp], rdx - 0004c 48 89 4c 24 78 mov QWORD PTR z$GSCopy$1$[rsp], rcx - 00051 41 83 ff 04 cmp r15d, 4 - 00055 0f 87 45 08 00 + 0004e 48 89 4c 24 78 mov QWORD PTR z$GSCopy$1$[rsp], rcx + 00053 41 83 ff 04 cmp r15d, 4 + 00057 0f 87 f5 09 00 00 ja $LN42@load_jpeg_ - -; 3354 : -; 3355 : // load a jpeg image from whichever source, but leave in YCbCr format -; 3356 : if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } - - 0005b e8 00 00 00 00 call stbi__decode_jpeg_image - 00060 85 c0 test eax, eax - 00062 75 18 jne SHORT $LN43@load_jpeg_ - -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); - - 00064 48 8b 16 mov rdx, QWORD PTR [rsi] - 00067 45 33 c0 xor r8d, r8d - 0006a 48 8b ce mov rcx, rsi - 0006d 8b 52 08 mov edx, DWORD PTR [rdx+8] - 00070 e8 00 00 00 00 call stbi__free_jpeg_components - -; 3354 : -; 3355 : // load a jpeg image from whichever source, but leave in YCbCr format -; 3356 : if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } - - 00075 33 c0 xor eax, eax - 00077 e9 cf 07 00 00 jmp $LN1@load_jpeg_ +; Line 3356 + 0005d 49 89 5b e0 mov QWORD PTR [r11-32], rbx + 00061 4d 89 63 c8 mov QWORD PTR [r11-56], r12 + 00065 e8 00 00 00 00 call stbi__decode_jpeg_image + 0006a 85 c0 test eax, eax + 0006c 75 67 jne SHORT $LN43@load_jpeg_ +; Line 2725 + 0006e 48 8b 06 mov rax, QWORD PTR [rsi] + 00071 48 63 58 08 movsxd rbx, DWORD PTR [rax+8] + 00075 48 85 db test rbx, rbx + 00078 0f 8e fa 01 00 + 00 jle $LN193@load_jpeg_ + 0007e 48 81 c6 d8 46 + 00 00 add rsi, 18136 ; 000046d8H +$LL184@load_jpeg_: +; Line 2726 + 00085 48 8b 0e mov rcx, QWORD PTR [rsi] + 00088 48 85 c9 test rcx, rcx + 0008b 74 0d je SHORT $LN185@load_jpeg_ +; Line 2727 + 0008d ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2728 + 00093 4c 89 2e mov QWORD PTR [rsi], r13 +; Line 2729 + 00096 4c 89 6e f8 mov QWORD PTR [rsi-8], r13 +$LN185@load_jpeg_: +; Line 2731 + 0009a 48 8b 4e 08 mov rcx, QWORD PTR [rsi+8] + 0009e 48 85 c9 test rcx, rcx + 000a1 74 0e je SHORT $LN186@load_jpeg_ +; Line 2732 + 000a3 ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2733 + 000a9 4c 89 6e 08 mov QWORD PTR [rsi+8], r13 +; Line 2734 + 000ad 4c 89 6e 18 mov QWORD PTR [rsi+24], r13 +$LN186@load_jpeg_: +; Line 2736 + 000b1 48 8b 4e 10 mov rcx, QWORD PTR [rsi+16] + 000b5 48 85 c9 test rcx, rcx + 000b8 74 0a je SHORT $LN182@load_jpeg_ +; Line 2737 + 000ba ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2738 + 000c0 4c 89 6e 10 mov QWORD PTR [rsi+16], r13 +$LN182@load_jpeg_: +; Line 2725 + 000c4 48 83 c6 60 add rsi, 96 ; 00000060H + 000c8 48 83 eb 01 sub rbx, 1 + 000cc 75 b7 jne SHORT $LL184@load_jpeg_ +; Line 3370 + 000ce 33 c0 xor eax, eax + 000d0 e9 c3 08 00 00 jmp $LN390@load_jpeg_ $LN43@load_jpeg_: - 0007c 4c 89 a4 24 80 - 01 00 00 mov QWORD PTR [rsp+384], r12 - -; 3357 : -; 3358 : // determine actual number of components to generate -; 3359 : n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; - - 00084 b9 03 00 00 00 mov ecx, 3 - 00089 44 8d 61 fe lea r12d, QWORD PTR [rcx-2] - 0008d 45 85 ff test r15d, r15d - 00090 75 15 jne SHORT $LN84@load_jpeg_ - 00092 48 8b 06 mov rax, QWORD PTR [rsi] - 00095 45 8b fc mov r15d, r12d - 00098 39 48 08 cmp DWORD PTR [rax+8], ecx - 0009b 44 0f 4d f9 cmovge r15d, ecx - 0009f 44 89 bc 24 e0 +; Line 3359 + 000d5 b9 03 00 00 00 mov ecx, 3 + 000da 44 8d 61 fe lea r12d, QWORD PTR [rcx-2] + 000de 45 85 ff test r15d, r15d + 000e1 75 15 jne SHORT $LN84@load_jpeg_ + 000e3 48 8b 06 mov rax, QWORD PTR [rsi] + 000e6 45 8b fc mov r15d, r12d + 000e9 39 48 08 cmp DWORD PTR [rax+8], ecx + 000ec 44 0f 4d f9 cmovge r15d, ecx + 000f0 44 89 bc 24 e0 01 00 00 mov DWORD PTR req_comp$[rsp], r15d $LN84@load_jpeg_: - -; 3360 : -; 3361 : is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); - - 000a7 48 8b 06 mov rax, QWORD PTR [rsi] - 000aa 8b 48 08 mov ecx, DWORD PTR [rax+8] - 000ad 83 f9 03 cmp ecx, 3 - 000b0 75 24 jne SHORT $LN87@load_jpeg_ - 000b2 39 8e 50 48 00 +; Line 3361 + 000f8 48 8b 06 mov rax, QWORD PTR [rsi] + 000fb 48 63 48 08 movsxd rcx, DWORD PTR [rax+8] + 000ff 83 f9 03 cmp ecx, 3 + 00102 75 24 jne SHORT $LN87@load_jpeg_ + 00104 39 8e 50 48 00 00 cmp DWORD PTR [rsi+18512], ecx - 000b8 74 12 je SHORT $LN86@load_jpeg_ - 000ba 44 39 ae 4c 48 + 0010a 74 12 je SHORT $LN86@load_jpeg_ + 0010c 44 39 ae 4c 48 00 00 cmp DWORD PTR [rsi+18508], r13d - 000c1 75 13 jne SHORT $LN87@load_jpeg_ - 000c3 44 39 ae 48 48 + 00113 75 13 jne SHORT $LN87@load_jpeg_ + 00115 44 39 ae 48 48 00 00 cmp DWORD PTR [rsi+18504], r13d - 000ca 75 0a jne SHORT $LN87@load_jpeg_ + 0011c 75 0a jne SHORT $LN87@load_jpeg_ $LN86@load_jpeg_: - 000cc 41 8b c4 mov eax, r12d - 000cf 4c 89 64 24 40 mov QWORD PTR tv3179[rsp], r12 - 000d4 eb 11 jmp SHORT $LN236@load_jpeg_ + 0011e 41 8b c4 mov eax, r12d + 00121 4c 89 64 24 40 mov QWORD PTR tv5072[rsp], r12 + 00126 eb 11 jmp SHORT $LN301@load_jpeg_ $LN87@load_jpeg_: - -; 3362 : -; 3363 : if (z->s->img_n == 3 && n < 3 && !is_rgb) - - 000d6 4c 89 6c 24 40 mov QWORD PTR tv3179[rsp], r13 - 000db 41 8b c5 mov eax, r13d - 000de 83 f9 03 cmp ecx, 3 - 000e1 0f 85 de 00 00 +; Line 3363 + 00128 4c 89 6c 24 40 mov QWORD PTR tv5072[rsp], r13 + 0012d 41 8b c5 mov eax, r13d + 00130 83 f9 03 cmp ecx, 3 + 00133 0f 85 e3 00 00 00 jne $LN44@load_jpeg_ -$LN236@load_jpeg_: - 000e7 41 83 ff 03 cmp r15d, 3 - 000eb 0f 8d d4 00 00 +$LN301@load_jpeg_: + 00139 41 83 ff 03 cmp r15d, 3 + 0013d 0f 8d d9 00 00 00 jge $LN44@load_jpeg_ - 000f1 85 c0 test eax, eax - 000f3 0f 85 cc 00 00 + 00143 85 c0 test eax, eax + 00145 0f 85 d1 00 00 00 jne $LN44@load_jpeg_ - -; 3364 : decode_n = 1; - - 000f9 41 8b cc mov ecx, r12d +; Line 3364 + 0014b 41 8b cc mov ecx, r12d $LN46@load_jpeg_: - 000fc 48 89 9c 24 98 - 01 00 00 mov QWORD PTR [rsp+408], rbx - 00104 0f 57 c0 xorps xmm0, xmm0 - 00107 48 89 ac 24 90 + 0014e 48 89 ac 24 90 01 00 00 mov QWORD PTR [rsp+400], rbp - 0010f 0f 57 c9 xorps xmm1, xmm1 - 00112 48 89 bc 24 88 + 00156 0f 57 c0 xorps xmm0, xmm0 + 00159 48 89 bc 24 88 01 00 00 mov QWORD PTR [rsp+392], rdi - 0011a 4c 89 b4 24 78 + 00161 0f 57 c9 xorps xmm1, xmm1 + 00164 4c 89 b4 24 78 01 00 00 mov QWORD PTR [rsp+376], r14 - -; 3371 : -; 3372 : // resample and color-convert -; 3373 : { -; 3374 : int k; -; 3375 : unsigned int i, j; -; 3376 : stbi_uc* output; -; 3377 : stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL }; -; 3378 : -; 3379 : stbi__resample res_comp[4]; -; 3380 : -; 3381 : for (k = 0; k < decode_n; ++k) { - - 00122 44 8b f1 mov r14d, ecx - 00125 4c 89 74 24 48 mov QWORD PTR tv3132[rsp], r14 - 0012a f3 0f 7f 44 24 - 50 movdqu XMMWORD PTR coutput$4[rsp], xmm0 - 00130 f3 0f 7f 4c 24 - 60 movdqu XMMWORD PTR coutput$4[rsp+16], xmm1 - 00136 85 c9 test ecx, ecx - 00138 0f 84 f4 00 00 +; Line 3381 + 0016c 44 8b f1 mov r14d, ecx + 0016f 4c 89 74 24 48 mov QWORD PTR tv4953[rsp], r14 + 00174 f3 0f 7f 44 24 + 50 movdqu XMMWORD PTR coutput$1[rsp], xmm0 + 0017a f3 0f 7f 4c 24 + 60 movdqu XMMWORD PTR coutput$1[rsp+16], xmm1 + 00180 85 c9 test ecx, ecx + 00182 0f 84 48 01 00 00 je $LN3@load_jpeg_ - 0013e 49 8b ed mov rbp, r13 - 00141 48 8d 9c 24 bc - 00 00 00 lea rbx, QWORD PTR res_comp$5[rsp+28] - 00149 48 8d be a4 46 + 00188 49 8b ed mov rbp, r13 + 0018b 48 8d 9c 24 bc + 00 00 00 lea rbx, QWORD PTR res_comp$2[rsp+28] + 00193 48 8d be a4 46 00 00 lea rdi, QWORD PTR [rsi+18084] + 0019a 66 0f 1f 44 00 + 00 npad 6 $LL4@load_jpeg_: - -; 3382 : stbi__resample* r = &res_comp[k]; -; 3383 : -; 3384 : // allocate line buffer big enough for upsampling off the edges -; 3385 : // with upsample factor of 4 -; 3386 : z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3); - - 00150 48 8b 06 mov rax, QWORD PTR [rsi] - 00153 8b 08 mov ecx, DWORD PTR [rax] - 00155 83 c1 03 add ecx, 3 - -; 438 : return STBI_MALLOC(size); - - 00158 ff 15 00 00 00 +; Line 3386 + 001a0 48 8b 06 mov rax, QWORD PTR [rsi] + 001a3 8b 08 mov ecx, DWORD PTR [rax] + 001a5 83 c1 03 add ecx, 3 +; Line 438 + 001a8 ff 15 00 00 00 00 call QWORD PTR __imp_malloc - -; 3382 : stbi__resample* r = &res_comp[k]; -; 3383 : -; 3384 : // allocate line buffer big enough for upsampling off the edges -; 3385 : // with upsample factor of 4 -; 3386 : z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3); - - 0015e 48 89 47 44 mov QWORD PTR [rdi+68], rax - -; 3387 : if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } - - 00162 48 85 c0 test rax, rax - 00165 0f 84 fd 06 00 - 00 je $LN241@load_jpeg_ - -; 3388 : -; 3389 : r->hs = z->img_h_max / z->img_comp[k].h; - - 0016b 8b 86 88 46 00 +; Line 3386 + 001ae 48 89 47 44 mov QWORD PTR [rdi+68], rax +; Line 3387 + 001b2 48 85 c0 test rax, rax + 001b5 0f 84 32 02 00 + 00 je $LN217@load_jpeg_ +; Line 3389 + 001bb 8b 86 88 46 00 00 mov eax, DWORD PTR [rsi+18056] - 00171 99 cdq - -; 3390 : r->vs = z->img_v_max / z->img_comp[k].v; -; 3391 : r->ystep = r->vs >> 1; -; 3392 : r->w_lores = (z->s->img_x + r->hs - 1) / r->hs; -; 3393 : r->ypos = 0; - - 00172 44 89 6b 0c mov DWORD PTR [rbx+12], r13d - 00176 f7 3f idiv DWORD PTR [rdi] - 00178 44 8b c8 mov r9d, eax - 0017b 89 43 fc mov DWORD PTR [rbx-4], eax - 0017e 8b 86 8c 46 00 + 001c1 99 cdq +; Line 3393 + 001c2 44 89 6b 0c mov DWORD PTR [rbx+12], r13d + 001c6 f7 3f idiv DWORD PTR [rdi] + 001c8 44 8b c8 mov r9d, eax + 001cb 89 43 fc mov DWORD PTR [rbx-4], eax + 001ce 8b 86 8c 46 00 00 mov eax, DWORD PTR [rsi+18060] - 00184 99 cdq - 00185 f7 7f 04 idiv DWORD PTR [rdi+4] - 00188 33 d2 xor edx, edx - 0018a 8b c8 mov ecx, eax - 0018c 89 03 mov DWORD PTR [rbx], eax - 0018e d1 f9 sar ecx, 1 - 00190 44 8b c0 mov r8d, eax - 00193 89 4b 08 mov DWORD PTR [rbx+8], ecx - 00196 48 8b 0e mov rcx, QWORD PTR [rsi] - 00199 8b 01 mov eax, DWORD PTR [rcx] - -; 3394 : r->line0 = r->line1 = z->img_comp[k].data; - - 0019b 48 8b 4f 2c mov rcx, QWORD PTR [rdi+44] - 0019f ff c8 dec eax - 001a1 41 03 c1 add eax, r9d - 001a4 48 89 4b f4 mov QWORD PTR [rbx-12], rcx - 001a8 41 f7 f1 div r9d - 001ab 48 89 4b ec mov QWORD PTR [rbx-20], rcx - 001af 89 43 04 mov DWORD PTR [rbx+4], eax - -; 3395 : -; 3396 : if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; - - 001b2 45 3b cc cmp r9d, r12d - 001b5 75 39 jne SHORT $LN218@load_jpeg_ - 001b7 45 3b c4 cmp r8d, r12d - 001ba 75 25 jne SHORT $LN217@load_jpeg_ - 001bc 48 8d 05 00 00 + 001d4 99 cdq + 001d5 f7 7f 04 idiv DWORD PTR [rdi+4] + 001d8 33 d2 xor edx, edx + 001da 8b c8 mov ecx, eax + 001dc 89 03 mov DWORD PTR [rbx], eax + 001de d1 f9 sar ecx, 1 + 001e0 44 8b c0 mov r8d, eax + 001e3 89 4b 08 mov DWORD PTR [rbx+8], ecx + 001e6 48 8b 0e mov rcx, QWORD PTR [rsi] + 001e9 8b 01 mov eax, DWORD PTR [rcx] +; Line 3394 + 001eb 48 8b 4f 2c mov rcx, QWORD PTR [rdi+44] + 001ef ff c8 dec eax + 001f1 41 03 c1 add eax, r9d + 001f4 48 89 4b f4 mov QWORD PTR [rbx-12], rcx + 001f8 41 f7 f1 div r9d + 001fb 48 89 4b ec mov QWORD PTR [rbx-20], rcx + 001ff 89 43 04 mov DWORD PTR [rbx+4], eax +; Line 3396 + 00202 45 3b cc cmp r9d, r12d + 00205 0f 85 83 00 00 + 00 jne $LN278@load_jpeg_ + 0020b 45 3b c4 cmp r8d, r12d + 0020e 75 6f jne SHORT $LN277@load_jpeg_ + 00210 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:resample_row_1 - 001c3 eb 55 jmp SHORT $LN2@load_jpeg_ + 00217 e9 9c 00 00 00 jmp $LN2@load_jpeg_ $LN44@load_jpeg_: - -; 3365 : else -; 3366 : decode_n = z->s->img_n; -; 3367 : -; 3368 : // nothing to do if no components requested; check this now to avoid -; 3369 : // accessing uninitialized coutput[0] later -; 3370 : if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } - - 001c5 85 c9 test ecx, ecx - 001c7 0f 8f 2f ff ff +; Line 3370 + 0021c 85 c9 test ecx, ecx + 0021e 0f 8f 2a ff ff ff jg $LN46@load_jpeg_ - -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); - - 001cd 8b d1 mov edx, ecx - 001cf 45 33 c0 xor r8d, r8d - 001d2 48 8b ce mov rcx, rsi - 001d5 e8 00 00 00 00 call stbi__free_jpeg_components - -; 3365 : else -; 3366 : decode_n = z->s->img_n; -; 3367 : -; 3368 : // nothing to do if no components requested; check this now to avoid -; 3369 : // accessing uninitialized coutput[0] later -; 3370 : if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } - - 001da 33 c0 xor eax, eax - 001dc e9 62 06 00 00 jmp $LN301@load_jpeg_ -$LN217@load_jpeg_: - -; 3397 : else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; - - 001e1 41 83 f8 02 cmp r8d, 2 - 001e5 75 2c jne SHORT $LN54@load_jpeg_ - 001e7 48 8d 05 00 00 +; Line 2725 + 00224 48 8b d9 mov rbx, rcx +; Line 3370 + 00227 33 c0 xor eax, eax + 00229 e9 6a 07 00 00 jmp $LN390@load_jpeg_ + 0022e 66 90 npad 2 +$LL194@load_jpeg_: +; Line 2726 + 00230 48 8b 0e mov rcx, QWORD PTR [rsi] + 00233 48 85 c9 test rcx, rcx + 00236 74 0d je SHORT $LN195@load_jpeg_ +; Line 2727 + 00238 ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2728 + 0023e 4c 89 2e mov QWORD PTR [rsi], r13 +; Line 2729 + 00241 4c 89 6e f8 mov QWORD PTR [rsi-8], r13 +$LN195@load_jpeg_: +; Line 2731 + 00245 48 8b 4e 08 mov rcx, QWORD PTR [rsi+8] + 00249 48 85 c9 test rcx, rcx + 0024c 74 0e je SHORT $LN196@load_jpeg_ +; Line 2732 + 0024e ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2733 + 00254 4c 89 6e 08 mov QWORD PTR [rsi+8], r13 +; Line 2734 + 00258 4c 89 6e 18 mov QWORD PTR [rsi+24], r13 +$LN196@load_jpeg_: +; Line 2736 + 0025c 48 8b 4e 10 mov rcx, QWORD PTR [rsi+16] + 00260 48 85 c9 test rcx, rcx + 00263 74 0a je SHORT $LN192@load_jpeg_ +; Line 2737 + 00265 ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2738 + 0026b 4c 89 6e 10 mov QWORD PTR [rsi+16], r13 +$LN192@load_jpeg_: +; Line 2725 + 0026f 48 83 c6 60 add rsi, 96 ; 00000060H + 00273 49 2b dc sub rbx, r12 + 00276 75 b8 jne SHORT $LL194@load_jpeg_ +$LN193@load_jpeg_: +; Line 3370 + 00278 33 c0 xor eax, eax + 0027a e9 19 07 00 00 jmp $LN390@load_jpeg_ +$LN277@load_jpeg_: +; Line 3397 + 0027f 41 83 f8 02 cmp r8d, 2 + 00283 75 2c jne SHORT $LN54@load_jpeg_ + 00285 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:stbi__resample_row_v_2 - 001ee eb 2a jmp SHORT $LN2@load_jpeg_ -$LN218@load_jpeg_: - -; 3398 : else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; - - 001f0 41 83 f9 02 cmp r9d, 2 - 001f4 75 1d jne SHORT $LN54@load_jpeg_ - 001f6 45 3b c4 cmp r8d, r12d - 001f9 75 09 jne SHORT $LN219@load_jpeg_ - 001fb 48 8d 05 00 00 + 0028c eb 2a jmp SHORT $LN2@load_jpeg_ +$LN278@load_jpeg_: +; Line 3398 + 0028e 41 83 f9 02 cmp r9d, 2 + 00292 75 1d jne SHORT $LN54@load_jpeg_ + 00294 45 3b c4 cmp r8d, r12d + 00297 75 09 jne SHORT $LN279@load_jpeg_ + 00299 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:stbi__resample_row_h_2 - 00202 eb 16 jmp SHORT $LN2@load_jpeg_ -$LN219@load_jpeg_: - -; 3399 : else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; - - 00204 41 83 f8 02 cmp r8d, 2 - 00208 75 09 jne SHORT $LN54@load_jpeg_ - 0020a 48 8b 86 80 48 + 002a0 eb 16 jmp SHORT $LN2@load_jpeg_ +$LN279@load_jpeg_: +; Line 3399 + 002a2 41 83 f8 02 cmp r8d, 2 + 002a6 75 09 jne SHORT $LN54@load_jpeg_ + 002a8 48 8b 86 80 48 00 00 mov rax, QWORD PTR [rsi+18560] - 00211 eb 07 jmp SHORT $LN2@load_jpeg_ + 002af eb 07 jmp SHORT $LN2@load_jpeg_ $LN54@load_jpeg_: - -; 3400 : else r->resample = stbi__resample_row_generic; - - 00213 48 8d 05 00 00 +; Line 3400 + 002b1 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:stbi__resample_row_generic $LN2@load_jpeg_: - -; 3371 : -; 3372 : // resample and color-convert -; 3373 : { -; 3374 : int k; -; 3375 : unsigned int i, j; -; 3376 : stbi_uc* output; -; 3377 : stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL }; -; 3378 : -; 3379 : stbi__resample res_comp[4]; -; 3380 : -; 3381 : for (k = 0; k < decode_n; ++k) { - - 0021a 48 89 43 e4 mov QWORD PTR [rbx-28], rax - 0021e 48 ff c5 inc rbp - 00221 48 83 c3 30 add rbx, 48 ; 00000030H - 00225 48 83 c7 60 add rdi, 96 ; 00000060H - 00229 49 3b ee cmp rbp, r14 - 0022c 0f 8c 1e ff ff +; Line 3381 + 002b8 48 89 43 e4 mov QWORD PTR [rbx-28], rax + 002bc 48 ff c5 inc rbp + 002bf 48 83 c3 30 add rbx, 48 ; 00000030H + 002c3 48 83 c7 60 add rdi, 96 ; 00000060H + 002c7 49 3b ee cmp rbp, r14 + 002ca 0f 8c d0 fe ff ff jl $LL4@load_jpeg_ $LN3@load_jpeg_: - -; 3401 : } -; 3402 : -; 3403 : // can't error after this so, this is safe -; 3404 : output = (stbi_uc*)stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); - - 00232 48 8b 06 mov rax, QWORD PTR [rsi] - 00235 44 8b 40 04 mov r8d, DWORD PTR [rax+4] - 00239 8b 08 mov ecx, DWORD PTR [rax] - -; 467 : if (a < 0 || b < 0) return 0; - - 0023b 45 85 ff test r15d, r15d - 0023e 0f 88 24 06 00 - 00 js $LN241@load_jpeg_ - 00244 85 c9 test ecx, ecx - 00246 0f 88 1c 06 00 - 00 js $LN241@load_jpeg_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 0024c 74 11 je SHORT $LN243@load_jpeg_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 0024e b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00253 99 cdq - 00254 f7 f9 idiv ecx - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00256 44 3b f8 cmp r15d, eax - 00259 0f 8f 09 06 00 - 00 jg $LN241@load_jpeg_ -$LN243@load_jpeg_: - 0025f 44 8b c9 mov r9d, ecx - 00262 45 0f af cf imul r9d, r15d - -; 467 : if (a < 0 || b < 0) return 0; - - 00266 45 85 c9 test r9d, r9d - 00269 0f 88 f9 05 00 - 00 js $LN241@load_jpeg_ - 0026f 45 85 c0 test r8d, r8d - 00272 0f 88 f0 05 00 - 00 js $LN241@load_jpeg_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 00278 74 12 je SHORT $LN242@load_jpeg_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 0027a b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 0027f 99 cdq - 00280 41 f7 f8 idiv r8d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00283 44 3b c8 cmp r9d, eax - 00286 0f 8f dc 05 00 - 00 jg $LN241@load_jpeg_ -$LN242@load_jpeg_: - 0028c 8b c1 mov eax, ecx - 0028e 41 0f af c0 imul eax, r8d - 00292 41 0f af c7 imul eax, r15d - -; 460 : return a <= INT_MAX - b; - - 00296 3d fe ff ff 7f cmp eax, 2147483646 ; 7ffffffeH - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 0029b 0f 8f c7 05 00 - 00 jg $LN241@load_jpeg_ - -; 509 : return stbi__malloc(a * b * c + add); - - 002a1 41 0f af c8 imul ecx, r8d - 002a5 41 0f af cf imul ecx, r15d - 002a9 ff c1 inc ecx - 002ab 48 63 c9 movsxd rcx, ecx - -; 438 : return STBI_MALLOC(size); - - 002ae ff 15 00 00 00 +; Line 3404 + 002d0 48 8b 06 mov rax, QWORD PTR [rsi] + 002d3 44 8b 40 04 mov r8d, DWORD PTR [rax+4] + 002d7 8b 08 mov ecx, DWORD PTR [rax] +; Line 467 + 002d9 45 85 ff test r15d, r15d + 002dc 0f 88 e3 06 00 + 00 js $LN306@load_jpeg_ + 002e2 85 c9 test ecx, ecx + 002e4 0f 88 db 06 00 + 00 js $LN306@load_jpeg_ +; Line 468 + 002ea 74 11 je SHORT $LN308@load_jpeg_ +; Line 470 + 002ec b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 002f1 99 cdq + 002f2 f7 f9 idiv ecx +; Line 484 + 002f4 44 3b f8 cmp r15d, eax + 002f7 0f 8f c8 06 00 + 00 jg $LN306@load_jpeg_ +$LN308@load_jpeg_: + 002fd 44 8b c9 mov r9d, ecx + 00300 45 0f af cf imul r9d, r15d +; Line 467 + 00304 45 85 c9 test r9d, r9d + 00307 0f 88 b8 06 00 + 00 js $LN306@load_jpeg_ + 0030d 45 85 c0 test r8d, r8d + 00310 0f 88 af 06 00 + 00 js $LN306@load_jpeg_ +; Line 468 + 00316 74 12 je SHORT $LN307@load_jpeg_ +; Line 470 + 00318 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 0031d 99 cdq + 0031e 41 f7 f8 idiv r8d +; Line 484 + 00321 44 3b c8 cmp r9d, eax + 00324 0f 8f 9b 06 00 + 00 jg $LN306@load_jpeg_ +$LN307@load_jpeg_: + 0032a 8b c1 mov eax, ecx + 0032c 41 0f af c0 imul eax, r8d + 00330 41 0f af c7 imul eax, r15d +; Line 460 + 00334 3d fe ff ff 7f cmp eax, 2147483646 ; 7ffffffeH +; Line 484 + 00339 0f 8f 86 06 00 + 00 jg $LN306@load_jpeg_ +; Line 509 + 0033f 41 0f af c8 imul ecx, r8d + 00343 41 0f af cf imul ecx, r15d + 00347 ff c1 inc ecx + 00349 48 63 c9 movsxd rcx, ecx +; Line 438 + 0034c ff 15 00 00 00 00 call QWORD PTR __imp_malloc - -; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } - - 002b4 48 8b 16 mov rdx, QWORD PTR [rsi] - -; 438 : return STBI_MALLOC(size); - - 002b7 4c 8b e8 mov r13, rax - -; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } - - 002ba 48 85 c0 test rax, rax - 002bd 0f 84 a8 05 00 - 00 je $LN240@load_jpeg_ - -; 3406 : -; 3407 : // now go ahead and resample -; 3408 : for (j = 0; j < z->s->img_y; ++j) { - - 002c3 33 c0 xor eax, eax - 002c5 89 44 24 30 mov DWORD PTR j$1$[rsp], eax - 002c9 39 42 04 cmp DWORD PTR [rdx+4], eax - 002cc 0f 86 01 05 00 +; Line 3405 + 00352 48 8b 0e mov rcx, QWORD PTR [rsi] +; Line 438 + 00355 4c 8b e8 mov r13, rax +; Line 3405 + 00358 48 85 c0 test rax, rax + 0035b 0f 84 69 06 00 + 00 je $LN309@load_jpeg_ +; Line 3408 + 00361 33 c0 xor eax, eax + 00363 89 44 24 30 mov DWORD PTR j$1$[rsp], eax + 00367 39 41 04 cmp DWORD PTR [rcx+4], eax + 0036a 0f 86 73 05 00 00 jbe $LN6@load_jpeg_ - -; 3427 : if (is_rgb) { - - 002d2 4c 8b 64 24 68 mov r12, QWORD PTR coutput$4[rsp+24] - 002d7 48 8b 6c 24 60 mov rbp, QWORD PTR coutput$4[rsp+16] - 002dc 4c 8b 74 24 58 mov r14, QWORD PTR coutput$4[rsp+8] - 002e1 48 8b 7c 24 50 mov rdi, QWORD PTR coutput$4[rsp] - 002e6 4c 89 6c 24 38 mov QWORD PTR output$2$[rsp], r13 - 002eb 0f 1f 44 00 00 npad 5 +; Line 3427 + 00370 4c 8b 64 24 68 mov r12, QWORD PTR coutput$1[rsp+24] + 00375 48 8b 6c 24 60 mov rbp, QWORD PTR coutput$1[rsp+16] + 0037a 4c 8b 74 24 58 mov r14, QWORD PTR coutput$1[rsp+8] + 0037f 48 8b 7c 24 50 mov rdi, QWORD PTR coutput$1[rsp] + 00384 4c 89 6c 24 38 mov QWORD PTR output$2$[rsp], r13 + 00389 0f 1f 80 00 00 + 00 00 npad 7 $LL7@load_jpeg_: - -; 3409 : stbi_uc* out = output + n * z->s->img_x * j; - - 002f0 0f af 02 imul eax, DWORD PTR [rdx] - 002f3 41 0f af c7 imul eax, r15d - 002f7 45 33 ff xor r15d, r15d - 002fa 8b d8 mov ebx, eax - 002fc 49 03 dd add rbx, r13 - 002ff 48 89 5c 24 70 mov QWORD PTR out$1$[rsp], rbx - -; 3410 : for (k = 0; k < decode_n; ++k) { - - 00304 4c 39 7c 24 48 cmp QWORD PTR tv3132[rsp], r15 - 00309 0f 86 c4 00 00 +; Line 3409 + 00390 0f af 01 imul eax, DWORD PTR [rcx] + 00393 41 0f af c7 imul eax, r15d + 00397 45 33 ff xor r15d, r15d + 0039a 8b d8 mov ebx, eax + 0039c 49 03 dd add rbx, r13 + 0039f 48 89 5c 24 70 mov QWORD PTR out$1$[rsp], rbx +; Line 3410 + 003a4 4c 39 7c 24 48 cmp QWORD PTR tv4953[rsp], r15 + 003a9 0f 86 2c 01 00 00 jbe $LN9@load_jpeg_ - -; 3409 : stbi_uc* out = output + n * z->s->img_x * j; - - 0030f 48 8b 5c 24 48 mov rbx, QWORD PTR tv3132[rsp] - 00314 48 8d ae c0 46 +; Line 3409 + 003af 48 8b 5c 24 48 mov rbx, QWORD PTR tv4953[rsp] + 003b4 48 8d ae c0 46 00 00 lea rbp, QWORD PTR [rsi+18112] - 0031b 48 8b 74 24 38 mov rsi, QWORD PTR output$2$[rsp] - 00320 48 8d bc 24 c4 - 00 00 00 lea rdi, QWORD PTR res_comp$5[rsp+36] - 00328 0f 1f 84 00 00 + 003bb 48 8b 74 24 38 mov rsi, QWORD PTR output$2$[rsp] + 003c0 48 8d bc 24 c4 + 00 00 00 lea rdi, QWORD PTR res_comp$2[rsp+36] + 003c8 0f 1f 84 00 00 00 00 00 npad 8 $LL10@load_jpeg_: - -; 3411 : stbi__resample* r = &res_comp[k]; -; 3412 : int y_bot = r->ystep >= (r->vs >> 1); - - 00330 8b 47 f8 mov eax, DWORD PTR [rdi-8] - 00333 4c 8d 77 ec lea r14, QWORD PTR [rdi-20] - 00337 d1 f8 sar eax, 1 - 00339 4c 8d 67 e4 lea r12, QWORD PTR [rdi-28] - -; 3413 : coutput[k] = r->resample(z->img_comp[k].linebuf, - - 0033d 4d 8b ee mov r13, r14 - 00340 39 07 cmp DWORD PTR [rdi], eax - 00342 7c 09 jl SHORT $LN89@load_jpeg_ - 00344 4d 8b 04 24 mov r8, QWORD PTR [r12] - 00348 49 8b d6 mov rdx, r14 - 0034b eb 06 jmp SHORT $LN92@load_jpeg_ +; Line 3412 + 003d0 8b 47 f8 mov eax, DWORD PTR [rdi-8] + 003d3 4c 8d 77 ec lea r14, QWORD PTR [rdi-20] + 003d7 d1 f8 sar eax, 1 + 003d9 4c 8d 67 e4 lea r12, QWORD PTR [rdi-28] +; Line 3413 + 003dd 4d 8b ee mov r13, r14 + 003e0 39 07 cmp DWORD PTR [rdi], eax + 003e2 7c 6d jl SHORT $LN89@load_jpeg_ + 003e4 4d 8b 04 24 mov r8, QWORD PTR [r12] + 003e8 49 8b d6 mov rdx, r14 + 003eb eb 6a jmp SHORT $LN92@load_jpeg_ +$LN217@load_jpeg_: +; Line 2725 + 003ed 48 8b 06 mov rax, QWORD PTR [rsi] + 003f0 48 63 58 08 movsxd rbx, DWORD PTR [rax+8] + 003f4 48 85 db test rbx, rbx + 003f7 0f 8e 2b 06 00 + 00 jle $LN171@load_jpeg_ + 003fd 48 81 c6 d8 46 + 00 00 add rsi, 18136 ; 000046d8H +$LL160@load_jpeg_: +; Line 2726 + 00404 48 8b 0e mov rcx, QWORD PTR [rsi] + 00407 48 85 c9 test rcx, rcx + 0040a 74 0d je SHORT $LN161@load_jpeg_ +; Line 2727 + 0040c ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2728 + 00412 4c 89 2e mov QWORD PTR [rsi], r13 +; Line 2729 + 00415 4c 89 6e f8 mov QWORD PTR [rsi-8], r13 +$LN161@load_jpeg_: +; Line 2731 + 00419 48 8b 4e 08 mov rcx, QWORD PTR [rsi+8] + 0041d 48 85 c9 test rcx, rcx + 00420 74 0e je SHORT $LN162@load_jpeg_ +; Line 2732 + 00422 ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2733 + 00428 4c 89 6e 08 mov QWORD PTR [rsi+8], r13 +; Line 2734 + 0042c 4c 89 6e 18 mov QWORD PTR [rsi+24], r13 +$LN162@load_jpeg_: +; Line 2736 + 00430 48 8b 4e 10 mov rcx, QWORD PTR [rsi+16] + 00434 48 85 c9 test rcx, rcx + 00437 74 0a je SHORT $LN158@load_jpeg_ +; Line 2737 + 00439 ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2738 + 0043f 4c 89 6e 10 mov QWORD PTR [rsi+16], r13 +$LN158@load_jpeg_: +; Line 2725 + 00443 48 83 c6 60 add rsi, 96 ; 00000060H + 00447 49 2b dc sub rbx, r12 + 0044a 75 b8 jne SHORT $LL160@load_jpeg_ +; Line 3387 + 0044c e9 d7 05 00 00 jmp $LN171@load_jpeg_ $LN89@load_jpeg_: - 0034d 4d 8b 06 mov r8, QWORD PTR [r14] - 00350 49 8b d4 mov rdx, r12 +; Line 3413 + 00451 4d 8b 06 mov r8, QWORD PTR [r14] + 00454 49 8b d4 mov rdx, r12 $LN92@load_jpeg_: - 00353 8b 47 f4 mov eax, DWORD PTR [rdi-12] - 00356 44 8b 4f fc mov r9d, DWORD PTR [rdi-4] - 0035a 48 8b 12 mov rdx, QWORD PTR [rdx] - 0035d 48 8b 4d 28 mov rcx, QWORD PTR [rbp+40] - 00361 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00365 ff 57 dc call QWORD PTR [rdi-36] - 00368 4a 89 44 fc 50 mov QWORD PTR coutput$4[rsp+r15*8], rax - -; 3414 : y_bot ? r->line1 : r->line0, -; 3415 : y_bot ? r->line0 : r->line1, -; 3416 : r->w_lores, r->hs); -; 3417 : if (++r->ystep >= r->vs) { - - 0036d 8b 07 mov eax, DWORD PTR [rdi] - 0036f ff c0 inc eax - 00371 89 07 mov DWORD PTR [rdi], eax - 00373 3b 47 f8 cmp eax, DWORD PTR [rdi-8] - 00376 7c 23 jl SHORT $LN8@load_jpeg_ - -; 3418 : r->ystep = 0; -; 3419 : r->line0 = r->line1; -; 3420 : if (++r->ypos < z->img_comp[k].y) - - 00378 ff 47 04 inc DWORD PTR [rdi+4] - 0037b 8b 47 04 mov eax, DWORD PTR [rdi+4] - 0037e 49 8b 4d 00 mov rcx, QWORD PTR [r13] - 00382 c7 07 00 00 00 + 00457 8b 47 f4 mov eax, DWORD PTR [rdi-12] + 0045a 44 8b 4f fc mov r9d, DWORD PTR [rdi-4] + 0045e 48 8b 12 mov rdx, QWORD PTR [rdx] + 00461 48 8b 4d 28 mov rcx, QWORD PTR [rbp+40] + 00465 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00469 ff 57 dc call QWORD PTR [rdi-36] + 0046c 4a 89 44 fc 50 mov QWORD PTR coutput$1[rsp+r15*8], rax +; Line 3417 + 00471 8b 07 mov eax, DWORD PTR [rdi] + 00473 ff c0 inc eax + 00475 89 07 mov DWORD PTR [rdi], eax + 00477 3b 47 f8 cmp eax, DWORD PTR [rdi-8] + 0047a 7c 23 jl SHORT $LN8@load_jpeg_ +; Line 3420 + 0047c ff 47 04 inc DWORD PTR [rdi+4] + 0047f 8b 47 04 mov eax, DWORD PTR [rdi+4] + 00482 49 8b 4d 00 mov rcx, QWORD PTR [r13] + 00486 c7 07 00 00 00 00 mov DWORD PTR [rdi], 0 - 00388 49 89 0c 24 mov QWORD PTR [r12], rcx - 0038c 3b 45 00 cmp eax, DWORD PTR [rbp] - 0038f 7d 0a jge SHORT $LN8@load_jpeg_ - -; 3421 : r->line1 += z->img_comp[k].w2; - - 00391 48 63 45 04 movsxd rax, DWORD PTR [rbp+4] - 00395 48 03 c1 add rax, rcx - 00398 49 89 06 mov QWORD PTR [r14], rax + 0048c 49 89 0c 24 mov QWORD PTR [r12], rcx + 00490 3b 45 00 cmp eax, DWORD PTR [rbp] + 00493 7d 0a jge SHORT $LN8@load_jpeg_ +; Line 3421 + 00495 48 63 45 04 movsxd rax, DWORD PTR [rbp+4] + 00499 48 03 c1 add rax, rcx + 0049c 49 89 06 mov QWORD PTR [r14], rax $LN8@load_jpeg_: - -; 3410 : for (k = 0; k < decode_n; ++k) { - - 0039b 49 ff c7 inc r15 - 0039e 48 83 c7 30 add rdi, 48 ; 00000030H - 003a2 48 83 c5 60 add rbp, 96 ; 00000060H - 003a6 4c 3b fb cmp r15, rbx - 003a9 7c 85 jl SHORT $LL10@load_jpeg_ - 003ab 4c 8b 64 24 68 mov r12, QWORD PTR coutput$4[rsp+24] - 003b0 48 8b 6c 24 60 mov rbp, QWORD PTR coutput$4[rsp+16] - 003b5 4c 8b 74 24 58 mov r14, QWORD PTR coutput$4[rsp+8] - 003ba 48 8b 7c 24 50 mov rdi, QWORD PTR coutput$4[rsp] - 003bf 48 8b 5c 24 70 mov rbx, QWORD PTR out$1$[rsp] - 003c4 48 89 74 24 38 mov QWORD PTR output$2$[rsp], rsi - 003c9 4c 8b 6c 24 38 mov r13, QWORD PTR output$2$[rsp] - 003ce 48 8b 74 24 78 mov rsi, QWORD PTR z$GSCopy$1$[rsp] +; Line 3410 + 0049f 49 ff c7 inc r15 + 004a2 48 83 c7 30 add rdi, 48 ; 00000030H + 004a6 48 83 c5 60 add rbp, 96 ; 00000060H + 004aa 4c 3b fb cmp r15, rbx + 004ad 0f 8c 1d ff ff + ff jl $LL10@load_jpeg_ + 004b3 4c 8b 64 24 68 mov r12, QWORD PTR coutput$1[rsp+24] + 004b8 48 8b 6c 24 60 mov rbp, QWORD PTR coutput$1[rsp+16] + 004bd 4c 8b 74 24 58 mov r14, QWORD PTR coutput$1[rsp+8] + 004c2 48 8b 7c 24 50 mov rdi, QWORD PTR coutput$1[rsp] + 004c7 48 8b 5c 24 70 mov rbx, QWORD PTR out$1$[rsp] + 004cc 48 89 74 24 38 mov QWORD PTR output$2$[rsp], rsi + 004d1 4c 8b 6c 24 38 mov r13, QWORD PTR output$2$[rsp] + 004d6 48 8b 74 24 78 mov rsi, QWORD PTR z$GSCopy$1$[rsp] $LN9@load_jpeg_: - -; 3422 : } -; 3423 : } -; 3424 : if (n >= 3) { - - 003d3 4c 63 bc 24 e0 +; Line 3424 + 004db 4c 63 bc 24 e0 01 00 00 movsxd r15, DWORD PTR req_comp$[rsp] - 003db 48 8b 06 mov rax, QWORD PTR [rsi] - 003de 41 83 ff 03 cmp r15d, 3 - 003e2 0f 8c c9 01 00 + 004e3 48 8b 06 mov rax, QWORD PTR [rsi] + 004e6 41 83 ff 03 cmp r15d, 3 + 004ea 0f 8c d1 01 00 00 jl $LN59@load_jpeg_ - -; 3425 : stbi_uc* y = coutput[0]; -; 3426 : if (z->s->img_n == 3) { - - 003e8 8b 48 08 mov ecx, DWORD PTR [rax+8] - 003eb 83 f9 03 cmp ecx, 3 - 003ee 75 5e jne SHORT $LN61@load_jpeg_ - -; 3427 : if (is_rgb) { - - 003f0 48 83 7c 24 40 - 00 cmp QWORD PTR tv3179[rsp], 0 - 003f6 74 34 je SHORT $LN63@load_jpeg_ - -; 3428 : for (i = 0; i < z->s->img_x; ++i) { - - 003f8 33 d2 xor edx, edx - 003fa 39 10 cmp DWORD PTR [rax], edx - 003fc 0f 86 b5 03 00 +; Line 3426 + 004f0 8b 48 08 mov ecx, DWORD PTR [rax+8] + 004f3 83 f9 03 cmp ecx, 3 + 004f6 75 64 jne SHORT $LN61@load_jpeg_ +; Line 3427 + 004f8 48 83 7c 24 40 + 00 cmp QWORD PTR tv5072[rsp], 0 + 004fe 74 3a je SHORT $LN63@load_jpeg_ +; Line 3428 + 00500 33 d2 xor edx, edx + 00502 39 10 cmp DWORD PTR [rax], edx + 00504 0f 86 bd 03 00 00 jbe $LN5@load_jpeg_ + 0050a 66 0f 1f 44 00 + 00 npad 6 $LL13@load_jpeg_: - -; 3429 : out[0] = y[i]; - - 00402 0f b6 04 3a movzx eax, BYTE PTR [rdx+rdi] - 00406 88 03 mov BYTE PTR [rbx], al - -; 3430 : out[1] = coutput[1][i]; - - 00408 42 0f b6 04 32 movzx eax, BYTE PTR [rdx+r14] - 0040d 88 43 01 mov BYTE PTR [rbx+1], al - 00410 0f b6 04 2a movzx eax, BYTE PTR [rdx+rbp] - 00414 ff c2 inc edx - 00416 88 43 02 mov BYTE PTR [rbx+2], al - -; 3431 : out[2] = coutput[2][i]; -; 3432 : out[3] = 255; - - 00419 c6 43 03 ff mov BYTE PTR [rbx+3], 255 ; 000000ffH - -; 3433 : out += n; - - 0041d 49 03 df add rbx, r15 - 00420 48 8b 06 mov rax, QWORD PTR [rsi] - 00423 3b 10 cmp edx, DWORD PTR [rax] - 00425 72 db jb SHORT $LL13@load_jpeg_ - -; 3434 : } -; 3435 : } - - 00427 e9 8b 03 00 00 jmp $LN5@load_jpeg_ +; Line 3429 + 00510 0f b6 04 3a movzx eax, BYTE PTR [rdx+rdi] + 00514 88 03 mov BYTE PTR [rbx], al +; Line 3430 + 00516 42 0f b6 04 32 movzx eax, BYTE PTR [rdx+r14] + 0051b 88 43 01 mov BYTE PTR [rbx+1], al + 0051e 0f b6 04 2a movzx eax, BYTE PTR [rdx+rbp] + 00522 ff c2 inc edx + 00524 88 43 02 mov BYTE PTR [rbx+2], al +; Line 3432 + 00527 c6 43 03 ff mov BYTE PTR [rbx+3], 255 ; 000000ffH +; Line 3433 + 0052b 49 03 df add rbx, r15 + 0052e 48 8b 06 mov rax, QWORD PTR [rsi] + 00531 3b 10 cmp edx, DWORD PTR [rax] + 00533 72 db jb SHORT $LL13@load_jpeg_ +; Line 3435 + 00535 e9 8d 03 00 00 jmp $LN5@load_jpeg_ $LN63@load_jpeg_: - -; 3436 : else { -; 3437 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); - - 0042c 8b 00 mov eax, DWORD PTR [rax] - 0042e 4c 8b cd mov r9, rbp - 00431 44 89 7c 24 28 mov DWORD PTR [rsp+40], r15d - 00436 4d 8b c6 mov r8, r14 - 00439 48 8b d7 mov rdx, rdi - 0043c 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00440 48 8b cb mov rcx, rbx - 00443 ff 96 78 48 00 +; Line 3437 + 0053a 8b 00 mov eax, DWORD PTR [rax] + 0053c 4c 8b cd mov r9, rbp + 0053f 44 89 7c 24 28 mov DWORD PTR [rsp+40], r15d + 00544 4d 8b c6 mov r8, r14 + 00547 48 8b d7 mov rdx, rdi + 0054a 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0054e 48 8b cb mov rcx, rbx + 00551 ff 96 78 48 00 00 call QWORD PTR [rsi+18552] - -; 3438 : } -; 3439 : } - - 00449 e9 69 03 00 00 jmp $LN5@load_jpeg_ +; Line 3439 + 00557 e9 6b 03 00 00 jmp $LN5@load_jpeg_ $LN61@load_jpeg_: - -; 3440 : else if (z->s->img_n == 4) { - - 0044e 83 f9 04 cmp ecx, 4 - 00451 0f 85 2a 01 00 +; Line 3440 + 0055c 83 f9 04 cmp ecx, 4 + 0055f 0f 85 2c 01 00 00 jne $LN65@load_jpeg_ - -; 3441 : if (z->app14_color_transform == 0) { // CMYK - - 00457 8b 8e 4c 48 00 +; Line 3441 + 00565 8b 8e 4c 48 00 00 mov ecx, DWORD PTR [rsi+18508] - 0045d 85 c9 test ecx, ecx - 0045f 75 75 jne SHORT $LN67@load_jpeg_ - -; 3442 : for (i = 0; i < z->s->img_x; ++i) { - - 00461 45 33 c9 xor r9d, r9d - 00464 44 39 08 cmp DWORD PTR [rax], r9d - 00467 0f 86 4a 03 00 + 0056b 85 c9 test ecx, ecx + 0056d 75 77 jne SHORT $LN67@load_jpeg_ +; Line 3442 + 0056f 45 33 c9 xor r9d, r9d + 00572 44 39 08 cmp DWORD PTR [rax], r9d + 00575 0f 86 4c 03 00 00 jbe $LN5@load_jpeg_ - 0046d 0f 1f 00 npad 3 + 0057b 0f 1f 44 00 00 npad 5 $LL16@load_jpeg_: - -; 3343 : unsigned int t = x * y + 128; - - 00470 47 0f b6 04 21 movzx r8d, BYTE PTR [r9+r12] - 00475 41 0f b6 0c 39 movzx ecx, BYTE PTR [r9+rdi] - 0047a 41 0f af c8 imul ecx, r8d - 0047e 83 e9 80 sub ecx, -128 ; ffffffffffffff80H - -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - - 00481 8b c1 mov eax, ecx - 00483 c1 e8 08 shr eax, 8 - 00486 03 c1 add eax, ecx - 00488 c1 e8 08 shr eax, 8 - -; 3443 : stbi_uc m = coutput[3][i]; -; 3444 : out[0] = stbi__blinn_8x8(coutput[0][i], m); - - 0048b 88 03 mov BYTE PTR [rbx], al - -; 3343 : unsigned int t = x * y + 128; - - 0048d 43 0f b6 0c 31 movzx ecx, BYTE PTR [r9+r14] - 00492 41 0f af c8 imul ecx, r8d - 00496 83 e9 80 sub ecx, -128 ; ffffffffffffff80H - -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - - 00499 8b c1 mov eax, ecx - 0049b c1 e8 08 shr eax, 8 - 0049e 03 c1 add eax, ecx - 004a0 c1 e8 08 shr eax, 8 - -; 3445 : out[1] = stbi__blinn_8x8(coutput[1][i], m); - - 004a3 88 43 01 mov BYTE PTR [rbx+1], al - -; 3343 : unsigned int t = x * y + 128; - - 004a6 41 0f b6 0c 29 movzx ecx, BYTE PTR [r9+rbp] - -; 3442 : for (i = 0; i < z->s->img_x; ++i) { - - 004ab 41 ff c1 inc r9d - -; 3447 : out[3] = 255; - - 004ae c6 43 03 ff mov BYTE PTR [rbx+3], 255 ; 000000ffH - -; 3343 : unsigned int t = x * y + 128; - - 004b2 41 0f af c8 imul ecx, r8d - 004b6 83 e9 80 sub ecx, -128 ; ffffffffffffff80H - -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - - 004b9 8b c1 mov eax, ecx - 004bb c1 e8 08 shr eax, 8 - 004be 03 c1 add eax, ecx - 004c0 c1 e8 08 shr eax, 8 - -; 3446 : out[2] = stbi__blinn_8x8(coutput[2][i], m); - - 004c3 88 43 02 mov BYTE PTR [rbx+2], al - -; 3448 : out += n; - - 004c6 49 03 df add rbx, r15 - 004c9 48 8b 06 mov rax, QWORD PTR [rsi] - 004cc 44 3b 08 cmp r9d, DWORD PTR [rax] - 004cf 72 9f jb SHORT $LL16@load_jpeg_ - -; 3449 : } -; 3450 : } - - 004d1 e9 e1 02 00 00 jmp $LN5@load_jpeg_ +; Line 3343 + 00580 47 0f b6 04 21 movzx r8d, BYTE PTR [r9+r12] + 00585 41 0f b6 0c 39 movzx ecx, BYTE PTR [r9+rdi] + 0058a 41 0f af c8 imul ecx, r8d + 0058e 83 e9 80 sub ecx, -128 ; ffffffffffffff80H +; Line 3344 + 00591 8b c1 mov eax, ecx + 00593 c1 e8 08 shr eax, 8 + 00596 03 c1 add eax, ecx + 00598 c1 e8 08 shr eax, 8 +; Line 3444 + 0059b 88 03 mov BYTE PTR [rbx], al +; Line 3343 + 0059d 43 0f b6 0c 31 movzx ecx, BYTE PTR [r9+r14] + 005a2 41 0f af c8 imul ecx, r8d + 005a6 83 e9 80 sub ecx, -128 ; ffffffffffffff80H +; Line 3344 + 005a9 8b c1 mov eax, ecx + 005ab c1 e8 08 shr eax, 8 + 005ae 03 c1 add eax, ecx + 005b0 c1 e8 08 shr eax, 8 +; Line 3445 + 005b3 88 43 01 mov BYTE PTR [rbx+1], al +; Line 3343 + 005b6 41 0f b6 0c 29 movzx ecx, BYTE PTR [r9+rbp] +; Line 3442 + 005bb 41 ff c1 inc r9d +; Line 3447 + 005be c6 43 03 ff mov BYTE PTR [rbx+3], 255 ; 000000ffH +; Line 3343 + 005c2 41 0f af c8 imul ecx, r8d + 005c6 83 e9 80 sub ecx, -128 ; ffffffffffffff80H +; Line 3344 + 005c9 8b c1 mov eax, ecx + 005cb c1 e8 08 shr eax, 8 + 005ce 03 c1 add eax, ecx + 005d0 c1 e8 08 shr eax, 8 +; Line 3446 + 005d3 88 43 02 mov BYTE PTR [rbx+2], al +; Line 3448 + 005d6 49 03 df add rbx, r15 + 005d9 48 8b 06 mov rax, QWORD PTR [rsi] + 005dc 44 3b 08 cmp r9d, DWORD PTR [rax] + 005df 72 9f jb SHORT $LL16@load_jpeg_ +; Line 3450 + 005e1 e9 e1 02 00 00 jmp $LN5@load_jpeg_ $LN67@load_jpeg_: - -; 3451 : else if (z->app14_color_transform == 2) { // YCCK - - 004d6 8b 10 mov edx, DWORD PTR [rax] - 004d8 83 f9 02 cmp ecx, 2 - 004db 48 8b 86 78 48 +; Line 3451 + 005e6 8b 10 mov edx, DWORD PTR [rax] + 005e8 83 f9 02 cmp ecx, 2 + 005eb 48 8b 86 78 48 00 00 mov rax, QWORD PTR [rsi+18552] - 004e2 4c 8b cd mov r9, rbp - 004e5 44 89 7c 24 28 mov DWORD PTR [rsp+40], r15d - 004ea 4d 8b c6 mov r8, r14 - 004ed 89 54 24 20 mov DWORD PTR [rsp+32], edx - 004f1 48 8b cb mov rcx, rbx - 004f4 48 8b d7 mov rdx, rdi - 004f7 0f 85 7d 00 00 + 005f2 4c 8b cd mov r9, rbp + 005f5 44 89 7c 24 28 mov DWORD PTR [rsp+40], r15d + 005fa 4d 8b c6 mov r8, r14 + 005fd 89 54 24 20 mov DWORD PTR [rsp+32], edx + 00601 48 8b cb mov rcx, rbx + 00604 48 8b d7 mov rdx, rdi + 00607 0f 85 7d 00 00 00 jne $LN69@load_jpeg_ - -; 3452 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); - - 004fd ff d0 call rax - -; 3453 : for (i = 0; i < z->s->img_x; ++i) { - - 004ff 48 8b 06 mov rax, QWORD PTR [rsi] - 00502 45 33 c0 xor r8d, r8d - 00505 44 39 00 cmp DWORD PTR [rax], r8d - 00508 0f 86 a9 02 00 +; Line 3452 + 0060d ff d0 call rax +; Line 3453 + 0060f 48 8b 06 mov rax, QWORD PTR [rsi] + 00612 45 33 c0 xor r8d, r8d + 00615 44 39 00 cmp DWORD PTR [rax], r8d + 00618 0f 86 a9 02 00 00 jbe $LN5@load_jpeg_ - 0050e 66 90 npad 2 + 0061e 66 90 npad 2 $LL19@load_jpeg_: - -; 3343 : unsigned int t = x * y + 128; - - 00510 43 0f b6 14 20 movzx edx, BYTE PTR [r8+r12] - -; 3453 : for (i = 0; i < z->s->img_x; ++i) { - - 00515 41 ff c0 inc r8d - -; 3454 : stbi_uc m = coutput[3][i]; -; 3455 : out[0] = stbi__blinn_8x8(255 - out[0], m); - - 00518 0f b6 03 movzx eax, BYTE PTR [rbx] - 0051b f6 d0 not al - -; 3343 : unsigned int t = x * y + 128; - - 0051d 0f b6 c8 movzx ecx, al - 00520 0f af ca imul ecx, edx - 00523 83 e9 80 sub ecx, -128 ; ffffffffffffff80H - -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - - 00526 8b c1 mov eax, ecx - 00528 c1 e8 08 shr eax, 8 - 0052b 03 c1 add eax, ecx - 0052d c1 e8 08 shr eax, 8 - -; 3454 : stbi_uc m = coutput[3][i]; -; 3455 : out[0] = stbi__blinn_8x8(255 - out[0], m); - - 00530 88 03 mov BYTE PTR [rbx], al - -; 3456 : out[1] = stbi__blinn_8x8(255 - out[1], m); - - 00532 0f b6 43 01 movzx eax, BYTE PTR [rbx+1] - 00536 f6 d0 not al - -; 3343 : unsigned int t = x * y + 128; - - 00538 0f b6 c8 movzx ecx, al - 0053b 0f af ca imul ecx, edx - 0053e 83 e9 80 sub ecx, -128 ; ffffffffffffff80H - -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - - 00541 8b c1 mov eax, ecx - 00543 c1 e8 08 shr eax, 8 - 00546 03 c1 add eax, ecx - 00548 c1 e8 08 shr eax, 8 - -; 3456 : out[1] = stbi__blinn_8x8(255 - out[1], m); - - 0054b 88 43 01 mov BYTE PTR [rbx+1], al - -; 3457 : out[2] = stbi__blinn_8x8(255 - out[2], m); - - 0054e 0f b6 43 02 movzx eax, BYTE PTR [rbx+2] - 00552 f6 d0 not al - -; 3343 : unsigned int t = x * y + 128; - - 00554 0f b6 c8 movzx ecx, al - 00557 0f af ca imul ecx, edx - 0055a 83 e9 80 sub ecx, -128 ; ffffffffffffff80H - -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - - 0055d 8b c1 mov eax, ecx - 0055f c1 e8 08 shr eax, 8 - 00562 03 c1 add eax, ecx - 00564 c1 e8 08 shr eax, 8 - -; 3457 : out[2] = stbi__blinn_8x8(255 - out[2], m); - - 00567 88 43 02 mov BYTE PTR [rbx+2], al - -; 3458 : out += n; - - 0056a 49 03 df add rbx, r15 - 0056d 48 8b 06 mov rax, QWORD PTR [rsi] - 00570 44 3b 00 cmp r8d, DWORD PTR [rax] - 00573 72 9b jb SHORT $LL19@load_jpeg_ - -; 3459 : } -; 3460 : } - - 00575 e9 3d 02 00 00 jmp $LN5@load_jpeg_ +; Line 3343 + 00620 43 0f b6 14 20 movzx edx, BYTE PTR [r8+r12] +; Line 3453 + 00625 41 ff c0 inc r8d +; Line 3455 + 00628 0f b6 03 movzx eax, BYTE PTR [rbx] + 0062b f6 d0 not al +; Line 3343 + 0062d 0f b6 c8 movzx ecx, al + 00630 0f af ca imul ecx, edx + 00633 83 e9 80 sub ecx, -128 ; ffffffffffffff80H +; Line 3344 + 00636 8b c1 mov eax, ecx + 00638 c1 e8 08 shr eax, 8 + 0063b 03 c1 add eax, ecx + 0063d c1 e8 08 shr eax, 8 +; Line 3455 + 00640 88 03 mov BYTE PTR [rbx], al +; Line 3456 + 00642 0f b6 43 01 movzx eax, BYTE PTR [rbx+1] + 00646 f6 d0 not al +; Line 3343 + 00648 0f b6 c8 movzx ecx, al + 0064b 0f af ca imul ecx, edx + 0064e 83 e9 80 sub ecx, -128 ; ffffffffffffff80H +; Line 3344 + 00651 8b c1 mov eax, ecx + 00653 c1 e8 08 shr eax, 8 + 00656 03 c1 add eax, ecx + 00658 c1 e8 08 shr eax, 8 +; Line 3456 + 0065b 88 43 01 mov BYTE PTR [rbx+1], al +; Line 3457 + 0065e 0f b6 43 02 movzx eax, BYTE PTR [rbx+2] + 00662 f6 d0 not al +; Line 3343 + 00664 0f b6 c8 movzx ecx, al + 00667 0f af ca imul ecx, edx + 0066a 83 e9 80 sub ecx, -128 ; ffffffffffffff80H +; Line 3344 + 0066d 8b c1 mov eax, ecx + 0066f c1 e8 08 shr eax, 8 + 00672 03 c1 add eax, ecx + 00674 c1 e8 08 shr eax, 8 +; Line 3457 + 00677 88 43 02 mov BYTE PTR [rbx+2], al +; Line 3458 + 0067a 49 03 df add rbx, r15 + 0067d 48 8b 06 mov rax, QWORD PTR [rsi] + 00680 44 3b 00 cmp r8d, DWORD PTR [rax] + 00683 72 9b jb SHORT $LL19@load_jpeg_ +; Line 3460 + 00685 e9 3d 02 00 00 jmp $LN5@load_jpeg_ $LN69@load_jpeg_: - -; 3461 : else { // YCbCr + alpha? Ignore the fourth channel for now -; 3462 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); - - 0057a ff d0 call rax - -; 3463 : } -; 3464 : } - - 0057c e9 36 02 00 00 jmp $LN5@load_jpeg_ +; Line 3462 + 0068a ff d0 call rax +; Line 3464 + 0068c e9 36 02 00 00 jmp $LN5@load_jpeg_ $LN65@load_jpeg_: - -; 3465 : else -; 3466 : for (i = 0; i < z->s->img_x; ++i) { - - 00581 33 d2 xor edx, edx - 00583 39 10 cmp DWORD PTR [rax], edx - 00585 0f 86 2c 02 00 +; Line 3466 + 00691 33 d2 xor edx, edx + 00693 39 10 cmp DWORD PTR [rax], edx + 00695 0f 86 2c 02 00 00 jbe $LN5@load_jpeg_ - 0058b 0f 1f 44 00 00 npad 5 + 0069b 0f 1f 44 00 00 npad 5 $LL22@load_jpeg_: - -; 3467 : out[0] = out[1] = out[2] = y[i]; - - 00590 0f b6 0c 3a movzx ecx, BYTE PTR [rdx+rdi] - 00594 ff c2 inc edx - 00596 88 4b 02 mov BYTE PTR [rbx+2], cl - 00599 88 4b 01 mov BYTE PTR [rbx+1], cl - 0059c 88 0b mov BYTE PTR [rbx], cl - -; 3468 : out[3] = 255; // not used if n==3 - - 0059e c6 43 03 ff mov BYTE PTR [rbx+3], 255 ; 000000ffH - -; 3469 : out += n; - - 005a2 49 03 df add rbx, r15 - 005a5 48 8b 06 mov rax, QWORD PTR [rsi] - 005a8 3b 10 cmp edx, DWORD PTR [rax] - 005aa 72 e4 jb SHORT $LL22@load_jpeg_ - -; 3470 : } -; 3471 : } - - 005ac e9 06 02 00 00 jmp $LN5@load_jpeg_ +; Line 3467 + 006a0 0f b6 0c 3a movzx ecx, BYTE PTR [rdx+rdi] + 006a4 ff c2 inc edx + 006a6 88 4b 02 mov BYTE PTR [rbx+2], cl + 006a9 88 4b 01 mov BYTE PTR [rbx+1], cl + 006ac 88 0b mov BYTE PTR [rbx], cl +; Line 3468 + 006ae c6 43 03 ff mov BYTE PTR [rbx+3], 255 ; 000000ffH +; Line 3469 + 006b2 49 03 df add rbx, r15 + 006b5 48 8b 06 mov rax, QWORD PTR [rsi] + 006b8 3b 10 cmp edx, DWORD PTR [rax] + 006ba 72 e4 jb SHORT $LL22@load_jpeg_ +; Line 3471 + 006bc e9 06 02 00 00 jmp $LN5@load_jpeg_ $LN59@load_jpeg_: - -; 3472 : else { -; 3473 : if (is_rgb) { - - 005b1 48 83 7c 24 40 - 00 cmp QWORD PTR tv3179[rsp], 0 - 005b7 0f 84 a5 00 00 +; Line 3473 + 006c1 48 83 7c 24 40 + 00 cmp QWORD PTR tv5072[rsp], 0 + 006c7 0f 84 a5 00 00 00 je $LN71@load_jpeg_ - -; 3474 : if (n == 1) - - 005bd 8b 08 mov ecx, DWORD PTR [rax] - 005bf 45 33 c9 xor r9d, r9d - 005c2 41 83 ff 01 cmp r15d, 1 - 005c6 75 46 jne SHORT $LN73@load_jpeg_ - -; 3475 : for (i = 0; i < z->s->img_x; ++i) - - 005c8 85 c9 test ecx, ecx - 005ca 0f 84 e7 01 00 +; Line 3474 + 006cd 8b 08 mov ecx, DWORD PTR [rax] + 006cf 45 33 c9 xor r9d, r9d + 006d2 41 83 ff 01 cmp r15d, 1 + 006d6 75 46 jne SHORT $LN73@load_jpeg_ +; Line 3475 + 006d8 85 c9 test ecx, ecx + 006da 0f 84 e7 01 00 00 je $LN5@load_jpeg_ $LL25@load_jpeg_: - -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - - 005d0 43 0f b6 04 31 movzx eax, BYTE PTR [r9+r14] - 005d5 48 8d 5b 01 lea rbx, QWORD PTR [rbx+1] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - - 005d9 44 69 c0 96 00 +; Line 3476 + 006e0 43 0f b6 04 31 movzx eax, BYTE PTR [r9+r14] + 006e5 48 8d 5b 01 lea rbx, QWORD PTR [rbx+1] +; Line 1210 + 006e9 44 69 c0 96 00 00 00 imul r8d, eax, 150 ; 00000096H - -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - - 005e0 41 0f b6 04 29 movzx eax, BYTE PTR [r9+rbp] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - - 005e5 6b c8 1d imul ecx, eax, 29 - -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - - 005e8 41 0f b6 04 39 movzx eax, BYTE PTR [r9+rdi] - 005ed 41 ff c1 inc r9d - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - - 005f0 44 03 c1 add r8d, ecx - 005f3 6b c8 4d imul ecx, eax, 77 ; 0000004dH - 005f6 44 03 c1 add r8d, ecx - 005f9 41 c1 e8 08 shr r8d, 8 - -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - - 005fd 44 88 43 ff mov BYTE PTR [rbx-1], r8b - 00601 48 8b 06 mov rax, QWORD PTR [rsi] - 00604 44 3b 08 cmp r9d, DWORD PTR [rax] - 00607 72 c7 jb SHORT $LL25@load_jpeg_ - 00609 e9 a9 01 00 00 jmp $LN5@load_jpeg_ +; Line 3476 + 006f0 41 0f b6 04 29 movzx eax, BYTE PTR [r9+rbp] +; Line 1210 + 006f5 6b c8 1d imul ecx, eax, 29 +; Line 3476 + 006f8 41 0f b6 04 39 movzx eax, BYTE PTR [r9+rdi] + 006fd 41 ff c1 inc r9d +; Line 1210 + 00700 44 03 c1 add r8d, ecx + 00703 6b c8 4d imul ecx, eax, 77 ; 0000004dH + 00706 44 03 c1 add r8d, ecx + 00709 41 c1 e8 08 shr r8d, 8 +; Line 3476 + 0070d 44 88 43 ff mov BYTE PTR [rbx-1], r8b + 00711 48 8b 06 mov rax, QWORD PTR [rsi] + 00714 44 3b 08 cmp r9d, DWORD PTR [rax] + 00717 72 c7 jb SHORT $LL25@load_jpeg_ + 00719 e9 a9 01 00 00 jmp $LN5@load_jpeg_ $LN73@load_jpeg_: - -; 3477 : else { -; 3478 : for (i = 0; i < z->s->img_x; ++i, out += 2) { - - 0060e 85 c9 test ecx, ecx - 00610 0f 84 a1 01 00 +; Line 3478 + 0071e 85 c9 test ecx, ecx + 00720 0f 84 a1 01 00 00 je $LN5@load_jpeg_ - 00616 66 66 0f 1f 84 + 00726 66 66 0f 1f 84 00 00 00 00 00 npad 10 $LL28@load_jpeg_: - -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - - 00620 43 0f b6 04 31 movzx eax, BYTE PTR [r9+r14] - 00625 48 8d 5b 02 lea rbx, QWORD PTR [rbx+2] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - - 00629 44 69 c0 96 00 +; Line 3479 + 00730 43 0f b6 04 31 movzx eax, BYTE PTR [r9+r14] + 00735 48 8d 5b 02 lea rbx, QWORD PTR [rbx+2] +; Line 1210 + 00739 44 69 c0 96 00 00 00 imul r8d, eax, 150 ; 00000096H - -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - - 00630 41 0f b6 04 29 movzx eax, BYTE PTR [r9+rbp] - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - - 00635 6b c8 1d imul ecx, eax, 29 - -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - - 00638 41 0f b6 04 39 movzx eax, BYTE PTR [r9+rdi] - 0063d 41 ff c1 inc r9d - -; 3480 : out[1] = 255; - - 00640 c6 43 ff ff mov BYTE PTR [rbx-1], 255 ; 000000ffH - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - - 00644 44 03 c1 add r8d, ecx - 00647 6b c8 4d imul ecx, eax, 77 ; 0000004dH - 0064a 44 03 c1 add r8d, ecx - 0064d 41 c1 e8 08 shr r8d, 8 - -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); - - 00651 44 88 43 fe mov BYTE PTR [rbx-2], r8b - 00655 48 8b 06 mov rax, QWORD PTR [rsi] - 00658 44 3b 08 cmp r9d, DWORD PTR [rax] - 0065b 72 c3 jb SHORT $LL28@load_jpeg_ - -; 3481 : } -; 3482 : } -; 3483 : } - - 0065d e9 55 01 00 00 jmp $LN5@load_jpeg_ +; Line 3479 + 00740 41 0f b6 04 29 movzx eax, BYTE PTR [r9+rbp] +; Line 1210 + 00745 6b c8 1d imul ecx, eax, 29 +; Line 3479 + 00748 41 0f b6 04 39 movzx eax, BYTE PTR [r9+rdi] + 0074d 41 ff c1 inc r9d +; Line 3480 + 00750 c6 43 ff ff mov BYTE PTR [rbx-1], 255 ; 000000ffH +; Line 1210 + 00754 44 03 c1 add r8d, ecx + 00757 6b c8 4d imul ecx, eax, 77 ; 0000004dH + 0075a 44 03 c1 add r8d, ecx + 0075d 41 c1 e8 08 shr r8d, 8 +; Line 3479 + 00761 44 88 43 fe mov BYTE PTR [rbx-2], r8b + 00765 48 8b 06 mov rax, QWORD PTR [rsi] + 00768 44 3b 08 cmp r9d, DWORD PTR [rax] + 0076b 72 c3 jb SHORT $LL28@load_jpeg_ +; Line 3483 + 0076d e9 55 01 00 00 jmp $LN5@load_jpeg_ $LN71@load_jpeg_: - -; 3484 : else if (z->s->img_n == 4 && z->app14_color_transform == 0) { - - 00662 83 78 08 04 cmp DWORD PTR [rax+8], 4 - 00666 0f 85 f9 00 00 - 00 jne $LN238@load_jpeg_ - 0066c 8b 8e 4c 48 00 +; Line 3484 + 00772 83 78 08 04 cmp DWORD PTR [rax+8], 4 + 00776 0f 85 f9 00 00 + 00 jne $LN303@load_jpeg_ + 0077c 8b 8e 4c 48 00 00 mov ecx, DWORD PTR [rsi+18508] - 00672 85 c9 test ecx, ecx - 00674 0f 85 97 00 00 - 00 jne $LN221@load_jpeg_ - -; 3485 : for (i = 0; i < z->s->img_x; ++i) { - - 0067a 45 33 d2 xor r10d, r10d - 0067d 44 39 10 cmp DWORD PTR [rax], r10d - 00680 0f 86 31 01 00 + 00782 85 c9 test ecx, ecx + 00784 0f 85 97 00 00 + 00 jne $LN281@load_jpeg_ +; Line 3485 + 0078a 45 33 d2 xor r10d, r10d + 0078d 44 39 10 cmp DWORD PTR [rax], r10d + 00790 0f 86 31 01 00 00 jbe $LN5@load_jpeg_ - 00686 66 66 0f 1f 84 + 00796 66 66 0f 1f 84 00 00 00 00 00 npad 10 $LL31@load_jpeg_: - -; 3343 : unsigned int t = x * y + 128; - - 00690 43 0f b6 0c 22 movzx ecx, BYTE PTR [r10+r12] - 00695 43 0f b6 14 32 movzx edx, BYTE PTR [r10+r14] - 0069a 45 0f b6 04 2a movzx r8d, BYTE PTR [r10+rbp] - 0069f 45 0f b6 0c 3a movzx r9d, BYTE PTR [r10+rdi] - -; 3485 : for (i = 0; i < z->s->img_x; ++i) { - - 006a4 41 ff c2 inc r10d - -; 3343 : unsigned int t = x * y + 128; - - 006a7 0f af d1 imul edx, ecx - 006aa 44 0f af c1 imul r8d, ecx - 006ae 44 0f af c9 imul r9d, ecx - -; 3491 : out[1] = 255; - - 006b2 c6 43 01 ff mov BYTE PTR [rbx+1], 255 ; 000000ffH - -; 3343 : unsigned int t = x * y + 128; - - 006b6 83 ea 80 sub edx, -128 ; ffffffffffffff80H - -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - - 006b9 8b c2 mov eax, edx - -; 3343 : unsigned int t = x * y + 128; - - 006bb 41 83 e8 80 sub r8d, -128 ; ffffffffffffff80H - -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - - 006bf c1 e8 08 shr eax, 8 - -; 3343 : unsigned int t = x * y + 128; - - 006c2 41 83 e9 80 sub r9d, -128 ; ffffffffffffff80H - -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - - 006c6 03 c2 add eax, edx - 006c8 c1 e8 08 shr eax, 8 - 006cb 0f b6 c0 movzx eax, al - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - - 006ce 69 d0 96 00 00 +; Line 3343 + 007a0 43 0f b6 0c 22 movzx ecx, BYTE PTR [r10+r12] + 007a5 43 0f b6 14 32 movzx edx, BYTE PTR [r10+r14] + 007aa 45 0f b6 04 2a movzx r8d, BYTE PTR [r10+rbp] + 007af 45 0f b6 0c 3a movzx r9d, BYTE PTR [r10+rdi] +; Line 3485 + 007b4 41 ff c2 inc r10d +; Line 3343 + 007b7 0f af d1 imul edx, ecx + 007ba 44 0f af c1 imul r8d, ecx + 007be 44 0f af c9 imul r9d, ecx +; Line 3491 + 007c2 c6 43 01 ff mov BYTE PTR [rbx+1], 255 ; 000000ffH +; Line 3343 + 007c6 83 ea 80 sub edx, -128 ; ffffffffffffff80H +; Line 3344 + 007c9 8b c2 mov eax, edx +; Line 3343 + 007cb 41 83 e8 80 sub r8d, -128 ; ffffffffffffff80H +; Line 3344 + 007cf c1 e8 08 shr eax, 8 +; Line 3343 + 007d2 41 83 e9 80 sub r9d, -128 ; ffffffffffffff80H +; Line 3344 + 007d6 03 c2 add eax, edx + 007d8 c1 e8 08 shr eax, 8 + 007db 0f b6 c0 movzx eax, al +; Line 1210 + 007de 69 d0 96 00 00 00 imul edx, eax, 150 ; 00000096H - -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - - 006d4 41 8b c0 mov eax, r8d - 006d7 c1 e8 08 shr eax, 8 - 006da 41 03 c0 add eax, r8d - 006dd c1 e8 08 shr eax, 8 - 006e0 0f b6 c0 movzx eax, al - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - - 006e3 6b c8 1d imul ecx, eax, 29 - -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - - 006e6 41 8b c1 mov eax, r9d - 006e9 c1 e8 08 shr eax, 8 - 006ec 41 03 c1 add eax, r9d - 006ef c1 e8 08 shr eax, 8 - 006f2 0f b6 c0 movzx eax, al - -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); - - 006f5 03 d1 add edx, ecx - 006f7 6b c8 4d imul ecx, eax, 77 ; 0000004dH - 006fa 03 d1 add edx, ecx - 006fc c1 ea 08 shr edx, 8 - -; 3486 : stbi_uc m = coutput[3][i]; -; 3487 : stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); -; 3488 : stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); -; 3489 : stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); -; 3490 : out[0] = stbi__compute_y(r, g, b); - - 006ff 88 13 mov BYTE PTR [rbx], dl - -; 3492 : out += n; - - 00701 49 03 df add rbx, r15 - 00704 48 8b 06 mov rax, QWORD PTR [rsi] - 00707 44 3b 10 cmp r10d, DWORD PTR [rax] - 0070a 72 84 jb SHORT $LL31@load_jpeg_ - -; 3493 : } -; 3494 : } - - 0070c e9 a6 00 00 00 jmp $LN5@load_jpeg_ -$LN221@load_jpeg_: - -; 3495 : else if (z->s->img_n == 4 && z->app14_color_transform == 2) { - - 00711 83 f9 02 cmp ecx, 2 - 00714 75 4f jne SHORT $LN238@load_jpeg_ - -; 3496 : for (i = 0; i < z->s->img_x; ++i) { - - 00716 45 33 c0 xor r8d, r8d - 00719 44 39 00 cmp DWORD PTR [rax], r8d - 0071c 0f 86 95 00 00 +; Line 3344 + 007e4 41 8b c0 mov eax, r8d + 007e7 c1 e8 08 shr eax, 8 + 007ea 41 03 c0 add eax, r8d + 007ed c1 e8 08 shr eax, 8 + 007f0 0f b6 c0 movzx eax, al +; Line 1210 + 007f3 6b c8 1d imul ecx, eax, 29 +; Line 3344 + 007f6 41 8b c1 mov eax, r9d + 007f9 c1 e8 08 shr eax, 8 + 007fc 41 03 c1 add eax, r9d + 007ff c1 e8 08 shr eax, 8 + 00802 0f b6 c0 movzx eax, al +; Line 1210 + 00805 03 d1 add edx, ecx + 00807 6b c8 4d imul ecx, eax, 77 ; 0000004dH + 0080a 03 d1 add edx, ecx + 0080c c1 ea 08 shr edx, 8 +; Line 3490 + 0080f 88 13 mov BYTE PTR [rbx], dl +; Line 3492 + 00811 49 03 df add rbx, r15 + 00814 48 8b 06 mov rax, QWORD PTR [rsi] + 00817 44 3b 10 cmp r10d, DWORD PTR [rax] + 0081a 72 84 jb SHORT $LL31@load_jpeg_ +; Line 3494 + 0081c e9 a6 00 00 00 jmp $LN5@load_jpeg_ +$LN281@load_jpeg_: +; Line 3495 + 00821 83 f9 02 cmp ecx, 2 + 00824 75 4f jne SHORT $LN303@load_jpeg_ +; Line 3496 + 00826 45 33 c0 xor r8d, r8d + 00829 44 39 00 cmp DWORD PTR [rax], r8d + 0082c 0f 86 95 00 00 00 jbe $LN5@load_jpeg_ - 00722 0f 1f 40 00 66 + 00832 0f 1f 40 00 66 66 0f 1f 84 00 00 00 00 00 npad 14 $LL34@load_jpeg_: - -; 3497 : out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); - - 00730 41 0f b6 04 38 movzx eax, BYTE PTR [r8+rdi] - 00735 f6 d0 not al - -; 3343 : unsigned int t = x * y + 128; - - 00737 0f b6 d0 movzx edx, al - 0073a 43 0f b6 04 20 movzx eax, BYTE PTR [r8+r12] - -; 3496 : for (i = 0; i < z->s->img_x; ++i) { - - 0073f 41 ff c0 inc r8d - -; 3343 : unsigned int t = x * y + 128; - - 00742 0f af d0 imul edx, eax - -; 3498 : out[1] = 255; - - 00745 c6 43 01 ff mov BYTE PTR [rbx+1], 255 ; 000000ffH - -; 3343 : unsigned int t = x * y + 128; - - 00749 83 ea 80 sub edx, -128 ; ffffffffffffff80H - -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); - - 0074c 8b c2 mov eax, edx - 0074e c1 e8 08 shr eax, 8 - 00751 03 c2 add eax, edx - 00753 c1 e8 08 shr eax, 8 - -; 3497 : out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); - - 00756 88 03 mov BYTE PTR [rbx], al - -; 3499 : out += n; - - 00758 49 03 df add rbx, r15 - 0075b 48 8b 06 mov rax, QWORD PTR [rsi] - 0075e 44 3b 00 cmp r8d, DWORD PTR [rax] - 00761 72 cd jb SHORT $LL34@load_jpeg_ - -; 3500 : } -; 3501 : } - - 00763 eb 52 jmp SHORT $LN5@load_jpeg_ -$LN238@load_jpeg_: - -; 3502 : else { -; 3503 : stbi_uc* y = coutput[0]; -; 3504 : if (n == 1) - - 00765 8b 08 mov ecx, DWORD PTR [rax] - 00767 33 d2 xor edx, edx - 00769 41 83 ff 01 cmp r15d, 1 - 0076d 75 23 jne SHORT $LN79@load_jpeg_ - -; 3505 : for (i = 0; i < z->s->img_x; ++i) out[i] = y[i]; - - 0076f 85 c9 test ecx, ecx - 00771 74 44 je SHORT $LN5@load_jpeg_ - 00773 0f 1f 40 00 66 +; Line 3497 + 00840 41 0f b6 04 38 movzx eax, BYTE PTR [r8+rdi] + 00845 f6 d0 not al +; Line 3343 + 00847 0f b6 d0 movzx edx, al + 0084a 43 0f b6 04 20 movzx eax, BYTE PTR [r8+r12] +; Line 3496 + 0084f 41 ff c0 inc r8d +; Line 3343 + 00852 0f af d0 imul edx, eax +; Line 3498 + 00855 c6 43 01 ff mov BYTE PTR [rbx+1], 255 ; 000000ffH +; Line 3343 + 00859 83 ea 80 sub edx, -128 ; ffffffffffffff80H +; Line 3344 + 0085c 8b c2 mov eax, edx + 0085e c1 e8 08 shr eax, 8 + 00861 03 c2 add eax, edx + 00863 c1 e8 08 shr eax, 8 +; Line 3497 + 00866 88 03 mov BYTE PTR [rbx], al +; Line 3499 + 00868 49 03 df add rbx, r15 + 0086b 48 8b 06 mov rax, QWORD PTR [rsi] + 0086e 44 3b 00 cmp r8d, DWORD PTR [rax] + 00871 72 cd jb SHORT $LL34@load_jpeg_ +; Line 3501 + 00873 eb 52 jmp SHORT $LN5@load_jpeg_ +$LN303@load_jpeg_: +; Line 3504 + 00875 8b 08 mov ecx, DWORD PTR [rax] + 00877 33 d2 xor edx, edx + 00879 41 83 ff 01 cmp r15d, 1 + 0087d 75 23 jne SHORT $LN79@load_jpeg_ +; Line 3505 + 0087f 85 c9 test ecx, ecx + 00881 74 44 je SHORT $LN5@load_jpeg_ + 00883 0f 1f 40 00 66 0f 1f 84 00 00 00 00 00 npad 13 $LL37@load_jpeg_: - 00780 0f b6 04 3a movzx eax, BYTE PTR [rdx+rdi] - 00784 88 04 1a mov BYTE PTR [rdx+rbx], al - 00787 ff c2 inc edx - 00789 48 8b 06 mov rax, QWORD PTR [rsi] - 0078c 3b 10 cmp edx, DWORD PTR [rax] - 0078e 72 f0 jb SHORT $LL37@load_jpeg_ - 00790 eb 25 jmp SHORT $LN5@load_jpeg_ + 00890 0f b6 04 3a movzx eax, BYTE PTR [rdx+rdi] + 00894 88 04 1a mov BYTE PTR [rdx+rbx], al + 00897 ff c2 inc edx + 00899 48 8b 06 mov rax, QWORD PTR [rsi] + 0089c 3b 10 cmp edx, DWORD PTR [rax] + 0089e 72 f0 jb SHORT $LL37@load_jpeg_ + 008a0 eb 25 jmp SHORT $LN5@load_jpeg_ $LN79@load_jpeg_: - -; 3506 : else -; 3507 : for (i = 0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } - - 00792 85 c9 test ecx, ecx - 00794 74 21 je SHORT $LN5@load_jpeg_ - 00796 66 66 0f 1f 84 +; Line 3507 + 008a2 85 c9 test ecx, ecx + 008a4 74 21 je SHORT $LN5@load_jpeg_ + 008a6 66 66 0f 1f 84 00 00 00 00 00 npad 10 $LL40@load_jpeg_: - 007a0 0f b6 0c 3a movzx ecx, BYTE PTR [rdx+rdi] - 007a4 ff c2 inc edx - 007a6 88 0b mov BYTE PTR [rbx], cl - 007a8 c6 43 01 ff mov BYTE PTR [rbx+1], 255 ; 000000ffH - 007ac 48 8d 5b 02 lea rbx, QWORD PTR [rbx+2] - 007b0 48 8b 06 mov rax, QWORD PTR [rsi] - 007b3 3b 10 cmp edx, DWORD PTR [rax] - 007b5 72 e9 jb SHORT $LL40@load_jpeg_ + 008b0 0f b6 0c 3a movzx ecx, BYTE PTR [rdx+rdi] + 008b4 ff c2 inc edx + 008b6 88 0b mov BYTE PTR [rbx], cl + 008b8 c6 43 01 ff mov BYTE PTR [rbx+1], 255 ; 000000ffH + 008bc 48 8d 5b 02 lea rbx, QWORD PTR [rbx+2] + 008c0 48 8b 06 mov rax, QWORD PTR [rsi] + 008c3 3b 10 cmp edx, DWORD PTR [rax] + 008c5 72 e9 jb SHORT $LL40@load_jpeg_ $LN5@load_jpeg_: - -; 3406 : -; 3407 : // now go ahead and resample -; 3408 : for (j = 0; j < z->s->img_y; ++j) { - - 007b7 8b 44 24 30 mov eax, DWORD PTR j$1$[rsp] - 007bb 48 8b 16 mov rdx, QWORD PTR [rsi] - 007be ff c0 inc eax - 007c0 89 44 24 30 mov DWORD PTR j$1$[rsp], eax - 007c4 3b 42 04 cmp eax, DWORD PTR [rdx+4] - 007c7 0f 82 23 fb ff +; Line 3408 + 008c7 8b 44 24 30 mov eax, DWORD PTR j$1$[rsp] + 008cb 48 8b 0e mov rcx, QWORD PTR [rsi] + 008ce ff c0 inc eax + 008d0 89 44 24 30 mov DWORD PTR j$1$[rsp], eax + 008d4 3b 41 04 cmp eax, DWORD PTR [rcx+4] + 008d7 0f 82 b3 fa ff ff jb $LL7@load_jpeg_ - 007cd 41 bc 01 00 00 + 008dd 41 bc 01 00 00 00 mov r12d, 1 $LN6@load_jpeg_: - -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); - - 007d3 8b 52 08 mov edx, DWORD PTR [rdx+8] - 007d6 45 33 c0 xor r8d, r8d - 007d9 48 8b ce mov rcx, rsi - 007dc e8 00 00 00 00 call stbi__free_jpeg_components - -; 3508 : } -; 3509 : } -; 3510 : } -; 3511 : stbi__cleanup_jpeg(z); -; 3512 : *out_x = z->s->img_x; - - 007e1 48 8b 06 mov rax, QWORD PTR [rsi] - 007e4 8b 08 mov ecx, DWORD PTR [rax] - 007e6 48 8b 84 24 80 +; Line 2725 + 008e3 48 63 79 08 movsxd rdi, DWORD PTR [rcx+8] + 008e7 48 85 ff test rdi, rdi + 008ea 7e 52 jle SHORT $LN117@load_jpeg_ + 008ec 48 8d 9e d8 46 + 00 00 lea rbx, QWORD PTR [rsi+18136] + 008f3 33 ed xor ebp, ebp +$LL118@load_jpeg_: +; Line 2726 + 008f5 48 8b 0b mov rcx, QWORD PTR [rbx] + 008f8 48 85 c9 test rcx, rcx + 008fb 74 0d je SHORT $LN119@load_jpeg_ +; Line 2727 + 008fd ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2728 + 00903 48 89 2b mov QWORD PTR [rbx], rbp +; Line 2729 + 00906 48 89 6b f8 mov QWORD PTR [rbx-8], rbp +$LN119@load_jpeg_: +; Line 2731 + 0090a 48 8b 4b 08 mov rcx, QWORD PTR [rbx+8] + 0090e 48 85 c9 test rcx, rcx + 00911 74 0e je SHORT $LN120@load_jpeg_ +; Line 2732 + 00913 ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2733 + 00919 48 89 6b 08 mov QWORD PTR [rbx+8], rbp +; Line 2734 + 0091d 48 89 6b 18 mov QWORD PTR [rbx+24], rbp +$LN120@load_jpeg_: +; Line 2736 + 00921 48 8b 4b 10 mov rcx, QWORD PTR [rbx+16] + 00925 48 85 c9 test rcx, rcx + 00928 74 0a je SHORT $LN116@load_jpeg_ +; Line 2737 + 0092a ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2738 + 00930 48 89 6b 10 mov QWORD PTR [rbx+16], rbp +$LN116@load_jpeg_: +; Line 2725 + 00934 48 83 c3 60 add rbx, 96 ; 00000060H + 00938 48 83 ef 01 sub rdi, 1 + 0093c 75 b7 jne SHORT $LL118@load_jpeg_ +$LN117@load_jpeg_: +; Line 3512 + 0093e 48 8b 06 mov rax, QWORD PTR [rsi] + 00941 8b 08 mov ecx, DWORD PTR [rax] + 00943 48 8b 84 24 80 00 00 00 mov rax, QWORD PTR out_x$GSCopy$1$[rsp] - 007ee 89 08 mov DWORD PTR [rax], ecx - -; 3513 : *out_y = z->s->img_y; - - 007f0 48 8b 0e mov rcx, QWORD PTR [rsi] - 007f3 48 8b 84 24 88 + 0094b 89 08 mov DWORD PTR [rax], ecx +; Line 3513 + 0094d 48 8b 0e mov rcx, QWORD PTR [rsi] + 00950 48 8b 84 24 88 00 00 00 mov rax, QWORD PTR out_y$GSCopy$1$[rsp] - 007fb 8b 51 04 mov edx, DWORD PTR [rcx+4] - 007fe 89 10 mov DWORD PTR [rax], edx - -; 3514 : if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output - - 00800 48 8b 84 24 90 + 00958 8b 51 04 mov edx, DWORD PTR [rcx+4] + 0095b 89 10 mov DWORD PTR [rax], edx +; Line 3514 + 0095d 48 8b 84 24 90 00 00 00 mov rax, QWORD PTR comp$GSCopy$1$[rsp] - 00808 48 85 c0 test rax, rax - 0080b 74 13 je SHORT $LN81@load_jpeg_ - 0080d 48 8b 0e mov rcx, QWORD PTR [rsi] - 00810 83 79 08 03 cmp DWORD PTR [rcx+8], 3 - 00814 b9 03 00 00 00 mov ecx, 3 - 00819 44 0f 4d e1 cmovge r12d, ecx - 0081d 44 89 20 mov DWORD PTR [rax], r12d + 00965 48 85 c0 test rax, rax + 00968 74 13 je SHORT $LN81@load_jpeg_ + 0096a 48 8b 0e mov rcx, QWORD PTR [rsi] + 0096d 83 79 08 03 cmp DWORD PTR [rcx+8], 3 + 00971 b9 03 00 00 00 mov ecx, 3 + 00976 44 0f 4d e1 cmovge r12d, ecx + 0097a 44 89 20 mov DWORD PTR [rax], r12d $LN81@load_jpeg_: - -; 3515 : return output; - - 00820 49 8b c5 mov rax, r13 -$LN305@load_jpeg_: - 00823 48 8b 9c 24 98 - 01 00 00 mov rbx, QWORD PTR [rsp+408] - 0082b 48 8b bc 24 88 - 01 00 00 mov rdi, QWORD PTR [rsp+392] - 00833 48 8b ac 24 90 +; Line 3515 + 0097d 49 8b c5 mov rax, r13 +$LN393@load_jpeg_: + 00980 48 8b ac 24 90 01 00 00 mov rbp, QWORD PTR [rsp+400] - 0083b 4c 8b b4 24 78 + 00988 48 8b bc 24 88 + 01 00 00 mov rdi, QWORD PTR [rsp+392] + 00990 4c 8b b4 24 78 01 00 00 mov r14, QWORD PTR [rsp+376] -$LN301@load_jpeg_: - 00843 4c 8b a4 24 80 +$LN390@load_jpeg_: + 00998 48 8b 9c 24 98 + 01 00 00 mov rbx, QWORD PTR [rsp+408] + 009a0 4c 8b a4 24 80 01 00 00 mov r12, QWORD PTR [rsp+384] $LN1@load_jpeg_: - -; 3516 : } -; 3517 : } - - 0084b 48 8b 8c 24 60 +; Line 3517 + 009a8 48 8b 8c 24 60 01 00 00 mov rcx, QWORD PTR __$ArrayPad$[rsp] - 00853 48 33 cc xor rcx, rsp - 00856 e8 00 00 00 00 call __security_check_cookie - 0085b 48 81 c4 a0 01 + 009b0 48 33 cc xor rcx, rsp + 009b3 e8 00 00 00 00 call __security_check_cookie + 009b8 48 81 c4 a0 01 00 00 add rsp, 416 ; 000001a0H - 00862 41 5f pop r15 - 00864 41 5d pop r13 - 00866 5e pop rsi - 00867 c3 ret 0 -$LN241@load_jpeg_: - -; 508 : if (!stbi__mad3sizes_valid(a, b, c, add)) return NULL; - - 00868 48 8b 16 mov rdx, QWORD PTR [rsi] -$LN240@load_jpeg_: - -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); - - 0086b 8b 52 08 mov edx, DWORD PTR [rdx+8] - 0086e 45 33 c0 xor r8d, r8d - 00871 48 8b ce mov rcx, rsi - 00874 e8 00 00 00 00 call stbi__free_jpeg_components - -; 431 : stbi__g_failure_reason = str; - - 00879 8b 15 00 00 00 + 009bf 41 5f pop r15 + 009c1 41 5d pop r13 + 009c3 5e pop rsi + 009c4 c3 ret 0 +$LN306@load_jpeg_: +; Line 508 + 009c5 48 8b 0e mov rcx, QWORD PTR [rsi] +; Line 3405 + 009c8 eb 03 jmp SHORT $LN305@load_jpeg_ +$LN309@load_jpeg_: + 009ca 45 33 ed xor r13d, r13d +$LN305@load_jpeg_: +; Line 2725 + 009cd 48 63 59 08 movsxd rbx, DWORD PTR [rcx+8] + 009d1 48 85 db test rbx, rbx + 009d4 7e 52 jle SHORT $LN171@load_jpeg_ + 009d6 48 81 c6 d8 46 + 00 00 add rsi, 18136 ; 000046d8H + 009dd 0f 1f 00 npad 3 +$LL172@load_jpeg_: +; Line 2726 + 009e0 48 8b 0e mov rcx, QWORD PTR [rsi] + 009e3 48 85 c9 test rcx, rcx + 009e6 74 0d je SHORT $LN173@load_jpeg_ +; Line 2727 + 009e8 ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2728 + 009ee 4c 89 2e mov QWORD PTR [rsi], r13 +; Line 2729 + 009f1 4c 89 6e f8 mov QWORD PTR [rsi-8], r13 +$LN173@load_jpeg_: +; Line 2731 + 009f5 48 8b 4e 08 mov rcx, QWORD PTR [rsi+8] + 009f9 48 85 c9 test rcx, rcx + 009fc 74 0e je SHORT $LN174@load_jpeg_ +; Line 2732 + 009fe ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2733 + 00a04 4c 89 6e 08 mov QWORD PTR [rsi+8], r13 +; Line 2734 + 00a08 4c 89 6e 18 mov QWORD PTR [rsi+24], r13 +$LN174@load_jpeg_: +; Line 2736 + 00a0c 48 8b 4e 10 mov rcx, QWORD PTR [rsi+16] + 00a10 48 85 c9 test rcx, rcx + 00a13 74 0a je SHORT $LN170@load_jpeg_ +; Line 2737 + 00a15 ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 2738 + 00a1b 4c 89 6e 10 mov QWORD PTR [rsi+16], r13 +$LN170@load_jpeg_: +; Line 2725 + 00a1f 48 83 c6 60 add rsi, 96 ; 00000060H + 00a23 49 2b dc sub rbx, r12 + 00a26 75 b8 jne SHORT $LL172@load_jpeg_ +$LN171@load_jpeg_: +; Line 431 + 00a28 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 0087f 65 48 8b 04 25 + 00a2e 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00888 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 0088d 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00891 48 8d 15 00 00 + 00a37 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00a3c 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00a40 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 00898 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } - - 0089c 33 c0 xor eax, eax - 0089e eb 83 jmp SHORT $LN305@load_jpeg_ + 00a47 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 3405 + 00a4b 33 c0 xor eax, eax + 00a4d e9 2e ff ff ff jmp $LN393@load_jpeg_ $LN42@load_jpeg_: - -; 431 : stbi__g_failure_reason = str; - - 008a0 8b 15 00 00 00 +; Line 431 + 00a52 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 008a6 65 48 8b 04 25 + 00a58 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 008af b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 008b4 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 008b8 48 8d 15 00 00 + 00a61 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00a66 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00a6a 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0N@KBPNPPBJ@bad?5req_comp@ - 008bf 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 3351 : -; 3352 : // validate req_comp -; 3353 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); - - 008c3 33 c0 xor eax, eax - 008c5 eb 84 jmp SHORT $LN1@load_jpeg_ + 00a71 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 3353 + 00a75 33 c0 xor eax, eax + 00a77 e9 2c ff ff ff jmp $LN1@load_jpeg_ load_jpeg_image ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__jpeg_load _TEXT SEGMENT -s$ = 80 -x$ = 88 -y$ = 96 -comp$ = 104 -req_comp$ = 112 -ri$dead$ = 120 +s$ = 64 +x$ = 72 +y$ = 80 +comp$ = 88 +req_comp$ = 96 +ri$dead$ = 104 stbi__jpeg_load PROC ; COMDAT - -; 3520 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3520 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi 0000f 48 89 7c 24 20 mov QWORD PTR [rsp+32], rdi 00014 41 56 push r14 - 00016 48 83 ec 40 sub rsp, 64 ; 00000040H - 0001a 48 8b d9 mov rbx, rcx - 0001d 49 8b f1 mov rsi, r9 - -; 438 : return STBI_MALLOC(size); - + 00016 48 83 ec 30 sub rsp, 48 ; 00000030H + 0001a 4c 8b f1 mov r14, rcx + 0001d 49 8b d9 mov rbx, r9 +; Line 438 00020 b9 88 48 00 00 mov ecx, 18568 ; 00004888H - -; 3520 : { - - 00025 49 8b e8 mov rbp, r8 - 00028 4c 8b f2 mov r14, rdx - -; 438 : return STBI_MALLOC(size); - +; Line 3520 + 00025 49 8b f0 mov rsi, r8 + 00028 48 8b ea mov rbp, rdx +; Line 438 0002b ff 15 00 00 00 00 call QWORD PTR __imp_malloc 00031 48 8b f8 mov rdi, rax - -; 3521 : unsigned char* result; -; 3522 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); - +; Line 3523 00034 48 85 c0 test rax, rax - 00037 75 2a jne SHORT $LN2@stbi__jpeg - -; 431 : stbi__g_failure_reason = str; - + 00037 75 27 jne SHORT $LN2@stbi__jpeg +; Line 431 00039 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 00042 8b 0d 00 00 00 @@ -28308,310 +18702,157 @@ stbi__jpeg_load PROC ; COMDAT 00051 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ 00058 48 89 04 0a mov QWORD PTR [rdx+rcx], rax - -; 3521 : unsigned char* result; -; 3522 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); - +; Line 3523 0005c 33 c0 xor eax, eax - 0005e e9 9f 00 00 00 jmp $LN1@stbi__jpeg + 0005e eb 46 jmp SHORT $LN1@stbi__jpeg $LN2@stbi__jpeg: - -; 3524 : memset(j, 0, sizeof(stbi__jpeg)); - - 00063 48 8d 48 08 lea rcx, QWORD PTR [rax+8] - 00067 33 d2 xor edx, edx - 00069 41 b8 68 48 00 - 00 mov r8d, 18536 ; 00004868H - 0006f e8 00 00 00 00 call memset - -; 3305 : j->idct_block_kernel = stbi__idct_block; - - 00074 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__idct_block - -; 3525 : STBI_NOTUSED(ri); -; 3526 : j->s = s; - - 0007b 48 89 1f mov QWORD PTR [rdi], rbx - -; 3305 : j->idct_block_kernel = stbi__idct_block; - - 0007e 48 89 87 70 48 - 00 00 mov QWORD PTR [rdi+18544], rax - -; 187 : __cpuid(info, 1); - - 00085 33 c9 xor ecx, ecx - -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; - - 00087 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__YCbCr_to_RGB_row - 0008e 48 89 87 78 48 - 00 00 mov QWORD PTR [rdi+18552], rax - -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; - - 00095 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__resample_row_hv_2 - 0009c 48 89 87 80 48 - 00 00 mov QWORD PTR [rdi+18560], rax - -; 187 : __cpuid(info, 1); - - 000a3 b8 01 00 00 00 mov eax, 1 - 000a8 0f a2 cpuid - -; 3310 : if (stbi__sse2_available()) { - - 000aa 0f ba e2 1a bt edx, 26 - 000ae 73 2a jae SHORT $LN9@stbi__jpeg - -; 3311 : j->idct_block_kernel = stbi__idct_simd; - - 000b0 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__idct_simd - 000b7 48 89 87 70 48 - 00 00 mov QWORD PTR [rdi+18544], rax - -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - - 000be 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__YCbCr_to_RGB_simd - 000c5 48 89 87 78 48 - 00 00 mov QWORD PTR [rdi+18552], rax - -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; - - 000cc 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__resample_row_hv_2_simd - 000d3 48 89 87 80 48 - 00 00 mov QWORD PTR [rdi+18560], rax -$LN9@stbi__jpeg: - -; 3527 : stbi__setup_jpeg(j); -; 3528 : result = load_jpeg_image(j, x, y, comp, req_comp); - - 000da 8b 44 24 70 mov eax, DWORD PTR req_comp$[rsp] - 000de 4c 8b ce mov r9, rsi - 000e1 4c 8b c5 mov r8, rbp - 000e4 89 44 24 20 mov DWORD PTR [rsp+32], eax - 000e8 49 8b d6 mov rdx, r14 - 000eb 48 8b cf mov rcx, rdi - 000ee e8 00 00 00 00 call load_jpeg_image - -; 3529 : STBI_FREE(j); - - 000f3 48 8b cf mov rcx, rdi - 000f6 48 8b d8 mov rbx, rax - 000f9 ff 15 00 00 00 +; Line 3524 + 00060 48 8d 48 08 lea rcx, QWORD PTR [rax+8] + 00064 33 d2 xor edx, edx + 00066 41 b8 80 48 00 + 00 mov r8d, 18560 ; 00004880H + 0006c e8 00 00 00 00 call memset +; Line 3527 + 00071 48 8b cf mov rcx, rdi + 00074 4c 89 37 mov QWORD PTR [rdi], r14 + 00077 e8 00 00 00 00 call stbi__setup_jpeg +; Line 3528 + 0007c 44 8b 4c 24 60 mov r9d, DWORD PTR req_comp$[rsp] + 00081 4c 8b c6 mov r8, rsi + 00084 44 89 4c 24 20 mov DWORD PTR [rsp+32], r9d + 00089 48 8b d5 mov rdx, rbp + 0008c 4c 8b cb mov r9, rbx + 0008f 48 8b cf mov rcx, rdi + 00092 e8 00 00 00 00 call load_jpeg_image +; Line 3529 + 00097 48 8b cf mov rcx, rdi + 0009a 48 8b d8 mov rbx, rax + 0009d ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 3530 : return result; - - 000ff 48 8b c3 mov rax, rbx +; Line 3530 + 000a3 48 8b c3 mov rax, rbx $LN1@stbi__jpeg: - -; 3531 : } - - 00102 48 8b 5c 24 50 mov rbx, QWORD PTR [rsp+80] - 00107 48 8b 6c 24 58 mov rbp, QWORD PTR [rsp+88] - 0010c 48 8b 74 24 60 mov rsi, QWORD PTR [rsp+96] - 00111 48 8b 7c 24 68 mov rdi, QWORD PTR [rsp+104] - 00116 48 83 c4 40 add rsp, 64 ; 00000040H - 0011a 41 5e pop r14 - 0011c c3 ret 0 +; Line 3531 + 000a6 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] + 000ab 48 8b 6c 24 48 mov rbp, QWORD PTR [rsp+72] + 000b0 48 8b 74 24 50 mov rsi, QWORD PTR [rsp+80] + 000b5 48 8b 7c 24 58 mov rdi, QWORD PTR [rsp+88] + 000ba 48 83 c4 30 add rsp, 48 ; 00000030H + 000be 41 5e pop r14 + 000c0 c3 ret 0 stbi__jpeg_load ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__jpeg_test _TEXT SEGMENT -s$ = 64 +s$ = 48 stbi__jpeg_test PROC ; COMDAT - -; 3534 : { - - 00000 48 89 74 24 10 mov QWORD PTR [rsp+16], rsi +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3534 + 00000 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx 00005 57 push rdi - 00006 48 83 ec 30 sub rsp, 48 ; 00000030H - 0000a 48 8b f1 mov rsi, rcx - -; 438 : return STBI_MALLOC(size); - + 00006 48 83 ec 20 sub rsp, 32 ; 00000020H + 0000a 48 8b f9 mov rdi, rcx +; Line 438 0000d b9 88 48 00 00 mov ecx, 18568 ; 00004888H 00012 ff 15 00 00 00 00 call QWORD PTR __imp_malloc - 00018 48 8b f8 mov rdi, rax - -; 3535 : int r; -; 3536 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); - + 00018 48 8b d8 mov rbx, rax +; Line 3537 0001b 48 85 c0 test rax, rax 0001e 75 30 jne SHORT $LN2@stbi__jpeg - -; 431 : stbi__g_failure_reason = str; - - 00020 65 48 8b 04 25 +; Line 431 + 00020 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00026 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00029 8b 0d 00 00 00 - 00 mov ecx, DWORD PTR _tls_index - 0002f ba 00 00 00 00 mov edx, OFFSET FLAT:stbi__g_failure_reason - 00034 48 8b 0c c8 mov rcx, QWORD PTR [rax+rcx*8] - 00038 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 0003f 48 89 04 0a mov QWORD PTR [rdx+rcx], rax - -; 3535 : int r; -; 3536 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); - + 0002f b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00034 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00038 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ + 0003f 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 3537 00043 33 c0 xor eax, eax - -; 3544 : return r; -; 3545 : } - - 00045 48 8b 74 24 48 mov rsi, QWORD PTR [rsp+72] - 0004a 48 83 c4 30 add rsp, 48 ; 00000030H +; Line 3545 + 00045 48 8b 5c 24 38 mov rbx, QWORD PTR [rsp+56] + 0004a 48 83 c4 20 add rsp, 32 ; 00000020H 0004e 5f pop rdi 0004f c3 ret 0 $LN2@stbi__jpeg: - -; 3538 : memset(j, 0, sizeof(stbi__jpeg)); - +; Line 3538 00050 48 8d 48 08 lea rcx, QWORD PTR [rax+8] - 00054 48 89 5c 24 40 mov QWORD PTR [rsp+64], rbx + 00054 48 89 74 24 30 mov QWORD PTR [rsp+48], rsi 00059 33 d2 xor edx, edx - 0005b 41 b8 68 48 00 - 00 mov r8d, 18536 ; 00004868H + 0005b 41 b8 80 48 00 + 00 mov r8d, 18560 ; 00004880H 00061 e8 00 00 00 00 call memset - -; 3305 : j->idct_block_kernel = stbi__idct_block; - - 00066 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__idct_block - -; 3539 : j->s = s; - - 0006d 48 89 37 mov QWORD PTR [rdi], rsi - -; 3305 : j->idct_block_kernel = stbi__idct_block; - - 00070 48 89 87 70 48 - 00 00 mov QWORD PTR [rdi+18544], rax - -; 187 : __cpuid(info, 1); - - 00077 33 c9 xor ecx, ecx - -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; - - 00079 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__YCbCr_to_RGB_row - 00080 48 89 87 78 48 - 00 00 mov QWORD PTR [rdi+18552], rax - -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; - - 00087 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__resample_row_hv_2 - 0008e 48 89 87 80 48 - 00 00 mov QWORD PTR [rdi+18560], rax - -; 187 : __cpuid(info, 1); - - 00095 b8 01 00 00 00 mov eax, 1 - 0009a 0f a2 cpuid - -; 3310 : if (stbi__sse2_available()) { - - 0009c 0f ba e2 1a bt edx, 26 - 000a0 73 2a jae SHORT $LN9@stbi__jpeg - -; 3311 : j->idct_block_kernel = stbi__idct_simd; - - 000a2 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__idct_simd - 000a9 48 89 87 70 48 - 00 00 mov QWORD PTR [rdi+18544], rax - -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - - 000b0 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__YCbCr_to_RGB_simd - 000b7 48 89 87 78 48 - 00 00 mov QWORD PTR [rdi+18552], rax - -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; - - 000be 48 8d 05 00 00 - 00 00 lea rax, OFFSET FLAT:stbi__resample_row_hv_2_simd - 000c5 48 89 87 80 48 - 00 00 mov QWORD PTR [rdi+18560], rax -$LN9@stbi__jpeg: - -; 3540 : stbi__setup_jpeg(j); -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); - - 000cc ba 01 00 00 00 mov edx, 1 - 000d1 48 8b cf mov rcx, rdi - 000d4 e8 00 00 00 00 call stbi__decode_jpeg_header - -; 342 : s->img_buffer = s->img_buffer_original; - - 000d9 48 8b 96 d0 00 - 00 00 mov rdx, QWORD PTR [rsi+208] - -; 3542 : stbi__rewind(s); -; 3543 : STBI_FREE(j); - - 000e0 48 8b cf mov rcx, rdi - -; 342 : s->img_buffer = s->img_buffer_original; - - 000e3 48 89 96 c0 00 - 00 00 mov QWORD PTR [rsi+192], rdx - -; 3540 : stbi__setup_jpeg(j); -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); - - 000ea 8b d8 mov ebx, eax - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - - 000ec 48 8b 96 d8 00 - 00 00 mov rdx, QWORD PTR [rsi+216] - 000f3 48 89 96 c8 00 - 00 00 mov QWORD PTR [rsi+200], rdx - -; 3542 : stbi__rewind(s); -; 3543 : STBI_FREE(j); - - 000fa ff 15 00 00 00 +; Line 3540 + 00066 48 8b cb mov rcx, rbx + 00069 48 89 3b mov QWORD PTR [rbx], rdi + 0006c e8 00 00 00 00 call stbi__setup_jpeg +; Line 2848 + 00071 33 f6 xor esi, esi +; Line 2849 + 00073 c7 83 4c 48 00 + 00 ff ff ff ff mov DWORD PTR [rbx+18508], -1 +; Line 2851 + 0007d 48 8b cb mov rcx, rbx + 00080 89 b3 48 48 00 + 00 mov DWORD PTR [rbx+18504], esi + 00086 c6 83 28 48 00 + 00 ff mov BYTE PTR [rbx+18472], 255 ; 000000ffH + 0008d e8 00 00 00 00 call stbi__get_marker +; Line 2852 + 00092 3c d8 cmp al, 216 ; 000000d8H + 00094 74 25 je SHORT $LN13@stbi__jpeg +; Line 431 + 00096 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 0009c 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 000a5 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 000aa 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 000ae 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_06CLMBLEP@no?5SOI@ + 000b5 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 2852 + 000b9 eb 05 jmp SHORT $LN8@stbi__jpeg +$LN13@stbi__jpeg: +; Line 2853 + 000bb be 01 00 00 00 mov esi, 1 +$LN8@stbi__jpeg: +; Line 342 + 000c0 48 8b 97 d0 00 + 00 00 mov rdx, QWORD PTR [rdi+208] +; Line 3543 + 000c7 48 8b cb mov rcx, rbx +; Line 342 + 000ca 48 89 97 c0 00 + 00 00 mov QWORD PTR [rdi+192], rdx +; Line 343 + 000d1 48 8b 97 d8 00 + 00 00 mov rdx, QWORD PTR [rdi+216] + 000d8 48 89 97 c8 00 + 00 00 mov QWORD PTR [rdi+200], rdx +; Line 3543 + 000df ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 3544 : return r; -; 3545 : } - - 00100 48 8b 74 24 48 mov rsi, QWORD PTR [rsp+72] - 00105 8b c3 mov eax, ebx - 00107 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] - 0010c 48 83 c4 30 add rsp, 48 ; 00000030H - 00110 5f pop rdi - 00111 c3 ret 0 +; Line 3545 + 000e5 48 8b 5c 24 38 mov rbx, QWORD PTR [rsp+56] + 000ea 8b c6 mov eax, esi + 000ec 48 8b 74 24 30 mov rsi, QWORD PTR [rsp+48] + 000f1 48 83 c4 20 add rsp, 32 ; 00000020H + 000f5 5f pop rdi + 000f6 c3 ret 0 stbi__jpeg_test ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__bitreverse16 _TEXT SEGMENT n$ = 8 stbi__bitreverse16 PROC ; COMDAT - -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3600 00000 8b c1 mov eax, ecx 00002 81 e1 55 55 00 00 and ecx, 21845 ; 00005555H @@ -28619,9 +18860,7 @@ stbi__bitreverse16 PROC ; COMDAT 0000a 03 c9 add ecx, ecx 0000c 25 55 55 00 00 and eax, 21845 ; 00005555H 00011 0b c1 or eax, ecx - -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); - +; Line 3601 00013 8b d0 mov edx, eax 00015 25 33 33 00 00 and eax, 13107 ; 00003333H 0001a c1 ea 02 shr edx, 2 @@ -28629,9 +18868,7 @@ stbi__bitreverse16 PROC ; COMDAT 00020 81 e2 33 33 00 00 and edx, 13107 ; 00003333H 00026 0b d0 or edx, eax - -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); - +; Line 3602 00028 8b ca mov ecx, edx 0002a 81 e2 0f 0f 00 00 and edx, 3855 ; 00000f0fH @@ -28640,47 +18877,34 @@ stbi__bitreverse16 PROC ; COMDAT 00 and ecx, 3855 ; 00000f0fH 00039 c1 e2 04 shl edx, 4 0003c 0b ca or ecx, edx - -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); - +; Line 3603 0003e 0f b6 c1 movzx eax, cl 00041 c1 e0 08 shl eax, 8 00044 c1 e9 08 shr ecx, 8 00047 0b c1 or eax, ecx - -; 3604 : return n; -; 3605 : } - +; Line 3605 00049 c3 ret 0 stbi__bitreverse16 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__bit_reverse _TEXT SEGMENT v$ = 8 bits$ = 16 stbi__bit_reverse PROC ; COMDAT - -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3600 00000 8b c1 mov eax, ecx - -; 3608 : { - +; Line 3608 00002 44 8b c2 mov r8d, edx - -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); - +; Line 3600 00005 d1 f8 sar eax, 1 00007 81 e1 55 55 00 00 and ecx, 21845 ; 00005555H 0000d 03 c9 add ecx, ecx 0000f 25 55 55 00 00 and eax, 21845 ; 00005555H 00014 0b c1 or eax, ecx - -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); - +; Line 3601 00016 8b d0 mov edx, eax 00018 25 33 33 00 00 and eax, 13107 ; 00003333H 0001d c1 e0 02 shl eax, 2 @@ -28688,9 +18912,7 @@ stbi__bit_reverse PROC ; COMDAT 00023 81 e2 33 33 00 00 and edx, 13107 ; 00003333H 00029 0b d0 or edx, eax - -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); - +; Line 3602 0002b 8b ca mov ecx, edx 0002d 81 e2 0f 0f 00 00 and edx, 3855 ; 00000f0fH @@ -28699,39 +18921,22 @@ stbi__bit_reverse PROC ; COMDAT 00 and ecx, 3855 ; 00000f0fH 0003c c1 e2 04 shl edx, 4 0003f 0b ca or ecx, edx - -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); - +; Line 3603 00041 0f b6 c1 movzx eax, cl - -; 3609 : STBI_ASSERT(bits <= 16); -; 3610 : // to bit reverse n bits, reverse 16 and shift -; 3611 : // e.g. 11 bits, bit reverse and shift away 5 -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); - +; Line 3612 00044 c1 e9 08 shr ecx, 8 - -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); - +; Line 3603 00047 c1 e0 08 shl eax, 8 0004a 0b c1 or eax, ecx - -; 3609 : STBI_ASSERT(bits <= 16); -; 3610 : // to bit reverse n bits, reverse 16 and shift -; 3611 : // e.g. 11 bits, bit reverse and shift away 5 -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); - +; Line 3612 0004c b9 10 00 00 00 mov ecx, 16 00051 41 2b c8 sub ecx, r8d 00054 d3 f8 sar eax, cl - -; 3613 : } - +; Line 3613 00056 c3 ret 0 stbi__bit_reverse ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__zbuild_huffman _TEXT SEGMENT next_code$ = 32 @@ -28741,9 +18946,8 @@ z$ = 240 sizelist$ = 248 num$ = 256 stbi__zbuild_huffman PROC ; COMDAT - -; 3616 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3616 00000 4c 8b dc mov r11, rsp 00003 53 push rbx 00004 55 push rbp @@ -28759,22 +18963,14 @@ stbi__zbuild_huffman PROC ; COMDAT 00 00 00 mov QWORD PTR __$ArrayPad$[rsp], rax 00023 0f 57 c0 xorps xmm0, xmm0 00026 45 8b f8 mov r15d, r8d - -; 3617 : int i, k = 0; -; 3618 : int code, next_code[16], sizes[17]; -; 3619 : -; 3620 : // DEFLATE spec for generating codes -; 3621 : memset(sizes, 0, sizeof(sizes)); - +; Line 3621 00029 0f 11 44 24 60 movups XMMWORD PTR sizes$[rsp], xmm0 0002e 4c 8b f2 mov r14, rdx 00031 33 c0 xor eax, eax 00033 0f 11 44 24 70 movups XMMWORD PTR sizes$[rsp+16], xmm0 00038 33 ff xor edi, edi 0003a 41 89 43 b8 mov DWORD PTR [r11-72], eax - -; 3622 : memset(z->fast, 0, sizeof(z->fast)); - +; Line 3622 0003e 33 d2 xor edx, edx 00040 41 b8 00 04 00 00 mov r8d, 1024 ; 00000400H @@ -28783,59 +18979,42 @@ stbi__zbuild_huffman PROC ; COMDAT 0004e 8b ef mov ebp, edi 00050 41 0f 11 43 a8 movups XMMWORD PTR [r11-88], xmm0 00055 e8 00 00 00 00 call memset - -; 3623 : for (i = 0; i < num; ++i) - +; Line 3623 0005a 45 85 ff test r15d, r15d 0005d 7e 22 jle SHORT $LN3@stbi__zbui - -; 3616 : { - +; Line 3616 0005f 49 8b ce mov rcx, r14 00062 41 8b d7 mov edx, r15d 00065 66 66 66 0f 1f 84 00 00 00 00 00 npad 11 $LL4@stbi__zbui: - -; 3624 : ++sizes[sizelist[i]]; - +; Line 3624 00070 0f b6 01 movzx eax, BYTE PTR [rcx] 00073 48 8d 49 01 lea rcx, QWORD PTR [rcx+1] 00077 ff 44 84 60 inc DWORD PTR sizes$[rsp+rax*4] 0007b 48 83 ea 01 sub rdx, 1 0007f 75 ef jne SHORT $LL4@stbi__zbui $LN3@stbi__zbui: - -; 3625 : sizes[0] = 0; - +; Line 3625 00081 89 7c 24 60 mov DWORD PTR sizes$[rsp], edi - -; 3626 : for (i = 1; i < 16; ++i) - +; Line 3626 00085 b9 01 00 00 00 mov ecx, 1 0008a 66 0f 1f 44 00 00 npad 6 $LL7@stbi__zbui: - -; 3627 : if (sizes[i] > (1 << i)) - +; Line 3627 00090 48 63 d1 movsxd rdx, ecx 00093 b8 01 00 00 00 mov eax, 1 00098 d3 e0 shl eax, cl 0009a 39 44 94 60 cmp DWORD PTR sizes$[rsp+rdx*4], eax 0009e 0f 8f d5 01 00 00 jg $LN35@stbi__zbui - -; 3626 : for (i = 1; i < 16; ++i) - +; Line 3626 000a4 ff c1 inc ecx 000a6 83 f9 10 cmp ecx, 16 000a9 7c e5 jl SHORT $LL7@stbi__zbui - -; 3629 : code = 0; -; 3630 : for (i = 1; i < 16; ++i) { - +; Line 3630 000ab 41 ba 01 00 00 00 mov r10d, 1 000b1 48 89 b4 24 00 @@ -28843,15 +19022,9 @@ $LL7@stbi__zbui: 000b9 44 8b c7 mov r8d, edi 000bc 45 8d 5a 0e lea r11d, QWORD PTR [r10+14] $LL10@stbi__zbui: - -; 3631 : next_code[i] = code; - +; Line 3631 000c0 4d 63 ca movsxd r9, r10d - -; 3632 : z->firstcode[i] = (stbi__uint16)code; -; 3633 : z->firstsymbol[i] = (stbi__uint16)k; -; 3634 : code = (code + sizes[i]); - +; Line 3634 000c3 42 8b 74 8c 60 mov esi, DWORD PTR sizes$[rsp+r9*4] 000c8 46 89 44 8c 20 mov DWORD PTR next_code$[rsp+r9*4], r8d 000cd 66 46 89 84 4b @@ -28859,14 +19032,10 @@ $LL10@stbi__zbui: 000d6 44 03 c6 add r8d, esi 000d9 66 42 89 ac 4b 64 04 00 00 mov WORD PTR [rbx+r9*2+1124], bp - -; 3635 : if (sizes[i]) - +; Line 3635 000e2 85 f6 test esi, esi 000e4 74 16 je SHORT $LN18@stbi__zbui - -; 3636 : if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG"); - +; Line 3636 000e6 41 8b ca mov ecx, r10d 000e9 41 8d 40 ff lea eax, DWORD PTR [r8-1] 000ed ba 01 00 00 00 mov edx, 1 @@ -28875,19 +19044,13 @@ $LL10@stbi__zbui: 000f6 0f 8d 56 01 00 00 jge $LN36@stbi__zbui $LN18@stbi__zbui: - -; 3637 : z->maxcode[i] = code << (16 - i); // preshift for inner loop - +; Line 3637 000fc 41 8b cb mov ecx, r11d 000ff 41 8b c0 mov eax, r8d 00102 d3 e0 shl eax, cl - -; 3638 : code <<= 1; - +; Line 3638 00104 45 03 c0 add r8d, r8d - -; 3639 : k += sizes[i]; - +; Line 3639 00107 03 ee add ebp, esi 00109 42 89 84 8b 20 04 00 00 mov DWORD PTR [rbx+r9*4+1056], eax @@ -28895,33 +19058,22 @@ $LN18@stbi__zbui: 00114 41 ff cb dec r11d 00117 45 85 db test r11d, r11d 0011a 7f a4 jg SHORT $LL10@stbi__zbui - -; 3640 : } -; 3641 : z->maxcode[16] = 0x10000; // sentinel - +; Line 3641 0011c c7 83 60 04 00 00 00 00 01 00 mov DWORD PTR [rbx+1120], 65536 ; 00010000H - -; 3642 : for (i = 0; i < num; ++i) { - +; Line 3642 00126 45 85 ff test r15d, r15d 00129 0f 8e f7 00 00 00 jle $LN12@stbi__zbui 0012f 90 npad 1 $LL13@stbi__zbui: - -; 3643 : int s = sizelist[i]; - +; Line 3643 00130 45 0f b6 0e movzx r9d, BYTE PTR [r14] - -; 3644 : if (s) { - +; Line 3644 00134 45 85 c9 test r9d, r9d 00137 0f 84 db 00 00 00 je $LN11@stbi__zbui - -; 3645 : int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; - +; Line 3645 0013d 42 0f b7 84 4b 00 04 00 00 movzx eax, WORD PTR [rbx+r9*2+1024] 00146 4c 8d 5c 24 20 lea r11, QWORD PTR next_code$[rsp] @@ -28930,33 +19082,23 @@ $LL13@stbi__zbui: 00154 4f 8d 1c 8b lea r11, QWORD PTR [r11+r9*4] 00158 45 8b 13 mov r10d, DWORD PTR [r11] 0015b 2b c8 sub ecx, eax - -; 3646 : stbi__uint16 fastv = (stbi__uint16)((s << 9) | i); - +; Line 3646 0015d 45 0f b7 c1 movzx r8d, r9w 00161 66 41 c1 e0 09 shl r8w, 9 00166 66 44 0b c7 or r8w, di 0016a 41 8d 04 0a lea eax, DWORD PTR [r10+rcx] - -; 3647 : z->size[c] = (stbi_uc)s; - +; Line 3647 0016e 48 98 cdqe 00170 44 88 8c 18 84 04 00 00 mov BYTE PTR [rax+rbx+1156], r9b - -; 3648 : z->value[c] = (stbi__uint16)i; - +; Line 3648 00178 66 89 bc 43 a4 05 00 00 mov WORD PTR [rbx+rax*2+1444], di - -; 3649 : if (s <= STBI__ZFAST_BITS) { - +; Line 3649 00180 41 83 f9 09 cmp r9d, 9 00184 0f 87 87 00 00 00 ja $LN15@stbi__zbui - -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); - +; Line 3600 0018a 41 8b ca mov ecx, r10d 0018d 41 8b c2 mov eax, r10d 00190 25 55 55 00 00 and eax, 21845 ; 00005555H @@ -28965,9 +19107,7 @@ $LL13@stbi__zbui: 00199 81 e1 55 55 00 00 and ecx, 21845 ; 00005555H 0019f 0b c8 or ecx, eax - -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); - +; Line 3601 001a1 8b c1 mov eax, ecx 001a3 81 e1 33 33 00 00 and ecx, 13107 ; 00003333H @@ -28975,51 +19115,31 @@ $LL13@stbi__zbui: 001ac 25 33 33 00 00 and eax, 13107 ; 00003333H 001b1 c1 e1 02 shl ecx, 2 001b4 0b c1 or eax, ecx - -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); - +; Line 3612 001b6 b9 10 00 00 00 mov ecx, 16 - -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); - +; Line 3602 001bb 8b d0 mov edx, eax - -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); - +; Line 3612 001bd 41 2b c9 sub ecx, r9d - -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); - +; Line 3602 001c0 25 0f 0f 00 00 and eax, 3855 ; 00000f0fH 001c5 c1 ea 04 shr edx, 4 001c8 c1 e0 04 shl eax, 4 001cb 81 e2 0f 0f 00 00 and edx, 3855 ; 00000f0fH 001d1 0b d0 or edx, eax - -; 3650 : int j = stbi__bit_reverse(next_code[s], s); - +; Line 3650 001d3 8b c2 mov eax, edx - -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); - +; Line 3603 001d5 0f b6 d2 movzx edx, dl - -; 3650 : int j = stbi__bit_reverse(next_code[s], s); - +; Line 3650 001d8 c1 e8 08 shr eax, 8 - -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); - +; Line 3603 001db c1 e2 08 shl edx, 8 001de 0b c2 or eax, edx - -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); - +; Line 3612 001e0 d3 f8 sar eax, cl - -; 3651 : while (j < (1 << STBI__ZFAST_BITS)) { - +; Line 3651 001e2 3d 00 02 00 00 cmp eax, 512 ; 00000200H 001e7 7d 28 jge SHORT $LN15@stbi__zbui 001e9 41 8b c9 mov ecx, r9d @@ -29029,48 +19149,32 @@ $LL13@stbi__zbui: 0f 1f 84 00 00 00 00 00 npad 13 $LL14@stbi__zbui: - -; 3652 : z->fast[j] = fastv; - +; Line 3652 00200 48 63 c8 movsxd rcx, eax - -; 3653 : j += (1 << s); - +; Line 3653 00203 03 c2 add eax, edx 00205 66 44 89 04 4b mov WORD PTR [rbx+rcx*2], r8w 0020a 3d 00 02 00 00 cmp eax, 512 ; 00000200H 0020f 7c ef jl SHORT $LL14@stbi__zbui $LN15@stbi__zbui: - -; 3654 : } -; 3655 : } -; 3656 : ++next_code[s]; - +; Line 3656 00211 41 8d 4a 01 lea ecx, DWORD PTR [r10+1] 00215 41 89 0b mov DWORD PTR [r11], ecx $LN11@stbi__zbui: - -; 3642 : for (i = 0; i < num; ++i) { - +; Line 3642 00218 ff c7 inc edi 0021a 49 ff c6 inc r14 0021d 41 3b ff cmp edi, r15d 00220 0f 8c 0a ff ff ff jl $LL13@stbi__zbui $LN12@stbi__zbui: - -; 3657 : } -; 3658 : } -; 3659 : return 1; - +; Line 3659 00226 b8 01 00 00 00 mov eax, 1 $LN62@stbi__zbui: 0022b 48 8b b4 24 00 01 00 00 mov rsi, QWORD PTR [rsp+256] $LN1@stbi__zbui: - -; 3660 : } - +; Line 3660 00233 48 8b 8c 24 b0 00 00 00 mov rcx, QWORD PTR __$ArrayPad$[rsp] 0023b 48 33 cc xor rcx, rsp @@ -29084,9 +19188,7 @@ $LN1@stbi__zbui: 00250 5b pop rbx 00251 c3 ret 0 $LN36@stbi__zbui: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00252 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00258 65 48 8b 04 25 @@ -29096,15 +19198,11 @@ $LN36@stbi__zbui: 0026a 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@MDNKOBMC@bad?5codelengths@ 00271 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 3636 : if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG"); - +; Line 3636 00275 33 c0 xor eax, eax 00277 eb b2 jmp SHORT $LN62@stbi__zbui $LN35@stbi__zbui: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00279 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0027f 65 48 8b 04 25 @@ -29114,87 +19212,64 @@ $LN35@stbi__zbui: 00291 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_09EOHLEIKL@bad?5sizes@ 00298 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 3628 : return stbi__err("bad sizes", "Corrupt PNG"); - +; Line 3628 0029c 33 c0 xor eax, eax 0029e eb 93 jmp SHORT $LN1@stbi__zbui stbi__zbuild_huffman ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__zeof _TEXT SEGMENT z$ = 8 stbi__zeof PROC ; COMDAT - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3684 00000 48 8b 51 08 mov rdx, QWORD PTR [rcx+8] 00004 33 c0 xor eax, eax 00006 48 39 11 cmp QWORD PTR [rcx], rdx 00009 0f 93 c0 setae al - -; 3685 : } - +; Line 3685 0000c c3 ret 0 stbi__zeof ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__zget8 _TEXT SEGMENT z$ = 8 stbi__zget8 PROC ; COMDAT - -; 3688 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3688 00000 48 8b d1 mov rdx, rcx - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 00003 48 8b 09 mov rcx, QWORD PTR [rcx] 00006 48 3b 4a 08 cmp rcx, QWORD PTR [rdx+8] - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 0000a 72 03 jb SHORT $LN3@stbi__zget 0000c 32 c0 xor al, al - -; 3690 : } - +; Line 3690 0000e c3 ret 0 $LN3@stbi__zget: - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 0000f 0f b6 01 movzx eax, BYTE PTR [rcx] 00012 48 ff c1 inc rcx 00015 48 89 0a mov QWORD PTR [rdx], rcx - -; 3690 : } - +; Line 3690 00018 c3 ret 0 stbi__zget8 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__fill_bits _TEXT SEGMENT z$ = 8 stbi__fill_bits PROC ; COMDAT - -; 3693 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3693 00000 48 8b c1 mov rax, rcx 00003 0f 1f 40 00 66 0f 1f 84 00 00 00 00 00 npad 13 $LL4@stbi__fill: - -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - +; Line 3695 00010 44 8b 40 10 mov r8d, DWORD PTR [rax+16] 00014 ba 01 00 00 00 mov edx, 1 00019 44 8b 48 14 mov r9d, DWORD PTR [rax+20] @@ -29202,14 +19277,10 @@ $LL4@stbi__fill: 00020 d3 e2 shl edx, cl 00022 44 3b ca cmp r9d, edx 00025 73 31 jae SHORT $LN14@stbi__fill - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 00027 48 8b 08 mov rcx, QWORD PTR [rax] 0002a 48 3b 48 08 cmp rcx, QWORD PTR [rax+8] - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 0002e 72 04 jb SHORT $LN9@stbi__fill 00030 32 d2 xor dl, dl 00032 eb 09 jmp SHORT $LN10@stbi__fill @@ -29218,57 +19289,38 @@ $LN9@stbi__fill: 00037 48 ff c1 inc rcx 0003a 48 89 08 mov QWORD PTR [rax], rcx $LN10@stbi__fill: - -; 3697 : return; -; 3698 : } -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - +; Line 3699 0003d 0f b6 d2 movzx edx, dl 00040 41 8b c8 mov ecx, r8d 00043 d3 e2 shl edx, cl - -; 3700 : z->num_bits += 8; - +; Line 3700 00045 41 8d 48 08 lea ecx, DWORD PTR [r8+8] 00049 41 0b d1 or edx, r9d 0004c 89 48 10 mov DWORD PTR [rax+16], ecx 0004f 89 50 14 mov DWORD PTR [rax+20], edx - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 00052 83 f9 18 cmp ecx, 24 00055 7e b9 jle SHORT $LL4@stbi__fill - -; 3702 : } - +; Line 3702 00057 c3 ret 0 $LN14@stbi__fill: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - +; Line 3696 00058 48 8b 48 08 mov rcx, QWORD PTR [rax+8] 0005c 48 89 08 mov QWORD PTR [rax], rcx - -; 3702 : } - +; Line 3702 0005f c3 ret 0 stbi__fill_bits ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__zreceive _TEXT SEGMENT z$ = 16 n$ = 24 stbi__zreceive PROC ; COMDAT - -; 3705 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3705 00000 40 57 push rdi - -; 3706 : unsigned int k; -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - +; Line 3707 00002 8b 41 10 mov eax, DWORD PTR [rcx+16] 00005 8b fa mov edi, edx 00007 4c 8b c9 mov r9, rcx @@ -29276,17 +19328,11 @@ stbi__zreceive PROC ; COMDAT 00 mov r10d, 1 00010 3b c2 cmp eax, edx 00012 7d 6d jge SHORT $LN6@stbi__zrec - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - +; Line 3695 00014 8b 51 14 mov edx, DWORD PTR [rcx+20] - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 00017 44 8b d8 mov r11d, eax - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - +; Line 3695 0001a 8b c8 mov ecx, eax 0001c 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx 00021 44 8b c0 mov r8d, eax @@ -29296,14 +19342,10 @@ stbi__zreceive PROC ; COMDAT 0002b 73 45 jae SHORT $LN17@stbi__zrec 0002d 49 8b 59 08 mov rbx, QWORD PTR [r9+8] $LL7@stbi__zrec: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 00031 49 8b 01 mov rax, QWORD PTR [r9] 00034 48 3b c3 cmp rax, rbx - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 00037 72 04 jb SHORT $LN12@stbi__zrec 00039 32 c9 xor cl, cl 0003b eb 09 jmp SHORT $LN13@stbi__zrec @@ -29312,22 +19354,16 @@ $LN12@stbi__zrec: 00040 48 ff c0 inc rax 00043 49 89 01 mov QWORD PTR [r9], rax $LN13@stbi__zrec: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - +; Line 3699 00046 0f b6 c1 movzx eax, cl 00049 41 8b cb mov ecx, r11d 0004c d3 e0 shl eax, cl 0004e 0b d0 or edx, eax - -; 3700 : z->num_bits += 8; - +; Line 3700 00050 41 8d 43 08 lea eax, DWORD PTR [r11+8] 00054 41 89 51 14 mov DWORD PTR [r9+20], edx 00058 41 89 41 10 mov DWORD PTR [r9+16], eax - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 0005c 83 f8 18 cmp eax, 24 0005f 7f 1b jg SHORT $LN25@stbi__zrec 00061 44 8b d8 mov r11d, eax @@ -29338,23 +19374,16 @@ $LN13@stbi__zrec: 0006e 3b d0 cmp edx, eax 00070 72 bf jb SHORT $LL7@stbi__zrec $LN17@stbi__zrec: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - +; Line 3696 00072 49 8b 41 08 mov rax, QWORD PTR [r9+8] 00076 49 89 01 mov QWORD PTR [r9], rax 00079 41 8b c0 mov eax, r8d $LN25@stbi__zrec: 0007c 48 8b 5c 24 10 mov rbx, QWORD PTR [rsp+16] $LN6@stbi__zrec: - -; 3708 : k = z->code_buffer & ((1 << n) - 1); - +; Line 3708 00081 45 8b 41 14 mov r8d, DWORD PTR [r9+20] - -; 3709 : z->code_buffer >>= n; -; 3710 : z->num_bits -= n; - +; Line 3710 00085 2b c7 sub eax, edi 00087 8b cf mov ecx, edi 00089 41 89 41 10 mov DWORD PTR [r9+16], eax @@ -29364,32 +19393,23 @@ $LN6@stbi__zrec: 00095 41 89 51 14 mov DWORD PTR [r9+20], edx 00099 41 8d 42 ff lea eax, DWORD PTR [r10-1] 0009d 41 23 c0 and eax, r8d - -; 3711 : return k; -; 3712 : } - +; Line 3712 000a0 5f pop rdi 000a1 c3 ret 0 stbi__zreceive ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__zhuffman_decode_slowpath _TEXT SEGMENT a$ = 8 z$ = 16 stbi__zhuffman_decode_slowpath PROC ; COMDAT - -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3612 00000 44 8b 51 14 mov r10d, DWORD PTR [rcx+20] - -; 3715 : { - +; Line 3715 00004 4c 8b d9 mov r11, rcx - -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); - +; Line 3600 00007 45 8b c2 mov r8d, r10d 0000a 41 8b c2 mov eax, r10d 0000d 41 d1 f8 sar r8d, 1 @@ -29398,13 +19418,9 @@ stbi__zhuffman_decode_slowpath PROC ; COMDAT 00017 41 81 e0 55 55 00 00 and r8d, 21845 ; 00005555H 0001e 44 0b c0 or r8d, eax - -; 3715 : { - +; Line 3715 00021 4c 8b ca mov r9, rdx - -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); - +; Line 3601 00024 41 8b c8 mov ecx, r8d 00027 41 81 e0 33 33 00 00 and r8d, 13107 ; 00003333H @@ -29413,9 +19429,7 @@ stbi__zhuffman_decode_slowpath PROC ; COMDAT 00 and ecx, 13107 ; 00003333H 00037 41 c1 e0 02 shl r8d, 2 0003b 41 0b c8 or ecx, r8d - -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); - +; Line 3602 0003e 8b c1 mov eax, ecx 00040 81 e1 0f 0f 00 00 and ecx, 3855 ; 00000f0fH @@ -29423,57 +19437,31 @@ stbi__zhuffman_decode_slowpath PROC ; COMDAT 00049 25 0f 0f 00 00 and eax, 3855 ; 00000f0fH 0004e c1 e1 04 shl ecx, 4 00051 0b c1 or eax, ecx - -; 3721 : if (k < z->maxcode[s]) - +; Line 3721 00053 48 8d 8a 48 04 00 00 lea rcx, QWORD PTR [rdx+1096] - -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); - +; Line 3603 0005a 44 0f b6 c0 movzx r8d, al 0005e c1 e8 08 shr eax, 8 00061 41 c1 e0 08 shl r8d, 8 00065 44 0b c0 or r8d, eax - -; 3716 : int b, s, k; -; 3717 : // not resolved by fast table, so compute it the slow way -; 3718 : // use jpeg approach, which requires MSbits at top -; 3719 : k = stbi__bit_reverse(a->code_buffer, 16); -; 3720 : for (s = STBI__ZFAST_BITS + 1; ; ++s) - +; Line 3720 00068 b8 0a 00 00 00 mov eax, 10 - -; 3721 : if (k < z->maxcode[s]) - +; Line 3721 0006d 44 3b 01 cmp r8d, DWORD PTR [rcx] 00070 7c 10 jl SHORT $LN6@stbi__zhuf $LL4@stbi__zhuf: - -; 3716 : int b, s, k; -; 3717 : // not resolved by fast table, so compute it the slow way -; 3718 : // use jpeg approach, which requires MSbits at top -; 3719 : k = stbi__bit_reverse(a->code_buffer, 16); -; 3720 : for (s = STBI__ZFAST_BITS + 1; ; ++s) - +; Line 3720 00072 ff c0 inc eax 00074 48 8d 49 04 lea rcx, QWORD PTR [rcx+4] - -; 3721 : if (k < z->maxcode[s]) - +; Line 3721 00078 44 3b 01 cmp r8d, DWORD PTR [rcx] 0007b 7d f5 jge SHORT $LL4@stbi__zhuf - -; 3722 : break; -; 3723 : if (s >= 16) return -1; // invalid code! - +; Line 3723 0007d 83 f8 10 cmp eax, 16 00080 7d 55 jge SHORT $LN20@stbi__zhuf $LN6@stbi__zhuf: - -; 3724 : // code size is s, so: -; 3725 : b = (k >> (16 - s)) - z->firstcode[s] + z->firstsymbol[s]; - +; Line 3725 00082 48 63 d0 movsxd rdx, eax 00085 b9 10 00 00 00 mov ecx, 16 0008a 2b c8 sub ecx, eax @@ -29484,255 +19472,111 @@ $LN6@stbi__zhuf: 0009b 41 0f b7 8c 51 64 04 00 00 movzx ecx, WORD PTR [r9+rdx*2+1124] 000a4 44 03 c1 add r8d, ecx - -; 3726 : if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! - +; Line 3726 000a7 41 81 f8 20 01 00 00 cmp r8d, 288 ; 00000120H 000ae 7d 27 jge SHORT $LN20@stbi__zhuf - -; 3727 : if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. - +; Line 3727 000b0 49 63 d0 movsxd rdx, r8d 000b3 42 0f b6 8c 0a 84 04 00 00 movzx ecx, BYTE PTR [rdx+r9+1156] 000bc 3b c8 cmp ecx, eax 000be 75 17 jne SHORT $LN20@stbi__zhuf - -; 3728 : a->code_buffer >>= s; - +; Line 3728 000c0 8b c8 mov ecx, eax 000c2 41 d3 ea shr r10d, cl - -; 3729 : a->num_bits -= s; - +; Line 3729 000c5 41 29 43 10 sub DWORD PTR [r11+16], eax 000c9 45 89 53 14 mov DWORD PTR [r11+20], r10d - -; 3730 : return z->value[b]; - +; Line 3730 000cd 41 0f b7 84 51 a4 05 00 00 movzx eax, WORD PTR [r9+rdx*2+1444] - -; 3731 : } - +; Line 3731 000d6 c3 ret 0 $LN20@stbi__zhuf: - -; 3727 : if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. - +; Line 3727 000d7 b8 ff ff ff ff mov eax, -1 - -; 3731 : } - +; Line 3731 000dc c3 ret 0 stbi__zhuffman_decode_slowpath ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__zhuffman_decode _TEXT SEGMENT a$ = 48 z$ = 56 stbi__zhuffman_decode PROC ; COMDAT - -; 3734 : { - - 00000 40 57 push rdi - 00002 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 3735 : int b, s; -; 3736 : if (a->num_bits < 16) { - - 00006 44 8b 41 10 mov r8d, DWORD PTR [rcx+16] - 0000a 48 8b fa mov rdi, rdx - 0000d 4c 8b c9 mov r9, rcx - 00010 41 83 f8 10 cmp r8d, 16 - 00014 7d 77 jge SHORT $LN10@stbi__zhuf - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 00016 48 8b 01 mov rax, QWORD PTR [rcx] - 00019 4c 8b 59 08 mov r11, QWORD PTR [rcx+8] - 0001d 49 3b c3 cmp rax, r11 - -; 3737 : if (stbi__zeof(a)) { - - 00020 72 0b jb SHORT $LN22@stbi__zhuf - -; 3738 : return -1; /* report error for unexpected end of data. */ - - 00022 b8 ff ff ff ff mov eax, -1 - -; 3750 : } - - 00027 48 83 c4 20 add rsp, 32 ; 00000020H - 0002b 5f pop rdi - 0002c c3 ret 0 -$LN22@stbi__zhuf: - 0002d 48 89 5c 24 30 mov QWORD PTR [rsp+48], rbx - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 00032 ba 01 00 00 00 mov edx, 1 - 00037 8b 59 14 mov ebx, DWORD PTR [rcx+20] - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 0003a 45 8b d0 mov r10d, r8d - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 0003d 41 8b c8 mov ecx, r8d - 00040 d3 e2 shl edx, cl - 00042 3b da cmp ebx, edx - 00044 73 3f jae SHORT $LN21@stbi__zhuf -$LL11@stbi__zhuf: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 00046 49 3b c3 cmp rax, r11 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - - 00049 72 04 jb SHORT $LN16@stbi__zhuf - 0004b 32 c9 xor cl, cl - 0004d eb 09 jmp SHORT $LN17@stbi__zhuf -$LN16@stbi__zhuf: - 0004f 0f b6 08 movzx ecx, BYTE PTR [rax] - 00052 48 ff c0 inc rax - 00055 49 89 01 mov QWORD PTR [r9], rax -$LN17@stbi__zhuf: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - - 00058 0f b6 d1 movzx edx, cl - -; 3700 : z->num_bits += 8; - - 0005b 45 8d 42 08 lea r8d, DWORD PTR [r10+8] - 0005f 41 8b ca mov ecx, r10d - 00062 45 89 41 10 mov DWORD PTR [r9+16], r8d - 00066 d3 e2 shl edx, cl - 00068 0b da or ebx, edx - 0006a 41 89 59 14 mov DWORD PTR [r9+20], ebx - -; 3701 : } while (z->num_bits <= 24); - - 0006e 41 83 f8 18 cmp r8d, 24 - 00072 7f 14 jg SHORT $LN32@stbi__zhuf - -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 00074 41 8b c8 mov ecx, r8d - 00077 ba 01 00 00 00 mov edx, 1 - 0007c d3 e2 shl edx, cl - -; 3701 : } while (z->num_bits <= 24); - - 0007e 45 8b d0 mov r10d, r8d - 00081 3b da cmp ebx, edx - 00083 72 c1 jb SHORT $LL11@stbi__zhuf -$LN21@stbi__zhuf: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - - 00085 4d 89 19 mov QWORD PTR [r9], r11 -$LN32@stbi__zhuf: - 00088 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] -$LN10@stbi__zhuf: - -; 3739 : } -; 3740 : stbi__fill_bits(a); -; 3741 : } -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; - - 0008d 41 8b 51 14 mov edx, DWORD PTR [r9+20] - 00091 8b c2 mov eax, edx - 00093 25 ff 01 00 00 and eax, 511 ; 000001ffH - 00098 0f b7 04 47 movzx eax, WORD PTR [rdi+rax*2] - -; 3743 : if (b) { - - 0009c 85 c0 test eax, eax - 0009e 74 1d je SHORT $LN4@stbi__zhuf - -; 3744 : s = b >> 9; - - 000a0 8b c8 mov ecx, eax - 000a2 c1 e9 09 shr ecx, 9 - -; 3745 : a->code_buffer >>= s; - - 000a5 d3 ea shr edx, cl - -; 3746 : a->num_bits -= s; - - 000a7 44 2b c1 sub r8d, ecx - 000aa 41 89 51 14 mov DWORD PTR [r9+20], edx - -; 3747 : return b & 511; - - 000ae 25 ff 01 00 00 and eax, 511 ; 000001ffH - 000b3 45 89 41 10 mov DWORD PTR [r9+16], r8d - -; 3750 : } - - 000b7 48 83 c4 20 add rsp, 32 ; 00000020H - 000bb 5f pop rdi - 000bc c3 ret 0 +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3734 + 00000 48 83 ec 28 sub rsp, 40 ; 00000028H +; Line 3736 + 00004 83 79 10 10 cmp DWORD PTR [rcx+16], 16 + 00008 4c 8b da mov r11, rdx + 0000b 4c 8b d1 mov r10, rcx + 0000e 7d 18 jge SHORT $LN2@stbi__zhuf +; Line 3684 + 00010 48 8b 41 08 mov rax, QWORD PTR [rcx+8] + 00014 48 39 01 cmp QWORD PTR [rcx], rax +; Line 3737 + 00017 72 0a jb SHORT $LN3@stbi__zhuf +; Line 3738 + 00019 b8 ff ff ff ff mov eax, -1 +; Line 3750 + 0001e 48 83 c4 28 add rsp, 40 ; 00000028H + 00022 c3 ret 0 +$LN3@stbi__zhuf: +; Line 3740 + 00023 e8 00 00 00 00 call stbi__fill_bits +$LN2@stbi__zhuf: +; Line 3742 + 00028 41 8b 52 14 mov edx, DWORD PTR [r10+20] + 0002c 8b c2 mov eax, edx + 0002e 25 ff 01 00 00 and eax, 511 ; 000001ffH + 00033 41 0f b7 04 43 movzx eax, WORD PTR [r11+rax*2] +; Line 3743 + 00038 85 c0 test eax, eax + 0003a 74 19 je SHORT $LN4@stbi__zhuf +; Line 3744 + 0003c 8b c8 mov ecx, eax + 0003e c1 e9 09 shr ecx, 9 +; Line 3746 + 00041 41 29 4a 10 sub DWORD PTR [r10+16], ecx + 00045 d3 ea shr edx, cl + 00047 41 89 52 14 mov DWORD PTR [r10+20], edx +; Line 3747 + 0004b 25 ff 01 00 00 and eax, 511 ; 000001ffH +; Line 3750 + 00050 48 83 c4 28 add rsp, 40 ; 00000028H + 00054 c3 ret 0 $LN4@stbi__zhuf: - -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); - - 000bd 48 8b d7 mov rdx, rdi - 000c0 49 8b c9 mov rcx, r9 - -; 3750 : } - - 000c3 48 83 c4 20 add rsp, 32 ; 00000020H - 000c7 5f pop rdi - -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); - - 000c8 e9 00 00 00 00 jmp stbi__zhuffman_decode_slowpath +; Line 3749 + 00055 49 8b d3 mov rdx, r11 + 00058 49 8b ca mov rcx, r10 +; Line 3750 + 0005b 48 83 c4 28 add rsp, 40 ; 00000028H +; Line 3749 + 0005f e9 00 00 00 00 jmp stbi__zhuffman_decode_slowpath stbi__zhuffman_decode ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__zexpand _TEXT SEGMENT z$ = 48 zout$ = 56 n$ = 64 stbi__zexpand PROC ; COMDAT - -; 3753 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3753 00000 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 3754 : char* q; -; 3755 : unsigned int cur, limit, old_limit; -; 3756 : z->zout = zout; -; 3757 : if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG"); - +; Line 3757 0000a 83 79 30 00 cmp DWORD PTR [rcx+48], 0 0000e 48 8b fa mov rdi, rdx 00011 48 8b d9 mov rbx, rcx 00014 48 89 51 18 mov QWORD PTR [rcx+24], rdx 00018 75 30 jne SHORT $LN4@stbi__zexp - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0001a 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00020 65 48 8b 04 25 @@ -29742,41 +19586,26 @@ stbi__zexpand PROC ; COMDAT 00032 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BE@IBFIPFO@output?5buffer?5limit@ 00039 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 3754 : char* q; -; 3755 : unsigned int cur, limit, old_limit; -; 3756 : z->zout = zout; -; 3757 : if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG"); - +; Line 3757 0003d 33 c0 xor eax, eax - -; 3772 : } - +; Line 3772 0003f 48 8b 5c 24 38 mov rbx, QWORD PTR [rsp+56] 00044 48 83 c4 20 add rsp, 32 ; 00000020H 00048 5f pop rdi 00049 c3 ret 0 $LN4@stbi__zexp: - -; 3758 : cur = (unsigned int)(z->zout - z->zout_start); - +; Line 3758 0004a 2b 79 20 sub edi, DWORD PTR [rcx+32] - -; 3759 : limit = old_limit = (unsigned)(z->zout_end - z->zout_start); - +; Line 3759 0004d 8b 49 28 mov ecx, DWORD PTR [rcx+40] - -; 3760 : if (UINT_MAX - cur < (unsigned)n) return stbi__err("outofmem", "Out of memory"); - +; Line 3760 00050 8b c7 mov eax, edi 00052 2b 4b 20 sub ecx, DWORD PTR [rbx+32] 00055 f7 d0 not eax 00057 41 3b c0 cmp eax, r8d 0005a 73 30 jae SHORT $LN17@stbi__zexp $LN18@stbi__zexp: - -; 3772 : } - +; Line 3772 0005c 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00062 65 48 8b 04 25 @@ -29792,30 +19621,21 @@ $LN18@stbi__zexp: 0008a 5f pop rdi 0008b c3 ret 0 $LN17@stbi__zexp: - -; 3761 : while (cur + n > limit) { - +; Line 3761 0008c 42 8d 04 07 lea eax, DWORD PTR [rdi+r8] 00090 3b c1 cmp eax, ecx 00092 76 0e jbe SHORT $LN3@stbi__zexp $LL2@stbi__zexp: - -; 3762 : if (limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); - +; Line 3762 00094 81 f9 ff ff ff 7f cmp ecx, 2147483647 ; 7fffffffH 0009a 77 c0 ja SHORT $LN18@stbi__zexp - -; 3763 : limit *= 2; - +; Line 3763 0009c 03 c9 add ecx, ecx 0009e 3b c1 cmp eax, ecx 000a0 77 f2 ja SHORT $LL2@stbi__zexp $LN3@stbi__zexp: - -; 3764 : } -; 3765 : q = (char*)STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); - +; Line 3765 000a2 8b d1 mov edx, ecx 000a4 48 89 74 24 30 mov QWORD PTR [rsp+48], rsi 000a9 8b f1 mov esi, ecx @@ -29823,15 +19643,10 @@ $LN3@stbi__zexp: 000af ff 15 00 00 00 00 call QWORD PTR __imp_realloc 000b5 48 8b c8 mov rcx, rax - -; 3766 : STBI_NOTUSED(old_limit); -; 3767 : if (q == NULL) return stbi__err("outofmem", "Out of memory"); - +; Line 3767 000b8 48 85 c0 test rax, rax 000bb 75 35 jne SHORT $LN7@stbi__zexp - -; 431 : stbi__g_failure_reason = str; - +; Line 431 000bd 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 000c3 65 48 8b 04 25 @@ -29842,40 +19657,26 @@ $LN3@stbi__zexp: 000da 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ 000e1 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 3766 : STBI_NOTUSED(old_limit); -; 3767 : if (q == NULL) return stbi__err("outofmem", "Out of memory"); - +; Line 3767 000e5 33 c0 xor eax, eax - -; 3772 : } - +; Line 3772 000e7 48 8b 5c 24 38 mov rbx, QWORD PTR [rsp+56] 000ec 48 83 c4 20 add rsp, 32 ; 00000020H 000f0 5f pop rdi 000f1 c3 ret 0 $LN7@stbi__zexp: - -; 3768 : z->zout_start = q; -; 3769 : z->zout = q + cur; - +; Line 3769 000f2 8b c7 mov eax, edi 000f4 48 03 c1 add rax, rcx 000f7 48 89 4b 20 mov QWORD PTR [rbx+32], rcx 000fb 48 89 43 18 mov QWORD PTR [rbx+24], rax - -; 3770 : z->zout_end = q + limit; - +; Line 3770 000ff 48 8d 04 0e lea rax, QWORD PTR [rsi+rcx] 00103 48 8b 74 24 30 mov rsi, QWORD PTR [rsp+48] 00108 48 89 43 28 mov QWORD PTR [rbx+40], rax - -; 3771 : return 1; - +; Line 3771 0010c b8 01 00 00 00 mov eax, 1 - -; 3772 : } - +; Line 3772 00111 48 8b 5c 24 38 mov rbx, QWORD PTR [rsp+56] 00116 48 83 c4 20 add rsp, 32 ; 00000020H 0011a 5f pop rdi @@ -29883,732 +19684,419 @@ $LN7@stbi__zexp: stbi__zexpand ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__parse_huffman_block _TEXT SEGMENT a$ = 64 stbi__parse_huffman_block PROC ; COMDAT - -; 3789 : { - - 00000 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx - 00005 48 89 6c 24 18 mov QWORD PTR [rsp+24], rbp - 0000a 48 89 74 24 20 mov QWORD PTR [rsp+32], rsi - 0000f 57 push rdi - 00010 41 54 push r12 - 00012 41 57 push r15 - 00014 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 3790 : char* zout = a->zout; - - 00018 48 8b 71 18 mov rsi, QWORD PTR [rcx+24] - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 0001c 4c 8d 25 00 00 +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3789 + 00000 48 89 5c 24 18 mov QWORD PTR [rsp+24], rbx + 00005 48 89 74 24 20 mov QWORD PTR [rsp+32], rsi + 0000a 57 push rdi + 0000b 41 54 push r12 + 0000d 41 57 push r15 + 0000f 48 83 ec 20 sub rsp, 32 ; 00000020H +; Line 3790 + 00013 48 8b 71 18 mov rsi, QWORD PTR [rcx+24] +; Line 3684 + 00017 4c 8d 25 00 00 00 00 lea r12, OFFSET FLAT:__ImageBase - -; 3789 : { - + 0001e 48 89 6c 24 40 mov QWORD PTR [rsp+64], rbp +; Line 3789 00023 48 8b d9 mov rbx, rcx - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 00026 4c 89 74 24 40 mov QWORD PTR [rsp+64], r14 +; Line 3684 + 00026 4c 89 74 24 48 mov QWORD PTR [rsp+72], r14 0002b 0f 1f 44 00 00 npad 5 $LL2@stbi__pars: - -; 3736 : if (a->num_bits < 16) { - - 00030 44 8b 43 10 mov r8d, DWORD PTR [rbx+16] - 00034 41 83 f8 10 cmp r8d, 16 - 00038 7d 64 jge SHORT $LN39@stbi__pars - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 0003a 4c 8b 53 08 mov r10, QWORD PTR [rbx+8] - 0003e 48 8b 13 mov rdx, QWORD PTR [rbx] - 00041 49 3b d2 cmp rdx, r10 - -; 3737 : if (stbi__zeof(a)) { - - 00044 0f 83 6c 03 00 - 00 jae $LN165@stbi__pars - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 0004a 44 8b 4b 14 mov r9d, DWORD PTR [rbx+20] - -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); - - 0004e 41 8b c8 mov ecx, r8d - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 00051 b8 01 00 00 00 mov eax, 1 - 00056 d3 e0 shl eax, cl - 00058 44 3b c8 cmp r9d, eax - 0005b 73 3e jae SHORT $LN113@stbi__pars - 0005d 0f 1f 00 npad 3 -$LL40@stbi__pars: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 00060 49 3b d2 cmp rdx, r10 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - - 00063 72 04 jb SHORT $LN45@stbi__pars - 00065 32 c0 xor al, al - 00067 eb 09 jmp SHORT $LN46@stbi__pars -$LN45@stbi__pars: - 00069 0f b6 02 movzx eax, BYTE PTR [rdx] - 0006c 48 ff c2 inc rdx - 0006f 48 89 13 mov QWORD PTR [rbx], rdx -$LN46@stbi__pars: - -; 3700 : z->num_bits += 8; - - 00072 44 8d 41 08 lea r8d, DWORD PTR [rcx+8] - 00076 0f b6 c0 movzx eax, al - 00079 d3 e0 shl eax, cl - 0007b 44 0b c8 or r9d, eax - 0007e 44 89 43 10 mov DWORD PTR [rbx+16], r8d - 00082 44 89 4b 14 mov DWORD PTR [rbx+20], r9d - -; 3701 : } while (z->num_bits <= 24); - - 00086 41 83 f8 18 cmp r8d, 24 - 0008a 7f 12 jg SHORT $LN39@stbi__pars - 0008c 41 8b c8 mov ecx, r8d - 0008f b8 01 00 00 00 mov eax, 1 - 00094 d3 e0 shl eax, cl - 00096 44 3b c8 cmp r9d, eax - 00099 72 c5 jb SHORT $LL40@stbi__pars -$LN113@stbi__pars: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - - 0009b 4c 89 13 mov QWORD PTR [rbx], r10 -$LN39@stbi__pars: - -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; - - 0009e 8b 53 14 mov edx, DWORD PTR [rbx+20] - 000a1 8b c2 mov eax, edx - 000a3 25 ff 01 00 00 and eax, 511 ; 000001ffH - 000a8 0f b7 7c 43 34 movzx edi, WORD PTR [rbx+rax*2+52] - -; 3743 : if (b) { - - 000ad 85 ff test edi, edi - 000af 74 19 je SHORT $LN33@stbi__pars - -; 3744 : s = b >> 9; - - 000b1 8b cf mov ecx, edi - 000b3 c1 e9 09 shr ecx, 9 - -; 3745 : a->code_buffer >>= s; - - 000b6 d3 ea shr edx, cl - -; 3746 : a->num_bits -= s; - - 000b8 44 2b c1 sub r8d, ecx - 000bb 89 53 14 mov DWORD PTR [rbx+20], edx - -; 3747 : return b & 511; - - 000be 81 e7 ff 01 00 +; Line 3736 + 00030 83 7b 10 10 cmp DWORD PTR [rbx+16], 16 + 00034 7d 15 jge SHORT $LN31@stbi__pars +; Line 3684 + 00036 48 8b 43 08 mov rax, QWORD PTR [rbx+8] + 0003a 48 39 03 cmp QWORD PTR [rbx], rax +; Line 3737 + 0003d 0f 83 d3 02 00 + 00 jae $LN113@stbi__pars +; Line 3740 + 00043 48 8b cb mov rcx, rbx + 00046 e8 00 00 00 00 call stbi__fill_bits +$LN31@stbi__pars: +; Line 3742 + 0004b 8b 53 14 mov edx, DWORD PTR [rbx+20] + 0004e 8b c2 mov eax, edx + 00050 25 ff 01 00 00 and eax, 511 ; 000001ffH + 00055 0f b7 7c 43 34 movzx edi, WORD PTR [rbx+rax*2+52] +; Line 3743 + 0005a 85 ff test edi, edi + 0005c 74 15 je SHORT $LN33@stbi__pars +; Line 3744 + 0005e 8b cf mov ecx, edi + 00060 c1 e9 09 shr ecx, 9 +; Line 3746 + 00063 29 4b 10 sub DWORD PTR [rbx+16], ecx + 00066 d3 ea shr edx, cl + 00068 89 53 14 mov DWORD PTR [rbx+20], edx +; Line 3747 + 0006b 81 e7 ff 01 00 00 and edi, 511 ; 000001ffH - 000c4 44 89 43 10 mov DWORD PTR [rbx+16], r8d - 000c8 eb 0e jmp SHORT $LN30@stbi__pars + 00071 eb 0e jmp SHORT $LN30@stbi__pars $LN33@stbi__pars: - -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); - - 000ca 48 8d 53 34 lea rdx, QWORD PTR [rbx+52] - 000ce 48 8b cb mov rcx, rbx - 000d1 e8 00 00 00 00 call stbi__zhuffman_decode_slowpath - 000d6 8b f8 mov edi, eax +; Line 3749 + 00073 48 8d 53 34 lea rdx, QWORD PTR [rbx+52] + 00077 48 8b cb mov rcx, rbx + 0007a e8 00 00 00 00 call stbi__zhuffman_decode_slowpath + 0007f 8b f8 mov edi, eax $LN30@stbi__pars: - -; 3791 : for (;;) { -; 3792 : int z = stbi__zhuffman_decode(a, &a->z_length); -; 3793 : if (z < 256) { - - 000d8 81 ff 00 01 00 +; Line 3793 + 00081 81 ff 00 01 00 00 cmp edi, 256 ; 00000100H - 000de 7d 36 jge SHORT $LN11@stbi__pars - -; 3794 : if (z < 0) return stbi__err("bad huffman code", "Corrupt PNG"); // error in huffman codes - - 000e0 85 ff test edi, edi - 000e2 0f 88 ce 02 00 - 00 js $LN165@stbi__pars - -; 3795 : if (zout >= a->zout_end) { - - 000e8 48 3b 73 28 cmp rsi, QWORD PTR [rbx+40] - 000ec 72 1d jb SHORT $LN14@stbi__pars - -; 3796 : if (!stbi__zexpand(a, zout, 1)) return 0; - - 000ee 41 b8 01 00 00 + 00087 7d 36 jge SHORT $LN11@stbi__pars +; Line 3794 + 00089 85 ff test edi, edi + 0008b 0f 88 85 02 00 + 00 js $LN113@stbi__pars +; Line 3795 + 00091 48 3b 73 28 cmp rsi, QWORD PTR [rbx+40] + 00095 72 1d jb SHORT $LN14@stbi__pars +; Line 3796 + 00097 41 b8 01 00 00 00 mov r8d, 1 - 000f4 48 8b d6 mov rdx, rsi - 000f7 48 8b cb mov rcx, rbx - 000fa e8 00 00 00 00 call stbi__zexpand - 000ff 85 c0 test eax, eax - 00101 0f 84 d2 02 00 - 00 je $LN123@stbi__pars - -; 3797 : zout = a->zout; - - 00107 48 8b 73 18 mov rsi, QWORD PTR [rbx+24] + 0009d 48 8b d6 mov rdx, rsi + 000a0 48 8b cb mov rcx, rbx + 000a3 e8 00 00 00 00 call stbi__zexpand + 000a8 85 c0 test eax, eax + 000aa 0f 84 89 02 00 + 00 je $LN95@stbi__pars +; Line 3797 + 000b0 48 8b 73 18 mov rsi, QWORD PTR [rbx+24] $LN14@stbi__pars: - -; 3798 : } -; 3799 : *zout++ = (char)z; - - 0010b 40 88 3e mov BYTE PTR [rsi], dil - 0010e 48 ff c6 inc rsi - -; 3800 : } - - 00111 e9 1a ff ff ff jmp $LL2@stbi__pars +; Line 3799 + 000b4 40 88 3e mov BYTE PTR [rsi], dil + 000b7 48 ff c6 inc rsi +; Line 3800 + 000ba e9 71 ff ff ff jmp $LL2@stbi__pars $LN11@stbi__pars: - -; 3801 : else { -; 3802 : stbi_uc* p; -; 3803 : int len, dist; -; 3804 : if (z == 256) { - - 00116 0f 84 e8 02 00 - 00 je $LN119@stbi__pars - -; 3807 : } -; 3808 : if (z >= 286) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data - - 0011c 81 ff 1e 01 00 +; Line 3804 + 000bf 0f 84 9f 02 00 + 00 je $LN91@stbi__pars +; Line 3808 + 000c5 81 ff 1e 01 00 00 cmp edi, 286 ; 0000011eH - 00122 0f 8d 8e 02 00 - 00 jge $LN165@stbi__pars - -; 3809 : z -= 257; -; 3810 : len = stbi__zlength_base[z]; - - 00128 48 63 c7 movsxd rax, edi - -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); - - 0012b 41 8b bc 84 fc - fb ff ff mov edi, DWORD PTR stbi__zlength_extra[r12+rax*4-1028] - 00133 41 8b ac 84 fc - fb ff ff mov ebp, DWORD PTR stbi__zlength_base[r12+rax*4-1028] - 0013b 85 ff test edi, edi - 0013d 0f 84 92 00 00 - 00 je $LN163@stbi__pars - -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - - 00143 44 8b 43 10 mov r8d, DWORD PTR [rbx+16] - 00147 44 3b c7 cmp r8d, edi - 0014a 7d 69 jge SHORT $LN58@stbi__pars - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 0014c 8b 53 14 mov edx, DWORD PTR [rbx+20] - 0014f 41 8b c8 mov ecx, r8d - 00152 b8 01 00 00 00 mov eax, 1 - -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); - - 00157 45 8b d0 mov r10d, r8d - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 0015a d3 e0 shl eax, cl - 0015c 45 8b c8 mov r9d, r8d - 0015f 3b d0 cmp edx, eax - 00161 73 48 jae SHORT $LN114@stbi__pars - 00163 4c 8b 5b 08 mov r11, QWORD PTR [rbx+8] -$LL59@stbi__pars: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 00167 48 8b 03 mov rax, QWORD PTR [rbx] - 0016a 49 3b c3 cmp rax, r11 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - - 0016d 72 04 jb SHORT $LN64@stbi__pars - 0016f 32 c9 xor cl, cl - 00171 eb 09 jmp SHORT $LN65@stbi__pars -$LN64@stbi__pars: - 00173 0f b6 08 movzx ecx, BYTE PTR [rax] - 00176 48 ff c0 inc rax - 00179 48 89 03 mov QWORD PTR [rbx], rax -$LN65@stbi__pars: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - - 0017c 0f b6 c1 movzx eax, cl - -; 3700 : z->num_bits += 8; - - 0017f 45 8d 42 08 lea r8d, DWORD PTR [r10+8] - 00183 41 8b ca mov ecx, r10d - 00186 44 89 43 10 mov DWORD PTR [rbx+16], r8d - 0018a d3 e0 shl eax, cl - 0018c 0b d0 or edx, eax - 0018e 89 53 14 mov DWORD PTR [rbx+20], edx - -; 3701 : } while (z->num_bits <= 24); - - 00191 41 83 f8 18 cmp r8d, 24 - 00195 7f 1e jg SHORT $LN58@stbi__pars - -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 00197 41 8b c8 mov ecx, r8d - 0019a b8 01 00 00 00 mov eax, 1 - 0019f d3 e0 shl eax, cl - -; 3701 : } while (z->num_bits <= 24); - - 001a1 45 8b d0 mov r10d, r8d - 001a4 45 8b c8 mov r9d, r8d - 001a7 3b d0 cmp edx, eax - 001a9 72 bc jb SHORT $LL59@stbi__pars -$LN114@stbi__pars: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - - 001ab 48 8b 43 08 mov rax, QWORD PTR [rbx+8] - 001af 45 8b c1 mov r8d, r9d - 001b2 48 89 03 mov QWORD PTR [rbx], rax -$LN58@stbi__pars: - -; 3708 : k = z->code_buffer & ((1 << n) - 1); - - 001b5 8b 53 14 mov edx, DWORD PTR [rbx+20] - -; 3709 : z->code_buffer >>= n; - - 001b8 8b cf mov ecx, edi - -; 3710 : z->num_bits -= n; - - 001ba 44 2b c7 sub r8d, edi - 001bd 8b c2 mov eax, edx - 001bf d3 e8 shr eax, cl - 001c1 89 43 14 mov DWORD PTR [rbx+20], eax - 001c4 b8 01 00 00 00 mov eax, 1 - 001c9 d3 e0 shl eax, cl - 001cb ff c8 dec eax - 001cd 44 89 43 10 mov DWORD PTR [rbx+16], r8d - 001d1 23 c2 and eax, edx - -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); - - 001d3 03 e8 add ebp, eax -$LN163@stbi__pars: - -; 3736 : if (a->num_bits < 16) { - - 001d5 44 8b 43 10 mov r8d, DWORD PTR [rbx+16] - 001d9 41 83 f8 10 cmp r8d, 16 - 001dd 7d 61 jge SHORT $LN77@stbi__pars - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 001df 4c 8b 53 08 mov r10, QWORD PTR [rbx+8] - 001e3 48 8b 13 mov rdx, QWORD PTR [rbx] - 001e6 49 3b d2 cmp rdx, r10 - -; 3737 : if (stbi__zeof(a)) { - - 001e9 0f 83 c7 01 00 - 00 jae $LN165@stbi__pars - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 001ef 44 8b 4b 14 mov r9d, DWORD PTR [rbx+20] - -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); - - 001f3 41 8b c8 mov ecx, r8d - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 001f6 b8 01 00 00 00 mov eax, 1 - 001fb d3 e0 shl eax, cl - 001fd 44 3b c8 cmp r9d, eax - 00200 73 3b jae SHORT $LN115@stbi__pars -$LL78@stbi__pars: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 00202 49 3b d2 cmp rdx, r10 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - - 00205 72 04 jb SHORT $LN83@stbi__pars - 00207 32 c0 xor al, al - 00209 eb 09 jmp SHORT $LN84@stbi__pars -$LN83@stbi__pars: - 0020b 0f b6 02 movzx eax, BYTE PTR [rdx] - 0020e 48 ff c2 inc rdx - 00211 48 89 13 mov QWORD PTR [rbx], rdx -$LN84@stbi__pars: - -; 3700 : z->num_bits += 8; - - 00214 44 8d 41 08 lea r8d, DWORD PTR [rcx+8] - 00218 0f b6 c0 movzx eax, al - 0021b d3 e0 shl eax, cl - 0021d 44 0b c8 or r9d, eax - 00220 44 89 43 10 mov DWORD PTR [rbx+16], r8d - 00224 44 89 4b 14 mov DWORD PTR [rbx+20], r9d - -; 3701 : } while (z->num_bits <= 24); - - 00228 41 83 f8 18 cmp r8d, 24 - 0022c 7f 12 jg SHORT $LN77@stbi__pars - 0022e 41 8b c8 mov ecx, r8d - 00231 b8 01 00 00 00 mov eax, 1 - 00236 d3 e0 shl eax, cl - 00238 44 3b c8 cmp r9d, eax - 0023b 72 c5 jb SHORT $LL78@stbi__pars -$LN115@stbi__pars: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - - 0023d 4c 89 13 mov QWORD PTR [rbx], r10 -$LN77@stbi__pars: - -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; - - 00240 8b 53 14 mov edx, DWORD PTR [rbx+20] - 00243 8b c2 mov eax, edx - 00245 25 ff 01 00 00 and eax, 511 ; 000001ffH - 0024a 0f b7 84 43 18 + 000cb 0f 8d 45 02 00 + 00 jge $LN113@stbi__pars +; Line 3810 + 000d1 48 63 c7 movsxd rax, edi +; Line 3811 + 000d4 41 8b ac 84 fc + fb ff ff mov ebp, DWORD PTR stbi__zlength_extra[r12+rax*4-1028] + 000dc 41 8b bc 84 fc + fb ff ff mov edi, DWORD PTR stbi__zlength_base[r12+rax*4-1028] + 000e4 85 ed test ebp, ebp + 000e6 0f 84 92 00 00 + 00 je $LN111@stbi__pars +; Line 3707 + 000ec 44 8b 43 10 mov r8d, DWORD PTR [rbx+16] + 000f0 44 3b c5 cmp r8d, ebp + 000f3 7d 69 jge SHORT $LN46@stbi__pars +; Line 3695 + 000f5 8b 53 14 mov edx, DWORD PTR [rbx+20] + 000f8 41 8b c8 mov ecx, r8d + 000fb b8 01 00 00 00 mov eax, 1 +; Line 3815 + 00100 45 8b d0 mov r10d, r8d +; Line 3695 + 00103 d3 e0 shl eax, cl + 00105 45 8b c8 mov r9d, r8d + 00108 3b d0 cmp edx, eax + 0010a 73 48 jae SHORT $LN87@stbi__pars + 0010c 4c 8b 5b 08 mov r11, QWORD PTR [rbx+8] +$LL47@stbi__pars: +; Line 3684 + 00110 48 8b 03 mov rax, QWORD PTR [rbx] + 00113 49 3b c3 cmp rax, r11 +; Line 3689 + 00116 72 04 jb SHORT $LN52@stbi__pars + 00118 32 c9 xor cl, cl + 0011a eb 09 jmp SHORT $LN53@stbi__pars +$LN52@stbi__pars: + 0011c 0f b6 08 movzx ecx, BYTE PTR [rax] + 0011f 48 ff c0 inc rax + 00122 48 89 03 mov QWORD PTR [rbx], rax +$LN53@stbi__pars: +; Line 3699 + 00125 0f b6 c1 movzx eax, cl +; Line 3700 + 00128 45 8d 42 08 lea r8d, DWORD PTR [r10+8] + 0012c 41 8b ca mov ecx, r10d + 0012f 44 89 43 10 mov DWORD PTR [rbx+16], r8d + 00133 d3 e0 shl eax, cl + 00135 0b d0 or edx, eax + 00137 89 53 14 mov DWORD PTR [rbx+20], edx +; Line 3701 + 0013a 41 83 f8 18 cmp r8d, 24 + 0013e 7f 1e jg SHORT $LN46@stbi__pars +; Line 3695 + 00140 41 8b c8 mov ecx, r8d + 00143 b8 01 00 00 00 mov eax, 1 + 00148 d3 e0 shl eax, cl +; Line 3701 + 0014a 45 8b d0 mov r10d, r8d + 0014d 45 8b c8 mov r9d, r8d + 00150 3b d0 cmp edx, eax + 00152 72 bc jb SHORT $LL47@stbi__pars +$LN87@stbi__pars: +; Line 3696 + 00154 48 8b 43 08 mov rax, QWORD PTR [rbx+8] + 00158 45 8b c1 mov r8d, r9d + 0015b 48 89 03 mov QWORD PTR [rbx], rax +$LN46@stbi__pars: +; Line 3708 + 0015e 8b 53 14 mov edx, DWORD PTR [rbx+20] +; Line 3709 + 00161 8b cd mov ecx, ebp +; Line 3710 + 00163 44 2b c5 sub r8d, ebp + 00166 8b c2 mov eax, edx + 00168 d3 e8 shr eax, cl + 0016a 89 43 14 mov DWORD PTR [rbx+20], eax + 0016d b8 01 00 00 00 mov eax, 1 + 00172 d3 e0 shl eax, cl + 00174 ff c8 dec eax + 00176 44 89 43 10 mov DWORD PTR [rbx+16], r8d + 0017a 23 c2 and eax, edx +; Line 3811 + 0017c 03 f8 add edi, eax +$LN111@stbi__pars: +; Line 3736 + 0017e 83 7b 10 10 cmp DWORD PTR [rbx+16], 16 + 00182 7d 15 jge SHORT $LN57@stbi__pars +; Line 3684 + 00184 48 8b 43 08 mov rax, QWORD PTR [rbx+8] + 00188 48 39 03 cmp QWORD PTR [rbx], rax +; Line 3737 + 0018b 0f 83 85 01 00 + 00 jae $LN113@stbi__pars +; Line 3740 + 00191 48 8b cb mov rcx, rbx + 00194 e8 00 00 00 00 call stbi__fill_bits +$LN57@stbi__pars: +; Line 3742 + 00199 8b 53 14 mov edx, DWORD PTR [rbx+20] + 0019c 8b c2 mov eax, edx + 0019e 25 ff 01 00 00 and eax, 511 ; 000001ffH + 001a3 0f b7 84 43 18 08 00 00 movzx eax, WORD PTR [rbx+rax*2+2072] - -; 3743 : if (b) { - - 00252 85 c0 test eax, eax - 00254 74 18 je SHORT $LN71@stbi__pars - -; 3744 : s = b >> 9; - - 00256 8b c8 mov ecx, eax - 00258 c1 e9 09 shr ecx, 9 - -; 3745 : a->code_buffer >>= s; - - 0025b d3 ea shr edx, cl - -; 3746 : a->num_bits -= s; - - 0025d 44 2b c1 sub r8d, ecx - 00260 89 53 14 mov DWORD PTR [rbx+20], edx - -; 3747 : return b & 511; - - 00263 25 ff 01 00 00 and eax, 511 ; 000001ffH - 00268 44 89 43 10 mov DWORD PTR [rbx+16], r8d - 0026c eb 0f jmp SHORT $LN68@stbi__pars -$LN71@stbi__pars: - -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); - - 0026e 48 8d 93 18 08 +; Line 3743 + 001ab 85 c0 test eax, eax + 001ad 74 14 je SHORT $LN59@stbi__pars +; Line 3744 + 001af 8b c8 mov ecx, eax + 001b1 c1 e9 09 shr ecx, 9 +; Line 3746 + 001b4 29 4b 10 sub DWORD PTR [rbx+16], ecx + 001b7 d3 ea shr edx, cl + 001b9 89 53 14 mov DWORD PTR [rbx+20], edx +; Line 3747 + 001bc 25 ff 01 00 00 and eax, 511 ; 000001ffH + 001c1 eb 0f jmp SHORT $LN56@stbi__pars +$LN59@stbi__pars: +; Line 3749 + 001c3 48 8d 93 18 08 00 00 lea rdx, QWORD PTR [rbx+2072] - 00275 48 8b cb mov rcx, rbx - 00278 e8 00 00 00 00 call stbi__zhuffman_decode_slowpath -$LN68@stbi__pars: - -; 3812 : z = stbi__zhuffman_decode(a, &a->z_distance); -; 3813 : if (z < 0 || z >= 30) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data - - 0027d 83 f8 1d cmp eax, 29 - 00280 0f 87 30 01 00 - 00 ja $LN165@stbi__pars - -; 3814 : dist = stbi__zdist_base[z]; - - 00286 48 98 cdqe - -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); - - 00288 45 8b 9c 84 00 - 00 00 00 mov r11d, DWORD PTR stbi__zdist_extra[r12+rax*4] - 00290 45 8b b4 84 00 + 001ca 48 8b cb mov rcx, rbx + 001cd e8 00 00 00 00 call stbi__zhuffman_decode_slowpath +$LN56@stbi__pars: +; Line 3813 + 001d2 83 f8 1d cmp eax, 29 + 001d5 0f 87 3b 01 00 + 00 ja $LN113@stbi__pars +; Line 3814 + 001db 48 98 cdqe +; Line 3815 + 001dd 41 8b ac 84 00 + 00 00 00 mov ebp, DWORD PTR stbi__zdist_extra[r12+rax*4] + 001e5 45 8b b4 84 00 00 00 00 mov r14d, DWORD PTR stbi__zdist_base[r12+rax*4] - 00298 45 85 db test r11d, r11d - 0029b 0f 84 8b 00 00 - 00 je $LN162@stbi__pars - -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - - 002a1 44 8b 43 10 mov r8d, DWORD PTR [rbx+16] - 002a5 45 3b c3 cmp r8d, r11d - 002a8 7d 60 jge SHORT $LN94@stbi__pars - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 002aa 8b 53 14 mov edx, DWORD PTR [rbx+20] - 002ad 41 8b c8 mov ecx, r8d - 002b0 b8 01 00 00 00 mov eax, 1 - -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); - - 002b5 45 8b c8 mov r9d, r8d - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 002b8 d3 e0 shl eax, cl - 002ba 3b d0 cmp edx, eax - 002bc 73 45 jae SHORT $LN116@stbi__pars - 002be 4c 8b 53 08 mov r10, QWORD PTR [rbx+8] -$LL95@stbi__pars: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 002c2 48 8b 03 mov rax, QWORD PTR [rbx] - 002c5 49 3b c2 cmp rax, r10 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - - 002c8 72 04 jb SHORT $LN100@stbi__pars - 002ca 32 c9 xor cl, cl - 002cc eb 09 jmp SHORT $LN101@stbi__pars -$LN100@stbi__pars: - 002ce 0f b6 08 movzx ecx, BYTE PTR [rax] - 002d1 48 ff c0 inc rax - 002d4 48 89 03 mov QWORD PTR [rbx], rax -$LN101@stbi__pars: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - - 002d7 0f b6 c1 movzx eax, cl - -; 3700 : z->num_bits += 8; - - 002da 45 8d 41 08 lea r8d, DWORD PTR [r9+8] - 002de 41 8b c9 mov ecx, r9d - 002e1 44 89 43 10 mov DWORD PTR [rbx+16], r8d - 002e5 d3 e0 shl eax, cl - 002e7 0b d0 or edx, eax - 002e9 89 53 14 mov DWORD PTR [rbx+20], edx - -; 3701 : } while (z->num_bits <= 24); - - 002ec 41 83 f8 18 cmp r8d, 24 - 002f0 7f 18 jg SHORT $LN94@stbi__pars - -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 002f2 41 8b c8 mov ecx, r8d - 002f5 b8 01 00 00 00 mov eax, 1 - 002fa d3 e0 shl eax, cl - -; 3701 : } while (z->num_bits <= 24); - - 002fc 45 8b c8 mov r9d, r8d - 002ff 3b d0 cmp edx, eax - 00301 72 bf jb SHORT $LL95@stbi__pars -$LN116@stbi__pars: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - - 00303 48 8b 43 08 mov rax, QWORD PTR [rbx+8] - 00307 48 89 03 mov QWORD PTR [rbx], rax -$LN94@stbi__pars: - -; 3708 : k = z->code_buffer & ((1 << n) - 1); - - 0030a 8b 53 14 mov edx, DWORD PTR [rbx+20] - -; 3709 : z->code_buffer >>= n; - - 0030d 41 8b cb mov ecx, r11d - -; 3710 : z->num_bits -= n; - - 00310 45 2b c3 sub r8d, r11d - 00313 8b c2 mov eax, edx - 00315 d3 e8 shr eax, cl - 00317 89 43 14 mov DWORD PTR [rbx+20], eax - 0031a b8 01 00 00 00 mov eax, 1 - 0031f d3 e0 shl eax, cl - 00321 ff c8 dec eax - 00323 44 89 43 10 mov DWORD PTR [rbx+16], r8d - 00327 23 c2 and eax, edx - -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); - - 00329 44 03 f0 add r14d, eax -$LN162@stbi__pars: - -; 3816 : if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG"); - - 0032c 48 8b c6 mov rax, rsi - 0032f 49 63 fe movsxd rdi, r14d - 00332 48 2b 43 20 sub rax, QWORD PTR [rbx+32] - 00336 48 3b c7 cmp rax, rdi - 00339 0f 8c 9e 00 00 - 00 jl $LN122@stbi__pars - -; 3817 : if (zout + len > a->zout_end) { - - 0033f 48 63 c5 movsxd rax, ebp - 00342 48 03 c6 add rax, rsi - 00345 48 3b 43 28 cmp rax, QWORD PTR [rbx+40] - 00349 76 16 jbe SHORT $LN23@stbi__pars - -; 3818 : if (!stbi__zexpand(a, zout, len)) return 0; - - 0034b 44 8b c5 mov r8d, ebp - 0034e 48 8b d6 mov rdx, rsi - 00351 48 8b cb mov rcx, rbx - 00354 e8 00 00 00 00 call stbi__zexpand - 00359 85 c0 test eax, eax - 0035b 74 7c je SHORT $LN123@stbi__pars - -; 3819 : zout = a->zout; - - 0035d 48 8b 73 18 mov rsi, QWORD PTR [rbx+24] + 001ed 85 ed test ebp, ebp + 001ef 0f 84 9d 00 00 + 00 je $LN110@stbi__pars +; Line 3707 + 001f5 44 8b 43 10 mov r8d, DWORD PTR [rbx+16] + 001f9 44 3b c5 cmp r8d, ebp + 001fc 7d 73 jge SHORT $LN70@stbi__pars +; Line 3695 + 001fe 44 8b 4b 14 mov r9d, DWORD PTR [rbx+20] + 00202 41 8b c8 mov ecx, r8d + 00205 b8 01 00 00 00 mov eax, 1 +; Line 3811 + 0020a 45 8b d0 mov r10d, r8d +; Line 3695 + 0020d d3 e0 shl eax, cl + 0020f 41 8b d0 mov edx, r8d + 00212 44 3b c8 cmp r9d, eax + 00215 73 50 jae SHORT $LN88@stbi__pars + 00217 4c 8b 5b 08 mov r11, QWORD PTR [rbx+8] + 0021b 0f 1f 44 00 00 npad 5 +$LL71@stbi__pars: +; Line 3684 + 00220 48 8b 03 mov rax, QWORD PTR [rbx] + 00223 49 3b c3 cmp rax, r11 +; Line 3689 + 00226 72 04 jb SHORT $LN76@stbi__pars + 00228 32 c9 xor cl, cl + 0022a eb 09 jmp SHORT $LN77@stbi__pars +$LN76@stbi__pars: + 0022c 0f b6 08 movzx ecx, BYTE PTR [rax] + 0022f 48 ff c0 inc rax + 00232 48 89 03 mov QWORD PTR [rbx], rax +$LN77@stbi__pars: +; Line 3699 + 00235 0f b6 c1 movzx eax, cl +; Line 3700 + 00238 45 8d 42 08 lea r8d, DWORD PTR [r10+8] + 0023c 41 8b ca mov ecx, r10d + 0023f 44 89 43 10 mov DWORD PTR [rbx+16], r8d + 00243 d3 e0 shl eax, cl + 00245 44 0b c8 or r9d, eax + 00248 44 89 4b 14 mov DWORD PTR [rbx+20], r9d +; Line 3701 + 0024c 41 83 f8 18 cmp r8d, 24 + 00250 7f 1f jg SHORT $LN70@stbi__pars +; Line 3695 + 00252 41 8b c8 mov ecx, r8d + 00255 b8 01 00 00 00 mov eax, 1 + 0025a d3 e0 shl eax, cl +; Line 3701 + 0025c 45 8b d0 mov r10d, r8d + 0025f 41 8b d0 mov edx, r8d + 00262 44 3b c8 cmp r9d, eax + 00265 72 b9 jb SHORT $LL71@stbi__pars +$LN88@stbi__pars: +; Line 3696 + 00267 48 8b 43 08 mov rax, QWORD PTR [rbx+8] + 0026b 44 8b c2 mov r8d, edx + 0026e 48 89 03 mov QWORD PTR [rbx], rax +$LN70@stbi__pars: +; Line 3708 + 00271 8b 53 14 mov edx, DWORD PTR [rbx+20] +; Line 3709 + 00274 8b cd mov ecx, ebp +; Line 3710 + 00276 44 2b c5 sub r8d, ebp + 00279 8b c2 mov eax, edx + 0027b d3 e8 shr eax, cl + 0027d 89 43 14 mov DWORD PTR [rbx+20], eax + 00280 b8 01 00 00 00 mov eax, 1 + 00285 d3 e0 shl eax, cl + 00287 ff c8 dec eax + 00289 44 89 43 10 mov DWORD PTR [rbx+16], r8d + 0028d 23 c2 and eax, edx +; Line 3815 + 0028f 44 03 f0 add r14d, eax +$LN110@stbi__pars: +; Line 3816 + 00292 48 8b c6 mov rax, rsi + 00295 49 63 ee movsxd rbp, r14d + 00298 48 2b 43 20 sub rax, QWORD PTR [rbx+32] + 0029c 48 3b c5 cmp rax, rbp + 0029f 0f 8c 98 00 00 + 00 jl $LN94@stbi__pars +; Line 3817 + 002a5 48 63 c7 movsxd rax, edi + 002a8 48 03 c6 add rax, rsi + 002ab 48 3b 43 28 cmp rax, QWORD PTR [rbx+40] + 002af 76 16 jbe SHORT $LN23@stbi__pars +; Line 3818 + 002b1 44 8b c7 mov r8d, edi + 002b4 48 8b d6 mov rdx, rsi + 002b7 48 8b cb mov rcx, rbx + 002ba e8 00 00 00 00 call stbi__zexpand + 002bf 85 c0 test eax, eax + 002c1 74 76 je SHORT $LN95@stbi__pars +; Line 3819 + 002c3 48 8b 73 18 mov rsi, QWORD PTR [rbx+24] $LN23@stbi__pars: - -; 3820 : } -; 3821 : p = (stbi_uc*)(zout - dist); - - 00361 48 8b ce mov rcx, rsi - 00364 48 2b cf sub rcx, rdi - -; 3822 : if (dist == 1) { // run of one byte; common in images. - - 00367 41 83 fe 01 cmp r14d, 1 - 0036b 75 20 jne SHORT $LN25@stbi__pars - -; 3824 : if (len) { do *zout++ = v; while (--len); } - - 0036d 85 ed test ebp, ebp - 0036f 0f 84 bb fc ff +; Line 3821 + 002c7 48 8b ce mov rcx, rsi + 002ca 48 2b cd sub rcx, rbp +; Line 3822 + 002cd 41 83 fe 01 cmp r14d, 1 + 002d1 75 1e jne SHORT $LN25@stbi__pars +; Line 3824 + 002d3 85 ff test edi, edi + 002d5 0f 84 55 fd ff ff je $LL2@stbi__pars - -; 3823 : stbi_uc v = *p; - - 00375 0f b6 11 movzx edx, BYTE PTR [rcx] - 00378 48 8b ce mov rcx, rsi - 0037b 44 8b c5 mov r8d, ebp - 0037e 8b fd mov edi, ebp - 00380 e8 00 00 00 00 call memset - 00385 48 03 f7 add rsi, rdi - -; 3825 : } - - 00388 e9 a3 fc ff ff jmp $LL2@stbi__pars +; Line 3823 + 002db 0f b6 11 movzx edx, BYTE PTR [rcx] + 002de 4c 8b c7 mov r8, rdi + 002e1 48 8b ce mov rcx, rsi + 002e4 e8 00 00 00 00 call memset + 002e9 48 03 f7 add rsi, rdi +; Line 3825 + 002ec e9 3f fd ff ff jmp $LL2@stbi__pars $LN25@stbi__pars: - -; 3826 : else { -; 3827 : if (len) { do *zout++ = *p++; while (--len); } - - 0038d 85 ed test ebp, ebp - 0038f 0f 84 9b fc ff +; Line 3827 + 002f1 85 ff test edi, edi + 002f3 0f 84 37 fd ff ff je $LL2@stbi__pars - 00395 66 66 66 0f 1f - 84 00 00 00 00 - 00 npad 11 + 002f9 0f 1f 80 00 00 + 00 00 npad 7 $LL10@stbi__pars: - 003a0 0f b6 01 movzx eax, BYTE PTR [rcx] - 003a3 48 8d 49 01 lea rcx, QWORD PTR [rcx+1] - 003a7 88 06 mov BYTE PTR [rsi], al - 003a9 48 ff c6 inc rsi - 003ac 83 ed 01 sub ebp, 1 - 003af 75 ef jne SHORT $LL10@stbi__pars - -; 3828 : } -; 3829 : } -; 3830 : } - - 003b1 e9 7a fc ff ff jmp $LL2@stbi__pars -$LN165@stbi__pars: - -; 3831 : } - - 003b6 8b 15 00 00 00 + 00300 0f b6 01 movzx eax, BYTE PTR [rcx] + 00303 48 8d 49 01 lea rcx, QWORD PTR [rcx+1] + 00307 88 06 mov BYTE PTR [rsi], al + 00309 48 ff c6 inc rsi + 0030c 83 ef 01 sub edi, 1 + 0030f 75 ef jne SHORT $LL10@stbi__pars +; Line 3830 + 00311 e9 1a fd ff ff jmp $LL2@stbi__pars +$LN113@stbi__pars: +; Line 3831 + 00316 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 003bc 65 48 8b 04 25 + 0031c 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 003c5 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 003ca 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 003ce 48 8d 15 00 00 + 00325 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 0032a 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 0032e 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BB@IIMLINA@bad?5huffman?5code@ - 003d5 48 89 14 01 mov QWORD PTR [rcx+rax], rdx -$LN123@stbi__pars: - 003d9 33 c0 xor eax, eax - 003db eb 30 jmp SHORT $LN3@stbi__pars -$LN122@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 003dd 8b 15 00 00 00 + 00335 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +$LN95@stbi__pars: + 00339 33 c0 xor eax, eax + 0033b eb 30 jmp SHORT $LN3@stbi__pars +$LN94@stbi__pars: +; Line 431 + 0033d 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 003e3 65 48 8b 04 25 + 00343 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 003ec b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 003f1 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 003f5 48 8d 15 00 00 + 0034c b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00351 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00355 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08DIAPIMGJ@bad?5dist@ - 003fc 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 3816 : if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG"); - - 00400 33 c0 xor eax, eax - 00402 eb 09 jmp SHORT $LN3@stbi__pars -$LN119@stbi__pars: - -; 3805 : a->zout = zout; - - 00404 48 89 73 18 mov QWORD PTR [rbx+24], rsi - -; 3806 : return 1; - - 00408 b8 01 00 00 00 mov eax, 1 + 0035c 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 3816 + 00360 33 c0 xor eax, eax + 00362 eb 09 jmp SHORT $LN3@stbi__pars +$LN91@stbi__pars: +; Line 3805 + 00364 48 89 73 18 mov QWORD PTR [rbx+24], rsi +; Line 3806 + 00368 b8 01 00 00 00 mov eax, 1 $LN3@stbi__pars: - -; 3831 : } - - 0040d 4c 8b 74 24 40 mov r14, QWORD PTR [rsp+64] - 00412 48 8b 5c 24 48 mov rbx, QWORD PTR [rsp+72] - 00417 48 8b 6c 24 50 mov rbp, QWORD PTR [rsp+80] - 0041c 48 8b 74 24 58 mov rsi, QWORD PTR [rsp+88] - 00421 48 83 c4 20 add rsp, 32 ; 00000020H - 00425 41 5f pop r15 - 00427 41 5c pop r12 - 00429 5f pop rdi - 0042a c3 ret 0 +; Line 3831 + 0036d 4c 8b 74 24 48 mov r14, QWORD PTR [rsp+72] + 00372 48 8b 6c 24 40 mov rbp, QWORD PTR [rsp+64] + 00377 48 8b 5c 24 50 mov rbx, QWORD PTR [rsp+80] + 0037c 48 8b 74 24 58 mov rsi, QWORD PTR [rsp+88] + 00381 48 83 c4 20 add rsp, 32 ; 00000020H + 00385 41 5f pop r15 + 00387 41 5c pop r12 + 00389 5f pop rdi + 0038a c3 ret 0 stbi__parse_huffman_block ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__compute_huffman_codes _TEXT SEGMENT ntot$1$ = 32 @@ -30619,9 +20107,8 @@ lencodes$ = 2112 __$ArrayPad$ = 2576 a$ = 2640 stbi__compute_huffman_codes PROC ; COMDAT - -; 3834 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3834 00000 40 53 push rbx 00002 55 push rbp 00003 41 54 push r12 @@ -30637,493 +20124,322 @@ stbi__compute_huffman_codes PROC ; COMDAT 00022 48 8b d9 mov rbx, rcx 00025 4c 89 b4 24 68 0a 00 00 mov QWORD PTR [rsp+2664], r14 - -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - +; Line 3707 0002d 8b 49 10 mov ecx, DWORD PTR [rcx+16] 00030 83 f9 05 cmp ecx, 5 - 00033 7d 64 jge SHORT $LN108@stbi__comp - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - + 00033 7d 64 jge SHORT $LN96@stbi__comp +; Line 3695 00035 8b 53 14 mov edx, DWORD PTR [rbx+20] 00038 b8 01 00 00 00 mov eax, 1 0003d d3 e0 shl eax, cl - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 0003f 44 8b c1 mov r8d, ecx - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - +; Line 3695 00042 44 8b c9 mov r9d, ecx 00045 3b d0 cmp edx, eax - 00047 73 46 jae SHORT $LN168@stbi__comp + 00047 73 46 jae SHORT $LN155@stbi__comp 00049 4c 8b 53 08 mov r10, QWORD PTR [rbx+8] 0004d 0f 1f 00 npad 3 -$LL109@stbi__comp: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +$LL97@stbi__comp: +; Line 3684 00050 48 8b 03 mov rax, QWORD PTR [rbx] 00053 49 3b c2 cmp rax, r10 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - - 00056 72 04 jb SHORT $LN114@stbi__comp +; Line 3689 + 00056 72 04 jb SHORT $LN102@stbi__comp 00058 32 c9 xor cl, cl - 0005a eb 09 jmp SHORT $LN115@stbi__comp -$LN114@stbi__comp: + 0005a eb 09 jmp SHORT $LN103@stbi__comp +$LN102@stbi__comp: 0005c 0f b6 08 movzx ecx, BYTE PTR [rax] 0005f 48 ff c0 inc rax 00062 48 89 03 mov QWORD PTR [rbx], rax -$LN115@stbi__comp: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - +$LN103@stbi__comp: +; Line 3699 00065 0f b6 c1 movzx eax, cl 00068 41 8b c8 mov ecx, r8d 0006b d3 e0 shl eax, cl - -; 3700 : z->num_bits += 8; - +; Line 3700 0006d 41 8d 48 08 lea ecx, DWORD PTR [r8+8] 00071 0b d0 or edx, eax 00073 89 4b 10 mov DWORD PTR [rbx+16], ecx 00076 89 53 14 mov DWORD PTR [rbx+20], edx - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 00079 83 f9 18 cmp ecx, 24 - 0007c 7f 1b jg SHORT $LN108@stbi__comp + 0007c 7f 1b jg SHORT $LN96@stbi__comp 0007e b8 01 00 00 00 mov eax, 1 00083 44 8b c1 mov r8d, ecx 00086 d3 e0 shl eax, cl 00088 44 8b c9 mov r9d, ecx 0008b 3b d0 cmp edx, eax - 0008d 72 c1 jb SHORT $LL109@stbi__comp -$LN168@stbi__comp: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - + 0008d 72 c1 jb SHORT $LL97@stbi__comp +$LN155@stbi__comp: +; Line 3696 0008f 48 8b 43 08 mov rax, QWORD PTR [rbx+8] 00093 41 8b c9 mov ecx, r9d 00096 48 89 03 mov QWORD PTR [rbx], rax -$LN108@stbi__comp: - -; 3708 : k = z->code_buffer & ((1 << n) - 1); - +$LN96@stbi__comp: +; Line 3708 00099 8b 43 14 mov eax, DWORD PTR [rbx+20] - -; 3710 : z->num_bits -= n; - +; Line 3710 0009c 8d 51 fb lea edx, DWORD PTR [rcx-5] 0009f 44 8b f8 mov r15d, eax 000a2 89 53 10 mov DWORD PTR [rbx+16], edx 000a5 83 e0 1f and eax, 31 000a8 41 c1 ef 05 shr r15d, 5 000ac 44 89 7b 14 mov DWORD PTR [rbx+20], r15d - -; 3835 : static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; -; 3836 : stbi__zhuffman z_codelength; -; 3837 : stbi_uc lencodes[286 + 32 + 137];//padding for maximum single op -; 3838 : stbi_uc codelength_sizes[19]; -; 3839 : int i, n; -; 3840 : -; 3841 : int hlit = stbi__zreceive(a, 5) + 257; - +; Line 3841 000b0 8d a8 01 01 00 00 lea ebp, DWORD PTR [rax+257] 000b6 89 6c 24 24 mov DWORD PTR hlit$1$[rsp], ebp - -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - +; Line 3707 000ba 83 fa 05 cmp edx, 5 - 000bd 7d 74 jge SHORT $LN123@stbi__comp - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - + 000bd 7d 74 jge SHORT $LN111@stbi__comp +; Line 3695 000bf 8b ca mov ecx, edx 000c1 b8 01 00 00 00 mov eax, 1 000c6 d3 e0 shl eax, cl - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 000c8 45 8b c7 mov r8d, r15d - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - +; Line 3695 000cb 44 8b ca mov r9d, edx 000ce 44 8b d2 mov r10d, edx 000d1 44 3b f8 cmp r15d, eax - 000d4 73 53 jae SHORT $LN169@stbi__comp + 000d4 73 53 jae SHORT $LN156@stbi__comp 000d6 4c 8b 5b 08 mov r11, QWORD PTR [rbx+8] 000da 66 0f 1f 44 00 00 npad 6 -$LL124@stbi__comp: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +$LL112@stbi__comp: +; Line 3684 000e0 48 8b 03 mov rax, QWORD PTR [rbx] 000e3 49 3b c3 cmp rax, r11 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - - 000e6 72 04 jb SHORT $LN129@stbi__comp +; Line 3689 + 000e6 72 04 jb SHORT $LN117@stbi__comp 000e8 32 c9 xor cl, cl - 000ea eb 09 jmp SHORT $LN130@stbi__comp -$LN129@stbi__comp: + 000ea eb 09 jmp SHORT $LN118@stbi__comp +$LN117@stbi__comp: 000ec 0f b6 08 movzx ecx, BYTE PTR [rax] 000ef 48 ff c0 inc rax 000f2 48 89 03 mov QWORD PTR [rbx], rax -$LN130@stbi__comp: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - +$LN118@stbi__comp: +; Line 3699 000f5 44 0f b6 f9 movzx r15d, cl - -; 3700 : z->num_bits += 8; - +; Line 3700 000f9 41 8d 52 08 lea edx, DWORD PTR [r10+8] 000fd 41 8b c9 mov ecx, r9d 00100 89 53 10 mov DWORD PTR [rbx+16], edx 00103 41 d3 e7 shl r15d, cl 00106 45 0b f8 or r15d, r8d 00109 44 89 7b 14 mov DWORD PTR [rbx+20], r15d - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 0010d 83 fa 18 cmp edx, 24 - 00110 7f 21 jg SHORT $LN123@stbi__comp - -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - + 00110 7f 21 jg SHORT $LN111@stbi__comp +; Line 3695 00112 8b ca mov ecx, edx 00114 b8 01 00 00 00 mov eax, 1 00119 d3 e0 shl eax, cl - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 0011b 45 8b c7 mov r8d, r15d 0011e 44 8b ca mov r9d, edx 00121 44 8b d2 mov r10d, edx 00124 44 3b f8 cmp r15d, eax - 00127 72 b7 jb SHORT $LL124@stbi__comp -$LN169@stbi__comp: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - + 00127 72 b7 jb SHORT $LL112@stbi__comp +$LN156@stbi__comp: +; Line 3696 00129 48 8b 43 08 mov rax, QWORD PTR [rbx+8] 0012d 45 8b f8 mov r15d, r8d 00130 48 89 03 mov QWORD PTR [rbx], rax -$LN123@stbi__comp: - -; 3709 : z->code_buffer >>= n; - +$LN111@stbi__comp: +; Line 3709 00133 45 8b c7 mov r8d, r15d 00136 48 89 bc 24 60 0a 00 00 mov QWORD PTR [rsp+2656], rdi - -; 3708 : k = z->code_buffer & ((1 << n) - 1); - +; Line 3708 0013e 41 83 e7 1f and r15d, 31 - -; 3709 : z->code_buffer >>= n; - +; Line 3709 00142 41 c1 e8 05 shr r8d, 5 - -; 3710 : z->num_bits -= n; - +; Line 3710 00146 83 c2 fb add edx, -5 00149 44 89 43 14 mov DWORD PTR [rbx+20], r8d - -; 3842 : int hdist = stbi__zreceive(a, 5) + 1; - +; Line 3842 0014d 41 ff c7 inc r15d - -; 3710 : z->num_bits -= n; - +; Line 3710 00150 89 53 10 mov DWORD PTR [rbx+16], edx - -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - +; Line 3707 00153 83 fa 04 cmp edx, 4 - 00156 7d 6e jge SHORT $LN138@stbi__comp - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - + 00156 7d 6e jge SHORT $LN126@stbi__comp +; Line 3695 00158 8b ca mov ecx, edx 0015a b8 01 00 00 00 mov eax, 1 0015f d3 e0 shl eax, cl - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 00161 45 8b c8 mov r9d, r8d - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - +; Line 3695 00164 44 8b d2 mov r10d, edx 00167 44 8b da mov r11d, edx 0016a 44 3b c0 cmp r8d, eax - 0016d 73 4d jae SHORT $LN170@stbi__comp + 0016d 73 4d jae SHORT $LN157@stbi__comp 0016f 48 8b 7b 08 mov rdi, QWORD PTR [rbx+8] -$LL139@stbi__comp: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +$LL127@stbi__comp: +; Line 3684 00173 48 8b 03 mov rax, QWORD PTR [rbx] 00176 48 3b c7 cmp rax, rdi - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - - 00179 72 04 jb SHORT $LN144@stbi__comp +; Line 3689 + 00179 72 04 jb SHORT $LN132@stbi__comp 0017b 32 c9 xor cl, cl - 0017d eb 09 jmp SHORT $LN145@stbi__comp -$LN144@stbi__comp: + 0017d eb 09 jmp SHORT $LN133@stbi__comp +$LN132@stbi__comp: 0017f 0f b6 08 movzx ecx, BYTE PTR [rax] 00182 48 ff c0 inc rax 00185 48 89 03 mov QWORD PTR [rbx], rax -$LN145@stbi__comp: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - +$LN133@stbi__comp: +; Line 3699 00188 44 0f b6 c1 movzx r8d, cl - -; 3700 : z->num_bits += 8; - +; Line 3700 0018c 41 8d 53 08 lea edx, DWORD PTR [r11+8] 00190 41 8b ca mov ecx, r10d 00193 89 53 10 mov DWORD PTR [rbx+16], edx 00196 41 d3 e0 shl r8d, cl 00199 45 0b c1 or r8d, r9d 0019c 44 89 43 14 mov DWORD PTR [rbx+20], r8d - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 001a0 83 fa 18 cmp edx, 24 - 001a3 7f 21 jg SHORT $LN138@stbi__comp - -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - + 001a3 7f 21 jg SHORT $LN126@stbi__comp +; Line 3695 001a5 8b ca mov ecx, edx 001a7 b8 01 00 00 00 mov eax, 1 001ac d3 e0 shl eax, cl - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 001ae 45 8b c8 mov r9d, r8d 001b1 44 8b d2 mov r10d, edx 001b4 44 8b da mov r11d, edx 001b7 44 3b c0 cmp r8d, eax - 001ba 72 b7 jb SHORT $LL139@stbi__comp -$LN170@stbi__comp: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - + 001ba 72 b7 jb SHORT $LL127@stbi__comp +$LN157@stbi__comp: +; Line 3696 001bc 48 8b 43 08 mov rax, QWORD PTR [rbx+8] 001c0 45 8b c1 mov r8d, r9d 001c3 48 89 03 mov QWORD PTR [rbx], rax -$LN138@stbi__comp: - -; 3709 : z->code_buffer >>= n; - +$LN126@stbi__comp: +; Line 3709 001c6 45 8b c8 mov r9d, r8d 001c9 48 89 b4 24 58 0a 00 00 mov QWORD PTR [rsp+2648], rsi - -; 3845 : -; 3846 : memset(codelength_sizes, 0, sizeof(codelength_sizes)); - +; Line 3846 001d1 33 c0 xor eax, eax - -; 3709 : z->code_buffer >>= n; - +; Line 3709 001d3 41 c1 e9 04 shr r9d, 4 001d7 41 83 e0 0f and r8d, 15 001db 44 89 4b 14 mov DWORD PTR [rbx+20], r9d - -; 3847 : for (i = 0; i < hclen; ++i) { - +; Line 3847 001df 45 33 ed xor r13d, r13d 001e2 66 89 84 24 30 08 00 00 mov WORD PTR codelength_sizes$[rsp+16], ax 001ea 41 83 c0 04 add r8d, 4 001ee 88 84 24 32 08 00 00 mov BYTE PTR codelength_sizes$[rsp+18], al - -; 3710 : z->num_bits -= n; - +; Line 3710 001f5 44 8d 52 fc lea r10d, DWORD PTR [rdx-4] - -; 3847 : for (i = 0; i < hclen; ++i) { - +; Line 3847 001f9 45 8b f0 mov r14d, r8d 001fc 45 8d 24 2f lea r12d, DWORD PTR [r15+rbp] - -; 3710 : z->num_bits -= n; - +; Line 3710 00200 44 89 53 10 mov DWORD PTR [rbx+16], r10d 00204 0f 57 c0 xorps xmm0, xmm0 - -; 3843 : int hclen = stbi__zreceive(a, 4) + 4; -; 3844 : int ntot = hlit + hdist; - +; Line 3844 00207 44 89 64 24 20 mov DWORD PTR ntot$1$[rsp], r12d - -; 3845 : -; 3846 : memset(codelength_sizes, 0, sizeof(codelength_sizes)); - +; Line 3846 0020c 0f 11 84 24 20 08 00 00 movups XMMWORD PTR codelength_sizes$[rsp], xmm0 - -; 3847 : for (i = 0; i < hclen; ++i) { - +; Line 3847 00214 0f 84 c3 00 00 - 00 je $LN216@stbi__comp - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - + 00 je $LN191@stbi__comp +; Line 3696 0021a 41 8b ed mov ebp, r13d 0021d 4c 8d 25 00 00 00 00 lea r12, OFFSET FLAT:?length_dezigzag@?1??stbi__compute_huffman_codes@@9@9 00224 45 8b c2 mov r8d, r10d $LL4@stbi__comp: - -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - +; Line 3707 00227 41 8b d1 mov edx, r9d 0022a 41 83 fa 03 cmp r10d, 3 - 0022e 7d 73 jge SHORT $LN63@stbi__comp - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - + 0022e 7d 73 jge SHORT $LN51@stbi__comp +; Line 3695 00230 41 8b ca mov ecx, r10d 00233 b8 01 00 00 00 mov eax, 1 00238 d3 e0 shl eax, cl 0023a 41 8b f9 mov edi, r9d 0023d 45 8b da mov r11d, r10d 00240 44 3b c8 cmp r9d, eax - 00243 73 54 jae SHORT $LN171@stbi__comp + 00243 73 54 jae SHORT $LN158@stbi__comp 00245 48 8b 73 08 mov rsi, QWORD PTR [rbx+8] 00249 0f 1f 80 00 00 00 00 npad 7 -$LL64@stbi__comp: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +$LL52@stbi__comp: +; Line 3684 00250 48 8b 03 mov rax, QWORD PTR [rbx] 00253 48 3b c6 cmp rax, rsi - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - - 00256 72 04 jb SHORT $LN69@stbi__comp +; Line 3689 + 00256 72 04 jb SHORT $LN57@stbi__comp 00258 32 c9 xor cl, cl - 0025a eb 09 jmp SHORT $LN70@stbi__comp -$LN69@stbi__comp: + 0025a eb 09 jmp SHORT $LN58@stbi__comp +$LN57@stbi__comp: 0025c 0f b6 08 movzx ecx, BYTE PTR [rax] 0025f 48 ff c0 inc rax 00262 48 89 03 mov QWORD PTR [rbx], rax -$LN70@stbi__comp: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - +$LN58@stbi__comp: +; Line 3699 00265 0f b6 d1 movzx edx, cl - -; 3700 : z->num_bits += 8; - +; Line 3700 00268 45 8d 42 08 lea r8d, DWORD PTR [r10+8] 0026c 41 8b cb mov ecx, r11d 0026f 44 89 43 10 mov DWORD PTR [rbx+16], r8d 00273 d3 e2 shl edx, cl 00275 0b d7 or edx, edi 00277 89 53 14 mov DWORD PTR [rbx+20], edx - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 0027a 41 83 f8 18 cmp r8d, 24 - 0027e 7f 23 jg SHORT $LN63@stbi__comp - -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - + 0027e 7f 23 jg SHORT $LN51@stbi__comp +; Line 3695 00280 41 8b c8 mov ecx, r8d 00283 b8 01 00 00 00 mov eax, 1 00288 d3 e0 shl eax, cl - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 0028a 45 8b d8 mov r11d, r8d 0028d 44 8b ca mov r9d, edx 00290 45 8b d0 mov r10d, r8d 00293 8b fa mov edi, edx 00295 3b d0 cmp edx, eax - 00297 72 b7 jb SHORT $LL64@stbi__comp -$LN171@stbi__comp: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - + 00297 72 b7 jb SHORT $LL52@stbi__comp +$LN158@stbi__comp: +; Line 3696 00299 48 8b 43 08 mov rax, QWORD PTR [rbx+8] 0029d 41 8b d1 mov edx, r9d 002a0 48 89 03 mov QWORD PTR [rbx], rax -$LN63@stbi__comp: - -; 3848 : int s = stbi__zreceive(a, 3); -; 3849 : codelength_sizes[length_dezigzag[i]] = (stbi_uc)s; - +$LN51@stbi__comp: +; Line 3849 002a3 41 0f b6 04 2c movzx eax, BYTE PTR [r12+rbp] - -; 3710 : z->num_bits -= n; - +; Line 3710 002a8 41 83 e8 03 sub r8d, 3 002ac 44 8b ca mov r9d, edx 002af 44 89 43 10 mov DWORD PTR [rbx+16], r8d 002b3 41 c1 e9 03 shr r9d, 3 002b7 80 e2 07 and dl, 7 - -; 3847 : for (i = 0; i < hclen; ++i) { - +; Line 3847 002ba 48 ff c5 inc rbp - -; 3709 : z->code_buffer >>= n; - +; Line 3709 002bd 44 89 4b 14 mov DWORD PTR [rbx+20], r9d - -; 3848 : int s = stbi__zreceive(a, 3); -; 3849 : codelength_sizes[length_dezigzag[i]] = (stbi_uc)s; - +; Line 3849 002c1 88 94 04 20 08 00 00 mov BYTE PTR codelength_sizes$[rsp+rax], dl - -; 3710 : z->num_bits -= n; - +; Line 3710 002c8 45 8b d0 mov r10d, r8d - -; 3847 : for (i = 0; i < hclen; ++i) { - +; Line 3847 002cb 49 3b ee cmp rbp, r14 002ce 0f 8c 53 ff ff ff jl $LL4@stbi__comp 002d4 44 8b 64 24 20 mov r12d, DWORD PTR ntot$1$[rsp] 002d9 8b 6c 24 24 mov ebp, DWORD PTR hlit$1$[rsp] -$LN216@stbi__comp: - -; 3850 : } -; 3851 : if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; - +$LN191@stbi__comp: +; Line 3851 002dd 41 b8 13 00 00 00 mov r8d, 19 002e3 48 8d 94 24 20 @@ -31133,616 +20449,388 @@ $LN216@stbi__comp: 002f5 4c 8b b4 24 68 0a 00 00 mov r14, QWORD PTR [rsp+2664] 002fd 85 c0 test eax, eax - 002ff 0f 84 2e 03 00 - 00 je $LN218@stbi__comp - -; 3852 : -; 3853 : n = 0; - + 002ff 0f 84 c3 02 00 + 00 je $LN192@stbi__comp +; Line 3853 00305 41 8b f5 mov esi, r13d - 00308 0f 1f 84 00 00 - 00 00 00 npad 8 $LL5@stbi__comp: - -; 3736 : if (a->num_bits < 16) { - - 00310 44 8b 43 10 mov r8d, DWORD PTR [rbx+16] - 00314 41 83 f8 10 cmp r8d, 16 - 00318 7d 67 jge SHORT $LN33@stbi__comp - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 0031a 48 8b 13 mov rdx, QWORD PTR [rbx] - 0031d 4c 8b 53 08 mov r10, QWORD PTR [rbx+8] - 00321 49 3b d2 cmp rdx, r10 - -; 3737 : if (stbi__zeof(a)) { - - 00324 0f 83 e6 02 00 +; Line 3736 + 00308 83 7b 10 10 cmp DWORD PTR [rbx+16], 16 + 0030c 7d 15 jge SHORT $LN25@stbi__comp +; Line 3684 + 0030e 48 8b 43 08 mov rax, QWORD PTR [rbx+8] + 00312 48 39 03 cmp QWORD PTR [rbx], rax +; Line 3737 + 00315 0f 83 8a 02 00 00 jae $LN9@stbi__comp - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 0032a 44 8b 4b 14 mov r9d, DWORD PTR [rbx+20] - 0032e 41 8b c8 mov ecx, r8d - 00331 b8 01 00 00 00 mov eax, 1 - 00336 d3 e0 shl eax, cl - 00338 44 3b c8 cmp r9d, eax - 0033b 73 41 jae SHORT $LN217@stbi__comp - 0033d 0f 1f 00 npad 3 -$LL34@stbi__comp: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 00340 49 3b d2 cmp rdx, r10 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - - 00343 72 04 jb SHORT $LN39@stbi__comp - 00345 32 c0 xor al, al - 00347 eb 09 jmp SHORT $LN40@stbi__comp -$LN39@stbi__comp: - 00349 0f b6 02 movzx eax, BYTE PTR [rdx] - 0034c 48 ff c2 inc rdx - 0034f 48 89 13 mov QWORD PTR [rbx], rdx -$LN40@stbi__comp: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - - 00352 41 8b c8 mov ecx, r8d - 00355 0f b6 c0 movzx eax, al - 00358 d3 e0 shl eax, cl - -; 3700 : z->num_bits += 8; - - 0035a 41 83 c0 08 add r8d, 8 - 0035e 44 0b c8 or r9d, eax - 00361 44 89 43 10 mov DWORD PTR [rbx+16], r8d - 00365 44 89 4b 14 mov DWORD PTR [rbx+20], r9d - -; 3701 : } while (z->num_bits <= 24); - - 00369 41 83 f8 18 cmp r8d, 24 - 0036d 7f 12 jg SHORT $LN33@stbi__comp - -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 0036f 41 8b c8 mov ecx, r8d - 00372 b8 01 00 00 00 mov eax, 1 - 00377 d3 e0 shl eax, cl - 00379 44 3b c8 cmp r9d, eax - 0037c 72 c2 jb SHORT $LL34@stbi__comp -$LN217@stbi__comp: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - - 0037e 4c 89 13 mov QWORD PTR [rbx], r10 -$LN33@stbi__comp: - -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; - - 00381 8b 53 14 mov edx, DWORD PTR [rbx+20] - 00384 8b c2 mov eax, edx - 00386 25 ff 01 00 00 and eax, 511 ; 000001ffH - 0038b 0f b7 44 44 30 movzx eax, WORD PTR z_codelength$[rsp+rax*2] - -; 3743 : if (b) { - - 00390 85 c0 test eax, eax - 00392 74 18 je SHORT $LN27@stbi__comp - -; 3744 : s = b >> 9; - - 00394 8b c8 mov ecx, eax - 00396 c1 e9 09 shr ecx, 9 - -; 3745 : a->code_buffer >>= s; - - 00399 d3 ea shr edx, cl - -; 3746 : a->num_bits -= s; - - 0039b 44 2b c1 sub r8d, ecx - 0039e 89 53 14 mov DWORD PTR [rbx+20], edx - -; 3747 : return b & 511; - - 003a1 25 ff 01 00 00 and eax, 511 ; 000001ffH - 003a6 44 89 43 10 mov DWORD PTR [rbx+16], r8d - 003aa eb 0d jmp SHORT $LN24@stbi__comp +; Line 3740 + 0031b 48 8b cb mov rcx, rbx + 0031e e8 00 00 00 00 call stbi__fill_bits +$LN25@stbi__comp: +; Line 3742 + 00323 8b 53 14 mov edx, DWORD PTR [rbx+20] + 00326 8b c2 mov eax, edx + 00328 25 ff 01 00 00 and eax, 511 ; 000001ffH + 0032d 0f b7 44 44 30 movzx eax, WORD PTR z_codelength$[rsp+rax*2] +; Line 3743 + 00332 85 c0 test eax, eax + 00334 74 14 je SHORT $LN27@stbi__comp +; Line 3744 + 00336 8b c8 mov ecx, eax + 00338 c1 e9 09 shr ecx, 9 +; Line 3746 + 0033b 29 4b 10 sub DWORD PTR [rbx+16], ecx + 0033e d3 ea shr edx, cl + 00340 89 53 14 mov DWORD PTR [rbx+20], edx +; Line 3747 + 00343 25 ff 01 00 00 and eax, 511 ; 000001ffH + 00348 eb 0d jmp SHORT $LN24@stbi__comp $LN27@stbi__comp: - -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); - - 003ac 48 8d 54 24 30 lea rdx, QWORD PTR z_codelength$[rsp] - 003b1 48 8b cb mov rcx, rbx - 003b4 e8 00 00 00 00 call stbi__zhuffman_decode_slowpath +; Line 3749 + 0034a 48 8d 54 24 30 lea rdx, QWORD PTR z_codelength$[rsp] + 0034f 48 8b cb mov rcx, rbx + 00352 e8 00 00 00 00 call stbi__zhuffman_decode_slowpath $LN24@stbi__comp: - -; 3855 : int c = stbi__zhuffman_decode(a, &z_codelength); -; 3856 : if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); - - 003b9 83 f8 12 cmp eax, 18 - 003bc 0f 87 4e 02 00 +; Line 3856 + 00357 83 f8 12 cmp eax, 18 + 0035a 0f 87 45 02 00 00 ja $LN9@stbi__comp - -; 3857 : if (c < 16) - - 003c2 83 f8 10 cmp eax, 16 - 003c5 7d 14 jge SHORT $LN10@stbi__comp - -; 3858 : lencodes[n++] = (stbi_uc)c; - - 003c7 48 63 ce movsxd rcx, esi - 003ca bf 01 00 00 00 mov edi, 1 - 003cf 88 84 0c 40 08 +; Line 3857 + 00360 83 f8 10 cmp eax, 16 + 00363 7d 14 jge SHORT $LN10@stbi__comp +; Line 3858 + 00365 48 63 ce movsxd rcx, esi + 00368 bf 01 00 00 00 mov edi, 1 + 0036d 88 84 0c 40 08 00 00 mov BYTE PTR lencodes$[rsp+rcx], al - 003d6 e9 e9 01 00 00 jmp $LN11@stbi__comp + 00374 e9 e0 01 00 00 jmp $LN11@stbi__comp $LN10@stbi__comp: - -; 3859 : else { -; 3860 : stbi_uc fill = 0; - - 003db 45 32 db xor r11b, r11b - -; 3861 : if (c == 16) { - - 003de 83 f8 10 cmp eax, 16 - 003e1 0f 85 99 00 00 +; Line 3860 + 00379 45 32 db xor r11b, r11b +; Line 3861 + 0037c 83 f8 10 cmp eax, 16 + 0037f 0f 85 99 00 00 00 jne $LN12@stbi__comp - -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - - 003e7 8b 4b 10 mov ecx, DWORD PTR [rbx+16] - 003ea 83 f9 02 cmp ecx, 2 - 003ed 7d 61 jge SHORT $LN48@stbi__comp - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 003ef 8b 53 14 mov edx, DWORD PTR [rbx+20] - 003f2 b8 01 00 00 00 mov eax, 1 - 003f7 d3 e0 shl eax, cl - 003f9 44 8b c9 mov r9d, ecx - 003fc 44 8b c1 mov r8d, ecx - 003ff 3b d0 cmp edx, eax - 00401 73 43 jae SHORT $LN173@stbi__comp - 00403 4c 8b 53 08 mov r10, QWORD PTR [rbx+8] -$LL49@stbi__comp: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 00407 48 8b 03 mov rax, QWORD PTR [rbx] - 0040a 49 3b c2 cmp rax, r10 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - - 0040d 72 04 jb SHORT $LN54@stbi__comp - 0040f 32 c9 xor cl, cl - 00411 eb 09 jmp SHORT $LN55@stbi__comp -$LN54@stbi__comp: - 00413 0f b6 08 movzx ecx, BYTE PTR [rax] - 00416 48 ff c0 inc rax - 00419 48 89 03 mov QWORD PTR [rbx], rax -$LN55@stbi__comp: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - - 0041c 0f b6 c1 movzx eax, cl - 0041f 41 8b c9 mov ecx, r9d - 00422 d3 e0 shl eax, cl - -; 3700 : z->num_bits += 8; - - 00424 41 8d 49 08 lea ecx, DWORD PTR [r9+8] - 00428 0b d0 or edx, eax - 0042a 89 4b 10 mov DWORD PTR [rbx+16], ecx - 0042d 89 53 14 mov DWORD PTR [rbx+20], edx - -; 3701 : } while (z->num_bits <= 24); - - 00430 83 f9 18 cmp ecx, 24 - 00433 7f 1b jg SHORT $LN48@stbi__comp - 00435 b8 01 00 00 00 mov eax, 1 - 0043a 44 8b c9 mov r9d, ecx - 0043d d3 e0 shl eax, cl - 0043f 44 8b c1 mov r8d, ecx - 00442 3b d0 cmp edx, eax - 00444 72 c1 jb SHORT $LL49@stbi__comp -$LN173@stbi__comp: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - - 00446 48 8b 43 08 mov rax, QWORD PTR [rbx+8] - 0044a 41 8b c8 mov ecx, r8d - 0044d 48 89 03 mov QWORD PTR [rbx], rax -$LN48@stbi__comp: - -; 3708 : k = z->code_buffer & ((1 << n) - 1); - - 00450 8b 7b 14 mov edi, DWORD PTR [rbx+20] - -; 3709 : z->code_buffer >>= n; - - 00453 8b c7 mov eax, edi - 00455 c1 e8 02 shr eax, 2 - 00458 83 e7 03 and edi, 3 - 0045b 89 43 14 mov DWORD PTR [rbx+20], eax - -; 3862 : c = stbi__zreceive(a, 2) + 3; - - 0045e 83 c7 03 add edi, 3 - -; 3710 : z->num_bits -= n; - - 00461 8d 41 fe lea eax, DWORD PTR [rcx-2] - 00464 89 43 10 mov DWORD PTR [rbx+16], eax - -; 3863 : if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); - - 00467 85 f6 test esi, esi - 00469 0f 84 a1 01 00 +; Line 3707 + 00385 8b 4b 10 mov ecx, DWORD PTR [rbx+16] + 00388 83 f9 02 cmp ecx, 2 + 0038b 7d 61 jge SHORT $LN36@stbi__comp +; Line 3695 + 0038d 8b 53 14 mov edx, DWORD PTR [rbx+20] + 00390 b8 01 00 00 00 mov eax, 1 + 00395 d3 e0 shl eax, cl + 00397 44 8b c9 mov r9d, ecx + 0039a 44 8b c1 mov r8d, ecx + 0039d 3b d0 cmp edx, eax + 0039f 73 43 jae SHORT $LN159@stbi__comp + 003a1 4c 8b 53 08 mov r10, QWORD PTR [rbx+8] +$LL37@stbi__comp: +; Line 3684 + 003a5 48 8b 03 mov rax, QWORD PTR [rbx] + 003a8 49 3b c2 cmp rax, r10 +; Line 3689 + 003ab 72 04 jb SHORT $LN42@stbi__comp + 003ad 32 c9 xor cl, cl + 003af eb 09 jmp SHORT $LN43@stbi__comp +$LN42@stbi__comp: + 003b1 0f b6 08 movzx ecx, BYTE PTR [rax] + 003b4 48 ff c0 inc rax + 003b7 48 89 03 mov QWORD PTR [rbx], rax +$LN43@stbi__comp: +; Line 3699 + 003ba 0f b6 c1 movzx eax, cl + 003bd 41 8b c9 mov ecx, r9d + 003c0 d3 e0 shl eax, cl +; Line 3700 + 003c2 41 8d 49 08 lea ecx, DWORD PTR [r9+8] + 003c6 0b d0 or edx, eax + 003c8 89 4b 10 mov DWORD PTR [rbx+16], ecx + 003cb 89 53 14 mov DWORD PTR [rbx+20], edx +; Line 3701 + 003ce 83 f9 18 cmp ecx, 24 + 003d1 7f 1b jg SHORT $LN36@stbi__comp + 003d3 b8 01 00 00 00 mov eax, 1 + 003d8 44 8b c9 mov r9d, ecx + 003db d3 e0 shl eax, cl + 003dd 44 8b c1 mov r8d, ecx + 003e0 3b d0 cmp edx, eax + 003e2 72 c1 jb SHORT $LL37@stbi__comp +$LN159@stbi__comp: +; Line 3696 + 003e4 48 8b 43 08 mov rax, QWORD PTR [rbx+8] + 003e8 41 8b c8 mov ecx, r8d + 003eb 48 89 03 mov QWORD PTR [rbx], rax +$LN36@stbi__comp: +; Line 3708 + 003ee 8b 7b 14 mov edi, DWORD PTR [rbx+20] +; Line 3709 + 003f1 8b c7 mov eax, edi + 003f3 c1 e8 02 shr eax, 2 + 003f6 83 e7 03 and edi, 3 + 003f9 89 43 14 mov DWORD PTR [rbx+20], eax +; Line 3862 + 003fc 83 c7 03 add edi, 3 +; Line 3710 + 003ff 8d 41 fe lea eax, DWORD PTR [rcx-2] + 00402 89 43 10 mov DWORD PTR [rbx+16], eax +; Line 3863 + 00405 85 f6 test esi, esi + 00407 0f 84 98 01 00 00 je $LN9@stbi__comp - -; 3864 : fill = lencodes[n - 1]; - - 0046f 48 63 c6 movsxd rax, esi - 00472 44 0f b6 9c 04 +; Line 3864 + 0040d 48 63 c6 movsxd rax, esi + 00410 44 0f b6 9c 04 3f 08 00 00 movzx r11d, BYTE PTR lencodes$[rsp+rax-1] - -; 3865 : } - - 0047b e9 21 01 00 00 jmp $LN18@stbi__comp +; Line 3865 + 00419 e9 18 01 00 00 jmp $LN18@stbi__comp $LN12@stbi__comp: - -; 3866 : else if (c == 17) { - - 00480 83 f8 11 cmp eax, 17 - 00483 0f 85 8a 00 00 +; Line 3866 + 0041e 83 f8 11 cmp eax, 17 + 00421 0f 85 84 00 00 00 jne $LN15@stbi__comp - -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - - 00489 8b 4b 10 mov ecx, DWORD PTR [rbx+16] - 0048c 83 f9 03 cmp ecx, 3 - 0048f 7d 69 jge SHORT $LN78@stbi__comp - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 00491 44 8b 43 14 mov r8d, DWORD PTR [rbx+20] - 00495 b8 01 00 00 00 mov eax, 1 - 0049a d3 e0 shl eax, cl - 0049c 44 8b c9 mov r9d, ecx - 0049f 8b d1 mov edx, ecx - 004a1 44 3b c0 cmp r8d, eax - 004a4 73 4b jae SHORT $LN174@stbi__comp - 004a6 4c 8b 53 08 mov r10, QWORD PTR [rbx+8] - 004aa 66 0f 1f 44 00 - 00 npad 6 -$LL79@stbi__comp: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 004b0 48 8b 03 mov rax, QWORD PTR [rbx] - 004b3 49 3b c2 cmp rax, r10 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - - 004b6 72 04 jb SHORT $LN84@stbi__comp - 004b8 32 c9 xor cl, cl - 004ba eb 09 jmp SHORT $LN85@stbi__comp -$LN84@stbi__comp: - 004bc 0f b6 08 movzx ecx, BYTE PTR [rax] - 004bf 48 ff c0 inc rax - 004c2 48 89 03 mov QWORD PTR [rbx], rax -$LN85@stbi__comp: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - - 004c5 0f b6 c1 movzx eax, cl - 004c8 41 8b c9 mov ecx, r9d - 004cb d3 e0 shl eax, cl - -; 3700 : z->num_bits += 8; - - 004cd 41 8d 49 08 lea ecx, DWORD PTR [r9+8] - 004d1 44 0b c0 or r8d, eax - 004d4 89 4b 10 mov DWORD PTR [rbx+16], ecx - 004d7 44 89 43 14 mov DWORD PTR [rbx+20], r8d - -; 3701 : } while (z->num_bits <= 24); - - 004db 83 f9 18 cmp ecx, 24 - 004de 7f 1a jg SHORT $LN78@stbi__comp - 004e0 b8 01 00 00 00 mov eax, 1 - 004e5 44 8b c9 mov r9d, ecx - 004e8 d3 e0 shl eax, cl - 004ea 8b d1 mov edx, ecx - 004ec 44 3b c0 cmp r8d, eax - 004ef 72 bf jb SHORT $LL79@stbi__comp -$LN174@stbi__comp: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - - 004f1 48 8b 43 08 mov rax, QWORD PTR [rbx+8] - 004f5 8b ca mov ecx, edx - 004f7 48 89 03 mov QWORD PTR [rbx], rax -$LN78@stbi__comp: - -; 3708 : k = z->code_buffer & ((1 << n) - 1); - - 004fa 8b 7b 14 mov edi, DWORD PTR [rbx+20] - -; 3709 : z->code_buffer >>= n; - - 004fd 8b c7 mov eax, edi - 004ff c1 e8 03 shr eax, 3 - 00502 83 e7 07 and edi, 7 - 00505 89 43 14 mov DWORD PTR [rbx+20], eax - -; 3867 : c = stbi__zreceive(a, 3) + 3; - - 00508 83 c7 03 add edi, 3 - -; 3710 : z->num_bits -= n; - - 0050b 8d 41 fd lea eax, DWORD PTR [rcx-3] - -; 3868 : } - - 0050e e9 8b 00 00 00 jmp $LN273@stbi__comp +; Line 3707 + 00427 8b 4b 10 mov ecx, DWORD PTR [rbx+16] + 0042a 83 f9 03 cmp ecx, 3 + 0042d 7d 63 jge SHORT $LN66@stbi__comp +; Line 3695 + 0042f 44 8b 43 14 mov r8d, DWORD PTR [rbx+20] + 00433 b8 01 00 00 00 mov eax, 1 + 00438 d3 e0 shl eax, cl + 0043a 44 8b c9 mov r9d, ecx + 0043d 8b d1 mov edx, ecx + 0043f 44 3b c0 cmp r8d, eax + 00442 73 45 jae SHORT $LN160@stbi__comp + 00444 4c 8b 53 08 mov r10, QWORD PTR [rbx+8] +$LL67@stbi__comp: +; Line 3684 + 00448 48 8b 03 mov rax, QWORD PTR [rbx] + 0044b 49 3b c2 cmp rax, r10 +; Line 3689 + 0044e 72 04 jb SHORT $LN72@stbi__comp + 00450 32 c9 xor cl, cl + 00452 eb 09 jmp SHORT $LN73@stbi__comp +$LN72@stbi__comp: + 00454 0f b6 08 movzx ecx, BYTE PTR [rax] + 00457 48 ff c0 inc rax + 0045a 48 89 03 mov QWORD PTR [rbx], rax +$LN73@stbi__comp: +; Line 3699 + 0045d 0f b6 c1 movzx eax, cl + 00460 41 8b c9 mov ecx, r9d + 00463 d3 e0 shl eax, cl +; Line 3700 + 00465 41 8d 49 08 lea ecx, DWORD PTR [r9+8] + 00469 44 0b c0 or r8d, eax + 0046c 89 4b 10 mov DWORD PTR [rbx+16], ecx + 0046f 44 89 43 14 mov DWORD PTR [rbx+20], r8d +; Line 3701 + 00473 83 f9 18 cmp ecx, 24 + 00476 7f 1a jg SHORT $LN66@stbi__comp + 00478 b8 01 00 00 00 mov eax, 1 + 0047d 44 8b c9 mov r9d, ecx + 00480 d3 e0 shl eax, cl + 00482 8b d1 mov edx, ecx + 00484 44 3b c0 cmp r8d, eax + 00487 72 bf jb SHORT $LL67@stbi__comp +$LN160@stbi__comp: +; Line 3696 + 00489 48 8b 43 08 mov rax, QWORD PTR [rbx+8] + 0048d 8b ca mov ecx, edx + 0048f 48 89 03 mov QWORD PTR [rbx], rax +$LN66@stbi__comp: +; Line 3708 + 00492 8b 7b 14 mov edi, DWORD PTR [rbx+20] +; Line 3709 + 00495 8b c7 mov eax, edi + 00497 c1 e8 03 shr eax, 3 + 0049a 83 e7 07 and edi, 7 + 0049d 89 43 14 mov DWORD PTR [rbx+20], eax +; Line 3867 + 004a0 83 c7 03 add edi, 3 +; Line 3710 + 004a3 8d 41 fd lea eax, DWORD PTR [rcx-3] +; Line 3868 + 004a6 e9 88 00 00 00 jmp $LN241@stbi__comp $LN15@stbi__comp: - -; 3869 : else if (c == 18) { - - 00513 83 f8 12 cmp eax, 18 - 00516 0f 85 f4 00 00 +; Line 3869 + 004ab 83 f8 12 cmp eax, 18 + 004ae 0f 85 f1 00 00 00 jne $LN9@stbi__comp - -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - - 0051c 8b 4b 10 mov ecx, DWORD PTR [rbx+16] - 0051f 83 f9 07 cmp ecx, 7 - 00522 7d 66 jge SHORT $LN93@stbi__comp - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - - 00524 44 8b 43 14 mov r8d, DWORD PTR [rbx+20] - 00528 b8 01 00 00 00 mov eax, 1 - 0052d d3 e0 shl eax, cl - 0052f 44 8b c9 mov r9d, ecx - 00532 8b d1 mov edx, ecx - 00534 44 3b c0 cmp r8d, eax - 00537 73 48 jae SHORT $LN175@stbi__comp - 00539 4c 8b 53 08 mov r10, QWORD PTR [rbx+8] - 0053d 0f 1f 00 npad 3 -$LL94@stbi__comp: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - - 00540 48 8b 03 mov rax, QWORD PTR [rbx] - 00543 49 3b c2 cmp rax, r10 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - - 00546 72 04 jb SHORT $LN99@stbi__comp - 00548 32 c9 xor cl, cl - 0054a eb 09 jmp SHORT $LN100@stbi__comp -$LN99@stbi__comp: - 0054c 0f b6 08 movzx ecx, BYTE PTR [rax] - 0054f 48 ff c0 inc rax - 00552 48 89 03 mov QWORD PTR [rbx], rax -$LN100@stbi__comp: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - - 00555 0f b6 c1 movzx eax, cl - 00558 41 8b c9 mov ecx, r9d - 0055b d3 e0 shl eax, cl - -; 3700 : z->num_bits += 8; - - 0055d 41 8d 49 08 lea ecx, DWORD PTR [r9+8] - 00561 44 0b c0 or r8d, eax - 00564 89 4b 10 mov DWORD PTR [rbx+16], ecx - 00567 44 89 43 14 mov DWORD PTR [rbx+20], r8d - -; 3701 : } while (z->num_bits <= 24); - - 0056b 83 f9 18 cmp ecx, 24 - 0056e 7f 1a jg SHORT $LN93@stbi__comp - 00570 b8 01 00 00 00 mov eax, 1 - 00575 44 8b c9 mov r9d, ecx - 00578 d3 e0 shl eax, cl - 0057a 8b d1 mov edx, ecx - 0057c 44 3b c0 cmp r8d, eax - 0057f 72 bf jb SHORT $LL94@stbi__comp -$LN175@stbi__comp: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - - 00581 48 8b 43 08 mov rax, QWORD PTR [rbx+8] - 00585 8b ca mov ecx, edx - 00587 48 89 03 mov QWORD PTR [rbx], rax -$LN93@stbi__comp: - -; 3708 : k = z->code_buffer & ((1 << n) - 1); - - 0058a 8b 7b 14 mov edi, DWORD PTR [rbx+20] - -; 3709 : z->code_buffer >>= n; - - 0058d 8b c7 mov eax, edi - 0058f c1 e8 07 shr eax, 7 - 00592 83 e7 7f and edi, 127 ; 0000007fH - 00595 89 43 14 mov DWORD PTR [rbx+20], eax - -; 3870 : c = stbi__zreceive(a, 7) + 11; - - 00598 83 c7 0b add edi, 11 - -; 3710 : z->num_bits -= n; - - 0059b 8d 41 f9 lea eax, DWORD PTR [rcx-7] -$LN273@stbi__comp: - -; 3871 : } -; 3872 : else { -; 3873 : return stbi__err("bad codelengths", "Corrupt PNG"); -; 3874 : } -; 3875 : if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); - - 0059e 89 43 10 mov DWORD PTR [rbx+16], eax +; Line 3707 + 004b4 8b 4b 10 mov ecx, DWORD PTR [rbx+16] + 004b7 83 f9 07 cmp ecx, 7 + 004ba 7d 63 jge SHORT $LN81@stbi__comp +; Line 3695 + 004bc 44 8b 43 14 mov r8d, DWORD PTR [rbx+20] + 004c0 b8 01 00 00 00 mov eax, 1 + 004c5 d3 e0 shl eax, cl + 004c7 44 8b c9 mov r9d, ecx + 004ca 8b d1 mov edx, ecx + 004cc 44 3b c0 cmp r8d, eax + 004cf 73 45 jae SHORT $LN161@stbi__comp + 004d1 4c 8b 53 08 mov r10, QWORD PTR [rbx+8] +$LL82@stbi__comp: +; Line 3684 + 004d5 48 8b 03 mov rax, QWORD PTR [rbx] + 004d8 49 3b c2 cmp rax, r10 +; Line 3689 + 004db 72 04 jb SHORT $LN87@stbi__comp + 004dd 32 c9 xor cl, cl + 004df eb 09 jmp SHORT $LN88@stbi__comp +$LN87@stbi__comp: + 004e1 0f b6 08 movzx ecx, BYTE PTR [rax] + 004e4 48 ff c0 inc rax + 004e7 48 89 03 mov QWORD PTR [rbx], rax +$LN88@stbi__comp: +; Line 3699 + 004ea 0f b6 c1 movzx eax, cl + 004ed 41 8b c9 mov ecx, r9d + 004f0 d3 e0 shl eax, cl +; Line 3700 + 004f2 41 8d 49 08 lea ecx, DWORD PTR [r9+8] + 004f6 44 0b c0 or r8d, eax + 004f9 89 4b 10 mov DWORD PTR [rbx+16], ecx + 004fc 44 89 43 14 mov DWORD PTR [rbx+20], r8d +; Line 3701 + 00500 83 f9 18 cmp ecx, 24 + 00503 7f 1a jg SHORT $LN81@stbi__comp + 00505 b8 01 00 00 00 mov eax, 1 + 0050a 44 8b c9 mov r9d, ecx + 0050d d3 e0 shl eax, cl + 0050f 8b d1 mov edx, ecx + 00511 44 3b c0 cmp r8d, eax + 00514 72 bf jb SHORT $LL82@stbi__comp +$LN161@stbi__comp: +; Line 3696 + 00516 48 8b 43 08 mov rax, QWORD PTR [rbx+8] + 0051a 8b ca mov ecx, edx + 0051c 48 89 03 mov QWORD PTR [rbx], rax +$LN81@stbi__comp: +; Line 3708 + 0051f 8b 7b 14 mov edi, DWORD PTR [rbx+20] +; Line 3709 + 00522 8b c7 mov eax, edi + 00524 c1 e8 07 shr eax, 7 + 00527 83 e7 7f and edi, 127 ; 0000007fH + 0052a 89 43 14 mov DWORD PTR [rbx+20], eax +; Line 3870 + 0052d 83 c7 0b add edi, 11 +; Line 3710 + 00530 8d 41 f9 lea eax, DWORD PTR [rcx-7] +$LN241@stbi__comp: +; Line 3875 + 00533 89 43 10 mov DWORD PTR [rbx+16], eax $LN18@stbi__comp: - 005a1 41 8b c4 mov eax, r12d - 005a4 2b c6 sub eax, esi - 005a6 3b c7 cmp eax, edi - 005a8 7c 66 jl SHORT $LN9@stbi__comp - -; 3876 : memset(lencodes + n, fill, c); - - 005aa 48 63 c6 movsxd rax, esi - 005ad 48 8d 8c 24 40 + 00536 41 8b c4 mov eax, r12d + 00539 2b c6 sub eax, esi + 0053b 3b c7 cmp eax, edi + 0053d 7c 66 jl SHORT $LN9@stbi__comp +; Line 3876 + 0053f 48 63 c6 movsxd rax, esi + 00542 48 8d 8c 24 40 08 00 00 lea rcx, QWORD PTR lencodes$[rsp] - 005b5 48 03 c8 add rcx, rax - 005b8 44 8b c7 mov r8d, edi - 005bb 41 0f b6 d3 movzx edx, r11b - 005bf e8 00 00 00 00 call memset + 0054a 48 03 c8 add rcx, rax + 0054d 44 8b c7 mov r8d, edi + 00550 41 0f b6 d3 movzx edx, r11b + 00554 e8 00 00 00 00 call memset $LN11@stbi__comp: - -; 3854 : while (n < ntot) { - - 005c4 03 f7 add esi, edi - 005c6 41 3b f4 cmp esi, r12d - 005c9 0f 8c 41 fd ff +; Line 3854 + 00559 03 f7 add esi, edi + 0055b 41 3b f4 cmp esi, r12d + 0055e 0f 8c a4 fd ff ff jl $LL5@stbi__comp - -; 3877 : n += c; -; 3878 : } -; 3879 : } -; 3880 : if (n != ntot) return stbi__err("bad codelengths", "Corrupt PNG"); - - 005cf 75 3f jne SHORT $LN9@stbi__comp - -; 3881 : if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; - - 005d1 48 8d 4b 34 lea rcx, QWORD PTR [rbx+52] - 005d5 44 8b c5 mov r8d, ebp - 005d8 48 8d 94 24 40 +; Line 3880 + 00564 75 3f jne SHORT $LN9@stbi__comp +; Line 3881 + 00566 48 8d 4b 34 lea rcx, QWORD PTR [rbx+52] + 0056a 44 8b c5 mov r8d, ebp + 0056d 48 8d 94 24 40 08 00 00 lea rdx, QWORD PTR lencodes$[rsp] - 005e0 e8 00 00 00 00 call stbi__zbuild_huffman - 005e5 85 c0 test eax, eax - 005e7 74 4a je SHORT $LN218@stbi__comp - -; 3882 : if (!stbi__zbuild_huffman(&a->z_distance, lencodes + hlit, hdist)) return 0; - - 005e9 8b cd mov ecx, ebp - 005eb 48 8d 94 24 40 + 00575 e8 00 00 00 00 call stbi__zbuild_huffman + 0057a 85 c0 test eax, eax + 0057c 74 4a je SHORT $LN192@stbi__comp +; Line 3882 + 0057e 8b cd mov ecx, ebp + 00580 48 8d 94 24 40 08 00 00 lea rdx, QWORD PTR lencodes$[rsp] - 005f3 48 03 d1 add rdx, rcx - 005f6 45 8b c7 mov r8d, r15d - 005f9 48 8d 8b 18 08 + 00588 48 03 d1 add rdx, rcx + 0058b 45 8b c7 mov r8d, r15d + 0058e 48 8d 8b 18 08 00 00 lea rcx, QWORD PTR [rbx+2072] - 00600 e8 00 00 00 00 call stbi__zbuild_huffman - 00605 85 c0 test eax, eax - 00607 41 0f 95 c5 setne r13b - 0060b 41 8b c5 mov eax, r13d - 0060e eb 25 jmp SHORT $LN1@stbi__comp + 00595 e8 00 00 00 00 call stbi__zbuild_huffman + 0059a 85 c0 test eax, eax + 0059c 41 0f 95 c5 setne r13b + 005a0 41 8b c5 mov eax, r13d + 005a3 eb 25 jmp SHORT $LN1@stbi__comp $LN9@stbi__comp: - -; 3883 : return 1; -; 3884 : } - - 00610 8b 15 00 00 00 +; Line 3884 + 005a5 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00616 65 48 8b 04 25 + 005ab 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 0061f b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00624 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00628 48 8d 15 00 00 + 005b4 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 005b9 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 005bd 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@MDNKOBMC@bad?5codelengths@ - 0062f 48 89 14 01 mov QWORD PTR [rcx+rax], rdx -$LN218@stbi__comp: - 00633 33 c0 xor eax, eax + 005c4 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +$LN192@stbi__comp: + 005c8 33 c0 xor eax, eax $LN1@stbi__comp: - 00635 48 8b bc 24 60 + 005ca 48 8b bc 24 60 0a 00 00 mov rdi, QWORD PTR [rsp+2656] - 0063d 48 8b b4 24 58 + 005d2 48 8b b4 24 58 0a 00 00 mov rsi, QWORD PTR [rsp+2648] - 00645 48 8b 8c 24 10 + 005da 48 8b 8c 24 10 0a 00 00 mov rcx, QWORD PTR __$ArrayPad$[rsp] - 0064d 48 33 cc xor rcx, rsp - 00650 e8 00 00 00 00 call __security_check_cookie - 00655 48 81 c4 20 0a + 005e2 48 33 cc xor rcx, rsp + 005e5 e8 00 00 00 00 call __security_check_cookie + 005ea 48 81 c4 20 0a 00 00 add rsp, 2592 ; 00000a20H - 0065c 41 5f pop r15 - 0065e 41 5d pop r13 - 00660 41 5c pop r12 - 00662 5d pop rbp - 00663 5b pop rbx - 00664 c3 ret 0 + 005f1 41 5f pop r15 + 005f3 41 5d pop r13 + 005f5 41 5c pop r12 + 005f7 5d pop rbp + 005f8 5b pop rbx + 005f9 c3 ret 0 stbi__compute_huffman_codes ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__parse_uncompressed_block _TEXT SEGMENT header$ = 48 a$ = 48 stbi__parse_uncompressed_block PROC ; COMDAT - -; 3887 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3887 00000 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 3888 : stbi_uc header[4]; -; 3889 : int len, nlen, k; -; 3890 : if (a->num_bits & 7) - +; Line 3890 0000a 8b 51 10 mov edx, DWORD PTR [rcx+16] 0000d 48 8b d9 mov rbx, rcx 00010 8b fa mov edi, edx 00012 83 e7 07 and edi, 7 00015 74 7d je SHORT $LN56@stbi__pars - -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - +; Line 3707 00017 3b d7 cmp edx, edi 00019 7d 6a jge SHORT $LN18@stbi__pars - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - +; Line 3695 0001b 44 8b 41 14 mov r8d, DWORD PTR [rcx+20] 0001f b8 01 00 00 00 mov eax, 1 00024 8b ca mov ecx, edx - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 00026 44 8b d2 mov r10d, edx - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - +; Line 3695 00029 d3 e0 shl eax, cl 0002b 44 8b ca mov r9d, edx 0002e 44 3b c0 cmp r8d, eax 00031 73 48 jae SHORT $LN43@stbi__pars 00033 4c 8b 5b 08 mov r11, QWORD PTR [rbx+8] $LL19@stbi__pars: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 00037 48 8b 03 mov rax, QWORD PTR [rbx] 0003a 49 3b c3 cmp rax, r11 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 0003d 72 04 jb SHORT $LN24@stbi__pars 0003f 32 c9 xor cl, cl 00041 eb 09 jmp SHORT $LN25@stbi__pars @@ -31751,95 +20839,61 @@ $LN24@stbi__pars: 00046 48 ff c0 inc rax 00049 48 89 03 mov QWORD PTR [rbx], rax $LN25@stbi__pars: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - +; Line 3699 0004c 0f b6 c1 movzx eax, cl - -; 3700 : z->num_bits += 8; - +; Line 3700 0004f 41 8d 52 08 lea edx, DWORD PTR [r10+8] 00053 41 8b ca mov ecx, r10d 00056 89 53 10 mov DWORD PTR [rbx+16], edx 00059 d3 e0 shl eax, cl 0005b 44 0b c0 or r8d, eax 0005e 44 89 43 14 mov DWORD PTR [rbx+20], r8d - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 00062 83 fa 18 cmp edx, 24 00065 7f 1e jg SHORT $LN18@stbi__pars - -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - +; Line 3695 00067 8b ca mov ecx, edx 00069 b8 01 00 00 00 mov eax, 1 0006e d3 e0 shl eax, cl - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 00070 44 8b d2 mov r10d, edx 00073 44 8b ca mov r9d, edx 00076 44 3b c0 cmp r8d, eax 00079 72 bc jb SHORT $LL19@stbi__pars $LN43@stbi__pars: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - +; Line 3696 0007b 48 8b 43 08 mov rax, QWORD PTR [rbx+8] 0007f 41 8b d1 mov edx, r9d 00082 48 89 03 mov QWORD PTR [rbx], rax $LN18@stbi__pars: - -; 3709 : z->code_buffer >>= n; - +; Line 3709 00085 8b 43 14 mov eax, DWORD PTR [rbx+20] 00088 8b cf mov ecx, edi 0008a d3 e8 shr eax, cl - -; 3710 : z->num_bits -= n; - +; Line 3710 0008c 2b d7 sub edx, edi 0008e 89 43 14 mov DWORD PTR [rbx+20], eax 00091 89 53 10 mov DWORD PTR [rbx+16], edx $LN56@stbi__pars: - -; 3891 : stbi__zreceive(a, a->num_bits & 7); // discard -; 3892 : // drain the bit-packed data into header -; 3893 : k = 0; - +; Line 3893 00094 45 33 c0 xor r8d, r8d 00097 8b c2 mov eax, edx - -; 3894 : while (a->num_bits > 0) { - +; Line 3894 00099 85 d2 test edx, edx 0009b 7e 31 jle SHORT $LN3@stbi__pars 0009d 8b 4b 14 mov ecx, DWORD PTR [rbx+20] 000a0 48 8d 54 24 30 lea rdx, QWORD PTR header$[rsp] - -; 3710 : z->num_bits -= n; - +; Line 3710 000a5 44 0f b6 c9 movzx r9d, cl 000a9 0f 1f 80 00 00 00 00 npad 7 $LL2@stbi__pars: - -; 3895 : header[k++] = (stbi_uc)(a->code_buffer & 255); // suppress MSVC run-time check -; 3896 : a->code_buffer >>= 8; - +; Line 3896 000b0 c1 e9 08 shr ecx, 8 000b3 41 ff c0 inc r8d 000b6 44 88 0a mov BYTE PTR [rdx], r9b 000b9 48 8d 52 01 lea rdx, QWORD PTR [rdx+1] - -; 3897 : a->num_bits -= 8; - +; Line 3897 000bd 83 e8 08 sub eax, 8 000c0 89 4b 14 mov DWORD PTR [rbx+20], ecx 000c3 44 0f b6 c9 movzx r9d, cl @@ -31847,16 +20901,11 @@ $LL2@stbi__pars: 000c9 7f e5 jg SHORT $LL2@stbi__pars 000cb 89 43 10 mov DWORD PTR [rbx+16], eax $LN3@stbi__pars: - -; 3898 : } -; 3899 : if (a->num_bits < 0) return stbi__err("zlib corrupt", "Corrupt PNG"); - +; Line 3899 000ce 85 c0 test eax, eax 000d0 79 30 jns SHORT $LN42@stbi__pars $LN72@stbi__pars: - -; 3913 : } - +; Line 3913 000d2 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 000d8 65 48 8b 04 25 @@ -31874,22 +20923,15 @@ $LN73@stbi__pars: 00101 c3 ret 0 $LN42@stbi__pars: 00102 49 63 c8 movsxd rcx, r8d - -; 3900 : // now fill header the normal way -; 3901 : while (k < 4) - +; Line 3901 00105 48 83 f9 04 cmp rcx, 4 00109 7d 26 jge SHORT $LN50@stbi__pars - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 0010b 4c 8b 43 08 mov r8, QWORD PTR [rbx+8] 0010f 48 8b 03 mov rax, QWORD PTR [rbx] $LL4@stbi__pars: 00112 49 3b c0 cmp rax, r8 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 00115 72 04 jb SHORT $LN32@stbi__pars 00117 32 d2 xor dl, dl 00119 eb 09 jmp SHORT $LN33@stbi__pars @@ -31898,24 +20940,17 @@ $LN32@stbi__pars: 0011e 48 ff c0 inc rax 00121 48 89 03 mov QWORD PTR [rbx], rax $LN33@stbi__pars: - -; 3902 : header[k++] = stbi__zget8(a); - +; Line 3902 00124 88 54 0c 30 mov BYTE PTR header$[rsp+rcx], dl 00128 48 ff c1 inc rcx 0012b 48 83 f9 04 cmp rcx, 4 0012f 7c e1 jl SHORT $LL4@stbi__pars $LN50@stbi__pars: - -; 3903 : len = header[1] * 256 + header[0]; - +; Line 3903 00131 0f b6 44 24 30 movzx eax, BYTE PTR header$[rsp] 00136 44 0f b6 44 24 31 movzx r8d, BYTE PTR header$[rsp+1] - -; 3904 : nlen = header[3] * 256 + header[2]; -; 3905 : if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt", "Corrupt PNG"); - +; Line 3905 0013c 0f b6 4c 24 33 movzx ecx, BYTE PTR header$[rsp+3] 00141 41 c1 e0 08 shl r8d, 8 00145 44 03 c0 add r8d, eax @@ -31927,17 +20962,13 @@ $LN50@stbi__pars: 0015a 3b c8 cmp ecx, eax 0015c 0f 85 70 ff ff ff jne $LN72@stbi__pars - -; 3906 : if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG"); - +; Line 3906 00162 48 8b 0b mov rcx, QWORD PTR [rbx] 00165 41 8b f8 mov edi, r8d 00168 48 03 cf add rcx, rdi 0016b 48 3b 4b 08 cmp rcx, QWORD PTR [rbx+8] 0016f 76 30 jbe SHORT $LN9@stbi__pars - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00171 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00177 65 48 8b 04 25 @@ -31947,54 +20978,37 @@ $LN50@stbi__pars: 00189 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BB@PIPBCKIA@read?5past?5buffer@ 00190 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 3906 : if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG"); - +; Line 3906 00194 33 c0 xor eax, eax - -; 3913 : } - +; Line 3913 00196 48 8b 5c 24 38 mov rbx, QWORD PTR [rsp+56] 0019b 48 83 c4 20 add rsp, 32 ; 00000020H 0019f 5f pop rdi 001a0 c3 ret 0 $LN9@stbi__pars: - -; 3907 : if (a->zout + len > a->zout_end) - +; Line 3907 001a1 48 8b 53 18 mov rdx, QWORD PTR [rbx+24] 001a5 49 8d 04 10 lea rax, QWORD PTR [r8+rdx] 001a9 48 3b 43 28 cmp rax, QWORD PTR [rbx+40] 001ad 76 10 jbe SHORT $LN57@stbi__pars - -; 3908 : if (!stbi__zexpand(a, a->zout, len)) return 0; - +; Line 3908 001af 48 8b cb mov rcx, rbx 001b2 e8 00 00 00 00 call stbi__zexpand 001b7 85 c0 test eax, eax 001b9 0f 84 36 ff ff ff je $LN73@stbi__pars $LN57@stbi__pars: - -; 3909 : memcpy(a->zout, a->zbuffer, len); - +; Line 3909 001bf 48 8b 13 mov rdx, QWORD PTR [rbx] 001c2 4c 8b c7 mov r8, rdi 001c5 48 8b 4b 18 mov rcx, QWORD PTR [rbx+24] 001c9 e8 00 00 00 00 call memcpy - -; 3910 : a->zbuffer += len; - +; Line 3910 001ce 48 01 3b add QWORD PTR [rbx], rdi - -; 3911 : a->zout += len; -; 3912 : return 1; - +; Line 3912 001d1 b8 01 00 00 00 mov eax, 1 001d6 48 01 7b 18 add QWORD PTR [rbx+24], rdi - -; 3913 : } - +; Line 3913 001da 48 8b 5c 24 38 mov rbx, QWORD PTR [rsp+56] 001df 48 83 c4 20 add rsp, 32 ; 00000020H 001e3 5f pop rdi @@ -32002,69 +21016,43 @@ $LN57@stbi__pars: stbi__parse_uncompressed_block ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__parse_zlib_header _TEXT SEGMENT a$ = 8 stbi__parse_zlib_header PROC ; COMDAT - -; 3916 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3916 00000 48 8b d1 mov rdx, rcx - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 00003 48 8b 09 mov rcx, QWORD PTR [rcx] 00006 4c 8b 4a 08 mov r9, QWORD PTR [rdx+8] 0000a 49 3b c9 cmp rcx, r9 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 0000d 0f 83 b1 00 00 00 jae $LN29@stbi__pars 00013 0f b6 01 movzx eax, BYTE PTR [rcx] 00016 4c 8d 51 01 lea r10, QWORD PTR [rcx+1] - -; 3917 : int cmf = stbi__zget8(a); -; 3918 : int cm = cmf & 15; - +; Line 3918 0001a 44 8b d8 mov r11d, eax - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 0001d 4c 89 12 mov QWORD PTR [rdx], r10 - -; 3917 : int cmf = stbi__zget8(a); -; 3918 : int cm = cmf & 15; - +; Line 3918 00020 41 83 e3 0f and r11d, 15 00024 44 8b c0 mov r8d, eax - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 00027 4d 3b d1 cmp r10, r9 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 0002a 0f 83 94 00 00 00 jae $LN29@stbi__pars 00030 41 0f b6 0a movzx ecx, BYTE PTR [r10] 00034 49 8d 42 01 lea rax, QWORD PTR [r10+1] 00038 48 89 02 mov QWORD PTR [rdx], rax - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 0003b 49 3b c1 cmp rax, r9 - -; 3919 : /* int cinfo = cmf >> 4; */ -; 3920 : int flg = stbi__zget8(a); -; 3921 : if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec - +; Line 3921 0003e 0f 83 80 00 00 00 jae $LN29@stbi__pars - -; 3922 : if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec - +; Line 3922 00044 41 c1 e0 08 shl r8d, 8 00048 b8 85 10 42 08 mov eax, 138547333 ; 08421085H 0004d 44 03 c1 add r8d, ecx @@ -32077,72 +21065,47 @@ stbi__parse_zlib_header PROC ; COMDAT 0005f 6b c0 1f imul eax, eax, 31 00062 44 3b c0 cmp r8d, eax 00065 75 5d jne SHORT $LN29@stbi__pars - -; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png - +; Line 3923 00067 f6 c1 20 test cl, 32 ; 00000020H 0006a 74 26 je SHORT $LN4@stbi__pars - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0006c 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00072 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - -; 3927 : } - +; Line 3927 0007b b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00080 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00084 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0P@DOGMHEBI@no?5preset?5dict@ - -; 3927 : } - +; Line 3927 0008b 48 89 14 01 mov QWORD PTR [rcx+rax], rdx 0008f 33 c0 xor eax, eax 00091 c3 ret 0 $LN4@stbi__pars: - -; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png - +; Line 3924 00092 41 83 fb 08 cmp r11d, 8 00096 74 26 je SHORT $LN5@stbi__pars - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00098 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0009e 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - -; 3927 : } - +; Line 3927 000a7 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - -; 431 : stbi__g_failure_reason = str; - +; Line 431 000ac 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 000b0 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@MCNBDLPD@bad?5compression@ - -; 3927 : } - +; Line 3927 000b7 48 89 14 01 mov QWORD PTR [rcx+rax], rdx 000bb 33 c0 xor eax, eax 000bd c3 ret 0 $LN5@stbi__pars: - -; 3925 : // window = 1 << (8 + cinfo)... but who cares, we fully buffer output -; 3926 : return 1; - +; Line 3926 000be b8 01 00 00 00 mov eax, 1 - -; 3927 : } - +; Line 3927 000c3 c3 ret 0 $LN29@stbi__pars: 000c4 8b 15 00 00 00 @@ -32159,75 +21122,50 @@ $LN29@stbi__pars: stbi__parse_zlib_header ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__parse_zlib _TEXT SEGMENT a$ = 48 parse_header$ = 56 stbi__parse_zlib PROC ; COMDAT - -; 3959 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3959 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 74 24 10 mov QWORD PTR [rsp+16], rsi 0000a 48 89 7c 24 18 mov QWORD PTR [rsp+24], rdi 0000f 41 56 push r14 00011 48 83 ec 20 sub rsp, 32 ; 00000020H 00015 48 8b d9 mov rbx, rcx - -; 3960 : int final, type; -; 3961 : if (parse_header) - +; Line 3961 00018 85 d2 test edx, edx 0001a 0f 84 de 00 00 00 je $LN98@stbi__pars - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 00020 48 8b 11 mov rdx, QWORD PTR [rcx] 00023 4c 8b 49 08 mov r9, QWORD PTR [rcx+8] 00027 49 3b d1 cmp rdx, r9 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 0002a 73 4a jae SHORT $LN100@stbi__pars 0002c 0f b6 02 movzx eax, BYTE PTR [rdx] 0002f 48 ff c2 inc rdx - -; 3918 : int cm = cmf & 15; - +; Line 3918 00032 44 8b d0 mov r10d, eax - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 00035 48 89 11 mov QWORD PTR [rcx], rdx - -; 3918 : int cm = cmf & 15; - +; Line 3918 00038 41 83 e2 0f and r10d, 15 0003c 44 8b c0 mov r8d, eax - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 0003f 49 3b d1 cmp rdx, r9 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 00042 73 32 jae SHORT $LN100@stbi__pars 00044 0f b6 0a movzx ecx, BYTE PTR [rdx] 00047 48 8d 42 01 lea rax, QWORD PTR [rdx+1] 0004b 48 89 03 mov QWORD PTR [rbx], rax - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 0004e 49 3b c1 cmp rax, r9 - -; 3921 : if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec - +; Line 3921 00051 73 23 jae SHORT $LN100@stbi__pars - -; 3922 : if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec - +; Line 3922 00053 41 c1 e0 08 shl r8d, 8 00057 b8 85 10 42 08 mov eax, 138547333 ; 08421085H 0005c 44 03 c1 add r8d, ecx @@ -32241,10 +21179,7 @@ stbi__parse_zlib PROC ; COMDAT 00071 44 3b c0 cmp r8d, eax 00074 74 3b je SHORT $LN21@stbi__pars $LN100@stbi__pars: - -; 3982 : } -; 3983 : if (!stbi__parse_huffman_block(a)) return 0; - +; Line 3983 00076 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0007c 65 48 8b 04 25 @@ -32258,9 +21193,7 @@ $LN126@stbi__pars: $LN88@stbi__pars: 00099 33 c0 xor eax, eax $LN1@stbi__pars: - -; 3987 : } - +; Line 3987 0009b 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 000a0 48 8b 74 24 38 mov rsi, QWORD PTR [rsp+56] 000a5 48 8b 7c 24 40 mov rdi, QWORD PTR [rsp+64] @@ -32268,14 +21201,10 @@ $LN1@stbi__pars: 000ae 41 5e pop r14 000b0 c3 ret 0 $LN21@stbi__pars: - -; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png - +; Line 3923 000b1 f6 c1 20 test cl, 32 ; 00000020H 000b4 74 21 je SHORT $LN22@stbi__pars - -; 431 : stbi__g_failure_reason = str; - +; Line 431 000b6 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 000bc 65 48 8b 04 25 @@ -32284,19 +21213,13 @@ $LN21@stbi__pars: 000ca 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 000ce 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0P@DOGMHEBI@no?5preset?5dict@ - -; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png - +; Line 3923 000d5 eb be jmp SHORT $LN126@stbi__pars $LN22@stbi__pars: - -; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png - +; Line 3924 000d7 41 83 fa 08 cmp r10d, 8 000db 74 21 je SHORT $LN98@stbi__pars - -; 431 : stbi__g_failure_reason = str; - +; Line 431 000dd 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 000e3 65 48 8b 04 25 @@ -32305,27 +21228,18 @@ $LN22@stbi__pars: 000f1 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 000f5 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@MCNBDLPD@bad?5compression@ - -; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png - +; Line 3924 000fc eb 97 jmp SHORT $LN126@stbi__pars $LN98@stbi__pars: - -; 3962 : if (!stbi__parse_zlib_header(a)) return 0; -; 3963 : a->num_bits = 0; - +; Line 3963 000fe 33 c0 xor eax, eax 00100 48 89 43 10 mov QWORD PTR [rbx+16], rax $LL4@stbi__pars: - -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - +; Line 3707 00104 8b 4b 10 mov ecx, DWORD PTR [rbx+16] 00107 83 f9 01 cmp ecx, 1 0010a 7d 61 jge SHORT $LN52@stbi__pars - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - +; Line 3695 0010c 8b 53 14 mov edx, DWORD PTR [rbx+20] 0010f b8 01 00 00 00 mov eax, 1 00114 d3 e0 shl eax, cl @@ -32335,14 +21249,10 @@ $LL4@stbi__pars: 0011e 73 43 jae SHORT $LN80@stbi__pars 00120 4c 8b 53 08 mov r10, QWORD PTR [rbx+8] $LL53@stbi__pars: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 00124 48 8b 03 mov rax, QWORD PTR [rbx] 00127 49 3b c2 cmp rax, r10 - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 0012a 72 04 jb SHORT $LN58@stbi__pars 0012c 32 c9 xor cl, cl 0012e eb 09 jmp SHORT $LN59@stbi__pars @@ -32351,22 +21261,16 @@ $LN58@stbi__pars: 00133 48 ff c0 inc rax 00136 48 89 03 mov QWORD PTR [rbx], rax $LN59@stbi__pars: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - +; Line 3699 00139 0f b6 c1 movzx eax, cl 0013c 41 8b c8 mov ecx, r8d 0013f d3 e0 shl eax, cl - -; 3700 : z->num_bits += 8; - +; Line 3700 00141 41 8d 48 08 lea ecx, DWORD PTR [r8+8] 00145 0b d0 or edx, eax 00147 89 4b 10 mov DWORD PTR [rbx+16], ecx 0014a 89 53 14 mov DWORD PTR [rbx+20], edx - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 0014d 83 f9 18 cmp ecx, 24 00150 7f 1b jg SHORT $LN52@stbi__pars 00152 b8 01 00 00 00 mov eax, 1 @@ -32376,35 +21280,24 @@ $LN59@stbi__pars: 0015f 3b d0 cmp edx, eax 00161 72 c1 jb SHORT $LL53@stbi__pars $LN80@stbi__pars: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - +; Line 3696 00163 48 8b 43 08 mov rax, QWORD PTR [rbx+8] 00167 41 8b c9 mov ecx, r9d 0016a 48 89 03 mov QWORD PTR [rbx], rax $LN52@stbi__pars: - -; 3708 : k = z->code_buffer & ((1 << n) - 1); - +; Line 3708 0016d 44 8b 43 14 mov r8d, DWORD PTR [rbx+20] - -; 3709 : z->code_buffer >>= n; -; 3710 : z->num_bits -= n; - +; Line 3710 00171 8d 51 ff lea edx, DWORD PTR [rcx-1] 00174 41 8b f0 mov esi, r8d 00177 89 53 10 mov DWORD PTR [rbx+16], edx 0017a 41 d1 e8 shr r8d, 1 0017d 83 e6 01 and esi, 1 00180 44 89 43 14 mov DWORD PTR [rbx+20], r8d - -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); - +; Line 3707 00184 83 fa 02 cmp edx, 2 00187 7d 6e jge SHORT $LN67@stbi__pars - -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - +; Line 3695 00189 8b ca mov ecx, edx 0018b b8 01 00 00 00 mov eax, 1 00190 d3 e0 shl eax, cl @@ -32415,14 +21308,10 @@ $LN52@stbi__pars: 0019e 73 4d jae SHORT $LN81@stbi__pars 001a0 48 8b 7b 08 mov rdi, QWORD PTR [rbx+8] $LL68@stbi__pars: - -; 3684 : return (z->zbuffer >= z->zbuffer_end); - +; Line 3684 001a4 48 8b 03 mov rax, QWORD PTR [rbx] 001a7 48 3b c7 cmp rax, rdi - -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; - +; Line 3689 001aa 72 04 jb SHORT $LN73@stbi__pars 001ac 32 c9 xor cl, cl 001ae eb 09 jmp SHORT $LN74@stbi__pars @@ -32431,100 +21320,58 @@ $LN73@stbi__pars: 001b3 48 ff c0 inc rax 001b6 48 89 03 mov QWORD PTR [rbx], rax $LN74@stbi__pars: - -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; - +; Line 3699 001b9 44 0f b6 c1 movzx r8d, cl - -; 3700 : z->num_bits += 8; - +; Line 3700 001bd 41 8d 53 08 lea edx, DWORD PTR [r11+8] 001c1 41 8b ca mov ecx, r10d 001c4 89 53 10 mov DWORD PTR [rbx+16], edx 001c7 41 d3 e0 shl r8d, cl 001ca 45 0b c1 or r8d, r9d 001cd 44 89 43 14 mov DWORD PTR [rbx+20], r8d - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 001d1 83 fa 18 cmp edx, 24 001d4 7f 21 jg SHORT $LN67@stbi__pars - -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { - +; Line 3695 001d6 8b ca mov ecx, edx 001d8 b8 01 00 00 00 mov eax, 1 001dd d3 e0 shl eax, cl - -; 3701 : } while (z->num_bits <= 24); - +; Line 3701 001df 45 8b c8 mov r9d, r8d 001e2 44 8b d2 mov r10d, edx 001e5 44 8b da mov r11d, edx 001e8 44 3b c0 cmp r8d, eax 001eb 72 b7 jb SHORT $LL68@stbi__pars $LN81@stbi__pars: - -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ - +; Line 3696 001ed 48 8b 43 08 mov rax, QWORD PTR [rbx+8] 001f1 45 8b c1 mov r8d, r9d 001f4 48 89 03 mov QWORD PTR [rbx], rax $LN67@stbi__pars: - -; 3708 : k = z->code_buffer & ((1 << n) - 1); - +; Line 3708 001f7 41 8b c8 mov ecx, r8d - -; 3709 : z->code_buffer >>= n; -; 3710 : z->num_bits -= n; - +; Line 3710 001fa 8d 42 fe lea eax, DWORD PTR [rdx-2] 001fd 41 c1 e8 02 shr r8d, 2 00201 44 89 43 14 mov DWORD PTR [rbx+20], r8d 00205 89 43 10 mov DWORD PTR [rbx+16], eax 00208 83 e1 03 and ecx, 3 - -; 3964 : a->code_buffer = 0; -; 3965 : do { -; 3966 : final = stbi__zreceive(a, 1); -; 3967 : type = stbi__zreceive(a, 2); -; 3968 : if (type == 0) { - +; Line 3968 0020b 75 0a jne SHORT $LN7@stbi__pars - -; 3969 : if (!stbi__parse_uncompressed_block(a)) return 0; - +; Line 3969 0020d 48 8b cb mov rcx, rbx 00210 e8 00 00 00 00 call stbi__parse_uncompressed_block - -; 3970 : } - +; Line 3970 00215 eb 5f jmp SHORT $LN123@stbi__pars $LN7@stbi__pars: - -; 3971 : else if (type == 3) { - +; Line 3971 00217 83 f9 03 cmp ecx, 3 0021a 0f 84 79 fe ff ff je $LN88@stbi__pars - -; 3972 : return 0; -; 3973 : } -; 3974 : else { -; 3975 : if (type == 1) { - +; Line 3975 00220 83 f9 01 cmp ecx, 1 00223 75 39 jne SHORT $LN12@stbi__pars - -; 3976 : // use fixed code lengths -; 3977 : if (!stbi__zbuild_huffman(&a->z_length, stbi__zdefault_length, STBI__ZNSYMS)) return 0; - +; Line 3977 00225 48 8d 4b 34 lea rcx, QWORD PTR [rbx+52] 00229 41 b8 20 01 00 00 mov r8d, 288 ; 00000120H @@ -32534,9 +21381,7 @@ $LN7@stbi__pars: 0023b 85 c0 test eax, eax 0023d 0f 84 56 fe ff ff je $LN88@stbi__pars - -; 3978 : if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; - +; Line 3978 00243 48 8d 8b 18 08 00 00 lea rcx, QWORD PTR [rbx+2072] 0024a 41 b8 20 00 00 @@ -32544,47 +21389,33 @@ $LN7@stbi__pars: 00250 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:stbi__zdefault_distance 00257 e8 00 00 00 00 call stbi__zbuild_huffman - -; 3979 : } - +; Line 3979 0025c eb 08 jmp SHORT $LN125@stbi__pars $LN12@stbi__pars: - -; 3980 : else { -; 3981 : if (!stbi__compute_huffman_codes(a)) return 0; - +; Line 3981 0025e 48 8b cb mov rcx, rbx 00261 e8 00 00 00 00 call stbi__compute_huffman_codes $LN125@stbi__pars: - -; 3982 : } -; 3983 : if (!stbi__parse_huffman_block(a)) return 0; - +; Line 3983 00266 85 c0 test eax, eax 00268 0f 84 2b fe ff ff je $LN88@stbi__pars 0026e 48 8b cb mov rcx, rbx 00271 e8 00 00 00 00 call stbi__parse_huffman_block $LN123@stbi__pars: - -; 3984 : } -; 3985 : } while (!final); - +; Line 3985 00276 85 c0 test eax, eax 00278 0f 84 1b fe ff ff je $LN88@stbi__pars 0027e 85 f6 test esi, esi 00280 0f 84 7e fe ff ff je $LL4@stbi__pars - -; 3986 : return 1; - +; Line 3986 00286 b8 01 00 00 00 mov eax, 1 0028b e9 0b fe ff ff jmp $LN1@stbi__pars stbi__parse_zlib ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__do_zlib _TEXT SEGMENT a$ = 8 @@ -32593,20 +21424,13 @@ olen$ = 24 exp$dead$ = 32 parse_header$ = 40 stbi__do_zlib PROC ; COMDAT - -; 3991 : a->zout_start = obuf; -; 3992 : a->zout = obuf; -; 3993 : a->zout_end = obuf + olen; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 3993 00000 49 63 c0 movsxd rax, r8d 00003 48 03 c2 add rax, rdx 00006 48 89 51 20 mov QWORD PTR [rcx+32], rdx 0000a 48 89 51 18 mov QWORD PTR [rcx+24], rdx - -; 3994 : a->z_expandable = exp; -; 3995 : -; 3996 : return stbi__parse_zlib(a, parse_header); - +; Line 3996 0000e 8b 54 24 28 mov edx, DWORD PTR parse_header$[rsp] 00012 48 89 41 28 mov QWORD PTR [rcx+40], rax 00016 c7 41 30 01 00 @@ -32615,7 +21439,6 @@ stbi__do_zlib PROC ; COMDAT stbi__do_zlib ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi_zlib_decode_malloc_guesssize_headerflag _TEXT SEGMENT a$ = 32 @@ -32626,9 +21449,8 @@ initial_size$ = 4208 outlen$ = 4216 parse_header$ = 4224 stbi_zlib_decode_malloc_guesssize_headerflag PROC ; COMDAT - -; 4022 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4022 $LN16: 00000 40 53 push rbx 00002 55 push rbp @@ -32642,103 +21464,61 @@ $LN16: 00019 48 33 c4 xor rax, rsp 0001c 48 89 84 24 20 10 00 00 mov QWORD PTR __$ArrayPad$[rsp], rax - -; 4023 : stbi__zbuf a; -; 4024 : char* p = (char*)stbi__malloc(initial_size); - +; Line 4024 00024 49 63 f0 movsxd rsi, r8d 00027 48 8b f9 mov rdi, rcx - -; 438 : return STBI_MALLOC(size); - +; Line 438 0002a 48 8b ce mov rcx, rsi - -; 4022 : { - +; Line 4022 0002d 48 63 ea movsxd rbp, edx 00030 49 8b d9 mov rbx, r9 - -; 438 : return STBI_MALLOC(size); - +; Line 438 00033 ff 15 00 00 00 00 call QWORD PTR __imp_malloc - -; 4025 : if (p == NULL) return NULL; - +; Line 4025 00039 48 85 c0 test rax, rax 0003c 74 5d je SHORT $LN14@stbi_zlib_ - -; 3996 : return stbi__parse_zlib(a, parse_header); - +; Line 3996 0003e 8b 94 24 80 10 00 00 mov edx, DWORD PTR parse_header$[rsp] 00045 48 8d 4c 24 20 lea rcx, QWORD PTR a$[rsp] 0004a 48 89 44 24 40 mov QWORD PTR a$[rsp+32], rax - -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; - +; Line 4027 0004f 48 03 ef add rbp, rdi - -; 3992 : a->zout = obuf; - +; Line 3992 00052 48 89 44 24 38 mov QWORD PTR a$[rsp+24], rax - -; 3993 : a->zout_end = obuf + olen; - +; Line 3993 00057 48 03 c6 add rax, rsi 0005a 48 89 44 24 48 mov QWORD PTR a$[rsp+40], rax - -; 4026 : a.zbuffer = (stbi_uc*)buffer; - +; Line 4026 0005f 48 89 7c 24 20 mov QWORD PTR a$[rsp], rdi - -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; - +; Line 4027 00064 48 89 6c 24 28 mov QWORD PTR a$[rsp+8], rbp - -; 3994 : a->z_expandable = exp; - +; Line 3994 00069 c7 44 24 50 01 00 00 00 mov DWORD PTR a$[rsp+48], 1 - -; 3995 : -; 3996 : return stbi__parse_zlib(a, parse_header); - +; Line 3996 00071 e8 00 00 00 00 call stbi__parse_zlib - -; 4028 : if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { - +; Line 4028 00076 85 c0 test eax, eax 00078 74 16 je SHORT $LN3@stbi_zlib_ - -; 4029 : if (outlen) *outlen = (int)(a.zout - a.zout_start); - +; Line 4029 0007a 48 85 db test rbx, rbx 0007d 74 0a je SHORT $LN5@stbi_zlib_ 0007f 8b 44 24 38 mov eax, DWORD PTR a$[rsp+24] 00083 2b 44 24 40 sub eax, DWORD PTR a$[rsp+32] 00087 89 03 mov DWORD PTR [rbx], eax $LN5@stbi_zlib_: - -; 4030 : return a.zout_start; - +; Line 4030 00089 48 8b 44 24 40 mov rax, QWORD PTR a$[rsp+32] 0008e eb 0d jmp SHORT $LN4@stbi_zlib_ $LN3@stbi_zlib_: - -; 4031 : } -; 4032 : else { -; 4033 : STBI_FREE(a.zout_start); - +; Line 4033 00090 48 8b 4c 24 40 mov rcx, QWORD PTR a$[rsp+32] 00095 ff 15 00 00 00 00 call QWORD PTR __imp_free $LN14@stbi_zlib_: - -; 4034 : return NULL; -; 4035 : } -; 4036 : } - +; Line 4036 0009b 33 c0 xor eax, eax $LN4@stbi_zlib_: 0009d 48 8b 8c 24 20 @@ -32755,68 +21535,40 @@ $LN4@stbi_zlib_: stbi_zlib_decode_malloc_guesssize_headerflag ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__get_chunk_header _TEXT SEGMENT s$ = 48 stbi__get_chunk_header PROC ; COMDAT - -; 4096 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4096 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 74 24 10 mov QWORD PTR [rsp+16], rsi 0000a 57 push rdi 0000b 48 83 ec 20 sub rsp, 32 ; 00000020H 0000f 48 8b f1 mov rsi, rcx - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 1168 00012 e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 00017 48 8b ce mov rcx, rsi 0001a 8b f8 mov edi, eax 0001c e8 00 00 00 00 call stbi__get16be 00021 c1 e7 10 shl edi, 16 - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 1168 00024 48 8b ce mov rcx, rsi - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 00027 03 f8 add edi, eax - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 1168 00029 e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 0002e 48 8b ce mov rcx, rsi 00031 8b d8 mov ebx, eax 00033 e8 00 00 00 00 call stbi__get16be - -; 4097 : stbi__pngchunk c; -; 4098 : c.length = stbi__get32be(s); -; 4099 : c.type = stbi__get32be(s); -; 4100 : return c; -; 4101 : } - +; Line 4101 00038 48 8b 74 24 38 mov rsi, QWORD PTR [rsp+56] - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 0003d c1 e3 10 shl ebx, 16 00040 03 c3 add eax, ebx - -; 4097 : stbi__pngchunk c; -; 4098 : c.length = stbi__get32be(s); -; 4099 : c.type = stbi__get32be(s); -; 4100 : return c; -; 4101 : } - +; Line 4101 00042 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00047 48 c1 e0 20 shl rax, 32 ; 00000020H 0004b 48 0b c7 or rax, rdi @@ -32826,14 +21578,12 @@ stbi__get_chunk_header PROC ; COMDAT stbi__get_chunk_header ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__check_png_header _TEXT SEGMENT s$ = 48 stbi__check_png_header PROC ; COMDAT - -; 4104 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4104 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 74 24 10 mov QWORD PTR [rsp+16], rsi 0000a 57 push rdi @@ -32844,36 +21594,26 @@ stbi__check_png_header PROC ; COMDAT 00019 33 ff xor edi, edi 0001b 0f 1f 44 00 00 npad 5 $LL4@stbi__chec: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00020 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00027 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0002e 73 0f jae SHORT $LN8@stbi__chec - -; 1078 : return *s->img_buffer++; - +; Line 1078 00030 0f b6 08 movzx ecx, BYTE PTR [rax] 00033 48 ff c0 inc rax 00036 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0003d eb 26 jmp SHORT $LN7@stbi__chec $LN8@stbi__chec: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0003f 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00043 74 1e je SHORT $LN9@stbi__chec - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00045 48 8b cb mov rcx, rbx 00048 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0004d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00054 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -32882,93 +21622,63 @@ $LN8@stbi__chec: 00 00 mov QWORD PTR [rbx+192], rax 00061 eb 02 jmp SHORT $LN7@stbi__chec $LN9@stbi__chec: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00063 32 c9 xor cl, cl $LN7@stbi__chec: - -; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); - +; Line 4108 00065 3a 0c 37 cmp cl, BYTE PTR [rdi+rsi] 00068 75 1e jne SHORT $LN14@stbi__chec - -; 4105 : static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; -; 4106 : int i; -; 4107 : for (i = 0; i < 8; ++i) - +; Line 4107 0006a 48 ff c7 inc rdi 0006d 48 83 ff 08 cmp rdi, 8 00071 7c ad jl SHORT $LL4@stbi__chec - -; 4109 : return 1; - +; Line 4109 00073 b8 01 00 00 00 mov eax, 1 - -; 4110 : } - +; Line 4110 00078 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 0007d 48 8b 74 24 38 mov rsi, QWORD PTR [rsp+56] 00082 48 83 c4 20 add rsp, 32 ; 00000020H 00086 5f pop rdi 00087 c3 ret 0 $LN14@stbi__chec: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00088 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 00091 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index - -; 4110 : } - +; Line 4110 00097 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 0009c 48 8b 74 24 38 mov rsi, QWORD PTR [rsp+56] - -; 431 : stbi__g_failure_reason = str; - +; Line 431 000a1 ba 00 00 00 00 mov edx, OFFSET FLAT:stbi__g_failure_reason 000a6 48 8b 0c c8 mov rcx, QWORD PTR [rax+rcx*8] 000aa 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_0M@DMDNBACF@bad?5png?5sig@ 000b1 48 89 04 0a mov QWORD PTR [rdx+rcx], rax - -; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); - +; Line 4108 000b5 33 c0 xor eax, eax - -; 4110 : } - +; Line 4110 000b7 48 83 c4 20 add rsp, 32 ; 00000020H 000bb 5f pop rdi 000bc c3 ret 0 stbi__check_png_header ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__paeth _TEXT SEGMENT a$ = 8 b$ = 16 c$ = 24 stbi__paeth PROC ; COMDAT - -; 4140 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4140 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 8b da mov ebx, edx - -; 4141 : int p = a + b - c; - +; Line 4141 00007 44 8b c9 mov r9d, ecx 0000a 45 2b c8 sub r9d, r8d 0000d 45 8d 14 11 lea r10d, DWORD PTR [r9+rdx] - -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); - +; Line 4143 00011 41 8b d1 mov edx, r9d 00014 41 8b c2 mov eax, r10d 00017 2b c1 sub eax, ecx @@ -32977,49 +21687,36 @@ stbi__paeth PROC ; COMDAT 0001f 44 0f 48 d8 cmovs r11d, eax 00023 f7 da neg edx 00025 41 0f 48 d1 cmovs edx, r9d - -; 4144 : int pc = abs(p - c); - +; Line 4144 00029 45 2b d0 sub r10d, r8d 0002c 41 8b c2 mov eax, r10d 0002f f7 d8 neg eax 00031 41 0f 48 c2 cmovs eax, r10d - -; 4145 : if (pa <= pb && pa <= pc) return a; - +; Line 4145 00035 44 3b da cmp r11d, edx 00038 7f 0d jg SHORT $LN2@stbi__paet 0003a 44 3b d8 cmp r11d, eax 0003d 7f 08 jg SHORT $LN2@stbi__paet 0003f 8b c1 mov eax, ecx - -; 4147 : return c; -; 4148 : } - +; Line 4148 00041 48 8b 5c 24 08 mov rbx, QWORD PTR [rsp+8] 00046 c3 ret 0 $LN2@stbi__paet: - -; 4146 : if (pb <= pc) return b; - +; Line 4146 00047 3b d0 cmp edx, eax 00049 44 0f 4e c3 cmovle r8d, ebx - -; 4147 : return c; -; 4148 : } - +; Line 4148 0004d 48 8b 5c 24 08 mov rbx, QWORD PTR [rsp+8] 00052 41 8b c0 mov eax, r8d 00055 c3 ret 0 stbi__paeth ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__create_png_image_raw _TEXT SEGMENT a$1$ = 32 -$T13 = 40 -$T14 = 48 +$T1 = 40 +$T2 = 48 stride$1$ = 56 nk$1$ = 64 cur$8$ = 64 @@ -33029,13 +21726,13 @@ filter_bytes$1$ = 80 img_width_bytes$1$ = 84 prior$4$ = 88 cur$9$ = 96 -$T15 = 104 +$T3 = 104 tv5788 = 112 tv5875 = 120 tv5731 = 128 tv5728 = 136 tv5835 = 144 -$T16 = 152 +$T4 = 152 cur$1$ = 160 img_n$1$ = 240 a$ = 240 @@ -33047,9 +21744,8 @@ y$ = 280 depth$ = 288 color$ = 296 stbi__create_png_image_raw PROC ; COMDAT - -; 4154 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4154 00000 44 89 4c 24 20 mov DWORD PTR [rsp+32], r9d 00005 53 push rbx 00006 55 push rbp @@ -33060,11 +21756,7 @@ stbi__create_png_image_raw PROC ; COMDAT 0000d 41 57 push r15 0000f 48 81 ec b0 00 00 00 sub rsp, 176 ; 000000b0H - -; 4155 : int bytes = (depth == 16 ? 2 : 1); -; 4156 : stbi__context* s = a->s; -; 4157 : stbi__uint32 i, j, stride = x * out_n * bytes; - +; Line 4157 00016 44 8b bc 24 10 01 00 00 mov r15d, DWORD PTR x$[rsp] 0001e 41 8b c1 mov eax, r9d @@ -33077,15 +21769,7 @@ stbi__create_png_image_raw PROC ; COMDAT 00037 41 83 fe 10 cmp r14d, 16 0003b 4c 89 44 24 78 mov QWORD PTR tv5875[rsp], r8 00040 45 8b d0 mov r10d, r8d - -; 4158 : stbi__uint32 img_len, img_width_bytes; -; 4159 : int k; -; 4160 : int img_n = s->img_n; // copy it into a local for later -; 4161 : -; 4162 : int output_bytes = out_n * bytes; -; 4163 : int filter_bytes = img_n * bytes; -; 4164 : int width = x; - +; Line 4164 00043 44 89 7c 24 48 mov DWORD PTR width$1$[rsp], r15d 00048 41 0f 94 c2 sete r10b 0004c 48 8b f1 mov rsi, rcx @@ -33103,92 +21787,60 @@ stbi__create_png_image_raw PROC ; COMDAT 00 00 mov DWORD PTR img_n$1$[rsp], ecx 00076 44 89 5c 24 38 mov DWORD PTR stride$1$[rsp], r11d 0007b 44 89 64 24 50 mov DWORD PTR filter_bytes$1$[rsp], r12d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00080 45 85 ff test r15d, r15d 00083 0f 88 ba 11 00 00 js $LN388@stbi__crea 00089 45 85 c9 test r9d, r9d 0008c 0f 88 b1 11 00 00 js $LN388@stbi__crea - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 00092 74 13 je SHORT $LN390@stbi__crea - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 00094 33 d2 xor edx, edx 00096 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 0009b 41 f7 f1 div r9d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 0009e 44 3b f8 cmp r15d, eax 000a1 0f 8f 9c 11 00 00 jg $LN388@stbi__crea $LN390@stbi__crea: 000a7 41 8b cf mov ecx, r15d 000aa 41 0f af c9 imul ecx, r9d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 000ae 85 c9 test ecx, ecx 000b0 0f 88 8d 11 00 00 js $LN388@stbi__crea 000b6 85 ff test edi, edi 000b8 0f 88 85 11 00 00 js $LN388@stbi__crea - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 000be 74 10 je SHORT $LN389@stbi__crea - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 000c0 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 000c5 99 cdq 000c6 f7 ff idiv edi - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 000c8 3b c8 cmp ecx, eax 000ca 0f 8f 73 11 00 00 jg $LN388@stbi__crea $LN389@stbi__crea: 000d0 41 8b c1 mov eax, r9d 000d3 41 0f af c3 imul eax, r11d - -; 509 : return stbi__malloc(a * b * c + add); - +; Line 509 000d7 48 63 c8 movsxd rcx, eax - -; 438 : return STBI_MALLOC(size); - +; Line 438 000da ff 15 00 00 00 00 call QWORD PTR __imp_malloc - -; 4165 : -; 4166 : STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1); -; 4167 : a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into - +; Line 4167 000e0 48 89 46 18 mov QWORD PTR [rsi+24], rax - -; 438 : return STBI_MALLOC(size); - +; Line 438 000e4 4c 8b d0 mov r10, rax - -; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); - +; Line 4168 000e7 48 85 c0 test rax, rax 000ea 0f 84 57 11 00 00 je $LN387@stbi__crea - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 000f0 4c 63 9c 24 f0 00 00 00 movsxd r11, DWORD PTR img_n$1$[rsp] 000f8 4c 89 ac 24 f8 @@ -33196,21 +21848,14 @@ $LN389@stbi__crea: 00100 45 85 db test r11d, r11d 00103 0f 88 16 11 00 00 js $LN384@stbi__crea - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 00109 45 85 ff test r15d, r15d 0010c 74 13 je SHORT $LN386@stbi__crea - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 0010e 33 d2 xor edx, edx 00110 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00115 41 f7 f7 div r15d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00118 44 3b d8 cmp r11d, eax 0011b 0f 8f fe 10 00 00 jg $LN384@stbi__crea @@ -33218,47 +21863,32 @@ $LN386@stbi__crea: 00121 45 8b eb mov r13d, r11d 00124 45 0f af ef imul r13d, r15d 00128 44 89 6c 24 20 mov DWORD PTR a$1$[rsp], r13d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 0012d 45 85 ed test r13d, r13d 00130 0f 88 e9 10 00 00 js $LN384@stbi__crea 00136 45 85 f6 test r14d, r14d 00139 0f 88 e0 10 00 00 js $LN384@stbi__crea - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0013f 74 13 je SHORT $LN385@stbi__crea - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 00141 33 d2 xor edx, edx 00143 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00148 41 f7 f6 div r14d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 0014b 44 3b e8 cmp r13d, eax 0014e 0f 8f cb 10 00 00 jg $LN384@stbi__crea $LN385@stbi__crea: 00154 41 8b c5 mov eax, r13d 00157 41 0f af c6 imul eax, r14d - -; 460 : return a <= INT_MAX - b; - +; Line 460 0015b 3d f8 ff ff 7f cmp eax, 2147483640 ; 7ffffff8H - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00160 0f 8f b9 10 00 00 jg $LN384@stbi__crea - -; 4171 : img_width_bytes = (((img_n * x * depth) + 7) >> 3); - +; Line 4171 00166 8b b4 24 18 01 00 00 mov esi, DWORD PTR y$[rsp] 0016d 41 8b cd mov ecx, r13d @@ -33266,23 +21896,13 @@ $LN385@stbi__crea: 00174 83 c1 07 add ecx, 7 00177 c1 e9 03 shr ecx, 3 0017a 89 4c 24 54 mov DWORD PTR img_width_bytes$1$[rsp], ecx - -; 4172 : img_len = (img_width_bytes + 1) * y; - +; Line 4172 0017e 8d 41 01 lea eax, DWORD PTR [rcx+1] 00181 0f af c6 imul eax, esi - -; 4173 : -; 4174 : // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, -; 4175 : // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), -; 4176 : // so just check for raw_len < img_len always. -; 4177 : if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG"); - +; Line 4177 00184 3b e8 cmp ebp, eax 00186 73 3f jae SHORT $LN100@stbi__crea - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00188 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0018e 65 48 8b 04 25 @@ -33293,17 +21913,13 @@ $LN385@stbi__crea: 00 00 lea rdx, OFFSET FLAT:??_C@_0BC@BHMPBBMG@not?5enough?5pixels@ $LN651@stbi__crea: 001a7 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); - +; Line 4185 001ab 33 c0 xor eax, eax $LN649@stbi__crea: 001ad 4c 8b ac 24 f8 00 00 00 mov r13, QWORD PTR [rsp+248] $LN1@stbi__crea: - -; 4370 : } - +; Line 4370 001b5 48 81 c4 b0 00 00 00 add rsp, 176 ; 000000b0H 001bc 41 5f pop r15 @@ -33315,12 +21931,9 @@ $LN1@stbi__crea: 001c5 5b pop rbx 001c6 c3 ret 0 $LN100@stbi__crea: - -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { - +; Line 4179 001c7 45 33 c9 xor r9d, r9d - 001ca 4c 89 54 24 30 mov QWORD PTR $T14[rsp], r10 + 001ca 4c 89 54 24 30 mov QWORD PTR $T2[rsp], r10 001cf 4c 8d 05 00 00 00 00 lea r8, OFFSET FLAT:__ImageBase 001d6 41 8b d1 mov edx, r9d @@ -33328,29 +21941,24 @@ $LN100@stbi__crea: 001dd 85 f6 test esi, esi 001df 0f 84 71 0b 00 00 je $LN3@stbi__crea - -; 4180 : stbi_uc* cur = a->out + stride * j; - +; Line 4180 001e5 8b 44 24 20 mov eax, DWORD PTR a$1$[rsp] 001e9 4d 8b c3 mov r8, r11 001ec 4c 63 ef movsxd r13, edi 001ef 49 8b fa mov rdi, r10 001f2 4d 63 f4 movsxd r14, r12d - 001f5 4c 89 74 24 68 mov QWORD PTR $T15[rsp], r14 + 001f5 4c 89 74 24 68 mov QWORD PTR $T3[rsp], r14 001fa 4c 89 ac 24 98 - 00 00 00 mov QWORD PTR $T16[rsp], r13 - 00202 4c 89 5c 24 28 mov QWORD PTR $T13[rsp], r11 + 00 00 00 mov QWORD PTR $T4[rsp], r13 + 00202 4c 89 5c 24 28 mov QWORD PTR $T1[rsp], r11 00207 89 44 24 20 mov DWORD PTR a$1$[rsp], eax - 0020b 4c 89 54 24 30 mov QWORD PTR $T14[rsp], r10 + 0020b 4c 89 54 24 30 mov QWORD PTR $T2[rsp], r10 00210 4c 89 94 24 a0 00 00 00 mov QWORD PTR cur$1$[rsp], r10 00218 0f 1f 84 00 00 00 00 00 npad 8 $LL4@stbi__crea: - -; 4181 : stbi_uc* prior; -; 4182 : int filter = *raw++; - +; Line 4182 00220 44 0f b6 13 movzx r10d, BYTE PTR [rbx] 00224 8b ea mov ebp, edx 00226 0f af 6c 24 38 imul ebp, DWORD PTR stride$1$[rsp] @@ -33358,57 +21966,36 @@ $LL4@stbi__crea: 0022e 48 03 ef add rbp, rdi 00231 48 89 6c 24 60 mov QWORD PTR cur$9$[rsp], rbp 00236 48 8b f5 mov rsi, rbp - -; 4183 : -; 4184 : if (filter > 4) - +; Line 4184 00239 41 83 fa 04 cmp r10d, 4 0023d 0f 87 db 0a 00 00 ja $LN260@stbi__crea - -; 4186 : -; 4187 : if (depth < 8) { - +; Line 4187 00243 83 bc 24 20 01 00 00 08 cmp DWORD PTR depth$[rsp], 8 0024b 7d 30 jge SHORT $LN102@stbi__crea - -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); - +; Line 4188 0024d 41 3b cf cmp ecx, r15d 00250 0f 87 a4 0a 00 00 ja $LN261@stbi__crea - -; 4189 : cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place - +; Line 4189 00256 8b 84 24 08 01 00 00 mov eax, DWORD PTR out_n$[rsp] - -; 4190 : filter_bytes = 1; - +; Line 4190 0025d 41 bc 01 00 00 00 mov r12d, 1 00263 41 0f af c7 imul eax, r15d 00267 45 8b f4 mov r14d, r12d 0026a 44 89 64 24 50 mov DWORD PTR filter_bytes$1$[rsp], r12d - 0026f 4c 89 64 24 68 mov QWORD PTR $T15[rsp], r12 - -; 4191 : width = img_width_bytes; - + 0026f 4c 89 64 24 68 mov QWORD PTR $T3[rsp], r12 +; Line 4191 00274 89 4c 24 48 mov DWORD PTR width$1$[rsp], ecx 00278 2b c1 sub eax, ecx 0027a 48 03 f0 add rsi, rax $LN102@stbi__crea: - -; 4192 : } -; 4193 : prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above - +; Line 4193 0027d 8b 44 24 38 mov eax, DWORD PTR stride$1$[rsp] - -; 4194 : -; 4195 : // if first row, use special filter that doesn't sample previous row -; 4196 : if (j == 0) filter = first_row_filter[filter]; - +; Line 4196 00281 48 8d 0d 00 00 00 00 lea rcx, OFFSET FLAT:__ImageBase 00288 4c 8b fe mov r15, rsi @@ -33418,11 +22005,7 @@ $LN102@stbi__crea: 00292 45 0f b6 94 0a 00 00 00 00 movzx r10d, BYTE PTR first_row_filter[r10+rcx] $LN104@stbi__crea: - -; 4197 : -; 4198 : // handle first byte explicitly -; 4199 : for (k = 0; k < filter_bytes; ++k) { - +; Line 4199 0029b 4d 85 f6 test r14, r14 0029e 0f 8e 31 01 00 00 jle $LN6@stbi__crea @@ -33433,9 +22016,7 @@ $LN104@stbi__crea: 002b0 4c 2b db sub r11, rbx 002b3 4d 8b ce mov r9, r14 $LL7@stbi__crea: - -; 4200 : switch (filter) { - +; Line 4200 002b6 4c 8b c2 mov r8, rdx 002b9 41 83 fa 06 cmp r10d, 6 002bd 77 0f ja SHORT $LN5@stbi__crea @@ -33445,11 +22026,7 @@ $LL7@stbi__crea: 002c9 48 03 c1 add rax, rcx 002cc ff e0 jmp rax $LN5@stbi__crea: - -; 4197 : -; 4198 : // handle first byte explicitly -; 4199 : for (k = 0; k < filter_bytes; ++k) { - +; Line 4199 002ce 48 ff c2 inc rdx 002d1 49 83 e9 01 sub r9, 1 002d5 0f 84 ea 00 00 @@ -33461,43 +22038,33 @@ $LN5@stbi__crea: 1f 84 00 00 00 00 00 npad 12 $LL406@stbi__crea: - -; 4201 : case STBI__F_none: cur[k] = raw[k]; break; - +; Line 4201 002f0 0f b6 02 movzx eax, BYTE PTR [rdx] 002f3 48 ff c2 inc rdx 002f6 43 88 04 03 mov BYTE PTR [r11+r8], al 002fa 49 83 e9 01 sub r9, 1 002fe 0f 84 c1 00 00 00 je $LN492@stbi__crea - -; 4200 : switch (filter) { - +; Line 4200 00304 4c 8b c2 mov r8, rdx 00307 eb e7 jmp SHORT $LL406@stbi__crea 00309 0f 1f 80 00 00 00 00 npad 7 $LL407@stbi__crea: - -; 4202 : case STBI__F_sub: cur[k] = raw[k]; break; - +; Line 4202 00310 0f b6 02 movzx eax, BYTE PTR [rdx] 00313 48 ff c2 inc rdx 00316 43 88 04 03 mov BYTE PTR [r11+r8], al 0031a 49 83 e9 01 sub r9, 1 0031e 0f 84 a1 00 00 00 je $LN492@stbi__crea - -; 4200 : switch (filter) { - +; Line 4200 00324 4c 8b c2 mov r8, rdx 00327 eb e7 jmp SHORT $LL407@stbi__crea 00329 0f 1f 80 00 00 00 00 npad 7 $LL447@stbi__crea: - -; 4203 : case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; - +; Line 4203 00330 42 0f b6 04 07 movzx eax, BYTE PTR [rdi+r8] 00335 02 02 add al, BYTE PTR [rdx] 00337 48 ff c2 inc rdx @@ -33505,16 +22072,12 @@ $LL447@stbi__crea: 0033e 49 83 e9 01 sub r9, 1 00342 0f 84 7d 00 00 00 je $LN492@stbi__crea - -; 4200 : switch (filter) { - +; Line 4200 00348 4c 8b c2 mov r8, rdx 0034b eb e3 jmp SHORT $LL447@stbi__crea 0034d 0f 1f 00 npad 3 $LL448@stbi__crea: - -; 4204 : case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break; - +; Line 4204 00350 42 0f b6 04 07 movzx eax, BYTE PTR [rdi+r8] 00355 d0 e8 shr al, 1 00357 02 02 add al, BYTE PTR [rdx] @@ -33522,16 +22085,12 @@ $LL448@stbi__crea: 0035c 43 88 04 03 mov BYTE PTR [r11+r8], al 00360 49 83 e9 01 sub r9, 1 00364 74 5f je SHORT $LN492@stbi__crea - -; 4200 : switch (filter) { - +; Line 4200 00366 4c 8b c2 mov r8, rdx 00369 eb e5 jmp SHORT $LL448@stbi__crea 0036b 0f 1f 44 00 00 npad 5 $LL449@stbi__crea: - -; 4205 : case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break; - +; Line 4205 00370 42 0f b6 04 07 movzx eax, BYTE PTR [rdi+r8] 00375 33 c9 xor ecx, ecx 00377 84 c0 test al, al @@ -33541,50 +22100,35 @@ $LL449@stbi__crea: 00381 43 88 0c 03 mov BYTE PTR [r11+r8], cl 00385 49 83 e9 01 sub r9, 1 00389 74 3a je SHORT $LN492@stbi__crea - -; 4200 : switch (filter) { - +; Line 4200 0038b 4c 8b c2 mov r8, rdx 0038e eb e0 jmp SHORT $LL449@stbi__crea $LL450@stbi__crea: - -; 4206 : case STBI__F_avg_first: cur[k] = raw[k]; break; - +; Line 4206 00390 0f b6 02 movzx eax, BYTE PTR [rdx] 00393 48 ff c2 inc rdx 00396 43 88 04 03 mov BYTE PTR [r11+r8], al 0039a 49 83 e9 01 sub r9, 1 0039e 74 25 je SHORT $LN492@stbi__crea - -; 4200 : switch (filter) { - +; Line 4200 003a0 4c 8b c2 mov r8, rdx 003a3 eb eb jmp SHORT $LL450@stbi__crea 003a5 66 66 66 0f 1f 84 00 00 00 00 00 npad 11 $LL451@stbi__crea: - -; 4207 : case STBI__F_paeth_first: cur[k] = raw[k]; break; - +; Line 4207 003b0 0f b6 02 movzx eax, BYTE PTR [rdx] 003b3 48 ff c2 inc rdx 003b6 43 88 04 03 mov BYTE PTR [r11+r8], al 003ba 49 83 e9 01 sub r9, 1 003be 74 05 je SHORT $LN492@stbi__crea - -; 4200 : switch (filter) { - +; Line 4200 003c0 4c 8b c2 mov r8, rdx 003c3 eb eb jmp SHORT $LL451@stbi__crea $LN492@stbi__crea: - -; 4208 : } -; 4209 : } -; 4210 : -; 4211 : if (depth == 8) { - - 003c5 4c 8b 44 24 28 mov r8, QWORD PTR $T13[rsp] +; Line 4211 + 003c5 4c 8b 44 24 28 mov r8, QWORD PTR $T1[rsp] 003ca 45 33 c9 xor r9d, r9d 003cd 44 8b 9c 24 f0 00 00 00 mov r11d, DWORD PTR img_n$1$[rsp] @@ -33593,82 +22137,48 @@ $LN6@stbi__crea: 00 00 mov eax, DWORD PTR depth$[rsp] 003dc 83 f8 08 cmp eax, 8 003df 75 2b jne SHORT $LN112@stbi__crea - -; 4212 : if (img_n != out_n) - +; Line 4212 003e1 48 63 84 24 08 01 00 00 movsxd rax, DWORD PTR out_n$[rsp] 003e9 44 3b d8 cmp r11d, eax 003ec 74 05 je SHORT $LN114@stbi__crea - -; 4213 : cur[img_n] = 255; // first pixel - +; Line 4213 003ee 41 c6 04 30 ff mov BYTE PTR [r8+rsi], 255 ; 000000ffH $LN114@stbi__crea: - -; 4214 : raw += img_n; -; 4215 : cur += out_n; -; 4216 : prior += out_n; - +; Line 4216 003f3 49 03 d8 add rbx, r8 003f6 4e 8d 1c 38 lea r11, QWORD PTR [rax+r15] 003fa 48 03 c6 add rax, rsi 003fd 4c 89 5c 24 58 mov QWORD PTR prior$4$[rsp], r11 00402 48 89 44 24 40 mov QWORD PTR cur$8$[rsp], rax 00407 4c 8b c3 mov r8, rbx - -; 4217 : } - +; Line 4217 0040a eb 59 jmp SHORT $LN383@stbi__crea $LN112@stbi__crea: - -; 4218 : else if (depth == 16) { - +; Line 4218 0040c 83 f8 10 cmp eax, 16 0040f 75 2e jne SHORT $LN115@stbi__crea - -; 4219 : if (img_n != out_n) { - +; Line 4219 00411 44 3b 9c 24 08 01 00 00 cmp r11d, DWORD PTR out_n$[rsp] 00419 74 07 je SHORT $LN117@stbi__crea - -; 4220 : cur[filter_bytes] = 255; // first pixel top byte - +; Line 4220 0041b 66 41 c7 04 36 ff ff mov WORD PTR [r14+rsi], 65535 ; 0000ffffH $LN117@stbi__crea: - -; 4221 : cur[filter_bytes + 1] = 255; // first pixel bottom byte -; 4222 : } -; 4223 : raw += filter_bytes; - +; Line 4223 00422 49 63 c4 movsxd rax, r12d - -; 4224 : cur += output_bytes; -; 4225 : prior += output_bytes; - +; Line 4225 00425 4f 8d 1c 2f lea r11, QWORD PTR [r15+r13] 00429 48 03 d8 add rbx, rax 0042c 4c 89 5c 24 58 mov QWORD PTR prior$4$[rsp], r11 00431 4a 8d 04 2e lea rax, QWORD PTR [rsi+r13] 00435 4c 8b c3 mov r8, rbx 00438 48 89 44 24 40 mov QWORD PTR cur$8$[rsp], rax - -; 4226 : } - +; Line 4226 0043d eb 26 jmp SHORT $LN383@stbi__crea $LN115@stbi__crea: - -; 4227 : else { -; 4228 : raw += 1; -; 4229 : cur += 1; -; 4230 : prior += 1; -; 4231 : } -; 4232 : -; 4233 : // this is a little gross, so that we don't switch per-pixel or per-component -; 4234 : if (depth < 8 || img_n == out_n) { - +; Line 4234 0043f 48 ff c3 inc rbx 00442 4d 8d 5f 01 lea r11, QWORD PTR [r15+1] 00446 83 bc 24 20 01 @@ -33686,16 +22196,7 @@ $LN383@stbi__crea: 00 00 cmp ecx, DWORD PTR out_n$[rsp] 00473 0f 84 1b 05 00 00 je $LN120@stbi__crea - -; 4251 : } -; 4252 : else { -; 4253 : STBI_ASSERT(img_n + 1 == out_n); -; 4254 : #define STBI__CASE(f) \ -; 4255 : case f: \ -; 4256 : for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ -; 4257 : for (k=0; k < filter_bytes; ++k) -; 4258 : switch (filter) { - +; Line 4258 00479 41 83 fa 06 cmp r10d, 6 0047d 0f 87 d3 04 00 00 ja $LN494@stbi__crea @@ -33708,9 +22209,7 @@ $LN383@stbi__crea: 00498 49 03 d2 add rdx, r10 0049b ff e2 jmp rdx $LN128@stbi__crea: - -; 4259 : STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; - +; Line 4259 0049d 8b 94 24 10 01 00 00 mov edx, DWORD PTR x$[rsp] 004a4 8d 4a ff lea ecx, DWORD PTR [rdx-1] @@ -33742,9 +22241,7 @@ $LN32@stbi__crea: 004f0 75 c4 jne SHORT $LL34@stbi__crea 004f2 e9 5f 04 00 00 jmp $LN494@stbi__crea $LN129@stbi__crea: - -; 4260 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break; - +; Line 4260 004f7 8b 94 24 10 01 00 00 mov edx, DWORD PTR x$[rsp] 004fe 8d 4a ff lea ecx, DWORD PTR [rdx-1] @@ -33780,9 +22277,7 @@ $LN38@stbi__crea: 00554 75 ba jne SHORT $LL40@stbi__crea 00556 e9 fb 03 00 00 jmp $LN494@stbi__crea $LN130@stbi__crea: - -; 4261 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; - +; Line 4261 0055b 8b 94 24 10 01 00 00 mov edx, DWORD PTR x$[rsp] 00562 8d 4a ff lea ecx, DWORD PTR [rdx-1] @@ -33929,9 +22424,7 @@ $LN44@stbi__crea: 00702 48 8b 6c 24 60 mov rbp, QWORD PTR cur$9$[rsp] 00707 e9 4a 02 00 00 jmp $LN494@stbi__crea $LN131@stbi__crea: - -; 4262 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break; - +; Line 4262 0070c 8b 94 24 10 01 00 00 mov edx, DWORD PTR x$[rsp] 00713 8d 4a ff lea ecx, DWORD PTR [rdx-1] @@ -33975,9 +22468,7 @@ $LN50@stbi__crea: 00785 48 8b 6c 24 60 mov rbp, QWORD PTR cur$9$[rsp] 0078a e9 c7 01 00 00 jmp $LN494@stbi__crea $LN132@stbi__crea: - -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; - +; Line 4263 0078f 8b 94 24 10 01 00 00 mov edx, DWORD PTR x$[rsp] 00796 8d 4a ff lea ecx, DWORD PTR [rdx-1] @@ -34010,22 +22501,13 @@ $LL58@stbi__crea: $LL61@stbi__crea: 007f0 45 0f b6 0a movzx r9d, BYTE PTR [r10] 007f4 43 0f b6 2c 32 movzx ebp, BYTE PTR [r10+r14] - -; 4141 : int p = a + b - c; - +; Line 4141 007f9 41 8b d1 mov edx, r9d - -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; - +; Line 4263 007fc 46 0f b6 3c 10 movzx r15d, BYTE PTR [rax+r10] - -; 4141 : int p = a + b - c; - +; Line 4141 00801 2b d5 sub edx, ebp - -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); - +; Line 4143 00803 8b f2 mov esi, edx 00805 45 8d 04 17 lea r8d, DWORD PTR [r15+rdx] 00809 41 8b c8 mov ecx, r8d @@ -34035,31 +22517,23 @@ $LL61@stbi__crea: 00813 0f 48 f9 cmovs edi, ecx 00816 f7 de neg esi 00818 0f 48 f2 cmovs esi, edx - -; 4144 : int pc = abs(p - c); - +; Line 4144 0081b 44 2b c5 sub r8d, ebp 0081e 41 8b c8 mov ecx, r8d 00821 f7 d9 neg ecx 00823 41 0f 48 c8 cmovs ecx, r8d - -; 4145 : if (pa <= pb && pa <= pc) return a; - +; Line 4145 00827 3b fe cmp edi, esi 00829 7f 04 jg SHORT $LN223@stbi__crea 0082b 3b f9 cmp edi, ecx 0082d 7e 09 jle SHORT $LN224@stbi__crea $LN223@stbi__crea: - -; 4146 : if (pb <= pc) return b; - +; Line 4146 0082f 3b f1 cmp esi, ecx 00831 44 8b cd mov r9d, ebp 00834 45 0f 4e cf cmovle r9d, r15d $LN224@stbi__crea: - -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; - +; Line 4263 00838 47 02 0c 13 add r9b, BYTE PTR [r11+r10] 0083c 47 88 0c 2a mov BYTE PTR [r10+r13], r9b 00840 49 ff c2 inc r10 @@ -34067,7 +22541,7 @@ $LN224@stbi__crea: 00847 75 a7 jne SHORT $LL61@stbi__crea 00849 48 8b 44 24 40 mov rax, QWORD PTR cur$8$[rsp] 0084e 4c 8b 5c 24 58 mov r11, QWORD PTR prior$4$[rsp] - 00853 4c 8b 74 24 68 mov r14, QWORD PTR $T15[rsp] + 00853 4c 8b 74 24 68 mov r14, QWORD PTR $T3[rsp] 00858 48 8b 4c 24 70 mov rcx, QWORD PTR tv5788[rsp] 0085d 48 8b 94 24 90 00 00 00 mov rdx, QWORD PTR tv5835[rsp] @@ -34085,9 +22559,7 @@ $LN56@stbi__crea: 0088c 48 8b 6c 24 60 mov rbp, QWORD PTR cur$9$[rsp] 00891 e9 c0 00 00 00 jmp $LN494@stbi__crea $LN133@stbi__crea: - -; 4264 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break; - +; Line 4264 00896 8b 94 24 10 01 00 00 mov edx, DWORD PTR x$[rsp] 0089d 8d 4a ff lea ecx, DWORD PTR [rdx-1] @@ -34125,9 +22597,7 @@ $LN62@stbi__crea: 008f8 75 b6 jne SHORT $LL64@stbi__crea 008fa eb 5a jmp SHORT $LN494@stbi__crea $LN134@stbi__crea: - -; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; - +; Line 4265 008fc 8b 94 24 10 01 00 00 mov edx, DWORD PTR x$[rsp] 00903 8d 4a ff lea ecx, DWORD PTR [rdx-1] @@ -34147,13 +22617,9 @@ $LL70@stbi__crea: 00928 4c 2b d3 sub r10, rbx 0092b 0f 1f 44 00 00 npad 5 $LL73@stbi__crea: - -; 4145 : if (pa <= pb && pa <= pc) return a; - +; Line 4145 00930 42 0f b6 0c 02 movzx ecx, BYTE PTR [rdx+r8] - -; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; - +; Line 4265 00935 02 0a add cl, BYTE PTR [rdx] 00937 41 88 0c 12 mov BYTE PTR [r10+rdx], cl 0093b 48 8d 52 01 lea rdx, QWORD PTR [rdx+1] @@ -34166,14 +22632,7 @@ $LN68@stbi__crea: 00950 49 83 eb 01 sub r11, 1 00954 75 bb jne SHORT $LL70@stbi__crea $LN494@stbi__crea: - -; 4266 : } -; 4267 : #undef STBI__CASE -; 4268 : -; 4269 : // the loop above sets the high byte of the pixels' alpha, but for -; 4270 : // 16 bit png files we also need the low byte set. we'll do that here. -; 4271 : if (depth == 16) { - +; Line 4271 00956 8b 94 24 10 01 00 00 mov edx, DWORD PTR x$[rsp] $LN69@stbi__crea: @@ -34181,46 +22640,31 @@ $LN69@stbi__crea: 00 00 10 cmp DWORD PTR depth$[rsp], 16 00965 0f 85 4f 03 00 00 jne $LN2@stbi__crea - -; 4273 : for (i = 0; i < x; ++i, cur += output_bytes) { - +; Line 4273 0096b 85 d2 test edx, edx 0096d 0f 84 47 03 00 00 je $LN2@stbi__crea - -; 4272 : cur = a->out + stride * j; // start at the beginning of the row again - +; Line 4272 00973 8b c2 mov eax, edx 00975 66 66 66 0f 1f 84 00 00 00 00 00 npad 11 $LL76@stbi__crea: - -; 4274 : cur[filter_bytes + 1] = 255; - +; Line 4274 00980 41 c6 44 2e 01 ff mov BYTE PTR [r14+rbp+1], 255 ; 000000ffH 00986 49 03 ed add rbp, r13 00989 48 83 e8 01 sub rax, 1 0098d 75 f1 jne SHORT $LL76@stbi__crea - -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); - +; Line 4188 0098f e9 26 03 00 00 jmp $LN2@stbi__crea $LN120@stbi__crea: - -; 4235 : int nk = (width - 1) * filter_bytes; - +; Line 4235 00994 8b 74 24 48 mov esi, DWORD PTR width$1$[rsp] 00998 ff ce dec esi 0099a 41 0f af f4 imul esi, r12d 0099e 89 74 24 40 mov DWORD PTR nk$1$[rsp], esi - -; 4236 : #define STBI__CASE(f) \ -; 4237 : case f: \ -; 4238 : for (k=0; k < nk; ++k) -; 4239 : switch (filter) { - +; Line 4239 009a2 41 83 fa 06 cmp r10d, 6 009a6 0f 87 08 03 00 00 ja $LN28@stbi__crea @@ -34233,18 +22677,13 @@ $LN120@stbi__crea: 009c1 49 03 d2 add rdx, r10 009c4 ff e2 jmp rdx $LN121@stbi__crea: - -; 4240 : // "none" filter turns into a memcpy here; make that explicit. -; 4241 : case STBI__F_none: memcpy(cur, raw, nk); break; - +; Line 4241 009c6 48 8b d3 mov rdx, rbx 009c9 48 8b c8 mov rcx, rax 009cc e8 00 00 00 00 call memcpy 009d1 e9 de 02 00 00 jmp $LN28@stbi__crea $LN122@stbi__crea: - -; 4242 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break; - +; Line 4242 009d6 85 f6 test esi, esi 009d8 0f 8e d6 02 00 00 jle $LN28@stbi__crea @@ -34263,9 +22702,7 @@ $LL14@stbi__crea: 00a02 75 ec jne SHORT $LL14@stbi__crea 00a04 e9 ab 02 00 00 jmp $LN28@stbi__crea $LN123@stbi__crea: - -; 4243 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; - +; Line 4243 00a09 85 f6 test esi, esi 00a0b 0f 8e 30 01 00 00 jle $LN301@stbi__crea @@ -34390,9 +22827,7 @@ $LL300@stbi__crea: 00b72 75 ec jne SHORT $LL300@stbi__crea 00b74 e9 3b 01 00 00 jmp $LN28@stbi__crea $LN124@stbi__crea: - -; 4244 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break; - +; Line 4244 00b79 85 f6 test esi, esi 00b7b 0f 8e 33 01 00 00 jle $LN28@stbi__crea @@ -34417,9 +22852,7 @@ $LL20@stbi__crea: 00bbf 75 df jne SHORT $LL20@stbi__crea 00bc1 e9 ee 00 00 00 jmp $LN28@stbi__crea $LN125@stbi__crea: - -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; - +; Line 4245 00bc6 85 f6 test esi, esi 00bc8 0f 8e e6 00 00 00 jle $LN28@stbi__crea @@ -34436,22 +22869,13 @@ $LN125@stbi__crea: $LL23@stbi__crea: 00bf0 45 0f b6 0a movzx r9d, BYTE PTR [r10] 00bf4 43 0f b6 34 22 movzx esi, BYTE PTR [r10+r12] - -; 4141 : int p = a + b - c; - +; Line 4141 00bf9 41 8b c9 mov ecx, r9d - -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; - +; Line 4245 00bfc 43 0f b6 2c 2a movzx ebp, BYTE PTR [r10+r13] - -; 4141 : int p = a + b - c; - +; Line 4141 00c01 2b ce sub ecx, esi - -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); - +; Line 4143 00c03 8b f9 mov edi, ecx 00c05 8d 14 29 lea edx, DWORD PTR [rcx+rbp] 00c08 8b c2 mov eax, edx @@ -34461,44 +22885,34 @@ $LL23@stbi__crea: 00c13 44 0f 48 d8 cmovs r11d, eax 00c17 f7 df neg edi 00c19 0f 48 f9 cmovs edi, ecx - -; 4144 : int pc = abs(p - c); - +; Line 4144 00c1c 2b d6 sub edx, esi 00c1e 8b c2 mov eax, edx 00c20 f7 d8 neg eax 00c22 0f 48 c2 cmovs eax, edx - -; 4145 : if (pa <= pb && pa <= pc) return a; - +; Line 4145 00c25 44 3b df cmp r11d, edi 00c28 7f 05 jg SHORT $LN215@stbi__crea 00c2a 44 3b d8 cmp r11d, eax 00c2d 7e 09 jle SHORT $LN216@stbi__crea $LN215@stbi__crea: - -; 4146 : if (pb <= pc) return b; - +; Line 4146 00c2f 3b f8 cmp edi, eax 00c31 44 8b ce mov r9d, esi 00c34 44 0f 4e cd cmovle r9d, ebp $LN216@stbi__crea: - -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; - +; Line 4245 00c38 47 02 0c 17 add r9b, BYTE PTR [r15+r10] 00c3c 47 88 0c 16 mov BYTE PTR [r14+r10], r9b 00c40 49 ff c2 inc r10 00c43 49 83 e8 01 sub r8, 1 00c47 75 a7 jne SHORT $LL23@stbi__crea 00c49 4c 8b ac 24 98 - 00 00 00 mov r13, QWORD PTR $T16[rsp] + 00 00 00 mov r13, QWORD PTR $T4[rsp] 00c51 8b 74 24 40 mov esi, DWORD PTR nk$1$[rsp] 00c55 eb 5d jmp SHORT $LN28@stbi__crea $LN126@stbi__crea: - -; 4246 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break; - +; Line 4246 00c57 85 f6 test esi, esi 00c59 7e 59 jle SHORT $LN28@stbi__crea 00c5b 4c 8b c8 mov r9, rax @@ -34518,9 +22932,7 @@ $LL26@stbi__crea: 00c86 75 e8 jne SHORT $LL26@stbi__crea 00c88 eb 2a jmp SHORT $LN28@stbi__crea $LN127@stbi__crea: - -; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; - +; Line 4247 00c8a 85 f6 test esi, esi 00c8c 7e 26 jle SHORT $LN28@stbi__crea 00c8e 4c 8b c8 mov r9, rax @@ -34530,31 +22942,20 @@ $LN127@stbi__crea: 00c9a 48 2b c3 sub rax, rbx 00c9d 0f 1f 00 npad 3 $LL29@stbi__crea: - -; 4145 : if (pa <= pb && pa <= pc) return a; - +; Line 4145 00ca0 42 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+r9] - -; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; - +; Line 4247 00ca5 02 0a add cl, BYTE PTR [rdx] 00ca7 88 0c 10 mov BYTE PTR [rax+rdx], cl 00caa 48 8d 52 01 lea rdx, QWORD PTR [rdx+1] 00cae 49 83 e8 01 sub r8, 1 00cb2 75 ec jne SHORT $LL29@stbi__crea $LN28@stbi__crea: - -; 4248 : } -; 4249 : #undef STBI__CASE -; 4250 : raw += nk; - +; Line 4250 00cb4 48 63 c6 movsxd rax, esi 00cb7 48 03 d8 add rbx, rax $LN2@stbi__crea: - -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { - +; Line 4179 00cba 8b 54 24 4c mov edx, DWORD PTR j$1$[rsp] 00cbe 45 33 c9 xor r9d, r9d 00cc1 8b b4 24 18 01 @@ -34569,13 +22970,11 @@ $LN2@stbi__crea: 00ce2 3b d6 cmp edx, esi 00ce4 73 5c jae SHORT $LN485@stbi__crea 00ce6 44 8b 64 24 50 mov r12d, DWORD PTR filter_bytes$1$[rsp] - 00ceb 4c 8b 44 24 28 mov r8, QWORD PTR $T13[rsp] - 00cf0 48 8b 7c 24 30 mov rdi, QWORD PTR $T14[rsp] + 00ceb 4c 8b 44 24 28 mov r8, QWORD PTR $T1[rsp] + 00cf0 48 8b 7c 24 30 mov rdi, QWORD PTR $T2[rsp] 00cf5 e9 26 f5 ff ff jmp $LL4@stbi__crea $LN261@stbi__crea: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00cfa 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00d00 65 48 8b 04 25 @@ -34584,14 +22983,10 @@ $LN261@stbi__crea: 00d0e 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00d12 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0O@MKGNGALN@invalid?5width@ - -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); - +; Line 4188 00d19 e9 89 f4 ff ff jmp $LN651@stbi__crea $LN260@stbi__crea: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00d1e 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00d24 65 48 8b 04 25 @@ -34600,48 +22995,27 @@ $LN260@stbi__crea: 00d32 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00d36 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0P@FBBCPGMN@invalid?5filter@ - -; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); - +; Line 4185 00d3d e9 65 f4 ff ff jmp $LN651@stbi__crea $LN485@stbi__crea: - -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { - +; Line 4179 00d42 44 8b 6c 24 20 mov r13d, DWORD PTR a$1$[rsp] 00d47 4c 8d 05 00 00 00 00 lea r8, OFFSET FLAT:__ImageBase 00d4e 4c 8b 94 24 a0 00 00 00 mov r10, QWORD PTR cur$1$[rsp] $LN3@stbi__crea: - -; 4275 : } -; 4276 : } -; 4277 : } -; 4278 : } -; 4279 : -; 4280 : // we make a separate pass to expand bits to pixels; for performance, -; 4281 : // this could run two scanlines behind the above code, so it won't -; 4282 : // intefere with filtering but will still be in the cache. -; 4283 : if (depth < 8) { - +; Line 4283 00d56 48 63 9c 24 20 01 00 00 movsxd rbx, DWORD PTR depth$[rsp] 00d5e 83 fb 08 cmp ebx, 8 00d61 0f 8d 6e 04 00 00 jge $LN136@stbi__crea - -; 4284 : for (j = 0; j < y; ++j) { - +; Line 4284 00d67 85 f6 test esi, esi 00d69 0f 84 a6 04 00 00 je $LN96@stbi__crea - -; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit -; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop -; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range - +; Line 4289 00d6f 44 8b b4 24 08 01 00 00 mov r14d, DWORD PTR out_n$[rsp] 00d77 48 8d b3 00 00 @@ -34656,25 +23030,17 @@ $LN3@stbi__crea: 0f 1f 84 00 00 00 00 00 npad 13 $LL79@stbi__crea: - -; 4285 : stbi_uc* cur = a->out + stride * j; - - 00da0 48 8b 44 24 30 mov rax, QWORD PTR $T14[rsp] +; Line 4285 + 00da0 48 8b 44 24 30 mov rax, QWORD PTR $T2[rsp] 00da5 41 8b f9 mov edi, r9d 00da8 0f af 7c 24 38 imul edi, DWORD PTR stride$1$[rsp] - -; 4286 : stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes; - +; Line 4286 00dad 4d 8b ce mov r9, r14 00db0 4d 2b cf sub r9, r15 00db3 4c 03 cf add r9, rdi 00db6 4c 03 c8 add r9, rax 00db9 4c 8d 04 07 lea r8, QWORD PTR [rdi+rax] - -; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit -; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop -; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range - +; Line 4289 00dbd 45 85 e4 test r12d, r12d 00dc0 75 06 jne SHORT $LN159@stbi__crea 00dc2 44 0f b6 16 movzx r10d, BYTE PTR [rsi] @@ -34682,23 +23048,12 @@ $LL79@stbi__crea: $LN159@stbi__crea: 00dc8 41 b2 01 mov r10b, 1 $LN160@stbi__crea: - -; 4290 : -; 4291 : // note that the final byte might overshoot and write more data than desired. -; 4292 : // we can allocate enough data that this never writes out of memory, but it -; 4293 : // could also overwrite the next scanline. can it overwrite non-empty data -; 4294 : // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. -; 4295 : // so we need to explicitly clamp the final ones -; 4296 : -; 4297 : if (depth == 4) { - +; Line 4297 00dcb 41 8b cd mov ecx, r13d 00dce 83 fb 04 cmp ebx, 4 00dd1 0f 85 8c 00 00 00 jne $LN138@stbi__crea - -; 4298 : for (k = x * img_n; k >= 2; k -= 2, ++in) { - +; Line 4298 00dd7 89 4c 24 20 mov DWORD PTR a$1$[rsp], ecx 00ddb 8b d9 mov ebx, ecx 00ddd 83 f9 02 cmp ecx, 2 @@ -34713,17 +23068,13 @@ $LN160@stbi__crea: 1f 84 00 00 00 00 00 npad 12 $LL82@stbi__crea: - -; 4299 : *cur++ = scale * ((*in >> 4)); - +; Line 4299 00e00 41 0f b6 01 movzx eax, BYTE PTR [r9] 00e04 c0 e8 04 shr al, 4 00e07 0f b6 d0 movzx edx, al 00e0a 41 0f b6 ca movzx ecx, r10b 00e0e 0f af d1 imul edx, ecx - -; 4300 : *cur++ = scale * ((*in) & 0x0f); - +; Line 4300 00e11 41 0f b6 ca movzx ecx, r10b 00e15 41 88 10 mov BYTE PTR [r8], dl 00e18 41 0f b6 01 movzx eax, BYTE PTR [r9] @@ -34736,10 +23087,7 @@ $LL82@stbi__crea: 00e2f 49 83 eb 01 sub r11, 1 00e33 75 cb jne SHORT $LL82@stbi__crea $LN81@stbi__crea: - -; 4301 : } -; 4302 : if (k > 0) *cur++ = scale * ((*in >> 4)); - +; Line 4302 00e35 44 8b 6c 24 20 mov r13d, DWORD PTR a$1$[rsp] 00e3a 44 8b 9c 24 f0 00 00 00 mov r11d, DWORD PTR img_n$1$[rsp] @@ -34752,20 +23100,14 @@ $LN81@stbi__crea: 00e54 41 0f b6 ca movzx ecx, r10b 00e58 0f af d1 imul edx, ecx 00e5b 41 88 10 mov BYTE PTR [r8], dl - -; 4303 : } - +; Line 4303 00e5e e9 c5 02 00 00 jmp $LN650@stbi__crea $LN138@stbi__crea: - -; 4304 : else if (depth == 2) { - +; Line 4304 00e63 83 fb 02 cmp ebx, 2 00e66 0f 85 e8 00 00 00 jne $LN141@stbi__crea - -; 4305 : for (k = x * img_n; k >= 4; k -= 4, ++in) { - +; Line 4305 00e6c 89 4c 24 20 mov DWORD PTR a$1$[rsp], ecx 00e70 48 8b d9 mov rbx, rcx 00e73 83 f9 04 cmp ecx, 4 @@ -34778,17 +23120,13 @@ $LN138@stbi__crea: 00e88 8d 1c 81 lea ebx, DWORD PTR [rcx+rax*4] 00e8b 0f 1f 44 00 00 npad 5 $LL85@stbi__crea: - -; 4306 : *cur++ = scale * ((*in >> 6)); - +; Line 4306 00e90 41 0f b6 01 movzx eax, BYTE PTR [r9] 00e94 c0 e8 06 shr al, 6 00e97 0f b6 d0 movzx edx, al 00e9a 41 0f b6 ca movzx ecx, r10b 00e9e 0f af d1 imul edx, ecx - -; 4307 : *cur++ = scale * ((*in >> 4) & 0x03); - +; Line 4307 00ea1 41 0f b6 c2 movzx eax, r10b 00ea5 41 88 10 mov BYTE PTR [r8], dl 00ea8 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -34796,9 +23134,7 @@ $LL85@stbi__crea: 00eaf 80 e1 03 and cl, 3 00eb2 0f b6 c9 movzx ecx, cl 00eb5 0f af c8 imul ecx, eax - -; 4308 : *cur++ = scale * ((*in >> 2) & 0x03); - +; Line 4308 00eb8 41 0f b6 c2 movzx eax, r10b 00ebc 41 88 48 01 mov BYTE PTR [r8+1], cl 00ec0 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -34807,9 +23143,7 @@ $LL85@stbi__crea: 00eca 0f b6 c9 movzx ecx, cl 00ecd 0f af c8 imul ecx, eax 00ed0 41 88 48 02 mov BYTE PTR [r8+2], cl - -; 4309 : *cur++ = scale * ((*in) & 0x03); - +; Line 4309 00ed4 41 0f b6 01 movzx eax, BYTE PTR [r9] 00ed8 49 ff c1 inc r9 00edb 24 03 and al, 3 @@ -34821,10 +23155,7 @@ $LL85@stbi__crea: 00eef 49 83 eb 01 sub r11, 1 00ef3 75 9b jne SHORT $LL85@stbi__crea $LN84@stbi__crea: - -; 4310 : } -; 4311 : if (k > 0) *cur++ = scale * ((*in >> 6)); - +; Line 4311 00ef5 85 db test ebx, ebx 00ef7 7e 17 jle SHORT $LN143@stbi__crea 00ef9 41 0f b6 01 movzx eax, BYTE PTR [r9] @@ -34835,9 +23166,7 @@ $LN84@stbi__crea: 00f0a 41 88 10 mov BYTE PTR [r8], dl 00f0d 49 ff c0 inc r8 $LN143@stbi__crea: - -; 4312 : if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); - +; Line 4312 00f10 83 fb 01 cmp ebx, 1 00f13 7e 1a jle SHORT $LN144@stbi__crea 00f15 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -34849,9 +23178,7 @@ $LN143@stbi__crea: 00f29 41 88 08 mov BYTE PTR [r8], cl 00f2c 49 ff c0 inc r8 $LN144@stbi__crea: - -; 4313 : if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); - +; Line 4313 00f2f 44 8b 6c 24 20 mov r13d, DWORD PTR a$1$[rsp] 00f34 44 8b 9c 24 f0 00 00 00 mov r11d, DWORD PTR img_n$1$[rsp] @@ -34861,21 +23188,15 @@ $LN144@stbi__crea: 00f45 41 0f b6 09 movzx ecx, BYTE PTR [r9] 00f49 c0 e9 02 shr cl, 2 00f4c 80 e1 03 and cl, 3 - -; 4314 : } - +; Line 4314 00f4f e9 c7 01 00 00 jmp $LN652@stbi__crea $LN141@stbi__crea: - -; 4315 : else if (depth == 1) { - +; Line 4315 00f54 44 8b e9 mov r13d, ecx 00f57 83 fb 01 cmp ebx, 1 00f5a 0f 85 cd 01 00 00 jne $LN153@stbi__crea - -; 4316 : for (k = x * img_n; k >= 8; k -= 8, ++in) { - +; Line 4316 00f60 4c 8b d9 mov r11, rcx 00f63 83 f9 08 cmp ecx, 8 00f66 0f 8c dc 00 00 @@ -34887,17 +23208,13 @@ $LN141@stbi__crea: 00f77 44 8d 1c c1 lea r11d, DWORD PTR [rcx+rax*8] 00f7b 0f 1f 44 00 00 npad 5 $LL88@stbi__crea: - -; 4317 : *cur++ = scale * ((*in >> 7)); - +; Line 4317 00f80 41 0f b6 01 movzx eax, BYTE PTR [r9] 00f84 c0 e8 07 shr al, 7 00f87 0f b6 d0 movzx edx, al 00f8a 41 0f b6 ca movzx ecx, r10b 00f8e 0f af d1 imul edx, ecx - -; 4318 : *cur++ = scale * ((*in >> 6) & 0x01); - +; Line 4318 00f91 41 0f b6 c2 movzx eax, r10b 00f95 41 88 10 mov BYTE PTR [r8], dl 00f98 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -34905,9 +23222,7 @@ $LL88@stbi__crea: 00f9f 80 e1 01 and cl, 1 00fa2 0f b6 c9 movzx ecx, cl 00fa5 0f af c8 imul ecx, eax - -; 4319 : *cur++ = scale * ((*in >> 5) & 0x01); - +; Line 4319 00fa8 41 0f b6 c2 movzx eax, r10b 00fac 41 88 48 01 mov BYTE PTR [r8+1], cl 00fb0 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -34915,9 +23230,7 @@ $LL88@stbi__crea: 00fb7 80 e1 01 and cl, 1 00fba 0f b6 c9 movzx ecx, cl 00fbd 0f af c8 imul ecx, eax - -; 4320 : *cur++ = scale * ((*in >> 4) & 0x01); - +; Line 4320 00fc0 41 0f b6 c2 movzx eax, r10b 00fc4 41 88 48 02 mov BYTE PTR [r8+2], cl 00fc8 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -34925,9 +23238,7 @@ $LL88@stbi__crea: 00fcf 80 e1 01 and cl, 1 00fd2 0f b6 c9 movzx ecx, cl 00fd5 0f af c8 imul ecx, eax - -; 4321 : *cur++ = scale * ((*in >> 3) & 0x01); - +; Line 4321 00fd8 41 0f b6 c2 movzx eax, r10b 00fdc 41 88 48 03 mov BYTE PTR [r8+3], cl 00fe0 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -34935,9 +23246,7 @@ $LL88@stbi__crea: 00fe7 80 e1 01 and cl, 1 00fea 0f b6 c9 movzx ecx, cl 00fed 0f af c8 imul ecx, eax - -; 4322 : *cur++ = scale * ((*in >> 2) & 0x01); - +; Line 4322 00ff0 41 0f b6 c2 movzx eax, r10b 00ff4 41 88 48 04 mov BYTE PTR [r8+4], cl 00ff8 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -34945,9 +23254,7 @@ $LL88@stbi__crea: 00fff 80 e1 01 and cl, 1 01002 0f b6 c9 movzx ecx, cl 01005 0f af c8 imul ecx, eax - -; 4323 : *cur++ = scale * ((*in >> 1) & 0x01); - +; Line 4323 01008 41 0f b6 c2 movzx eax, r10b 0100c 41 88 48 05 mov BYTE PTR [r8+5], cl 01010 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -34956,9 +23263,7 @@ $LL88@stbi__crea: 01019 0f b6 c9 movzx ecx, cl 0101c 0f af c8 imul ecx, eax 0101f 41 88 48 06 mov BYTE PTR [r8+6], cl - -; 4324 : *cur++ = scale * ((*in) & 0x01); - +; Line 4324 01023 41 0f b6 01 movzx eax, BYTE PTR [r9] 01027 49 ff c1 inc r9 0102a 24 01 and al, 1 @@ -34971,10 +23276,7 @@ $LL88@stbi__crea: 01042 0f 85 38 ff ff ff jne $LL88@stbi__crea $LN87@stbi__crea: - -; 4325 : } -; 4326 : if (k > 0) *cur++ = scale * ((*in >> 7)); - +; Line 4326 01048 45 85 db test r11d, r11d 0104b 7e 17 jle SHORT $LN147@stbi__crea 0104d 41 0f b6 01 movzx eax, BYTE PTR [r9] @@ -34985,9 +23287,7 @@ $LN87@stbi__crea: 0105e 41 88 10 mov BYTE PTR [r8], dl 01061 49 ff c0 inc r8 $LN147@stbi__crea: - -; 4327 : if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); - +; Line 4327 01064 41 83 fb 01 cmp r11d, 1 01068 7e 1a jle SHORT $LN148@stbi__crea 0106a 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -34999,9 +23299,7 @@ $LN147@stbi__crea: 0107e 41 88 08 mov BYTE PTR [r8], cl 01081 49 ff c0 inc r8 $LN148@stbi__crea: - -; 4328 : if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); - +; Line 4328 01084 41 83 fb 02 cmp r11d, 2 01088 7e 1a jle SHORT $LN149@stbi__crea 0108a 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -35013,9 +23311,7 @@ $LN148@stbi__crea: 0109e 41 88 08 mov BYTE PTR [r8], cl 010a1 49 ff c0 inc r8 $LN149@stbi__crea: - -; 4329 : if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); - +; Line 4329 010a4 41 83 fb 03 cmp r11d, 3 010a8 7e 1a jle SHORT $LN150@stbi__crea 010aa 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -35027,9 +23323,7 @@ $LN149@stbi__crea: 010be 41 88 08 mov BYTE PTR [r8], cl 010c1 49 ff c0 inc r8 $LN150@stbi__crea: - -; 4330 : if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); - +; Line 4330 010c4 41 83 fb 04 cmp r11d, 4 010c8 7e 1a jle SHORT $LN151@stbi__crea 010ca 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -35041,9 +23335,7 @@ $LN150@stbi__crea: 010de 41 88 08 mov BYTE PTR [r8], cl 010e1 49 ff c0 inc r8 $LN151@stbi__crea: - -; 4331 : if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); - +; Line 4331 010e4 41 83 fb 05 cmp r11d, 5 010e8 7e 1a jle SHORT $LN152@stbi__crea 010ea 41 0f b6 09 movzx ecx, BYTE PTR [r9] @@ -35055,9 +23347,7 @@ $LN151@stbi__crea: 010fe 41 88 08 mov BYTE PTR [r8], cl 01101 49 ff c0 inc r8 $LN152@stbi__crea: - -; 4332 : if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); - +; Line 4332 01104 41 83 fb 06 cmp r11d, 6 01108 44 8b 9c 24 f0 00 00 00 mov r11d, DWORD PTR img_n$1$[rsp] @@ -35066,62 +23356,40 @@ $LN152@stbi__crea: 01116 d0 e9 shr cl, 1 01118 80 e1 01 and cl, 1 $LN652@stbi__crea: - -; 4333 : } -; 4334 : if (img_n != out_n) { - +; Line 4334 0111b 41 0f b6 c2 movzx eax, r10b 0111f 0f b6 c9 movzx ecx, cl 01122 0f af c8 imul ecx, eax 01125 41 88 08 mov BYTE PTR [r8], cl $LN650@stbi__crea: - 01128 48 8b 44 24 30 mov rax, QWORD PTR $T14[rsp] + 01128 48 8b 44 24 30 mov rax, QWORD PTR $T2[rsp] $LN153@stbi__crea: 0112d 44 3b 9c 24 08 01 00 00 cmp r11d, DWORD PTR out_n$[rsp] 01135 74 72 je SHORT $LN77@stbi__crea - -; 4335 : int q; -; 4336 : // insert alpha = 255 -; 4337 : cur = a->out + stride * j; - +; Line 4337 01137 48 8d 14 07 lea rdx, QWORD PTR [rdi+rax] 0113b 48 8d 4d ff lea rcx, QWORD PTR [rbp-1] - -; 4338 : if (img_n == 1) { - +; Line 4338 0113f 41 83 fb 01 cmp r11d, 1 01143 75 1f jne SHORT $LN155@stbi__crea - -; 4339 : for (q = x - 1; q >= 0; --q) { - +; Line 4339 01145 48 85 c9 test rcx, rcx 01148 78 5f js SHORT $LN77@stbi__crea 0114a 66 0f 1f 44 00 00 npad 6 $LL91@stbi__crea: - -; 4340 : cur[q * 2 + 1] = 255; - +; Line 4340 01150 c6 44 4a 01 ff mov BYTE PTR [rdx+rcx*2+1], 255 ; 000000ffH - -; 4341 : cur[q * 2 + 0] = cur[q]; - +; Line 4341 01155 0f b6 04 11 movzx eax, BYTE PTR [rcx+rdx] 01159 88 04 4a mov BYTE PTR [rdx+rcx*2], al 0115c 48 83 e9 01 sub rcx, 1 01160 79 ee jns SHORT $LL91@stbi__crea - -; 4342 : } -; 4343 : } - +; Line 4343 01162 eb 45 jmp SHORT $LN77@stbi__crea $LN155@stbi__crea: - -; 4344 : else { -; 4345 : STBI_ASSERT(img_n == 3); -; 4346 : for (q = x - 1; q >= 0; --q) { - +; Line 4346 01164 48 85 c9 test rcx, rcx 01167 78 40 js SHORT $LN77@stbi__crea 01169 4c 8d 04 4d 01 @@ -35133,32 +23401,22 @@ $LN155@stbi__crea: 0117f 90 npad 1 $LL94@stbi__crea: 01180 48 83 e9 01 sub rcx, 1 - -; 4347 : cur[q * 4 + 3] = 255; - +; Line 4347 01184 c6 42 01 ff mov BYTE PTR [rdx+1], 255 ; 000000ffH - -; 4348 : cur[q * 4 + 2] = cur[q * 3 + 2]; - +; Line 4348 01188 41 0f b6 40 01 movzx eax, BYTE PTR [r8+1] 0118d 4d 8d 40 fd lea r8, QWORD PTR [r8-3] 01191 88 02 mov BYTE PTR [rdx], al 01193 48 8d 52 fc lea rdx, QWORD PTR [rdx-4] - -; 4349 : cur[q * 4 + 1] = cur[q * 3 + 1]; - +; Line 4349 01197 41 0f b6 40 03 movzx eax, BYTE PTR [r8+3] 0119c 88 42 03 mov BYTE PTR [rdx+3], al - -; 4350 : cur[q * 4 + 0] = cur[q * 3 + 0]; - +; Line 4350 0119f 41 0f b6 40 02 movzx eax, BYTE PTR [r8+2] 011a4 88 42 02 mov BYTE PTR [rdx+2], al 011a7 79 d7 jns SHORT $LL94@stbi__crea $LN77@stbi__crea: - -; 4284 : for (j = 0; j < y; ++j) { - +; Line 4284 011a9 4c 8b 4c 24 78 mov r9, QWORD PTR tv5875[rsp] 011ae 8b 9c 24 20 01 00 00 mov ebx, DWORD PTR depth$[rsp] @@ -35168,30 +23426,14 @@ $LN77@stbi__crea: 01 00 00 cmp r9d, DWORD PTR y$[rsp] 011c5 0f 82 d5 fb ff ff jb $LL79@stbi__crea - -; 4366 : } -; 4367 : } -; 4368 : -; 4369 : return 1; - +; Line 4369 011cb b8 01 00 00 00 mov eax, 1 011d0 e9 d8 ef ff ff jmp $LN649@stbi__crea $LN136@stbi__crea: - -; 4351 : } -; 4352 : } -; 4353 : } -; 4354 : } -; 4355 : } -; 4356 : else if (depth == 16) { - +; Line 4356 011d5 83 fb 10 cmp ebx, 16 011d8 75 3b jne SHORT $LN96@stbi__crea - -; 4362 : stbi__uint16* cur16 = (stbi__uint16*)cur; -; 4363 : -; 4364 : for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) { - +; Line 4364 011da 8b 84 24 08 01 00 00 mov eax, DWORD PTR out_n$[rsp] 011e1 4d 8b c2 mov r8, r10 @@ -35199,18 +23441,10 @@ $LN136@stbi__crea: 011e8 0f af c6 imul eax, esi 011eb 85 c0 test eax, eax 011ed 74 26 je SHORT $LN96@stbi__crea - -; 4357 : // force the image data from big-endian to platform-native. -; 4358 : // this is done in a separate pass due to the decoding relying -; 4359 : // on the data being untouched, but could probably be done -; 4360 : // per-line during decode if care is taken. -; 4361 : stbi_uc* cur = a->out; - +; Line 4361 011ef 44 8b c8 mov r9d, eax $LL97@stbi__crea: - -; 4365 : *cur16 = (cur[0] << 8) | cur[1]; - +; Line 4365 011f2 41 0f b6 12 movzx edx, BYTE PTR [r10] 011f6 4d 8d 52 02 lea r10, QWORD PTR [r10+2] 011fa 41 0f b6 48 01 movzx ecx, BYTE PTR [r8+1] @@ -35221,18 +23455,11 @@ $LL97@stbi__crea: 0120f 49 83 e9 01 sub r9, 1 01213 75 dd jne SHORT $LL97@stbi__crea $LN96@stbi__crea: - -; 4366 : } -; 4367 : } -; 4368 : -; 4369 : return 1; - +; Line 4369 01215 b8 01 00 00 00 mov eax, 1 0121a e9 8e ef ff ff jmp $LN649@stbi__crea $LN384@stbi__crea: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0121f 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 01225 65 48 8b 04 25 @@ -35241,20 +23468,13 @@ $LN384@stbi__crea: 01233 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 01237 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - -; 4169 : -; 4170 : if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); - +; Line 4170 0123e e9 64 ef ff ff jmp $LN651@stbi__crea $LN388@stbi__crea: - -; 508 : if (!stbi__mad3sizes_valid(a, b, c, add)) return NULL; - +; Line 508 01243 4c 89 46 18 mov QWORD PTR [rsi+24], r8 $LN387@stbi__crea: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 01247 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0124d 65 48 8b 04 25 @@ -35264,16 +23484,12 @@ $LN387@stbi__crea: 0125f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ 01266 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); - +; Line 4168 0126a 33 c0 xor eax, eax 0126c e9 44 ef ff ff jmp $LN1@stbi__crea 01271 0f 1f 00 npad 3 $LN398@stbi__crea: - -; 4370 : } - +; Line 4370 01274 00 00 00 00 DD $LL406@stbi__crea 01278 00 00 00 00 DD $LL407@stbi__crea 0127c 00 00 00 00 DD $LL447@stbi__crea @@ -35300,7 +23516,6 @@ $LN394@stbi__crea: stbi__create_png_image_raw ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__create_png_image _TEXT SEGMENT tv892 = 64 @@ -35316,10 +23531,10 @@ img_len$1$ = 100 final$1$ = 104 tv889 = 112 tv902 = 120 -xspc$4 = 128 -xorig$5 = 160 -yspc$6 = 192 -yorig$7 = 224 +xspc$1 = 128 +xorig$2 = 160 +yspc$3 = 192 +yorig$4 = 224 a$ = 336 image_data$ = 344 image_data_len$ = 352 @@ -35329,9 +23544,8 @@ color$ = 376 j$1$ = 384 interlaced$ = 384 stbi__create_png_image PROC ; COMDAT - -; 4373 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4373 00000 44 89 4c 24 20 mov DWORD PTR [rsp+32], r9d 00005 44 89 44 24 18 mov DWORD PTR [rsp+24], r8d 0000a 48 89 54 24 10 mov QWORD PTR [rsp+16], rdx @@ -35343,9 +23557,7 @@ stbi__create_png_image PROC ; COMDAT 00019 41 56 push r14 0001b 48 81 ec 20 01 00 00 sub rsp, 288 ; 00000120H - -; 4374 : int bytes = (depth == 16 ? 2 : 1); - +; Line 4374 00022 33 db xor ebx, ebx 00024 48 8b fa mov rdi, rdx 00027 8b 94 24 70 01 @@ -35353,25 +23565,17 @@ stbi__create_png_image PROC ; COMDAT 0002e 8b eb mov ebp, ebx 00030 83 fa 10 cmp edx, 16 00033 4c 8b e1 mov r12, rcx - -; 4375 : int out_bytes = out_n * bytes; - +; Line 4375 00036 48 8b 09 mov rcx, QWORD PTR [rcx] 00039 45 8b f0 mov r14d, r8d 0003c 40 0f 94 c5 sete bpl 00040 ff c5 inc ebp 00042 41 0f af e9 imul ebp, r9d - -; 4376 : stbi_uc* final; -; 4377 : int p; -; 4378 : if (!interlaced) - +; Line 4378 00046 39 9c 24 80 01 00 00 cmp DWORD PTR interlaced$[rsp], ebx 0004d 75 36 jne SHORT $LN11@stbi__crea - -; 4379 : return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); - +; Line 4379 0004f 8b 84 24 78 01 00 00 mov eax, DWORD PTR color$[rsp] 00056 89 44 24 38 mov DWORD PTR [rsp+56], eax @@ -35383,9 +23587,7 @@ stbi__create_png_image PROC ; COMDAT 0006a 49 8b cc mov rcx, r12 0006d 89 44 24 20 mov DWORD PTR [rsp+32], eax 00071 e8 00 00 00 00 call stbi__create_png_image_raw - -; 4415 : } - +; Line 4415 00076 48 81 c4 20 01 00 00 add rsp, 288 ; 00000120H 0007d 41 5e pop r14 @@ -35395,92 +23597,62 @@ stbi__create_png_image PROC ; COMDAT 00083 5b pop rbx 00084 c3 ret 0 $LN11@stbi__crea: - -; 4380 : -; 4381 : // de-interlacing -; 4382 : final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); - +; Line 4382 00085 44 8b 41 04 mov r8d, DWORD PTR [rcx+4] 00089 8b 09 mov ecx, DWORD PTR [rcx] 0008b 48 89 b4 24 18 01 00 00 mov QWORD PTR [rsp+280], rsi - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00093 85 c9 test ecx, ecx 00095 0f 88 76 03 00 00 js $LN53@stbi__crea 0009b 45 85 c0 test r8d, r8d 0009e 0f 88 6d 03 00 00 js $LN53@stbi__crea - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 000a4 74 11 je SHORT $LN57@stbi__crea - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 000a6 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 000ab 99 cdq 000ac 41 f7 f8 idiv r8d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 000af 3b c8 cmp ecx, eax 000b1 0f 8f 5a 03 00 00 jg $LN53@stbi__crea $LN57@stbi__crea: 000b7 41 0f af c8 imul ecx, r8d - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 000bb 85 c9 test ecx, ecx 000bd 0f 88 4e 03 00 00 js $LN53@stbi__crea 000c3 85 ed test ebp, ebp 000c5 0f 88 46 03 00 00 js $LN53@stbi__crea - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 000cb 74 10 je SHORT $LN17@stbi__crea - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 000cd b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 000d2 99 cdq 000d3 f7 fd idiv ebp - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 000d5 3b c8 cmp ecx, eax 000d7 0f 8f 34 03 00 00 jg $LN53@stbi__crea $LN17@stbi__crea: - -; 509 : return stbi__malloc(a * b * c + add); - +; Line 509 000dd 0f af cd imul ecx, ebp 000e0 48 63 c9 movsxd rcx, ecx - -; 438 : return STBI_MALLOC(size); - +; Line 438 000e3 ff 15 00 00 00 00 call QWORD PTR __imp_malloc 000e9 48 89 44 24 68 mov QWORD PTR final$1$[rsp], rax - -; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); - +; Line 4383 000ee 48 85 c0 test rax, rax 000f1 0f 84 1a 03 00 00 je $LN53@stbi__crea 000f7 4c 89 ac 24 10 01 00 00 mov QWORD PTR [rsp+272], r13 - -; 4384 : for (p = 0; p < 7; ++p) { - +; Line 4384 000ff 44 8b cb mov r9d, ebx 00102 4c 89 bc 24 08 01 00 00 mov QWORD PTR [rsp+264], r15 @@ -35490,96 +23662,81 @@ $LN17@stbi__crea: 00116 66 66 0f 1f 84 00 00 00 00 00 npad 10 $LL4@stbi__crea: - -; 4385 : int xorig[] = { 0,4,0,2,0,1,0 }; - +; Line 4385 00120 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@00000002000000000000000400000000 - -; 4386 : int yorig[] = { 0,0,4,0,2,0,1 }; -; 4387 : int xspc[] = { 8,8,4,4,2,2,1 }; -; 4388 : int yspc[] = { 8,8,8,4,4,2,2 }; -; 4389 : int i, j, x, y; -; 4390 : // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 -; 4391 : x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p]; - +; Line 4391 00128 33 d2 xor edx, edx 0012a 4d 8b 04 24 mov r8, QWORD PTR [r12] 0012e f3 0f 7f 84 24 - a0 00 00 00 movdqu XMMWORD PTR xorig$5[rsp], xmm0 + a0 00 00 00 movdqu XMMWORD PTR xorig$2[rsp], xmm0 00137 c7 84 24 90 00 00 00 02 00 00 - 00 mov DWORD PTR xspc$4[rsp+16], 2 + 00 mov DWORD PTR xspc$1[rsp+16], 2 00142 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@00000000000000040000000000000000 0014a f3 0f 7f 84 24 - e0 00 00 00 movdqu XMMWORD PTR yorig$7[rsp], xmm0 + e0 00 00 00 movdqu XMMWORD PTR yorig$4[rsp], xmm0 00153 c7 84 24 94 00 00 00 02 00 00 - 00 mov DWORD PTR xspc$4[rsp+20], 2 + 00 mov DWORD PTR xspc$1[rsp+20], 2 0015e 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@00000004000000040000000800000008 00166 f3 0f 7f 84 24 - 80 00 00 00 movdqu XMMWORD PTR xspc$4[rsp], xmm0 + 80 00 00 00 movdqu XMMWORD PTR xspc$1[rsp], xmm0 0016f c7 84 24 98 00 00 00 01 00 00 - 00 mov DWORD PTR xspc$4[rsp+24], 1 + 00 mov DWORD PTR xspc$1[rsp+24], 1 0017a 46 8b 94 2c 80 - 00 00 00 mov r10d, DWORD PTR xspc$4[rsp+r13] + 00 00 00 mov r10d, DWORD PTR xspc$1[rsp+r13] 00182 41 8b ca mov ecx, r10d 00185 66 0f 6f 05 00 00 00 00 movdqa xmm0, XMMWORD PTR __xmm@00000004000000080000000800000008 0018d 89 9c 24 b0 00 - 00 00 mov DWORD PTR xorig$5[rsp+16], ebx + 00 00 mov DWORD PTR xorig$2[rsp+16], ebx 00194 48 c7 84 24 b4 00 00 00 01 00 - 00 00 mov QWORD PTR xorig$5[rsp+20], 1 + 00 00 mov QWORD PTR xorig$2[rsp+20], 1 001a0 42 8b 84 2c a0 - 00 00 00 mov eax, DWORD PTR xorig$5[rsp+r13] + 00 00 00 mov eax, DWORD PTR xorig$2[rsp+r13] 001a8 2b c8 sub ecx, eax 001aa 89 44 24 50 mov DWORD PTR tv905[rsp], eax 001ae 41 8b 00 mov eax, DWORD PTR [r8] 001b1 ff c8 dec eax 001b3 48 c7 84 24 f0 00 00 00 02 00 - 00 00 mov QWORD PTR yorig$7[rsp+16], 2 + 00 00 mov QWORD PTR yorig$4[rsp+16], 2 001bf 03 c1 add eax, ecx 001c1 c7 84 24 f8 00 00 00 01 00 00 - 00 mov DWORD PTR yorig$7[rsp+24], 1 + 00 mov DWORD PTR yorig$4[rsp+24], 1 001cc 41 f7 f2 div r10d 001cf f3 0f 7f 84 24 - c0 00 00 00 movdqu XMMWORD PTR yspc$6[rsp], xmm0 + c0 00 00 00 movdqu XMMWORD PTR yspc$3[rsp], xmm0 001d8 44 8b f8 mov r15d, eax - -; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; - +; Line 4392 001db 42 8b 84 2c e0 - 00 00 00 mov eax, DWORD PTR yorig$7[rsp+r13] + 00 00 00 mov eax, DWORD PTR yorig$4[rsp+r13] 001e3 c7 84 24 d0 00 00 00 04 00 00 - 00 mov DWORD PTR yspc$6[rsp+16], 4 + 00 mov DWORD PTR yspc$3[rsp+16], 4 001ee c7 84 24 d4 00 00 00 02 00 00 - 00 mov DWORD PTR yspc$6[rsp+20], 2 + 00 mov DWORD PTR yspc$3[rsp+20], 2 001f9 c7 84 24 d8 00 00 00 02 00 00 - 00 mov DWORD PTR yspc$6[rsp+24], 2 + 00 mov DWORD PTR yspc$3[rsp+24], 2 00204 42 8b b4 2c c0 - 00 00 00 mov esi, DWORD PTR yspc$6[rsp+r13] + 00 00 00 mov esi, DWORD PTR yspc$3[rsp+r13] 0020c 44 89 54 24 4c mov DWORD PTR tv906[rsp], r10d 00211 44 89 7c 24 54 mov DWORD PTR x$1$[rsp], r15d 00216 89 74 24 60 mov DWORD PTR tv901[rsp], esi 0021a 89 44 24 48 mov DWORD PTR tv900[rsp], eax - -; 4393 : if (x && y) { - +; Line 4393 0021e 45 85 ff test r15d, r15d 00221 0f 84 8a 01 00 00 je $LN2@stbi__crea - -; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; - +; Line 4392 00227 41 8b 48 04 mov ecx, DWORD PTR [r8+4] 0022b 33 d2 xor edx, edx 0022d 2b c8 sub ecx, eax @@ -35588,22 +23745,16 @@ $LL4@stbi__crea: 00234 f7 f6 div esi 00236 89 44 24 58 mov DWORD PTR y$1$[rsp], eax 0023a 8b f8 mov edi, eax - -; 4393 : if (x && y) { - +; Line 4393 0023c 85 c0 test eax, eax 0023e 0f 84 6d 01 00 00 je $LN2@stbi__crea - -; 4394 : stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; - +; Line 4394 00244 8b 84 24 70 01 00 00 mov eax, DWORD PTR depth$[rsp] 0024b 41 8b df mov ebx, r15d 0024e 41 0f af 58 08 imul ebx, DWORD PTR [r8+8] - -; 4395 : if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { - +; Line 4395 00253 45 8b c6 mov r8d, r14d 00256 8b 8c 24 78 01 00 00 mov ecx, DWORD PTR color$[rsp] @@ -35626,10 +23777,7 @@ $LL4@stbi__crea: 00298 85 c0 test eax, eax 0029a 0f 84 62 01 00 00 je $LN43@stbi__crea - -; 4398 : } -; 4399 : for (j = 0; j < y; ++j) { - +; Line 4399 002a0 45 33 f6 xor r14d, r14d 002a3 44 89 b4 24 80 01 00 00 mov DWORD PTR j$1$[rsp], r14d @@ -35642,17 +23790,11 @@ $LL4@stbi__crea: 002bc 44 89 6c 24 40 mov DWORD PTR tv892[rsp], r13d 002c1 89 44 24 5c mov DWORD PTR tv890[rsp], eax $LL7@stbi__crea: - -; 4400 : for (i = 0; i < x; ++i) { - +; Line 4400 002c5 45 85 ff test r15d, r15d 002c8 0f 8e 87 00 00 00 jle $LN5@stbi__crea - -; 4401 : int out_y = j * yspc[p] + yorig[p]; -; 4402 : int out_x = i * xspc[p] + xorig[p]; -; 4403 : memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, - +; Line 4403 002ce 4c 8b 84 24 50 01 00 00 mov r8, QWORD PTR a$[rsp] 002d6 8b fe mov edi, esi @@ -35692,10 +23834,7 @@ $LL10@stbi__crea: 0034d 8b 44 24 5c mov eax, DWORD PTR tv890[rsp] 00351 8b 74 24 60 mov esi, DWORD PTR tv901[rsp] $LN5@stbi__crea: - -; 4398 : } -; 4399 : for (j = 0; j < y; ++j) { - +; Line 4399 00355 41 ff c6 inc r14d 00358 44 03 e8 add r13d, eax 0035b 44 89 b4 24 80 @@ -35709,19 +23848,11 @@ $LN5@stbi__crea: 01 00 00 mov r12, QWORD PTR a$[rsp] 0037d 4c 8b 6c 24 70 mov r13, QWORD PTR tv889[rsp] $LN6@stbi__crea: - -; 4404 : a->out + (j * x + i) * out_bytes, out_bytes); -; 4405 : } -; 4406 : } -; 4407 : STBI_FREE(a->out); - +; Line 4407 00382 49 8b 4c 24 18 mov rcx, QWORD PTR [r12+24] 00387 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4408 : image_data += img_len; -; 4409 : image_data_len -= img_len; - +; Line 4409 0038d 44 8b b4 24 60 01 00 00 mov r14d, DWORD PTR image_data_len$[rsp] 00395 44 8b 4c 24 44 mov r9d, DWORD PTR p$1$[rsp] @@ -35733,9 +23864,7 @@ $LN6@stbi__crea: 003a9 44 89 b4 24 60 01 00 00 mov DWORD PTR image_data_len$[rsp], r14d $LN2@stbi__crea: - -; 4384 : for (p = 0; p < 7; ++p) { - +; Line 4384 003b1 41 ff c1 inc r9d 003b4 49 83 c5 04 add r13, 4 003b8 44 89 4c 24 44 mov DWORD PTR p$1$[rsp], r9d @@ -35743,17 +23872,10 @@ $LN2@stbi__crea: 003c2 41 83 f9 07 cmp r9d, 7 003c6 0f 8c 54 fd ff ff jl $LL4@stbi__crea - -; 4410 : } -; 4411 : } -; 4412 : a->out = final; - +; Line 4412 003cc 48 8b 44 24 68 mov rax, QWORD PTR final$1$[rsp] 003d1 49 89 44 24 18 mov QWORD PTR [r12+24], rax - -; 4413 : -; 4414 : return 1; - +; Line 4414 003d6 b8 01 00 00 00 mov eax, 1 $LN76@stbi__crea: 003db 4c 8b ac 24 10 @@ -35763,9 +23885,7 @@ $LN76@stbi__crea: $LN74@stbi__crea: 003eb 48 8b b4 24 18 01 00 00 mov rsi, QWORD PTR [rsp+280] - -; 4415 : } - +; Line 4415 003f3 48 81 c4 20 01 00 00 add rsp, 288 ; 00000120H 003fa 41 5e pop r14 @@ -35775,21 +23895,15 @@ $LN74@stbi__crea: 00400 5b pop rbx 00401 c3 ret 0 $LN43@stbi__crea: - -; 4396 : STBI_FREE(final); - +; Line 4396 00402 48 8b 4c 24 68 mov rcx, QWORD PTR final$1$[rsp] 00407 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4397 : return 0; - +; Line 4397 0040d 33 c0 xor eax, eax 0040f eb ca jmp SHORT $LN76@stbi__crea $LN53@stbi__crea: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00411 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 0041a 8b 0d 00 00 00 @@ -35799,52 +23913,33 @@ $LN53@stbi__crea: 00429 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ 00430 48 89 04 0a mov QWORD PTR [rdx+rcx], rax - -; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); - +; Line 4383 00434 33 c0 xor eax, eax 00436 eb b3 jmp SHORT $LN74@stbi__crea stbi__create_png_image ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__compute_transparency _TEXT SEGMENT z$ = 8 tc$ = 16 out_n$ = 24 stbi__compute_transparency PROC ; COMDAT - -; 4419 : stbi__context* s = z->s; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4419 00000 48 8b 01 mov rax, QWORD PTR [rcx] - -; 4420 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; - +; Line 4420 00003 44 8b 48 04 mov r9d, DWORD PTR [rax+4] 00007 44 0f af 08 imul r9d, DWORD PTR [rax] - -; 4421 : stbi_uc* p = z->out; - +; Line 4421 0000b 48 8b 41 18 mov rax, QWORD PTR [rcx+24] - -; 4428 : for (i = 0; i < pixel_count; ++i) { - +; Line 4428 0000f 45 85 c9 test r9d, r9d 00012 74 67 je SHORT $LN20@stbi__comp - -; 4422 : -; 4423 : // compute color-based transparency, assuming we've -; 4424 : // already got 255 as the alpha value in the output -; 4425 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4426 : -; 4427 : if (out_n == 2) { - +; Line 4427 00014 41 83 f8 02 cmp r8d, 2 00018 75 35 jne SHORT $LN8@stbi__comp - -; 4429 : p[1] = (p[0] == tc[0] ? 0 : 255); - +; Line 4429 0001a 44 0f b6 02 movzx r8d, BYTE PTR [rdx] 0001e 41 8b d1 mov edx, r9d 00021 45 33 c9 xor r9d, r9d @@ -35853,31 +23948,18 @@ stbi__compute_transparency PROC ; COMDAT 00 00 npad 12 $LL4@stbi__comp: 00030 44 38 00 cmp BYTE PTR [rax], r8b - -; 4430 : p += 2; - +; Line 4430 00033 48 8d 40 02 lea rax, QWORD PTR [rax+2] 00037 b9 ff 00 00 00 mov ecx, 255 ; 000000ffH 0003c 41 0f 44 c9 cmove ecx, r9d 00040 88 48 ff mov BYTE PTR [rax-1], cl 00043 48 83 ea 01 sub rdx, 1 00047 75 e7 jne SHORT $LL4@stbi__comp - -; 4438 : } -; 4439 : } -; 4440 : return 1; -; 4441 : } - +; Line 4441 00049 b8 01 00 00 00 mov eax, 1 0004e c3 ret 0 $LN8@stbi__comp: - -; 4431 : } -; 4432 : } -; 4433 : else { -; 4434 : for (i = 0; i < pixel_count; ++i) { -; 4435 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) - +; Line 4435 0004f 44 0f b6 12 movzx r10d, BYTE PTR [rdx] 00053 45 8b c1 mov r8d, r9d $LL7@stbi__comp: @@ -35889,67 +23971,41 @@ $LL7@stbi__comp: 00064 0f b6 4a 02 movzx ecx, BYTE PTR [rdx+2] 00068 38 48 02 cmp BYTE PTR [rax+2], cl 0006b 75 04 jne SHORT $LN10@stbi__comp - -; 4436 : p[3] = 0; - +; Line 4436 0006d c6 40 03 00 mov BYTE PTR [rax+3], 0 $LN10@stbi__comp: - -; 4437 : p += 4; - +; Line 4437 00071 48 83 c0 04 add rax, 4 00075 49 83 e8 01 sub r8, 1 00079 75 db jne SHORT $LL7@stbi__comp $LN20@stbi__comp: - -; 4438 : } -; 4439 : } -; 4440 : return 1; -; 4441 : } - +; Line 4441 0007b b8 01 00 00 00 mov eax, 1 00080 c3 ret 0 stbi__compute_transparency ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__compute_transparency16 _TEXT SEGMENT z$ = 8 tc$ = 16 out_n$ = 24 stbi__compute_transparency16 PROC ; COMDAT - -; 4445 : stbi__context* s = z->s; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4445 00000 48 8b 01 mov rax, QWORD PTR [rcx] - -; 4446 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; - +; Line 4446 00003 44 8b 48 04 mov r9d, DWORD PTR [rax+4] 00007 44 0f af 08 imul r9d, DWORD PTR [rax] - -; 4447 : stbi__uint16* p = (stbi__uint16*)z->out; - +; Line 4447 0000b 48 8b 41 18 mov rax, QWORD PTR [rcx+24] - -; 4454 : for (i = 0; i < pixel_count; ++i) { - +; Line 4454 0000f 45 85 c9 test r9d, r9d 00012 74 75 je SHORT $LN20@stbi__comp - -; 4448 : -; 4449 : // compute color-based transparency, assuming we've -; 4450 : // already got 65535 as the alpha value in the output -; 4451 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4452 : -; 4453 : if (out_n == 2) { - +; Line 4453 00014 41 83 f8 02 cmp r8d, 2 00018 75 36 jne SHORT $LN8@stbi__comp - -; 4455 : p[1] = (p[0] == tc[0] ? 0 : 65535); - +; Line 4455 0001a 44 0f b7 02 movzx r8d, WORD PTR [rdx] 0001e 41 8b d1 mov edx, r9d 00021 45 33 c9 xor r9d, r9d @@ -35958,31 +24014,18 @@ stbi__compute_transparency16 PROC ; COMDAT 00 00 npad 12 $LL4@stbi__comp: 00030 66 44 39 00 cmp WORD PTR [rax], r8w - -; 4456 : p += 2; - +; Line 4456 00034 48 8d 40 04 lea rax, QWORD PTR [rax+4] 00038 b9 ff ff 00 00 mov ecx, 65535 ; 0000ffffH 0003d 66 41 0f 44 c9 cmove cx, r9w 00042 66 89 48 fe mov WORD PTR [rax-2], cx 00046 48 83 ea 01 sub rdx, 1 0004a 75 e4 jne SHORT $LL4@stbi__comp - -; 4464 : } -; 4465 : } -; 4466 : return 1; -; 4467 : } - +; Line 4467 0004c 8d 42 01 lea eax, QWORD PTR [rdx+1] 0004f c3 ret 0 $LN8@stbi__comp: - -; 4457 : } -; 4458 : } -; 4459 : else { -; 4460 : for (i = 0; i < pixel_count; ++i) { -; 4461 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) - +; Line 4461 00050 44 0f b7 12 movzx r10d, WORD PTR [rdx] 00054 45 8b c1 mov r8d, r9d 00057 45 33 c9 xor r9d, r9d @@ -35997,30 +24040,20 @@ $LL7@stbi__comp: 00070 0f b7 4a 04 movzx ecx, WORD PTR [rdx+4] 00074 66 39 48 04 cmp WORD PTR [rax+4], cx 00078 75 05 jne SHORT $LN10@stbi__comp - -; 4462 : p[3] = 0; - +; Line 4462 0007a 66 44 89 48 06 mov WORD PTR [rax+6], r9w $LN10@stbi__comp: - -; 4463 : p += 4; - +; Line 4463 0007f 48 83 c0 08 add rax, 8 00083 49 83 e8 01 sub r8, 1 00087 75 d7 jne SHORT $LL7@stbi__comp $LN20@stbi__comp: - -; 4464 : } -; 4465 : } -; 4466 : return 1; -; 4467 : } - +; Line 4467 00089 b8 01 00 00 00 mov eax, 1 0008e c3 ret 0 stbi__compute_transparency16 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__expand_png_palette _TEXT SEGMENT a$ = 64 @@ -36028,9 +24061,8 @@ palette$ = 72 len$dead$ = 80 pal_img_n$ = 88 stbi__expand_png_palette PROC ; COMDAT - -; 4470 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4470 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi @@ -36038,94 +24070,58 @@ stbi__expand_png_palette PROC ; COMDAT 00010 41 56 push r14 00012 41 57 push r15 00014 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 4471 : stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; - +; Line 4471 00018 48 8b 01 mov rax, QWORD PTR [rcx] 0001b 41 8b e9 mov ebp, r9d - -; 4472 : stbi_uc* p, * temp_out, * orig = a->out; - +; Line 4472 0001e 48 8b 59 18 mov rbx, QWORD PTR [rcx+24] 00022 48 8b fa mov rdi, rdx 00025 4c 8b f9 mov r15, rcx 00028 8b 70 04 mov esi, DWORD PTR [rax+4] 0002b 0f af 30 imul esi, DWORD PTR [rax] - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 0002e 85 f6 test esi, esi 00030 0f 88 bf 00 00 00 js $LN40@stbi__expa 00036 45 85 c9 test r9d, r9d 00039 0f 88 b6 00 00 00 js $LN40@stbi__expa - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0003f 74 11 je SHORT $LN13@stbi__expa - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 00041 33 d2 xor edx, edx 00043 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00048 f7 f5 div ebp - -; 477 : return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add); - +; Line 477 0004a 3b f0 cmp esi, eax 0004c 0f 8f a3 00 00 00 jg $LN40@stbi__expa $LN13@stbi__expa: - -; 502 : return stbi__malloc(a * b + add); - +; Line 502 00052 8b c6 mov eax, esi 00054 0f af c5 imul eax, ebp 00057 48 63 c8 movsxd rcx, eax - -; 438 : return STBI_MALLOC(size); - +; Line 438 0005a ff 15 00 00 00 00 call QWORD PTR __imp_malloc 00060 4c 8b f0 mov r14, rax - -; 4473 : -; 4474 : p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0); -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); - +; Line 4475 00063 48 85 c0 test rax, rax 00066 0f 84 89 00 00 00 je $LN40@stbi__expa - -; 4481 : for (i = 0; i < pixel_count; ++i) { - +; Line 4481 0006c 85 f6 test esi, esi 0006e 74 70 je SHORT $LN6@stbi__expa - -; 4476 : -; 4477 : // between here and free(out) below, exitting would leak -; 4478 : temp_out = p; -; 4479 : -; 4480 : if (pal_img_n == 3) { - +; Line 4480 00070 44 8b c6 mov r8d, esi 00073 48 8d 50 02 lea rdx, QWORD PTR [rax+2] 00077 83 fd 03 cmp ebp, 3 0007a 75 34 jne SHORT $LL7@stbi__expa 0007c 0f 1f 40 00 npad 4 $LL4@stbi__expa: - -; 4482 : int n = orig[i] * 4; - +; Line 4482 00080 0f b6 0b movzx ecx, BYTE PTR [rbx] - -; 4483 : p[0] = palette[n]; -; 4484 : p[1] = palette[n + 1]; -; 4485 : p[2] = palette[n + 2]; -; 4486 : p += 3; - +; Line 4486 00083 48 8d 52 03 lea rdx, QWORD PTR [rdx+3] 00087 48 8d 5b 01 lea rbx, QWORD PTR [rbx+1] 0008b 0f b6 04 8f movzx eax, BYTE PTR [rdi+rcx*4] @@ -36136,27 +24132,14 @@ $LL4@stbi__expa: 0009f 88 42 fc mov BYTE PTR [rdx-4], al 000a2 49 83 e8 01 sub r8, 1 000a6 75 d8 jne SHORT $LL4@stbi__expa - -; 4487 : } -; 4488 : } - +; Line 4488 000a8 eb 36 jmp SHORT $LN6@stbi__expa 000aa 66 0f 1f 44 00 00 npad 6 $LL7@stbi__expa: - -; 4489 : else { -; 4490 : for (i = 0; i < pixel_count; ++i) { -; 4491 : int n = orig[i] * 4; - +; Line 4491 000b0 0f b6 0b movzx ecx, BYTE PTR [rbx] - -; 4492 : p[0] = palette[n]; -; 4493 : p[1] = palette[n + 1]; -; 4494 : p[2] = palette[n + 2]; -; 4495 : p[3] = palette[n + 3]; -; 4496 : p += 4; - +; Line 4496 000b3 48 8d 52 04 lea rdx, QWORD PTR [rdx+4] 000b7 48 8d 5b 01 lea rbx, QWORD PTR [rbx+1] 000bb 0f b6 04 8f movzx eax, BYTE PTR [rdi+rcx*4] @@ -36170,28 +24153,16 @@ $LL7@stbi__expa: 000da 49 83 e8 01 sub r8, 1 000de 75 d0 jne SHORT $LL7@stbi__expa $LN6@stbi__expa: - -; 4497 : } -; 4498 : } -; 4499 : STBI_FREE(a->out); - +; Line 4499 000e0 49 8b 4f 18 mov rcx, QWORD PTR [r15+24] 000e4 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4500 : a->out = temp_out; -; 4501 : -; 4502 : STBI_NOTUSED(len); -; 4503 : -; 4504 : return 1; - +; Line 4504 000ea b8 01 00 00 00 mov eax, 1 000ef 4d 89 77 18 mov QWORD PTR [r15+24], r14 000f3 eb 25 jmp SHORT $LN1@stbi__expa $LN40@stbi__expa: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 000f5 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 000fe 8b 0d 00 00 00 @@ -36201,16 +24172,10 @@ $LN40@stbi__expa: 0010d 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ 00114 48 89 04 0a mov QWORD PTR [rdx+rcx], rax - -; 4473 : -; 4474 : p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0); -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); - +; Line 4475 00118 33 c0 xor eax, eax $LN1@stbi__expa: - -; 4505 : } - +; Line 4505 0011a 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] 0011f 48 8b 6c 24 48 mov rbp, QWORD PTR [rsp+72] 00124 48 8b 74 24 50 mov rsi, QWORD PTR [rsp+80] @@ -36222,35 +24187,23 @@ $LN1@stbi__expa: stbi__expand_png_palette ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__de_iphone _TEXT SEGMENT z$ = 16 stbi__de_iphone PROC ; COMDAT - -; 4548 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4548 00000 48 83 ec 08 sub rsp, 8 - -; 4549 : stbi__context* s = z->s; - +; Line 4549 00004 48 8b 01 mov rax, QWORD PTR [rcx] - -; 4550 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4551 : stbi_uc* p = z->out; - +; Line 4551 00007 48 8b 49 18 mov rcx, QWORD PTR [rcx+24] 0000b 44 8b 40 04 mov r8d, DWORD PTR [rax+4] 0000f 44 0f af 00 imul r8d, DWORD PTR [rax] - -; 4552 : -; 4553 : if (s->img_out_n == 3) { // convert bgr to rgb - +; Line 4553 00013 83 78 0c 03 cmp DWORD PTR [rax+12], 3 00017 75 32 jne SHORT $LN11@stbi__de_i - -; 4554 : for (i = 0; i < pixel_count; ++i) { - +; Line 4554 00019 45 85 c0 test r8d, r8d 0001c 0f 84 f4 00 00 00 je $LN9@stbi__de_i @@ -36258,41 +24211,22 @@ stbi__de_iphone PROC ; COMDAT 66 0f 1f 84 00 00 00 00 00 npad 14 $LL4@stbi__de_i: - -; 4555 : stbi_uc t = p[0]; - +; Line 4555 00030 0f b6 11 movzx edx, BYTE PTR [rcx] - -; 4556 : p[0] = p[2]; - +; Line 4556 00033 0f b6 41 02 movzx eax, BYTE PTR [rcx+2] 00037 88 01 mov BYTE PTR [rcx], al - -; 4557 : p[2] = t; - +; Line 4557 00039 88 51 02 mov BYTE PTR [rcx+2], dl - -; 4558 : p += 3; - +; Line 4558 0003c 48 8d 49 03 lea rcx, QWORD PTR [rcx+3] 00040 49 83 e8 01 sub r8, 1 00044 75 ea jne SHORT $LL4@stbi__de_i - -; 4588 : } -; 4589 : } -; 4590 : } -; 4591 : } - +; Line 4591 00046 48 83 c4 08 add rsp, 8 0004a c3 ret 0 $LN11@stbi__de_i: - -; 4559 : } -; 4560 : } -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { - +; Line 4563 0004b 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00051 65 48 8b 04 25 @@ -36308,53 +24242,30 @@ $LN18@stbi__de_i: 00073 8b 05 00 00 00 00 mov eax, DWORD PTR stbi__unpremultiply_on_load_global $LN19@stbi__de_i: - -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { - +; Line 4565 00079 45 85 c0 test r8d, r8d 0007c 0f 84 94 00 00 00 je $LN9@stbi__de_i - -; 4559 : } -; 4560 : } -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { - +; Line 4563 00082 85 c0 test eax, eax 00084 74 7a je SHORT $LL10@stbi__de_i 00086 48 89 1c 24 mov QWORD PTR [rsp], rbx - -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { - +; Line 4565 0008a 45 8b d0 mov r10d, r8d 0008d 0f 1f 00 npad 3 $LL7@stbi__de_i: - -; 4566 : stbi_uc a = p[3]; - +; Line 4566 00090 0f b6 41 03 movzx eax, BYTE PTR [rcx+3] - -; 4567 : stbi_uc t = p[0]; - +; Line 4567 00094 44 0f b6 19 movzx r11d, BYTE PTR [rcx] 00098 0f b6 59 02 movzx ebx, BYTE PTR [rcx+2] - -; 4568 : if (a) { - +; Line 4568 0009c 84 c0 test al, al 0009e 74 40 je SHORT $LN15@stbi__de_i - -; 4569 : stbi_uc half = a / 2; - +; Line 4569 000a0 44 8b c0 mov r8d, eax 000a3 44 8b c8 mov r9d, eax - -; 4570 : p[0] = (p[2] * 255 + half) / a; -; 4571 : p[1] = (p[1] * 255 + half) / a; - +; Line 4571 000a6 0f b6 41 01 movzx eax, BYTE PTR [rcx+1] 000aa 33 d2 xor edx, edx 000ac 69 c0 ff 00 00 @@ -36362,9 +24273,7 @@ $LL7@stbi__de_i: 000b2 41 d1 e8 shr r8d, 1 000b5 41 03 c0 add eax, r8d 000b8 41 f7 f1 div r9d - -; 4572 : p[2] = (t * 255 + half) / a; - +; Line 4572 000bb 33 d2 xor edx, edx 000bd 88 41 01 mov BYTE PTR [rcx+1], al 000c0 41 69 c3 ff 00 @@ -36377,77 +24286,43 @@ $LL7@stbi__de_i: 00 imul eax, ebx, 255 ; 000000ffH 000d8 41 03 c0 add eax, r8d 000db 41 f7 f1 div r9d - -; 4573 : } - +; Line 4573 000de eb 03 jmp SHORT $LN16@stbi__de_i $LN15@stbi__de_i: - -; 4574 : else { -; 4575 : p[0] = p[2]; -; 4576 : p[2] = t; - +; Line 4576 000e0 0f b6 c3 movzx eax, bl $LN16@stbi__de_i: - -; 4577 : } -; 4578 : p += 4; - +; Line 4578 000e3 88 01 mov BYTE PTR [rcx], al 000e5 44 88 59 02 mov BYTE PTR [rcx+2], r11b 000e9 48 83 c1 04 add rcx, 4 000ed 49 83 ea 01 sub r10, 1 000f1 75 9d jne SHORT $LL7@stbi__de_i - -; 4579 : } -; 4580 : } - +; Line 4580 000f3 48 8b 1c 24 mov rbx, QWORD PTR [rsp] - -; 4588 : } -; 4589 : } -; 4590 : } -; 4591 : } - +; Line 4591 000f7 48 83 c4 08 add rsp, 8 000fb c3 ret 0 000fc 0f 1f 40 00 npad 4 $LL10@stbi__de_i: - -; 4581 : else { -; 4582 : // convert bgr to rgb -; 4583 : for (i = 0; i < pixel_count; ++i) { -; 4584 : stbi_uc t = p[0]; - +; Line 4584 00100 0f b6 11 movzx edx, BYTE PTR [rcx] - -; 4585 : p[0] = p[2]; - +; Line 4585 00103 0f b6 41 02 movzx eax, BYTE PTR [rcx+2] 00107 88 01 mov BYTE PTR [rcx], al - -; 4586 : p[2] = t; - +; Line 4586 00109 88 51 02 mov BYTE PTR [rcx+2], dl - -; 4587 : p += 4; - +; Line 4587 0010c 48 8d 49 04 lea rcx, QWORD PTR [rcx+4] 00110 49 83 e8 01 sub r8, 1 00114 75 ea jne SHORT $LL10@stbi__de_i $LN9@stbi__de_i: - -; 4588 : } -; 4589 : } -; 4590 : } -; 4591 : } - +; Line 4591 00116 48 83 c4 08 add rsp, 8 0011a c3 ret 0 stbi__de_iphone ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__parse_png_file _TEXT SEGMENT pal_img_n$1$ = 64 @@ -36458,8 +24333,8 @@ interlace$1$ = 76 is_iphone$1$ = 80 color$1$ = 84 req_comp$1$ = 88 -c$14 = 96 -a$15 = 112 +c$1 = 96 +a$2 = 112 tc$ = 4208 tc16$ = 4212 palette$ = 4224 @@ -36468,9 +24343,8 @@ z$ = 5312 scan$dead$ = 5320 req_comp$ = 5328 stbi__parse_png_file PROC ; COMDAT - -; 4596 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4596 00000 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx 00005 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi 0000a 48 89 7c 24 20 mov QWORD PTR [rsp+32], rdi @@ -36491,48 +24365,29 @@ stbi__parse_png_file PROC ; COMDAT 00 00 mov QWORD PTR __$ArrayPad$[rbp-256], rax 0003e 4c 8b e9 mov r13, rcx 00041 44 89 44 24 58 mov DWORD PTR req_comp$1$[rsp], r8d - -; 4597 : stbi_uc palette[1024], pal_img_n = 0; -; 4598 : stbi_uc has_trans = 0, tc[3] = { 0 }; -; 4599 : stbi__uint16 tc16[3]; -; 4600 : stbi__uint32 ioff = 0, idata_limit = 0, i, pal_len = 0; - +; Line 4600 00046 33 c9 xor ecx, ecx 00048 c6 44 24 40 00 mov BYTE PTR pal_img_n$1$[rsp], 0 0004d 33 c0 xor eax, eax 0004f 89 4c 24 48 mov DWORD PTR ioff$1$[rsp], ecx 00053 45 32 f6 xor r14b, r14b - -; 4601 : int first = 1, k, interlace = 0, color = 0, is_iphone = 0; - +; Line 4601 00056 89 4c 24 4c mov DWORD PTR interlace$1$[rsp], ecx - -; 4602 : stbi__context* s = z->s; - +; Line 4602 0005a 49 8b 5d 00 mov rbx, QWORD PTR [r13] 0005e 44 8b f9 mov r15d, ecx 00061 44 8b e1 mov r12d, ecx 00064 89 4c 24 54 mov DWORD PTR color$1$[rsp], ecx 00068 89 4c 24 50 mov DWORD PTR is_iphone$1$[rsp], ecx - -; 4603 : -; 4604 : z->expanded = NULL; - +; Line 4604 0006c 49 89 4d 10 mov QWORD PTR [r13+16], rcx - -; 4605 : z->idata = NULL; - +; Line 4605 00070 49 89 4d 08 mov QWORD PTR [r13+8], rcx - -; 4606 : z->out = NULL; - +; Line 4606 00074 49 89 4d 18 mov QWORD PTR [r13+24], rcx 00078 44 88 74 24 41 mov BYTE PTR has_trans$1$[rsp], r14b 0007d 44 8b f1 mov r14d, ecx - -; 4607 : -; 4608 : if (!stbi__check_png_header(s)) return 0; - +; Line 4608 00080 48 8b cb mov rcx, rbx 00083 66 89 85 70 0f 00 00 mov WORD PTR tc$[rbp-256], ax @@ -36542,60 +24397,36 @@ stbi__parse_png_file PROC ; COMDAT 00 00 00 mov DWORD PTR first$1$[rsp], 1 00098 e8 00 00 00 00 call stbi__check_png_header 0009d 85 c0 test eax, eax - 0009f 0f 84 4b 0e 00 - 00 je $LN327@stbi__pars + 0009f 0f 84 43 0e 00 + 00 je $LN325@stbi__pars $LL2@stbi__pars: - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 1168 000a5 48 8b cb mov rcx, rbx 000a8 e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 000ad 48 8b cb mov rcx, rbx 000b0 8b f0 mov esi, eax 000b2 e8 00 00 00 00 call stbi__get16be 000b7 c1 e6 10 shl esi, 16 - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 1168 000ba 48 8b cb mov rcx, rbx - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 000bd 03 f0 add esi, eax - -; 4098 : c.length = stbi__get32be(s); - - 000bf 89 74 24 60 mov DWORD PTR c$14[rsp], esi - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 4098 + 000bf 89 74 24 60 mov DWORD PTR c$1[rsp], esi +; Line 1168 000c3 e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 000c8 48 8b cb mov rcx, rbx 000cb 8b f8 mov edi, eax 000cd e8 00 00 00 00 call stbi__get16be 000d2 c1 e7 10 shl edi, 16 000d5 8d 14 07 lea edx, DWORD PTR [rdi+rax] - -; 4099 : c.type = stbi__get32be(s); - - 000d8 89 54 24 64 mov DWORD PTR c$14[rsp+4], edx - -; 4609 : -; 4610 : if (scan == STBI__SCAN_type) return 1; -; 4611 : -; 4612 : for (;;) { -; 4613 : stbi__pngchunk c = stbi__get_chunk_header(s); - - 000dc 48 8b 44 24 60 mov rax, QWORD PTR c$14[rsp] - -; 4614 : switch (c.type) { - +; Line 4099 + 000d8 89 54 24 64 mov DWORD PTR c$1[rsp+4], edx +; Line 4613 + 000dc 48 8b 44 24 60 mov rax, QWORD PTR c$1[rsp] +; Line 4614 000e1 48 8b c8 mov rcx, rax 000e4 48 c1 e9 20 shr rcx, 32 ; 00000020H 000e8 81 f9 52 44 48 @@ -36615,27 +24446,16 @@ $LL2@stbi__pars: 49 cmp ecx, 1229278788 ; 49454e44H 00114 0f 85 6e 03 00 00 jne $LN93@stbi__pars - -; 4715 : } -; 4716 : -; 4717 : case STBI__PNG_TYPE('I', 'E', 'N', 'D'): { -; 4718 : stbi__uint32 raw_len, bpl; -; 4719 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - +; Line 4719 0011a 83 7c 24 44 00 cmp DWORD PTR first$1$[rsp], 0 - 0011f 0f 85 a8 0d 00 - 00 jne $LN354@stbi__pars - -; 4720 : if (scan != STBI__SCAN_load) return 1; -; 4721 : if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG"); - + 0011f 0f 85 a0 0d 00 + 00 jne $LN352@stbi__pars +; Line 4721 00125 49 8b 7d 08 mov rdi, QWORD PTR [r13+8] 00129 48 85 ff test rdi, rdi 0012c 0f 85 77 06 00 00 jne $LN75@stbi__pars - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00132 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00138 65 48 8b 04 25 @@ -36643,234 +24463,147 @@ $LL2@stbi__pars: 00141 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00145 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_07MLPECBNA@no?5IDAT@ - -; 4720 : if (scan != STBI__SCAN_load) return 1; -; 4721 : if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG"); - - 0014c e9 96 0d 00 00 jmp $LN635@stbi__pars +; Line 4721 + 0014c e9 8e 0d 00 00 jmp $LN633@stbi__pars $LN61@stbi__pars: - -; 4689 : } -; 4690 : -; 4691 : case STBI__PNG_TYPE('I', 'D', 'A', 'T'): { -; 4692 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - +; Line 4692 00151 83 7c 24 44 00 cmp DWORD PTR first$1$[rsp], 0 - 00156 0f 85 71 0d 00 - 00 jne $LN354@stbi__pars - -; 4693 : if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG"); - + 00156 0f 85 69 0d 00 + 00 jne $LN352@stbi__pars +; Line 4693 0015c 80 7c 24 40 00 cmp BYTE PTR pal_img_n$1$[rsp], 0 00161 74 09 je SHORT $LN63@stbi__pars 00163 45 85 ff test r15d, r15d - 00166 0f 84 18 0b 00 - 00 je $LN324@stbi__pars + 00166 0f 84 10 0b 00 + 00 je $LN322@stbi__pars $LN63@stbi__pars: - -; 4694 : if (scan == STBI__SCAN_header) { -; 4695 : // header scan definitely stops at first IDAT -; 4696 : if (pal_img_n) -; 4697 : s->img_n = pal_img_n; -; 4698 : return 1; -; 4699 : } -; 4700 : if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); - +; Line 4700 0016c 81 fe 00 00 00 40 cmp esi, 1073741824 ; 40000000H - 00172 0f 87 69 0b 00 - 00 ja $LN326@stbi__pars - -; 4701 : if ((int)(ioff + c.length) < (int)ioff) return 0; - + 00172 0f 87 61 0b 00 + 00 ja $LN324@stbi__pars +; Line 4701 00178 8b 7c 24 48 mov edi, DWORD PTR ioff$1$[rsp] 0017c 8d 0c 3e lea ecx, DWORD PTR [rsi+rdi] 0017f 3b cf cmp ecx, edi - 00181 0f 8c 69 0d 00 - 00 jl $LN327@stbi__pars - -; 4702 : if (ioff + c.length > idata_limit) { - + 00181 0f 8c 61 0d 00 + 00 jl $LN325@stbi__pars +; Line 4702 00187 41 3b ce cmp ecx, r14d - 0018a 76 39 jbe SHORT $LN479@stbi__pars - -; 4703 : stbi__uint32 idata_limit_old = idata_limit; -; 4704 : stbi_uc* p; -; 4705 : if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; - + 0018a 76 39 jbe SHORT $LN477@stbi__pars +; Line 4705 0018c 45 85 f6 test r14d, r14d - 0018f 75 0d jne SHORT $LN318@stbi__pars + 0018f 75 0d jne SHORT $LN316@stbi__pars 00191 41 be 00 10 00 00 mov r14d, 4096 ; 00001000H 00197 41 3b f6 cmp esi, r14d 0019a 44 0f 47 f0 cmova r14d, eax -$LN318@stbi__pars: - -; 4706 : while (ioff + c.length > idata_limit) - +$LN316@stbi__pars: +; Line 4706 0019e 41 3b ce cmp ecx, r14d 001a1 76 08 jbe SHORT $LN20@stbi__pars $LL19@stbi__pars: - -; 4707 : idata_limit *= 2; - +; Line 4707 001a3 45 03 f6 add r14d, r14d 001a6 41 3b ce cmp ecx, r14d 001a9 77 f8 ja SHORT $LL19@stbi__pars $LN20@stbi__pars: - -; 4708 : STBI_NOTUSED(idata_limit_old); -; 4709 : p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); - +; Line 4709 001ab 49 8b 4d 08 mov rcx, QWORD PTR [r13+8] 001af 41 8b d6 mov edx, r14d 001b2 ff 15 00 00 00 00 call QWORD PTR __imp_realloc 001b8 48 85 c0 test rax, rax - 001bb 0f 84 e2 0a 00 - 00 je $LN328@stbi__pars - -; 4710 : z->idata = p; - + 001bb 0f 84 da 0a 00 + 00 je $LN326@stbi__pars +; Line 4710 001c1 49 89 45 08 mov QWORD PTR [r13+8], rax -$LN479@stbi__pars: - -; 4711 : } -; 4712 : if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG"); - +$LN477@stbi__pars: +; Line 4712 001c5 48 8b d7 mov rdx, rdi 001c8 44 8b c6 mov r8d, esi 001cb 49 03 55 08 add rdx, QWORD PTR [r13+8] 001cf 48 8b cb mov rcx, rbx 001d2 e8 00 00 00 00 call stbi__getn 001d7 85 c0 test eax, eax - 001d9 0f 84 e3 0a 00 - 00 je $LN329@stbi__pars - -; 4713 : ioff += c.length; - + 001d9 0f 84 db 0a 00 + 00 je $LN327@stbi__pars +; Line 4713 001df 03 fe add edi, esi 001e1 89 7c 24 48 mov DWORD PTR ioff$1$[rsp], edi - -; 4714 : break; - +; Line 4714 001e5 e9 aa 05 00 00 jmp $LN8@stbi__pars $LN23@stbi__pars: - -; 4615 : case STBI__PNG_TYPE('C', 'g', 'B', 'I'): -; 4616 : is_iphone = 1; - +; Line 4616 001ea c7 44 24 50 01 00 00 00 mov DWORD PTR is_iphone$1$[rsp], 1 - -; 1110 : return; - - 001f2 e9 a6 02 00 00 jmp $LN634@stbi__pars +; Line 1110 + 001f2 e9 a6 02 00 00 jmp $LN632@stbi__pars $LN24@stbi__pars: - -; 4617 : stbi__skip(s, c.length); -; 4618 : break; -; 4619 : case STBI__PNG_TYPE('I', 'H', 'D', 'R'): { -; 4620 : int comp, filter; -; 4621 : if (!first) return stbi__err("multiple IHDR", "Corrupt PNG"); - +; Line 4621 001f7 83 7c 24 44 00 cmp DWORD PTR first$1$[rsp], 0 - 001fc 0f 84 d7 0b 00 - 00 je $LN330@stbi__pars - -; 4622 : first = 0; - + 001fc 0f 84 cf 0b 00 + 00 je $LN328@stbi__pars +; Line 4622 00202 33 c0 xor eax, eax 00204 89 44 24 44 mov DWORD PTR first$1$[rsp], eax 00208 83 fe 0d cmp esi, 13 - -; 4623 : if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG"); - - 0020b 0f 85 a9 0b 00 - 00 jne $LN331@stbi__pars - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 4623 + 0020b 0f 85 a1 0b 00 + 00 jne $LN329@stbi__pars +; Line 1168 00211 48 8b cb mov rcx, rbx 00214 e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 00219 48 8b cb mov rcx, rbx 0021c 8b f8 mov edi, eax 0021e e8 00 00 00 00 call stbi__get16be 00223 c1 e7 10 shl edi, 16 - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 1168 00226 48 8b cb mov rcx, rbx - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 00229 03 c7 add eax, edi - -; 4624 : s->img_x = stbi__get32be(s); - +; Line 4624 0022b 89 03 mov DWORD PTR [rbx], eax - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 1168 0022d e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 00232 48 8b cb mov rcx, rbx 00235 8b f8 mov edi, eax 00237 e8 00 00 00 00 call stbi__get16be 0023c c1 e7 10 shl edi, 16 0023f 03 c7 add eax, edi - -; 4625 : s->img_y = stbi__get32be(s); - +; Line 4625 00241 89 43 04 mov DWORD PTR [rbx+4], eax - -; 4626 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); - +; Line 4626 00244 3d 00 00 00 01 cmp eax, 16777216 ; 01000000H 00249 0f 87 f2 01 00 - 00 ja $LN342@stbi__pars - -; 4627 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); - + 00 ja $LN340@stbi__pars +; Line 4627 0024f 81 3b 00 00 00 01 cmp DWORD PTR [rbx], 16777216 ; 01000000H 00255 0f 87 e6 01 00 - 00 ja $LN342@stbi__pars - -; 1077 : if (s->img_buffer < s->img_buffer_end) - + 00 ja $LN340@stbi__pars +; Line 1077 0025b 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00262 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00269 73 0f jae SHORT $LN161@stbi__pars - -; 1078 : return *s->img_buffer++; - +; Line 1078 0026b 0f b6 08 movzx ecx, BYTE PTR [rax] 0026e 48 ff c0 inc rax 00271 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00278 eb 26 jmp SHORT $LN160@stbi__pars $LN161@stbi__pars: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0027a 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0027e 74 1e je SHORT $LN162@stbi__pars - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00280 48 8b cb mov rcx, rbx 00283 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00288 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0028f 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -36879,54 +24612,39 @@ $LN161@stbi__pars: 00 00 mov QWORD PTR [rbx+192], rax 0029c eb 02 jmp SHORT $LN160@stbi__pars $LN162@stbi__pars: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 0029e 32 c9 xor cl, cl $LN160@stbi__pars: - -; 4628 : z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only"); - +; Line 4628 002a0 0f b6 c1 movzx eax, cl 002a3 41 89 45 20 mov DWORD PTR [r13+32], eax 002a7 83 f8 10 cmp eax, 16 - 002aa 0f 87 eb 0a 00 - 00 ja $LN334@stbi__pars + 002aa 0f 87 e3 0a 00 + 00 ja $LN332@stbi__pars 002b0 b9 16 01 01 00 mov ecx, 65814 ; 00010116H 002b5 0f a3 c1 bt ecx, eax - 002b8 0f 83 dd 0a 00 - 00 jae $LN334@stbi__pars - -; 1077 : if (s->img_buffer < s->img_buffer_end) - + 002b8 0f 83 d5 0a 00 + 00 jae $LN332@stbi__pars +; Line 1077 002be 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 002c5 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 002cc 73 0f jae SHORT $LN167@stbi__pars - -; 1078 : return *s->img_buffer++; - +; Line 1078 002ce 0f b6 08 movzx ecx, BYTE PTR [rax] 002d1 48 ff c0 inc rax 002d4 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 002db eb 26 jmp SHORT $LN166@stbi__pars $LN167@stbi__pars: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 002dd 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 002e1 74 1e je SHORT $LN168@stbi__pars - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 002e3 48 8b cb mov rcx, rbx 002e6 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 002eb 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 002f2 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -36935,134 +24653,95 @@ $LN167@stbi__pars: 00 00 mov QWORD PTR [rbx+192], rax 002ff eb 02 jmp SHORT $LN166@stbi__pars $LN168@stbi__pars: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00301 32 c9 xor cl, cl $LN166@stbi__pars: - -; 4629 : color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype", "Corrupt PNG"); - +; Line 4629 00303 0f b6 f9 movzx edi, cl 00306 89 7c 24 54 mov DWORD PTR color$1$[rsp], edi 0030a 83 ff 06 cmp edi, 6 - 0030d 0f 87 ed 09 00 - 00 ja $LN336@stbi__pars - -; 4630 : if (color == 3 && z->depth == 16) return stbi__err("bad ctype", "Corrupt PNG"); - + 0030d 0f 87 e5 09 00 + 00 ja $LN334@stbi__pars +; Line 4630 00313 83 ff 03 cmp edi, 3 00316 75 16 jne SHORT $LN32@stbi__pars 00318 41 83 7d 20 10 cmp DWORD PTR [r13+32], 16 - 0031d 0f 84 dd 09 00 - 00 je $LN336@stbi__pars - -; 4631 : if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype", "Corrupt PNG"); - + 0031d 0f 84 d5 09 00 + 00 je $LN334@stbi__pars +; Line 4631 00323 40 0f b6 f7 movzx esi, dil 00327 40 88 7c 24 40 mov BYTE PTR pal_img_n$1$[rsp], dil 0032c eb 0f jmp SHORT $LN34@stbi__pars $LN32@stbi__pars: 0032e 40 f6 c7 01 test dil, 1 - 00332 0f 85 c8 09 00 - 00 jne $LN336@stbi__pars + 00332 0f 85 c0 09 00 + 00 jne $LN334@stbi__pars 00338 0f b6 74 24 40 movzx esi, BYTE PTR pal_img_n$1$[rsp] $LN34@stbi__pars: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0033d 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 00344 72 15 jb SHORT $LN632@stbi__pars - -; 1079 : if (s->read_from_callbacks) { - + 00344 72 15 jb SHORT $LN630@stbi__pars +; Line 1079 00346 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0034a 74 24 je SHORT $LN184@stbi__pars - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0034c 48 8b cb mov rcx, rbx 0034f e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00354 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] -$LN632@stbi__pars: - -; 4632 : comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG"); - +$LN630@stbi__pars: +; Line 4632 0035b 0f b6 08 movzx ecx, BYTE PTR [rax] 0035e 48 ff c0 inc rax 00361 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00368 84 c9 test cl, cl - 0036a 0f 85 af 09 00 - 00 jne $LN338@stbi__pars + 0036a 0f 85 a7 09 00 + 00 jne $LN336@stbi__pars $LN184@stbi__pars: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00370 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 00377 72 15 jb SHORT $LN633@stbi__pars - -; 1079 : if (s->read_from_callbacks) { - + 00377 72 15 jb SHORT $LN631@stbi__pars +; Line 1079 00379 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0037d 74 24 je SHORT $LN206@stbi__pars - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0037f 48 8b cb mov rcx, rbx 00382 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00387 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] -$LN633@stbi__pars: - -; 4633 : filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG"); - +$LN631@stbi__pars: +; Line 4633 0038e 0f b6 08 movzx ecx, BYTE PTR [rax] 00391 48 ff c0 inc rax 00394 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0039b 84 c9 test cl, cl - 0039d 0f 85 9b 09 00 - 00 jne $LN339@stbi__pars + 0039d 0f 85 93 09 00 + 00 jne $LN337@stbi__pars $LN206@stbi__pars: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 003a3 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 003aa 73 0f jae SHORT $LN219@stbi__pars - -; 1078 : return *s->img_buffer++; - +; Line 1078 003ac 0f b6 08 movzx ecx, BYTE PTR [rax] 003af 48 ff c0 inc rax 003b2 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 003b9 eb 26 jmp SHORT $LN218@stbi__pars $LN219@stbi__pars: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 003bb 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 003bf 74 1e je SHORT $LN220@stbi__pars - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 003c1 48 8b cb mov rcx, rbx 003c4 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 003c9 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 003d0 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -37071,43 +24750,31 @@ $LN219@stbi__pars: 00 00 mov QWORD PTR [rbx+192], rax 003dd eb 02 jmp SHORT $LN218@stbi__pars $LN220@stbi__pars: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 003df 32 c9 xor cl, cl $LN218@stbi__pars: - -; 4634 : interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG"); - +; Line 4634 003e1 44 0f b6 e1 movzx r12d, cl 003e5 44 89 64 24 4c mov DWORD PTR interlace$1$[rsp], r12d 003ea 41 83 fc 01 cmp r12d, 1 - 003ee 0f 87 88 09 00 - 00 ja $LN340@stbi__pars - -; 4635 : if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG"); - + 003ee 0f 87 80 09 00 + 00 ja $LN338@stbi__pars +; Line 4635 003f4 8b 0b mov ecx, DWORD PTR [rbx] 003f6 85 c9 test ecx, ecx - 003f8 0f 84 5f 09 00 + 003f8 0f 84 57 09 00 00 je $LN39@stbi__pars 003fe 44 8b 4b 04 mov r9d, DWORD PTR [rbx+4] 00402 45 85 c9 test r9d, r9d - 00405 0f 84 52 09 00 + 00405 0f 84 4a 09 00 00 je $LN39@stbi__pars - -; 4636 : if (!pal_img_n) { - +; Line 4636 0040b 33 d2 xor edx, edx 0040d b8 00 00 00 40 mov eax, 1073741824 ; 40000000H 00412 f7 f1 div ecx 00414 40 84 f6 test sil, sil 00417 75 47 jne SHORT $LN40@stbi__pars - -; 4637 : s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); -; 4638 : if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); - +; Line 4638 00419 33 d2 xor edx, edx 0041b 44 8b c7 mov r8d, edi 0041e 41 c1 e8 02 shr r8d, 2 @@ -37121,10 +24788,8 @@ $LN218@stbi__pars: 00438 41 3b c1 cmp eax, r9d 0043b 0f 83 53 03 00 00 jae $LN8@stbi__pars -$LN342@stbi__pars: - -; 4781 : } - +$LN340@stbi__pars: +; Line 4781 00441 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00447 65 48 8b 04 25 @@ -37132,31 +24797,18 @@ $LN342@stbi__pars: 00450 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00454 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 0045b e9 87 0a 00 00 jmp $LN635@stbi__pars + 0045b e9 7f 0a 00 00 jmp $LN633@stbi__pars $LN40@stbi__pars: - -; 4639 : } -; 4640 : else { -; 4641 : // if paletted, then pal_n is our final components, and -; 4642 : // img_n is # components to decompress/filter. -; 4643 : s->img_n = 1; -; 4644 : if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large", "Corrupt PNG"); - +; Line 4644 00460 c1 e8 02 shr eax, 2 00463 c7 43 08 01 00 00 00 mov DWORD PTR [rbx+8], 1 0046a 41 3b c1 cmp eax, r9d - 0046d 72 d2 jb SHORT $LN342@stbi__pars - -; 4645 : } -; 4646 : // even with SCAN_header, have to scan to see if we have a tRNS -; 4647 : break; - + 0046d 72 d2 jb SHORT $LN340@stbi__pars +; Line 4647 0046f e9 20 03 00 00 jmp $LN8@stbi__pars $LN99@stbi__pars: - -; 4614 : switch (c.type) { - +; Line 4614 00474 81 f9 45 54 4c 50 cmp ecx, 1347179589 ; 504c5445H 0047a 0f 84 c4 01 00 @@ -37165,26 +24817,16 @@ $LN99@stbi__pars: 74 cmp ecx, 1951551059 ; 74524e53H 00486 74 76 je SHORT $LN48@stbi__pars $LN93@stbi__pars: - -; 4759 : } -; 4760 : -; 4761 : default: -; 4762 : // if critical, fail -; 4763 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - +; Line 4763 00488 83 7c 24 44 00 cmp DWORD PTR first$1$[rsp], 0 - 0048d 0f 85 3a 0a 00 - 00 jne $LN354@stbi__pars - -; 4764 : if ((c.type & (1 << 29)) == 0) { - + 0048d 0f 85 32 0a 00 + 00 jne $LN352@stbi__pars +; Line 4764 00493 0f ba e2 1d bt edx, 29 - 00497 0f 83 5b 09 00 - 00 jae $LN345@stbi__pars -$LN634@stbi__pars: - -; 1168 : stbi__uint32 z = stbi__get16be(s); - + 00497 0f 83 53 09 00 + 00 jae $LN343@stbi__pars +$LN632@stbi__pars: +; Line 1168 0049d 85 f6 test esi, esi 0049f 0f 84 ef 02 00 00 je $LN8@stbi__pars @@ -37196,13 +24838,13 @@ $LN634@stbi__pars: 004b5 e9 da 02 00 00 jmp $LN8@stbi__pars $LN144@stbi__pars: 004ba 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 - 004bf 74 2e je SHORT $LN481@stbi__pars + 004bf 74 2e je SHORT $LN479@stbi__pars 004c1 8b 8b c8 00 00 00 mov ecx, DWORD PTR [rbx+200] 004c7 2b 8b c0 00 00 00 sub ecx, DWORD PTR [rbx+192] 004cd 3b ce cmp ecx, esi - 004cf 7d 1e jge SHORT $LN481@stbi__pars + 004cf 7d 1e jge SHORT $LN479@stbi__pars 004d1 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] 004d8 2b f1 sub esi, ecx @@ -37212,57 +24854,37 @@ $LN144@stbi__pars: 00 00 mov QWORD PTR [rbx+192], rax 004e7 ff 53 18 call QWORD PTR [rbx+24] 004ea e9 a5 02 00 00 jmp $LN8@stbi__pars -$LN481@stbi__pars: +$LN479@stbi__pars: 004ef 48 63 c6 movsxd rax, esi 004f2 48 01 83 c0 00 00 00 add QWORD PTR [rbx+192], rax 004f9 e9 96 02 00 00 jmp $LN8@stbi__pars $LN48@stbi__pars: - -; 4660 : } -; 4661 : break; -; 4662 : } -; 4663 : -; 4664 : case STBI__PNG_TYPE('t', 'R', 'N', 'S'): { -; 4665 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - +; Line 4665 004fe 83 7c 24 44 00 cmp DWORD PTR first$1$[rsp], 0 - 00503 0f 85 c4 09 00 - 00 jne $LN354@stbi__pars - -; 4666 : if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG"); - + 00503 0f 85 bc 09 00 + 00 jne $LN352@stbi__pars +; Line 4666 00509 49 83 7d 08 00 cmp QWORD PTR [r13+8], 0 - 0050e 0f 85 81 09 00 - 00 jne $LN347@stbi__pars - -; 4667 : if (pal_img_n) { - + 0050e 0f 85 79 09 00 + 00 jne $LN345@stbi__pars +; Line 4667 00514 80 7c 24 40 00 cmp BYTE PTR pal_img_n$1$[rsp], 0 00519 0f 84 8f 00 00 00 je $LN51@stbi__pars - -; 4668 : if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } -; 4669 : if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG"); - +; Line 4669 0051f 45 85 ff test r15d, r15d - 00522 0f 84 35 09 00 - 00 je $LN349@stbi__pars - -; 4670 : if (c.length > pal_len) return stbi__err("bad tRNS len", "Corrupt PNG"); - + 00522 0f 84 2d 09 00 + 00 je $LN347@stbi__pars +; Line 4670 00528 41 3b f7 cmp esi, r15d - 0052b 0f 87 0d 09 00 - 00 ja $LN350@stbi__pars - -; 4671 : pal_img_n = 4; - + 0052b 0f 87 05 09 00 + 00 ja $LN348@stbi__pars +; Line 4671 00531 33 c0 xor eax, eax 00533 c6 44 24 40 04 mov BYTE PTR pal_img_n$1$[rsp], 4 00538 8b f8 mov edi, eax - -; 4672 : for (i = 0; i < c.length; ++i) - +; Line 4672 0053a 85 f6 test esi, esi 0053c 0f 84 52 02 00 00 je $LN8@stbi__pars @@ -37270,36 +24892,26 @@ $LN48@stbi__pars: 66 0f 1f 84 00 00 00 00 00 npad 14 $LL12@stbi__pars: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00550 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00557 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0055e 73 0f jae SHORT $LN171@stbi__pars - -; 1078 : return *s->img_buffer++; - +; Line 1078 00560 0f b6 10 movzx edx, BYTE PTR [rax] 00563 48 ff c0 inc rax 00566 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0056d eb 26 jmp SHORT $LN170@stbi__pars $LN171@stbi__pars: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0056f 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00573 74 1e je SHORT $LN172@stbi__pars - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00575 48 8b cb mov rcx, rbx 00578 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0057d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00584 0f b6 10 movzx edx, BYTE PTR [rax] @@ -37308,15 +24920,10 @@ $LN171@stbi__pars: 00 00 mov QWORD PTR [rbx+192], rax 00591 eb 02 jmp SHORT $LN170@stbi__pars $LN172@stbi__pars: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00593 32 d2 xor dl, dl $LN170@stbi__pars: - -; 4673 : palette[i * 4 + 3] = stbi__get8(s); - +; Line 4673 00595 8d 04 bd 03 00 00 00 lea eax, DWORD PTR [rdi*4+3] 0059c ff c7 inc edi @@ -37324,40 +24931,26 @@ $LN170@stbi__pars: 00 00 mov BYTE PTR palette$[rbp+rax-256], dl 005a5 3b fe cmp edi, esi 005a7 72 a7 jb SHORT $LL12@stbi__pars - -; 4674 : } - +; Line 4674 005a9 e9 e6 01 00 00 jmp $LN8@stbi__pars $LN51@stbi__pars: - -; 4675 : else { -; 4676 : if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG"); - +; Line 4676 005ae 8b 4b 08 mov ecx, DWORD PTR [rbx+8] 005b1 f6 c1 01 test cl, 1 - 005b4 0f 84 bf 08 00 - 00 je $LN351@stbi__pars - -; 4677 : if (c.length != (stbi__uint32)s->img_n * 2) return stbi__err("bad tRNS len", "Corrupt PNG"); - + 005b4 0f 84 b7 08 00 + 00 je $LN349@stbi__pars +; Line 4677 005ba 8d 04 09 lea eax, DWORD PTR [rcx+rcx] 005bd 3b f0 cmp esi, eax - 005bf 0f 85 79 08 00 - 00 jne $LN350@stbi__pars - -; 4678 : has_trans = 1; -; 4679 : // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. -; 4680 : if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } -; 4681 : if (z->depth == 16) { - + 005bf 0f 85 71 08 00 + 00 jne $LN348@stbi__pars +; Line 4681 005c5 33 c0 xor eax, eax 005c7 c6 44 24 41 01 mov BYTE PTR has_trans$1$[rsp], 1 005cc 41 83 7d 20 10 cmp DWORD PTR [r13+32], 16 005d1 8b f0 mov esi, eax 005d3 75 2a jne SHORT $LN59@stbi__pars - -; 4682 : for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is - +; Line 4682 005d5 85 c9 test ecx, ecx 005d7 0f 8e b7 01 00 00 jle $LN8@stbi__pars @@ -37371,15 +24964,10 @@ $LL15@stbi__pars: 005f1 48 8d 7f 02 lea rdi, QWORD PTR [rdi+2] 005f5 3b 73 08 cmp esi, DWORD PTR [rbx+8] 005f8 7c ea jl SHORT $LL15@stbi__pars - -; 4683 : } - +; Line 4683 005fa e9 95 01 00 00 jmp $LN8@stbi__pars $LN59@stbi__pars: - -; 4684 : else { -; 4685 : for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger - +; Line 4685 005ff 85 c9 test ecx, ecx 00601 0f 8e 8d 01 00 00 jle $LN8@stbi__pars @@ -37399,47 +24987,30 @@ $LL18@stbi__pars: 00632 88 47 ff mov BYTE PTR [rdi-1], al 00635 3b 73 08 cmp esi, DWORD PTR [rbx+8] 00638 7c db jl SHORT $LL18@stbi__pars - -; 4686 : } -; 4687 : } -; 4688 : break; - +; Line 4688 0063a 44 8b 64 24 4c mov r12d, DWORD PTR interlace$1$[rsp] 0063f e9 50 01 00 00 jmp $LN8@stbi__pars $LN44@stbi__pars: - -; 4648 : } -; 4649 : -; 4650 : case STBI__PNG_TYPE('P', 'L', 'T', 'E'): { -; 4651 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - +; Line 4651 00644 83 7c 24 44 00 cmp DWORD PTR first$1$[rsp], 0 - 00649 0f 85 7e 08 00 - 00 jne $LN354@stbi__pars - -; 4652 : if (c.length > 256 * 3) return stbi__err("invalid PLTE", "Corrupt PNG"); - + 00649 0f 85 76 08 00 + 00 jne $LN352@stbi__pars +; Line 4652 0064f 81 fe 00 03 00 00 cmp esi, 768 ; 00000300H - 00655 0f 87 56 08 00 - 00 ja $LN356@stbi__pars - -; 4653 : pal_len = c.length / 3; - + 00655 0f 87 4e 08 00 + 00 ja $LN354@stbi__pars +; Line 4653 0065b b8 ab aa aa aa mov eax, -1431655765 ; aaaaaaabH 00660 f7 e6 mul esi 00662 44 8b fa mov r15d, edx 00665 41 d1 ef shr r15d, 1 - -; 4654 : if (pal_len * 3 != c.length) return stbi__err("invalid PLTE", "Corrupt PNG"); - +; Line 4654 00668 43 8d 04 7f lea eax, DWORD PTR [r15+r15*2] 0066c 3b c6 cmp eax, esi - 0066e 0f 85 3d 08 00 - 00 jne $LN356@stbi__pars - -; 4655 : for (i = 0; i < pal_len; ++i) { - + 0066e 0f 85 35 08 00 + 00 jne $LN354@stbi__pars +; Line 4655 00674 33 c0 xor eax, eax 00676 8b f0 mov esi, eax 00678 45 85 ff test r15d, r15d @@ -37449,36 +25020,26 @@ $LN44@stbi__pars: 66 66 0f 1f 84 00 00 00 00 00 npad 15 $LL9@stbi__pars: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00690 48 8b 93 c0 00 00 00 mov rdx, QWORD PTR [rbx+192] 00697 48 3b 93 c8 00 00 00 cmp rdx, QWORD PTR [rbx+200] 0069e 73 0f jae SHORT $LN109@stbi__pars - -; 1078 : return *s->img_buffer++; - +; Line 1078 006a0 0f b6 0a movzx ecx, BYTE PTR [rdx] 006a3 48 ff c2 inc rdx 006a6 48 89 93 c0 00 00 00 mov QWORD PTR [rbx+192], rdx 006ad eb 27 jmp SHORT $LN108@stbi__pars $LN109@stbi__pars: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 006af 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 006b3 74 1f je SHORT $LN110@stbi__pars - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 006b5 48 8b cb mov rcx, rbx 006b8 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 006bd 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 006c4 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -37487,47 +25048,32 @@ $LN109@stbi__pars: 00 00 mov QWORD PTR [rbx+192], rdx 006d2 eb 02 jmp SHORT $LN108@stbi__pars $LN110@stbi__pars: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 006d4 32 c9 xor cl, cl $LN108@stbi__pars: - -; 4656 : palette[i * 4 + 0] = stbi__get8(s); - +; Line 4656 006d6 8d 3c b5 00 00 00 00 lea edi, DWORD PTR [rsi*4] 006dd 88 8c 3d 80 0f 00 00 mov BYTE PTR palette$[rbp+rdi-256], cl - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 006e4 48 3b 93 c8 00 00 00 cmp rdx, QWORD PTR [rbx+200] 006eb 73 10 jae SHORT $LN113@stbi__pars - -; 1078 : return *s->img_buffer++; - +; Line 1078 006ed 44 0f b6 02 movzx r8d, BYTE PTR [rdx] 006f1 48 ff c2 inc rdx 006f4 48 89 93 c0 00 00 00 mov QWORD PTR [rbx+192], rdx 006fb eb 29 jmp SHORT $LN112@stbi__pars $LN113@stbi__pars: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 006fd 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00701 74 20 je SHORT $LN114@stbi__pars - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00703 48 8b cb mov rcx, rbx 00706 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0070b 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00712 44 0f b6 00 movzx r8d, BYTE PTR [rax] @@ -37536,46 +25082,31 @@ $LN113@stbi__pars: 00 00 mov QWORD PTR [rbx+192], rdx 00721 eb 03 jmp SHORT $LN112@stbi__pars $LN114@stbi__pars: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00723 45 32 c0 xor r8b, r8b $LN112@stbi__pars: - -; 4657 : palette[i * 4 + 1] = stbi__get8(s); - +; Line 4657 00726 8d 47 01 lea eax, DWORD PTR [rdi+1] 00729 44 88 84 05 80 0f 00 00 mov BYTE PTR palette$[rbp+rax-256], r8b - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00731 48 3b 93 c8 00 00 00 cmp rdx, QWORD PTR [rbx+200] 00738 73 11 jae SHORT $LN117@stbi__pars - -; 1078 : return *s->img_buffer++; - +; Line 1078 0073a 44 0f b6 02 movzx r8d, BYTE PTR [rdx] 0073e 48 8d 42 01 lea rax, QWORD PTR [rdx+1] 00742 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00749 eb 28 jmp SHORT $LN116@stbi__pars $LN117@stbi__pars: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0074b 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0074f 74 1f je SHORT $LN118@stbi__pars - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00751 48 8b cb mov rcx, rbx 00754 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00759 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00760 44 0f b6 00 movzx r8d, BYTE PTR [rax] @@ -37584,22 +25115,15 @@ $LN117@stbi__pars: 00 00 mov QWORD PTR [rbx+192], rax 0076e eb 03 jmp SHORT $LN116@stbi__pars $LN118@stbi__pars: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00770 45 32 c0 xor r8b, r8b $LN116@stbi__pars: - -; 4658 : palette[i * 4 + 2] = stbi__get8(s); - +; Line 4658 00773 8d 47 02 lea eax, DWORD PTR [rdi+2] 00776 ff c6 inc esi 00778 44 88 84 05 80 0f 00 00 mov BYTE PTR palette$[rbp+rax-256], r8b - -; 4659 : palette[i * 4 + 3] = 255; - +; Line 4659 00780 8d 47 03 lea eax, DWORD PTR [rdi+3] 00783 c6 84 05 80 0f 00 00 ff mov BYTE PTR palette$[rbp+rax-256], 255 ; 000000ffH @@ -37607,152 +25131,87 @@ $LN116@stbi__pars: 0078e 0f 82 fc fe ff ff jb $LL9@stbi__pars $LN8@stbi__pars: - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 1168 00794 48 8b cb mov rcx, rbx 00797 e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 0079c 48 8b cb mov rcx, rbx 0079f e8 00 00 00 00 call stbi__get16be - -; 4774 : } -; 4775 : stbi__skip(s, c.length); -; 4776 : break; -; 4777 : } -; 4778 : // end of PNG chunk, read and skip CRC -; 4779 : stbi__get32be(s); -; 4780 : } - +; Line 4780 007a4 e9 fc f8 ff ff jmp $LL2@stbi__pars $LN75@stbi__pars: - -; 4722 : // initial guess for decoded data size to avoid unnecessary reallocs -; 4723 : bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component - +; Line 4723 007a9 41 8b 45 20 mov eax, DWORD PTR [r13+32] 007ad 0f af 03 imul eax, DWORD PTR [rbx] 007b0 83 c0 07 add eax, 7 007b3 c1 e8 03 shr eax, 3 - -; 4724 : raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; - +; Line 4724 007b6 0f af 43 08 imul eax, DWORD PTR [rbx+8] 007ba ff c0 inc eax 007bc 0f af 43 04 imul eax, DWORD PTR [rbx+4] - -; 4024 : char* p = (char*)stbi__malloc(initial_size); - +; Line 4024 007c0 48 63 f0 movsxd rsi, eax - -; 438 : return STBI_MALLOC(size); - +; Line 438 007c3 48 8b ce mov rcx, rsi 007c6 ff 15 00 00 00 00 call QWORD PTR __imp_malloc 007cc 48 8b c8 mov rcx, rax - -; 4025 : if (p == NULL) return NULL; - +; Line 4025 007cf 48 85 c0 test rax, rax 007d2 75 09 jne SHORT $LN193@stbi__pars 007d4 49 89 45 10 mov QWORD PTR [r13+16], rax - 007d8 e9 13 07 00 00 jmp $LN327@stbi__pars + 007d8 e9 0b 07 00 00 jmp $LN325@stbi__pars $LN193@stbi__pars: - -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; - +; Line 4027 007dd 48 63 44 24 48 movsxd rax, DWORD PTR ioff$1$[rsp] - -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); - +; Line 4725 007e2 44 8b 7c 24 50 mov r15d, DWORD PTR is_iphone$1$[rsp] - -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; - +; Line 4027 007e7 48 03 c7 add rax, rdi - 007ea 48 89 44 24 78 mov QWORD PTR a$15[rsp+8], rax - -; 3993 : a->zout_end = obuf + olen; - + 007ea 48 89 44 24 78 mov QWORD PTR a$2[rsp+8], rax +; Line 3993 007ef 48 8d 04 0e lea rax, QWORD PTR [rsi+rcx] - -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); - +; Line 4725 007f3 33 f6 xor esi, esi - -; 3991 : a->zout_start = obuf; - - 007f5 48 89 4d 90 mov QWORD PTR a$15[rbp-224], rcx - -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); - +; Line 3991 + 007f5 48 89 4d 90 mov QWORD PTR a$2[rbp-224], rcx +; Line 4725 007f9 8b d6 mov edx, esi - -; 3992 : a->zout = obuf; - - 007fb 48 89 4d 88 mov QWORD PTR a$15[rbp-232], rcx - -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); - +; Line 3992 + 007fb 48 89 4d 88 mov QWORD PTR a$2[rbp-232], rcx +; Line 4725 007ff 45 85 ff test r15d, r15d - -; 4026 : a.zbuffer = (stbi_uc*)buffer; - - 00802 48 89 7c 24 70 mov QWORD PTR a$15[rsp], rdi - -; 3996 : return stbi__parse_zlib(a, parse_header); - - 00807 48 8d 4c 24 70 lea rcx, QWORD PTR a$15[rsp] - 0080c 48 89 45 98 mov QWORD PTR a$15[rbp-216], rax - -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); - +; Line 4026 + 00802 48 89 7c 24 70 mov QWORD PTR a$2[rsp], rdi +; Line 3996 + 00807 48 8d 4c 24 70 lea rcx, QWORD PTR a$2[rsp] + 0080c 48 89 45 98 mov QWORD PTR a$2[rbp-216], rax +; Line 4725 00810 0f 94 c2 sete dl - -; 3994 : a->z_expandable = exp; - +; Line 3994 00813 c7 45 a0 01 00 - 00 00 mov DWORD PTR a$15[rbp-208], 1 - -; 3995 : -; 3996 : return stbi__parse_zlib(a, parse_header); - + 00 00 mov DWORD PTR a$2[rbp-208], 1 +; Line 3996 0081a e8 00 00 00 00 call stbi__parse_zlib - -; 4028 : if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { - +; Line 4028 0081f 85 c0 test eax, eax - 00821 0f 84 4a 04 00 + 00821 0f 84 42 04 00 00 je $LN194@stbi__pars - -; 4029 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4030 : return a.zout_start; - - 00827 48 8b 45 90 mov rax, QWORD PTR a$15[rbp-224] - 0082b 8b 7d 88 mov edi, DWORD PTR a$15[rbp-232] - 0082e 2b 7d 90 sub edi, DWORD PTR a$15[rbp-224] - -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); - +; Line 4030 + 00827 48 8b 45 90 mov rax, QWORD PTR a$2[rbp-224] + 0082b 8b 7d 88 mov edi, DWORD PTR a$2[rbp-232] + 0082e 2b 7d 90 sub edi, DWORD PTR a$2[rbp-224] +; Line 4725 00831 49 89 45 10 mov QWORD PTR [r13+16], rax - -; 4726 : if (z->expanded == NULL) return 0; // zlib should set error - +; Line 4726 00835 48 85 c0 test rax, rax - 00838 0f 84 b2 06 00 - 00 je $LN327@stbi__pars - -; 4727 : STBI_FREE(z->idata); z->idata = NULL; - + 00838 0f 84 aa 06 00 + 00 je $LN325@stbi__pars +; Line 4727 0083e 49 8b 4d 08 mov rcx, QWORD PTR [r13+8] 00842 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4728 : if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans) - +; Line 4728 00848 8b 4c 24 58 mov ecx, DWORD PTR req_comp$1$[rsp] 0084c 49 89 75 08 mov QWORD PTR [r13+8], rsi 00850 8b 43 08 mov eax, DWORD PTR [rbx+8] @@ -37764,21 +25223,16 @@ $LN193@stbi__pars: 00864 74 09 je SHORT $LN80@stbi__pars 00866 40 84 f6 test sil, sil 00869 0f 84 a2 00 00 - 00 je $LN508@stbi__pars + 00 je $LN506@stbi__pars $LN80@stbi__pars: 0086f 44 0f b6 74 24 41 movzx r14d, BYTE PTR has_trans$1$[rsp] 00875 45 84 f6 test r14b, r14b 00878 75 03 jne SHORT $LN78@stbi__pars - -; 4730 : else -; 4731 : s->img_out_n = s->img_n; - +; Line 4731 0087a 44 8b c8 mov r9d, eax $LN78@stbi__pars: - -; 4732 : if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; - +; Line 4732 0087d 8b 44 24 54 mov eax, DWORD PTR color$1$[rsp] 00881 44 8b c7 mov r8d, edi 00884 44 89 4b 0c mov DWORD PTR [rbx+12], r9d @@ -37790,17 +25244,13 @@ $LN78@stbi__pars: 0089c 89 44 24 20 mov DWORD PTR [rsp+32], eax 008a0 e8 00 00 00 00 call stbi__create_png_image 008a5 85 c0 test eax, eax - 008a7 0f 84 43 06 00 - 00 je $LN327@stbi__pars - -; 4733 : if (has_trans) { - + 008a7 0f 84 3b 06 00 + 00 je $LN325@stbi__pars +; Line 4733 008ad 45 84 f6 test r14b, r14b 008b0 0f 84 0a 01 00 - 00 je $LN278@stbi__pars - -; 4734 : if (z->depth == 16) { - + 00 je $LN276@stbi__pars +; Line 4734 008b6 49 8b 4d 00 mov rcx, QWORD PTR [r13] 008ba 8b 41 04 mov eax, DWORD PTR [rcx+4] 008bd 0f af 01 imul eax, DWORD PTR [rcx] @@ -37808,505 +25258,114 @@ $LN78@stbi__pars: 008c5 49 8b 4d 18 mov rcx, QWORD PTR [r13+24] 008c9 0f 85 88 00 00 00 jne $LN83@stbi__pars - -; 4454 : for (i = 0; i < pixel_count; ++i) { - +; Line 4454 008cf 85 c0 test eax, eax 008d1 0f 84 e9 00 00 - 00 je $LN278@stbi__pars - -; 4438 : } -; 4439 : } -; 4440 : return 1; -; 4441 : } -; 4442 : -; 4443 : static int stbi__compute_transparency16(stbi__png* z, stbi__uint16 tc[3], int out_n) -; 4444 : { -; 4445 : stbi__context* s = z->s; -; 4446 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4447 : stbi__uint16* p = (stbi__uint16*)z->out; -; 4448 : -; 4449 : // compute color-based transparency, assuming we've -; 4450 : // already got 65535 as the alpha value in the output -; 4451 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4452 : -; 4453 : if (out_n == 2) { - + 00 je $LN276@stbi__pars +; Line 4453 008d7 45 33 d2 xor r10d, r10d 008da 83 7b 0c 02 cmp DWORD PTR [rbx+12], 2 - 008de 75 3c jne SHORT $LN269@stbi__pars + 008de 75 3c jne SHORT $LN267@stbi__pars 008e0 44 0f b7 85 74 0f 00 00 movzx r8d, WORD PTR tc16$[rbp-256] 008e8 8b d0 mov edx, eax 008ea 66 0f 1f 44 00 00 npad 6 -$LL265@stbi__pars: - -; 4455 : p[1] = (p[0] == tc[0] ? 0 : 65535); - +$LL263@stbi__pars: +; Line 4455 008f0 66 44 39 01 cmp WORD PTR [rcx], r8w - -; 4456 : p += 2; - +; Line 4456 008f4 48 8d 49 04 lea rcx, QWORD PTR [rcx+4] 008f8 b8 ff ff 00 00 mov eax, 65535 ; 0000ffffH 008fd 66 41 0f 44 c2 cmove ax, r10w 00902 66 89 41 fe mov WORD PTR [rcx-2], ax 00906 48 83 ea 01 sub rdx, 1 - 0090a 75 e4 jne SHORT $LL265@stbi__pars - -; 4457 : } -; 4458 : } - - 0090c e9 af 00 00 00 jmp $LN278@stbi__pars -$LN508@stbi__pars: - -; 4728 : if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans) - + 0090a 75 e4 jne SHORT $LL263@stbi__pars +; Line 4458 + 0090c e9 af 00 00 00 jmp $LN276@stbi__pars +$LN506@stbi__pars: +; Line 4728 00911 44 0f b6 74 24 41 movzx r14d, BYTE PTR has_trans$1$[rsp] - -; 4729 : s->img_out_n = s->img_n + 1; - +; Line 4729 00917 e9 61 ff ff ff jmp $LN78@stbi__pars -$LN269@stbi__pars: +$LN267@stbi__pars: 0091c 0f b7 95 78 0f 00 00 movzx edx, WORD PTR tc16$[rbp-252] 00923 44 0f b7 85 76 0f 00 00 movzx r8d, WORD PTR tc16$[rbp-254] 0092b 44 0f b7 8d 74 0f 00 00 movzx r9d, WORD PTR tc16$[rbp-256] -$LL268@stbi__pars: - -; 4461 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) - +$LL266@stbi__pars: +; Line 4461 00933 66 44 39 09 cmp WORD PTR [rcx], r9w - 00937 75 12 jne SHORT $LN271@stbi__pars + 00937 75 12 jne SHORT $LN269@stbi__pars 00939 66 44 39 41 02 cmp WORD PTR [rcx+2], r8w - 0093e 75 0b jne SHORT $LN271@stbi__pars + 0093e 75 0b jne SHORT $LN269@stbi__pars 00940 66 39 51 04 cmp WORD PTR [rcx+4], dx - 00944 75 05 jne SHORT $LN271@stbi__pars - -; 4462 : p[3] = 0; - + 00944 75 05 jne SHORT $LN269@stbi__pars +; Line 4462 00946 66 44 89 51 06 mov WORD PTR [rcx+6], r10w -$LN271@stbi__pars: - -; 4463 : p += 4; - +$LN269@stbi__pars: +; Line 4463 0094b 48 83 c1 08 add rcx, 8 0094f 48 83 e8 01 sub rax, 1 - 00953 75 de jne SHORT $LL268@stbi__pars - -; 4735 : if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; -; 4736 : } - - 00955 eb 69 jmp SHORT $LN278@stbi__pars + 00953 75 de jne SHORT $LL266@stbi__pars +; Line 4736 + 00955 eb 69 jmp SHORT $LN276@stbi__pars $LN83@stbi__pars: - -; 4428 : for (i = 0; i < pixel_count; ++i) { - +; Line 4428 00957 85 c0 test eax, eax - 00959 74 65 je SHORT $LN278@stbi__pars - -; 4100 : return c; -; 4101 : } -; 4102 : -; 4103 : static int stbi__check_png_header(stbi__context* s) -; 4104 : { -; 4105 : static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; -; 4106 : int i; -; 4107 : for (i = 0; i < 8; ++i) -; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); -; 4109 : return 1; -; 4110 : } -; 4111 : -; 4112 : typedef struct -; 4113 : { -; 4114 : stbi__context* s; -; 4115 : stbi_uc* idata, * expanded, * out; -; 4116 : int depth; -; 4117 : } stbi__png; -; 4118 : -; 4119 : enum { -; 4120 : STBI__F_none = 0, -; 4121 : STBI__F_sub = 1, -; 4122 : STBI__F_up = 2, -; 4123 : STBI__F_avg = 3, -; 4124 : STBI__F_paeth = 4, -; 4125 : // synthetic filters used for first scanline to avoid needing a dummy row of 0s -; 4126 : STBI__F_avg_first, -; 4127 : STBI__F_paeth_first -; 4128 : }; -; 4129 : -; 4130 : static stbi_uc first_row_filter[5] = -; 4131 : { -; 4132 : STBI__F_none, -; 4133 : STBI__F_sub, -; 4134 : STBI__F_none, -; 4135 : STBI__F_avg_first, -; 4136 : STBI__F_paeth_first -; 4137 : }; -; 4138 : -; 4139 : static int stbi__paeth(int a, int b, int c) -; 4140 : { -; 4141 : int p = a + b - c; -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); -; 4144 : int pc = abs(p - c); -; 4145 : if (pa <= pb && pa <= pc) return a; -; 4146 : if (pb <= pc) return b; -; 4147 : return c; -; 4148 : } -; 4149 : -; 4150 : static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; -; 4151 : -; 4152 : // create the png data from post-deflated data -; 4153 : static int stbi__create_png_image_raw(stbi__png* a, stbi_uc* raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -; 4154 : { -; 4155 : int bytes = (depth == 16 ? 2 : 1); -; 4156 : stbi__context* s = a->s; -; 4157 : stbi__uint32 i, j, stride = x * out_n * bytes; -; 4158 : stbi__uint32 img_len, img_width_bytes; -; 4159 : int k; -; 4160 : int img_n = s->img_n; // copy it into a local for later -; 4161 : -; 4162 : int output_bytes = out_n * bytes; -; 4163 : int filter_bytes = img_n * bytes; -; 4164 : int width = x; -; 4165 : -; 4166 : STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1); -; 4167 : a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into -; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); -; 4169 : -; 4170 : if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); -; 4171 : img_width_bytes = (((img_n * x * depth) + 7) >> 3); -; 4172 : img_len = (img_width_bytes + 1) * y; -; 4173 : -; 4174 : // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, -; 4175 : // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), -; 4176 : // so just check for raw_len < img_len always. -; 4177 : if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG"); -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { -; 4180 : stbi_uc* cur = a->out + stride * j; -; 4181 : stbi_uc* prior; -; 4182 : int filter = *raw++; -; 4183 : -; 4184 : if (filter > 4) -; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); -; 4186 : -; 4187 : if (depth < 8) { -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); -; 4189 : cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place -; 4190 : filter_bytes = 1; -; 4191 : width = img_width_bytes; -; 4192 : } -; 4193 : prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above -; 4194 : -; 4195 : // if first row, use special filter that doesn't sample previous row -; 4196 : if (j == 0) filter = first_row_filter[filter]; -; 4197 : -; 4198 : // handle first byte explicitly -; 4199 : for (k = 0; k < filter_bytes; ++k) { -; 4200 : switch (filter) { -; 4201 : case STBI__F_none: cur[k] = raw[k]; break; -; 4202 : case STBI__F_sub: cur[k] = raw[k]; break; -; 4203 : case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; -; 4204 : case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break; -; 4205 : case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break; -; 4206 : case STBI__F_avg_first: cur[k] = raw[k]; break; -; 4207 : case STBI__F_paeth_first: cur[k] = raw[k]; break; -; 4208 : } -; 4209 : } -; 4210 : -; 4211 : if (depth == 8) { -; 4212 : if (img_n != out_n) -; 4213 : cur[img_n] = 255; // first pixel -; 4214 : raw += img_n; -; 4215 : cur += out_n; -; 4216 : prior += out_n; -; 4217 : } -; 4218 : else if (depth == 16) { -; 4219 : if (img_n != out_n) { -; 4220 : cur[filter_bytes] = 255; // first pixel top byte -; 4221 : cur[filter_bytes + 1] = 255; // first pixel bottom byte -; 4222 : } -; 4223 : raw += filter_bytes; -; 4224 : cur += output_bytes; -; 4225 : prior += output_bytes; -; 4226 : } -; 4227 : else { -; 4228 : raw += 1; -; 4229 : cur += 1; -; 4230 : prior += 1; -; 4231 : } -; 4232 : -; 4233 : // this is a little gross, so that we don't switch per-pixel or per-component -; 4234 : if (depth < 8 || img_n == out_n) { -; 4235 : int nk = (width - 1) * filter_bytes; -; 4236 : #define STBI__CASE(f) \ -; 4237 : case f: \ -; 4238 : for (k=0; k < nk; ++k) -; 4239 : switch (filter) { -; 4240 : // "none" filter turns into a memcpy here; make that explicit. -; 4241 : case STBI__F_none: memcpy(cur, raw, nk); break; -; 4242 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break; -; 4243 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4244 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break; -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; -; 4246 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break; -; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; -; 4248 : } -; 4249 : #undef STBI__CASE -; 4250 : raw += nk; -; 4251 : } -; 4252 : else { -; 4253 : STBI_ASSERT(img_n + 1 == out_n); -; 4254 : #define STBI__CASE(f) \ -; 4255 : case f: \ -; 4256 : for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ -; 4257 : for (k=0; k < filter_bytes; ++k) -; 4258 : switch (filter) { -; 4259 : STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; -; 4260 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break; -; 4261 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4262 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break; -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; -; 4264 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break; -; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; -; 4266 : } -; 4267 : #undef STBI__CASE -; 4268 : -; 4269 : // the loop above sets the high byte of the pixels' alpha, but for -; 4270 : // 16 bit png files we also need the low byte set. we'll do that here. -; 4271 : if (depth == 16) { -; 4272 : cur = a->out + stride * j; // start at the beginning of the row again -; 4273 : for (i = 0; i < x; ++i, cur += output_bytes) { -; 4274 : cur[filter_bytes + 1] = 255; -; 4275 : } -; 4276 : } -; 4277 : } -; 4278 : } -; 4279 : -; 4280 : // we make a separate pass to expand bits to pixels; for performance, -; 4281 : // this could run two scanlines behind the above code, so it won't -; 4282 : // intefere with filtering but will still be in the cache. -; 4283 : if (depth < 8) { -; 4284 : for (j = 0; j < y; ++j) { -; 4285 : stbi_uc* cur = a->out + stride * j; -; 4286 : stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes; -; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit -; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop -; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range -; 4290 : -; 4291 : // note that the final byte might overshoot and write more data than desired. -; 4292 : // we can allocate enough data that this never writes out of memory, but it -; 4293 : // could also overwrite the next scanline. can it overwrite non-empty data -; 4294 : // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. -; 4295 : // so we need to explicitly clamp the final ones -; 4296 : -; 4297 : if (depth == 4) { -; 4298 : for (k = x * img_n; k >= 2; k -= 2, ++in) { -; 4299 : *cur++ = scale * ((*in >> 4)); -; 4300 : *cur++ = scale * ((*in) & 0x0f); -; 4301 : } -; 4302 : if (k > 0) *cur++ = scale * ((*in >> 4)); -; 4303 : } -; 4304 : else if (depth == 2) { -; 4305 : for (k = x * img_n; k >= 4; k -= 4, ++in) { -; 4306 : *cur++ = scale * ((*in >> 6)); -; 4307 : *cur++ = scale * ((*in >> 4) & 0x03); -; 4308 : *cur++ = scale * ((*in >> 2) & 0x03); -; 4309 : *cur++ = scale * ((*in) & 0x03); -; 4310 : } -; 4311 : if (k > 0) *cur++ = scale * ((*in >> 6)); -; 4312 : if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); -; 4313 : if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); -; 4314 : } -; 4315 : else if (depth == 1) { -; 4316 : for (k = x * img_n; k >= 8; k -= 8, ++in) { -; 4317 : *cur++ = scale * ((*in >> 7)); -; 4318 : *cur++ = scale * ((*in >> 6) & 0x01); -; 4319 : *cur++ = scale * ((*in >> 5) & 0x01); -; 4320 : *cur++ = scale * ((*in >> 4) & 0x01); -; 4321 : *cur++ = scale * ((*in >> 3) & 0x01); -; 4322 : *cur++ = scale * ((*in >> 2) & 0x01); -; 4323 : *cur++ = scale * ((*in >> 1) & 0x01); -; 4324 : *cur++ = scale * ((*in) & 0x01); -; 4325 : } -; 4326 : if (k > 0) *cur++ = scale * ((*in >> 7)); -; 4327 : if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); -; 4328 : if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); -; 4329 : if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); -; 4330 : if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); -; 4331 : if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); -; 4332 : if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); -; 4333 : } -; 4334 : if (img_n != out_n) { -; 4335 : int q; -; 4336 : // insert alpha = 255 -; 4337 : cur = a->out + stride * j; -; 4338 : if (img_n == 1) { -; 4339 : for (q = x - 1; q >= 0; --q) { -; 4340 : cur[q * 2 + 1] = 255; -; 4341 : cur[q * 2 + 0] = cur[q]; -; 4342 : } -; 4343 : } -; 4344 : else { -; 4345 : STBI_ASSERT(img_n == 3); -; 4346 : for (q = x - 1; q >= 0; --q) { -; 4347 : cur[q * 4 + 3] = 255; -; 4348 : cur[q * 4 + 2] = cur[q * 3 + 2]; -; 4349 : cur[q * 4 + 1] = cur[q * 3 + 1]; -; 4350 : cur[q * 4 + 0] = cur[q * 3 + 0]; -; 4351 : } -; 4352 : } -; 4353 : } -; 4354 : } -; 4355 : } -; 4356 : else if (depth == 16) { -; 4357 : // force the image data from big-endian to platform-native. -; 4358 : // this is done in a separate pass due to the decoding relying -; 4359 : // on the data being untouched, but could probably be done -; 4360 : // per-line during decode if care is taken. -; 4361 : stbi_uc* cur = a->out; -; 4362 : stbi__uint16* cur16 = (stbi__uint16*)cur; -; 4363 : -; 4364 : for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) { -; 4365 : *cur16 = (cur[0] << 8) | cur[1]; -; 4366 : } -; 4367 : } -; 4368 : -; 4369 : return 1; -; 4370 : } -; 4371 : -; 4372 : static int stbi__create_png_image(stbi__png* a, stbi_uc* image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -; 4373 : { -; 4374 : int bytes = (depth == 16 ? 2 : 1); -; 4375 : int out_bytes = out_n * bytes; -; 4376 : stbi_uc* final; -; 4377 : int p; -; 4378 : if (!interlaced) -; 4379 : return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); -; 4380 : -; 4381 : // de-interlacing -; 4382 : final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); -; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); -; 4384 : for (p = 0; p < 7; ++p) { -; 4385 : int xorig[] = { 0,4,0,2,0,1,0 }; -; 4386 : int yorig[] = { 0,0,4,0,2,0,1 }; -; 4387 : int xspc[] = { 8,8,4,4,2,2,1 }; -; 4388 : int yspc[] = { 8,8,8,4,4,2,2 }; -; 4389 : int i, j, x, y; -; 4390 : // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 -; 4391 : x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p]; -; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; -; 4393 : if (x && y) { -; 4394 : stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; -; 4395 : if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { -; 4396 : STBI_FREE(final); -; 4397 : return 0; -; 4398 : } -; 4399 : for (j = 0; j < y; ++j) { -; 4400 : for (i = 0; i < x; ++i) { -; 4401 : int out_y = j * yspc[p] + yorig[p]; -; 4402 : int out_x = i * xspc[p] + xorig[p]; -; 4403 : memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, -; 4404 : a->out + (j * x + i) * out_bytes, out_bytes); -; 4405 : } -; 4406 : } -; 4407 : STBI_FREE(a->out); -; 4408 : image_data += img_len; -; 4409 : image_data_len -= img_len; -; 4410 : } -; 4411 : } -; 4412 : a->out = final; -; 4413 : -; 4414 : return 1; -; 4415 : } -; 4416 : -; 4417 : static int stbi__compute_transparency(stbi__png* z, stbi_uc tc[3], int out_n) -; 4418 : { -; 4419 : stbi__context* s = z->s; -; 4420 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4421 : stbi_uc* p = z->out; -; 4422 : -; 4423 : // compute color-based transparency, assuming we've -; 4424 : // already got 255 as the alpha value in the output -; 4425 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4426 : -; 4427 : if (out_n == 2) { - + 00959 74 65 je SHORT $LN276@stbi__pars +; Line 4427 0095b 83 7b 0c 02 cmp DWORD PTR [rbx+12], 2 - 0095f 75 2a jne SHORT $LN280@stbi__pars + 0095f 75 2a jne SHORT $LN278@stbi__pars 00961 44 0f b6 85 70 0f 00 00 movzx r8d, BYTE PTR tc$[rbp-256] 00969 45 33 d2 xor r10d, r10d 0096c 8b d0 mov edx, eax 0096e 66 90 npad 2 -$LL276@stbi__pars: - -; 4429 : p[1] = (p[0] == tc[0] ? 0 : 255); - +$LL274@stbi__pars: +; Line 4429 00970 44 38 01 cmp BYTE PTR [rcx], r8b - -; 4430 : p += 2; - +; Line 4430 00973 48 8d 49 02 lea rcx, QWORD PTR [rcx+2] 00977 b8 ff 00 00 00 mov eax, 255 ; 000000ffH 0097c 41 0f 44 c2 cmove eax, r10d 00980 88 41 ff mov BYTE PTR [rcx-1], al 00983 48 83 ea 01 sub rdx, 1 - 00987 75 e7 jne SHORT $LL276@stbi__pars - -; 4431 : } -; 4432 : } - - 00989 eb 35 jmp SHORT $LN278@stbi__pars -$LN280@stbi__pars: + 00987 75 e7 jne SHORT $LL274@stbi__pars +; Line 4432 + 00989 eb 35 jmp SHORT $LN276@stbi__pars +$LN278@stbi__pars: 0098b 0f b6 95 72 0f 00 00 movzx edx, BYTE PTR tc$[rbp-254] 00992 44 0f b6 85 71 0f 00 00 movzx r8d, BYTE PTR tc$[rbp-255] 0099a 44 0f b6 8d 70 0f 00 00 movzx r9d, BYTE PTR tc$[rbp-256] -$LL279@stbi__pars: - -; 4433 : else { -; 4434 : for (i = 0; i < pixel_count; ++i) { -; 4435 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) - +$LL277@stbi__pars: +; Line 4435 009a2 44 38 09 cmp BYTE PTR [rcx], r9b - 009a5 75 0f jne SHORT $LN282@stbi__pars + 009a5 75 0f jne SHORT $LN280@stbi__pars 009a7 44 38 41 01 cmp BYTE PTR [rcx+1], r8b - 009ab 75 09 jne SHORT $LN282@stbi__pars + 009ab 75 09 jne SHORT $LN280@stbi__pars 009ad 38 51 02 cmp BYTE PTR [rcx+2], dl - 009b0 75 04 jne SHORT $LN282@stbi__pars - -; 4436 : p[3] = 0; - + 009b0 75 04 jne SHORT $LN280@stbi__pars +; Line 4436 009b2 c6 41 03 00 mov BYTE PTR [rcx+3], 0 -$LN282@stbi__pars: - -; 4437 : p += 4; - +$LN280@stbi__pars: +; Line 4437 009b6 48 83 c1 04 add rcx, 4 009ba 48 83 e8 01 sub rax, 1 - 009be 75 e2 jne SHORT $LL279@stbi__pars -$LN278@stbi__pars: - -; 4737 : else { -; 4738 : if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; -; 4739 : } -; 4740 : } -; 4741 : if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) - + 009be 75 e2 jne SHORT $LL277@stbi__pars +$LN276@stbi__pars: +; Line 4741 009c0 44 8b 25 00 00 00 00 mov r12d, DWORD PTR _tls_index 009c7 45 85 ff test r15d, r15d 009ca 0f 84 3a 01 00 - 00 je $LN292@stbi__pars + 00 je $LN290@stbi__pars 009d0 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 009d9 4a 8b 14 e0 mov rdx, QWORD PTR [rax+r12*8] @@ -38322,122 +25381,76 @@ $LN97@stbi__pars: $LN98@stbi__pars: 009f8 85 c0 test eax, eax 009fa 0f 84 0a 01 00 - 00 je $LN292@stbi__pars + 00 je $LN290@stbi__pars 00a00 83 7b 0c 02 cmp DWORD PTR [rbx+12], 2 00a04 0f 8e 00 01 00 - 00 jle $LN292@stbi__pars - -; 4549 : stbi__context* s = z->s; - + 00 jle $LN290@stbi__pars +; Line 4549 00a0a 49 8b 45 00 mov rax, QWORD PTR [r13] - -; 4550 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4551 : stbi_uc* p = z->out; - +; Line 4551 00a0e 4d 8b 55 18 mov r10, QWORD PTR [r13+24] 00a12 8b 48 04 mov ecx, DWORD PTR [rax+4] 00a15 0f af 08 imul ecx, DWORD PTR [rax] - -; 4552 : -; 4553 : if (s->img_out_n == 3) { // convert bgr to rgb - +; Line 4553 00a18 83 78 0c 03 cmp DWORD PTR [rax+12], 3 - 00a1c 75 31 jne SHORT $LN294@stbi__pars - -; 4554 : for (i = 0; i < pixel_count; ++i) { - + 00a1c 75 31 jne SHORT $LN292@stbi__pars +; Line 4554 00a1e 85 c9 test ecx, ecx 00a20 0f 84 e4 00 00 - 00 je $LN292@stbi__pars + 00 je $LN290@stbi__pars 00a26 8b d1 mov edx, ecx 00a28 0f 1f 84 00 00 00 00 00 npad 8 -$LL287@stbi__pars: - -; 4555 : stbi_uc t = p[0]; - +$LL285@stbi__pars: +; Line 4555 00a30 41 0f b6 0a movzx ecx, BYTE PTR [r10] - -; 4556 : p[0] = p[2]; - +; Line 4556 00a34 41 0f b6 42 02 movzx eax, BYTE PTR [r10+2] 00a39 41 88 02 mov BYTE PTR [r10], al - -; 4557 : p[2] = t; - +; Line 4557 00a3c 41 88 4a 02 mov BYTE PTR [r10+2], cl - -; 4558 : p += 3; - +; Line 4558 00a40 4d 8d 52 03 lea r10, QWORD PTR [r10+3] 00a44 48 83 ea 01 sub rdx, 1 - 00a48 75 e6 jne SHORT $LL287@stbi__pars - -; 4559 : } -; 4560 : } - - 00a4a e9 bb 00 00 00 jmp $LN292@stbi__pars -$LN294@stbi__pars: - -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { - + 00a48 75 e6 jne SHORT $LL285@stbi__pars +; Line 4560 + 00a4a e9 bb 00 00 00 jmp $LN290@stbi__pars +$LN292@stbi__pars: +; Line 4563 00a4f b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__unpremultiply_on_load_set 00a54 83 3c 10 00 cmp DWORD PTR [rax+rdx], 0 - 00a58 74 0a je SHORT $LN301@stbi__pars + 00a58 74 0a je SHORT $LN299@stbi__pars 00a5a b8 00 00 00 00 mov eax, OFFSET FLAT:stbi__unpremultiply_on_load_local 00a5f 8b 04 10 mov eax, DWORD PTR [rax+rdx] - 00a62 eb 06 jmp SHORT $LN302@stbi__pars -$LN301@stbi__pars: + 00a62 eb 06 jmp SHORT $LN300@stbi__pars +$LN299@stbi__pars: 00a64 8b 05 00 00 00 00 mov eax, DWORD PTR stbi__unpremultiply_on_load_global -$LN302@stbi__pars: - -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { - +$LN300@stbi__pars: +; Line 4565 00a6a 85 c9 test ecx, ecx 00a6c 0f 84 98 00 00 - 00 je $LN292@stbi__pars - -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { - + 00 je $LN290@stbi__pars +; Line 4563 00a72 85 c0 test eax, eax - 00a74 74 74 je SHORT $LN296@stbi__pars - -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { - + 00a74 74 74 je SHORT $LN294@stbi__pars +; Line 4565 00a76 8b f9 mov edi, ecx 00a78 0f 1f 84 00 00 00 00 00 npad 8 -$LL290@stbi__pars: - -; 4566 : stbi_uc a = p[3]; - +$LL288@stbi__pars: +; Line 4566 00a80 41 0f b6 42 03 movzx eax, BYTE PTR [r10+3] - -; 4567 : stbi_uc t = p[0]; - +; Line 4567 00a85 45 0f b6 1a movzx r11d, BYTE PTR [r10] 00a89 41 0f b6 4a 02 movzx ecx, BYTE PTR [r10+2] - -; 4568 : if (a) { - +; Line 4568 00a8e 84 c0 test al, al - 00a90 74 42 je SHORT $LN298@stbi__pars - -; 4569 : stbi_uc half = a / 2; - + 00a90 74 42 je SHORT $LN296@stbi__pars +; Line 4569 00a92 44 8b c0 mov r8d, eax 00a95 44 8b c8 mov r9d, eax - -; 4570 : p[0] = (p[2] * 255 + half) / a; -; 4571 : p[1] = (p[1] * 255 + half) / a; - +; Line 4571 00a98 41 0f b6 42 01 movzx eax, BYTE PTR [r10+1] 00a9d 33 d2 xor edx, edx 00a9f 69 c0 ff 00 00 @@ -38445,9 +25458,7 @@ $LL290@stbi__pars: 00aa5 41 d1 e8 shr r8d, 1 00aa8 41 03 c0 add eax, r8d 00aab 41 f7 f1 div r9d - -; 4572 : p[2] = (t * 255 + half) / a; - +; Line 4572 00aae 33 d2 xor edx, edx 00ab0 41 88 42 01 mov BYTE PTR [r10+1], al 00ab4 41 69 c3 ff 00 @@ -38460,74 +25471,42 @@ $LL290@stbi__pars: 00 imul eax, ecx, 255 ; 000000ffH 00acc 41 03 c0 add eax, r8d 00acf 41 f7 f1 div r9d - -; 4573 : } - - 00ad2 eb 03 jmp SHORT $LN299@stbi__pars -$LN298@stbi__pars: - -; 4574 : else { -; 4575 : p[0] = p[2]; -; 4576 : p[2] = t; - +; Line 4573 + 00ad2 eb 03 jmp SHORT $LN297@stbi__pars +$LN296@stbi__pars: +; Line 4576 00ad4 0f b6 c1 movzx eax, cl -$LN299@stbi__pars: - -; 4577 : } -; 4578 : p += 4; - +$LN297@stbi__pars: +; Line 4578 00ad7 41 88 02 mov BYTE PTR [r10], al 00ada 45 88 5a 02 mov BYTE PTR [r10+2], r11b 00ade 49 83 c2 04 add r10, 4 00ae2 48 83 ef 01 sub rdi, 1 - 00ae6 75 98 jne SHORT $LL290@stbi__pars - -; 4579 : } -; 4580 : } - - 00ae8 eb 20 jmp SHORT $LN292@stbi__pars -$LN296@stbi__pars: - -; 4581 : else { -; 4582 : // convert bgr to rgb -; 4583 : for (i = 0; i < pixel_count; ++i) { - + 00ae6 75 98 jne SHORT $LL288@stbi__pars +; Line 4580 + 00ae8 eb 20 jmp SHORT $LN290@stbi__pars +$LN294@stbi__pars: +; Line 4583 00aea 8b d1 mov edx, ecx 00aec 0f 1f 40 00 npad 4 -$LL293@stbi__pars: - -; 4584 : stbi_uc t = p[0]; - +$LL291@stbi__pars: +; Line 4584 00af0 41 0f b6 0a movzx ecx, BYTE PTR [r10] - -; 4585 : p[0] = p[2]; - +; Line 4585 00af4 41 0f b6 42 02 movzx eax, BYTE PTR [r10+2] 00af9 41 88 02 mov BYTE PTR [r10], al - -; 4586 : p[2] = t; - +; Line 4586 00afc 41 88 4a 02 mov BYTE PTR [r10+2], cl - -; 4587 : p += 4; - +; Line 4587 00b00 4d 8d 52 04 lea r10, QWORD PTR [r10+4] 00b04 48 83 ea 01 sub rdx, 1 - 00b08 75 e6 jne SHORT $LL293@stbi__pars -$LN292@stbi__pars: - -; 4742 : stbi__de_iphone(z); -; 4743 : if (pal_img_n) { - + 00b08 75 e6 jne SHORT $LL291@stbi__pars +$LN290@stbi__pars: +; Line 4743 00b0a 40 84 f6 test sil, sil 00b0d 0f 84 2c 01 00 00 je $LN88@stbi__pars - -; 4744 : // pal_img_n == 3 or 4 -; 4745 : s->img_n = pal_img_n; // record the actual colors we had -; 4746 : s->img_out_n = pal_img_n; -; 4747 : if (req_comp >= 3) s->img_out_n = req_comp; - +; Line 4747 00b13 8b 44 24 58 mov eax, DWORD PTR req_comp$1$[rsp] 00b17 40 0f b6 f6 movzx esi, sil 00b1b 89 73 08 mov DWORD PTR [rbx+8], esi @@ -38537,90 +25516,56 @@ $LN292@stbi__pars: 00b26 89 43 0c mov DWORD PTR [rbx+12], eax 00b29 8b f0 mov esi, eax $LN90@stbi__pars: - -; 4471 : stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; - +; Line 4471 00b2b 49 8b 45 00 mov rax, QWORD PTR [r13] - -; 4472 : stbi_uc* p, * temp_out, * orig = a->out; - +; Line 4472 00b2f 49 8b 7d 18 mov rdi, QWORD PTR [r13+24] 00b33 44 8b 70 04 mov r14d, DWORD PTR [rax+4] 00b37 44 0f af 30 imul r14d, DWORD PTR [rax] - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00b3b 45 85 f6 test r14d, r14d 00b3e 0f 88 e2 00 00 - 00 js $LN463@stbi__pars + 00 js $LN461@stbi__pars 00b44 85 f6 test esi, esi 00b46 0f 88 da 00 00 - 00 js $LN463@stbi__pars - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 00b4c 74 11 je SHORT $LN244@stbi__pars - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - + 00 js $LN461@stbi__pars +; Line 468 + 00b4c 74 11 je SHORT $LN242@stbi__pars +; Line 470 00b4e b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00b53 99 cdq 00b54 f7 fe idiv esi - -; 477 : return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add); - +; Line 477 00b56 44 3b f0 cmp r14d, eax 00b59 0f 8f c7 00 00 - 00 jg $LN463@stbi__pars -$LN244@stbi__pars: - -; 502 : return stbi__malloc(a * b + add); - + 00 jg $LN461@stbi__pars +$LN242@stbi__pars: +; Line 502 00b5f 8b c6 mov eax, esi 00b61 41 0f af c6 imul eax, r14d 00b65 48 63 c8 movsxd rcx, eax - -; 438 : return STBI_MALLOC(size); - +; Line 438 00b68 ff 15 00 00 00 00 call QWORD PTR __imp_malloc 00b6e 4c 8b f8 mov r15, rax - -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); - +; Line 4475 00b71 48 85 c0 test rax, rax 00b74 0f 84 ac 00 00 - 00 je $LN463@stbi__pars - -; 4481 : for (i = 0; i < pixel_count; ++i) { - + 00 je $LN461@stbi__pars +; Line 4481 00b7a 45 85 f6 test r14d, r14d 00b7d 0f 84 93 00 00 - 00 je $LN237@stbi__pars - -; 4476 : -; 4477 : // between here and free(out) below, exitting would leak -; 4478 : temp_out = p; -; 4479 : -; 4480 : if (pal_img_n == 3) { - + 00 je $LN235@stbi__pars +; Line 4480 00b83 45 8b ce mov r9d, r14d 00b86 4c 8d 40 02 lea r8, QWORD PTR [rax+2] 00b8a 83 fe 03 cmp esi, 3 - 00b8d 75 46 jne SHORT $LL238@stbi__pars + 00b8d 75 46 jne SHORT $LL236@stbi__pars 00b8f 90 npad 1 -$LL235@stbi__pars: - -; 4482 : int n = orig[i] * 4; - +$LL233@stbi__pars: +; Line 4482 00b90 0f b6 17 movzx edx, BYTE PTR [rdi] - -; 4483 : p[0] = palette[n]; -; 4484 : p[1] = palette[n + 1]; -; 4485 : p[2] = palette[n + 2]; -; 4486 : p += 3; - +; Line 4486 00b93 4d 8d 40 03 lea r8, QWORD PTR [r8+3] 00b97 48 8d 7f 01 lea rdi, QWORD PTR [rdi+1] 00b9b 0f b6 84 95 80 @@ -38633,35 +25578,19 @@ $LL235@stbi__pars: 00bb7 41 88 40 fc mov BYTE PTR [r8-4], al 00bbb 41 88 48 fd mov BYTE PTR [r8-3], cl 00bbf 49 83 e9 01 sub r9, 1 - 00bc3 75 cb jne SHORT $LL235@stbi__pars - -; 4497 : } -; 4498 : } -; 4499 : STBI_FREE(a->out); - + 00bc3 75 cb jne SHORT $LL233@stbi__pars +; Line 4499 00bc5 49 8b 4d 18 mov rcx, QWORD PTR [r13+24] 00bc9 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4500 : a->out = temp_out; - +; Line 4500 00bcf 4d 89 7d 18 mov QWORD PTR [r13+24], r15 - -; 4710 : z->idata = p; - +; Line 4710 00bd3 eb 72 jmp SHORT $LN92@stbi__pars -$LL238@stbi__pars: - -; 4491 : int n = orig[i] * 4; - +$LL236@stbi__pars: +; Line 4491 00bd5 0f b6 17 movzx edx, BYTE PTR [rdi] - -; 4492 : p[0] = palette[n]; -; 4493 : p[1] = palette[n + 1]; -; 4494 : p[2] = palette[n + 2]; -; 4495 : p[3] = palette[n + 3]; -; 4496 : p += 4; - +; Line 4496 00bd8 4d 8d 40 04 lea r8, QWORD PTR [r8+4] 00bdc 48 8d 7f 01 lea rdi, QWORD PTR [rdi+1] 00be0 0f b6 84 95 80 @@ -38677,440 +25606,299 @@ $LL238@stbi__pars: 00c08 41 88 40 fc mov BYTE PTR [r8-4], al 00c0c 41 88 48 fd mov BYTE PTR [r8-3], cl 00c10 49 83 e9 01 sub r9, 1 - 00c14 75 bf jne SHORT $LL238@stbi__pars -$LN237@stbi__pars: - -; 4497 : } -; 4498 : } -; 4499 : STBI_FREE(a->out); - + 00c14 75 bf jne SHORT $LL236@stbi__pars +$LN235@stbi__pars: +; Line 4499 00c16 49 8b 4d 18 mov rcx, QWORD PTR [r13+24] 00c1a ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4500 : a->out = temp_out; - +; Line 4500 00c20 4d 89 7d 18 mov QWORD PTR [r13+24], r15 - -; 4710 : z->idata = p; - +; Line 4710 00c24 eb 21 jmp SHORT $LN92@stbi__pars -$LN463@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - +$LN461@stbi__pars: +; Line 431 00c26 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 00c2f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ 00c36 4a 8b 04 e0 mov rax, QWORD PTR [rax+r12*8] - -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); - - 00c3a e9 a8 02 00 00 jmp $LN635@stbi__pars +; Line 4475 + 00c3a e9 a0 02 00 00 jmp $LN633@stbi__pars $LN88@stbi__pars: - -; 4748 : if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) -; 4749 : return 0; -; 4750 : } -; 4751 : else if (has_trans) { - +; Line 4751 00c3f 45 84 f6 test r14b, r14b 00c42 74 03 je SHORT $LN92@stbi__pars - -; 4752 : // non-paletted image with tRNS -> source image has (constant) alpha -; 4753 : ++s->img_n; - +; Line 4753 00c44 ff 43 08 inc DWORD PTR [rbx+8] $LN92@stbi__pars: - -; 4754 : } -; 4755 : STBI_FREE(z->expanded); z->expanded = NULL; - +; Line 4755 00c47 49 8b 4d 10 mov rcx, QWORD PTR [r13+16] 00c4b ff 15 00 00 00 00 call QWORD PTR __imp_free 00c51 33 c0 xor eax, eax - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 4757 00c53 48 8b cb mov rcx, rbx - -; 4754 : } -; 4755 : STBI_FREE(z->expanded); z->expanded = NULL; - 00c56 49 89 45 10 mov QWORD PTR [r13+16], rax - -; 1168 : stbi__uint32 z = stbi__get16be(s); - - 00c5a e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - - 00c5f 48 8b cb mov rcx, rbx - 00c62 e8 00 00 00 00 call stbi__get16be - -; 4756 : // end of PNG chunk, read and skip CRC -; 4757 : stbi__get32be(s); -; 4758 : return 1; - - 00c67 b8 01 00 00 00 mov eax, 1 - 00c6c e9 81 02 00 00 jmp $LN3@stbi__pars + 00c5a e8 00 00 00 00 call stbi__get32be +; Line 4758 + 00c5f b8 01 00 00 00 mov eax, 1 + 00c64 e9 81 02 00 00 jmp $LN3@stbi__pars $LN194@stbi__pars: - -; 4033 : STBI_FREE(a.zout_start); - - 00c71 48 8b 4d 90 mov rcx, QWORD PTR a$15[rbp-224] - 00c75 ff 15 00 00 00 +; Line 4033 + 00c69 48 8b 4d 90 mov rcx, QWORD PTR a$2[rbp-224] + 00c6d ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4034 : return NULL; - - 00c7b 49 89 75 10 mov QWORD PTR [r13+16], rsi - -; 4710 : z->idata = p; - - 00c7f e9 6c 02 00 00 jmp $LN327@stbi__pars -$LN324@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00c84 8b 15 00 00 00 +; Line 4034 + 00c73 49 89 75 10 mov QWORD PTR [r13+16], rsi +; Line 4710 + 00c77 e9 6c 02 00 00 jmp $LN325@stbi__pars +$LN322@stbi__pars: +; Line 431 + 00c7c 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00c8a 65 48 8b 04 25 + 00c82 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00c93 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00c97 48 8d 15 00 00 + 00c8b 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00c8f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_07CKIELOEH@no?5PLTE@ - -; 4693 : if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG"); - - 00c9e e9 44 02 00 00 jmp $LN635@stbi__pars -$LN328@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00ca3 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00ca9 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00cb2 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00cb6 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - -; 4708 : STBI_NOTUSED(idata_limit_old); -; 4709 : p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); - - 00cbd e9 25 02 00 00 jmp $LN635@stbi__pars -$LN329@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00cc2 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00cc8 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00cd1 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00cd5 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_09MNNCNKEO@outofdata@ - -; 4711 : } -; 4712 : if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG"); - - 00cdc e9 06 02 00 00 jmp $LN635@stbi__pars +; Line 4693 + 00c96 e9 44 02 00 00 jmp $LN633@stbi__pars $LN326@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00ce1 8b 15 00 00 00 +; Line 431 + 00c9b 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00ce7 65 48 8b 04 25 + 00ca1 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00cf0 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00cf4 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@PLHGLONG@IDAT?5size?5limit@ - -; 4694 : if (scan == STBI__SCAN_header) { -; 4695 : // header scan definitely stops at first IDAT -; 4696 : if (pal_img_n) -; 4697 : s->img_n = pal_img_n; -; 4698 : return 1; -; 4699 : } -; 4700 : if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); - - 00cfb e9 e7 01 00 00 jmp $LN635@stbi__pars -$LN336@stbi__pars: - -; 4781 : } - - 00d00 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00d06 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00d0f 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00d13 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_09MBBNGCKB@bad?5ctype@ - 00d1a e9 c8 01 00 00 jmp $LN635@stbi__pars -$LN338@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00d1f 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00d25 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00d2e 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00d32 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@MDMBDDFG@bad?5comp?5method@ - -; 4632 : comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG"); - - 00d39 e9 a9 01 00 00 jmp $LN635@stbi__pars -$LN339@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00d3e 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00d44 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00d4d 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00d51 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0BC@GHLIKKMD@bad?5filter?5method@ - -; 4633 : filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG"); - - 00d58 e9 8a 01 00 00 jmp $LN635@stbi__pars -$LN39@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00d5d 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00d63 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00d6c 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00d70 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0O@FNFBHCOO@0?9pixel?5image@ - -; 4635 : if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG"); - - 00d77 e9 6b 01 00 00 jmp $LN635@stbi__pars -$LN340@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00d7c 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00d82 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00d8b 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00d8f 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0BF@JCGDPBAA@bad?5interlace?5method@ - -; 4634 : interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG"); - - 00d96 e9 4c 01 00 00 jmp $LN635@stbi__pars -$LN334@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00d9b 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00da1 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00daa 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00dae 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0BE@EJHIPKNO@1?12?14?18?116?9bit?5only@ - -; 4628 : z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only"); - - 00db5 e9 2d 01 00 00 jmp $LN635@stbi__pars -$LN331@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00dba 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00dc0 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00dc9 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00dcd 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0N@POJLKMKK@bad?5IHDR?5len@ - -; 4623 : if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG"); - - 00dd4 e9 0e 01 00 00 jmp $LN635@stbi__pars -$LN330@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00dd9 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00ddf 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00de8 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00dec 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0O@KBHBNJOK@multiple?5IHDR@ - -; 4617 : stbi__skip(s, c.length); -; 4618 : break; -; 4619 : case STBI__PNG_TYPE('I', 'H', 'D', 'R'): { -; 4620 : int comp, filter; -; 4621 : if (!first) return stbi__err("multiple IHDR", "Corrupt PNG"); - - 00df3 e9 ef 00 00 00 jmp $LN635@stbi__pars -$LN345@stbi__pars: - -; 4765 : #ifndef STBI_NO_FAILURE_STRINGS -; 4766 : // not threadsafe -; 4767 : static char invalid_chunk[] = "XXXX PNG chunk not known"; -; 4768 : invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); - - 00df8 8b c2 mov eax, edx - -; 4771 : invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); - - 00dfa 88 15 03 00 00 - 00 mov BYTE PTR ?invalid_chunk@?BP@??stbi__parse_png_file@@9@9+3, dl - 00e00 c1 e8 18 shr eax, 24 - 00e03 88 05 00 00 00 - 00 mov BYTE PTR ?invalid_chunk@?BP@??stbi__parse_png_file@@9@9, al - 00e09 8b c2 mov eax, edx - 00e0b c1 e8 10 shr eax, 16 - 00e0e 88 05 01 00 00 - 00 mov BYTE PTR ?invalid_chunk@?BP@??stbi__parse_png_file@@9@9+1, al - 00e14 8b c2 mov eax, edx - -; 431 : stbi__g_failure_reason = str; - - 00e16 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - -; 4769 : invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); -; 4770 : invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); - - 00e1c c1 e8 08 shr eax, 8 - 00e1f 88 05 02 00 00 - 00 mov BYTE PTR ?invalid_chunk@?BP@??stbi__parse_png_file@@9@9+2, al - -; 431 : stbi__g_failure_reason = str; - - 00e25 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00e2e 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00e32 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:?invalid_chunk@?BP@??stbi__parse_png_file@@9@9 - -; 4772 : #endif -; 4773 : return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); - - 00e39 e9 a9 00 00 00 jmp $LN635@stbi__pars -$LN350@stbi__pars: - -; 4781 : } - - 00e3e 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00e44 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00e4d 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00e51 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0N@KDLCCKCH@bad?5tRNS?5len@ - 00e58 e9 8a 00 00 00 jmp $LN635@stbi__pars -$LN349@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00e5d 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00e63 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00e6c 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00e70 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0BB@CEDNNLBG@tRNS?5before?5PLTE@ - -; 4668 : if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } -; 4669 : if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG"); - - 00e77 eb 6e jmp SHORT $LN635@stbi__pars -$LN351@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00e79 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00e7f 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00e88 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00e8c 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@ENDPGCHB@tRNS?5with?5alpha@ - -; 4675 : else { -; 4676 : if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG"); - - 00e93 eb 52 jmp SHORT $LN635@stbi__pars -$LN347@stbi__pars: - -; 431 : stbi__g_failure_reason = str; - - 00e95 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00e9b 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00ea4 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00ea8 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@PCPJHDKJ@tRNS?5after?5IDAT@ - -; 4666 : if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG"); - - 00eaf eb 36 jmp SHORT $LN635@stbi__pars -$LN356@stbi__pars: - -; 4781 : } - - 00eb1 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00eb7 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00ec0 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00ec4 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0N@JCPAJAKB@invalid?5PLTE@ - 00ecb eb 1a jmp SHORT $LN635@stbi__pars -$LN354@stbi__pars: - 00ecd 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00ed3 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00edc 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00ee0 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0P@JEAFOMAF@first?5not?5IHDR@ -$LN635@stbi__pars: - 00ee7 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00eec 48 89 14 01 mov QWORD PTR [rcx+rax], rdx + 00caa 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00cae 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ +; Line 4709 + 00cb5 e9 25 02 00 00 jmp $LN633@stbi__pars $LN327@stbi__pars: - 00ef0 33 c0 xor eax, eax +; Line 431 + 00cba 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00cc0 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00cc9 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00ccd 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_09MNNCNKEO@outofdata@ +; Line 4712 + 00cd4 e9 06 02 00 00 jmp $LN633@stbi__pars +$LN324@stbi__pars: +; Line 431 + 00cd9 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00cdf 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00ce8 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00cec 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@PLHGLONG@IDAT?5size?5limit@ +; Line 4700 + 00cf3 e9 e7 01 00 00 jmp $LN633@stbi__pars +$LN334@stbi__pars: +; Line 4781 + 00cf8 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00cfe 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00d07 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00d0b 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_09MBBNGCKB@bad?5ctype@ + 00d12 e9 c8 01 00 00 jmp $LN633@stbi__pars +$LN336@stbi__pars: +; Line 431 + 00d17 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00d1d 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00d26 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00d2a 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@MDMBDDFG@bad?5comp?5method@ +; Line 4632 + 00d31 e9 a9 01 00 00 jmp $LN633@stbi__pars +$LN337@stbi__pars: +; Line 431 + 00d36 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00d3c 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00d45 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00d49 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0BC@GHLIKKMD@bad?5filter?5method@ +; Line 4633 + 00d50 e9 8a 01 00 00 jmp $LN633@stbi__pars +$LN39@stbi__pars: +; Line 431 + 00d55 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00d5b 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00d64 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00d68 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0O@FNFBHCOO@0?9pixel?5image@ +; Line 4635 + 00d6f e9 6b 01 00 00 jmp $LN633@stbi__pars +$LN338@stbi__pars: +; Line 431 + 00d74 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00d7a 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00d83 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00d87 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0BF@JCGDPBAA@bad?5interlace?5method@ +; Line 4634 + 00d8e e9 4c 01 00 00 jmp $LN633@stbi__pars +$LN332@stbi__pars: +; Line 431 + 00d93 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00d99 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00da2 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00da6 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0BE@EJHIPKNO@1?12?14?18?116?9bit?5only@ +; Line 4628 + 00dad e9 2d 01 00 00 jmp $LN633@stbi__pars +$LN329@stbi__pars: +; Line 431 + 00db2 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00db8 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00dc1 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00dc5 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0N@POJLKMKK@bad?5IHDR?5len@ +; Line 4623 + 00dcc e9 0e 01 00 00 jmp $LN633@stbi__pars +$LN328@stbi__pars: +; Line 431 + 00dd1 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00dd7 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00de0 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00de4 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0O@KBHBNJOK@multiple?5IHDR@ +; Line 4621 + 00deb e9 ef 00 00 00 jmp $LN633@stbi__pars +$LN343@stbi__pars: +; Line 4768 + 00df0 8b c2 mov eax, edx +; Line 4771 + 00df2 88 15 03 00 00 + 00 mov BYTE PTR ?invalid_chunk@?BP@??stbi__parse_png_file@@9@9+3, dl + 00df8 c1 e8 18 shr eax, 24 + 00dfb 88 05 00 00 00 + 00 mov BYTE PTR ?invalid_chunk@?BP@??stbi__parse_png_file@@9@9, al + 00e01 8b c2 mov eax, edx + 00e03 c1 e8 10 shr eax, 16 + 00e06 88 05 01 00 00 + 00 mov BYTE PTR ?invalid_chunk@?BP@??stbi__parse_png_file@@9@9+1, al + 00e0c 8b c2 mov eax, edx +; Line 431 + 00e0e 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index +; Line 4770 + 00e14 c1 e8 08 shr eax, 8 + 00e17 88 05 02 00 00 + 00 mov BYTE PTR ?invalid_chunk@?BP@??stbi__parse_png_file@@9@9+2, al +; Line 431 + 00e1d 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00e26 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00e2a 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:?invalid_chunk@?BP@??stbi__parse_png_file@@9@9 +; Line 4773 + 00e31 e9 a9 00 00 00 jmp $LN633@stbi__pars +$LN348@stbi__pars: +; Line 4781 + 00e36 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00e3c 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00e45 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00e49 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0N@KDLCCKCH@bad?5tRNS?5len@ + 00e50 e9 8a 00 00 00 jmp $LN633@stbi__pars +$LN347@stbi__pars: +; Line 431 + 00e55 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00e5b 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00e64 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00e68 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0BB@CEDNNLBG@tRNS?5before?5PLTE@ +; Line 4669 + 00e6f eb 6e jmp SHORT $LN633@stbi__pars +$LN349@stbi__pars: +; Line 431 + 00e71 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00e77 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00e80 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00e84 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@ENDPGCHB@tRNS?5with?5alpha@ +; Line 4676 + 00e8b eb 52 jmp SHORT $LN633@stbi__pars +$LN345@stbi__pars: +; Line 431 + 00e8d 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00e93 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00e9c 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00ea0 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@PCPJHDKJ@tRNS?5after?5IDAT@ +; Line 4666 + 00ea7 eb 36 jmp SHORT $LN633@stbi__pars +$LN354@stbi__pars: +; Line 4781 + 00ea9 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00eaf 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00eb8 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00ebc 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0N@JCPAJAKB@invalid?5PLTE@ + 00ec3 eb 1a jmp SHORT $LN633@stbi__pars +$LN352@stbi__pars: + 00ec5 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 00ecb 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00ed4 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00ed8 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0P@JEAFOMAF@first?5not?5IHDR@ +$LN633@stbi__pars: + 00edf b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00ee4 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +$LN325@stbi__pars: + 00ee8 33 c0 xor eax, eax $LN3@stbi__pars: - 00ef2 48 8b 8d 80 13 + 00eea 48 8b 8d 80 13 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp-256] - 00ef9 48 33 cc xor rcx, rsp - 00efc e8 00 00 00 00 call __security_check_cookie - 00f01 4c 8d 9c 24 90 + 00ef1 48 33 cc xor rcx, rsp + 00ef4 e8 00 00 00 00 call __security_check_cookie + 00ef9 4c 8d 9c 24 90 14 00 00 lea r11, QWORD PTR [rsp+5264] - 00f09 49 8b 5b 38 mov rbx, QWORD PTR [r11+56] - 00f0d 49 8b 73 40 mov rsi, QWORD PTR [r11+64] - 00f11 49 8b 7b 48 mov rdi, QWORD PTR [r11+72] - 00f15 49 8b e3 mov rsp, r11 - 00f18 41 5f pop r15 - 00f1a 41 5e pop r14 - 00f1c 41 5d pop r13 - 00f1e 41 5c pop r12 - 00f20 5d pop rbp - 00f21 c3 ret 0 + 00f01 49 8b 5b 38 mov rbx, QWORD PTR [r11+56] + 00f05 49 8b 73 40 mov rsi, QWORD PTR [r11+64] + 00f09 49 8b 7b 48 mov rdi, QWORD PTR [r11+72] + 00f0d 49 8b e3 mov rsp, r11 + 00f10 41 5f pop r15 + 00f12 41 5e pop r14 + 00f14 41 5d pop r13 + 00f16 41 5c pop r12 + 00f18 5d pop rbp + 00f19 c3 ret 0 stbi__parse_png_file ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__do_png _TEXT SEGMENT p$ = 80 @@ -39120,9 +25908,8 @@ n$ = 104 req_comp$ = 112 ri$ = 120 stbi__do_png PROC ; COMDAT - -; 4784 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4784 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi @@ -39131,10 +25918,7 @@ stbi__do_png PROC ; COMDAT 00016 41 56 push r14 00018 41 57 push r15 0001a 48 83 ec 30 sub rsp, 48 ; 00000030H - -; 4785 : void* result = NULL; -; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); - +; Line 4786 0001e 8b 7c 24 70 mov edi, DWORD PTR req_comp$[rsp] 00022 45 33 e4 xor r12d, r12d 00025 4d 8b f1 mov r14, r9 @@ -39145,56 +25929,40 @@ stbi__do_png PROC ; COMDAT 00034 83 ff 04 cmp edi, 4 00037 0f 87 e0 00 00 00 ja $LN3@stbi__do_p - -; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { - +; Line 4787 0003d 44 8b c7 mov r8d, edi 00040 33 d2 xor edx, edx 00042 e8 00 00 00 00 call stbi__parse_png_file 00047 85 c0 test eax, eax 00049 0f 84 83 00 00 00 je $LN13@stbi__do_p - -; 4788 : if (p->depth <= 8) - +; Line 4788 0004f 8b 43 20 mov eax, DWORD PTR [rbx+32] 00052 83 f8 08 cmp eax, 8 00055 7f 07 jg SHORT $LN5@stbi__do_p - -; 4789 : ri->bits_per_channel = 8; - +; Line 4789 00057 41 8d 44 24 08 lea eax, QWORD PTR [r12+8] 0005c eb 09 jmp SHORT $LN8@stbi__do_p $LN5@stbi__do_p: - -; 4790 : else if (p->depth == 16) - +; Line 4790 0005e 83 f8 10 cmp eax, 16 00061 0f 85 9a 00 00 00 jne $LN7@stbi__do_p $LN8@stbi__do_p: - -; 4794 : result = p->out; - +; Line 4794 00067 48 8b 4c 24 78 mov rcx, QWORD PTR ri$[rsp] 0006c 89 01 mov DWORD PTR [rcx], eax 0006e 48 8b 73 18 mov rsi, QWORD PTR [rbx+24] - -; 4795 : p->out = NULL; - +; Line 4795 00072 4c 89 63 18 mov QWORD PTR [rbx+24], r12 - -; 4796 : if (req_comp && req_comp != p->s->img_out_n) { - +; Line 4796 00076 85 ff test edi, edi 00078 74 3f je SHORT $LN12@stbi__do_p 0007a 4c 8b 0b mov r9, QWORD PTR [rbx] 0007d 41 8b 51 0c mov edx, DWORD PTR [r9+12] 00081 3b fa cmp edi, edx 00083 74 34 je SHORT $LN12@stbi__do_p - -; 4797 : if (ri->bits_per_channel == 8) - +; Line 4797 00085 41 8b 41 04 mov eax, DWORD PTR [r9+4] 00089 44 8b c7 mov r8d, edi 0008c 83 39 08 cmp DWORD PTR [rcx], 8 @@ -39202,83 +25970,55 @@ $LN8@stbi__do_p: 00092 45 8b 09 mov r9d, DWORD PTR [r9] 00095 89 44 24 20 mov DWORD PTR [rsp+32], eax 00099 75 07 jne SHORT $LN10@stbi__do_p - -; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); - +; Line 4798 0009b e8 00 00 00 00 call stbi__convert_format 000a0 eb 05 jmp SHORT $LN28@stbi__do_p $LN10@stbi__do_p: - -; 4799 : else -; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); - +; Line 4800 000a2 e8 00 00 00 00 call stbi__convert_format16 $LN28@stbi__do_p: - -; 4801 : p->s->img_out_n = req_comp; - +; Line 4801 000a7 48 8b f0 mov rsi, rax 000aa 48 8b 03 mov rax, QWORD PTR [rbx] 000ad 89 78 0c mov DWORD PTR [rax+12], edi - -; 4802 : if (result == NULL) return result; - +; Line 4802 000b0 48 85 f6 test rsi, rsi 000b3 0f 84 87 00 00 00 je $LN29@stbi__do_p $LN12@stbi__do_p: - -; 4803 : } -; 4804 : *x = p->s->img_x; - +; Line 4804 000b9 48 8b 0b mov rcx, QWORD PTR [rbx] 000bc 8b 01 mov eax, DWORD PTR [rcx] 000be 89 45 00 mov DWORD PTR [rbp], eax - -; 4805 : *y = p->s->img_y; - +; Line 4805 000c1 8b 41 04 mov eax, DWORD PTR [rcx+4] 000c4 41 89 07 mov DWORD PTR [r15], eax - -; 4806 : if (n) *n = p->s->img_n; - +; Line 4806 000c7 4d 85 f6 test r14, r14 000ca 74 06 je SHORT $LN13@stbi__do_p 000cc 8b 41 08 mov eax, DWORD PTR [rcx+8] 000cf 41 89 06 mov DWORD PTR [r14], eax $LN13@stbi__do_p: - -; 4807 : } -; 4808 : STBI_FREE(p->out); p->out = NULL; - +; Line 4808 000d2 48 8b 4b 18 mov rcx, QWORD PTR [rbx+24] 000d6 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; - +; Line 4809 000dc 48 8b 4b 10 mov rcx, QWORD PTR [rbx+16] 000e0 4c 89 63 18 mov QWORD PTR [rbx+24], r12 000e4 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4810 : STBI_FREE(p->idata); p->idata = NULL; - +; Line 4810 000ea 48 8b 4b 08 mov rcx, QWORD PTR [rbx+8] 000ee 4c 89 63 10 mov QWORD PTR [rbx+16], r12 000f2 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4811 : -; 4812 : return result; - +; Line 4812 000f8 48 8b c6 mov rax, rsi 000fb 4c 89 63 08 mov QWORD PTR [rbx+8], r12 000ff eb 41 jmp SHORT $LN1@stbi__do_p $LN7@stbi__do_p: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00101 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00107 65 48 8b 04 25 @@ -39286,16 +26026,10 @@ $LN7@stbi__do_p: 00110 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00114 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BF@NOEEEFMF@bad?5bits_per_channel@ - -; 4791 : ri->bits_per_channel = 16; -; 4792 : else -; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); - +; Line 4793 0011b eb 1a jmp SHORT $LN30@stbi__do_p $LN3@stbi__do_p: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0011d 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00123 65 48 8b 04 25 @@ -39304,9 +26038,7 @@ $LN3@stbi__do_p: 00130 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0N@KBPNPPBJ@bad?5req_comp@ $LN30@stbi__do_p: - -; 4813 : } - +; Line 4813 00137 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason 0013c 48 89 14 01 mov QWORD PTR [rcx+rax], rdx $LN29@stbi__do_p: @@ -39324,7 +26056,6 @@ $LN1@stbi__do_p: stbi__do_png ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__png_load _TEXT SEGMENT p$ = 48 @@ -39336,9 +26067,8 @@ comp$ = 184 req_comp$ = 192 ri$ = 200 stbi__png_load PROC ; COMDAT - -; 4816 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4816 00000 40 53 push rbx 00002 55 push rbp 00003 56 push rsi @@ -39352,32 +26082,21 @@ stbi__png_load PROC ; COMDAT 00017 48 89 44 24 58 mov QWORD PTR __$ArrayPad$[rsp], rax 0001c 8b 9c 24 c0 00 00 00 mov ebx, DWORD PTR req_comp$[rsp] - -; 4785 : void* result = NULL; - +; Line 4785 00023 33 ff xor edi, edi - -; 4816 : { - +; Line 4816 00025 4c 8b b4 24 c8 00 00 00 mov r14, QWORD PTR ri$[rsp] 0002d 49 8b f1 mov rsi, r9 - -; 4817 : stbi__png p; -; 4818 : p.s = s; - +; Line 4818 00030 48 89 4c 24 30 mov QWORD PTR p$[rsp], rcx 00035 49 8b e8 mov rbp, r8 00038 4c 8b fa mov r15, rdx - -; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); - +; Line 4786 0003b 83 fb 04 cmp ebx, 4 0003e 0f 87 fc 00 00 00 ja $LN5@stbi__png_ - -; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { - +; Line 4787 00044 44 8b c3 mov r8d, ebx 00047 48 8d 4c 24 30 lea rcx, QWORD PTR p$[rsp] 0004c 33 d2 xor edx, edx @@ -39385,34 +26104,23 @@ stbi__png_load PROC ; COMDAT 00053 85 c0 test eax, eax 00055 0f 84 87 00 00 00 je $LN23@stbi__png_ - -; 4788 : if (p->depth <= 8) - +; Line 4788 0005b 8b 44 24 50 mov eax, DWORD PTR p$[rsp+32] 0005f 83 f8 08 cmp eax, 8 00062 7f 05 jg SHORT $LN7@stbi__png_ - -; 4789 : ri->bits_per_channel = 8; - +; Line 4789 00064 8d 47 08 lea eax, QWORD PTR [rdi+8] 00067 eb 09 jmp SHORT $LN10@stbi__png_ $LN7@stbi__png_: - -; 4790 : else if (p->depth == 16) - +; Line 4790 00069 83 f8 10 cmp eax, 16 0006c 0f 85 a8 00 00 00 jne $LN9@stbi__png_ $LN10@stbi__png_: - -; 4794 : result = p->out; - +; Line 4794 00072 41 89 06 mov DWORD PTR [r14], eax 00075 48 8b 7c 24 48 mov rdi, QWORD PTR p$[rsp+24] - -; 4795 : p->out = NULL; -; 4796 : if (req_comp && req_comp != p->s->img_out_n) { - +; Line 4796 0007a 48 8b 4c 24 30 mov rcx, QWORD PTR p$[rsp] 0007f 48 c7 44 24 48 00 00 00 00 mov QWORD PTR p$[rsp+24], 0 @@ -39421,9 +26129,7 @@ $LN10@stbi__png_: 0008c 8b 51 0c mov edx, DWORD PTR [rcx+12] 0008f 3b da cmp ebx, edx 00091 74 3a je SHORT $LN14@stbi__png_ - -; 4797 : if (ri->bits_per_channel == 8) - +; Line 4797 00093 44 8b 09 mov r9d, DWORD PTR [rcx] 00096 83 f8 08 cmp eax, 8 00099 8b 41 04 mov eax, DWORD PTR [rcx+4] @@ -39431,86 +26137,57 @@ $LN10@stbi__png_: 0009f 89 44 24 20 mov DWORD PTR [rsp+32], eax 000a3 48 8b cf mov rcx, rdi 000a6 75 07 jne SHORT $LN12@stbi__png_ - -; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); - +; Line 4798 000a8 e8 00 00 00 00 call stbi__convert_format 000ad eb 05 jmp SHORT $LN33@stbi__png_ $LN12@stbi__png_: - -; 4799 : else -; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); - +; Line 4800 000af e8 00 00 00 00 call stbi__convert_format16 $LN33@stbi__png_: - -; 4801 : p->s->img_out_n = req_comp; - +; Line 4801 000b4 48 8b f8 mov rdi, rax 000b7 48 8b 44 24 30 mov rax, QWORD PTR p$[rsp] 000bc 89 58 0c mov DWORD PTR [rax+12], ebx - -; 4802 : if (result == NULL) return result; - +; Line 4802 000bf 48 85 ff test rdi, rdi 000c2 0f 84 9d 00 00 00 je $LN34@stbi__png_ 000c8 48 8b 4c 24 30 mov rcx, QWORD PTR p$[rsp] $LN14@stbi__png_: - -; 4803 : } -; 4804 : *x = p->s->img_x; - +; Line 4804 000cd 8b 01 mov eax, DWORD PTR [rcx] 000cf 41 89 07 mov DWORD PTR [r15], eax - -; 4805 : *y = p->s->img_y; - +; Line 4805 000d2 8b 41 04 mov eax, DWORD PTR [rcx+4] 000d5 89 45 00 mov DWORD PTR [rbp], eax - -; 4806 : if (n) *n = p->s->img_n; - +; Line 4806 000d8 48 85 f6 test rsi, rsi 000db 74 05 je SHORT $LN23@stbi__png_ 000dd 8b 41 08 mov eax, DWORD PTR [rcx+8] 000e0 89 06 mov DWORD PTR [rsi], eax $LN23@stbi__png_: - -; 4807 : } -; 4808 : STBI_FREE(p->out); p->out = NULL; - +; Line 4808 000e2 48 8b 4c 24 48 mov rcx, QWORD PTR p$[rsp+24] 000e7 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; - +; Line 4809 000ed 48 8b 4c 24 40 mov rcx, QWORD PTR p$[rsp+16] 000f2 48 c7 44 24 48 00 00 00 00 mov QWORD PTR p$[rsp+24], 0 000fb ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4810 : STBI_FREE(p->idata); p->idata = NULL; - +; Line 4810 00101 48 8b 4c 24 38 mov rcx, QWORD PTR p$[rsp+8] 00106 48 c7 44 24 40 00 00 00 00 mov QWORD PTR p$[rsp+16], 0 0010f ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 4819 : return stbi__do_png(&p, x, y, comp, req_comp, ri); - +; Line 4819 00115 48 8b c7 mov rax, rdi - -; 4812 : return result; - +; Line 4812 00118 eb 4d jmp SHORT $LN3@stbi__png_ $LN9@stbi__png_: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0011a 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00120 65 48 8b 04 25 @@ -39521,14 +26198,10 @@ $LN9@stbi__png_: 00133 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BF@NOEEEFMF@bad?5bits_per_channel@ 0013a 49 89 14 01 mov QWORD PTR [r9+rax], rdx - -; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); - +; Line 4793 0013e eb 25 jmp SHORT $LN34@stbi__png_ $LN5@stbi__png_: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00140 44 8b 05 00 00 00 00 mov r8d, DWORD PTR _tls_index 00147 65 48 8b 0c 25 @@ -39540,9 +26213,7 @@ $LN5@stbi__png_: 00 00 lea r8, OFFSET FLAT:??_C@_0N@KBPNPPBJ@bad?5req_comp@ 00161 4d 89 04 09 mov QWORD PTR [r9+rcx], r8 $LN34@stbi__png_: - -; 4820 : } - +; Line 4820 00165 33 c0 xor eax, eax $LN3@stbi__png_: 00167 48 8b 4c 24 58 mov rcx, QWORD PTR __$ArrayPad$[rsp] @@ -39559,95 +26230,63 @@ $LN3@stbi__png_: stbi__png_load ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__png_test _TEXT SEGMENT s$ = 48 stbi__png_test PROC ; COMDAT - -; 4823 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4823 00000 40 53 push rbx 00002 48 83 ec 20 sub rsp, 32 ; 00000020H 00006 48 8b d9 mov rbx, rcx - -; 4824 : int r; -; 4825 : r = stbi__check_png_header(s); - +; Line 4825 00009 e8 00 00 00 00 call stbi__check_png_header - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 0000e 48 8b 93 d0 00 00 00 mov rdx, QWORD PTR [rbx+208] 00015 48 89 93 c0 00 00 00 mov QWORD PTR [rbx+192], rdx - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 0001c 48 8b 93 d8 00 00 00 mov rdx, QWORD PTR [rbx+216] 00023 48 89 93 c8 00 00 00 mov QWORD PTR [rbx+200], rdx - -; 4826 : stbi__rewind(s); -; 4827 : return r; -; 4828 : } - +; Line 4828 0002a 48 83 c4 20 add rsp, 32 ; 00000020H 0002e 5b pop rbx 0002f c3 ret 0 stbi__png_test ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__bmp_test_raw _TEXT SEGMENT s$ = 48 stbi__bmp_test_raw PROC ; COMDAT - -; 4867 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4867 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0000a 48 8b 81 c0 00 00 00 mov rax, QWORD PTR [rcx+192] - -; 4867 : { - +; Line 4867 00011 48 8b f9 mov rdi, rcx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00014 48 3b 81 c8 00 00 00 cmp rax, QWORD PTR [rcx+200] 0001b 72 16 jb SHORT $LN34@stbi__bmp_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0001d 83 79 30 00 cmp DWORD PTR [rcx+48], 0 00021 0f 84 cc 00 00 00 je $LN21@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00027 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0002c 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] $LN34@stbi__bmp_: - -; 4868 : int r; -; 4869 : int sz; -; 4870 : if (stbi__get8(s) != 'B') return 0; - +; Line 4870 00033 0f b6 08 movzx ecx, BYTE PTR [rax] 00036 48 ff c0 inc rax 00039 48 89 87 c0 00 @@ -39655,88 +26294,56 @@ $LN34@stbi__bmp_: 00040 80 f9 42 cmp cl, 66 ; 00000042H 00043 0f 85 aa 00 00 00 jne $LN21@stbi__bmp_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00049 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 00050 72 19 jb SHORT $LN35@stbi__bmp_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00052 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 00056 0f 84 97 00 00 00 je $LN21@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0005c 48 8b cf mov rcx, rdi 0005f e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00064 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] $LN35@stbi__bmp_: - -; 4871 : if (stbi__get8(s) != 'M') return 0; - +; Line 4871 0006b 0f b6 08 movzx ecx, BYTE PTR [rax] 0006e 48 ff c0 inc rax 00071 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 00078 80 f9 4d cmp cl, 77 ; 0000004dH 0007b 75 76 jne SHORT $LN21@stbi__bmp_ - -; 1186 : stbi__uint32 z = stbi__get16le(s); - +; Line 1186 0007d 48 8b cf mov rcx, rdi 00080 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - +; Line 1187 00085 48 8b cf mov rcx, rdi 00088 e8 00 00 00 00 call stbi__get16le - -; 4872 : stbi__get32le(s); // discard filesize -; 4873 : stbi__get16le(s); // discard reserved - +; Line 4873 0008d 48 8b cf mov rcx, rdi 00090 e8 00 00 00 00 call stbi__get16le - -; 4874 : stbi__get16le(s); // discard reserved - +; Line 4874 00095 48 8b cf mov rcx, rdi 00098 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - +; Line 1186 0009d 48 8b cf mov rcx, rdi 000a0 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - +; Line 1187 000a5 48 8b cf mov rcx, rdi 000a8 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - +; Line 1186 000ad 48 8b cf mov rcx, rdi 000b0 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - +; Line 1187 000b5 48 8b cf mov rcx, rdi 000b8 8b d8 mov ebx, eax 000ba e8 00 00 00 00 call stbi__get16le 000bf c1 e0 10 shl eax, 16 000c2 03 c3 add eax, ebx - -; 4875 : stbi__get32le(s); // discard data offset -; 4876 : sz = stbi__get32le(s); -; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); - +; Line 4877 000c4 83 f8 38 cmp eax, 56 ; 00000038H 000c7 77 10 ja SHORT $LN23@stbi__bmp_ 000c9 48 ba 00 10 00 @@ -39750,10 +26357,7 @@ $LN23@stbi__bmp_: 000e1 75 10 jne SHORT $LN21@stbi__bmp_ $LN5@stbi__bmp_: 000e3 b8 01 00 00 00 mov eax, 1 - -; 4878 : return r; -; 4879 : } - +; Line 4879 000e8 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 000ed 48 83 c4 20 add rsp, 32 ; 00000020H 000f1 5f pop rdi @@ -39767,52 +26371,35 @@ $LN21@stbi__bmp_: stbi__bmp_test_raw ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__bmp_test _TEXT SEGMENT s$ = 48 stbi__bmp_test PROC ; COMDAT - -; 4882 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4882 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0000a 48 8b 81 c0 00 00 00 mov rax, QWORD PTR [rcx+192] - -; 4882 : { - +; Line 4882 00011 48 8b f9 mov rdi, rcx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00014 48 3b 81 c8 00 00 00 cmp rax, QWORD PTR [rcx+200] 0001b 72 16 jb SHORT $LN38@stbi__bmp_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0001d 83 79 30 00 cmp DWORD PTR [rcx+48], 0 00021 0f 84 c3 00 00 00 je $LN26@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00027 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0002c 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] $LN38@stbi__bmp_: - -; 4870 : if (stbi__get8(s) != 'B') return 0; - +; Line 4870 00033 0f b6 08 movzx ecx, BYTE PTR [rax] 00036 48 ff c0 inc rax 00039 48 89 87 c0 00 @@ -39820,85 +26407,56 @@ $LN38@stbi__bmp_: 00040 80 f9 42 cmp cl, 66 ; 00000042H 00043 0f 85 a1 00 00 00 jne $LN26@stbi__bmp_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00049 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 00050 72 19 jb SHORT $LN39@stbi__bmp_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00052 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 00056 0f 84 8e 00 00 00 je $LN26@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0005c 48 8b cf mov rcx, rdi 0005f e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00064 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] $LN39@stbi__bmp_: - -; 4871 : if (stbi__get8(s) != 'M') return 0; - +; Line 4871 0006b 0f b6 08 movzx ecx, BYTE PTR [rax] 0006e 48 ff c0 inc rax 00071 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 00078 80 f9 4d cmp cl, 77 ; 0000004dH 0007b 75 6d jne SHORT $LN26@stbi__bmp_ - -; 1186 : stbi__uint32 z = stbi__get16le(s); - +; Line 1186 0007d 48 8b cf mov rcx, rdi 00080 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - +; Line 1187 00085 48 8b cf mov rcx, rdi 00088 e8 00 00 00 00 call stbi__get16le - -; 4873 : stbi__get16le(s); // discard reserved - +; Line 4873 0008d 48 8b cf mov rcx, rdi 00090 e8 00 00 00 00 call stbi__get16le - -; 4874 : stbi__get16le(s); // discard reserved - +; Line 4874 00095 48 8b cf mov rcx, rdi 00098 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - +; Line 1186 0009d 48 8b cf mov rcx, rdi 000a0 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - +; Line 1187 000a5 48 8b cf mov rcx, rdi 000a8 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - +; Line 1186 000ad 48 8b cf mov rcx, rdi 000b0 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - +; Line 1187 000b5 48 8b cf mov rcx, rdi 000b8 8b d8 mov ebx, eax 000ba e8 00 00 00 00 call stbi__get16le 000bf c1 e0 10 shl eax, 16 000c2 03 c3 add eax, ebx - -; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); - +; Line 4877 000c4 83 f8 38 cmp eax, 56 ; 00000038H 000c7 77 10 ja SHORT $LN27@stbi__bmp_ 000c9 48 ba 00 10 00 @@ -39912,74 +26470,46 @@ $LN27@stbi__bmp_: 000e1 75 07 jne SHORT $LN26@stbi__bmp_ $LN7@stbi__bmp_: 000e3 b8 01 00 00 00 mov eax, 1 - -; 4878 : return r; - +; Line 4878 000e8 eb 02 jmp SHORT $LN3@stbi__bmp_ $LN26@stbi__bmp_: - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 000ea 33 c0 xor eax, eax $LN3@stbi__bmp_: 000ec 48 8b 8f d0 00 00 00 mov rcx, QWORD PTR [rdi+208] - -; 4883 : int r = stbi__bmp_test_raw(s); -; 4884 : stbi__rewind(s); -; 4885 : return r; -; 4886 : } - +; Line 4886 000f3 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 000f8 48 89 8f c0 00 00 00 mov QWORD PTR [rdi+192], rcx - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 000ff 48 8b 8f d8 00 00 00 mov rcx, QWORD PTR [rdi+216] 00106 48 89 8f c8 00 00 00 mov QWORD PTR [rdi+200], rcx - -; 4883 : int r = stbi__bmp_test_raw(s); -; 4884 : stbi__rewind(s); -; 4885 : return r; -; 4886 : } - +; Line 4886 0010d 48 83 c4 20 add rsp, 32 ; 00000020H 00111 5f pop rdi 00112 c3 ret 0 stbi__bmp_test ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__high_bit _TEXT SEGMENT z$ = 8 stbi__high_bit PROC ; COMDAT - -; 4890 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4890 00000 8b c1 mov eax, ecx - -; 4891 : int n = 0; -; 4892 : if (z == 0) return -1; - +; Line 4892 00002 85 c9 test ecx, ecx 00004 75 06 jne SHORT $LN2@stbi__high 00006 b8 ff ff ff ff mov eax, -1 - -; 4899 : } - +; Line 4899 0000b c3 ret 0 $LN2@stbi__high: - -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } - +; Line 4894 0000c c1 e9 10 shr ecx, 16 0000f ba 10 00 00 00 mov edx, 16 00014 3d 00 00 01 00 cmp eax, 65536 ; 00010000H @@ -39993,19 +26523,14 @@ $LN2@stbi__high: 00030 83 c2 08 add edx, 8 00033 c1 e9 08 shr ecx, 8 $LN4@stbi__high: - -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } - +; Line 4896 00036 44 8b c1 mov r8d, ecx 00039 8d 42 04 lea eax, DWORD PTR [rdx+4] 0003c 41 c1 e8 04 shr r8d, 4 00040 83 f9 10 cmp ecx, 16 00043 0f 42 c2 cmovb eax, edx 00046 44 0f 42 c1 cmovb r8d, ecx - -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } - +; Line 4897 0004a 41 83 f8 04 cmp r8d, 4 0004e 41 8b c8 mov ecx, r8d 00051 8d 50 02 lea edx, DWORD PTR [rax+2] @@ -40013,27 +26538,21 @@ $LN4@stbi__high: 00057 c1 e9 02 shr ecx, 2 0005a 41 83 f8 04 cmp r8d, 4 0005e 41 0f 42 c8 cmovb ecx, r8d - -; 4898 : return n; - +; Line 4898 00062 83 f9 02 cmp ecx, 2 00065 8d 42 01 lea eax, DWORD PTR [rdx+1] 00068 0f 42 c2 cmovb eax, edx - -; 4899 : } - +; Line 4899 0006b c3 ret 0 stbi__high_bit ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__bitcount _TEXT SEGMENT a$ = 8 stbi__bitcount PROC ; COMDAT - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4903 00000 8b d1 mov edx, ecx 00002 81 e1 55 55 55 55 and ecx, 1431655765 ; 55555555H @@ -40041,91 +26560,57 @@ stbi__bitcount PROC ; COMDAT 0000a 81 e2 55 55 55 55 and edx, 1431655765 ; 55555555H 00010 03 d1 add edx, ecx - -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 - +; Line 4904 00012 8b c2 mov eax, edx 00014 81 e2 33 33 33 33 and edx, 858993459 ; 33333333H 0001a c1 e8 02 shr eax, 2 0001d 25 33 33 33 33 and eax, 858993459 ; 33333333H 00022 03 c2 add eax, edx - -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits - +; Line 4905 00024 8b c8 mov ecx, eax 00026 c1 e9 04 shr ecx, 4 00029 03 c8 add ecx, eax 0002b 81 e1 0f 0f 0f 0f and ecx, 252645135 ; 0f0f0f0fH - -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits - +; Line 4906 00031 8b c1 mov eax, ecx 00033 c1 e8 08 shr eax, 8 00036 03 c8 add ecx, eax - -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits - +; Line 4907 00038 8b c1 mov eax, ecx 0003a c1 e8 10 shr eax, 16 0003d 03 c1 add eax, ecx - -; 4908 : return a & 0xff; - +; Line 4908 0003f 0f b6 c0 movzx eax, al - -; 4909 : } - +; Line 4909 00042 c3 ret 0 stbi__bitcount ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__shiftsigned _TEXT SEGMENT v$ = 8 shift$ = 16 bits$ = 24 stbi__shiftsigned PROC ; COMDAT - -; 4915 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4915 00000 44 8b c9 mov r9d, ecx - -; 4916 : static unsigned int mul_table[9] = { -; 4917 : 0, -; 4918 : 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, -; 4919 : 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, -; 4920 : }; -; 4921 : static unsigned int shift_table[9] = { -; 4922 : 0, 0,0,1,0,2,4,6,0, -; 4923 : }; -; 4924 : if (shift < 0) - +; Line 4924 00003 85 d2 test edx, edx 00005 79 0a jns SHORT $LN2@stbi__shif - -; 4925 : v <<= -shift; - +; Line 4925 00007 f7 da neg edx 00009 0f b6 ca movzx ecx, dl 0000c 41 d3 e1 shl r9d, cl 0000f eb 05 jmp SHORT $LN3@stbi__shif $LN2@stbi__shif: - -; 4926 : else -; 4927 : v >>= shift; - +; Line 4927 00011 8b ca mov ecx, edx 00013 41 d3 e9 shr r9d, cl $LN3@stbi__shif: - -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; - +; Line 4931 00016 49 63 c0 movsxd rax, r8d 00019 b9 08 00 00 00 mov ecx, 8 0001e 41 2b c8 sub ecx, r8d @@ -40138,85 +26623,51 @@ $LN3@stbi__shif: 00 00 mov ecx, DWORD PTR ?shift_table@?1??stbi__shiftsigned@@9@9[rcx+rax*4] 0003b 41 d3 f9 sar r9d, cl 0003e 41 8b c1 mov eax, r9d - -; 4932 : } - +; Line 4932 00041 c3 ret 0 stbi__shiftsigned ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__bmp_set_mask_defaults _TEXT SEGMENT info$ = 8 compress$ = 16 stbi__bmp_set_mask_defaults PROC ; COMDAT - -; 4943 : // BI_BITFIELDS specifies masks explicitly, don't override -; 4944 : if (compress == 3) - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4944 00000 83 fa 03 cmp edx, 3 00003 74 20 je SHORT $LN7@stbi__bmp_ - -; 4945 : return 1; -; 4946 : -; 4947 : if (compress == 0) { - +; Line 4947 00005 85 d2 test edx, edx 00007 75 5e jne SHORT $LN3@stbi__bmp_ - -; 4948 : if (info->bpp == 16) { - +; Line 4948 00009 8b 01 mov eax, DWORD PTR [rcx] 0000b 83 f8 10 cmp eax, 16 0000e 75 1b jne SHORT $LN4@stbi__bmp_ - -; 4949 : info->mr = 31u << 10; - +; Line 4949 00010 c7 41 0c 00 7c 00 00 mov DWORD PTR [rcx+12], 31744 ; 00007c00H - -; 4950 : info->mg = 31u << 5; - +; Line 4950 00017 c7 41 10 e0 03 00 00 mov DWORD PTR [rcx+16], 992 ; 000003e0H - -; 4951 : info->mb = 31u << 0; - +; Line 4951 0001e c7 41 14 1f 00 00 00 mov DWORD PTR [rcx+20], 31 $LN7@stbi__bmp_: - -; 4963 : } -; 4964 : return 1; - +; Line 4964 00025 b8 01 00 00 00 mov eax, 1 - -; 4967 : } - +; Line 4967 0002a c3 ret 0 $LN4@stbi__bmp_: - -; 4952 : } -; 4953 : else if (info->bpp == 32) { - +; Line 4953 0002b 83 f8 20 cmp eax, 32 ; 00000020H 0002e 75 27 jne SHORT $LN6@stbi__bmp_ - -; 4954 : info->mr = 0xffu << 16; -; 4955 : info->mg = 0xffu << 8; -; 4956 : info->mb = 0xffu << 0; -; 4957 : info->ma = 0xffu << 24; -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 - +; Line 4958 00030 33 c0 xor eax, eax 00032 c7 41 0c 00 00 ff 00 mov DWORD PTR [rcx+12], 16711680 ; 00ff0000H 00039 89 41 1c mov DWORD PTR [rcx+28], eax - -; 4963 : } -; 4964 : return 1; - +; Line 4964 0003c b8 01 00 00 00 mov eax, 1 00041 c7 41 10 00 ff 00 00 mov DWORD PTR [rcx+16], 65280 ; 0000ff00H @@ -40224,253 +26675,151 @@ $LN4@stbi__bmp_: 00 00 mov DWORD PTR [rcx+20], 255 ; 000000ffH 0004f c7 41 18 00 00 00 ff mov DWORD PTR [rcx+24], -16777216 ; ff000000H - -; 4967 : } - +; Line 4967 00056 c3 ret 0 $LN6@stbi__bmp_: - -; 4959 : } -; 4960 : else { -; 4961 : // otherwise, use defaults, which is all-0 -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; - +; Line 4962 00057 33 c0 xor eax, eax 00059 48 89 41 14 mov QWORD PTR [rcx+20], rax 0005d 48 89 41 0c mov QWORD PTR [rcx+12], rax - -; 4963 : } -; 4964 : return 1; - +; Line 4964 00061 b8 01 00 00 00 mov eax, 1 - -; 4967 : } - +; Line 4967 00066 c3 ret 0 $LN3@stbi__bmp_: - -; 4965 : } -; 4966 : return 0; // error - +; Line 4966 00067 33 c0 xor eax, eax - -; 4967 : } - +; Line 4967 00069 c3 ret 0 stbi__bmp_set_mask_defaults ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__bmp_parse_header _TEXT SEGMENT -s$ = 64 -info$ = 72 +s$ = 48 +info$ = 56 stbi__bmp_parse_header PROC ; COMDAT - -; 4970 : { - - 00000 40 53 push rbx - 00002 56 push rsi - 00003 57 push rdi - 00004 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00008 48 8b 81 c0 00 +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 4970 + 00000 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx + 00005 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi + 0000a 57 push rdi + 0000b 48 83 ec 20 sub rsp, 32 ; 00000020H +; Line 1077 + 0000f 48 8b 81 c0 00 00 00 mov rax, QWORD PTR [rcx+192] - -; 4970 : { - - 0000f 48 8b f2 mov rsi, rdx - 00012 48 8b d9 mov rbx, rcx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00015 48 3b 81 c8 00 +; Line 4970 + 00016 48 8b f2 mov rsi, rdx + 00019 48 8b d9 mov rbx, rcx +; Line 1077 + 0001c 48 3b 81 c8 00 00 00 cmp rax, QWORD PTR [rcx+200] - 0001c 72 16 jb SHORT $LN179@stbi__bmp_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - - 0001e 83 79 30 00 cmp DWORD PTR [rcx+48], 0 - 00022 0f 84 38 05 00 + 00023 72 16 jb SHORT $LN112@stbi__bmp_ +; Line 1079 + 00025 83 79 30 00 cmp DWORD PTR [rcx+48], 0 + 00029 0f 84 7a 03 00 00 je $LN6@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 00028 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 0002d 48 8b 83 c0 00 +; Line 1080 + 0002f e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00034 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] -$LN179@stbi__bmp_: - -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); - - 00034 0f b6 08 movzx ecx, BYTE PTR [rax] - 00037 48 ff c0 inc rax - 0003a 48 89 83 c0 00 +$LN112@stbi__bmp_: +; Line 4972 + 0003b 0f b6 08 movzx ecx, BYTE PTR [rax] + 0003e 48 ff c0 inc rax + 00041 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00041 80 f9 42 cmp cl, 66 ; 00000042H - 00044 0f 85 16 05 00 + 00048 80 f9 42 cmp cl, 66 ; 00000042H + 0004b 0f 85 58 03 00 00 jne $LN6@stbi__bmp_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 0004a 48 3b 83 c8 00 +; Line 1077 + 00051 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 00051 72 19 jb SHORT $LN180@stbi__bmp_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - - 00053 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 - 00057 0f 84 03 05 00 + 00058 72 19 jb SHORT $LN113@stbi__bmp_ +; Line 1079 + 0005a 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 + 0005e 0f 84 45 03 00 00 je $LN6@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 0005d 48 8b cb mov rcx, rbx - 00060 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00065 48 8b 83 c0 00 +; Line 1080 + 00064 48 8b cb mov rcx, rbx + 00067 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 0006c 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] -$LN180@stbi__bmp_: - -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); - - 0006c 0f b6 08 movzx ecx, BYTE PTR [rax] - 0006f 48 ff c0 inc rax - 00072 48 89 83 c0 00 +$LN113@stbi__bmp_: +; Line 4972 + 00073 0f b6 08 movzx ecx, BYTE PTR [rax] + 00076 48 ff c0 inc rax + 00079 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00079 80 f9 4d cmp cl, 77 ; 0000004dH - 0007c 0f 85 de 04 00 + 00080 80 f9 4d cmp cl, 77 ; 0000004dH + 00083 0f 85 20 03 00 00 jne $LN6@stbi__bmp_ - 00082 48 89 6c 24 40 mov QWORD PTR [rsp+64], rbp - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 00087 48 8b cb mov rcx, rbx - -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); - - 0008a 4c 89 7c 24 50 mov QWORD PTR [rsp+80], r15 - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 0008f e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00094 48 8b cb mov rcx, rbx - 00097 e8 00 00 00 00 call stbi__get16le - -; 4973 : stbi__get32le(s); // discard filesize -; 4974 : stbi__get16le(s); // discard reserved - - 0009c 48 8b cb mov rcx, rbx - 0009f e8 00 00 00 00 call stbi__get16le - -; 4975 : stbi__get16le(s); // discard reserved - - 000a4 48 8b cb mov rcx, rbx - 000a7 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 000ac 48 8b cb mov rcx, rbx - 000af e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 000b4 48 8b cb mov rcx, rbx - 000b7 8b f8 mov edi, eax - 000b9 e8 00 00 00 00 call stbi__get16le - 000be c1 e0 10 shl eax, 16 - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 000c1 48 8b cb mov rcx, rbx - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 000c4 03 c7 add eax, edi - -; 4976 : info->offset = stbi__get32le(s); - - 000c6 89 46 04 mov DWORD PTR [rsi+4], eax - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 000c9 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 000ce 48 8b cb mov rcx, rbx - 000d1 8b f8 mov edi, eax - 000d3 e8 00 00 00 00 call stbi__get16le - -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; - - 000d8 45 33 ff xor r15d, r15d - -; 4979 : info->extra_read = 14; - - 000db c7 46 20 0e 00 +; Line 1186 + 00089 48 8b cb mov rcx, rbx +; Line 4972 + 0008c 48 89 6c 24 30 mov QWORD PTR [rsp+48], rbp +; Line 1186 + 00091 e8 00 00 00 00 call stbi__get16le +; Line 1187 + 00096 48 8b cb mov rcx, rbx + 00099 e8 00 00 00 00 call stbi__get16le +; Line 4974 + 0009e 48 8b cb mov rcx, rbx + 000a1 e8 00 00 00 00 call stbi__get16le +; Line 4975 + 000a6 48 8b cb mov rcx, rbx + 000a9 e8 00 00 00 00 call stbi__get16le +; Line 1186 + 000ae 48 8b cb mov rcx, rbx + 000b1 e8 00 00 00 00 call stbi__get16le +; Line 1187 + 000b6 48 8b cb mov rcx, rbx + 000b9 8b f8 mov edi, eax + 000bb e8 00 00 00 00 call stbi__get16le + 000c0 c1 e0 10 shl eax, 16 +; Line 1186 + 000c3 48 8b cb mov rcx, rbx +; Line 1187 + 000c6 03 c7 add eax, edi +; Line 4976 + 000c8 89 46 04 mov DWORD PTR [rsi+4], eax +; Line 1186 + 000cb e8 00 00 00 00 call stbi__get16le +; Line 1187 + 000d0 48 8b cb mov rcx, rbx + 000d3 8b f8 mov edi, eax + 000d5 e8 00 00 00 00 call stbi__get16le + 000da 8b e8 mov ebp, eax +; Line 4979 + 000dc c7 46 20 0e 00 00 00 mov DWORD PTR [rsi+32], 14 - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 000e2 8b e8 mov ebp, eax - -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; - - 000e4 4c 89 7e 14 mov QWORD PTR [rsi+20], r15 - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 000e8 c1 e5 10 shl ebp, 16 - 000eb 03 ef add ebp, edi - -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; - - 000ed 4c 89 7e 0c mov QWORD PTR [rsi+12], r15 - 000f1 89 6e 08 mov DWORD PTR [rsi+8], ebp - -; 4980 : -; 4981 : if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); - - 000f4 44 39 7e 04 cmp DWORD PTR [rsi+4], r15d - 000f8 0f 8c 97 00 00 - 00 jl $LN182@stbi__bmp_ - -; 4982 : -; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); - + 000e3 33 c0 xor eax, eax +; Line 1187 + 000e5 c1 e5 10 shl ebp, 16 + 000e8 03 ef add ebp, edi +; Line 4978 + 000ea 48 89 46 14 mov QWORD PTR [rsi+20], rax + 000ee 89 6e 08 mov DWORD PTR [rsi+8], ebp + 000f1 48 89 46 0c mov QWORD PTR [rsi+12], rax +; Line 4981 + 000f5 39 46 04 cmp DWORD PTR [rsi+4], eax + 000f8 0f 8c 63 02 00 + 00 jl $LN25@stbi__bmp_ +; Line 4983 000fe 83 fd 38 cmp ebp, 56 ; 00000038H - 00101 77 10 ja SHORT $LN137@stbi__bmp_ + 00101 77 10 ja SHORT $LN77@stbi__bmp_ 00103 48 b9 00 10 00 00 00 01 00 01 mov rcx, 72058693549559808 ; 0100010000001000H 0010d 48 0f a3 e9 bt rcx, rbp - 00111 72 34 jb SHORT $LN8@stbi__bmp_ -$LN137@stbi__bmp_: + 00111 72 44 jb SHORT $LN8@stbi__bmp_ +$LN77@stbi__bmp_: 00113 83 fd 6c cmp ebp, 108 ; 0000006cH - 00116 74 2f je SHORT $LN8@stbi__bmp_ + 00116 74 3f je SHORT $LN8@stbi__bmp_ 00118 83 fd 7c cmp ebp, 124 ; 0000007cH - 0011b 74 2a je SHORT $LN8@stbi__bmp_ - -; 431 : stbi__g_failure_reason = str; - + 0011b 74 3a je SHORT $LN8@stbi__bmp_ +; Line 431 0011d 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00123 65 48 8b 04 25 @@ -40479,894 +26828,330 @@ $LN137@stbi__bmp_: 00131 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00135 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0M@KHBIBJBG@unknown?5BMP@ +$LN114@stbi__bmp_: 0013c 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 4982 : -; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); - +; Line 5023 00140 33 c0 xor eax, eax - 00142 e9 e6 00 00 00 jmp $LN177@stbi__bmp_ +$LN111@stbi__bmp_: + 00142 48 8b 6c 24 30 mov rbp, QWORD PTR [rsp+48] +; Line 5053 + 00147 48 8b 5c 24 38 mov rbx, QWORD PTR [rsp+56] + 0014c 48 8b 74 24 40 mov rsi, QWORD PTR [rsp+64] + 00151 48 83 c4 20 add rsp, 32 ; 00000020H + 00155 5f pop rdi + 00156 c3 ret 0 $LN8@stbi__bmp_: - -; 4984 : if (hsz == 12) { - - 00147 48 8b cb mov rcx, rbx - 0014a e8 00 00 00 00 call stbi__get16le - 0014f 48 8b cb mov rcx, rbx - 00152 83 fd 0c cmp ebp, 12 - 00155 75 09 jne SHORT $LN9@stbi__bmp_ - -; 4985 : s->img_x = stbi__get16le(s); - - 00157 89 03 mov DWORD PTR [rbx], eax - -; 4986 : s->img_y = stbi__get16le(s); - - 00159 e8 00 00 00 00 call stbi__get16le - -; 4987 : } - - 0015e eb 25 jmp SHORT $LN10@stbi__bmp_ +; Line 4984 + 00157 48 8b cb mov rcx, rbx + 0015a e8 00 00 00 00 call stbi__get16le + 0015f 48 8b cb mov rcx, rbx + 00162 83 fd 0c cmp ebp, 12 + 00165 75 09 jne SHORT $LN9@stbi__bmp_ +; Line 4985 + 00167 89 03 mov DWORD PTR [rbx], eax +; Line 4986 + 00169 e8 00 00 00 00 call stbi__get16le +; Line 4987 + 0016e eb 25 jmp SHORT $LN10@stbi__bmp_ $LN9@stbi__bmp_: - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 00160 8b f8 mov edi, eax - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00162 e8 00 00 00 00 call stbi__get16le - 00167 c1 e0 10 shl eax, 16 - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 0016a 48 8b cb mov rcx, rbx - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 0016d 03 c7 add eax, edi - -; 4988 : else { -; 4989 : s->img_x = stbi__get32le(s); - - 0016f 89 03 mov DWORD PTR [rbx], eax - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 00171 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00176 48 8b cb mov rcx, rbx - 00179 8b f8 mov edi, eax - 0017b e8 00 00 00 00 call stbi__get16le - 00180 c1 e0 10 shl eax, 16 - 00183 03 c7 add eax, edi -$LN10@stbi__bmp_: - -; 4990 : s->img_y = stbi__get32le(s); -; 4991 : } -; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); - - 00185 48 8b cb mov rcx, rbx - 00188 89 43 04 mov DWORD PTR [rbx+4], eax +; Line 1186 + 00170 8b f8 mov edi, eax +; Line 1187 + 00172 e8 00 00 00 00 call stbi__get16le + 00177 c1 e0 10 shl eax, 16 +; Line 1186 + 0017a 48 8b cb mov rcx, rbx +; Line 1187 + 0017d 03 c7 add eax, edi +; Line 4989 + 0017f 89 03 mov DWORD PTR [rbx], eax +; Line 1186 + 00181 e8 00 00 00 00 call stbi__get16le +; Line 1187 + 00186 48 8b cb mov rcx, rbx + 00189 8b f8 mov edi, eax 0018b e8 00 00 00 00 call stbi__get16le - 00190 83 f8 01 cmp eax, 1 - 00193 74 27 je SHORT $LN11@stbi__bmp_ -$LN182@stbi__bmp_: - -; 431 : stbi__g_failure_reason = str; - - 00195 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 0019b 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 001a4 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 001a9 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 001ad 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_07IEJCHBDI@bad?5BMP@ - 001b4 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 4990 : s->img_y = stbi__get32le(s); -; 4991 : } -; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); - - 001b8 33 c0 xor eax, eax - 001ba eb 71 jmp SHORT $LN177@stbi__bmp_ -$LN11@stbi__bmp_: - -; 4993 : info->bpp = stbi__get16le(s); - - 001bc 48 8b cb mov rcx, rbx - 001bf 4c 89 74 24 48 mov QWORD PTR [rsp+72], r14 - 001c4 e8 00 00 00 00 call stbi__get16le - 001c9 89 06 mov DWORD PTR [rsi], eax - -; 4994 : if (hsz != 12) { - - 001cb 83 fd 0c cmp ebp, 12 - 001ce 0f 84 1b 02 00 + 00190 c1 e0 10 shl eax, 16 + 00193 03 c7 add eax, edi +$LN10@stbi__bmp_: +; Line 4992 + 00195 48 8b cb mov rcx, rbx + 00198 89 43 04 mov DWORD PTR [rbx+4], eax + 0019b e8 00 00 00 00 call stbi__get16le + 001a0 83 f8 01 cmp eax, 1 + 001a3 0f 85 b8 01 00 + 00 jne $LN25@stbi__bmp_ +; Line 4993 + 001a9 48 8b cb mov rcx, rbx + 001ac e8 00 00 00 00 call stbi__get16le + 001b1 89 06 mov DWORD PTR [rsi], eax +; Line 4994 + 001b3 83 fd 0c cmp ebp, 12 + 001b6 0f 84 1f 01 00 00 je $LN30@stbi__bmp_ - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 001d4 48 8b cb mov rcx, rbx - 001d7 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 001dc 48 8b cb mov rcx, rbx - 001df 8b f8 mov edi, eax - 001e1 e8 00 00 00 00 call stbi__get16le - 001e6 44 8b f0 mov r14d, eax - 001e9 41 c1 e6 10 shl r14d, 16 - 001ed 44 03 f7 add r14d, edi - -; 4995 : int compress = stbi__get32le(s); -; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); - - 001f0 41 8d 4e ff lea ecx, DWORD PTR [r14-1] - 001f4 83 f9 01 cmp ecx, 1 - 001f7 0f 86 3f 03 00 +; Line 4995 + 001bc 48 8b cb mov rcx, rbx + 001bf e8 00 00 00 00 call stbi__get32le + 001c4 8b f8 mov edi, eax +; Line 4996 + 001c6 8d 48 ff lea ecx, DWORD PTR [rax-1] + 001c9 83 f9 01 cmp ecx, 1 + 001cc 0f 86 b3 01 00 00 jbe $LN14@stbi__bmp_ - -; 4997 : if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes - - 001fd 41 83 fe 04 cmp r14d, 4 - 00201 7c 3c jl SHORT $LN15@stbi__bmp_ - -; 431 : stbi__g_failure_reason = str; - - 00203 8b 15 00 00 00 +; Line 4997 + 001d2 83 f8 04 cmp eax, 4 + 001d5 7c 24 jl SHORT $LN15@stbi__bmp_ +; Line 431 + 001d7 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00209 65 48 8b 04 25 + 001dd 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00212 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00217 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 0021b 48 8d 15 00 00 + 001e6 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 001eb 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 001ef 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0N@ODCBCBFN@BMP?5JPEG?1PNG@ -$LN181@stbi__bmp_: - 00222 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 5022 : // ?!?!? -; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); - - 00226 33 c0 xor eax, eax -$LN178@stbi__bmp_: - 00228 4c 8b 74 24 48 mov r14, QWORD PTR [rsp+72] -$LN177@stbi__bmp_: - 0022d 48 8b 6c 24 40 mov rbp, QWORD PTR [rsp+64] - 00232 4c 8b 7c 24 50 mov r15, QWORD PTR [rsp+80] - -; 5053 : } - - 00237 48 83 c4 20 add rsp, 32 ; 00000020H - 0023b 5f pop rdi - 0023c 5e pop rsi - 0023d 5b pop rbx - 0023e c3 ret 0 +; Line 4997 + 001f6 e9 41 ff ff ff jmp $LN114@stbi__bmp_ $LN15@stbi__bmp_: - -; 4998 : if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel - - 0023f 41 83 fe 03 cmp r14d, 3 - 00243 75 10 jne SHORT $LN16@stbi__bmp_ - 00245 8b 06 mov eax, DWORD PTR [rsi] - 00247 83 e8 10 sub eax, 16 - 0024a a9 ef ff ff ff test eax, -17 ; ffffffefH - 0024f 0f 85 c3 02 00 +; Line 4998 + 001fb 83 ff 03 cmp edi, 3 + 001fe 75 10 jne SHORT $LN16@stbi__bmp_ + 00200 8b 06 mov eax, DWORD PTR [rsi] + 00202 83 e8 10 sub eax, 16 + 00205 a9 ef ff ff ff test eax, -17 ; ffffffefH + 0020a 0f 85 51 01 00 00 jne $LN25@stbi__bmp_ $LN16@stbi__bmp_: - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 00255 48 8b cb mov rcx, rbx - 00258 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 0025d 48 8b cb mov rcx, rbx - 00260 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 00265 48 8b cb mov rcx, rbx - 00268 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 0026d 48 8b cb mov rcx, rbx - 00270 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 00275 48 8b cb mov rcx, rbx - 00278 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 0027d 48 8b cb mov rcx, rbx - 00280 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 00285 48 8b cb mov rcx, rbx - 00288 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 0028d 48 8b cb mov rcx, rbx - 00290 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 00295 48 8b cb mov rcx, rbx - 00298 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 0029d 48 8b cb mov rcx, rbx - 002a0 e8 00 00 00 00 call stbi__get16le - -; 4999 : stbi__get32le(s); // discard sizeof -; 5000 : stbi__get32le(s); // discard hres -; 5001 : stbi__get32le(s); // discard vres -; 5002 : stbi__get32le(s); // discard colorsused -; 5003 : stbi__get32le(s); // discard max important -; 5004 : if (hsz == 40 || hsz == 56) { - - 002a5 83 fd 28 cmp ebp, 40 ; 00000028H - 002a8 0f 84 8b 01 00 +; Line 4999 + 00210 48 8b cb mov rcx, rbx + 00213 e8 00 00 00 00 call stbi__get32le +; Line 5000 + 00218 48 8b cb mov rcx, rbx + 0021b e8 00 00 00 00 call stbi__get32le +; Line 5001 + 00220 48 8b cb mov rcx, rbx + 00223 e8 00 00 00 00 call stbi__get32le +; Line 5002 + 00228 48 8b cb mov rcx, rbx + 0022b e8 00 00 00 00 call stbi__get32le +; Line 5003 + 00230 48 8b cb mov rcx, rbx + 00233 e8 00 00 00 00 call stbi__get32le +; Line 5004 + 00238 83 fd 28 cmp ebp, 40 ; 00000028H + 0023b 0f 84 c4 00 00 00 je $LN20@stbi__bmp_ - 002ae 83 fd 38 cmp ebp, 56 ; 00000038H - 002b1 0f 84 42 01 00 - 00 je $LN136@stbi__bmp_ - -; 5024 : } -; 5025 : } -; 5026 : else -; 5027 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5028 : } -; 5029 : } -; 5030 : else { -; 5031 : // V4/V5 header -; 5032 : int i; -; 5033 : if (hsz != 108 && hsz != 124) - - 002b7 8d 45 94 lea eax, DWORD PTR [rbp-108] - 002ba a9 ef ff ff ff test eax, -17 ; ffffffefH - 002bf 0f 85 53 02 00 + 00241 83 fd 38 cmp ebp, 56 ; 00000038H + 00244 0f 84 9b 00 00 + 00 je $LN76@stbi__bmp_ +; Line 5033 + 0024a 8d 45 94 lea eax, DWORD PTR [rbp-108] + 0024d a9 ef ff ff ff test eax, -17 ; ffffffefH + 00252 0f 85 09 01 00 00 jne $LN25@stbi__bmp_ - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 002c5 48 8b cb mov rcx, rbx - 002c8 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 002cd 48 8b cb mov rcx, rbx - 002d0 8b f8 mov edi, eax - 002d2 e8 00 00 00 00 call stbi__get16le - 002d7 c1 e0 10 shl eax, 16 - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 002da 48 8b cb mov rcx, rbx - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 002dd 03 c7 add eax, edi - -; 5034 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5035 : info->mr = stbi__get32le(s); - - 002df 89 46 0c mov DWORD PTR [rsi+12], eax - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 002e2 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 002e7 48 8b cb mov rcx, rbx - 002ea 8b f8 mov edi, eax - 002ec e8 00 00 00 00 call stbi__get16le - 002f1 c1 e0 10 shl eax, 16 - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 002f4 48 8b cb mov rcx, rbx - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 002f7 03 c7 add eax, edi - -; 5036 : info->mg = stbi__get32le(s); - - 002f9 89 46 10 mov DWORD PTR [rsi+16], eax - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 002fc e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00301 48 8b cb mov rcx, rbx - 00304 8b f8 mov edi, eax - 00306 e8 00 00 00 00 call stbi__get16le - 0030b c1 e0 10 shl eax, 16 - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 0030e 48 8b cb mov rcx, rbx - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00311 03 c7 add eax, edi - -; 5037 : info->mb = stbi__get32le(s); - - 00313 89 46 14 mov DWORD PTR [rsi+20], eax - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 00316 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 0031b 48 8b cb mov rcx, rbx - 0031e 8b f8 mov edi, eax - 00320 e8 00 00 00 00 call stbi__get16le - 00325 c1 e0 10 shl eax, 16 - 00328 03 c7 add eax, edi - -; 5038 : info->ma = stbi__get32le(s); - - 0032a 89 46 18 mov DWORD PTR [rsi+24], eax - -; 5039 : if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs - - 0032d 45 85 f6 test r14d, r14d - 00330 75 4d jne SHORT $LN126@stbi__bmp_ - -; 4948 : if (info->bpp == 16) { - - 00332 8b 06 mov eax, DWORD PTR [rsi] - 00334 83 f8 10 cmp eax, 16 - 00337 75 17 jne SHORT $LN123@stbi__bmp_ - -; 4949 : info->mr = 31u << 10; - - 00339 c7 46 0c 00 7c - 00 00 mov DWORD PTR [rsi+12], 31744 ; 00007c00H - -; 4950 : info->mg = 31u << 5; - - 00340 c7 46 10 e0 03 - 00 00 mov DWORD PTR [rsi+16], 992 ; 000003e0H - -; 4951 : info->mb = 31u << 0; - - 00347 c7 46 14 1f 00 - 00 00 mov DWORD PTR [rsi+20], 31 - -; 4952 : } - - 0034e eb 2f jmp SHORT $LN126@stbi__bmp_ -$LN123@stbi__bmp_: - -; 4953 : else if (info->bpp == 32) { - - 00350 83 f8 20 cmp eax, 32 ; 00000020H - 00353 75 22 jne SHORT $LN125@stbi__bmp_ - -; 4954 : info->mr = 0xffu << 16; - - 00355 c7 46 0c 00 00 - ff 00 mov DWORD PTR [rsi+12], 16711680 ; 00ff0000H - -; 4955 : info->mg = 0xffu << 8; - - 0035c c7 46 10 00 ff - 00 00 mov DWORD PTR [rsi+16], 65280 ; 0000ff00H - -; 4956 : info->mb = 0xffu << 0; - - 00363 c7 46 14 ff 00 - 00 00 mov DWORD PTR [rsi+20], 255 ; 000000ffH - -; 4957 : info->ma = 0xffu << 24; - - 0036a c7 46 18 00 00 - 00 ff mov DWORD PTR [rsi+24], -16777216 ; ff000000H - -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 - - 00371 44 89 7e 1c mov DWORD PTR [rsi+28], r15d - -; 4959 : } - - 00375 eb 08 jmp SHORT $LN126@stbi__bmp_ -$LN125@stbi__bmp_: - -; 4960 : else { -; 4961 : // otherwise, use defaults, which is all-0 -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; - - 00377 4c 89 7e 14 mov QWORD PTR [rsi+20], r15 - 0037b 4c 89 7e 0c mov QWORD PTR [rsi+12], r15 -$LN126@stbi__bmp_: - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 0037f 48 8b cb mov rcx, rbx - 00382 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00387 48 8b cb mov rcx, rbx - 0038a e8 00 00 00 00 call stbi__get16le - 0038f bf 0c 00 00 00 mov edi, 12 +; Line 5035 + 00258 48 8b cb mov rcx, rbx + 0025b e8 00 00 00 00 call stbi__get32le +; Line 5036 + 00260 48 8b cb mov rcx, rbx + 00263 89 46 0c mov DWORD PTR [rsi+12], eax + 00266 e8 00 00 00 00 call stbi__get32le +; Line 5037 + 0026b 48 8b cb mov rcx, rbx + 0026e 89 46 10 mov DWORD PTR [rsi+16], eax + 00271 e8 00 00 00 00 call stbi__get32le +; Line 5038 + 00276 48 8b cb mov rcx, rbx + 00279 89 46 14 mov DWORD PTR [rsi+20], eax + 0027c e8 00 00 00 00 call stbi__get32le + 00281 89 46 18 mov DWORD PTR [rsi+24], eax +; Line 5039 + 00284 83 ff 03 cmp edi, 3 + 00287 74 0a je SHORT $LN29@stbi__bmp_ +; Line 5040 + 00289 8b d7 mov edx, edi + 0028b 48 8b ce mov rcx, rsi + 0028e e8 00 00 00 00 call stbi__bmp_set_mask_defaults +$LN29@stbi__bmp_: +; Line 5041 + 00293 48 8b cb mov rcx, rbx + 00296 e8 00 00 00 00 call stbi__get32le + 0029b bf 0c 00 00 00 mov edi, 12 $LL4@stbi__bmp_: - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 00394 48 8b cb mov rcx, rbx - 00397 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 0039c 48 8b cb mov rcx, rbx - 0039f e8 00 00 00 00 call stbi__get16le - -; 5040 : stbi__bmp_set_mask_defaults(info, compress); -; 5041 : stbi__get32le(s); // discard color space -; 5042 : for (i = 0; i < 12; ++i) - - 003a4 48 83 ef 01 sub rdi, 1 - 003a8 75 ea jne SHORT $LL4@stbi__bmp_ - -; 5043 : stbi__get32le(s); // discard color space parameters -; 5044 : if (hsz == 124) { - - 003aa 83 fd 7c cmp ebp, 124 ; 0000007cH - 003ad 75 40 jne SHORT $LN30@stbi__bmp_ - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 003af 48 8b cb mov rcx, rbx - 003b2 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 003b7 48 8b cb mov rcx, rbx - 003ba e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 003bf 48 8b cb mov rcx, rbx - 003c2 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 003c7 48 8b cb mov rcx, rbx - 003ca e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 003cf 48 8b cb mov rcx, rbx - 003d2 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 003d7 48 8b cb mov rcx, rbx - 003da e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 003df 48 8b cb mov rcx, rbx - 003e2 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 003e7 48 8b cb mov rcx, rbx - 003ea e8 00 00 00 00 call stbi__get16le +; Line 1186 + 002a0 48 8b cb mov rcx, rbx + 002a3 e8 00 00 00 00 call stbi__get16le +; Line 1187 + 002a8 48 8b cb mov rcx, rbx + 002ab e8 00 00 00 00 call stbi__get16le +; Line 5042 + 002b0 48 83 ef 01 sub rdi, 1 + 002b4 75 ea jne SHORT $LL4@stbi__bmp_ +; Line 5044 + 002b6 83 fd 7c cmp ebp, 124 ; 0000007cH + 002b9 75 20 jne SHORT $LN30@stbi__bmp_ +; Line 5045 + 002bb 48 8b cb mov rcx, rbx + 002be e8 00 00 00 00 call stbi__get32le +; Line 5046 + 002c3 48 8b cb mov rcx, rbx + 002c6 e8 00 00 00 00 call stbi__get32le +; Line 5047 + 002cb 48 8b cb mov rcx, rbx + 002ce e8 00 00 00 00 call stbi__get32le +; Line 5048 + 002d3 48 8b cb mov rcx, rbx + 002d6 e8 00 00 00 00 call stbi__get32le $LN30@stbi__bmp_: - -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; - - 003ef b8 01 00 00 00 mov eax, 1 - 003f4 e9 2f fe ff ff jmp $LN178@stbi__bmp_ -$LN136@stbi__bmp_: - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 003f9 48 8b cb mov rcx, rbx - 003fc e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00401 48 8b cb mov rcx, rbx - 00404 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 00409 48 8b cb mov rcx, rbx - 0040c e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00411 48 8b cb mov rcx, rbx - 00414 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 00419 48 8b cb mov rcx, rbx - 0041c e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00421 48 8b cb mov rcx, rbx - 00424 e8 00 00 00 00 call stbi__get16le - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 00429 48 8b cb mov rcx, rbx - 0042c e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00431 48 8b cb mov rcx, rbx - 00434 e8 00 00 00 00 call stbi__get16le +; Line 5052 + 002db b8 01 00 00 00 mov eax, 1 + 002e0 e9 5d fe ff ff jmp $LN111@stbi__bmp_ +$LN76@stbi__bmp_: +; Line 5006 + 002e5 48 8b cb mov rcx, rbx + 002e8 e8 00 00 00 00 call stbi__get32le +; Line 5007 + 002ed 48 8b cb mov rcx, rbx + 002f0 e8 00 00 00 00 call stbi__get32le +; Line 5008 + 002f5 48 8b cb mov rcx, rbx + 002f8 e8 00 00 00 00 call stbi__get32le +; Line 5009 + 002fd 48 8b cb mov rcx, rbx + 00300 e8 00 00 00 00 call stbi__get32le $LN20@stbi__bmp_: - -; 5005 : if (hsz == 56) { -; 5006 : stbi__get32le(s); -; 5007 : stbi__get32le(s); -; 5008 : stbi__get32le(s); -; 5009 : stbi__get32le(s); -; 5010 : } -; 5011 : if (info->bpp == 16 || info->bpp == 32) { - - 00439 8b 0e mov ecx, DWORD PTR [rsi] - 0043b 8d 41 f0 lea eax, DWORD PTR [rcx-16] - 0043e a9 ef ff ff ff test eax, -17 ; ffffffefH - 00443 75 aa jne SHORT $LN30@stbi__bmp_ - -; 5012 : if (compress == 0) { - - 00445 45 85 f6 test r14d, r14d - 00448 75 61 jne SHORT $LN23@stbi__bmp_ - -; 4948 : if (info->bpp == 16) { - - 0044a 83 f9 10 cmp ecx, 16 - 0044d 75 1d jne SHORT $LN95@stbi__bmp_ - -; 4949 : info->mr = 31u << 10; - - 0044f c7 46 0c 00 7c - 00 00 mov DWORD PTR [rsi+12], 31744 ; 00007c00H - -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; - - 00456 8d 41 f1 lea eax, QWORD PTR [rcx-15] - -; 4950 : info->mg = 31u << 5; - - 00459 c7 46 10 e0 03 - 00 00 mov DWORD PTR [rsi+16], 992 ; 000003e0H - -; 4951 : info->mb = 31u << 0; - - 00460 c7 46 14 1f 00 - 00 00 mov DWORD PTR [rsi+20], 31 - -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; - - 00467 e9 bc fd ff ff jmp $LN178@stbi__bmp_ -$LN95@stbi__bmp_: - -; 4953 : else if (info->bpp == 32) { - - 0046c 83 f9 20 cmp ecx, 32 ; 00000020H - 0046f 75 28 jne SHORT $LN97@stbi__bmp_ - -; 4954 : info->mr = 0xffu << 16; - - 00471 c7 46 0c 00 00 - ff 00 mov DWORD PTR [rsi+12], 16711680 ; 00ff0000H - -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; - - 00478 8d 41 e1 lea eax, QWORD PTR [rcx-31] - -; 4955 : info->mg = 0xffu << 8; - - 0047b c7 46 10 00 ff - 00 00 mov DWORD PTR [rsi+16], 65280 ; 0000ff00H - -; 4956 : info->mb = 0xffu << 0; - - 00482 c7 46 14 ff 00 - 00 00 mov DWORD PTR [rsi+20], 255 ; 000000ffH - -; 4957 : info->ma = 0xffu << 24; - - 00489 c7 46 18 00 00 - 00 ff mov DWORD PTR [rsi+24], -16777216 ; ff000000H - -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 - - 00490 44 89 7e 1c mov DWORD PTR [rsi+28], r15d - -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; - - 00494 e9 8f fd ff ff jmp $LN178@stbi__bmp_ -$LN97@stbi__bmp_: - -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; - - 00499 4c 89 7e 14 mov QWORD PTR [rsi+20], r15 - -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; - - 0049d b8 01 00 00 00 mov eax, 1 - -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; - - 004a2 4c 89 7e 0c mov QWORD PTR [rsi+12], r15 - -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; - - 004a6 e9 7d fd ff ff jmp $LN178@stbi__bmp_ +; Line 5011 + 00305 8b 06 mov eax, DWORD PTR [rsi] + 00307 83 e8 10 sub eax, 16 + 0030a a9 ef ff ff ff test eax, -17 ; ffffffefH + 0030f 75 ca jne SHORT $LN30@stbi__bmp_ +; Line 5012 + 00311 85 ff test edi, edi + 00313 75 12 jne SHORT $LN23@stbi__bmp_ +; Line 5013 + 00315 33 d2 xor edx, edx + 00317 48 8b ce mov rcx, rsi + 0031a e8 00 00 00 00 call stbi__bmp_set_mask_defaults +; Line 5052 + 0031f 8d 47 01 lea eax, QWORD PTR [rdi+1] + 00322 e9 1b fe ff ff jmp $LN111@stbi__bmp_ $LN23@stbi__bmp_: - -; 5013 : stbi__bmp_set_mask_defaults(info, compress); -; 5014 : } -; 5015 : else if (compress == 3) { - - 004ab 41 83 fe 03 cmp r14d, 3 - 004af 75 67 jne SHORT $LN25@stbi__bmp_ - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 004b1 48 8b cb mov rcx, rbx - 004b4 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 004b9 48 8b cb mov rcx, rbx - 004bc 8b f8 mov edi, eax - 004be e8 00 00 00 00 call stbi__get16le - 004c3 c1 e0 10 shl eax, 16 - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 004c6 48 8b cb mov rcx, rbx - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 004c9 03 c7 add eax, edi - -; 5016 : info->mr = stbi__get32le(s); - - 004cb 89 46 0c mov DWORD PTR [rsi+12], eax - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 004ce e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 004d3 48 8b cb mov rcx, rbx - 004d6 8b f8 mov edi, eax - 004d8 e8 00 00 00 00 call stbi__get16le - 004dd c1 e0 10 shl eax, 16 - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 004e0 48 8b cb mov rcx, rbx - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 004e3 03 c7 add eax, edi - -; 5017 : info->mg = stbi__get32le(s); - - 004e5 89 46 10 mov DWORD PTR [rsi+16], eax - -; 1186 : stbi__uint32 z = stbi__get16le(s); - - 004e8 e8 00 00 00 00 call stbi__get16le - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 004ed 48 8b cb mov rcx, rbx - 004f0 8b f8 mov edi, eax - 004f2 e8 00 00 00 00 call stbi__get16le - -; 5018 : info->mb = stbi__get32le(s); -; 5019 : info->extra_read += 12; - - 004f7 83 46 20 0c add DWORD PTR [rsi+32], 12 - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 004fb c1 e0 10 shl eax, 16 - 004fe 8d 0c 38 lea ecx, DWORD PTR [rax+rdi] - -; 5020 : // not documented, but generated by photoshop and handled by mspaint -; 5021 : if (info->mr == info->mg && info->mg == info->mb) { - - 00501 8b 46 10 mov eax, DWORD PTR [rsi+16] - 00504 89 4e 14 mov DWORD PTR [rsi+20], ecx - 00507 39 46 0c cmp DWORD PTR [rsi+12], eax - 0050a 0f 85 df fe ff - ff jne $LN30@stbi__bmp_ - 00510 3b c1 cmp eax, ecx - 00512 0f 85 d7 fe ff +; Line 5015 + 00327 83 ff 03 cmp edi, 3 + 0032a 75 35 jne SHORT $LN25@stbi__bmp_ +; Line 5016 + 0032c 48 8b cb mov rcx, rbx + 0032f e8 00 00 00 00 call stbi__get32le +; Line 5017 + 00334 48 8b cb mov rcx, rbx + 00337 89 46 0c mov DWORD PTR [rsi+12], eax + 0033a e8 00 00 00 00 call stbi__get32le +; Line 5018 + 0033f 48 8b cb mov rcx, rbx + 00342 89 46 10 mov DWORD PTR [rsi+16], eax + 00345 e8 00 00 00 00 call stbi__get32le +; Line 5019 + 0034a 83 46 20 0c add DWORD PTR [rsi+32], 12 +; Line 5021 + 0034e 8b 4e 10 mov ecx, DWORD PTR [rsi+16] + 00351 89 46 14 mov DWORD PTR [rsi+20], eax + 00354 39 4e 0c cmp DWORD PTR [rsi+12], ecx + 00357 75 82 jne SHORT $LN30@stbi__bmp_ + 00359 3b c8 cmp ecx, eax + 0035b 0f 85 7a ff ff ff jne $LN30@stbi__bmp_ $LN25@stbi__bmp_: - -; 431 : stbi__g_failure_reason = str; - - 00518 8b 15 00 00 00 +; Line 431 + 00361 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 0051e 65 48 8b 04 25 + 00367 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00527 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 0052c 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00530 48 8d 15 00 00 + 00370 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00375 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00379 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_07IEJCHBDI@bad?5BMP@ - -; 5022 : // ?!?!? -; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); - - 00537 e9 e6 fc ff ff jmp $LN181@stbi__bmp_ +; Line 5023 + 00380 e9 b7 fd ff ff jmp $LN114@stbi__bmp_ $LN14@stbi__bmp_: - -; 431 : stbi__g_failure_reason = str; - - 0053c 8b 15 00 00 00 +; Line 431 + 00385 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00542 65 48 8b 04 25 + 0038b 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 0054b b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00550 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00554 48 8d 15 00 00 + 00394 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00399 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 0039d 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_07IMHMNOIB@BMP?5RLE@ - -; 4995 : int compress = stbi__get32le(s); -; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); - - 0055b e9 c2 fc ff ff jmp $LN181@stbi__bmp_ +; Line 4996 + 003a4 e9 93 fd ff ff jmp $LN114@stbi__bmp_ $LN6@stbi__bmp_: - -; 431 : stbi__g_failure_reason = str; - - 00560 8b 15 00 00 00 +; Line 431 + 003a9 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00566 65 48 8b 04 25 + 003af 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 0056f b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00574 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00578 48 8d 15 00 00 +; Line 5053 + 003b8 48 8b 5c 24 38 mov rbx, QWORD PTR [rsp+56] + 003bd 48 8b 74 24 40 mov rsi, QWORD PTR [rsp+64] +; Line 431 + 003c2 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 003c7 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 003cb 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_07IANEBNLB@not?5BMP@ - 0057f 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); - - 00583 33 c0 xor eax, eax - -; 5053 : } - - 00585 48 83 c4 20 add rsp, 32 ; 00000020H - 00589 5f pop rdi - 0058a 5e pop rsi - 0058b 5b pop rbx - 0058c c3 ret 0 + 003d2 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 4972 + 003d6 33 c0 xor eax, eax +; Line 5053 + 003d8 48 83 c4 20 add rsp, 32 ; 00000020H + 003dc 5f pop rdi + 003dd c3 ret 0 stbi__bmp_parse_header ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__bmp_load _TEXT SEGMENT -ashift$1$ = 48 -pad$1$ = 48 -info$2$ = 48 -pad$2$ = 52 -info$5$ = 52 -all_a$1$ = 56 -n$1$ = 60 -bshift$1$ = 60 -info$3$ = 64 -gshift$1$ = 68 -mr$1$ = 72 -mg$1$ = 76 +j$3$ = 48 +info$4$ = 48 +bshift$1$ = 52 +info$2$ = 52 +tv3254 = 56 +ma$1$ = 56 +info$3$ = 60 +mr$1$ = 64 +rshift$1$ = 68 +mg$1$ = 72 +gshift$1$ = 76 mb$1$ = 80 -$T22 = 88 -rshift$1$ = 96 -ma$1$ = 100 -tv4035 = 108 -tv4034 = 112 -tv4033 = 116 -tv4032 = 120 -tv4030 = 124 -tv4029 = 128 -tv4028 = 132 -tv4027 = 136 -tv4126 = 140 +ashift$1$ = 84 +tv3255 = 88 +info$5$ = 88 +tv3256 = 92 +$T1 = 96 +tv3355 = 104 +tv3245 = 104 +tv3253 = 112 +tv3252 = 116 +tv3251 = 120 +tv3250 = 124 +tv3249 = 128 +pad$2$ = 132 +tv3334 = 136 out$1$ = 144 -tv4023 = 152 -info$ = 160 -tv4026 = 200 -tv4025 = 208 -tv4024 = 216 +info$ = 152 +tv3248 = 192 +tv3247 = 200 +tv3246 = 208 pal$ = 224 s$ = 1312 x$ = 1320 y$ = 1328 comp$ = 1336 req_comp$ = 1344 -j$3$ = 1352 -target$4$ = 1352 +all_a$1$ = 1352 ri$dead$ = 1352 stbi__bmp_load PROC ; COMDAT - -; 5056 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 5056 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 4c 89 4c 24 20 mov QWORD PTR [rsp+32], r9 0000a 4c 89 44 24 18 mov QWORD PTR [rsp+24], r8 @@ -41380,3082 +27165,1787 @@ stbi__bmp_load PROC ; COMDAT 0001d 41 57 push r15 0001f 48 81 ec e0 04 00 00 sub rsp, 1248 ; 000004e0H - -; 5057 : stbi_uc* out; -; 5058 : unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a; -; 5059 : stbi_uc pal[256][4]; -; 5060 : int psize = 0, i, j, width; - - 00026 45 33 ff xor r15d, r15d - -; 5061 : int flip_vertically, pad, target; -; 5062 : stbi__bmp_data info; -; 5063 : STBI_NOTUSED(ri); -; 5064 : -; 5065 : info.all_a = 255; - - 00029 c7 84 24 bc 00 +; Line 5066 + 00026 48 8d 94 24 98 + 00 00 00 lea rdx, QWORD PTR info$[rsp] + 0002e c7 84 24 b4 00 00 00 ff 00 00 00 mov DWORD PTR info$[rsp+28], 255 ; 000000ffH - -; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) - - 00034 48 8d 94 24 a0 - 00 00 00 lea rdx, QWORD PTR info$[rsp] - 0003c 45 8b e7 mov r12d, r15d - 0003f 48 8b d9 mov rbx, rcx - 00042 e8 00 00 00 00 call stbi__bmp_parse_header - 00047 48 85 c0 test rax, rax - 0004a 0f 84 99 12 00 - 00 je $LN373@stbi__bmp_ - -; 5067 : return NULL; // error code already set -; 5068 : -; 5069 : flip_vertically = ((int)s->img_y) > 0; - - 00050 8b 4b 04 mov ecx, DWORD PTR [rbx+4] - -; 5070 : s->img_y = abs((int)s->img_y); - - 00053 8b c1 mov eax, ecx - 00055 f7 d8 neg eax - 00057 89 8c 24 8c 00 - 00 00 mov DWORD PTR tv4126[rsp], ecx - 0005e 0f 48 c1 cmovs eax, ecx - 00061 89 43 04 mov DWORD PTR [rbx+4], eax - -; 5071 : -; 5072 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - - 00064 3d 00 00 00 01 cmp eax, 16777216 ; 01000000H - 00069 76 1f jbe SHORT $LN36@stbi__bmp_ -$LN527@stbi__bmp_: - -; 5262 : } - - 0006b 8b 15 00 00 00 + 00039 48 8b d9 mov rbx, rcx + 0003c 45 33 e4 xor r12d, r12d + 0003f e8 00 00 00 00 call stbi__bmp_parse_header + 00044 48 85 c0 test rax, rax + 00047 0f 84 d8 0f 00 + 00 je $LN321@stbi__bmp_ +; Line 5069 + 0004d 8b 4b 04 mov ecx, DWORD PTR [rbx+4] +; Line 5070 + 00050 8b c1 mov eax, ecx + 00052 f7 d8 neg eax + 00054 89 8c 24 88 00 + 00 00 mov DWORD PTR tv3334[rsp], ecx + 0005b 0f 48 c1 cmovs eax, ecx + 0005e 89 43 04 mov DWORD PTR [rbx+4], eax +; Line 5072 + 00061 3d 00 00 00 01 cmp eax, 16777216 ; 01000000H + 00066 76 1f jbe SHORT $LN36@stbi__bmp_ +$LN450@stbi__bmp_: +; Line 5262 + 00068 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00071 65 48 8b 04 25 + 0006e 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 0007a 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 0007e 48 8d 15 00 00 + 00077 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 0007b 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 00085 e9 56 12 00 00 jmp $LN528@stbi__bmp_ + 00082 e9 95 0f 00 00 jmp $LN451@stbi__bmp_ $LN36@stbi__bmp_: - -; 5073 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - - 0008a 81 3b 00 00 00 +; Line 5073 + 00087 81 3b 00 00 00 01 cmp DWORD PTR [rbx], 16777216 ; 01000000H - 00090 77 d9 ja SHORT $LN527@stbi__bmp_ - -; 5074 : -; 5075 : mr = info.mr; - - 00092 8b 84 24 ac 00 + 0008d 77 d9 ja SHORT $LN450@stbi__bmp_ +; Line 5075 + 0008f 8b 84 24 a4 00 00 00 mov eax, DWORD PTR info$[rsp+12] - -; 5076 : mg = info.mg; -; 5077 : mb = info.mb; -; 5078 : ma = info.ma; -; 5079 : all_a = info.all_a; -; 5080 : -; 5081 : if (info.hsz == 12) { - - 00099 8b ac 24 a8 00 - 00 00 mov ebp, DWORD PTR info$[rsp+8] - 000a0 8b b4 24 b8 00 +; Line 5081 + 00096 44 8b b4 24 a0 + 00 00 00 mov r14d, DWORD PTR info$[rsp+8] + 0009e 8b b4 24 b0 00 00 00 mov esi, DWORD PTR info$[rsp+24] - 000a7 44 8b b4 24 a4 - 00 00 00 mov r14d, DWORD PTR info$[rsp+4] - 000af 8b bc 24 a0 00 + 000a5 44 8b ac 24 9c + 00 00 00 mov r13d, DWORD PTR info$[rsp+4] + 000ad 8b bc 24 98 00 00 00 mov edi, DWORD PTR info$[rsp] - 000b6 89 44 24 48 mov DWORD PTR mr$1$[rsp], eax - 000ba 8b 84 24 b0 00 + 000b4 89 44 24 40 mov DWORD PTR mr$1$[rsp], eax + 000b8 8b 84 24 a8 00 00 00 mov eax, DWORD PTR info$[rsp+16] - 000c1 89 44 24 4c mov DWORD PTR mg$1$[rsp], eax - 000c5 8b 84 24 b4 00 + 000bf 89 44 24 48 mov DWORD PTR mg$1$[rsp], eax + 000c3 8b 84 24 ac 00 00 00 mov eax, DWORD PTR info$[rsp+20] - 000cc 89 44 24 50 mov DWORD PTR mb$1$[rsp], eax - 000d0 8b 84 24 bc 00 + 000ca 89 44 24 50 mov DWORD PTR mb$1$[rsp], eax + 000ce 8b 84 24 b4 00 00 00 mov eax, DWORD PTR info$[rsp+28] - 000d7 89 44 24 38 mov DWORD PTR all_a$1$[rsp], eax - 000db 8b 84 24 c0 00 + 000d5 89 84 24 48 05 + 00 00 mov DWORD PTR all_a$1$[rsp], eax + 000dc 8b 84 24 b8 00 00 00 mov eax, DWORD PTR info$[rsp+32] - 000e2 89 44 24 34 mov DWORD PTR info$5$[rsp], eax - 000e6 89 74 24 64 mov DWORD PTR ma$1$[rsp], esi - 000ea 44 89 74 24 3c mov DWORD PTR n$1$[rsp], r14d - 000ef 89 6c 24 30 mov DWORD PTR info$2$[rsp], ebp - 000f3 89 7c 24 40 mov DWORD PTR info$3$[rsp], edi - 000f7 83 fd 0c cmp ebp, 12 - 000fa 75 20 jne SHORT $LN38@stbi__bmp_ - -; 5082 : if (info.bpp < 24) - - 000fc 83 ff 18 cmp edi, 24 - 000ff 7d 36 jge SHORT $LN354@stbi__bmp_ - -; 5083 : psize = (info.offset - info.extra_read - 24) / 3; - - 00101 41 8b ce mov ecx, r14d - 00104 2b c8 sub ecx, eax - 00106 b8 56 55 55 55 mov eax, 1431655766 ; 55555556H - 0010b 83 e9 18 sub ecx, 24 - 0010e f7 e9 imul ecx - 00110 44 8b e2 mov r12d, edx - 00113 41 c1 ec 1f shr r12d, 31 - 00117 44 03 e2 add r12d, edx - -; 5084 : } - - 0011a eb 12 jmp SHORT $LN41@stbi__bmp_ + 000e3 89 44 24 58 mov DWORD PTR info$5$[rsp], eax + 000e7 89 74 24 38 mov DWORD PTR ma$1$[rsp], esi + 000eb 44 89 6c 24 30 mov DWORD PTR info$4$[rsp], r13d + 000f0 44 89 74 24 34 mov DWORD PTR info$2$[rsp], r14d + 000f5 89 7c 24 3c mov DWORD PTR info$3$[rsp], edi + 000f9 41 83 fe 0c cmp r14d, 12 + 000fd 75 20 jne SHORT $LN38@stbi__bmp_ +; Line 5082 + 000ff 83 ff 18 cmp edi, 24 + 00102 7d 32 jge SHORT $LN304@stbi__bmp_ +; Line 5083 + 00104 41 8b cd mov ecx, r13d + 00107 2b c8 sub ecx, eax + 00109 b8 56 55 55 55 mov eax, 1431655766 ; 55555556H + 0010e 83 e9 18 sub ecx, 24 + 00111 f7 e9 imul ecx + 00113 44 8b e2 mov r12d, edx + 00116 41 c1 ec 1f shr r12d, 31 + 0011a 44 03 e2 add r12d, edx +; Line 5084 + 0011d eb 12 jmp SHORT $LN41@stbi__bmp_ $LN38@stbi__bmp_: - -; 5085 : else { -; 5086 : if (info.bpp < 16) - - 0011c 83 ff 10 cmp edi, 16 - 0011f 7d 16 jge SHORT $LN354@stbi__bmp_ - -; 5087 : psize = (info.offset - info.extra_read - info.hsz) >> 2; - - 00121 45 8b e6 mov r12d, r14d - 00124 44 2b e0 sub r12d, eax - 00127 44 2b e5 sub r12d, ebp - 0012a 41 c1 fc 02 sar r12d, 2 +; Line 5086 + 0011f 83 ff 10 cmp edi, 16 + 00122 7d 12 jge SHORT $LN304@stbi__bmp_ +; Line 5087 + 00124 45 8b e5 mov r12d, r13d + 00127 44 2b e0 sub r12d, eax + 0012a 45 2b e6 sub r12d, r14d + 0012d 41 c1 fc 02 sar r12d, 2 $LN41@stbi__bmp_: - -; 5088 : } -; 5089 : if (psize == 0) { - - 0012e 45 85 e4 test r12d, r12d - 00131 0f 85 8c 00 00 - 00 jne $LN254@stbi__bmp_ -$LN354@stbi__bmp_: - -; 5090 : // accept some number of extra bytes after the header, but if the offset points either to before -; 5091 : // the header ends or implies a large amount of extra data, reject the file as malformed -; 5092 : int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); - - 00137 8b 93 b8 00 00 - 00 mov edx, DWORD PTR [rbx+184] - 0013d 2b 93 d0 00 00 - 00 sub edx, DWORD PTR [rbx+208] - 00143 44 8b 83 c0 00 - 00 00 mov r8d, DWORD PTR [rbx+192] - 0014a 41 03 d0 add edx, r8d - -; 5093 : int header_limit = 1024; // max we actually read is below 256 bytes currently. -; 5094 : int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. -; 5095 : if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { - - 0014d 8d 42 ff lea eax, DWORD PTR [rdx-1] - 00150 3d ff 03 00 00 cmp eax, 1023 ; 000003ffH - 00155 0f 87 6b 11 00 +; Line 5089 + 00131 45 85 e4 test r12d, r12d + 00134 75 42 jne SHORT $LN46@stbi__bmp_ +$LN304@stbi__bmp_: +; Line 5092 + 00136 8b 8b c0 00 00 + 00 mov ecx, DWORD PTR [rbx+192] + 0013c 2b 8b d0 00 00 + 00 sub ecx, DWORD PTR [rbx+208] + 00142 03 8b b8 00 00 + 00 add ecx, DWORD PTR [rbx+184] +; Line 5095 + 00148 8d 41 ff lea eax, DWORD PTR [rcx-1] + 0014b 3d ff 03 00 00 cmp eax, 1023 ; 000003ffH + 00150 0f 87 ac 0e 00 00 ja $LN44@stbi__bmp_ - -; 5096 : return stbi__errpuc("bad header", "Corrupt BMP"); -; 5097 : } -; 5098 : // we established that bytes_read_so_far is positive and sensible. -; 5099 : // the first half of this test rejects offsets that are either too small positives, or -; 5100 : // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn -; 5101 : // ensures the number computed in the second half of the test can't overflow. -; 5102 : if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { - - 0015b 44 3b f2 cmp r14d, edx - 0015e 0f 8c 46 11 00 +; Line 5102 + 00156 44 3b e9 cmp r13d, ecx + 00159 0f 8c 87 0e 00 00 jl $LN47@stbi__bmp_ - 00164 41 8b ce mov ecx, r14d - 00167 2b ca sub ecx, edx - 00169 81 f9 00 04 00 - 00 cmp ecx, 1024 ; 00000400H - 0016f 0f 8f 35 11 00 + 0015f 41 8b d5 mov edx, r13d + 00162 2b d1 sub edx, ecx + 00164 81 fa 00 04 00 + 00 cmp edx, 1024 ; 00000400H + 0016a 0f 8f 76 0e 00 00 jg $LN47@stbi__bmp_ - -; 1107 : if (n == 0) return; // already there! - - 00175 85 c9 test ecx, ecx - 00177 74 4a je SHORT $LN254@stbi__bmp_ - -; 1108 : if (n < 0) { - - 00179 79 10 jns SHORT $LN256@stbi__bmp_ - -; 1109 : s->img_buffer = s->img_buffer_end; - - 0017b 48 8b 83 c8 00 - 00 00 mov rax, QWORD PTR [rbx+200] - 00182 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - -; 1110 : return; - - 00189 eb 38 jmp SHORT $LN254@stbi__bmp_ -$LN256@stbi__bmp_: - -; 1111 : } -; 1112 : if (s->io.read) { - - 0018b 4c 39 7b 10 cmp QWORD PTR [rbx+16], r15 - 0018f 74 28 je SHORT $LN258@stbi__bmp_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - - 00191 8b 93 c8 00 00 - 00 mov edx, DWORD PTR [rbx+200] - 00197 41 2b d0 sub edx, r8d - -; 1114 : if (blen < n) { - - 0019a 3b d1 cmp edx, ecx - 0019c 7d 1b jge SHORT $LN258@stbi__bmp_ - -; 1115 : s->img_buffer = s->img_buffer_end; - - 0019e 48 8b 83 c8 00 - 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - - 001a5 2b ca sub ecx, edx - 001a7 8b d1 mov edx, ecx - 001a9 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 001b0 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] - 001b4 ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - - 001b7 eb 0a jmp SHORT $LN254@stbi__bmp_ -$LN258@stbi__bmp_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - - 001b9 48 63 c1 movsxd rax, ecx - 001bc 48 01 83 c0 00 - 00 00 add QWORD PTR [rbx+192], rax -$LN254@stbi__bmp_: - -; 5104 : } -; 5105 : else { -; 5106 : stbi__skip(s, info.offset - bytes_read_so_far); -; 5107 : } -; 5108 : } -; 5109 : -; 5110 : if (info.bpp == 24 && ma == 0xff000000) - - 001c3 83 ff 18 cmp edi, 24 - 001c6 75 0e jne SHORT $LN48@stbi__bmp_ - 001c8 81 fe 00 00 00 +; Line 5106 + 00170 48 8b cb mov rcx, rbx + 00173 e8 00 00 00 00 call stbi__skip +$LN46@stbi__bmp_: +; Line 5110 + 00178 83 ff 18 cmp edi, 24 + 0017b 75 0e jne SHORT $LN48@stbi__bmp_ + 0017d 81 fe 00 00 00 ff cmp esi, -16777216 ; ff000000H - 001ce 75 06 jne SHORT $LN48@stbi__bmp_ - -; 5111 : s->img_n = 3; - - 001d0 44 8d 6f eb lea r13d, QWORD PTR [rdi-21] - 001d4 eb 0d jmp SHORT $LN523@stbi__bmp_ + 00183 75 06 jne SHORT $LN48@stbi__bmp_ +; Line 5111 + 00185 44 8d 7f eb lea r15d, QWORD PTR [rdi-21] + 00189 eb 0d jmp SHORT $LN49@stbi__bmp_ $LN48@stbi__bmp_: - -; 5112 : else -; 5113 : s->img_n = ma ? 4 : 3; - - 001d6 85 f6 test esi, esi - 001d8 45 8b ef mov r13d, r15d - 001db 41 0f 95 c5 setne r13b - 001df 41 83 c5 03 add r13d, 3 -$LN523@stbi__bmp_: - -; 5114 : if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 - - 001e3 8b 84 24 40 05 +; Line 5113 + 0018b 45 33 ff xor r15d, r15d + 0018e 85 f6 test esi, esi + 00190 41 0f 95 c7 setne r15b + 00194 41 83 c7 03 add r15d, 3 +$LN49@stbi__bmp_: +; Line 5114 + 00198 8b 84 24 40 05 00 00 mov eax, DWORD PTR req_comp$[rsp] - 001ea 44 89 6b 08 mov DWORD PTR [rbx+8], r13d - 001ee 44 8b 4b 04 mov r9d, DWORD PTR [rbx+4] - 001f2 45 8b d1 mov r10d, r9d - 001f5 8b 0b mov ecx, DWORD PTR [rbx] - 001f7 44 8b c1 mov r8d, ecx - 001fa 44 89 ac 24 48 - 05 00 00 mov DWORD PTR target$4$[rsp], r13d - 00202 83 f8 03 cmp eax, 3 - 00205 7c 0a jl SHORT $LN369@stbi__bmp_ - -; 5115 : target = req_comp; - - 00207 44 8b e8 mov r13d, eax - 0020a 89 84 24 48 05 - 00 00 mov DWORD PTR target$4$[rsp], eax -$LN369@stbi__bmp_: - -; 467 : if (a < 0 || b < 0) return 0; - - 00211 45 85 c0 test r8d, r8d - 00214 0f 88 51 fe ff - ff js $LN527@stbi__bmp_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 0021a 74 12 je SHORT $LN368@stbi__bmp_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 0021c b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00221 99 cdq - 00222 41 f7 f8 idiv r8d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00225 44 3b e8 cmp r13d, eax - 00228 0f 8f 3d fe ff - ff jg $LN527@stbi__bmp_ -$LN368@stbi__bmp_: - 0022e 45 0f af c5 imul r8d, r13d - -; 467 : if (a < 0 || b < 0) return 0; - - 00232 45 85 c0 test r8d, r8d - 00235 0f 88 30 fe ff - ff js $LN527@stbi__bmp_ - 0023b 45 85 d2 test r10d, r10d - 0023e 0f 88 27 fe ff - ff js $LN527@stbi__bmp_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 00244 74 12 je SHORT $LN52@stbi__bmp_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 00246 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 0024b 99 cdq - 0024c 41 f7 fa idiv r10d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 0024f 44 3b c0 cmp r8d, eax - 00252 0f 8f 13 fe ff - ff jg $LN527@stbi__bmp_ + 0019f 44 89 7b 08 mov DWORD PTR [rbx+8], r15d + 001a3 44 8b 4b 04 mov r9d, DWORD PTR [rbx+4] + 001a7 45 8b d1 mov r10d, r9d + 001aa 8b 0b mov ecx, DWORD PTR [rbx] + 001ac 44 8b c1 mov r8d, ecx + 001af 83 f8 03 cmp eax, 3 + 001b2 7c 03 jl SHORT $LN317@stbi__bmp_ +; Line 5115 + 001b4 44 8b f8 mov r15d, eax +$LN317@stbi__bmp_: +; Line 467 + 001b7 45 85 c0 test r8d, r8d + 001ba 0f 88 a8 fe ff + ff js $LN450@stbi__bmp_ +; Line 468 + 001c0 74 12 je SHORT $LN316@stbi__bmp_ +; Line 470 + 001c2 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 001c7 99 cdq + 001c8 41 f7 f8 idiv r8d +; Line 484 + 001cb 44 3b f8 cmp r15d, eax + 001ce 0f 8f 94 fe ff + ff jg $LN450@stbi__bmp_ +$LN316@stbi__bmp_: + 001d4 45 0f af c7 imul r8d, r15d +; Line 467 + 001d8 45 85 c0 test r8d, r8d + 001db 0f 88 87 fe ff + ff js $LN450@stbi__bmp_ + 001e1 45 85 d2 test r10d, r10d + 001e4 0f 88 7e fe ff + ff js $LN450@stbi__bmp_ +; Line 468 + 001ea 74 12 je SHORT $LN52@stbi__bmp_ +; Line 470 + 001ec b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 001f1 99 cdq + 001f2 41 f7 fa idiv r10d +; Line 484 + 001f5 44 3b c0 cmp r8d, eax + 001f8 0f 8f 6a fe ff + ff jg $LN450@stbi__bmp_ $LN52@stbi__bmp_: - -; 467 : if (a < 0 || b < 0) return 0; - - 00258 45 85 ed test r13d, r13d - 0025b 0f 88 2d 10 00 - 00 js $LN355@stbi__bmp_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 00261 85 c9 test ecx, ecx - 00263 75 09 jne SHORT $LN186@stbi__bmp_ - 00265 44 8b c1 mov r8d, ecx - 00268 45 0f af c5 imul r8d, r13d - 0026c eb 18 jmp SHORT $LN375@stbi__bmp_ +; Line 467 + 001fe 45 85 ff test r15d, r15d + 00201 0f 88 c3 0d 00 + 00 js $LN305@stbi__bmp_ +; Line 468 + 00207 85 c9 test ecx, ecx + 00209 75 09 jne SHORT $LN186@stbi__bmp_ + 0020b 44 8b c1 mov r8d, ecx + 0020e 45 0f af c7 imul r8d, r15d + 00212 eb 18 jmp SHORT $LN323@stbi__bmp_ $LN186@stbi__bmp_: - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 0026e b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00273 99 cdq - 00274 f7 f9 idiv ecx - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00276 44 3b e8 cmp r13d, eax - 00279 0f 8f 0f 10 00 - 00 jg $LN355@stbi__bmp_ - 0027f 45 8b c5 mov r8d, r13d - 00282 44 0f af c1 imul r8d, ecx -$LN375@stbi__bmp_: - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 00286 45 85 c9 test r9d, r9d - 00289 74 12 je SHORT $LN364@stbi__bmp_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 0028b b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00290 99 cdq - 00291 41 f7 f9 idiv r9d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00294 44 3b c0 cmp r8d, eax - 00297 0f 8f f1 0f 00 - 00 jg $LN355@stbi__bmp_ -$LN364@stbi__bmp_: - 0029d 41 0f af c9 imul ecx, r9d - -; 509 : return stbi__malloc(a * b * c + add); - - 002a1 41 0f af cd imul ecx, r13d - 002a5 48 63 c9 movsxd rcx, ecx - -; 438 : return STBI_MALLOC(size); - - 002a8 ff 15 00 00 00 +; Line 470 + 00214 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 00219 99 cdq + 0021a f7 f9 idiv ecx +; Line 484 + 0021c 44 3b f8 cmp r15d, eax + 0021f 0f 8f a5 0d 00 + 00 jg $LN305@stbi__bmp_ + 00225 45 8b c7 mov r8d, r15d + 00228 44 0f af c1 imul r8d, ecx +$LN323@stbi__bmp_: +; Line 468 + 0022c 45 85 c9 test r9d, r9d + 0022f 74 12 je SHORT $LN312@stbi__bmp_ +; Line 470 + 00231 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 00236 99 cdq + 00237 41 f7 f9 idiv r9d +; Line 484 + 0023a 44 3b c0 cmp r8d, eax + 0023d 0f 8f 87 0d 00 + 00 jg $LN305@stbi__bmp_ +$LN312@stbi__bmp_: + 00243 41 0f af c9 imul ecx, r9d +; Line 509 + 00247 41 8b c7 mov eax, r15d + 0024a 0f af c1 imul eax, ecx + 0024d 48 63 c8 movsxd rcx, eax +; Line 438 + 00250 ff 15 00 00 00 00 call QWORD PTR __imp_malloc - 002ae 48 89 84 24 90 + 00256 48 89 84 24 90 00 00 00 mov QWORD PTR out$1$[rsp], rax - 002b6 48 8b f0 mov rsi, rax - -; 5116 : else -; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert -; 5118 : -; 5119 : // sanity-check size -; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) -; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); -; 5122 : -; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); -; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); - - 002b9 48 85 c0 test rax, rax - 002bc 0f 84 cc 0f 00 - 00 je $LN355@stbi__bmp_ - -; 5125 : if (info.bpp < 16) { - - 002c2 83 ff 10 cmp edi, 16 - 002c5 0f 8d ee 05 00 + 0025e 48 8b f0 mov rsi, rax +; Line 5124 + 00261 48 85 c0 test rax, rax + 00264 0f 84 60 0d 00 + 00 je $LN305@stbi__bmp_ +; Line 5125 + 0026a 83 ff 10 cmp edi, 16 + 0026d 0f 8d 72 05 00 00 jge $LN54@stbi__bmp_ - -; 5126 : int z = 0; - - 002cb 33 d2 xor edx, edx - 002cd 8b fa mov edi, edx - -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } - - 002cf 45 85 e4 test r12d, r12d - 002d2 0f 84 b9 05 00 +; Line 5126 + 00273 33 ff xor edi, edi +; Line 5127 + 00275 45 85 e4 test r12d, r12d + 00278 0f 84 3f 05 00 00 je $LN57@stbi__bmp_ - 002d8 41 81 fc 00 01 + 0027e 41 81 fc 00 01 00 00 cmp r12d, 256 ; 00000100H - 002df 0f 8f ac 05 00 + 00285 0f 8f 32 05 00 00 jg $LN57@stbi__bmp_ - -; 5128 : for (i = 0; i < psize; ++i) { - - 002e5 44 89 ac 24 48 - 05 00 00 mov DWORD PTR target$4$[rsp], r13d - 002ed 45 85 e4 test r12d, r12d - 002f0 0f 8e 5b 01 00 - 00 jle $LN341@stbi__bmp_ - -; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) - - 002f6 44 8b 74 24 30 mov r14d, DWORD PTR info$2$[rsp] - 002fb 48 8d 6b 30 lea rbp, QWORD PTR [rbx+48] - 002ff 49 63 f4 movsxd rsi, r12d - 00302 0f 1f 40 00 66 - 66 0f 1f 84 00 - 00 00 00 00 npad 14 +; Line 5128 + 0028b 45 85 e4 test r12d, r12d + 0028e 0f 8e 59 01 00 + 00 jle $LN306@stbi__bmp_ +; Line 5066 + 00294 44 8b 6c 24 34 mov r13d, DWORD PTR info$2$[rsp] + 00299 48 8d 6b 30 lea rbp, QWORD PTR [rbx+48] + 0029d 45 33 f6 xor r14d, r14d + 002a0 49 63 f4 movsxd rsi, r12d + 002a3 0f 1f 40 00 66 + 0f 1f 84 00 00 + 00 00 00 npad 13 $LL4@stbi__bmp_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00310 48 8b 83 c0 00 +; Line 1077 + 002b0 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00317 48 3b 83 c8 00 + 002b7 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 0031e 73 0f jae SHORT $LN239@stbi__bmp_ - -; 1078 : return *s->img_buffer++; - - 00320 0f b6 08 movzx ecx, BYTE PTR [rax] - 00323 48 ff c0 inc rax - 00326 48 89 83 c0 00 + 002be 73 0f jae SHORT $LN233@stbi__bmp_ +; Line 1078 + 002c0 0f b6 08 movzx ecx, BYTE PTR [rax] + 002c3 48 ff c0 inc rax + 002c6 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 0032d eb 29 jmp SHORT $LN238@stbi__bmp_ -$LN239@stbi__bmp_: - -; 1079 : if (s->read_from_callbacks) { - - 0032f 39 7b 30 cmp DWORD PTR [rbx+48], edi - 00332 48 8d 6b 30 lea rbp, QWORD PTR [rbx+48] - 00336 74 1e je SHORT $LN240@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 00338 48 8b cb mov rcx, rbx - 0033b e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00340 48 8b 83 c0 00 + 002cd eb 29 jmp SHORT $LN232@stbi__bmp_ +$LN233@stbi__bmp_: +; Line 1079 + 002cf 39 7b 30 cmp DWORD PTR [rbx+48], edi + 002d2 48 8d 6b 30 lea rbp, QWORD PTR [rbx+48] + 002d6 74 1e je SHORT $LN234@stbi__bmp_ +; Line 1080 + 002d8 48 8b cb mov rcx, rbx + 002db e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 002e0 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00347 0f b6 08 movzx ecx, BYTE PTR [rax] - 0034a 48 ff c0 inc rax - 0034d 48 89 83 c0 00 + 002e7 0f b6 08 movzx ecx, BYTE PTR [rax] + 002ea 48 ff c0 inc rax + 002ed 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00354 eb 02 jmp SHORT $LN238@stbi__bmp_ -$LN240@stbi__bmp_: - -; 1082 : } -; 1083 : return 0; - - 00356 32 c9 xor cl, cl -$LN238@stbi__bmp_: - -; 5129 : pal[i][2] = stbi__get8(s); - - 00358 4c 8b ed mov r13, rbp - 0035b 42 88 8c bc e2 - 00 00 00 mov BYTE PTR pal$[rsp+r15*4+2], cl - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00363 48 3b 83 c8 00 - 00 00 cmp rax, QWORD PTR [rbx+200] - 0036a 73 0f jae SHORT $LN235@stbi__bmp_ - -; 1078 : return *s->img_buffer++; - - 0036c 0f b6 08 movzx ecx, BYTE PTR [rax] - 0036f 48 ff c0 inc rax - 00372 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 00379 eb 25 jmp SHORT $LN234@stbi__bmp_ -$LN235@stbi__bmp_: - -; 1079 : if (s->read_from_callbacks) { - - 0037b 39 7d 00 cmp DWORD PTR [rbp], edi - 0037e 74 1e je SHORT $LN236@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 00380 48 8b cb mov rcx, rbx - 00383 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00388 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] - 0038f 0f b6 08 movzx ecx, BYTE PTR [rax] - 00392 48 ff c0 inc rax - 00395 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 0039c eb 02 jmp SHORT $LN234@stbi__bmp_ -$LN236@stbi__bmp_: - -; 1082 : } -; 1083 : return 0; - - 0039e 32 c9 xor cl, cl + 002f4 eb 02 jmp SHORT $LN232@stbi__bmp_ $LN234@stbi__bmp_: - -; 5130 : pal[i][1] = stbi__get8(s); - - 003a0 42 88 8c bc e1 - 00 00 00 mov BYTE PTR pal$[rsp+r15*4+1], cl - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 003a8 48 3b 83 c8 00 - 00 00 cmp rax, QWORD PTR [rbx+200] - 003af 73 13 jae SHORT $LN231@stbi__bmp_ - -; 1078 : return *s->img_buffer++; - - 003b1 0f b6 08 movzx ecx, BYTE PTR [rax] - 003b4 48 8d 6b 30 lea rbp, QWORD PTR [rbx+48] - 003b8 48 ff c0 inc rax - 003bb 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 003c2 eb 25 jmp SHORT $LN230@stbi__bmp_ -$LN231@stbi__bmp_: - -; 1079 : if (s->read_from_callbacks) { - - 003c4 39 7d 00 cmp DWORD PTR [rbp], edi - 003c7 74 1e je SHORT $LN232@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 003c9 48 8b cb mov rcx, rbx - 003cc e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 003d1 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] - 003d8 0f b6 08 movzx ecx, BYTE PTR [rax] - 003db 48 ff c0 inc rax - 003de 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 003e5 eb 02 jmp SHORT $LN230@stbi__bmp_ +; Line 1083 + 002f6 32 c9 xor cl, cl $LN232@stbi__bmp_: - -; 1082 : } -; 1083 : return 0; - - 003e7 32 c9 xor cl, cl +; Line 5129 + 002f8 48 89 6c 24 68 mov QWORD PTR tv3355[rsp], rbp + 002fd 42 88 8c b4 e2 + 00 00 00 mov BYTE PTR pal$[rsp+r14*4+2], cl +; Line 1077 + 00305 48 3b 83 c8 00 + 00 00 cmp rax, QWORD PTR [rbx+200] + 0030c 73 0f jae SHORT $LN229@stbi__bmp_ +; Line 1078 + 0030e 0f b6 08 movzx ecx, BYTE PTR [rax] + 00311 48 ff c0 inc rax + 00314 48 89 83 c0 00 + 00 00 mov QWORD PTR [rbx+192], rax + 0031b eb 25 jmp SHORT $LN228@stbi__bmp_ +$LN229@stbi__bmp_: +; Line 1079 + 0031d 39 7d 00 cmp DWORD PTR [rbp], edi + 00320 74 1e je SHORT $LN230@stbi__bmp_ +; Line 1080 + 00322 48 8b cb mov rcx, rbx + 00325 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 0032a 48 8b 83 c0 00 + 00 00 mov rax, QWORD PTR [rbx+192] + 00331 0f b6 08 movzx ecx, BYTE PTR [rax] + 00334 48 ff c0 inc rax + 00337 48 89 83 c0 00 + 00 00 mov QWORD PTR [rbx+192], rax + 0033e eb 02 jmp SHORT $LN228@stbi__bmp_ $LN230@stbi__bmp_: - -; 5131 : pal[i][0] = stbi__get8(s); - - 003e9 42 88 8c bc e0 - 00 00 00 mov BYTE PTR pal$[rsp+r15*4], cl - -; 5132 : if (info.hsz != 12) stbi__get8(s); - - 003f1 41 83 fe 0c cmp r14d, 12 - 003f5 74 2a je SHORT $LN252@stbi__bmp_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 003f7 48 3b 83 c8 00 +; Line 1083 + 00340 32 c9 xor cl, cl +$LN228@stbi__bmp_: +; Line 5130 + 00342 42 88 8c b4 e1 + 00 00 00 mov BYTE PTR pal$[rsp+r14*4+1], cl +; Line 1077 + 0034a 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 003fe 73 0c jae SHORT $LN251@stbi__bmp_ - -; 1078 : return *s->img_buffer++; - - 00400 48 ff c0 inc rax - 00403 48 89 83 c0 00 + 00351 73 13 jae SHORT $LN225@stbi__bmp_ +; Line 1078 + 00353 0f b6 08 movzx ecx, BYTE PTR [rax] + 00356 48 8d 6b 30 lea rbp, QWORD PTR [rbx+48] + 0035a 48 ff c0 inc rax + 0035d 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 0040a eb 15 jmp SHORT $LN252@stbi__bmp_ -$LN251@stbi__bmp_: - -; 1079 : if (s->read_from_callbacks) { - - 0040c 41 39 7d 00 cmp DWORD PTR [r13], edi - 00410 74 0f je SHORT $LN252@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 00412 48 8b cb mov rcx, rbx - 00415 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 0041a 48 ff 83 c0 00 - 00 00 inc QWORD PTR [rbx+192] -$LN252@stbi__bmp_: - -; 5133 : pal[i][3] = 255; - - 00421 42 c6 84 bc e3 - 00 00 00 ff mov BYTE PTR pal$[rsp+r15*4+3], 255 ; 000000ffH - 0042a 49 ff c7 inc r15 - 0042d 4c 3b fe cmp r15, rsi - 00430 0f 8c da fe ff - ff jl $LL4@stbi__bmp_ - 00436 48 8b b4 24 90 - 00 00 00 mov rsi, QWORD PTR out$1$[rsp] - 0043e 33 d2 xor edx, edx - 00440 44 8b 74 24 3c mov r14d, DWORD PTR n$1$[rsp] - 00445 8b 6c 24 30 mov ebp, DWORD PTR info$2$[rsp] - 00449 44 8b ac 24 48 - 05 00 00 mov r13d, DWORD PTR target$4$[rsp] -$LN341@stbi__bmp_: - -; 5134 : } -; 5135 : stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); - - 00451 83 fd 0c cmp ebp, 12 - 00454 8b c2 mov eax, edx - 00456 0f 95 c0 setne al - 00459 83 c0 03 add eax, 3 - 0045c 41 0f af c4 imul eax, r12d - 00460 44 2b f0 sub r14d, eax - 00463 44 2b 74 24 34 sub r14d, DWORD PTR info$5$[rsp] - 00468 44 2b f5 sub r14d, ebp - -; 1107 : if (n == 0) return; // already there! - - 0046b 74 55 je SHORT $LN224@stbi__bmp_ - -; 1108 : if (n < 0) { - - 0046d 45 85 f6 test r14d, r14d - 00470 79 10 jns SHORT $LN226@stbi__bmp_ - -; 1109 : s->img_buffer = s->img_buffer_end; - - 00472 48 8b 83 c8 00 - 00 00 mov rax, QWORD PTR [rbx+200] - 00479 48 89 83 c0 00 + 00364 eb 25 jmp SHORT $LN224@stbi__bmp_ +$LN225@stbi__bmp_: +; Line 1079 + 00366 39 7d 00 cmp DWORD PTR [rbp], edi + 00369 74 1e je SHORT $LN226@stbi__bmp_ +; Line 1080 + 0036b 48 8b cb mov rcx, rbx + 0036e e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00373 48 8b 83 c0 00 + 00 00 mov rax, QWORD PTR [rbx+192] + 0037a 0f b6 08 movzx ecx, BYTE PTR [rax] + 0037d 48 ff c0 inc rax + 00380 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - -; 1110 : return; - - 00480 eb 40 jmp SHORT $LN224@stbi__bmp_ + 00387 eb 02 jmp SHORT $LN224@stbi__bmp_ $LN226@stbi__bmp_: - -; 1111 : } -; 1112 : if (s->io.read) { - - 00482 48 39 7b 10 cmp QWORD PTR [rbx+16], rdi - 00486 74 30 je SHORT $LN357@stbi__bmp_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - - 00488 8b 8b c8 00 00 - 00 mov ecx, DWORD PTR [rbx+200] - 0048e 2b 8b c0 00 00 - 00 sub ecx, DWORD PTR [rbx+192] - -; 1114 : if (blen < n) { - - 00494 41 3b ce cmp ecx, r14d - 00497 7d 1f jge SHORT $LN357@stbi__bmp_ - -; 1115 : s->img_buffer = s->img_buffer_end; - - 00499 48 8b 83 c8 00 - 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - - 004a0 44 2b f1 sub r14d, ecx - 004a3 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] - 004a7 41 8b d6 mov edx, r14d - 004aa 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 004b1 ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - - 004b4 33 d2 xor edx, edx - 004b6 eb 0a jmp SHORT $LN224@stbi__bmp_ -$LN357@stbi__bmp_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - - 004b8 49 63 c6 movsxd rax, r14d - 004bb 48 01 83 c0 00 - 00 00 add QWORD PTR [rbx+192], rax +; Line 1083 + 00389 32 c9 xor cl, cl $LN224@stbi__bmp_: - -; 5136 : if (info.bpp == 1) width = (s->img_x + 7) >> 3; - - 004c2 44 8b 64 24 40 mov r12d, DWORD PTR info$3$[rsp] - 004c7 41 83 fc 01 cmp r12d, 1 - 004cb 75 0d jne SHORT $LN59@stbi__bmp_ - 004cd 44 8b 3b mov r15d, DWORD PTR [rbx] - 004d0 41 83 c7 07 add r15d, 7 - 004d4 41 c1 ef 03 shr r15d, 3 - 004d8 eb 1e jmp SHORT $LN64@stbi__bmp_ +; Line 5131 + 0038b 42 88 8c b4 e0 + 00 00 00 mov BYTE PTR pal$[rsp+r14*4], cl +; Line 5132 + 00393 41 83 fd 0c cmp r13d, 12 + 00397 74 2d je SHORT $LN240@stbi__bmp_ +; Line 1077 + 00399 48 3b 83 c8 00 + 00 00 cmp rax, QWORD PTR [rbx+200] + 003a0 73 0c jae SHORT $LN239@stbi__bmp_ +; Line 1078 + 003a2 48 ff c0 inc rax + 003a5 48 89 83 c0 00 + 00 00 mov QWORD PTR [rbx+192], rax + 003ac eb 18 jmp SHORT $LN240@stbi__bmp_ +$LN239@stbi__bmp_: +; Line 1079 + 003ae 48 8b 44 24 68 mov rax, QWORD PTR tv3355[rsp] + 003b3 39 38 cmp DWORD PTR [rax], edi + 003b5 74 0f je SHORT $LN240@stbi__bmp_ +; Line 1080 + 003b7 48 8b cb mov rcx, rbx + 003ba e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 003bf 48 ff 83 c0 00 + 00 00 inc QWORD PTR [rbx+192] +$LN240@stbi__bmp_: +; Line 5133 + 003c6 42 c6 84 b4 e3 + 00 00 00 ff mov BYTE PTR pal$[rsp+r14*4+3], 255 ; 000000ffH + 003cf 49 ff c6 inc r14 + 003d2 4c 3b f6 cmp r14, rsi + 003d5 0f 8c d5 fe ff + ff jl $LL4@stbi__bmp_ + 003db 48 8b b4 24 90 + 00 00 00 mov rsi, QWORD PTR out$1$[rsp] + 003e3 44 8b 6c 24 30 mov r13d, DWORD PTR info$4$[rsp] + 003e8 44 8b 74 24 34 mov r14d, DWORD PTR info$2$[rsp] +$LN306@stbi__bmp_: +; Line 5135 + 003ed 33 c0 xor eax, eax + 003ef 48 8b cb mov rcx, rbx + 003f2 41 83 fe 0c cmp r14d, 12 + 003f6 0f 95 c0 setne al + 003f9 83 c0 03 add eax, 3 + 003fc 41 0f af c4 imul eax, r12d + 00400 44 2b e8 sub r13d, eax + 00403 44 2b 6c 24 58 sub r13d, DWORD PTR info$5$[rsp] + 00408 45 2b ee sub r13d, r14d + 0040b 41 8b d5 mov edx, r13d + 0040e e8 00 00 00 00 call stbi__skip +; Line 5136 + 00413 44 8b 6c 24 3c mov r13d, DWORD PTR info$3$[rsp] + 00418 41 83 fd 01 cmp r13d, 1 + 0041c 75 0d jne SHORT $LN59@stbi__bmp_ + 0041e 44 8b 23 mov r12d, DWORD PTR [rbx] + 00421 41 83 c4 07 add r12d, 7 + 00425 41 c1 ec 03 shr r12d, 3 + 00429 eb 1e jmp SHORT $LN64@stbi__bmp_ $LN59@stbi__bmp_: - -; 5137 : else if (info.bpp == 4) width = (s->img_x + 1) >> 1; - - 004da 41 83 fc 04 cmp r12d, 4 - 004de 75 0b jne SHORT $LN61@stbi__bmp_ - 004e0 44 8b 3b mov r15d, DWORD PTR [rbx] - 004e3 41 ff c7 inc r15d - 004e6 41 d1 ef shr r15d, 1 - 004e9 eb 0d jmp SHORT $LN64@stbi__bmp_ +; Line 5137 + 0042b 41 83 fd 04 cmp r13d, 4 + 0042f 75 0b jne SHORT $LN61@stbi__bmp_ + 00431 44 8b 23 mov r12d, DWORD PTR [rbx] + 00434 41 ff c4 inc r12d + 00437 41 d1 ec shr r12d, 1 + 0043a eb 0d jmp SHORT $LN64@stbi__bmp_ $LN61@stbi__bmp_: - -; 5138 : else if (info.bpp == 8) width = s->img_x; - - 004eb 41 83 fc 08 cmp r12d, 8 - 004ef 0f 85 74 03 00 +; Line 5138 + 0043c 41 83 fd 08 cmp r13d, 8 + 00440 0f 85 4f 03 00 00 jne $LN63@stbi__bmp_ - 004f5 44 8b 3b mov r15d, DWORD PTR [rbx] + 00446 44 8b 23 mov r12d, DWORD PTR [rbx] $LN64@stbi__bmp_: - -; 5140 : pad = (-width) & 3; - - 004f8 8b 43 04 mov eax, DWORD PTR [rbx+4] - 004fb 41 f7 df neg r15d - 004fe 41 83 e7 03 and r15d, 3 - 00502 44 89 7c 24 30 mov DWORD PTR pad$1$[rsp], r15d - -; 5141 : if (info.bpp == 1) { - - 00507 41 83 fc 01 cmp r12d, 1 - 0050b 0f 85 7c 01 00 +; Line 5140 + 00449 8b 43 04 mov eax, DWORD PTR [rbx+4] + 0044c 41 f7 dc neg r12d + 0044f 41 83 e4 03 and r12d, 3 +; Line 5141 + 00453 41 83 fd 01 cmp r13d, 1 + 00457 0f 85 79 01 00 00 jne $LN65@stbi__bmp_ - -; 5142 : for (j = 0; j < (int)s->img_y; ++j) { - - 00511 44 8b e2 mov r12d, edx - 00514 85 c0 test eax, eax - 00516 0f 8e 41 03 00 - 00 jle $LN12@stbi__bmp_ - 0051c 48 8b fa mov rdi, rdx - 0051f 90 npad 1 +; Line 5142 + 0045d 45 33 ed xor r13d, r13d + 00460 85 c0 test eax, eax + 00462 0f 8e 2e 0a 00 + 00 jle $LN18@stbi__bmp_ + 00468 0f 1f 84 00 00 + 00 00 00 npad 8 $LL7@stbi__bmp_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00520 48 8b 83 c0 00 +; Line 1077 + 00470 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - -; 5143 : int bit_offset = 7, v = stbi__get8(s); - - 00527 bd 07 00 00 00 mov ebp, 7 - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 0052c 48 3b 83 c8 00 +; Line 5143 + 00477 bd 07 00 00 00 mov ebp, 7 +; Line 1077 + 0047c 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 00533 73 0f jae SHORT $LN217@stbi__bmp_ - -; 1078 : return *s->img_buffer++; - - 00535 0f b6 08 movzx ecx, BYTE PTR [rax] - 00538 48 ff c0 inc rax - 0053b 48 89 83 c0 00 + 00483 73 0f jae SHORT $LN217@stbi__bmp_ +; Line 1078 + 00485 0f b6 08 movzx ecx, BYTE PTR [rax] + 00488 48 ff c0 inc rax + 0048b 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00542 eb 26 jmp SHORT $LN216@stbi__bmp_ + 00492 eb 26 jmp SHORT $LN216@stbi__bmp_ $LN217@stbi__bmp_: - -; 1079 : if (s->read_from_callbacks) { - - 00544 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 - 00548 74 1e je SHORT $LN218@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 0054a 48 8b cb mov rcx, rbx - 0054d e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00552 48 8b 83 c0 00 +; Line 1079 + 00494 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 + 00498 74 1e je SHORT $LN218@stbi__bmp_ +; Line 1080 + 0049a 48 8b cb mov rcx, rbx + 0049d e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 004a2 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00559 0f b6 08 movzx ecx, BYTE PTR [rax] - 0055c 48 ff c0 inc rax - 0055f 48 89 83 c0 00 + 004a9 0f b6 08 movzx ecx, BYTE PTR [rax] + 004ac 48 ff c0 inc rax + 004af 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00566 eb 02 jmp SHORT $LN216@stbi__bmp_ + 004b6 eb 02 jmp SHORT $LN216@stbi__bmp_ $LN218@stbi__bmp_: - -; 1082 : } -; 1083 : return 0; - - 00568 32 c9 xor cl, cl +; Line 1083 + 004b8 32 c9 xor cl, cl $LN216@stbi__bmp_: - -; 5144 : for (i = 0; i < (int)s->img_x; ++i) { - - 0056a 33 c0 xor eax, eax - 0056c 0f b6 d1 movzx edx, cl - 0056f 44 8b f0 mov r14d, eax - 00572 39 03 cmp DWORD PTR [rbx], eax - 00574 0f 8e b5 00 00 - 00 jle $LN377@stbi__bmp_ - 0057a 66 0f 1f 44 00 - 00 npad 6 +; Line 5144 + 004ba 45 33 f6 xor r14d, r14d + 004bd 0f b6 d1 movzx edx, cl + 004c0 44 39 33 cmp DWORD PTR [rbx], r14d + 004c3 0f 8e b6 00 00 + 00 jle $LN325@stbi__bmp_ + 004c9 0f 1f 80 00 00 + 00 00 npad 7 $LL10@stbi__bmp_: - -; 5145 : int color = (v >> bit_offset) & 0x1; - - 00580 8b c2 mov eax, edx - 00582 8b cd mov ecx, ebp - 00584 d3 f8 sar eax, cl - 00586 83 e0 01 and eax, 1 - -; 5146 : out[z++] = pal[color][0]; - - 00589 48 8d 0c 85 00 +; Line 5145 + 004d0 8b c2 mov eax, edx + 004d2 8b cd mov ecx, ebp + 004d4 d3 f8 sar eax, cl + 004d6 83 e0 01 and eax, 1 +; Line 5146 + 004d9 48 8d 0c 85 00 00 00 00 lea rcx, QWORD PTR [rax*4] - 00591 0f b6 84 0c e0 + 004e1 0f b6 84 0c e0 00 00 00 movzx eax, BYTE PTR pal$[rsp+rcx] - 00599 88 04 37 mov BYTE PTR [rdi+rsi], al - -; 5147 : out[z++] = pal[color][1]; - - 0059c 0f b6 84 0c e1 + 004e9 88 04 37 mov BYTE PTR [rdi+rsi], al +; Line 5147 + 004ec 0f b6 84 0c e1 00 00 00 movzx eax, BYTE PTR pal$[rsp+rcx+1] - 005a4 88 44 37 01 mov BYTE PTR [rdi+rsi+1], al - -; 5148 : out[z++] = pal[color][2]; - - 005a8 0f b6 84 0c e2 + 004f4 88 44 37 01 mov BYTE PTR [rdi+rsi+1], al +; Line 5148 + 004f8 0f b6 84 0c e2 00 00 00 movzx eax, BYTE PTR pal$[rsp+rcx+2] - 005b0 88 44 37 02 mov BYTE PTR [rdi+rsi+2], al - 005b4 48 83 c7 03 add rdi, 3 - -; 5149 : if (target == 4) out[z++] = 255; - - 005b8 41 83 fd 04 cmp r13d, 4 - 005bc 75 07 jne SHORT $LN67@stbi__bmp_ - 005be c6 04 37 ff mov BYTE PTR [rdi+rsi], 255 ; 000000ffH - 005c2 48 ff c7 inc rdi + 00500 88 44 37 02 mov BYTE PTR [rdi+rsi+2], al + 00504 48 83 c7 03 add rdi, 3 +; Line 5149 + 00508 41 83 ff 04 cmp r15d, 4 + 0050c 75 07 jne SHORT $LN67@stbi__bmp_ + 0050e c6 04 37 ff mov BYTE PTR [rdi+rsi], 255 ; 000000ffH + 00512 48 ff c7 inc rdi $LN67@stbi__bmp_: - -; 5150 : if (i + 1 == (int)s->img_x) break; - - 005c5 8b 0b mov ecx, DWORD PTR [rbx] - 005c7 41 8d 46 01 lea eax, DWORD PTR [r14+1] - 005cb 44 8b f0 mov r14d, eax - 005ce 3b c1 cmp eax, ecx - 005d0 74 5d je SHORT $LN377@stbi__bmp_ - -; 5151 : if ((--bit_offset) < 0) { - - 005d2 83 ed 01 sub ebp, 1 - 005d5 79 4f jns SHORT $LN342@stbi__bmp_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 005d7 48 8b 83 c0 00 +; Line 5150 + 00515 8b 0b mov ecx, DWORD PTR [rbx] + 00517 41 8d 46 01 lea eax, DWORD PTR [r14+1] + 0051b 44 8b f0 mov r14d, eax + 0051e 3b c1 cmp eax, ecx + 00520 74 5d je SHORT $LN325@stbi__bmp_ +; Line 5151 + 00522 83 ed 01 sub ebp, 1 + 00525 79 4f jns SHORT $LN292@stbi__bmp_ +; Line 1077 + 00527 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - -; 5152 : bit_offset = 7; - - 005de bd 07 00 00 00 mov ebp, 7 - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 005e3 48 3b 83 c8 00 +; Line 5152 + 0052e bd 07 00 00 00 mov ebp, 7 +; Line 1077 + 00533 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 005ea 73 0f jae SHORT $LN203@stbi__bmp_ - -; 1078 : return *s->img_buffer++; - - 005ec 0f b6 10 movzx edx, BYTE PTR [rax] - 005ef 48 ff c0 inc rax - 005f2 48 89 83 c0 00 + 0053a 73 0f jae SHORT $LN203@stbi__bmp_ +; Line 1078 + 0053c 0f b6 10 movzx edx, BYTE PTR [rax] + 0053f 48 ff c0 inc rax + 00542 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 005f9 eb 28 jmp SHORT $LN202@stbi__bmp_ + 00549 eb 28 jmp SHORT $LN202@stbi__bmp_ $LN203@stbi__bmp_: - -; 1079 : if (s->read_from_callbacks) { - - 005fb 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 - 005ff 74 20 je SHORT $LN204@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 00601 48 8b cb mov rcx, rbx - 00604 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00609 48 8b 83 c0 00 +; Line 1079 + 0054b 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 + 0054f 74 20 je SHORT $LN204@stbi__bmp_ +; Line 1080 + 00551 48 8b cb mov rcx, rbx + 00554 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00559 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00610 0f b6 10 movzx edx, BYTE PTR [rax] - 00613 48 ff c0 inc rax - 00616 48 89 83 c0 00 + 00560 0f b6 10 movzx edx, BYTE PTR [rax] + 00563 48 ff c0 inc rax + 00566 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 0061d 8b 0b mov ecx, DWORD PTR [rbx] - 0061f eb 02 jmp SHORT $LN202@stbi__bmp_ + 0056d 8b 0b mov ecx, DWORD PTR [rbx] + 0056f eb 02 jmp SHORT $LN202@stbi__bmp_ $LN204@stbi__bmp_: - -; 1082 : } -; 1083 : return 0; - - 00621 32 d2 xor dl, dl +; Line 1083 + 00571 32 d2 xor dl, dl $LN202@stbi__bmp_: - -; 5153 : v = stbi__get8(s); - - 00623 0f b6 d2 movzx edx, dl -$LN342@stbi__bmp_: - -; 5144 : for (i = 0; i < (int)s->img_x; ++i) { - - 00626 44 3b f1 cmp r14d, ecx - 00629 0f 8c 51 ff ff +; Line 5153 + 00573 0f b6 d2 movzx edx, dl +$LN292@stbi__bmp_: +; Line 5144 + 00576 44 3b f1 cmp r14d, ecx + 00579 0f 8c 51 ff ff ff jl $LL10@stbi__bmp_ -$LN377@stbi__bmp_: - -; 1107 : if (n == 0) return; // already there! - - 0062f 45 85 ff test r15d, r15d - 00632 74 3e je SHORT $LN5@stbi__bmp_ - -; 1111 : } -; 1112 : if (s->io.read) { - - 00634 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 - 00639 74 2d je SHORT $LN361@stbi__bmp_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - - 0063b 8b 8b c8 00 00 +$LN325@stbi__bmp_: +; Line 1107 + 0057f 45 85 e4 test r12d, r12d + 00582 74 3e je SHORT $LN5@stbi__bmp_ +; Line 1112 + 00584 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 + 00589 74 2d je SHORT $LN309@stbi__bmp_ +; Line 1113 + 0058b 8b 8b c8 00 00 00 mov ecx, DWORD PTR [rbx+200] - 00641 2b 8b c0 00 00 + 00591 2b 8b c0 00 00 00 sub ecx, DWORD PTR [rbx+192] - -; 1114 : if (blen < n) { - - 00647 41 3b cf cmp ecx, r15d - 0064a 7d 1c jge SHORT $LN361@stbi__bmp_ - -; 1115 : s->img_buffer = s->img_buffer_end; - - 0064c 48 8b 83 c8 00 +; Line 1114 + 00597 41 3b cc cmp ecx, r12d + 0059a 7d 1c jge SHORT $LN309@stbi__bmp_ +; Line 1115 + 0059c 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - - 00653 41 8b d7 mov edx, r15d - 00656 2b d1 sub edx, ecx - 00658 48 89 83 c0 00 +; Line 1116 + 005a3 41 8b d4 mov edx, r12d + 005a6 2b d1 sub edx, ecx + 005a8 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 0065f 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] - 00663 ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - - 00666 eb 0a jmp SHORT $LN5@stbi__bmp_ -$LN361@stbi__bmp_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - - 00668 41 8b c7 mov eax, r15d - 0066b 48 01 83 c0 00 + 005af 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] + 005b3 ff 53 18 call QWORD PTR [rbx+24] +; Line 1117 + 005b6 eb 0a jmp SHORT $LN5@stbi__bmp_ +$LN309@stbi__bmp_: +; Line 1120 + 005b8 41 8b c4 mov eax, r12d + 005bb 48 01 83 c0 00 00 00 add QWORD PTR [rbx+192], rax $LN5@stbi__bmp_: - -; 5142 : for (j = 0; j < (int)s->img_y; ++j) { - - 00672 8b 43 04 mov eax, DWORD PTR [rbx+4] - 00675 41 ff c4 inc r12d - 00678 44 3b e0 cmp r12d, eax - 0067b 0f 8c 9f fe ff +; Line 5142 + 005c2 8b 43 04 mov eax, DWORD PTR [rbx+4] + 005c5 41 ff c5 inc r13d + 005c8 44 3b e8 cmp r13d, eax + 005cb 0f 8c 9f fe ff ff jl $LL7@stbi__bmp_ - -; 5177 : } -; 5178 : stbi__skip(s, pad); -; 5179 : } -; 5180 : } -; 5181 : } - - 00681 8b ac 24 48 05 - 00 00 mov ebp, DWORD PTR target$4$[rsp] - 00688 e9 c7 0a 00 00 jmp $LN18@stbi__bmp_ +; Line 5158 + 005d1 e9 c0 08 00 00 jmp $LN18@stbi__bmp_ $LN65@stbi__bmp_: - -; 5154 : } -; 5155 : } -; 5156 : stbi__skip(s, pad); -; 5157 : } -; 5158 : } -; 5159 : else { -; 5160 : for (j = 0; j < (int)s->img_y; ++j) { - - 0068d 44 8b f2 mov r14d, edx - 00690 85 c0 test eax, eax - 00692 0f 8e c5 01 00 - 00 jle $LN12@stbi__bmp_ - 00698 0f 1f 84 00 00 - 00 00 00 npad 8 +; Line 5160 + 005d6 45 33 f6 xor r14d, r14d + 005d9 85 c0 test eax, eax + 005db 0f 8e b5 08 00 + 00 jle $LN18@stbi__bmp_ $LL13@stbi__bmp_: - -; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { - - 006a0 83 3b 00 cmp DWORD PTR [rbx], 0 - 006a3 8b ea mov ebp, edx - 006a5 0f 8e 5b 01 00 - 00 jle $LN318@stbi__bmp_ - 006ab 45 33 ff xor r15d, r15d - 006ae 66 90 npad 2 +; Line 5161 + 005e1 33 ed xor ebp, ebp + 005e3 39 2b cmp DWORD PTR [rbx], ebp + 005e5 0f 8e 53 01 00 + 00 jle $LN326@stbi__bmp_ + 005eb 0f 1f 44 00 00 npad 5 $LL16@stbi__bmp_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 006b0 48 8b 83 c0 00 +; Line 1077 + 005f0 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 006b7 48 3b 83 c8 00 + 005f7 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 006be 73 0f jae SHORT $LN122@stbi__bmp_ - -; 1078 : return *s->img_buffer++; - - 006c0 0f b6 08 movzx ecx, BYTE PTR [rax] - 006c3 48 ff c0 inc rax - 006c6 48 89 83 c0 00 + 005fe 73 0f jae SHORT $LN122@stbi__bmp_ +; Line 1078 + 00600 0f b6 08 movzx ecx, BYTE PTR [rax] + 00603 48 ff c0 inc rax + 00606 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 006cd eb 26 jmp SHORT $LN121@stbi__bmp_ + 0060d eb 26 jmp SHORT $LN121@stbi__bmp_ $LN122@stbi__bmp_: - -; 1079 : if (s->read_from_callbacks) { - - 006cf 44 39 7b 30 cmp DWORD PTR [rbx+48], r15d - 006d3 74 1e je SHORT $LN123@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 006d5 48 8b cb mov rcx, rbx - 006d8 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 006dd 48 8b 83 c0 00 +; Line 1079 + 0060f 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 + 00613 74 1e je SHORT $LN123@stbi__bmp_ +; Line 1080 + 00615 48 8b cb mov rcx, rbx + 00618 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 0061d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 006e4 0f b6 08 movzx ecx, BYTE PTR [rax] - 006e7 48 ff c0 inc rax - 006ea 48 89 83 c0 00 + 00624 0f b6 08 movzx ecx, BYTE PTR [rax] + 00627 48 ff c0 inc rax + 0062a 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 006f1 eb 02 jmp SHORT $LN121@stbi__bmp_ + 00631 eb 02 jmp SHORT $LN121@stbi__bmp_ $LN123@stbi__bmp_: - -; 1082 : } -; 1083 : return 0; - - 006f3 32 c9 xor cl, cl +; Line 1083 + 00633 32 c9 xor cl, cl $LN121@stbi__bmp_: - -; 5162 : int v = stbi__get8(s), v2 = 0; - - 006f5 0f b6 c1 movzx eax, cl - 006f8 45 8b c7 mov r8d, r15d - -; 5163 : if (info.bpp == 4) { - - 006fb 41 83 fc 04 cmp r12d, 4 - 006ff 75 0a jne SHORT $LN70@stbi__bmp_ - -; 5164 : v2 = v & 15; - - 00701 44 8b c0 mov r8d, eax - 00704 41 83 e0 0f and r8d, 15 - -; 5165 : v >>= 4; - - 00708 c1 e8 04 shr eax, 4 +; Line 5162 + 00635 45 33 c0 xor r8d, r8d + 00638 0f b6 c1 movzx eax, cl +; Line 5163 + 0063b 41 83 fd 04 cmp r13d, 4 + 0063f 75 0a jne SHORT $LN70@stbi__bmp_ +; Line 5164 + 00641 44 8b c0 mov r8d, eax + 00644 41 83 e0 0f and r8d, 15 +; Line 5165 + 00648 c1 e8 04 shr eax, 4 $LN70@stbi__bmp_: - -; 5166 : } -; 5167 : out[z++] = pal[v][0]; - - 0070b 48 63 cf movsxd rcx, edi - 0070e 48 8d 14 85 00 +; Line 5167 + 0064b 48 63 cf movsxd rcx, edi + 0064e 48 8d 14 85 00 00 00 00 lea rdx, QWORD PTR [rax*4] - 00716 0f b6 84 14 e0 + 00656 0f b6 84 14 e0 00 00 00 movzx eax, BYTE PTR pal$[rsp+rdx] - 0071e ff c7 inc edi - 00720 88 04 31 mov BYTE PTR [rcx+rsi], al - -; 5168 : out[z++] = pal[v][1]; - - 00723 0f b6 84 14 e1 + 0065e ff c7 inc edi + 00660 88 04 31 mov BYTE PTR [rcx+rsi], al +; Line 5168 + 00663 0f b6 84 14 e1 00 00 00 movzx eax, BYTE PTR pal$[rsp+rdx+1] - 0072b 48 63 cf movsxd rcx, edi - 0072e ff c7 inc edi - 00730 88 04 31 mov BYTE PTR [rcx+rsi], al - -; 5169 : out[z++] = pal[v][2]; - - 00733 0f b6 84 14 e2 + 0066b 48 63 cf movsxd rcx, edi + 0066e ff c7 inc edi + 00670 88 04 31 mov BYTE PTR [rcx+rsi], al +; Line 5169 + 00673 0f b6 84 14 e2 00 00 00 movzx eax, BYTE PTR pal$[rsp+rdx+2] - 0073b 48 63 cf movsxd rcx, edi - 0073e ff c7 inc edi - 00740 88 04 31 mov BYTE PTR [rcx+rsi], al - -; 5170 : if (target == 4) out[z++] = 255; - - 00743 41 83 fd 04 cmp r13d, 4 - 00747 75 09 jne SHORT $LN71@stbi__bmp_ - 00749 48 63 c7 movsxd rax, edi - 0074c ff c7 inc edi - 0074e c6 04 30 ff mov BYTE PTR [rax+rsi], 255 ; 000000ffH + 0067b 48 63 cf movsxd rcx, edi + 0067e ff c7 inc edi + 00680 88 04 31 mov BYTE PTR [rcx+rsi], al +; Line 5170 + 00683 41 83 ff 04 cmp r15d, 4 + 00687 75 09 jne SHORT $LN71@stbi__bmp_ + 00689 48 63 c7 movsxd rax, edi + 0068c ff c7 inc edi + 0068e c6 04 30 ff mov BYTE PTR [rax+rsi], 255 ; 000000ffH $LN71@stbi__bmp_: - -; 5171 : if (i + 1 == (int)s->img_x) break; - - 00752 8d 45 01 lea eax, DWORD PTR [rbp+1] - 00755 3b 03 cmp eax, DWORD PTR [rbx] - 00757 0f 84 a4 00 00 - 00 je $LN378@stbi__bmp_ - -; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; - - 0075d 41 83 fc 08 cmp r12d, 8 - 00761 75 49 jne SHORT $LN97@stbi__bmp_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00763 48 8b 83 c0 00 +; Line 5171 + 00692 8d 45 01 lea eax, DWORD PTR [rbp+1] + 00695 3b 03 cmp eax, DWORD PTR [rbx] + 00697 0f 84 a1 00 00 + 00 je $LN326@stbi__bmp_ +; Line 5172 + 0069d 41 83 fd 08 cmp r13d, 8 + 006a1 75 49 jne SHORT $LN97@stbi__bmp_ +; Line 1077 + 006a3 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 0076a 48 3b 83 c8 00 + 006aa 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 00771 73 0f jae SHORT $LN199@stbi__bmp_ - -; 1078 : return *s->img_buffer++; - - 00773 0f b6 08 movzx ecx, BYTE PTR [rax] - 00776 48 ff c0 inc rax - 00779 48 89 83 c0 00 + 006b1 73 0f jae SHORT $LN199@stbi__bmp_ +; Line 1078 + 006b3 0f b6 08 movzx ecx, BYTE PTR [rax] + 006b6 48 ff c0 inc rax + 006b9 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00780 eb 26 jmp SHORT $LN198@stbi__bmp_ + 006c0 eb 26 jmp SHORT $LN198@stbi__bmp_ $LN199@stbi__bmp_: - -; 1079 : if (s->read_from_callbacks) { - - 00782 44 39 7b 30 cmp DWORD PTR [rbx+48], r15d - 00786 74 1e je SHORT $LN200@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 00788 48 8b cb mov rcx, rbx - 0078b e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00790 48 8b 83 c0 00 +; Line 1079 + 006c2 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 + 006c6 74 1e je SHORT $LN200@stbi__bmp_ +; Line 1080 + 006c8 48 8b cb mov rcx, rbx + 006cb e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 006d0 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00797 0f b6 08 movzx ecx, BYTE PTR [rax] - 0079a 48 ff c0 inc rax - 0079d 48 89 83 c0 00 + 006d7 0f b6 08 movzx ecx, BYTE PTR [rax] + 006da 48 ff c0 inc rax + 006dd 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 007a4 eb 02 jmp SHORT $LN198@stbi__bmp_ + 006e4 eb 02 jmp SHORT $LN198@stbi__bmp_ $LN200@stbi__bmp_: - -; 1082 : } -; 1083 : return 0; - - 007a6 32 c9 xor cl, cl +; Line 1083 + 006e6 32 c9 xor cl, cl $LN198@stbi__bmp_: - -; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; - - 007a8 44 0f b6 c1 movzx r8d, cl +; Line 5172 + 006e8 44 0f b6 c1 movzx r8d, cl $LN97@stbi__bmp_: - -; 5173 : out[z++] = pal[v][0]; - - 007ac 48 63 cf movsxd rcx, edi - 007af ff c7 inc edi - 007b1 41 8b c0 mov eax, r8d - 007b4 48 8d 14 85 00 - 00 00 00 lea rdx, QWORD PTR [rax*4] - 007bc 0f b6 84 14 e0 +; Line 5173 + 006ec 48 63 cf movsxd rcx, edi + 006ef 4a 8d 14 85 00 + 00 00 00 lea rdx, QWORD PTR [r8*4] + 006f7 0f b6 84 14 e0 00 00 00 movzx eax, BYTE PTR pal$[rsp+rdx] - 007c4 88 04 31 mov BYTE PTR [rcx+rsi], al - -; 5174 : out[z++] = pal[v][1]; - - 007c7 0f b6 84 14 e1 + 006ff ff c7 inc edi + 00701 88 04 31 mov BYTE PTR [rcx+rsi], al +; Line 5174 + 00704 0f b6 84 14 e1 00 00 00 movzx eax, BYTE PTR pal$[rsp+rdx+1] - 007cf 48 63 cf movsxd rcx, edi - 007d2 ff c7 inc edi - 007d4 88 04 31 mov BYTE PTR [rcx+rsi], al - -; 5175 : out[z++] = pal[v][2]; - - 007d7 0f b6 84 14 e2 + 0070c 48 63 cf movsxd rcx, edi + 0070f ff c7 inc edi + 00711 88 04 31 mov BYTE PTR [rcx+rsi], al +; Line 5175 + 00714 0f b6 84 14 e2 00 00 00 movzx eax, BYTE PTR pal$[rsp+rdx+2] - 007df 48 63 cf movsxd rcx, edi - 007e2 ff c7 inc edi - 007e4 88 04 31 mov BYTE PTR [rcx+rsi], al - -; 5176 : if (target == 4) out[z++] = 255; - - 007e7 41 83 fd 04 cmp r13d, 4 - 007eb 75 09 jne SHORT $LN14@stbi__bmp_ - 007ed 48 63 c7 movsxd rax, edi - 007f0 ff c7 inc edi - 007f2 c6 04 30 ff mov BYTE PTR [rax+rsi], 255 ; 000000ffH + 0071c 48 63 cf movsxd rcx, edi + 0071f ff c7 inc edi + 00721 88 04 31 mov BYTE PTR [rcx+rsi], al +; Line 5176 + 00724 41 83 ff 04 cmp r15d, 4 + 00728 75 09 jne SHORT $LN14@stbi__bmp_ + 0072a 48 63 c7 movsxd rax, edi + 0072d ff c7 inc edi + 0072f c6 04 30 ff mov BYTE PTR [rax+rsi], 255 ; 000000ffH $LN14@stbi__bmp_: - -; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { - - 007f6 83 c5 02 add ebp, 2 - 007f9 3b 2b cmp ebp, DWORD PTR [rbx] - 007fb 0f 8c af fe ff +; Line 5161 + 00733 83 c5 02 add ebp, 2 + 00736 3b 2b cmp ebp, DWORD PTR [rbx] + 00738 0f 8c b2 fe ff ff jl $LL16@stbi__bmp_ -$LN378@stbi__bmp_: - 00801 44 8b 7c 24 30 mov r15d, DWORD PTR pad$1$[rsp] -$LN318@stbi__bmp_: - -; 1107 : if (n == 0) return; // already there! - - 00806 45 85 ff test r15d, r15d - 00809 74 3e je SHORT $LN11@stbi__bmp_ - -; 1111 : } -; 1112 : if (s->io.read) { - - 0080b 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 - 00810 74 2d je SHORT $LN358@stbi__bmp_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - - 00812 8b 8b c8 00 00 +$LN326@stbi__bmp_: +; Line 1107 + 0073e 45 85 e4 test r12d, r12d + 00741 74 3e je SHORT $LN11@stbi__bmp_ +; Line 1112 + 00743 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 + 00748 74 2d je SHORT $LN307@stbi__bmp_ +; Line 1113 + 0074a 8b 8b c8 00 00 00 mov ecx, DWORD PTR [rbx+200] - 00818 2b 8b c0 00 00 + 00750 2b 8b c0 00 00 00 sub ecx, DWORD PTR [rbx+192] - -; 1114 : if (blen < n) { - - 0081e 41 3b cf cmp ecx, r15d - 00821 7d 1c jge SHORT $LN358@stbi__bmp_ - -; 1115 : s->img_buffer = s->img_buffer_end; - - 00823 48 8b 83 c8 00 +; Line 1114 + 00756 41 3b cc cmp ecx, r12d + 00759 7d 1c jge SHORT $LN307@stbi__bmp_ +; Line 1115 + 0075b 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - - 0082a 41 8b d7 mov edx, r15d - 0082d 2b d1 sub edx, ecx - 0082f 48 89 83 c0 00 +; Line 1116 + 00762 41 8b d4 mov edx, r12d + 00765 2b d1 sub edx, ecx + 00767 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00836 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] - 0083a ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - - 0083d eb 0a jmp SHORT $LN11@stbi__bmp_ -$LN358@stbi__bmp_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - - 0083f 41 8b c7 mov eax, r15d - 00842 48 01 83 c0 00 + 0076e 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] + 00772 ff 53 18 call QWORD PTR [rbx+24] +; Line 1117 + 00775 eb 0a jmp SHORT $LN11@stbi__bmp_ +$LN307@stbi__bmp_: +; Line 1120 + 00777 41 8b c4 mov eax, r12d + 0077a 48 01 83 c0 00 00 00 add QWORD PTR [rbx+192], rax $LN11@stbi__bmp_: - -; 5154 : } -; 5155 : } -; 5156 : stbi__skip(s, pad); -; 5157 : } -; 5158 : } -; 5159 : else { -; 5160 : for (j = 0; j < (int)s->img_y; ++j) { - - 00849 8b 43 04 mov eax, DWORD PTR [rbx+4] - 0084c 41 ff c6 inc r14d - 0084f ba 00 00 00 00 mov edx, 0 - 00854 44 3b f0 cmp r14d, eax - 00857 0f 8c 43 fe ff +; Line 5160 + 00781 8b 43 04 mov eax, DWORD PTR [rbx+4] + 00784 41 ff c6 inc r14d + 00787 44 3b f0 cmp r14d, eax + 0078a 0f 8c 51 fe ff ff jl $LL13@stbi__bmp_ -$LN12@stbi__bmp_: - -; 5177 : } -; 5178 : stbi__skip(s, pad); -; 5179 : } -; 5180 : } -; 5181 : } - - 0085d 8b ac 24 48 05 - 00 00 mov ebp, DWORD PTR target$4$[rsp] - 00864 e9 eb 08 00 00 jmp $LN18@stbi__bmp_ +; Line 5181 + 00790 e9 01 07 00 00 jmp $LN18@stbi__bmp_ $LN63@stbi__bmp_: - -; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } - - 00869 48 8b ce mov rcx, rsi - 0086c ff 15 00 00 00 +; Line 5139 + 00795 48 8b ce mov rcx, rsi + 00798 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 431 : stbi__g_failure_reason = str; - - 00872 8b 15 00 00 00 +; Line 431 + 0079e 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00878 65 48 8b 04 25 + 007a4 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00881 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00885 48 8d 15 00 00 + 007ad 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 007b1 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_07JNJHIMGH@bad?5bpp@ - -; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } - - 0088c e9 4f 0a 00 00 jmp $LN528@stbi__bmp_ +; Line 5139 + 007b8 e9 5f 08 00 00 jmp $LN451@stbi__bmp_ $LN57@stbi__bmp_: - -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } - - 00891 48 8b ce mov rcx, rsi - 00894 ff 15 00 00 00 +; Line 5127 + 007bd 48 8b ce mov rcx, rsi + 007c0 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 431 : stbi__g_failure_reason = str; - - 0089a 8b 15 00 00 00 +; Line 431 + 007c6 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 008a0 65 48 8b 04 25 + 007cc 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 008a9 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 008ad 48 8d 15 00 00 + 007d5 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 007d9 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_07MALOAKCI@invalid@ - -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } - - 008b4 e9 27 0a 00 00 jmp $LN528@stbi__bmp_ +; Line 5127 + 007e0 e9 37 08 00 00 jmp $LN451@stbi__bmp_ $LN54@stbi__bmp_: - -; 5182 : else { -; 5183 : int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0; -; 5184 : int z = 0; -; 5185 : int easy = 0; -; 5186 : stbi__skip(s, info.offset - info.extra_read - info.hsz); - - 008b9 44 2b 74 24 34 sub r14d, DWORD PTR info$5$[rsp] - 008be 45 33 d2 xor r10d, r10d - 008c1 44 89 54 24 60 mov DWORD PTR rshift$1$[rsp], r10d - 008c6 41 8b d2 mov edx, r10d - 008c9 89 54 24 30 mov DWORD PTR ashift$1$[rsp], edx - 008cd 45 8b da mov r11d, r10d - 008d0 44 89 54 24 44 mov DWORD PTR gshift$1$[rsp], r10d - 008d5 45 8b c2 mov r8d, r10d - 008d8 44 89 54 24 3c mov DWORD PTR bshift$1$[rsp], r10d - 008dd 45 8b ea mov r13d, r10d - 008e0 41 8b fa mov edi, r10d - 008e3 45 8b e2 mov r12d, r10d - 008e6 44 2b f5 sub r14d, ebp - -; 1107 : if (n == 0) return; // already there! - - 008e9 74 5f je SHORT $LN242@stbi__bmp_ - -; 1108 : if (n < 0) { - - 008eb 45 85 f6 test r14d, r14d - 008ee 79 10 jns SHORT $LN244@stbi__bmp_ - -; 1109 : s->img_buffer = s->img_buffer_end; - - 008f0 48 8b 83 c8 00 - 00 00 mov rax, QWORD PTR [rbx+200] - 008f7 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - -; 1110 : return; - - 008fe eb 4a jmp SHORT $LN242@stbi__bmp_ -$LN244@stbi__bmp_: - -; 1111 : } -; 1112 : if (s->io.read) { - - 00900 48 39 53 10 cmp QWORD PTR [rbx+16], rdx - 00904 74 3a je SHORT $LN359@stbi__bmp_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - - 00906 8b 8b c8 00 00 - 00 mov ecx, DWORD PTR [rbx+200] - 0090c 2b 8b c0 00 00 - 00 sub ecx, DWORD PTR [rbx+192] - -; 1114 : if (blen < n) { - - 00912 41 3b ce cmp ecx, r14d - 00915 7d 29 jge SHORT $LN359@stbi__bmp_ - -; 1115 : s->img_buffer = s->img_buffer_end; - - 00917 48 8b 83 c8 00 - 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - - 0091e 44 2b f1 sub r14d, ecx - 00921 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] - 00925 41 8b d6 mov edx, r14d - 00928 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 0092f ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - - 00932 41 8b d4 mov edx, r12d - 00935 45 8b dc mov r11d, r12d - 00938 45 8b c4 mov r8d, r12d - 0093b 45 33 d2 xor r10d, r10d - 0093e eb 0a jmp SHORT $LN242@stbi__bmp_ -$LN359@stbi__bmp_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - - 00940 49 63 c6 movsxd rax, r14d - 00943 48 01 83 c0 00 - 00 00 add QWORD PTR [rbx+192], rax -$LN242@stbi__bmp_: - -; 5187 : if (info.bpp == 24) width = 3 * s->img_x; - - 0094a 8b 4c 24 40 mov ecx, DWORD PTR info$3$[rsp] - 0094e 83 f9 18 cmp ecx, 24 - 00951 75 08 jne SHORT $LN74@stbi__bmp_ - 00953 8b 03 mov eax, DWORD PTR [rbx] - 00955 44 8d 0c 40 lea r9d, DWORD PTR [rax+rax*2] - 00959 eb 10 jmp SHORT $LN77@stbi__bmp_ +; Line 5186 + 007e5 44 2b 6c 24 58 sub r13d, DWORD PTR info$5$[rsp] + 007ea 48 8b cb mov rcx, rbx + 007ed 45 2b ee sub r13d, r14d + 007f0 c7 44 24 44 00 + 00 00 00 mov DWORD PTR rshift$1$[rsp], 0 + 007f8 41 8b d5 mov edx, r13d + 007fb c7 44 24 4c 00 + 00 00 00 mov DWORD PTR gshift$1$[rsp], 0 + 00803 c7 44 24 34 00 + 00 00 00 mov DWORD PTR bshift$1$[rsp], 0 + 0080b 45 33 e4 xor r12d, r12d + 0080e c7 44 24 54 00 + 00 00 00 mov DWORD PTR ashift$1$[rsp], 0 + 00816 33 ff xor edi, edi + 00818 33 ed xor ebp, ebp + 0081a e8 00 00 00 00 call stbi__skip +; Line 5187 + 0081f 8b 4c 24 3c mov ecx, DWORD PTR info$3$[rsp] + 00823 83 f9 18 cmp ecx, 24 + 00826 75 07 jne SHORT $LN74@stbi__bmp_ + 00828 8b 03 mov eax, DWORD PTR [rbx] + 0082a 8d 14 40 lea edx, DWORD PTR [rax+rax*2] + 0082d eb 0d jmp SHORT $LN77@stbi__bmp_ $LN74@stbi__bmp_: - -; 5188 : else if (info.bpp == 16) width = 2 * s->img_x; - - 0095b 83 f9 10 cmp ecx, 16 - 0095e 75 08 jne SHORT $LN76@stbi__bmp_ - 00960 44 8b 0b mov r9d, DWORD PTR [rbx] - 00963 45 03 c9 add r9d, r9d - 00966 eb 03 jmp SHORT $LN77@stbi__bmp_ +; Line 5188 + 0082f 83 f9 10 cmp ecx, 16 + 00832 75 06 jne SHORT $LN76@stbi__bmp_ + 00834 8b 13 mov edx, DWORD PTR [rbx] + 00836 03 d2 add edx, edx + 00838 eb 02 jmp SHORT $LN77@stbi__bmp_ $LN76@stbi__bmp_: - -; 5189 : else /* bpp = 32 and pad = 0 */ width = 0; - - 00968 45 8b ca mov r9d, r10d +; Line 5189 + 0083a 33 d2 xor edx, edx $LN77@stbi__bmp_: - -; 5190 : pad = (-width) & 3; -; 5191 : if (info.bpp == 24) { - - 0096b 8b ac 24 48 05 - 00 00 mov ebp, DWORD PTR target$4$[rsp] - 00972 41 f7 d9 neg r9d - 00975 41 83 e1 03 and r9d, 3 - 00979 44 89 4c 24 34 mov DWORD PTR pad$2$[rsp], r9d - 0097e 83 f9 18 cmp ecx, 24 - 00981 75 11 jne SHORT $LN78@stbi__bmp_ - -; 5192 : easy = 1; - - 00983 48 c7 44 24 58 - 01 00 00 00 mov QWORD PTR $T22[rsp], 1 - -; 5193 : } - - 0098c 45 8b f4 mov r14d, r12d - 0098f e9 97 03 00 00 jmp $LN85@stbi__bmp_ +; Line 5190 + 0083c f7 da neg edx + 0083e 83 e2 03 and edx, 3 + 00841 89 94 24 84 00 + 00 00 mov DWORD PTR pad$2$[rsp], edx +; Line 5191 + 00848 83 f9 18 cmp ecx, 24 + 0084b 75 23 jne SHORT $LN78@stbi__bmp_ +; Line 5193 + 0084d 44 8b 6c 24 38 mov r13d, DWORD PTR ma$1$[rsp] + 00852 ba 01 00 00 00 mov edx, 1 + 00857 48 89 54 24 60 mov QWORD PTR $T1[rsp], rdx + 0085c 44 8b cf mov r9d, edi + 0085f 44 8b d7 mov r10d, edi + 00862 44 8b c7 mov r8d, edi + 00865 44 8b df mov r11d, edi + 00868 44 8b f7 mov r14d, edi + 0086b e9 3a 02 00 00 jmp $LN85@stbi__bmp_ $LN78@stbi__bmp_: - -; 5194 : else if (info.bpp == 32) { - - 00994 83 f9 20 cmp ecx, 32 ; 00000020H - 00997 4c 89 54 24 58 mov QWORD PTR $T22[rsp], r10 - 0099c 8b 4c 24 50 mov ecx, DWORD PTR mb$1$[rsp] - 009a0 8b c5 mov eax, ebp - 009a2 75 4f jne SHORT $LN362@stbi__bmp_ - -; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) - - 009a4 4c 89 54 24 58 mov QWORD PTR $T22[rsp], r10 - 009a9 81 f9 ff 00 00 +; Line 5194 + 00870 44 8b 4c 24 48 mov r9d, DWORD PTR mg$1$[rsp] + 00875 33 c0 xor eax, eax + 00877 48 89 44 24 60 mov QWORD PTR $T1[rsp], rax + 0087c 83 f9 20 cmp ecx, 32 ; 00000020H + 0087f 8b 4c 24 50 mov ecx, DWORD PTR mb$1$[rsp] + 00883 41 8b c7 mov eax, r15d + 00886 75 6c jne SHORT $LN310@stbi__bmp_ +; Line 5195 + 00888 33 c0 xor eax, eax + 0088a 48 89 44 24 60 mov QWORD PTR $T1[rsp], rax + 0088f 41 8b c7 mov eax, r15d + 00892 81 f9 ff 00 00 00 cmp ecx, 255 ; 000000ffH - 009af 75 42 jne SHORT $LN362@stbi__bmp_ - 009b1 81 7c 24 4c 00 - ff 00 00 cmp DWORD PTR mg$1$[rsp], 65280 ; 0000ff00H - 009b9 4c 89 54 24 58 mov QWORD PTR $T22[rsp], r10 - 009be 75 33 jne SHORT $LN362@stbi__bmp_ - 009c0 81 7c 24 48 00 + 00898 75 5a jne SHORT $LN310@stbi__bmp_ + 0089a 33 c0 xor eax, eax + 0089c 48 89 44 24 60 mov QWORD PTR $T1[rsp], rax + 008a1 41 8b c7 mov eax, r15d + 008a4 41 81 f9 00 ff + 00 00 cmp r9d, 65280 ; 0000ff00H + 008ab 75 47 jne SHORT $LN310@stbi__bmp_ + 008ad 33 c0 xor eax, eax + 008af 81 7c 24 40 00 00 ff 00 cmp DWORD PTR mr$1$[rsp], 16711680 ; 00ff0000H - 009c8 4c 89 54 24 58 mov QWORD PTR $T22[rsp], r10 - 009cd 75 24 jne SHORT $LN362@stbi__bmp_ - 009cf 4c 89 54 24 58 mov QWORD PTR $T22[rsp], r10 - 009d4 44 8b 54 24 64 mov r10d, DWORD PTR ma$1$[rsp] - 009d9 41 81 fa 00 00 - 00 ff cmp r10d, -16777216 ; ff000000H - 009e0 75 3c jne SHORT $LN379@stbi__bmp_ - -; 5196 : easy = 2; - - 009e2 48 c7 44 24 58 - 02 00 00 00 mov QWORD PTR $T22[rsp], 2 - 009eb 45 8b f4 mov r14d, r12d - 009ee e9 38 03 00 00 jmp $LN85@stbi__bmp_ -$LN362@stbi__bmp_: - -; 5197 : } -; 5198 : if (!easy) { -; 5199 : if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } - - 009f3 8b 7c 24 48 mov edi, DWORD PTR mr$1$[rsp] - 009f7 8b e8 mov ebp, eax - 009f9 85 ff test edi, edi - 009fb 0f 84 68 08 00 + 008b7 48 89 44 24 60 mov QWORD PTR $T1[rsp], rax + 008bc 41 8b c7 mov eax, r15d + 008bf 75 33 jne SHORT $LN310@stbi__bmp_ + 008c1 44 8b 6c 24 38 mov r13d, DWORD PTR ma$1$[rsp] + 008c6 33 c0 xor eax, eax + 008c8 48 89 44 24 60 mov QWORD PTR $T1[rsp], rax + 008cd 41 81 fd 00 00 + 00 ff cmp r13d, -16777216 ; ff000000H + 008d4 75 45 jne SHORT $LN327@stbi__bmp_ +; Line 5196 + 008d6 ba 02 00 00 00 mov edx, 2 + 008db 44 8b c8 mov r9d, eax + 008de 48 89 54 24 60 mov QWORD PTR $T1[rsp], rdx + 008e3 44 8b d0 mov r10d, eax + 008e6 44 8b c0 mov r8d, eax + 008e9 44 8b d8 mov r11d, eax + 008ec 44 8b f0 mov r14d, eax + 008ef e9 b6 01 00 00 jmp $LN85@stbi__bmp_ +$LN310@stbi__bmp_: +; Line 5199 + 008f4 8b 7c 24 40 mov edi, DWORD PTR mr$1$[rsp] + 008f8 44 8b f8 mov r15d, eax + 008fb 85 ff test edi, edi + 008fd 0f 84 a2 06 00 00 je $LN86@stbi__bmp_ - 00a01 44 8b 7c 24 4c mov r15d, DWORD PTR mg$1$[rsp] - 00a06 45 85 ff test r15d, r15d - 00a09 0f 84 5a 08 00 + 00903 45 85 c9 test r9d, r9d + 00906 0f 84 99 06 00 00 je $LN86@stbi__bmp_ - 00a0f 85 c9 test ecx, ecx - 00a11 0f 84 52 08 00 + 0090c 85 c9 test ecx, ecx + 0090e 0f 84 91 06 00 00 je $LN86@stbi__bmp_ - -; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) - - 00a17 44 8b 54 24 64 mov r10d, DWORD PTR ma$1$[rsp] - 00a1c eb 09 jmp SHORT $LN372@stbi__bmp_ -$LN379@stbi__bmp_: - 00a1e 8b 7c 24 48 mov edi, DWORD PTR mr$1$[rsp] - 00a22 44 8b 7c 24 4c mov r15d, DWORD PTR mg$1$[rsp] -$LN372@stbi__bmp_: - -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); - - 00a27 8b cf mov ecx, edi - -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } - - 00a29 81 ff 00 00 01 - 00 cmp edi, 65536 ; 00010000H - 00a2f 72 03 jb SHORT $LN266@stbi__bmp_ - 00a31 c1 e9 10 shr ecx, 16 -$LN266@stbi__bmp_: - -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } - - 00a34 81 ff 00 00 01 - 00 cmp edi, 65536 ; 00010000H - 00a3a 41 b9 10 00 00 - 00 mov r9d, 16 - 00a40 41 8b d1 mov edx, r9d - 00a43 41 0f 42 d4 cmovb edx, r12d - 00a47 81 f9 00 01 00 - 00 cmp ecx, 256 ; 00000100H - 00a4d 72 06 jb SHORT $LN267@stbi__bmp_ - 00a4f 83 c2 08 add edx, 8 - 00a52 c1 e9 08 shr ecx, 8 -$LN267@stbi__bmp_: - -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } - - 00a55 41 3b c9 cmp ecx, r9d - 00a58 8d 42 04 lea eax, DWORD PTR [rdx+4] - 00a5b 44 8b c1 mov r8d, ecx - 00a5e 0f 42 c2 cmovb eax, edx - 00a61 41 c1 e8 04 shr r8d, 4 - 00a65 41 3b c9 cmp ecx, r9d - 00a68 44 0f 42 c1 cmovb r8d, ecx - -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } - - 00a6c 8d 50 02 lea edx, DWORD PTR [rax+2] - 00a6f 41 83 f8 04 cmp r8d, 4 - 00a73 41 8b c8 mov ecx, r8d - 00a76 0f 42 d0 cmovb edx, eax - 00a79 c1 e9 02 shr ecx, 2 - 00a7c 41 83 f8 04 cmp r8d, 4 - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00a80 8b c7 mov eax, edi - -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } - - 00a82 41 0f 42 c8 cmovb ecx, r8d - -; 4898 : return n; - - 00a86 83 f9 02 cmp ecx, 2 - 00a89 44 8d 5a 01 lea r11d, DWORD PTR [rdx+1] - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00a8d 8b cf mov ecx, edi - -; 4898 : return n; - - 00a8f 44 0f 42 da cmovb r11d, edx - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00a93 25 55 55 55 55 and eax, 1431655765 ; 55555555H - 00a98 d1 e9 shr ecx, 1 - -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); - - 00a9a 41 83 c3 f9 add r11d, -7 - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00a9e 81 e1 55 55 55 +; Line 5195 + 00914 44 8b 6c 24 38 mov r13d, DWORD PTR ma$1$[rsp] + 00919 eb 04 jmp SHORT $LN320@stbi__bmp_ +$LN327@stbi__bmp_: + 0091b 8b 7c 24 40 mov edi, DWORD PTR mr$1$[rsp] +$LN320@stbi__bmp_: +; Line 5201 + 0091f 8b cf mov ecx, edi + 00921 e8 00 00 00 00 call stbi__high_bit +; Line 4903 + 00926 8b d7 mov edx, edi + 00928 8b cf mov ecx, edi + 0092a d1 ea shr edx, 1 + 0092c 81 e1 55 55 55 55 and ecx, 1431655765 ; 55555555H - -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); - - 00aa4 44 89 5c 24 60 mov DWORD PTR rshift$1$[rsp], r11d - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00aa9 03 c8 add ecx, eax - -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 - - 00aab 8b c1 mov eax, ecx - 00aad 81 e1 33 33 33 + 00932 81 e2 55 55 55 + 55 and edx, 1431655765 ; 55555555H + 00938 03 d1 add edx, ecx +; Line 5201 + 0093a 44 8d 58 f9 lea r11d, DWORD PTR [rax-7] +; Line 4904 + 0093e 8b ca mov ecx, edx +; Line 5201 + 00940 44 89 5c 24 44 mov DWORD PTR rshift$1$[rsp], r11d +; Line 4904 + 00945 81 e2 33 33 33 + 33 and edx, 858993459 ; 33333333H + 0094b c1 e9 02 shr ecx, 2 + 0094e 81 e1 33 33 33 33 and ecx, 858993459 ; 33333333H - 00ab3 c1 e8 02 shr eax, 2 - 00ab6 25 33 33 33 33 and eax, 858993459 ; 33333333H - 00abb 03 c1 add eax, ecx - -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits - - 00abd 8b c8 mov ecx, eax - 00abf c1 e9 04 shr ecx, 4 - 00ac2 03 c8 add ecx, eax - 00ac4 81 e1 0f 0f 0f - 0f and ecx, 252645135 ; 0f0f0f0fH - -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits - - 00aca 8b c1 mov eax, ecx - 00acc c1 e8 08 shr eax, 8 - 00acf 03 c8 add ecx, eax - -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits - - 00ad1 8b c1 mov eax, ecx - 00ad3 c1 e8 10 shr eax, 16 - 00ad6 03 c1 add eax, ecx - -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); - - 00ad8 41 8b cf mov ecx, r15d - -; 4908 : return a & 0xff; - - 00adb 44 0f b6 e8 movzx r13d, al - -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } - - 00adf 41 81 ff 00 00 - 01 00 cmp r15d, 65536 ; 00010000H - 00ae6 72 03 jb SHORT $LN276@stbi__bmp_ - 00ae8 c1 e9 10 shr ecx, 16 -$LN276@stbi__bmp_: - -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } - - 00aeb 41 81 ff 00 00 - 01 00 cmp r15d, 65536 ; 00010000H - 00af2 41 8b d1 mov edx, r9d - 00af5 41 0f 42 d4 cmovb edx, r12d - 00af9 81 f9 00 01 00 - 00 cmp ecx, 256 ; 00000100H - 00aff 72 06 jb SHORT $LN277@stbi__bmp_ - 00b01 83 c2 08 add edx, 8 - 00b04 c1 e9 08 shr ecx, 8 -$LN277@stbi__bmp_: - -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); - - 00b07 8b 7c 24 50 mov edi, DWORD PTR mb$1$[rsp] - -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } - - 00b0b 8d 42 04 lea eax, DWORD PTR [rdx+4] - 00b0e 41 3b c9 cmp ecx, r9d - 00b11 44 8b c1 mov r8d, ecx - 00b14 0f 42 c2 cmovb eax, edx - 00b17 41 c1 e8 04 shr r8d, 4 - 00b1b 41 3b c9 cmp ecx, r9d - 00b1e 44 0f 42 c1 cmovb r8d, ecx - -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } - - 00b22 8d 50 02 lea edx, DWORD PTR [rax+2] - 00b25 41 83 f8 04 cmp r8d, 4 - 00b29 41 8b c8 mov ecx, r8d - 00b2c 0f 42 d0 cmovb edx, eax - 00b2f c1 e9 02 shr ecx, 2 - 00b32 41 83 f8 04 cmp r8d, 4 - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00b36 41 8b c7 mov eax, r15d - -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } - - 00b39 41 0f 42 c8 cmovb ecx, r8d - -; 4898 : return n; - - 00b3d 83 f9 02 cmp ecx, 2 - 00b40 44 8d 72 01 lea r14d, DWORD PTR [rdx+1] - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00b44 41 8b cf mov ecx, r15d - -; 4898 : return n; - - 00b47 44 0f 42 f2 cmovb r14d, edx - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00b4b 25 55 55 55 55 and eax, 1431655765 ; 55555555H - 00b50 d1 e9 shr ecx, 1 - -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); - - 00b52 41 83 c6 f9 add r14d, -7 - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00b56 81 e1 55 55 55 + 00954 03 ca add ecx, edx +; Line 4905 + 00956 8b d1 mov edx, ecx + 00958 c1 ea 04 shr edx, 4 + 0095b 03 d1 add edx, ecx +; Line 5202 + 0095d 41 8b c9 mov ecx, r9d +; Line 4905 + 00960 81 e2 0f 0f 0f + 0f and edx, 252645135 ; 0f0f0f0fH +; Line 4906 + 00966 8b c2 mov eax, edx + 00968 c1 e8 08 shr eax, 8 + 0096b 03 d0 add edx, eax +; Line 4907 + 0096d 8b c2 mov eax, edx + 0096f c1 e8 10 shr eax, 16 + 00972 03 c2 add eax, edx +; Line 4908 + 00974 44 0f b6 d0 movzx r10d, al +; Line 5202 + 00978 e8 00 00 00 00 call stbi__high_bit +; Line 5203 + 0097d 8b 7c 24 50 mov edi, DWORD PTR mb$1$[rsp] +; Line 4903 + 00981 41 8b d1 mov edx, r9d + 00984 d1 ea shr edx, 1 + 00986 41 8b c9 mov ecx, r9d + 00989 81 e2 55 55 55 + 55 and edx, 1431655765 ; 55555555H + 0098f 81 e1 55 55 55 55 and ecx, 1431655765 ; 55555555H - -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); - - 00b5c 44 89 74 24 44 mov DWORD PTR gshift$1$[rsp], r14d - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00b61 03 c8 add ecx, eax - -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 - - 00b63 8b c1 mov eax, ecx - 00b65 81 e1 33 33 33 + 00995 03 d1 add edx, ecx +; Line 5202 + 00997 44 8d 70 f9 lea r14d, DWORD PTR [rax-7] +; Line 4904 + 0099b 8b ca mov ecx, edx +; Line 5202 + 0099d 44 89 74 24 4c mov DWORD PTR gshift$1$[rsp], r14d +; Line 4904 + 009a2 81 e2 33 33 33 + 33 and edx, 858993459 ; 33333333H + 009a8 c1 e9 02 shr ecx, 2 + 009ab 81 e1 33 33 33 33 and ecx, 858993459 ; 33333333H - 00b6b c1 e8 02 shr eax, 2 - 00b6e 25 33 33 33 33 and eax, 858993459 ; 33333333H - 00b73 03 c1 add eax, ecx - -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits - - 00b75 8b c8 mov ecx, eax - 00b77 c1 e9 04 shr ecx, 4 - 00b7a 03 c8 add ecx, eax - 00b7c 81 e1 0f 0f 0f - 0f and ecx, 252645135 ; 0f0f0f0fH - -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits - - 00b82 8b c1 mov eax, ecx - 00b84 c1 e8 08 shr eax, 8 - 00b87 03 c8 add ecx, eax - -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits - - 00b89 8b c1 mov eax, ecx - 00b8b c1 e8 10 shr eax, 16 - 00b8e 03 c1 add eax, ecx - -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); - - 00b90 8b cf mov ecx, edi - -; 4908 : return a & 0xff; - - 00b92 44 0f b6 e0 movzx r12d, al - -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } - - 00b96 81 ff 00 00 01 - 00 cmp edi, 65536 ; 00010000H - 00b9c 72 03 jb SHORT $LN286@stbi__bmp_ - 00b9e c1 e9 10 shr ecx, 16 -$LN286@stbi__bmp_: - -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } - - 00ba1 81 ff 00 00 01 - 00 cmp edi, 65536 ; 00010000H - 00ba7 41 8b d1 mov edx, r9d - 00baa b8 00 00 00 00 mov eax, 0 - 00baf 0f 42 d0 cmovb edx, eax - 00bb2 81 f9 00 01 00 - 00 cmp ecx, 256 ; 00000100H - 00bb8 72 06 jb SHORT $LN287@stbi__bmp_ - 00bba 83 c2 08 add edx, 8 - 00bbd c1 e9 08 shr ecx, 8 -$LN287@stbi__bmp_: - -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } - - 00bc0 41 3b c9 cmp ecx, r9d - 00bc3 8d 42 04 lea eax, DWORD PTR [rdx+4] - 00bc6 44 8b c1 mov r8d, ecx - 00bc9 0f 42 c2 cmovb eax, edx - 00bcc 41 c1 e8 04 shr r8d, 4 - 00bd0 41 3b c9 cmp ecx, r9d - 00bd3 44 0f 42 c1 cmovb r8d, ecx - -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } - - 00bd7 8d 50 02 lea edx, DWORD PTR [rax+2] - 00bda 41 83 f8 04 cmp r8d, 4 - 00bde 41 8b c8 mov ecx, r8d - 00be1 0f 42 d0 cmovb edx, eax - 00be4 c1 e9 02 shr ecx, 2 - 00be7 41 83 f8 04 cmp r8d, 4 - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00beb 8b c7 mov eax, edi - -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } - - 00bed 41 0f 42 c8 cmovb ecx, r8d - -; 4898 : return n; - - 00bf1 83 f9 02 cmp ecx, 2 - 00bf4 44 8d 42 01 lea r8d, DWORD PTR [rdx+1] - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00bf8 8b cf mov ecx, edi - -; 4898 : return n; - - 00bfa 44 0f 42 c2 cmovb r8d, edx - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00bfe 25 55 55 55 55 and eax, 1431655765 ; 55555555H - 00c03 d1 e9 shr ecx, 1 - -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); - - 00c05 41 83 c0 f9 add r8d, -7 - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00c09 81 e1 55 55 55 + 009b1 03 ca add ecx, edx +; Line 4905 + 009b3 8b d1 mov edx, ecx + 009b5 c1 ea 04 shr edx, 4 + 009b8 03 d1 add edx, ecx +; Line 5203 + 009ba 8b cf mov ecx, edi +; Line 4905 + 009bc 81 e2 0f 0f 0f + 0f and edx, 252645135 ; 0f0f0f0fH +; Line 4906 + 009c2 8b c2 mov eax, edx + 009c4 c1 e8 08 shr eax, 8 + 009c7 03 d0 add edx, eax +; Line 4907 + 009c9 8b c2 mov eax, edx + 009cb c1 e8 10 shr eax, 16 + 009ce 03 c2 add eax, edx +; Line 4908 + 009d0 44 0f b6 c8 movzx r9d, al +; Line 5203 + 009d4 e8 00 00 00 00 call stbi__high_bit + 009d9 83 e8 07 sub eax, 7 +; Line 4903 + 009dc 8b d7 mov edx, edi + 009de d1 ea shr edx, 1 + 009e0 8b cf mov ecx, edi + 009e2 81 e2 55 55 55 + 55 and edx, 1431655765 ; 55555555H +; Line 5203 + 009e8 89 44 24 34 mov DWORD PTR bshift$1$[rsp], eax +; Line 4903 + 009ec 81 e1 55 55 55 55 and ecx, 1431655765 ; 55555555H - -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); - - 00c0f 44 89 44 24 3c mov DWORD PTR bshift$1$[rsp], r8d - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00c14 03 c8 add ecx, eax - -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 - - 00c16 8b c1 mov eax, ecx - 00c18 81 e1 33 33 33 + 009f2 03 d1 add edx, ecx +; Line 4904 + 009f4 8b ca mov ecx, edx + 009f6 81 e2 33 33 33 + 33 and edx, 858993459 ; 33333333H + 009fc c1 e9 02 shr ecx, 2 + 009ff 81 e1 33 33 33 33 and ecx, 858993459 ; 33333333H - 00c1e c1 e8 02 shr eax, 2 - 00c21 25 33 33 33 33 and eax, 858993459 ; 33333333H - 00c26 03 c1 add eax, ecx - -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits - - 00c28 8b c8 mov ecx, eax - 00c2a c1 e9 04 shr ecx, 4 - 00c2d 03 c8 add ecx, eax - 00c2f 81 e1 0f 0f 0f - 0f and ecx, 252645135 ; 0f0f0f0fH - -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits - - 00c35 8b c1 mov eax, ecx - 00c37 c1 e8 08 shr eax, 8 - 00c3a 03 c8 add ecx, eax - -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits - - 00c3c 8b c1 mov eax, ecx - 00c3e c1 e8 10 shr eax, 16 - 00c41 03 c1 add eax, ecx - -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); - - 00c43 41 8b ca mov ecx, r10d - -; 4908 : return a & 0xff; - - 00c46 44 0f b6 f8 movzx r15d, al - -; 4892 : if (z == 0) return -1; - - 00c4a 45 85 d2 test r10d, r10d - 00c4d 75 06 jne SHORT $LN295@stbi__bmp_ - 00c4f 41 8d 52 ff lea edx, QWORD PTR [r10-1] - 00c53 eb 5e jmp SHORT $LN294@stbi__bmp_ -$LN295@stbi__bmp_: - -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } - - 00c55 41 81 fa 00 00 - 01 00 cmp r10d, 65536 ; 00010000H - 00c5c 72 0a jb SHORT $LN524@stbi__bmp_ - 00c5e c1 e9 10 shr ecx, 16 - -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } - - 00c61 41 81 fa 00 00 - 01 00 cmp r10d, 65536 ; 00010000H -$LN524@stbi__bmp_: - 00c68 b8 00 00 00 00 mov eax, 0 - 00c6d 44 0f 42 c8 cmovb r9d, eax - 00c71 81 f9 00 01 00 - 00 cmp ecx, 256 ; 00000100H - 00c77 72 07 jb SHORT $LN297@stbi__bmp_ - 00c79 41 83 c1 08 add r9d, 8 - 00c7d c1 e9 08 shr ecx, 8 -$LN297@stbi__bmp_: - -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } - - 00c80 83 f9 10 cmp ecx, 16 - 00c83 41 8d 41 04 lea eax, DWORD PTR [r9+4] - 00c87 8b d1 mov edx, ecx - 00c89 41 0f 42 c1 cmovb eax, r9d - 00c8d c1 ea 04 shr edx, 4 - 00c90 83 f9 10 cmp ecx, 16 - 00c93 0f 42 d1 cmovb edx, ecx - -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } - - 00c96 83 fa 04 cmp edx, 4 - 00c99 8d 48 02 lea ecx, DWORD PTR [rax+2] - 00c9c 0f 42 c8 cmovb ecx, eax - 00c9f 8b c2 mov eax, edx - 00ca1 c1 e8 02 shr eax, 2 - 00ca4 83 fa 04 cmp edx, 4 - 00ca7 0f 42 c2 cmovb eax, edx - -; 4898 : return n; - - 00caa 8d 51 01 lea edx, DWORD PTR [rcx+1] - 00cad 83 f8 02 cmp eax, 2 - 00cb0 0f 42 d1 cmovb edx, ecx -$LN294@stbi__bmp_: - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00cb3 41 8b ca mov ecx, r10d - -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); - - 00cb6 83 c2 f9 add edx, -7 - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00cb9 d1 e9 shr ecx, 1 - 00cbb 41 8b c2 mov eax, r10d - 00cbe 25 55 55 55 55 and eax, 1431655765 ; 55555555H - -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); - - 00cc3 89 54 24 30 mov DWORD PTR ashift$1$[rsp], edx - -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - - 00cc7 81 e1 55 55 55 + 00a05 03 ca add ecx, edx +; Line 4905 + 00a07 8b d1 mov edx, ecx + 00a09 c1 ea 04 shr edx, 4 + 00a0c 03 d1 add edx, ecx +; Line 5204 + 00a0e 41 8b cd mov ecx, r13d +; Line 4905 + 00a11 81 e2 0f 0f 0f + 0f and edx, 252645135 ; 0f0f0f0fH +; Line 4906 + 00a17 8b c2 mov eax, edx + 00a19 c1 e8 08 shr eax, 8 + 00a1c 03 d0 add edx, eax +; Line 4907 + 00a1e 8b c2 mov eax, edx + 00a20 c1 e8 10 shr eax, 16 + 00a23 03 c2 add eax, edx +; Line 4908 + 00a25 44 0f b6 e0 movzx r12d, al +; Line 5204 + 00a29 e8 00 00 00 00 call stbi__high_bit + 00a2e 44 8d 40 f9 lea r8d, DWORD PTR [rax-7] +; Line 4903 + 00a32 41 8b d5 mov edx, r13d + 00a35 d1 ea shr edx, 1 + 00a37 41 8b cd mov ecx, r13d + 00a3a 81 e2 55 55 55 + 55 and edx, 1431655765 ; 55555555H +; Line 5204 + 00a40 44 89 44 24 54 mov DWORD PTR ashift$1$[rsp], r8d +; Line 4903 + 00a45 81 e1 55 55 55 55 and ecx, 1431655765 ; 55555555H - 00ccd 03 c8 add ecx, eax - -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 - - 00ccf 8b c1 mov eax, ecx - 00cd1 81 e1 33 33 33 + 00a4b 03 d1 add edx, ecx +; Line 4904 + 00a4d 8b ca mov ecx, edx + 00a4f 81 e2 33 33 33 + 33 and edx, 858993459 ; 33333333H + 00a55 c1 e9 02 shr ecx, 2 + 00a58 81 e1 33 33 33 33 and ecx, 858993459 ; 33333333H - 00cd7 c1 e8 02 shr eax, 2 - 00cda 25 33 33 33 33 and eax, 858993459 ; 33333333H - 00cdf 03 c1 add eax, ecx - -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits - - 00ce1 8b c8 mov ecx, eax - 00ce3 c1 e9 04 shr ecx, 4 - 00ce6 03 c8 add ecx, eax - 00ce8 81 e1 0f 0f 0f - 0f and ecx, 252645135 ; 0f0f0f0fH - -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits - - 00cee 8b c1 mov eax, ecx - 00cf0 c1 e8 08 shr eax, 8 - 00cf3 03 c8 add ecx, eax - -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits - - 00cf5 8b c1 mov eax, ecx - 00cf7 c1 e8 10 shr eax, 16 - 00cfa 03 c1 add eax, ecx - -; 4908 : return a & 0xff; - - 00cfc 0f b6 f8 movzx edi, al - -; 5205 : if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } - - 00cff 41 83 fd 08 cmp r13d, 8 - 00d03 0f 87 60 05 00 + 00a5e 03 ca add ecx, edx +; Line 4905 + 00a60 8b d1 mov edx, ecx + 00a62 c1 ea 04 shr edx, 4 + 00a65 03 d1 add edx, ecx + 00a67 81 e2 0f 0f 0f + 0f and edx, 252645135 ; 0f0f0f0fH +; Line 4906 + 00a6d 8b c2 mov eax, edx + 00a6f c1 e8 08 shr eax, 8 + 00a72 03 d0 add edx, eax +; Line 4907 + 00a74 8b c2 mov eax, edx + 00a76 c1 e8 10 shr eax, 16 + 00a79 03 c2 add eax, edx +; Line 4908 + 00a7b 0f b6 f8 movzx edi, al +; Line 5205 + 00a7e 41 83 fa 08 cmp r10d, 8 + 00a82 0f 87 1d 05 00 00 ja $LN86@stbi__bmp_ - 00d09 41 83 fc 08 cmp r12d, 8 - 00d0d 0f 87 56 05 00 + 00a88 41 83 f9 08 cmp r9d, 8 + 00a8c 0f 87 13 05 00 00 ja $LN86@stbi__bmp_ - 00d13 41 83 ff 08 cmp r15d, 8 - 00d17 0f 87 4c 05 00 + 00a92 41 83 fc 08 cmp r12d, 8 + 00a96 0f 87 09 05 00 00 ja $LN86@stbi__bmp_ - 00d1d 83 ff 08 cmp edi, 8 - 00d20 0f 87 43 05 00 + 00a9c 83 ff 08 cmp edi, 8 + 00a9f 0f 87 00 05 00 00 ja $LN86@stbi__bmp_ - 00d26 44 8b 4c 24 34 mov r9d, DWORD PTR pad$2$[rsp] + 00aa5 48 8b 54 24 60 mov rdx, QWORD PTR $T1[rsp] $LN85@stbi__bmp_: - -; 5206 : } -; 5207 : for (j = 0; j < (int)s->img_y; ++j) { - - 00d2b 33 c0 xor eax, eax - 00d2d 44 8b d0 mov r10d, eax - 00d30 89 84 24 48 05 - 00 00 mov DWORD PTR j$3$[rsp], eax - 00d37 8b 43 04 mov eax, DWORD PTR [rbx+4] - 00d3a 85 c0 test eax, eax - 00d3c 0f 8e 12 04 00 +; Line 5207 + 00aaa 8b 43 04 mov eax, DWORD PTR [rbx+4] + 00aad 89 6c 24 30 mov DWORD PTR j$3$[rsp], ebp + 00ab1 85 c0 test eax, eax + 00ab3 0f 8e dd 03 00 00 jle $LN18@stbi__bmp_ - -; 4929 : v >>= (8 - bits); - - 00d42 b9 08 00 00 00 mov ecx, 8 - 00d47 48 89 bc 24 98 - 00 00 00 mov QWORD PTR tv4023[rsp], rdi - -; 4925 : v <<= -shift; - - 00d4f 41 8b c3 mov eax, r11d - 00d52 f7 d8 neg eax - 00d54 89 44 24 6c mov DWORD PTR tv4035[rsp], eax - -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); - - 00d58 8b c1 mov eax, ecx - 00d5a 41 2b c5 sub eax, r13d - 00d5d 89 44 24 70 mov DWORD PTR tv4034[rsp], eax - -; 4925 : v <<= -shift; - - 00d61 41 8b c6 mov eax, r14d - 00d64 f7 d8 neg eax - 00d66 89 44 24 74 mov DWORD PTR tv4033[rsp], eax - -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); - - 00d6a 8b c1 mov eax, ecx - 00d6c 41 2b c4 sub eax, r12d - 00d6f 89 44 24 78 mov DWORD PTR tv4032[rsp], eax - -; 4925 : v <<= -shift; - - 00d73 41 8b c0 mov eax, r8d - 00d76 f7 d8 neg eax - 00d78 89 44 24 7c mov DWORD PTR tv4030[rsp], eax - -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); - - 00d7c 8b c1 mov eax, ecx - 00d7e 41 2b c7 sub eax, r15d - 00d81 89 84 24 80 00 - 00 00 mov DWORD PTR tv4029[rsp], eax - -; 4925 : v <<= -shift; - - 00d88 8b c2 mov eax, edx - 00d8a f7 d8 neg eax - 00d8c 89 84 24 84 00 - 00 00 mov DWORD PTR tv4028[rsp], eax - -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); - - 00d93 2b cf sub ecx, edi - 00d95 41 8b c5 mov eax, r13d - 00d98 4c 8b 6c 24 58 mov r13, QWORD PTR $T22[rsp] - 00d9d 48 89 84 24 c8 - 00 00 00 mov QWORD PTR tv4026[rsp], rax - 00da5 89 8c 24 88 00 - 00 00 mov DWORD PTR tv4027[rsp], ecx - 00dac 41 8b cc mov ecx, r12d - 00daf 45 8b e2 mov r12d, r10d - 00db2 41 8b c7 mov eax, r15d - 00db5 48 89 84 24 d8 - 00 00 00 mov QWORD PTR tv4024[rsp], rax - 00dbd 48 89 8c 24 d0 - 00 00 00 mov QWORD PTR tv4025[rsp], rcx +; Line 4925 + 00ab9 41 8b c3 mov eax, r11d +; Line 4929 + 00abc 48 89 7c 24 68 mov QWORD PTR tv3245[rsp], rdi +; Line 4925 + 00ac1 f7 d8 neg eax + 00ac3 89 44 24 5c mov DWORD PTR tv3256[rsp], eax +; Line 4929 + 00ac7 b8 08 00 00 00 mov eax, 8 + 00acc 8b c8 mov ecx, eax + 00ace 41 2b ca sub ecx, r10d + 00ad1 89 4c 24 58 mov DWORD PTR tv3255[rsp], ecx +; Line 4925 + 00ad5 41 8b ce mov ecx, r14d + 00ad8 f7 d9 neg ecx + 00ada 89 4c 24 38 mov DWORD PTR tv3254[rsp], ecx +; Line 4929 + 00ade 8b c8 mov ecx, eax + 00ae0 41 2b c9 sub ecx, r9d + 00ae3 89 4c 24 70 mov DWORD PTR tv3253[rsp], ecx +; Line 4925 + 00ae7 8b 4c 24 34 mov ecx, DWORD PTR bshift$1$[rsp] + 00aeb f7 d9 neg ecx + 00aed 89 4c 24 74 mov DWORD PTR tv3252[rsp], ecx +; Line 4929 + 00af1 8b c8 mov ecx, eax + 00af3 41 2b cc sub ecx, r12d + 00af6 89 4c 24 78 mov DWORD PTR tv3251[rsp], ecx +; Line 4925 + 00afa 41 8b c8 mov ecx, r8d + 00afd f7 d9 neg ecx +; Line 4929 + 00aff 2b c7 sub eax, edi + 00b01 89 4c 24 7c mov DWORD PTR tv3250[rsp], ecx + 00b05 89 84 24 80 00 + 00 00 mov DWORD PTR tv3249[rsp], eax + 00b0c 41 8b c2 mov eax, r10d + 00b0f 48 89 84 24 c0 + 00 00 00 mov QWORD PTR tv3248[rsp], rax + 00b17 41 8b c4 mov eax, r12d + 00b1a 41 8b c9 mov ecx, r9d + 00b1d 48 89 84 24 d0 + 00 00 00 mov QWORD PTR tv3246[rsp], rax + 00b25 48 89 8c 24 c8 + 00 00 00 mov QWORD PTR tv3247[rsp], rcx + 00b2d 0f 1f 00 npad 3 $LL19@stbi__bmp_: - -; 5208 : if (easy) { - - 00dc5 8b 03 mov eax, DWORD PTR [rbx] - 00dc7 45 33 ff xor r15d, r15d - 00dca 49 63 cc movsxd rcx, r12d - 00dcd 4d 85 ed test r13, r13 - 00dd0 0f 84 83 01 00 +; Line 5208 + 00b30 8b 03 mov eax, DWORD PTR [rbx] + 00b32 45 33 e4 xor r12d, r12d + 00b35 48 63 cd movsxd rcx, ebp + 00b38 48 85 d2 test rdx, rdx + 00b3b 0f 84 8c 01 00 00 je $LN87@stbi__bmp_ - -; 5209 : for (i = 0; i < (int)s->img_x; ++i) { - - 00dd6 85 c0 test eax, eax - 00dd8 0f 8e 07 03 00 +; Line 5209 + 00b41 85 c0 test eax, eax + 00b43 0f 8e ec 02 00 00 jle $LN24@stbi__bmp_ - 00dde 4c 8d 34 0e lea r14, QWORD PTR [rsi+rcx] - 00de2 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] - 00de6 66 66 0f 1f 84 - 00 00 00 00 00 npad 10 + 00b49 4c 8d 34 31 lea r14, QWORD PTR [rcx+rsi] + 00b4d 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] + 00b51 0f 1f 40 00 66 + 66 66 0f 1f 84 + 00 00 00 00 00 npad 15 $LL22@stbi__bmp_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00df0 48 8b 83 c0 00 +; Line 1077 + 00b60 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00df7 48 3b 83 c8 00 + 00b67 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 00dfe 73 0f jae SHORT $LN157@stbi__bmp_ - -; 1078 : return *s->img_buffer++; - - 00e00 0f b6 08 movzx ecx, BYTE PTR [rax] - 00e03 48 ff c0 inc rax - 00e06 48 89 83 c0 00 + 00b6e 73 0f jae SHORT $LN157@stbi__bmp_ +; Line 1078 + 00b70 0f b6 08 movzx ecx, BYTE PTR [rax] + 00b73 48 ff c0 inc rax + 00b76 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00e0d eb 2a jmp SHORT $LN156@stbi__bmp_ + 00b7d eb 2a jmp SHORT $LN156@stbi__bmp_ $LN157@stbi__bmp_: - -; 1079 : if (s->read_from_callbacks) { - - 00e0f 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 - 00e13 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] - 00e17 74 1e je SHORT $LN158@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 00e19 48 8b cb mov rcx, rbx - 00e1c e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00e21 48 8b 83 c0 00 +; Line 1079 + 00b7f 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 + 00b83 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] + 00b87 74 1e je SHORT $LN158@stbi__bmp_ +; Line 1080 + 00b89 48 8b cb mov rcx, rbx + 00b8c e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00b91 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00e28 0f b6 08 movzx ecx, BYTE PTR [rax] - 00e2b 48 ff c0 inc rax - 00e2e 48 89 83 c0 00 + 00b98 0f b6 08 movzx ecx, BYTE PTR [rax] + 00b9b 48 ff c0 inc rax + 00b9e 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00e35 eb 02 jmp SHORT $LN156@stbi__bmp_ + 00ba5 eb 02 jmp SHORT $LN156@stbi__bmp_ $LN158@stbi__bmp_: - -; 1082 : } -; 1083 : return 0; - - 00e37 32 c9 xor cl, cl +; Line 1083 + 00ba7 32 c9 xor cl, cl $LN156@stbi__bmp_: - -; 5210 : unsigned char a; -; 5211 : out[z + 2] = stbi__get8(s); - - 00e39 41 88 4e 02 mov BYTE PTR [r14+2], cl - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00e3d 48 8b 83 c0 00 +; Line 5211 + 00ba9 41 88 4e 02 mov BYTE PTR [r14+2], cl +; Line 1077 + 00bad 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00e44 48 3b 83 c8 00 + 00bb4 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 00e4b 73 0f jae SHORT $LN153@stbi__bmp_ - -; 1078 : return *s->img_buffer++; - - 00e4d 0f b6 08 movzx ecx, BYTE PTR [rax] - 00e50 48 ff c0 inc rax - 00e53 48 89 83 c0 00 + 00bbb 73 0f jae SHORT $LN153@stbi__bmp_ +; Line 1078 + 00bbd 0f b6 08 movzx ecx, BYTE PTR [rax] + 00bc0 48 ff c0 inc rax + 00bc3 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00e5a eb 25 jmp SHORT $LN152@stbi__bmp_ + 00bca eb 25 jmp SHORT $LN152@stbi__bmp_ $LN153@stbi__bmp_: - -; 1079 : if (s->read_from_callbacks) { - - 00e5c 83 3f 00 cmp DWORD PTR [rdi], 0 - 00e5f 74 1e je SHORT $LN154@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 00e61 48 8b cb mov rcx, rbx - 00e64 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00e69 48 8b 83 c0 00 +; Line 1079 + 00bcc 83 3f 00 cmp DWORD PTR [rdi], 0 + 00bcf 74 1e je SHORT $LN154@stbi__bmp_ +; Line 1080 + 00bd1 48 8b cb mov rcx, rbx + 00bd4 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00bd9 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00e70 0f b6 08 movzx ecx, BYTE PTR [rax] - 00e73 48 ff c0 inc rax - 00e76 48 89 83 c0 00 + 00be0 0f b6 08 movzx ecx, BYTE PTR [rax] + 00be3 48 ff c0 inc rax + 00be6 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00e7d eb 02 jmp SHORT $LN152@stbi__bmp_ + 00bed eb 02 jmp SHORT $LN152@stbi__bmp_ $LN154@stbi__bmp_: - -; 1082 : } -; 1083 : return 0; - - 00e7f 32 c9 xor cl, cl +; Line 1083 + 00bef 32 c9 xor cl, cl $LN152@stbi__bmp_: - -; 5212 : out[z + 1] = stbi__get8(s); - - 00e81 41 88 4e 01 mov BYTE PTR [r14+1], cl - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00e85 48 8b 83 c0 00 +; Line 5212 + 00bf1 41 88 4e 01 mov BYTE PTR [r14+1], cl +; Line 1077 + 00bf5 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00e8c 48 3b 83 c8 00 + 00bfc 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 00e93 73 0f jae SHORT $LN149@stbi__bmp_ - -; 1078 : return *s->img_buffer++; - - 00e95 0f b6 08 movzx ecx, BYTE PTR [rax] - 00e98 48 ff c0 inc rax - 00e9b 48 89 83 c0 00 + 00c03 73 0f jae SHORT $LN149@stbi__bmp_ +; Line 1078 + 00c05 0f b6 08 movzx ecx, BYTE PTR [rax] + 00c08 48 ff c0 inc rax + 00c0b 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00ea2 eb 25 jmp SHORT $LN148@stbi__bmp_ + 00c12 eb 25 jmp SHORT $LN148@stbi__bmp_ $LN149@stbi__bmp_: - -; 1079 : if (s->read_from_callbacks) { - - 00ea4 83 3f 00 cmp DWORD PTR [rdi], 0 - 00ea7 74 1e je SHORT $LN150@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 00ea9 48 8b cb mov rcx, rbx - 00eac e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00eb1 48 8b 83 c0 00 +; Line 1079 + 00c14 83 3f 00 cmp DWORD PTR [rdi], 0 + 00c17 74 1e je SHORT $LN150@stbi__bmp_ +; Line 1080 + 00c19 48 8b cb mov rcx, rbx + 00c1c e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00c21 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00eb8 0f b6 08 movzx ecx, BYTE PTR [rax] - 00ebb 48 ff c0 inc rax - 00ebe 48 89 83 c0 00 + 00c28 0f b6 08 movzx ecx, BYTE PTR [rax] + 00c2b 48 ff c0 inc rax + 00c2e 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00ec5 eb 02 jmp SHORT $LN148@stbi__bmp_ + 00c35 eb 02 jmp SHORT $LN148@stbi__bmp_ $LN150@stbi__bmp_: - -; 1082 : } -; 1083 : return 0; - - 00ec7 32 c9 xor cl, cl +; Line 1083 + 00c37 32 c9 xor cl, cl $LN148@stbi__bmp_: - -; 5213 : out[z + 0] = stbi__get8(s); - - 00ec9 41 88 0e mov BYTE PTR [r14], cl - -; 5214 : z += 3; - - 00ecc 41 83 c4 03 add r12d, 3 - 00ed0 49 83 c6 03 add r14, 3 - -; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); - - 00ed4 49 83 fd 02 cmp r13, 2 - 00ed8 75 53 jne SHORT $LN99@stbi__bmp_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00eda 48 8b 83 c0 00 +; Line 5213 + 00c39 41 88 0e mov BYTE PTR [r14], cl +; Line 5214 + 00c3c 83 c5 03 add ebp, 3 + 00c3f 49 83 c6 03 add r14, 3 +; Line 5215 + 00c43 48 83 7c 24 60 + 02 cmp QWORD PTR $T1[rsp], 2 + 00c49 75 53 jne SHORT $LN99@stbi__bmp_ +; Line 1077 + 00c4b 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00ee1 48 3b 83 c8 00 + 00c52 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 00ee8 73 0f jae SHORT $LN207@stbi__bmp_ - -; 1078 : return *s->img_buffer++; - - 00eea 0f b6 08 movzx ecx, BYTE PTR [rax] - 00eed 48 ff c0 inc rax - 00ef0 48 89 83 c0 00 + 00c59 73 0f jae SHORT $LN207@stbi__bmp_ +; Line 1078 + 00c5b 0f b6 08 movzx ecx, BYTE PTR [rax] + 00c5e 48 ff c0 inc rax + 00c61 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00ef7 eb 26 jmp SHORT $LN525@stbi__bmp_ + 00c68 eb 26 jmp SHORT $LN449@stbi__bmp_ $LN207@stbi__bmp_: - -; 1079 : if (s->read_from_callbacks) { - - 00ef9 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 - 00efd 74 1e je SHORT $LN208@stbi__bmp_ - -; 1080 : stbi__refill_buffer(s); - - 00eff 48 8b cb mov rcx, rbx - 00f02 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00f07 48 8b 83 c0 00 +; Line 1079 + 00c6a 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 + 00c6e 74 1e je SHORT $LN208@stbi__bmp_ +; Line 1080 + 00c70 48 8b cb mov rcx, rbx + 00c73 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00c78 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00f0e 0f b6 08 movzx ecx, BYTE PTR [rax] - 00f11 48 ff c0 inc rax - 00f14 48 89 83 c0 00 + 00c7f 0f b6 08 movzx ecx, BYTE PTR [rax] + 00c82 48 ff c0 inc rax + 00c85 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00f1b eb 02 jmp SHORT $LN525@stbi__bmp_ + 00c8c eb 02 jmp SHORT $LN449@stbi__bmp_ $LN208@stbi__bmp_: - -; 1082 : } -; 1083 : return 0; - - 00f1d 32 c9 xor cl, cl -$LN525@stbi__bmp_: - -; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); - - 00f1f ba 30 00 00 00 mov edx, 48 ; 00000030H - 00f24 48 8b c3 mov rax, rbx - 00f27 48 8d 3c 13 lea rdi, QWORD PTR [rbx+rdx] - 00f2b eb 06 jmp SHORT $LN100@stbi__bmp_ +; Line 1083 + 00c8e 32 c9 xor cl, cl +$LN449@stbi__bmp_: +; Line 5215 + 00c90 ba 30 00 00 00 mov edx, 48 ; 00000030H + 00c95 48 8b c3 mov rax, rbx + 00c98 48 8d 3c 13 lea rdi, QWORD PTR [rbx+rdx] + 00c9c eb 06 jmp SHORT $LN100@stbi__bmp_ $LN99@stbi__bmp_: - 00f2d b1 ff mov cl, 255 ; 000000ffH - 00f2f 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] + 00c9e b1 ff mov cl, 255 ; 000000ffH + 00ca0 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] $LN100@stbi__bmp_: - -; 5216 : all_a |= a; - - 00f33 0f b6 c1 movzx eax, cl - 00f36 09 44 24 38 or DWORD PTR all_a$1$[rsp], eax - -; 5217 : if (target == 4) out[z++] = a; - - 00f3a 83 fd 04 cmp ebp, 4 - 00f3d 75 09 jne SHORT $LN20@stbi__bmp_ - 00f3f 41 ff c4 inc r12d - 00f42 41 88 0e mov BYTE PTR [r14], cl - 00f45 49 ff c6 inc r14 +; Line 5216 + 00ca4 0f b6 c1 movzx eax, cl + 00ca7 09 84 24 48 05 + 00 00 or DWORD PTR all_a$1$[rsp], eax +; Line 5217 + 00cae 41 83 ff 04 cmp r15d, 4 + 00cb2 75 08 jne SHORT $LN20@stbi__bmp_ + 00cb4 ff c5 inc ebp + 00cb6 41 88 0e mov BYTE PTR [r14], cl + 00cb9 49 ff c6 inc r14 $LN20@stbi__bmp_: - -; 5209 : for (i = 0; i < (int)s->img_x; ++i) { - - 00f48 41 ff c7 inc r15d - 00f4b 44 3b 3b cmp r15d, DWORD PTR [rbx] - 00f4e 0f 8c 9c fe ff +; Line 5209 + 00cbc 41 ff c4 inc r12d + 00cbf 44 3b 23 cmp r12d, DWORD PTR [rbx] + 00cc2 0f 8c 98 fe ff ff jl $LL22@stbi__bmp_ - -; 5218 : } -; 5219 : } - - 00f54 e9 7f 01 00 00 jmp $LN526@stbi__bmp_ +; Line 5219 + 00cc8 e9 68 01 00 00 jmp $LN24@stbi__bmp_ $LN87@stbi__bmp_: - -; 5220 : else { -; 5221 : int bpp = info.bpp; -; 5222 : for (i = 0; i < (int)s->img_x; ++i) { - - 00f59 85 c0 test eax, eax - 00f5b 0f 8e 84 01 00 +; Line 5222 + 00ccd 85 c0 test eax, eax + 00ccf 0f 8e 60 01 00 00 jle $LN24@stbi__bmp_ - 00f61 44 8b 6c 24 44 mov r13d, DWORD PTR gshift$1$[rsp] - 00f66 4c 8d 34 0e lea r14, QWORD PTR [rsi+rcx] - 00f6a 8b 74 24 40 mov esi, DWORD PTR info$3$[rsp] - 00f6e 66 90 npad 2 + 00cd5 4c 8d 34 31 lea r14, QWORD PTR [rcx+rsi] + 00cd9 8b 74 24 3c mov esi, DWORD PTR info$3$[rsp] + 00cdd 0f 1f 00 npad 3 $LL25@stbi__bmp_: - -; 5223 : stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s)); - - 00f70 48 8b cb mov rcx, rbx - 00f73 e8 00 00 00 00 call stbi__get16le - 00f78 83 fe 10 cmp esi, 16 - 00f7b 74 17 je SHORT $LN102@stbi__bmp_ - -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; - - 00f7d 48 8b cb mov rcx, rbx - 00f80 8b f8 mov edi, eax - 00f82 e8 00 00 00 00 call stbi__get16le - 00f87 c1 e0 10 shl eax, 16 - 00f8a 03 c7 add eax, edi - 00f8c 48 8b bc 24 98 - 00 00 00 mov rdi, QWORD PTR tv4023[rsp] +; Line 5223 + 00ce0 48 8b cb mov rcx, rbx + 00ce3 e8 00 00 00 00 call stbi__get16le + 00ce8 83 fe 10 cmp esi, 16 + 00ceb 74 14 je SHORT $LN102@stbi__bmp_ +; Line 1187 + 00ced 48 8b cb mov rcx, rbx + 00cf0 8b f8 mov edi, eax + 00cf2 e8 00 00 00 00 call stbi__get16le + 00cf7 c1 e0 10 shl eax, 16 + 00cfa 03 c7 add eax, edi + 00cfc 48 8b 7c 24 68 mov rdi, QWORD PTR tv3245[rsp] $LN102@stbi__bmp_: - -; 4924 : if (shift < 0) - - 00f94 44 8b 5c 24 60 mov r11d, DWORD PTR rshift$1$[rsp] - -; 5224 : unsigned int a; -; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); - - 00f99 8b d0 mov edx, eax - 00f9b 23 54 24 48 and edx, DWORD PTR mr$1$[rsp] - -; 4924 : if (shift < 0) - - 00f9f 45 85 db test r11d, r11d - 00fa2 79 08 jns SHORT $LN169@stbi__bmp_ - -; 4925 : v <<= -shift; - - 00fa4 8b 4c 24 6c mov ecx, DWORD PTR tv4035[rsp] - 00fa8 d3 e2 shl edx, cl - 00faa eb 05 jmp SHORT $LN170@stbi__bmp_ +; Line 4924 + 00d01 44 8b 5c 24 44 mov r11d, DWORD PTR rshift$1$[rsp] +; Line 5225 + 00d06 8b d0 mov edx, eax + 00d08 23 54 24 40 and edx, DWORD PTR mr$1$[rsp] +; Line 4924 + 00d0c 45 85 db test r11d, r11d + 00d0f 79 08 jns SHORT $LN169@stbi__bmp_ +; Line 4925 + 00d11 8b 4c 24 5c mov ecx, DWORD PTR tv3256[rsp] + 00d15 d3 e2 shl edx, cl + 00d17 eb 05 jmp SHORT $LN170@stbi__bmp_ $LN169@stbi__bmp_: - -; 4926 : else -; 4927 : v >>= shift; - - 00fac 41 8b cb mov ecx, r11d - 00faf d3 ea shr edx, cl +; Line 4927 + 00d19 41 8b cb mov ecx, r11d + 00d1c d3 ea shr edx, cl $LN170@stbi__bmp_: - -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; - - 00fb1 4c 8b 9c 24 c8 - 00 00 00 mov r11, QWORD PTR tv4026[rsp] - 00fb9 4c 8d 0d 00 00 +; Line 4931 + 00d1e 4c 8b 84 24 c0 + 00 00 00 mov r8, QWORD PTR tv3248[rsp] + 00d26 4c 8d 0d 00 00 00 00 lea r9, OFFSET FLAT:__ImageBase - 00fc0 8b 4c 24 70 mov ecx, DWORD PTR tv4034[rsp] - 00fc4 d3 ea shr edx, cl - 00fc6 43 0f af 94 99 - 00 00 00 00 imul edx, DWORD PTR ?mul_table@?1??stbi__shiftsigned@@9@9[r9+r11*4] - 00fcf 43 8b 8c 99 00 - 00 00 00 mov ecx, DWORD PTR ?shift_table@?1??stbi__shiftsigned@@9@9[r9+r11*4] - 00fd7 d3 fa sar edx, cl - -; 5224 : unsigned int a; -; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); - - 00fd9 41 88 16 mov BYTE PTR [r14], dl - -; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); - - 00fdc 8b d0 mov edx, eax - 00fde 23 54 24 4c and edx, DWORD PTR mg$1$[rsp] - -; 4924 : if (shift < 0) - - 00fe2 45 85 ed test r13d, r13d - 00fe5 79 08 jns SHORT $LN165@stbi__bmp_ - -; 4925 : v <<= -shift; - - 00fe7 8b 4c 24 74 mov ecx, DWORD PTR tv4033[rsp] - 00feb d3 e2 shl edx, cl - 00fed eb 05 jmp SHORT $LN166@stbi__bmp_ -$LN165@stbi__bmp_: - -; 4926 : else -; 4927 : v >>= shift; - - 00fef 41 8b cd mov ecx, r13d - 00ff2 d3 ea shr edx, cl -$LN166@stbi__bmp_: - -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; - - 00ff4 4c 8b 9c 24 d0 - 00 00 00 mov r11, QWORD PTR tv4025[rsp] - 00ffc 8b 4c 24 78 mov ecx, DWORD PTR tv4032[rsp] - -; 4924 : if (shift < 0) - - 01000 44 8b 44 24 3c mov r8d, DWORD PTR bshift$1$[rsp] - -; 4929 : v >>= (8 - bits); - - 01005 d3 ea shr edx, cl - -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; - - 01007 43 0f af 94 99 - 00 00 00 00 imul edx, DWORD PTR ?mul_table@?1??stbi__shiftsigned@@9@9[r9+r11*4] - 01010 43 8b 8c 99 00 - 00 00 00 mov ecx, DWORD PTR ?shift_table@?1??stbi__shiftsigned@@9@9[r9+r11*4] - 01018 d3 fa sar edx, cl - -; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); - - 0101a 41 88 56 01 mov BYTE PTR [r14+1], dl - -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); - - 0101e 8b d0 mov edx, eax - 01020 23 54 24 50 and edx, DWORD PTR mb$1$[rsp] - -; 4924 : if (shift < 0) - - 01024 45 85 c0 test r8d, r8d - 01027 79 08 jns SHORT $LN161@stbi__bmp_ - -; 4925 : v <<= -shift; - - 01029 8b 4c 24 7c mov ecx, DWORD PTR tv4030[rsp] - 0102d d3 e2 shl edx, cl - 0102f eb 05 jmp SHORT $LN162@stbi__bmp_ -$LN161@stbi__bmp_: - -; 4926 : else -; 4927 : v >>= shift; - - 01031 41 8b c8 mov ecx, r8d - 01034 d3 ea shr edx, cl -$LN162@stbi__bmp_: - -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; - - 01036 4c 8b 84 24 d8 - 00 00 00 mov r8, QWORD PTR tv4024[rsp] - -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); - - 0103e 41 83 c4 03 add r12d, 3 - -; 4929 : v >>= (8 - bits); - - 01042 8b 8c 24 80 00 - 00 00 mov ecx, DWORD PTR tv4029[rsp] - -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); - - 01049 44 8b 54 24 64 mov r10d, DWORD PTR ma$1$[rsp] - -; 4929 : v >>= (8 - bits); - - 0104e d3 ea shr edx, cl - -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; - - 01050 43 0f af 94 81 + 00d2d 8b 4c 24 58 mov ecx, DWORD PTR tv3255[rsp] + 00d31 d3 ea shr edx, cl + 00d33 43 0f af 94 81 00 00 00 00 imul edx, DWORD PTR ?mul_table@?1??stbi__shiftsigned@@9@9[r9+r8*4] - 01059 43 8b 8c 81 00 + 00d3c 43 8b 8c 81 00 00 00 00 mov ecx, DWORD PTR ?shift_table@?1??stbi__shiftsigned@@9@9[r9+r8*4] - 01061 d3 fa sar edx, cl - -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); - - 01063 41 88 56 02 mov BYTE PTR [r14+2], dl - 01067 49 83 c6 03 add r14, 3 - -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); - - 0106b 45 85 d2 test r10d, r10d - 0106e 74 38 je SHORT $LN103@stbi__bmp_ - -; 4924 : if (shift < 0) - - 01070 8b 54 24 30 mov edx, DWORD PTR ashift$1$[rsp] - -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); - - 01074 41 23 c2 and eax, r10d - -; 4924 : if (shift < 0) - - 01077 85 d2 test edx, edx - 01079 79 0b jns SHORT $LN211@stbi__bmp_ - -; 4925 : v <<= -shift; - - 0107b 8b 8c 24 84 00 - 00 00 mov ecx, DWORD PTR tv4028[rsp] - 01082 d3 e0 shl eax, cl - 01084 eb 04 jmp SHORT $LN212@stbi__bmp_ + 00d44 d3 fa sar edx, cl +; Line 4924 + 00d46 8b 4c 24 4c mov ecx, DWORD PTR gshift$1$[rsp] +; Line 5225 + 00d4a 41 88 16 mov BYTE PTR [r14], dl +; Line 5226 + 00d4d 8b d0 mov edx, eax + 00d4f 23 54 24 48 and edx, DWORD PTR mg$1$[rsp] +; Line 4924 + 00d53 85 c9 test ecx, ecx + 00d55 79 08 jns SHORT $LN165@stbi__bmp_ +; Line 4925 + 00d57 8b 4c 24 38 mov ecx, DWORD PTR tv3254[rsp] + 00d5b d3 e2 shl edx, cl + 00d5d eb 02 jmp SHORT $LN166@stbi__bmp_ +$LN165@stbi__bmp_: +; Line 4927 + 00d5f d3 ea shr edx, cl +$LN166@stbi__bmp_: +; Line 4931 + 00d61 4c 8b 84 24 c8 + 00 00 00 mov r8, QWORD PTR tv3247[rsp] + 00d69 8b 4c 24 70 mov ecx, DWORD PTR tv3253[rsp] + 00d6d d3 ea shr edx, cl + 00d6f 43 0f af 94 81 + 00 00 00 00 imul edx, DWORD PTR ?mul_table@?1??stbi__shiftsigned@@9@9[r9+r8*4] + 00d78 43 8b 8c 81 00 + 00 00 00 mov ecx, DWORD PTR ?shift_table@?1??stbi__shiftsigned@@9@9[r9+r8*4] + 00d80 d3 fa sar edx, cl +; Line 4924 + 00d82 8b 4c 24 34 mov ecx, DWORD PTR bshift$1$[rsp] +; Line 5226 + 00d86 41 88 56 01 mov BYTE PTR [r14+1], dl +; Line 5227 + 00d8a 8b d0 mov edx, eax + 00d8c 23 54 24 50 and edx, DWORD PTR mb$1$[rsp] +; Line 4924 + 00d90 85 c9 test ecx, ecx + 00d92 79 08 jns SHORT $LN161@stbi__bmp_ +; Line 4925 + 00d94 8b 4c 24 74 mov ecx, DWORD PTR tv3252[rsp] + 00d98 d3 e2 shl edx, cl + 00d9a eb 02 jmp SHORT $LN162@stbi__bmp_ +$LN161@stbi__bmp_: +; Line 4927 + 00d9c d3 ea shr edx, cl +$LN162@stbi__bmp_: +; Line 4931 + 00d9e 4c 8b 84 24 d0 + 00 00 00 mov r8, QWORD PTR tv3246[rsp] +; Line 5227 + 00da6 83 c5 03 add ebp, 3 +; Line 4929 + 00da9 8b 4c 24 78 mov ecx, DWORD PTR tv3251[rsp] + 00dad d3 ea shr edx, cl +; Line 4931 + 00daf 43 0f af 94 81 + 00 00 00 00 imul edx, DWORD PTR ?mul_table@?1??stbi__shiftsigned@@9@9[r9+r8*4] + 00db8 43 8b 8c 81 00 + 00 00 00 mov ecx, DWORD PTR ?shift_table@?1??stbi__shiftsigned@@9@9[r9+r8*4] + 00dc0 d3 fa sar edx, cl +; Line 5227 + 00dc2 41 88 56 02 mov BYTE PTR [r14+2], dl + 00dc6 49 83 c6 03 add r14, 3 +; Line 5228 + 00dca 45 85 ed test r13d, r13d + 00dcd 74 38 je SHORT $LN103@stbi__bmp_ +; Line 4924 + 00dcf 44 8b 44 24 54 mov r8d, DWORD PTR ashift$1$[rsp] +; Line 5228 + 00dd4 41 23 c5 and eax, r13d +; Line 4924 + 00dd7 45 85 c0 test r8d, r8d + 00dda 79 08 jns SHORT $LN211@stbi__bmp_ +; Line 4925 + 00ddc 8b 4c 24 7c mov ecx, DWORD PTR tv3250[rsp] + 00de0 d3 e0 shl eax, cl + 00de2 eb 05 jmp SHORT $LN212@stbi__bmp_ $LN211@stbi__bmp_: - -; 4926 : else -; 4927 : v >>= shift; - - 01086 8b ca mov ecx, edx - 01088 d3 e8 shr eax, cl +; Line 4927 + 00de4 41 8b c8 mov ecx, r8d + 00de7 d3 e8 shr eax, cl $LN212@stbi__bmp_: - -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); - - 0108a 8b 8c 24 88 00 - 00 00 mov ecx, DWORD PTR tv4027[rsp] - 01091 d3 e8 shr eax, cl - -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; - - 01093 41 0f af 84 b9 +; Line 4929 + 00de9 8b 8c 24 80 00 + 00 00 mov ecx, DWORD PTR tv3249[rsp] + 00df0 d3 e8 shr eax, cl +; Line 4931 + 00df2 41 0f af 84 b9 00 00 00 00 imul eax, DWORD PTR ?mul_table@?1??stbi__shiftsigned@@9@9[r9+rdi*4] - 0109c 41 8b 8c b9 00 + 00dfb 41 8b 8c b9 00 00 00 00 mov ecx, DWORD PTR ?shift_table@?1??stbi__shiftsigned@@9@9[r9+rdi*4] - 010a4 d3 f8 sar eax, cl - -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); - - 010a6 eb 05 jmp SHORT $LN104@stbi__bmp_ + 00e03 d3 f8 sar eax, cl +; Line 5228 + 00e05 eb 05 jmp SHORT $LN104@stbi__bmp_ $LN103@stbi__bmp_: - 010a8 b8 ff 00 00 00 mov eax, 255 ; 000000ffH + 00e07 b8 ff 00 00 00 mov eax, 255 ; 000000ffH $LN104@stbi__bmp_: - -; 5229 : all_a |= a; - - 010ad 09 44 24 38 or DWORD PTR all_a$1$[rsp], eax - -; 5230 : if (target == 4) out[z++] = STBI__BYTECAST(a); - - 010b1 83 fd 04 cmp ebp, 4 - 010b4 75 09 jne SHORT $LN23@stbi__bmp_ - 010b6 41 ff c4 inc r12d - 010b9 41 88 06 mov BYTE PTR [r14], al - 010bc 49 ff c6 inc r14 +; Line 5229 + 00e0c 09 84 24 48 05 + 00 00 or DWORD PTR all_a$1$[rsp], eax +; Line 5230 + 00e13 41 83 ff 04 cmp r15d, 4 + 00e17 75 08 jne SHORT $LN23@stbi__bmp_ + 00e19 ff c5 inc ebp + 00e1b 41 88 06 mov BYTE PTR [r14], al + 00e1e 49 ff c6 inc r14 $LN23@stbi__bmp_: - -; 5220 : else { -; 5221 : int bpp = info.bpp; -; 5222 : for (i = 0; i < (int)s->img_x; ++i) { - - 010bf 41 ff c7 inc r15d - 010c2 44 3b 3b cmp r15d, DWORD PTR [rbx] - 010c5 0f 8c a5 fe ff +; Line 5222 + 00e21 41 ff c4 inc r12d + 00e24 44 3b 23 cmp r12d, DWORD PTR [rbx] + 00e27 0f 8c b3 fe ff ff jl $LL25@stbi__bmp_ - 010cb 48 8b b4 24 90 + 00e2d 48 8b b4 24 90 00 00 00 mov rsi, QWORD PTR out$1$[rsp] - 010d3 4c 8b 6c 24 58 mov r13, QWORD PTR $T22[rsp] -$LN526@stbi__bmp_: - -; 1107 : if (n == 0) return; // already there! - - 010d8 44 8b 94 24 48 - 05 00 00 mov r10d, DWORD PTR j$3$[rsp] - 010e0 44 8b 4c 24 34 mov r9d, DWORD PTR pad$2$[rsp] $LN24@stbi__bmp_: - 010e5 45 85 c9 test r9d, r9d - 010e8 74 4b je SHORT $LN17@stbi__bmp_ - -; 1111 : } -; 1112 : if (s->io.read) { - - 010ea 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 - 010ef 74 3a je SHORT $LN360@stbi__bmp_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - - 010f1 8b 8b c8 00 00 +; Line 1107 + 00e35 8b 94 24 84 00 + 00 00 mov edx, DWORD PTR pad$2$[rsp] + 00e3c 85 d2 test edx, edx + 00e3e 74 37 je SHORT $LN17@stbi__bmp_ +; Line 1112 + 00e40 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 + 00e45 74 29 je SHORT $LN308@stbi__bmp_ +; Line 1113 + 00e47 8b 8b c8 00 00 00 mov ecx, DWORD PTR [rbx+200] - 010f7 2b 8b c0 00 00 + 00e4d 2b 8b c0 00 00 00 sub ecx, DWORD PTR [rbx+192] - -; 1114 : if (blen < n) { - - 010fd 41 3b c9 cmp ecx, r9d - 01100 7d 29 jge SHORT $LN360@stbi__bmp_ - -; 1115 : s->img_buffer = s->img_buffer_end; - - 01102 48 8b 83 c8 00 +; Line 1114 + 00e53 3b ca cmp ecx, edx + 00e55 7d 19 jge SHORT $LN308@stbi__bmp_ +; Line 1115 + 00e57 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - - 01109 41 8b d1 mov edx, r9d - 0110c 2b d1 sub edx, ecx - 0110e 48 89 83 c0 00 +; Line 1116 + 00e5e 2b d1 sub edx, ecx + 00e60 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] + 00e64 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 01115 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] - 01119 ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - - 0111c 44 8b 4c 24 34 mov r9d, DWORD PTR pad$2$[rsp] - 01121 44 8b 94 24 48 - 05 00 00 mov r10d, DWORD PTR j$3$[rsp] - 01129 eb 0a jmp SHORT $LN17@stbi__bmp_ -$LN360@stbi__bmp_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - - 0112b 41 8b c1 mov eax, r9d - 0112e 48 01 83 c0 00 - 00 00 add QWORD PTR [rbx+192], rax + 00e6b ff 53 18 call QWORD PTR [rbx+24] +; Line 1117 + 00e6e eb 07 jmp SHORT $LN17@stbi__bmp_ +$LN308@stbi__bmp_: +; Line 1120 + 00e70 48 01 93 c0 00 + 00 00 add QWORD PTR [rbx+192], rdx $LN17@stbi__bmp_: - -; 5206 : } -; 5207 : for (j = 0; j < (int)s->img_y; ++j) { - - 01135 8b 43 04 mov eax, DWORD PTR [rbx+4] - 01138 41 ff c2 inc r10d - 0113b 48 8b bc 24 98 - 00 00 00 mov rdi, QWORD PTR tv4023[rsp] - 01143 44 89 94 24 48 - 05 00 00 mov DWORD PTR j$3$[rsp], r10d - 0114b 44 3b d0 cmp r10d, eax - 0114e 0f 8c 71 fc ff +; Line 5207 + 00e77 8b 4c 24 30 mov ecx, DWORD PTR j$3$[rsp] + 00e7b 8b 43 04 mov eax, DWORD PTR [rbx+4] + 00e7e ff c1 inc ecx + 00e80 48 8b 54 24 60 mov rdx, QWORD PTR $T1[rsp] + 00e85 48 8b 7c 24 68 mov rdi, QWORD PTR tv3245[rsp] + 00e8a 89 4c 24 30 mov DWORD PTR j$3$[rsp], ecx + 00e8e 3b c8 cmp ecx, eax + 00e90 0f 8c 9a fc ff ff jl $LL19@stbi__bmp_ $LN18@stbi__bmp_: - -; 5231 : } -; 5232 : } -; 5233 : stbi__skip(s, pad); -; 5234 : } -; 5235 : } -; 5236 : -; 5237 : // if alpha channel is all 0s, replace with all 255s -; 5238 : if (target == 4 && all_a == 0) - - 01154 83 fd 04 cmp ebp, 4 - 01157 75 22 jne SHORT $LN27@stbi__bmp_ - 01159 83 7c 24 38 00 cmp DWORD PTR all_a$1$[rsp], 0 - 0115e 75 1b jne SHORT $LN27@stbi__bmp_ - -; 5239 : for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4) - - 01160 0f af 03 imul eax, DWORD PTR [rbx] - 01163 8d 04 85 ff ff +; Line 5238 + 00e96 41 83 ff 04 cmp r15d, 4 + 00e9a 75 2e jne SHORT $LN27@stbi__bmp_ + 00e9c 83 bc 24 48 05 + 00 00 00 cmp DWORD PTR all_a$1$[rsp], 0 + 00ea4 75 24 jne SHORT $LN27@stbi__bmp_ +; Line 5239 + 00ea6 0f af 03 imul eax, DWORD PTR [rbx] + 00ea9 8d 04 85 ff ff ff ff lea eax, DWORD PTR [rax*4-1] - 0116a 48 63 c8 movsxd rcx, eax - 0116d 85 c0 test eax, eax - 0116f 78 0a js SHORT $LN27@stbi__bmp_ + 00eb0 48 63 c8 movsxd rcx, eax + 00eb3 85 c0 test eax, eax + 00eb5 78 13 js SHORT $LN27@stbi__bmp_ + 00eb7 66 0f 1f 84 00 + 00 00 00 00 npad 9 $LL28@stbi__bmp_: - -; 5240 : out[i] = 255; - - 01171 c6 04 31 ff mov BYTE PTR [rcx+rsi], 255 ; 000000ffH - 01175 48 83 e9 04 sub rcx, 4 - 01179 79 f6 jns SHORT $LL28@stbi__bmp_ +; Line 5240 + 00ec0 c6 04 31 ff mov BYTE PTR [rcx+rsi], 255 ; 000000ffH + 00ec4 48 83 e9 04 sub rcx, 4 + 00ec8 79 f6 jns SHORT $LL28@stbi__bmp_ $LN27@stbi__bmp_: - -; 5241 : -; 5242 : if (flip_vertically) { - - 0117b 83 bc 24 8c 00 - 00 00 00 cmp DWORD PTR tv4126[rsp], 0 - 01183 0f 8e 7b 00 00 - 00 jle $LN30@stbi__bmp_ - -; 5243 : stbi_uc t; -; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { - - 01189 8b 53 04 mov edx, DWORD PTR [rbx+4] - 0118c 45 33 c0 xor r8d, r8d - 0118f 45 8b d0 mov r10d, r8d - 01192 f7 c2 fe ff ff +; Line 5242 + 00eca 83 bc 24 88 00 + 00 00 00 cmp DWORD PTR tv3334[rsp], 0 + 00ed2 7e 6b jle SHORT $LN30@stbi__bmp_ +; Line 5244 + 00ed4 8b 53 04 mov edx, DWORD PTR [rbx+4] + 00ed7 45 33 d2 xor r10d, r10d + 00eda f7 c2 fe ff ff ff test edx, -2 - 01198 7e 6a jle SHORT $LN30@stbi__bmp_ - 0119a 66 0f 1f 44 00 - 00 npad 6 + 00ee0 7e 5d jle SHORT $LN30@stbi__bmp_ $LL31@stbi__bmp_: - -; 5245 : stbi_uc* p1 = out + j * s->img_x * target; - - 011a0 8b 0b mov ecx, DWORD PTR [rbx] - -; 5246 : stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target; - - 011a2 41 2b d2 sub edx, r10d - 011a5 ff ca dec edx - 011a7 44 8b c9 mov r9d, ecx - 011aa 0f af d1 imul edx, ecx - 011ad 45 0f af ca imul r9d, r10d - -; 5247 : for (i = 0; i < (int)s->img_x * target; ++i) { - - 011b1 0f af cd imul ecx, ebp - 011b4 0f af d5 imul edx, ebp - 011b7 44 0f af cd imul r9d, ebp - 011bb 48 03 d6 add rdx, rsi - 011be 4c 03 ce add r9, rsi - 011c1 85 c9 test ecx, ecx - 011c3 7e 2a jle SHORT $LN29@stbi__bmp_ - -; 5245 : stbi_uc* p1 = out + j * s->img_x * target; - - 011c5 4c 2b ca sub r9, rdx - 011c8 0f 1f 84 00 00 - 00 00 00 npad 8 +; Line 5245 + 00ee2 8b 0b mov ecx, DWORD PTR [rbx] +; Line 5246 + 00ee4 41 2b d2 sub edx, r10d + 00ee7 ff ca dec edx + 00ee9 44 8b c9 mov r9d, ecx + 00eec 0f af d1 imul edx, ecx +; Line 5247 + 00eef 45 33 c0 xor r8d, r8d + 00ef2 45 0f af ca imul r9d, r10d + 00ef6 41 0f af cf imul ecx, r15d + 00efa 41 0f af d7 imul edx, r15d + 00efe 45 0f af cf imul r9d, r15d + 00f02 48 03 d6 add rdx, rsi + 00f05 4c 03 ce add r9, rsi + 00f08 85 c9 test ecx, ecx + 00f0a 7e 24 jle SHORT $LN29@stbi__bmp_ +; Line 5245 + 00f0c 4c 2b ca sub r9, rdx + 00f0f 90 npad 1 $LL34@stbi__bmp_: - -; 5248 : t = p1[i]; p1[i] = p2[i]; p2[i] = t; - - 011d0 0f b6 02 movzx eax, BYTE PTR [rdx] - 011d3 41 ff c0 inc r8d - 011d6 42 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+r9] - 011db 42 88 04 0a mov BYTE PTR [rdx+r9], al - 011df 8b c5 mov eax, ebp - 011e1 88 0a mov BYTE PTR [rdx], cl - 011e3 48 8d 52 01 lea rdx, QWORD PTR [rdx+1] - 011e7 0f af 03 imul eax, DWORD PTR [rbx] - 011ea 44 3b c0 cmp r8d, eax - 011ed 7c e1 jl SHORT $LL34@stbi__bmp_ +; Line 5248 + 00f10 0f b6 02 movzx eax, BYTE PTR [rdx] + 00f13 41 ff c0 inc r8d + 00f16 42 0f b6 0c 0a movzx ecx, BYTE PTR [rdx+r9] + 00f1b 42 88 04 0a mov BYTE PTR [rdx+r9], al + 00f1f 41 8b c7 mov eax, r15d + 00f22 88 0a mov BYTE PTR [rdx], cl + 00f24 48 8d 52 01 lea rdx, QWORD PTR [rdx+1] + 00f28 0f af 03 imul eax, DWORD PTR [rbx] + 00f2b 44 3b c0 cmp r8d, eax + 00f2e 7c e0 jl SHORT $LL34@stbi__bmp_ $LN29@stbi__bmp_: - -; 5243 : stbi_uc t; -; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { - - 011ef 8b 53 04 mov edx, DWORD PTR [rbx+4] - 011f2 41 ff c2 inc r10d - 011f5 8b c2 mov eax, edx - 011f7 41 b8 00 00 00 - 00 mov r8d, 0 - 011fd d1 f8 sar eax, 1 - 011ff 44 3b d0 cmp r10d, eax - 01202 7c 9c jl SHORT $LL31@stbi__bmp_ +; Line 5244 + 00f30 8b 53 04 mov edx, DWORD PTR [rbx+4] + 00f33 41 ff c2 inc r10d + 00f36 8b c2 mov eax, edx + 00f38 d1 f8 sar eax, 1 + 00f3a 44 3b d0 cmp r10d, eax + 00f3d 7c a3 jl SHORT $LL31@stbi__bmp_ $LN30@stbi__bmp_: - -; 5249 : } -; 5250 : } -; 5251 : } -; 5252 : -; 5253 : if (req_comp && req_comp != target) { - - 01204 44 8b 84 24 40 +; Line 5253 + 00f3f 44 8b 84 24 40 05 00 00 mov r8d, DWORD PTR req_comp$[rsp] - 0120c 45 85 c0 test r8d, r8d - 0120f 74 25 je SHORT $LN94@stbi__bmp_ - 01211 44 3b c5 cmp r8d, ebp - 01214 74 20 je SHORT $LN94@stbi__bmp_ - -; 5254 : out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); - - 01216 8b 43 04 mov eax, DWORD PTR [rbx+4] - 01219 8b d5 mov edx, ebp - 0121b 44 8b 0b mov r9d, DWORD PTR [rbx] - 0121e 48 8b ce mov rcx, rsi - 01221 89 44 24 20 mov DWORD PTR [rsp+32], eax - 01225 e8 00 00 00 00 call stbi__convert_format - 0122a 48 8b f0 mov rsi, rax - -; 5255 : if (out == NULL) return out; // stbi__convert_format frees input on failure - - 0122d 48 85 c0 test rax, rax - 01230 0f 84 b3 00 00 - 00 je $LN373@stbi__bmp_ + 00f47 45 85 c0 test r8d, r8d + 00f4a 74 26 je SHORT $LN94@stbi__bmp_ + 00f4c 45 3b c7 cmp r8d, r15d + 00f4f 74 21 je SHORT $LN94@stbi__bmp_ +; Line 5254 + 00f51 8b 43 04 mov eax, DWORD PTR [rbx+4] + 00f54 41 8b d7 mov edx, r15d + 00f57 44 8b 0b mov r9d, DWORD PTR [rbx] + 00f5a 48 8b ce mov rcx, rsi + 00f5d 89 44 24 20 mov DWORD PTR [rsp+32], eax + 00f61 e8 00 00 00 00 call stbi__convert_format + 00f66 48 8b f0 mov rsi, rax +; Line 5255 + 00f69 48 85 c0 test rax, rax + 00f6c 0f 84 b3 00 00 + 00 je $LN321@stbi__bmp_ $LN94@stbi__bmp_: - -; 5256 : } -; 5257 : -; 5258 : *x = s->img_x; - - 01236 8b 03 mov eax, DWORD PTR [rbx] - 01238 48 8b 8c 24 28 +; Line 5258 + 00f72 8b 03 mov eax, DWORD PTR [rbx] + 00f74 48 8b 8c 24 28 05 00 00 mov rcx, QWORD PTR x$[rsp] - 01240 89 01 mov DWORD PTR [rcx], eax - -; 5259 : *y = s->img_y; - - 01242 48 8b 8c 24 30 + 00f7c 89 01 mov DWORD PTR [rcx], eax +; Line 5259 + 00f7e 48 8b 8c 24 30 05 00 00 mov rcx, QWORD PTR y$[rsp] - 0124a 8b 43 04 mov eax, DWORD PTR [rbx+4] - 0124d 89 01 mov DWORD PTR [rcx], eax - -; 5260 : if (comp) *comp = s->img_n; - - 0124f 48 8b 8c 24 38 + 00f86 8b 43 04 mov eax, DWORD PTR [rbx+4] + 00f89 89 01 mov DWORD PTR [rcx], eax +; Line 5260 + 00f8b 48 8b 8c 24 38 05 00 00 mov rcx, QWORD PTR comp$[rsp] - 01257 48 85 c9 test rcx, rcx - 0125a 74 05 je SHORT $LN95@stbi__bmp_ - 0125c 8b 43 08 mov eax, DWORD PTR [rbx+8] - 0125f 89 01 mov DWORD PTR [rcx], eax + 00f93 48 85 c9 test rcx, rcx + 00f96 74 05 je SHORT $LN95@stbi__bmp_ + 00f98 8b 43 08 mov eax, DWORD PTR [rbx+8] + 00f9b 89 01 mov DWORD PTR [rcx], eax $LN95@stbi__bmp_: - -; 5261 : return out; - - 01261 48 8b c6 mov rax, rsi - 01264 e9 82 00 00 00 jmp $LN1@stbi__bmp_ +; Line 5261 + 00f9d 48 8b c6 mov rax, rsi + 00fa0 e9 82 00 00 00 jmp $LN1@stbi__bmp_ $LN86@stbi__bmp_: - -; 5262 : } - - 01269 48 8b ce mov rcx, rsi - 0126c ff 15 00 00 00 +; Line 5262 + 00fa5 48 8b ce mov rcx, rsi + 00fa8 ff 15 00 00 00 00 call QWORD PTR __imp_free - 01272 8b 15 00 00 00 + 00fae 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 01278 65 48 8b 04 25 + 00fb4 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 01281 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 01285 48 8d 15 00 00 + 00fbd 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00fc1 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_09DAEBACAB@bad?5masks@ - 0128c eb 52 jmp SHORT $LN528@stbi__bmp_ -$LN355@stbi__bmp_: - -; 431 : stbi__g_failure_reason = str; - - 0128e 8b 15 00 00 00 + 00fc8 eb 52 jmp SHORT $LN451@stbi__bmp_ +$LN305@stbi__bmp_: +; Line 431 + 00fca 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 01294 65 48 8b 04 25 + 00fd0 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 0129d 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 012a1 48 8d 15 00 00 + 00fd9 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00fdd 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - -; 5116 : else -; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert -; 5118 : -; 5119 : // sanity-check size -; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) -; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); -; 5122 : -; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); -; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); - - 012a8 eb 36 jmp SHORT $LN528@stbi__bmp_ +; Line 5124 + 00fe4 eb 36 jmp SHORT $LN451@stbi__bmp_ $LN47@stbi__bmp_: - -; 431 : stbi__g_failure_reason = str; - - 012aa 8b 15 00 00 00 +; Line 431 + 00fe6 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 012b0 65 48 8b 04 25 + 00fec 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 012b9 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 012bd 48 8d 15 00 00 + 00ff5 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00ff9 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0L@JDPIFELH@bad?5offset@ - -; 5103 : return stbi__errpuc("bad offset", "Corrupt BMP"); - - 012c4 eb 1a jmp SHORT $LN528@stbi__bmp_ +; Line 5103 + 01000 eb 1a jmp SHORT $LN451@stbi__bmp_ $LN44@stbi__bmp_: - -; 431 : stbi__g_failure_reason = str; - - 012c6 8b 15 00 00 00 +; Line 431 + 01002 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 012cc 65 48 8b 04 25 + 01008 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 012d5 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 012d9 48 8d 15 00 00 + 01011 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 01015 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0L@PJHPAMCH@bad?5header@ -$LN528@stbi__bmp_: - -; 5262 : } - - 012e0 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 012e5 48 89 14 01 mov QWORD PTR [rcx+rax], rdx -$LN373@stbi__bmp_: - 012e9 33 c0 xor eax, eax +$LN451@stbi__bmp_: +; Line 5262 + 0101c b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 01021 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +$LN321@stbi__bmp_: + 01025 33 c0 xor eax, eax $LN1@stbi__bmp_: - 012eb 48 8b 9c 24 20 + 01027 48 8b 9c 24 20 05 00 00 mov rbx, QWORD PTR [rsp+1312] - 012f3 48 81 c4 e0 04 + 0102f 48 81 c4 e0 04 00 00 add rsp, 1248 ; 000004e0H - 012fa 41 5f pop r15 - 012fc 41 5e pop r14 - 012fe 41 5d pop r13 - 01300 41 5c pop r12 - 01302 5f pop rdi - 01303 5e pop rsi - 01304 5d pop rbp - 01305 c3 ret 0 + 01036 41 5f pop r15 + 01038 41 5e pop r14 + 0103a 41 5d pop r13 + 0103c 41 5c pop r12 + 0103e 5f pop rdi + 0103f 5e pop rsi + 01040 5d pop rbp + 01041 c3 ret 0 stbi__bmp_load ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__tga_get_comp _TEXT SEGMENT bits_per_pixel$ = 8 is_grey$ = 16 is_rgb16$ = 24 stbi__tga_get_comp PROC ; COMDAT - -; 5271 : // only RGB or RGBA (incl. 16bit) or grey allowed -; 5272 : if (is_rgb16) *is_rgb16 = 0; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 5272 00000 4d 85 c0 test r8, r8 00003 74 07 je SHORT $LN4@stbi__tga_ 00005 41 c7 00 00 00 00 00 mov DWORD PTR [r8], 0 $LN4@stbi__tga_: - -; 5273 : switch (bits_per_pixel) { - +; Line 5273 0000c 44 8b c9 mov r9d, ecx 0000f 41 83 e9 08 sub r9d, 8 00013 74 43 je SHORT $LN5@stbi__tga_ @@ -44467,120 +28957,77 @@ $LN4@stbi__tga_: 00025 74 09 je SHORT $LN10@stbi__tga_ 00027 41 83 f9 08 cmp r9d, 8 0002b 74 03 je SHORT $LN10@stbi__tga_ - -; 5281 : default: return 0; - +; Line 5281 0002d 33 c0 xor eax, eax - -; 5282 : } -; 5283 : } - +; Line 5283 0002f c3 ret 0 $LN10@stbi__tga_: - -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; - +; Line 5280 00030 8b c1 mov eax, ecx 00032 99 cdq 00033 83 e2 07 and edx, 7 00036 03 c2 add eax, edx 00038 c1 f8 03 sar eax, 3 - -; 5282 : } -; 5283 : } - +; Line 5283 0003b c3 ret 0 $LN6@stbi__tga_: - -; 5275 : case 16: if (is_grey) return STBI_grey_alpha; - +; Line 5275 0003c 85 d2 test edx, edx 0003e 74 06 je SHORT $LN7@stbi__tga_ 00040 b8 02 00 00 00 mov eax, 2 - -; 5282 : } -; 5283 : } - +; Line 5283 00045 c3 ret 0 $LN7@stbi__tga_: - -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; - +; Line 5277 00046 4d 85 c0 test r8, r8 00049 74 07 je SHORT $LN9@stbi__tga_ 0004b 41 c7 00 01 00 00 00 mov DWORD PTR [r8], 1 $LN9@stbi__tga_: - -; 5278 : return STBI_rgb; - +; Line 5278 00052 b8 03 00 00 00 mov eax, 3 - -; 5282 : } -; 5283 : } - +; Line 5283 00057 c3 ret 0 $LN5@stbi__tga_: - -; 5274 : case 8: return STBI_grey; - +; Line 5274 00058 b8 01 00 00 00 mov eax, 1 - -; 5282 : } -; 5283 : } - +; Line 5283 0005d c3 ret 0 stbi__tga_get_comp ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__tga_test _TEXT SEGMENT s$ = 64 stbi__tga_test PROC ; COMDAT - -; 5353 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 5353 00000 40 53 push rbx 00002 57 push rdi 00003 41 56 push r14 00005 48 83 ec 20 sub rsp, 32 ; 00000020H 00009 48 8b d9 mov rbx, rcx - -; 5354 : int res = 0; - +; Line 5354 0000c 45 33 f6 xor r14d, r14d - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0000f 48 8b 89 c0 00 00 00 mov rcx, QWORD PTR [rcx+192] 00016 48 3b 8b c8 00 00 00 cmp rcx, QWORD PTR [rbx+200] 0001d 73 0c jae SHORT $LN14@stbi__tga_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 0001f 48 ff c1 inc rcx 00022 48 89 8b c0 00 00 00 mov QWORD PTR [rbx+192], rcx 00029 eb 1c jmp SHORT $LN15@stbi__tga_ $LN14@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0002b 44 39 73 30 cmp DWORD PTR [rbx+48], r14d 0002f 74 16 je SHORT $LN15@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00031 48 8b cb mov rcx, rbx 00034 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00039 48 ff 83 c0 00 00 00 inc QWORD PTR [rbx+192] 00040 48 8b 8b c0 00 @@ -44588,198 +29035,132 @@ $LN14@stbi__tga_: $LN15@stbi__tga_: 00047 48 89 6c 24 40 mov QWORD PTR [rsp+64], rbp 0004c 48 89 74 24 48 mov QWORD PTR [rsp+72], rsi - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00051 48 3b 8b c8 00 00 00 cmp rcx, QWORD PTR [rbx+200] 00058 73 08 jae SHORT $LN18@stbi__tga_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 0005a 0f b6 29 movzx ebp, BYTE PTR [rcx] 0005d 48 ff c1 inc rcx 00060 eb 1c jmp SHORT $LN91@stbi__tga_ $LN18@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00062 44 39 73 30 cmp DWORD PTR [rbx+48], r14d 00066 74 2d je SHORT $LN19@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00068 48 8b cb mov rcx, rbx 0006b e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00070 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00077 0f b6 28 movzx ebp, BYTE PTR [rax] 0007a 48 8d 48 01 lea rcx, QWORD PTR [rax+1] $LN91@stbi__tga_: - -; 5355 : int sz, tga_color_type; -; 5356 : stbi__get8(s); // discard Offset -; 5357 : tga_color_type = stbi__get8(s); // color type - +; Line 5357 0007e 48 89 8b c0 00 00 00 mov QWORD PTR [rbx+192], rcx 00085 40 0f b6 f5 movzx esi, bpl - -; 5358 : if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed - +; Line 5358 00089 40 80 fd 01 cmp bpl, 1 0008d 0f 87 f0 01 00 00 ja $errorEnd$95 00093 eb 07 jmp SHORT $LN54@stbi__tga_ $LN19@stbi__tga_: - -; 1083 : return 0; - +; Line 1083 00095 40 32 ed xor bpl, bpl 00098 40 0f b6 f5 movzx esi, bpl $LN54@stbi__tga_: 0009c 4c 89 7c 24 50 mov QWORD PTR [rsp+80], r15 - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000a1 48 3b 8b c8 00 00 00 cmp rcx, QWORD PTR [rbx+200] 000a8 73 08 jae SHORT $LN22@stbi__tga_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 000aa 0f b6 11 movzx edx, BYTE PTR [rcx] 000ad 48 ff c1 inc rcx 000b0 eb 20 jmp SHORT $LN21@stbi__tga_ $LN22@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000b2 44 39 73 30 cmp DWORD PTR [rbx+48], r14d 000b6 74 18 je SHORT $LN23@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000b8 48 8b cb mov rcx, rbx 000bb e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000c0 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000c7 0f b6 10 movzx edx, BYTE PTR [rax] 000ca 48 8d 48 01 lea rcx, QWORD PTR [rax+1] 000ce eb 02 jmp SHORT $LN21@stbi__tga_ $LN23@stbi__tga_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000d0 32 d2 xor dl, dl $LN21@stbi__tga_: - -; 5359 : sz = stbi__get8(s); // image type -; 5360 : if (tga_color_type == 1) { // colormapped (paletted) image - +; Line 5360 000d2 41 bf 00 81 01 01 mov r15d, 16875776 ; 01018100H 000d8 40 80 fe 01 cmp sil, 1 000dc 0f 85 d3 00 00 00 jne $LN3@stbi__tga_ - -; 5361 : if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 - +; Line 5361 000e2 fe ca dec dl 000e4 f6 c2 f7 test dl, 247 ; 000000f7H 000e7 0f 85 91 01 00 00 jne $LN90@stbi__tga_ - -; 1112 : if (s->io.read) { - +; Line 1112 000ed be 04 00 00 00 mov esi, 4 000f2 4c 39 73 10 cmp QWORD PTR [rbx+16], r14 000f6 74 2b je SHORT $LN29@stbi__tga_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - +; Line 1113 000f8 44 8b 83 c8 00 00 00 mov r8d, DWORD PTR [rbx+200] 000ff 44 2b c1 sub r8d, ecx - -; 1114 : if (blen < n) { - +; Line 1114 00102 44 3b c6 cmp r8d, esi 00105 7d 1c jge SHORT $LN29@stbi__tga_ - -; 1115 : s->img_buffer = s->img_buffer_end; - +; Line 1115 00107 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - +; Line 1116 0010e 8b d6 mov edx, esi 00110 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 00114 41 2b d0 sub edx, r8d 00117 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0011e ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - +; Line 1117 00121 eb 0b jmp SHORT $LN25@stbi__tga_ $LN29@stbi__tga_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - +; Line 1120 00123 48 8d 41 04 lea rax, QWORD PTR [rcx+4] 00127 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax $LN25@stbi__tga_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0012e 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00135 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0013c 73 09 jae SHORT $LN32@stbi__tga_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 0013e 4c 8d 40 01 lea r8, QWORD PTR [rax+1] 00142 49 8b d0 mov rdx, r8 00145 eb 20 jmp SHORT $LN92@stbi__tga_ $LN32@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00147 44 39 73 30 cmp DWORD PTR [rbx+48], r14d 0014b 0f 84 2d 01 00 00 je $LN90@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00151 48 8b cb mov rcx, rbx 00154 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00159 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00160 48 8d 50 01 lea rdx, QWORD PTR [rax+1] 00164 44 8b c2 mov r8d, edx $LN92@stbi__tga_: - -; 5362 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5363 : sz = stbi__get8(s); // check bits per palette color entry -; 5364 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; - +; Line 5364 00167 0f b6 08 movzx ecx, BYTE PTR [rax] 0016a 80 f9 18 cmp cl, 24 0016d 77 09 ja SHORT $LN59@stbi__tga_ @@ -44791,57 +29172,35 @@ $LN59@stbi__tga_: 0017b 0f 85 fd 00 00 00 jne $LN90@stbi__tga_ $LN6@stbi__tga_: - -; 1112 : if (s->io.read) { - +; Line 1112 00181 4c 39 73 10 cmp QWORD PTR [rbx+16], r14 00185 74 28 je SHORT $LN39@stbi__tga_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - +; Line 1113 00187 8b 8b c8 00 00 00 mov ecx, DWORD PTR [rbx+200] 0018d 41 2b c8 sub ecx, r8d - -; 1114 : if (blen < n) { - +; Line 1114 00190 3b ce cmp ecx, esi 00192 7d 1b jge SHORT $LN39@stbi__tga_ - -; 1115 : s->img_buffer = s->img_buffer_end; - +; Line 1115 00194 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - +; Line 1116 0019b 2b f1 sub esi, ecx 0019d 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 001a1 8b d6 mov edx, esi 001a3 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 001aa ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - +; Line 1117 001ad eb 5b jmp SHORT $LN41@stbi__tga_ $LN39@stbi__tga_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - +; Line 1120 001af 48 8d 42 04 lea rax, QWORD PTR [rdx+4] - -; 5365 : stbi__skip(s, 4); // skip image x and y origin -; 5366 : } - +; Line 5366 001b3 eb 4e jmp SHORT $LN93@stbi__tga_ $LN3@stbi__tga_: - -; 5367 : else { // "normal" image w/o colormap -; 5368 : if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE - +; Line 5368 001b5 8d 42 fe lea eax, DWORD PTR [rdx-2] 001b8 a8 f6 test al, 246 ; 000000f6H 001ba 75 05 jne SHORT $LN61@stbi__tga_ @@ -44852,53 +29211,33 @@ $LN61@stbi__tga_: 001c4 0f 85 b4 00 00 00 jne $LN90@stbi__tga_ $LN7@stbi__tga_: - -; 1112 : if (s->io.read) { - +; Line 1112 001ca 4c 39 73 10 cmp QWORD PTR [rbx+16], r14 001ce 74 2f je SHORT $LN45@stbi__tga_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - +; Line 1113 001d0 44 8b 83 c8 00 00 00 mov r8d, DWORD PTR [rbx+200] 001d7 44 2b c1 sub r8d, ecx - -; 1114 : if (blen < n) { - +; Line 1114 001da 41 83 f8 09 cmp r8d, 9 001de 7d 1f jge SHORT $LN45@stbi__tga_ - -; 1115 : s->img_buffer = s->img_buffer_end; - +; Line 1115 001e0 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - +; Line 1116 001e7 ba 09 00 00 00 mov edx, 9 001ec 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 001f0 41 2b d0 sub edx, r8d 001f3 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 001fa ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - +; Line 1117 001fd eb 0b jmp SHORT $LN41@stbi__tga_ $LN45@stbi__tga_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - +; Line 1120 001ff 48 8d 41 09 lea rax, QWORD PTR [rcx+9] $LN93@stbi__tga_: - -; 5369 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5370 : } -; 5371 : if (stbi__get16le(s) < 1) goto errorEnd; // test width - +; Line 5371 00203 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax $LN41@stbi__tga_: @@ -44906,55 +29245,37 @@ $LN41@stbi__tga_: 0020d e8 00 00 00 00 call stbi__get16le 00212 83 f8 01 cmp eax, 1 00215 7c 67 jl SHORT $LN90@stbi__tga_ - -; 5372 : if (stbi__get16le(s) < 1) goto errorEnd; // test height - +; Line 5372 00217 48 8b cb mov rcx, rbx 0021a e8 00 00 00 00 call stbi__get16le 0021f 83 f8 01 cmp eax, 1 00222 7c 5a jl SHORT $LN90@stbi__tga_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00224 48 8b 8b c0 00 00 00 mov rcx, QWORD PTR [rbx+192] 0022b 48 3b 8b c8 00 00 00 cmp rcx, QWORD PTR [rbx+200] 00232 73 05 jae SHORT $LN48@stbi__tga_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00234 0f b6 09 movzx ecx, BYTE PTR [rcx] 00237 eb 1c jmp SHORT $LN47@stbi__tga_ $LN48@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00239 44 39 73 30 cmp DWORD PTR [rbx+48], r14d 0023d 74 14 je SHORT $LN49@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0023f 48 8b cb mov rcx, rbx 00242 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00247 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0024e 0f b6 08 movzx ecx, BYTE PTR [rax] 00251 eb 02 jmp SHORT $LN47@stbi__tga_ $LN49@stbi__tga_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00253 32 c9 xor cl, cl $LN47@stbi__tga_: - -; 5373 : sz = stbi__get8(s); // bits per pixel -; 5374 : if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index - +; Line 5374 00255 40 80 fd 01 cmp bpl, 1 00259 75 0a jne SHORT $LN10@stbi__tga_ 0025b 80 f9 08 cmp cl, 8 @@ -44962,9 +29283,7 @@ $LN47@stbi__tga_: 00260 80 f9 10 cmp cl, 16 00263 75 19 jne SHORT $LN90@stbi__tga_ $LN10@stbi__tga_: - -; 5375 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; - +; Line 5375 00265 80 f9 18 cmp cl, 24 00268 77 09 ja SHORT $LN63@stbi__tga_ 0026a 0f b6 c1 movzx eax, cl @@ -44974,44 +29293,28 @@ $LN63@stbi__tga_: 00273 80 f9 20 cmp cl, 32 ; 00000020H 00276 75 06 jne SHORT $LN90@stbi__tga_ $LN11@stbi__tga_: - -; 5376 : -; 5377 : res = 1; // if we got this far, everything's good and we can return 1 instead of 0 - +; Line 5377 00278 41 be 01 00 00 00 mov r14d, 1 $LN90@stbi__tga_: 0027e 4c 8b 7c 24 50 mov r15, QWORD PTR [rsp+80] $errorEnd$95: - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 00283 48 8b 8b d0 00 00 00 mov rcx, QWORD PTR [rbx+208] - -; 5378 : -; 5379 : errorEnd: -; 5380 : stbi__rewind(s); -; 5381 : return res; - +; Line 5381 0028a 41 8b c6 mov eax, r14d 0028d 48 8b 74 24 48 mov rsi, QWORD PTR [rsp+72] 00292 48 8b 6c 24 40 mov rbp, QWORD PTR [rsp+64] - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 00297 48 89 8b c0 00 00 00 mov QWORD PTR [rbx+192], rcx - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 0029e 48 8b 8b d8 00 00 00 mov rcx, QWORD PTR [rbx+216] 002a5 48 89 8b c8 00 00 00 mov QWORD PTR [rbx+200], rcx - -; 5382 : } - +; Line 5382 002ac 48 83 c4 20 add rsp, 32 ; 00000020H 002b0 41 5e pop r14 002b2 5f pop rdi @@ -45020,37 +29323,24 @@ $errorEnd$95: stbi__tga_test ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__tga_read_rgb16 _TEXT SEGMENT s$ = 48 out$ = 56 stbi__tga_read_rgb16 PROC ; COMDAT - -; 5386 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 5386 00000 40 53 push rbx 00002 48 83 ec 20 sub rsp, 32 ; 00000020H 00006 48 8b da mov rbx, rdx - -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); - +; Line 5387 00009 e8 00 00 00 00 call stbi__get16le - -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; - +; Line 5390 0000e 44 0f b7 c0 movzx r8d, ax 00012 41 8b c0 mov eax, r8d 00015 c1 e8 0a shr eax, 10 00018 83 e0 1f and eax, 31 - -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); - +; Line 5394 0001b 69 c8 ff 00 00 00 imul ecx, eax, 255 ; 000000ffH 00021 b8 43 08 21 84 mov eax, -2078209981 ; ffffffff84210843H @@ -45065,16 +29355,12 @@ stbi__tga_read_rgb16 PROC ; COMDAT 0003a 41 83 e0 1f and r8d, 31 0003e 83 e0 1f and eax, 31 00041 88 13 mov BYTE PTR [rbx], dl - -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); - +; Line 5395 00043 69 c8 ff 00 00 00 imul ecx, eax, 255 ; 000000ffH 00049 b8 43 08 21 84 mov eax, -2078209981 ; ffffffff84210843H 0004e f7 e9 imul ecx - -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); - +; Line 5396 00050 b8 43 08 21 84 mov eax, -2078209981 ; ffffffff84210843H 00055 03 d1 add edx, ecx 00057 c1 fa 04 sar edx, 4 @@ -45091,44 +29377,35 @@ stbi__tga_read_rgb16 PROC ; COMDAT 00074 c1 e8 1f shr eax, 31 00077 03 d0 add edx, eax 00079 88 53 02 mov BYTE PTR [rbx+2], dl - -; 5397 : -; 5398 : // some people claim that the most significant bit might be used for alpha -; 5399 : // (possibly if an alpha-bit is set in the "image descriptor byte") -; 5400 : // but that only made 16bit test images completely translucent.. -; 5401 : // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -; 5402 : } - +; Line 5402 0007c 48 83 c4 20 add rsp, 32 ; 00000020H 00080 5b pop rbx 00081 c3 ret 0 stbi__tga_read_rgb16 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__tga_load _TEXT SEGMENT -$T18 = 48 +$T1 = 48 tga_comp$4$ = 52 -tga_offset$1$ = 52 -$T19 = 56 -tga_rgb16$4$ = 60 -tga_image_type$1$ = 60 +tga_palette_start$1$ = 52 +tga_rgb16$4$ = 56 +tga_offset$1$ = 56 +$T2 = 60 tga_width$1$ = 64 -tv2782 = 68 -y$GSCopy$1$ = 72 +tv2604 = 68 +comp$GSCopy$1$ = 72 tga_data$1$ = 72 -tga_palette$1$ = 80 -tga_palette_len$1$ = 88 -RLE_repeating$1$ = 92 -tga_bits_per_pixel$1$ = 96 -tga_inverted$1$ = 100 -x$GSCopy$1$ = 104 -tv2753 = 104 -req_comp$GSCopy$1$ = 112 -comp$GSCopy$1$ = 120 -tv2766 = 120 -raw_data$ = 128 +tga_palette_len$1$ = 80 +tga_palette$1$ = 88 +tga_bits_per_pixel$1$ = 100 +tga_inverted$1$ = 104 +y$GSCopy$1$ = 112 +tv2575 = 112 +x$GSCopy$1$ = 120 +tv2576 = 120 +req_comp$GSCopy$1$ = 128 +raw_data$ = 132 __$ArrayPad$ = 136 s$ = 224 x$ = 232 @@ -45137,1843 +29414,1104 @@ comp$ = 248 req_comp$ = 256 ri$dead$ = 264 stbi__tga_load PROC ; COMDAT - -; 5405 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 5405 00000 40 53 push rbx - 00002 55 push rbp - 00003 56 push rsi - 00004 57 push rdi - 00005 41 54 push r12 - 00007 41 55 push r13 - 00009 41 56 push r14 - 0000b 41 57 push r15 - 0000d 48 81 ec 98 00 - 00 00 sub rsp, 152 ; 00000098H - 00014 48 8b 05 00 00 + 00002 56 push rsi + 00003 57 push rdi + 00004 41 54 push r12 + 00006 41 55 push r13 + 00008 41 56 push r14 + 0000a 41 57 push r15 + 0000c 48 81 ec a0 00 + 00 00 sub rsp, 160 ; 000000a0H + 00013 48 8b 05 00 00 00 00 mov rax, QWORD PTR __security_cookie - 0001b 48 33 c4 xor rax, rsp - 0001e 48 89 84 24 88 + 0001a 48 33 c4 xor rax, rsp + 0001d 48 89 84 24 88 00 00 00 mov QWORD PTR __$ArrayPad$[rsp], rax - 00026 8b 84 24 00 01 + 00025 8b 84 24 00 01 00 00 mov eax, DWORD PTR req_comp$[rsp] - 0002d 48 8b d9 mov rbx, rcx - 00030 89 44 24 70 mov DWORD PTR req_comp$GSCopy$1$[rsp], eax - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00034 48 8b 81 c0 00 + 0002c 48 8b d9 mov rbx, rcx + 0002f 89 84 24 80 00 + 00 00 mov DWORD PTR req_comp$GSCopy$1$[rsp], eax +; Line 1077 + 00036 48 8b 81 c0 00 00 00 mov rax, QWORD PTR [rcx+192] - -; 5405 : { - - 0003b 4c 89 4c 24 78 mov QWORD PTR comp$GSCopy$1$[rsp], r9 - 00040 4c 89 44 24 48 mov QWORD PTR y$GSCopy$1$[rsp], r8 - 00045 48 89 54 24 68 mov QWORD PTR x$GSCopy$1$[rsp], rdx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 0004a 48 3b 81 c8 00 +; Line 5405 + 0003d 4c 89 4c 24 48 mov QWORD PTR comp$GSCopy$1$[rsp], r9 + 00042 4c 89 44 24 70 mov QWORD PTR y$GSCopy$1$[rsp], r8 + 00047 48 89 54 24 78 mov QWORD PTR x$GSCopy$1$[rsp], rdx +; Line 1077 + 0004c 48 3b 81 c8 00 00 00 cmp rax, QWORD PTR [rcx+200] - 00051 73 0f jae SHORT $LN67@stbi__tga_ - -; 1078 : return *s->img_buffer++; - - 00053 0f b6 10 movzx edx, BYTE PTR [rax] - 00056 48 ff c0 inc rax - 00059 48 89 81 c0 00 + 00053 73 0f jae SHORT $LN67@stbi__tga_ +; Line 1078 + 00055 0f b6 10 movzx edx, BYTE PTR [rax] + 00058 48 ff c0 inc rax + 0005b 48 89 81 c0 00 00 00 mov QWORD PTR [rcx+192], rax - 00060 eb 23 jmp SHORT $LN374@stbi__tga_ + 00062 eb 23 jmp SHORT $LN354@stbi__tga_ $LN67@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - - 00062 83 79 30 00 cmp DWORD PTR [rcx+48], 0 - 00066 74 1b je SHORT $LN68@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - - 00068 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 0006d 48 8b 83 c0 00 +; Line 1079 + 00064 83 79 30 00 cmp DWORD PTR [rcx+48], 0 + 00068 74 1b je SHORT $LN68@stbi__tga_ +; Line 1080 + 0006a e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 0006f 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00074 0f b6 10 movzx edx, BYTE PTR [rax] - 00077 48 ff c0 inc rax - 0007a 48 89 83 c0 00 + 00076 0f b6 10 movzx edx, BYTE PTR [rax] + 00079 48 ff c0 inc rax + 0007c 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00081 eb 02 jmp SHORT $LN374@stbi__tga_ + 00083 eb 02 jmp SHORT $LN354@stbi__tga_ $LN68@stbi__tga_: - -; 1082 : } -; 1083 : return 0; - - 00083 32 d2 xor dl, dl -$LN374@stbi__tga_: - -; 5406 : // read in the TGA header stuff -; 5407 : int tga_offset = stbi__get8(s); - - 00085 b9 30 00 00 00 mov ecx, 48 ; 00000030H - 0008a 4c 8b c3 mov r8, rbx - 0008d 48 8d 34 19 lea rsi, QWORD PTR [rcx+rbx] - 00091 0f b6 ca movzx ecx, dl - 00094 89 4c 24 34 mov DWORD PTR tga_offset$1$[rsp], ecx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00098 48 3b 83 c8 00 +; Line 1083 + 00085 32 d2 xor dl, dl +$LN354@stbi__tga_: +; Line 5407 + 00087 b9 30 00 00 00 mov ecx, 48 ; 00000030H + 0008c 4c 8b c3 mov r8, rbx + 0008f 48 89 ac 24 98 + 00 00 00 mov QWORD PTR [rsp+152], rbp + 00097 48 8d 34 19 lea rsi, QWORD PTR [rcx+rbx] + 0009b 0f b6 ca movzx ecx, dl + 0009e 89 4c 24 38 mov DWORD PTR tga_offset$1$[rsp], ecx +; Line 1077 + 000a2 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 0009f 73 13 jae SHORT $LN71@stbi__tga_ - -; 1078 : return *s->img_buffer++; - - 000a1 0f b6 08 movzx ecx, BYTE PTR [rax] - 000a4 48 ff c0 inc rax - 000a7 48 89 83 c0 00 + 000a9 73 0f jae SHORT $LN71@stbi__tga_ +; Line 1078 + 000ab 0f b6 28 movzx ebp, BYTE PTR [rax] + 000ae 48 ff c0 inc rax + 000b1 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 000ae 88 4c 24 30 mov BYTE PTR $T18[rsp], cl - 000b2 eb 2c jmp SHORT $LN70@stbi__tga_ + 000b8 eb 26 jmp SHORT $LN355@stbi__tga_ $LN71@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - - 000b4 83 3e 00 cmp DWORD PTR [rsi], 0 - 000b7 74 22 je SHORT $LN72@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - - 000b9 48 8b cb mov rcx, rbx - 000bc e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 000c1 48 8b 83 c0 00 +; Line 1079 + 000ba 83 3e 00 cmp DWORD PTR [rsi], 0 + 000bd 74 1e je SHORT $LN72@stbi__tga_ +; Line 1080 + 000bf 48 8b cb mov rcx, rbx + 000c2 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 000c7 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 000c8 0f b6 08 movzx ecx, BYTE PTR [rax] - 000cb 48 ff c0 inc rax - 000ce 48 89 83 c0 00 + 000ce 0f b6 28 movzx ebp, BYTE PTR [rax] + 000d1 48 ff c0 inc rax + 000d4 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 000d5 88 4c 24 30 mov BYTE PTR $T18[rsp], cl - 000d9 eb 05 jmp SHORT $LN70@stbi__tga_ + 000db eb 03 jmp SHORT $LN355@stbi__tga_ $LN72@stbi__tga_: - -; 1082 : } -; 1083 : return 0; - - 000db c6 44 24 30 00 mov BYTE PTR $T18[rsp], 0 -$LN70@stbi__tga_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 000e0 48 3b 83 c8 00 +; Line 1083 + 000dd 40 32 ed xor bpl, bpl +$LN355@stbi__tga_: +; Line 1077 + 000e0 40 88 6c 24 30 mov BYTE PTR $T1[rsp], bpl + 000e5 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 000e7 73 0f jae SHORT $LN75@stbi__tga_ - -; 1078 : return *s->img_buffer++; - - 000e9 0f b6 08 movzx ecx, BYTE PTR [rax] - 000ec 48 ff c0 inc rax - 000ef 48 89 83 c0 00 + 000ec 73 0f jae SHORT $LN75@stbi__tga_ +; Line 1078 + 000ee 0f b6 08 movzx ecx, BYTE PTR [rax] + 000f1 48 ff c0 inc rax + 000f4 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 000f6 eb 25 jmp SHORT $LN74@stbi__tga_ + 000fb eb 25 jmp SHORT $LN74@stbi__tga_ $LN75@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - - 000f8 83 3e 00 cmp DWORD PTR [rsi], 0 - 000fb 74 1e je SHORT $LN76@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - - 000fd 48 8b cb mov rcx, rbx - 00100 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00105 48 8b 83 c0 00 +; Line 1079 + 000fd 83 3e 00 cmp DWORD PTR [rsi], 0 + 00100 74 1e je SHORT $LN76@stbi__tga_ +; Line 1080 + 00102 48 8b cb mov rcx, rbx + 00105 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 0010a 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 0010c 0f b6 08 movzx ecx, BYTE PTR [rax] - 0010f 48 ff c0 inc rax - 00112 48 89 83 c0 00 + 00111 0f b6 08 movzx ecx, BYTE PTR [rax] + 00114 48 ff c0 inc rax + 00117 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00119 eb 02 jmp SHORT $LN74@stbi__tga_ + 0011e eb 02 jmp SHORT $LN74@stbi__tga_ $LN76@stbi__tga_: - -; 1082 : } -; 1083 : return 0; - - 0011b 32 c9 xor cl, cl +; Line 1083 + 00120 32 c9 xor cl, cl $LN74@stbi__tga_: - -; 5408 : int tga_indexed = stbi__get8(s); -; 5409 : int tga_image_type = stbi__get8(s); - - 0011d 0f b6 c1 movzx eax, cl - -; 5410 : int tga_is_RLE = 0; -; 5411 : int tga_palette_start = stbi__get16le(s); - - 00120 48 8b cb mov rcx, rbx - 00123 89 44 24 44 mov DWORD PTR tv2782[rsp], eax - 00127 8b e8 mov ebp, eax - 00129 89 44 24 3c mov DWORD PTR tga_image_type$1$[rsp], eax - 0012d e8 00 00 00 00 call stbi__get16le - -; 5412 : int tga_palette_len = stbi__get16le(s); - - 00132 48 8b cb mov rcx, rbx - 00135 4c 63 e0 movsxd r12, eax - 00138 e8 00 00 00 00 call stbi__get16le - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 0013d 48 8b 8b c0 00 +; Line 5409 + 00122 0f b6 c1 movzx eax, cl +; Line 5411 + 00125 48 8b cb mov rcx, rbx + 00128 89 44 24 44 mov DWORD PTR tv2604[rsp], eax + 0012c 44 8b e0 mov r12d, eax + 0012f e8 00 00 00 00 call stbi__get16le +; Line 5412 + 00134 48 8b cb mov rcx, rbx + 00137 89 44 24 34 mov DWORD PTR tga_palette_start$1$[rsp], eax + 0013b e8 00 00 00 00 call stbi__get16le +; Line 1077 + 00140 48 8b 8b c0 00 00 00 mov rcx, QWORD PTR [rbx+192] - -; 5412 : int tga_palette_len = stbi__get16le(s); - - 00144 89 44 24 58 mov DWORD PTR tga_palette_len$1$[rsp], eax - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00148 48 3b 8b c8 00 +; Line 5412 + 00147 89 44 24 50 mov DWORD PTR tga_palette_len$1$[rsp], eax +; Line 1077 + 0014b 48 3b 8b c8 00 00 00 cmp rcx, QWORD PTR [rbx+200] - 0014f 73 0f jae SHORT $LN79@stbi__tga_ - -; 1078 : return *s->img_buffer++; - - 00151 0f b6 11 movzx edx, BYTE PTR [rcx] - 00154 48 ff c1 inc rcx - 00157 48 89 8b c0 00 + 00152 73 0f jae SHORT $LN79@stbi__tga_ +; Line 1078 + 00154 0f b6 11 movzx edx, BYTE PTR [rcx] + 00157 48 ff c1 inc rcx + 0015a 48 89 8b c0 00 00 00 mov QWORD PTR [rbx+192], rcx - 0015e eb 25 jmp SHORT $LN78@stbi__tga_ + 00161 eb 25 jmp SHORT $LN78@stbi__tga_ $LN79@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - - 00160 83 3e 00 cmp DWORD PTR [rsi], 0 - 00163 74 1e je SHORT $LN80@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - - 00165 48 8b cb mov rcx, rbx - 00168 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 0016d 48 8b 83 c0 00 +; Line 1079 + 00163 83 3e 00 cmp DWORD PTR [rsi], 0 + 00166 74 1e je SHORT $LN80@stbi__tga_ +; Line 1080 + 00168 48 8b cb mov rcx, rbx + 0016b e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00170 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00174 0f b6 10 movzx edx, BYTE PTR [rax] - 00177 48 ff c0 inc rax - 0017a 48 89 83 c0 00 + 00177 0f b6 10 movzx edx, BYTE PTR [rax] + 0017a 48 ff c0 inc rax + 0017d 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00181 eb 02 jmp SHORT $LN78@stbi__tga_ + 00184 eb 02 jmp SHORT $LN78@stbi__tga_ $LN80@stbi__tga_: - -; 1082 : } -; 1083 : return 0; - - 00183 32 d2 xor dl, dl +; Line 1083 + 00186 32 d2 xor dl, dl $LN78@stbi__tga_: - -; 5413 : int tga_palette_bits = stbi__get8(s); -; 5414 : int tga_x_origin = stbi__get16le(s); - - 00185 48 8b cb mov rcx, rbx - 00188 0f b6 fa movzx edi, dl - 0018b e8 00 00 00 00 call stbi__get16le - -; 5415 : int tga_y_origin = stbi__get16le(s); - - 00190 48 8b cb mov rcx, rbx - 00193 e8 00 00 00 00 call stbi__get16le - -; 5416 : int tga_width = stbi__get16le(s); - - 00198 48 8b cb mov rcx, rbx - 0019b e8 00 00 00 00 call stbi__get16le - -; 5417 : int tga_height = stbi__get16le(s); - - 001a0 48 8b cb mov rcx, rbx - 001a3 89 44 24 40 mov DWORD PTR tga_width$1$[rsp], eax - 001a7 e8 00 00 00 00 call stbi__get16le - 001ac 89 44 24 38 mov DWORD PTR $T19[rsp], eax - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 001b0 48 8b 83 c0 00 +; Line 5414 + 00188 48 8b cb mov rcx, rbx + 0018b 0f b6 fa movzx edi, dl + 0018e e8 00 00 00 00 call stbi__get16le +; Line 5415 + 00193 48 8b cb mov rcx, rbx + 00196 e8 00 00 00 00 call stbi__get16le +; Line 5416 + 0019b 48 8b cb mov rcx, rbx + 0019e e8 00 00 00 00 call stbi__get16le +; Line 5417 + 001a3 48 8b cb mov rcx, rbx + 001a6 89 44 24 40 mov DWORD PTR tga_width$1$[rsp], eax + 001aa e8 00 00 00 00 call stbi__get16le + 001af 89 44 24 3c mov DWORD PTR $T2[rsp], eax +; Line 1077 + 001b3 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 001b7 48 3b 83 c8 00 + 001ba 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 001be 73 0f jae SHORT $LN83@stbi__tga_ - -; 1078 : return *s->img_buffer++; - - 001c0 0f b6 08 movzx ecx, BYTE PTR [rax] - 001c3 48 ff c0 inc rax - 001c6 48 89 83 c0 00 + 001c1 73 0f jae SHORT $LN83@stbi__tga_ +; Line 1078 + 001c3 0f b6 08 movzx ecx, BYTE PTR [rax] + 001c6 48 ff c0 inc rax + 001c9 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 001cd eb 25 jmp SHORT $LN82@stbi__tga_ + 001d0 eb 25 jmp SHORT $LN82@stbi__tga_ $LN83@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - - 001cf 83 3e 00 cmp DWORD PTR [rsi], 0 - 001d2 74 1e je SHORT $LN84@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - - 001d4 48 8b cb mov rcx, rbx - 001d7 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 001dc 48 8b 83 c0 00 +; Line 1079 + 001d2 83 3e 00 cmp DWORD PTR [rsi], 0 + 001d5 74 1e je SHORT $LN84@stbi__tga_ +; Line 1080 + 001d7 48 8b cb mov rcx, rbx + 001da e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 001df 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 001e3 0f b6 08 movzx ecx, BYTE PTR [rax] - 001e6 48 ff c0 inc rax - 001e9 48 89 83 c0 00 + 001e6 0f b6 08 movzx ecx, BYTE PTR [rax] + 001e9 48 ff c0 inc rax + 001ec 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 001f0 eb 02 jmp SHORT $LN82@stbi__tga_ + 001f3 eb 02 jmp SHORT $LN82@stbi__tga_ $LN84@stbi__tga_: - -; 1082 : } -; 1083 : return 0; - - 001f2 32 c9 xor cl, cl +; Line 1083 + 001f5 32 c9 xor cl, cl $LN82@stbi__tga_: - -; 5418 : int tga_bits_per_pixel = stbi__get8(s); - - 001f4 0f b6 d1 movzx edx, cl - 001f7 89 54 24 60 mov DWORD PTR tga_bits_per_pixel$1$[rsp], edx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 001fb 48 3b 83 c8 00 +; Line 5418 + 001f7 0f b6 d1 movzx edx, cl + 001fa 89 54 24 64 mov DWORD PTR tga_bits_per_pixel$1$[rsp], edx +; Line 1077 + 001fe 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 00202 73 0f jae SHORT $LN87@stbi__tga_ - -; 1078 : return *s->img_buffer++; - - 00204 0f b6 08 movzx ecx, BYTE PTR [rax] - 00207 48 ff c0 inc rax - 0020a 48 89 83 c0 00 + 00205 73 0f jae SHORT $LN87@stbi__tga_ +; Line 1078 + 00207 0f b6 08 movzx ecx, BYTE PTR [rax] + 0020a 48 ff c0 inc rax + 0020d 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00211 eb 29 jmp SHORT $LN86@stbi__tga_ + 00214 eb 29 jmp SHORT $LN86@stbi__tga_ $LN87@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - - 00213 83 3e 00 cmp DWORD PTR [rsi], 0 - 00216 74 22 je SHORT $LN88@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - - 00218 48 8b cb mov rcx, rbx - 0021b e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00220 48 8b 83 c0 00 +; Line 1079 + 00216 83 3e 00 cmp DWORD PTR [rsi], 0 + 00219 74 22 je SHORT $LN88@stbi__tga_ +; Line 1080 + 0021b 48 8b cb mov rcx, rbx + 0021e e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00223 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00227 8b 54 24 60 mov edx, DWORD PTR tga_bits_per_pixel$1$[rsp] - 0022b 0f b6 08 movzx ecx, BYTE PTR [rax] - 0022e 48 ff c0 inc rax - 00231 48 89 83 c0 00 + 0022a 8b 54 24 64 mov edx, DWORD PTR tga_bits_per_pixel$1$[rsp] + 0022e 0f b6 08 movzx ecx, BYTE PTR [rax] + 00231 48 ff c0 inc rax + 00234 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00238 eb 02 jmp SHORT $LN86@stbi__tga_ + 0023b eb 02 jmp SHORT $LN86@stbi__tga_ $LN88@stbi__tga_: - -; 1082 : } -; 1083 : return 0; - - 0023a 32 c9 xor cl, cl +; Line 1083 + 0023d 32 c9 xor cl, cl $LN86@stbi__tga_: - -; 5419 : int tga_comp, tga_rgb16 = 0; -; 5420 : int tga_inverted = stbi__get8(s); -; 5421 : // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) -; 5422 : // image data -; 5423 : unsigned char* tga_data; -; 5424 : unsigned char* tga_palette = NULL; -; 5425 : int i, j; -; 5426 : unsigned char raw_data[4] = { 0 }; -; 5427 : int RLE_count = 0; -; 5428 : int RLE_repeating = 0; -; 5429 : int read_next_pixel = 1; -; 5430 : STBI_NOTUSED(ri); -; 5431 : STBI_NOTUSED(tga_x_origin); // @TODO -; 5432 : STBI_NOTUSED(tga_y_origin); // @TODO -; 5433 : -; 5434 : if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - - 0023c 8b 74 24 38 mov esi, DWORD PTR $T19[rsp] - 00240 45 33 f6 xor r14d, r14d - 00243 0f b6 c1 movzx eax, cl - 00246 45 8b fe mov r15d, r14d - 00249 4c 89 74 24 50 mov QWORD PTR tga_palette$1$[rsp], r14 - 0024e 44 89 b4 24 80 - 00 00 00 mov DWORD PTR raw_data$[rsp], r14d - 00256 44 89 74 24 5c mov DWORD PTR RLE_repeating$1$[rsp], r14d - 0025b 45 8d 6e 01 lea r13d, QWORD PTR [r14+1] - 0025f 81 fe 00 00 00 +; Line 5434 + 0023f 8b 74 24 3c mov esi, DWORD PTR $T2[rsp] + 00243 45 33 ff xor r15d, r15d + 00246 0f b6 c1 movzx eax, cl + 00249 45 8b ef mov r13d, r15d + 0024c 4c 89 7c 24 58 mov QWORD PTR tga_palette$1$[rsp], r15 + 00251 44 89 bc 24 84 + 00 00 00 mov DWORD PTR raw_data$[rsp], r15d + 00259 45 8d 77 01 lea r14d, QWORD PTR [r15+1] + 0025d 81 fe 00 00 00 01 cmp esi, 16777216 ; 01000000H - 00265 0f 8f c1 07 00 - 00 jg $LN271@stbi__tga_ - -; 5435 : if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - - 0026b 44 8b 44 24 40 mov r8d, DWORD PTR tga_width$1$[rsp] - 00270 41 81 f8 00 00 + 00263 0f 8f e6 06 00 + 00 jg $LN257@stbi__tga_ +; Line 5435 + 00269 44 8b 44 24 40 mov r8d, DWORD PTR tga_width$1$[rsp] + 0026e 41 81 f8 00 00 00 01 cmp r8d, 16777216 ; 01000000H - 00277 0f 8f af 07 00 - 00 jg $LN271@stbi__tga_ - -; 5436 : -; 5437 : // do a tiny bit of precessing -; 5438 : if (tga_image_type >= 8) - - 0027d 83 fd 08 cmp ebp, 8 - 00280 72 07 jb SHORT $LN31@stbi__tga_ - -; 5439 : { -; 5440 : tga_image_type -= 8; - - 00282 83 ed 08 sub ebp, 8 - 00285 89 6c 24 3c mov DWORD PTR tga_image_type$1$[rsp], ebp + 00275 0f 8f d4 06 00 + 00 jg $LN257@stbi__tga_ +; Line 5438 + 0027b 41 83 fc 08 cmp r12d, 8 + 0027f 72 04 jb SHORT $LN31@stbi__tga_ +; Line 5440 + 00281 41 83 ec 08 sub r12d, 8 $LN31@stbi__tga_: - -; 5441 : tga_is_RLE = 1; -; 5442 : } -; 5443 : tga_inverted = 1 - ((tga_inverted >> 5) & 1); - - 00289 c1 e8 05 shr eax, 5 - 0028c 41 8b cd mov ecx, r13d - 0028f 41 23 c5 and eax, r13d - -; 5444 : -; 5445 : // If I'm paletted, then I'll use the number of bits from the palette -; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); - - 00292 41 8b ee mov ebp, r14d - 00295 2b c8 sub ecx, eax - 00297 89 4c 24 64 mov DWORD PTR tga_inverted$1$[rsp], ecx - 0029b 44 38 74 24 30 cmp BYTE PTR $T18[rsp], r14b - 002a0 74 22 je SHORT $LN32@stbi__tga_ - -; 5273 : switch (bits_per_pixel) { - - 002a2 8b cf mov ecx, edi - 002a4 83 e9 08 sub ecx, 8 - 002a7 74 16 je SHORT $LN98@stbi__tga_ - 002a9 83 e9 07 sub ecx, 7 - 002ac 74 67 je SHORT $LN113@stbi__tga_ - 002ae 41 2b cd sub ecx, r13d - 002b1 74 62 je SHORT $LN113@stbi__tga_ - 002b3 83 e9 08 sub ecx, 8 - 002b6 74 29 je SHORT $LN103@stbi__tga_ - 002b8 83 f9 08 cmp ecx, 8 - 002bb 75 2b jne SHORT $LN273@stbi__tga_ - -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; -; 5278 : return STBI_rgb; -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; - - 002bd eb 22 jmp SHORT $LN103@stbi__tga_ +; Line 5443 + 00285 c1 e8 05 shr eax, 5 + 00288 41 8b ce mov ecx, r14d + 0028b 41 23 c6 and eax, r14d + 0028e 2b c8 sub ecx, eax +; Line 5446 + 00290 40 84 ed test bpl, bpl + 00293 89 4c 24 68 mov DWORD PTR tga_inverted$1$[rsp], ecx + 00297 41 8b ef mov ebp, r15d + 0029a 74 22 je SHORT $LN32@stbi__tga_ +; Line 5273 + 0029c 8b cf mov ecx, edi + 0029e 83 e9 08 sub ecx, 8 + 002a1 74 16 je SHORT $LN98@stbi__tga_ + 002a3 83 e9 07 sub ecx, 7 + 002a6 74 66 je SHORT $LN113@stbi__tga_ + 002a8 41 2b ce sub ecx, r14d + 002ab 74 61 je SHORT $LN113@stbi__tga_ + 002ad 83 e9 08 sub ecx, 8 + 002b0 74 29 je SHORT $LN103@stbi__tga_ + 002b2 83 f9 08 cmp ecx, 8 + 002b5 75 2b jne SHORT $LN259@stbi__tga_ +; Line 5280 + 002b7 eb 22 jmp SHORT $LN103@stbi__tga_ $LN98@stbi__tga_: - -; 5274 : case 8: return STBI_grey; - - 002bf 41 8b fd mov edi, r13d - -; 5444 : -; 5445 : // If I'm paletted, then I'll use the number of bits from the palette -; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); - - 002c2 eb 20 jmp SHORT $LN107@stbi__tga_ +; Line 5274 + 002b9 41 8b fe mov edi, r14d +; Line 5446 + 002bc eb 20 jmp SHORT $LN107@stbi__tga_ $LN32@stbi__tga_: - -; 5273 : switch (bits_per_pixel) { - - 002c4 8b ca mov ecx, edx - 002c6 83 e9 08 sub ecx, 8 - 002c9 74 54 je SHORT $LN111@stbi__tga_ - 002cb 83 e9 07 sub ecx, 7 - 002ce 74 45 je SHORT $LN113@stbi__tga_ - 002d0 41 2b cd sub ecx, r13d - 002d3 74 32 je SHORT $LN112@stbi__tga_ - 002d5 83 e9 08 sub ecx, 8 - 002d8 74 05 je SHORT $LN116@stbi__tga_ - 002da 83 f9 08 cmp ecx, 8 - 002dd 75 09 jne SHORT $LN273@stbi__tga_ +; Line 5273 + 002be 8b ca mov ecx, edx + 002c0 83 e9 08 sub ecx, 8 + 002c3 74 53 je SHORT $LN111@stbi__tga_ + 002c5 83 e9 07 sub ecx, 7 + 002c8 74 44 je SHORT $LN113@stbi__tga_ + 002ca 41 2b ce sub ecx, r14d + 002cd 74 32 je SHORT $LN112@stbi__tga_ + 002cf 83 e9 08 sub ecx, 8 + 002d2 74 05 je SHORT $LN116@stbi__tga_ + 002d4 83 f9 08 cmp ecx, 8 + 002d7 75 09 jne SHORT $LN259@stbi__tga_ $LN116@stbi__tga_: - -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; -; 5278 : return STBI_rgb; -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; - - 002df 8b fa mov edi, edx +; Line 5280 + 002d9 8b fa mov edi, edx $LN103@stbi__tga_: - -; 5448 : -; 5449 : if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency - - 002e1 c1 ef 03 shr edi, 3 +; Line 5449 + 002db c1 ef 03 shr edi, 3 $LN107@stbi__tga_: - 002e4 85 ff test edi, edi - 002e6 75 3a jne SHORT $LN34@stbi__tga_ -$LN273@stbi__tga_: - -; 431 : stbi__g_failure_reason = str; - - 002e8 8b 15 00 00 00 + 002de 85 ff test edi, edi + 002e0 75 39 jne SHORT $LN34@stbi__tga_ +$LN259@stbi__tga_: +; Line 431 + 002e2 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 002ee 65 48 8b 04 25 + 002e8 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 002f7 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 002fb 48 8d 15 00 00 + 002f1 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 002f5 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0L@DMAPJJO@bad?5format@ - -; 5450 : return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); - - 00302 e9 3f 07 00 00 jmp $LN375@stbi__tga_ +; Line 5450 + 002fc e9 68 06 00 00 jmp $LN356@stbi__tga_ $LN112@stbi__tga_: - -; 5447 : else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); - - 00307 83 7c 24 3c 03 cmp DWORD PTR tga_image_type$1$[rsp], 3 - -; 5275 : case 16: if (is_grey) return STBI_grey_alpha; - - 0030c 75 07 jne SHORT $LN113@stbi__tga_ - 0030e bf 02 00 00 00 mov edi, 2 - 00313 eb 0d jmp SHORT $LN34@stbi__tga_ +; Line 5447 + 00301 41 83 fc 03 cmp r12d, 3 +; Line 5275 + 00305 75 07 jne SHORT $LN113@stbi__tga_ + 00307 41 8d 7c 24 ff lea edi, QWORD PTR [r12-1] + 0030c eb 0d jmp SHORT $LN34@stbi__tga_ $LN113@stbi__tga_: - -; 5451 : -; 5452 : // tga info -; 5453 : *x = tga_width; - - 00315 41 8b ed mov ebp, r13d - 00318 bf 03 00 00 00 mov edi, 3 - 0031d eb 03 jmp SHORT $LN34@stbi__tga_ +; Line 5453 + 0030e 41 8b ee mov ebp, r14d + 00311 bf 03 00 00 00 mov edi, 3 + 00316 eb 03 jmp SHORT $LN34@stbi__tga_ $LN111@stbi__tga_: - -; 5274 : case 8: return STBI_grey; - - 0031f 41 8b fd mov edi, r13d +; Line 5274 + 00318 41 8b fe mov edi, r14d $LN34@stbi__tga_: - -; 5451 : -; 5452 : // tga info -; 5453 : *x = tga_width; - - 00322 48 8b 44 24 68 mov rax, QWORD PTR x$GSCopy$1$[rsp] - 00327 44 89 00 mov DWORD PTR [rax], r8d - -; 5454 : *y = tga_height; - - 0032a 48 8b 44 24 48 mov rax, QWORD PTR y$GSCopy$1$[rsp] - 0032f 89 30 mov DWORD PTR [rax], esi - -; 5455 : if (comp) *comp = tga_comp; - - 00331 48 8b 44 24 78 mov rax, QWORD PTR comp$GSCopy$1$[rsp] - 00336 48 85 c0 test rax, rax - 00339 74 02 je SHORT $LN35@stbi__tga_ - 0033b 89 38 mov DWORD PTR [rax], edi +; Line 5453 + 0031b 48 8b 44 24 78 mov rax, QWORD PTR x$GSCopy$1$[rsp] + 00320 44 89 00 mov DWORD PTR [rax], r8d +; Line 5454 + 00323 48 8b 44 24 70 mov rax, QWORD PTR y$GSCopy$1$[rsp] + 00328 89 30 mov DWORD PTR [rax], esi +; Line 5455 + 0032a 48 8b 44 24 48 mov rax, QWORD PTR comp$GSCopy$1$[rsp] + 0032f 48 85 c0 test rax, rax + 00332 74 02 je SHORT $LN35@stbi__tga_ + 00334 89 38 mov DWORD PTR [rax], edi $LN35@stbi__tga_: - -; 467 : if (a < 0 || b < 0) return 0; - - 0033d 45 85 c0 test r8d, r8d - 00340 0f 88 e6 06 00 - 00 js $LN271@stbi__tga_ - 00346 85 f6 test esi, esi - 00348 0f 88 de 06 00 - 00 js $LN271@stbi__tga_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 0034e 74 11 je SHORT $LN272@stbi__tga_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 00350 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00355 99 cdq - 00356 f7 fe idiv esi - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00358 44 3b c0 cmp r8d, eax - 0035b 0f 8f cb 06 00 - 00 jg $LN271@stbi__tga_ -$LN272@stbi__tga_: - 00361 8b ce mov ecx, esi - 00363 41 0f af c8 imul ecx, r8d - -; 467 : if (a < 0 || b < 0) return 0; - - 00367 85 c9 test ecx, ecx - 00369 0f 88 bd 06 00 - 00 js $LN271@stbi__tga_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 0036f 33 d2 xor edx, edx - 00371 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00376 f7 f7 div edi - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00378 3b c8 cmp ecx, eax - 0037a 0f 8f ac 06 00 - 00 jg $LN271@stbi__tga_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 00380 85 f6 test esi, esi - 00382 74 11 je SHORT $LN274@stbi__tga_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 00384 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00389 99 cdq - 0038a f7 fe idiv esi - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 0038c 44 3b c0 cmp r8d, eax - 0038f 0f 8f 7b 06 00 - 00 jg $LN264@stbi__tga_ -$LN274@stbi__tga_: - -; 509 : return stbi__malloc(a * b * c + add); - - 00395 8b c6 mov eax, esi - 00397 0f af c7 imul eax, edi - 0039a 41 0f af c0 imul eax, r8d - 0039e 48 63 c8 movsxd rcx, eax - -; 438 : return STBI_MALLOC(size); - - 003a1 ff 15 00 00 00 +; Line 467 + 00336 45 85 c0 test r8d, r8d + 00339 0f 88 10 06 00 + 00 js $LN257@stbi__tga_ + 0033f 85 f6 test esi, esi + 00341 0f 88 08 06 00 + 00 js $LN257@stbi__tga_ +; Line 468 + 00347 74 11 je SHORT $LN258@stbi__tga_ +; Line 470 + 00349 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 0034e 99 cdq + 0034f f7 fe idiv esi +; Line 484 + 00351 44 3b c0 cmp r8d, eax + 00354 0f 8f f5 05 00 + 00 jg $LN257@stbi__tga_ +$LN258@stbi__tga_: + 0035a 8b ce mov ecx, esi + 0035c 41 0f af c8 imul ecx, r8d +; Line 467 + 00360 85 c9 test ecx, ecx + 00362 0f 88 e7 05 00 + 00 js $LN257@stbi__tga_ +; Line 470 + 00368 33 d2 xor edx, edx + 0036a b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 0036f f7 f7 div edi +; Line 484 + 00371 3b c8 cmp ecx, eax + 00373 0f 8f d6 05 00 + 00 jg $LN257@stbi__tga_ +; Line 468 + 00379 85 f6 test esi, esi + 0037b 74 11 je SHORT $LN260@stbi__tga_ +; Line 470 + 0037d b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 00382 99 cdq + 00383 f7 fe idiv esi +; Line 484 + 00385 44 3b c0 cmp r8d, eax + 00388 0f 8f a5 05 00 + 00 jg $LN250@stbi__tga_ +$LN260@stbi__tga_: +; Line 509 + 0038e 8b c7 mov eax, edi + 00390 0f af c6 imul eax, esi + 00393 41 0f af c0 imul eax, r8d + 00397 48 63 c8 movsxd rcx, eax +; Line 438 + 0039a ff 15 00 00 00 00 call QWORD PTR __imp_malloc - 003a7 48 89 44 24 48 mov QWORD PTR tga_data$1$[rsp], rax - 003ac 4c 8b c0 mov r8, rax - -; 5456 : -; 5457 : if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) -; 5458 : return stbi__errpuc("too large", "Corrupt TGA"); -; 5459 : -; 5460 : tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); -; 5461 : if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); - - 003af 48 85 c0 test rax, rax - 003b2 0f 84 58 06 00 - 00 je $LN264@stbi__tga_ - -; 1107 : if (n == 0) return; // already there! - - 003b8 48 63 54 24 34 movsxd rdx, DWORD PTR tga_offset$1$[rsp] - 003bd 85 d2 test edx, edx - 003bf 74 3b je SHORT $LN167@stbi__tga_ - -; 1111 : } -; 1112 : if (s->io.read) { - - 003c1 4c 39 73 10 cmp QWORD PTR [rbx+16], r14 - 003c5 74 2e je SHORT $LN171@stbi__tga_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - - 003c7 8b 8b c8 00 00 - 00 mov ecx, DWORD PTR [rbx+200] - 003cd 2b 8b c0 00 00 - 00 sub ecx, DWORD PTR [rbx+192] - -; 1114 : if (blen < n) { - - 003d3 3b ca cmp ecx, edx - 003d5 7d 1e jge SHORT $LN171@stbi__tga_ - -; 1115 : s->img_buffer = s->img_buffer_end; - - 003d7 48 8b 83 c8 00 - 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - - 003de 2b d1 sub edx, ecx - 003e0 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] - 003e4 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 003eb ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - - 003ee 4c 8b 44 24 48 mov r8, QWORD PTR tga_data$1$[rsp] - 003f3 eb 07 jmp SHORT $LN167@stbi__tga_ -$LN171@stbi__tga_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - - 003f5 48 01 93 c0 00 - 00 00 add QWORD PTR [rbx+192], rdx -$LN167@stbi__tga_: - -; 5462 : -; 5463 : // skip to the data's starting position (offset usually = 0) -; 5464 : stbi__skip(s, tga_offset); -; 5465 : -; 5466 : if (!tga_indexed && !tga_is_RLE && !tga_rgb16) { - - 003fc 44 38 74 24 30 cmp BYTE PTR $T18[rsp], r14b - 00401 0f 85 bc 00 00 - 00 jne $LN263@stbi__tga_ - 00407 8b 54 24 44 mov edx, DWORD PTR tv2782[rsp] - 0040b 44 8b e7 mov r12d, edi - 0040e 89 6c 24 3c mov DWORD PTR tga_rgb16$4$[rsp], ebp - 00412 89 7c 24 34 mov DWORD PTR tga_comp$4$[rsp], edi - 00416 83 fa 08 cmp edx, 8 - 00419 0f 83 58 02 00 - 00 jae $LN284@stbi__tga_ - 0041f 89 6c 24 3c mov DWORD PTR tga_rgb16$4$[rsp], ebp - 00423 89 7c 24 34 mov DWORD PTR tga_comp$4$[rsp], edi - 00427 85 ed test ebp, ebp - 00429 0f 85 48 02 00 - 00 jne $LN284@stbi__tga_ - -; 5467 : for (i = 0; i < tga_height; ++i) { - - 0042f 44 8b ed mov r13d, ebp - 00432 85 f6 test esi, esi - 00434 0f 8e 59 05 00 - 00 jle $LN58@stbi__tga_ - -; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; - - 0043a 44 8b ff mov r15d, edi - 0043d 44 0f af 7c 24 + 003a0 48 89 44 24 48 mov QWORD PTR tga_data$1$[rsp], rax + 003a5 4c 8b e0 mov r12, rax +; Line 5461 + 003a8 48 85 c0 test rax, rax + 003ab 0f 84 82 05 00 + 00 je $LN250@stbi__tga_ +; Line 5464 + 003b1 8b 54 24 38 mov edx, DWORD PTR tga_offset$1$[rsp] + 003b5 48 8b cb mov rcx, rbx + 003b8 e8 00 00 00 00 call stbi__skip +; Line 5466 + 003bd 44 38 6c 24 30 cmp BYTE PTR $T1[rsp], r13b + 003c2 0f 85 bb 00 00 + 00 jne $LN249@stbi__tga_ + 003c8 8b 54 24 44 mov edx, DWORD PTR tv2604[rsp] + 003cc 44 8b e7 mov r12d, edi + 003cf 89 6c 24 38 mov DWORD PTR tga_rgb16$4$[rsp], ebp + 003d3 89 7c 24 34 mov DWORD PTR tga_comp$4$[rsp], edi + 003d7 83 fa 08 cmp edx, 8 + 003da 0f 83 95 01 00 + 00 jae $LN271@stbi__tga_ + 003e0 89 6c 24 38 mov DWORD PTR tga_rgb16$4$[rsp], ebp + 003e4 89 7c 24 34 mov DWORD PTR tga_comp$4$[rsp], edi + 003e8 85 ed test ebp, ebp + 003ea 0f 85 85 01 00 + 00 jne $LN271@stbi__tga_ +; Line 5467 + 003f0 85 f6 test esi, esi + 003f2 0f 8e ba 04 00 + 00 jle $LN266@stbi__tga_ +; Line 5468 + 003f8 44 8b 74 24 3c mov r14d, DWORD PTR $T2[rsp] + 003fd 44 8b ff mov r15d, edi + 00400 44 0f af 7c 24 40 imul r15d, DWORD PTR tga_width$1$[rsp] - 00443 44 39 74 24 64 cmp DWORD PTR tga_inverted$1$[rsp], r14d - 00448 44 8b 74 24 38 mov r14d, DWORD PTR $T19[rsp] - 0044d 74 44 je SHORT $LN62@stbi__tga_ - 0044f 41 8b c7 mov eax, r15d - 00452 f7 d8 neg eax - 00454 4c 63 e0 movsxd r12, eax - 00457 8d 46 ff lea eax, DWORD PTR [rsi-1] - 0045a 0f af c7 imul eax, edi - 0045d 0f af 44 24 40 imul eax, DWORD PTR tga_width$1$[rsp] - 00462 48 63 f0 movsxd rsi, eax - 00465 49 03 f0 add rsi, r8 - 00468 0f 1f 84 00 00 - 00 00 00 npad 8 + 00406 44 39 6c 24 68 cmp DWORD PTR tga_inverted$1$[rsp], r13d + 0040b 4c 8b 6c 24 48 mov r13, QWORD PTR tga_data$1$[rsp] + 00410 74 41 je SHORT $LN62@stbi__tga_ + 00412 41 8b c7 mov eax, r15d + 00415 f7 d8 neg eax + 00417 4c 63 e0 movsxd r12, eax + 0041a 8d 46 ff lea eax, DWORD PTR [rsi-1] + 0041d 0f af c7 imul eax, edi + 00420 0f af 44 24 40 imul eax, DWORD PTR tga_width$1$[rsp] + 00425 48 63 f0 movsxd rsi, eax + 00428 49 03 f5 add rsi, r13 + 0042b 0f 1f 44 00 00 npad 5 $LL4@stbi__tga_: - -; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; -; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); - - 00470 45 8b c7 mov r8d, r15d - 00473 48 8b d6 mov rdx, rsi - 00476 48 8b cb mov rcx, rbx - 00479 e8 00 00 00 00 call stbi__getn - 0047e 49 03 f4 add rsi, r12 - 00481 49 83 ee 01 sub r14, 1 - 00485 75 e9 jne SHORT $LL4@stbi__tga_ - -; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; - - 00487 8b 74 24 38 mov esi, DWORD PTR $T19[rsp] - 0048b 44 8b e7 mov r12d, edi - 0048e e9 00 05 00 00 jmp $LN58@stbi__tga_ +; Line 5470 + 00430 45 8b c7 mov r8d, r15d + 00433 48 8b d6 mov rdx, rsi + 00436 48 8b cb mov rcx, rbx + 00439 e8 00 00 00 00 call stbi__getn + 0043e 49 03 f4 add rsi, r12 + 00441 49 83 ee 01 sub r14, 1 + 00445 75 e9 jne SHORT $LL4@stbi__tga_ +; Line 5468 + 00447 8b 74 24 3c mov esi, DWORD PTR $T2[rsp] + 0044b 44 8b e7 mov r12d, edi + 0044e e9 64 04 00 00 jmp $LN58@stbi__tga_ $LN62@stbi__tga_: - -; 5467 : for (i = 0; i < tga_height; ++i) { - - 00493 4d 63 e7 movsxd r12, r15d - 00496 49 8b f0 mov rsi, r8 - 00499 0f 1f 80 00 00 +; Line 5467 + 00453 4d 63 e7 movsxd r12, r15d + 00456 49 8b f5 mov rsi, r13 + 00459 0f 1f 80 00 00 00 00 npad 7 -$LL234@stbi__tga_: - -; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; -; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); - - 004a0 45 8b c7 mov r8d, r15d - 004a3 48 8b d6 mov rdx, rsi - 004a6 48 8b cb mov rcx, rbx - 004a9 e8 00 00 00 00 call stbi__getn - 004ae 49 03 f4 add rsi, r12 - 004b1 49 83 ee 01 sub r14, 1 - 004b5 75 e9 jne SHORT $LL234@stbi__tga_ - -; 5471 : } -; 5472 : } - - 004b7 8b 74 24 38 mov esi, DWORD PTR $T19[rsp] - 004bb 44 8b e7 mov r12d, edi - 004be e9 d0 04 00 00 jmp $LN58@stbi__tga_ -$LN263@stbi__tga_: - -; 5473 : else { -; 5474 : // do I need to load a palette? -; 5475 : if (tga_indexed) -; 5476 : { -; 5477 : if (tga_palette_len == 0) { /* you have to have at least one entry! */ - - 004c3 44 39 74 24 58 cmp DWORD PTR tga_palette_len$1$[rsp], r14d - 004c8 75 28 jne SHORT $LN41@stbi__tga_ - -; 5478 : STBI_FREE(tga_data); - - 004ca 49 8b c8 mov rcx, r8 -$LN376@stbi__tga_: - -; 5613 : } - - 004cd ff 15 00 00 00 +$LL220@stbi__tga_: +; Line 5470 + 00460 45 8b c7 mov r8d, r15d + 00463 48 8b d6 mov rdx, rsi + 00466 48 8b cb mov rcx, rbx + 00469 e8 00 00 00 00 call stbi__getn + 0046e 49 03 f4 add rsi, r12 + 00471 49 83 ee 01 sub r14, 1 + 00475 75 e9 jne SHORT $LL220@stbi__tga_ +; Line 5472 + 00477 8b 74 24 3c mov esi, DWORD PTR $T2[rsp] + 0047b 44 8b e7 mov r12d, edi + 0047e e9 34 04 00 00 jmp $LN58@stbi__tga_ +$LN249@stbi__tga_: +; Line 5477 + 00483 44 39 6c 24 50 cmp DWORD PTR tga_palette_len$1$[rsp], r13d + 00488 75 28 jne SHORT $LN41@stbi__tga_ +; Line 5478 + 0048a 49 8b cc mov rcx, r12 +$LN357@stbi__tga_: +; Line 5613 + 0048d ff 15 00 00 00 00 call QWORD PTR __imp_free - 004d3 8b 15 00 00 00 + 00493 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 004d9 65 48 8b 04 25 + 00499 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 004e2 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 004e6 48 8d 15 00 00 + 004a2 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 004a6 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0M@ILLOCNCO@bad?5palette@ - 004ed e9 54 05 00 00 jmp $LN375@stbi__tga_ + 004ad e9 b7 04 00 00 jmp $LN356@stbi__tga_ $LN41@stbi__tga_: - -; 1107 : if (n == 0) return; // already there! - - 004f2 45 85 e4 test r12d, r12d - 004f5 74 4d je SHORT $LN189@stbi__tga_ - -; 1108 : if (n < 0) { - - 004f7 79 10 jns SHORT $LN191@stbi__tga_ - -; 1109 : s->img_buffer = s->img_buffer_end; - - 004f9 48 8b 83 c8 00 - 00 00 mov rax, QWORD PTR [rbx+200] - 00500 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - -; 1110 : return; - - 00507 eb 3b jmp SHORT $LN189@stbi__tga_ -$LN191@stbi__tga_: - -; 1111 : } -; 1112 : if (s->io.read) { - - 00509 4c 39 73 10 cmp QWORD PTR [rbx+16], r14 - 0050d 74 2e je SHORT $LN193@stbi__tga_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - - 0050f 8b 8b c8 00 00 - 00 mov ecx, DWORD PTR [rbx+200] - 00515 2b 8b c0 00 00 - 00 sub ecx, DWORD PTR [rbx+192] - -; 1114 : if (blen < n) { - - 0051b 41 3b cc cmp ecx, r12d - 0051e 7d 1d jge SHORT $LN193@stbi__tga_ - -; 1115 : s->img_buffer = s->img_buffer_end; - - 00520 48 8b 83 c8 00 - 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - - 00527 44 2b e1 sub r12d, ecx - 0052a 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] - 0052e 41 8b d4 mov edx, r12d - 00531 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 00538 ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - - 0053b eb 07 jmp SHORT $LN189@stbi__tga_ -$LN193@stbi__tga_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - - 0053d 4c 01 a3 c0 00 - 00 00 add QWORD PTR [rbx+192], r12 -$LN189@stbi__tga_: - -; 467 : if (a < 0 || b < 0) return 0; - - 00544 44 8b 64 24 58 mov r12d, DWORD PTR tga_palette_len$1$[rsp] - 00549 45 85 e4 test r12d, r12d - 0054c 0f 88 b3 04 00 - 00 js $LN265@stbi__tga_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 00552 33 d2 xor edx, edx - 00554 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00559 f7 f7 div edi - -; 477 : return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add); - - 0055b 44 3b e0 cmp r12d, eax - 0055e 0f 8f a1 04 00 - 00 jg $LN265@stbi__tga_ - -; 502 : return stbi__malloc(a * b + add); - - 00564 8b f7 mov esi, edi - 00566 41 0f af f4 imul esi, r12d - 0056a 48 63 ce movsxd rcx, esi - -; 438 : return STBI_MALLOC(size); - - 0056d ff 15 00 00 00 +; Line 5483 + 004b2 8b 54 24 34 mov edx, DWORD PTR tga_palette_start$1$[rsp] + 004b6 48 8b cb mov rcx, rbx + 004b9 e8 00 00 00 00 call stbi__skip +; Line 467 + 004be 8b 4c 24 50 mov ecx, DWORD PTR tga_palette_len$1$[rsp] + 004c2 85 c9 test ecx, ecx + 004c4 0f 88 60 04 00 + 00 js $LN251@stbi__tga_ +; Line 470 + 004ca 33 d2 xor edx, edx + 004cc b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 004d1 f7 f7 div edi +; Line 477 + 004d3 3b c8 cmp ecx, eax + 004d5 0f 8f 4f 04 00 + 00 jg $LN251@stbi__tga_ +; Line 502 + 004db 8b f7 mov esi, edi + 004dd 0f af f1 imul esi, ecx + 004e0 48 63 ce movsxd rcx, esi +; Line 438 + 004e3 ff 15 00 00 00 00 call QWORD PTR __imp_malloc - 00573 48 89 44 24 50 mov QWORD PTR tga_palette$1$[rsp], rax - -; 5479 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5480 : } -; 5481 : -; 5482 : // any data to skip? (offset usually = 0) -; 5483 : stbi__skip(s, tga_palette_start); -; 5484 : // load the palette -; 5485 : tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); -; 5486 : if (!tga_palette) { - - 00578 48 85 c0 test rax, rax - 0057b 0f 84 84 04 00 - 00 je $LN265@stbi__tga_ - -; 5488 : return stbi__errpuc("outofmem", "Out of memory"); -; 5489 : } -; 5490 : if (tga_rgb16) { - - 00581 89 6c 24 3c mov DWORD PTR tga_rgb16$4$[rsp], ebp - 00585 89 7c 24 34 mov DWORD PTR tga_comp$4$[rsp], edi - 00589 85 ed test ebp, ebp - 0058b 0f 84 b1 00 00 - 00 je $LN43@stbi__tga_ - -; 5491 : stbi_uc* pal_entry = tga_palette; - - 00591 48 8b f0 mov rsi, rax - -; 5492 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5493 : for (i = 0; i < tga_palette_len; ++i) { - - 00594 45 85 e4 test r12d, r12d - 00597 0f 8e 95 00 00 - 00 jle $LN267@stbi__tga_ - 0059d 0f 1f 00 npad 3 + 004e9 48 89 44 24 58 mov QWORD PTR tga_palette$1$[rsp], rax +; Line 5486 + 004ee 48 85 c0 test rax, rax + 004f1 0f 84 33 04 00 + 00 je $LN251@stbi__tga_ +; Line 5490 + 004f7 89 6c 24 38 mov DWORD PTR tga_rgb16$4$[rsp], ebp + 004fb 89 7c 24 34 mov DWORD PTR tga_comp$4$[rsp], edi + 004ff 85 ed test ebp, ebp + 00501 74 3d je SHORT $LN43@stbi__tga_ +; Line 5491 + 00503 48 8b f0 mov rsi, rax +; Line 5493 + 00506 8b 44 24 50 mov eax, DWORD PTR tga_palette_len$1$[rsp] + 0050a 85 c0 test eax, eax + 0050c 7e 20 jle SHORT $LN253@stbi__tga_ +; Line 5491 + 0050e 44 8b e7 mov r12d, edi + 00511 44 8b f0 mov r14d, eax $LL7@stbi__tga_: - -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); - - 005a0 48 8b cb mov rcx, rbx - 005a3 e8 00 00 00 00 call stbi__get16le - -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; - - 005a8 44 0f b7 c0 movzx r8d, ax - 005ac 41 8b c0 mov eax, r8d - 005af c1 e8 0a shr eax, 10 - 005b2 83 e0 1f and eax, 31 - -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); - - 005b5 69 c8 ff 00 00 - 00 imul ecx, eax, 255 ; 000000ffH - 005bb b8 43 08 21 84 mov eax, -2078209981 ; ffffffff84210843H - 005c0 f7 e9 imul ecx - 005c2 03 d1 add edx, ecx - 005c4 c1 fa 04 sar edx, 4 - 005c7 8b c2 mov eax, edx - 005c9 c1 e8 1f shr eax, 31 - 005cc 03 d0 add edx, eax - 005ce 41 8b c0 mov eax, r8d - 005d1 c1 e8 05 shr eax, 5 - 005d4 41 83 e0 1f and r8d, 31 - 005d8 83 e0 1f and eax, 31 - 005db 88 16 mov BYTE PTR [rsi], dl - -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); - - 005dd 69 c8 ff 00 00 - 00 imul ecx, eax, 255 ; 000000ffH - 005e3 b8 43 08 21 84 mov eax, -2078209981 ; ffffffff84210843H - 005e8 f7 e9 imul ecx - 005ea 03 d1 add edx, ecx - -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); - - 005ec 41 69 c8 ff 00 - 00 00 imul ecx, r8d, 255 ; 000000ffH - 005f3 c1 fa 04 sar edx, 4 - 005f6 8b c2 mov eax, edx - 005f8 c1 e8 1f shr eax, 31 - 005fb 03 d0 add edx, eax - 005fd b8 43 08 21 84 mov eax, -2078209981 ; ffffffff84210843H - 00602 88 56 01 mov BYTE PTR [rsi+1], dl - 00605 f7 e9 imul ecx - 00607 03 d1 add edx, ecx - 00609 c1 fa 04 sar edx, 4 - 0060c 8b c2 mov eax, edx - 0060e c1 e8 1f shr eax, 31 - 00611 03 d0 add edx, eax - 00613 88 56 02 mov BYTE PTR [rsi+2], dl - -; 5494 : stbi__tga_read_rgb16(s, pal_entry); -; 5495 : pal_entry += tga_comp; - - 00616 48 03 f7 add rsi, rdi - 00619 4d 2b e5 sub r12, r13 - 0061c 75 82 jne SHORT $LL7@stbi__tga_ - 0061e 44 8b 64 24 34 mov r12d, DWORD PTR tga_comp$4$[rsp] - 00623 8b 74 24 38 mov esi, DWORD PTR $T19[rsp] - 00627 48 8b 7c 24 50 mov rdi, QWORD PTR tga_palette$1$[rsp] - 0062c 8b 54 24 44 mov edx, DWORD PTR tv2782[rsp] - 00630 eb 48 jmp SHORT $LN45@stbi__tga_ -$LN267@stbi__tga_: - -; 5496 : } -; 5497 : } - - 00632 8b 74 24 38 mov esi, DWORD PTR $T19[rsp] - 00636 44 8b e7 mov r12d, edi - 00639 8b 54 24 44 mov edx, DWORD PTR tv2782[rsp] - 0063d 48 8b f8 mov rdi, rax - 00640 eb 38 jmp SHORT $LN45@stbi__tga_ +; Line 5494 + 00514 48 8b d6 mov rdx, rsi + 00517 48 8b cb mov rcx, rbx + 0051a e8 00 00 00 00 call stbi__tga_read_rgb16 +; Line 5495 + 0051f 49 03 f4 add rsi, r12 + 00522 49 83 ee 01 sub r14, 1 + 00526 75 ec jne SHORT $LL7@stbi__tga_ + 00528 41 be 01 00 00 + 00 mov r14d, 1 +$LN253@stbi__tga_: +; Line 5505 + 0052e 8b 74 24 3c mov esi, DWORD PTR $T2[rsp] + 00532 44 8b e7 mov r12d, edi + 00535 48 8b 7c 24 58 mov rdi, QWORD PTR tga_palette$1$[rsp] + 0053a 8b 54 24 44 mov edx, DWORD PTR tv2604[rsp] + 0053e eb 38 jmp SHORT $LN45@stbi__tga_ $LN43@stbi__tga_: - -; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { - - 00642 44 8b e7 mov r12d, edi - 00645 44 8b c6 mov r8d, esi - 00648 48 8b d0 mov rdx, rax - 0064b 48 8b cb mov rcx, rbx - 0064e 48 8b f8 mov rdi, rax - 00651 e8 00 00 00 00 call stbi__getn - 00656 85 c0 test eax, eax - 00658 75 13 jne SHORT $LN279@stbi__tga_ - -; 5499 : STBI_FREE(tga_data); - - 0065a 48 8b 4c 24 48 mov rcx, QWORD PTR tga_data$1$[rsp] - 0065f ff 15 00 00 00 +; Line 5498 + 00540 44 8b e7 mov r12d, edi + 00543 44 8b c6 mov r8d, esi + 00546 48 8b d0 mov rdx, rax + 00549 48 8b cb mov rcx, rbx + 0054c 48 8b f8 mov rdi, rax + 0054f e8 00 00 00 00 call stbi__getn + 00554 85 c0 test eax, eax + 00556 75 13 jne SHORT $LN265@stbi__tga_ +; Line 5499 + 00558 48 8b 4c 24 48 mov rcx, QWORD PTR tga_data$1$[rsp] + 0055d ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 5500 : STBI_FREE(tga_palette); - - 00665 48 8b cf mov rcx, rdi - -; 5501 : return stbi__errpuc("bad palette", "Corrupt TGA"); - - 00668 e9 60 fe ff ff jmp $LN376@stbi__tga_ -$LN279@stbi__tga_: - -; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { - - 0066d 8b 74 24 38 mov esi, DWORD PTR $T19[rsp] - 00671 8b 54 24 44 mov edx, DWORD PTR tv2782[rsp] - 00675 eb 03 jmp SHORT $LN45@stbi__tga_ -$LN284@stbi__tga_: - -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) - - 00677 49 8b fe mov rdi, r14 +; Line 5500 + 00563 48 8b cf mov rcx, rdi +; Line 5501 + 00566 e9 22 ff ff ff jmp $LN357@stbi__tga_ +$LN265@stbi__tga_: +; Line 5498 + 0056b 8b 74 24 3c mov esi, DWORD PTR $T2[rsp] + 0056f 8b 54 24 44 mov edx, DWORD PTR tv2604[rsp] + 00573 eb 03 jmp SHORT $LN45@stbi__tga_ +$LN271@stbi__tga_: +; Line 5505 + 00575 49 8b fd mov rdi, r13 $LN45@stbi__tga_: - 0067a 8b 4c 24 40 mov ecx, DWORD PTR tga_width$1$[rsp] - 0067e 8b c6 mov eax, esi - 00680 0f af c1 imul eax, ecx - -; 5540 : for (j = 0; j < tga_comp; ++j) { - - 00683 41 8b f4 mov esi, r12d - 00686 85 c0 test eax, eax - 00688 0f 84 76 02 00 + 00578 8b 4c 24 40 mov ecx, DWORD PTR tga_width$1$[rsp] + 0057c 8b c6 mov eax, esi + 0057e 0f af c1 imul eax, ecx +; Line 5540 + 00581 41 8b f4 mov esi, r12d + 00584 85 c0 test eax, eax + 00586 0f 84 94 02 00 00 je $LN9@stbi__tga_ - -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) - - 0068e 48 8b 6c 24 48 mov rbp, QWORD PTR tga_data$1$[rsp] - 00693 4c 8d 84 24 80 +; Line 5505 + 0058c 48 8b 4c 24 48 mov rcx, QWORD PTR tga_data$1$[rsp] + 00591 4c 8d 84 24 84 00 00 00 lea r8, QWORD PTR raw_data$[rsp] - 0069b 49 2b e8 sub rbp, r8 - 0069e 49 63 cc movsxd rcx, r12d - 006a1 48 89 44 24 68 mov QWORD PTR tv2753[rsp], rax + 00599 49 2b c8 sub rcx, r8 + 0059c 48 89 44 24 78 mov QWORD PTR tv2576[rsp], rax + 005a1 48 89 4c 24 70 mov QWORD PTR tv2575[rsp], rcx + 005a6 41 8b ed mov ebp, r13d + 005a9 0f 1f 80 00 00 + 00 00 npad 7 $LL10@stbi__tga_: - -; 5506 : { -; 5507 : // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? -; 5508 : if (tga_is_RLE) - - 006a6 83 fa 08 cmp edx, 8 - 006a9 72 70 jb SHORT $LN266@stbi__tga_ - -; 5509 : { -; 5510 : if (RLE_count == 0) - - 006ab 45 85 ff test r15d, r15d - 006ae 75 5b jne SHORT $LN48@stbi__tga_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 006b0 48 8b 83 c0 00 +; Line 5508 + 005b0 83 fa 08 cmp edx, 8 + 005b3 72 6b jb SHORT $LN252@stbi__tga_ +; Line 5510 + 005b5 45 85 ed test r13d, r13d + 005b8 75 59 jne SHORT $LN48@stbi__tga_ +; Line 1077 + 005ba 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 006b7 48 3b 83 c8 00 + 005c1 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 006be 73 0f jae SHORT $LN176@stbi__tga_ - -; 1078 : return *s->img_buffer++; - - 006c0 0f b6 08 movzx ecx, BYTE PTR [rax] - 006c3 48 ff c0 inc rax - 006c6 48 89 83 c0 00 + 005c8 73 0f jae SHORT $LN170@stbi__tga_ +; Line 1078 + 005ca 0f b6 08 movzx ecx, BYTE PTR [rax] + 005cd 48 ff c0 inc rax + 005d0 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 006cd eb 26 jmp SHORT $LN175@stbi__tga_ -$LN176@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - - 006cf 44 39 73 30 cmp DWORD PTR [rbx+48], r14d - 006d3 74 1e je SHORT $LN177@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - - 006d5 48 8b cb mov rcx, rbx - 006d8 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 006dd 48 8b 83 c0 00 + 005d7 eb 26 jmp SHORT $LN169@stbi__tga_ +$LN170@stbi__tga_: +; Line 1079 + 005d9 44 39 7b 30 cmp DWORD PTR [rbx+48], r15d + 005dd 74 1e je SHORT $LN171@stbi__tga_ +; Line 1080 + 005df 48 8b cb mov rcx, rbx + 005e2 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 005e7 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 006e4 0f b6 08 movzx ecx, BYTE PTR [rax] - 006e7 48 ff c0 inc rax - 006ea 48 89 83 c0 00 + 005ee 0f b6 08 movzx ecx, BYTE PTR [rax] + 005f1 48 ff c0 inc rax + 005f4 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 006f1 eb 02 jmp SHORT $LN175@stbi__tga_ -$LN177@stbi__tga_: - -; 1082 : } -; 1083 : return 0; - - 006f3 32 c9 xor cl, cl -$LN175@stbi__tga_: - -; 5511 : { -; 5512 : // yep, get the next byte as a RLE command -; 5513 : int RLE_cmd = stbi__get8(s); - - 006f5 0f b6 c1 movzx eax, cl - -; 5514 : RLE_count = 1 + (RLE_cmd & 127); - - 006f8 44 8b f8 mov r15d, eax - 006fb 41 83 e7 7f and r15d, 127 ; 0000007fH - 006ff 41 ff c7 inc r15d - -; 5515 : RLE_repeating = RLE_cmd >> 7; - - 00702 c1 e8 07 shr eax, 7 - 00705 89 44 24 5c mov DWORD PTR RLE_repeating$1$[rsp], eax - -; 5516 : read_next_pixel = 1; -; 5517 : } - - 00709 eb 10 jmp SHORT $LN266@stbi__tga_ + 005fb eb 02 jmp SHORT $LN169@stbi__tga_ +$LN171@stbi__tga_: +; Line 1083 + 005fd 32 c9 xor cl, cl +$LN169@stbi__tga_: +; Line 5513 + 005ff 0f b6 c1 movzx eax, cl +; Line 5514 + 00602 44 8b e8 mov r13d, eax + 00605 41 83 e5 7f and r13d, 127 ; 0000007fH + 00609 41 ff c5 inc r13d +; Line 5515 + 0060c c1 e8 07 shr eax, 7 +; Line 5517 + 0060f 8b e8 mov ebp, eax + 00611 eb 0d jmp SHORT $LN252@stbi__tga_ $LN48@stbi__tga_: - -; 5518 : else if (!RLE_repeating) - - 0070b 44 39 74 24 5c cmp DWORD PTR RLE_repeating$1$[rsp], r14d - 00710 74 09 je SHORT $LN266@stbi__tga_ - -; 5519 : { -; 5520 : read_next_pixel = 1; -; 5521 : } -; 5522 : } -; 5523 : else -; 5524 : { -; 5525 : read_next_pixel = 1; -; 5526 : } -; 5527 : // OK, if I need to read a pixel, do it now -; 5528 : if (read_next_pixel) - - 00712 45 85 ed test r13d, r13d - 00715 0f 84 94 01 00 +; Line 5518 + 00613 85 ed test ebp, ebp + 00615 74 09 je SHORT $LN252@stbi__tga_ +; Line 5528 + 00617 45 85 f6 test r14d, r14d + 0061a 0f 84 a1 01 00 00 je $LN51@stbi__tga_ -$LN266@stbi__tga_: - -; 5529 : { -; 5530 : // load however much data we did have -; 5531 : if (tga_indexed) - - 0071b 44 38 74 24 30 cmp BYTE PTR $T18[rsp], r14b - 00720 0f 84 91 00 00 +$LN252@stbi__tga_: +; Line 5531 + 00620 44 38 7c 24 30 cmp BYTE PTR $T1[rsp], r15b + 00625 0f 84 91 00 00 00 je $LN52@stbi__tga_ - -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); - - 00726 83 7c 24 60 08 cmp DWORD PTR tga_bits_per_pixel$1$[rsp], 8 - 0072b 75 50 jne SHORT $LN64@stbi__tga_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 0072d 48 8b 83 c0 00 +; Line 5534 + 0062b 83 7c 24 64 08 cmp DWORD PTR tga_bits_per_pixel$1$[rsp], 8 + 00630 75 50 jne SHORT $LN64@stbi__tga_ +; Line 1077 + 00632 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00734 48 3b 83 c8 00 + 00639 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 0073b 73 12 jae SHORT $LN180@stbi__tga_ - -; 1078 : return *s->img_buffer++; - - 0073d 0f b6 08 movzx ecx, BYTE PTR [rax] - 00740 48 ff c0 inc rax - 00743 48 89 83 c0 00 + 00640 73 12 jae SHORT $LN174@stbi__tga_ +; Line 1078 + 00642 0f b6 08 movzx ecx, BYTE PTR [rax] + 00645 48 ff c0 inc rax + 00648 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); - - 0074a 0f b6 c1 movzx eax, cl - 0074d eb 36 jmp SHORT $LN65@stbi__tga_ -$LN180@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - - 0074f 44 39 73 30 cmp DWORD PTR [rbx+48], r14d - 00753 74 21 je SHORT $LN181@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - - 00755 48 8b cb mov rcx, rbx - 00758 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 0075d 48 8b 83 c0 00 +; Line 5534 + 0064f 0f b6 c1 movzx eax, cl + 00652 eb 36 jmp SHORT $LN65@stbi__tga_ +$LN174@stbi__tga_: +; Line 1079 + 00654 44 39 7b 30 cmp DWORD PTR [rbx+48], r15d + 00658 74 21 je SHORT $LN175@stbi__tga_ +; Line 1080 + 0065a 48 8b cb mov rcx, rbx + 0065d e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00662 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00764 0f b6 08 movzx ecx, BYTE PTR [rax] - 00767 48 ff c0 inc rax - 0076a 48 89 83 c0 00 + 00669 0f b6 08 movzx ecx, BYTE PTR [rax] + 0066c 48 ff c0 inc rax + 0066f 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); - - 00771 0f b6 c1 movzx eax, cl - 00774 eb 0f jmp SHORT $LN65@stbi__tga_ -$LN181@stbi__tga_: - -; 1083 : return 0; - - 00776 32 c9 xor cl, cl - -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); - - 00778 0f b6 c1 movzx eax, cl - 0077b eb 08 jmp SHORT $LN65@stbi__tga_ +; Line 5534 + 00676 0f b6 c1 movzx eax, cl + 00679 eb 0f jmp SHORT $LN65@stbi__tga_ +$LN175@stbi__tga_: +; Line 1083 + 0067b 32 c9 xor cl, cl +; Line 5534 + 0067d 0f b6 c1 movzx eax, cl + 00680 eb 08 jmp SHORT $LN65@stbi__tga_ $LN64@stbi__tga_: - 0077d 48 8b cb mov rcx, rbx - 00780 e8 00 00 00 00 call stbi__get16le + 00682 48 8b cb mov rcx, rbx + 00685 e8 00 00 00 00 call stbi__get16le $LN65@stbi__tga_: - -; 5540 : for (j = 0; j < tga_comp; ++j) { - - 00785 45 85 e4 test r12d, r12d - 00788 0f 84 16 01 00 +; Line 5540 + 0068a 45 85 e4 test r12d, r12d + 0068d 0f 84 21 01 00 00 je $LN15@stbi__tga_ - -; 5535 : if (pal_idx >= tga_palette_len) { -; 5536 : // invalid index -; 5537 : pal_idx = 0; -; 5538 : } -; 5539 : pal_idx *= tga_comp; - - 0078e 3b 44 24 58 cmp eax, DWORD PTR tga_palette_len$1$[rsp] - 00792 41 8b ce mov ecx, r14d - 00795 4c 8b c6 mov r8, rsi - 00798 0f 4c c8 cmovl ecx, eax - 0079b 41 0f af cc imul ecx, r12d - 0079f 48 63 d1 movsxd rdx, ecx - 007a2 48 8d 8c 24 80 +; Line 5539 + 00693 3b 44 24 50 cmp eax, DWORD PTR tga_palette_len$1$[rsp] + 00697 41 8b cf mov ecx, r15d + 0069a 4c 8b c6 mov r8, rsi + 0069d 0f 4c c8 cmovl ecx, eax + 006a0 41 0f af cc imul ecx, r12d + 006a4 48 63 d1 movsxd rdx, ecx + 006a7 48 8d 8c 24 84 00 00 00 lea rcx, QWORD PTR raw_data$[rsp] - 007aa 48 03 d7 add rdx, rdi - 007ad e8 00 00 00 00 call memcpy - -; 5541 : raw_data[j] = tga_palette[pal_idx + j]; -; 5542 : } -; 5543 : } - - 007b2 e9 ed 00 00 00 jmp $LN15@stbi__tga_ + 006af 48 03 d7 add rdx, rdi + 006b2 e8 00 00 00 00 call memcpy +; Line 5543 + 006b7 e9 f8 00 00 00 jmp $LN15@stbi__tga_ $LN52@stbi__tga_: - -; 5544 : else if (tga_rgb16) { - - 007b7 44 39 74 24 3c cmp DWORD PTR tga_rgb16$4$[rsp], r14d - 007bc 0f 84 85 00 00 +; Line 5544 + 006bc 44 39 7c 24 38 cmp DWORD PTR tga_rgb16$4$[rsp], r15d + 006c1 0f 84 85 00 00 00 je $LN55@stbi__tga_ - -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); - - 007c2 48 8b cb mov rcx, rbx - 007c5 e8 00 00 00 00 call stbi__get16le - -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; - - 007ca 44 0f b7 c0 movzx r8d, ax - 007ce 41 8b c0 mov eax, r8d - 007d1 c1 e8 0a shr eax, 10 - 007d4 83 e0 1f and eax, 31 - -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); - - 007d7 69 c8 ff 00 00 +; Line 5387 + 006c7 48 8b cb mov rcx, rbx + 006ca e8 00 00 00 00 call stbi__get16le +; Line 5390 + 006cf 44 0f b7 c0 movzx r8d, ax + 006d3 41 8b c0 mov eax, r8d + 006d6 c1 e8 0a shr eax, 10 + 006d9 83 e0 1f and eax, 31 +; Line 5394 + 006dc 69 c8 ff 00 00 00 imul ecx, eax, 255 ; 000000ffH - 007dd b8 43 08 21 84 mov eax, -2078209981 ; ffffffff84210843H - 007e2 f7 e9 imul ecx - 007e4 03 d1 add edx, ecx - 007e6 c1 fa 04 sar edx, 4 - 007e9 8b c2 mov eax, edx - 007eb c1 e8 1f shr eax, 31 - 007ee 03 d0 add edx, eax - 007f0 41 8b c0 mov eax, r8d - 007f3 c1 e8 05 shr eax, 5 - 007f6 41 83 e0 1f and r8d, 31 - 007fa 83 e0 1f and eax, 31 - 007fd 88 94 24 80 00 + 006e2 b8 43 08 21 84 mov eax, -2078209981 ; ffffffff84210843H + 006e7 f7 e9 imul ecx + 006e9 03 d1 add edx, ecx + 006eb c1 fa 04 sar edx, 4 + 006ee 8b c2 mov eax, edx + 006f0 c1 e8 1f shr eax, 31 + 006f3 03 d0 add edx, eax + 006f5 41 8b c0 mov eax, r8d + 006f8 c1 e8 05 shr eax, 5 + 006fb 41 83 e0 1f and r8d, 31 + 006ff 83 e0 1f and eax, 31 + 00702 88 94 24 84 00 00 00 mov BYTE PTR raw_data$[rsp], dl - -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); - - 00804 69 c8 ff 00 00 +; Line 5395 + 00709 69 c8 ff 00 00 00 imul ecx, eax, 255 ; 000000ffH - 0080a b8 43 08 21 84 mov eax, -2078209981 ; ffffffff84210843H - 0080f f7 e9 imul ecx - 00811 03 d1 add edx, ecx - -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); - - 00813 41 69 c8 ff 00 + 0070f b8 43 08 21 84 mov eax, -2078209981 ; ffffffff84210843H + 00714 f7 e9 imul ecx + 00716 03 d1 add edx, ecx +; Line 5396 + 00718 41 69 c8 ff 00 00 00 imul ecx, r8d, 255 ; 000000ffH - 0081a c1 fa 04 sar edx, 4 - 0081d 8b c2 mov eax, edx - 0081f c1 e8 1f shr eax, 31 - 00822 03 d0 add edx, eax - 00824 b8 43 08 21 84 mov eax, -2078209981 ; ffffffff84210843H - 00829 88 94 24 81 00 + 0071f c1 fa 04 sar edx, 4 + 00722 8b c2 mov eax, edx + 00724 c1 e8 1f shr eax, 31 + 00727 03 d0 add edx, eax + 00729 b8 43 08 21 84 mov eax, -2078209981 ; ffffffff84210843H + 0072e 88 94 24 85 00 00 00 mov BYTE PTR raw_data$[rsp+1], dl - 00830 f7 e9 imul ecx - 00832 03 d1 add edx, ecx - 00834 c1 fa 04 sar edx, 4 - 00837 8b c2 mov eax, edx - 00839 c1 e8 1f shr eax, 31 - 0083c 03 d0 add edx, eax - 0083e 88 94 24 82 00 + 00735 f7 e9 imul ecx + 00737 03 d1 add edx, ecx + 00739 c1 fa 04 sar edx, 4 + 0073c 8b c2 mov eax, edx + 0073e c1 e8 1f shr eax, 31 + 00741 03 d0 add edx, eax + 00743 88 94 24 86 00 00 00 mov BYTE PTR raw_data$[rsp+2], dl - -; 5545 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5546 : stbi__tga_read_rgb16(s, raw_data); -; 5547 : } - - 00845 eb 5d jmp SHORT $LN15@stbi__tga_ +; Line 5547 + 0074a eb 68 jmp SHORT $LN15@stbi__tga_ $LN55@stbi__tga_: - -; 5548 : else { -; 5549 : // read in the data raw -; 5550 : for (j = 0; j < tga_comp; ++j) { - - 00847 49 8b fe mov rdi, r14 - 0084a 45 85 e4 test r12d, r12d - 0084d 74 55 je SHORT $LN15@stbi__tga_ - 0084f 90 npad 1 +; Line 5550 + 0074c 49 8b ff mov rdi, r15 + 0074f 45 85 e4 test r12d, r12d + 00752 74 60 je SHORT $LN15@stbi__tga_ + 00754 0f 1f 40 00 0f + 1f 84 00 00 00 + 00 00 npad 12 $LL16@stbi__tga_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00850 48 8b 83 c0 00 +; Line 1077 + 00760 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00857 48 3b 83 c8 00 + 00767 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 0085e 73 0f jae SHORT $LN140@stbi__tga_ - -; 1078 : return *s->img_buffer++; - - 00860 0f b6 08 movzx ecx, BYTE PTR [rax] - 00863 48 ff c0 inc rax - 00866 48 89 83 c0 00 + 0076e 73 0f jae SHORT $LN140@stbi__tga_ +; Line 1078 + 00770 0f b6 08 movzx ecx, BYTE PTR [rax] + 00773 48 ff c0 inc rax + 00776 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 0086d eb 26 jmp SHORT $LN139@stbi__tga_ + 0077d eb 26 jmp SHORT $LN139@stbi__tga_ $LN140@stbi__tga_: - -; 1079 : if (s->read_from_callbacks) { - - 0086f 44 39 73 30 cmp DWORD PTR [rbx+48], r14d - 00873 74 1e je SHORT $LN141@stbi__tga_ - -; 1080 : stbi__refill_buffer(s); - - 00875 48 8b cb mov rcx, rbx - 00878 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 0087d 48 8b 83 c0 00 +; Line 1079 + 0077f 44 39 7b 30 cmp DWORD PTR [rbx+48], r15d + 00783 74 1e je SHORT $LN141@stbi__tga_ +; Line 1080 + 00785 48 8b cb mov rcx, rbx + 00788 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 0078d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00884 0f b6 08 movzx ecx, BYTE PTR [rax] - 00887 48 ff c0 inc rax - 0088a 48 89 83 c0 00 + 00794 0f b6 08 movzx ecx, BYTE PTR [rax] + 00797 48 ff c0 inc rax + 0079a 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00891 eb 02 jmp SHORT $LN139@stbi__tga_ + 007a1 eb 02 jmp SHORT $LN139@stbi__tga_ $LN141@stbi__tga_: - -; 1082 : } -; 1083 : return 0; - - 00893 32 c9 xor cl, cl +; Line 1083 + 007a3 32 c9 xor cl, cl $LN139@stbi__tga_: - -; 5551 : raw_data[j] = stbi__get8(s); - - 00895 88 8c 3c 80 00 +; Line 5551 + 007a5 88 8c 3c 84 00 00 00 mov BYTE PTR raw_data$[rsp+rdi], cl - 0089c 48 ff c7 inc rdi - 0089f 48 3b fe cmp rdi, rsi - 008a2 7c ac jl SHORT $LL16@stbi__tga_ + 007ac 48 ff c7 inc rdi + 007af 48 3b fe cmp rdi, rsi + 007b2 7c ac jl SHORT $LL16@stbi__tga_ $LN15@stbi__tga_: - 008a4 48 8b 44 24 68 mov rax, QWORD PTR tv2753[rsp] - -; 5552 : } -; 5553 : } -; 5554 : // clear the reading flag for the next pixel -; 5555 : read_next_pixel = 0; - - 008a9 45 8b ee mov r13d, r14d - 008ac 49 63 cc movsxd rcx, r12d + 007b4 48 8b 4c 24 70 mov rcx, QWORD PTR tv2575[rsp] +; Line 5555 + 007b9 45 8b f7 mov r14d, r15d + 007bc 48 8b 44 24 78 mov rax, QWORD PTR tv2576[rsp] $LN51@stbi__tga_: - -; 5556 : } // end of reading a pixel -; 5557 : -; 5558 : // copy data -; 5559 : for (j = 0; j < tga_comp; ++j) - - 008af 49 8b fe mov rdi, r14 - 008b2 45 85 e4 test r12d, r12d - 008b5 74 2b je SHORT $LN18@stbi__tga_ - -; 5560 : tga_data[i * tga_comp + j] = raw_data[j]; - - 008b7 48 8d 8c 24 80 - 00 00 00 lea rcx, QWORD PTR raw_data$[rsp] - 008bf 4c 8b c6 mov r8, rsi - 008c2 48 03 cd add rcx, rbp - 008c5 48 8d 94 24 80 +; Line 5559 + 007c1 49 8b ff mov rdi, r15 + 007c4 45 85 e4 test r12d, r12d + 007c7 74 2d je SHORT $LN18@stbi__tga_ +; Line 5560 + 007c9 48 8d 84 24 84 + 00 00 00 lea rax, QWORD PTR raw_data$[rsp] + 007d1 4c 8b c6 mov r8, rsi + 007d4 48 03 c8 add rcx, rax + 007d7 48 8d 94 24 84 00 00 00 lea rdx, QWORD PTR raw_data$[rsp] - 008cd e8 00 00 00 00 call memcpy -$LL237@stbi__tga_: - -; 5556 : } // end of reading a pixel -; 5557 : -; 5558 : // copy data -; 5559 : for (j = 0; j < tga_comp; ++j) - - 008d2 48 ff c7 inc rdi - 008d5 48 3b fe cmp rdi, rsi - 008d8 7c f8 jl SHORT $LL237@stbi__tga_ - 008da 48 8b 44 24 68 mov rax, QWORD PTR tv2753[rsp] - 008df 49 63 cc movsxd rcx, r12d + 007df e8 00 00 00 00 call memcpy +$LL223@stbi__tga_: +; Line 5559 + 007e4 48 ff c7 inc rdi + 007e7 48 3b fe cmp rdi, rsi + 007ea 7c f8 jl SHORT $LL223@stbi__tga_ + 007ec 48 8b 4c 24 70 mov rcx, QWORD PTR tv2575[rsp] + 007f1 48 8b 44 24 78 mov rax, QWORD PTR tv2576[rsp] $LN18@stbi__tga_: - -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) - - 008e2 48 8b 7c 24 50 mov rdi, QWORD PTR tga_palette$1$[rsp] - -; 5561 : -; 5562 : // in case we're in RLE mode, keep counting down -; 5563 : --RLE_count; - - 008e7 41 ff cf dec r15d - 008ea 8b 54 24 44 mov edx, DWORD PTR tv2782[rsp] - 008ee 48 03 e9 add rbp, rcx - 008f1 48 83 e8 01 sub rax, 1 - 008f5 48 89 44 24 68 mov QWORD PTR tv2753[rsp], rax - 008fa 0f 85 a6 fd ff +; Line 5505 + 007f6 48 8b 7c 24 58 mov rdi, QWORD PTR tga_palette$1$[rsp] +; Line 5563 + 007fb 41 ff cd dec r13d + 007fe 49 63 d4 movsxd rdx, r12d + 00801 48 03 ca add rcx, rdx + 00804 8b 54 24 44 mov edx, DWORD PTR tv2604[rsp] + 00808 48 83 e8 01 sub rax, 1 + 0080c 48 89 4c 24 70 mov QWORD PTR tv2575[rsp], rcx + 00811 48 89 44 24 78 mov QWORD PTR tv2576[rsp], rax + 00816 0f 85 94 fd ff ff jne $LL10@stbi__tga_ - 00900 8b 4c 24 40 mov ecx, DWORD PTR tga_width$1$[rsp] + 0081c 8b 4c 24 40 mov ecx, DWORD PTR tga_width$1$[rsp] $LN9@stbi__tga_: - -; 5564 : } -; 5565 : // do I need to invert the image? -; 5566 : if (tga_inverted) - - 00904 8b 74 24 38 mov esi, DWORD PTR $T19[rsp] - 00908 44 39 74 24 64 cmp DWORD PTR tga_inverted$1$[rsp], r14d - 0090d 74 6f je SHORT $LN21@stbi__tga_ - -; 5567 : { -; 5568 : for (j = 0; j * 2 < tga_height; ++j) - - 0090f 85 f6 test esi, esi - 00911 7e 6b jle SHORT $LN21@stbi__tga_ - 00913 45 8b dc mov r11d, r12d - 00916 44 8d 56 ff lea r10d, DWORD PTR [rsi-1] - 0091a 45 0f af d4 imul r10d, r12d - 0091e 41 8b de mov ebx, r14d - 00921 4c 8b 64 24 48 mov r12, QWORD PTR tga_data$1$[rsp] - 00926 44 0f af d9 imul r11d, ecx - 0092a 44 0f af d1 imul r10d, ecx - 0092e 66 90 npad 2 +; Line 5566 + 00820 8b 74 24 3c mov esi, DWORD PTR $T2[rsp] + 00824 44 39 7c 24 68 cmp DWORD PTR tga_inverted$1$[rsp], r15d + 00829 74 73 je SHORT $LN21@stbi__tga_ +; Line 5568 + 0082b 85 f6 test esi, esi + 0082d 7e 6f jle SHORT $LN21@stbi__tga_ + 0082f 45 8b dc mov r11d, r12d + 00832 44 8d 56 ff lea r10d, DWORD PTR [rsi-1] + 00836 45 0f af d4 imul r10d, r12d + 0083a 41 8b df mov ebx, r15d + 0083d 4c 8b 64 24 48 mov r12, QWORD PTR tga_data$1$[rsp] + 00842 44 0f af d9 imul r11d, ecx + 00846 44 0f af d1 imul r10d, ecx + 0084a 66 0f 1f 44 00 + 00 npad 6 $LL22@stbi__tga_: - -; 5569 : { -; 5570 : int index1 = j * tga_width * tga_comp; - - 00930 45 8b c3 mov r8d, r11d - -; 5571 : int index2 = (tga_height - 1 - j) * tga_width * tga_comp; -; 5572 : for (i = tga_width * tga_comp; i > 0; --i) - - 00933 45 85 db test r11d, r11d - 00936 7e 32 jle SHORT $LN20@stbi__tga_ - -; 5569 : { -; 5570 : int index1 = j * tga_width * tga_comp; - - 00938 48 63 c3 movsxd rax, ebx - 0093b 4d 63 ca movsxd r9, r10d - 0093e 4c 2b c8 sub r9, rax - 00941 4a 8d 14 20 lea rdx, QWORD PTR [rax+r12] - 00945 66 66 66 0f 1f +; Line 5570 + 00850 45 8b c3 mov r8d, r11d +; Line 5572 + 00853 45 85 db test r11d, r11d + 00856 7e 32 jle SHORT $LN20@stbi__tga_ +; Line 5570 + 00858 48 63 c3 movsxd rax, ebx + 0085b 4d 63 ca movsxd r9, r10d + 0085e 4c 2b c8 sub r9, rax + 00861 4a 8d 14 20 lea rdx, QWORD PTR [rax+r12] + 00865 66 66 66 0f 1f 84 00 00 00 00 00 npad 11 $LL25@stbi__tga_: - -; 5573 : { -; 5574 : unsigned char temp = tga_data[index1]; -; 5575 : tga_data[index1] = tga_data[index2]; - - 00950 42 0f b6 04 0a movzx eax, BYTE PTR [rdx+r9] - 00955 41 ff c8 dec r8d - 00958 0f b6 0a movzx ecx, BYTE PTR [rdx] - 0095b 88 02 mov BYTE PTR [rdx], al - -; 5576 : tga_data[index2] = temp; - - 0095d 42 88 0c 0a mov BYTE PTR [rdx+r9], cl - -; 5577 : ++index1; - - 00961 48 8d 52 01 lea rdx, QWORD PTR [rdx+1] - 00965 45 85 c0 test r8d, r8d - 00968 7f e6 jg SHORT $LL25@stbi__tga_ +; Line 5575 + 00870 41 0f b6 04 11 movzx eax, BYTE PTR [r9+rdx] + 00875 41 ff c8 dec r8d + 00878 0f b6 0a movzx ecx, BYTE PTR [rdx] + 0087b 88 02 mov BYTE PTR [rdx], al +; Line 5576 + 0087d 41 88 0c 11 mov BYTE PTR [r9+rdx], cl +; Line 5577 + 00881 48 8d 52 01 lea rdx, QWORD PTR [rdx+1] + 00885 45 85 c0 test r8d, r8d + 00888 7f e6 jg SHORT $LL25@stbi__tga_ $LN20@stbi__tga_: - -; 5567 : { -; 5568 : for (j = 0; j * 2 < tga_height; ++j) - - 0096a 41 03 db add ebx, r11d - 0096d 45 2b d3 sub r10d, r11d - 00970 41 83 c6 02 add r14d, 2 - 00974 44 3b f6 cmp r14d, esi - 00977 7c b7 jl SHORT $LL22@stbi__tga_ - 00979 44 8b 64 24 34 mov r12d, DWORD PTR tga_comp$4$[rsp] +; Line 5568 + 0088a 41 03 db add ebx, r11d + 0088d 45 2b d3 sub r10d, r11d + 00890 41 83 c7 02 add r15d, 2 + 00894 44 3b fe cmp r15d, esi + 00897 7c b7 jl SHORT $LL22@stbi__tga_ + 00899 44 8b 64 24 34 mov r12d, DWORD PTR tga_comp$4$[rsp] $LN21@stbi__tga_: - -; 5578 : ++index2; -; 5579 : } -; 5580 : } -; 5581 : } -; 5582 : // clear my palette, if I had one -; 5583 : if (tga_palette != NULL) - - 0097e 48 8b 4c 24 50 mov rcx, QWORD PTR tga_palette$1$[rsp] - 00983 48 85 c9 test rcx, rcx - 00986 74 06 je SHORT $LN282@stbi__tga_ - -; 5584 : { -; 5585 : STBI_FREE(tga_palette); - - 00988 ff 15 00 00 00 +; Line 5583 + 0089e 48 8b 4c 24 58 mov rcx, QWORD PTR tga_palette$1$[rsp] + 008a3 48 85 c9 test rcx, rcx + 008a6 74 06 je SHORT $LN267@stbi__tga_ +; Line 5585 + 008a8 ff 15 00 00 00 00 call QWORD PTR __imp_free -$LN282@stbi__tga_: - -; 5586 : } -; 5587 : } -; 5588 : -; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order -; 5590 : if (tga_comp >= 3 && !tga_rgb16) - - 0098e 44 8b 6c 24 3c mov r13d, DWORD PTR tga_rgb16$4$[rsp] +$LN267@stbi__tga_: +; Line 5590 + 008ae 8b 6c 24 38 mov ebp, DWORD PTR tga_rgb16$4$[rsp] +$LN266@stbi__tga_: + 008b2 4c 8b 6c 24 48 mov r13, QWORD PTR tga_data$1$[rsp] $LN58@stbi__tga_: - 00993 48 8b 4c 24 48 mov rcx, QWORD PTR tga_data$1$[rsp] - 00998 8b 54 24 40 mov edx, DWORD PTR tga_width$1$[rsp] - 0099c 41 83 fc 03 cmp r12d, 3 - 009a0 72 3c jb SHORT $LN27@stbi__tga_ - 009a2 45 85 ed test r13d, r13d - 009a5 75 37 jne SHORT $LN27@stbi__tga_ - -; 5593 : for (i = 0; i < tga_width * tga_height; ++i) - - 009a7 8b c6 mov eax, esi - 009a9 4c 8b d1 mov r10, rcx - 009ac 0f af c2 imul eax, edx - 009af 85 c0 test eax, eax - 009b1 74 2b je SHORT $LN27@stbi__tga_ - -; 5591 : { -; 5592 : unsigned char* tga_pixel = tga_data; - - 009b3 41 8b dc mov ebx, r12d - 009b6 44 8b d8 mov r11d, eax - 009b9 0f 1f 80 00 00 - 00 00 npad 7 + 008b7 41 83 fc 03 cmp r12d, 3 + 008bb 72 3c jb SHORT $LN269@stbi__tga_ + 008bd 8b 4c 24 40 mov ecx, DWORD PTR tga_width$1$[rsp] + 008c1 85 ed test ebp, ebp + 008c3 75 38 jne SHORT $LN27@stbi__tga_ +; Line 5593 + 008c5 8b c6 mov eax, esi + 008c7 4d 8b d5 mov r10, r13 + 008ca 0f af c1 imul eax, ecx + 008cd 85 c0 test eax, eax + 008cf 74 2c je SHORT $LN27@stbi__tga_ +; Line 5592 + 008d1 41 8b dc mov ebx, r12d + 008d4 44 8b d8 mov r11d, eax + 008d7 66 0f 1f 84 00 + 00 00 00 00 npad 9 $LL28@stbi__tga_: - -; 5594 : { -; 5595 : unsigned char temp = tga_pixel[0]; - - 009c0 41 0f b6 0a movzx ecx, BYTE PTR [r10] - -; 5596 : tga_pixel[0] = tga_pixel[2]; - - 009c4 41 0f b6 42 02 movzx eax, BYTE PTR [r10+2] - 009c9 41 88 02 mov BYTE PTR [r10], al - -; 5597 : tga_pixel[2] = temp; - - 009cc 41 88 4a 02 mov BYTE PTR [r10+2], cl - -; 5598 : tga_pixel += tga_comp; - - 009d0 4c 03 d3 add r10, rbx - 009d3 49 83 eb 01 sub r11, 1 - 009d7 75 e7 jne SHORT $LL28@stbi__tga_ - -; 5586 : } -; 5587 : } -; 5588 : -; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order -; 5590 : if (tga_comp >= 3 && !tga_rgb16) - - 009d9 48 8b 4c 24 48 mov rcx, QWORD PTR tga_data$1$[rsp] +; Line 5595 + 008e0 41 0f b6 0a movzx ecx, BYTE PTR [r10] +; Line 5596 + 008e4 41 0f b6 42 02 movzx eax, BYTE PTR [r10+2] + 008e9 41 88 02 mov BYTE PTR [r10], al +; Line 5597 + 008ec 41 88 4a 02 mov BYTE PTR [r10+2], cl +; Line 5598 + 008f0 4c 03 d3 add r10, rbx + 008f3 49 83 eb 01 sub r11, 1 + 008f7 75 e7 jne SHORT $LL28@stbi__tga_ +$LN269@stbi__tga_: +; Line 5603 + 008f9 8b 4c 24 40 mov ecx, DWORD PTR tga_width$1$[rsp] $LN27@stbi__tga_: - -; 5599 : } -; 5600 : } -; 5601 : -; 5602 : // convert to target component count -; 5603 : if (req_comp && req_comp != tga_comp) - - 009de 8b 44 24 70 mov eax, DWORD PTR req_comp$GSCopy$1$[rsp] - 009e2 85 c0 test eax, eax - 009e4 74 1a je SHORT $LN60@stbi__tga_ - 009e6 41 3b c4 cmp eax, r12d - 009e9 74 15 je SHORT $LN60@stbi__tga_ - -; 5604 : tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); - - 009eb 44 8b ca mov r9d, edx - 009ee 89 74 24 20 mov DWORD PTR [rsp+32], esi - 009f2 41 8b d4 mov edx, r12d - 009f5 44 8b c0 mov r8d, eax - 009f8 e8 00 00 00 00 call stbi__convert_format - 009fd 48 8b c8 mov rcx, rax + 008fd 8b 84 24 80 00 + 00 00 mov eax, DWORD PTR req_comp$GSCopy$1$[rsp] + 00904 85 c0 test eax, eax + 00906 74 1d je SHORT $LN60@stbi__tga_ + 00908 41 3b c4 cmp eax, r12d + 0090b 74 18 je SHORT $LN60@stbi__tga_ +; Line 5604 + 0090d 44 8b c9 mov r9d, ecx + 00910 89 74 24 20 mov DWORD PTR [rsp+32], esi + 00914 49 8b cd mov rcx, r13 + 00917 44 8b c0 mov r8d, eax + 0091a 41 8b d4 mov edx, r12d + 0091d e8 00 00 00 00 call stbi__convert_format + 00922 4c 8b e8 mov r13, rax $LN60@stbi__tga_: - -; 5605 : -; 5606 : // the things I do to get rid of an error message, and yet keep -; 5607 : // Microsoft's C compilers happy... [8^( -; 5608 : tga_palette_start = tga_palette_len = tga_palette_bits = -; 5609 : tga_x_origin = tga_y_origin = 0; -; 5610 : STBI_NOTUSED(tga_palette_start); -; 5611 : // OK, done -; 5612 : return tga_data; - - 00a00 48 8b c1 mov rax, rcx - 00a03 eb 4c jmp SHORT $LN1@stbi__tga_ -$LN265@stbi__tga_: - -; 5487 : STBI_FREE(tga_data); - - 00a05 48 8b 4c 24 48 mov rcx, QWORD PTR tga_data$1$[rsp] - 00a0a ff 15 00 00 00 +; Line 5612 + 00925 49 8b c5 mov rax, r13 + 00928 eb 4a jmp SHORT $LN1@stbi__tga_ +$LN251@stbi__tga_: +; Line 5487 + 0092a 49 8b cc mov rcx, r12 + 0092d ff 15 00 00 00 00 call QWORD PTR __imp_free -$LN264@stbi__tga_: - -; 5613 : } - - 00a10 8b 15 00 00 00 +$LN250@stbi__tga_: +; Line 5613 + 00933 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00a16 65 48 8b 04 25 + 00939 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00a1f 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00a23 48 8d 15 00 00 + 00942 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00946 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 00a2a eb 1a jmp SHORT $LN375@stbi__tga_ -$LN271@stbi__tga_: - 00a2c 8b 15 00 00 00 + 0094d eb 1a jmp SHORT $LN356@stbi__tga_ +$LN257@stbi__tga_: + 0094f 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00a32 65 48 8b 04 25 + 00955 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00a3b 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00a3f 48 8d 15 00 00 + 0095e 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00962 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ -$LN375@stbi__tga_: - 00a46 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00a4b 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - 00a4f 33 c0 xor eax, eax +$LN356@stbi__tga_: + 00969 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 0096e 48 89 14 01 mov QWORD PTR [rcx+rax], rdx + 00972 33 c0 xor eax, eax $LN1@stbi__tga_: - 00a51 48 8b 8c 24 88 + 00974 48 8b ac 24 98 + 00 00 00 mov rbp, QWORD PTR [rsp+152] + 0097c 48 8b 8c 24 88 00 00 00 mov rcx, QWORD PTR __$ArrayPad$[rsp] - 00a59 48 33 cc xor rcx, rsp - 00a5c e8 00 00 00 00 call __security_check_cookie - 00a61 48 81 c4 98 00 - 00 00 add rsp, 152 ; 00000098H - 00a68 41 5f pop r15 - 00a6a 41 5e pop r14 - 00a6c 41 5d pop r13 - 00a6e 41 5c pop r12 - 00a70 5f pop rdi - 00a71 5e pop rsi - 00a72 5d pop rbp - 00a73 5b pop rbx - 00a74 c3 ret 0 + 00984 48 33 cc xor rcx, rsp + 00987 e8 00 00 00 00 call __security_check_cookie + 0098c 48 81 c4 a0 00 + 00 00 add rsp, 160 ; 000000a0H + 00993 41 5f pop r15 + 00995 41 5e pop r14 + 00997 41 5d pop r13 + 00999 41 5c pop r12 + 0099b 5f pop rdi + 0099c 5e pop rsi + 0099d 5b pop rbx + 0099e c3 ret 0 stbi__tga_load ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__psd_test _TEXT SEGMENT s$ = 48 stbi__psd_test PROC ; COMDAT - -; 5621 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 5621 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H 0000a 48 8b f9 mov rdi, rcx - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 1168 0000d e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 00012 48 8b cf mov rcx, rdi 00015 8b d8 mov ebx, eax 00017 e8 00 00 00 00 call stbi__get16be - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 0001c 48 8b 8f d0 00 00 00 mov rcx, QWORD PTR [rdi+208] - -; 5622 : int r = (stbi__get32be(s) == 0x38425053); - +; Line 5622 00023 33 d2 xor edx, edx - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 00025 c1 e3 10 shl ebx, 16 00028 03 c3 add eax, ebx - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 0002a 48 89 8f c0 00 00 00 mov QWORD PTR [rdi+192], rcx - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 00031 48 8b 8f d8 00 00 00 mov rcx, QWORD PTR [rdi+216] - -; 5622 : int r = (stbi__get32be(s) == 0x38425053); - +; Line 5622 00038 3d 53 50 42 38 cmp eax, 943870035 ; 38425053H - -; 5625 : } - +; Line 5625 0003d 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00042 0f 94 c2 sete dl - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 00045 48 89 8f c8 00 00 00 mov QWORD PTR [rdi+200], rcx - -; 5623 : stbi__rewind(s); -; 5624 : return r; - +; Line 5624 0004c 8b c2 mov eax, edx - -; 5625 : } - +; Line 5625 0004e 48 83 c4 20 add rsp, 32 ; 00000020H 00052 5f pop rdi 00053 c3 ret 0 stbi__psd_test ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__psd_decode_rle _TEXT SEGMENT s$ = 64 p$ = 72 pixelCount$ = 80 stbi__psd_decode_rle PROC ; COMDAT - -; 5628 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 5628 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi @@ -46982,18 +30520,12 @@ stbi__psd_decode_rle PROC ; COMDAT 00016 41 56 push r14 00018 41 57 push r15 0001a 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 5629 : int count, nleft, len; -; 5630 : -; 5631 : count = 0; - +; Line 5631 0001e 45 33 ff xor r15d, r15d 00021 45 8b e0 mov r12d, r8d 00024 48 8b fa mov rdi, rdx 00027 48 8b d9 mov rbx, rcx - -; 5632 : while ((nleft = pixelCount - count) > 0) { - +; Line 5632 0002a 45 8b f0 mov r14d, r8d 0002d 45 85 c0 test r8d, r8d 00030 0f 8e 44 01 00 @@ -47001,36 +30533,26 @@ stbi__psd_decode_rle PROC ; COMDAT 00036 66 66 0f 1f 84 00 00 00 00 00 npad 10 $LL2@stbi__psd_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00040 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00047 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0004e 73 0f jae SHORT $LN17@stbi__psd_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00050 0f b6 08 movzx ecx, BYTE PTR [rax] 00053 48 ff c0 inc rax 00056 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0005d eb 26 jmp SHORT $LN16@stbi__psd_ $LN17@stbi__psd_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0005f 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00063 74 1e je SHORT $LN18@stbi__psd_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00065 48 8b cb mov rcx, rbx 00068 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0006d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00074 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -47039,78 +30561,50 @@ $LN17@stbi__psd_: 00 00 mov QWORD PTR [rbx+192], rax 00081 eb 02 jmp SHORT $LN16@stbi__psd_ $LN18@stbi__psd_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00083 32 c9 xor cl, cl $LN16@stbi__psd_: - -; 5633 : len = stbi__get8(s); - +; Line 5633 00085 0f b6 e9 movzx ebp, cl - -; 5634 : if (len == 128) { - +; Line 5634 00088 81 fd 80 00 00 00 cmp ebp, 128 ; 00000080H 0008e 0f 84 d7 00 00 00 je $LN7@stbi__psd_ - -; 5635 : // No-op. -; 5636 : } -; 5637 : else if (len < 128) { - +; Line 5637 00094 73 6c jae SHORT $LN10@stbi__psd_ - -; 5638 : // Copy next len+1 bytes literally. -; 5639 : len++; - +; Line 5639 00096 ff c5 inc ebp - -; 5640 : if (len > nleft) return 0; // corrupt data - +; Line 5640 00098 41 3b ee cmp ebp, r14d 0009b 0f 87 fd 00 00 00 ja $LN32@stbi__psd_ - -; 5641 : count += len; - +; Line 5641 000a1 44 03 fd add r15d, ebp 000a4 0f 1f 40 00 0f 1f 84 00 00 00 00 00 npad 12 $LL4@stbi__psd_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000b0 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000b7 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 000be 73 0f jae SHORT $LN21@stbi__psd_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 000c0 0f b6 08 movzx ecx, BYTE PTR [rax] 000c3 48 ff c0 inc rax 000c6 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 000cd eb 26 jmp SHORT $LN20@stbi__psd_ $LN21@stbi__psd_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000cf 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 000d3 74 1e je SHORT $LN22@stbi__psd_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000d5 48 8b cb mov rcx, rbx 000d8 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000dd 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000e4 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -47119,78 +30613,46 @@ $LN21@stbi__psd_: 00 00 mov QWORD PTR [rbx+192], rax 000f1 eb 02 jmp SHORT $LN20@stbi__psd_ $LN22@stbi__psd_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000f3 32 c9 xor cl, cl $LN20@stbi__psd_: - -; 5642 : while (len) { -; 5643 : *p = stbi__get8(s); - +; Line 5643 000f5 88 0f mov BYTE PTR [rdi], cl - -; 5644 : p += 4; - +; Line 5644 000f7 48 83 c7 04 add rdi, 4 - -; 5645 : len--; - +; Line 5645 000fb 83 ed 01 sub ebp, 1 000fe 75 b0 jne SHORT $LL4@stbi__psd_ - -; 5646 : } -; 5647 : } - +; Line 5647 00100 eb 69 jmp SHORT $LN7@stbi__psd_ $LN10@stbi__psd_: - -; 5648 : else if (len > 128) { - +; Line 5648 00102 76 67 jbe SHORT $LN7@stbi__psd_ - -; 5649 : stbi_uc val; -; 5650 : // Next -len+1 bytes in the dest are replicated from next source byte. -; 5651 : // (Interpret len as a negative 8-bit int.) -; 5652 : len = 257 - len; - +; Line 5652 00104 be 01 01 00 00 mov esi, 257 ; 00000101H 00109 2b f5 sub esi, ebp - -; 5653 : if (len > nleft) return 0; // corrupt data - +; Line 5653 0010b 41 3b f6 cmp esi, r14d 0010e 0f 8f 8a 00 00 00 jg $LN32@stbi__psd_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00114 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0011b 73 0f jae SHORT $LN25@stbi__psd_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 0011d 0f b6 08 movzx ecx, BYTE PTR [rax] 00120 48 ff c0 inc rax 00123 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0012a eb 26 jmp SHORT $LN24@stbi__psd_ $LN25@stbi__psd_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0012c 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00130 74 1e je SHORT $LN26@stbi__psd_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00132 48 8b cb mov rcx, rbx 00135 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0013a 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00141 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -47199,60 +30661,36 @@ $LN25@stbi__psd_: 00 00 mov QWORD PTR [rbx+192], rax 0014e eb 02 jmp SHORT $LN24@stbi__psd_ $LN26@stbi__psd_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00150 32 c9 xor cl, cl $LN24@stbi__psd_: - -; 5654 : val = stbi__get8(s); -; 5655 : count += len; - +; Line 5655 00152 44 03 fe add r15d, esi - -; 5656 : while (len) { - +; Line 5656 00155 85 f6 test esi, esi 00157 74 12 je SHORT $LN7@stbi__psd_ 00159 0f 1f 80 00 00 00 00 npad 7 $LL6@stbi__psd_: - -; 5657 : *p = val; - +; Line 5657 00160 88 0f mov BYTE PTR [rdi], cl - -; 5658 : p += 4; - +; Line 5658 00162 48 83 c7 04 add rdi, 4 - -; 5659 : len--; - +; Line 5659 00166 83 ee 01 sub esi, 1 00169 75 f5 jne SHORT $LL6@stbi__psd_ $LN7@stbi__psd_: - -; 5632 : while ((nleft = pixelCount - count) > 0) { - +; Line 5632 0016b 45 8b f4 mov r14d, r12d 0016e 45 2b f7 sub r14d, r15d 00171 45 85 f6 test r14d, r14d 00174 0f 8f c6 fe ff ff jg $LL2@stbi__psd_ $LN41@stbi__psd_: - -; 5660 : } -; 5661 : } -; 5662 : } -; 5663 : -; 5664 : return 1; - +; Line 5664 0017a b8 01 00 00 00 mov eax, 1 $LN1@stbi__psd_: - -; 5665 : } - +; Line 5665 0017f 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] 00184 48 8b 6c 24 48 mov rbp, QWORD PTR [rsp+72] 00189 48 8b 74 24 50 mov rsi, QWORD PTR [rsp+80] @@ -47263,69 +30701,47 @@ $LN1@stbi__psd_: 0019b 41 5c pop r12 0019d c3 ret 0 $LN32@stbi__psd_: - -; 5653 : if (len > nleft) return 0; // corrupt data - +; Line 5653 0019e 33 c0 xor eax, eax 001a0 eb dd jmp SHORT $LN1@stbi__psd_ stbi__psd_decode_rle ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__psd_load _TEXT SEGMENT -bitdepth$1$ = 48 -$T8 = 52 -$T9 = 56 -out$1$ = 64 -s$ = 144 -x$ = 152 -y$ = 160 -comp$ = 168 -req_comp$ = 176 -ri$ = 184 -channelCount$1$ = 192 -bpc$dead$ = 192 +$T1 = 48 +$T2 = 52 +out$1$ = 56 +s$ = 128 +x$ = 136 +y$ = 144 +comp$ = 152 +req_comp$ = 160 +ri$ = 168 +bitdepth$1$ = 176 +bpc$dead$ = 176 stbi__psd_load PROC ; COMDAT - -; 5668 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 5668 00000 4c 89 4c 24 20 mov QWORD PTR [rsp+32], r9 00005 4c 89 44 24 18 mov QWORD PTR [rsp+24], r8 0000a 48 89 54 24 10 mov QWORD PTR [rsp+16], rdx 0000f 53 push rbx 00010 57 push rdi - 00011 48 83 ec 78 sub rsp, 120 ; 00000078H + 00011 48 83 ec 68 sub rsp, 104 ; 00000068H 00015 48 8b f9 mov rdi, rcx - -; 1168 : stbi__uint32 z = stbi__get16be(s); - +; Line 1168 00018 e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - +; Line 1169 0001d 48 8b cf mov rcx, rdi 00020 8b d8 mov ebx, eax 00022 e8 00 00 00 00 call stbi__get16be 00027 c1 e3 10 shl ebx, 16 0002a 03 c3 add eax, ebx - -; 5669 : int pixelCount; -; 5670 : int channelCount, compression; -; 5671 : int channel, i; -; 5672 : int bitdepth; -; 5673 : int w, h; -; 5674 : stbi_uc* out; -; 5675 : STBI_NOTUSED(ri); -; 5676 : -; 5677 : // Check identifier -; 5678 : if (stbi__get32be(s) != 0x38425053) // "8BPS" - +; Line 5678 0002c 3d 53 50 42 38 cmp eax, 943870035 ; 38425053H 00031 74 2c je SHORT $LN32@stbi__psd_ - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00033 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00039 65 48 8b 04 25 @@ -47335,30 +30751,20 @@ stbi__psd_load PROC ; COMDAT 0004b 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_07ECNCNLIK@not?5PSD@ 00052 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 5679 : return stbi__errpuc("not PSD", "Corrupt PSD image"); - +; Line 5679 00056 33 c0 xor eax, eax - -; 5873 : } - - 00058 48 83 c4 78 add rsp, 120 ; 00000078H +; Line 5873 + 00058 48 83 c4 68 add rsp, 104 ; 00000068H 0005c 5f pop rdi 0005d 5b pop rbx 0005e c3 ret 0 $LN32@stbi__psd_: - -; 5680 : -; 5681 : // Check file type version. -; 5682 : if (stbi__get16be(s) != 1) - +; Line 5682 0005f 48 8b cf mov rcx, rdi 00062 e8 00 00 00 00 call stbi__get16be 00067 83 f8 01 cmp eax, 1 0006a 74 2c je SHORT $LN33@stbi__psd_ - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0006c 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00072 65 48 8b 04 25 @@ -47368,1788 +30774,1020 @@ $LN32@stbi__psd_: 00084 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0O@CHBCDKKC@wrong?5version@ 0008b 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 5683 : return stbi__errpuc("wrong version", "Unsupported version of PSD image"); - +; Line 5683 0008f 33 c0 xor eax, eax - -; 5873 : } - - 00091 48 83 c4 78 add rsp, 120 ; 00000078H +; Line 5873 + 00091 48 83 c4 68 add rsp, 104 ; 00000068H 00095 5f pop rdi 00096 5b pop rbx 00097 c3 ret 0 $LN33@stbi__psd_: - -; 1112 : if (s->io.read) { - +; Line 1112 00098 48 83 7f 10 00 cmp QWORD PTR [rdi+16], 0 - 0009d 48 89 74 24 70 mov QWORD PTR [rsp+112], rsi - 000a2 74 2f je SHORT $LN235@stbi__psd_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - + 0009d 4c 89 6c 24 50 mov QWORD PTR [rsp+80], r13 + 000a2 74 2f je SHORT $LN205@stbi__psd_ +; Line 1113 000a4 8b 8f c8 00 00 00 mov ecx, DWORD PTR [rdi+200] 000aa 2b 8f c0 00 00 00 sub ecx, DWORD PTR [rdi+192] - -; 1114 : if (blen < n) { - +; Line 1114 000b0 83 f9 06 cmp ecx, 6 - 000b3 7d 1e jge SHORT $LN235@stbi__psd_ - -; 1115 : s->img_buffer = s->img_buffer_end; - + 000b3 7d 1e jge SHORT $LN205@stbi__psd_ +; Line 1115 000b5 48 8b 87 c8 00 00 00 mov rax, QWORD PTR [rdi+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - +; Line 1116 000bc ba 06 00 00 00 mov edx, 6 000c1 2b d1 sub edx, ecx 000c3 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 000ca 48 8b 4f 28 mov rcx, QWORD PTR [rdi+40] 000ce ff 57 18 call QWORD PTR [rdi+24] - -; 1117 : return; - +; Line 1117 000d1 eb 08 jmp SHORT $LN75@stbi__psd_ -$LN235@stbi__psd_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - +$LN205@stbi__psd_: +; Line 1120 000d3 48 83 87 c0 00 00 00 06 add QWORD PTR [rdi+192], 6 $LN75@stbi__psd_: - -; 5684 : -; 5685 : // Skip 6 reserved bytes. -; 5686 : stbi__skip(s, 6); -; 5687 : -; 5688 : // Read the number of channels (R, G, B, A, etc). -; 5689 : channelCount = stbi__get16be(s); - +; Line 5689 000db 48 8b cf mov rcx, rdi 000de e8 00 00 00 00 call stbi__get16be - 000e3 89 84 24 c0 00 - 00 00 mov DWORD PTR channelCount$1$[rsp], eax - 000ea 8b f0 mov esi, eax - -; 5690 : if (channelCount < 0 || channelCount > 16) - - 000ec 83 f8 10 cmp eax, 16 - 000ef 0f 87 b1 0b 00 + 000e3 44 8b e8 mov r13d, eax +; Line 5690 + 000e6 83 f8 10 cmp eax, 16 + 000e9 0f 87 57 0a 00 00 ja $LN35@stbi__psd_ - 000f5 4c 89 74 24 58 mov QWORD PTR [rsp+88], r14 - -; 1168 : stbi__uint32 z = stbi__get16be(s); - - 000fa 48 8b cf mov rcx, rdi - -; 5690 : if (channelCount < 0 || channelCount > 16) - - 000fd 4c 89 7c 24 50 mov QWORD PTR [rsp+80], r15 - -; 1168 : stbi__uint32 z = stbi__get16be(s); - - 00102 e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - - 00107 48 8b cf mov rcx, rdi - 0010a 44 8b f8 mov r15d, eax - 0010d e8 00 00 00 00 call stbi__get16be - 00112 41 c1 e7 10 shl r15d, 16 - -; 1168 : stbi__uint32 z = stbi__get16be(s); - - 00116 48 8b cf mov rcx, rdi - -; 1169 : return (z << 16) + stbi__get16be(s); - - 00119 44 03 f8 add r15d, eax - 0011c 44 89 7c 24 38 mov DWORD PTR $T9[rsp], r15d - -; 1168 : stbi__uint32 z = stbi__get16be(s); - - 00121 e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - - 00126 48 8b cf mov rcx, rdi - 00129 44 8b f0 mov r14d, eax - 0012c e8 00 00 00 00 call stbi__get16be - 00131 41 c1 e6 10 shl r14d, 16 - 00135 44 03 f0 add r14d, eax - 00138 44 89 74 24 34 mov DWORD PTR $T8[rsp], r14d - -; 5692 : -; 5693 : // Read the rows and columns of the image. -; 5694 : h = stbi__get32be(s); -; 5695 : w = stbi__get32be(s); -; 5696 : -; 5697 : if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - - 0013d 41 81 ff 00 00 + 000ef 4c 89 74 24 48 mov QWORD PTR [rsp+72], r14 +; Line 1168 + 000f4 48 8b cf mov rcx, rdi +; Line 5690 + 000f7 4c 89 7c 24 40 mov QWORD PTR [rsp+64], r15 +; Line 1168 + 000fc e8 00 00 00 00 call stbi__get16be +; Line 1169 + 00101 48 8b cf mov rcx, rdi + 00104 44 8b f8 mov r15d, eax + 00107 e8 00 00 00 00 call stbi__get16be + 0010c 41 c1 e7 10 shl r15d, 16 +; Line 1168 + 00110 48 8b cf mov rcx, rdi +; Line 1169 + 00113 44 03 f8 add r15d, eax + 00116 44 89 7c 24 34 mov DWORD PTR $T2[rsp], r15d +; Line 1168 + 0011b e8 00 00 00 00 call stbi__get16be +; Line 1169 + 00120 48 8b cf mov rcx, rdi + 00123 44 8b f0 mov r14d, eax + 00126 e8 00 00 00 00 call stbi__get16be + 0012b 41 c1 e6 10 shl r14d, 16 + 0012f 44 03 f0 add r14d, eax + 00132 44 89 74 24 30 mov DWORD PTR $T1[rsp], r14d +; Line 5697 + 00137 41 81 ff 00 00 00 01 cmp r15d, 16777216 ; 01000000H - 00144 0f 8f 32 0b 00 - 00 jg $LN240@stbi__psd_ - -; 5698 : if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - - 0014a 41 81 fe 00 00 + 0013e 0f 8f d8 09 00 + 00 jg $LN206@stbi__psd_ +; Line 5698 + 00144 41 81 fe 00 00 00 01 cmp r14d, 16777216 ; 01000000H - 00151 0f 8f 25 0b 00 - 00 jg $LN240@stbi__psd_ - -; 5699 : -; 5700 : // Make sure the depth is 8 bits. -; 5701 : bitdepth = stbi__get16be(s); - - 00157 48 8b cf mov rcx, rdi - 0015a e8 00 00 00 00 call stbi__get16be - 0015f 89 44 24 30 mov DWORD PTR bitdepth$1$[rsp], eax - -; 5702 : if (bitdepth != 8 && bitdepth != 16) - - 00163 8d 48 f8 lea ecx, DWORD PTR [rax-8] - 00166 f7 c1 f7 ff ff + 0014b 0f 8f cb 09 00 + 00 jg $LN206@stbi__psd_ +; Line 5701 + 00151 48 8b cf mov rcx, rdi + 00154 e8 00 00 00 00 call stbi__get16be + 00159 89 84 24 b0 00 + 00 00 mov DWORD PTR bitdepth$1$[rsp], eax +; Line 5702 + 00160 8d 48 f8 lea ecx, DWORD PTR [rax-8] + 00163 f7 c1 f7 ff ff ff test ecx, -9 ; fffffff7H - 0016c 74 2a je SHORT $LN38@stbi__psd_ - -; 431 : stbi__g_failure_reason = str; - - 0016e 8b 15 00 00 00 + 00169 74 2a je SHORT $LN38@stbi__psd_ +; Line 431 + 0016b 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00174 65 48 8b 04 25 + 00171 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 0017d b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00182 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00186 48 8d 15 00 00 + 0017a b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 0017f 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00183 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BG@NOLDLPP@unsupported?5bit?5depth@ - 0018d 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 5703 : return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); - - 00191 33 c0 xor eax, eax - 00193 e9 66 03 00 00 jmp $LN330@stbi__psd_ + 0018a 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 5703 + 0018e 33 c0 xor eax, eax + 00190 e9 09 02 00 00 jmp $LN280@stbi__psd_ $LN38@stbi__psd_: - -; 5704 : -; 5705 : // Make sure the color mode is RGB. -; 5706 : // Valid options are: -; 5707 : // 0: Bitmap -; 5708 : // 1: Grayscale -; 5709 : // 2: Indexed color -; 5710 : // 3: RGB color -; 5711 : // 4: CMYK color -; 5712 : // 7: Multichannel -; 5713 : // 8: Duotone -; 5714 : // 9: Lab color -; 5715 : if (stbi__get16be(s) != 3) - - 00198 48 8b cf mov rcx, rdi - 0019b e8 00 00 00 00 call stbi__get16be - 001a0 83 f8 03 cmp eax, 3 - 001a3 74 2a je SHORT $LN39@stbi__psd_ - -; 431 : stbi__g_failure_reason = str; - - 001a5 8b 15 00 00 00 +; Line 5715 + 00195 48 8b cf mov rcx, rdi + 00198 e8 00 00 00 00 call stbi__get16be + 0019d 83 f8 03 cmp eax, 3 + 001a0 74 2a je SHORT $LN39@stbi__psd_ +; Line 431 + 001a2 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 001ab 65 48 8b 04 25 + 001a8 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 001b4 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 001b9 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 001bd 48 8d 15 00 00 + 001b1 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 001b6 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 001ba 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BD@IOGGBMNK@wrong?5color?5format@ - 001c4 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 5716 : return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); - - 001c8 33 c0 xor eax, eax - 001ca e9 2f 03 00 00 jmp $LN330@stbi__psd_ + 001c1 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 5716 + 001c5 33 c0 xor eax, eax + 001c7 e9 d2 01 00 00 jmp $LN280@stbi__psd_ $LN39@stbi__psd_: - -; 1168 : stbi__uint32 z = stbi__get16be(s); - - 001cf 48 8b cf mov rcx, rdi - 001d2 e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - - 001d7 48 8b cf mov rcx, rdi - 001da 8b d8 mov ebx, eax - 001dc e8 00 00 00 00 call stbi__get16be - 001e1 8b c8 mov ecx, eax - 001e3 c1 e3 10 shl ebx, 16 - 001e6 03 cb add ecx, ebx - -; 1107 : if (n == 0) return; // already there! - - 001e8 74 50 je SHORT $LN95@stbi__psd_ - -; 1108 : if (n < 0) { - - 001ea 85 c9 test ecx, ecx - 001ec 79 10 jns SHORT $LN97@stbi__psd_ - -; 1109 : s->img_buffer = s->img_buffer_end; - - 001ee 48 8b 87 c8 00 - 00 00 mov rax, QWORD PTR [rdi+200] - 001f5 48 89 87 c0 00 - 00 00 mov QWORD PTR [rdi+192], rax - -; 1110 : return; - - 001fc eb 3c jmp SHORT $LN95@stbi__psd_ -$LN97@stbi__psd_: - -; 1111 : } -; 1112 : if (s->io.read) { - - 001fe 48 83 7f 10 00 cmp QWORD PTR [rdi+16], 0 - 00203 74 2b je SHORT $LN236@stbi__psd_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - - 00205 8b 97 c8 00 00 - 00 mov edx, DWORD PTR [rdi+200] - 0020b 2b 97 c0 00 00 - 00 sub edx, DWORD PTR [rdi+192] - -; 1114 : if (blen < n) { - - 00211 3b d1 cmp edx, ecx - 00213 7d 1b jge SHORT $LN236@stbi__psd_ - -; 1115 : s->img_buffer = s->img_buffer_end; - - 00215 48 8b 87 c8 00 - 00 00 mov rax, QWORD PTR [rdi+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - - 0021c 2b ca sub ecx, edx - 0021e 8b d1 mov edx, ecx - 00220 48 89 87 c0 00 - 00 00 mov QWORD PTR [rdi+192], rax - 00227 48 8b 4f 28 mov rcx, QWORD PTR [rdi+40] - 0022b ff 57 18 call QWORD PTR [rdi+24] - -; 1117 : return; - - 0022e eb 0a jmp SHORT $LN95@stbi__psd_ -$LN236@stbi__psd_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - - 00230 48 63 c1 movsxd rax, ecx - 00233 48 01 87 c0 00 - 00 00 add QWORD PTR [rdi+192], rax -$LN95@stbi__psd_: - -; 1168 : stbi__uint32 z = stbi__get16be(s); - - 0023a 48 8b cf mov rcx, rdi - 0023d e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - - 00242 48 8b cf mov rcx, rdi - 00245 8b d8 mov ebx, eax - 00247 e8 00 00 00 00 call stbi__get16be - 0024c 8b c8 mov ecx, eax - 0024e c1 e3 10 shl ebx, 16 - 00251 03 cb add ecx, ebx - -; 1107 : if (n == 0) return; // already there! - - 00253 74 50 je SHORT $LN103@stbi__psd_ - -; 1108 : if (n < 0) { - - 00255 85 c9 test ecx, ecx - 00257 79 10 jns SHORT $LN105@stbi__psd_ - -; 1109 : s->img_buffer = s->img_buffer_end; - - 00259 48 8b 87 c8 00 - 00 00 mov rax, QWORD PTR [rdi+200] - 00260 48 89 87 c0 00 - 00 00 mov QWORD PTR [rdi+192], rax - -; 1110 : return; - - 00267 eb 3c jmp SHORT $LN103@stbi__psd_ -$LN105@stbi__psd_: - -; 1111 : } -; 1112 : if (s->io.read) { - - 00269 48 83 7f 10 00 cmp QWORD PTR [rdi+16], 0 - 0026e 74 2b je SHORT $LN237@stbi__psd_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - - 00270 8b 97 c8 00 00 - 00 mov edx, DWORD PTR [rdi+200] - 00276 2b 97 c0 00 00 - 00 sub edx, DWORD PTR [rdi+192] - -; 1114 : if (blen < n) { - - 0027c 3b d1 cmp edx, ecx - 0027e 7d 1b jge SHORT $LN237@stbi__psd_ - -; 1115 : s->img_buffer = s->img_buffer_end; - - 00280 48 8b 87 c8 00 - 00 00 mov rax, QWORD PTR [rdi+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - - 00287 2b ca sub ecx, edx - 00289 8b d1 mov edx, ecx - 0028b 48 89 87 c0 00 - 00 00 mov QWORD PTR [rdi+192], rax - 00292 48 8b 4f 28 mov rcx, QWORD PTR [rdi+40] - 00296 ff 57 18 call QWORD PTR [rdi+24] - -; 1117 : return; - - 00299 eb 0a jmp SHORT $LN103@stbi__psd_ -$LN237@stbi__psd_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - - 0029b 48 63 c1 movsxd rax, ecx - 0029e 48 01 87 c0 00 - 00 00 add QWORD PTR [rdi+192], rax -$LN103@stbi__psd_: - -; 1168 : stbi__uint32 z = stbi__get16be(s); - - 002a5 48 8b cf mov rcx, rdi - 002a8 e8 00 00 00 00 call stbi__get16be - -; 1169 : return (z << 16) + stbi__get16be(s); - - 002ad 48 8b cf mov rcx, rdi - 002b0 8b d8 mov ebx, eax - 002b2 e8 00 00 00 00 call stbi__get16be - 002b7 8b c8 mov ecx, eax - 002b9 c1 e3 10 shl ebx, 16 - 002bc 03 cb add ecx, ebx - -; 1107 : if (n == 0) return; // already there! - - 002be 74 50 je SHORT $LN111@stbi__psd_ - -; 1108 : if (n < 0) { - - 002c0 85 c9 test ecx, ecx - 002c2 79 10 jns SHORT $LN113@stbi__psd_ - -; 1109 : s->img_buffer = s->img_buffer_end; - - 002c4 48 8b 87 c8 00 - 00 00 mov rax, QWORD PTR [rdi+200] - 002cb 48 89 87 c0 00 - 00 00 mov QWORD PTR [rdi+192], rax - -; 1110 : return; - - 002d2 eb 3c jmp SHORT $LN111@stbi__psd_ -$LN113@stbi__psd_: - -; 1111 : } -; 1112 : if (s->io.read) { - - 002d4 48 83 7f 10 00 cmp QWORD PTR [rdi+16], 0 - 002d9 74 2b je SHORT $LN238@stbi__psd_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - - 002db 8b 97 c8 00 00 - 00 mov edx, DWORD PTR [rdi+200] - 002e1 2b 97 c0 00 00 - 00 sub edx, DWORD PTR [rdi+192] - -; 1114 : if (blen < n) { - - 002e7 3b d1 cmp edx, ecx - 002e9 7d 1b jge SHORT $LN238@stbi__psd_ - -; 1115 : s->img_buffer = s->img_buffer_end; - - 002eb 48 8b 87 c8 00 - 00 00 mov rax, QWORD PTR [rdi+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - - 002f2 2b ca sub ecx, edx - 002f4 8b d1 mov edx, ecx - 002f6 48 89 87 c0 00 - 00 00 mov QWORD PTR [rdi+192], rax - 002fd 48 8b 4f 28 mov rcx, QWORD PTR [rdi+40] - 00301 ff 57 18 call QWORD PTR [rdi+24] - -; 1117 : return; - - 00304 eb 0a jmp SHORT $LN111@stbi__psd_ -$LN238@stbi__psd_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - - 00306 48 63 c1 movsxd rax, ecx - 00309 48 01 87 c0 00 - 00 00 add QWORD PTR [rdi+192], rax -$LN111@stbi__psd_: - -; 5717 : -; 5718 : // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) -; 5719 : stbi__skip(s, stbi__get32be(s)); -; 5720 : -; 5721 : // Skip the image resources. (resolution, pen tool paths, etc) -; 5722 : stbi__skip(s, stbi__get32be(s)); -; 5723 : -; 5724 : // Skip the reserved data. -; 5725 : stbi__skip(s, stbi__get32be(s)); -; 5726 : -; 5727 : // Find out if the data is compressed. -; 5728 : // Known values: -; 5729 : // 0: no compression -; 5730 : // 1: RLE compressed -; 5731 : compression = stbi__get16be(s); - - 00310 48 8b cf mov rcx, rdi - 00313 e8 00 00 00 00 call stbi__get16be - 00318 8b d8 mov ebx, eax - -; 5732 : if (compression > 1) - - 0031a 83 f8 01 cmp eax, 1 - 0031d 7e 2a jle SHORT $LN40@stbi__psd_ - -; 431 : stbi__g_failure_reason = str; - - 0031f 8b 15 00 00 00 +; Line 5719 + 001cc 48 8b cf mov rcx, rdi + 001cf e8 00 00 00 00 call stbi__get32be + 001d4 8b d0 mov edx, eax + 001d6 48 8b cf mov rcx, rdi + 001d9 e8 00 00 00 00 call stbi__skip +; Line 5722 + 001de 48 8b cf mov rcx, rdi + 001e1 e8 00 00 00 00 call stbi__get32be + 001e6 8b d0 mov edx, eax + 001e8 48 8b cf mov rcx, rdi + 001eb e8 00 00 00 00 call stbi__skip +; Line 5725 + 001f0 48 8b cf mov rcx, rdi + 001f3 e8 00 00 00 00 call stbi__get32be + 001f8 8b d0 mov edx, eax + 001fa 48 8b cf mov rcx, rdi + 001fd e8 00 00 00 00 call stbi__skip +; Line 5731 + 00202 48 8b cf mov rcx, rdi + 00205 e8 00 00 00 00 call stbi__get16be + 0020a 8b d8 mov ebx, eax +; Line 5732 + 0020c 83 f8 01 cmp eax, 1 + 0020f 7e 2a jle SHORT $LN40@stbi__psd_ +; Line 431 + 00211 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00325 65 48 8b 04 25 + 00217 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 0032e b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00333 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00337 48 8d 15 00 00 + 00220 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00225 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00229 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BA@MCNBDLPD@bad?5compression@ - 0033e 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 5733 : return stbi__errpuc("bad compression", "PSD has an unknown compression format"); - - 00342 33 c0 xor eax, eax - 00344 e9 b5 01 00 00 jmp $LN330@stbi__psd_ + 00230 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 5733 + 00234 33 c0 xor eax, eax + 00236 e9 63 01 00 00 jmp $LN280@stbi__psd_ $LN40@stbi__psd_: - -; 467 : if (a < 0 || b < 0) return 0; - - 00349 45 85 f6 test r14d, r14d - 0034c 0f 88 2a 09 00 - 00 js $LN240@stbi__psd_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 00352 75 0a jne SHORT $LN128@stbi__psd_ - 00354 42 8d 0c b5 00 +; Line 467 + 0023b 45 85 f6 test r14d, r14d + 0023e 0f 88 d8 08 00 + 00 js $LN206@stbi__psd_ +; Line 468 + 00244 75 0a jne SHORT $LN104@stbi__psd_ + 00246 42 8d 0c b5 00 00 00 00 lea ecx, DWORD PTR [r14*4] - 0035c eb 22 jmp SHORT $LN243@stbi__psd_ -$LN128@stbi__psd_: - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 0035e b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00363 99 cdq - 00364 41 f7 fe idiv r14d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00367 83 f8 04 cmp eax, 4 - 0036a 0f 8c 0c 09 00 - 00 jl $LN240@stbi__psd_ - 00370 42 8d 0c b5 00 + 0024e eb 22 jmp SHORT $LN209@stbi__psd_ +$LN104@stbi__psd_: +; Line 470 + 00250 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 00255 99 cdq + 00256 41 f7 fe idiv r14d +; Line 484 + 00259 83 f8 04 cmp eax, 4 + 0025c 0f 8c ba 08 00 + 00 jl $LN206@stbi__psd_ + 00262 42 8d 0c b5 00 00 00 00 lea ecx, DWORD PTR [r14*4] - -; 467 : if (a < 0 || b < 0) return 0; - - 00378 85 c9 test ecx, ecx - 0037a 0f 88 fc 08 00 - 00 js $LN240@stbi__psd_ -$LN243@stbi__psd_: - 00380 45 85 ff test r15d, r15d - 00383 0f 88 f3 08 00 - 00 js $LN240@stbi__psd_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 00389 74 11 je SHORT $LN241@stbi__psd_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 0038b b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00390 99 cdq - 00391 41 f7 ff idiv r15d - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00394 3b c8 cmp ecx, eax - 00396 0f 8f e0 08 00 - 00 jg $LN240@stbi__psd_ -$LN241@stbi__psd_: - 0039c 48 89 ac 24 90 - 00 00 00 mov QWORD PTR [rsp+144], rbp - 003a4 41 8b ef mov ebp, r15d - 003a7 41 0f af ee imul ebp, r14d - 003ab 4c 89 64 24 68 mov QWORD PTR [rsp+104], r12 - -; 5738 : -; 5739 : // Create the destination image. -; 5740 : -; 5741 : if (!compression && bitdepth == 16 && bpc == 16) { -; 5742 : out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0); -; 5743 : ri->bits_per_channel = 16; -; 5744 : } -; 5745 : else -; 5746 : out = (stbi_uc*)stbi__malloc(4 * w * h); - - 003b0 8d 04 ad 00 00 +; Line 467 + 0026a 85 c9 test ecx, ecx + 0026c 0f 88 aa 08 00 + 00 js $LN206@stbi__psd_ +$LN209@stbi__psd_: + 00272 45 85 ff test r15d, r15d + 00275 0f 88 a1 08 00 + 00 js $LN206@stbi__psd_ +; Line 468 + 0027b 74 11 je SHORT $LN207@stbi__psd_ +; Line 470 + 0027d b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 00282 99 cdq + 00283 41 f7 ff idiv r15d +; Line 484 + 00286 3b c8 cmp ecx, eax + 00288 0f 8f 8e 08 00 + 00 jg $LN206@stbi__psd_ +$LN207@stbi__psd_: + 0028e 48 89 ac 24 80 + 00 00 00 mov QWORD PTR [rsp+128], rbp + 00296 41 8b ef mov ebp, r15d + 00299 41 0f af ee imul ebp, r14d + 0029d 4c 89 64 24 58 mov QWORD PTR [rsp+88], r12 +; Line 5746 + 002a2 8d 04 ad 00 00 00 00 lea eax, DWORD PTR [rbp*4] - 003b7 48 63 c8 movsxd rcx, eax - -; 438 : return STBI_MALLOC(size); - - 003ba ff 15 00 00 00 + 002a9 48 63 c8 movsxd rcx, eax +; Line 438 + 002ac ff 15 00 00 00 00 call QWORD PTR __imp_malloc - 003c0 48 89 44 24 40 mov QWORD PTR out$1$[rsp], rax - 003c5 4c 8b e0 mov r12, rax - -; 5747 : -; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); - - 003c8 48 85 c0 test rax, rax - 003cb 75 2a jne SHORT $LN44@stbi__psd_ - -; 431 : stbi__g_failure_reason = str; - - 003cd 8b 15 00 00 00 + 002b2 48 89 44 24 38 mov QWORD PTR out$1$[rsp], rax + 002b7 4c 8b e0 mov r12, rax +; Line 5748 + 002ba 48 85 c0 test rax, rax + 002bd 75 2a jne SHORT $LN44@stbi__psd_ +; Line 431 + 002bf 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 003d3 65 48 8b 04 25 + 002c5 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 003dc b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 003e1 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 003e5 48 8d 15 00 00 + 002ce b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 002d3 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 002d7 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 003ec 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 5747 : -; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); - - 003f0 33 c0 xor eax, eax - 003f2 e9 fa 00 00 00 jmp $LN332@stbi__psd_ + 002de 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 5748 + 002e2 33 c0 xor eax, eax + 002e4 e9 a8 00 00 00 jmp $LN282@stbi__psd_ $LN44@stbi__psd_: - 003f7 4c 89 6c 24 60 mov QWORD PTR [rsp+96], r13 - -; 5749 : pixelCount = w * h; -; 5750 : -; 5751 : // Initialize the data to zero. -; 5752 : //memset( out, 0, pixelCount * 4 ); -; 5753 : -; 5754 : // Finally, the image data. -; 5755 : if (compression) { - - 003fc 85 db test ebx, ebx - 003fe 0f 84 10 01 00 + 002e9 48 89 74 24 60 mov QWORD PTR [rsp+96], rsi +; Line 5755 + 002ee 85 db test ebx, ebx + 002f0 0f 84 be 00 00 00 je $LN45@stbi__psd_ - -; 5756 : // RLE as used by .PSD and .TIFF -; 5757 : // Loop until you get the number of unpacked bytes you are expecting: -; 5758 : // Read the next source byte into n. -; 5759 : // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. -; 5760 : // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. -; 5761 : // Else if n is 128, noop. -; 5762 : // Endloop -; 5763 : -; 5764 : // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, -; 5765 : // which we're going to just skip. -; 5766 : stbi__skip(s, h * channelCount * 2); - - 00404 41 8b cf mov ecx, r15d - 00407 0f af ce imul ecx, esi - 0040a 03 c9 add ecx, ecx - -; 1107 : if (n == 0) return; // already there! - - 0040c 74 50 je SHORT $LN150@stbi__psd_ - -; 1108 : if (n < 0) { - - 0040e 85 c9 test ecx, ecx - 00410 79 10 jns SHORT $LN152@stbi__psd_ - -; 1109 : s->img_buffer = s->img_buffer_end; - - 00412 48 8b 87 c8 00 - 00 00 mov rax, QWORD PTR [rdi+200] - 00419 48 89 87 c0 00 - 00 00 mov QWORD PTR [rdi+192], rax - -; 1110 : return; - - 00420 eb 3c jmp SHORT $LN150@stbi__psd_ -$LN152@stbi__psd_: - -; 1111 : } -; 1112 : if (s->io.read) { - - 00422 48 83 7f 10 00 cmp QWORD PTR [rdi+16], 0 - 00427 74 2b je SHORT $LN239@stbi__psd_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - - 00429 8b 97 c8 00 00 - 00 mov edx, DWORD PTR [rdi+200] - 0042f 2b 97 c0 00 00 - 00 sub edx, DWORD PTR [rdi+192] - -; 1114 : if (blen < n) { - - 00435 3b d1 cmp edx, ecx - 00437 7d 1b jge SHORT $LN239@stbi__psd_ - -; 1115 : s->img_buffer = s->img_buffer_end; - - 00439 48 8b 87 c8 00 - 00 00 mov rax, QWORD PTR [rdi+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - - 00440 2b ca sub ecx, edx - 00442 8b d1 mov edx, ecx - 00444 48 89 87 c0 00 - 00 00 mov QWORD PTR [rdi+192], rax - 0044b 48 8b 4f 28 mov rcx, QWORD PTR [rdi+40] - 0044f ff 57 18 call QWORD PTR [rdi+24] - -; 1117 : return; - - 00452 eb 0a jmp SHORT $LN150@stbi__psd_ -$LN239@stbi__psd_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - - 00454 48 63 c1 movsxd rax, ecx - 00457 48 01 87 c0 00 - 00 00 add QWORD PTR [rdi+192], rax -$LN150@stbi__psd_: - -; 5767 : -; 5768 : // Read the RLE data by channel. -; 5769 : for (channel = 0; channel < 4; channel++) { - - 0045e 45 33 ed xor r13d, r13d - 00461 b8 ff 00 00 00 mov eax, 255 ; 000000ffH - 00466 41 8b dd mov ebx, r13d - 00469 0f 1f 80 00 00 - 00 00 npad 7 +; Line 5766 + 002f6 41 8b d7 mov edx, r15d + 002f9 48 8b cf mov rcx, rdi + 002fc 41 0f af d5 imul edx, r13d + 00300 03 d2 add edx, edx + 00302 e8 00 00 00 00 call stbi__skip +; Line 5769 + 00307 33 f6 xor esi, esi + 00309 b8 ff 00 00 00 mov eax, 255 ; 000000ffH + 0030e 8b de mov ebx, esi $LL4@stbi__psd_: - -; 5770 : stbi_uc* p; -; 5771 : -; 5772 : p = out + channel; - - 00470 48 63 d3 movsxd rdx, ebx - 00473 49 03 d4 add rdx, r12 - -; 5773 : if (channel >= channelCount) { - - 00476 3b de cmp ebx, esi - 00478 7c 24 jl SHORT $LN47@stbi__psd_ - -; 5774 : // Fill this channel with default data. -; 5775 : for (i = 0; i < pixelCount; i++, p += 4) - - 0047a 85 ed test ebp, ebp - 0047c 7e 34 jle SHORT $LN2@stbi__psd_ - -; 5776 : *p = (channel == 3 ? 255 : 0); - - 0047e 83 fb 03 cmp ebx, 3 - 00481 41 8b cd mov ecx, r13d - 00484 0f 44 c8 cmove ecx, eax - 00487 8b c5 mov eax, ebp - 00489 0f 1f 80 00 00 +; Line 5772 + 00310 48 63 d3 movsxd rdx, ebx + 00313 49 03 d4 add rdx, r12 +; Line 5773 + 00316 41 3b dd cmp ebx, r13d + 00319 7c 23 jl SHORT $LN47@stbi__psd_ +; Line 5775 + 0031b 85 ed test ebp, ebp + 0031d 7e 33 jle SHORT $LN2@stbi__psd_ +; Line 5776 + 0031f 83 fb 03 cmp ebx, 3 + 00322 8b ce mov ecx, esi + 00324 0f 44 c8 cmove ecx, eax + 00327 8b c5 mov eax, ebp + 00329 0f 1f 80 00 00 00 00 npad 7 $LL7@stbi__psd_: - 00490 88 0a mov BYTE PTR [rdx], cl - 00492 48 8d 52 04 lea rdx, QWORD PTR [rdx+4] - 00496 48 83 e8 01 sub rax, 1 - 0049a 75 f4 jne SHORT $LL7@stbi__psd_ - -; 5777 : } - - 0049c eb 0f jmp SHORT $LN334@stbi__psd_ + 00330 88 0a mov BYTE PTR [rdx], cl + 00332 48 8d 52 04 lea rdx, QWORD PTR [rdx+4] + 00336 48 83 e8 01 sub rax, 1 + 0033a 75 f4 jne SHORT $LL7@stbi__psd_ +; Line 5777 + 0033c eb 0f jmp SHORT $LN284@stbi__psd_ $LN47@stbi__psd_: - -; 5778 : else { -; 5779 : // Read the RLE data. -; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { - - 0049e 44 8b c5 mov r8d, ebp - 004a1 48 8b cf mov rcx, rdi - 004a4 e8 00 00 00 00 call stbi__psd_decode_rle - 004a9 85 c0 test eax, eax - 004ab 74 11 je SHORT $LN188@stbi__psd_ -$LN334@stbi__psd_: - -; 5767 : -; 5768 : // Read the RLE data by channel. -; 5769 : for (channel = 0; channel < 4; channel++) { - - 004ad b8 ff 00 00 00 mov eax, 255 ; 000000ffH +; Line 5780 + 0033e 44 8b c5 mov r8d, ebp + 00341 48 8b cf mov rcx, rdi + 00344 e8 00 00 00 00 call stbi__psd_decode_rle + 00349 85 c0 test eax, eax + 0034b 74 11 je SHORT $LN158@stbi__psd_ +$LN284@stbi__psd_: +; Line 5769 + 0034d b8 ff 00 00 00 mov eax, 255 ; 000000ffH $LN2@stbi__psd_: - 004b2 ff c3 inc ebx - 004b4 83 fb 04 cmp ebx, 4 - 004b7 7c b7 jl SHORT $LL4@stbi__psd_ - -; 5778 : else { -; 5779 : // Read the RLE data. -; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { - - 004b9 e9 82 01 00 00 jmp $LN9@stbi__psd_ -$LN188@stbi__psd_: - -; 5781 : STBI_FREE(out); - - 004be 49 8b cc mov rcx, r12 - 004c1 ff 15 00 00 00 + 00352 ff c3 inc ebx + 00354 83 fb 04 cmp ebx, 4 + 00357 7c b7 jl SHORT $LL4@stbi__psd_ +; Line 5780 + 00359 e9 7d 01 00 00 jmp $LN9@stbi__psd_ +$LN158@stbi__psd_: +; Line 5781 + 0035e 49 8b cc mov rcx, r12 + 00361 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 431 : stbi__g_failure_reason = str; - - 004c7 8b 15 00 00 00 +; Line 431 + 00367 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 004cd 65 48 8b 04 25 + 0036d 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 004d6 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 004db 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 004df 48 8d 15 00 00 + 00376 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 0037b 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 0037f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_07DPPMCAKL@corrupt@ - 004e6 48 89 14 01 mov QWORD PTR [rcx+rax], rdx -$LN338@stbi__psd_: - -; 5782 : return stbi__errpuc("corrupt", "bad RLE data"); - - 004ea 33 c0 xor eax, eax -$LN333@stbi__psd_: - 004ec 4c 8b 6c 24 60 mov r13, QWORD PTR [rsp+96] -$LN332@stbi__psd_: - 004f1 4c 8b 64 24 68 mov r12, QWORD PTR [rsp+104] - 004f6 48 8b ac 24 90 - 00 00 00 mov rbp, QWORD PTR [rsp+144] -$LN330@stbi__psd_: - 004fe 4c 8b 74 24 58 mov r14, QWORD PTR [rsp+88] - 00503 4c 8b 7c 24 50 mov r15, QWORD PTR [rsp+80] - 00508 48 8b 74 24 70 mov rsi, QWORD PTR [rsp+112] - -; 5873 : } - - 0050d 48 83 c4 78 add rsp, 120 ; 00000078H - 00511 5f pop rdi - 00512 5b pop rbx - 00513 c3 ret 0 + 00386 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +$LN288@stbi__psd_: +; Line 5782 + 0038a 33 c0 xor eax, eax +$LN283@stbi__psd_: + 0038c 48 8b 74 24 60 mov rsi, QWORD PTR [rsp+96] +$LN282@stbi__psd_: + 00391 48 8b ac 24 80 + 00 00 00 mov rbp, QWORD PTR [rsp+128] + 00399 4c 8b 64 24 58 mov r12, QWORD PTR [rsp+88] +$LN280@stbi__psd_: + 0039e 4c 8b 74 24 48 mov r14, QWORD PTR [rsp+72] + 003a3 4c 8b 7c 24 40 mov r15, QWORD PTR [rsp+64] + 003a8 4c 8b 6c 24 50 mov r13, QWORD PTR [rsp+80] +; Line 5873 + 003ad 48 83 c4 68 add rsp, 104 ; 00000068H + 003b1 5f pop rdi + 003b2 5b pop rbx + 003b3 c3 ret 0 $LN45@stbi__psd_: - -; 5783 : } -; 5784 : } -; 5785 : } -; 5786 : } -; 5787 : else { -; 5788 : // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) -; 5789 : // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. -; 5790 : -; 5791 : // Read the data by channel. -; 5792 : for (channel = 0; channel < 4; channel++) { - - 00514 45 33 ed xor r13d, r13d - 00517 4d 8b fc mov r15, r12 - 0051a 45 8b f5 mov r14d, r13d - 0051d b9 ff 00 00 00 mov ecx, 255 ; 000000ffH +; Line 5792 + 003b4 33 f6 xor esi, esi + 003b6 4d 8b fc mov r15, r12 + 003b9 44 8b f6 mov r14d, esi + 003bc b9 ff 00 00 00 mov ecx, 255 ; 000000ffH $LL10@stbi__psd_: - -; 5793 : if (channel >= channelCount) { - - 00522 44 3b f6 cmp r14d, esi - 00525 7c 2a jl SHORT $LN50@stbi__psd_ - -; 5803 : stbi_uc val = channel == 3 ? 255 : 0; - - 00527 41 83 fe 03 cmp r14d, 3 - 0052b 41 8b d5 mov edx, r13d - 0052e 49 8b c7 mov rax, r15 - 00531 0f 44 d1 cmove edx, ecx - -; 5804 : for (i = 0; i < pixelCount; i++, p += 4) - - 00534 85 ed test ebp, ebp - 00536 0f 8e e1 00 00 +; Line 5793 + 003c1 45 3b f5 cmp r14d, r13d + 003c4 7c 2b jl SHORT $LN50@stbi__psd_ +; Line 5803 + 003c6 41 83 fe 03 cmp r14d, 3 + 003ca 8b d6 mov edx, esi + 003cc 49 8b c7 mov rax, r15 + 003cf 0f 44 d1 cmove edx, ecx +; Line 5804 + 003d2 85 ed test ebp, ebp + 003d4 0f 8e de 00 00 00 jle $LN8@stbi__psd_ - -; 5794 : // Fill this channel with default data. -; 5795 : if (bitdepth == 16 && bpc == 16) { -; 5796 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5797 : stbi__uint16 val = channel == 3 ? 65535 : 0; -; 5798 : for (i = 0; i < pixelCount; i++, q += 4) -; 5799 : *q = val; -; 5800 : } -; 5801 : else { -; 5802 : stbi_uc* p = out + channel; - - 0053c 8b cd mov ecx, ebp - 0053e 66 90 npad 2 +; Line 5802 + 003da 8b cd mov ecx, ebp + 003dc 0f 1f 40 00 npad 4 $LL16@stbi__psd_: - -; 5805 : *p = val; - - 00540 88 10 mov BYTE PTR [rax], dl - 00542 48 8d 40 04 lea rax, QWORD PTR [rax+4] - 00546 48 83 e9 01 sub rcx, 1 - 0054a 75 f4 jne SHORT $LL16@stbi__psd_ - -; 5806 : } -; 5807 : } - - 0054c e9 c7 00 00 00 jmp $LN335@stbi__psd_ +; Line 5805 + 003e0 88 10 mov BYTE PTR [rax], dl + 003e2 48 8d 40 04 lea rax, QWORD PTR [rax+4] + 003e6 48 83 e9 01 sub rcx, 1 + 003ea 75 f4 jne SHORT $LL16@stbi__psd_ +; Line 5807 + 003ec e9 c2 00 00 00 jmp $LN285@stbi__psd_ $LN50@stbi__psd_: - -; 5808 : else { -; 5809 : if (ri->bits_per_channel == 16) { // output bpc - - 00551 48 8b 84 24 b8 +; Line 5809 + 003f1 48 8b 84 24 a8 00 00 00 mov rax, QWORD PTR ri$[rsp] - 00559 83 38 10 cmp DWORD PTR [rax], 16 - 0055c 75 2c jne SHORT $LN54@stbi__psd_ - -; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; - - 0055e 49 8b dc mov rbx, r12 - -; 5811 : for (i = 0; i < pixelCount; i++, q += 4) - - 00561 85 ed test ebp, ebp - 00563 0f 8e b4 00 00 + 003f9 83 38 10 cmp DWORD PTR [rax], 16 + 003fc 75 2c jne SHORT $LN54@stbi__psd_ +; Line 5810 + 003fe 49 8b dc mov rbx, r12 +; Line 5811 + 00401 85 ed test ebp, ebp + 00403 0f 8e af 00 00 00 jle $LN8@stbi__psd_ - -; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; - - 00569 8b f5 mov esi, ebp - 0056b 0f 1f 44 00 00 npad 5 +; Line 5810 + 00409 8b f5 mov esi, ebp + 0040b 0f 1f 44 00 00 npad 5 $LL19@stbi__psd_: - -; 5812 : *q = (stbi__uint16)stbi__get16be(s); - - 00570 48 8b cf mov rcx, rdi - 00573 e8 00 00 00 00 call stbi__get16be - 00578 66 89 03 mov WORD PTR [rbx], ax - 0057b 48 8d 5b 08 lea rbx, QWORD PTR [rbx+8] - 0057f 48 83 ee 01 sub rsi, 1 - 00583 75 eb jne SHORT $LL19@stbi__psd_ - -; 5813 : } - - 00585 e9 87 00 00 00 jmp $LN336@stbi__psd_ +; Line 5812 + 00410 48 8b cf mov rcx, rdi + 00413 e8 00 00 00 00 call stbi__get16be + 00418 66 89 03 mov WORD PTR [rbx], ax + 0041b 48 8d 5b 08 lea rbx, QWORD PTR [rbx+8] + 0041f 48 83 ee 01 sub rsi, 1 + 00423 75 eb jne SHORT $LL19@stbi__psd_ +; Line 5813 + 00425 e9 87 00 00 00 jmp $LN286@stbi__psd_ $LN54@stbi__psd_: - -; 5814 : else { -; 5815 : stbi_uc* p = out + channel; -; 5816 : if (bitdepth == 16) { // input bpc - - 0058a 83 7c 24 30 10 cmp DWORD PTR bitdepth$1$[rsp], 16 - 0058f 49 8b df mov rbx, r15 - 00592 75 25 jne SHORT $LN56@stbi__psd_ - -; 5817 : for (i = 0; i < pixelCount; i++, p += 4) - - 00594 85 ed test ebp, ebp - 00596 0f 8e 81 00 00 - 00 jle $LN8@stbi__psd_ - 0059c 8b f5 mov esi, ebp - 0059e 66 90 npad 2 +; Line 5816 + 0042a 83 bc 24 b0 00 + 00 00 10 cmp DWORD PTR bitdepth$1$[rsp], 16 + 00432 49 8b df mov rbx, r15 + 00435 75 22 jne SHORT $LN56@stbi__psd_ +; Line 5817 + 00437 85 ed test ebp, ebp + 00439 7e 7d jle SHORT $LN8@stbi__psd_ + 0043b 8b f5 mov esi, ebp + 0043d 0f 1f 00 npad 3 $LL22@stbi__psd_: - -; 5818 : *p = (stbi_uc)(stbi__get16be(s) >> 8); - - 005a0 48 8b cf mov rcx, rdi - 005a3 e8 00 00 00 00 call stbi__get16be - 005a8 c1 f8 08 sar eax, 8 - 005ab 88 03 mov BYTE PTR [rbx], al - 005ad 48 8d 5b 04 lea rbx, QWORD PTR [rbx+4] - 005b1 48 83 ee 01 sub rsi, 1 - 005b5 75 e9 jne SHORT $LL22@stbi__psd_ - -; 5819 : } - - 005b7 eb 58 jmp SHORT $LN336@stbi__psd_ +; Line 5818 + 00440 48 8b cf mov rcx, rdi + 00443 e8 00 00 00 00 call stbi__get16be + 00448 c1 f8 08 sar eax, 8 + 0044b 88 03 mov BYTE PTR [rbx], al + 0044d 48 8d 5b 04 lea rbx, QWORD PTR [rbx+4] + 00451 48 83 ee 01 sub rsi, 1 + 00455 75 e9 jne SHORT $LL22@stbi__psd_ +; Line 5819 + 00457 eb 58 jmp SHORT $LN286@stbi__psd_ $LN56@stbi__psd_: - -; 5820 : else { -; 5821 : for (i = 0; i < pixelCount; i++, p += 4) - - 005b9 85 ed test ebp, ebp - 005bb 7e 60 jle SHORT $LN8@stbi__psd_ - 005bd 8b f5 mov esi, ebp - 005bf 90 npad 1 +; Line 5821 + 00459 85 ed test ebp, ebp + 0045b 7e 5b jle SHORT $LN8@stbi__psd_ + 0045d 8b f5 mov esi, ebp + 0045f 90 npad 1 $LL25@stbi__psd_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 005c0 48 8b 87 c0 00 +; Line 1077 + 00460 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] - 005c7 48 3b 87 c8 00 + 00467 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] - 005ce 73 0f jae SHORT $LN143@stbi__psd_ - -; 1078 : return *s->img_buffer++; - - 005d0 0f b6 08 movzx ecx, BYTE PTR [rax] - 005d3 48 ff c0 inc rax - 005d6 48 89 87 c0 00 + 0046e 73 0f jae SHORT $LN119@stbi__psd_ +; Line 1078 + 00470 0f b6 08 movzx ecx, BYTE PTR [rax] + 00473 48 ff c0 inc rax + 00476 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax - 005dd eb 26 jmp SHORT $LN142@stbi__psd_ -$LN143@stbi__psd_: - -; 1079 : if (s->read_from_callbacks) { - - 005df 44 39 6f 30 cmp DWORD PTR [rdi+48], r13d - 005e3 74 1e je SHORT $LN144@stbi__psd_ - -; 1080 : stbi__refill_buffer(s); - - 005e5 48 8b cf mov rcx, rdi - 005e8 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 005ed 48 8b 87 c0 00 + 0047d eb 26 jmp SHORT $LN118@stbi__psd_ +$LN119@stbi__psd_: +; Line 1079 + 0047f 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 + 00483 74 1e je SHORT $LN120@stbi__psd_ +; Line 1080 + 00485 48 8b cf mov rcx, rdi + 00488 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 0048d 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] - 005f4 0f b6 08 movzx ecx, BYTE PTR [rax] - 005f7 48 ff c0 inc rax - 005fa 48 89 87 c0 00 + 00494 0f b6 08 movzx ecx, BYTE PTR [rax] + 00497 48 ff c0 inc rax + 0049a 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax - 00601 eb 02 jmp SHORT $LN142@stbi__psd_ -$LN144@stbi__psd_: - -; 1082 : } -; 1083 : return 0; - - 00603 32 c9 xor cl, cl -$LN142@stbi__psd_: - -; 5822 : *p = stbi__get8(s); - - 00605 88 0b mov BYTE PTR [rbx], cl - 00607 48 83 c3 04 add rbx, 4 - 0060b 48 83 ee 01 sub rsi, 1 - 0060f 75 af jne SHORT $LL25@stbi__psd_ -$LN336@stbi__psd_: - -; 5783 : } -; 5784 : } -; 5785 : } -; 5786 : } -; 5787 : else { -; 5788 : // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) -; 5789 : // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. -; 5790 : -; 5791 : // Read the data by channel. -; 5792 : for (channel = 0; channel < 4; channel++) { - - 00611 8b b4 24 c0 00 - 00 00 mov esi, DWORD PTR channelCount$1$[rsp] -$LN335@stbi__psd_: - 00618 b9 ff 00 00 00 mov ecx, 255 ; 000000ffH + 004a1 eb 02 jmp SHORT $LN118@stbi__psd_ +$LN120@stbi__psd_: +; Line 1083 + 004a3 32 c9 xor cl, cl +$LN118@stbi__psd_: +; Line 5822 + 004a5 88 0b mov BYTE PTR [rbx], cl + 004a7 48 83 c3 04 add rbx, 4 + 004ab 48 83 ee 01 sub rsi, 1 + 004af 75 af jne SHORT $LL25@stbi__psd_ +$LN286@stbi__psd_: +; Line 5792 + 004b1 33 f6 xor esi, esi +$LN285@stbi__psd_: + 004b3 b9 ff 00 00 00 mov ecx, 255 ; 000000ffH $LN8@stbi__psd_: - 0061d 41 ff c6 inc r14d - 00620 49 83 c4 02 add r12, 2 - 00624 49 ff c7 inc r15 - 00627 41 83 fe 04 cmp r14d, 4 - 0062b 0f 8c f1 fe ff + 004b8 41 ff c6 inc r14d + 004bb 49 83 c4 02 add r12, 2 + 004bf 49 ff c7 inc r15 + 004c2 41 83 fe 04 cmp r14d, 4 + 004c6 0f 8c f5 fe ff ff jl $LL10@stbi__psd_ - 00631 4c 8b 64 24 40 mov r12, QWORD PTR out$1$[rsp] - 00636 44 8b 74 24 34 mov r14d, DWORD PTR $T8[rsp] - 0063b 44 8b 7c 24 38 mov r15d, DWORD PTR $T9[rsp] + 004cc 4c 8b 64 24 38 mov r12, QWORD PTR out$1$[rsp] + 004d1 44 8b 74 24 30 mov r14d, DWORD PTR $T1[rsp] + 004d6 44 8b 7c 24 34 mov r15d, DWORD PTR $T2[rsp] $LN9@stbi__psd_: - -; 5823 : } -; 5824 : } -; 5825 : } -; 5826 : } -; 5827 : } -; 5828 : -; 5829 : // remove weird white matte from PSD -; 5830 : if (channelCount >= 4) { - - 00640 4c 8b 94 24 b8 +; Line 5830 + 004db 4c 8b 94 24 a8 00 00 00 mov r10, QWORD PTR ri$[rsp] - 00648 83 fe 04 cmp esi, 4 - 0064b 0f 8c bb 05 00 - 00 jl $LN216@stbi__psd_ - -; 5831 : if (ri->bits_per_channel == 16) { - - 00651 41 83 3a 10 cmp DWORD PTR [r10], 16 - 00655 48 63 d5 movsxd rdx, ebp - 00658 0f 85 ec 02 00 + 004e3 41 83 fd 04 cmp r13d, 4 + 004e7 0f 8c bf 05 00 + 00 jl $LN186@stbi__psd_ +; Line 5831 + 004ed 41 83 3a 10 cmp DWORD PTR [r10], 16 + 004f1 48 63 d5 movsxd rdx, ebp + 004f4 0f 85 f0 02 00 00 jne $LN59@stbi__psd_ - -; 5832 : for (i = 0; i < w * h; ++i) { - - 0065e f3 0f 10 1d 00 +; Line 5832 + 004fa f3 0f 10 1d 00 00 00 00 movss xmm3, DWORD PTR __real@477fff00 - 00666 41 bb fd ff 00 + 00502 41 bb fd ff 00 00 mov r11d, 65533 ; 0000fffdH - 0066c f3 0f 10 25 00 + 00508 f3 0f 10 25 00 00 00 00 movss xmm4, DWORD PTR __real@3f800000 - 00674 48 83 fa 04 cmp rdx, 4 - 00678 0f 8c 26 02 00 - 00 jl $LC210@stbi__psd_ - 0067e 4c 8d 42 fc lea r8, QWORD PTR [rdx-4] - 00682 49 c1 e8 02 shr r8, 2 - 00686 49 8d 4c 24 0a lea rcx, QWORD PTR [r12+10] - 0068b 49 ff c0 inc r8 - 0068e 4e 8d 2c 85 00 - 00 00 00 lea r13, QWORD PTR [r8*4] - 00696 66 66 0f 1f 84 - 00 00 00 00 00 npad 10 -$LL215@stbi__psd_: - -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { - - 006a0 44 0f b7 49 fc movzx r9d, WORD PTR [rcx-4] - 006a5 41 8d 41 ff lea eax, DWORD PTR [r9-1] - 006a9 66 41 3b c3 cmp ax, r11w - 006ad 77 6f ja SHORT $LN211@stbi__psd_ - -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); - - 006af 0f b7 41 f6 movzx eax, WORD PTR [rcx-10] - 006b3 0f 57 c0 xorps xmm0, xmm0 - 006b6 f3 41 0f 2a c1 cvtsi2ss xmm0, r9d - 006bb 0f 28 d4 movaps xmm2, xmm4 - 006be 0f 28 cc movaps xmm1, xmm4 - 006c1 f3 0f 5e c3 divss xmm0, xmm3 - 006c5 f3 0f 5e d0 divss xmm2, xmm0 - 006c9 0f 57 c0 xorps xmm0, xmm0 - 006cc f3 0f 2a c0 cvtsi2ss xmm0, eax - 006d0 f3 0f 5c ca subss xmm1, xmm2 - 006d4 f3 0f 59 c2 mulss xmm0, xmm2 - 006d8 f3 0f 59 cb mulss xmm1, xmm3 - 006dc f3 0f 58 c1 addss xmm0, xmm1 - 006e0 f3 0f 2c c0 cvttss2si eax, xmm0 - 006e4 0f 57 c0 xorps xmm0, xmm0 - 006e7 66 89 41 f6 mov WORD PTR [rcx-10], ax - -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); - - 006eb 0f b7 41 f8 movzx eax, WORD PTR [rcx-8] - 006ef f3 0f 2a c0 cvtsi2ss xmm0, eax - 006f3 f3 0f 59 c2 mulss xmm0, xmm2 - 006f7 f3 0f 58 c1 addss xmm0, xmm1 - 006fb f3 0f 2c c0 cvttss2si eax, xmm0 - 006ff 0f 57 c0 xorps xmm0, xmm0 - 00702 66 89 41 f8 mov WORD PTR [rcx-8], ax - -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); - - 00706 0f b7 41 fa movzx eax, WORD PTR [rcx-6] - 0070a f3 0f 2a c0 cvtsi2ss xmm0, eax - 0070e f3 0f 59 c2 mulss xmm0, xmm2 - 00712 f3 0f 58 c1 addss xmm0, xmm1 - 00716 f3 0f 2c c0 cvttss2si eax, xmm0 - 0071a 66 89 41 fa mov WORD PTR [rcx-6], ax -$LN211@stbi__psd_: - -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { - - 0071e 44 0f b7 49 04 movzx r9d, WORD PTR [rcx+4] - 00723 41 8d 41 ff lea eax, DWORD PTR [r9-1] - 00727 66 41 3b c3 cmp ax, r11w - 0072b 77 6d ja SHORT $LN212@stbi__psd_ - -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); - - 0072d 0f b7 41 fe movzx eax, WORD PTR [rcx-2] - 00731 0f 57 c0 xorps xmm0, xmm0 - 00734 f3 41 0f 2a c1 cvtsi2ss xmm0, r9d - 00739 0f 28 d4 movaps xmm2, xmm4 - 0073c 0f 28 cc movaps xmm1, xmm4 - 0073f f3 0f 5e c3 divss xmm0, xmm3 - 00743 f3 0f 5e d0 divss xmm2, xmm0 - 00747 0f 57 c0 xorps xmm0, xmm0 - 0074a f3 0f 2a c0 cvtsi2ss xmm0, eax - 0074e f3 0f 5c ca subss xmm1, xmm2 - 00752 f3 0f 59 c2 mulss xmm0, xmm2 - 00756 f3 0f 59 cb mulss xmm1, xmm3 - 0075a f3 0f 58 c1 addss xmm0, xmm1 - 0075e f3 0f 2c c0 cvttss2si eax, xmm0 - 00762 0f 57 c0 xorps xmm0, xmm0 - 00765 66 89 41 fe mov WORD PTR [rcx-2], ax - -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); - - 00769 0f b7 01 movzx eax, WORD PTR [rcx] - 0076c f3 0f 2a c0 cvtsi2ss xmm0, eax - 00770 f3 0f 59 c2 mulss xmm0, xmm2 - 00774 f3 0f 58 c1 addss xmm0, xmm1 - 00778 f3 0f 2c c0 cvttss2si eax, xmm0 - 0077c 0f 57 c0 xorps xmm0, xmm0 - 0077f 66 89 01 mov WORD PTR [rcx], ax - -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); - - 00782 0f b7 41 02 movzx eax, WORD PTR [rcx+2] - 00786 f3 0f 2a c0 cvtsi2ss xmm0, eax - 0078a f3 0f 59 c2 mulss xmm0, xmm2 - 0078e f3 0f 58 c1 addss xmm0, xmm1 - 00792 f3 0f 2c c0 cvttss2si eax, xmm0 - 00796 66 89 41 02 mov WORD PTR [rcx+2], ax -$LN212@stbi__psd_: - -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { - - 0079a 44 0f b7 49 0c movzx r9d, WORD PTR [rcx+12] - 0079f 41 8d 41 ff lea eax, DWORD PTR [r9-1] - 007a3 66 41 3b c3 cmp ax, r11w - 007a7 77 6f ja SHORT $LN213@stbi__psd_ - -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); - - 007a9 0f b7 41 06 movzx eax, WORD PTR [rcx+6] - 007ad 0f 57 c0 xorps xmm0, xmm0 - 007b0 f3 41 0f 2a c1 cvtsi2ss xmm0, r9d - 007b5 0f 28 d4 movaps xmm2, xmm4 - 007b8 0f 28 cc movaps xmm1, xmm4 - 007bb f3 0f 5e c3 divss xmm0, xmm3 - 007bf f3 0f 5e d0 divss xmm2, xmm0 - 007c3 0f 57 c0 xorps xmm0, xmm0 - 007c6 f3 0f 2a c0 cvtsi2ss xmm0, eax - 007ca f3 0f 5c ca subss xmm1, xmm2 - 007ce f3 0f 59 c2 mulss xmm0, xmm2 - 007d2 f3 0f 59 cb mulss xmm1, xmm3 - 007d6 f3 0f 58 c1 addss xmm0, xmm1 - 007da f3 0f 2c c0 cvttss2si eax, xmm0 - 007de 0f 57 c0 xorps xmm0, xmm0 - 007e1 66 89 41 06 mov WORD PTR [rcx+6], ax - -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); - - 007e5 0f b7 41 08 movzx eax, WORD PTR [rcx+8] - 007e9 f3 0f 2a c0 cvtsi2ss xmm0, eax - 007ed f3 0f 59 c2 mulss xmm0, xmm2 - 007f1 f3 0f 58 c1 addss xmm0, xmm1 - 007f5 f3 0f 2c c0 cvttss2si eax, xmm0 - 007f9 0f 57 c0 xorps xmm0, xmm0 - 007fc 66 89 41 08 mov WORD PTR [rcx+8], ax - -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); - - 00800 0f b7 41 0a movzx eax, WORD PTR [rcx+10] - 00804 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00808 f3 0f 59 c2 mulss xmm0, xmm2 - 0080c f3 0f 58 c1 addss xmm0, xmm1 - 00810 f3 0f 2c c0 cvttss2si eax, xmm0 - 00814 66 89 41 0a mov WORD PTR [rcx+10], ax -$LN213@stbi__psd_: - -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { - - 00818 44 0f b7 49 14 movzx r9d, WORD PTR [rcx+20] - 0081d 41 8d 41 ff lea eax, DWORD PTR [r9-1] - 00821 66 41 3b c3 cmp ax, r11w - 00825 77 6f ja SHORT $LN214@stbi__psd_ - -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); - - 00827 0f b7 41 0e movzx eax, WORD PTR [rcx+14] - 0082b 0f 57 c0 xorps xmm0, xmm0 - 0082e f3 41 0f 2a c1 cvtsi2ss xmm0, r9d - 00833 0f 28 d4 movaps xmm2, xmm4 - 00836 0f 28 cc movaps xmm1, xmm4 - 00839 f3 0f 5e c3 divss xmm0, xmm3 - 0083d f3 0f 5e d0 divss xmm2, xmm0 - 00841 0f 57 c0 xorps xmm0, xmm0 - 00844 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00848 f3 0f 5c ca subss xmm1, xmm2 - 0084c f3 0f 59 c2 mulss xmm0, xmm2 - 00850 f3 0f 59 cb mulss xmm1, xmm3 - 00854 f3 0f 58 c1 addss xmm0, xmm1 - 00858 f3 0f 2c c0 cvttss2si eax, xmm0 - 0085c 0f 57 c0 xorps xmm0, xmm0 - 0085f 66 89 41 0e mov WORD PTR [rcx+14], ax - -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); - - 00863 0f b7 41 10 movzx eax, WORD PTR [rcx+16] - 00867 f3 0f 2a c0 cvtsi2ss xmm0, eax - 0086b f3 0f 59 c2 mulss xmm0, xmm2 - 0086f f3 0f 58 c1 addss xmm0, xmm1 - 00873 f3 0f 2c c0 cvttss2si eax, xmm0 - 00877 0f 57 c0 xorps xmm0, xmm0 - 0087a 66 89 41 10 mov WORD PTR [rcx+16], ax - -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); - - 0087e 0f b7 41 12 movzx eax, WORD PTR [rcx+18] - 00882 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00886 f3 0f 59 c2 mulss xmm0, xmm2 - 0088a f3 0f 58 c1 addss xmm0, xmm1 - 0088e f3 0f 2c c0 cvttss2si eax, xmm0 - 00892 66 89 41 12 mov WORD PTR [rcx+18], ax -$LN214@stbi__psd_: - 00896 48 83 c1 20 add rcx, 32 ; 00000020H - 0089a 49 83 e8 01 sub r8, 1 - 0089e 0f 85 fc fd ff - ff jne $LL215@stbi__psd_ -$LC210@stbi__psd_: - -; 5832 : for (i = 0; i < w * h; ++i) { - - 008a4 4c 3b ea cmp r13, rdx - 008a7 0f 8d 5f 03 00 - 00 jge $LN216@stbi__psd_ - 008ad 4a 8d 0c ed 02 - 00 00 00 lea rcx, QWORD PTR [r13*8+2] - 008b5 49 03 cc add rcx, r12 - 008b8 49 2b d5 sub rdx, r13 + 00510 48 83 fa 04 cmp rdx, 4 + 00514 0f 8c 2a 02 00 + 00 jl $LC180@stbi__psd_ + 0051a 4c 8d 42 fc lea r8, QWORD PTR [rdx-4] + 0051e 49 c1 e8 02 shr r8, 2 + 00522 49 8d 4c 24 0a lea rcx, QWORD PTR [r12+10] + 00527 49 ff c0 inc r8 + 0052a 4a 8d 34 85 00 + 00 00 00 lea rsi, QWORD PTR [r8*4] + 00532 0f 1f 40 00 66 + 66 0f 1f 84 00 + 00 00 00 00 npad 14 +$LL185@stbi__psd_: +; Line 5834 + 00540 44 0f b7 49 fc movzx r9d, WORD PTR [rcx-4] + 00545 41 8d 41 ff lea eax, DWORD PTR [r9-1] + 00549 66 41 3b c3 cmp ax, r11w + 0054d 77 6f ja SHORT $LN181@stbi__psd_ +; Line 5838 + 0054f 0f b7 41 f6 movzx eax, WORD PTR [rcx-10] + 00553 0f 57 c0 xorps xmm0, xmm0 + 00556 f3 41 0f 2a c1 cvtsi2ss xmm0, r9d + 0055b 0f 28 d4 movaps xmm2, xmm4 + 0055e 0f 28 cc movaps xmm1, xmm4 + 00561 f3 0f 5e c3 divss xmm0, xmm3 + 00565 f3 0f 5e d0 divss xmm2, xmm0 + 00569 0f 57 c0 xorps xmm0, xmm0 + 0056c f3 0f 2a c0 cvtsi2ss xmm0, eax + 00570 f3 0f 5c ca subss xmm1, xmm2 + 00574 f3 0f 59 c2 mulss xmm0, xmm2 + 00578 f3 0f 59 cb mulss xmm1, xmm3 + 0057c f3 0f 58 c1 addss xmm0, xmm1 + 00580 f3 0f 2c c0 cvttss2si eax, xmm0 + 00584 0f 57 c0 xorps xmm0, xmm0 + 00587 66 89 41 f6 mov WORD PTR [rcx-10], ax +; Line 5839 + 0058b 0f b7 41 f8 movzx eax, WORD PTR [rcx-8] + 0058f f3 0f 2a c0 cvtsi2ss xmm0, eax + 00593 f3 0f 59 c2 mulss xmm0, xmm2 + 00597 f3 0f 58 c1 addss xmm0, xmm1 + 0059b f3 0f 2c c0 cvttss2si eax, xmm0 + 0059f 0f 57 c0 xorps xmm0, xmm0 + 005a2 66 89 41 f8 mov WORD PTR [rcx-8], ax +; Line 5840 + 005a6 0f b7 41 fa movzx eax, WORD PTR [rcx-6] + 005aa f3 0f 2a c0 cvtsi2ss xmm0, eax + 005ae f3 0f 59 c2 mulss xmm0, xmm2 + 005b2 f3 0f 58 c1 addss xmm0, xmm1 + 005b6 f3 0f 2c c0 cvttss2si eax, xmm0 + 005ba 66 89 41 fa mov WORD PTR [rcx-6], ax +$LN181@stbi__psd_: +; Line 5834 + 005be 44 0f b7 49 04 movzx r9d, WORD PTR [rcx+4] + 005c3 41 8d 41 ff lea eax, DWORD PTR [r9-1] + 005c7 66 41 3b c3 cmp ax, r11w + 005cb 77 6d ja SHORT $LN182@stbi__psd_ +; Line 5838 + 005cd 0f b7 41 fe movzx eax, WORD PTR [rcx-2] + 005d1 0f 57 c0 xorps xmm0, xmm0 + 005d4 f3 41 0f 2a c1 cvtsi2ss xmm0, r9d + 005d9 0f 28 d4 movaps xmm2, xmm4 + 005dc 0f 28 cc movaps xmm1, xmm4 + 005df f3 0f 5e c3 divss xmm0, xmm3 + 005e3 f3 0f 5e d0 divss xmm2, xmm0 + 005e7 0f 57 c0 xorps xmm0, xmm0 + 005ea f3 0f 2a c0 cvtsi2ss xmm0, eax + 005ee f3 0f 5c ca subss xmm1, xmm2 + 005f2 f3 0f 59 c2 mulss xmm0, xmm2 + 005f6 f3 0f 59 cb mulss xmm1, xmm3 + 005fa f3 0f 58 c1 addss xmm0, xmm1 + 005fe f3 0f 2c c0 cvttss2si eax, xmm0 + 00602 0f 57 c0 xorps xmm0, xmm0 + 00605 66 89 41 fe mov WORD PTR [rcx-2], ax +; Line 5839 + 00609 0f b7 01 movzx eax, WORD PTR [rcx] + 0060c f3 0f 2a c0 cvtsi2ss xmm0, eax + 00610 f3 0f 59 c2 mulss xmm0, xmm2 + 00614 f3 0f 58 c1 addss xmm0, xmm1 + 00618 f3 0f 2c c0 cvttss2si eax, xmm0 + 0061c 0f 57 c0 xorps xmm0, xmm0 + 0061f 66 89 01 mov WORD PTR [rcx], ax +; Line 5840 + 00622 0f b7 41 02 movzx eax, WORD PTR [rcx+2] + 00626 f3 0f 2a c0 cvtsi2ss xmm0, eax + 0062a f3 0f 59 c2 mulss xmm0, xmm2 + 0062e f3 0f 58 c1 addss xmm0, xmm1 + 00632 f3 0f 2c c0 cvttss2si eax, xmm0 + 00636 66 89 41 02 mov WORD PTR [rcx+2], ax +$LN182@stbi__psd_: +; Line 5834 + 0063a 44 0f b7 49 0c movzx r9d, WORD PTR [rcx+12] + 0063f 41 8d 41 ff lea eax, DWORD PTR [r9-1] + 00643 66 41 3b c3 cmp ax, r11w + 00647 77 6f ja SHORT $LN183@stbi__psd_ +; Line 5838 + 00649 0f b7 41 06 movzx eax, WORD PTR [rcx+6] + 0064d 0f 57 c0 xorps xmm0, xmm0 + 00650 f3 41 0f 2a c1 cvtsi2ss xmm0, r9d + 00655 0f 28 d4 movaps xmm2, xmm4 + 00658 0f 28 cc movaps xmm1, xmm4 + 0065b f3 0f 5e c3 divss xmm0, xmm3 + 0065f f3 0f 5e d0 divss xmm2, xmm0 + 00663 0f 57 c0 xorps xmm0, xmm0 + 00666 f3 0f 2a c0 cvtsi2ss xmm0, eax + 0066a f3 0f 5c ca subss xmm1, xmm2 + 0066e f3 0f 59 c2 mulss xmm0, xmm2 + 00672 f3 0f 59 cb mulss xmm1, xmm3 + 00676 f3 0f 58 c1 addss xmm0, xmm1 + 0067a f3 0f 2c c0 cvttss2si eax, xmm0 + 0067e 0f 57 c0 xorps xmm0, xmm0 + 00681 66 89 41 06 mov WORD PTR [rcx+6], ax +; Line 5839 + 00685 0f b7 41 08 movzx eax, WORD PTR [rcx+8] + 00689 f3 0f 2a c0 cvtsi2ss xmm0, eax + 0068d f3 0f 59 c2 mulss xmm0, xmm2 + 00691 f3 0f 58 c1 addss xmm0, xmm1 + 00695 f3 0f 2c c0 cvttss2si eax, xmm0 + 00699 0f 57 c0 xorps xmm0, xmm0 + 0069c 66 89 41 08 mov WORD PTR [rcx+8], ax +; Line 5840 + 006a0 0f b7 41 0a movzx eax, WORD PTR [rcx+10] + 006a4 f3 0f 2a c0 cvtsi2ss xmm0, eax + 006a8 f3 0f 59 c2 mulss xmm0, xmm2 + 006ac f3 0f 58 c1 addss xmm0, xmm1 + 006b0 f3 0f 2c c0 cvttss2si eax, xmm0 + 006b4 66 89 41 0a mov WORD PTR [rcx+10], ax +$LN183@stbi__psd_: +; Line 5834 + 006b8 44 0f b7 49 14 movzx r9d, WORD PTR [rcx+20] + 006bd 41 8d 41 ff lea eax, DWORD PTR [r9-1] + 006c1 66 41 3b c3 cmp ax, r11w + 006c5 77 6f ja SHORT $LN184@stbi__psd_ +; Line 5838 + 006c7 0f b7 41 0e movzx eax, WORD PTR [rcx+14] + 006cb 0f 57 c0 xorps xmm0, xmm0 + 006ce f3 41 0f 2a c1 cvtsi2ss xmm0, r9d + 006d3 0f 28 d4 movaps xmm2, xmm4 + 006d6 0f 28 cc movaps xmm1, xmm4 + 006d9 f3 0f 5e c3 divss xmm0, xmm3 + 006dd f3 0f 5e d0 divss xmm2, xmm0 + 006e1 0f 57 c0 xorps xmm0, xmm0 + 006e4 f3 0f 2a c0 cvtsi2ss xmm0, eax + 006e8 f3 0f 5c ca subss xmm1, xmm2 + 006ec f3 0f 59 c2 mulss xmm0, xmm2 + 006f0 f3 0f 59 cb mulss xmm1, xmm3 + 006f4 f3 0f 58 c1 addss xmm0, xmm1 + 006f8 f3 0f 2c c0 cvttss2si eax, xmm0 + 006fc 0f 57 c0 xorps xmm0, xmm0 + 006ff 66 89 41 0e mov WORD PTR [rcx+14], ax +; Line 5839 + 00703 0f b7 41 10 movzx eax, WORD PTR [rcx+16] + 00707 f3 0f 2a c0 cvtsi2ss xmm0, eax + 0070b f3 0f 59 c2 mulss xmm0, xmm2 + 0070f f3 0f 58 c1 addss xmm0, xmm1 + 00713 f3 0f 2c c0 cvttss2si eax, xmm0 + 00717 0f 57 c0 xorps xmm0, xmm0 + 0071a 66 89 41 10 mov WORD PTR [rcx+16], ax +; Line 5840 + 0071e 0f b7 41 12 movzx eax, WORD PTR [rcx+18] + 00722 f3 0f 2a c0 cvtsi2ss xmm0, eax + 00726 f3 0f 59 c2 mulss xmm0, xmm2 + 0072a f3 0f 58 c1 addss xmm0, xmm1 + 0072e f3 0f 2c c0 cvttss2si eax, xmm0 + 00732 66 89 41 12 mov WORD PTR [rcx+18], ax +$LN184@stbi__psd_: + 00736 48 83 c1 20 add rcx, 32 ; 00000020H + 0073a 49 83 e8 01 sub r8, 1 + 0073e 0f 85 fc fd ff + ff jne $LL185@stbi__psd_ +$LC180@stbi__psd_: +; Line 5832 + 00744 48 3b f2 cmp rsi, rdx + 00747 0f 8d 5f 03 00 + 00 jge $LN186@stbi__psd_ + 0074d 48 8d 0c f5 02 + 00 00 00 lea rcx, QWORD PTR [rsi*8+2] + 00755 49 03 cc add rcx, r12 + 00758 48 2b d6 sub rdx, rsi $LC28@stbi__psd_: - -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { - - 008bb 44 0f b7 41 04 movzx r8d, WORD PTR [rcx+4] - 008c0 41 8d 40 ff lea eax, DWORD PTR [r8-1] - 008c4 66 41 3b c3 cmp ax, r11w - 008c8 77 6d ja SHORT $LN26@stbi__psd_ - -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); - - 008ca 0f b7 41 fe movzx eax, WORD PTR [rcx-2] - 008ce 0f 57 c0 xorps xmm0, xmm0 - 008d1 f3 41 0f 2a c0 cvtsi2ss xmm0, r8d - 008d6 0f 28 d4 movaps xmm2, xmm4 - 008d9 0f 28 cc movaps xmm1, xmm4 - 008dc f3 0f 5e c3 divss xmm0, xmm3 - 008e0 f3 0f 5e d0 divss xmm2, xmm0 - 008e4 0f 57 c0 xorps xmm0, xmm0 - 008e7 f3 0f 2a c0 cvtsi2ss xmm0, eax - 008eb f3 0f 5c ca subss xmm1, xmm2 - 008ef f3 0f 59 c2 mulss xmm0, xmm2 - 008f3 f3 0f 59 cb mulss xmm1, xmm3 - 008f7 f3 0f 58 c1 addss xmm0, xmm1 - 008fb f3 0f 2c c0 cvttss2si eax, xmm0 - 008ff 0f 57 c0 xorps xmm0, xmm0 - 00902 66 89 41 fe mov WORD PTR [rcx-2], ax - -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); - - 00906 0f b7 01 movzx eax, WORD PTR [rcx] - 00909 f3 0f 2a c0 cvtsi2ss xmm0, eax - 0090d f3 0f 59 c2 mulss xmm0, xmm2 - 00911 f3 0f 58 c1 addss xmm0, xmm1 - 00915 f3 0f 2c c0 cvttss2si eax, xmm0 - 00919 0f 57 c0 xorps xmm0, xmm0 - 0091c 66 89 01 mov WORD PTR [rcx], ax - -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); - - 0091f 0f b7 41 02 movzx eax, WORD PTR [rcx+2] - 00923 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00927 f3 0f 59 c2 mulss xmm0, xmm2 - 0092b f3 0f 58 c1 addss xmm0, xmm1 - 0092f f3 0f 2c c0 cvttss2si eax, xmm0 - 00933 66 89 41 02 mov WORD PTR [rcx+2], ax +; Line 5834 + 0075b 44 0f b7 41 04 movzx r8d, WORD PTR [rcx+4] + 00760 41 8d 40 ff lea eax, DWORD PTR [r8-1] + 00764 66 41 3b c3 cmp ax, r11w + 00768 77 6d ja SHORT $LN26@stbi__psd_ +; Line 5838 + 0076a 0f b7 41 fe movzx eax, WORD PTR [rcx-2] + 0076e 0f 57 c0 xorps xmm0, xmm0 + 00771 f3 41 0f 2a c0 cvtsi2ss xmm0, r8d + 00776 0f 28 d4 movaps xmm2, xmm4 + 00779 0f 28 cc movaps xmm1, xmm4 + 0077c f3 0f 5e c3 divss xmm0, xmm3 + 00780 f3 0f 5e d0 divss xmm2, xmm0 + 00784 0f 57 c0 xorps xmm0, xmm0 + 00787 f3 0f 2a c0 cvtsi2ss xmm0, eax + 0078b f3 0f 5c ca subss xmm1, xmm2 + 0078f f3 0f 59 c2 mulss xmm0, xmm2 + 00793 f3 0f 59 cb mulss xmm1, xmm3 + 00797 f3 0f 58 c1 addss xmm0, xmm1 + 0079b f3 0f 2c c0 cvttss2si eax, xmm0 + 0079f 0f 57 c0 xorps xmm0, xmm0 + 007a2 66 89 41 fe mov WORD PTR [rcx-2], ax +; Line 5839 + 007a6 0f b7 01 movzx eax, WORD PTR [rcx] + 007a9 f3 0f 2a c0 cvtsi2ss xmm0, eax + 007ad f3 0f 59 c2 mulss xmm0, xmm2 + 007b1 f3 0f 58 c1 addss xmm0, xmm1 + 007b5 f3 0f 2c c0 cvttss2si eax, xmm0 + 007b9 0f 57 c0 xorps xmm0, xmm0 + 007bc 66 89 01 mov WORD PTR [rcx], ax +; Line 5840 + 007bf 0f b7 41 02 movzx eax, WORD PTR [rcx+2] + 007c3 f3 0f 2a c0 cvtsi2ss xmm0, eax + 007c7 f3 0f 59 c2 mulss xmm0, xmm2 + 007cb f3 0f 58 c1 addss xmm0, xmm1 + 007cf f3 0f 2c c0 cvttss2si eax, xmm0 + 007d3 66 89 41 02 mov WORD PTR [rcx+2], ax $LN26@stbi__psd_: - -; 5832 : for (i = 0; i < w * h; ++i) { - - 00937 48 83 c1 08 add rcx, 8 - 0093b 48 83 ea 01 sub rdx, 1 - 0093f 0f 85 76 ff ff +; Line 5832 + 007d7 48 83 c1 08 add rcx, 8 + 007db 48 83 ea 01 sub rdx, 1 + 007df 0f 85 76 ff ff ff jne $LC28@stbi__psd_ - -; 5841 : } -; 5842 : } -; 5843 : } - - 00945 e9 c2 02 00 00 jmp $LN216@stbi__psd_ +; Line 5843 + 007e5 e9 c2 02 00 00 jmp $LN186@stbi__psd_ $LN59@stbi__psd_: - -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { - - 0094a f3 0f 10 1d 00 +; Line 5845 + 007ea f3 0f 10 1d 00 00 00 00 movss xmm3, DWORD PTR __real@3f800000 - 00952 f3 0f 10 25 00 + 007f2 f3 0f 10 25 00 00 00 00 movss xmm4, DWORD PTR __real@437f0000 - 0095a 48 83 fa 04 cmp rdx, 4 - 0095e 0f 8c 0c 02 00 - 00 jl $LC217@stbi__psd_ - 00964 4c 8d 42 fc lea r8, QWORD PTR [rdx-4] - 00968 49 c1 e8 02 shr r8, 2 - 0096c 49 8d 4c 24 05 lea rcx, QWORD PTR [r12+5] - 00971 49 ff c0 inc r8 - 00974 4e 8d 2c 85 00 - 00 00 00 lea r13, QWORD PTR [r8*4] - 0097c 0f 1f 40 00 npad 4 -$LL222@stbi__psd_: - -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { - - 00980 44 0f b6 49 fe movzx r9d, BYTE PTR [rcx-2] - 00985 41 8d 41 ff lea eax, DWORD PTR [r9-1] - 00989 3c fd cmp al, 253 ; 000000fdH - 0098b 77 6c ja SHORT $LN218@stbi__psd_ - -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); - - 0098d 0f b6 41 fb movzx eax, BYTE PTR [rcx-5] - 00991 0f 57 c0 xorps xmm0, xmm0 - 00994 f3 41 0f 2a c1 cvtsi2ss xmm0, r9d - 00999 0f 28 d3 movaps xmm2, xmm3 - 0099c 0f 28 cb movaps xmm1, xmm3 - 0099f f3 0f 5e c4 divss xmm0, xmm4 - 009a3 f3 0f 5e d0 divss xmm2, xmm0 - 009a7 0f 57 c0 xorps xmm0, xmm0 - 009aa f3 0f 2a c0 cvtsi2ss xmm0, eax - 009ae f3 0f 5c ca subss xmm1, xmm2 - 009b2 f3 0f 59 c2 mulss xmm0, xmm2 - 009b6 f3 0f 59 cc mulss xmm1, xmm4 - 009ba f3 0f 58 c1 addss xmm0, xmm1 - 009be f3 0f 2c c0 cvttss2si eax, xmm0 - 009c2 0f 57 c0 xorps xmm0, xmm0 - 009c5 88 41 fb mov BYTE PTR [rcx-5], al - -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); - - 009c8 0f b6 41 fc movzx eax, BYTE PTR [rcx-4] - 009cc f3 0f 2a c0 cvtsi2ss xmm0, eax - 009d0 f3 0f 59 c2 mulss xmm0, xmm2 - 009d4 f3 0f 58 c1 addss xmm0, xmm1 - 009d8 f3 0f 2c c0 cvttss2si eax, xmm0 - 009dc 0f 57 c0 xorps xmm0, xmm0 - 009df 88 41 fc mov BYTE PTR [rcx-4], al - -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); - - 009e2 0f b6 41 fd movzx eax, BYTE PTR [rcx-3] - 009e6 f3 0f 2a c0 cvtsi2ss xmm0, eax - 009ea f3 0f 59 c2 mulss xmm0, xmm2 - 009ee f3 0f 58 c1 addss xmm0, xmm1 - 009f2 f3 0f 2c c0 cvttss2si eax, xmm0 - 009f6 88 41 fd mov BYTE PTR [rcx-3], al -$LN218@stbi__psd_: - -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { - - 009f9 44 0f b6 49 02 movzx r9d, BYTE PTR [rcx+2] - 009fe 41 8d 41 ff lea eax, DWORD PTR [r9-1] - 00a02 3c fd cmp al, 253 ; 000000fdH - 00a04 77 6a ja SHORT $LN219@stbi__psd_ - -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); - - 00a06 0f b6 41 ff movzx eax, BYTE PTR [rcx-1] - 00a0a 0f 57 c0 xorps xmm0, xmm0 - 00a0d f3 41 0f 2a c1 cvtsi2ss xmm0, r9d - 00a12 0f 28 d3 movaps xmm2, xmm3 - 00a15 0f 28 cb movaps xmm1, xmm3 - 00a18 f3 0f 5e c4 divss xmm0, xmm4 - 00a1c f3 0f 5e d0 divss xmm2, xmm0 - 00a20 0f 57 c0 xorps xmm0, xmm0 - 00a23 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00a27 f3 0f 5c ca subss xmm1, xmm2 - 00a2b f3 0f 59 c2 mulss xmm0, xmm2 - 00a2f f3 0f 59 cc mulss xmm1, xmm4 - 00a33 f3 0f 58 c1 addss xmm0, xmm1 - 00a37 f3 0f 2c c0 cvttss2si eax, xmm0 - 00a3b 0f 57 c0 xorps xmm0, xmm0 - 00a3e 88 41 ff mov BYTE PTR [rcx-1], al - -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); - - 00a41 0f b6 01 movzx eax, BYTE PTR [rcx] - 00a44 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00a48 f3 0f 59 c2 mulss xmm0, xmm2 - 00a4c f3 0f 58 c1 addss xmm0, xmm1 - 00a50 f3 0f 2c c0 cvttss2si eax, xmm0 - 00a54 0f 57 c0 xorps xmm0, xmm0 - 00a57 88 01 mov BYTE PTR [rcx], al - -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); - - 00a59 0f b6 41 01 movzx eax, BYTE PTR [rcx+1] - 00a5d f3 0f 2a c0 cvtsi2ss xmm0, eax - 00a61 f3 0f 59 c2 mulss xmm0, xmm2 - 00a65 f3 0f 58 c1 addss xmm0, xmm1 - 00a69 f3 0f 2c c0 cvttss2si eax, xmm0 - 00a6d 88 41 01 mov BYTE PTR [rcx+1], al -$LN219@stbi__psd_: - -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { - - 00a70 44 0f b6 49 06 movzx r9d, BYTE PTR [rcx+6] - 00a75 41 8d 41 ff lea eax, DWORD PTR [r9-1] - 00a79 3c fd cmp al, 253 ; 000000fdH - 00a7b 77 6c ja SHORT $LN220@stbi__psd_ - -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); - - 00a7d 0f b6 41 03 movzx eax, BYTE PTR [rcx+3] - 00a81 0f 57 c0 xorps xmm0, xmm0 - 00a84 f3 41 0f 2a c1 cvtsi2ss xmm0, r9d - 00a89 0f 28 d3 movaps xmm2, xmm3 - 00a8c 0f 28 cb movaps xmm1, xmm3 - 00a8f f3 0f 5e c4 divss xmm0, xmm4 - 00a93 f3 0f 5e d0 divss xmm2, xmm0 - 00a97 0f 57 c0 xorps xmm0, xmm0 - 00a9a f3 0f 2a c0 cvtsi2ss xmm0, eax - 00a9e f3 0f 5c ca subss xmm1, xmm2 - 00aa2 f3 0f 59 c2 mulss xmm0, xmm2 - 00aa6 f3 0f 59 cc mulss xmm1, xmm4 - 00aaa f3 0f 58 c1 addss xmm0, xmm1 - 00aae f3 0f 2c c0 cvttss2si eax, xmm0 - 00ab2 0f 57 c0 xorps xmm0, xmm0 - 00ab5 88 41 03 mov BYTE PTR [rcx+3], al - -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); - - 00ab8 0f b6 41 04 movzx eax, BYTE PTR [rcx+4] - 00abc f3 0f 2a c0 cvtsi2ss xmm0, eax - 00ac0 f3 0f 59 c2 mulss xmm0, xmm2 - 00ac4 f3 0f 58 c1 addss xmm0, xmm1 - 00ac8 f3 0f 2c c0 cvttss2si eax, xmm0 - 00acc 0f 57 c0 xorps xmm0, xmm0 - 00acf 88 41 04 mov BYTE PTR [rcx+4], al - -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); - - 00ad2 0f b6 41 05 movzx eax, BYTE PTR [rcx+5] - 00ad6 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00ada f3 0f 59 c2 mulss xmm0, xmm2 - 00ade f3 0f 58 c1 addss xmm0, xmm1 - 00ae2 f3 0f 2c c0 cvttss2si eax, xmm0 - 00ae6 88 41 05 mov BYTE PTR [rcx+5], al -$LN220@stbi__psd_: - -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { - - 00ae9 44 0f b6 49 0a movzx r9d, BYTE PTR [rcx+10] - 00aee 41 8d 41 ff lea eax, DWORD PTR [r9-1] - 00af2 3c fd cmp al, 253 ; 000000fdH - 00af4 77 6c ja SHORT $LN221@stbi__psd_ - -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); - - 00af6 0f b6 41 07 movzx eax, BYTE PTR [rcx+7] - 00afa 0f 57 c0 xorps xmm0, xmm0 - 00afd f3 41 0f 2a c1 cvtsi2ss xmm0, r9d - 00b02 0f 28 d3 movaps xmm2, xmm3 - 00b05 0f 28 cb movaps xmm1, xmm3 - 00b08 f3 0f 5e c4 divss xmm0, xmm4 - 00b0c f3 0f 5e d0 divss xmm2, xmm0 - 00b10 0f 57 c0 xorps xmm0, xmm0 - 00b13 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00b17 f3 0f 5c ca subss xmm1, xmm2 - 00b1b f3 0f 59 c2 mulss xmm0, xmm2 - 00b1f f3 0f 59 cc mulss xmm1, xmm4 - 00b23 f3 0f 58 c1 addss xmm0, xmm1 - 00b27 f3 0f 2c c0 cvttss2si eax, xmm0 - 00b2b 0f 57 c0 xorps xmm0, xmm0 - 00b2e 88 41 07 mov BYTE PTR [rcx+7], al - -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); - - 00b31 0f b6 41 08 movzx eax, BYTE PTR [rcx+8] - 00b35 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00b39 f3 0f 59 c2 mulss xmm0, xmm2 - 00b3d f3 0f 58 c1 addss xmm0, xmm1 - 00b41 f3 0f 2c c0 cvttss2si eax, xmm0 - 00b45 0f 57 c0 xorps xmm0, xmm0 - 00b48 88 41 08 mov BYTE PTR [rcx+8], al - -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); - - 00b4b 0f b6 41 09 movzx eax, BYTE PTR [rcx+9] - 00b4f f3 0f 2a c0 cvtsi2ss xmm0, eax - 00b53 f3 0f 59 c2 mulss xmm0, xmm2 - 00b57 f3 0f 58 c1 addss xmm0, xmm1 - 00b5b f3 0f 2c c0 cvttss2si eax, xmm0 - 00b5f 88 41 09 mov BYTE PTR [rcx+9], al -$LN221@stbi__psd_: - 00b62 48 83 c1 10 add rcx, 16 - 00b66 49 83 e8 01 sub r8, 1 - 00b6a 0f 85 10 fe ff - ff jne $LL222@stbi__psd_ -$LC217@stbi__psd_: - -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { - - 00b70 4c 3b ea cmp r13, rdx - 00b73 0f 8d 93 00 00 - 00 jge $LN216@stbi__psd_ - 00b79 4a 8d 0c ad 01 - 00 00 00 lea rcx, QWORD PTR [r13*4+1] - 00b81 49 03 cc add rcx, r12 - 00b84 49 2b d5 sub rdx, r13 + 007fa 48 83 fa 04 cmp rdx, 4 + 007fe 0f 8c 0c 02 00 + 00 jl $LC187@stbi__psd_ + 00804 4c 8d 42 fc lea r8, QWORD PTR [rdx-4] + 00808 49 c1 e8 02 shr r8, 2 + 0080c 49 8d 4c 24 05 lea rcx, QWORD PTR [r12+5] + 00811 49 ff c0 inc r8 + 00814 4a 8d 34 85 00 + 00 00 00 lea rsi, QWORD PTR [r8*4] + 0081c 0f 1f 40 00 npad 4 +$LL192@stbi__psd_: +; Line 5847 + 00820 44 0f b6 49 fe movzx r9d, BYTE PTR [rcx-2] + 00825 41 8d 41 ff lea eax, DWORD PTR [r9-1] + 00829 3c fd cmp al, 253 ; 000000fdH + 0082b 77 6c ja SHORT $LN188@stbi__psd_ +; Line 5851 + 0082d 0f b6 41 fb movzx eax, BYTE PTR [rcx-5] + 00831 0f 57 c0 xorps xmm0, xmm0 + 00834 f3 41 0f 2a c1 cvtsi2ss xmm0, r9d + 00839 0f 28 d3 movaps xmm2, xmm3 + 0083c 0f 28 cb movaps xmm1, xmm3 + 0083f f3 0f 5e c4 divss xmm0, xmm4 + 00843 f3 0f 5e d0 divss xmm2, xmm0 + 00847 0f 57 c0 xorps xmm0, xmm0 + 0084a f3 0f 2a c0 cvtsi2ss xmm0, eax + 0084e f3 0f 5c ca subss xmm1, xmm2 + 00852 f3 0f 59 c2 mulss xmm0, xmm2 + 00856 f3 0f 59 cc mulss xmm1, xmm4 + 0085a f3 0f 58 c1 addss xmm0, xmm1 + 0085e f3 0f 2c c0 cvttss2si eax, xmm0 + 00862 0f 57 c0 xorps xmm0, xmm0 + 00865 88 41 fb mov BYTE PTR [rcx-5], al +; Line 5852 + 00868 0f b6 41 fc movzx eax, BYTE PTR [rcx-4] + 0086c f3 0f 2a c0 cvtsi2ss xmm0, eax + 00870 f3 0f 59 c2 mulss xmm0, xmm2 + 00874 f3 0f 58 c1 addss xmm0, xmm1 + 00878 f3 0f 2c c0 cvttss2si eax, xmm0 + 0087c 0f 57 c0 xorps xmm0, xmm0 + 0087f 88 41 fc mov BYTE PTR [rcx-4], al +; Line 5853 + 00882 0f b6 41 fd movzx eax, BYTE PTR [rcx-3] + 00886 f3 0f 2a c0 cvtsi2ss xmm0, eax + 0088a f3 0f 59 c2 mulss xmm0, xmm2 + 0088e f3 0f 58 c1 addss xmm0, xmm1 + 00892 f3 0f 2c c0 cvttss2si eax, xmm0 + 00896 88 41 fd mov BYTE PTR [rcx-3], al +$LN188@stbi__psd_: +; Line 5847 + 00899 44 0f b6 49 02 movzx r9d, BYTE PTR [rcx+2] + 0089e 41 8d 41 ff lea eax, DWORD PTR [r9-1] + 008a2 3c fd cmp al, 253 ; 000000fdH + 008a4 77 6a ja SHORT $LN189@stbi__psd_ +; Line 5851 + 008a6 0f b6 41 ff movzx eax, BYTE PTR [rcx-1] + 008aa 0f 57 c0 xorps xmm0, xmm0 + 008ad f3 41 0f 2a c1 cvtsi2ss xmm0, r9d + 008b2 0f 28 d3 movaps xmm2, xmm3 + 008b5 0f 28 cb movaps xmm1, xmm3 + 008b8 f3 0f 5e c4 divss xmm0, xmm4 + 008bc f3 0f 5e d0 divss xmm2, xmm0 + 008c0 0f 57 c0 xorps xmm0, xmm0 + 008c3 f3 0f 2a c0 cvtsi2ss xmm0, eax + 008c7 f3 0f 5c ca subss xmm1, xmm2 + 008cb f3 0f 59 c2 mulss xmm0, xmm2 + 008cf f3 0f 59 cc mulss xmm1, xmm4 + 008d3 f3 0f 58 c1 addss xmm0, xmm1 + 008d7 f3 0f 2c c0 cvttss2si eax, xmm0 + 008db 0f 57 c0 xorps xmm0, xmm0 + 008de 88 41 ff mov BYTE PTR [rcx-1], al +; Line 5852 + 008e1 0f b6 01 movzx eax, BYTE PTR [rcx] + 008e4 f3 0f 2a c0 cvtsi2ss xmm0, eax + 008e8 f3 0f 59 c2 mulss xmm0, xmm2 + 008ec f3 0f 58 c1 addss xmm0, xmm1 + 008f0 f3 0f 2c c0 cvttss2si eax, xmm0 + 008f4 0f 57 c0 xorps xmm0, xmm0 + 008f7 88 01 mov BYTE PTR [rcx], al +; Line 5853 + 008f9 0f b6 41 01 movzx eax, BYTE PTR [rcx+1] + 008fd f3 0f 2a c0 cvtsi2ss xmm0, eax + 00901 f3 0f 59 c2 mulss xmm0, xmm2 + 00905 f3 0f 58 c1 addss xmm0, xmm1 + 00909 f3 0f 2c c0 cvttss2si eax, xmm0 + 0090d 88 41 01 mov BYTE PTR [rcx+1], al +$LN189@stbi__psd_: +; Line 5847 + 00910 44 0f b6 49 06 movzx r9d, BYTE PTR [rcx+6] + 00915 41 8d 41 ff lea eax, DWORD PTR [r9-1] + 00919 3c fd cmp al, 253 ; 000000fdH + 0091b 77 6c ja SHORT $LN190@stbi__psd_ +; Line 5851 + 0091d 0f b6 41 03 movzx eax, BYTE PTR [rcx+3] + 00921 0f 57 c0 xorps xmm0, xmm0 + 00924 f3 41 0f 2a c1 cvtsi2ss xmm0, r9d + 00929 0f 28 d3 movaps xmm2, xmm3 + 0092c 0f 28 cb movaps xmm1, xmm3 + 0092f f3 0f 5e c4 divss xmm0, xmm4 + 00933 f3 0f 5e d0 divss xmm2, xmm0 + 00937 0f 57 c0 xorps xmm0, xmm0 + 0093a f3 0f 2a c0 cvtsi2ss xmm0, eax + 0093e f3 0f 5c ca subss xmm1, xmm2 + 00942 f3 0f 59 c2 mulss xmm0, xmm2 + 00946 f3 0f 59 cc mulss xmm1, xmm4 + 0094a f3 0f 58 c1 addss xmm0, xmm1 + 0094e f3 0f 2c c0 cvttss2si eax, xmm0 + 00952 0f 57 c0 xorps xmm0, xmm0 + 00955 88 41 03 mov BYTE PTR [rcx+3], al +; Line 5852 + 00958 0f b6 41 04 movzx eax, BYTE PTR [rcx+4] + 0095c f3 0f 2a c0 cvtsi2ss xmm0, eax + 00960 f3 0f 59 c2 mulss xmm0, xmm2 + 00964 f3 0f 58 c1 addss xmm0, xmm1 + 00968 f3 0f 2c c0 cvttss2si eax, xmm0 + 0096c 0f 57 c0 xorps xmm0, xmm0 + 0096f 88 41 04 mov BYTE PTR [rcx+4], al +; Line 5853 + 00972 0f b6 41 05 movzx eax, BYTE PTR [rcx+5] + 00976 f3 0f 2a c0 cvtsi2ss xmm0, eax + 0097a f3 0f 59 c2 mulss xmm0, xmm2 + 0097e f3 0f 58 c1 addss xmm0, xmm1 + 00982 f3 0f 2c c0 cvttss2si eax, xmm0 + 00986 88 41 05 mov BYTE PTR [rcx+5], al +$LN190@stbi__psd_: +; Line 5847 + 00989 44 0f b6 49 0a movzx r9d, BYTE PTR [rcx+10] + 0098e 41 8d 41 ff lea eax, DWORD PTR [r9-1] + 00992 3c fd cmp al, 253 ; 000000fdH + 00994 77 6c ja SHORT $LN191@stbi__psd_ +; Line 5851 + 00996 0f b6 41 07 movzx eax, BYTE PTR [rcx+7] + 0099a 0f 57 c0 xorps xmm0, xmm0 + 0099d f3 41 0f 2a c1 cvtsi2ss xmm0, r9d + 009a2 0f 28 d3 movaps xmm2, xmm3 + 009a5 0f 28 cb movaps xmm1, xmm3 + 009a8 f3 0f 5e c4 divss xmm0, xmm4 + 009ac f3 0f 5e d0 divss xmm2, xmm0 + 009b0 0f 57 c0 xorps xmm0, xmm0 + 009b3 f3 0f 2a c0 cvtsi2ss xmm0, eax + 009b7 f3 0f 5c ca subss xmm1, xmm2 + 009bb f3 0f 59 c2 mulss xmm0, xmm2 + 009bf f3 0f 59 cc mulss xmm1, xmm4 + 009c3 f3 0f 58 c1 addss xmm0, xmm1 + 009c7 f3 0f 2c c0 cvttss2si eax, xmm0 + 009cb 0f 57 c0 xorps xmm0, xmm0 + 009ce 88 41 07 mov BYTE PTR [rcx+7], al +; Line 5852 + 009d1 0f b6 41 08 movzx eax, BYTE PTR [rcx+8] + 009d5 f3 0f 2a c0 cvtsi2ss xmm0, eax + 009d9 f3 0f 59 c2 mulss xmm0, xmm2 + 009dd f3 0f 58 c1 addss xmm0, xmm1 + 009e1 f3 0f 2c c0 cvttss2si eax, xmm0 + 009e5 0f 57 c0 xorps xmm0, xmm0 + 009e8 88 41 08 mov BYTE PTR [rcx+8], al +; Line 5853 + 009eb 0f b6 41 09 movzx eax, BYTE PTR [rcx+9] + 009ef f3 0f 2a c0 cvtsi2ss xmm0, eax + 009f3 f3 0f 59 c2 mulss xmm0, xmm2 + 009f7 f3 0f 58 c1 addss xmm0, xmm1 + 009fb f3 0f 2c c0 cvttss2si eax, xmm0 + 009ff 88 41 09 mov BYTE PTR [rcx+9], al +$LN191@stbi__psd_: + 00a02 48 83 c1 10 add rcx, 16 + 00a06 49 83 e8 01 sub r8, 1 + 00a0a 0f 85 10 fe ff + ff jne $LL192@stbi__psd_ +$LC187@stbi__psd_: +; Line 5845 + 00a10 48 3b f2 cmp rsi, rdx + 00a13 0f 8d 93 00 00 + 00 jge $LN186@stbi__psd_ + 00a19 48 8d 0c b5 01 + 00 00 00 lea rcx, QWORD PTR [rsi*4+1] + 00a21 49 03 cc add rcx, r12 + 00a24 48 2b d6 sub rdx, rsi $LC31@stbi__psd_: - -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { - - 00b87 44 0f b6 41 02 movzx r8d, BYTE PTR [rcx+2] - 00b8c 41 8d 40 ff lea eax, DWORD PTR [r8-1] - 00b90 3c fd cmp al, 253 ; 000000fdH - 00b92 77 6a ja SHORT $LN29@stbi__psd_ - -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); - - 00b94 0f b6 41 ff movzx eax, BYTE PTR [rcx-1] - 00b98 0f 57 c0 xorps xmm0, xmm0 - 00b9b f3 41 0f 2a c0 cvtsi2ss xmm0, r8d - 00ba0 0f 28 d3 movaps xmm2, xmm3 - 00ba3 0f 28 cb movaps xmm1, xmm3 - 00ba6 f3 0f 5e c4 divss xmm0, xmm4 - 00baa f3 0f 5e d0 divss xmm2, xmm0 - 00bae 0f 57 c0 xorps xmm0, xmm0 - 00bb1 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00bb5 f3 0f 5c ca subss xmm1, xmm2 - 00bb9 f3 0f 59 c2 mulss xmm0, xmm2 - 00bbd f3 0f 59 cc mulss xmm1, xmm4 - 00bc1 f3 0f 58 c1 addss xmm0, xmm1 - 00bc5 f3 0f 2c c0 cvttss2si eax, xmm0 - 00bc9 0f 57 c0 xorps xmm0, xmm0 - 00bcc 88 41 ff mov BYTE PTR [rcx-1], al - -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); - - 00bcf 0f b6 01 movzx eax, BYTE PTR [rcx] - 00bd2 f3 0f 2a c0 cvtsi2ss xmm0, eax - 00bd6 f3 0f 59 c2 mulss xmm0, xmm2 - 00bda f3 0f 58 c1 addss xmm0, xmm1 - 00bde f3 0f 2c c0 cvttss2si eax, xmm0 - 00be2 0f 57 c0 xorps xmm0, xmm0 - 00be5 88 01 mov BYTE PTR [rcx], al - -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); - - 00be7 0f b6 41 01 movzx eax, BYTE PTR [rcx+1] - 00beb f3 0f 2a c0 cvtsi2ss xmm0, eax - 00bef f3 0f 59 c2 mulss xmm0, xmm2 - 00bf3 f3 0f 58 c1 addss xmm0, xmm1 - 00bf7 f3 0f 2c c0 cvttss2si eax, xmm0 - 00bfb 88 41 01 mov BYTE PTR [rcx+1], al +; Line 5847 + 00a27 44 0f b6 41 02 movzx r8d, BYTE PTR [rcx+2] + 00a2c 41 8d 40 ff lea eax, DWORD PTR [r8-1] + 00a30 3c fd cmp al, 253 ; 000000fdH + 00a32 77 6a ja SHORT $LN29@stbi__psd_ +; Line 5851 + 00a34 0f b6 41 ff movzx eax, BYTE PTR [rcx-1] + 00a38 0f 57 c0 xorps xmm0, xmm0 + 00a3b f3 41 0f 2a c0 cvtsi2ss xmm0, r8d + 00a40 0f 28 d3 movaps xmm2, xmm3 + 00a43 0f 28 cb movaps xmm1, xmm3 + 00a46 f3 0f 5e c4 divss xmm0, xmm4 + 00a4a f3 0f 5e d0 divss xmm2, xmm0 + 00a4e 0f 57 c0 xorps xmm0, xmm0 + 00a51 f3 0f 2a c0 cvtsi2ss xmm0, eax + 00a55 f3 0f 5c ca subss xmm1, xmm2 + 00a59 f3 0f 59 c2 mulss xmm0, xmm2 + 00a5d f3 0f 59 cc mulss xmm1, xmm4 + 00a61 f3 0f 58 c1 addss xmm0, xmm1 + 00a65 f3 0f 2c c0 cvttss2si eax, xmm0 + 00a69 0f 57 c0 xorps xmm0, xmm0 + 00a6c 88 41 ff mov BYTE PTR [rcx-1], al +; Line 5852 + 00a6f 0f b6 01 movzx eax, BYTE PTR [rcx] + 00a72 f3 0f 2a c0 cvtsi2ss xmm0, eax + 00a76 f3 0f 59 c2 mulss xmm0, xmm2 + 00a7a f3 0f 58 c1 addss xmm0, xmm1 + 00a7e f3 0f 2c c0 cvttss2si eax, xmm0 + 00a82 0f 57 c0 xorps xmm0, xmm0 + 00a85 88 01 mov BYTE PTR [rcx], al +; Line 5853 + 00a87 0f b6 41 01 movzx eax, BYTE PTR [rcx+1] + 00a8b f3 0f 2a c0 cvtsi2ss xmm0, eax + 00a8f f3 0f 59 c2 mulss xmm0, xmm2 + 00a93 f3 0f 58 c1 addss xmm0, xmm1 + 00a97 f3 0f 2c c0 cvttss2si eax, xmm0 + 00a9b 88 41 01 mov BYTE PTR [rcx+1], al $LN29@stbi__psd_: - -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { - - 00bfe 48 83 c1 04 add rcx, 4 - 00c02 48 83 ea 01 sub rdx, 1 - 00c06 0f 85 7b ff ff +; Line 5845 + 00a9e 48 83 c1 04 add rcx, 4 + 00aa2 48 83 ea 01 sub rdx, 1 + 00aa6 0f 85 7b ff ff ff jne $LC31@stbi__psd_ -$LN216@stbi__psd_: - -; 5854 : } -; 5855 : } -; 5856 : } -; 5857 : } -; 5858 : -; 5859 : // convert to desired output format -; 5860 : if (req_comp && req_comp != 4) { - - 00c0c 44 8b 84 24 b0 +$LN186@stbi__psd_: +; Line 5860 + 00aac 44 8b 84 24 a0 00 00 00 mov r8d, DWORD PTR req_comp$[rsp] - 00c14 41 f7 c0 fb ff + 00ab4 41 f7 c0 fb ff ff ff test r8d, -5 ; fffffffbH - 00c1b 74 2e je SHORT $LN66@stbi__psd_ - -; 5861 : if (ri->bits_per_channel == 16) - - 00c1d 41 83 3a 10 cmp DWORD PTR [r10], 16 - 00c21 45 8b ce mov r9d, r14d - 00c24 44 89 7c 24 20 mov DWORD PTR [rsp+32], r15d - 00c29 ba 04 00 00 00 mov edx, 4 - 00c2e 49 8b cc mov rcx, r12 - 00c31 75 07 jne SHORT $LN64@stbi__psd_ - -; 5862 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h); - - 00c33 e8 00 00 00 00 call stbi__convert_format16 - 00c38 eb 05 jmp SHORT $LN337@stbi__psd_ + 00abb 74 2e je SHORT $LN66@stbi__psd_ +; Line 5861 + 00abd 41 83 3a 10 cmp DWORD PTR [r10], 16 + 00ac1 45 8b ce mov r9d, r14d + 00ac4 44 89 7c 24 20 mov DWORD PTR [rsp+32], r15d + 00ac9 ba 04 00 00 00 mov edx, 4 + 00ace 49 8b cc mov rcx, r12 + 00ad1 75 07 jne SHORT $LN64@stbi__psd_ +; Line 5862 + 00ad3 e8 00 00 00 00 call stbi__convert_format16 + 00ad8 eb 05 jmp SHORT $LN287@stbi__psd_ $LN64@stbi__psd_: - -; 5863 : else -; 5864 : out = stbi__convert_format(out, 4, req_comp, w, h); - - 00c3a e8 00 00 00 00 call stbi__convert_format -$LN337@stbi__psd_: - -; 5865 : if (out == NULL) return out; // stbi__convert_format frees input on failure - - 00c3f 4c 8b e0 mov r12, rax - 00c42 48 85 c0 test rax, rax - 00c45 0f 84 9f f8 ff - ff je $LN338@stbi__psd_ +; Line 5864 + 00ada e8 00 00 00 00 call stbi__convert_format +$LN287@stbi__psd_: +; Line 5865 + 00adf 4c 8b e0 mov r12, rax + 00ae2 48 85 c0 test rax, rax + 00ae5 0f 84 9f f8 ff + ff je $LN288@stbi__psd_ $LN66@stbi__psd_: - -; 5866 : } -; 5867 : -; 5868 : if (comp) *comp = 4; - - 00c4b 48 8b 84 24 a8 +; Line 5868 + 00aeb 48 8b 84 24 98 00 00 00 mov rax, QWORD PTR comp$[rsp] - 00c53 48 85 c0 test rax, rax - 00c56 74 06 je SHORT $LN67@stbi__psd_ - 00c58 c7 00 04 00 00 + 00af3 48 85 c0 test rax, rax + 00af6 74 06 je SHORT $LN67@stbi__psd_ + 00af8 c7 00 04 00 00 00 mov DWORD PTR [rax], 4 $LN67@stbi__psd_: - -; 5869 : *y = h; - - 00c5e 48 8b 84 24 a0 +; Line 5869 + 00afe 48 8b 84 24 90 00 00 00 mov rax, QWORD PTR y$[rsp] - 00c66 44 89 38 mov DWORD PTR [rax], r15d - -; 5870 : *x = w; - - 00c69 48 8b 84 24 98 + 00b06 44 89 38 mov DWORD PTR [rax], r15d +; Line 5870 + 00b09 48 8b 84 24 88 00 00 00 mov rax, QWORD PTR x$[rsp] - 00c71 44 89 30 mov DWORD PTR [rax], r14d - -; 5871 : -; 5872 : return out; - - 00c74 49 8b c4 mov rax, r12 - 00c77 e9 70 f8 ff ff jmp $LN333@stbi__psd_ -$LN240@stbi__psd_: - -; 431 : stbi__g_failure_reason = str; - - 00c7c 8b 15 00 00 00 + 00b11 44 89 30 mov DWORD PTR [rax], r14d +; Line 5872 + 00b14 49 8b c4 mov rax, r12 + 00b17 e9 70 f8 ff ff jmp $LN283@stbi__psd_ +$LN206@stbi__psd_: +; Line 431 + 00b1c 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00c82 65 48 8b 04 25 + 00b22 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00c8b b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00c90 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00c94 48 8d 15 00 00 + 00b2b b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00b30 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00b34 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 00c9b 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 5734 : -; 5735 : // Check size -; 5736 : if (!stbi__mad3sizes_valid(4, w, h, 0)) -; 5737 : return stbi__errpuc("too large", "Corrupt PSD"); - - 00c9f 33 c0 xor eax, eax - 00ca1 e9 58 f8 ff ff jmp $LN330@stbi__psd_ + 00b3b 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 5737 + 00b3f 33 c0 xor eax, eax + 00b41 e9 58 f8 ff ff jmp $LN280@stbi__psd_ $LN35@stbi__psd_: - -; 431 : stbi__g_failure_reason = str; - - 00ca6 8b 15 00 00 00 +; Line 431 + 00b46 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00cac 65 48 8b 04 25 + 00b4c 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00cb5 48 8b 74 24 70 mov rsi, QWORD PTR [rsp+112] - 00cba b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00cbf 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00cc3 48 8d 15 00 00 + 00b55 4c 8b 6c 24 50 mov r13, QWORD PTR [rsp+80] + 00b5a b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00b5f 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00b63 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BE@PJBNGDBE@wrong?5channel?5count@ - 00cca 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 5691 : return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); - - 00cce 33 c0 xor eax, eax - -; 5873 : } - - 00cd0 48 83 c4 78 add rsp, 120 ; 00000078H - 00cd4 5f pop rdi - 00cd5 5b pop rbx - 00cd6 c3 ret 0 + 00b6a 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 5691 + 00b6e 33 c0 xor eax, eax +; Line 5873 + 00b70 48 83 c4 68 add rsp, 104 ; 00000068H + 00b74 5f pop rdi + 00b75 5b pop rbx + 00b76 c3 ret 0 stbi__psd_load ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__pic_is4 _TEXT SEGMENT s$ = 48 str$ = 56 stbi__pic_is4 PROC ; COMDAT - -; 5885 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 5885 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 74 24 10 mov QWORD PTR [rsp+16], rsi 0000a 57 push rdi @@ -49160,36 +31798,26 @@ stbi__pic_is4 PROC ; COMDAT 00017 66 0f 1f 84 00 00 00 00 00 npad 9 $LL4@stbi__pic_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00020 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00027 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0002e 73 0f jae SHORT $LN8@stbi__pic_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00030 0f b6 08 movzx ecx, BYTE PTR [rax] 00033 48 ff c0 inc rax 00036 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0003d eb 26 jmp SHORT $LN7@stbi__pic_ $LN8@stbi__pic_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0003f 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00043 74 1e je SHORT $LN9@stbi__pic_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00045 48 8b cb mov rcx, rbx 00048 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0004d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00054 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -49198,33 +31826,19 @@ $LN8@stbi__pic_: 00 00 mov QWORD PTR [rbx+192], rax 00061 eb 02 jmp SHORT $LN7@stbi__pic_ $LN9@stbi__pic_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00063 32 c9 xor cl, cl $LN7@stbi__pic_: - -; 5888 : if (stbi__get8(s) != (stbi_uc)str[i]) - +; Line 5888 00065 3a 0c 37 cmp cl, BYTE PTR [rdi+rsi] 00068 75 1e jne SHORT $LN12@stbi__pic_ - -; 5886 : int i; -; 5887 : for (i = 0; i < 4; ++i) - +; Line 5887 0006a 48 ff c7 inc rdi 0006d 48 83 ff 04 cmp rdi, 4 00071 7c ad jl SHORT $LL4@stbi__pic_ - -; 5889 : return 0; -; 5890 : -; 5891 : return 1; - +; Line 5891 00073 b8 01 00 00 00 mov eax, 1 - -; 5892 : } - +; Line 5892 00078 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 0007d 48 8b 74 24 38 mov rsi, QWORD PTR [rsp+56] 00082 48 83 c4 20 add rsp, 32 ; 00000020H @@ -49240,24 +31854,18 @@ $LN12@stbi__pic_: stbi__pic_is4 ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__pic_test_core _TEXT SEGMENT s$ = 48 stbi__pic_test_core PROC ; COMDAT - -; 5895 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 5895 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi 0000f 57 push rdi 00010 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 5896 : int i; -; 5897 : -; 5898 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) - +; Line 5898 00014 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_04KBFEPHFH@S?$IA?v4@ 0001b 48 8b d9 mov rbx, rcx @@ -49265,53 +31873,35 @@ stbi__pic_test_core PROC ; COMDAT 00023 85 c0 test eax, eax 00025 0f 84 a7 00 00 00 je $LN32@stbi__pic_ - -; 5899 : return 0; -; 5900 : -; 5901 : for (i = 0; i < 84; ++i) - +; Line 5901 0002b bf 54 00 00 00 mov edi, 84 ; 00000054H $LL4@stbi__pic_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00030 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00037 48 8d 73 30 lea rsi, QWORD PTR [rbx+48] 0003b 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00042 73 0c jae SHORT $LN9@stbi__pic_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00044 48 ff c0 inc rax 00047 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0004e eb 1b jmp SHORT $LN2@stbi__pic_ $LN9@stbi__pic_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00050 83 3e 00 cmp DWORD PTR [rsi], 0 00053 74 16 je SHORT $LN2@stbi__pic_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00055 48 8b cb mov rcx, rbx 00058 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0005d 48 ff 83 c0 00 00 00 inc QWORD PTR [rbx+192] 00064 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN2@stbi__pic_: - -; 5899 : return 0; -; 5900 : -; 5901 : for (i = 0; i < 84; ++i) - +; Line 5901 0006b 48 83 ef 01 sub rdi, 1 0006f 75 bf jne SHORT $LL4@stbi__pic_ 00071 48 8d 2d 00 00 @@ -49319,34 +31909,24 @@ $LN2@stbi__pic_: 00078 0f 1f 84 00 00 00 00 00 npad 8 $LL15@stbi__pic_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00080 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00087 73 0f jae SHORT $LN19@stbi__pic_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00089 0f b6 08 movzx ecx, BYTE PTR [rax] 0008c 48 ff c0 inc rax 0008f 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00096 eb 25 jmp SHORT $LN18@stbi__pic_ $LN19@stbi__pic_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00098 83 3e 00 cmp DWORD PTR [rsi], 0 0009b 74 1e je SHORT $LN20@stbi__pic_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0009d 48 8b cb mov rcx, rbx 000a0 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000a5 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000ac 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -49355,4844 +31935,24 @@ $LN19@stbi__pic_: 00 00 mov QWORD PTR [rbx+192], rax 000b9 eb 02 jmp SHORT $LN18@stbi__pic_ $LN20@stbi__pic_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000bb 32 c9 xor cl, cl $LN18@stbi__pic_: - -; 5888 : if (stbi__get8(s) != (stbi_uc)str[i]) - +; Line 5888 000bd 3a 0c 2f cmp cl, BYTE PTR [rdi+rbp] 000c0 75 10 jne SHORT $LN32@stbi__pic_ - -; 1084 : } -; 1085 : -; 1086 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_HDR) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1087 : // nothing -; 1088 : #else -; 1089 : stbi_inline static int stbi__at_eof(stbi__context* s) -; 1090 : { -; 1091 : if (s->io.read) { -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; -; 1096 : } -; 1097 : -; 1098 : return s->img_buffer >= s->img_buffer_end; -; 1099 : } -; 1100 : #endif -; 1101 : -; 1102 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) -; 1103 : // nothing -; 1104 : #else -; 1105 : static void stbi__skip(stbi__context* s, int n) -; 1106 : { -; 1107 : if (n == 0) return; // already there! -; 1108 : if (n < 0) { -; 1109 : s->img_buffer = s->img_buffer_end; -; 1110 : return; -; 1111 : } -; 1112 : if (s->io.read) { -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1114 : if (blen < n) { -; 1115 : s->img_buffer = s->img_buffer_end; -; 1116 : (s->io.skip)(s->io_user_data, n - blen); -; 1117 : return; -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; -; 1121 : } -; 1122 : #endif -; 1123 : -; 1124 : #if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) -; 1125 : // nothing -; 1126 : #else -; 1127 : static int stbi__getn(stbi__context* s, stbi_uc* buffer, int n) -; 1128 : { -; 1129 : if (s->io.read) { -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1131 : if (blen < n) { -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; -; 1139 : return res; -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { -; 1144 : memcpy(buffer, s->img_buffer, n); -; 1145 : s->img_buffer += n; -; 1146 : return 1; -; 1147 : } -; 1148 : else -; 1149 : return 0; -; 1150 : } -; 1151 : #endif -; 1152 : -; 1153 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1154 : // nothing -; 1155 : #else -; 1156 : static int stbi__get16be(stbi__context* s) -; 1157 : { -; 1158 : int z = stbi__get8(s); -; 1159 : return (z << 8) + stbi__get8(s); -; 1160 : } -; 1161 : #endif -; 1162 : -; 1163 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1164 : // nothing -; 1165 : #else -; 1166 : static stbi__uint32 stbi__get32be(stbi__context* s) -; 1167 : { -; 1168 : stbi__uint32 z = stbi__get16be(s); -; 1169 : return (z << 16) + stbi__get16be(s); -; 1170 : } -; 1171 : #endif -; 1172 : -; 1173 : #if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -; 1174 : // nothing -; 1175 : #else -; 1176 : static int stbi__get16le(stbi__context* s) -; 1177 : { -; 1178 : int z = stbi__get8(s); -; 1179 : return z + (stbi__get8(s) << 8); -; 1180 : } -; 1181 : #endif -; 1182 : -; 1183 : #ifndef STBI_NO_BMP -; 1184 : static stbi__uint32 stbi__get32le(stbi__context* s) -; 1185 : { -; 1186 : stbi__uint32 z = stbi__get16le(s); -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; -; 1188 : return z; -; 1189 : } -; 1190 : #endif -; 1191 : -; 1192 : #define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings -; 1193 : -; 1194 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1195 : // nothing -; 1196 : #else -; 1197 : ////////////////////////////////////////////////////////////////////////////// -; 1198 : // -; 1199 : // generic converter from built-in img_n to req_comp -; 1200 : // individual types do this automatically as much as possible (e.g. jpeg -; 1201 : // does all cases internally since it needs to colorspace convert anyway, -; 1202 : // and it never has alpha, so very few cases ). png can automatically -; 1203 : // interleave an alpha=255 channel, but falls back to this for other cases -; 1204 : // -; 1205 : // assume data buffer is malloced, so malloc a new one and free that one -; 1206 : // only failure mode is malloc failing -; 1207 : -; 1208 : static stbi_uc stbi__compute_y(int r, int g, int b) -; 1209 : { -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1211 : } -; 1212 : #endif -; 1213 : -; 1214 : #if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1215 : // nothing -; 1216 : #else -; 1217 : static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1218 : { -; 1219 : int i, j; -; 1220 : unsigned char* good; -; 1221 : -; 1222 : if (req_comp == img_n) return data; -; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1224 : -; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); -; 1226 : if (good == NULL) { -; 1227 : STBI_FREE(data); -; 1228 : return stbi__errpuc("outofmem", "Out of memory"); -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { -; 1232 : unsigned char* src = data + j * x * img_n; -; 1233 : unsigned char* dest = good + j * x * req_comp; -; 1234 : -; 1235 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1236 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1237 : // convert source image with img_n components to one with req_comp components; -; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1239 : switch (STBI__COMBO(img_n, req_comp)) { -; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; -; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; -; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1253 : } -; 1254 : #undef STBI__CASE -; 1255 : } -; 1256 : -; 1257 : STBI_FREE(data); -; 1258 : return good; -; 1259 : } -; 1260 : #endif -; 1261 : -; 1262 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1263 : // nothing -; 1264 : #else -; 1265 : static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -; 1266 : { -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1268 : } -; 1269 : #endif -; 1270 : -; 1271 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1272 : // nothing -; 1273 : #else -; 1274 : static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1275 : { -; 1276 : int i, j; -; 1277 : stbi__uint16* good; -; 1278 : -; 1279 : if (req_comp == img_n) return data; -; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1281 : -; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); -; 1283 : if (good == NULL) { -; 1284 : STBI_FREE(data); -; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { -; 1289 : stbi__uint16* src = data + j * x * img_n; -; 1290 : stbi__uint16* dest = good + j * x * req_comp; -; 1291 : -; 1292 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1293 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1294 : // convert source image with img_n components to one with req_comp components; -; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1296 : switch (STBI__COMBO(img_n, req_comp)) { -; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; -; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; -; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1310 : } -; 1311 : #undef STBI__CASE -; 1312 : } -; 1313 : -; 1314 : STBI_FREE(data); -; 1315 : return good; -; 1316 : } -; 1317 : #endif -; 1318 : -; 1319 : #ifndef STBI_NO_LINEAR -; 1320 : static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp) -; 1321 : { -; 1322 : int i, k, n; -; 1323 : float* output; -; 1324 : if (!data) return NULL; -; 1325 : output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0); -; 1326 : if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } -; 1327 : // compute number of non-alpha components -; 1328 : if (comp & 1) n = comp; else n = comp - 1; -; 1329 : for (i = 0; i < x * y; ++i) { -; 1330 : for (k = 0; k < n; ++k) { -; 1331 : output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale); -; 1332 : } -; 1333 : } -; 1334 : if (n < comp) { -; 1335 : for (i = 0; i < x * y; ++i) { -; 1336 : output[i * comp + n] = data[i * comp + n] / 255.0f; -; 1337 : } -; 1338 : } -; 1339 : STBI_FREE(data); -; 1340 : return output; -; 1341 : } -; 1342 : #endif -; 1343 : -; 1344 : #ifndef STBI_NO_HDR -; 1345 : #define stbi__float2int(x) ((int) (x)) -; 1346 : static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp) -; 1347 : { -; 1348 : int i, k, n; -; 1349 : stbi_uc* output; -; 1350 : if (!data) return NULL; -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } -; 1353 : // compute number of non-alpha components -; 1354 : if (comp & 1) n = comp; else n = comp - 1; -; 1355 : for (i = 0; i < x * y; ++i) { -; 1356 : for (k = 0; k < n; ++k) { -; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; -; 1358 : if (z < 0) z = 0; -; 1359 : if (z > 255) z = 255; -; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1361 : } -; 1362 : if (k < comp) { -; 1363 : float z = data[i * comp + k] * 255 + 0.5f; -; 1364 : if (z < 0) z = 0; -; 1365 : if (z > 255) z = 255; -; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1367 : } -; 1368 : } -; 1369 : STBI_FREE(data); -; 1370 : return output; -; 1371 : } -; 1372 : #endif -; 1373 : -; 1374 : ////////////////////////////////////////////////////////////////////////////// -; 1375 : // -; 1376 : // "baseline" JPEG/JFIF decoder -; 1377 : // -; 1378 : // simple implementation -; 1379 : // - doesn't support delayed output of y-dimension -; 1380 : // - simple interface (only one output format: 8-bit interleaved RGB) -; 1381 : // - doesn't try to recover corrupt jpegs -; 1382 : // - doesn't allow partial loading, loading multiple at once -; 1383 : // - still fast on x86 (copying globals into locals doesn't help x86) -; 1384 : // - allocates lots of intermediate memory (full size of all components) -; 1385 : // - non-interleaved case requires this anyway -; 1386 : // - allows good upsampling (see next) -; 1387 : // high-quality -; 1388 : // - upsampled channels are bilinearly interpolated, even across blocks -; 1389 : // - quality integer IDCT derived from IJG's 'slow' -; 1390 : // performance -; 1391 : // - fast huffman; reasonable integer IDCT -; 1392 : // - some SIMD kernels for common paths on targets with SSE2/NEON -; 1393 : // - uses a lot of intermediate memory, could cache poorly -; 1394 : -; 1395 : #ifndef STBI_NO_JPEG -; 1396 : -; 1397 : // huffman decoding acceleration -; 1398 : #define FAST_BITS 9 // larger handles more cases; smaller stomps less cache -; 1399 : -; 1400 : typedef struct -; 1401 : { -; 1402 : stbi_uc fast[1 << FAST_BITS]; -; 1403 : // weirdly, repacking this into AoS is a 10% speed loss, instead of a win -; 1404 : stbi__uint16 code[256]; -; 1405 : stbi_uc values[256]; -; 1406 : stbi_uc size[257]; -; 1407 : unsigned int maxcode[18]; -; 1408 : int delta[17]; // old 'firstsymbol' - old 'firstcode' -; 1409 : } stbi__huffman; -; 1410 : -; 1411 : typedef struct -; 1412 : { -; 1413 : stbi__context* s; -; 1414 : stbi__huffman huff_dc[4]; -; 1415 : stbi__huffman huff_ac[4]; -; 1416 : stbi__uint16 dequant[4][64]; -; 1417 : stbi__int16 fast_ac[4][1 << FAST_BITS]; -; 1418 : -; 1419 : // sizes for components, interleaved MCUs -; 1420 : int img_h_max, img_v_max; -; 1421 : int img_mcu_x, img_mcu_y; -; 1422 : int img_mcu_w, img_mcu_h; -; 1423 : -; 1424 : // definition of jpeg image component -; 1425 : struct -; 1426 : { -; 1427 : int id; -; 1428 : int h, v; -; 1429 : int tq; -; 1430 : int hd, ha; -; 1431 : int dc_pred; -; 1432 : -; 1433 : int x, y, w2, h2; -; 1434 : stbi_uc* data; -; 1435 : void* raw_data, * raw_coeff; -; 1436 : stbi_uc* linebuf; -; 1437 : short* coeff; // progressive only -; 1438 : int coeff_w, coeff_h; // number of 8x8 coefficient blocks -; 1439 : } img_comp[4]; -; 1440 : -; 1441 : stbi__uint32 code_buffer; // jpeg entropy-coded buffer -; 1442 : int code_bits; // number of valid bits -; 1443 : unsigned char marker; // marker seen while filling entropy buffer -; 1444 : int nomore; // flag if we saw a marker so must stop -; 1445 : -; 1446 : int progressive; -; 1447 : int spec_start; -; 1448 : int spec_end; -; 1449 : int succ_high; -; 1450 : int succ_low; -; 1451 : int eob_run; -; 1452 : int jfif; -; 1453 : int app14_color_transform; // Adobe APP14 tag -; 1454 : int rgb; -; 1455 : -; 1456 : int scan_n, order[4]; -; 1457 : int restart_interval, todo; -; 1458 : -; 1459 : // kernels -; 1460 : void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]); -; 1461 : void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); -; 1462 : stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); -; 1463 : } stbi__jpeg; -; 1464 : -; 1465 : static int stbi__build_huffman(stbi__huffman* h, int* count) -; 1466 : { -; 1467 : int i, j, k = 0; -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { -; 1471 : for (j = 0; j < count[i]; ++j) { -; 1472 : h->size[k++] = (stbi_uc)(i + 1); -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); -; 1474 : } -; 1475 : } -; 1476 : h->size[k] = 0; -; 1477 : -; 1478 : // compute actual symbols (from jpeg spec) -; 1479 : code = 0; -; 1480 : k = 0; -; 1481 : for (j = 1; j <= 16; ++j) { -; 1482 : // compute delta to add to code to compute symbol id -; 1483 : h->delta[j] = k - code; -; 1484 : if (h->size[k] == j) { -; 1485 : while (h->size[k] == j) -; 1486 : h->code[k++] = (stbi__uint16)(code++); -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); -; 1488 : } -; 1489 : // compute largest code + 1 for this size, preshifted as needed later -; 1490 : h->maxcode[j] = code << (16 - j); -; 1491 : code <<= 1; -; 1492 : } -; 1493 : h->maxcode[j] = 0xffffffff; -; 1494 : -; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated -; 1496 : memset(h->fast, 255, 1 << FAST_BITS); -; 1497 : for (i = 0; i < k; ++i) { -; 1498 : int s = h->size[i]; -; 1499 : if (s <= FAST_BITS) { -; 1500 : int c = h->code[i] << (FAST_BITS - s); -; 1501 : int m = 1 << (FAST_BITS - s); -; 1502 : for (j = 0; j < m; ++j) { -; 1503 : h->fast[c + j] = (stbi_uc)i; -; 1504 : } -; 1505 : } -; 1506 : } -; 1507 : return 1; -; 1508 : } -; 1509 : -; 1510 : // build a table that decodes both magnitude and value of small ACs in -; 1511 : // one go. -; 1512 : static void stbi__build_fast_ac(stbi__int16* fast_ac, stbi__huffman* h) -; 1513 : { -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { -; 1516 : stbi_uc fast = h->fast[i]; -; 1517 : fast_ac[i] = 0; -; 1518 : if (fast < 255) { -; 1519 : int rs = h->values[fast]; -; 1520 : int run = (rs >> 4) & 15; -; 1521 : int magbits = rs & 15; -; 1522 : int len = h->size[fast]; -; 1523 : -; 1524 : if (magbits && len + magbits <= FAST_BITS) { -; 1525 : // magnitude code followed by receive_extend code -; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); -; 1527 : int m = 1 << (magbits - 1); -; 1528 : if (k < m) k += (~0U << magbits) + 1; -; 1529 : // if the result is small enough, we can fit it in fast_ac table -; 1530 : if (k >= -128 && k <= 127) -; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); -; 1532 : } -; 1533 : } -; 1534 : } -; 1535 : } -; 1536 : -; 1537 : static void stbi__grow_buffer_unsafe(stbi__jpeg* j) -; 1538 : { -; 1539 : do { -; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); -; 1541 : if (b == 0xff) { -; 1542 : int c = stbi__get8(j->s); -; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes -; 1544 : if (c != 0) { -; 1545 : j->marker = (unsigned char)c; -; 1546 : j->nomore = 1; -; 1547 : return; -; 1548 : } -; 1549 : } -; 1550 : j->code_buffer |= b << (24 - j->code_bits); -; 1551 : j->code_bits += 8; -; 1552 : } while (j->code_bits <= 24); -; 1553 : } -; 1554 : -; 1555 : // (1 << n) - 1 -; 1556 : static const stbi__uint32 stbi__bmask[17] = { 0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535 }; -; 1557 : -; 1558 : // decode a jpeg huffman value from the bitstream -; 1559 : stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg* j, stbi__huffman* h) -; 1560 : { -; 1561 : unsigned int temp; -; 1562 : int c, k; -; 1563 : -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1569 : k = h->fast[c]; -; 1570 : if (k < 255) { -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; -; 1575 : j->code_bits -= s; -; 1576 : return h->values[k]; -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; -; 1586 : for (k = FAST_BITS + 1; ; ++k) -; 1587 : if (temp < h->maxcode[k]) -; 1588 : break; -; 1589 : if (k == 17) { -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; -; 1608 : } -; 1609 : -; 1610 : // bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) -; 1623 : k = stbi_lrot(j->code_buffer, n); -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); -; 1628 : } -; 1629 : -; 1630 : // get some unsigned bits -; 1631 : stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg* j, int n) -; 1632 : { -; 1633 : unsigned int k; -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1636 : k = stbi_lrot(j->code_buffer, n); -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; -; 1640 : return k; -; 1641 : } -; 1642 : -; 1643 : stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg* j) -; 1644 : { -; 1645 : unsigned int k; -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1648 : k = j->code_buffer; -; 1649 : j->code_buffer <<= 1; -; 1650 : --j->code_bits; -; 1651 : return k & 0x80000000; -; 1652 : } -; 1653 : -; 1654 : // given a value that's at position X in the zigzag stream, -; 1655 : // where does it appear in the 8x8 matrix coded as row-major? -; 1656 : static const stbi_uc stbi__jpeg_dezigzag[64 + 15] = -; 1657 : { -; 1658 : 0, 1, 8, 16, 9, 2, 3, 10, -; 1659 : 17, 24, 32, 25, 18, 11, 4, 5, -; 1660 : 12, 19, 26, 33, 40, 48, 41, 34, -; 1661 : 27, 20, 13, 6, 7, 14, 21, 28, -; 1662 : 35, 42, 49, 56, 57, 50, 43, 36, -; 1663 : 29, 22, 15, 23, 30, 37, 44, 51, -; 1664 : 58, 59, 52, 45, 38, 31, 39, 46, -; 1665 : 53, 60, 61, 54, 47, 55, 62, 63, -; 1666 : // let corrupt input sample past end -; 1667 : 63, 63, 63, 63, 63, 63, 63, 63, -; 1668 : 63, 63, 63, 63, 63, 63, 63 -; 1669 : }; -; 1670 : -; 1671 : // decode one 64-entry block-- -; 1672 : static int stbi__jpeg_decode_block(stbi__jpeg* j, short data[64], stbi__huffman* hdc, stbi__huffman* hac, stbi__int16* fac, int b, stbi__uint16* dequant) -; 1673 : { -; 1674 : int diff, dc, k; -; 1675 : int t; -; 1676 : -; 1677 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1678 : t = stbi__jpeg_huff_decode(j, hdc); -; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1680 : -; 1681 : // 0 all the ac values now so we can do it 32-bits at a time -; 1682 : memset(data, 0, 64 * sizeof(data[0])); -; 1683 : -; 1684 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1686 : dc = j->img_comp[b].dc_pred + diff; -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1689 : data[0] = (short)(dc * dequant[0]); -; 1690 : -; 1691 : // decode AC components, see JPEG spec -; 1692 : k = 1; -; 1693 : do { -; 1694 : unsigned int zig; -; 1695 : int c, r, s; -; 1696 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1697 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1698 : r = fac[c]; -; 1699 : if (r) { // fast-AC path -; 1700 : k += (r >> 4) & 15; // run -; 1701 : s = r & 15; // combined length -; 1702 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1703 : j->code_buffer <<= s; -; 1704 : j->code_bits -= s; -; 1705 : // decode into unzigzag'd location -; 1706 : zig = stbi__jpeg_dezigzag[k++]; -; 1707 : data[zig] = (short)((r >> 8) * dequant[zig]); -; 1708 : } -; 1709 : else { -; 1710 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1711 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1712 : s = rs & 15; -; 1713 : r = rs >> 4; -; 1714 : if (s == 0) { -; 1715 : if (rs != 0xf0) break; // end block -; 1716 : k += 16; -; 1717 : } -; 1718 : else { -; 1719 : k += r; -; 1720 : // decode into unzigzag'd location -; 1721 : zig = stbi__jpeg_dezigzag[k++]; -; 1722 : data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]); -; 1723 : } -; 1724 : } -; 1725 : } while (k < 64); -; 1726 : return 1; -; 1727 : } -; 1728 : -; 1729 : static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg* j, short data[64], stbi__huffman* hdc, int b) -; 1730 : { -; 1731 : int diff, dc; -; 1732 : int t; -; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1734 : -; 1735 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1736 : -; 1737 : if (j->succ_high == 0) { -; 1738 : // first scan for DC coefficient, must be first -; 1739 : memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now -; 1740 : t = stbi__jpeg_huff_decode(j, hdc); -; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1742 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1745 : dc = j->img_comp[b].dc_pred + diff; -; 1746 : j->img_comp[b].dc_pred = dc; -; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1748 : data[0] = (short)(dc * (1 << j->succ_low)); -; 1749 : } -; 1750 : else { -; 1751 : // refinement scan for DC coefficient -; 1752 : if (stbi__jpeg_get_bit(j)) -; 1753 : data[0] += (short)(1 << j->succ_low); -; 1754 : } -; 1755 : return 1; -; 1756 : } -; 1757 : -; 1758 : // @OPTIMIZE: store non-zigzagged during the decode passes, -; 1759 : // and only de-zigzag when dequantizing -; 1760 : static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg* j, short data[64], stbi__huffman* hac, stbi__int16* fac) -; 1761 : { -; 1762 : int k; -; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1764 : -; 1765 : if (j->succ_high == 0) { -; 1766 : int shift = j->succ_low; -; 1767 : -; 1768 : if (j->eob_run) { -; 1769 : --j->eob_run; -; 1770 : return 1; -; 1771 : } -; 1772 : -; 1773 : k = j->spec_start; -; 1774 : do { -; 1775 : unsigned int zig; -; 1776 : int c, r, s; -; 1777 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1778 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1779 : r = fac[c]; -; 1780 : if (r) { // fast-AC path -; 1781 : k += (r >> 4) & 15; // run -; 1782 : s = r & 15; // combined length -; 1783 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1784 : j->code_buffer <<= s; -; 1785 : j->code_bits -= s; -; 1786 : zig = stbi__jpeg_dezigzag[k++]; -; 1787 : data[zig] = (short)((r >> 8) * (1 << shift)); -; 1788 : } -; 1789 : else { -; 1790 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1791 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1792 : s = rs & 15; -; 1793 : r = rs >> 4; -; 1794 : if (s == 0) { -; 1795 : if (r < 15) { -; 1796 : j->eob_run = (1 << r); -; 1797 : if (r) -; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1799 : --j->eob_run; -; 1800 : break; -; 1801 : } -; 1802 : k += 16; -; 1803 : } -; 1804 : else { -; 1805 : k += r; -; 1806 : zig = stbi__jpeg_dezigzag[k++]; -; 1807 : data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift)); -; 1808 : } -; 1809 : } -; 1810 : } while (k <= j->spec_end); -; 1811 : } -; 1812 : else { -; 1813 : // refinement scan for these AC coefficients -; 1814 : -; 1815 : short bit = (short)(1 << j->succ_low); -; 1816 : -; 1817 : if (j->eob_run) { -; 1818 : --j->eob_run; -; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { -; 1820 : short* p = &data[stbi__jpeg_dezigzag[k]]; -; 1821 : if (*p != 0) -; 1822 : if (stbi__jpeg_get_bit(j)) -; 1823 : if ((*p & bit) == 0) { -; 1824 : if (*p > 0) -; 1825 : *p += bit; -; 1826 : else -; 1827 : *p -= bit; -; 1828 : } -; 1829 : } -; 1830 : } -; 1831 : else { -; 1832 : k = j->spec_start; -; 1833 : do { -; 1834 : int r, s; -; 1835 : int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh -; 1836 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1837 : s = rs & 15; -; 1838 : r = rs >> 4; -; 1839 : if (s == 0) { -; 1840 : if (r < 15) { -; 1841 : j->eob_run = (1 << r) - 1; -; 1842 : if (r) -; 1843 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1844 : r = 64; // force end of block -; 1845 : } -; 1846 : else { -; 1847 : // r=15 s=0 should write 16 0s, so we just do -; 1848 : // a run of 15 0s and then write s (which is 0), -; 1849 : // so we don't have to do anything special here -; 1850 : } -; 1851 : } -; 1852 : else { -; 1853 : if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1854 : // sign bit -; 1855 : if (stbi__jpeg_get_bit(j)) -; 1856 : s = bit; -; 1857 : else -; 1858 : s = -bit; -; 1859 : } -; 1860 : -; 1861 : // advance by r -; 1862 : while (k <= j->spec_end) { -; 1863 : short* p = &data[stbi__jpeg_dezigzag[k++]]; -; 1864 : if (*p != 0) { -; 1865 : if (stbi__jpeg_get_bit(j)) -; 1866 : if ((*p & bit) == 0) { -; 1867 : if (*p > 0) -; 1868 : *p += bit; -; 1869 : else -; 1870 : *p -= bit; -; 1871 : } -; 1872 : } -; 1873 : else { -; 1874 : if (r == 0) { -; 1875 : *p = (short)s; -; 1876 : break; -; 1877 : } -; 1878 : --r; -; 1879 : } -; 1880 : } -; 1881 : } while (k <= j->spec_end); -; 1882 : } -; 1883 : } -; 1884 : return 1; -; 1885 : } -; 1886 : -; 1887 : // take a -128..127 value and stbi__clamp it and convert to 0..255 -; 1888 : stbi_inline static stbi_uc stbi__clamp(int x) -; 1889 : { -; 1890 : // trick to use a single test to catch both cases -; 1891 : if ((unsigned int)x > 255) { -; 1892 : if (x < 0) return 0; -; 1893 : if (x > 255) return 255; -; 1894 : } -; 1895 : return (stbi_uc)x; -; 1896 : } -; 1897 : -; 1898 : #define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -; 1899 : #define stbi__fsh(x) ((x) * 4096) -; 1900 : -; 1901 : // derived from jidctint -- DCT_ISLOW -; 1902 : #define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ -; 1903 : int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ -; 1904 : p2 = s2; \ -; 1905 : p3 = s6; \ -; 1906 : p1 = (p2+p3) * stbi__f2f(0.5411961f); \ -; 1907 : t2 = p1 + p3*stbi__f2f(-1.847759065f); \ -; 1908 : t3 = p1 + p2*stbi__f2f( 0.765366865f); \ -; 1909 : p2 = s0; \ -; 1910 : p3 = s4; \ -; 1911 : t0 = stbi__fsh(p2+p3); \ -; 1912 : t1 = stbi__fsh(p2-p3); \ -; 1913 : x0 = t0+t3; \ -; 1914 : x3 = t0-t3; \ -; 1915 : x1 = t1+t2; \ -; 1916 : x2 = t1-t2; \ -; 1917 : t0 = s7; \ -; 1918 : t1 = s5; \ -; 1919 : t2 = s3; \ -; 1920 : t3 = s1; \ -; 1921 : p3 = t0+t2; \ -; 1922 : p4 = t1+t3; \ -; 1923 : p1 = t0+t3; \ -; 1924 : p2 = t1+t2; \ -; 1925 : p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ -; 1926 : t0 = t0*stbi__f2f( 0.298631336f); \ -; 1927 : t1 = t1*stbi__f2f( 2.053119869f); \ -; 1928 : t2 = t2*stbi__f2f( 3.072711026f); \ -; 1929 : t3 = t3*stbi__f2f( 1.501321110f); \ -; 1930 : p1 = p5 + p1*stbi__f2f(-0.899976223f); \ -; 1931 : p2 = p5 + p2*stbi__f2f(-2.562915447f); \ -; 1932 : p3 = p3*stbi__f2f(-1.961570560f); \ -; 1933 : p4 = p4*stbi__f2f(-0.390180644f); \ -; 1934 : t3 += p1+p4; \ -; 1935 : t2 += p2+p3; \ -; 1936 : t1 += p2+p4; \ -; 1937 : t0 += p1+p3; -; 1938 : -; 1939 : static void stbi__idct_block(stbi_uc* out, int out_stride, short data[64]) -; 1940 : { -; 1941 : int i, val[64], * v = val; -; 1942 : stbi_uc* o; -; 1943 : short* d = data; -; 1944 : -; 1945 : // columns -; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { -; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing -; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 -; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { -; 1950 : // no shortcut 0 seconds -; 1951 : // (1|2|3|4|5|6|7)==0 0 seconds -; 1952 : // all separate -0.047 seconds -; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds -; 1954 : int dcterm = d[0] * 4; -; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; -; 1956 : } -; 1957 : else { -; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) -; 1959 : // constants scaled things up by 1<<12; let's bring them back -; 1960 : // down, but keep 2 extra bits of precision -; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; -; 1962 : v[0] = (x0 + t3) >> 10; -; 1963 : v[56] = (x0 - t3) >> 10; -; 1964 : v[8] = (x1 + t2) >> 10; -; 1965 : v[48] = (x1 - t2) >> 10; -; 1966 : v[16] = (x2 + t1) >> 10; -; 1967 : v[40] = (x2 - t1) >> 10; -; 1968 : v[24] = (x3 + t0) >> 10; -; 1969 : v[32] = (x3 - t0) >> 10; -; 1970 : } -; 1971 : } -; 1972 : -; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { -; 1974 : // no fast case since the first 1D IDCT spread components out -; 1975 : STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]) -; 1976 : // constants scaled things up by 1<<12, plus we had 1<<2 from first -; 1977 : // loop, plus horizontal and vertical each scale by sqrt(8) so together -; 1978 : // we've got an extra 1<<3, so 1<<17 total we need to remove. -; 1979 : // so we want to round that, which means adding 0.5 * 1<<17, -; 1980 : // aka 65536. Also, we'll end up with -128 to 127 that we want -; 1981 : // to encode as 0..255 by adding 128, so we'll add that before the shift -; 1982 : x0 += 65536 + (128 << 17); -; 1983 : x1 += 65536 + (128 << 17); -; 1984 : x2 += 65536 + (128 << 17); -; 1985 : x3 += 65536 + (128 << 17); -; 1986 : // tried computing the shifts into temps, or'ing the temps to see -; 1987 : // if any were out of range, but that was slower -; 1988 : o[0] = stbi__clamp((x0 + t3) >> 17); -; 1989 : o[7] = stbi__clamp((x0 - t3) >> 17); -; 1990 : o[1] = stbi__clamp((x1 + t2) >> 17); -; 1991 : o[6] = stbi__clamp((x1 - t2) >> 17); -; 1992 : o[2] = stbi__clamp((x2 + t1) >> 17); -; 1993 : o[5] = stbi__clamp((x2 - t1) >> 17); -; 1994 : o[3] = stbi__clamp((x3 + t0) >> 17); -; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); -; 1996 : } -; 1997 : } -; 1998 : -; 1999 : #ifdef STBI_SSE2 -; 2000 : // sse2 integer IDCT. not the fastest possible implementation but it -; 2001 : // produces bit-identical results to the generic C version so it's -; 2002 : // fully "transparent". -; 2003 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2004 : { -; 2005 : // This is constructed to match our regular (generic) integer IDCT exactly. -; 2006 : __m128i row0, row1, row2, row3, row4, row5, row6, row7; -; 2007 : __m128i tmp; -; 2008 : -; 2009 : // dot product constant: even elems=x, odd elems=y -; 2010 : #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) -; 2011 : -; 2012 : // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) -; 2013 : // out(1) = c1[even]*x + c1[odd]*y -; 2014 : #define dct_rot(out0,out1, x,y,c0,c1) \ -; 2015 : __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ -; 2016 : __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ -; 2017 : __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ -; 2018 : __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ -; 2019 : __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ -; 2020 : __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) -; 2021 : -; 2022 : // out = in << 12 (in 16-bit, out 32-bit) -; 2023 : #define dct_widen(out, in) \ -; 2024 : __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ -; 2025 : __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) -; 2026 : -; 2027 : // wide add -; 2028 : #define dct_wadd(out, a, b) \ -; 2029 : __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ -; 2030 : __m128i out##_h = _mm_add_epi32(a##_h, b##_h) -; 2031 : -; 2032 : // wide sub -; 2033 : #define dct_wsub(out, a, b) \ -; 2034 : __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ -; 2035 : __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) -; 2036 : -; 2037 : // butterfly a/b, add bias, then shift by "s" and pack -; 2038 : #define dct_bfly32o(out0, out1, a,b,bias,s) \ -; 2039 : { \ -; 2040 : __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ -; 2041 : __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ -; 2042 : dct_wadd(sum, abiased, b); \ -; 2043 : dct_wsub(dif, abiased, b); \ -; 2044 : out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ -; 2045 : out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ -; 2046 : } -; 2047 : -; 2048 : // 8-bit interleave step (for transposes) -; 2049 : #define dct_interleave8(a, b) \ -; 2050 : tmp = a; \ -; 2051 : a = _mm_unpacklo_epi8(a, b); \ -; 2052 : b = _mm_unpackhi_epi8(tmp, b) -; 2053 : -; 2054 : // 16-bit interleave step (for transposes) -; 2055 : #define dct_interleave16(a, b) \ -; 2056 : tmp = a; \ -; 2057 : a = _mm_unpacklo_epi16(a, b); \ -; 2058 : b = _mm_unpackhi_epi16(tmp, b) -; 2059 : -; 2060 : #define dct_pass(bias,shift) \ -; 2061 : { \ -; 2062 : /* even part */ \ -; 2063 : dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ -; 2064 : __m128i sum04 = _mm_add_epi16(row0, row4); \ -; 2065 : __m128i dif04 = _mm_sub_epi16(row0, row4); \ -; 2066 : dct_widen(t0e, sum04); \ -; 2067 : dct_widen(t1e, dif04); \ -; 2068 : dct_wadd(x0, t0e, t3e); \ -; 2069 : dct_wsub(x3, t0e, t3e); \ -; 2070 : dct_wadd(x1, t1e, t2e); \ -; 2071 : dct_wsub(x2, t1e, t2e); \ -; 2072 : /* odd part */ \ -; 2073 : dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ -; 2074 : dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ -; 2075 : __m128i sum17 = _mm_add_epi16(row1, row7); \ -; 2076 : __m128i sum35 = _mm_add_epi16(row3, row5); \ -; 2077 : dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ -; 2078 : dct_wadd(x4, y0o, y4o); \ -; 2079 : dct_wadd(x5, y1o, y5o); \ -; 2080 : dct_wadd(x6, y2o, y5o); \ -; 2081 : dct_wadd(x7, y3o, y4o); \ -; 2082 : dct_bfly32o(row0,row7, x0,x7,bias,shift); \ -; 2083 : dct_bfly32o(row1,row6, x1,x6,bias,shift); \ -; 2084 : dct_bfly32o(row2,row5, x2,x5,bias,shift); \ -; 2085 : dct_bfly32o(row3,row4, x3,x4,bias,shift); \ -; 2086 : } -; 2087 : -; 2088 : __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); -; 2089 : __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f)); -; 2090 : __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); -; 2091 : __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); -; 2092 : __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f)); -; 2093 : __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f)); -; 2094 : __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f)); -; 2095 : __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f)); -; 2096 : -; 2097 : // rounding biases in column/row passes, see stbi__idct_block for explanation. -; 2098 : __m128i bias_0 = _mm_set1_epi32(512); -; 2099 : __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17)); -; 2100 : -; 2101 : // load -; 2102 : row0 = _mm_load_si128((const __m128i*) (data + 0 * 8)); -; 2103 : row1 = _mm_load_si128((const __m128i*) (data + 1 * 8)); -; 2104 : row2 = _mm_load_si128((const __m128i*) (data + 2 * 8)); -; 2105 : row3 = _mm_load_si128((const __m128i*) (data + 3 * 8)); -; 2106 : row4 = _mm_load_si128((const __m128i*) (data + 4 * 8)); -; 2107 : row5 = _mm_load_si128((const __m128i*) (data + 5 * 8)); -; 2108 : row6 = _mm_load_si128((const __m128i*) (data + 6 * 8)); -; 2109 : row7 = _mm_load_si128((const __m128i*) (data + 7 * 8)); -; 2110 : -; 2111 : // column pass -; 2112 : dct_pass(bias_0, 10); -; 2113 : -; 2114 : { -; 2115 : // 16bit 8x8 transpose pass 1 -; 2116 : dct_interleave16(row0, row4); -; 2117 : dct_interleave16(row1, row5); -; 2118 : dct_interleave16(row2, row6); -; 2119 : dct_interleave16(row3, row7); -; 2120 : -; 2121 : // transpose pass 2 -; 2122 : dct_interleave16(row0, row2); -; 2123 : dct_interleave16(row1, row3); -; 2124 : dct_interleave16(row4, row6); -; 2125 : dct_interleave16(row5, row7); -; 2126 : -; 2127 : // transpose pass 3 -; 2128 : dct_interleave16(row0, row1); -; 2129 : dct_interleave16(row2, row3); -; 2130 : dct_interleave16(row4, row5); -; 2131 : dct_interleave16(row6, row7); -; 2132 : } -; 2133 : -; 2134 : // row pass -; 2135 : dct_pass(bias_1, 17); -; 2136 : -; 2137 : { -; 2138 : // pack -; 2139 : __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 -; 2140 : __m128i p1 = _mm_packus_epi16(row2, row3); -; 2141 : __m128i p2 = _mm_packus_epi16(row4, row5); -; 2142 : __m128i p3 = _mm_packus_epi16(row6, row7); -; 2143 : -; 2144 : // 8bit 8x8 transpose pass 1 -; 2145 : dct_interleave8(p0, p2); // a0e0a1e1... -; 2146 : dct_interleave8(p1, p3); // c0g0c1g1... -; 2147 : -; 2148 : // transpose pass 2 -; 2149 : dct_interleave8(p0, p1); // a0c0e0g0... -; 2150 : dct_interleave8(p2, p3); // b0d0f0h0... -; 2151 : -; 2152 : // transpose pass 3 -; 2153 : dct_interleave8(p0, p2); // a0b0c0d0... -; 2154 : dct_interleave8(p1, p3); // a4b4c4d4... -; 2155 : -; 2156 : // store -; 2157 : _mm_storel_epi64((__m128i*) out, p0); out += out_stride; -; 2158 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; -; 2159 : _mm_storel_epi64((__m128i*) out, p2); out += out_stride; -; 2160 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; -; 2161 : _mm_storel_epi64((__m128i*) out, p1); out += out_stride; -; 2162 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; -; 2163 : _mm_storel_epi64((__m128i*) out, p3); out += out_stride; -; 2164 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e)); -; 2165 : } -; 2166 : -; 2167 : #undef dct_const -; 2168 : #undef dct_rot -; 2169 : #undef dct_widen -; 2170 : #undef dct_wadd -; 2171 : #undef dct_wsub -; 2172 : #undef dct_bfly32o -; 2173 : #undef dct_interleave8 -; 2174 : #undef dct_interleave16 -; 2175 : #undef dct_pass -; 2176 : } -; 2177 : -; 2178 : #endif // STBI_SSE2 -; 2179 : -; 2180 : #ifdef STBI_NEON -; 2181 : -; 2182 : // NEON integer IDCT. should produce bit-identical -; 2183 : // results to the generic C version. -; 2184 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2185 : { -; 2186 : int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; -; 2187 : -; 2188 : int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); -; 2189 : int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); -; 2190 : int16x4_t rot0_2 = vdup_n_s16(stbi__f2f(0.765366865f)); -; 2191 : int16x4_t rot1_0 = vdup_n_s16(stbi__f2f(1.175875602f)); -; 2192 : int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); -; 2193 : int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); -; 2194 : int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); -; 2195 : int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); -; 2196 : int16x4_t rot3_0 = vdup_n_s16(stbi__f2f(0.298631336f)); -; 2197 : int16x4_t rot3_1 = vdup_n_s16(stbi__f2f(2.053119869f)); -; 2198 : int16x4_t rot3_2 = vdup_n_s16(stbi__f2f(3.072711026f)); -; 2199 : int16x4_t rot3_3 = vdup_n_s16(stbi__f2f(1.501321110f)); -; 2200 : -; 2201 : #define dct_long_mul(out, inq, coeff) \ -; 2202 : int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ -; 2203 : int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) -; 2204 : -; 2205 : #define dct_long_mac(out, acc, inq, coeff) \ -; 2206 : int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ -; 2207 : int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) -; 2208 : -; 2209 : #define dct_widen(out, inq) \ -; 2210 : int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ -; 2211 : int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) -; 2212 : -; 2213 : // wide add -; 2214 : #define dct_wadd(out, a, b) \ -; 2215 : int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ -; 2216 : int32x4_t out##_h = vaddq_s32(a##_h, b##_h) -; 2217 : -; 2218 : // wide sub -; 2219 : #define dct_wsub(out, a, b) \ -; 2220 : int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ -; 2221 : int32x4_t out##_h = vsubq_s32(a##_h, b##_h) -; 2222 : -; 2223 : // butterfly a/b, then shift using "shiftop" by "s" and pack -; 2224 : #define dct_bfly32o(out0,out1, a,b,shiftop,s) \ -; 2225 : { \ -; 2226 : dct_wadd(sum, a, b); \ -; 2227 : dct_wsub(dif, a, b); \ -; 2228 : out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ -; 2229 : out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ -; 2230 : } -; 2231 : -; 2232 : #define dct_pass(shiftop, shift) \ -; 2233 : { \ -; 2234 : /* even part */ \ -; 2235 : int16x8_t sum26 = vaddq_s16(row2, row6); \ -; 2236 : dct_long_mul(p1e, sum26, rot0_0); \ -; 2237 : dct_long_mac(t2e, p1e, row6, rot0_1); \ -; 2238 : dct_long_mac(t3e, p1e, row2, rot0_2); \ -; 2239 : int16x8_t sum04 = vaddq_s16(row0, row4); \ -; 2240 : int16x8_t dif04 = vsubq_s16(row0, row4); \ -; 2241 : dct_widen(t0e, sum04); \ -; 2242 : dct_widen(t1e, dif04); \ -; 2243 : dct_wadd(x0, t0e, t3e); \ -; 2244 : dct_wsub(x3, t0e, t3e); \ -; 2245 : dct_wadd(x1, t1e, t2e); \ -; 2246 : dct_wsub(x2, t1e, t2e); \ -; 2247 : /* odd part */ \ -; 2248 : int16x8_t sum15 = vaddq_s16(row1, row5); \ -; 2249 : int16x8_t sum17 = vaddq_s16(row1, row7); \ -; 2250 : int16x8_t sum35 = vaddq_s16(row3, row5); \ -; 2251 : int16x8_t sum37 = vaddq_s16(row3, row7); \ -; 2252 : int16x8_t sumodd = vaddq_s16(sum17, sum35); \ -; 2253 : dct_long_mul(p5o, sumodd, rot1_0); \ -; 2254 : dct_long_mac(p1o, p5o, sum17, rot1_1); \ -; 2255 : dct_long_mac(p2o, p5o, sum35, rot1_2); \ -; 2256 : dct_long_mul(p3o, sum37, rot2_0); \ -; 2257 : dct_long_mul(p4o, sum15, rot2_1); \ -; 2258 : dct_wadd(sump13o, p1o, p3o); \ -; 2259 : dct_wadd(sump24o, p2o, p4o); \ -; 2260 : dct_wadd(sump23o, p2o, p3o); \ -; 2261 : dct_wadd(sump14o, p1o, p4o); \ -; 2262 : dct_long_mac(x4, sump13o, row7, rot3_0); \ -; 2263 : dct_long_mac(x5, sump24o, row5, rot3_1); \ -; 2264 : dct_long_mac(x6, sump23o, row3, rot3_2); \ -; 2265 : dct_long_mac(x7, sump14o, row1, rot3_3); \ -; 2266 : dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ -; 2267 : dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ -; 2268 : dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ -; 2269 : dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ -; 2270 : } -; 2271 : -; 2272 : // load -; 2273 : row0 = vld1q_s16(data + 0 * 8); -; 2274 : row1 = vld1q_s16(data + 1 * 8); -; 2275 : row2 = vld1q_s16(data + 2 * 8); -; 2276 : row3 = vld1q_s16(data + 3 * 8); -; 2277 : row4 = vld1q_s16(data + 4 * 8); -; 2278 : row5 = vld1q_s16(data + 5 * 8); -; 2279 : row6 = vld1q_s16(data + 6 * 8); -; 2280 : row7 = vld1q_s16(data + 7 * 8); -; 2281 : -; 2282 : // add DC bias -; 2283 : row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); -; 2284 : -; 2285 : // column pass -; 2286 : dct_pass(vrshrn_n_s32, 10); -; 2287 : -; 2288 : // 16bit 8x8 transpose -; 2289 : { -; 2290 : // these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -; 2291 : // whether compilers actually get this is another story, sadly. -; 2292 : #define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -; 2293 : #define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -; 2294 : #define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } -; 2295 : -; 2296 : // pass 1 -; 2297 : dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 -; 2298 : dct_trn16(row2, row3); -; 2299 : dct_trn16(row4, row5); -; 2300 : dct_trn16(row6, row7); -; 2301 : -; 2302 : // pass 2 -; 2303 : dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 -; 2304 : dct_trn32(row1, row3); -; 2305 : dct_trn32(row4, row6); -; 2306 : dct_trn32(row5, row7); -; 2307 : -; 2308 : // pass 3 -; 2309 : dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 -; 2310 : dct_trn64(row1, row5); -; 2311 : dct_trn64(row2, row6); -; 2312 : dct_trn64(row3, row7); -; 2313 : -; 2314 : #undef dct_trn16 -; 2315 : #undef dct_trn32 -; 2316 : #undef dct_trn64 -; 2317 : } -; 2318 : -; 2319 : // row pass -; 2320 : // vrshrn_n_s32 only supports shifts up to 16, we need -; 2321 : // 17. so do a non-rounding shift of 16 first then follow -; 2322 : // up with a rounding shift by 1. -; 2323 : dct_pass(vshrn_n_s32, 16); -; 2324 : -; 2325 : { -; 2326 : // pack and round -; 2327 : uint8x8_t p0 = vqrshrun_n_s16(row0, 1); -; 2328 : uint8x8_t p1 = vqrshrun_n_s16(row1, 1); -; 2329 : uint8x8_t p2 = vqrshrun_n_s16(row2, 1); -; 2330 : uint8x8_t p3 = vqrshrun_n_s16(row3, 1); -; 2331 : uint8x8_t p4 = vqrshrun_n_s16(row4, 1); -; 2332 : uint8x8_t p5 = vqrshrun_n_s16(row5, 1); -; 2333 : uint8x8_t p6 = vqrshrun_n_s16(row6, 1); -; 2334 : uint8x8_t p7 = vqrshrun_n_s16(row7, 1); -; 2335 : -; 2336 : // again, these can translate into one instruction, but often don't. -; 2337 : #define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -; 2338 : #define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -; 2339 : #define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } -; 2340 : -; 2341 : // sadly can't use interleaved stores here since we only write -; 2342 : // 8 bytes to each scan line! -; 2343 : -; 2344 : // 8x8 8-bit transpose pass 1 -; 2345 : dct_trn8_8(p0, p1); -; 2346 : dct_trn8_8(p2, p3); -; 2347 : dct_trn8_8(p4, p5); -; 2348 : dct_trn8_8(p6, p7); -; 2349 : -; 2350 : // pass 2 -; 2351 : dct_trn8_16(p0, p2); -; 2352 : dct_trn8_16(p1, p3); -; 2353 : dct_trn8_16(p4, p6); -; 2354 : dct_trn8_16(p5, p7); -; 2355 : -; 2356 : // pass 3 -; 2357 : dct_trn8_32(p0, p4); -; 2358 : dct_trn8_32(p1, p5); -; 2359 : dct_trn8_32(p2, p6); -; 2360 : dct_trn8_32(p3, p7); -; 2361 : -; 2362 : // store -; 2363 : vst1_u8(out, p0); out += out_stride; -; 2364 : vst1_u8(out, p1); out += out_stride; -; 2365 : vst1_u8(out, p2); out += out_stride; -; 2366 : vst1_u8(out, p3); out += out_stride; -; 2367 : vst1_u8(out, p4); out += out_stride; -; 2368 : vst1_u8(out, p5); out += out_stride; -; 2369 : vst1_u8(out, p6); out += out_stride; -; 2370 : vst1_u8(out, p7); -; 2371 : -; 2372 : #undef dct_trn8_8 -; 2373 : #undef dct_trn8_16 -; 2374 : #undef dct_trn8_32 -; 2375 : } -; 2376 : -; 2377 : #undef dct_long_mul -; 2378 : #undef dct_long_mac -; 2379 : #undef dct_widen -; 2380 : #undef dct_wadd -; 2381 : #undef dct_wsub -; 2382 : #undef dct_bfly32o -; 2383 : #undef dct_pass -; 2384 : } -; 2385 : -; 2386 : #endif // STBI_NEON -; 2387 : -; 2388 : #define STBI__MARKER_none 0xff -; 2389 : // if there's a pending marker from the entropy stream, return that -; 2390 : // otherwise, fetch from the stream and get a marker. if there's no -; 2391 : // marker, return 0xff, which is never a valid marker value -; 2392 : static stbi_uc stbi__get_marker(stbi__jpeg* j) -; 2393 : { -; 2394 : stbi_uc x; -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } -; 2396 : x = stbi__get8(j->s); -; 2397 : if (x != 0xff) return STBI__MARKER_none; -; 2398 : while (x == 0xff) -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes -; 2400 : return x; -; 2401 : } -; 2402 : -; 2403 : // in each scan, we'll have scan_n components, and the order -; 2404 : // of the components is specified by order[] -; 2405 : #define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) -; 2406 : -; 2407 : // after a restart interval, stbi__jpeg_reset the entropy decoder and -; 2408 : // the dc prediction -; 2409 : static void stbi__jpeg_reset(stbi__jpeg* j) -; 2410 : { -; 2411 : j->code_bits = 0; -; 2412 : j->code_buffer = 0; -; 2413 : j->nomore = 0; -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; -; 2417 : j->eob_run = 0; -; 2418 : // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, -; 2419 : // since we don't even allow 1<<30 pixels -; 2420 : } -; 2421 : -; 2422 : static int stbi__parse_entropy_coded_data(stbi__jpeg* z) -; 2423 : { -; 2424 : stbi__jpeg_reset(z); -; 2425 : if (!z->progressive) { -; 2426 : if (z->scan_n == 1) { -; 2427 : int i, j; -; 2428 : STBI_SIMD_ALIGN(short, data[64]); -; 2429 : int n = z->order[0]; -; 2430 : // non-interleaved data, we just need to process one block at a time, -; 2431 : // in trivial scanline order -; 2432 : // number of blocks to do just depends on how many actual "pixels" this -; 2433 : // component has, independent of interleaved MCU blocking and such -; 2434 : int w = (z->img_comp[n].x + 7) >> 3; -; 2435 : int h = (z->img_comp[n].y + 7) >> 3; -; 2436 : for (j = 0; j < h; ++j) { -; 2437 : for (i = 0; i < w; ++i) { -; 2438 : int ha = z->img_comp[n].ha; -; 2439 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2440 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2441 : // every data block is an MCU, so countdown the restart interval -; 2442 : if (--z->todo <= 0) { -; 2443 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2444 : // if it's NOT a restart, then just bail, so we get corrupt data -; 2445 : // rather than no data -; 2446 : if (!STBI__RESTART(z->marker)) return 1; -; 2447 : stbi__jpeg_reset(z); -; 2448 : } -; 2449 : } -; 2450 : } -; 2451 : return 1; -; 2452 : } -; 2453 : else { // interleaved -; 2454 : int i, j, k, x, y; -; 2455 : STBI_SIMD_ALIGN(short, data[64]); -; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2458 : // scan an interleaved mcu... process scan_n components in order -; 2459 : for (k = 0; k < z->scan_n; ++k) { -; 2460 : int n = z->order[k]; -; 2461 : // scan out an mcu's worth of this component; that's just determined -; 2462 : // by the basic H and V specified for the component -; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2464 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2465 : int x2 = (i * z->img_comp[n].h + x) * 8; -; 2466 : int y2 = (j * z->img_comp[n].v + y) * 8; -; 2467 : int ha = z->img_comp[n].ha; -; 2468 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2469 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); -; 2470 : } -; 2471 : } -; 2472 : } -; 2473 : // after all interleaved components, that's an interleaved MCU, -; 2474 : // so now count down the restart interval -; 2475 : if (--z->todo <= 0) { -; 2476 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2477 : if (!STBI__RESTART(z->marker)) return 1; -; 2478 : stbi__jpeg_reset(z); -; 2479 : } -; 2480 : } -; 2481 : } -; 2482 : return 1; -; 2483 : } -; 2484 : } -; 2485 : else { -; 2486 : if (z->scan_n == 1) { -; 2487 : int i, j; -; 2488 : int n = z->order[0]; -; 2489 : // non-interleaved data, we just need to process one block at a time, -; 2490 : // in trivial scanline order -; 2491 : // number of blocks to do just depends on how many actual "pixels" this -; 2492 : // component has, independent of interleaved MCU blocking and such -; 2493 : int w = (z->img_comp[n].x + 7) >> 3; -; 2494 : int h = (z->img_comp[n].y + 7) >> 3; -; 2495 : for (j = 0; j < h; ++j) { -; 2496 : for (i = 0; i < w; ++i) { -; 2497 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2498 : if (z->spec_start == 0) { -; 2499 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2500 : return 0; -; 2501 : } -; 2502 : else { -; 2503 : int ha = z->img_comp[n].ha; -; 2504 : if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) -; 2505 : return 0; -; 2506 : } -; 2507 : // every data block is an MCU, so countdown the restart interval -; 2508 : if (--z->todo <= 0) { -; 2509 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2510 : if (!STBI__RESTART(z->marker)) return 1; -; 2511 : stbi__jpeg_reset(z); -; 2512 : } -; 2513 : } -; 2514 : } -; 2515 : return 1; -; 2516 : } -; 2517 : else { // interleaved -; 2518 : int i, j, k, x, y; -; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2521 : // scan an interleaved mcu... process scan_n components in order -; 2522 : for (k = 0; k < z->scan_n; ++k) { -; 2523 : int n = z->order[k]; -; 2524 : // scan out an mcu's worth of this component; that's just determined -; 2525 : // by the basic H and V specified for the component -; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2528 : int x2 = (i * z->img_comp[n].h + x); -; 2529 : int y2 = (j * z->img_comp[n].v + y); -; 2530 : short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); -; 2531 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2532 : return 0; -; 2533 : } -; 2534 : } -; 2535 : } -; 2536 : // after all interleaved components, that's an interleaved MCU, -; 2537 : // so now count down the restart interval -; 2538 : if (--z->todo <= 0) { -; 2539 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2540 : if (!STBI__RESTART(z->marker)) return 1; -; 2541 : stbi__jpeg_reset(z); -; 2542 : } -; 2543 : } -; 2544 : } -; 2545 : return 1; -; 2546 : } -; 2547 : } -; 2548 : } -; 2549 : -; 2550 : static void stbi__jpeg_dequantize(short* data, stbi__uint16* dequant) -; 2551 : { -; 2552 : int i; -; 2553 : for (i = 0; i < 64; ++i) -; 2554 : data[i] *= dequant[i]; -; 2555 : } -; 2556 : -; 2557 : static void stbi__jpeg_finish(stbi__jpeg* z) -; 2558 : { -; 2559 : if (z->progressive) { -; 2560 : // dequantize and idct the data -; 2561 : int i, j, n; -; 2562 : for (n = 0; n < z->s->img_n; ++n) { -; 2563 : int w = (z->img_comp[n].x + 7) >> 3; -; 2564 : int h = (z->img_comp[n].y + 7) >> 3; -; 2565 : for (j = 0; j < h; ++j) { -; 2566 : for (i = 0; i < w; ++i) { -; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2568 : stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); -; 2569 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2570 : } -; 2571 : } -; 2572 : } -; 2573 : } -; 2574 : } -; 2575 : -; 2576 : static int stbi__process_marker(stbi__jpeg* z, int m) -; 2577 : { -; 2578 : int L; -; 2579 : switch (m) { -; 2580 : case STBI__MARKER_none: // no marker found -; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); -; 2582 : -; 2583 : case 0xDD: // DRI - specify restart interval -; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); -; 2585 : z->restart_interval = stbi__get16be(z->s); -; 2586 : return 1; -; 2587 : -; 2588 : case 0xDB: // DQT - define quantization table -; 2589 : L = stbi__get16be(z->s) - 2; -; 2590 : while (L > 0) { -; 2591 : int q = stbi__get8(z->s); -; 2592 : int p = q >> 4, sixteen = (p != 0); -; 2593 : int t = q & 15, i; -; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); -; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); -; 2596 : -; 2597 : for (i = 0; i < 64; ++i) -; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); -; 2599 : L -= (sixteen ? 129 : 65); -; 2600 : } -; 2601 : return L == 0; -; 2602 : -; 2603 : case 0xC4: // DHT - define huffman table -; 2604 : L = stbi__get16be(z->s) - 2; -; 2605 : while (L > 0) { -; 2606 : stbi_uc* v; -; 2607 : int sizes[16], i, n = 0; -; 2608 : int q = stbi__get8(z->s); -; 2609 : int tc = q >> 4; -; 2610 : int th = q & 15; -; 2611 : if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG"); -; 2612 : for (i = 0; i < 16; ++i) { -; 2613 : sizes[i] = stbi__get8(z->s); -; 2614 : n += sizes[i]; -; 2615 : } -; 2616 : if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values! -; 2617 : L -= 17; -; 2618 : if (tc == 0) { -; 2619 : if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0; -; 2620 : v = z->huff_dc[th].values; -; 2621 : } -; 2622 : else { -; 2623 : if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0; -; 2624 : v = z->huff_ac[th].values; -; 2625 : } -; 2626 : for (i = 0; i < n; ++i) -; 2627 : v[i] = stbi__get8(z->s); -; 2628 : if (tc != 0) -; 2629 : stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); -; 2630 : L -= n; -; 2631 : } -; 2632 : return L == 0; -; 2633 : } -; 2634 : -; 2635 : // check for comment block or APP blocks -; 2636 : if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { -; 2637 : L = stbi__get16be(z->s); -; 2638 : if (L < 2) { -; 2639 : if (m == 0xFE) -; 2640 : return stbi__err("bad COM len", "Corrupt JPEG"); -; 2641 : else -; 2642 : return stbi__err("bad APP len", "Corrupt JPEG"); -; 2643 : } -; 2644 : L -= 2; -; 2645 : -; 2646 : if (m == 0xE0 && L >= 5) { // JFIF APP0 segment -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) -; 2652 : ok = 0; -; 2653 : L -= 5; -; 2654 : if (ok) -; 2655 : z->jfif = 1; -; 2656 : } -; 2657 : else if (m == 0xEE && L >= 12) { // Adobe APP14 segment -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) -; 2663 : ok = 0; -; 2664 : L -= 6; -; 2665 : if (ok) { -; 2666 : stbi__get8(z->s); // version -; 2667 : stbi__get16be(z->s); // flags0 -; 2668 : stbi__get16be(z->s); // flags1 -; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform -; 2670 : L -= 6; -; 2671 : } -; 2672 : } -; 2673 : -; 2674 : stbi__skip(z->s, L); -; 2675 : return 1; -; 2676 : } -; 2677 : -; 2678 : return stbi__err("unknown marker", "Corrupt JPEG"); -; 2679 : } -; 2680 : -; 2681 : // after we see SOS -; 2682 : static int stbi__process_scan_header(stbi__jpeg* z) -; 2683 : { -; 2684 : int i; -; 2685 : int Ls = stbi__get16be(z->s); -; 2686 : z->scan_n = stbi__get8(z->s); -; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); -; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); -; 2689 : for (i = 0; i < z->scan_n; ++i) { -; 2690 : int id = stbi__get8(z->s), which; -; 2691 : int q = stbi__get8(z->s); -; 2692 : for (which = 0; which < z->s->img_n; ++which) -; 2693 : if (z->img_comp[which].id == id) -; 2694 : break; -; 2695 : if (which == z->s->img_n) return 0; // no match -; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); -; 2698 : z->order[i] = which; -; 2699 : } -; 2700 : -; 2701 : { -; 2702 : int aa; -; 2703 : z->spec_start = stbi__get8(z->s); -; 2704 : z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 -; 2705 : aa = stbi__get8(z->s); -; 2706 : z->succ_high = (aa >> 4); -; 2707 : z->succ_low = (aa & 15); -; 2708 : if (z->progressive) { -; 2709 : if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) -; 2710 : return stbi__err("bad SOS", "Corrupt JPEG"); -; 2711 : } -; 2712 : else { -; 2713 : if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2714 : if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2715 : z->spec_end = 63; -; 2716 : } -; 2717 : } -; 2718 : -; 2719 : return 1; -; 2720 : } -; 2721 : -; 2722 : static int stbi__free_jpeg_components(stbi__jpeg* z, int ncomp, int why) -; 2723 : { -; 2724 : int i; -; 2725 : for (i = 0; i < ncomp; ++i) { -; 2726 : if (z->img_comp[i].raw_data) { -; 2727 : STBI_FREE(z->img_comp[i].raw_data); -; 2728 : z->img_comp[i].raw_data = NULL; -; 2729 : z->img_comp[i].data = NULL; -; 2730 : } -; 2731 : if (z->img_comp[i].raw_coeff) { -; 2732 : STBI_FREE(z->img_comp[i].raw_coeff); -; 2733 : z->img_comp[i].raw_coeff = 0; -; 2734 : z->img_comp[i].coeff = 0; -; 2735 : } -; 2736 : if (z->img_comp[i].linebuf) { -; 2737 : STBI_FREE(z->img_comp[i].linebuf); -; 2738 : z->img_comp[i].linebuf = NULL; -; 2739 : } -; 2740 : } -; 2741 : return why; -; 2742 : } -; 2743 : -; 2744 : static int stbi__process_frame_header(stbi__jpeg* z, int scan) -; 2745 : { -; 2746 : stbi__context* s = z->s; -; 2747 : int Lf, p, i, q, h_max = 1, v_max = 1, c; -; 2748 : Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG -; 2749 : p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline -; 2750 : s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG -; 2751 : s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires -; 2752 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2753 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2754 : c = stbi__get8(s); -; 2755 : if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG"); -; 2756 : s->img_n = c; -; 2757 : for (i = 0; i < c; ++i) { -; 2758 : z->img_comp[i].data = NULL; -; 2759 : z->img_comp[i].linebuf = NULL; -; 2760 : } -; 2761 : -; 2762 : if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG"); -; 2763 : -; 2764 : z->rgb = 0; -; 2765 : for (i = 0; i < s->img_n; ++i) { -; 2766 : static const unsigned char rgb[3] = { 'R', 'G', 'B' }; -; 2767 : z->img_comp[i].id = stbi__get8(s); -; 2768 : if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) -; 2769 : ++z->rgb; -; 2770 : q = stbi__get8(s); -; 2771 : z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H", "Corrupt JPEG"); -; 2772 : z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V", "Corrupt JPEG"); -; 2773 : z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ", "Corrupt JPEG"); -; 2774 : } -; 2775 : -; 2776 : if (scan != STBI__SCAN_load) return 1; -; 2777 : -; 2778 : if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); -; 2779 : -; 2780 : for (i = 0; i < s->img_n; ++i) { -; 2781 : if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; -; 2782 : if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; -; 2783 : } -; 2784 : -; 2785 : // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios -; 2786 : // and I've never seen a non-corrupted JPEG file actually use them -; 2787 : for (i = 0; i < s->img_n; ++i) { -; 2788 : if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG"); -; 2789 : if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG"); -; 2790 : } -; 2791 : -; 2792 : // compute interleaved mcu info -; 2793 : z->img_h_max = h_max; -; 2794 : z->img_v_max = v_max; -; 2795 : z->img_mcu_w = h_max * 8; -; 2796 : z->img_mcu_h = v_max * 8; -; 2797 : // these sizes can't be more than 17 bits -; 2798 : z->img_mcu_x = (s->img_x + z->img_mcu_w - 1) / z->img_mcu_w; -; 2799 : z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h; -; 2800 : -; 2801 : for (i = 0; i < s->img_n; ++i) { -; 2802 : // number of effective pixels (e.g. for non-interleaved MCU) -; 2803 : z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max - 1) / h_max; -; 2804 : z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max - 1) / v_max; -; 2805 : // to simplify generation, we'll allocate enough memory to decode -; 2806 : // the bogus oversized data from using interleaved MCUs and their -; 2807 : // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't -; 2808 : // discard the extra data until colorspace conversion -; 2809 : // -; 2810 : // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) -; 2811 : // so these muls can't overflow with 32-bit ints (which we require) -; 2812 : z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; -; 2813 : z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; -; 2814 : z->img_comp[i].coeff = 0; -; 2815 : z->img_comp[i].raw_coeff = 0; -; 2816 : z->img_comp[i].linebuf = NULL; -; 2817 : z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); -; 2818 : if (z->img_comp[i].raw_data == NULL) -; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2820 : // align blocks for idct using mmx/sse -; 2821 : z->img_comp[i].data = (stbi_uc*)(((size_t)z->img_comp[i].raw_data + 15) & ~15); -; 2822 : if (z->progressive) { -; 2823 : // w2, h2 are multiples of 8 (see above) -; 2824 : z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; -; 2825 : z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; -; 2826 : z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); -; 2827 : if (z->img_comp[i].raw_coeff == NULL) -; 2828 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2829 : z->img_comp[i].coeff = (short*)(((size_t)z->img_comp[i].raw_coeff + 15) & ~15); -; 2830 : } -; 2831 : } -; 2832 : -; 2833 : return 1; -; 2834 : } -; 2835 : -; 2836 : // use comparisons since in some cases we handle more than one case (e.g. SOF) -; 2837 : #define stbi__DNL(x) ((x) == 0xdc) -; 2838 : #define stbi__SOI(x) ((x) == 0xd8) -; 2839 : #define stbi__EOI(x) ((x) == 0xd9) -; 2840 : #define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) -; 2841 : #define stbi__SOS(x) ((x) == 0xda) -; 2842 : -; 2843 : #define stbi__SOF_progressive(x) ((x) == 0xc2) -; 2844 : -; 2845 : static int stbi__decode_jpeg_header(stbi__jpeg* z, int scan) -; 2846 : { -; 2847 : int m; -; 2848 : z->jfif = 0; -; 2849 : z->app14_color_transform = -1; // valid values are 0,1,2 -; 2850 : z->marker = STBI__MARKER_none; // initialize cached marker to empty -; 2851 : m = stbi__get_marker(z); -; 2852 : if (!stbi__SOI(m)) return stbi__err("no SOI", "Corrupt JPEG"); -; 2853 : if (scan == STBI__SCAN_type) return 1; -; 2854 : m = stbi__get_marker(z); -; 2855 : while (!stbi__SOF(m)) { -; 2856 : if (!stbi__process_marker(z, m)) return 0; -; 2857 : m = stbi__get_marker(z); -; 2858 : while (m == STBI__MARKER_none) { -; 2859 : // some files have extra padding after their blocks, so ok, we'll scan -; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); -; 2861 : m = stbi__get_marker(z); -; 2862 : } -; 2863 : } -; 2864 : z->progressive = stbi__SOF_progressive(m); -; 2865 : if (!stbi__process_frame_header(z, scan)) return 0; -; 2866 : return 1; -; 2867 : } -; 2868 : -; 2869 : static int stbi__skip_jpeg_junk_at_end(stbi__jpeg* j) -; 2870 : { -; 2871 : // some JPEGs have junk at end, skip over it but if we find what looks -; 2872 : // like a valid marker, resume there -; 2873 : while (!stbi__at_eof(j->s)) { -; 2874 : int x = stbi__get8(j->s); -; 2875 : while (x == 255) { // might be a marker -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; -; 2877 : x = stbi__get8(j->s); -; 2878 : if (x != 0x00 && x != 0xff) { -; 2879 : // not a stuffed zero or lead-in to another marker, looks -; 2880 : // like an actual marker, return it -; 2881 : return x; -; 2882 : } -; 2883 : // stuffed zero has x=0 now which ends the loop, meaning we go -; 2884 : // back to regular scan loop. -; 2885 : // repeated 0xff keeps trying to read the next byte of the marker. -; 2886 : } -; 2887 : } -; 2888 : return STBI__MARKER_none; -; 2889 : } -; 2890 : -; 2891 : // decode image to YCbCr format -; 2892 : static int stbi__decode_jpeg_image(stbi__jpeg* j) -; 2893 : { -; 2894 : int m; -; 2895 : for (m = 0; m < 4; m++) { -; 2896 : j->img_comp[m].raw_data = NULL; -; 2897 : j->img_comp[m].raw_coeff = NULL; -; 2898 : } -; 2899 : j->restart_interval = 0; -; 2900 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; -; 2901 : m = stbi__get_marker(j); -; 2902 : while (!stbi__EOI(m)) { -; 2903 : if (stbi__SOS(m)) { -; 2904 : if (!stbi__process_scan_header(j)) return 0; -; 2905 : if (!stbi__parse_entropy_coded_data(j)) return 0; -; 2906 : if (j->marker == STBI__MARKER_none) { -; 2907 : j->marker = stbi__skip_jpeg_junk_at_end(j); -; 2908 : // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 -; 2909 : } -; 2910 : m = stbi__get_marker(j); -; 2911 : if (STBI__RESTART(m)) -; 2912 : m = stbi__get_marker(j); -; 2913 : } -; 2914 : else if (stbi__DNL(m)) { -; 2915 : int Ld = stbi__get16be(j->s); -; 2916 : stbi__uint32 NL = stbi__get16be(j->s); -; 2917 : if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); -; 2918 : if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); -; 2919 : m = stbi__get_marker(j); -; 2920 : } -; 2921 : else { -; 2922 : if (!stbi__process_marker(j, m)) return 1; -; 2923 : m = stbi__get_marker(j); -; 2924 : } -; 2925 : } -; 2926 : if (j->progressive) -; 2927 : stbi__jpeg_finish(j); -; 2928 : return 1; -; 2929 : } -; 2930 : -; 2931 : // static jfif-centered resampling (across block boundaries) -; 2932 : -; 2933 : typedef stbi_uc* (*resample_row_func)(stbi_uc* out, stbi_uc* in0, stbi_uc* in1, -; 2934 : int w, int hs); -; 2935 : -; 2936 : #define stbi__div4(x) ((stbi_uc) ((x) >> 2)) -; 2937 : -; 2938 : static stbi_uc* resample_row_1(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2939 : { -; 2940 : STBI_NOTUSED(out); -; 2941 : STBI_NOTUSED(in_far); -; 2942 : STBI_NOTUSED(w); -; 2943 : STBI_NOTUSED(hs); -; 2944 : return in_near; -; 2945 : } -; 2946 : -; 2947 : static stbi_uc* stbi__resample_row_v_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2948 : { -; 2949 : // need to generate two samples vertically for every one in input -; 2950 : int i; -; 2951 : STBI_NOTUSED(hs); -; 2952 : for (i = 0; i < w; ++i) -; 2953 : out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2); -; 2954 : return out; -; 2955 : } -; 2956 : -; 2957 : static stbi_uc* stbi__resample_row_h_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2958 : { -; 2959 : // need to generate two samples horizontally for every one in input -; 2960 : int i; -; 2961 : stbi_uc* input = in_near; -; 2962 : -; 2963 : if (w == 1) { -; 2964 : // if only one sample, can't do any interpolation -; 2965 : out[0] = out[1] = input[0]; -; 2966 : return out; -; 2967 : } -; 2968 : -; 2969 : out[0] = input[0]; -; 2970 : out[1] = stbi__div4(input[0] * 3 + input[1] + 2); -; 2971 : for (i = 1; i < w - 1; ++i) { -; 2972 : int n = 3 * input[i] + 2; -; 2973 : out[i * 2 + 0] = stbi__div4(n + input[i - 1]); -; 2974 : out[i * 2 + 1] = stbi__div4(n + input[i + 1]); -; 2975 : } -; 2976 : out[i * 2 + 0] = stbi__div4(input[w - 2] * 3 + input[w - 1] + 2); -; 2977 : out[i * 2 + 1] = input[w - 1]; -; 2978 : -; 2979 : STBI_NOTUSED(in_far); -; 2980 : STBI_NOTUSED(hs); -; 2981 : -; 2982 : return out; -; 2983 : } -; 2984 : -; 2985 : #define stbi__div16(x) ((stbi_uc) ((x) >> 4)) -; 2986 : -; 2987 : static stbi_uc* stbi__resample_row_hv_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2988 : { -; 2989 : // need to generate 2x2 samples for every one in input -; 2990 : int i, t0, t1; -; 2991 : if (w == 1) { -; 2992 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 2993 : return out; -; 2994 : } -; 2995 : -; 2996 : t1 = 3 * in_near[0] + in_far[0]; -; 2997 : out[0] = stbi__div4(t1 + 2); -; 2998 : for (i = 1; i < w; ++i) { -; 2999 : t0 = t1; -; 3000 : t1 = 3 * in_near[i] + in_far[i]; -; 3001 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3002 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3003 : } -; 3004 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3005 : -; 3006 : STBI_NOTUSED(hs); -; 3007 : -; 3008 : return out; -; 3009 : } -; 3010 : -; 3011 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3012 : static stbi_uc* stbi__resample_row_hv_2_simd(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3013 : { -; 3014 : // need to generate 2x2 samples for every one in input -; 3015 : int i = 0, t0, t1; -; 3016 : -; 3017 : if (w == 1) { -; 3018 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 3019 : return out; -; 3020 : } -; 3021 : -; 3022 : t1 = 3 * in_near[0] + in_far[0]; -; 3023 : // process groups of 8 pixels for as long as we can. -; 3024 : // note we can't handle the last pixel in a row in this loop -; 3025 : // because we need to handle the filter boundary conditions. -; 3026 : for (; i < ((w - 1) & ~7); i += 8) { -; 3027 : #if defined(STBI_SSE2) -; 3028 : // load and perform the vertical filtering pass -; 3029 : // this uses 3*x + y = 4*x + (y - x) -; 3030 : __m128i zero = _mm_setzero_si128(); -; 3031 : __m128i farb = _mm_loadl_epi64((__m128i*) (in_far + i)); -; 3032 : __m128i nearb = _mm_loadl_epi64((__m128i*) (in_near + i)); -; 3033 : __m128i farw = _mm_unpacklo_epi8(farb, zero); -; 3034 : __m128i nearw = _mm_unpacklo_epi8(nearb, zero); -; 3035 : __m128i diff = _mm_sub_epi16(farw, nearw); -; 3036 : __m128i nears = _mm_slli_epi16(nearw, 2); -; 3037 : __m128i curr = _mm_add_epi16(nears, diff); // current row -; 3038 : -; 3039 : // horizontal filter works the same based on shifted vers of current -; 3040 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3041 : // insert the previous pixel value (from t1). -; 3042 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3043 : // of next block of 8 pixels added in. -; 3044 : __m128i prv0 = _mm_slli_si128(curr, 2); -; 3045 : __m128i nxt0 = _mm_srli_si128(curr, 2); -; 3046 : __m128i prev = _mm_insert_epi16(prv0, t1, 0); -; 3047 : __m128i next = _mm_insert_epi16(nxt0, 3 * in_near[i + 8] + in_far[i + 8], 7); -; 3048 : -; 3049 : // horizontal filter, polyphase implementation since it's convenient: -; 3050 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3051 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3052 : // note the shared term. -; 3053 : __m128i bias = _mm_set1_epi16(8); -; 3054 : __m128i curs = _mm_slli_epi16(curr, 2); -; 3055 : __m128i prvd = _mm_sub_epi16(prev, curr); -; 3056 : __m128i nxtd = _mm_sub_epi16(next, curr); -; 3057 : __m128i curb = _mm_add_epi16(curs, bias); -; 3058 : __m128i even = _mm_add_epi16(prvd, curb); -; 3059 : __m128i odd = _mm_add_epi16(nxtd, curb); -; 3060 : -; 3061 : // interleave even and odd pixels, then undo scaling. -; 3062 : __m128i int0 = _mm_unpacklo_epi16(even, odd); -; 3063 : __m128i int1 = _mm_unpackhi_epi16(even, odd); -; 3064 : __m128i de0 = _mm_srli_epi16(int0, 4); -; 3065 : __m128i de1 = _mm_srli_epi16(int1, 4); -; 3066 : -; 3067 : // pack and write output -; 3068 : __m128i outv = _mm_packus_epi16(de0, de1); -; 3069 : _mm_storeu_si128((__m128i*) (out + i * 2), outv); -; 3070 : #elif defined(STBI_NEON) -; 3071 : // load and perform the vertical filtering pass -; 3072 : // this uses 3*x + y = 4*x + (y - x) -; 3073 : uint8x8_t farb = vld1_u8(in_far + i); -; 3074 : uint8x8_t nearb = vld1_u8(in_near + i); -; 3075 : int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); -; 3076 : int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); -; 3077 : int16x8_t curr = vaddq_s16(nears, diff); // current row -; 3078 : -; 3079 : // horizontal filter works the same based on shifted vers of current -; 3080 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3081 : // insert the previous pixel value (from t1). -; 3082 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3083 : // of next block of 8 pixels added in. -; 3084 : int16x8_t prv0 = vextq_s16(curr, curr, 7); -; 3085 : int16x8_t nxt0 = vextq_s16(curr, curr, 1); -; 3086 : int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); -; 3087 : int16x8_t next = vsetq_lane_s16(3 * in_near[i + 8] + in_far[i + 8], nxt0, 7); -; 3088 : -; 3089 : // horizontal filter, polyphase implementation since it's convenient: -; 3090 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3091 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3092 : // note the shared term. -; 3093 : int16x8_t curs = vshlq_n_s16(curr, 2); -; 3094 : int16x8_t prvd = vsubq_s16(prev, curr); -; 3095 : int16x8_t nxtd = vsubq_s16(next, curr); -; 3096 : int16x8_t even = vaddq_s16(curs, prvd); -; 3097 : int16x8_t odd = vaddq_s16(curs, nxtd); -; 3098 : -; 3099 : // undo scaling and round, then store with even/odd phases interleaved -; 3100 : uint8x8x2_t o; -; 3101 : o.val[0] = vqrshrun_n_s16(even, 4); -; 3102 : o.val[1] = vqrshrun_n_s16(odd, 4); -; 3103 : vst2_u8(out + i * 2, o); -; 3104 : #endif -; 3105 : -; 3106 : // "previous" value for next iter -; 3107 : t1 = 3 * in_near[i + 7] + in_far[i + 7]; -; 3108 : } -; 3109 : -; 3110 : t0 = t1; -; 3111 : t1 = 3 * in_near[i] + in_far[i]; -; 3112 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3113 : -; 3114 : for (++i; i < w; ++i) { -; 3115 : t0 = t1; -; 3116 : t1 = 3 * in_near[i] + in_far[i]; -; 3117 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3118 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3119 : } -; 3120 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3121 : -; 3122 : STBI_NOTUSED(hs); -; 3123 : -; 3124 : return out; -; 3125 : } -; 3126 : #endif -; 3127 : -; 3128 : static stbi_uc* stbi__resample_row_generic(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3129 : { -; 3130 : // resample with nearest-neighbor -; 3131 : int i, j; -; 3132 : STBI_NOTUSED(in_far); -; 3133 : for (i = 0; i < w; ++i) -; 3134 : for (j = 0; j < hs; ++j) -; 3135 : out[i * hs + j] = in_near[i]; -; 3136 : return out; -; 3137 : } -; 3138 : -; 3139 : // this is a reduced-precision calculation of YCbCr-to-RGB introduced -; 3140 : // to make sure the code produces the same results in both SIMD and scalar -; 3141 : #define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) -; 3142 : static void stbi__YCbCr_to_RGB_row(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step) -; 3143 : { -; 3144 : int i; -; 3145 : for (i = 0; i < count; ++i) { -; 3146 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3147 : int r, g, b; -; 3148 : int cr = pcr[i] - 128; -; 3149 : int cb = pcb[i] - 128; -; 3150 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3151 : g = y_fixed + (cr * -stbi__float2fixed(0.71414f)) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3152 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3153 : r >>= 20; -; 3154 : g >>= 20; -; 3155 : b >>= 20; -; 3156 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3157 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3158 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3159 : out[0] = (stbi_uc)r; -; 3160 : out[1] = (stbi_uc)g; -; 3161 : out[2] = (stbi_uc)b; -; 3162 : out[3] = 255; -; 3163 : out += step; -; 3164 : } -; 3165 : } -; 3166 : -; 3167 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3168 : static void stbi__YCbCr_to_RGB_simd(stbi_uc* out, stbi_uc const* y, stbi_uc const* pcb, stbi_uc const* pcr, int count, int step) -; 3169 : { -; 3170 : int i = 0; -; 3171 : -; 3172 : #ifdef STBI_SSE2 -; 3173 : // step == 3 is pretty ugly on the final interleave, and i'm not convinced -; 3174 : // it's useful in practice (you wouldn't use it for textures, for example). -; 3175 : // so just accelerate step == 4 case. -; 3176 : if (step == 4) { -; 3177 : // this is a fairly straightforward implementation and not super-optimized. -; 3178 : __m128i signflip = _mm_set1_epi8(-0x80); -; 3179 : __m128i cr_const0 = _mm_set1_epi16((short)(1.40200f * 4096.0f + 0.5f)); -; 3180 : __m128i cr_const1 = _mm_set1_epi16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3181 : __m128i cb_const0 = _mm_set1_epi16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3182 : __m128i cb_const1 = _mm_set1_epi16((short)(1.77200f * 4096.0f + 0.5f)); -; 3183 : __m128i y_bias = _mm_set1_epi8((char)(unsigned char)128); -; 3184 : __m128i xw = _mm_set1_epi16(255); // alpha channel -; 3185 : -; 3186 : for (; i + 7 < count; i += 8) { -; 3187 : // load -; 3188 : __m128i y_bytes = _mm_loadl_epi64((__m128i*) (y + i)); -; 3189 : __m128i cr_bytes = _mm_loadl_epi64((__m128i*) (pcr + i)); -; 3190 : __m128i cb_bytes = _mm_loadl_epi64((__m128i*) (pcb + i)); -; 3191 : __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 -; 3192 : __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 -; 3193 : -; 3194 : // unpack to short (and left-shift cr, cb by 8) -; 3195 : __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); -; 3196 : __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); -; 3197 : __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); -; 3198 : -; 3199 : // color transform -; 3200 : __m128i yws = _mm_srli_epi16(yw, 4); -; 3201 : __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); -; 3202 : __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); -; 3203 : __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); -; 3204 : __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); -; 3205 : __m128i rws = _mm_add_epi16(cr0, yws); -; 3206 : __m128i gwt = _mm_add_epi16(cb0, yws); -; 3207 : __m128i bws = _mm_add_epi16(yws, cb1); -; 3208 : __m128i gws = _mm_add_epi16(gwt, cr1); -; 3209 : -; 3210 : // descale -; 3211 : __m128i rw = _mm_srai_epi16(rws, 4); -; 3212 : __m128i bw = _mm_srai_epi16(bws, 4); -; 3213 : __m128i gw = _mm_srai_epi16(gws, 4); -; 3214 : -; 3215 : // back to byte, set up for transpose -; 3216 : __m128i brb = _mm_packus_epi16(rw, bw); -; 3217 : __m128i gxb = _mm_packus_epi16(gw, xw); -; 3218 : -; 3219 : // transpose to interleave channels -; 3220 : __m128i t0 = _mm_unpacklo_epi8(brb, gxb); -; 3221 : __m128i t1 = _mm_unpackhi_epi8(brb, gxb); -; 3222 : __m128i o0 = _mm_unpacklo_epi16(t0, t1); -; 3223 : __m128i o1 = _mm_unpackhi_epi16(t0, t1); -; 3224 : -; 3225 : // store -; 3226 : _mm_storeu_si128((__m128i*) (out + 0), o0); -; 3227 : _mm_storeu_si128((__m128i*) (out + 16), o1); -; 3228 : out += 32; -; 3229 : } -; 3230 : } -; 3231 : #endif -; 3232 : -; 3233 : #ifdef STBI_NEON -; 3234 : // in this version, step=3 support would be easy to add. but is there demand? -; 3235 : if (step == 4) { -; 3236 : // this is a fairly straightforward implementation and not super-optimized. -; 3237 : uint8x8_t signflip = vdup_n_u8(0x80); -; 3238 : int16x8_t cr_const0 = vdupq_n_s16((short)(1.40200f * 4096.0f + 0.5f)); -; 3239 : int16x8_t cr_const1 = vdupq_n_s16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3240 : int16x8_t cb_const0 = vdupq_n_s16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3241 : int16x8_t cb_const1 = vdupq_n_s16((short)(1.77200f * 4096.0f + 0.5f)); -; 3242 : -; 3243 : for (; i + 7 < count; i += 8) { -; 3244 : // load -; 3245 : uint8x8_t y_bytes = vld1_u8(y + i); -; 3246 : uint8x8_t cr_bytes = vld1_u8(pcr + i); -; 3247 : uint8x8_t cb_bytes = vld1_u8(pcb + i); -; 3248 : int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); -; 3249 : int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); -; 3250 : -; 3251 : // expand to s16 -; 3252 : int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); -; 3253 : int16x8_t crw = vshll_n_s8(cr_biased, 7); -; 3254 : int16x8_t cbw = vshll_n_s8(cb_biased, 7); -; 3255 : -; 3256 : // color transform -; 3257 : int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); -; 3258 : int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); -; 3259 : int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); -; 3260 : int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); -; 3261 : int16x8_t rws = vaddq_s16(yws, cr0); -; 3262 : int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); -; 3263 : int16x8_t bws = vaddq_s16(yws, cb1); -; 3264 : -; 3265 : // undo scaling, round, convert to byte -; 3266 : uint8x8x4_t o; -; 3267 : o.val[0] = vqrshrun_n_s16(rws, 4); -; 3268 : o.val[1] = vqrshrun_n_s16(gws, 4); -; 3269 : o.val[2] = vqrshrun_n_s16(bws, 4); -; 3270 : o.val[3] = vdup_n_u8(255); -; 3271 : -; 3272 : // store, interleaving r/g/b/a -; 3273 : vst4_u8(out, o); -; 3274 : out += 8 * 4; -; 3275 : } -; 3276 : } -; 3277 : #endif -; 3278 : -; 3279 : for (; i < count; ++i) { -; 3280 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3281 : int r, g, b; -; 3282 : int cr = pcr[i] - 128; -; 3283 : int cb = pcb[i] - 128; -; 3284 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3285 : g = y_fixed + cr * -stbi__float2fixed(0.71414f) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3286 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3287 : r >>= 20; -; 3288 : g >>= 20; -; 3289 : b >>= 20; -; 3290 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3291 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3292 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3293 : out[0] = (stbi_uc)r; -; 3294 : out[1] = (stbi_uc)g; -; 3295 : out[2] = (stbi_uc)b; -; 3296 : out[3] = 255; -; 3297 : out += step; -; 3298 : } -; 3299 : } -; 3300 : #endif -; 3301 : -; 3302 : // set up the kernels -; 3303 : static void stbi__setup_jpeg(stbi__jpeg* j) -; 3304 : { -; 3305 : j->idct_block_kernel = stbi__idct_block; -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; -; 3308 : -; 3309 : #ifdef STBI_SSE2 -; 3310 : if (stbi__sse2_available()) { -; 3311 : j->idct_block_kernel = stbi__idct_simd; -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3314 : } -; 3315 : #endif -; 3316 : -; 3317 : #ifdef STBI_NEON -; 3318 : j->idct_block_kernel = stbi__idct_simd; -; 3319 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3320 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3321 : #endif -; 3322 : } -; 3323 : -; 3324 : // clean up the temporary component buffers -; 3325 : static void stbi__cleanup_jpeg(stbi__jpeg* j) -; 3326 : { -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); -; 3328 : } -; 3329 : -; 3330 : typedef struct -; 3331 : { -; 3332 : resample_row_func resample; -; 3333 : stbi_uc* line0, * line1; -; 3334 : int hs, vs; // expansion factor in each axis -; 3335 : int w_lores; // horizontal pixels pre-expansion -; 3336 : int ystep; // how far through vertical expansion we are -; 3337 : int ypos; // which pre-expansion row we're on -; 3338 : } stbi__resample; -; 3339 : -; 3340 : // fast 0..255 * 0..255 => 0..255 rounded multiplication -; 3341 : static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) -; 3342 : { -; 3343 : unsigned int t = x * y + 128; -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); -; 3345 : } -; 3346 : -; 3347 : static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp, int req_comp) -; 3348 : { -; 3349 : int n, decode_n, is_rgb; -; 3350 : z->s->img_n = 0; // make stbi__cleanup_jpeg safe -; 3351 : -; 3352 : // validate req_comp -; 3353 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 3354 : -; 3355 : // load a jpeg image from whichever source, but leave in YCbCr format -; 3356 : if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } -; 3357 : -; 3358 : // determine actual number of components to generate -; 3359 : n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; -; 3360 : -; 3361 : is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); -; 3362 : -; 3363 : if (z->s->img_n == 3 && n < 3 && !is_rgb) -; 3364 : decode_n = 1; -; 3365 : else -; 3366 : decode_n = z->s->img_n; -; 3367 : -; 3368 : // nothing to do if no components requested; check this now to avoid -; 3369 : // accessing uninitialized coutput[0] later -; 3370 : if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } -; 3371 : -; 3372 : // resample and color-convert -; 3373 : { -; 3374 : int k; -; 3375 : unsigned int i, j; -; 3376 : stbi_uc* output; -; 3377 : stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL }; -; 3378 : -; 3379 : stbi__resample res_comp[4]; -; 3380 : -; 3381 : for (k = 0; k < decode_n; ++k) { -; 3382 : stbi__resample* r = &res_comp[k]; -; 3383 : -; 3384 : // allocate line buffer big enough for upsampling off the edges -; 3385 : // with upsample factor of 4 -; 3386 : z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3); -; 3387 : if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3388 : -; 3389 : r->hs = z->img_h_max / z->img_comp[k].h; -; 3390 : r->vs = z->img_v_max / z->img_comp[k].v; -; 3391 : r->ystep = r->vs >> 1; -; 3392 : r->w_lores = (z->s->img_x + r->hs - 1) / r->hs; -; 3393 : r->ypos = 0; -; 3394 : r->line0 = r->line1 = z->img_comp[k].data; -; 3395 : -; 3396 : if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; -; 3397 : else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; -; 3398 : else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; -; 3399 : else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; -; 3400 : else r->resample = stbi__resample_row_generic; -; 3401 : } -; 3402 : -; 3403 : // can't error after this so, this is safe -; 3404 : output = (stbi_uc*)stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); -; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3406 : -; 3407 : // now go ahead and resample -; 3408 : for (j = 0; j < z->s->img_y; ++j) { -; 3409 : stbi_uc* out = output + n * z->s->img_x * j; -; 3410 : for (k = 0; k < decode_n; ++k) { -; 3411 : stbi__resample* r = &res_comp[k]; -; 3412 : int y_bot = r->ystep >= (r->vs >> 1); -; 3413 : coutput[k] = r->resample(z->img_comp[k].linebuf, -; 3414 : y_bot ? r->line1 : r->line0, -; 3415 : y_bot ? r->line0 : r->line1, -; 3416 : r->w_lores, r->hs); -; 3417 : if (++r->ystep >= r->vs) { -; 3418 : r->ystep = 0; -; 3419 : r->line0 = r->line1; -; 3420 : if (++r->ypos < z->img_comp[k].y) -; 3421 : r->line1 += z->img_comp[k].w2; -; 3422 : } -; 3423 : } -; 3424 : if (n >= 3) { -; 3425 : stbi_uc* y = coutput[0]; -; 3426 : if (z->s->img_n == 3) { -; 3427 : if (is_rgb) { -; 3428 : for (i = 0; i < z->s->img_x; ++i) { -; 3429 : out[0] = y[i]; -; 3430 : out[1] = coutput[1][i]; -; 3431 : out[2] = coutput[2][i]; -; 3432 : out[3] = 255; -; 3433 : out += n; -; 3434 : } -; 3435 : } -; 3436 : else { -; 3437 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3438 : } -; 3439 : } -; 3440 : else if (z->s->img_n == 4) { -; 3441 : if (z->app14_color_transform == 0) { // CMYK -; 3442 : for (i = 0; i < z->s->img_x; ++i) { -; 3443 : stbi_uc m = coutput[3][i]; -; 3444 : out[0] = stbi__blinn_8x8(coutput[0][i], m); -; 3445 : out[1] = stbi__blinn_8x8(coutput[1][i], m); -; 3446 : out[2] = stbi__blinn_8x8(coutput[2][i], m); -; 3447 : out[3] = 255; -; 3448 : out += n; -; 3449 : } -; 3450 : } -; 3451 : else if (z->app14_color_transform == 2) { // YCCK -; 3452 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3453 : for (i = 0; i < z->s->img_x; ++i) { -; 3454 : stbi_uc m = coutput[3][i]; -; 3455 : out[0] = stbi__blinn_8x8(255 - out[0], m); -; 3456 : out[1] = stbi__blinn_8x8(255 - out[1], m); -; 3457 : out[2] = stbi__blinn_8x8(255 - out[2], m); -; 3458 : out += n; -; 3459 : } -; 3460 : } -; 3461 : else { // YCbCr + alpha? Ignore the fourth channel for now -; 3462 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3463 : } -; 3464 : } -; 3465 : else -; 3466 : for (i = 0; i < z->s->img_x; ++i) { -; 3467 : out[0] = out[1] = out[2] = y[i]; -; 3468 : out[3] = 255; // not used if n==3 -; 3469 : out += n; -; 3470 : } -; 3471 : } -; 3472 : else { -; 3473 : if (is_rgb) { -; 3474 : if (n == 1) -; 3475 : for (i = 0; i < z->s->img_x; ++i) -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3477 : else { -; 3478 : for (i = 0; i < z->s->img_x; ++i, out += 2) { -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3480 : out[1] = 255; -; 3481 : } -; 3482 : } -; 3483 : } -; 3484 : else if (z->s->img_n == 4 && z->app14_color_transform == 0) { -; 3485 : for (i = 0; i < z->s->img_x; ++i) { -; 3486 : stbi_uc m = coutput[3][i]; -; 3487 : stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); -; 3488 : stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); -; 3489 : stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); -; 3490 : out[0] = stbi__compute_y(r, g, b); -; 3491 : out[1] = 255; -; 3492 : out += n; -; 3493 : } -; 3494 : } -; 3495 : else if (z->s->img_n == 4 && z->app14_color_transform == 2) { -; 3496 : for (i = 0; i < z->s->img_x; ++i) { -; 3497 : out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); -; 3498 : out[1] = 255; -; 3499 : out += n; -; 3500 : } -; 3501 : } -; 3502 : else { -; 3503 : stbi_uc* y = coutput[0]; -; 3504 : if (n == 1) -; 3505 : for (i = 0; i < z->s->img_x; ++i) out[i] = y[i]; -; 3506 : else -; 3507 : for (i = 0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } -; 3508 : } -; 3509 : } -; 3510 : } -; 3511 : stbi__cleanup_jpeg(z); -; 3512 : *out_x = z->s->img_x; -; 3513 : *out_y = z->s->img_y; -; 3514 : if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output -; 3515 : return output; -; 3516 : } -; 3517 : } -; 3518 : -; 3519 : static void* stbi__jpeg_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 3520 : { -; 3521 : unsigned char* result; -; 3522 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); -; 3524 : memset(j, 0, sizeof(stbi__jpeg)); -; 3525 : STBI_NOTUSED(ri); -; 3526 : j->s = s; -; 3527 : stbi__setup_jpeg(j); -; 3528 : result = load_jpeg_image(j, x, y, comp, req_comp); -; 3529 : STBI_FREE(j); -; 3530 : return result; -; 3531 : } -; 3532 : -; 3533 : static int stbi__jpeg_test(stbi__context* s) -; 3534 : { -; 3535 : int r; -; 3536 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3538 : memset(j, 0, sizeof(stbi__jpeg)); -; 3539 : j->s = s; -; 3540 : stbi__setup_jpeg(j); -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); -; 3542 : stbi__rewind(s); -; 3543 : STBI_FREE(j); -; 3544 : return r; -; 3545 : } -; 3546 : -; 3547 : static int stbi__jpeg_info_raw(stbi__jpeg* j, int* x, int* y, int* comp) -; 3548 : { -; 3549 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { -; 3550 : stbi__rewind(j->s); -; 3551 : return 0; -; 3552 : } -; 3553 : if (x) *x = j->s->img_x; -; 3554 : if (y) *y = j->s->img_y; -; 3555 : if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; -; 3556 : return 1; -; 3557 : } -; 3558 : -; 3559 : static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp) -; 3560 : { -; 3561 : int result; -; 3562 : stbi__jpeg* j = (stbi__jpeg*)(stbi__malloc(sizeof(stbi__jpeg))); -; 3563 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3564 : memset(j, 0, sizeof(stbi__jpeg)); -; 3565 : j->s = s; -; 3566 : result = stbi__jpeg_info_raw(j, x, y, comp); -; 3567 : STBI_FREE(j); -; 3568 : return result; -; 3569 : } -; 3570 : #endif -; 3571 : -; 3572 : // public domain zlib decode v0.2 Sean Barrett 2006-11-18 -; 3573 : // simple implementation -; 3574 : // - all input must be provided in an upfront buffer -; 3575 : // - all output is written to a single output buffer (can malloc/realloc) -; 3576 : // performance -; 3577 : // - fast huffman -; 3578 : -; 3579 : #ifndef STBI_NO_ZLIB -; 3580 : -; 3581 : // fast-way is faster to check than jpeg huffman, but slow way is slower -; 3582 : #define STBI__ZFAST_BITS 9 // accelerate all cases in default tables -; 3583 : #define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) -; 3584 : #define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet -; 3585 : -; 3586 : // zlib-style huffman encoding -; 3587 : // (jpegs packs from left, zlib from right, so can't share code) -; 3588 : typedef struct -; 3589 : { -; 3590 : stbi__uint16 fast[1 << STBI__ZFAST_BITS]; -; 3591 : stbi__uint16 firstcode[16]; -; 3592 : int maxcode[17]; -; 3593 : stbi__uint16 firstsymbol[16]; -; 3594 : stbi_uc size[STBI__ZNSYMS]; -; 3595 : stbi__uint16 value[STBI__ZNSYMS]; -; 3596 : } stbi__zhuffman; -; 3597 : -; 3598 : stbi_inline static int stbi__bitreverse16(int n) -; 3599 : { -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); -; 3604 : return n; -; 3605 : } -; 3606 : -; 3607 : stbi_inline static int stbi__bit_reverse(int v, int bits) -; 3608 : { -; 3609 : STBI_ASSERT(bits <= 16); -; 3610 : // to bit reverse n bits, reverse 16 and shift -; 3611 : // e.g. 11 bits, bit reverse and shift away 5 -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); -; 3613 : } -; 3614 : -; 3615 : static int stbi__zbuild_huffman(stbi__zhuffman* z, const stbi_uc* sizelist, int num) -; 3616 : { -; 3617 : int i, k = 0; -; 3618 : int code, next_code[16], sizes[17]; -; 3619 : -; 3620 : // DEFLATE spec for generating codes -; 3621 : memset(sizes, 0, sizeof(sizes)); -; 3622 : memset(z->fast, 0, sizeof(z->fast)); -; 3623 : for (i = 0; i < num; ++i) -; 3624 : ++sizes[sizelist[i]]; -; 3625 : sizes[0] = 0; -; 3626 : for (i = 1; i < 16; ++i) -; 3627 : if (sizes[i] > (1 << i)) -; 3628 : return stbi__err("bad sizes", "Corrupt PNG"); -; 3629 : code = 0; -; 3630 : for (i = 1; i < 16; ++i) { -; 3631 : next_code[i] = code; -; 3632 : z->firstcode[i] = (stbi__uint16)code; -; 3633 : z->firstsymbol[i] = (stbi__uint16)k; -; 3634 : code = (code + sizes[i]); -; 3635 : if (sizes[i]) -; 3636 : if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3637 : z->maxcode[i] = code << (16 - i); // preshift for inner loop -; 3638 : code <<= 1; -; 3639 : k += sizes[i]; -; 3640 : } -; 3641 : z->maxcode[16] = 0x10000; // sentinel -; 3642 : for (i = 0; i < num; ++i) { -; 3643 : int s = sizelist[i]; -; 3644 : if (s) { -; 3645 : int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; -; 3646 : stbi__uint16 fastv = (stbi__uint16)((s << 9) | i); -; 3647 : z->size[c] = (stbi_uc)s; -; 3648 : z->value[c] = (stbi__uint16)i; -; 3649 : if (s <= STBI__ZFAST_BITS) { -; 3650 : int j = stbi__bit_reverse(next_code[s], s); -; 3651 : while (j < (1 << STBI__ZFAST_BITS)) { -; 3652 : z->fast[j] = fastv; -; 3653 : j += (1 << s); -; 3654 : } -; 3655 : } -; 3656 : ++next_code[s]; -; 3657 : } -; 3658 : } -; 3659 : return 1; -; 3660 : } -; 3661 : -; 3662 : // zlib-from-memory implementation for PNG reading -; 3663 : // because PNG allows splitting the zlib stream arbitrarily, -; 3664 : // and it's annoying structurally to have PNG call ZLIB call PNG, -; 3665 : // we require PNG read all the IDATs and combine them into a single -; 3666 : // memory buffer -; 3667 : -; 3668 : typedef struct -; 3669 : { -; 3670 : stbi_uc* zbuffer, * zbuffer_end; -; 3671 : int num_bits; -; 3672 : stbi__uint32 code_buffer; -; 3673 : -; 3674 : char* zout; -; 3675 : char* zout_start; -; 3676 : char* zout_end; -; 3677 : int z_expandable; -; 3678 : -; 3679 : stbi__zhuffman z_length, z_distance; -; 3680 : } stbi__zbuf; -; 3681 : -; 3682 : stbi_inline static int stbi__zeof(stbi__zbuf* z) -; 3683 : { -; 3684 : return (z->zbuffer >= z->zbuffer_end); -; 3685 : } -; 3686 : -; 3687 : stbi_inline static stbi_uc stbi__zget8(stbi__zbuf* z) -; 3688 : { -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ -; 3697 : return; -; 3698 : } -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; -; 3700 : z->num_bits += 8; -; 3701 : } while (z->num_bits <= 24); -; 3702 : } -; 3703 : -; 3704 : stbi_inline static unsigned int stbi__zreceive(stbi__zbuf* z, int n) -; 3705 : { -; 3706 : unsigned int k; -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); -; 3708 : k = z->code_buffer & ((1 << n) - 1); -; 3709 : z->code_buffer >>= n; -; 3710 : z->num_bits -= n; -; 3711 : return k; -; 3712 : } -; 3713 : -; 3714 : static int stbi__zhuffman_decode_slowpath(stbi__zbuf* a, stbi__zhuffman* z) -; 3715 : { -; 3716 : int b, s, k; -; 3717 : // not resolved by fast table, so compute it the slow way -; 3718 : // use jpeg approach, which requires MSbits at top -; 3719 : k = stbi__bit_reverse(a->code_buffer, 16); -; 3720 : for (s = STBI__ZFAST_BITS + 1; ; ++s) -; 3721 : if (k < z->maxcode[s]) -; 3722 : break; -; 3723 : if (s >= 16) return -1; // invalid code! -; 3724 : // code size is s, so: -; 3725 : b = (k >> (16 - s)) - z->firstcode[s] + z->firstsymbol[s]; -; 3726 : if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! -; 3727 : if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. -; 3728 : a->code_buffer >>= s; -; 3729 : a->num_bits -= s; -; 3730 : return z->value[b]; -; 3731 : } -; 3732 : -; 3733 : stbi_inline static int stbi__zhuffman_decode(stbi__zbuf* a, stbi__zhuffman* z) -; 3734 : { -; 3735 : int b, s; -; 3736 : if (a->num_bits < 16) { -; 3737 : if (stbi__zeof(a)) { -; 3738 : return -1; /* report error for unexpected end of data. */ -; 3739 : } -; 3740 : stbi__fill_bits(a); -; 3741 : } -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; -; 3743 : if (b) { -; 3744 : s = b >> 9; -; 3745 : a->code_buffer >>= s; -; 3746 : a->num_bits -= s; -; 3747 : return b & 511; -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); -; 3750 : } -; 3751 : -; 3752 : static int stbi__zexpand(stbi__zbuf* z, char* zout, int n) // need to make room for n bytes -; 3753 : { -; 3754 : char* q; -; 3755 : unsigned int cur, limit, old_limit; -; 3756 : z->zout = zout; -; 3757 : if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG"); -; 3758 : cur = (unsigned int)(z->zout - z->zout_start); -; 3759 : limit = old_limit = (unsigned)(z->zout_end - z->zout_start); -; 3760 : if (UINT_MAX - cur < (unsigned)n) return stbi__err("outofmem", "Out of memory"); -; 3761 : while (cur + n > limit) { -; 3762 : if (limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); -; 3763 : limit *= 2; -; 3764 : } -; 3765 : q = (char*)STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); -; 3766 : STBI_NOTUSED(old_limit); -; 3767 : if (q == NULL) return stbi__err("outofmem", "Out of memory"); -; 3768 : z->zout_start = q; -; 3769 : z->zout = q + cur; -; 3770 : z->zout_end = q + limit; -; 3771 : return 1; -; 3772 : } -; 3773 : -; 3774 : static const int stbi__zlength_base[31] = { -; 3775 : 3,4,5,6,7,8,9,10,11,13, -; 3776 : 15,17,19,23,27,31,35,43,51,59, -; 3777 : 67,83,99,115,131,163,195,227,258,0,0 }; -; 3778 : -; 3779 : static const int stbi__zlength_extra[31] = -; 3780 : { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; -; 3781 : -; 3782 : static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, -; 3783 : 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0 }; -; 3784 : -; 3785 : static const int stbi__zdist_extra[32] = -; 3786 : { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 }; -; 3787 : -; 3788 : static int stbi__parse_huffman_block(stbi__zbuf* a) -; 3789 : { -; 3790 : char* zout = a->zout; -; 3791 : for (;;) { -; 3792 : int z = stbi__zhuffman_decode(a, &a->z_length); -; 3793 : if (z < 256) { -; 3794 : if (z < 0) return stbi__err("bad huffman code", "Corrupt PNG"); // error in huffman codes -; 3795 : if (zout >= a->zout_end) { -; 3796 : if (!stbi__zexpand(a, zout, 1)) return 0; -; 3797 : zout = a->zout; -; 3798 : } -; 3799 : *zout++ = (char)z; -; 3800 : } -; 3801 : else { -; 3802 : stbi_uc* p; -; 3803 : int len, dist; -; 3804 : if (z == 256) { -; 3805 : a->zout = zout; -; 3806 : return 1; -; 3807 : } -; 3808 : if (z >= 286) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data -; 3809 : z -= 257; -; 3810 : len = stbi__zlength_base[z]; -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); -; 3812 : z = stbi__zhuffman_decode(a, &a->z_distance); -; 3813 : if (z < 0 || z >= 30) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data -; 3814 : dist = stbi__zdist_base[z]; -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); -; 3816 : if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG"); -; 3817 : if (zout + len > a->zout_end) { -; 3818 : if (!stbi__zexpand(a, zout, len)) return 0; -; 3819 : zout = a->zout; -; 3820 : } -; 3821 : p = (stbi_uc*)(zout - dist); -; 3822 : if (dist == 1) { // run of one byte; common in images. -; 3823 : stbi_uc v = *p; -; 3824 : if (len) { do *zout++ = v; while (--len); } -; 3825 : } -; 3826 : else { -; 3827 : if (len) { do *zout++ = *p++; while (--len); } -; 3828 : } -; 3829 : } -; 3830 : } -; 3831 : } -; 3832 : -; 3833 : static int stbi__compute_huffman_codes(stbi__zbuf* a) -; 3834 : { -; 3835 : static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; -; 3836 : stbi__zhuffman z_codelength; -; 3837 : stbi_uc lencodes[286 + 32 + 137];//padding for maximum single op -; 3838 : stbi_uc codelength_sizes[19]; -; 3839 : int i, n; -; 3840 : -; 3841 : int hlit = stbi__zreceive(a, 5) + 257; -; 3842 : int hdist = stbi__zreceive(a, 5) + 1; -; 3843 : int hclen = stbi__zreceive(a, 4) + 4; -; 3844 : int ntot = hlit + hdist; -; 3845 : -; 3846 : memset(codelength_sizes, 0, sizeof(codelength_sizes)); -; 3847 : for (i = 0; i < hclen; ++i) { -; 3848 : int s = stbi__zreceive(a, 3); -; 3849 : codelength_sizes[length_dezigzag[i]] = (stbi_uc)s; -; 3850 : } -; 3851 : if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; -; 3852 : -; 3853 : n = 0; -; 3854 : while (n < ntot) { -; 3855 : int c = stbi__zhuffman_decode(a, &z_codelength); -; 3856 : if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3857 : if (c < 16) -; 3858 : lencodes[n++] = (stbi_uc)c; -; 3859 : else { -; 3860 : stbi_uc fill = 0; -; 3861 : if (c == 16) { -; 3862 : c = stbi__zreceive(a, 2) + 3; -; 3863 : if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3864 : fill = lencodes[n - 1]; -; 3865 : } -; 3866 : else if (c == 17) { -; 3867 : c = stbi__zreceive(a, 3) + 3; -; 3868 : } -; 3869 : else if (c == 18) { -; 3870 : c = stbi__zreceive(a, 7) + 11; -; 3871 : } -; 3872 : else { -; 3873 : return stbi__err("bad codelengths", "Corrupt PNG"); -; 3874 : } -; 3875 : if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3876 : memset(lencodes + n, fill, c); -; 3877 : n += c; -; 3878 : } -; 3879 : } -; 3880 : if (n != ntot) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3881 : if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; -; 3882 : if (!stbi__zbuild_huffman(&a->z_distance, lencodes + hlit, hdist)) return 0; -; 3883 : return 1; -; 3884 : } -; 3885 : -; 3886 : static int stbi__parse_uncompressed_block(stbi__zbuf* a) -; 3887 : { -; 3888 : stbi_uc header[4]; -; 3889 : int len, nlen, k; -; 3890 : if (a->num_bits & 7) -; 3891 : stbi__zreceive(a, a->num_bits & 7); // discard -; 3892 : // drain the bit-packed data into header -; 3893 : k = 0; -; 3894 : while (a->num_bits > 0) { -; 3895 : header[k++] = (stbi_uc)(a->code_buffer & 255); // suppress MSVC run-time check -; 3896 : a->code_buffer >>= 8; -; 3897 : a->num_bits -= 8; -; 3898 : } -; 3899 : if (a->num_bits < 0) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3900 : // now fill header the normal way -; 3901 : while (k < 4) -; 3902 : header[k++] = stbi__zget8(a); -; 3903 : len = header[1] * 256 + header[0]; -; 3904 : nlen = header[3] * 256 + header[2]; -; 3905 : if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3906 : if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG"); -; 3907 : if (a->zout + len > a->zout_end) -; 3908 : if (!stbi__zexpand(a, a->zout, len)) return 0; -; 3909 : memcpy(a->zout, a->zbuffer, len); -; 3910 : a->zbuffer += len; -; 3911 : a->zout += len; -; 3912 : return 1; -; 3913 : } -; 3914 : -; 3915 : static int stbi__parse_zlib_header(stbi__zbuf* a) -; 3916 : { -; 3917 : int cmf = stbi__zget8(a); -; 3918 : int cm = cmf & 15; -; 3919 : /* int cinfo = cmf >> 4; */ -; 3920 : int flg = stbi__zget8(a); -; 3921 : if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3922 : if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png -; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png -; 3925 : // window = 1 << (8 + cinfo)... but who cares, we fully buffer output -; 3926 : return 1; -; 3927 : } -; 3928 : -; 3929 : static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] = -; 3930 : { -; 3931 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3932 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3933 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3934 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3935 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3936 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3937 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3938 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3939 : 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 -; 3940 : }; -; 3941 : static const stbi_uc stbi__zdefault_distance[32] = -; 3942 : { -; 3943 : 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 -; 3944 : }; -; 3945 : /* -; 3946 : Init algorithm: -; 3947 : { -; 3948 : int i; // use <= to match clearly with spec -; 3949 : for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; -; 3950 : for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; -; 3951 : for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; -; 3952 : for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; -; 3953 : -; 3954 : for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; -; 3955 : } -; 3956 : */ -; 3957 : -; 3958 : static int stbi__parse_zlib(stbi__zbuf* a, int parse_header) -; 3959 : { -; 3960 : int final, type; -; 3961 : if (parse_header) -; 3962 : if (!stbi__parse_zlib_header(a)) return 0; -; 3963 : a->num_bits = 0; -; 3964 : a->code_buffer = 0; -; 3965 : do { -; 3966 : final = stbi__zreceive(a, 1); -; 3967 : type = stbi__zreceive(a, 2); -; 3968 : if (type == 0) { -; 3969 : if (!stbi__parse_uncompressed_block(a)) return 0; -; 3970 : } -; 3971 : else if (type == 3) { -; 3972 : return 0; -; 3973 : } -; 3974 : else { -; 3975 : if (type == 1) { -; 3976 : // use fixed code lengths -; 3977 : if (!stbi__zbuild_huffman(&a->z_length, stbi__zdefault_length, STBI__ZNSYMS)) return 0; -; 3978 : if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; -; 3979 : } -; 3980 : else { -; 3981 : if (!stbi__compute_huffman_codes(a)) return 0; -; 3982 : } -; 3983 : if (!stbi__parse_huffman_block(a)) return 0; -; 3984 : } -; 3985 : } while (!final); -; 3986 : return 1; -; 3987 : } -; 3988 : -; 3989 : static int stbi__do_zlib(stbi__zbuf* a, char* obuf, int olen, int exp, int parse_header) -; 3990 : { -; 3991 : a->zout_start = obuf; -; 3992 : a->zout = obuf; -; 3993 : a->zout_end = obuf + olen; -; 3994 : a->z_expandable = exp; -; 3995 : -; 3996 : return stbi__parse_zlib(a, parse_header); -; 3997 : } -; 3998 : -; 3999 : STBIDEF char* stbi_zlib_decode_malloc_guesssize(const char* buffer, int len, int initial_size, int* outlen) -; 4000 : { -; 4001 : stbi__zbuf a; -; 4002 : char* p = (char*)stbi__malloc(initial_size); -; 4003 : if (p == NULL) return NULL; -; 4004 : a.zbuffer = (stbi_uc*)buffer; -; 4005 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4006 : if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { -; 4007 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4008 : return a.zout_start; -; 4009 : } -; 4010 : else { -; 4011 : STBI_FREE(a.zout_start); -; 4012 : return NULL; -; 4013 : } -; 4014 : } -; 4015 : -; 4016 : STBIDEF char* stbi_zlib_decode_malloc(char const* buffer, int len, int* outlen) -; 4017 : { -; 4018 : return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); -; 4019 : } -; 4020 : -; 4021 : STBIDEF char* stbi_zlib_decode_malloc_guesssize_headerflag(const char* buffer, int len, int initial_size, int* outlen, int parse_header) -; 4022 : { -; 4023 : stbi__zbuf a; -; 4024 : char* p = (char*)stbi__malloc(initial_size); -; 4025 : if (p == NULL) return NULL; -; 4026 : a.zbuffer = (stbi_uc*)buffer; -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4028 : if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { -; 4029 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4030 : return a.zout_start; -; 4031 : } -; 4032 : else { -; 4033 : STBI_FREE(a.zout_start); -; 4034 : return NULL; -; 4035 : } -; 4036 : } -; 4037 : -; 4038 : STBIDEF int stbi_zlib_decode_buffer(char* obuffer, int olen, char const* ibuffer, int ilen) -; 4039 : { -; 4040 : stbi__zbuf a; -; 4041 : a.zbuffer = (stbi_uc*)ibuffer; -; 4042 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4043 : if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) -; 4044 : return (int)(a.zout - a.zout_start); -; 4045 : else -; 4046 : return -1; -; 4047 : } -; 4048 : -; 4049 : STBIDEF char* stbi_zlib_decode_noheader_malloc(char const* buffer, int len, int* outlen) -; 4050 : { -; 4051 : stbi__zbuf a; -; 4052 : char* p = (char*)stbi__malloc(16384); -; 4053 : if (p == NULL) return NULL; -; 4054 : a.zbuffer = (stbi_uc*)buffer; -; 4055 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4056 : if (stbi__do_zlib(&a, p, 16384, 1, 0)) { -; 4057 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4058 : return a.zout_start; -; 4059 : } -; 4060 : else { -; 4061 : STBI_FREE(a.zout_start); -; 4062 : return NULL; -; 4063 : } -; 4064 : } -; 4065 : -; 4066 : STBIDEF int stbi_zlib_decode_noheader_buffer(char* obuffer, int olen, const char* ibuffer, int ilen) -; 4067 : { -; 4068 : stbi__zbuf a; -; 4069 : a.zbuffer = (stbi_uc*)ibuffer; -; 4070 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4071 : if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) -; 4072 : return (int)(a.zout - a.zout_start); -; 4073 : else -; 4074 : return -1; -; 4075 : } -; 4076 : #endif -; 4077 : -; 4078 : // public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 -; 4079 : // simple implementation -; 4080 : // - only 8-bit samples -; 4081 : // - no CRC checking -; 4082 : // - allocates lots of intermediate memory -; 4083 : // - avoids problem of streaming data between subsystems -; 4084 : // - avoids explicit window management -; 4085 : // performance -; 4086 : // - uses stb_zlib, a PD zlib implementation with fast huffman decoding -; 4087 : -; 4088 : #ifndef STBI_NO_PNG -; 4089 : typedef struct -; 4090 : { -; 4091 : stbi__uint32 length; -; 4092 : stbi__uint32 type; -; 4093 : } stbi__pngchunk; -; 4094 : -; 4095 : static stbi__pngchunk stbi__get_chunk_header(stbi__context* s) -; 4096 : { -; 4097 : stbi__pngchunk c; -; 4098 : c.length = stbi__get32be(s); -; 4099 : c.type = stbi__get32be(s); -; 4100 : return c; -; 4101 : } -; 4102 : -; 4103 : static int stbi__check_png_header(stbi__context* s) -; 4104 : { -; 4105 : static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; -; 4106 : int i; -; 4107 : for (i = 0; i < 8; ++i) -; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); -; 4109 : return 1; -; 4110 : } -; 4111 : -; 4112 : typedef struct -; 4113 : { -; 4114 : stbi__context* s; -; 4115 : stbi_uc* idata, * expanded, * out; -; 4116 : int depth; -; 4117 : } stbi__png; -; 4118 : -; 4119 : enum { -; 4120 : STBI__F_none = 0, -; 4121 : STBI__F_sub = 1, -; 4122 : STBI__F_up = 2, -; 4123 : STBI__F_avg = 3, -; 4124 : STBI__F_paeth = 4, -; 4125 : // synthetic filters used for first scanline to avoid needing a dummy row of 0s -; 4126 : STBI__F_avg_first, -; 4127 : STBI__F_paeth_first -; 4128 : }; -; 4129 : -; 4130 : static stbi_uc first_row_filter[5] = -; 4131 : { -; 4132 : STBI__F_none, -; 4133 : STBI__F_sub, -; 4134 : STBI__F_none, -; 4135 : STBI__F_avg_first, -; 4136 : STBI__F_paeth_first -; 4137 : }; -; 4138 : -; 4139 : static int stbi__paeth(int a, int b, int c) -; 4140 : { -; 4141 : int p = a + b - c; -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); -; 4144 : int pc = abs(p - c); -; 4145 : if (pa <= pb && pa <= pc) return a; -; 4146 : if (pb <= pc) return b; -; 4147 : return c; -; 4148 : } -; 4149 : -; 4150 : static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; -; 4151 : -; 4152 : // create the png data from post-deflated data -; 4153 : static int stbi__create_png_image_raw(stbi__png* a, stbi_uc* raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -; 4154 : { -; 4155 : int bytes = (depth == 16 ? 2 : 1); -; 4156 : stbi__context* s = a->s; -; 4157 : stbi__uint32 i, j, stride = x * out_n * bytes; -; 4158 : stbi__uint32 img_len, img_width_bytes; -; 4159 : int k; -; 4160 : int img_n = s->img_n; // copy it into a local for later -; 4161 : -; 4162 : int output_bytes = out_n * bytes; -; 4163 : int filter_bytes = img_n * bytes; -; 4164 : int width = x; -; 4165 : -; 4166 : STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1); -; 4167 : a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into -; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); -; 4169 : -; 4170 : if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); -; 4171 : img_width_bytes = (((img_n * x * depth) + 7) >> 3); -; 4172 : img_len = (img_width_bytes + 1) * y; -; 4173 : -; 4174 : // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, -; 4175 : // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), -; 4176 : // so just check for raw_len < img_len always. -; 4177 : if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG"); -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { -; 4180 : stbi_uc* cur = a->out + stride * j; -; 4181 : stbi_uc* prior; -; 4182 : int filter = *raw++; -; 4183 : -; 4184 : if (filter > 4) -; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); -; 4186 : -; 4187 : if (depth < 8) { -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); -; 4189 : cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place -; 4190 : filter_bytes = 1; -; 4191 : width = img_width_bytes; -; 4192 : } -; 4193 : prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above -; 4194 : -; 4195 : // if first row, use special filter that doesn't sample previous row -; 4196 : if (j == 0) filter = first_row_filter[filter]; -; 4197 : -; 4198 : // handle first byte explicitly -; 4199 : for (k = 0; k < filter_bytes; ++k) { -; 4200 : switch (filter) { -; 4201 : case STBI__F_none: cur[k] = raw[k]; break; -; 4202 : case STBI__F_sub: cur[k] = raw[k]; break; -; 4203 : case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; -; 4204 : case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break; -; 4205 : case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break; -; 4206 : case STBI__F_avg_first: cur[k] = raw[k]; break; -; 4207 : case STBI__F_paeth_first: cur[k] = raw[k]; break; -; 4208 : } -; 4209 : } -; 4210 : -; 4211 : if (depth == 8) { -; 4212 : if (img_n != out_n) -; 4213 : cur[img_n] = 255; // first pixel -; 4214 : raw += img_n; -; 4215 : cur += out_n; -; 4216 : prior += out_n; -; 4217 : } -; 4218 : else if (depth == 16) { -; 4219 : if (img_n != out_n) { -; 4220 : cur[filter_bytes] = 255; // first pixel top byte -; 4221 : cur[filter_bytes + 1] = 255; // first pixel bottom byte -; 4222 : } -; 4223 : raw += filter_bytes; -; 4224 : cur += output_bytes; -; 4225 : prior += output_bytes; -; 4226 : } -; 4227 : else { -; 4228 : raw += 1; -; 4229 : cur += 1; -; 4230 : prior += 1; -; 4231 : } -; 4232 : -; 4233 : // this is a little gross, so that we don't switch per-pixel or per-component -; 4234 : if (depth < 8 || img_n == out_n) { -; 4235 : int nk = (width - 1) * filter_bytes; -; 4236 : #define STBI__CASE(f) \ -; 4237 : case f: \ -; 4238 : for (k=0; k < nk; ++k) -; 4239 : switch (filter) { -; 4240 : // "none" filter turns into a memcpy here; make that explicit. -; 4241 : case STBI__F_none: memcpy(cur, raw, nk); break; -; 4242 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break; -; 4243 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4244 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break; -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; -; 4246 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break; -; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; -; 4248 : } -; 4249 : #undef STBI__CASE -; 4250 : raw += nk; -; 4251 : } -; 4252 : else { -; 4253 : STBI_ASSERT(img_n + 1 == out_n); -; 4254 : #define STBI__CASE(f) \ -; 4255 : case f: \ -; 4256 : for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ -; 4257 : for (k=0; k < filter_bytes; ++k) -; 4258 : switch (filter) { -; 4259 : STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; -; 4260 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break; -; 4261 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4262 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break; -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; -; 4264 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break; -; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; -; 4266 : } -; 4267 : #undef STBI__CASE -; 4268 : -; 4269 : // the loop above sets the high byte of the pixels' alpha, but for -; 4270 : // 16 bit png files we also need the low byte set. we'll do that here. -; 4271 : if (depth == 16) { -; 4272 : cur = a->out + stride * j; // start at the beginning of the row again -; 4273 : for (i = 0; i < x; ++i, cur += output_bytes) { -; 4274 : cur[filter_bytes + 1] = 255; -; 4275 : } -; 4276 : } -; 4277 : } -; 4278 : } -; 4279 : -; 4280 : // we make a separate pass to expand bits to pixels; for performance, -; 4281 : // this could run two scanlines behind the above code, so it won't -; 4282 : // intefere with filtering but will still be in the cache. -; 4283 : if (depth < 8) { -; 4284 : for (j = 0; j < y; ++j) { -; 4285 : stbi_uc* cur = a->out + stride * j; -; 4286 : stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes; -; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit -; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop -; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range -; 4290 : -; 4291 : // note that the final byte might overshoot and write more data than desired. -; 4292 : // we can allocate enough data that this never writes out of memory, but it -; 4293 : // could also overwrite the next scanline. can it overwrite non-empty data -; 4294 : // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. -; 4295 : // so we need to explicitly clamp the final ones -; 4296 : -; 4297 : if (depth == 4) { -; 4298 : for (k = x * img_n; k >= 2; k -= 2, ++in) { -; 4299 : *cur++ = scale * ((*in >> 4)); -; 4300 : *cur++ = scale * ((*in) & 0x0f); -; 4301 : } -; 4302 : if (k > 0) *cur++ = scale * ((*in >> 4)); -; 4303 : } -; 4304 : else if (depth == 2) { -; 4305 : for (k = x * img_n; k >= 4; k -= 4, ++in) { -; 4306 : *cur++ = scale * ((*in >> 6)); -; 4307 : *cur++ = scale * ((*in >> 4) & 0x03); -; 4308 : *cur++ = scale * ((*in >> 2) & 0x03); -; 4309 : *cur++ = scale * ((*in) & 0x03); -; 4310 : } -; 4311 : if (k > 0) *cur++ = scale * ((*in >> 6)); -; 4312 : if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); -; 4313 : if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); -; 4314 : } -; 4315 : else if (depth == 1) { -; 4316 : for (k = x * img_n; k >= 8; k -= 8, ++in) { -; 4317 : *cur++ = scale * ((*in >> 7)); -; 4318 : *cur++ = scale * ((*in >> 6) & 0x01); -; 4319 : *cur++ = scale * ((*in >> 5) & 0x01); -; 4320 : *cur++ = scale * ((*in >> 4) & 0x01); -; 4321 : *cur++ = scale * ((*in >> 3) & 0x01); -; 4322 : *cur++ = scale * ((*in >> 2) & 0x01); -; 4323 : *cur++ = scale * ((*in >> 1) & 0x01); -; 4324 : *cur++ = scale * ((*in) & 0x01); -; 4325 : } -; 4326 : if (k > 0) *cur++ = scale * ((*in >> 7)); -; 4327 : if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); -; 4328 : if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); -; 4329 : if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); -; 4330 : if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); -; 4331 : if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); -; 4332 : if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); -; 4333 : } -; 4334 : if (img_n != out_n) { -; 4335 : int q; -; 4336 : // insert alpha = 255 -; 4337 : cur = a->out + stride * j; -; 4338 : if (img_n == 1) { -; 4339 : for (q = x - 1; q >= 0; --q) { -; 4340 : cur[q * 2 + 1] = 255; -; 4341 : cur[q * 2 + 0] = cur[q]; -; 4342 : } -; 4343 : } -; 4344 : else { -; 4345 : STBI_ASSERT(img_n == 3); -; 4346 : for (q = x - 1; q >= 0; --q) { -; 4347 : cur[q * 4 + 3] = 255; -; 4348 : cur[q * 4 + 2] = cur[q * 3 + 2]; -; 4349 : cur[q * 4 + 1] = cur[q * 3 + 1]; -; 4350 : cur[q * 4 + 0] = cur[q * 3 + 0]; -; 4351 : } -; 4352 : } -; 4353 : } -; 4354 : } -; 4355 : } -; 4356 : else if (depth == 16) { -; 4357 : // force the image data from big-endian to platform-native. -; 4358 : // this is done in a separate pass due to the decoding relying -; 4359 : // on the data being untouched, but could probably be done -; 4360 : // per-line during decode if care is taken. -; 4361 : stbi_uc* cur = a->out; -; 4362 : stbi__uint16* cur16 = (stbi__uint16*)cur; -; 4363 : -; 4364 : for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) { -; 4365 : *cur16 = (cur[0] << 8) | cur[1]; -; 4366 : } -; 4367 : } -; 4368 : -; 4369 : return 1; -; 4370 : } -; 4371 : -; 4372 : static int stbi__create_png_image(stbi__png* a, stbi_uc* image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -; 4373 : { -; 4374 : int bytes = (depth == 16 ? 2 : 1); -; 4375 : int out_bytes = out_n * bytes; -; 4376 : stbi_uc* final; -; 4377 : int p; -; 4378 : if (!interlaced) -; 4379 : return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); -; 4380 : -; 4381 : // de-interlacing -; 4382 : final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); -; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); -; 4384 : for (p = 0; p < 7; ++p) { -; 4385 : int xorig[] = { 0,4,0,2,0,1,0 }; -; 4386 : int yorig[] = { 0,0,4,0,2,0,1 }; -; 4387 : int xspc[] = { 8,8,4,4,2,2,1 }; -; 4388 : int yspc[] = { 8,8,8,4,4,2,2 }; -; 4389 : int i, j, x, y; -; 4390 : // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 -; 4391 : x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p]; -; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; -; 4393 : if (x && y) { -; 4394 : stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; -; 4395 : if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { -; 4396 : STBI_FREE(final); -; 4397 : return 0; -; 4398 : } -; 4399 : for (j = 0; j < y; ++j) { -; 4400 : for (i = 0; i < x; ++i) { -; 4401 : int out_y = j * yspc[p] + yorig[p]; -; 4402 : int out_x = i * xspc[p] + xorig[p]; -; 4403 : memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, -; 4404 : a->out + (j * x + i) * out_bytes, out_bytes); -; 4405 : } -; 4406 : } -; 4407 : STBI_FREE(a->out); -; 4408 : image_data += img_len; -; 4409 : image_data_len -= img_len; -; 4410 : } -; 4411 : } -; 4412 : a->out = final; -; 4413 : -; 4414 : return 1; -; 4415 : } -; 4416 : -; 4417 : static int stbi__compute_transparency(stbi__png* z, stbi_uc tc[3], int out_n) -; 4418 : { -; 4419 : stbi__context* s = z->s; -; 4420 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4421 : stbi_uc* p = z->out; -; 4422 : -; 4423 : // compute color-based transparency, assuming we've -; 4424 : // already got 255 as the alpha value in the output -; 4425 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4426 : -; 4427 : if (out_n == 2) { -; 4428 : for (i = 0; i < pixel_count; ++i) { -; 4429 : p[1] = (p[0] == tc[0] ? 0 : 255); -; 4430 : p += 2; -; 4431 : } -; 4432 : } -; 4433 : else { -; 4434 : for (i = 0; i < pixel_count; ++i) { -; 4435 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4436 : p[3] = 0; -; 4437 : p += 4; -; 4438 : } -; 4439 : } -; 4440 : return 1; -; 4441 : } -; 4442 : -; 4443 : static int stbi__compute_transparency16(stbi__png* z, stbi__uint16 tc[3], int out_n) -; 4444 : { -; 4445 : stbi__context* s = z->s; -; 4446 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4447 : stbi__uint16* p = (stbi__uint16*)z->out; -; 4448 : -; 4449 : // compute color-based transparency, assuming we've -; 4450 : // already got 65535 as the alpha value in the output -; 4451 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4452 : -; 4453 : if (out_n == 2) { -; 4454 : for (i = 0; i < pixel_count; ++i) { -; 4455 : p[1] = (p[0] == tc[0] ? 0 : 65535); -; 4456 : p += 2; -; 4457 : } -; 4458 : } -; 4459 : else { -; 4460 : for (i = 0; i < pixel_count; ++i) { -; 4461 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4462 : p[3] = 0; -; 4463 : p += 4; -; 4464 : } -; 4465 : } -; 4466 : return 1; -; 4467 : } -; 4468 : -; 4469 : static int stbi__expand_png_palette(stbi__png* a, stbi_uc* palette, int len, int pal_img_n) -; 4470 : { -; 4471 : stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; -; 4472 : stbi_uc* p, * temp_out, * orig = a->out; -; 4473 : -; 4474 : p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0); -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4476 : -; 4477 : // between here and free(out) below, exitting would leak -; 4478 : temp_out = p; -; 4479 : -; 4480 : if (pal_img_n == 3) { -; 4481 : for (i = 0; i < pixel_count; ++i) { -; 4482 : int n = orig[i] * 4; -; 4483 : p[0] = palette[n]; -; 4484 : p[1] = palette[n + 1]; -; 4485 : p[2] = palette[n + 2]; -; 4486 : p += 3; -; 4487 : } -; 4488 : } -; 4489 : else { -; 4490 : for (i = 0; i < pixel_count; ++i) { -; 4491 : int n = orig[i] * 4; -; 4492 : p[0] = palette[n]; -; 4493 : p[1] = palette[n + 1]; -; 4494 : p[2] = palette[n + 2]; -; 4495 : p[3] = palette[n + 3]; -; 4496 : p += 4; -; 4497 : } -; 4498 : } -; 4499 : STBI_FREE(a->out); -; 4500 : a->out = temp_out; -; 4501 : -; 4502 : STBI_NOTUSED(len); -; 4503 : -; 4504 : return 1; -; 4505 : } -; 4506 : -; 4507 : static int stbi__unpremultiply_on_load_global = 0; -; 4508 : static int stbi__de_iphone_flag_global = 0; -; 4509 : -; 4510 : STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) -; 4511 : { -; 4512 : stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; -; 4513 : } -; 4514 : -; 4515 : STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) -; 4516 : { -; 4517 : stbi__de_iphone_flag_global = flag_true_if_should_convert; -; 4518 : } -; 4519 : -; 4520 : #ifndef STBI_THREAD_LOCAL -; 4521 : #define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global -; 4522 : #define stbi__de_iphone_flag stbi__de_iphone_flag_global -; 4523 : #else -; 4524 : static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; -; 4525 : static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; -; 4526 : -; 4527 : STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) -; 4528 : { -; 4529 : stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; -; 4530 : stbi__unpremultiply_on_load_set = 1; -; 4531 : } -; 4532 : -; 4533 : STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert) -; 4534 : { -; 4535 : stbi__de_iphone_flag_local = flag_true_if_should_convert; -; 4536 : stbi__de_iphone_flag_set = 1; -; 4537 : } -; 4538 : -; 4539 : #define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \ -; 4540 : ? stbi__unpremultiply_on_load_local \ -; 4541 : : stbi__unpremultiply_on_load_global) -; 4542 : #define stbi__de_iphone_flag (stbi__de_iphone_flag_set \ -; 4543 : ? stbi__de_iphone_flag_local \ -; 4544 : : stbi__de_iphone_flag_global) -; 4545 : #endif // STBI_THREAD_LOCAL -; 4546 : -; 4547 : static void stbi__de_iphone(stbi__png* z) -; 4548 : { -; 4549 : stbi__context* s = z->s; -; 4550 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4551 : stbi_uc* p = z->out; -; 4552 : -; 4553 : if (s->img_out_n == 3) { // convert bgr to rgb -; 4554 : for (i = 0; i < pixel_count; ++i) { -; 4555 : stbi_uc t = p[0]; -; 4556 : p[0] = p[2]; -; 4557 : p[2] = t; -; 4558 : p += 3; -; 4559 : } -; 4560 : } -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { -; 4566 : stbi_uc a = p[3]; -; 4567 : stbi_uc t = p[0]; -; 4568 : if (a) { -; 4569 : stbi_uc half = a / 2; -; 4570 : p[0] = (p[2] * 255 + half) / a; -; 4571 : p[1] = (p[1] * 255 + half) / a; -; 4572 : p[2] = (t * 255 + half) / a; -; 4573 : } -; 4574 : else { -; 4575 : p[0] = p[2]; -; 4576 : p[2] = t; -; 4577 : } -; 4578 : p += 4; -; 4579 : } -; 4580 : } -; 4581 : else { -; 4582 : // convert bgr to rgb -; 4583 : for (i = 0; i < pixel_count; ++i) { -; 4584 : stbi_uc t = p[0]; -; 4585 : p[0] = p[2]; -; 4586 : p[2] = t; -; 4587 : p += 4; -; 4588 : } -; 4589 : } -; 4590 : } -; 4591 : } -; 4592 : -; 4593 : #define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) -; 4594 : -; 4595 : static int stbi__parse_png_file(stbi__png* z, int scan, int req_comp) -; 4596 : { -; 4597 : stbi_uc palette[1024], pal_img_n = 0; -; 4598 : stbi_uc has_trans = 0, tc[3] = { 0 }; -; 4599 : stbi__uint16 tc16[3]; -; 4600 : stbi__uint32 ioff = 0, idata_limit = 0, i, pal_len = 0; -; 4601 : int first = 1, k, interlace = 0, color = 0, is_iphone = 0; -; 4602 : stbi__context* s = z->s; -; 4603 : -; 4604 : z->expanded = NULL; -; 4605 : z->idata = NULL; -; 4606 : z->out = NULL; -; 4607 : -; 4608 : if (!stbi__check_png_header(s)) return 0; -; 4609 : -; 4610 : if (scan == STBI__SCAN_type) return 1; -; 4611 : -; 4612 : for (;;) { -; 4613 : stbi__pngchunk c = stbi__get_chunk_header(s); -; 4614 : switch (c.type) { -; 4615 : case STBI__PNG_TYPE('C', 'g', 'B', 'I'): -; 4616 : is_iphone = 1; -; 4617 : stbi__skip(s, c.length); -; 4618 : break; -; 4619 : case STBI__PNG_TYPE('I', 'H', 'D', 'R'): { -; 4620 : int comp, filter; -; 4621 : if (!first) return stbi__err("multiple IHDR", "Corrupt PNG"); -; 4622 : first = 0; -; 4623 : if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG"); -; 4624 : s->img_x = stbi__get32be(s); -; 4625 : s->img_y = stbi__get32be(s); -; 4626 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4627 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4628 : z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only"); -; 4629 : color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype", "Corrupt PNG"); -; 4630 : if (color == 3 && z->depth == 16) return stbi__err("bad ctype", "Corrupt PNG"); -; 4631 : if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype", "Corrupt PNG"); -; 4632 : comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG"); -; 4633 : filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG"); -; 4634 : interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG"); -; 4635 : if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG"); -; 4636 : if (!pal_img_n) { -; 4637 : s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); -; 4638 : if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); -; 4639 : } -; 4640 : else { -; 4641 : // if paletted, then pal_n is our final components, and -; 4642 : // img_n is # components to decompress/filter. -; 4643 : s->img_n = 1; -; 4644 : if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large", "Corrupt PNG"); -; 4645 : } -; 4646 : // even with SCAN_header, have to scan to see if we have a tRNS -; 4647 : break; -; 4648 : } -; 4649 : -; 4650 : case STBI__PNG_TYPE('P', 'L', 'T', 'E'): { -; 4651 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4652 : if (c.length > 256 * 3) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4653 : pal_len = c.length / 3; -; 4654 : if (pal_len * 3 != c.length) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4655 : for (i = 0; i < pal_len; ++i) { -; 4656 : palette[i * 4 + 0] = stbi__get8(s); -; 4657 : palette[i * 4 + 1] = stbi__get8(s); -; 4658 : palette[i * 4 + 2] = stbi__get8(s); -; 4659 : palette[i * 4 + 3] = 255; -; 4660 : } -; 4661 : break; -; 4662 : } -; 4663 : -; 4664 : case STBI__PNG_TYPE('t', 'R', 'N', 'S'): { -; 4665 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4666 : if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG"); -; 4667 : if (pal_img_n) { -; 4668 : if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } -; 4669 : if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG"); -; 4670 : if (c.length > pal_len) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4671 : pal_img_n = 4; -; 4672 : for (i = 0; i < c.length; ++i) -; 4673 : palette[i * 4 + 3] = stbi__get8(s); -; 4674 : } -; 4675 : else { -; 4676 : if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG"); -; 4677 : if (c.length != (stbi__uint32)s->img_n * 2) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4678 : has_trans = 1; -; 4679 : // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. -; 4680 : if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } -; 4681 : if (z->depth == 16) { -; 4682 : for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is -; 4683 : } -; 4684 : else { -; 4685 : for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger -; 4686 : } -; 4687 : } -; 4688 : break; -; 4689 : } -; 4690 : -; 4691 : case STBI__PNG_TYPE('I', 'D', 'A', 'T'): { -; 4692 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4693 : if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG"); -; 4694 : if (scan == STBI__SCAN_header) { -; 4695 : // header scan definitely stops at first IDAT -; 4696 : if (pal_img_n) -; 4697 : s->img_n = pal_img_n; -; 4698 : return 1; -; 4699 : } -; 4700 : if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); -; 4701 : if ((int)(ioff + c.length) < (int)ioff) return 0; -; 4702 : if (ioff + c.length > idata_limit) { -; 4703 : stbi__uint32 idata_limit_old = idata_limit; -; 4704 : stbi_uc* p; -; 4705 : if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; -; 4706 : while (ioff + c.length > idata_limit) -; 4707 : idata_limit *= 2; -; 4708 : STBI_NOTUSED(idata_limit_old); -; 4709 : p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4710 : z->idata = p; -; 4711 : } -; 4712 : if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG"); -; 4713 : ioff += c.length; -; 4714 : break; -; 4715 : } -; 4716 : -; 4717 : case STBI__PNG_TYPE('I', 'E', 'N', 'D'): { -; 4718 : stbi__uint32 raw_len, bpl; -; 4719 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4720 : if (scan != STBI__SCAN_load) return 1; -; 4721 : if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG"); -; 4722 : // initial guess for decoded data size to avoid unnecessary reallocs -; 4723 : bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component -; 4724 : raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); -; 4726 : if (z->expanded == NULL) return 0; // zlib should set error -; 4727 : STBI_FREE(z->idata); z->idata = NULL; -; 4728 : if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans) -; 4729 : s->img_out_n = s->img_n + 1; -; 4730 : else -; 4731 : s->img_out_n = s->img_n; -; 4732 : if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; -; 4733 : if (has_trans) { -; 4734 : if (z->depth == 16) { -; 4735 : if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; -; 4736 : } -; 4737 : else { -; 4738 : if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; -; 4739 : } -; 4740 : } -; 4741 : if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) -; 4742 : stbi__de_iphone(z); -; 4743 : if (pal_img_n) { -; 4744 : // pal_img_n == 3 or 4 -; 4745 : s->img_n = pal_img_n; // record the actual colors we had -; 4746 : s->img_out_n = pal_img_n; -; 4747 : if (req_comp >= 3) s->img_out_n = req_comp; -; 4748 : if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) -; 4749 : return 0; -; 4750 : } -; 4751 : else if (has_trans) { -; 4752 : // non-paletted image with tRNS -> source image has (constant) alpha -; 4753 : ++s->img_n; -; 4754 : } -; 4755 : STBI_FREE(z->expanded); z->expanded = NULL; -; 4756 : // end of PNG chunk, read and skip CRC -; 4757 : stbi__get32be(s); -; 4758 : return 1; -; 4759 : } -; 4760 : -; 4761 : default: -; 4762 : // if critical, fail -; 4763 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4764 : if ((c.type & (1 << 29)) == 0) { -; 4765 : #ifndef STBI_NO_FAILURE_STRINGS -; 4766 : // not threadsafe -; 4767 : static char invalid_chunk[] = "XXXX PNG chunk not known"; -; 4768 : invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); -; 4769 : invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); -; 4770 : invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); -; 4771 : invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); -; 4772 : #endif -; 4773 : return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); -; 4774 : } -; 4775 : stbi__skip(s, c.length); -; 4776 : break; -; 4777 : } -; 4778 : // end of PNG chunk, read and skip CRC -; 4779 : stbi__get32be(s); -; 4780 : } -; 4781 : } -; 4782 : -; 4783 : static void* stbi__do_png(stbi__png* p, int* x, int* y, int* n, int req_comp, stbi__result_info* ri) -; 4784 : { -; 4785 : void* result = NULL; -; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { -; 4788 : if (p->depth <= 8) -; 4789 : ri->bits_per_channel = 8; -; 4790 : else if (p->depth == 16) -; 4791 : ri->bits_per_channel = 16; -; 4792 : else -; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); -; 4794 : result = p->out; -; 4795 : p->out = NULL; -; 4796 : if (req_comp && req_comp != p->s->img_out_n) { -; 4797 : if (ri->bits_per_channel == 8) -; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4799 : else -; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4801 : p->s->img_out_n = req_comp; -; 4802 : if (result == NULL) return result; -; 4803 : } -; 4804 : *x = p->s->img_x; -; 4805 : *y = p->s->img_y; -; 4806 : if (n) *n = p->s->img_n; -; 4807 : } -; 4808 : STBI_FREE(p->out); p->out = NULL; -; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; -; 4810 : STBI_FREE(p->idata); p->idata = NULL; -; 4811 : -; 4812 : return result; -; 4813 : } -; 4814 : -; 4815 : static void* stbi__png_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 4816 : { -; 4817 : stbi__png p; -; 4818 : p.s = s; -; 4819 : return stbi__do_png(&p, x, y, comp, req_comp, ri); -; 4820 : } -; 4821 : -; 4822 : static int stbi__png_test(stbi__context* s) -; 4823 : { -; 4824 : int r; -; 4825 : r = stbi__check_png_header(s); -; 4826 : stbi__rewind(s); -; 4827 : return r; -; 4828 : } -; 4829 : -; 4830 : static int stbi__png_info_raw(stbi__png* p, int* x, int* y, int* comp) -; 4831 : { -; 4832 : if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { -; 4833 : stbi__rewind(p->s); -; 4834 : return 0; -; 4835 : } -; 4836 : if (x) *x = p->s->img_x; -; 4837 : if (y) *y = p->s->img_y; -; 4838 : if (comp) *comp = p->s->img_n; -; 4839 : return 1; -; 4840 : } -; 4841 : -; 4842 : static int stbi__png_info(stbi__context* s, int* x, int* y, int* comp) -; 4843 : { -; 4844 : stbi__png p; -; 4845 : p.s = s; -; 4846 : return stbi__png_info_raw(&p, x, y, comp); -; 4847 : } -; 4848 : -; 4849 : static int stbi__png_is16(stbi__context* s) -; 4850 : { -; 4851 : stbi__png p; -; 4852 : p.s = s; -; 4853 : if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) -; 4854 : return 0; -; 4855 : if (p.depth != 16) { -; 4856 : stbi__rewind(p.s); -; 4857 : return 0; -; 4858 : } -; 4859 : return 1; -; 4860 : } -; 4861 : #endif -; 4862 : -; 4863 : // Microsoft/Windows BMP image -; 4864 : -; 4865 : #ifndef STBI_NO_BMP -; 4866 : static int stbi__bmp_test_raw(stbi__context* s) -; 4867 : { -; 4868 : int r; -; 4869 : int sz; -; 4870 : if (stbi__get8(s) != 'B') return 0; -; 4871 : if (stbi__get8(s) != 'M') return 0; -; 4872 : stbi__get32le(s); // discard filesize -; 4873 : stbi__get16le(s); // discard reserved -; 4874 : stbi__get16le(s); // discard reserved -; 4875 : stbi__get32le(s); // discard data offset -; 4876 : sz = stbi__get32le(s); -; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); -; 4878 : return r; -; 4879 : } -; 4880 : -; 4881 : static int stbi__bmp_test(stbi__context* s) -; 4882 : { -; 4883 : int r = stbi__bmp_test_raw(s); -; 4884 : stbi__rewind(s); -; 4885 : return r; -; 4886 : } -; 4887 : -; 4888 : // returns 0..31 for the highest set bit -; 4889 : static int stbi__high_bit(unsigned int z) -; 4890 : { -; 4891 : int n = 0; -; 4892 : if (z == 0) return -1; -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } -; 4898 : return n; -; 4899 : } -; 4900 : -; 4901 : static int stbi__bitcount(unsigned int a) -; 4902 : { -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits -; 4908 : return a & 0xff; -; 4909 : } -; 4910 : -; 4911 : // extract an arbitrarily-aligned N-bit value (N=bits) -; 4912 : // from v, and then make it 8-bits long and fractionally -; 4913 : // extend it to full full range. -; 4914 : static int stbi__shiftsigned(unsigned int v, int shift, int bits) -; 4915 : { -; 4916 : static unsigned int mul_table[9] = { -; 4917 : 0, -; 4918 : 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, -; 4919 : 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, -; 4920 : }; -; 4921 : static unsigned int shift_table[9] = { -; 4922 : 0, 0,0,1,0,2,4,6,0, -; 4923 : }; -; 4924 : if (shift < 0) -; 4925 : v <<= -shift; -; 4926 : else -; 4927 : v >>= shift; -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; -; 4932 : } -; 4933 : -; 4934 : typedef struct -; 4935 : { -; 4936 : int bpp, offset, hsz; -; 4937 : unsigned int mr, mg, mb, ma, all_a; -; 4938 : int extra_read; -; 4939 : } stbi__bmp_data; -; 4940 : -; 4941 : static int stbi__bmp_set_mask_defaults(stbi__bmp_data* info, int compress) -; 4942 : { -; 4943 : // BI_BITFIELDS specifies masks explicitly, don't override -; 4944 : if (compress == 3) -; 4945 : return 1; -; 4946 : -; 4947 : if (compress == 0) { -; 4948 : if (info->bpp == 16) { -; 4949 : info->mr = 31u << 10; -; 4950 : info->mg = 31u << 5; -; 4951 : info->mb = 31u << 0; -; 4952 : } -; 4953 : else if (info->bpp == 32) { -; 4954 : info->mr = 0xffu << 16; -; 4955 : info->mg = 0xffu << 8; -; 4956 : info->mb = 0xffu << 0; -; 4957 : info->ma = 0xffu << 24; -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 -; 4959 : } -; 4960 : else { -; 4961 : // otherwise, use defaults, which is all-0 -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; -; 4963 : } -; 4964 : return 1; -; 4965 : } -; 4966 : return 0; // error -; 4967 : } -; 4968 : -; 4969 : static void* stbi__bmp_parse_header(stbi__context* s, stbi__bmp_data* info) -; 4970 : { -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); -; 4973 : stbi__get32le(s); // discard filesize -; 4974 : stbi__get16le(s); // discard reserved -; 4975 : stbi__get16le(s); // discard reserved -; 4976 : info->offset = stbi__get32le(s); -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; -; 4979 : info->extra_read = 14; -; 4980 : -; 4981 : if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); -; 4982 : -; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); -; 4984 : if (hsz == 12) { -; 4985 : s->img_x = stbi__get16le(s); -; 4986 : s->img_y = stbi__get16le(s); -; 4987 : } -; 4988 : else { -; 4989 : s->img_x = stbi__get32le(s); -; 4990 : s->img_y = stbi__get32le(s); -; 4991 : } -; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); -; 4993 : info->bpp = stbi__get16le(s); -; 4994 : if (hsz != 12) { -; 4995 : int compress = stbi__get32le(s); -; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); -; 4997 : if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes -; 4998 : if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel -; 4999 : stbi__get32le(s); // discard sizeof -; 5000 : stbi__get32le(s); // discard hres -; 5001 : stbi__get32le(s); // discard vres -; 5002 : stbi__get32le(s); // discard colorsused -; 5003 : stbi__get32le(s); // discard max important -; 5004 : if (hsz == 40 || hsz == 56) { -; 5005 : if (hsz == 56) { -; 5006 : stbi__get32le(s); -; 5007 : stbi__get32le(s); -; 5008 : stbi__get32le(s); -; 5009 : stbi__get32le(s); -; 5010 : } -; 5011 : if (info->bpp == 16 || info->bpp == 32) { -; 5012 : if (compress == 0) { -; 5013 : stbi__bmp_set_mask_defaults(info, compress); -; 5014 : } -; 5015 : else if (compress == 3) { -; 5016 : info->mr = stbi__get32le(s); -; 5017 : info->mg = stbi__get32le(s); -; 5018 : info->mb = stbi__get32le(s); -; 5019 : info->extra_read += 12; -; 5020 : // not documented, but generated by photoshop and handled by mspaint -; 5021 : if (info->mr == info->mg && info->mg == info->mb) { -; 5022 : // ?!?!? -; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5024 : } -; 5025 : } -; 5026 : else -; 5027 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5028 : } -; 5029 : } -; 5030 : else { -; 5031 : // V4/V5 header -; 5032 : int i; -; 5033 : if (hsz != 108 && hsz != 124) -; 5034 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5035 : info->mr = stbi__get32le(s); -; 5036 : info->mg = stbi__get32le(s); -; 5037 : info->mb = stbi__get32le(s); -; 5038 : info->ma = stbi__get32le(s); -; 5039 : if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs -; 5040 : stbi__bmp_set_mask_defaults(info, compress); -; 5041 : stbi__get32le(s); // discard color space -; 5042 : for (i = 0; i < 12; ++i) -; 5043 : stbi__get32le(s); // discard color space parameters -; 5044 : if (hsz == 124) { -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; -; 5053 : } -; 5054 : -; 5055 : static void* stbi__bmp_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5056 : { -; 5057 : stbi_uc* out; -; 5058 : unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a; -; 5059 : stbi_uc pal[256][4]; -; 5060 : int psize = 0, i, j, width; -; 5061 : int flip_vertically, pad, target; -; 5062 : stbi__bmp_data info; -; 5063 : STBI_NOTUSED(ri); -; 5064 : -; 5065 : info.all_a = 255; -; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) -; 5067 : return NULL; // error code already set -; 5068 : -; 5069 : flip_vertically = ((int)s->img_y) > 0; -; 5070 : s->img_y = abs((int)s->img_y); -; 5071 : -; 5072 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5073 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5074 : -; 5075 : mr = info.mr; -; 5076 : mg = info.mg; -; 5077 : mb = info.mb; -; 5078 : ma = info.ma; -; 5079 : all_a = info.all_a; -; 5080 : -; 5081 : if (info.hsz == 12) { -; 5082 : if (info.bpp < 24) -; 5083 : psize = (info.offset - info.extra_read - 24) / 3; -; 5084 : } -; 5085 : else { -; 5086 : if (info.bpp < 16) -; 5087 : psize = (info.offset - info.extra_read - info.hsz) >> 2; -; 5088 : } -; 5089 : if (psize == 0) { -; 5090 : // accept some number of extra bytes after the header, but if the offset points either to before -; 5091 : // the header ends or implies a large amount of extra data, reject the file as malformed -; 5092 : int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); -; 5093 : int header_limit = 1024; // max we actually read is below 256 bytes currently. -; 5094 : int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. -; 5095 : if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { -; 5096 : return stbi__errpuc("bad header", "Corrupt BMP"); -; 5097 : } -; 5098 : // we established that bytes_read_so_far is positive and sensible. -; 5099 : // the first half of this test rejects offsets that are either too small positives, or -; 5100 : // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn -; 5101 : // ensures the number computed in the second half of the test can't overflow. -; 5102 : if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { -; 5103 : return stbi__errpuc("bad offset", "Corrupt BMP"); -; 5104 : } -; 5105 : else { -; 5106 : stbi__skip(s, info.offset - bytes_read_so_far); -; 5107 : } -; 5108 : } -; 5109 : -; 5110 : if (info.bpp == 24 && ma == 0xff000000) -; 5111 : s->img_n = 3; -; 5112 : else -; 5113 : s->img_n = ma ? 4 : 3; -; 5114 : if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 -; 5115 : target = req_comp; -; 5116 : else -; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert -; 5118 : -; 5119 : // sanity-check size -; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) -; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); -; 5122 : -; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); -; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5125 : if (info.bpp < 16) { -; 5126 : int z = 0; -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } -; 5128 : for (i = 0; i < psize; ++i) { -; 5129 : pal[i][2] = stbi__get8(s); -; 5130 : pal[i][1] = stbi__get8(s); -; 5131 : pal[i][0] = stbi__get8(s); -; 5132 : if (info.hsz != 12) stbi__get8(s); -; 5133 : pal[i][3] = 255; -; 5134 : } -; 5135 : stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); -; 5136 : if (info.bpp == 1) width = (s->img_x + 7) >> 3; -; 5137 : else if (info.bpp == 4) width = (s->img_x + 1) >> 1; -; 5138 : else if (info.bpp == 8) width = s->img_x; -; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } -; 5140 : pad = (-width) & 3; -; 5141 : if (info.bpp == 1) { -; 5142 : for (j = 0; j < (int)s->img_y; ++j) { -; 5143 : int bit_offset = 7, v = stbi__get8(s); -; 5144 : for (i = 0; i < (int)s->img_x; ++i) { -; 5145 : int color = (v >> bit_offset) & 0x1; -; 5146 : out[z++] = pal[color][0]; -; 5147 : out[z++] = pal[color][1]; -; 5148 : out[z++] = pal[color][2]; -; 5149 : if (target == 4) out[z++] = 255; -; 5150 : if (i + 1 == (int)s->img_x) break; -; 5151 : if ((--bit_offset) < 0) { -; 5152 : bit_offset = 7; -; 5153 : v = stbi__get8(s); -; 5154 : } -; 5155 : } -; 5156 : stbi__skip(s, pad); -; 5157 : } -; 5158 : } -; 5159 : else { -; 5160 : for (j = 0; j < (int)s->img_y; ++j) { -; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { -; 5162 : int v = stbi__get8(s), v2 = 0; -; 5163 : if (info.bpp == 4) { -; 5164 : v2 = v & 15; -; 5165 : v >>= 4; -; 5166 : } -; 5167 : out[z++] = pal[v][0]; -; 5168 : out[z++] = pal[v][1]; -; 5169 : out[z++] = pal[v][2]; -; 5170 : if (target == 4) out[z++] = 255; -; 5171 : if (i + 1 == (int)s->img_x) break; -; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; -; 5173 : out[z++] = pal[v][0]; -; 5174 : out[z++] = pal[v][1]; -; 5175 : out[z++] = pal[v][2]; -; 5176 : if (target == 4) out[z++] = 255; -; 5177 : } -; 5178 : stbi__skip(s, pad); -; 5179 : } -; 5180 : } -; 5181 : } -; 5182 : else { -; 5183 : int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0; -; 5184 : int z = 0; -; 5185 : int easy = 0; -; 5186 : stbi__skip(s, info.offset - info.extra_read - info.hsz); -; 5187 : if (info.bpp == 24) width = 3 * s->img_x; -; 5188 : else if (info.bpp == 16) width = 2 * s->img_x; -; 5189 : else /* bpp = 32 and pad = 0 */ width = 0; -; 5190 : pad = (-width) & 3; -; 5191 : if (info.bpp == 24) { -; 5192 : easy = 1; -; 5193 : } -; 5194 : else if (info.bpp == 32) { -; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) -; 5196 : easy = 2; -; 5197 : } -; 5198 : if (!easy) { -; 5199 : if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); -; 5205 : if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5206 : } -; 5207 : for (j = 0; j < (int)s->img_y; ++j) { -; 5208 : if (easy) { -; 5209 : for (i = 0; i < (int)s->img_x; ++i) { -; 5210 : unsigned char a; -; 5211 : out[z + 2] = stbi__get8(s); -; 5212 : out[z + 1] = stbi__get8(s); -; 5213 : out[z + 0] = stbi__get8(s); -; 5214 : z += 3; -; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); -; 5216 : all_a |= a; -; 5217 : if (target == 4) out[z++] = a; -; 5218 : } -; 5219 : } -; 5220 : else { -; 5221 : int bpp = info.bpp; -; 5222 : for (i = 0; i < (int)s->img_x; ++i) { -; 5223 : stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s)); -; 5224 : unsigned int a; -; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); -; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); -; 5229 : all_a |= a; -; 5230 : if (target == 4) out[z++] = STBI__BYTECAST(a); -; 5231 : } -; 5232 : } -; 5233 : stbi__skip(s, pad); -; 5234 : } -; 5235 : } -; 5236 : -; 5237 : // if alpha channel is all 0s, replace with all 255s -; 5238 : if (target == 4 && all_a == 0) -; 5239 : for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4) -; 5240 : out[i] = 255; -; 5241 : -; 5242 : if (flip_vertically) { -; 5243 : stbi_uc t; -; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { -; 5245 : stbi_uc* p1 = out + j * s->img_x * target; -; 5246 : stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target; -; 5247 : for (i = 0; i < (int)s->img_x * target; ++i) { -; 5248 : t = p1[i]; p1[i] = p2[i]; p2[i] = t; -; 5249 : } -; 5250 : } -; 5251 : } -; 5252 : -; 5253 : if (req_comp && req_comp != target) { -; 5254 : out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); -; 5255 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5256 : } -; 5257 : -; 5258 : *x = s->img_x; -; 5259 : *y = s->img_y; -; 5260 : if (comp) *comp = s->img_n; -; 5261 : return out; -; 5262 : } -; 5263 : #endif -; 5264 : -; 5265 : // Targa Truevision - TGA -; 5266 : // by Jonathan Dummer -; 5267 : #ifndef STBI_NO_TGA -; 5268 : // returns STBI_rgb or whatever, 0 on error -; 5269 : static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -; 5270 : { -; 5271 : // only RGB or RGBA (incl. 16bit) or grey allowed -; 5272 : if (is_rgb16) *is_rgb16 = 0; -; 5273 : switch (bits_per_pixel) { -; 5274 : case 8: return STBI_grey; -; 5275 : case 16: if (is_grey) return STBI_grey_alpha; -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; -; 5278 : return STBI_rgb; -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; -; 5281 : default: return 0; -; 5282 : } -; 5283 : } -; 5284 : -; 5285 : static int stbi__tga_info(stbi__context* s, int* x, int* y, int* comp) -; 5286 : { -; 5287 : int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; -; 5288 : int sz, tga_colormap_type; -; 5289 : stbi__get8(s); // discard Offset -; 5290 : tga_colormap_type = stbi__get8(s); // colormap type -; 5291 : if (tga_colormap_type > 1) { -; 5292 : stbi__rewind(s); -; 5293 : return 0; // only RGB or indexed allowed -; 5294 : } -; 5295 : tga_image_type = stbi__get8(s); // image type -; 5296 : if (tga_colormap_type == 1) { // colormapped (paletted) image -; 5297 : if (tga_image_type != 1 && tga_image_type != 9) { -; 5298 : stbi__rewind(s); -; 5299 : return 0; -; 5300 : } -; 5301 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5302 : sz = stbi__get8(s); // check bits per palette color entry -; 5303 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) { -; 5304 : stbi__rewind(s); -; 5305 : return 0; -; 5306 : } -; 5307 : stbi__skip(s, 4); // skip image x and y origin -; 5308 : tga_colormap_bpp = sz; -; 5309 : } -; 5310 : else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE -; 5311 : if ((tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11)) { -; 5312 : stbi__rewind(s); -; 5313 : return 0; // only RGB or grey allowed, +/- RLE -; 5314 : } -; 5315 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5316 : tga_colormap_bpp = 0; -; 5317 : } -; 5318 : tga_w = stbi__get16le(s); -; 5319 : if (tga_w < 1) { -; 5320 : stbi__rewind(s); -; 5321 : return 0; // test width -; 5322 : } -; 5323 : tga_h = stbi__get16le(s); -; 5324 : if (tga_h < 1) { -; 5325 : stbi__rewind(s); -; 5326 : return 0; // test height -; 5327 : } -; 5328 : tga_bits_per_pixel = stbi__get8(s); // bits per pixel -; 5329 : stbi__get8(s); // ignore alpha bits -; 5330 : if (tga_colormap_bpp != 0) { -; 5331 : if ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { -; 5332 : // when using a colormap, tga_bits_per_pixel is the size of the indexes -; 5333 : // I don't think anything but 8 or 16bit indexes makes sense -; 5334 : stbi__rewind(s); -; 5335 : return 0; -; 5336 : } -; 5337 : tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); -; 5338 : } -; 5339 : else { -; 5340 : tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); -; 5341 : } -; 5342 : if (!tga_comp) { -; 5343 : stbi__rewind(s); -; 5344 : return 0; -; 5345 : } -; 5346 : if (x) *x = tga_w; -; 5347 : if (y) *y = tga_h; -; 5348 : if (comp) *comp = tga_comp; -; 5349 : return 1; // seems to have passed everything -; 5350 : } -; 5351 : -; 5352 : static int stbi__tga_test(stbi__context* s) -; 5353 : { -; 5354 : int res = 0; -; 5355 : int sz, tga_color_type; -; 5356 : stbi__get8(s); // discard Offset -; 5357 : tga_color_type = stbi__get8(s); // color type -; 5358 : if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed -; 5359 : sz = stbi__get8(s); // image type -; 5360 : if (tga_color_type == 1) { // colormapped (paletted) image -; 5361 : if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 -; 5362 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5363 : sz = stbi__get8(s); // check bits per palette color entry -; 5364 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5365 : stbi__skip(s, 4); // skip image x and y origin -; 5366 : } -; 5367 : else { // "normal" image w/o colormap -; 5368 : if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE -; 5369 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5370 : } -; 5371 : if (stbi__get16le(s) < 1) goto errorEnd; // test width -; 5372 : if (stbi__get16le(s) < 1) goto errorEnd; // test height -; 5373 : sz = stbi__get8(s); // bits per pixel -; 5374 : if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index -; 5375 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5376 : -; 5377 : res = 1; // if we got this far, everything's good and we can return 1 instead of 0 -; 5378 : -; 5379 : errorEnd: -; 5380 : stbi__rewind(s); -; 5381 : return res; -; 5382 : } -; 5383 : -; 5384 : // read 16bit value and convert to 24bit RGB -; 5385 : static void stbi__tga_read_rgb16(stbi__context* s, stbi_uc* out) -; 5386 : { -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); -; 5397 : -; 5398 : // some people claim that the most significant bit might be used for alpha -; 5399 : // (possibly if an alpha-bit is set in the "image descriptor byte") -; 5400 : // but that only made 16bit test images completely translucent.. -; 5401 : // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -; 5402 : } -; 5403 : -; 5404 : static void* stbi__tga_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5405 : { -; 5406 : // read in the TGA header stuff -; 5407 : int tga_offset = stbi__get8(s); -; 5408 : int tga_indexed = stbi__get8(s); -; 5409 : int tga_image_type = stbi__get8(s); -; 5410 : int tga_is_RLE = 0; -; 5411 : int tga_palette_start = stbi__get16le(s); -; 5412 : int tga_palette_len = stbi__get16le(s); -; 5413 : int tga_palette_bits = stbi__get8(s); -; 5414 : int tga_x_origin = stbi__get16le(s); -; 5415 : int tga_y_origin = stbi__get16le(s); -; 5416 : int tga_width = stbi__get16le(s); -; 5417 : int tga_height = stbi__get16le(s); -; 5418 : int tga_bits_per_pixel = stbi__get8(s); -; 5419 : int tga_comp, tga_rgb16 = 0; -; 5420 : int tga_inverted = stbi__get8(s); -; 5421 : // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) -; 5422 : // image data -; 5423 : unsigned char* tga_data; -; 5424 : unsigned char* tga_palette = NULL; -; 5425 : int i, j; -; 5426 : unsigned char raw_data[4] = { 0 }; -; 5427 : int RLE_count = 0; -; 5428 : int RLE_repeating = 0; -; 5429 : int read_next_pixel = 1; -; 5430 : STBI_NOTUSED(ri); -; 5431 : STBI_NOTUSED(tga_x_origin); // @TODO -; 5432 : STBI_NOTUSED(tga_y_origin); // @TODO -; 5433 : -; 5434 : if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5435 : if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5436 : -; 5437 : // do a tiny bit of precessing -; 5438 : if (tga_image_type >= 8) -; 5439 : { -; 5440 : tga_image_type -= 8; -; 5441 : tga_is_RLE = 1; -; 5442 : } -; 5443 : tga_inverted = 1 - ((tga_inverted >> 5) & 1); -; 5444 : -; 5445 : // If I'm paletted, then I'll use the number of bits from the palette -; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); -; 5447 : else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); -; 5448 : -; 5449 : if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency -; 5450 : return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); -; 5451 : -; 5452 : // tga info -; 5453 : *x = tga_width; -; 5454 : *y = tga_height; -; 5455 : if (comp) *comp = tga_comp; -; 5456 : -; 5457 : if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) -; 5458 : return stbi__errpuc("too large", "Corrupt TGA"); -; 5459 : -; 5460 : tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); -; 5461 : if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); -; 5462 : -; 5463 : // skip to the data's starting position (offset usually = 0) -; 5464 : stbi__skip(s, tga_offset); -; 5465 : -; 5466 : if (!tga_indexed && !tga_is_RLE && !tga_rgb16) { -; 5467 : for (i = 0; i < tga_height; ++i) { -; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; -; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; -; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); -; 5471 : } -; 5472 : } -; 5473 : else { -; 5474 : // do I need to load a palette? -; 5475 : if (tga_indexed) -; 5476 : { -; 5477 : if (tga_palette_len == 0) { /* you have to have at least one entry! */ -; 5478 : STBI_FREE(tga_data); -; 5479 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5480 : } -; 5481 : -; 5482 : // any data to skip? (offset usually = 0) -; 5483 : stbi__skip(s, tga_palette_start); -; 5484 : // load the palette -; 5485 : tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); -; 5486 : if (!tga_palette) { -; 5487 : STBI_FREE(tga_data); -; 5488 : return stbi__errpuc("outofmem", "Out of memory"); -; 5489 : } -; 5490 : if (tga_rgb16) { -; 5491 : stbi_uc* pal_entry = tga_palette; -; 5492 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5493 : for (i = 0; i < tga_palette_len; ++i) { -; 5494 : stbi__tga_read_rgb16(s, pal_entry); -; 5495 : pal_entry += tga_comp; -; 5496 : } -; 5497 : } -; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { -; 5499 : STBI_FREE(tga_data); -; 5500 : STBI_FREE(tga_palette); -; 5501 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) -; 5506 : { -; 5507 : // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? -; 5508 : if (tga_is_RLE) -; 5509 : { -; 5510 : if (RLE_count == 0) -; 5511 : { -; 5512 : // yep, get the next byte as a RLE command -; 5513 : int RLE_cmd = stbi__get8(s); -; 5514 : RLE_count = 1 + (RLE_cmd & 127); -; 5515 : RLE_repeating = RLE_cmd >> 7; -; 5516 : read_next_pixel = 1; -; 5517 : } -; 5518 : else if (!RLE_repeating) -; 5519 : { -; 5520 : read_next_pixel = 1; -; 5521 : } -; 5522 : } -; 5523 : else -; 5524 : { -; 5525 : read_next_pixel = 1; -; 5526 : } -; 5527 : // OK, if I need to read a pixel, do it now -; 5528 : if (read_next_pixel) -; 5529 : { -; 5530 : // load however much data we did have -; 5531 : if (tga_indexed) -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); -; 5535 : if (pal_idx >= tga_palette_len) { -; 5536 : // invalid index -; 5537 : pal_idx = 0; -; 5538 : } -; 5539 : pal_idx *= tga_comp; -; 5540 : for (j = 0; j < tga_comp; ++j) { -; 5541 : raw_data[j] = tga_palette[pal_idx + j]; -; 5542 : } -; 5543 : } -; 5544 : else if (tga_rgb16) { -; 5545 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5546 : stbi__tga_read_rgb16(s, raw_data); -; 5547 : } -; 5548 : else { -; 5549 : // read in the data raw -; 5550 : for (j = 0; j < tga_comp; ++j) { -; 5551 : raw_data[j] = stbi__get8(s); -; 5552 : } -; 5553 : } -; 5554 : // clear the reading flag for the next pixel -; 5555 : read_next_pixel = 0; -; 5556 : } // end of reading a pixel -; 5557 : -; 5558 : // copy data -; 5559 : for (j = 0; j < tga_comp; ++j) -; 5560 : tga_data[i * tga_comp + j] = raw_data[j]; -; 5561 : -; 5562 : // in case we're in RLE mode, keep counting down -; 5563 : --RLE_count; -; 5564 : } -; 5565 : // do I need to invert the image? -; 5566 : if (tga_inverted) -; 5567 : { -; 5568 : for (j = 0; j * 2 < tga_height; ++j) -; 5569 : { -; 5570 : int index1 = j * tga_width * tga_comp; -; 5571 : int index2 = (tga_height - 1 - j) * tga_width * tga_comp; -; 5572 : for (i = tga_width * tga_comp; i > 0; --i) -; 5573 : { -; 5574 : unsigned char temp = tga_data[index1]; -; 5575 : tga_data[index1] = tga_data[index2]; -; 5576 : tga_data[index2] = temp; -; 5577 : ++index1; -; 5578 : ++index2; -; 5579 : } -; 5580 : } -; 5581 : } -; 5582 : // clear my palette, if I had one -; 5583 : if (tga_palette != NULL) -; 5584 : { -; 5585 : STBI_FREE(tga_palette); -; 5586 : } -; 5587 : } -; 5588 : -; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order -; 5590 : if (tga_comp >= 3 && !tga_rgb16) -; 5591 : { -; 5592 : unsigned char* tga_pixel = tga_data; -; 5593 : for (i = 0; i < tga_width * tga_height; ++i) -; 5594 : { -; 5595 : unsigned char temp = tga_pixel[0]; -; 5596 : tga_pixel[0] = tga_pixel[2]; -; 5597 : tga_pixel[2] = temp; -; 5598 : tga_pixel += tga_comp; -; 5599 : } -; 5600 : } -; 5601 : -; 5602 : // convert to target component count -; 5603 : if (req_comp && req_comp != tga_comp) -; 5604 : tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); -; 5605 : -; 5606 : // the things I do to get rid of an error message, and yet keep -; 5607 : // Microsoft's C compilers happy... [8^( -; 5608 : tga_palette_start = tga_palette_len = tga_palette_bits = -; 5609 : tga_x_origin = tga_y_origin = 0; -; 5610 : STBI_NOTUSED(tga_palette_start); -; 5611 : // OK, done -; 5612 : return tga_data; -; 5613 : } -; 5614 : #endif -; 5615 : -; 5616 : // ************************************************************************************************* -; 5617 : // Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB -; 5618 : -; 5619 : #ifndef STBI_NO_PSD -; 5620 : static int stbi__psd_test(stbi__context* s) -; 5621 : { -; 5622 : int r = (stbi__get32be(s) == 0x38425053); -; 5623 : stbi__rewind(s); -; 5624 : return r; -; 5625 : } -; 5626 : -; 5627 : static int stbi__psd_decode_rle(stbi__context* s, stbi_uc* p, int pixelCount) -; 5628 : { -; 5629 : int count, nleft, len; -; 5630 : -; 5631 : count = 0; -; 5632 : while ((nleft = pixelCount - count) > 0) { -; 5633 : len = stbi__get8(s); -; 5634 : if (len == 128) { -; 5635 : // No-op. -; 5636 : } -; 5637 : else if (len < 128) { -; 5638 : // Copy next len+1 bytes literally. -; 5639 : len++; -; 5640 : if (len > nleft) return 0; // corrupt data -; 5641 : count += len; -; 5642 : while (len) { -; 5643 : *p = stbi__get8(s); -; 5644 : p += 4; -; 5645 : len--; -; 5646 : } -; 5647 : } -; 5648 : else if (len > 128) { -; 5649 : stbi_uc val; -; 5650 : // Next -len+1 bytes in the dest are replicated from next source byte. -; 5651 : // (Interpret len as a negative 8-bit int.) -; 5652 : len = 257 - len; -; 5653 : if (len > nleft) return 0; // corrupt data -; 5654 : val = stbi__get8(s); -; 5655 : count += len; -; 5656 : while (len) { -; 5657 : *p = val; -; 5658 : p += 4; -; 5659 : len--; -; 5660 : } -; 5661 : } -; 5662 : } -; 5663 : -; 5664 : return 1; -; 5665 : } -; 5666 : -; 5667 : static void* stbi__psd_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc) -; 5668 : { -; 5669 : int pixelCount; -; 5670 : int channelCount, compression; -; 5671 : int channel, i; -; 5672 : int bitdepth; -; 5673 : int w, h; -; 5674 : stbi_uc* out; -; 5675 : STBI_NOTUSED(ri); -; 5676 : -; 5677 : // Check identifier -; 5678 : if (stbi__get32be(s) != 0x38425053) // "8BPS" -; 5679 : return stbi__errpuc("not PSD", "Corrupt PSD image"); -; 5680 : -; 5681 : // Check file type version. -; 5682 : if (stbi__get16be(s) != 1) -; 5683 : return stbi__errpuc("wrong version", "Unsupported version of PSD image"); -; 5684 : -; 5685 : // Skip 6 reserved bytes. -; 5686 : stbi__skip(s, 6); -; 5687 : -; 5688 : // Read the number of channels (R, G, B, A, etc). -; 5689 : channelCount = stbi__get16be(s); -; 5690 : if (channelCount < 0 || channelCount > 16) -; 5691 : return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); -; 5692 : -; 5693 : // Read the rows and columns of the image. -; 5694 : h = stbi__get32be(s); -; 5695 : w = stbi__get32be(s); -; 5696 : -; 5697 : if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5698 : if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5699 : -; 5700 : // Make sure the depth is 8 bits. -; 5701 : bitdepth = stbi__get16be(s); -; 5702 : if (bitdepth != 8 && bitdepth != 16) -; 5703 : return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); -; 5704 : -; 5705 : // Make sure the color mode is RGB. -; 5706 : // Valid options are: -; 5707 : // 0: Bitmap -; 5708 : // 1: Grayscale -; 5709 : // 2: Indexed color -; 5710 : // 3: RGB color -; 5711 : // 4: CMYK color -; 5712 : // 7: Multichannel -; 5713 : // 8: Duotone -; 5714 : // 9: Lab color -; 5715 : if (stbi__get16be(s) != 3) -; 5716 : return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); -; 5717 : -; 5718 : // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) -; 5719 : stbi__skip(s, stbi__get32be(s)); -; 5720 : -; 5721 : // Skip the image resources. (resolution, pen tool paths, etc) -; 5722 : stbi__skip(s, stbi__get32be(s)); -; 5723 : -; 5724 : // Skip the reserved data. -; 5725 : stbi__skip(s, stbi__get32be(s)); -; 5726 : -; 5727 : // Find out if the data is compressed. -; 5728 : // Known values: -; 5729 : // 0: no compression -; 5730 : // 1: RLE compressed -; 5731 : compression = stbi__get16be(s); -; 5732 : if (compression > 1) -; 5733 : return stbi__errpuc("bad compression", "PSD has an unknown compression format"); -; 5734 : -; 5735 : // Check size -; 5736 : if (!stbi__mad3sizes_valid(4, w, h, 0)) -; 5737 : return stbi__errpuc("too large", "Corrupt PSD"); -; 5738 : -; 5739 : // Create the destination image. -; 5740 : -; 5741 : if (!compression && bitdepth == 16 && bpc == 16) { -; 5742 : out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0); -; 5743 : ri->bits_per_channel = 16; -; 5744 : } -; 5745 : else -; 5746 : out = (stbi_uc*)stbi__malloc(4 * w * h); -; 5747 : -; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5749 : pixelCount = w * h; -; 5750 : -; 5751 : // Initialize the data to zero. -; 5752 : //memset( out, 0, pixelCount * 4 ); -; 5753 : -; 5754 : // Finally, the image data. -; 5755 : if (compression) { -; 5756 : // RLE as used by .PSD and .TIFF -; 5757 : // Loop until you get the number of unpacked bytes you are expecting: -; 5758 : // Read the next source byte into n. -; 5759 : // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. -; 5760 : // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. -; 5761 : // Else if n is 128, noop. -; 5762 : // Endloop -; 5763 : -; 5764 : // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, -; 5765 : // which we're going to just skip. -; 5766 : stbi__skip(s, h * channelCount * 2); -; 5767 : -; 5768 : // Read the RLE data by channel. -; 5769 : for (channel = 0; channel < 4; channel++) { -; 5770 : stbi_uc* p; -; 5771 : -; 5772 : p = out + channel; -; 5773 : if (channel >= channelCount) { -; 5774 : // Fill this channel with default data. -; 5775 : for (i = 0; i < pixelCount; i++, p += 4) -; 5776 : *p = (channel == 3 ? 255 : 0); -; 5777 : } -; 5778 : else { -; 5779 : // Read the RLE data. -; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { -; 5781 : STBI_FREE(out); -; 5782 : return stbi__errpuc("corrupt", "bad RLE data"); -; 5783 : } -; 5784 : } -; 5785 : } -; 5786 : } -; 5787 : else { -; 5788 : // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) -; 5789 : // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. -; 5790 : -; 5791 : // Read the data by channel. -; 5792 : for (channel = 0; channel < 4; channel++) { -; 5793 : if (channel >= channelCount) { -; 5794 : // Fill this channel with default data. -; 5795 : if (bitdepth == 16 && bpc == 16) { -; 5796 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5797 : stbi__uint16 val = channel == 3 ? 65535 : 0; -; 5798 : for (i = 0; i < pixelCount; i++, q += 4) -; 5799 : *q = val; -; 5800 : } -; 5801 : else { -; 5802 : stbi_uc* p = out + channel; -; 5803 : stbi_uc val = channel == 3 ? 255 : 0; -; 5804 : for (i = 0; i < pixelCount; i++, p += 4) -; 5805 : *p = val; -; 5806 : } -; 5807 : } -; 5808 : else { -; 5809 : if (ri->bits_per_channel == 16) { // output bpc -; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5811 : for (i = 0; i < pixelCount; i++, q += 4) -; 5812 : *q = (stbi__uint16)stbi__get16be(s); -; 5813 : } -; 5814 : else { -; 5815 : stbi_uc* p = out + channel; -; 5816 : if (bitdepth == 16) { // input bpc -; 5817 : for (i = 0; i < pixelCount; i++, p += 4) -; 5818 : *p = (stbi_uc)(stbi__get16be(s) >> 8); -; 5819 : } -; 5820 : else { -; 5821 : for (i = 0; i < pixelCount; i++, p += 4) -; 5822 : *p = stbi__get8(s); -; 5823 : } -; 5824 : } -; 5825 : } -; 5826 : } -; 5827 : } -; 5828 : -; 5829 : // remove weird white matte from PSD -; 5830 : if (channelCount >= 4) { -; 5831 : if (ri->bits_per_channel == 16) { -; 5832 : for (i = 0; i < w * h; ++i) { -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); -; 5841 : } -; 5842 : } -; 5843 : } -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); -; 5854 : } -; 5855 : } -; 5856 : } -; 5857 : } -; 5858 : -; 5859 : // convert to desired output format -; 5860 : if (req_comp && req_comp != 4) { -; 5861 : if (ri->bits_per_channel == 16) -; 5862 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h); -; 5863 : else -; 5864 : out = stbi__convert_format(out, 4, req_comp, w, h); -; 5865 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5866 : } -; 5867 : -; 5868 : if (comp) *comp = 4; -; 5869 : *y = h; -; 5870 : *x = w; -; 5871 : -; 5872 : return out; -; 5873 : } -; 5874 : #endif -; 5875 : -; 5876 : // ************************************************************************************************* -; 5877 : // Softimage PIC loader -; 5878 : // by Tom Seddon -; 5879 : // -; 5880 : // See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -; 5881 : // See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ -; 5882 : -; 5883 : #ifndef STBI_NO_PIC -; 5884 : static int stbi__pic_is4(stbi__context* s, const char* str) -; 5885 : { -; 5886 : int i; -; 5887 : for (i = 0; i < 4; ++i) - +; Line 5887 000c2 48 ff c7 inc rdi 000c5 48 83 ff 04 cmp rdi, 4 000c9 7c b5 jl SHORT $LL15@stbi__pic_ - -; 5906 : -; 5907 : return 1; - +; Line 5907 000cb b8 01 00 00 00 mov eax, 1 000d0 eb 02 jmp SHORT $LN1@stbi__pic_ $LN32@stbi__pic_: - -; 5902 : stbi__get8(s); -; 5903 : -; 5904 : if (!stbi__pic_is4(s, "PICT")) -; 5905 : return 0; - +; Line 5905 000d2 33 c0 xor eax, eax $LN1@stbi__pic_: - -; 5908 : } - +; Line 5908 000d4 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 000d9 48 8b 6c 24 38 mov rbp, QWORD PTR [rsp+56] 000de 48 8b 74 24 40 mov rsi, QWORD PTR [rsp+64] @@ -54202,16 +31962,14 @@ $LN1@stbi__pic_: stbi__pic_test_core ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__readval _TEXT SEGMENT s$ = 48 channel$ = 56 dest$ = 64 stbi__readval PROC ; COMDAT - -; 5916 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 5916 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi @@ -54221,28 +31979,20 @@ stbi__readval PROC ; COMDAT 0001a 49 8b e8 mov rbp, r8 0001d 44 8b f2 mov r14d, edx 00020 48 8b d9 mov rbx, rcx - -; 5917 : int mask = 0x80, i; - +; Line 5917 00023 be 80 00 00 00 mov esi, 128 ; 00000080H 00028 33 ff xor edi, edi 0002a 66 0f 1f 44 00 00 npad 6 $LL4@stbi__read: - -; 5920 : if (channel & mask) { - +; Line 5920 00030 41 85 f6 test esi, r14d 00033 0f 84 a7 00 00 00 je $LN2@stbi__read - -; 1091 : if (s->io.read) { - +; Line 1091 00039 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 0003e 74 42 je SHORT $LN25@stbi__read - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 00040 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 00044 ff 53 20 call QWORD PTR [rbx+32] 00047 85 c0 test eax, eax @@ -54250,18 +32000,12 @@ $LL4@stbi__read: 0004b 48 8d 4b 30 lea rcx, QWORD PTR [rbx+48] 0004f eb 48 jmp SHORT $LN26@stbi__read $LN10@stbi__read: - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 00051 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00055 48 8d 43 30 lea rax, QWORD PTR [rbx+48] 00059 75 2b jne SHORT $LN23@stbi__read $LN27@stbi__read: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0005b 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 00064 8b 0d 00 00 00 @@ -54271,9 +32015,7 @@ $LN27@stbi__read: 00073 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_08GGMBIFE@bad?5file@ 0007a 48 89 04 0a mov QWORD PTR [rdx+rcx], rax - -; 5921 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "PIC file too short"); - +; Line 5921 0007e 33 c0 xor eax, eax 00080 eb 70 jmp SHORT $LN1@stbi__read $LN25@stbi__read: @@ -54286,36 +32028,26 @@ $LN23@stbi__read: 00 00 cmp QWORD PTR [rbx+192], rax 00097 73 c2 jae SHORT $LN27@stbi__read $LN26@stbi__read: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00099 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000a0 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 000a7 73 0f jae SHORT $LN16@stbi__read - -; 1078 : return *s->img_buffer++; - +; Line 1078 000a9 0f b6 08 movzx ecx, BYTE PTR [rax] 000ac 48 ff c0 inc rax 000af 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 000b6 eb 25 jmp SHORT $LN15@stbi__read $LN16@stbi__read: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000b8 83 39 00 cmp DWORD PTR [rcx], 0 000bb 74 1e je SHORT $LN17@stbi__read - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000bd 48 8b cb mov rcx, rbx 000c0 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000c5 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000cc 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -54324,37 +32056,22 @@ $LN16@stbi__read: 00 00 mov QWORD PTR [rbx+192], rax 000d9 eb 02 jmp SHORT $LN15@stbi__read $LN17@stbi__read: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000db 32 c9 xor cl, cl $LN15@stbi__read: - -; 5922 : dest[i] = stbi__get8(s); - +; Line 5922 000dd 88 0c 2f mov BYTE PTR [rdi+rbp], cl $LN2@stbi__read: - -; 5918 : -; 5919 : for (i = 0; i < 4; ++i, mask >>= 1) { - +; Line 5919 000e0 48 ff c7 inc rdi 000e3 d1 fe sar esi, 1 000e5 48 83 ff 04 cmp rdi, 4 000e9 0f 8c 41 ff ff ff jl $LL4@stbi__read - -; 5923 : } -; 5924 : } -; 5925 : -; 5926 : return dest; - +; Line 5926 000ef 48 8b c5 mov rax, rbp $LN1@stbi__read: - -; 5927 : } - +; Line 5927 000f2 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 000f7 48 8b 6c 24 38 mov rbp, QWORD PTR [rsp+56] 000fc 48 8b 74 24 40 mov rsi, QWORD PTR [rsp+64] @@ -54365,88 +32082,57 @@ $LN1@stbi__read: stbi__readval ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__copyval _TEXT SEGMENT channel$ = 8 dest$ = 16 src$ = 24 stbi__copyval PROC ; COMDAT - -; 5931 : int mask = 0x80, i; -; 5932 : -; 5933 : for (i = 0; i < 4; ++i, mask >>= 1) -; 5934 : if (channel & mask) - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 5934 00000 84 c9 test cl, cl 00002 79 06 jns SHORT $LN2@stbi__copy - -; 5935 : dest[i] = src[i]; - +; Line 5935 00004 41 0f b6 00 movzx eax, BYTE PTR [r8] 00008 88 02 mov BYTE PTR [rdx], al $LN2@stbi__copy: - -; 5931 : int mask = 0x80, i; -; 5932 : -; 5933 : for (i = 0; i < 4; ++i, mask >>= 1) -; 5934 : if (channel & mask) - +; Line 5934 0000a f6 c1 40 test cl, 64 ; 00000040H 0000d 74 08 je SHORT $LN10@stbi__copy - -; 5935 : dest[i] = src[i]; - +; Line 5935 0000f 41 0f b6 40 01 movzx eax, BYTE PTR [r8+1] 00014 88 42 01 mov BYTE PTR [rdx+1], al $LN10@stbi__copy: - -; 5931 : int mask = 0x80, i; -; 5932 : -; 5933 : for (i = 0; i < 4; ++i, mask >>= 1) -; 5934 : if (channel & mask) - +; Line 5934 00017 f6 c1 20 test cl, 32 ; 00000020H 0001a 74 08 je SHORT $LN12@stbi__copy - -; 5935 : dest[i] = src[i]; - +; Line 5935 0001c 41 0f b6 40 02 movzx eax, BYTE PTR [r8+2] 00021 88 42 02 mov BYTE PTR [rdx+2], al $LN12@stbi__copy: - -; 5931 : int mask = 0x80, i; -; 5932 : -; 5933 : for (i = 0; i < 4; ++i, mask >>= 1) -; 5934 : if (channel & mask) - +; Line 5934 00024 f6 c1 10 test cl, 16 00027 74 08 je SHORT $LN14@stbi__copy - -; 5935 : dest[i] = src[i]; - +; Line 5935 00029 41 0f b6 40 03 movzx eax, BYTE PTR [r8+3] 0002e 88 42 03 mov BYTE PTR [rdx+3], al $LN14@stbi__copy: - -; 5936 : } - +; Line 5936 00031 c3 ret 0 stbi__copyval ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__pic_load_core _TEXT SEGMENT height$1$ = 32 y$1$ = 36 tv1687 = 40 -$T9 = 48 -$T10 = 56 +$T1 = 48 +$T2 = 56 result$GSCopy$1$ = 64 tv1705 = 72 -value$11 = 80 -value$12 = 84 +value$3 = 80 +value$4 = 84 packets$ = 88 __$ArrayPad$ = 120 s$ = 192 @@ -54455,9 +32141,8 @@ height$ = 208 comp$ = 216 result$ = 224 stbi__pic_load_core PROC ; COMDAT - -; 5939 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 5939 00000 4c 8b dc mov r11, rsp 00003 57 push rdi 00004 41 54 push r12 @@ -54474,9 +32159,7 @@ stbi__pic_load_core PROC ; COMDAT 00 00 00 mov rax, QWORD PTR result$[rsp] 0002a 4d 8d 73 a0 lea r14, QWORD PTR [r11-96] 0002e 49 89 5b 18 mov QWORD PTR [r11+24], rbx - -; 5940 : int act_comp = 0, num_packets = 0, y, chained; - +; Line 5940 00032 45 33 ff xor r15d, r15d 00035 48 89 44 24 40 mov QWORD PTR result$GSCopy$1$[rsp], rax 0003a 4d 8b e1 mov r12, r9 @@ -54487,58 +32170,35 @@ stbi__pic_load_core PROC ; COMDAT 0004b 48 8b f9 mov rdi, rcx 0004e 49 89 73 c8 mov QWORD PTR [r11-56], rsi $LL4@stbi__pic_: - -; 5941 : stbi__pic_packet packets[10]; -; 5942 : -; 5943 : // this will (should...) cater for even some bizarre stuff like having data -; 5944 : // for the same channel in multiple packets. -; 5945 : do { -; 5946 : stbi__pic_packet* packet; -; 5947 : -; 5948 : if (num_packets == sizeof(packets) / sizeof(packets[0])) - +; Line 5948 00052 48 83 f8 0a cmp rax, 10 00056 0f 84 19 05 00 00 je $LN128@stbi__pic_ - -; 5949 : return stbi__errpuc("bad format", "too many packets"); -; 5950 : -; 5951 : packet = &packets[num_packets++]; - +; Line 5951 0005c 48 ff c0 inc rax 0005f 49 8b f6 mov rsi, r14 - 00062 48 89 44 24 30 mov QWORD PTR $T9[rsp], rax + 00062 48 89 44 24 30 mov QWORD PTR $T1[rsp], rax 00067 49 83 c6 03 add r14, 3 - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0006b 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00072 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 00079 73 0f jae SHORT $LN57@stbi__pic_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 0007b 0f b6 28 movzx ebp, BYTE PTR [rax] 0007e 48 ff c0 inc rax 00081 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 00088 eb 27 jmp SHORT $LN56@stbi__pic_ $LN57@stbi__pic_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0008a 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 0008e 74 1e je SHORT $LN58@stbi__pic_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00090 48 8b cf mov rcx, rdi 00093 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00098 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 0009f 0f b6 28 movzx ebp, BYTE PTR [rax] @@ -54547,40 +32207,27 @@ $LN57@stbi__pic_: 00 00 mov QWORD PTR [rdi+192], rax 000ac eb 03 jmp SHORT $LN56@stbi__pic_ $LN58@stbi__pic_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000ae 40 32 ed xor bpl, bpl $LN56@stbi__pic_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000b1 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 000b8 73 0f jae SHORT $LN61@stbi__pic_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 000ba 0f b6 18 movzx ebx, BYTE PTR [rax] 000bd 48 ff c0 inc rax 000c0 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 000c7 eb 26 jmp SHORT $LN60@stbi__pic_ $LN61@stbi__pic_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000c9 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 000cd 74 1e je SHORT $LN62@stbi__pic_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000cf 48 8b cf mov rcx, rdi 000d2 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000d7 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 000de 0f b6 18 movzx ebx, BYTE PTR [rax] @@ -54589,46 +32236,29 @@ $LN61@stbi__pic_: 00 00 mov QWORD PTR [rdi+192], rax 000eb eb 02 jmp SHORT $LN60@stbi__pic_ $LN62@stbi__pic_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000ed 32 db xor bl, bl $LN60@stbi__pic_: - -; 5952 : -; 5953 : chained = stbi__get8(s); -; 5954 : packet->size = stbi__get8(s); - +; Line 5954 000ef 88 1e mov BYTE PTR [rsi], bl - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000f1 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 000f8 73 0f jae SHORT $LN65@stbi__pic_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 000fa 0f b6 08 movzx ecx, BYTE PTR [rax] 000fd 48 ff c0 inc rax 00100 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 00107 eb 26 jmp SHORT $LN64@stbi__pic_ $LN65@stbi__pic_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00109 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 0010d 74 1e je SHORT $LN66@stbi__pic_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0010f 48 8b cf mov rcx, rdi 00112 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00117 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 0011e 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -54637,44 +32267,29 @@ $LN65@stbi__pic_: 00 00 mov QWORD PTR [rdi+192], rax 0012b eb 02 jmp SHORT $LN64@stbi__pic_ $LN66@stbi__pic_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 0012d 32 c9 xor cl, cl $LN64@stbi__pic_: - -; 5955 : packet->type = stbi__get8(s); - +; Line 5955 0012f 88 4e 01 mov BYTE PTR [rsi+1], cl - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00132 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 00139 73 0f jae SHORT $LN69@stbi__pic_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 0013b 0f b6 08 movzx ecx, BYTE PTR [rax] 0013e 48 ff c0 inc rax 00141 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 00148 eb 26 jmp SHORT $LN68@stbi__pic_ $LN69@stbi__pic_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0014a 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 0014e 74 1e je SHORT $LN70@stbi__pic_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00150 48 8b cf mov rcx, rdi 00153 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00158 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 0015f 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -54683,45 +32298,27 @@ $LN69@stbi__pic_: 00 00 mov QWORD PTR [rdi+192], rax 0016c eb 02 jmp SHORT $LN68@stbi__pic_ $LN70@stbi__pic_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 0016e 32 c9 xor cl, cl $LN68@stbi__pic_: - -; 5956 : packet->channel = stbi__get8(s); -; 5957 : -; 5958 : act_comp |= packet->channel; - +; Line 5958 00170 0f b6 c1 movzx eax, cl 00173 44 0b f8 or r15d, eax 00176 88 4e 02 mov BYTE PTR [rsi+2], cl - -; 1091 : if (s->io.read) { - +; Line 1091 00179 48 83 7f 10 00 cmp QWORD PTR [rdi+16], 0 0017e 74 15 je SHORT $LN190@stbi__pic_ - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 00180 48 8b 4f 28 mov rcx, QWORD PTR [rdi+40] 00184 ff 57 20 call QWORD PTR [rdi+32] 00187 85 c0 test eax, eax 00189 74 1e je SHORT $LN196@stbi__pic_ - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 0018b 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 0018f 0f 84 c4 03 00 00 je $LN134@stbi__pic_ $LN190@stbi__pic_: - -; 5959 : -; 5960 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (reading packets)"); - +; Line 5960 00195 48 8b 87 c8 00 00 00 mov rax, QWORD PTR [rdi+200] 0019c 48 39 87 c0 00 @@ -54729,30 +32326,20 @@ $LN190@stbi__pic_: 001a3 0f 83 b0 03 00 00 jae $LN134@stbi__pic_ $LN196@stbi__pic_: - -; 5961 : if (packet->size != 8) return stbi__errpuc("bad format", "packet isn't 8bpp"); - +; Line 5961 001a9 80 fb 08 cmp bl, 8 001ac 0f 85 c3 03 00 00 jne $LN128@stbi__pic_ - -; 5962 : } while (chained); - - 001b2 48 8b 44 24 30 mov rax, QWORD PTR $T9[rsp] +; Line 5962 + 001b2 48 8b 44 24 30 mov rax, QWORD PTR $T1[rsp] 001b7 40 84 ed test bpl, bpl 001ba 0f 85 92 fe ff ff jne $LL4@stbi__pic_ - -; 5963 : -; 5964 : *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel? - +; Line 5964 001c0 41 f6 c7 10 test r15b, 16 001c4 b8 00 00 00 00 mov eax, 0 001c9 0f 95 c0 setne al - -; 5965 : -; 5966 : for (y = 0; y < height; ++y) { - +; Line 5966 001cc 33 c9 xor ecx, ecx 001ce 83 c0 03 add eax, 3 001d1 89 4c 24 24 mov DWORD PTR y$1$[rsp], ecx @@ -54760,11 +32347,8 @@ $LN196@stbi__pic_: 001d9 39 4c 24 20 cmp DWORD PTR height$1$[rsp], ecx 001dd 0f 8e 6f 03 00 00 jle $LN202@stbi__pic_ - -; 5963 : -; 5964 : *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel? - - 001e3 48 8b 44 24 30 mov rax, QWORD PTR $T9[rsp] +; Line 5964 + 001e3 48 8b 44 24 30 mov rax, QWORD PTR $T1[rsp] 001e8 46 8d 04 ad 00 00 00 00 lea r8d, DWORD PTR [r13*4] 001f0 44 8b 4c 24 20 mov r9d, DWORD PTR height$1$[rsp] @@ -54772,13 +32356,9 @@ $LN196@stbi__pic_: 001f7 89 54 24 28 mov DWORD PTR tv1687[rsp], edx 001fb 0f 1f 44 00 00 npad 5 $LL7@stbi__pic_: - -; 5967 : int packet_idx; -; 5968 : -; 5969 : for (packet_idx = 0; packet_idx < num_packets; ++packet_idx) { - +; Line 5969 00200 48 c7 44 24 38 - 00 00 00 00 mov QWORD PTR $T10[rsp], 0 + 00 00 00 00 mov QWORD PTR $T2[rsp], 0 00209 48 85 c0 test rax, rax 0020c 0f 8e 2a 03 00 00 jle $LN5@stbi__pic_ @@ -54787,12 +32367,7 @@ $LL7@stbi__pic_: 0021a 48 03 44 24 40 add rax, QWORD PTR result$GSCopy$1$[rsp] 0021f 48 89 44 24 48 mov QWORD PTR tv1705[rsp], rax $LL10@stbi__pic_: - -; 5970 : stbi__pic_packet* packet = &packets[packet_idx]; -; 5971 : stbi_uc* dest = result + y * width * 4; -; 5972 : -; 5973 : switch (packet->type) { - +; Line 5973 00224 41 0f b6 4c 24 ff movzx ecx, BYTE PTR [r12-1] 0022a 48 8b d8 mov rbx, rax @@ -54805,18 +32380,9 @@ $LL10@stbi__pic_: 0023e 83 f9 01 cmp ecx, 1 00241 0f 85 2e 03 00 00 jne $LN128@stbi__pic_ - -; 6004 : } -; 6005 : } -; 6006 : break; -; 6007 : -; 6008 : case 2: {//Mixed RLE -; 6009 : int left = width; - +; Line 6009 00247 45 8b fd mov r15d, r13d - -; 6010 : while (left > 0) { - +; Line 6010 0024a 45 85 ed test r13d, r13d 0024d 0f 8e ae 02 00 00 jle $LN8@stbi__pic_ @@ -54824,36 +32390,26 @@ $LL10@stbi__pic_: 0f 1f 84 00 00 00 00 00 npad 13 $LL21@stbi__pic_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00260 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00267 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 0026e 73 0f jae SHORT $LN87@stbi__pic_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00270 0f b6 08 movzx ecx, BYTE PTR [rax] 00273 48 ff c0 inc rax 00276 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 0027d eb 26 jmp SHORT $LN86@stbi__pic_ $LN87@stbi__pic_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0027f 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 00283 74 1e je SHORT $LN88@stbi__pic_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00285 48 8b cf mov rcx, rdi 00288 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0028d 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00294 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -54862,43 +32418,26 @@ $LN87@stbi__pic_: 00 00 mov QWORD PTR [rdi+192], rax 002a1 eb 02 jmp SHORT $LN86@stbi__pic_ $LN88@stbi__pic_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 002a3 32 c9 xor cl, cl $LN86@stbi__pic_: - -; 1091 : if (s->io.read) { - +; Line 1091 002a5 48 83 7f 10 00 cmp QWORD PTR [rdi+16], 0 - -; 6011 : int count = stbi__get8(s), i; - +; Line 6011 002aa 0f b6 e9 movzx ebp, cl - -; 1091 : if (s->io.read) { - +; Line 1091 002ad 74 15 je SHORT $LN192@stbi__pic_ - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 002af 48 8b 4f 28 mov rcx, QWORD PTR [rdi+40] 002b3 ff 57 20 call QWORD PTR [rdi+32] 002b6 85 c0 test eax, eax 002b8 74 1e je SHORT $LN195@stbi__pic_ - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 002ba 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 002be 0f 84 95 02 00 00 je $LN134@stbi__pic_ $LN192@stbi__pic_: - -; 6012 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (mixed read count)"); - +; Line 6012 002c4 48 8b 87 c8 00 00 00 mov rax, QWORD PTR [rdi+200] 002cb 48 39 87 c0 00 @@ -54906,14656 +32445,88 @@ $LN192@stbi__pic_: 002d2 0f 83 81 02 00 00 jae $LN134@stbi__pic_ $LN195@stbi__pic_: - -; 6013 : -; 6014 : if (count >= 128) { // Repeated - +; Line 6014 002d8 81 fd 80 00 00 00 cmp ebp, 128 ; 00000080H 002de 0f 82 8c 00 00 00 jb $LN41@stbi__pic_ - -; 6015 : stbi_uc value[4]; -; 6016 : -; 6017 : if (count == 128) - +; Line 6017 002e4 75 0c jne SHORT $LN43@stbi__pic_ - -; 6018 : count = stbi__get16be(s); - +; Line 6018 002e6 48 8b cf mov rcx, rdi 002e9 e8 00 00 00 00 call stbi__get16be 002ee 8b e8 mov ebp, eax 002f0 eb 03 jmp SHORT $LN44@stbi__pic_ $LN43@stbi__pic_: - -; 6019 : else -; 6020 : count -= 127; - +; Line 6020 002f2 83 ed 7f sub ebp, 127 ; 0000007fH $LN44@stbi__pic_: - -; 6021 : if (count > left) - +; Line 6021 002f5 41 3b ef cmp ebp, r15d 002f8 0f 8f 5b 02 00 00 jg $LN134@stbi__pic_ - -; 6022 : return stbi__errpuc("bad file", "scanline overrun"); -; 6023 : -; 6024 : if (!stbi__readval(s, packet->channel, value)) - +; Line 6024 002fe 41 0f b6 34 24 movzx esi, BYTE PTR [r12] - 00303 4c 8d 44 24 50 lea r8, QWORD PTR value$11[rsp] + 00303 4c 8d 44 24 50 lea r8, QWORD PTR value$3[rsp] 00308 8b d6 mov edx, esi 0030a 48 8b cf mov rcx, rdi 0030d e8 00 00 00 00 call stbi__readval 00312 48 85 c0 test rax, rax 00315 0f 84 7d 02 00 00 je $LN139@stbi__pic_ - -; 6025 : return 0; -; 6026 : -; 6027 : for (i = 0; i < count; ++i, dest += 4) - +; Line 6027 0031b 85 ed test ebp, ebp 0031d 0f 8e 8e 00 00 00 jle $LN27@stbi__pic_ - -; 6028 : stbi__copyval(packet->channel, dest, value); - - 00323 8b 44 24 50 mov eax, DWORD PTR value$11[rsp] - 00327 0f b6 54 24 53 movzx edx, BYTE PTR value$11[rsp+3] +; Line 6028 + 00323 8b 44 24 50 mov eax, DWORD PTR value$3[rsp] + 00327 0f b6 54 24 53 movzx edx, BYTE PTR value$3[rsp+3] 0032c 44 0f b6 44 24 - 52 movzx r8d, BYTE PTR value$11[rsp+2] + 52 movzx r8d, BYTE PTR value$3[rsp+2] 00332 44 0f b6 4c 24 - 51 movzx r9d, BYTE PTR value$11[rsp+1] + 51 movzx r9d, BYTE PTR value$3[rsp+1] 00338 8b cd mov ecx, ebp 0033a 66 0f 1f 44 00 00 npad 6 $LL25@stbi__pic_: - -; 5934 : if (channel & mask) - +; Line 5934 00340 40 84 f6 test sil, sil 00343 79 02 jns SHORT $LN100@stbi__pic_ - -; 5935 : dest[i] = src[i]; - +; Line 5935 00345 88 03 mov BYTE PTR [rbx], al $LN100@stbi__pic_: - -; 1096 : } -; 1097 : -; 1098 : return s->img_buffer >= s->img_buffer_end; -; 1099 : } -; 1100 : #endif -; 1101 : -; 1102 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) -; 1103 : // nothing -; 1104 : #else -; 1105 : static void stbi__skip(stbi__context* s, int n) -; 1106 : { -; 1107 : if (n == 0) return; // already there! -; 1108 : if (n < 0) { -; 1109 : s->img_buffer = s->img_buffer_end; -; 1110 : return; -; 1111 : } -; 1112 : if (s->io.read) { -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1114 : if (blen < n) { -; 1115 : s->img_buffer = s->img_buffer_end; -; 1116 : (s->io.skip)(s->io_user_data, n - blen); -; 1117 : return; -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; -; 1121 : } -; 1122 : #endif -; 1123 : -; 1124 : #if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) -; 1125 : // nothing -; 1126 : #else -; 1127 : static int stbi__getn(stbi__context* s, stbi_uc* buffer, int n) -; 1128 : { -; 1129 : if (s->io.read) { -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1131 : if (blen < n) { -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; -; 1139 : return res; -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { -; 1144 : memcpy(buffer, s->img_buffer, n); -; 1145 : s->img_buffer += n; -; 1146 : return 1; -; 1147 : } -; 1148 : else -; 1149 : return 0; -; 1150 : } -; 1151 : #endif -; 1152 : -; 1153 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1154 : // nothing -; 1155 : #else -; 1156 : static int stbi__get16be(stbi__context* s) -; 1157 : { -; 1158 : int z = stbi__get8(s); -; 1159 : return (z << 8) + stbi__get8(s); -; 1160 : } -; 1161 : #endif -; 1162 : -; 1163 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1164 : // nothing -; 1165 : #else -; 1166 : static stbi__uint32 stbi__get32be(stbi__context* s) -; 1167 : { -; 1168 : stbi__uint32 z = stbi__get16be(s); -; 1169 : return (z << 16) + stbi__get16be(s); -; 1170 : } -; 1171 : #endif -; 1172 : -; 1173 : #if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -; 1174 : // nothing -; 1175 : #else -; 1176 : static int stbi__get16le(stbi__context* s) -; 1177 : { -; 1178 : int z = stbi__get8(s); -; 1179 : return z + (stbi__get8(s) << 8); -; 1180 : } -; 1181 : #endif -; 1182 : -; 1183 : #ifndef STBI_NO_BMP -; 1184 : static stbi__uint32 stbi__get32le(stbi__context* s) -; 1185 : { -; 1186 : stbi__uint32 z = stbi__get16le(s); -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; -; 1188 : return z; -; 1189 : } -; 1190 : #endif -; 1191 : -; 1192 : #define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings -; 1193 : -; 1194 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1195 : // nothing -; 1196 : #else -; 1197 : ////////////////////////////////////////////////////////////////////////////// -; 1198 : // -; 1199 : // generic converter from built-in img_n to req_comp -; 1200 : // individual types do this automatically as much as possible (e.g. jpeg -; 1201 : // does all cases internally since it needs to colorspace convert anyway, -; 1202 : // and it never has alpha, so very few cases ). png can automatically -; 1203 : // interleave an alpha=255 channel, but falls back to this for other cases -; 1204 : // -; 1205 : // assume data buffer is malloced, so malloc a new one and free that one -; 1206 : // only failure mode is malloc failing -; 1207 : -; 1208 : static stbi_uc stbi__compute_y(int r, int g, int b) -; 1209 : { -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1211 : } -; 1212 : #endif -; 1213 : -; 1214 : #if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1215 : // nothing -; 1216 : #else -; 1217 : static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1218 : { -; 1219 : int i, j; -; 1220 : unsigned char* good; -; 1221 : -; 1222 : if (req_comp == img_n) return data; -; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1224 : -; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); -; 1226 : if (good == NULL) { -; 1227 : STBI_FREE(data); -; 1228 : return stbi__errpuc("outofmem", "Out of memory"); -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { -; 1232 : unsigned char* src = data + j * x * img_n; -; 1233 : unsigned char* dest = good + j * x * req_comp; -; 1234 : -; 1235 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1236 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1237 : // convert source image with img_n components to one with req_comp components; -; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1239 : switch (STBI__COMBO(img_n, req_comp)) { -; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; -; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; -; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1253 : } -; 1254 : #undef STBI__CASE -; 1255 : } -; 1256 : -; 1257 : STBI_FREE(data); -; 1258 : return good; -; 1259 : } -; 1260 : #endif -; 1261 : -; 1262 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1263 : // nothing -; 1264 : #else -; 1265 : static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -; 1266 : { -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1268 : } -; 1269 : #endif -; 1270 : -; 1271 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1272 : // nothing -; 1273 : #else -; 1274 : static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1275 : { -; 1276 : int i, j; -; 1277 : stbi__uint16* good; -; 1278 : -; 1279 : if (req_comp == img_n) return data; -; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1281 : -; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); -; 1283 : if (good == NULL) { -; 1284 : STBI_FREE(data); -; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { -; 1289 : stbi__uint16* src = data + j * x * img_n; -; 1290 : stbi__uint16* dest = good + j * x * req_comp; -; 1291 : -; 1292 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1293 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1294 : // convert source image with img_n components to one with req_comp components; -; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1296 : switch (STBI__COMBO(img_n, req_comp)) { -; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; -; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; -; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1310 : } -; 1311 : #undef STBI__CASE -; 1312 : } -; 1313 : -; 1314 : STBI_FREE(data); -; 1315 : return good; -; 1316 : } -; 1317 : #endif -; 1318 : -; 1319 : #ifndef STBI_NO_LINEAR -; 1320 : static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp) -; 1321 : { -; 1322 : int i, k, n; -; 1323 : float* output; -; 1324 : if (!data) return NULL; -; 1325 : output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0); -; 1326 : if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } -; 1327 : // compute number of non-alpha components -; 1328 : if (comp & 1) n = comp; else n = comp - 1; -; 1329 : for (i = 0; i < x * y; ++i) { -; 1330 : for (k = 0; k < n; ++k) { -; 1331 : output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale); -; 1332 : } -; 1333 : } -; 1334 : if (n < comp) { -; 1335 : for (i = 0; i < x * y; ++i) { -; 1336 : output[i * comp + n] = data[i * comp + n] / 255.0f; -; 1337 : } -; 1338 : } -; 1339 : STBI_FREE(data); -; 1340 : return output; -; 1341 : } -; 1342 : #endif -; 1343 : -; 1344 : #ifndef STBI_NO_HDR -; 1345 : #define stbi__float2int(x) ((int) (x)) -; 1346 : static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp) -; 1347 : { -; 1348 : int i, k, n; -; 1349 : stbi_uc* output; -; 1350 : if (!data) return NULL; -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } -; 1353 : // compute number of non-alpha components -; 1354 : if (comp & 1) n = comp; else n = comp - 1; -; 1355 : for (i = 0; i < x * y; ++i) { -; 1356 : for (k = 0; k < n; ++k) { -; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; -; 1358 : if (z < 0) z = 0; -; 1359 : if (z > 255) z = 255; -; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1361 : } -; 1362 : if (k < comp) { -; 1363 : float z = data[i * comp + k] * 255 + 0.5f; -; 1364 : if (z < 0) z = 0; -; 1365 : if (z > 255) z = 255; -; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1367 : } -; 1368 : } -; 1369 : STBI_FREE(data); -; 1370 : return output; -; 1371 : } -; 1372 : #endif -; 1373 : -; 1374 : ////////////////////////////////////////////////////////////////////////////// -; 1375 : // -; 1376 : // "baseline" JPEG/JFIF decoder -; 1377 : // -; 1378 : // simple implementation -; 1379 : // - doesn't support delayed output of y-dimension -; 1380 : // - simple interface (only one output format: 8-bit interleaved RGB) -; 1381 : // - doesn't try to recover corrupt jpegs -; 1382 : // - doesn't allow partial loading, loading multiple at once -; 1383 : // - still fast on x86 (copying globals into locals doesn't help x86) -; 1384 : // - allocates lots of intermediate memory (full size of all components) -; 1385 : // - non-interleaved case requires this anyway -; 1386 : // - allows good upsampling (see next) -; 1387 : // high-quality -; 1388 : // - upsampled channels are bilinearly interpolated, even across blocks -; 1389 : // - quality integer IDCT derived from IJG's 'slow' -; 1390 : // performance -; 1391 : // - fast huffman; reasonable integer IDCT -; 1392 : // - some SIMD kernels for common paths on targets with SSE2/NEON -; 1393 : // - uses a lot of intermediate memory, could cache poorly -; 1394 : -; 1395 : #ifndef STBI_NO_JPEG -; 1396 : -; 1397 : // huffman decoding acceleration -; 1398 : #define FAST_BITS 9 // larger handles more cases; smaller stomps less cache -; 1399 : -; 1400 : typedef struct -; 1401 : { -; 1402 : stbi_uc fast[1 << FAST_BITS]; -; 1403 : // weirdly, repacking this into AoS is a 10% speed loss, instead of a win -; 1404 : stbi__uint16 code[256]; -; 1405 : stbi_uc values[256]; -; 1406 : stbi_uc size[257]; -; 1407 : unsigned int maxcode[18]; -; 1408 : int delta[17]; // old 'firstsymbol' - old 'firstcode' -; 1409 : } stbi__huffman; -; 1410 : -; 1411 : typedef struct -; 1412 : { -; 1413 : stbi__context* s; -; 1414 : stbi__huffman huff_dc[4]; -; 1415 : stbi__huffman huff_ac[4]; -; 1416 : stbi__uint16 dequant[4][64]; -; 1417 : stbi__int16 fast_ac[4][1 << FAST_BITS]; -; 1418 : -; 1419 : // sizes for components, interleaved MCUs -; 1420 : int img_h_max, img_v_max; -; 1421 : int img_mcu_x, img_mcu_y; -; 1422 : int img_mcu_w, img_mcu_h; -; 1423 : -; 1424 : // definition of jpeg image component -; 1425 : struct -; 1426 : { -; 1427 : int id; -; 1428 : int h, v; -; 1429 : int tq; -; 1430 : int hd, ha; -; 1431 : int dc_pred; -; 1432 : -; 1433 : int x, y, w2, h2; -; 1434 : stbi_uc* data; -; 1435 : void* raw_data, * raw_coeff; -; 1436 : stbi_uc* linebuf; -; 1437 : short* coeff; // progressive only -; 1438 : int coeff_w, coeff_h; // number of 8x8 coefficient blocks -; 1439 : } img_comp[4]; -; 1440 : -; 1441 : stbi__uint32 code_buffer; // jpeg entropy-coded buffer -; 1442 : int code_bits; // number of valid bits -; 1443 : unsigned char marker; // marker seen while filling entropy buffer -; 1444 : int nomore; // flag if we saw a marker so must stop -; 1445 : -; 1446 : int progressive; -; 1447 : int spec_start; -; 1448 : int spec_end; -; 1449 : int succ_high; -; 1450 : int succ_low; -; 1451 : int eob_run; -; 1452 : int jfif; -; 1453 : int app14_color_transform; // Adobe APP14 tag -; 1454 : int rgb; -; 1455 : -; 1456 : int scan_n, order[4]; -; 1457 : int restart_interval, todo; -; 1458 : -; 1459 : // kernels -; 1460 : void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]); -; 1461 : void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); -; 1462 : stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); -; 1463 : } stbi__jpeg; -; 1464 : -; 1465 : static int stbi__build_huffman(stbi__huffman* h, int* count) -; 1466 : { -; 1467 : int i, j, k = 0; -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { -; 1471 : for (j = 0; j < count[i]; ++j) { -; 1472 : h->size[k++] = (stbi_uc)(i + 1); -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); -; 1474 : } -; 1475 : } -; 1476 : h->size[k] = 0; -; 1477 : -; 1478 : // compute actual symbols (from jpeg spec) -; 1479 : code = 0; -; 1480 : k = 0; -; 1481 : for (j = 1; j <= 16; ++j) { -; 1482 : // compute delta to add to code to compute symbol id -; 1483 : h->delta[j] = k - code; -; 1484 : if (h->size[k] == j) { -; 1485 : while (h->size[k] == j) -; 1486 : h->code[k++] = (stbi__uint16)(code++); -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); -; 1488 : } -; 1489 : // compute largest code + 1 for this size, preshifted as needed later -; 1490 : h->maxcode[j] = code << (16 - j); -; 1491 : code <<= 1; -; 1492 : } -; 1493 : h->maxcode[j] = 0xffffffff; -; 1494 : -; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated -; 1496 : memset(h->fast, 255, 1 << FAST_BITS); -; 1497 : for (i = 0; i < k; ++i) { -; 1498 : int s = h->size[i]; -; 1499 : if (s <= FAST_BITS) { -; 1500 : int c = h->code[i] << (FAST_BITS - s); -; 1501 : int m = 1 << (FAST_BITS - s); -; 1502 : for (j = 0; j < m; ++j) { -; 1503 : h->fast[c + j] = (stbi_uc)i; -; 1504 : } -; 1505 : } -; 1506 : } -; 1507 : return 1; -; 1508 : } -; 1509 : -; 1510 : // build a table that decodes both magnitude and value of small ACs in -; 1511 : // one go. -; 1512 : static void stbi__build_fast_ac(stbi__int16* fast_ac, stbi__huffman* h) -; 1513 : { -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { -; 1516 : stbi_uc fast = h->fast[i]; -; 1517 : fast_ac[i] = 0; -; 1518 : if (fast < 255) { -; 1519 : int rs = h->values[fast]; -; 1520 : int run = (rs >> 4) & 15; -; 1521 : int magbits = rs & 15; -; 1522 : int len = h->size[fast]; -; 1523 : -; 1524 : if (magbits && len + magbits <= FAST_BITS) { -; 1525 : // magnitude code followed by receive_extend code -; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); -; 1527 : int m = 1 << (magbits - 1); -; 1528 : if (k < m) k += (~0U << magbits) + 1; -; 1529 : // if the result is small enough, we can fit it in fast_ac table -; 1530 : if (k >= -128 && k <= 127) -; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); -; 1532 : } -; 1533 : } -; 1534 : } -; 1535 : } -; 1536 : -; 1537 : static void stbi__grow_buffer_unsafe(stbi__jpeg* j) -; 1538 : { -; 1539 : do { -; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); -; 1541 : if (b == 0xff) { -; 1542 : int c = stbi__get8(j->s); -; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes -; 1544 : if (c != 0) { -; 1545 : j->marker = (unsigned char)c; -; 1546 : j->nomore = 1; -; 1547 : return; -; 1548 : } -; 1549 : } -; 1550 : j->code_buffer |= b << (24 - j->code_bits); -; 1551 : j->code_bits += 8; -; 1552 : } while (j->code_bits <= 24); -; 1553 : } -; 1554 : -; 1555 : // (1 << n) - 1 -; 1556 : static const stbi__uint32 stbi__bmask[17] = { 0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535 }; -; 1557 : -; 1558 : // decode a jpeg huffman value from the bitstream -; 1559 : stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg* j, stbi__huffman* h) -; 1560 : { -; 1561 : unsigned int temp; -; 1562 : int c, k; -; 1563 : -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1569 : k = h->fast[c]; -; 1570 : if (k < 255) { -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; -; 1575 : j->code_bits -= s; -; 1576 : return h->values[k]; -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; -; 1586 : for (k = FAST_BITS + 1; ; ++k) -; 1587 : if (temp < h->maxcode[k]) -; 1588 : break; -; 1589 : if (k == 17) { -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; -; 1608 : } -; 1609 : -; 1610 : // bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) -; 1623 : k = stbi_lrot(j->code_buffer, n); -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); -; 1628 : } -; 1629 : -; 1630 : // get some unsigned bits -; 1631 : stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg* j, int n) -; 1632 : { -; 1633 : unsigned int k; -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1636 : k = stbi_lrot(j->code_buffer, n); -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; -; 1640 : return k; -; 1641 : } -; 1642 : -; 1643 : stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg* j) -; 1644 : { -; 1645 : unsigned int k; -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1648 : k = j->code_buffer; -; 1649 : j->code_buffer <<= 1; -; 1650 : --j->code_bits; -; 1651 : return k & 0x80000000; -; 1652 : } -; 1653 : -; 1654 : // given a value that's at position X in the zigzag stream, -; 1655 : // where does it appear in the 8x8 matrix coded as row-major? -; 1656 : static const stbi_uc stbi__jpeg_dezigzag[64 + 15] = -; 1657 : { -; 1658 : 0, 1, 8, 16, 9, 2, 3, 10, -; 1659 : 17, 24, 32, 25, 18, 11, 4, 5, -; 1660 : 12, 19, 26, 33, 40, 48, 41, 34, -; 1661 : 27, 20, 13, 6, 7, 14, 21, 28, -; 1662 : 35, 42, 49, 56, 57, 50, 43, 36, -; 1663 : 29, 22, 15, 23, 30, 37, 44, 51, -; 1664 : 58, 59, 52, 45, 38, 31, 39, 46, -; 1665 : 53, 60, 61, 54, 47, 55, 62, 63, -; 1666 : // let corrupt input sample past end -; 1667 : 63, 63, 63, 63, 63, 63, 63, 63, -; 1668 : 63, 63, 63, 63, 63, 63, 63 -; 1669 : }; -; 1670 : -; 1671 : // decode one 64-entry block-- -; 1672 : static int stbi__jpeg_decode_block(stbi__jpeg* j, short data[64], stbi__huffman* hdc, stbi__huffman* hac, stbi__int16* fac, int b, stbi__uint16* dequant) -; 1673 : { -; 1674 : int diff, dc, k; -; 1675 : int t; -; 1676 : -; 1677 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1678 : t = stbi__jpeg_huff_decode(j, hdc); -; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1680 : -; 1681 : // 0 all the ac values now so we can do it 32-bits at a time -; 1682 : memset(data, 0, 64 * sizeof(data[0])); -; 1683 : -; 1684 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1686 : dc = j->img_comp[b].dc_pred + diff; -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1689 : data[0] = (short)(dc * dequant[0]); -; 1690 : -; 1691 : // decode AC components, see JPEG spec -; 1692 : k = 1; -; 1693 : do { -; 1694 : unsigned int zig; -; 1695 : int c, r, s; -; 1696 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1697 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1698 : r = fac[c]; -; 1699 : if (r) { // fast-AC path -; 1700 : k += (r >> 4) & 15; // run -; 1701 : s = r & 15; // combined length -; 1702 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1703 : j->code_buffer <<= s; -; 1704 : j->code_bits -= s; -; 1705 : // decode into unzigzag'd location -; 1706 : zig = stbi__jpeg_dezigzag[k++]; -; 1707 : data[zig] = (short)((r >> 8) * dequant[zig]); -; 1708 : } -; 1709 : else { -; 1710 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1711 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1712 : s = rs & 15; -; 1713 : r = rs >> 4; -; 1714 : if (s == 0) { -; 1715 : if (rs != 0xf0) break; // end block -; 1716 : k += 16; -; 1717 : } -; 1718 : else { -; 1719 : k += r; -; 1720 : // decode into unzigzag'd location -; 1721 : zig = stbi__jpeg_dezigzag[k++]; -; 1722 : data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]); -; 1723 : } -; 1724 : } -; 1725 : } while (k < 64); -; 1726 : return 1; -; 1727 : } -; 1728 : -; 1729 : static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg* j, short data[64], stbi__huffman* hdc, int b) -; 1730 : { -; 1731 : int diff, dc; -; 1732 : int t; -; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1734 : -; 1735 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1736 : -; 1737 : if (j->succ_high == 0) { -; 1738 : // first scan for DC coefficient, must be first -; 1739 : memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now -; 1740 : t = stbi__jpeg_huff_decode(j, hdc); -; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1742 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1745 : dc = j->img_comp[b].dc_pred + diff; -; 1746 : j->img_comp[b].dc_pred = dc; -; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1748 : data[0] = (short)(dc * (1 << j->succ_low)); -; 1749 : } -; 1750 : else { -; 1751 : // refinement scan for DC coefficient -; 1752 : if (stbi__jpeg_get_bit(j)) -; 1753 : data[0] += (short)(1 << j->succ_low); -; 1754 : } -; 1755 : return 1; -; 1756 : } -; 1757 : -; 1758 : // @OPTIMIZE: store non-zigzagged during the decode passes, -; 1759 : // and only de-zigzag when dequantizing -; 1760 : static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg* j, short data[64], stbi__huffman* hac, stbi__int16* fac) -; 1761 : { -; 1762 : int k; -; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1764 : -; 1765 : if (j->succ_high == 0) { -; 1766 : int shift = j->succ_low; -; 1767 : -; 1768 : if (j->eob_run) { -; 1769 : --j->eob_run; -; 1770 : return 1; -; 1771 : } -; 1772 : -; 1773 : k = j->spec_start; -; 1774 : do { -; 1775 : unsigned int zig; -; 1776 : int c, r, s; -; 1777 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1778 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1779 : r = fac[c]; -; 1780 : if (r) { // fast-AC path -; 1781 : k += (r >> 4) & 15; // run -; 1782 : s = r & 15; // combined length -; 1783 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1784 : j->code_buffer <<= s; -; 1785 : j->code_bits -= s; -; 1786 : zig = stbi__jpeg_dezigzag[k++]; -; 1787 : data[zig] = (short)((r >> 8) * (1 << shift)); -; 1788 : } -; 1789 : else { -; 1790 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1791 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1792 : s = rs & 15; -; 1793 : r = rs >> 4; -; 1794 : if (s == 0) { -; 1795 : if (r < 15) { -; 1796 : j->eob_run = (1 << r); -; 1797 : if (r) -; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1799 : --j->eob_run; -; 1800 : break; -; 1801 : } -; 1802 : k += 16; -; 1803 : } -; 1804 : else { -; 1805 : k += r; -; 1806 : zig = stbi__jpeg_dezigzag[k++]; -; 1807 : data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift)); -; 1808 : } -; 1809 : } -; 1810 : } while (k <= j->spec_end); -; 1811 : } -; 1812 : else { -; 1813 : // refinement scan for these AC coefficients -; 1814 : -; 1815 : short bit = (short)(1 << j->succ_low); -; 1816 : -; 1817 : if (j->eob_run) { -; 1818 : --j->eob_run; -; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { -; 1820 : short* p = &data[stbi__jpeg_dezigzag[k]]; -; 1821 : if (*p != 0) -; 1822 : if (stbi__jpeg_get_bit(j)) -; 1823 : if ((*p & bit) == 0) { -; 1824 : if (*p > 0) -; 1825 : *p += bit; -; 1826 : else -; 1827 : *p -= bit; -; 1828 : } -; 1829 : } -; 1830 : } -; 1831 : else { -; 1832 : k = j->spec_start; -; 1833 : do { -; 1834 : int r, s; -; 1835 : int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh -; 1836 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1837 : s = rs & 15; -; 1838 : r = rs >> 4; -; 1839 : if (s == 0) { -; 1840 : if (r < 15) { -; 1841 : j->eob_run = (1 << r) - 1; -; 1842 : if (r) -; 1843 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1844 : r = 64; // force end of block -; 1845 : } -; 1846 : else { -; 1847 : // r=15 s=0 should write 16 0s, so we just do -; 1848 : // a run of 15 0s and then write s (which is 0), -; 1849 : // so we don't have to do anything special here -; 1850 : } -; 1851 : } -; 1852 : else { -; 1853 : if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1854 : // sign bit -; 1855 : if (stbi__jpeg_get_bit(j)) -; 1856 : s = bit; -; 1857 : else -; 1858 : s = -bit; -; 1859 : } -; 1860 : -; 1861 : // advance by r -; 1862 : while (k <= j->spec_end) { -; 1863 : short* p = &data[stbi__jpeg_dezigzag[k++]]; -; 1864 : if (*p != 0) { -; 1865 : if (stbi__jpeg_get_bit(j)) -; 1866 : if ((*p & bit) == 0) { -; 1867 : if (*p > 0) -; 1868 : *p += bit; -; 1869 : else -; 1870 : *p -= bit; -; 1871 : } -; 1872 : } -; 1873 : else { -; 1874 : if (r == 0) { -; 1875 : *p = (short)s; -; 1876 : break; -; 1877 : } -; 1878 : --r; -; 1879 : } -; 1880 : } -; 1881 : } while (k <= j->spec_end); -; 1882 : } -; 1883 : } -; 1884 : return 1; -; 1885 : } -; 1886 : -; 1887 : // take a -128..127 value and stbi__clamp it and convert to 0..255 -; 1888 : stbi_inline static stbi_uc stbi__clamp(int x) -; 1889 : { -; 1890 : // trick to use a single test to catch both cases -; 1891 : if ((unsigned int)x > 255) { -; 1892 : if (x < 0) return 0; -; 1893 : if (x > 255) return 255; -; 1894 : } -; 1895 : return (stbi_uc)x; -; 1896 : } -; 1897 : -; 1898 : #define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -; 1899 : #define stbi__fsh(x) ((x) * 4096) -; 1900 : -; 1901 : // derived from jidctint -- DCT_ISLOW -; 1902 : #define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ -; 1903 : int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ -; 1904 : p2 = s2; \ -; 1905 : p3 = s6; \ -; 1906 : p1 = (p2+p3) * stbi__f2f(0.5411961f); \ -; 1907 : t2 = p1 + p3*stbi__f2f(-1.847759065f); \ -; 1908 : t3 = p1 + p2*stbi__f2f( 0.765366865f); \ -; 1909 : p2 = s0; \ -; 1910 : p3 = s4; \ -; 1911 : t0 = stbi__fsh(p2+p3); \ -; 1912 : t1 = stbi__fsh(p2-p3); \ -; 1913 : x0 = t0+t3; \ -; 1914 : x3 = t0-t3; \ -; 1915 : x1 = t1+t2; \ -; 1916 : x2 = t1-t2; \ -; 1917 : t0 = s7; \ -; 1918 : t1 = s5; \ -; 1919 : t2 = s3; \ -; 1920 : t3 = s1; \ -; 1921 : p3 = t0+t2; \ -; 1922 : p4 = t1+t3; \ -; 1923 : p1 = t0+t3; \ -; 1924 : p2 = t1+t2; \ -; 1925 : p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ -; 1926 : t0 = t0*stbi__f2f( 0.298631336f); \ -; 1927 : t1 = t1*stbi__f2f( 2.053119869f); \ -; 1928 : t2 = t2*stbi__f2f( 3.072711026f); \ -; 1929 : t3 = t3*stbi__f2f( 1.501321110f); \ -; 1930 : p1 = p5 + p1*stbi__f2f(-0.899976223f); \ -; 1931 : p2 = p5 + p2*stbi__f2f(-2.562915447f); \ -; 1932 : p3 = p3*stbi__f2f(-1.961570560f); \ -; 1933 : p4 = p4*stbi__f2f(-0.390180644f); \ -; 1934 : t3 += p1+p4; \ -; 1935 : t2 += p2+p3; \ -; 1936 : t1 += p2+p4; \ -; 1937 : t0 += p1+p3; -; 1938 : -; 1939 : static void stbi__idct_block(stbi_uc* out, int out_stride, short data[64]) -; 1940 : { -; 1941 : int i, val[64], * v = val; -; 1942 : stbi_uc* o; -; 1943 : short* d = data; -; 1944 : -; 1945 : // columns -; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { -; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing -; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 -; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { -; 1950 : // no shortcut 0 seconds -; 1951 : // (1|2|3|4|5|6|7)==0 0 seconds -; 1952 : // all separate -0.047 seconds -; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds -; 1954 : int dcterm = d[0] * 4; -; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; -; 1956 : } -; 1957 : else { -; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) -; 1959 : // constants scaled things up by 1<<12; let's bring them back -; 1960 : // down, but keep 2 extra bits of precision -; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; -; 1962 : v[0] = (x0 + t3) >> 10; -; 1963 : v[56] = (x0 - t3) >> 10; -; 1964 : v[8] = (x1 + t2) >> 10; -; 1965 : v[48] = (x1 - t2) >> 10; -; 1966 : v[16] = (x2 + t1) >> 10; -; 1967 : v[40] = (x2 - t1) >> 10; -; 1968 : v[24] = (x3 + t0) >> 10; -; 1969 : v[32] = (x3 - t0) >> 10; -; 1970 : } -; 1971 : } -; 1972 : -; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { -; 1974 : // no fast case since the first 1D IDCT spread components out -; 1975 : STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]) -; 1976 : // constants scaled things up by 1<<12, plus we had 1<<2 from first -; 1977 : // loop, plus horizontal and vertical each scale by sqrt(8) so together -; 1978 : // we've got an extra 1<<3, so 1<<17 total we need to remove. -; 1979 : // so we want to round that, which means adding 0.5 * 1<<17, -; 1980 : // aka 65536. Also, we'll end up with -128 to 127 that we want -; 1981 : // to encode as 0..255 by adding 128, so we'll add that before the shift -; 1982 : x0 += 65536 + (128 << 17); -; 1983 : x1 += 65536 + (128 << 17); -; 1984 : x2 += 65536 + (128 << 17); -; 1985 : x3 += 65536 + (128 << 17); -; 1986 : // tried computing the shifts into temps, or'ing the temps to see -; 1987 : // if any were out of range, but that was slower -; 1988 : o[0] = stbi__clamp((x0 + t3) >> 17); -; 1989 : o[7] = stbi__clamp((x0 - t3) >> 17); -; 1990 : o[1] = stbi__clamp((x1 + t2) >> 17); -; 1991 : o[6] = stbi__clamp((x1 - t2) >> 17); -; 1992 : o[2] = stbi__clamp((x2 + t1) >> 17); -; 1993 : o[5] = stbi__clamp((x2 - t1) >> 17); -; 1994 : o[3] = stbi__clamp((x3 + t0) >> 17); -; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); -; 1996 : } -; 1997 : } -; 1998 : -; 1999 : #ifdef STBI_SSE2 -; 2000 : // sse2 integer IDCT. not the fastest possible implementation but it -; 2001 : // produces bit-identical results to the generic C version so it's -; 2002 : // fully "transparent". -; 2003 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2004 : { -; 2005 : // This is constructed to match our regular (generic) integer IDCT exactly. -; 2006 : __m128i row0, row1, row2, row3, row4, row5, row6, row7; -; 2007 : __m128i tmp; -; 2008 : -; 2009 : // dot product constant: even elems=x, odd elems=y -; 2010 : #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) -; 2011 : -; 2012 : // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) -; 2013 : // out(1) = c1[even]*x + c1[odd]*y -; 2014 : #define dct_rot(out0,out1, x,y,c0,c1) \ -; 2015 : __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ -; 2016 : __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ -; 2017 : __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ -; 2018 : __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ -; 2019 : __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ -; 2020 : __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) -; 2021 : -; 2022 : // out = in << 12 (in 16-bit, out 32-bit) -; 2023 : #define dct_widen(out, in) \ -; 2024 : __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ -; 2025 : __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) -; 2026 : -; 2027 : // wide add -; 2028 : #define dct_wadd(out, a, b) \ -; 2029 : __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ -; 2030 : __m128i out##_h = _mm_add_epi32(a##_h, b##_h) -; 2031 : -; 2032 : // wide sub -; 2033 : #define dct_wsub(out, a, b) \ -; 2034 : __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ -; 2035 : __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) -; 2036 : -; 2037 : // butterfly a/b, add bias, then shift by "s" and pack -; 2038 : #define dct_bfly32o(out0, out1, a,b,bias,s) \ -; 2039 : { \ -; 2040 : __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ -; 2041 : __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ -; 2042 : dct_wadd(sum, abiased, b); \ -; 2043 : dct_wsub(dif, abiased, b); \ -; 2044 : out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ -; 2045 : out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ -; 2046 : } -; 2047 : -; 2048 : // 8-bit interleave step (for transposes) -; 2049 : #define dct_interleave8(a, b) \ -; 2050 : tmp = a; \ -; 2051 : a = _mm_unpacklo_epi8(a, b); \ -; 2052 : b = _mm_unpackhi_epi8(tmp, b) -; 2053 : -; 2054 : // 16-bit interleave step (for transposes) -; 2055 : #define dct_interleave16(a, b) \ -; 2056 : tmp = a; \ -; 2057 : a = _mm_unpacklo_epi16(a, b); \ -; 2058 : b = _mm_unpackhi_epi16(tmp, b) -; 2059 : -; 2060 : #define dct_pass(bias,shift) \ -; 2061 : { \ -; 2062 : /* even part */ \ -; 2063 : dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ -; 2064 : __m128i sum04 = _mm_add_epi16(row0, row4); \ -; 2065 : __m128i dif04 = _mm_sub_epi16(row0, row4); \ -; 2066 : dct_widen(t0e, sum04); \ -; 2067 : dct_widen(t1e, dif04); \ -; 2068 : dct_wadd(x0, t0e, t3e); \ -; 2069 : dct_wsub(x3, t0e, t3e); \ -; 2070 : dct_wadd(x1, t1e, t2e); \ -; 2071 : dct_wsub(x2, t1e, t2e); \ -; 2072 : /* odd part */ \ -; 2073 : dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ -; 2074 : dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ -; 2075 : __m128i sum17 = _mm_add_epi16(row1, row7); \ -; 2076 : __m128i sum35 = _mm_add_epi16(row3, row5); \ -; 2077 : dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ -; 2078 : dct_wadd(x4, y0o, y4o); \ -; 2079 : dct_wadd(x5, y1o, y5o); \ -; 2080 : dct_wadd(x6, y2o, y5o); \ -; 2081 : dct_wadd(x7, y3o, y4o); \ -; 2082 : dct_bfly32o(row0,row7, x0,x7,bias,shift); \ -; 2083 : dct_bfly32o(row1,row6, x1,x6,bias,shift); \ -; 2084 : dct_bfly32o(row2,row5, x2,x5,bias,shift); \ -; 2085 : dct_bfly32o(row3,row4, x3,x4,bias,shift); \ -; 2086 : } -; 2087 : -; 2088 : __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); -; 2089 : __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f)); -; 2090 : __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); -; 2091 : __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); -; 2092 : __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f)); -; 2093 : __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f)); -; 2094 : __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f)); -; 2095 : __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f)); -; 2096 : -; 2097 : // rounding biases in column/row passes, see stbi__idct_block for explanation. -; 2098 : __m128i bias_0 = _mm_set1_epi32(512); -; 2099 : __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17)); -; 2100 : -; 2101 : // load -; 2102 : row0 = _mm_load_si128((const __m128i*) (data + 0 * 8)); -; 2103 : row1 = _mm_load_si128((const __m128i*) (data + 1 * 8)); -; 2104 : row2 = _mm_load_si128((const __m128i*) (data + 2 * 8)); -; 2105 : row3 = _mm_load_si128((const __m128i*) (data + 3 * 8)); -; 2106 : row4 = _mm_load_si128((const __m128i*) (data + 4 * 8)); -; 2107 : row5 = _mm_load_si128((const __m128i*) (data + 5 * 8)); -; 2108 : row6 = _mm_load_si128((const __m128i*) (data + 6 * 8)); -; 2109 : row7 = _mm_load_si128((const __m128i*) (data + 7 * 8)); -; 2110 : -; 2111 : // column pass -; 2112 : dct_pass(bias_0, 10); -; 2113 : -; 2114 : { -; 2115 : // 16bit 8x8 transpose pass 1 -; 2116 : dct_interleave16(row0, row4); -; 2117 : dct_interleave16(row1, row5); -; 2118 : dct_interleave16(row2, row6); -; 2119 : dct_interleave16(row3, row7); -; 2120 : -; 2121 : // transpose pass 2 -; 2122 : dct_interleave16(row0, row2); -; 2123 : dct_interleave16(row1, row3); -; 2124 : dct_interleave16(row4, row6); -; 2125 : dct_interleave16(row5, row7); -; 2126 : -; 2127 : // transpose pass 3 -; 2128 : dct_interleave16(row0, row1); -; 2129 : dct_interleave16(row2, row3); -; 2130 : dct_interleave16(row4, row5); -; 2131 : dct_interleave16(row6, row7); -; 2132 : } -; 2133 : -; 2134 : // row pass -; 2135 : dct_pass(bias_1, 17); -; 2136 : -; 2137 : { -; 2138 : // pack -; 2139 : __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 -; 2140 : __m128i p1 = _mm_packus_epi16(row2, row3); -; 2141 : __m128i p2 = _mm_packus_epi16(row4, row5); -; 2142 : __m128i p3 = _mm_packus_epi16(row6, row7); -; 2143 : -; 2144 : // 8bit 8x8 transpose pass 1 -; 2145 : dct_interleave8(p0, p2); // a0e0a1e1... -; 2146 : dct_interleave8(p1, p3); // c0g0c1g1... -; 2147 : -; 2148 : // transpose pass 2 -; 2149 : dct_interleave8(p0, p1); // a0c0e0g0... -; 2150 : dct_interleave8(p2, p3); // b0d0f0h0... -; 2151 : -; 2152 : // transpose pass 3 -; 2153 : dct_interleave8(p0, p2); // a0b0c0d0... -; 2154 : dct_interleave8(p1, p3); // a4b4c4d4... -; 2155 : -; 2156 : // store -; 2157 : _mm_storel_epi64((__m128i*) out, p0); out += out_stride; -; 2158 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; -; 2159 : _mm_storel_epi64((__m128i*) out, p2); out += out_stride; -; 2160 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; -; 2161 : _mm_storel_epi64((__m128i*) out, p1); out += out_stride; -; 2162 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; -; 2163 : _mm_storel_epi64((__m128i*) out, p3); out += out_stride; -; 2164 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e)); -; 2165 : } -; 2166 : -; 2167 : #undef dct_const -; 2168 : #undef dct_rot -; 2169 : #undef dct_widen -; 2170 : #undef dct_wadd -; 2171 : #undef dct_wsub -; 2172 : #undef dct_bfly32o -; 2173 : #undef dct_interleave8 -; 2174 : #undef dct_interleave16 -; 2175 : #undef dct_pass -; 2176 : } -; 2177 : -; 2178 : #endif // STBI_SSE2 -; 2179 : -; 2180 : #ifdef STBI_NEON -; 2181 : -; 2182 : // NEON integer IDCT. should produce bit-identical -; 2183 : // results to the generic C version. -; 2184 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2185 : { -; 2186 : int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; -; 2187 : -; 2188 : int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); -; 2189 : int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); -; 2190 : int16x4_t rot0_2 = vdup_n_s16(stbi__f2f(0.765366865f)); -; 2191 : int16x4_t rot1_0 = vdup_n_s16(stbi__f2f(1.175875602f)); -; 2192 : int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); -; 2193 : int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); -; 2194 : int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); -; 2195 : int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); -; 2196 : int16x4_t rot3_0 = vdup_n_s16(stbi__f2f(0.298631336f)); -; 2197 : int16x4_t rot3_1 = vdup_n_s16(stbi__f2f(2.053119869f)); -; 2198 : int16x4_t rot3_2 = vdup_n_s16(stbi__f2f(3.072711026f)); -; 2199 : int16x4_t rot3_3 = vdup_n_s16(stbi__f2f(1.501321110f)); -; 2200 : -; 2201 : #define dct_long_mul(out, inq, coeff) \ -; 2202 : int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ -; 2203 : int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) -; 2204 : -; 2205 : #define dct_long_mac(out, acc, inq, coeff) \ -; 2206 : int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ -; 2207 : int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) -; 2208 : -; 2209 : #define dct_widen(out, inq) \ -; 2210 : int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ -; 2211 : int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) -; 2212 : -; 2213 : // wide add -; 2214 : #define dct_wadd(out, a, b) \ -; 2215 : int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ -; 2216 : int32x4_t out##_h = vaddq_s32(a##_h, b##_h) -; 2217 : -; 2218 : // wide sub -; 2219 : #define dct_wsub(out, a, b) \ -; 2220 : int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ -; 2221 : int32x4_t out##_h = vsubq_s32(a##_h, b##_h) -; 2222 : -; 2223 : // butterfly a/b, then shift using "shiftop" by "s" and pack -; 2224 : #define dct_bfly32o(out0,out1, a,b,shiftop,s) \ -; 2225 : { \ -; 2226 : dct_wadd(sum, a, b); \ -; 2227 : dct_wsub(dif, a, b); \ -; 2228 : out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ -; 2229 : out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ -; 2230 : } -; 2231 : -; 2232 : #define dct_pass(shiftop, shift) \ -; 2233 : { \ -; 2234 : /* even part */ \ -; 2235 : int16x8_t sum26 = vaddq_s16(row2, row6); \ -; 2236 : dct_long_mul(p1e, sum26, rot0_0); \ -; 2237 : dct_long_mac(t2e, p1e, row6, rot0_1); \ -; 2238 : dct_long_mac(t3e, p1e, row2, rot0_2); \ -; 2239 : int16x8_t sum04 = vaddq_s16(row0, row4); \ -; 2240 : int16x8_t dif04 = vsubq_s16(row0, row4); \ -; 2241 : dct_widen(t0e, sum04); \ -; 2242 : dct_widen(t1e, dif04); \ -; 2243 : dct_wadd(x0, t0e, t3e); \ -; 2244 : dct_wsub(x3, t0e, t3e); \ -; 2245 : dct_wadd(x1, t1e, t2e); \ -; 2246 : dct_wsub(x2, t1e, t2e); \ -; 2247 : /* odd part */ \ -; 2248 : int16x8_t sum15 = vaddq_s16(row1, row5); \ -; 2249 : int16x8_t sum17 = vaddq_s16(row1, row7); \ -; 2250 : int16x8_t sum35 = vaddq_s16(row3, row5); \ -; 2251 : int16x8_t sum37 = vaddq_s16(row3, row7); \ -; 2252 : int16x8_t sumodd = vaddq_s16(sum17, sum35); \ -; 2253 : dct_long_mul(p5o, sumodd, rot1_0); \ -; 2254 : dct_long_mac(p1o, p5o, sum17, rot1_1); \ -; 2255 : dct_long_mac(p2o, p5o, sum35, rot1_2); \ -; 2256 : dct_long_mul(p3o, sum37, rot2_0); \ -; 2257 : dct_long_mul(p4o, sum15, rot2_1); \ -; 2258 : dct_wadd(sump13o, p1o, p3o); \ -; 2259 : dct_wadd(sump24o, p2o, p4o); \ -; 2260 : dct_wadd(sump23o, p2o, p3o); \ -; 2261 : dct_wadd(sump14o, p1o, p4o); \ -; 2262 : dct_long_mac(x4, sump13o, row7, rot3_0); \ -; 2263 : dct_long_mac(x5, sump24o, row5, rot3_1); \ -; 2264 : dct_long_mac(x6, sump23o, row3, rot3_2); \ -; 2265 : dct_long_mac(x7, sump14o, row1, rot3_3); \ -; 2266 : dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ -; 2267 : dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ -; 2268 : dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ -; 2269 : dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ -; 2270 : } -; 2271 : -; 2272 : // load -; 2273 : row0 = vld1q_s16(data + 0 * 8); -; 2274 : row1 = vld1q_s16(data + 1 * 8); -; 2275 : row2 = vld1q_s16(data + 2 * 8); -; 2276 : row3 = vld1q_s16(data + 3 * 8); -; 2277 : row4 = vld1q_s16(data + 4 * 8); -; 2278 : row5 = vld1q_s16(data + 5 * 8); -; 2279 : row6 = vld1q_s16(data + 6 * 8); -; 2280 : row7 = vld1q_s16(data + 7 * 8); -; 2281 : -; 2282 : // add DC bias -; 2283 : row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); -; 2284 : -; 2285 : // column pass -; 2286 : dct_pass(vrshrn_n_s32, 10); -; 2287 : -; 2288 : // 16bit 8x8 transpose -; 2289 : { -; 2290 : // these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -; 2291 : // whether compilers actually get this is another story, sadly. -; 2292 : #define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -; 2293 : #define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -; 2294 : #define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } -; 2295 : -; 2296 : // pass 1 -; 2297 : dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 -; 2298 : dct_trn16(row2, row3); -; 2299 : dct_trn16(row4, row5); -; 2300 : dct_trn16(row6, row7); -; 2301 : -; 2302 : // pass 2 -; 2303 : dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 -; 2304 : dct_trn32(row1, row3); -; 2305 : dct_trn32(row4, row6); -; 2306 : dct_trn32(row5, row7); -; 2307 : -; 2308 : // pass 3 -; 2309 : dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 -; 2310 : dct_trn64(row1, row5); -; 2311 : dct_trn64(row2, row6); -; 2312 : dct_trn64(row3, row7); -; 2313 : -; 2314 : #undef dct_trn16 -; 2315 : #undef dct_trn32 -; 2316 : #undef dct_trn64 -; 2317 : } -; 2318 : -; 2319 : // row pass -; 2320 : // vrshrn_n_s32 only supports shifts up to 16, we need -; 2321 : // 17. so do a non-rounding shift of 16 first then follow -; 2322 : // up with a rounding shift by 1. -; 2323 : dct_pass(vshrn_n_s32, 16); -; 2324 : -; 2325 : { -; 2326 : // pack and round -; 2327 : uint8x8_t p0 = vqrshrun_n_s16(row0, 1); -; 2328 : uint8x8_t p1 = vqrshrun_n_s16(row1, 1); -; 2329 : uint8x8_t p2 = vqrshrun_n_s16(row2, 1); -; 2330 : uint8x8_t p3 = vqrshrun_n_s16(row3, 1); -; 2331 : uint8x8_t p4 = vqrshrun_n_s16(row4, 1); -; 2332 : uint8x8_t p5 = vqrshrun_n_s16(row5, 1); -; 2333 : uint8x8_t p6 = vqrshrun_n_s16(row6, 1); -; 2334 : uint8x8_t p7 = vqrshrun_n_s16(row7, 1); -; 2335 : -; 2336 : // again, these can translate into one instruction, but often don't. -; 2337 : #define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -; 2338 : #define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -; 2339 : #define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } -; 2340 : -; 2341 : // sadly can't use interleaved stores here since we only write -; 2342 : // 8 bytes to each scan line! -; 2343 : -; 2344 : // 8x8 8-bit transpose pass 1 -; 2345 : dct_trn8_8(p0, p1); -; 2346 : dct_trn8_8(p2, p3); -; 2347 : dct_trn8_8(p4, p5); -; 2348 : dct_trn8_8(p6, p7); -; 2349 : -; 2350 : // pass 2 -; 2351 : dct_trn8_16(p0, p2); -; 2352 : dct_trn8_16(p1, p3); -; 2353 : dct_trn8_16(p4, p6); -; 2354 : dct_trn8_16(p5, p7); -; 2355 : -; 2356 : // pass 3 -; 2357 : dct_trn8_32(p0, p4); -; 2358 : dct_trn8_32(p1, p5); -; 2359 : dct_trn8_32(p2, p6); -; 2360 : dct_trn8_32(p3, p7); -; 2361 : -; 2362 : // store -; 2363 : vst1_u8(out, p0); out += out_stride; -; 2364 : vst1_u8(out, p1); out += out_stride; -; 2365 : vst1_u8(out, p2); out += out_stride; -; 2366 : vst1_u8(out, p3); out += out_stride; -; 2367 : vst1_u8(out, p4); out += out_stride; -; 2368 : vst1_u8(out, p5); out += out_stride; -; 2369 : vst1_u8(out, p6); out += out_stride; -; 2370 : vst1_u8(out, p7); -; 2371 : -; 2372 : #undef dct_trn8_8 -; 2373 : #undef dct_trn8_16 -; 2374 : #undef dct_trn8_32 -; 2375 : } -; 2376 : -; 2377 : #undef dct_long_mul -; 2378 : #undef dct_long_mac -; 2379 : #undef dct_widen -; 2380 : #undef dct_wadd -; 2381 : #undef dct_wsub -; 2382 : #undef dct_bfly32o -; 2383 : #undef dct_pass -; 2384 : } -; 2385 : -; 2386 : #endif // STBI_NEON -; 2387 : -; 2388 : #define STBI__MARKER_none 0xff -; 2389 : // if there's a pending marker from the entropy stream, return that -; 2390 : // otherwise, fetch from the stream and get a marker. if there's no -; 2391 : // marker, return 0xff, which is never a valid marker value -; 2392 : static stbi_uc stbi__get_marker(stbi__jpeg* j) -; 2393 : { -; 2394 : stbi_uc x; -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } -; 2396 : x = stbi__get8(j->s); -; 2397 : if (x != 0xff) return STBI__MARKER_none; -; 2398 : while (x == 0xff) -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes -; 2400 : return x; -; 2401 : } -; 2402 : -; 2403 : // in each scan, we'll have scan_n components, and the order -; 2404 : // of the components is specified by order[] -; 2405 : #define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) -; 2406 : -; 2407 : // after a restart interval, stbi__jpeg_reset the entropy decoder and -; 2408 : // the dc prediction -; 2409 : static void stbi__jpeg_reset(stbi__jpeg* j) -; 2410 : { -; 2411 : j->code_bits = 0; -; 2412 : j->code_buffer = 0; -; 2413 : j->nomore = 0; -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; -; 2417 : j->eob_run = 0; -; 2418 : // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, -; 2419 : // since we don't even allow 1<<30 pixels -; 2420 : } -; 2421 : -; 2422 : static int stbi__parse_entropy_coded_data(stbi__jpeg* z) -; 2423 : { -; 2424 : stbi__jpeg_reset(z); -; 2425 : if (!z->progressive) { -; 2426 : if (z->scan_n == 1) { -; 2427 : int i, j; -; 2428 : STBI_SIMD_ALIGN(short, data[64]); -; 2429 : int n = z->order[0]; -; 2430 : // non-interleaved data, we just need to process one block at a time, -; 2431 : // in trivial scanline order -; 2432 : // number of blocks to do just depends on how many actual "pixels" this -; 2433 : // component has, independent of interleaved MCU blocking and such -; 2434 : int w = (z->img_comp[n].x + 7) >> 3; -; 2435 : int h = (z->img_comp[n].y + 7) >> 3; -; 2436 : for (j = 0; j < h; ++j) { -; 2437 : for (i = 0; i < w; ++i) { -; 2438 : int ha = z->img_comp[n].ha; -; 2439 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2440 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2441 : // every data block is an MCU, so countdown the restart interval -; 2442 : if (--z->todo <= 0) { -; 2443 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2444 : // if it's NOT a restart, then just bail, so we get corrupt data -; 2445 : // rather than no data -; 2446 : if (!STBI__RESTART(z->marker)) return 1; -; 2447 : stbi__jpeg_reset(z); -; 2448 : } -; 2449 : } -; 2450 : } -; 2451 : return 1; -; 2452 : } -; 2453 : else { // interleaved -; 2454 : int i, j, k, x, y; -; 2455 : STBI_SIMD_ALIGN(short, data[64]); -; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2458 : // scan an interleaved mcu... process scan_n components in order -; 2459 : for (k = 0; k < z->scan_n; ++k) { -; 2460 : int n = z->order[k]; -; 2461 : // scan out an mcu's worth of this component; that's just determined -; 2462 : // by the basic H and V specified for the component -; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2464 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2465 : int x2 = (i * z->img_comp[n].h + x) * 8; -; 2466 : int y2 = (j * z->img_comp[n].v + y) * 8; -; 2467 : int ha = z->img_comp[n].ha; -; 2468 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2469 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); -; 2470 : } -; 2471 : } -; 2472 : } -; 2473 : // after all interleaved components, that's an interleaved MCU, -; 2474 : // so now count down the restart interval -; 2475 : if (--z->todo <= 0) { -; 2476 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2477 : if (!STBI__RESTART(z->marker)) return 1; -; 2478 : stbi__jpeg_reset(z); -; 2479 : } -; 2480 : } -; 2481 : } -; 2482 : return 1; -; 2483 : } -; 2484 : } -; 2485 : else { -; 2486 : if (z->scan_n == 1) { -; 2487 : int i, j; -; 2488 : int n = z->order[0]; -; 2489 : // non-interleaved data, we just need to process one block at a time, -; 2490 : // in trivial scanline order -; 2491 : // number of blocks to do just depends on how many actual "pixels" this -; 2492 : // component has, independent of interleaved MCU blocking and such -; 2493 : int w = (z->img_comp[n].x + 7) >> 3; -; 2494 : int h = (z->img_comp[n].y + 7) >> 3; -; 2495 : for (j = 0; j < h; ++j) { -; 2496 : for (i = 0; i < w; ++i) { -; 2497 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2498 : if (z->spec_start == 0) { -; 2499 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2500 : return 0; -; 2501 : } -; 2502 : else { -; 2503 : int ha = z->img_comp[n].ha; -; 2504 : if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) -; 2505 : return 0; -; 2506 : } -; 2507 : // every data block is an MCU, so countdown the restart interval -; 2508 : if (--z->todo <= 0) { -; 2509 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2510 : if (!STBI__RESTART(z->marker)) return 1; -; 2511 : stbi__jpeg_reset(z); -; 2512 : } -; 2513 : } -; 2514 : } -; 2515 : return 1; -; 2516 : } -; 2517 : else { // interleaved -; 2518 : int i, j, k, x, y; -; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2521 : // scan an interleaved mcu... process scan_n components in order -; 2522 : for (k = 0; k < z->scan_n; ++k) { -; 2523 : int n = z->order[k]; -; 2524 : // scan out an mcu's worth of this component; that's just determined -; 2525 : // by the basic H and V specified for the component -; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2528 : int x2 = (i * z->img_comp[n].h + x); -; 2529 : int y2 = (j * z->img_comp[n].v + y); -; 2530 : short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); -; 2531 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2532 : return 0; -; 2533 : } -; 2534 : } -; 2535 : } -; 2536 : // after all interleaved components, that's an interleaved MCU, -; 2537 : // so now count down the restart interval -; 2538 : if (--z->todo <= 0) { -; 2539 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2540 : if (!STBI__RESTART(z->marker)) return 1; -; 2541 : stbi__jpeg_reset(z); -; 2542 : } -; 2543 : } -; 2544 : } -; 2545 : return 1; -; 2546 : } -; 2547 : } -; 2548 : } -; 2549 : -; 2550 : static void stbi__jpeg_dequantize(short* data, stbi__uint16* dequant) -; 2551 : { -; 2552 : int i; -; 2553 : for (i = 0; i < 64; ++i) -; 2554 : data[i] *= dequant[i]; -; 2555 : } -; 2556 : -; 2557 : static void stbi__jpeg_finish(stbi__jpeg* z) -; 2558 : { -; 2559 : if (z->progressive) { -; 2560 : // dequantize and idct the data -; 2561 : int i, j, n; -; 2562 : for (n = 0; n < z->s->img_n; ++n) { -; 2563 : int w = (z->img_comp[n].x + 7) >> 3; -; 2564 : int h = (z->img_comp[n].y + 7) >> 3; -; 2565 : for (j = 0; j < h; ++j) { -; 2566 : for (i = 0; i < w; ++i) { -; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2568 : stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); -; 2569 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2570 : } -; 2571 : } -; 2572 : } -; 2573 : } -; 2574 : } -; 2575 : -; 2576 : static int stbi__process_marker(stbi__jpeg* z, int m) -; 2577 : { -; 2578 : int L; -; 2579 : switch (m) { -; 2580 : case STBI__MARKER_none: // no marker found -; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); -; 2582 : -; 2583 : case 0xDD: // DRI - specify restart interval -; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); -; 2585 : z->restart_interval = stbi__get16be(z->s); -; 2586 : return 1; -; 2587 : -; 2588 : case 0xDB: // DQT - define quantization table -; 2589 : L = stbi__get16be(z->s) - 2; -; 2590 : while (L > 0) { -; 2591 : int q = stbi__get8(z->s); -; 2592 : int p = q >> 4, sixteen = (p != 0); -; 2593 : int t = q & 15, i; -; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); -; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); -; 2596 : -; 2597 : for (i = 0; i < 64; ++i) -; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); -; 2599 : L -= (sixteen ? 129 : 65); -; 2600 : } -; 2601 : return L == 0; -; 2602 : -; 2603 : case 0xC4: // DHT - define huffman table -; 2604 : L = stbi__get16be(z->s) - 2; -; 2605 : while (L > 0) { -; 2606 : stbi_uc* v; -; 2607 : int sizes[16], i, n = 0; -; 2608 : int q = stbi__get8(z->s); -; 2609 : int tc = q >> 4; -; 2610 : int th = q & 15; -; 2611 : if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG"); -; 2612 : for (i = 0; i < 16; ++i) { -; 2613 : sizes[i] = stbi__get8(z->s); -; 2614 : n += sizes[i]; -; 2615 : } -; 2616 : if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values! -; 2617 : L -= 17; -; 2618 : if (tc == 0) { -; 2619 : if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0; -; 2620 : v = z->huff_dc[th].values; -; 2621 : } -; 2622 : else { -; 2623 : if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0; -; 2624 : v = z->huff_ac[th].values; -; 2625 : } -; 2626 : for (i = 0; i < n; ++i) -; 2627 : v[i] = stbi__get8(z->s); -; 2628 : if (tc != 0) -; 2629 : stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); -; 2630 : L -= n; -; 2631 : } -; 2632 : return L == 0; -; 2633 : } -; 2634 : -; 2635 : // check for comment block or APP blocks -; 2636 : if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { -; 2637 : L = stbi__get16be(z->s); -; 2638 : if (L < 2) { -; 2639 : if (m == 0xFE) -; 2640 : return stbi__err("bad COM len", "Corrupt JPEG"); -; 2641 : else -; 2642 : return stbi__err("bad APP len", "Corrupt JPEG"); -; 2643 : } -; 2644 : L -= 2; -; 2645 : -; 2646 : if (m == 0xE0 && L >= 5) { // JFIF APP0 segment -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) -; 2652 : ok = 0; -; 2653 : L -= 5; -; 2654 : if (ok) -; 2655 : z->jfif = 1; -; 2656 : } -; 2657 : else if (m == 0xEE && L >= 12) { // Adobe APP14 segment -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) -; 2663 : ok = 0; -; 2664 : L -= 6; -; 2665 : if (ok) { -; 2666 : stbi__get8(z->s); // version -; 2667 : stbi__get16be(z->s); // flags0 -; 2668 : stbi__get16be(z->s); // flags1 -; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform -; 2670 : L -= 6; -; 2671 : } -; 2672 : } -; 2673 : -; 2674 : stbi__skip(z->s, L); -; 2675 : return 1; -; 2676 : } -; 2677 : -; 2678 : return stbi__err("unknown marker", "Corrupt JPEG"); -; 2679 : } -; 2680 : -; 2681 : // after we see SOS -; 2682 : static int stbi__process_scan_header(stbi__jpeg* z) -; 2683 : { -; 2684 : int i; -; 2685 : int Ls = stbi__get16be(z->s); -; 2686 : z->scan_n = stbi__get8(z->s); -; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); -; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); -; 2689 : for (i = 0; i < z->scan_n; ++i) { -; 2690 : int id = stbi__get8(z->s), which; -; 2691 : int q = stbi__get8(z->s); -; 2692 : for (which = 0; which < z->s->img_n; ++which) -; 2693 : if (z->img_comp[which].id == id) -; 2694 : break; -; 2695 : if (which == z->s->img_n) return 0; // no match -; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); -; 2698 : z->order[i] = which; -; 2699 : } -; 2700 : -; 2701 : { -; 2702 : int aa; -; 2703 : z->spec_start = stbi__get8(z->s); -; 2704 : z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 -; 2705 : aa = stbi__get8(z->s); -; 2706 : z->succ_high = (aa >> 4); -; 2707 : z->succ_low = (aa & 15); -; 2708 : if (z->progressive) { -; 2709 : if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) -; 2710 : return stbi__err("bad SOS", "Corrupt JPEG"); -; 2711 : } -; 2712 : else { -; 2713 : if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2714 : if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2715 : z->spec_end = 63; -; 2716 : } -; 2717 : } -; 2718 : -; 2719 : return 1; -; 2720 : } -; 2721 : -; 2722 : static int stbi__free_jpeg_components(stbi__jpeg* z, int ncomp, int why) -; 2723 : { -; 2724 : int i; -; 2725 : for (i = 0; i < ncomp; ++i) { -; 2726 : if (z->img_comp[i].raw_data) { -; 2727 : STBI_FREE(z->img_comp[i].raw_data); -; 2728 : z->img_comp[i].raw_data = NULL; -; 2729 : z->img_comp[i].data = NULL; -; 2730 : } -; 2731 : if (z->img_comp[i].raw_coeff) { -; 2732 : STBI_FREE(z->img_comp[i].raw_coeff); -; 2733 : z->img_comp[i].raw_coeff = 0; -; 2734 : z->img_comp[i].coeff = 0; -; 2735 : } -; 2736 : if (z->img_comp[i].linebuf) { -; 2737 : STBI_FREE(z->img_comp[i].linebuf); -; 2738 : z->img_comp[i].linebuf = NULL; -; 2739 : } -; 2740 : } -; 2741 : return why; -; 2742 : } -; 2743 : -; 2744 : static int stbi__process_frame_header(stbi__jpeg* z, int scan) -; 2745 : { -; 2746 : stbi__context* s = z->s; -; 2747 : int Lf, p, i, q, h_max = 1, v_max = 1, c; -; 2748 : Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG -; 2749 : p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline -; 2750 : s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG -; 2751 : s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires -; 2752 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2753 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2754 : c = stbi__get8(s); -; 2755 : if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG"); -; 2756 : s->img_n = c; -; 2757 : for (i = 0; i < c; ++i) { -; 2758 : z->img_comp[i].data = NULL; -; 2759 : z->img_comp[i].linebuf = NULL; -; 2760 : } -; 2761 : -; 2762 : if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG"); -; 2763 : -; 2764 : z->rgb = 0; -; 2765 : for (i = 0; i < s->img_n; ++i) { -; 2766 : static const unsigned char rgb[3] = { 'R', 'G', 'B' }; -; 2767 : z->img_comp[i].id = stbi__get8(s); -; 2768 : if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) -; 2769 : ++z->rgb; -; 2770 : q = stbi__get8(s); -; 2771 : z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H", "Corrupt JPEG"); -; 2772 : z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V", "Corrupt JPEG"); -; 2773 : z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ", "Corrupt JPEG"); -; 2774 : } -; 2775 : -; 2776 : if (scan != STBI__SCAN_load) return 1; -; 2777 : -; 2778 : if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); -; 2779 : -; 2780 : for (i = 0; i < s->img_n; ++i) { -; 2781 : if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; -; 2782 : if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; -; 2783 : } -; 2784 : -; 2785 : // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios -; 2786 : // and I've never seen a non-corrupted JPEG file actually use them -; 2787 : for (i = 0; i < s->img_n; ++i) { -; 2788 : if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG"); -; 2789 : if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG"); -; 2790 : } -; 2791 : -; 2792 : // compute interleaved mcu info -; 2793 : z->img_h_max = h_max; -; 2794 : z->img_v_max = v_max; -; 2795 : z->img_mcu_w = h_max * 8; -; 2796 : z->img_mcu_h = v_max * 8; -; 2797 : // these sizes can't be more than 17 bits -; 2798 : z->img_mcu_x = (s->img_x + z->img_mcu_w - 1) / z->img_mcu_w; -; 2799 : z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h; -; 2800 : -; 2801 : for (i = 0; i < s->img_n; ++i) { -; 2802 : // number of effective pixels (e.g. for non-interleaved MCU) -; 2803 : z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max - 1) / h_max; -; 2804 : z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max - 1) / v_max; -; 2805 : // to simplify generation, we'll allocate enough memory to decode -; 2806 : // the bogus oversized data from using interleaved MCUs and their -; 2807 : // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't -; 2808 : // discard the extra data until colorspace conversion -; 2809 : // -; 2810 : // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) -; 2811 : // so these muls can't overflow with 32-bit ints (which we require) -; 2812 : z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; -; 2813 : z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; -; 2814 : z->img_comp[i].coeff = 0; -; 2815 : z->img_comp[i].raw_coeff = 0; -; 2816 : z->img_comp[i].linebuf = NULL; -; 2817 : z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); -; 2818 : if (z->img_comp[i].raw_data == NULL) -; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2820 : // align blocks for idct using mmx/sse -; 2821 : z->img_comp[i].data = (stbi_uc*)(((size_t)z->img_comp[i].raw_data + 15) & ~15); -; 2822 : if (z->progressive) { -; 2823 : // w2, h2 are multiples of 8 (see above) -; 2824 : z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; -; 2825 : z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; -; 2826 : z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); -; 2827 : if (z->img_comp[i].raw_coeff == NULL) -; 2828 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2829 : z->img_comp[i].coeff = (short*)(((size_t)z->img_comp[i].raw_coeff + 15) & ~15); -; 2830 : } -; 2831 : } -; 2832 : -; 2833 : return 1; -; 2834 : } -; 2835 : -; 2836 : // use comparisons since in some cases we handle more than one case (e.g. SOF) -; 2837 : #define stbi__DNL(x) ((x) == 0xdc) -; 2838 : #define stbi__SOI(x) ((x) == 0xd8) -; 2839 : #define stbi__EOI(x) ((x) == 0xd9) -; 2840 : #define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) -; 2841 : #define stbi__SOS(x) ((x) == 0xda) -; 2842 : -; 2843 : #define stbi__SOF_progressive(x) ((x) == 0xc2) -; 2844 : -; 2845 : static int stbi__decode_jpeg_header(stbi__jpeg* z, int scan) -; 2846 : { -; 2847 : int m; -; 2848 : z->jfif = 0; -; 2849 : z->app14_color_transform = -1; // valid values are 0,1,2 -; 2850 : z->marker = STBI__MARKER_none; // initialize cached marker to empty -; 2851 : m = stbi__get_marker(z); -; 2852 : if (!stbi__SOI(m)) return stbi__err("no SOI", "Corrupt JPEG"); -; 2853 : if (scan == STBI__SCAN_type) return 1; -; 2854 : m = stbi__get_marker(z); -; 2855 : while (!stbi__SOF(m)) { -; 2856 : if (!stbi__process_marker(z, m)) return 0; -; 2857 : m = stbi__get_marker(z); -; 2858 : while (m == STBI__MARKER_none) { -; 2859 : // some files have extra padding after their blocks, so ok, we'll scan -; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); -; 2861 : m = stbi__get_marker(z); -; 2862 : } -; 2863 : } -; 2864 : z->progressive = stbi__SOF_progressive(m); -; 2865 : if (!stbi__process_frame_header(z, scan)) return 0; -; 2866 : return 1; -; 2867 : } -; 2868 : -; 2869 : static int stbi__skip_jpeg_junk_at_end(stbi__jpeg* j) -; 2870 : { -; 2871 : // some JPEGs have junk at end, skip over it but if we find what looks -; 2872 : // like a valid marker, resume there -; 2873 : while (!stbi__at_eof(j->s)) { -; 2874 : int x = stbi__get8(j->s); -; 2875 : while (x == 255) { // might be a marker -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; -; 2877 : x = stbi__get8(j->s); -; 2878 : if (x != 0x00 && x != 0xff) { -; 2879 : // not a stuffed zero or lead-in to another marker, looks -; 2880 : // like an actual marker, return it -; 2881 : return x; -; 2882 : } -; 2883 : // stuffed zero has x=0 now which ends the loop, meaning we go -; 2884 : // back to regular scan loop. -; 2885 : // repeated 0xff keeps trying to read the next byte of the marker. -; 2886 : } -; 2887 : } -; 2888 : return STBI__MARKER_none; -; 2889 : } -; 2890 : -; 2891 : // decode image to YCbCr format -; 2892 : static int stbi__decode_jpeg_image(stbi__jpeg* j) -; 2893 : { -; 2894 : int m; -; 2895 : for (m = 0; m < 4; m++) { -; 2896 : j->img_comp[m].raw_data = NULL; -; 2897 : j->img_comp[m].raw_coeff = NULL; -; 2898 : } -; 2899 : j->restart_interval = 0; -; 2900 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; -; 2901 : m = stbi__get_marker(j); -; 2902 : while (!stbi__EOI(m)) { -; 2903 : if (stbi__SOS(m)) { -; 2904 : if (!stbi__process_scan_header(j)) return 0; -; 2905 : if (!stbi__parse_entropy_coded_data(j)) return 0; -; 2906 : if (j->marker == STBI__MARKER_none) { -; 2907 : j->marker = stbi__skip_jpeg_junk_at_end(j); -; 2908 : // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 -; 2909 : } -; 2910 : m = stbi__get_marker(j); -; 2911 : if (STBI__RESTART(m)) -; 2912 : m = stbi__get_marker(j); -; 2913 : } -; 2914 : else if (stbi__DNL(m)) { -; 2915 : int Ld = stbi__get16be(j->s); -; 2916 : stbi__uint32 NL = stbi__get16be(j->s); -; 2917 : if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); -; 2918 : if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); -; 2919 : m = stbi__get_marker(j); -; 2920 : } -; 2921 : else { -; 2922 : if (!stbi__process_marker(j, m)) return 1; -; 2923 : m = stbi__get_marker(j); -; 2924 : } -; 2925 : } -; 2926 : if (j->progressive) -; 2927 : stbi__jpeg_finish(j); -; 2928 : return 1; -; 2929 : } -; 2930 : -; 2931 : // static jfif-centered resampling (across block boundaries) -; 2932 : -; 2933 : typedef stbi_uc* (*resample_row_func)(stbi_uc* out, stbi_uc* in0, stbi_uc* in1, -; 2934 : int w, int hs); -; 2935 : -; 2936 : #define stbi__div4(x) ((stbi_uc) ((x) >> 2)) -; 2937 : -; 2938 : static stbi_uc* resample_row_1(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2939 : { -; 2940 : STBI_NOTUSED(out); -; 2941 : STBI_NOTUSED(in_far); -; 2942 : STBI_NOTUSED(w); -; 2943 : STBI_NOTUSED(hs); -; 2944 : return in_near; -; 2945 : } -; 2946 : -; 2947 : static stbi_uc* stbi__resample_row_v_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2948 : { -; 2949 : // need to generate two samples vertically for every one in input -; 2950 : int i; -; 2951 : STBI_NOTUSED(hs); -; 2952 : for (i = 0; i < w; ++i) -; 2953 : out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2); -; 2954 : return out; -; 2955 : } -; 2956 : -; 2957 : static stbi_uc* stbi__resample_row_h_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2958 : { -; 2959 : // need to generate two samples horizontally for every one in input -; 2960 : int i; -; 2961 : stbi_uc* input = in_near; -; 2962 : -; 2963 : if (w == 1) { -; 2964 : // if only one sample, can't do any interpolation -; 2965 : out[0] = out[1] = input[0]; -; 2966 : return out; -; 2967 : } -; 2968 : -; 2969 : out[0] = input[0]; -; 2970 : out[1] = stbi__div4(input[0] * 3 + input[1] + 2); -; 2971 : for (i = 1; i < w - 1; ++i) { -; 2972 : int n = 3 * input[i] + 2; -; 2973 : out[i * 2 + 0] = stbi__div4(n + input[i - 1]); -; 2974 : out[i * 2 + 1] = stbi__div4(n + input[i + 1]); -; 2975 : } -; 2976 : out[i * 2 + 0] = stbi__div4(input[w - 2] * 3 + input[w - 1] + 2); -; 2977 : out[i * 2 + 1] = input[w - 1]; -; 2978 : -; 2979 : STBI_NOTUSED(in_far); -; 2980 : STBI_NOTUSED(hs); -; 2981 : -; 2982 : return out; -; 2983 : } -; 2984 : -; 2985 : #define stbi__div16(x) ((stbi_uc) ((x) >> 4)) -; 2986 : -; 2987 : static stbi_uc* stbi__resample_row_hv_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2988 : { -; 2989 : // need to generate 2x2 samples for every one in input -; 2990 : int i, t0, t1; -; 2991 : if (w == 1) { -; 2992 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 2993 : return out; -; 2994 : } -; 2995 : -; 2996 : t1 = 3 * in_near[0] + in_far[0]; -; 2997 : out[0] = stbi__div4(t1 + 2); -; 2998 : for (i = 1; i < w; ++i) { -; 2999 : t0 = t1; -; 3000 : t1 = 3 * in_near[i] + in_far[i]; -; 3001 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3002 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3003 : } -; 3004 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3005 : -; 3006 : STBI_NOTUSED(hs); -; 3007 : -; 3008 : return out; -; 3009 : } -; 3010 : -; 3011 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3012 : static stbi_uc* stbi__resample_row_hv_2_simd(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3013 : { -; 3014 : // need to generate 2x2 samples for every one in input -; 3015 : int i = 0, t0, t1; -; 3016 : -; 3017 : if (w == 1) { -; 3018 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 3019 : return out; -; 3020 : } -; 3021 : -; 3022 : t1 = 3 * in_near[0] + in_far[0]; -; 3023 : // process groups of 8 pixels for as long as we can. -; 3024 : // note we can't handle the last pixel in a row in this loop -; 3025 : // because we need to handle the filter boundary conditions. -; 3026 : for (; i < ((w - 1) & ~7); i += 8) { -; 3027 : #if defined(STBI_SSE2) -; 3028 : // load and perform the vertical filtering pass -; 3029 : // this uses 3*x + y = 4*x + (y - x) -; 3030 : __m128i zero = _mm_setzero_si128(); -; 3031 : __m128i farb = _mm_loadl_epi64((__m128i*) (in_far + i)); -; 3032 : __m128i nearb = _mm_loadl_epi64((__m128i*) (in_near + i)); -; 3033 : __m128i farw = _mm_unpacklo_epi8(farb, zero); -; 3034 : __m128i nearw = _mm_unpacklo_epi8(nearb, zero); -; 3035 : __m128i diff = _mm_sub_epi16(farw, nearw); -; 3036 : __m128i nears = _mm_slli_epi16(nearw, 2); -; 3037 : __m128i curr = _mm_add_epi16(nears, diff); // current row -; 3038 : -; 3039 : // horizontal filter works the same based on shifted vers of current -; 3040 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3041 : // insert the previous pixel value (from t1). -; 3042 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3043 : // of next block of 8 pixels added in. -; 3044 : __m128i prv0 = _mm_slli_si128(curr, 2); -; 3045 : __m128i nxt0 = _mm_srli_si128(curr, 2); -; 3046 : __m128i prev = _mm_insert_epi16(prv0, t1, 0); -; 3047 : __m128i next = _mm_insert_epi16(nxt0, 3 * in_near[i + 8] + in_far[i + 8], 7); -; 3048 : -; 3049 : // horizontal filter, polyphase implementation since it's convenient: -; 3050 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3051 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3052 : // note the shared term. -; 3053 : __m128i bias = _mm_set1_epi16(8); -; 3054 : __m128i curs = _mm_slli_epi16(curr, 2); -; 3055 : __m128i prvd = _mm_sub_epi16(prev, curr); -; 3056 : __m128i nxtd = _mm_sub_epi16(next, curr); -; 3057 : __m128i curb = _mm_add_epi16(curs, bias); -; 3058 : __m128i even = _mm_add_epi16(prvd, curb); -; 3059 : __m128i odd = _mm_add_epi16(nxtd, curb); -; 3060 : -; 3061 : // interleave even and odd pixels, then undo scaling. -; 3062 : __m128i int0 = _mm_unpacklo_epi16(even, odd); -; 3063 : __m128i int1 = _mm_unpackhi_epi16(even, odd); -; 3064 : __m128i de0 = _mm_srli_epi16(int0, 4); -; 3065 : __m128i de1 = _mm_srli_epi16(int1, 4); -; 3066 : -; 3067 : // pack and write output -; 3068 : __m128i outv = _mm_packus_epi16(de0, de1); -; 3069 : _mm_storeu_si128((__m128i*) (out + i * 2), outv); -; 3070 : #elif defined(STBI_NEON) -; 3071 : // load and perform the vertical filtering pass -; 3072 : // this uses 3*x + y = 4*x + (y - x) -; 3073 : uint8x8_t farb = vld1_u8(in_far + i); -; 3074 : uint8x8_t nearb = vld1_u8(in_near + i); -; 3075 : int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); -; 3076 : int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); -; 3077 : int16x8_t curr = vaddq_s16(nears, diff); // current row -; 3078 : -; 3079 : // horizontal filter works the same based on shifted vers of current -; 3080 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3081 : // insert the previous pixel value (from t1). -; 3082 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3083 : // of next block of 8 pixels added in. -; 3084 : int16x8_t prv0 = vextq_s16(curr, curr, 7); -; 3085 : int16x8_t nxt0 = vextq_s16(curr, curr, 1); -; 3086 : int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); -; 3087 : int16x8_t next = vsetq_lane_s16(3 * in_near[i + 8] + in_far[i + 8], nxt0, 7); -; 3088 : -; 3089 : // horizontal filter, polyphase implementation since it's convenient: -; 3090 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3091 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3092 : // note the shared term. -; 3093 : int16x8_t curs = vshlq_n_s16(curr, 2); -; 3094 : int16x8_t prvd = vsubq_s16(prev, curr); -; 3095 : int16x8_t nxtd = vsubq_s16(next, curr); -; 3096 : int16x8_t even = vaddq_s16(curs, prvd); -; 3097 : int16x8_t odd = vaddq_s16(curs, nxtd); -; 3098 : -; 3099 : // undo scaling and round, then store with even/odd phases interleaved -; 3100 : uint8x8x2_t o; -; 3101 : o.val[0] = vqrshrun_n_s16(even, 4); -; 3102 : o.val[1] = vqrshrun_n_s16(odd, 4); -; 3103 : vst2_u8(out + i * 2, o); -; 3104 : #endif -; 3105 : -; 3106 : // "previous" value for next iter -; 3107 : t1 = 3 * in_near[i + 7] + in_far[i + 7]; -; 3108 : } -; 3109 : -; 3110 : t0 = t1; -; 3111 : t1 = 3 * in_near[i] + in_far[i]; -; 3112 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3113 : -; 3114 : for (++i; i < w; ++i) { -; 3115 : t0 = t1; -; 3116 : t1 = 3 * in_near[i] + in_far[i]; -; 3117 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3118 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3119 : } -; 3120 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3121 : -; 3122 : STBI_NOTUSED(hs); -; 3123 : -; 3124 : return out; -; 3125 : } -; 3126 : #endif -; 3127 : -; 3128 : static stbi_uc* stbi__resample_row_generic(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3129 : { -; 3130 : // resample with nearest-neighbor -; 3131 : int i, j; -; 3132 : STBI_NOTUSED(in_far); -; 3133 : for (i = 0; i < w; ++i) -; 3134 : for (j = 0; j < hs; ++j) -; 3135 : out[i * hs + j] = in_near[i]; -; 3136 : return out; -; 3137 : } -; 3138 : -; 3139 : // this is a reduced-precision calculation of YCbCr-to-RGB introduced -; 3140 : // to make sure the code produces the same results in both SIMD and scalar -; 3141 : #define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) -; 3142 : static void stbi__YCbCr_to_RGB_row(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step) -; 3143 : { -; 3144 : int i; -; 3145 : for (i = 0; i < count; ++i) { -; 3146 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3147 : int r, g, b; -; 3148 : int cr = pcr[i] - 128; -; 3149 : int cb = pcb[i] - 128; -; 3150 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3151 : g = y_fixed + (cr * -stbi__float2fixed(0.71414f)) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3152 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3153 : r >>= 20; -; 3154 : g >>= 20; -; 3155 : b >>= 20; -; 3156 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3157 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3158 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3159 : out[0] = (stbi_uc)r; -; 3160 : out[1] = (stbi_uc)g; -; 3161 : out[2] = (stbi_uc)b; -; 3162 : out[3] = 255; -; 3163 : out += step; -; 3164 : } -; 3165 : } -; 3166 : -; 3167 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3168 : static void stbi__YCbCr_to_RGB_simd(stbi_uc* out, stbi_uc const* y, stbi_uc const* pcb, stbi_uc const* pcr, int count, int step) -; 3169 : { -; 3170 : int i = 0; -; 3171 : -; 3172 : #ifdef STBI_SSE2 -; 3173 : // step == 3 is pretty ugly on the final interleave, and i'm not convinced -; 3174 : // it's useful in practice (you wouldn't use it for textures, for example). -; 3175 : // so just accelerate step == 4 case. -; 3176 : if (step == 4) { -; 3177 : // this is a fairly straightforward implementation and not super-optimized. -; 3178 : __m128i signflip = _mm_set1_epi8(-0x80); -; 3179 : __m128i cr_const0 = _mm_set1_epi16((short)(1.40200f * 4096.0f + 0.5f)); -; 3180 : __m128i cr_const1 = _mm_set1_epi16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3181 : __m128i cb_const0 = _mm_set1_epi16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3182 : __m128i cb_const1 = _mm_set1_epi16((short)(1.77200f * 4096.0f + 0.5f)); -; 3183 : __m128i y_bias = _mm_set1_epi8((char)(unsigned char)128); -; 3184 : __m128i xw = _mm_set1_epi16(255); // alpha channel -; 3185 : -; 3186 : for (; i + 7 < count; i += 8) { -; 3187 : // load -; 3188 : __m128i y_bytes = _mm_loadl_epi64((__m128i*) (y + i)); -; 3189 : __m128i cr_bytes = _mm_loadl_epi64((__m128i*) (pcr + i)); -; 3190 : __m128i cb_bytes = _mm_loadl_epi64((__m128i*) (pcb + i)); -; 3191 : __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 -; 3192 : __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 -; 3193 : -; 3194 : // unpack to short (and left-shift cr, cb by 8) -; 3195 : __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); -; 3196 : __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); -; 3197 : __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); -; 3198 : -; 3199 : // color transform -; 3200 : __m128i yws = _mm_srli_epi16(yw, 4); -; 3201 : __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); -; 3202 : __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); -; 3203 : __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); -; 3204 : __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); -; 3205 : __m128i rws = _mm_add_epi16(cr0, yws); -; 3206 : __m128i gwt = _mm_add_epi16(cb0, yws); -; 3207 : __m128i bws = _mm_add_epi16(yws, cb1); -; 3208 : __m128i gws = _mm_add_epi16(gwt, cr1); -; 3209 : -; 3210 : // descale -; 3211 : __m128i rw = _mm_srai_epi16(rws, 4); -; 3212 : __m128i bw = _mm_srai_epi16(bws, 4); -; 3213 : __m128i gw = _mm_srai_epi16(gws, 4); -; 3214 : -; 3215 : // back to byte, set up for transpose -; 3216 : __m128i brb = _mm_packus_epi16(rw, bw); -; 3217 : __m128i gxb = _mm_packus_epi16(gw, xw); -; 3218 : -; 3219 : // transpose to interleave channels -; 3220 : __m128i t0 = _mm_unpacklo_epi8(brb, gxb); -; 3221 : __m128i t1 = _mm_unpackhi_epi8(brb, gxb); -; 3222 : __m128i o0 = _mm_unpacklo_epi16(t0, t1); -; 3223 : __m128i o1 = _mm_unpackhi_epi16(t0, t1); -; 3224 : -; 3225 : // store -; 3226 : _mm_storeu_si128((__m128i*) (out + 0), o0); -; 3227 : _mm_storeu_si128((__m128i*) (out + 16), o1); -; 3228 : out += 32; -; 3229 : } -; 3230 : } -; 3231 : #endif -; 3232 : -; 3233 : #ifdef STBI_NEON -; 3234 : // in this version, step=3 support would be easy to add. but is there demand? -; 3235 : if (step == 4) { -; 3236 : // this is a fairly straightforward implementation and not super-optimized. -; 3237 : uint8x8_t signflip = vdup_n_u8(0x80); -; 3238 : int16x8_t cr_const0 = vdupq_n_s16((short)(1.40200f * 4096.0f + 0.5f)); -; 3239 : int16x8_t cr_const1 = vdupq_n_s16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3240 : int16x8_t cb_const0 = vdupq_n_s16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3241 : int16x8_t cb_const1 = vdupq_n_s16((short)(1.77200f * 4096.0f + 0.5f)); -; 3242 : -; 3243 : for (; i + 7 < count; i += 8) { -; 3244 : // load -; 3245 : uint8x8_t y_bytes = vld1_u8(y + i); -; 3246 : uint8x8_t cr_bytes = vld1_u8(pcr + i); -; 3247 : uint8x8_t cb_bytes = vld1_u8(pcb + i); -; 3248 : int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); -; 3249 : int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); -; 3250 : -; 3251 : // expand to s16 -; 3252 : int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); -; 3253 : int16x8_t crw = vshll_n_s8(cr_biased, 7); -; 3254 : int16x8_t cbw = vshll_n_s8(cb_biased, 7); -; 3255 : -; 3256 : // color transform -; 3257 : int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); -; 3258 : int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); -; 3259 : int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); -; 3260 : int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); -; 3261 : int16x8_t rws = vaddq_s16(yws, cr0); -; 3262 : int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); -; 3263 : int16x8_t bws = vaddq_s16(yws, cb1); -; 3264 : -; 3265 : // undo scaling, round, convert to byte -; 3266 : uint8x8x4_t o; -; 3267 : o.val[0] = vqrshrun_n_s16(rws, 4); -; 3268 : o.val[1] = vqrshrun_n_s16(gws, 4); -; 3269 : o.val[2] = vqrshrun_n_s16(bws, 4); -; 3270 : o.val[3] = vdup_n_u8(255); -; 3271 : -; 3272 : // store, interleaving r/g/b/a -; 3273 : vst4_u8(out, o); -; 3274 : out += 8 * 4; -; 3275 : } -; 3276 : } -; 3277 : #endif -; 3278 : -; 3279 : for (; i < count; ++i) { -; 3280 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3281 : int r, g, b; -; 3282 : int cr = pcr[i] - 128; -; 3283 : int cb = pcb[i] - 128; -; 3284 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3285 : g = y_fixed + cr * -stbi__float2fixed(0.71414f) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3286 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3287 : r >>= 20; -; 3288 : g >>= 20; -; 3289 : b >>= 20; -; 3290 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3291 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3292 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3293 : out[0] = (stbi_uc)r; -; 3294 : out[1] = (stbi_uc)g; -; 3295 : out[2] = (stbi_uc)b; -; 3296 : out[3] = 255; -; 3297 : out += step; -; 3298 : } -; 3299 : } -; 3300 : #endif -; 3301 : -; 3302 : // set up the kernels -; 3303 : static void stbi__setup_jpeg(stbi__jpeg* j) -; 3304 : { -; 3305 : j->idct_block_kernel = stbi__idct_block; -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; -; 3308 : -; 3309 : #ifdef STBI_SSE2 -; 3310 : if (stbi__sse2_available()) { -; 3311 : j->idct_block_kernel = stbi__idct_simd; -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3314 : } -; 3315 : #endif -; 3316 : -; 3317 : #ifdef STBI_NEON -; 3318 : j->idct_block_kernel = stbi__idct_simd; -; 3319 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3320 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3321 : #endif -; 3322 : } -; 3323 : -; 3324 : // clean up the temporary component buffers -; 3325 : static void stbi__cleanup_jpeg(stbi__jpeg* j) -; 3326 : { -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); -; 3328 : } -; 3329 : -; 3330 : typedef struct -; 3331 : { -; 3332 : resample_row_func resample; -; 3333 : stbi_uc* line0, * line1; -; 3334 : int hs, vs; // expansion factor in each axis -; 3335 : int w_lores; // horizontal pixels pre-expansion -; 3336 : int ystep; // how far through vertical expansion we are -; 3337 : int ypos; // which pre-expansion row we're on -; 3338 : } stbi__resample; -; 3339 : -; 3340 : // fast 0..255 * 0..255 => 0..255 rounded multiplication -; 3341 : static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) -; 3342 : { -; 3343 : unsigned int t = x * y + 128; -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); -; 3345 : } -; 3346 : -; 3347 : static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp, int req_comp) -; 3348 : { -; 3349 : int n, decode_n, is_rgb; -; 3350 : z->s->img_n = 0; // make stbi__cleanup_jpeg safe -; 3351 : -; 3352 : // validate req_comp -; 3353 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 3354 : -; 3355 : // load a jpeg image from whichever source, but leave in YCbCr format -; 3356 : if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } -; 3357 : -; 3358 : // determine actual number of components to generate -; 3359 : n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; -; 3360 : -; 3361 : is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); -; 3362 : -; 3363 : if (z->s->img_n == 3 && n < 3 && !is_rgb) -; 3364 : decode_n = 1; -; 3365 : else -; 3366 : decode_n = z->s->img_n; -; 3367 : -; 3368 : // nothing to do if no components requested; check this now to avoid -; 3369 : // accessing uninitialized coutput[0] later -; 3370 : if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } -; 3371 : -; 3372 : // resample and color-convert -; 3373 : { -; 3374 : int k; -; 3375 : unsigned int i, j; -; 3376 : stbi_uc* output; -; 3377 : stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL }; -; 3378 : -; 3379 : stbi__resample res_comp[4]; -; 3380 : -; 3381 : for (k = 0; k < decode_n; ++k) { -; 3382 : stbi__resample* r = &res_comp[k]; -; 3383 : -; 3384 : // allocate line buffer big enough for upsampling off the edges -; 3385 : // with upsample factor of 4 -; 3386 : z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3); -; 3387 : if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3388 : -; 3389 : r->hs = z->img_h_max / z->img_comp[k].h; -; 3390 : r->vs = z->img_v_max / z->img_comp[k].v; -; 3391 : r->ystep = r->vs >> 1; -; 3392 : r->w_lores = (z->s->img_x + r->hs - 1) / r->hs; -; 3393 : r->ypos = 0; -; 3394 : r->line0 = r->line1 = z->img_comp[k].data; -; 3395 : -; 3396 : if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; -; 3397 : else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; -; 3398 : else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; -; 3399 : else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; -; 3400 : else r->resample = stbi__resample_row_generic; -; 3401 : } -; 3402 : -; 3403 : // can't error after this so, this is safe -; 3404 : output = (stbi_uc*)stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); -; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3406 : -; 3407 : // now go ahead and resample -; 3408 : for (j = 0; j < z->s->img_y; ++j) { -; 3409 : stbi_uc* out = output + n * z->s->img_x * j; -; 3410 : for (k = 0; k < decode_n; ++k) { -; 3411 : stbi__resample* r = &res_comp[k]; -; 3412 : int y_bot = r->ystep >= (r->vs >> 1); -; 3413 : coutput[k] = r->resample(z->img_comp[k].linebuf, -; 3414 : y_bot ? r->line1 : r->line0, -; 3415 : y_bot ? r->line0 : r->line1, -; 3416 : r->w_lores, r->hs); -; 3417 : if (++r->ystep >= r->vs) { -; 3418 : r->ystep = 0; -; 3419 : r->line0 = r->line1; -; 3420 : if (++r->ypos < z->img_comp[k].y) -; 3421 : r->line1 += z->img_comp[k].w2; -; 3422 : } -; 3423 : } -; 3424 : if (n >= 3) { -; 3425 : stbi_uc* y = coutput[0]; -; 3426 : if (z->s->img_n == 3) { -; 3427 : if (is_rgb) { -; 3428 : for (i = 0; i < z->s->img_x; ++i) { -; 3429 : out[0] = y[i]; -; 3430 : out[1] = coutput[1][i]; -; 3431 : out[2] = coutput[2][i]; -; 3432 : out[3] = 255; -; 3433 : out += n; -; 3434 : } -; 3435 : } -; 3436 : else { -; 3437 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3438 : } -; 3439 : } -; 3440 : else if (z->s->img_n == 4) { -; 3441 : if (z->app14_color_transform == 0) { // CMYK -; 3442 : for (i = 0; i < z->s->img_x; ++i) { -; 3443 : stbi_uc m = coutput[3][i]; -; 3444 : out[0] = stbi__blinn_8x8(coutput[0][i], m); -; 3445 : out[1] = stbi__blinn_8x8(coutput[1][i], m); -; 3446 : out[2] = stbi__blinn_8x8(coutput[2][i], m); -; 3447 : out[3] = 255; -; 3448 : out += n; -; 3449 : } -; 3450 : } -; 3451 : else if (z->app14_color_transform == 2) { // YCCK -; 3452 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3453 : for (i = 0; i < z->s->img_x; ++i) { -; 3454 : stbi_uc m = coutput[3][i]; -; 3455 : out[0] = stbi__blinn_8x8(255 - out[0], m); -; 3456 : out[1] = stbi__blinn_8x8(255 - out[1], m); -; 3457 : out[2] = stbi__blinn_8x8(255 - out[2], m); -; 3458 : out += n; -; 3459 : } -; 3460 : } -; 3461 : else { // YCbCr + alpha? Ignore the fourth channel for now -; 3462 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3463 : } -; 3464 : } -; 3465 : else -; 3466 : for (i = 0; i < z->s->img_x; ++i) { -; 3467 : out[0] = out[1] = out[2] = y[i]; -; 3468 : out[3] = 255; // not used if n==3 -; 3469 : out += n; -; 3470 : } -; 3471 : } -; 3472 : else { -; 3473 : if (is_rgb) { -; 3474 : if (n == 1) -; 3475 : for (i = 0; i < z->s->img_x; ++i) -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3477 : else { -; 3478 : for (i = 0; i < z->s->img_x; ++i, out += 2) { -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3480 : out[1] = 255; -; 3481 : } -; 3482 : } -; 3483 : } -; 3484 : else if (z->s->img_n == 4 && z->app14_color_transform == 0) { -; 3485 : for (i = 0; i < z->s->img_x; ++i) { -; 3486 : stbi_uc m = coutput[3][i]; -; 3487 : stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); -; 3488 : stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); -; 3489 : stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); -; 3490 : out[0] = stbi__compute_y(r, g, b); -; 3491 : out[1] = 255; -; 3492 : out += n; -; 3493 : } -; 3494 : } -; 3495 : else if (z->s->img_n == 4 && z->app14_color_transform == 2) { -; 3496 : for (i = 0; i < z->s->img_x; ++i) { -; 3497 : out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); -; 3498 : out[1] = 255; -; 3499 : out += n; -; 3500 : } -; 3501 : } -; 3502 : else { -; 3503 : stbi_uc* y = coutput[0]; -; 3504 : if (n == 1) -; 3505 : for (i = 0; i < z->s->img_x; ++i) out[i] = y[i]; -; 3506 : else -; 3507 : for (i = 0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } -; 3508 : } -; 3509 : } -; 3510 : } -; 3511 : stbi__cleanup_jpeg(z); -; 3512 : *out_x = z->s->img_x; -; 3513 : *out_y = z->s->img_y; -; 3514 : if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output -; 3515 : return output; -; 3516 : } -; 3517 : } -; 3518 : -; 3519 : static void* stbi__jpeg_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 3520 : { -; 3521 : unsigned char* result; -; 3522 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); -; 3524 : memset(j, 0, sizeof(stbi__jpeg)); -; 3525 : STBI_NOTUSED(ri); -; 3526 : j->s = s; -; 3527 : stbi__setup_jpeg(j); -; 3528 : result = load_jpeg_image(j, x, y, comp, req_comp); -; 3529 : STBI_FREE(j); -; 3530 : return result; -; 3531 : } -; 3532 : -; 3533 : static int stbi__jpeg_test(stbi__context* s) -; 3534 : { -; 3535 : int r; -; 3536 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3538 : memset(j, 0, sizeof(stbi__jpeg)); -; 3539 : j->s = s; -; 3540 : stbi__setup_jpeg(j); -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); -; 3542 : stbi__rewind(s); -; 3543 : STBI_FREE(j); -; 3544 : return r; -; 3545 : } -; 3546 : -; 3547 : static int stbi__jpeg_info_raw(stbi__jpeg* j, int* x, int* y, int* comp) -; 3548 : { -; 3549 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { -; 3550 : stbi__rewind(j->s); -; 3551 : return 0; -; 3552 : } -; 3553 : if (x) *x = j->s->img_x; -; 3554 : if (y) *y = j->s->img_y; -; 3555 : if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; -; 3556 : return 1; -; 3557 : } -; 3558 : -; 3559 : static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp) -; 3560 : { -; 3561 : int result; -; 3562 : stbi__jpeg* j = (stbi__jpeg*)(stbi__malloc(sizeof(stbi__jpeg))); -; 3563 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3564 : memset(j, 0, sizeof(stbi__jpeg)); -; 3565 : j->s = s; -; 3566 : result = stbi__jpeg_info_raw(j, x, y, comp); -; 3567 : STBI_FREE(j); -; 3568 : return result; -; 3569 : } -; 3570 : #endif -; 3571 : -; 3572 : // public domain zlib decode v0.2 Sean Barrett 2006-11-18 -; 3573 : // simple implementation -; 3574 : // - all input must be provided in an upfront buffer -; 3575 : // - all output is written to a single output buffer (can malloc/realloc) -; 3576 : // performance -; 3577 : // - fast huffman -; 3578 : -; 3579 : #ifndef STBI_NO_ZLIB -; 3580 : -; 3581 : // fast-way is faster to check than jpeg huffman, but slow way is slower -; 3582 : #define STBI__ZFAST_BITS 9 // accelerate all cases in default tables -; 3583 : #define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) -; 3584 : #define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet -; 3585 : -; 3586 : // zlib-style huffman encoding -; 3587 : // (jpegs packs from left, zlib from right, so can't share code) -; 3588 : typedef struct -; 3589 : { -; 3590 : stbi__uint16 fast[1 << STBI__ZFAST_BITS]; -; 3591 : stbi__uint16 firstcode[16]; -; 3592 : int maxcode[17]; -; 3593 : stbi__uint16 firstsymbol[16]; -; 3594 : stbi_uc size[STBI__ZNSYMS]; -; 3595 : stbi__uint16 value[STBI__ZNSYMS]; -; 3596 : } stbi__zhuffman; -; 3597 : -; 3598 : stbi_inline static int stbi__bitreverse16(int n) -; 3599 : { -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); -; 3604 : return n; -; 3605 : } -; 3606 : -; 3607 : stbi_inline static int stbi__bit_reverse(int v, int bits) -; 3608 : { -; 3609 : STBI_ASSERT(bits <= 16); -; 3610 : // to bit reverse n bits, reverse 16 and shift -; 3611 : // e.g. 11 bits, bit reverse and shift away 5 -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); -; 3613 : } -; 3614 : -; 3615 : static int stbi__zbuild_huffman(stbi__zhuffman* z, const stbi_uc* sizelist, int num) -; 3616 : { -; 3617 : int i, k = 0; -; 3618 : int code, next_code[16], sizes[17]; -; 3619 : -; 3620 : // DEFLATE spec for generating codes -; 3621 : memset(sizes, 0, sizeof(sizes)); -; 3622 : memset(z->fast, 0, sizeof(z->fast)); -; 3623 : for (i = 0; i < num; ++i) -; 3624 : ++sizes[sizelist[i]]; -; 3625 : sizes[0] = 0; -; 3626 : for (i = 1; i < 16; ++i) -; 3627 : if (sizes[i] > (1 << i)) -; 3628 : return stbi__err("bad sizes", "Corrupt PNG"); -; 3629 : code = 0; -; 3630 : for (i = 1; i < 16; ++i) { -; 3631 : next_code[i] = code; -; 3632 : z->firstcode[i] = (stbi__uint16)code; -; 3633 : z->firstsymbol[i] = (stbi__uint16)k; -; 3634 : code = (code + sizes[i]); -; 3635 : if (sizes[i]) -; 3636 : if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3637 : z->maxcode[i] = code << (16 - i); // preshift for inner loop -; 3638 : code <<= 1; -; 3639 : k += sizes[i]; -; 3640 : } -; 3641 : z->maxcode[16] = 0x10000; // sentinel -; 3642 : for (i = 0; i < num; ++i) { -; 3643 : int s = sizelist[i]; -; 3644 : if (s) { -; 3645 : int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; -; 3646 : stbi__uint16 fastv = (stbi__uint16)((s << 9) | i); -; 3647 : z->size[c] = (stbi_uc)s; -; 3648 : z->value[c] = (stbi__uint16)i; -; 3649 : if (s <= STBI__ZFAST_BITS) { -; 3650 : int j = stbi__bit_reverse(next_code[s], s); -; 3651 : while (j < (1 << STBI__ZFAST_BITS)) { -; 3652 : z->fast[j] = fastv; -; 3653 : j += (1 << s); -; 3654 : } -; 3655 : } -; 3656 : ++next_code[s]; -; 3657 : } -; 3658 : } -; 3659 : return 1; -; 3660 : } -; 3661 : -; 3662 : // zlib-from-memory implementation for PNG reading -; 3663 : // because PNG allows splitting the zlib stream arbitrarily, -; 3664 : // and it's annoying structurally to have PNG call ZLIB call PNG, -; 3665 : // we require PNG read all the IDATs and combine them into a single -; 3666 : // memory buffer -; 3667 : -; 3668 : typedef struct -; 3669 : { -; 3670 : stbi_uc* zbuffer, * zbuffer_end; -; 3671 : int num_bits; -; 3672 : stbi__uint32 code_buffer; -; 3673 : -; 3674 : char* zout; -; 3675 : char* zout_start; -; 3676 : char* zout_end; -; 3677 : int z_expandable; -; 3678 : -; 3679 : stbi__zhuffman z_length, z_distance; -; 3680 : } stbi__zbuf; -; 3681 : -; 3682 : stbi_inline static int stbi__zeof(stbi__zbuf* z) -; 3683 : { -; 3684 : return (z->zbuffer >= z->zbuffer_end); -; 3685 : } -; 3686 : -; 3687 : stbi_inline static stbi_uc stbi__zget8(stbi__zbuf* z) -; 3688 : { -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ -; 3697 : return; -; 3698 : } -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; -; 3700 : z->num_bits += 8; -; 3701 : } while (z->num_bits <= 24); -; 3702 : } -; 3703 : -; 3704 : stbi_inline static unsigned int stbi__zreceive(stbi__zbuf* z, int n) -; 3705 : { -; 3706 : unsigned int k; -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); -; 3708 : k = z->code_buffer & ((1 << n) - 1); -; 3709 : z->code_buffer >>= n; -; 3710 : z->num_bits -= n; -; 3711 : return k; -; 3712 : } -; 3713 : -; 3714 : static int stbi__zhuffman_decode_slowpath(stbi__zbuf* a, stbi__zhuffman* z) -; 3715 : { -; 3716 : int b, s, k; -; 3717 : // not resolved by fast table, so compute it the slow way -; 3718 : // use jpeg approach, which requires MSbits at top -; 3719 : k = stbi__bit_reverse(a->code_buffer, 16); -; 3720 : for (s = STBI__ZFAST_BITS + 1; ; ++s) -; 3721 : if (k < z->maxcode[s]) -; 3722 : break; -; 3723 : if (s >= 16) return -1; // invalid code! -; 3724 : // code size is s, so: -; 3725 : b = (k >> (16 - s)) - z->firstcode[s] + z->firstsymbol[s]; -; 3726 : if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! -; 3727 : if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. -; 3728 : a->code_buffer >>= s; -; 3729 : a->num_bits -= s; -; 3730 : return z->value[b]; -; 3731 : } -; 3732 : -; 3733 : stbi_inline static int stbi__zhuffman_decode(stbi__zbuf* a, stbi__zhuffman* z) -; 3734 : { -; 3735 : int b, s; -; 3736 : if (a->num_bits < 16) { -; 3737 : if (stbi__zeof(a)) { -; 3738 : return -1; /* report error for unexpected end of data. */ -; 3739 : } -; 3740 : stbi__fill_bits(a); -; 3741 : } -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; -; 3743 : if (b) { -; 3744 : s = b >> 9; -; 3745 : a->code_buffer >>= s; -; 3746 : a->num_bits -= s; -; 3747 : return b & 511; -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); -; 3750 : } -; 3751 : -; 3752 : static int stbi__zexpand(stbi__zbuf* z, char* zout, int n) // need to make room for n bytes -; 3753 : { -; 3754 : char* q; -; 3755 : unsigned int cur, limit, old_limit; -; 3756 : z->zout = zout; -; 3757 : if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG"); -; 3758 : cur = (unsigned int)(z->zout - z->zout_start); -; 3759 : limit = old_limit = (unsigned)(z->zout_end - z->zout_start); -; 3760 : if (UINT_MAX - cur < (unsigned)n) return stbi__err("outofmem", "Out of memory"); -; 3761 : while (cur + n > limit) { -; 3762 : if (limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); -; 3763 : limit *= 2; -; 3764 : } -; 3765 : q = (char*)STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); -; 3766 : STBI_NOTUSED(old_limit); -; 3767 : if (q == NULL) return stbi__err("outofmem", "Out of memory"); -; 3768 : z->zout_start = q; -; 3769 : z->zout = q + cur; -; 3770 : z->zout_end = q + limit; -; 3771 : return 1; -; 3772 : } -; 3773 : -; 3774 : static const int stbi__zlength_base[31] = { -; 3775 : 3,4,5,6,7,8,9,10,11,13, -; 3776 : 15,17,19,23,27,31,35,43,51,59, -; 3777 : 67,83,99,115,131,163,195,227,258,0,0 }; -; 3778 : -; 3779 : static const int stbi__zlength_extra[31] = -; 3780 : { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; -; 3781 : -; 3782 : static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, -; 3783 : 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0 }; -; 3784 : -; 3785 : static const int stbi__zdist_extra[32] = -; 3786 : { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 }; -; 3787 : -; 3788 : static int stbi__parse_huffman_block(stbi__zbuf* a) -; 3789 : { -; 3790 : char* zout = a->zout; -; 3791 : for (;;) { -; 3792 : int z = stbi__zhuffman_decode(a, &a->z_length); -; 3793 : if (z < 256) { -; 3794 : if (z < 0) return stbi__err("bad huffman code", "Corrupt PNG"); // error in huffman codes -; 3795 : if (zout >= a->zout_end) { -; 3796 : if (!stbi__zexpand(a, zout, 1)) return 0; -; 3797 : zout = a->zout; -; 3798 : } -; 3799 : *zout++ = (char)z; -; 3800 : } -; 3801 : else { -; 3802 : stbi_uc* p; -; 3803 : int len, dist; -; 3804 : if (z == 256) { -; 3805 : a->zout = zout; -; 3806 : return 1; -; 3807 : } -; 3808 : if (z >= 286) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data -; 3809 : z -= 257; -; 3810 : len = stbi__zlength_base[z]; -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); -; 3812 : z = stbi__zhuffman_decode(a, &a->z_distance); -; 3813 : if (z < 0 || z >= 30) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data -; 3814 : dist = stbi__zdist_base[z]; -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); -; 3816 : if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG"); -; 3817 : if (zout + len > a->zout_end) { -; 3818 : if (!stbi__zexpand(a, zout, len)) return 0; -; 3819 : zout = a->zout; -; 3820 : } -; 3821 : p = (stbi_uc*)(zout - dist); -; 3822 : if (dist == 1) { // run of one byte; common in images. -; 3823 : stbi_uc v = *p; -; 3824 : if (len) { do *zout++ = v; while (--len); } -; 3825 : } -; 3826 : else { -; 3827 : if (len) { do *zout++ = *p++; while (--len); } -; 3828 : } -; 3829 : } -; 3830 : } -; 3831 : } -; 3832 : -; 3833 : static int stbi__compute_huffman_codes(stbi__zbuf* a) -; 3834 : { -; 3835 : static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; -; 3836 : stbi__zhuffman z_codelength; -; 3837 : stbi_uc lencodes[286 + 32 + 137];//padding for maximum single op -; 3838 : stbi_uc codelength_sizes[19]; -; 3839 : int i, n; -; 3840 : -; 3841 : int hlit = stbi__zreceive(a, 5) + 257; -; 3842 : int hdist = stbi__zreceive(a, 5) + 1; -; 3843 : int hclen = stbi__zreceive(a, 4) + 4; -; 3844 : int ntot = hlit + hdist; -; 3845 : -; 3846 : memset(codelength_sizes, 0, sizeof(codelength_sizes)); -; 3847 : for (i = 0; i < hclen; ++i) { -; 3848 : int s = stbi__zreceive(a, 3); -; 3849 : codelength_sizes[length_dezigzag[i]] = (stbi_uc)s; -; 3850 : } -; 3851 : if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; -; 3852 : -; 3853 : n = 0; -; 3854 : while (n < ntot) { -; 3855 : int c = stbi__zhuffman_decode(a, &z_codelength); -; 3856 : if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3857 : if (c < 16) -; 3858 : lencodes[n++] = (stbi_uc)c; -; 3859 : else { -; 3860 : stbi_uc fill = 0; -; 3861 : if (c == 16) { -; 3862 : c = stbi__zreceive(a, 2) + 3; -; 3863 : if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3864 : fill = lencodes[n - 1]; -; 3865 : } -; 3866 : else if (c == 17) { -; 3867 : c = stbi__zreceive(a, 3) + 3; -; 3868 : } -; 3869 : else if (c == 18) { -; 3870 : c = stbi__zreceive(a, 7) + 11; -; 3871 : } -; 3872 : else { -; 3873 : return stbi__err("bad codelengths", "Corrupt PNG"); -; 3874 : } -; 3875 : if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3876 : memset(lencodes + n, fill, c); -; 3877 : n += c; -; 3878 : } -; 3879 : } -; 3880 : if (n != ntot) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3881 : if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; -; 3882 : if (!stbi__zbuild_huffman(&a->z_distance, lencodes + hlit, hdist)) return 0; -; 3883 : return 1; -; 3884 : } -; 3885 : -; 3886 : static int stbi__parse_uncompressed_block(stbi__zbuf* a) -; 3887 : { -; 3888 : stbi_uc header[4]; -; 3889 : int len, nlen, k; -; 3890 : if (a->num_bits & 7) -; 3891 : stbi__zreceive(a, a->num_bits & 7); // discard -; 3892 : // drain the bit-packed data into header -; 3893 : k = 0; -; 3894 : while (a->num_bits > 0) { -; 3895 : header[k++] = (stbi_uc)(a->code_buffer & 255); // suppress MSVC run-time check -; 3896 : a->code_buffer >>= 8; -; 3897 : a->num_bits -= 8; -; 3898 : } -; 3899 : if (a->num_bits < 0) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3900 : // now fill header the normal way -; 3901 : while (k < 4) -; 3902 : header[k++] = stbi__zget8(a); -; 3903 : len = header[1] * 256 + header[0]; -; 3904 : nlen = header[3] * 256 + header[2]; -; 3905 : if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3906 : if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG"); -; 3907 : if (a->zout + len > a->zout_end) -; 3908 : if (!stbi__zexpand(a, a->zout, len)) return 0; -; 3909 : memcpy(a->zout, a->zbuffer, len); -; 3910 : a->zbuffer += len; -; 3911 : a->zout += len; -; 3912 : return 1; -; 3913 : } -; 3914 : -; 3915 : static int stbi__parse_zlib_header(stbi__zbuf* a) -; 3916 : { -; 3917 : int cmf = stbi__zget8(a); -; 3918 : int cm = cmf & 15; -; 3919 : /* int cinfo = cmf >> 4; */ -; 3920 : int flg = stbi__zget8(a); -; 3921 : if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3922 : if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png -; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png -; 3925 : // window = 1 << (8 + cinfo)... but who cares, we fully buffer output -; 3926 : return 1; -; 3927 : } -; 3928 : -; 3929 : static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] = -; 3930 : { -; 3931 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3932 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3933 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3934 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3935 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3936 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3937 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3938 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3939 : 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 -; 3940 : }; -; 3941 : static const stbi_uc stbi__zdefault_distance[32] = -; 3942 : { -; 3943 : 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 -; 3944 : }; -; 3945 : /* -; 3946 : Init algorithm: -; 3947 : { -; 3948 : int i; // use <= to match clearly with spec -; 3949 : for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; -; 3950 : for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; -; 3951 : for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; -; 3952 : for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; -; 3953 : -; 3954 : for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; -; 3955 : } -; 3956 : */ -; 3957 : -; 3958 : static int stbi__parse_zlib(stbi__zbuf* a, int parse_header) -; 3959 : { -; 3960 : int final, type; -; 3961 : if (parse_header) -; 3962 : if (!stbi__parse_zlib_header(a)) return 0; -; 3963 : a->num_bits = 0; -; 3964 : a->code_buffer = 0; -; 3965 : do { -; 3966 : final = stbi__zreceive(a, 1); -; 3967 : type = stbi__zreceive(a, 2); -; 3968 : if (type == 0) { -; 3969 : if (!stbi__parse_uncompressed_block(a)) return 0; -; 3970 : } -; 3971 : else if (type == 3) { -; 3972 : return 0; -; 3973 : } -; 3974 : else { -; 3975 : if (type == 1) { -; 3976 : // use fixed code lengths -; 3977 : if (!stbi__zbuild_huffman(&a->z_length, stbi__zdefault_length, STBI__ZNSYMS)) return 0; -; 3978 : if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; -; 3979 : } -; 3980 : else { -; 3981 : if (!stbi__compute_huffman_codes(a)) return 0; -; 3982 : } -; 3983 : if (!stbi__parse_huffman_block(a)) return 0; -; 3984 : } -; 3985 : } while (!final); -; 3986 : return 1; -; 3987 : } -; 3988 : -; 3989 : static int stbi__do_zlib(stbi__zbuf* a, char* obuf, int olen, int exp, int parse_header) -; 3990 : { -; 3991 : a->zout_start = obuf; -; 3992 : a->zout = obuf; -; 3993 : a->zout_end = obuf + olen; -; 3994 : a->z_expandable = exp; -; 3995 : -; 3996 : return stbi__parse_zlib(a, parse_header); -; 3997 : } -; 3998 : -; 3999 : STBIDEF char* stbi_zlib_decode_malloc_guesssize(const char* buffer, int len, int initial_size, int* outlen) -; 4000 : { -; 4001 : stbi__zbuf a; -; 4002 : char* p = (char*)stbi__malloc(initial_size); -; 4003 : if (p == NULL) return NULL; -; 4004 : a.zbuffer = (stbi_uc*)buffer; -; 4005 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4006 : if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { -; 4007 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4008 : return a.zout_start; -; 4009 : } -; 4010 : else { -; 4011 : STBI_FREE(a.zout_start); -; 4012 : return NULL; -; 4013 : } -; 4014 : } -; 4015 : -; 4016 : STBIDEF char* stbi_zlib_decode_malloc(char const* buffer, int len, int* outlen) -; 4017 : { -; 4018 : return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); -; 4019 : } -; 4020 : -; 4021 : STBIDEF char* stbi_zlib_decode_malloc_guesssize_headerflag(const char* buffer, int len, int initial_size, int* outlen, int parse_header) -; 4022 : { -; 4023 : stbi__zbuf a; -; 4024 : char* p = (char*)stbi__malloc(initial_size); -; 4025 : if (p == NULL) return NULL; -; 4026 : a.zbuffer = (stbi_uc*)buffer; -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4028 : if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { -; 4029 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4030 : return a.zout_start; -; 4031 : } -; 4032 : else { -; 4033 : STBI_FREE(a.zout_start); -; 4034 : return NULL; -; 4035 : } -; 4036 : } -; 4037 : -; 4038 : STBIDEF int stbi_zlib_decode_buffer(char* obuffer, int olen, char const* ibuffer, int ilen) -; 4039 : { -; 4040 : stbi__zbuf a; -; 4041 : a.zbuffer = (stbi_uc*)ibuffer; -; 4042 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4043 : if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) -; 4044 : return (int)(a.zout - a.zout_start); -; 4045 : else -; 4046 : return -1; -; 4047 : } -; 4048 : -; 4049 : STBIDEF char* stbi_zlib_decode_noheader_malloc(char const* buffer, int len, int* outlen) -; 4050 : { -; 4051 : stbi__zbuf a; -; 4052 : char* p = (char*)stbi__malloc(16384); -; 4053 : if (p == NULL) return NULL; -; 4054 : a.zbuffer = (stbi_uc*)buffer; -; 4055 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4056 : if (stbi__do_zlib(&a, p, 16384, 1, 0)) { -; 4057 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4058 : return a.zout_start; -; 4059 : } -; 4060 : else { -; 4061 : STBI_FREE(a.zout_start); -; 4062 : return NULL; -; 4063 : } -; 4064 : } -; 4065 : -; 4066 : STBIDEF int stbi_zlib_decode_noheader_buffer(char* obuffer, int olen, const char* ibuffer, int ilen) -; 4067 : { -; 4068 : stbi__zbuf a; -; 4069 : a.zbuffer = (stbi_uc*)ibuffer; -; 4070 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4071 : if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) -; 4072 : return (int)(a.zout - a.zout_start); -; 4073 : else -; 4074 : return -1; -; 4075 : } -; 4076 : #endif -; 4077 : -; 4078 : // public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 -; 4079 : // simple implementation -; 4080 : // - only 8-bit samples -; 4081 : // - no CRC checking -; 4082 : // - allocates lots of intermediate memory -; 4083 : // - avoids problem of streaming data between subsystems -; 4084 : // - avoids explicit window management -; 4085 : // performance -; 4086 : // - uses stb_zlib, a PD zlib implementation with fast huffman decoding -; 4087 : -; 4088 : #ifndef STBI_NO_PNG -; 4089 : typedef struct -; 4090 : { -; 4091 : stbi__uint32 length; -; 4092 : stbi__uint32 type; -; 4093 : } stbi__pngchunk; -; 4094 : -; 4095 : static stbi__pngchunk stbi__get_chunk_header(stbi__context* s) -; 4096 : { -; 4097 : stbi__pngchunk c; -; 4098 : c.length = stbi__get32be(s); -; 4099 : c.type = stbi__get32be(s); -; 4100 : return c; -; 4101 : } -; 4102 : -; 4103 : static int stbi__check_png_header(stbi__context* s) -; 4104 : { -; 4105 : static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; -; 4106 : int i; -; 4107 : for (i = 0; i < 8; ++i) -; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); -; 4109 : return 1; -; 4110 : } -; 4111 : -; 4112 : typedef struct -; 4113 : { -; 4114 : stbi__context* s; -; 4115 : stbi_uc* idata, * expanded, * out; -; 4116 : int depth; -; 4117 : } stbi__png; -; 4118 : -; 4119 : enum { -; 4120 : STBI__F_none = 0, -; 4121 : STBI__F_sub = 1, -; 4122 : STBI__F_up = 2, -; 4123 : STBI__F_avg = 3, -; 4124 : STBI__F_paeth = 4, -; 4125 : // synthetic filters used for first scanline to avoid needing a dummy row of 0s -; 4126 : STBI__F_avg_first, -; 4127 : STBI__F_paeth_first -; 4128 : }; -; 4129 : -; 4130 : static stbi_uc first_row_filter[5] = -; 4131 : { -; 4132 : STBI__F_none, -; 4133 : STBI__F_sub, -; 4134 : STBI__F_none, -; 4135 : STBI__F_avg_first, -; 4136 : STBI__F_paeth_first -; 4137 : }; -; 4138 : -; 4139 : static int stbi__paeth(int a, int b, int c) -; 4140 : { -; 4141 : int p = a + b - c; -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); -; 4144 : int pc = abs(p - c); -; 4145 : if (pa <= pb && pa <= pc) return a; -; 4146 : if (pb <= pc) return b; -; 4147 : return c; -; 4148 : } -; 4149 : -; 4150 : static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; -; 4151 : -; 4152 : // create the png data from post-deflated data -; 4153 : static int stbi__create_png_image_raw(stbi__png* a, stbi_uc* raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -; 4154 : { -; 4155 : int bytes = (depth == 16 ? 2 : 1); -; 4156 : stbi__context* s = a->s; -; 4157 : stbi__uint32 i, j, stride = x * out_n * bytes; -; 4158 : stbi__uint32 img_len, img_width_bytes; -; 4159 : int k; -; 4160 : int img_n = s->img_n; // copy it into a local for later -; 4161 : -; 4162 : int output_bytes = out_n * bytes; -; 4163 : int filter_bytes = img_n * bytes; -; 4164 : int width = x; -; 4165 : -; 4166 : STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1); -; 4167 : a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into -; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); -; 4169 : -; 4170 : if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); -; 4171 : img_width_bytes = (((img_n * x * depth) + 7) >> 3); -; 4172 : img_len = (img_width_bytes + 1) * y; -; 4173 : -; 4174 : // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, -; 4175 : // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), -; 4176 : // so just check for raw_len < img_len always. -; 4177 : if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG"); -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { -; 4180 : stbi_uc* cur = a->out + stride * j; -; 4181 : stbi_uc* prior; -; 4182 : int filter = *raw++; -; 4183 : -; 4184 : if (filter > 4) -; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); -; 4186 : -; 4187 : if (depth < 8) { -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); -; 4189 : cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place -; 4190 : filter_bytes = 1; -; 4191 : width = img_width_bytes; -; 4192 : } -; 4193 : prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above -; 4194 : -; 4195 : // if first row, use special filter that doesn't sample previous row -; 4196 : if (j == 0) filter = first_row_filter[filter]; -; 4197 : -; 4198 : // handle first byte explicitly -; 4199 : for (k = 0; k < filter_bytes; ++k) { -; 4200 : switch (filter) { -; 4201 : case STBI__F_none: cur[k] = raw[k]; break; -; 4202 : case STBI__F_sub: cur[k] = raw[k]; break; -; 4203 : case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; -; 4204 : case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break; -; 4205 : case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break; -; 4206 : case STBI__F_avg_first: cur[k] = raw[k]; break; -; 4207 : case STBI__F_paeth_first: cur[k] = raw[k]; break; -; 4208 : } -; 4209 : } -; 4210 : -; 4211 : if (depth == 8) { -; 4212 : if (img_n != out_n) -; 4213 : cur[img_n] = 255; // first pixel -; 4214 : raw += img_n; -; 4215 : cur += out_n; -; 4216 : prior += out_n; -; 4217 : } -; 4218 : else if (depth == 16) { -; 4219 : if (img_n != out_n) { -; 4220 : cur[filter_bytes] = 255; // first pixel top byte -; 4221 : cur[filter_bytes + 1] = 255; // first pixel bottom byte -; 4222 : } -; 4223 : raw += filter_bytes; -; 4224 : cur += output_bytes; -; 4225 : prior += output_bytes; -; 4226 : } -; 4227 : else { -; 4228 : raw += 1; -; 4229 : cur += 1; -; 4230 : prior += 1; -; 4231 : } -; 4232 : -; 4233 : // this is a little gross, so that we don't switch per-pixel or per-component -; 4234 : if (depth < 8 || img_n == out_n) { -; 4235 : int nk = (width - 1) * filter_bytes; -; 4236 : #define STBI__CASE(f) \ -; 4237 : case f: \ -; 4238 : for (k=0; k < nk; ++k) -; 4239 : switch (filter) { -; 4240 : // "none" filter turns into a memcpy here; make that explicit. -; 4241 : case STBI__F_none: memcpy(cur, raw, nk); break; -; 4242 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break; -; 4243 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4244 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break; -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; -; 4246 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break; -; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; -; 4248 : } -; 4249 : #undef STBI__CASE -; 4250 : raw += nk; -; 4251 : } -; 4252 : else { -; 4253 : STBI_ASSERT(img_n + 1 == out_n); -; 4254 : #define STBI__CASE(f) \ -; 4255 : case f: \ -; 4256 : for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ -; 4257 : for (k=0; k < filter_bytes; ++k) -; 4258 : switch (filter) { -; 4259 : STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; -; 4260 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break; -; 4261 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4262 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break; -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; -; 4264 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break; -; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; -; 4266 : } -; 4267 : #undef STBI__CASE -; 4268 : -; 4269 : // the loop above sets the high byte of the pixels' alpha, but for -; 4270 : // 16 bit png files we also need the low byte set. we'll do that here. -; 4271 : if (depth == 16) { -; 4272 : cur = a->out + stride * j; // start at the beginning of the row again -; 4273 : for (i = 0; i < x; ++i, cur += output_bytes) { -; 4274 : cur[filter_bytes + 1] = 255; -; 4275 : } -; 4276 : } -; 4277 : } -; 4278 : } -; 4279 : -; 4280 : // we make a separate pass to expand bits to pixels; for performance, -; 4281 : // this could run two scanlines behind the above code, so it won't -; 4282 : // intefere with filtering but will still be in the cache. -; 4283 : if (depth < 8) { -; 4284 : for (j = 0; j < y; ++j) { -; 4285 : stbi_uc* cur = a->out + stride * j; -; 4286 : stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes; -; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit -; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop -; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range -; 4290 : -; 4291 : // note that the final byte might overshoot and write more data than desired. -; 4292 : // we can allocate enough data that this never writes out of memory, but it -; 4293 : // could also overwrite the next scanline. can it overwrite non-empty data -; 4294 : // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. -; 4295 : // so we need to explicitly clamp the final ones -; 4296 : -; 4297 : if (depth == 4) { -; 4298 : for (k = x * img_n; k >= 2; k -= 2, ++in) { -; 4299 : *cur++ = scale * ((*in >> 4)); -; 4300 : *cur++ = scale * ((*in) & 0x0f); -; 4301 : } -; 4302 : if (k > 0) *cur++ = scale * ((*in >> 4)); -; 4303 : } -; 4304 : else if (depth == 2) { -; 4305 : for (k = x * img_n; k >= 4; k -= 4, ++in) { -; 4306 : *cur++ = scale * ((*in >> 6)); -; 4307 : *cur++ = scale * ((*in >> 4) & 0x03); -; 4308 : *cur++ = scale * ((*in >> 2) & 0x03); -; 4309 : *cur++ = scale * ((*in) & 0x03); -; 4310 : } -; 4311 : if (k > 0) *cur++ = scale * ((*in >> 6)); -; 4312 : if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); -; 4313 : if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); -; 4314 : } -; 4315 : else if (depth == 1) { -; 4316 : for (k = x * img_n; k >= 8; k -= 8, ++in) { -; 4317 : *cur++ = scale * ((*in >> 7)); -; 4318 : *cur++ = scale * ((*in >> 6) & 0x01); -; 4319 : *cur++ = scale * ((*in >> 5) & 0x01); -; 4320 : *cur++ = scale * ((*in >> 4) & 0x01); -; 4321 : *cur++ = scale * ((*in >> 3) & 0x01); -; 4322 : *cur++ = scale * ((*in >> 2) & 0x01); -; 4323 : *cur++ = scale * ((*in >> 1) & 0x01); -; 4324 : *cur++ = scale * ((*in) & 0x01); -; 4325 : } -; 4326 : if (k > 0) *cur++ = scale * ((*in >> 7)); -; 4327 : if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); -; 4328 : if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); -; 4329 : if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); -; 4330 : if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); -; 4331 : if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); -; 4332 : if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); -; 4333 : } -; 4334 : if (img_n != out_n) { -; 4335 : int q; -; 4336 : // insert alpha = 255 -; 4337 : cur = a->out + stride * j; -; 4338 : if (img_n == 1) { -; 4339 : for (q = x - 1; q >= 0; --q) { -; 4340 : cur[q * 2 + 1] = 255; -; 4341 : cur[q * 2 + 0] = cur[q]; -; 4342 : } -; 4343 : } -; 4344 : else { -; 4345 : STBI_ASSERT(img_n == 3); -; 4346 : for (q = x - 1; q >= 0; --q) { -; 4347 : cur[q * 4 + 3] = 255; -; 4348 : cur[q * 4 + 2] = cur[q * 3 + 2]; -; 4349 : cur[q * 4 + 1] = cur[q * 3 + 1]; -; 4350 : cur[q * 4 + 0] = cur[q * 3 + 0]; -; 4351 : } -; 4352 : } -; 4353 : } -; 4354 : } -; 4355 : } -; 4356 : else if (depth == 16) { -; 4357 : // force the image data from big-endian to platform-native. -; 4358 : // this is done in a separate pass due to the decoding relying -; 4359 : // on the data being untouched, but could probably be done -; 4360 : // per-line during decode if care is taken. -; 4361 : stbi_uc* cur = a->out; -; 4362 : stbi__uint16* cur16 = (stbi__uint16*)cur; -; 4363 : -; 4364 : for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) { -; 4365 : *cur16 = (cur[0] << 8) | cur[1]; -; 4366 : } -; 4367 : } -; 4368 : -; 4369 : return 1; -; 4370 : } -; 4371 : -; 4372 : static int stbi__create_png_image(stbi__png* a, stbi_uc* image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -; 4373 : { -; 4374 : int bytes = (depth == 16 ? 2 : 1); -; 4375 : int out_bytes = out_n * bytes; -; 4376 : stbi_uc* final; -; 4377 : int p; -; 4378 : if (!interlaced) -; 4379 : return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); -; 4380 : -; 4381 : // de-interlacing -; 4382 : final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); -; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); -; 4384 : for (p = 0; p < 7; ++p) { -; 4385 : int xorig[] = { 0,4,0,2,0,1,0 }; -; 4386 : int yorig[] = { 0,0,4,0,2,0,1 }; -; 4387 : int xspc[] = { 8,8,4,4,2,2,1 }; -; 4388 : int yspc[] = { 8,8,8,4,4,2,2 }; -; 4389 : int i, j, x, y; -; 4390 : // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 -; 4391 : x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p]; -; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; -; 4393 : if (x && y) { -; 4394 : stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; -; 4395 : if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { -; 4396 : STBI_FREE(final); -; 4397 : return 0; -; 4398 : } -; 4399 : for (j = 0; j < y; ++j) { -; 4400 : for (i = 0; i < x; ++i) { -; 4401 : int out_y = j * yspc[p] + yorig[p]; -; 4402 : int out_x = i * xspc[p] + xorig[p]; -; 4403 : memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, -; 4404 : a->out + (j * x + i) * out_bytes, out_bytes); -; 4405 : } -; 4406 : } -; 4407 : STBI_FREE(a->out); -; 4408 : image_data += img_len; -; 4409 : image_data_len -= img_len; -; 4410 : } -; 4411 : } -; 4412 : a->out = final; -; 4413 : -; 4414 : return 1; -; 4415 : } -; 4416 : -; 4417 : static int stbi__compute_transparency(stbi__png* z, stbi_uc tc[3], int out_n) -; 4418 : { -; 4419 : stbi__context* s = z->s; -; 4420 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4421 : stbi_uc* p = z->out; -; 4422 : -; 4423 : // compute color-based transparency, assuming we've -; 4424 : // already got 255 as the alpha value in the output -; 4425 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4426 : -; 4427 : if (out_n == 2) { -; 4428 : for (i = 0; i < pixel_count; ++i) { -; 4429 : p[1] = (p[0] == tc[0] ? 0 : 255); -; 4430 : p += 2; -; 4431 : } -; 4432 : } -; 4433 : else { -; 4434 : for (i = 0; i < pixel_count; ++i) { -; 4435 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4436 : p[3] = 0; -; 4437 : p += 4; -; 4438 : } -; 4439 : } -; 4440 : return 1; -; 4441 : } -; 4442 : -; 4443 : static int stbi__compute_transparency16(stbi__png* z, stbi__uint16 tc[3], int out_n) -; 4444 : { -; 4445 : stbi__context* s = z->s; -; 4446 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4447 : stbi__uint16* p = (stbi__uint16*)z->out; -; 4448 : -; 4449 : // compute color-based transparency, assuming we've -; 4450 : // already got 65535 as the alpha value in the output -; 4451 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4452 : -; 4453 : if (out_n == 2) { -; 4454 : for (i = 0; i < pixel_count; ++i) { -; 4455 : p[1] = (p[0] == tc[0] ? 0 : 65535); -; 4456 : p += 2; -; 4457 : } -; 4458 : } -; 4459 : else { -; 4460 : for (i = 0; i < pixel_count; ++i) { -; 4461 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4462 : p[3] = 0; -; 4463 : p += 4; -; 4464 : } -; 4465 : } -; 4466 : return 1; -; 4467 : } -; 4468 : -; 4469 : static int stbi__expand_png_palette(stbi__png* a, stbi_uc* palette, int len, int pal_img_n) -; 4470 : { -; 4471 : stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; -; 4472 : stbi_uc* p, * temp_out, * orig = a->out; -; 4473 : -; 4474 : p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0); -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4476 : -; 4477 : // between here and free(out) below, exitting would leak -; 4478 : temp_out = p; -; 4479 : -; 4480 : if (pal_img_n == 3) { -; 4481 : for (i = 0; i < pixel_count; ++i) { -; 4482 : int n = orig[i] * 4; -; 4483 : p[0] = palette[n]; -; 4484 : p[1] = palette[n + 1]; -; 4485 : p[2] = palette[n + 2]; -; 4486 : p += 3; -; 4487 : } -; 4488 : } -; 4489 : else { -; 4490 : for (i = 0; i < pixel_count; ++i) { -; 4491 : int n = orig[i] * 4; -; 4492 : p[0] = palette[n]; -; 4493 : p[1] = palette[n + 1]; -; 4494 : p[2] = palette[n + 2]; -; 4495 : p[3] = palette[n + 3]; -; 4496 : p += 4; -; 4497 : } -; 4498 : } -; 4499 : STBI_FREE(a->out); -; 4500 : a->out = temp_out; -; 4501 : -; 4502 : STBI_NOTUSED(len); -; 4503 : -; 4504 : return 1; -; 4505 : } -; 4506 : -; 4507 : static int stbi__unpremultiply_on_load_global = 0; -; 4508 : static int stbi__de_iphone_flag_global = 0; -; 4509 : -; 4510 : STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) -; 4511 : { -; 4512 : stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; -; 4513 : } -; 4514 : -; 4515 : STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) -; 4516 : { -; 4517 : stbi__de_iphone_flag_global = flag_true_if_should_convert; -; 4518 : } -; 4519 : -; 4520 : #ifndef STBI_THREAD_LOCAL -; 4521 : #define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global -; 4522 : #define stbi__de_iphone_flag stbi__de_iphone_flag_global -; 4523 : #else -; 4524 : static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; -; 4525 : static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; -; 4526 : -; 4527 : STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) -; 4528 : { -; 4529 : stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; -; 4530 : stbi__unpremultiply_on_load_set = 1; -; 4531 : } -; 4532 : -; 4533 : STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert) -; 4534 : { -; 4535 : stbi__de_iphone_flag_local = flag_true_if_should_convert; -; 4536 : stbi__de_iphone_flag_set = 1; -; 4537 : } -; 4538 : -; 4539 : #define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \ -; 4540 : ? stbi__unpremultiply_on_load_local \ -; 4541 : : stbi__unpremultiply_on_load_global) -; 4542 : #define stbi__de_iphone_flag (stbi__de_iphone_flag_set \ -; 4543 : ? stbi__de_iphone_flag_local \ -; 4544 : : stbi__de_iphone_flag_global) -; 4545 : #endif // STBI_THREAD_LOCAL -; 4546 : -; 4547 : static void stbi__de_iphone(stbi__png* z) -; 4548 : { -; 4549 : stbi__context* s = z->s; -; 4550 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4551 : stbi_uc* p = z->out; -; 4552 : -; 4553 : if (s->img_out_n == 3) { // convert bgr to rgb -; 4554 : for (i = 0; i < pixel_count; ++i) { -; 4555 : stbi_uc t = p[0]; -; 4556 : p[0] = p[2]; -; 4557 : p[2] = t; -; 4558 : p += 3; -; 4559 : } -; 4560 : } -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { -; 4566 : stbi_uc a = p[3]; -; 4567 : stbi_uc t = p[0]; -; 4568 : if (a) { -; 4569 : stbi_uc half = a / 2; -; 4570 : p[0] = (p[2] * 255 + half) / a; -; 4571 : p[1] = (p[1] * 255 + half) / a; -; 4572 : p[2] = (t * 255 + half) / a; -; 4573 : } -; 4574 : else { -; 4575 : p[0] = p[2]; -; 4576 : p[2] = t; -; 4577 : } -; 4578 : p += 4; -; 4579 : } -; 4580 : } -; 4581 : else { -; 4582 : // convert bgr to rgb -; 4583 : for (i = 0; i < pixel_count; ++i) { -; 4584 : stbi_uc t = p[0]; -; 4585 : p[0] = p[2]; -; 4586 : p[2] = t; -; 4587 : p += 4; -; 4588 : } -; 4589 : } -; 4590 : } -; 4591 : } -; 4592 : -; 4593 : #define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) -; 4594 : -; 4595 : static int stbi__parse_png_file(stbi__png* z, int scan, int req_comp) -; 4596 : { -; 4597 : stbi_uc palette[1024], pal_img_n = 0; -; 4598 : stbi_uc has_trans = 0, tc[3] = { 0 }; -; 4599 : stbi__uint16 tc16[3]; -; 4600 : stbi__uint32 ioff = 0, idata_limit = 0, i, pal_len = 0; -; 4601 : int first = 1, k, interlace = 0, color = 0, is_iphone = 0; -; 4602 : stbi__context* s = z->s; -; 4603 : -; 4604 : z->expanded = NULL; -; 4605 : z->idata = NULL; -; 4606 : z->out = NULL; -; 4607 : -; 4608 : if (!stbi__check_png_header(s)) return 0; -; 4609 : -; 4610 : if (scan == STBI__SCAN_type) return 1; -; 4611 : -; 4612 : for (;;) { -; 4613 : stbi__pngchunk c = stbi__get_chunk_header(s); -; 4614 : switch (c.type) { -; 4615 : case STBI__PNG_TYPE('C', 'g', 'B', 'I'): -; 4616 : is_iphone = 1; -; 4617 : stbi__skip(s, c.length); -; 4618 : break; -; 4619 : case STBI__PNG_TYPE('I', 'H', 'D', 'R'): { -; 4620 : int comp, filter; -; 4621 : if (!first) return stbi__err("multiple IHDR", "Corrupt PNG"); -; 4622 : first = 0; -; 4623 : if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG"); -; 4624 : s->img_x = stbi__get32be(s); -; 4625 : s->img_y = stbi__get32be(s); -; 4626 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4627 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4628 : z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only"); -; 4629 : color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype", "Corrupt PNG"); -; 4630 : if (color == 3 && z->depth == 16) return stbi__err("bad ctype", "Corrupt PNG"); -; 4631 : if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype", "Corrupt PNG"); -; 4632 : comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG"); -; 4633 : filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG"); -; 4634 : interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG"); -; 4635 : if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG"); -; 4636 : if (!pal_img_n) { -; 4637 : s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); -; 4638 : if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); -; 4639 : } -; 4640 : else { -; 4641 : // if paletted, then pal_n is our final components, and -; 4642 : // img_n is # components to decompress/filter. -; 4643 : s->img_n = 1; -; 4644 : if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large", "Corrupt PNG"); -; 4645 : } -; 4646 : // even with SCAN_header, have to scan to see if we have a tRNS -; 4647 : break; -; 4648 : } -; 4649 : -; 4650 : case STBI__PNG_TYPE('P', 'L', 'T', 'E'): { -; 4651 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4652 : if (c.length > 256 * 3) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4653 : pal_len = c.length / 3; -; 4654 : if (pal_len * 3 != c.length) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4655 : for (i = 0; i < pal_len; ++i) { -; 4656 : palette[i * 4 + 0] = stbi__get8(s); -; 4657 : palette[i * 4 + 1] = stbi__get8(s); -; 4658 : palette[i * 4 + 2] = stbi__get8(s); -; 4659 : palette[i * 4 + 3] = 255; -; 4660 : } -; 4661 : break; -; 4662 : } -; 4663 : -; 4664 : case STBI__PNG_TYPE('t', 'R', 'N', 'S'): { -; 4665 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4666 : if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG"); -; 4667 : if (pal_img_n) { -; 4668 : if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } -; 4669 : if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG"); -; 4670 : if (c.length > pal_len) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4671 : pal_img_n = 4; -; 4672 : for (i = 0; i < c.length; ++i) -; 4673 : palette[i * 4 + 3] = stbi__get8(s); -; 4674 : } -; 4675 : else { -; 4676 : if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG"); -; 4677 : if (c.length != (stbi__uint32)s->img_n * 2) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4678 : has_trans = 1; -; 4679 : // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. -; 4680 : if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } -; 4681 : if (z->depth == 16) { -; 4682 : for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is -; 4683 : } -; 4684 : else { -; 4685 : for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger -; 4686 : } -; 4687 : } -; 4688 : break; -; 4689 : } -; 4690 : -; 4691 : case STBI__PNG_TYPE('I', 'D', 'A', 'T'): { -; 4692 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4693 : if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG"); -; 4694 : if (scan == STBI__SCAN_header) { -; 4695 : // header scan definitely stops at first IDAT -; 4696 : if (pal_img_n) -; 4697 : s->img_n = pal_img_n; -; 4698 : return 1; -; 4699 : } -; 4700 : if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); -; 4701 : if ((int)(ioff + c.length) < (int)ioff) return 0; -; 4702 : if (ioff + c.length > idata_limit) { -; 4703 : stbi__uint32 idata_limit_old = idata_limit; -; 4704 : stbi_uc* p; -; 4705 : if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; -; 4706 : while (ioff + c.length > idata_limit) -; 4707 : idata_limit *= 2; -; 4708 : STBI_NOTUSED(idata_limit_old); -; 4709 : p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4710 : z->idata = p; -; 4711 : } -; 4712 : if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG"); -; 4713 : ioff += c.length; -; 4714 : break; -; 4715 : } -; 4716 : -; 4717 : case STBI__PNG_TYPE('I', 'E', 'N', 'D'): { -; 4718 : stbi__uint32 raw_len, bpl; -; 4719 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4720 : if (scan != STBI__SCAN_load) return 1; -; 4721 : if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG"); -; 4722 : // initial guess for decoded data size to avoid unnecessary reallocs -; 4723 : bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component -; 4724 : raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); -; 4726 : if (z->expanded == NULL) return 0; // zlib should set error -; 4727 : STBI_FREE(z->idata); z->idata = NULL; -; 4728 : if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans) -; 4729 : s->img_out_n = s->img_n + 1; -; 4730 : else -; 4731 : s->img_out_n = s->img_n; -; 4732 : if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; -; 4733 : if (has_trans) { -; 4734 : if (z->depth == 16) { -; 4735 : if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; -; 4736 : } -; 4737 : else { -; 4738 : if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; -; 4739 : } -; 4740 : } -; 4741 : if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) -; 4742 : stbi__de_iphone(z); -; 4743 : if (pal_img_n) { -; 4744 : // pal_img_n == 3 or 4 -; 4745 : s->img_n = pal_img_n; // record the actual colors we had -; 4746 : s->img_out_n = pal_img_n; -; 4747 : if (req_comp >= 3) s->img_out_n = req_comp; -; 4748 : if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) -; 4749 : return 0; -; 4750 : } -; 4751 : else if (has_trans) { -; 4752 : // non-paletted image with tRNS -> source image has (constant) alpha -; 4753 : ++s->img_n; -; 4754 : } -; 4755 : STBI_FREE(z->expanded); z->expanded = NULL; -; 4756 : // end of PNG chunk, read and skip CRC -; 4757 : stbi__get32be(s); -; 4758 : return 1; -; 4759 : } -; 4760 : -; 4761 : default: -; 4762 : // if critical, fail -; 4763 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4764 : if ((c.type & (1 << 29)) == 0) { -; 4765 : #ifndef STBI_NO_FAILURE_STRINGS -; 4766 : // not threadsafe -; 4767 : static char invalid_chunk[] = "XXXX PNG chunk not known"; -; 4768 : invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); -; 4769 : invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); -; 4770 : invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); -; 4771 : invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); -; 4772 : #endif -; 4773 : return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); -; 4774 : } -; 4775 : stbi__skip(s, c.length); -; 4776 : break; -; 4777 : } -; 4778 : // end of PNG chunk, read and skip CRC -; 4779 : stbi__get32be(s); -; 4780 : } -; 4781 : } -; 4782 : -; 4783 : static void* stbi__do_png(stbi__png* p, int* x, int* y, int* n, int req_comp, stbi__result_info* ri) -; 4784 : { -; 4785 : void* result = NULL; -; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { -; 4788 : if (p->depth <= 8) -; 4789 : ri->bits_per_channel = 8; -; 4790 : else if (p->depth == 16) -; 4791 : ri->bits_per_channel = 16; -; 4792 : else -; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); -; 4794 : result = p->out; -; 4795 : p->out = NULL; -; 4796 : if (req_comp && req_comp != p->s->img_out_n) { -; 4797 : if (ri->bits_per_channel == 8) -; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4799 : else -; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4801 : p->s->img_out_n = req_comp; -; 4802 : if (result == NULL) return result; -; 4803 : } -; 4804 : *x = p->s->img_x; -; 4805 : *y = p->s->img_y; -; 4806 : if (n) *n = p->s->img_n; -; 4807 : } -; 4808 : STBI_FREE(p->out); p->out = NULL; -; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; -; 4810 : STBI_FREE(p->idata); p->idata = NULL; -; 4811 : -; 4812 : return result; -; 4813 : } -; 4814 : -; 4815 : static void* stbi__png_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 4816 : { -; 4817 : stbi__png p; -; 4818 : p.s = s; -; 4819 : return stbi__do_png(&p, x, y, comp, req_comp, ri); -; 4820 : } -; 4821 : -; 4822 : static int stbi__png_test(stbi__context* s) -; 4823 : { -; 4824 : int r; -; 4825 : r = stbi__check_png_header(s); -; 4826 : stbi__rewind(s); -; 4827 : return r; -; 4828 : } -; 4829 : -; 4830 : static int stbi__png_info_raw(stbi__png* p, int* x, int* y, int* comp) -; 4831 : { -; 4832 : if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { -; 4833 : stbi__rewind(p->s); -; 4834 : return 0; -; 4835 : } -; 4836 : if (x) *x = p->s->img_x; -; 4837 : if (y) *y = p->s->img_y; -; 4838 : if (comp) *comp = p->s->img_n; -; 4839 : return 1; -; 4840 : } -; 4841 : -; 4842 : static int stbi__png_info(stbi__context* s, int* x, int* y, int* comp) -; 4843 : { -; 4844 : stbi__png p; -; 4845 : p.s = s; -; 4846 : return stbi__png_info_raw(&p, x, y, comp); -; 4847 : } -; 4848 : -; 4849 : static int stbi__png_is16(stbi__context* s) -; 4850 : { -; 4851 : stbi__png p; -; 4852 : p.s = s; -; 4853 : if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) -; 4854 : return 0; -; 4855 : if (p.depth != 16) { -; 4856 : stbi__rewind(p.s); -; 4857 : return 0; -; 4858 : } -; 4859 : return 1; -; 4860 : } -; 4861 : #endif -; 4862 : -; 4863 : // Microsoft/Windows BMP image -; 4864 : -; 4865 : #ifndef STBI_NO_BMP -; 4866 : static int stbi__bmp_test_raw(stbi__context* s) -; 4867 : { -; 4868 : int r; -; 4869 : int sz; -; 4870 : if (stbi__get8(s) != 'B') return 0; -; 4871 : if (stbi__get8(s) != 'M') return 0; -; 4872 : stbi__get32le(s); // discard filesize -; 4873 : stbi__get16le(s); // discard reserved -; 4874 : stbi__get16le(s); // discard reserved -; 4875 : stbi__get32le(s); // discard data offset -; 4876 : sz = stbi__get32le(s); -; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); -; 4878 : return r; -; 4879 : } -; 4880 : -; 4881 : static int stbi__bmp_test(stbi__context* s) -; 4882 : { -; 4883 : int r = stbi__bmp_test_raw(s); -; 4884 : stbi__rewind(s); -; 4885 : return r; -; 4886 : } -; 4887 : -; 4888 : // returns 0..31 for the highest set bit -; 4889 : static int stbi__high_bit(unsigned int z) -; 4890 : { -; 4891 : int n = 0; -; 4892 : if (z == 0) return -1; -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } -; 4898 : return n; -; 4899 : } -; 4900 : -; 4901 : static int stbi__bitcount(unsigned int a) -; 4902 : { -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits -; 4908 : return a & 0xff; -; 4909 : } -; 4910 : -; 4911 : // extract an arbitrarily-aligned N-bit value (N=bits) -; 4912 : // from v, and then make it 8-bits long and fractionally -; 4913 : // extend it to full full range. -; 4914 : static int stbi__shiftsigned(unsigned int v, int shift, int bits) -; 4915 : { -; 4916 : static unsigned int mul_table[9] = { -; 4917 : 0, -; 4918 : 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, -; 4919 : 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, -; 4920 : }; -; 4921 : static unsigned int shift_table[9] = { -; 4922 : 0, 0,0,1,0,2,4,6,0, -; 4923 : }; -; 4924 : if (shift < 0) -; 4925 : v <<= -shift; -; 4926 : else -; 4927 : v >>= shift; -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; -; 4932 : } -; 4933 : -; 4934 : typedef struct -; 4935 : { -; 4936 : int bpp, offset, hsz; -; 4937 : unsigned int mr, mg, mb, ma, all_a; -; 4938 : int extra_read; -; 4939 : } stbi__bmp_data; -; 4940 : -; 4941 : static int stbi__bmp_set_mask_defaults(stbi__bmp_data* info, int compress) -; 4942 : { -; 4943 : // BI_BITFIELDS specifies masks explicitly, don't override -; 4944 : if (compress == 3) -; 4945 : return 1; -; 4946 : -; 4947 : if (compress == 0) { -; 4948 : if (info->bpp == 16) { -; 4949 : info->mr = 31u << 10; -; 4950 : info->mg = 31u << 5; -; 4951 : info->mb = 31u << 0; -; 4952 : } -; 4953 : else if (info->bpp == 32) { -; 4954 : info->mr = 0xffu << 16; -; 4955 : info->mg = 0xffu << 8; -; 4956 : info->mb = 0xffu << 0; -; 4957 : info->ma = 0xffu << 24; -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 -; 4959 : } -; 4960 : else { -; 4961 : // otherwise, use defaults, which is all-0 -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; -; 4963 : } -; 4964 : return 1; -; 4965 : } -; 4966 : return 0; // error -; 4967 : } -; 4968 : -; 4969 : static void* stbi__bmp_parse_header(stbi__context* s, stbi__bmp_data* info) -; 4970 : { -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); -; 4973 : stbi__get32le(s); // discard filesize -; 4974 : stbi__get16le(s); // discard reserved -; 4975 : stbi__get16le(s); // discard reserved -; 4976 : info->offset = stbi__get32le(s); -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; -; 4979 : info->extra_read = 14; -; 4980 : -; 4981 : if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); -; 4982 : -; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); -; 4984 : if (hsz == 12) { -; 4985 : s->img_x = stbi__get16le(s); -; 4986 : s->img_y = stbi__get16le(s); -; 4987 : } -; 4988 : else { -; 4989 : s->img_x = stbi__get32le(s); -; 4990 : s->img_y = stbi__get32le(s); -; 4991 : } -; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); -; 4993 : info->bpp = stbi__get16le(s); -; 4994 : if (hsz != 12) { -; 4995 : int compress = stbi__get32le(s); -; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); -; 4997 : if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes -; 4998 : if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel -; 4999 : stbi__get32le(s); // discard sizeof -; 5000 : stbi__get32le(s); // discard hres -; 5001 : stbi__get32le(s); // discard vres -; 5002 : stbi__get32le(s); // discard colorsused -; 5003 : stbi__get32le(s); // discard max important -; 5004 : if (hsz == 40 || hsz == 56) { -; 5005 : if (hsz == 56) { -; 5006 : stbi__get32le(s); -; 5007 : stbi__get32le(s); -; 5008 : stbi__get32le(s); -; 5009 : stbi__get32le(s); -; 5010 : } -; 5011 : if (info->bpp == 16 || info->bpp == 32) { -; 5012 : if (compress == 0) { -; 5013 : stbi__bmp_set_mask_defaults(info, compress); -; 5014 : } -; 5015 : else if (compress == 3) { -; 5016 : info->mr = stbi__get32le(s); -; 5017 : info->mg = stbi__get32le(s); -; 5018 : info->mb = stbi__get32le(s); -; 5019 : info->extra_read += 12; -; 5020 : // not documented, but generated by photoshop and handled by mspaint -; 5021 : if (info->mr == info->mg && info->mg == info->mb) { -; 5022 : // ?!?!? -; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5024 : } -; 5025 : } -; 5026 : else -; 5027 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5028 : } -; 5029 : } -; 5030 : else { -; 5031 : // V4/V5 header -; 5032 : int i; -; 5033 : if (hsz != 108 && hsz != 124) -; 5034 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5035 : info->mr = stbi__get32le(s); -; 5036 : info->mg = stbi__get32le(s); -; 5037 : info->mb = stbi__get32le(s); -; 5038 : info->ma = stbi__get32le(s); -; 5039 : if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs -; 5040 : stbi__bmp_set_mask_defaults(info, compress); -; 5041 : stbi__get32le(s); // discard color space -; 5042 : for (i = 0; i < 12; ++i) -; 5043 : stbi__get32le(s); // discard color space parameters -; 5044 : if (hsz == 124) { -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; -; 5053 : } -; 5054 : -; 5055 : static void* stbi__bmp_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5056 : { -; 5057 : stbi_uc* out; -; 5058 : unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a; -; 5059 : stbi_uc pal[256][4]; -; 5060 : int psize = 0, i, j, width; -; 5061 : int flip_vertically, pad, target; -; 5062 : stbi__bmp_data info; -; 5063 : STBI_NOTUSED(ri); -; 5064 : -; 5065 : info.all_a = 255; -; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) -; 5067 : return NULL; // error code already set -; 5068 : -; 5069 : flip_vertically = ((int)s->img_y) > 0; -; 5070 : s->img_y = abs((int)s->img_y); -; 5071 : -; 5072 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5073 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5074 : -; 5075 : mr = info.mr; -; 5076 : mg = info.mg; -; 5077 : mb = info.mb; -; 5078 : ma = info.ma; -; 5079 : all_a = info.all_a; -; 5080 : -; 5081 : if (info.hsz == 12) { -; 5082 : if (info.bpp < 24) -; 5083 : psize = (info.offset - info.extra_read - 24) / 3; -; 5084 : } -; 5085 : else { -; 5086 : if (info.bpp < 16) -; 5087 : psize = (info.offset - info.extra_read - info.hsz) >> 2; -; 5088 : } -; 5089 : if (psize == 0) { -; 5090 : // accept some number of extra bytes after the header, but if the offset points either to before -; 5091 : // the header ends or implies a large amount of extra data, reject the file as malformed -; 5092 : int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); -; 5093 : int header_limit = 1024; // max we actually read is below 256 bytes currently. -; 5094 : int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. -; 5095 : if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { -; 5096 : return stbi__errpuc("bad header", "Corrupt BMP"); -; 5097 : } -; 5098 : // we established that bytes_read_so_far is positive and sensible. -; 5099 : // the first half of this test rejects offsets that are either too small positives, or -; 5100 : // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn -; 5101 : // ensures the number computed in the second half of the test can't overflow. -; 5102 : if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { -; 5103 : return stbi__errpuc("bad offset", "Corrupt BMP"); -; 5104 : } -; 5105 : else { -; 5106 : stbi__skip(s, info.offset - bytes_read_so_far); -; 5107 : } -; 5108 : } -; 5109 : -; 5110 : if (info.bpp == 24 && ma == 0xff000000) -; 5111 : s->img_n = 3; -; 5112 : else -; 5113 : s->img_n = ma ? 4 : 3; -; 5114 : if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 -; 5115 : target = req_comp; -; 5116 : else -; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert -; 5118 : -; 5119 : // sanity-check size -; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) -; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); -; 5122 : -; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); -; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5125 : if (info.bpp < 16) { -; 5126 : int z = 0; -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } -; 5128 : for (i = 0; i < psize; ++i) { -; 5129 : pal[i][2] = stbi__get8(s); -; 5130 : pal[i][1] = stbi__get8(s); -; 5131 : pal[i][0] = stbi__get8(s); -; 5132 : if (info.hsz != 12) stbi__get8(s); -; 5133 : pal[i][3] = 255; -; 5134 : } -; 5135 : stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); -; 5136 : if (info.bpp == 1) width = (s->img_x + 7) >> 3; -; 5137 : else if (info.bpp == 4) width = (s->img_x + 1) >> 1; -; 5138 : else if (info.bpp == 8) width = s->img_x; -; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } -; 5140 : pad = (-width) & 3; -; 5141 : if (info.bpp == 1) { -; 5142 : for (j = 0; j < (int)s->img_y; ++j) { -; 5143 : int bit_offset = 7, v = stbi__get8(s); -; 5144 : for (i = 0; i < (int)s->img_x; ++i) { -; 5145 : int color = (v >> bit_offset) & 0x1; -; 5146 : out[z++] = pal[color][0]; -; 5147 : out[z++] = pal[color][1]; -; 5148 : out[z++] = pal[color][2]; -; 5149 : if (target == 4) out[z++] = 255; -; 5150 : if (i + 1 == (int)s->img_x) break; -; 5151 : if ((--bit_offset) < 0) { -; 5152 : bit_offset = 7; -; 5153 : v = stbi__get8(s); -; 5154 : } -; 5155 : } -; 5156 : stbi__skip(s, pad); -; 5157 : } -; 5158 : } -; 5159 : else { -; 5160 : for (j = 0; j < (int)s->img_y; ++j) { -; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { -; 5162 : int v = stbi__get8(s), v2 = 0; -; 5163 : if (info.bpp == 4) { -; 5164 : v2 = v & 15; -; 5165 : v >>= 4; -; 5166 : } -; 5167 : out[z++] = pal[v][0]; -; 5168 : out[z++] = pal[v][1]; -; 5169 : out[z++] = pal[v][2]; -; 5170 : if (target == 4) out[z++] = 255; -; 5171 : if (i + 1 == (int)s->img_x) break; -; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; -; 5173 : out[z++] = pal[v][0]; -; 5174 : out[z++] = pal[v][1]; -; 5175 : out[z++] = pal[v][2]; -; 5176 : if (target == 4) out[z++] = 255; -; 5177 : } -; 5178 : stbi__skip(s, pad); -; 5179 : } -; 5180 : } -; 5181 : } -; 5182 : else { -; 5183 : int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0; -; 5184 : int z = 0; -; 5185 : int easy = 0; -; 5186 : stbi__skip(s, info.offset - info.extra_read - info.hsz); -; 5187 : if (info.bpp == 24) width = 3 * s->img_x; -; 5188 : else if (info.bpp == 16) width = 2 * s->img_x; -; 5189 : else /* bpp = 32 and pad = 0 */ width = 0; -; 5190 : pad = (-width) & 3; -; 5191 : if (info.bpp == 24) { -; 5192 : easy = 1; -; 5193 : } -; 5194 : else if (info.bpp == 32) { -; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) -; 5196 : easy = 2; -; 5197 : } -; 5198 : if (!easy) { -; 5199 : if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); -; 5205 : if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5206 : } -; 5207 : for (j = 0; j < (int)s->img_y; ++j) { -; 5208 : if (easy) { -; 5209 : for (i = 0; i < (int)s->img_x; ++i) { -; 5210 : unsigned char a; -; 5211 : out[z + 2] = stbi__get8(s); -; 5212 : out[z + 1] = stbi__get8(s); -; 5213 : out[z + 0] = stbi__get8(s); -; 5214 : z += 3; -; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); -; 5216 : all_a |= a; -; 5217 : if (target == 4) out[z++] = a; -; 5218 : } -; 5219 : } -; 5220 : else { -; 5221 : int bpp = info.bpp; -; 5222 : for (i = 0; i < (int)s->img_x; ++i) { -; 5223 : stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s)); -; 5224 : unsigned int a; -; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); -; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); -; 5229 : all_a |= a; -; 5230 : if (target == 4) out[z++] = STBI__BYTECAST(a); -; 5231 : } -; 5232 : } -; 5233 : stbi__skip(s, pad); -; 5234 : } -; 5235 : } -; 5236 : -; 5237 : // if alpha channel is all 0s, replace with all 255s -; 5238 : if (target == 4 && all_a == 0) -; 5239 : for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4) -; 5240 : out[i] = 255; -; 5241 : -; 5242 : if (flip_vertically) { -; 5243 : stbi_uc t; -; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { -; 5245 : stbi_uc* p1 = out + j * s->img_x * target; -; 5246 : stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target; -; 5247 : for (i = 0; i < (int)s->img_x * target; ++i) { -; 5248 : t = p1[i]; p1[i] = p2[i]; p2[i] = t; -; 5249 : } -; 5250 : } -; 5251 : } -; 5252 : -; 5253 : if (req_comp && req_comp != target) { -; 5254 : out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); -; 5255 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5256 : } -; 5257 : -; 5258 : *x = s->img_x; -; 5259 : *y = s->img_y; -; 5260 : if (comp) *comp = s->img_n; -; 5261 : return out; -; 5262 : } -; 5263 : #endif -; 5264 : -; 5265 : // Targa Truevision - TGA -; 5266 : // by Jonathan Dummer -; 5267 : #ifndef STBI_NO_TGA -; 5268 : // returns STBI_rgb or whatever, 0 on error -; 5269 : static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -; 5270 : { -; 5271 : // only RGB or RGBA (incl. 16bit) or grey allowed -; 5272 : if (is_rgb16) *is_rgb16 = 0; -; 5273 : switch (bits_per_pixel) { -; 5274 : case 8: return STBI_grey; -; 5275 : case 16: if (is_grey) return STBI_grey_alpha; -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; -; 5278 : return STBI_rgb; -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; -; 5281 : default: return 0; -; 5282 : } -; 5283 : } -; 5284 : -; 5285 : static int stbi__tga_info(stbi__context* s, int* x, int* y, int* comp) -; 5286 : { -; 5287 : int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; -; 5288 : int sz, tga_colormap_type; -; 5289 : stbi__get8(s); // discard Offset -; 5290 : tga_colormap_type = stbi__get8(s); // colormap type -; 5291 : if (tga_colormap_type > 1) { -; 5292 : stbi__rewind(s); -; 5293 : return 0; // only RGB or indexed allowed -; 5294 : } -; 5295 : tga_image_type = stbi__get8(s); // image type -; 5296 : if (tga_colormap_type == 1) { // colormapped (paletted) image -; 5297 : if (tga_image_type != 1 && tga_image_type != 9) { -; 5298 : stbi__rewind(s); -; 5299 : return 0; -; 5300 : } -; 5301 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5302 : sz = stbi__get8(s); // check bits per palette color entry -; 5303 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) { -; 5304 : stbi__rewind(s); -; 5305 : return 0; -; 5306 : } -; 5307 : stbi__skip(s, 4); // skip image x and y origin -; 5308 : tga_colormap_bpp = sz; -; 5309 : } -; 5310 : else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE -; 5311 : if ((tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11)) { -; 5312 : stbi__rewind(s); -; 5313 : return 0; // only RGB or grey allowed, +/- RLE -; 5314 : } -; 5315 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5316 : tga_colormap_bpp = 0; -; 5317 : } -; 5318 : tga_w = stbi__get16le(s); -; 5319 : if (tga_w < 1) { -; 5320 : stbi__rewind(s); -; 5321 : return 0; // test width -; 5322 : } -; 5323 : tga_h = stbi__get16le(s); -; 5324 : if (tga_h < 1) { -; 5325 : stbi__rewind(s); -; 5326 : return 0; // test height -; 5327 : } -; 5328 : tga_bits_per_pixel = stbi__get8(s); // bits per pixel -; 5329 : stbi__get8(s); // ignore alpha bits -; 5330 : if (tga_colormap_bpp != 0) { -; 5331 : if ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { -; 5332 : // when using a colormap, tga_bits_per_pixel is the size of the indexes -; 5333 : // I don't think anything but 8 or 16bit indexes makes sense -; 5334 : stbi__rewind(s); -; 5335 : return 0; -; 5336 : } -; 5337 : tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); -; 5338 : } -; 5339 : else { -; 5340 : tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); -; 5341 : } -; 5342 : if (!tga_comp) { -; 5343 : stbi__rewind(s); -; 5344 : return 0; -; 5345 : } -; 5346 : if (x) *x = tga_w; -; 5347 : if (y) *y = tga_h; -; 5348 : if (comp) *comp = tga_comp; -; 5349 : return 1; // seems to have passed everything -; 5350 : } -; 5351 : -; 5352 : static int stbi__tga_test(stbi__context* s) -; 5353 : { -; 5354 : int res = 0; -; 5355 : int sz, tga_color_type; -; 5356 : stbi__get8(s); // discard Offset -; 5357 : tga_color_type = stbi__get8(s); // color type -; 5358 : if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed -; 5359 : sz = stbi__get8(s); // image type -; 5360 : if (tga_color_type == 1) { // colormapped (paletted) image -; 5361 : if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 -; 5362 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5363 : sz = stbi__get8(s); // check bits per palette color entry -; 5364 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5365 : stbi__skip(s, 4); // skip image x and y origin -; 5366 : } -; 5367 : else { // "normal" image w/o colormap -; 5368 : if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE -; 5369 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5370 : } -; 5371 : if (stbi__get16le(s) < 1) goto errorEnd; // test width -; 5372 : if (stbi__get16le(s) < 1) goto errorEnd; // test height -; 5373 : sz = stbi__get8(s); // bits per pixel -; 5374 : if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index -; 5375 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5376 : -; 5377 : res = 1; // if we got this far, everything's good and we can return 1 instead of 0 -; 5378 : -; 5379 : errorEnd: -; 5380 : stbi__rewind(s); -; 5381 : return res; -; 5382 : } -; 5383 : -; 5384 : // read 16bit value and convert to 24bit RGB -; 5385 : static void stbi__tga_read_rgb16(stbi__context* s, stbi_uc* out) -; 5386 : { -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); -; 5397 : -; 5398 : // some people claim that the most significant bit might be used for alpha -; 5399 : // (possibly if an alpha-bit is set in the "image descriptor byte") -; 5400 : // but that only made 16bit test images completely translucent.. -; 5401 : // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -; 5402 : } -; 5403 : -; 5404 : static void* stbi__tga_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5405 : { -; 5406 : // read in the TGA header stuff -; 5407 : int tga_offset = stbi__get8(s); -; 5408 : int tga_indexed = stbi__get8(s); -; 5409 : int tga_image_type = stbi__get8(s); -; 5410 : int tga_is_RLE = 0; -; 5411 : int tga_palette_start = stbi__get16le(s); -; 5412 : int tga_palette_len = stbi__get16le(s); -; 5413 : int tga_palette_bits = stbi__get8(s); -; 5414 : int tga_x_origin = stbi__get16le(s); -; 5415 : int tga_y_origin = stbi__get16le(s); -; 5416 : int tga_width = stbi__get16le(s); -; 5417 : int tga_height = stbi__get16le(s); -; 5418 : int tga_bits_per_pixel = stbi__get8(s); -; 5419 : int tga_comp, tga_rgb16 = 0; -; 5420 : int tga_inverted = stbi__get8(s); -; 5421 : // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) -; 5422 : // image data -; 5423 : unsigned char* tga_data; -; 5424 : unsigned char* tga_palette = NULL; -; 5425 : int i, j; -; 5426 : unsigned char raw_data[4] = { 0 }; -; 5427 : int RLE_count = 0; -; 5428 : int RLE_repeating = 0; -; 5429 : int read_next_pixel = 1; -; 5430 : STBI_NOTUSED(ri); -; 5431 : STBI_NOTUSED(tga_x_origin); // @TODO -; 5432 : STBI_NOTUSED(tga_y_origin); // @TODO -; 5433 : -; 5434 : if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5435 : if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5436 : -; 5437 : // do a tiny bit of precessing -; 5438 : if (tga_image_type >= 8) -; 5439 : { -; 5440 : tga_image_type -= 8; -; 5441 : tga_is_RLE = 1; -; 5442 : } -; 5443 : tga_inverted = 1 - ((tga_inverted >> 5) & 1); -; 5444 : -; 5445 : // If I'm paletted, then I'll use the number of bits from the palette -; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); -; 5447 : else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); -; 5448 : -; 5449 : if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency -; 5450 : return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); -; 5451 : -; 5452 : // tga info -; 5453 : *x = tga_width; -; 5454 : *y = tga_height; -; 5455 : if (comp) *comp = tga_comp; -; 5456 : -; 5457 : if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) -; 5458 : return stbi__errpuc("too large", "Corrupt TGA"); -; 5459 : -; 5460 : tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); -; 5461 : if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); -; 5462 : -; 5463 : // skip to the data's starting position (offset usually = 0) -; 5464 : stbi__skip(s, tga_offset); -; 5465 : -; 5466 : if (!tga_indexed && !tga_is_RLE && !tga_rgb16) { -; 5467 : for (i = 0; i < tga_height; ++i) { -; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; -; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; -; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); -; 5471 : } -; 5472 : } -; 5473 : else { -; 5474 : // do I need to load a palette? -; 5475 : if (tga_indexed) -; 5476 : { -; 5477 : if (tga_palette_len == 0) { /* you have to have at least one entry! */ -; 5478 : STBI_FREE(tga_data); -; 5479 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5480 : } -; 5481 : -; 5482 : // any data to skip? (offset usually = 0) -; 5483 : stbi__skip(s, tga_palette_start); -; 5484 : // load the palette -; 5485 : tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); -; 5486 : if (!tga_palette) { -; 5487 : STBI_FREE(tga_data); -; 5488 : return stbi__errpuc("outofmem", "Out of memory"); -; 5489 : } -; 5490 : if (tga_rgb16) { -; 5491 : stbi_uc* pal_entry = tga_palette; -; 5492 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5493 : for (i = 0; i < tga_palette_len; ++i) { -; 5494 : stbi__tga_read_rgb16(s, pal_entry); -; 5495 : pal_entry += tga_comp; -; 5496 : } -; 5497 : } -; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { -; 5499 : STBI_FREE(tga_data); -; 5500 : STBI_FREE(tga_palette); -; 5501 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) -; 5506 : { -; 5507 : // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? -; 5508 : if (tga_is_RLE) -; 5509 : { -; 5510 : if (RLE_count == 0) -; 5511 : { -; 5512 : // yep, get the next byte as a RLE command -; 5513 : int RLE_cmd = stbi__get8(s); -; 5514 : RLE_count = 1 + (RLE_cmd & 127); -; 5515 : RLE_repeating = RLE_cmd >> 7; -; 5516 : read_next_pixel = 1; -; 5517 : } -; 5518 : else if (!RLE_repeating) -; 5519 : { -; 5520 : read_next_pixel = 1; -; 5521 : } -; 5522 : } -; 5523 : else -; 5524 : { -; 5525 : read_next_pixel = 1; -; 5526 : } -; 5527 : // OK, if I need to read a pixel, do it now -; 5528 : if (read_next_pixel) -; 5529 : { -; 5530 : // load however much data we did have -; 5531 : if (tga_indexed) -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); -; 5535 : if (pal_idx >= tga_palette_len) { -; 5536 : // invalid index -; 5537 : pal_idx = 0; -; 5538 : } -; 5539 : pal_idx *= tga_comp; -; 5540 : for (j = 0; j < tga_comp; ++j) { -; 5541 : raw_data[j] = tga_palette[pal_idx + j]; -; 5542 : } -; 5543 : } -; 5544 : else if (tga_rgb16) { -; 5545 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5546 : stbi__tga_read_rgb16(s, raw_data); -; 5547 : } -; 5548 : else { -; 5549 : // read in the data raw -; 5550 : for (j = 0; j < tga_comp; ++j) { -; 5551 : raw_data[j] = stbi__get8(s); -; 5552 : } -; 5553 : } -; 5554 : // clear the reading flag for the next pixel -; 5555 : read_next_pixel = 0; -; 5556 : } // end of reading a pixel -; 5557 : -; 5558 : // copy data -; 5559 : for (j = 0; j < tga_comp; ++j) -; 5560 : tga_data[i * tga_comp + j] = raw_data[j]; -; 5561 : -; 5562 : // in case we're in RLE mode, keep counting down -; 5563 : --RLE_count; -; 5564 : } -; 5565 : // do I need to invert the image? -; 5566 : if (tga_inverted) -; 5567 : { -; 5568 : for (j = 0; j * 2 < tga_height; ++j) -; 5569 : { -; 5570 : int index1 = j * tga_width * tga_comp; -; 5571 : int index2 = (tga_height - 1 - j) * tga_width * tga_comp; -; 5572 : for (i = tga_width * tga_comp; i > 0; --i) -; 5573 : { -; 5574 : unsigned char temp = tga_data[index1]; -; 5575 : tga_data[index1] = tga_data[index2]; -; 5576 : tga_data[index2] = temp; -; 5577 : ++index1; -; 5578 : ++index2; -; 5579 : } -; 5580 : } -; 5581 : } -; 5582 : // clear my palette, if I had one -; 5583 : if (tga_palette != NULL) -; 5584 : { -; 5585 : STBI_FREE(tga_palette); -; 5586 : } -; 5587 : } -; 5588 : -; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order -; 5590 : if (tga_comp >= 3 && !tga_rgb16) -; 5591 : { -; 5592 : unsigned char* tga_pixel = tga_data; -; 5593 : for (i = 0; i < tga_width * tga_height; ++i) -; 5594 : { -; 5595 : unsigned char temp = tga_pixel[0]; -; 5596 : tga_pixel[0] = tga_pixel[2]; -; 5597 : tga_pixel[2] = temp; -; 5598 : tga_pixel += tga_comp; -; 5599 : } -; 5600 : } -; 5601 : -; 5602 : // convert to target component count -; 5603 : if (req_comp && req_comp != tga_comp) -; 5604 : tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); -; 5605 : -; 5606 : // the things I do to get rid of an error message, and yet keep -; 5607 : // Microsoft's C compilers happy... [8^( -; 5608 : tga_palette_start = tga_palette_len = tga_palette_bits = -; 5609 : tga_x_origin = tga_y_origin = 0; -; 5610 : STBI_NOTUSED(tga_palette_start); -; 5611 : // OK, done -; 5612 : return tga_data; -; 5613 : } -; 5614 : #endif -; 5615 : -; 5616 : // ************************************************************************************************* -; 5617 : // Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB -; 5618 : -; 5619 : #ifndef STBI_NO_PSD -; 5620 : static int stbi__psd_test(stbi__context* s) -; 5621 : { -; 5622 : int r = (stbi__get32be(s) == 0x38425053); -; 5623 : stbi__rewind(s); -; 5624 : return r; -; 5625 : } -; 5626 : -; 5627 : static int stbi__psd_decode_rle(stbi__context* s, stbi_uc* p, int pixelCount) -; 5628 : { -; 5629 : int count, nleft, len; -; 5630 : -; 5631 : count = 0; -; 5632 : while ((nleft = pixelCount - count) > 0) { -; 5633 : len = stbi__get8(s); -; 5634 : if (len == 128) { -; 5635 : // No-op. -; 5636 : } -; 5637 : else if (len < 128) { -; 5638 : // Copy next len+1 bytes literally. -; 5639 : len++; -; 5640 : if (len > nleft) return 0; // corrupt data -; 5641 : count += len; -; 5642 : while (len) { -; 5643 : *p = stbi__get8(s); -; 5644 : p += 4; -; 5645 : len--; -; 5646 : } -; 5647 : } -; 5648 : else if (len > 128) { -; 5649 : stbi_uc val; -; 5650 : // Next -len+1 bytes in the dest are replicated from next source byte. -; 5651 : // (Interpret len as a negative 8-bit int.) -; 5652 : len = 257 - len; -; 5653 : if (len > nleft) return 0; // corrupt data -; 5654 : val = stbi__get8(s); -; 5655 : count += len; -; 5656 : while (len) { -; 5657 : *p = val; -; 5658 : p += 4; -; 5659 : len--; -; 5660 : } -; 5661 : } -; 5662 : } -; 5663 : -; 5664 : return 1; -; 5665 : } -; 5666 : -; 5667 : static void* stbi__psd_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc) -; 5668 : { -; 5669 : int pixelCount; -; 5670 : int channelCount, compression; -; 5671 : int channel, i; -; 5672 : int bitdepth; -; 5673 : int w, h; -; 5674 : stbi_uc* out; -; 5675 : STBI_NOTUSED(ri); -; 5676 : -; 5677 : // Check identifier -; 5678 : if (stbi__get32be(s) != 0x38425053) // "8BPS" -; 5679 : return stbi__errpuc("not PSD", "Corrupt PSD image"); -; 5680 : -; 5681 : // Check file type version. -; 5682 : if (stbi__get16be(s) != 1) -; 5683 : return stbi__errpuc("wrong version", "Unsupported version of PSD image"); -; 5684 : -; 5685 : // Skip 6 reserved bytes. -; 5686 : stbi__skip(s, 6); -; 5687 : -; 5688 : // Read the number of channels (R, G, B, A, etc). -; 5689 : channelCount = stbi__get16be(s); -; 5690 : if (channelCount < 0 || channelCount > 16) -; 5691 : return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); -; 5692 : -; 5693 : // Read the rows and columns of the image. -; 5694 : h = stbi__get32be(s); -; 5695 : w = stbi__get32be(s); -; 5696 : -; 5697 : if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5698 : if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5699 : -; 5700 : // Make sure the depth is 8 bits. -; 5701 : bitdepth = stbi__get16be(s); -; 5702 : if (bitdepth != 8 && bitdepth != 16) -; 5703 : return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); -; 5704 : -; 5705 : // Make sure the color mode is RGB. -; 5706 : // Valid options are: -; 5707 : // 0: Bitmap -; 5708 : // 1: Grayscale -; 5709 : // 2: Indexed color -; 5710 : // 3: RGB color -; 5711 : // 4: CMYK color -; 5712 : // 7: Multichannel -; 5713 : // 8: Duotone -; 5714 : // 9: Lab color -; 5715 : if (stbi__get16be(s) != 3) -; 5716 : return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); -; 5717 : -; 5718 : // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) -; 5719 : stbi__skip(s, stbi__get32be(s)); -; 5720 : -; 5721 : // Skip the image resources. (resolution, pen tool paths, etc) -; 5722 : stbi__skip(s, stbi__get32be(s)); -; 5723 : -; 5724 : // Skip the reserved data. -; 5725 : stbi__skip(s, stbi__get32be(s)); -; 5726 : -; 5727 : // Find out if the data is compressed. -; 5728 : // Known values: -; 5729 : // 0: no compression -; 5730 : // 1: RLE compressed -; 5731 : compression = stbi__get16be(s); -; 5732 : if (compression > 1) -; 5733 : return stbi__errpuc("bad compression", "PSD has an unknown compression format"); -; 5734 : -; 5735 : // Check size -; 5736 : if (!stbi__mad3sizes_valid(4, w, h, 0)) -; 5737 : return stbi__errpuc("too large", "Corrupt PSD"); -; 5738 : -; 5739 : // Create the destination image. -; 5740 : -; 5741 : if (!compression && bitdepth == 16 && bpc == 16) { -; 5742 : out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0); -; 5743 : ri->bits_per_channel = 16; -; 5744 : } -; 5745 : else -; 5746 : out = (stbi_uc*)stbi__malloc(4 * w * h); -; 5747 : -; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5749 : pixelCount = w * h; -; 5750 : -; 5751 : // Initialize the data to zero. -; 5752 : //memset( out, 0, pixelCount * 4 ); -; 5753 : -; 5754 : // Finally, the image data. -; 5755 : if (compression) { -; 5756 : // RLE as used by .PSD and .TIFF -; 5757 : // Loop until you get the number of unpacked bytes you are expecting: -; 5758 : // Read the next source byte into n. -; 5759 : // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. -; 5760 : // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. -; 5761 : // Else if n is 128, noop. -; 5762 : // Endloop -; 5763 : -; 5764 : // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, -; 5765 : // which we're going to just skip. -; 5766 : stbi__skip(s, h * channelCount * 2); -; 5767 : -; 5768 : // Read the RLE data by channel. -; 5769 : for (channel = 0; channel < 4; channel++) { -; 5770 : stbi_uc* p; -; 5771 : -; 5772 : p = out + channel; -; 5773 : if (channel >= channelCount) { -; 5774 : // Fill this channel with default data. -; 5775 : for (i = 0; i < pixelCount; i++, p += 4) -; 5776 : *p = (channel == 3 ? 255 : 0); -; 5777 : } -; 5778 : else { -; 5779 : // Read the RLE data. -; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { -; 5781 : STBI_FREE(out); -; 5782 : return stbi__errpuc("corrupt", "bad RLE data"); -; 5783 : } -; 5784 : } -; 5785 : } -; 5786 : } -; 5787 : else { -; 5788 : // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) -; 5789 : // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. -; 5790 : -; 5791 : // Read the data by channel. -; 5792 : for (channel = 0; channel < 4; channel++) { -; 5793 : if (channel >= channelCount) { -; 5794 : // Fill this channel with default data. -; 5795 : if (bitdepth == 16 && bpc == 16) { -; 5796 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5797 : stbi__uint16 val = channel == 3 ? 65535 : 0; -; 5798 : for (i = 0; i < pixelCount; i++, q += 4) -; 5799 : *q = val; -; 5800 : } -; 5801 : else { -; 5802 : stbi_uc* p = out + channel; -; 5803 : stbi_uc val = channel == 3 ? 255 : 0; -; 5804 : for (i = 0; i < pixelCount; i++, p += 4) -; 5805 : *p = val; -; 5806 : } -; 5807 : } -; 5808 : else { -; 5809 : if (ri->bits_per_channel == 16) { // output bpc -; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5811 : for (i = 0; i < pixelCount; i++, q += 4) -; 5812 : *q = (stbi__uint16)stbi__get16be(s); -; 5813 : } -; 5814 : else { -; 5815 : stbi_uc* p = out + channel; -; 5816 : if (bitdepth == 16) { // input bpc -; 5817 : for (i = 0; i < pixelCount; i++, p += 4) -; 5818 : *p = (stbi_uc)(stbi__get16be(s) >> 8); -; 5819 : } -; 5820 : else { -; 5821 : for (i = 0; i < pixelCount; i++, p += 4) -; 5822 : *p = stbi__get8(s); -; 5823 : } -; 5824 : } -; 5825 : } -; 5826 : } -; 5827 : } -; 5828 : -; 5829 : // remove weird white matte from PSD -; 5830 : if (channelCount >= 4) { -; 5831 : if (ri->bits_per_channel == 16) { -; 5832 : for (i = 0; i < w * h; ++i) { -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); -; 5841 : } -; 5842 : } -; 5843 : } -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); -; 5854 : } -; 5855 : } -; 5856 : } -; 5857 : } -; 5858 : -; 5859 : // convert to desired output format -; 5860 : if (req_comp && req_comp != 4) { -; 5861 : if (ri->bits_per_channel == 16) -; 5862 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h); -; 5863 : else -; 5864 : out = stbi__convert_format(out, 4, req_comp, w, h); -; 5865 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5866 : } -; 5867 : -; 5868 : if (comp) *comp = 4; -; 5869 : *y = h; -; 5870 : *x = w; -; 5871 : -; 5872 : return out; -; 5873 : } -; 5874 : #endif -; 5875 : -; 5876 : // ************************************************************************************************* -; 5877 : // Softimage PIC loader -; 5878 : // by Tom Seddon -; 5879 : // -; 5880 : // See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -; 5881 : // See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ -; 5882 : -; 5883 : #ifndef STBI_NO_PIC -; 5884 : static int stbi__pic_is4(stbi__context* s, const char* str) -; 5885 : { -; 5886 : int i; -; 5887 : for (i = 0; i < 4; ++i) -; 5888 : if (stbi__get8(s) != (stbi_uc)str[i]) -; 5889 : return 0; -; 5890 : -; 5891 : return 1; -; 5892 : } -; 5893 : -; 5894 : static int stbi__pic_test_core(stbi__context* s) -; 5895 : { -; 5896 : int i; -; 5897 : -; 5898 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) -; 5899 : return 0; -; 5900 : -; 5901 : for (i = 0; i < 84; ++i) -; 5902 : stbi__get8(s); -; 5903 : -; 5904 : if (!stbi__pic_is4(s, "PICT")) -; 5905 : return 0; -; 5906 : -; 5907 : return 1; -; 5908 : } -; 5909 : -; 5910 : typedef struct -; 5911 : { -; 5912 : stbi_uc size, type, channel; -; 5913 : } stbi__pic_packet; -; 5914 : -; 5915 : static stbi_uc* stbi__readval(stbi__context* s, int channel, stbi_uc* dest) -; 5916 : { -; 5917 : int mask = 0x80, i; -; 5918 : -; 5919 : for (i = 0; i < 4; ++i, mask >>= 1) { -; 5920 : if (channel & mask) { -; 5921 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "PIC file too short"); -; 5922 : dest[i] = stbi__get8(s); -; 5923 : } -; 5924 : } -; 5925 : -; 5926 : return dest; -; 5927 : } -; 5928 : -; 5929 : static void stbi__copyval(int channel, stbi_uc* dest, const stbi_uc* src) -; 5930 : { -; 5931 : int mask = 0x80, i; -; 5932 : -; 5933 : for (i = 0; i < 4; ++i, mask >>= 1) -; 5934 : if (channel & mask) - +; Line 5934 00347 40 f6 c6 40 test sil, 64 ; 00000040H 0034b 74 04 je SHORT $LN151@stbi__pic_ - -; 5935 : dest[i] = src[i]; - +; Line 5935 0034d 44 88 4b 01 mov BYTE PTR [rbx+1], r9b $LN151@stbi__pic_: - -; 1096 : } -; 1097 : -; 1098 : return s->img_buffer >= s->img_buffer_end; -; 1099 : } -; 1100 : #endif -; 1101 : -; 1102 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) -; 1103 : // nothing -; 1104 : #else -; 1105 : static void stbi__skip(stbi__context* s, int n) -; 1106 : { -; 1107 : if (n == 0) return; // already there! -; 1108 : if (n < 0) { -; 1109 : s->img_buffer = s->img_buffer_end; -; 1110 : return; -; 1111 : } -; 1112 : if (s->io.read) { -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1114 : if (blen < n) { -; 1115 : s->img_buffer = s->img_buffer_end; -; 1116 : (s->io.skip)(s->io_user_data, n - blen); -; 1117 : return; -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; -; 1121 : } -; 1122 : #endif -; 1123 : -; 1124 : #if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) -; 1125 : // nothing -; 1126 : #else -; 1127 : static int stbi__getn(stbi__context* s, stbi_uc* buffer, int n) -; 1128 : { -; 1129 : if (s->io.read) { -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1131 : if (blen < n) { -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; -; 1139 : return res; -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { -; 1144 : memcpy(buffer, s->img_buffer, n); -; 1145 : s->img_buffer += n; -; 1146 : return 1; -; 1147 : } -; 1148 : else -; 1149 : return 0; -; 1150 : } -; 1151 : #endif -; 1152 : -; 1153 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1154 : // nothing -; 1155 : #else -; 1156 : static int stbi__get16be(stbi__context* s) -; 1157 : { -; 1158 : int z = stbi__get8(s); -; 1159 : return (z << 8) + stbi__get8(s); -; 1160 : } -; 1161 : #endif -; 1162 : -; 1163 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1164 : // nothing -; 1165 : #else -; 1166 : static stbi__uint32 stbi__get32be(stbi__context* s) -; 1167 : { -; 1168 : stbi__uint32 z = stbi__get16be(s); -; 1169 : return (z << 16) + stbi__get16be(s); -; 1170 : } -; 1171 : #endif -; 1172 : -; 1173 : #if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -; 1174 : // nothing -; 1175 : #else -; 1176 : static int stbi__get16le(stbi__context* s) -; 1177 : { -; 1178 : int z = stbi__get8(s); -; 1179 : return z + (stbi__get8(s) << 8); -; 1180 : } -; 1181 : #endif -; 1182 : -; 1183 : #ifndef STBI_NO_BMP -; 1184 : static stbi__uint32 stbi__get32le(stbi__context* s) -; 1185 : { -; 1186 : stbi__uint32 z = stbi__get16le(s); -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; -; 1188 : return z; -; 1189 : } -; 1190 : #endif -; 1191 : -; 1192 : #define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings -; 1193 : -; 1194 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1195 : // nothing -; 1196 : #else -; 1197 : ////////////////////////////////////////////////////////////////////////////// -; 1198 : // -; 1199 : // generic converter from built-in img_n to req_comp -; 1200 : // individual types do this automatically as much as possible (e.g. jpeg -; 1201 : // does all cases internally since it needs to colorspace convert anyway, -; 1202 : // and it never has alpha, so very few cases ). png can automatically -; 1203 : // interleave an alpha=255 channel, but falls back to this for other cases -; 1204 : // -; 1205 : // assume data buffer is malloced, so malloc a new one and free that one -; 1206 : // only failure mode is malloc failing -; 1207 : -; 1208 : static stbi_uc stbi__compute_y(int r, int g, int b) -; 1209 : { -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1211 : } -; 1212 : #endif -; 1213 : -; 1214 : #if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1215 : // nothing -; 1216 : #else -; 1217 : static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1218 : { -; 1219 : int i, j; -; 1220 : unsigned char* good; -; 1221 : -; 1222 : if (req_comp == img_n) return data; -; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1224 : -; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); -; 1226 : if (good == NULL) { -; 1227 : STBI_FREE(data); -; 1228 : return stbi__errpuc("outofmem", "Out of memory"); -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { -; 1232 : unsigned char* src = data + j * x * img_n; -; 1233 : unsigned char* dest = good + j * x * req_comp; -; 1234 : -; 1235 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1236 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1237 : // convert source image with img_n components to one with req_comp components; -; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1239 : switch (STBI__COMBO(img_n, req_comp)) { -; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; -; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; -; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1253 : } -; 1254 : #undef STBI__CASE -; 1255 : } -; 1256 : -; 1257 : STBI_FREE(data); -; 1258 : return good; -; 1259 : } -; 1260 : #endif -; 1261 : -; 1262 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1263 : // nothing -; 1264 : #else -; 1265 : static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -; 1266 : { -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1268 : } -; 1269 : #endif -; 1270 : -; 1271 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1272 : // nothing -; 1273 : #else -; 1274 : static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1275 : { -; 1276 : int i, j; -; 1277 : stbi__uint16* good; -; 1278 : -; 1279 : if (req_comp == img_n) return data; -; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1281 : -; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); -; 1283 : if (good == NULL) { -; 1284 : STBI_FREE(data); -; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { -; 1289 : stbi__uint16* src = data + j * x * img_n; -; 1290 : stbi__uint16* dest = good + j * x * req_comp; -; 1291 : -; 1292 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1293 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1294 : // convert source image with img_n components to one with req_comp components; -; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1296 : switch (STBI__COMBO(img_n, req_comp)) { -; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; -; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; -; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1310 : } -; 1311 : #undef STBI__CASE -; 1312 : } -; 1313 : -; 1314 : STBI_FREE(data); -; 1315 : return good; -; 1316 : } -; 1317 : #endif -; 1318 : -; 1319 : #ifndef STBI_NO_LINEAR -; 1320 : static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp) -; 1321 : { -; 1322 : int i, k, n; -; 1323 : float* output; -; 1324 : if (!data) return NULL; -; 1325 : output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0); -; 1326 : if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } -; 1327 : // compute number of non-alpha components -; 1328 : if (comp & 1) n = comp; else n = comp - 1; -; 1329 : for (i = 0; i < x * y; ++i) { -; 1330 : for (k = 0; k < n; ++k) { -; 1331 : output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale); -; 1332 : } -; 1333 : } -; 1334 : if (n < comp) { -; 1335 : for (i = 0; i < x * y; ++i) { -; 1336 : output[i * comp + n] = data[i * comp + n] / 255.0f; -; 1337 : } -; 1338 : } -; 1339 : STBI_FREE(data); -; 1340 : return output; -; 1341 : } -; 1342 : #endif -; 1343 : -; 1344 : #ifndef STBI_NO_HDR -; 1345 : #define stbi__float2int(x) ((int) (x)) -; 1346 : static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp) -; 1347 : { -; 1348 : int i, k, n; -; 1349 : stbi_uc* output; -; 1350 : if (!data) return NULL; -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } -; 1353 : // compute number of non-alpha components -; 1354 : if (comp & 1) n = comp; else n = comp - 1; -; 1355 : for (i = 0; i < x * y; ++i) { -; 1356 : for (k = 0; k < n; ++k) { -; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; -; 1358 : if (z < 0) z = 0; -; 1359 : if (z > 255) z = 255; -; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1361 : } -; 1362 : if (k < comp) { -; 1363 : float z = data[i * comp + k] * 255 + 0.5f; -; 1364 : if (z < 0) z = 0; -; 1365 : if (z > 255) z = 255; -; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1367 : } -; 1368 : } -; 1369 : STBI_FREE(data); -; 1370 : return output; -; 1371 : } -; 1372 : #endif -; 1373 : -; 1374 : ////////////////////////////////////////////////////////////////////////////// -; 1375 : // -; 1376 : // "baseline" JPEG/JFIF decoder -; 1377 : // -; 1378 : // simple implementation -; 1379 : // - doesn't support delayed output of y-dimension -; 1380 : // - simple interface (only one output format: 8-bit interleaved RGB) -; 1381 : // - doesn't try to recover corrupt jpegs -; 1382 : // - doesn't allow partial loading, loading multiple at once -; 1383 : // - still fast on x86 (copying globals into locals doesn't help x86) -; 1384 : // - allocates lots of intermediate memory (full size of all components) -; 1385 : // - non-interleaved case requires this anyway -; 1386 : // - allows good upsampling (see next) -; 1387 : // high-quality -; 1388 : // - upsampled channels are bilinearly interpolated, even across blocks -; 1389 : // - quality integer IDCT derived from IJG's 'slow' -; 1390 : // performance -; 1391 : // - fast huffman; reasonable integer IDCT -; 1392 : // - some SIMD kernels for common paths on targets with SSE2/NEON -; 1393 : // - uses a lot of intermediate memory, could cache poorly -; 1394 : -; 1395 : #ifndef STBI_NO_JPEG -; 1396 : -; 1397 : // huffman decoding acceleration -; 1398 : #define FAST_BITS 9 // larger handles more cases; smaller stomps less cache -; 1399 : -; 1400 : typedef struct -; 1401 : { -; 1402 : stbi_uc fast[1 << FAST_BITS]; -; 1403 : // weirdly, repacking this into AoS is a 10% speed loss, instead of a win -; 1404 : stbi__uint16 code[256]; -; 1405 : stbi_uc values[256]; -; 1406 : stbi_uc size[257]; -; 1407 : unsigned int maxcode[18]; -; 1408 : int delta[17]; // old 'firstsymbol' - old 'firstcode' -; 1409 : } stbi__huffman; -; 1410 : -; 1411 : typedef struct -; 1412 : { -; 1413 : stbi__context* s; -; 1414 : stbi__huffman huff_dc[4]; -; 1415 : stbi__huffman huff_ac[4]; -; 1416 : stbi__uint16 dequant[4][64]; -; 1417 : stbi__int16 fast_ac[4][1 << FAST_BITS]; -; 1418 : -; 1419 : // sizes for components, interleaved MCUs -; 1420 : int img_h_max, img_v_max; -; 1421 : int img_mcu_x, img_mcu_y; -; 1422 : int img_mcu_w, img_mcu_h; -; 1423 : -; 1424 : // definition of jpeg image component -; 1425 : struct -; 1426 : { -; 1427 : int id; -; 1428 : int h, v; -; 1429 : int tq; -; 1430 : int hd, ha; -; 1431 : int dc_pred; -; 1432 : -; 1433 : int x, y, w2, h2; -; 1434 : stbi_uc* data; -; 1435 : void* raw_data, * raw_coeff; -; 1436 : stbi_uc* linebuf; -; 1437 : short* coeff; // progressive only -; 1438 : int coeff_w, coeff_h; // number of 8x8 coefficient blocks -; 1439 : } img_comp[4]; -; 1440 : -; 1441 : stbi__uint32 code_buffer; // jpeg entropy-coded buffer -; 1442 : int code_bits; // number of valid bits -; 1443 : unsigned char marker; // marker seen while filling entropy buffer -; 1444 : int nomore; // flag if we saw a marker so must stop -; 1445 : -; 1446 : int progressive; -; 1447 : int spec_start; -; 1448 : int spec_end; -; 1449 : int succ_high; -; 1450 : int succ_low; -; 1451 : int eob_run; -; 1452 : int jfif; -; 1453 : int app14_color_transform; // Adobe APP14 tag -; 1454 : int rgb; -; 1455 : -; 1456 : int scan_n, order[4]; -; 1457 : int restart_interval, todo; -; 1458 : -; 1459 : // kernels -; 1460 : void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]); -; 1461 : void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); -; 1462 : stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); -; 1463 : } stbi__jpeg; -; 1464 : -; 1465 : static int stbi__build_huffman(stbi__huffman* h, int* count) -; 1466 : { -; 1467 : int i, j, k = 0; -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { -; 1471 : for (j = 0; j < count[i]; ++j) { -; 1472 : h->size[k++] = (stbi_uc)(i + 1); -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); -; 1474 : } -; 1475 : } -; 1476 : h->size[k] = 0; -; 1477 : -; 1478 : // compute actual symbols (from jpeg spec) -; 1479 : code = 0; -; 1480 : k = 0; -; 1481 : for (j = 1; j <= 16; ++j) { -; 1482 : // compute delta to add to code to compute symbol id -; 1483 : h->delta[j] = k - code; -; 1484 : if (h->size[k] == j) { -; 1485 : while (h->size[k] == j) -; 1486 : h->code[k++] = (stbi__uint16)(code++); -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); -; 1488 : } -; 1489 : // compute largest code + 1 for this size, preshifted as needed later -; 1490 : h->maxcode[j] = code << (16 - j); -; 1491 : code <<= 1; -; 1492 : } -; 1493 : h->maxcode[j] = 0xffffffff; -; 1494 : -; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated -; 1496 : memset(h->fast, 255, 1 << FAST_BITS); -; 1497 : for (i = 0; i < k; ++i) { -; 1498 : int s = h->size[i]; -; 1499 : if (s <= FAST_BITS) { -; 1500 : int c = h->code[i] << (FAST_BITS - s); -; 1501 : int m = 1 << (FAST_BITS - s); -; 1502 : for (j = 0; j < m; ++j) { -; 1503 : h->fast[c + j] = (stbi_uc)i; -; 1504 : } -; 1505 : } -; 1506 : } -; 1507 : return 1; -; 1508 : } -; 1509 : -; 1510 : // build a table that decodes both magnitude and value of small ACs in -; 1511 : // one go. -; 1512 : static void stbi__build_fast_ac(stbi__int16* fast_ac, stbi__huffman* h) -; 1513 : { -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { -; 1516 : stbi_uc fast = h->fast[i]; -; 1517 : fast_ac[i] = 0; -; 1518 : if (fast < 255) { -; 1519 : int rs = h->values[fast]; -; 1520 : int run = (rs >> 4) & 15; -; 1521 : int magbits = rs & 15; -; 1522 : int len = h->size[fast]; -; 1523 : -; 1524 : if (magbits && len + magbits <= FAST_BITS) { -; 1525 : // magnitude code followed by receive_extend code -; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); -; 1527 : int m = 1 << (magbits - 1); -; 1528 : if (k < m) k += (~0U << magbits) + 1; -; 1529 : // if the result is small enough, we can fit it in fast_ac table -; 1530 : if (k >= -128 && k <= 127) -; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); -; 1532 : } -; 1533 : } -; 1534 : } -; 1535 : } -; 1536 : -; 1537 : static void stbi__grow_buffer_unsafe(stbi__jpeg* j) -; 1538 : { -; 1539 : do { -; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); -; 1541 : if (b == 0xff) { -; 1542 : int c = stbi__get8(j->s); -; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes -; 1544 : if (c != 0) { -; 1545 : j->marker = (unsigned char)c; -; 1546 : j->nomore = 1; -; 1547 : return; -; 1548 : } -; 1549 : } -; 1550 : j->code_buffer |= b << (24 - j->code_bits); -; 1551 : j->code_bits += 8; -; 1552 : } while (j->code_bits <= 24); -; 1553 : } -; 1554 : -; 1555 : // (1 << n) - 1 -; 1556 : static const stbi__uint32 stbi__bmask[17] = { 0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535 }; -; 1557 : -; 1558 : // decode a jpeg huffman value from the bitstream -; 1559 : stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg* j, stbi__huffman* h) -; 1560 : { -; 1561 : unsigned int temp; -; 1562 : int c, k; -; 1563 : -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1569 : k = h->fast[c]; -; 1570 : if (k < 255) { -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; -; 1575 : j->code_bits -= s; -; 1576 : return h->values[k]; -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; -; 1586 : for (k = FAST_BITS + 1; ; ++k) -; 1587 : if (temp < h->maxcode[k]) -; 1588 : break; -; 1589 : if (k == 17) { -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; -; 1608 : } -; 1609 : -; 1610 : // bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) -; 1623 : k = stbi_lrot(j->code_buffer, n); -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); -; 1628 : } -; 1629 : -; 1630 : // get some unsigned bits -; 1631 : stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg* j, int n) -; 1632 : { -; 1633 : unsigned int k; -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1636 : k = stbi_lrot(j->code_buffer, n); -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; -; 1640 : return k; -; 1641 : } -; 1642 : -; 1643 : stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg* j) -; 1644 : { -; 1645 : unsigned int k; -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1648 : k = j->code_buffer; -; 1649 : j->code_buffer <<= 1; -; 1650 : --j->code_bits; -; 1651 : return k & 0x80000000; -; 1652 : } -; 1653 : -; 1654 : // given a value that's at position X in the zigzag stream, -; 1655 : // where does it appear in the 8x8 matrix coded as row-major? -; 1656 : static const stbi_uc stbi__jpeg_dezigzag[64 + 15] = -; 1657 : { -; 1658 : 0, 1, 8, 16, 9, 2, 3, 10, -; 1659 : 17, 24, 32, 25, 18, 11, 4, 5, -; 1660 : 12, 19, 26, 33, 40, 48, 41, 34, -; 1661 : 27, 20, 13, 6, 7, 14, 21, 28, -; 1662 : 35, 42, 49, 56, 57, 50, 43, 36, -; 1663 : 29, 22, 15, 23, 30, 37, 44, 51, -; 1664 : 58, 59, 52, 45, 38, 31, 39, 46, -; 1665 : 53, 60, 61, 54, 47, 55, 62, 63, -; 1666 : // let corrupt input sample past end -; 1667 : 63, 63, 63, 63, 63, 63, 63, 63, -; 1668 : 63, 63, 63, 63, 63, 63, 63 -; 1669 : }; -; 1670 : -; 1671 : // decode one 64-entry block-- -; 1672 : static int stbi__jpeg_decode_block(stbi__jpeg* j, short data[64], stbi__huffman* hdc, stbi__huffman* hac, stbi__int16* fac, int b, stbi__uint16* dequant) -; 1673 : { -; 1674 : int diff, dc, k; -; 1675 : int t; -; 1676 : -; 1677 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1678 : t = stbi__jpeg_huff_decode(j, hdc); -; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1680 : -; 1681 : // 0 all the ac values now so we can do it 32-bits at a time -; 1682 : memset(data, 0, 64 * sizeof(data[0])); -; 1683 : -; 1684 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1686 : dc = j->img_comp[b].dc_pred + diff; -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1689 : data[0] = (short)(dc * dequant[0]); -; 1690 : -; 1691 : // decode AC components, see JPEG spec -; 1692 : k = 1; -; 1693 : do { -; 1694 : unsigned int zig; -; 1695 : int c, r, s; -; 1696 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1697 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1698 : r = fac[c]; -; 1699 : if (r) { // fast-AC path -; 1700 : k += (r >> 4) & 15; // run -; 1701 : s = r & 15; // combined length -; 1702 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1703 : j->code_buffer <<= s; -; 1704 : j->code_bits -= s; -; 1705 : // decode into unzigzag'd location -; 1706 : zig = stbi__jpeg_dezigzag[k++]; -; 1707 : data[zig] = (short)((r >> 8) * dequant[zig]); -; 1708 : } -; 1709 : else { -; 1710 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1711 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1712 : s = rs & 15; -; 1713 : r = rs >> 4; -; 1714 : if (s == 0) { -; 1715 : if (rs != 0xf0) break; // end block -; 1716 : k += 16; -; 1717 : } -; 1718 : else { -; 1719 : k += r; -; 1720 : // decode into unzigzag'd location -; 1721 : zig = stbi__jpeg_dezigzag[k++]; -; 1722 : data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]); -; 1723 : } -; 1724 : } -; 1725 : } while (k < 64); -; 1726 : return 1; -; 1727 : } -; 1728 : -; 1729 : static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg* j, short data[64], stbi__huffman* hdc, int b) -; 1730 : { -; 1731 : int diff, dc; -; 1732 : int t; -; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1734 : -; 1735 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1736 : -; 1737 : if (j->succ_high == 0) { -; 1738 : // first scan for DC coefficient, must be first -; 1739 : memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now -; 1740 : t = stbi__jpeg_huff_decode(j, hdc); -; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1742 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1745 : dc = j->img_comp[b].dc_pred + diff; -; 1746 : j->img_comp[b].dc_pred = dc; -; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1748 : data[0] = (short)(dc * (1 << j->succ_low)); -; 1749 : } -; 1750 : else { -; 1751 : // refinement scan for DC coefficient -; 1752 : if (stbi__jpeg_get_bit(j)) -; 1753 : data[0] += (short)(1 << j->succ_low); -; 1754 : } -; 1755 : return 1; -; 1756 : } -; 1757 : -; 1758 : // @OPTIMIZE: store non-zigzagged during the decode passes, -; 1759 : // and only de-zigzag when dequantizing -; 1760 : static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg* j, short data[64], stbi__huffman* hac, stbi__int16* fac) -; 1761 : { -; 1762 : int k; -; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1764 : -; 1765 : if (j->succ_high == 0) { -; 1766 : int shift = j->succ_low; -; 1767 : -; 1768 : if (j->eob_run) { -; 1769 : --j->eob_run; -; 1770 : return 1; -; 1771 : } -; 1772 : -; 1773 : k = j->spec_start; -; 1774 : do { -; 1775 : unsigned int zig; -; 1776 : int c, r, s; -; 1777 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1778 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1779 : r = fac[c]; -; 1780 : if (r) { // fast-AC path -; 1781 : k += (r >> 4) & 15; // run -; 1782 : s = r & 15; // combined length -; 1783 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1784 : j->code_buffer <<= s; -; 1785 : j->code_bits -= s; -; 1786 : zig = stbi__jpeg_dezigzag[k++]; -; 1787 : data[zig] = (short)((r >> 8) * (1 << shift)); -; 1788 : } -; 1789 : else { -; 1790 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1791 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1792 : s = rs & 15; -; 1793 : r = rs >> 4; -; 1794 : if (s == 0) { -; 1795 : if (r < 15) { -; 1796 : j->eob_run = (1 << r); -; 1797 : if (r) -; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1799 : --j->eob_run; -; 1800 : break; -; 1801 : } -; 1802 : k += 16; -; 1803 : } -; 1804 : else { -; 1805 : k += r; -; 1806 : zig = stbi__jpeg_dezigzag[k++]; -; 1807 : data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift)); -; 1808 : } -; 1809 : } -; 1810 : } while (k <= j->spec_end); -; 1811 : } -; 1812 : else { -; 1813 : // refinement scan for these AC coefficients -; 1814 : -; 1815 : short bit = (short)(1 << j->succ_low); -; 1816 : -; 1817 : if (j->eob_run) { -; 1818 : --j->eob_run; -; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { -; 1820 : short* p = &data[stbi__jpeg_dezigzag[k]]; -; 1821 : if (*p != 0) -; 1822 : if (stbi__jpeg_get_bit(j)) -; 1823 : if ((*p & bit) == 0) { -; 1824 : if (*p > 0) -; 1825 : *p += bit; -; 1826 : else -; 1827 : *p -= bit; -; 1828 : } -; 1829 : } -; 1830 : } -; 1831 : else { -; 1832 : k = j->spec_start; -; 1833 : do { -; 1834 : int r, s; -; 1835 : int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh -; 1836 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1837 : s = rs & 15; -; 1838 : r = rs >> 4; -; 1839 : if (s == 0) { -; 1840 : if (r < 15) { -; 1841 : j->eob_run = (1 << r) - 1; -; 1842 : if (r) -; 1843 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1844 : r = 64; // force end of block -; 1845 : } -; 1846 : else { -; 1847 : // r=15 s=0 should write 16 0s, so we just do -; 1848 : // a run of 15 0s and then write s (which is 0), -; 1849 : // so we don't have to do anything special here -; 1850 : } -; 1851 : } -; 1852 : else { -; 1853 : if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1854 : // sign bit -; 1855 : if (stbi__jpeg_get_bit(j)) -; 1856 : s = bit; -; 1857 : else -; 1858 : s = -bit; -; 1859 : } -; 1860 : -; 1861 : // advance by r -; 1862 : while (k <= j->spec_end) { -; 1863 : short* p = &data[stbi__jpeg_dezigzag[k++]]; -; 1864 : if (*p != 0) { -; 1865 : if (stbi__jpeg_get_bit(j)) -; 1866 : if ((*p & bit) == 0) { -; 1867 : if (*p > 0) -; 1868 : *p += bit; -; 1869 : else -; 1870 : *p -= bit; -; 1871 : } -; 1872 : } -; 1873 : else { -; 1874 : if (r == 0) { -; 1875 : *p = (short)s; -; 1876 : break; -; 1877 : } -; 1878 : --r; -; 1879 : } -; 1880 : } -; 1881 : } while (k <= j->spec_end); -; 1882 : } -; 1883 : } -; 1884 : return 1; -; 1885 : } -; 1886 : -; 1887 : // take a -128..127 value and stbi__clamp it and convert to 0..255 -; 1888 : stbi_inline static stbi_uc stbi__clamp(int x) -; 1889 : { -; 1890 : // trick to use a single test to catch both cases -; 1891 : if ((unsigned int)x > 255) { -; 1892 : if (x < 0) return 0; -; 1893 : if (x > 255) return 255; -; 1894 : } -; 1895 : return (stbi_uc)x; -; 1896 : } -; 1897 : -; 1898 : #define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -; 1899 : #define stbi__fsh(x) ((x) * 4096) -; 1900 : -; 1901 : // derived from jidctint -- DCT_ISLOW -; 1902 : #define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ -; 1903 : int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ -; 1904 : p2 = s2; \ -; 1905 : p3 = s6; \ -; 1906 : p1 = (p2+p3) * stbi__f2f(0.5411961f); \ -; 1907 : t2 = p1 + p3*stbi__f2f(-1.847759065f); \ -; 1908 : t3 = p1 + p2*stbi__f2f( 0.765366865f); \ -; 1909 : p2 = s0; \ -; 1910 : p3 = s4; \ -; 1911 : t0 = stbi__fsh(p2+p3); \ -; 1912 : t1 = stbi__fsh(p2-p3); \ -; 1913 : x0 = t0+t3; \ -; 1914 : x3 = t0-t3; \ -; 1915 : x1 = t1+t2; \ -; 1916 : x2 = t1-t2; \ -; 1917 : t0 = s7; \ -; 1918 : t1 = s5; \ -; 1919 : t2 = s3; \ -; 1920 : t3 = s1; \ -; 1921 : p3 = t0+t2; \ -; 1922 : p4 = t1+t3; \ -; 1923 : p1 = t0+t3; \ -; 1924 : p2 = t1+t2; \ -; 1925 : p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ -; 1926 : t0 = t0*stbi__f2f( 0.298631336f); \ -; 1927 : t1 = t1*stbi__f2f( 2.053119869f); \ -; 1928 : t2 = t2*stbi__f2f( 3.072711026f); \ -; 1929 : t3 = t3*stbi__f2f( 1.501321110f); \ -; 1930 : p1 = p5 + p1*stbi__f2f(-0.899976223f); \ -; 1931 : p2 = p5 + p2*stbi__f2f(-2.562915447f); \ -; 1932 : p3 = p3*stbi__f2f(-1.961570560f); \ -; 1933 : p4 = p4*stbi__f2f(-0.390180644f); \ -; 1934 : t3 += p1+p4; \ -; 1935 : t2 += p2+p3; \ -; 1936 : t1 += p2+p4; \ -; 1937 : t0 += p1+p3; -; 1938 : -; 1939 : static void stbi__idct_block(stbi_uc* out, int out_stride, short data[64]) -; 1940 : { -; 1941 : int i, val[64], * v = val; -; 1942 : stbi_uc* o; -; 1943 : short* d = data; -; 1944 : -; 1945 : // columns -; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { -; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing -; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 -; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { -; 1950 : // no shortcut 0 seconds -; 1951 : // (1|2|3|4|5|6|7)==0 0 seconds -; 1952 : // all separate -0.047 seconds -; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds -; 1954 : int dcterm = d[0] * 4; -; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; -; 1956 : } -; 1957 : else { -; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) -; 1959 : // constants scaled things up by 1<<12; let's bring them back -; 1960 : // down, but keep 2 extra bits of precision -; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; -; 1962 : v[0] = (x0 + t3) >> 10; -; 1963 : v[56] = (x0 - t3) >> 10; -; 1964 : v[8] = (x1 + t2) >> 10; -; 1965 : v[48] = (x1 - t2) >> 10; -; 1966 : v[16] = (x2 + t1) >> 10; -; 1967 : v[40] = (x2 - t1) >> 10; -; 1968 : v[24] = (x3 + t0) >> 10; -; 1969 : v[32] = (x3 - t0) >> 10; -; 1970 : } -; 1971 : } -; 1972 : -; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { -; 1974 : // no fast case since the first 1D IDCT spread components out -; 1975 : STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]) -; 1976 : // constants scaled things up by 1<<12, plus we had 1<<2 from first -; 1977 : // loop, plus horizontal and vertical each scale by sqrt(8) so together -; 1978 : // we've got an extra 1<<3, so 1<<17 total we need to remove. -; 1979 : // so we want to round that, which means adding 0.5 * 1<<17, -; 1980 : // aka 65536. Also, we'll end up with -128 to 127 that we want -; 1981 : // to encode as 0..255 by adding 128, so we'll add that before the shift -; 1982 : x0 += 65536 + (128 << 17); -; 1983 : x1 += 65536 + (128 << 17); -; 1984 : x2 += 65536 + (128 << 17); -; 1985 : x3 += 65536 + (128 << 17); -; 1986 : // tried computing the shifts into temps, or'ing the temps to see -; 1987 : // if any were out of range, but that was slower -; 1988 : o[0] = stbi__clamp((x0 + t3) >> 17); -; 1989 : o[7] = stbi__clamp((x0 - t3) >> 17); -; 1990 : o[1] = stbi__clamp((x1 + t2) >> 17); -; 1991 : o[6] = stbi__clamp((x1 - t2) >> 17); -; 1992 : o[2] = stbi__clamp((x2 + t1) >> 17); -; 1993 : o[5] = stbi__clamp((x2 - t1) >> 17); -; 1994 : o[3] = stbi__clamp((x3 + t0) >> 17); -; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); -; 1996 : } -; 1997 : } -; 1998 : -; 1999 : #ifdef STBI_SSE2 -; 2000 : // sse2 integer IDCT. not the fastest possible implementation but it -; 2001 : // produces bit-identical results to the generic C version so it's -; 2002 : // fully "transparent". -; 2003 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2004 : { -; 2005 : // This is constructed to match our regular (generic) integer IDCT exactly. -; 2006 : __m128i row0, row1, row2, row3, row4, row5, row6, row7; -; 2007 : __m128i tmp; -; 2008 : -; 2009 : // dot product constant: even elems=x, odd elems=y -; 2010 : #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) -; 2011 : -; 2012 : // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) -; 2013 : // out(1) = c1[even]*x + c1[odd]*y -; 2014 : #define dct_rot(out0,out1, x,y,c0,c1) \ -; 2015 : __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ -; 2016 : __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ -; 2017 : __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ -; 2018 : __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ -; 2019 : __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ -; 2020 : __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) -; 2021 : -; 2022 : // out = in << 12 (in 16-bit, out 32-bit) -; 2023 : #define dct_widen(out, in) \ -; 2024 : __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ -; 2025 : __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) -; 2026 : -; 2027 : // wide add -; 2028 : #define dct_wadd(out, a, b) \ -; 2029 : __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ -; 2030 : __m128i out##_h = _mm_add_epi32(a##_h, b##_h) -; 2031 : -; 2032 : // wide sub -; 2033 : #define dct_wsub(out, a, b) \ -; 2034 : __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ -; 2035 : __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) -; 2036 : -; 2037 : // butterfly a/b, add bias, then shift by "s" and pack -; 2038 : #define dct_bfly32o(out0, out1, a,b,bias,s) \ -; 2039 : { \ -; 2040 : __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ -; 2041 : __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ -; 2042 : dct_wadd(sum, abiased, b); \ -; 2043 : dct_wsub(dif, abiased, b); \ -; 2044 : out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ -; 2045 : out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ -; 2046 : } -; 2047 : -; 2048 : // 8-bit interleave step (for transposes) -; 2049 : #define dct_interleave8(a, b) \ -; 2050 : tmp = a; \ -; 2051 : a = _mm_unpacklo_epi8(a, b); \ -; 2052 : b = _mm_unpackhi_epi8(tmp, b) -; 2053 : -; 2054 : // 16-bit interleave step (for transposes) -; 2055 : #define dct_interleave16(a, b) \ -; 2056 : tmp = a; \ -; 2057 : a = _mm_unpacklo_epi16(a, b); \ -; 2058 : b = _mm_unpackhi_epi16(tmp, b) -; 2059 : -; 2060 : #define dct_pass(bias,shift) \ -; 2061 : { \ -; 2062 : /* even part */ \ -; 2063 : dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ -; 2064 : __m128i sum04 = _mm_add_epi16(row0, row4); \ -; 2065 : __m128i dif04 = _mm_sub_epi16(row0, row4); \ -; 2066 : dct_widen(t0e, sum04); \ -; 2067 : dct_widen(t1e, dif04); \ -; 2068 : dct_wadd(x0, t0e, t3e); \ -; 2069 : dct_wsub(x3, t0e, t3e); \ -; 2070 : dct_wadd(x1, t1e, t2e); \ -; 2071 : dct_wsub(x2, t1e, t2e); \ -; 2072 : /* odd part */ \ -; 2073 : dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ -; 2074 : dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ -; 2075 : __m128i sum17 = _mm_add_epi16(row1, row7); \ -; 2076 : __m128i sum35 = _mm_add_epi16(row3, row5); \ -; 2077 : dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ -; 2078 : dct_wadd(x4, y0o, y4o); \ -; 2079 : dct_wadd(x5, y1o, y5o); \ -; 2080 : dct_wadd(x6, y2o, y5o); \ -; 2081 : dct_wadd(x7, y3o, y4o); \ -; 2082 : dct_bfly32o(row0,row7, x0,x7,bias,shift); \ -; 2083 : dct_bfly32o(row1,row6, x1,x6,bias,shift); \ -; 2084 : dct_bfly32o(row2,row5, x2,x5,bias,shift); \ -; 2085 : dct_bfly32o(row3,row4, x3,x4,bias,shift); \ -; 2086 : } -; 2087 : -; 2088 : __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); -; 2089 : __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f)); -; 2090 : __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); -; 2091 : __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); -; 2092 : __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f)); -; 2093 : __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f)); -; 2094 : __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f)); -; 2095 : __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f)); -; 2096 : -; 2097 : // rounding biases in column/row passes, see stbi__idct_block for explanation. -; 2098 : __m128i bias_0 = _mm_set1_epi32(512); -; 2099 : __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17)); -; 2100 : -; 2101 : // load -; 2102 : row0 = _mm_load_si128((const __m128i*) (data + 0 * 8)); -; 2103 : row1 = _mm_load_si128((const __m128i*) (data + 1 * 8)); -; 2104 : row2 = _mm_load_si128((const __m128i*) (data + 2 * 8)); -; 2105 : row3 = _mm_load_si128((const __m128i*) (data + 3 * 8)); -; 2106 : row4 = _mm_load_si128((const __m128i*) (data + 4 * 8)); -; 2107 : row5 = _mm_load_si128((const __m128i*) (data + 5 * 8)); -; 2108 : row6 = _mm_load_si128((const __m128i*) (data + 6 * 8)); -; 2109 : row7 = _mm_load_si128((const __m128i*) (data + 7 * 8)); -; 2110 : -; 2111 : // column pass -; 2112 : dct_pass(bias_0, 10); -; 2113 : -; 2114 : { -; 2115 : // 16bit 8x8 transpose pass 1 -; 2116 : dct_interleave16(row0, row4); -; 2117 : dct_interleave16(row1, row5); -; 2118 : dct_interleave16(row2, row6); -; 2119 : dct_interleave16(row3, row7); -; 2120 : -; 2121 : // transpose pass 2 -; 2122 : dct_interleave16(row0, row2); -; 2123 : dct_interleave16(row1, row3); -; 2124 : dct_interleave16(row4, row6); -; 2125 : dct_interleave16(row5, row7); -; 2126 : -; 2127 : // transpose pass 3 -; 2128 : dct_interleave16(row0, row1); -; 2129 : dct_interleave16(row2, row3); -; 2130 : dct_interleave16(row4, row5); -; 2131 : dct_interleave16(row6, row7); -; 2132 : } -; 2133 : -; 2134 : // row pass -; 2135 : dct_pass(bias_1, 17); -; 2136 : -; 2137 : { -; 2138 : // pack -; 2139 : __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 -; 2140 : __m128i p1 = _mm_packus_epi16(row2, row3); -; 2141 : __m128i p2 = _mm_packus_epi16(row4, row5); -; 2142 : __m128i p3 = _mm_packus_epi16(row6, row7); -; 2143 : -; 2144 : // 8bit 8x8 transpose pass 1 -; 2145 : dct_interleave8(p0, p2); // a0e0a1e1... -; 2146 : dct_interleave8(p1, p3); // c0g0c1g1... -; 2147 : -; 2148 : // transpose pass 2 -; 2149 : dct_interleave8(p0, p1); // a0c0e0g0... -; 2150 : dct_interleave8(p2, p3); // b0d0f0h0... -; 2151 : -; 2152 : // transpose pass 3 -; 2153 : dct_interleave8(p0, p2); // a0b0c0d0... -; 2154 : dct_interleave8(p1, p3); // a4b4c4d4... -; 2155 : -; 2156 : // store -; 2157 : _mm_storel_epi64((__m128i*) out, p0); out += out_stride; -; 2158 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; -; 2159 : _mm_storel_epi64((__m128i*) out, p2); out += out_stride; -; 2160 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; -; 2161 : _mm_storel_epi64((__m128i*) out, p1); out += out_stride; -; 2162 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; -; 2163 : _mm_storel_epi64((__m128i*) out, p3); out += out_stride; -; 2164 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e)); -; 2165 : } -; 2166 : -; 2167 : #undef dct_const -; 2168 : #undef dct_rot -; 2169 : #undef dct_widen -; 2170 : #undef dct_wadd -; 2171 : #undef dct_wsub -; 2172 : #undef dct_bfly32o -; 2173 : #undef dct_interleave8 -; 2174 : #undef dct_interleave16 -; 2175 : #undef dct_pass -; 2176 : } -; 2177 : -; 2178 : #endif // STBI_SSE2 -; 2179 : -; 2180 : #ifdef STBI_NEON -; 2181 : -; 2182 : // NEON integer IDCT. should produce bit-identical -; 2183 : // results to the generic C version. -; 2184 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2185 : { -; 2186 : int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; -; 2187 : -; 2188 : int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); -; 2189 : int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); -; 2190 : int16x4_t rot0_2 = vdup_n_s16(stbi__f2f(0.765366865f)); -; 2191 : int16x4_t rot1_0 = vdup_n_s16(stbi__f2f(1.175875602f)); -; 2192 : int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); -; 2193 : int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); -; 2194 : int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); -; 2195 : int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); -; 2196 : int16x4_t rot3_0 = vdup_n_s16(stbi__f2f(0.298631336f)); -; 2197 : int16x4_t rot3_1 = vdup_n_s16(stbi__f2f(2.053119869f)); -; 2198 : int16x4_t rot3_2 = vdup_n_s16(stbi__f2f(3.072711026f)); -; 2199 : int16x4_t rot3_3 = vdup_n_s16(stbi__f2f(1.501321110f)); -; 2200 : -; 2201 : #define dct_long_mul(out, inq, coeff) \ -; 2202 : int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ -; 2203 : int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) -; 2204 : -; 2205 : #define dct_long_mac(out, acc, inq, coeff) \ -; 2206 : int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ -; 2207 : int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) -; 2208 : -; 2209 : #define dct_widen(out, inq) \ -; 2210 : int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ -; 2211 : int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) -; 2212 : -; 2213 : // wide add -; 2214 : #define dct_wadd(out, a, b) \ -; 2215 : int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ -; 2216 : int32x4_t out##_h = vaddq_s32(a##_h, b##_h) -; 2217 : -; 2218 : // wide sub -; 2219 : #define dct_wsub(out, a, b) \ -; 2220 : int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ -; 2221 : int32x4_t out##_h = vsubq_s32(a##_h, b##_h) -; 2222 : -; 2223 : // butterfly a/b, then shift using "shiftop" by "s" and pack -; 2224 : #define dct_bfly32o(out0,out1, a,b,shiftop,s) \ -; 2225 : { \ -; 2226 : dct_wadd(sum, a, b); \ -; 2227 : dct_wsub(dif, a, b); \ -; 2228 : out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ -; 2229 : out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ -; 2230 : } -; 2231 : -; 2232 : #define dct_pass(shiftop, shift) \ -; 2233 : { \ -; 2234 : /* even part */ \ -; 2235 : int16x8_t sum26 = vaddq_s16(row2, row6); \ -; 2236 : dct_long_mul(p1e, sum26, rot0_0); \ -; 2237 : dct_long_mac(t2e, p1e, row6, rot0_1); \ -; 2238 : dct_long_mac(t3e, p1e, row2, rot0_2); \ -; 2239 : int16x8_t sum04 = vaddq_s16(row0, row4); \ -; 2240 : int16x8_t dif04 = vsubq_s16(row0, row4); \ -; 2241 : dct_widen(t0e, sum04); \ -; 2242 : dct_widen(t1e, dif04); \ -; 2243 : dct_wadd(x0, t0e, t3e); \ -; 2244 : dct_wsub(x3, t0e, t3e); \ -; 2245 : dct_wadd(x1, t1e, t2e); \ -; 2246 : dct_wsub(x2, t1e, t2e); \ -; 2247 : /* odd part */ \ -; 2248 : int16x8_t sum15 = vaddq_s16(row1, row5); \ -; 2249 : int16x8_t sum17 = vaddq_s16(row1, row7); \ -; 2250 : int16x8_t sum35 = vaddq_s16(row3, row5); \ -; 2251 : int16x8_t sum37 = vaddq_s16(row3, row7); \ -; 2252 : int16x8_t sumodd = vaddq_s16(sum17, sum35); \ -; 2253 : dct_long_mul(p5o, sumodd, rot1_0); \ -; 2254 : dct_long_mac(p1o, p5o, sum17, rot1_1); \ -; 2255 : dct_long_mac(p2o, p5o, sum35, rot1_2); \ -; 2256 : dct_long_mul(p3o, sum37, rot2_0); \ -; 2257 : dct_long_mul(p4o, sum15, rot2_1); \ -; 2258 : dct_wadd(sump13o, p1o, p3o); \ -; 2259 : dct_wadd(sump24o, p2o, p4o); \ -; 2260 : dct_wadd(sump23o, p2o, p3o); \ -; 2261 : dct_wadd(sump14o, p1o, p4o); \ -; 2262 : dct_long_mac(x4, sump13o, row7, rot3_0); \ -; 2263 : dct_long_mac(x5, sump24o, row5, rot3_1); \ -; 2264 : dct_long_mac(x6, sump23o, row3, rot3_2); \ -; 2265 : dct_long_mac(x7, sump14o, row1, rot3_3); \ -; 2266 : dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ -; 2267 : dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ -; 2268 : dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ -; 2269 : dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ -; 2270 : } -; 2271 : -; 2272 : // load -; 2273 : row0 = vld1q_s16(data + 0 * 8); -; 2274 : row1 = vld1q_s16(data + 1 * 8); -; 2275 : row2 = vld1q_s16(data + 2 * 8); -; 2276 : row3 = vld1q_s16(data + 3 * 8); -; 2277 : row4 = vld1q_s16(data + 4 * 8); -; 2278 : row5 = vld1q_s16(data + 5 * 8); -; 2279 : row6 = vld1q_s16(data + 6 * 8); -; 2280 : row7 = vld1q_s16(data + 7 * 8); -; 2281 : -; 2282 : // add DC bias -; 2283 : row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); -; 2284 : -; 2285 : // column pass -; 2286 : dct_pass(vrshrn_n_s32, 10); -; 2287 : -; 2288 : // 16bit 8x8 transpose -; 2289 : { -; 2290 : // these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -; 2291 : // whether compilers actually get this is another story, sadly. -; 2292 : #define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -; 2293 : #define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -; 2294 : #define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } -; 2295 : -; 2296 : // pass 1 -; 2297 : dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 -; 2298 : dct_trn16(row2, row3); -; 2299 : dct_trn16(row4, row5); -; 2300 : dct_trn16(row6, row7); -; 2301 : -; 2302 : // pass 2 -; 2303 : dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 -; 2304 : dct_trn32(row1, row3); -; 2305 : dct_trn32(row4, row6); -; 2306 : dct_trn32(row5, row7); -; 2307 : -; 2308 : // pass 3 -; 2309 : dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 -; 2310 : dct_trn64(row1, row5); -; 2311 : dct_trn64(row2, row6); -; 2312 : dct_trn64(row3, row7); -; 2313 : -; 2314 : #undef dct_trn16 -; 2315 : #undef dct_trn32 -; 2316 : #undef dct_trn64 -; 2317 : } -; 2318 : -; 2319 : // row pass -; 2320 : // vrshrn_n_s32 only supports shifts up to 16, we need -; 2321 : // 17. so do a non-rounding shift of 16 first then follow -; 2322 : // up with a rounding shift by 1. -; 2323 : dct_pass(vshrn_n_s32, 16); -; 2324 : -; 2325 : { -; 2326 : // pack and round -; 2327 : uint8x8_t p0 = vqrshrun_n_s16(row0, 1); -; 2328 : uint8x8_t p1 = vqrshrun_n_s16(row1, 1); -; 2329 : uint8x8_t p2 = vqrshrun_n_s16(row2, 1); -; 2330 : uint8x8_t p3 = vqrshrun_n_s16(row3, 1); -; 2331 : uint8x8_t p4 = vqrshrun_n_s16(row4, 1); -; 2332 : uint8x8_t p5 = vqrshrun_n_s16(row5, 1); -; 2333 : uint8x8_t p6 = vqrshrun_n_s16(row6, 1); -; 2334 : uint8x8_t p7 = vqrshrun_n_s16(row7, 1); -; 2335 : -; 2336 : // again, these can translate into one instruction, but often don't. -; 2337 : #define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -; 2338 : #define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -; 2339 : #define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } -; 2340 : -; 2341 : // sadly can't use interleaved stores here since we only write -; 2342 : // 8 bytes to each scan line! -; 2343 : -; 2344 : // 8x8 8-bit transpose pass 1 -; 2345 : dct_trn8_8(p0, p1); -; 2346 : dct_trn8_8(p2, p3); -; 2347 : dct_trn8_8(p4, p5); -; 2348 : dct_trn8_8(p6, p7); -; 2349 : -; 2350 : // pass 2 -; 2351 : dct_trn8_16(p0, p2); -; 2352 : dct_trn8_16(p1, p3); -; 2353 : dct_trn8_16(p4, p6); -; 2354 : dct_trn8_16(p5, p7); -; 2355 : -; 2356 : // pass 3 -; 2357 : dct_trn8_32(p0, p4); -; 2358 : dct_trn8_32(p1, p5); -; 2359 : dct_trn8_32(p2, p6); -; 2360 : dct_trn8_32(p3, p7); -; 2361 : -; 2362 : // store -; 2363 : vst1_u8(out, p0); out += out_stride; -; 2364 : vst1_u8(out, p1); out += out_stride; -; 2365 : vst1_u8(out, p2); out += out_stride; -; 2366 : vst1_u8(out, p3); out += out_stride; -; 2367 : vst1_u8(out, p4); out += out_stride; -; 2368 : vst1_u8(out, p5); out += out_stride; -; 2369 : vst1_u8(out, p6); out += out_stride; -; 2370 : vst1_u8(out, p7); -; 2371 : -; 2372 : #undef dct_trn8_8 -; 2373 : #undef dct_trn8_16 -; 2374 : #undef dct_trn8_32 -; 2375 : } -; 2376 : -; 2377 : #undef dct_long_mul -; 2378 : #undef dct_long_mac -; 2379 : #undef dct_widen -; 2380 : #undef dct_wadd -; 2381 : #undef dct_wsub -; 2382 : #undef dct_bfly32o -; 2383 : #undef dct_pass -; 2384 : } -; 2385 : -; 2386 : #endif // STBI_NEON -; 2387 : -; 2388 : #define STBI__MARKER_none 0xff -; 2389 : // if there's a pending marker from the entropy stream, return that -; 2390 : // otherwise, fetch from the stream and get a marker. if there's no -; 2391 : // marker, return 0xff, which is never a valid marker value -; 2392 : static stbi_uc stbi__get_marker(stbi__jpeg* j) -; 2393 : { -; 2394 : stbi_uc x; -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } -; 2396 : x = stbi__get8(j->s); -; 2397 : if (x != 0xff) return STBI__MARKER_none; -; 2398 : while (x == 0xff) -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes -; 2400 : return x; -; 2401 : } -; 2402 : -; 2403 : // in each scan, we'll have scan_n components, and the order -; 2404 : // of the components is specified by order[] -; 2405 : #define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) -; 2406 : -; 2407 : // after a restart interval, stbi__jpeg_reset the entropy decoder and -; 2408 : // the dc prediction -; 2409 : static void stbi__jpeg_reset(stbi__jpeg* j) -; 2410 : { -; 2411 : j->code_bits = 0; -; 2412 : j->code_buffer = 0; -; 2413 : j->nomore = 0; -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; -; 2417 : j->eob_run = 0; -; 2418 : // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, -; 2419 : // since we don't even allow 1<<30 pixels -; 2420 : } -; 2421 : -; 2422 : static int stbi__parse_entropy_coded_data(stbi__jpeg* z) -; 2423 : { -; 2424 : stbi__jpeg_reset(z); -; 2425 : if (!z->progressive) { -; 2426 : if (z->scan_n == 1) { -; 2427 : int i, j; -; 2428 : STBI_SIMD_ALIGN(short, data[64]); -; 2429 : int n = z->order[0]; -; 2430 : // non-interleaved data, we just need to process one block at a time, -; 2431 : // in trivial scanline order -; 2432 : // number of blocks to do just depends on how many actual "pixels" this -; 2433 : // component has, independent of interleaved MCU blocking and such -; 2434 : int w = (z->img_comp[n].x + 7) >> 3; -; 2435 : int h = (z->img_comp[n].y + 7) >> 3; -; 2436 : for (j = 0; j < h; ++j) { -; 2437 : for (i = 0; i < w; ++i) { -; 2438 : int ha = z->img_comp[n].ha; -; 2439 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2440 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2441 : // every data block is an MCU, so countdown the restart interval -; 2442 : if (--z->todo <= 0) { -; 2443 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2444 : // if it's NOT a restart, then just bail, so we get corrupt data -; 2445 : // rather than no data -; 2446 : if (!STBI__RESTART(z->marker)) return 1; -; 2447 : stbi__jpeg_reset(z); -; 2448 : } -; 2449 : } -; 2450 : } -; 2451 : return 1; -; 2452 : } -; 2453 : else { // interleaved -; 2454 : int i, j, k, x, y; -; 2455 : STBI_SIMD_ALIGN(short, data[64]); -; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2458 : // scan an interleaved mcu... process scan_n components in order -; 2459 : for (k = 0; k < z->scan_n; ++k) { -; 2460 : int n = z->order[k]; -; 2461 : // scan out an mcu's worth of this component; that's just determined -; 2462 : // by the basic H and V specified for the component -; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2464 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2465 : int x2 = (i * z->img_comp[n].h + x) * 8; -; 2466 : int y2 = (j * z->img_comp[n].v + y) * 8; -; 2467 : int ha = z->img_comp[n].ha; -; 2468 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2469 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); -; 2470 : } -; 2471 : } -; 2472 : } -; 2473 : // after all interleaved components, that's an interleaved MCU, -; 2474 : // so now count down the restart interval -; 2475 : if (--z->todo <= 0) { -; 2476 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2477 : if (!STBI__RESTART(z->marker)) return 1; -; 2478 : stbi__jpeg_reset(z); -; 2479 : } -; 2480 : } -; 2481 : } -; 2482 : return 1; -; 2483 : } -; 2484 : } -; 2485 : else { -; 2486 : if (z->scan_n == 1) { -; 2487 : int i, j; -; 2488 : int n = z->order[0]; -; 2489 : // non-interleaved data, we just need to process one block at a time, -; 2490 : // in trivial scanline order -; 2491 : // number of blocks to do just depends on how many actual "pixels" this -; 2492 : // component has, independent of interleaved MCU blocking and such -; 2493 : int w = (z->img_comp[n].x + 7) >> 3; -; 2494 : int h = (z->img_comp[n].y + 7) >> 3; -; 2495 : for (j = 0; j < h; ++j) { -; 2496 : for (i = 0; i < w; ++i) { -; 2497 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2498 : if (z->spec_start == 0) { -; 2499 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2500 : return 0; -; 2501 : } -; 2502 : else { -; 2503 : int ha = z->img_comp[n].ha; -; 2504 : if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) -; 2505 : return 0; -; 2506 : } -; 2507 : // every data block is an MCU, so countdown the restart interval -; 2508 : if (--z->todo <= 0) { -; 2509 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2510 : if (!STBI__RESTART(z->marker)) return 1; -; 2511 : stbi__jpeg_reset(z); -; 2512 : } -; 2513 : } -; 2514 : } -; 2515 : return 1; -; 2516 : } -; 2517 : else { // interleaved -; 2518 : int i, j, k, x, y; -; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2521 : // scan an interleaved mcu... process scan_n components in order -; 2522 : for (k = 0; k < z->scan_n; ++k) { -; 2523 : int n = z->order[k]; -; 2524 : // scan out an mcu's worth of this component; that's just determined -; 2525 : // by the basic H and V specified for the component -; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2528 : int x2 = (i * z->img_comp[n].h + x); -; 2529 : int y2 = (j * z->img_comp[n].v + y); -; 2530 : short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); -; 2531 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2532 : return 0; -; 2533 : } -; 2534 : } -; 2535 : } -; 2536 : // after all interleaved components, that's an interleaved MCU, -; 2537 : // so now count down the restart interval -; 2538 : if (--z->todo <= 0) { -; 2539 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2540 : if (!STBI__RESTART(z->marker)) return 1; -; 2541 : stbi__jpeg_reset(z); -; 2542 : } -; 2543 : } -; 2544 : } -; 2545 : return 1; -; 2546 : } -; 2547 : } -; 2548 : } -; 2549 : -; 2550 : static void stbi__jpeg_dequantize(short* data, stbi__uint16* dequant) -; 2551 : { -; 2552 : int i; -; 2553 : for (i = 0; i < 64; ++i) -; 2554 : data[i] *= dequant[i]; -; 2555 : } -; 2556 : -; 2557 : static void stbi__jpeg_finish(stbi__jpeg* z) -; 2558 : { -; 2559 : if (z->progressive) { -; 2560 : // dequantize and idct the data -; 2561 : int i, j, n; -; 2562 : for (n = 0; n < z->s->img_n; ++n) { -; 2563 : int w = (z->img_comp[n].x + 7) >> 3; -; 2564 : int h = (z->img_comp[n].y + 7) >> 3; -; 2565 : for (j = 0; j < h; ++j) { -; 2566 : for (i = 0; i < w; ++i) { -; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2568 : stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); -; 2569 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2570 : } -; 2571 : } -; 2572 : } -; 2573 : } -; 2574 : } -; 2575 : -; 2576 : static int stbi__process_marker(stbi__jpeg* z, int m) -; 2577 : { -; 2578 : int L; -; 2579 : switch (m) { -; 2580 : case STBI__MARKER_none: // no marker found -; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); -; 2582 : -; 2583 : case 0xDD: // DRI - specify restart interval -; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); -; 2585 : z->restart_interval = stbi__get16be(z->s); -; 2586 : return 1; -; 2587 : -; 2588 : case 0xDB: // DQT - define quantization table -; 2589 : L = stbi__get16be(z->s) - 2; -; 2590 : while (L > 0) { -; 2591 : int q = stbi__get8(z->s); -; 2592 : int p = q >> 4, sixteen = (p != 0); -; 2593 : int t = q & 15, i; -; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); -; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); -; 2596 : -; 2597 : for (i = 0; i < 64; ++i) -; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); -; 2599 : L -= (sixteen ? 129 : 65); -; 2600 : } -; 2601 : return L == 0; -; 2602 : -; 2603 : case 0xC4: // DHT - define huffman table -; 2604 : L = stbi__get16be(z->s) - 2; -; 2605 : while (L > 0) { -; 2606 : stbi_uc* v; -; 2607 : int sizes[16], i, n = 0; -; 2608 : int q = stbi__get8(z->s); -; 2609 : int tc = q >> 4; -; 2610 : int th = q & 15; -; 2611 : if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG"); -; 2612 : for (i = 0; i < 16; ++i) { -; 2613 : sizes[i] = stbi__get8(z->s); -; 2614 : n += sizes[i]; -; 2615 : } -; 2616 : if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values! -; 2617 : L -= 17; -; 2618 : if (tc == 0) { -; 2619 : if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0; -; 2620 : v = z->huff_dc[th].values; -; 2621 : } -; 2622 : else { -; 2623 : if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0; -; 2624 : v = z->huff_ac[th].values; -; 2625 : } -; 2626 : for (i = 0; i < n; ++i) -; 2627 : v[i] = stbi__get8(z->s); -; 2628 : if (tc != 0) -; 2629 : stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); -; 2630 : L -= n; -; 2631 : } -; 2632 : return L == 0; -; 2633 : } -; 2634 : -; 2635 : // check for comment block or APP blocks -; 2636 : if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { -; 2637 : L = stbi__get16be(z->s); -; 2638 : if (L < 2) { -; 2639 : if (m == 0xFE) -; 2640 : return stbi__err("bad COM len", "Corrupt JPEG"); -; 2641 : else -; 2642 : return stbi__err("bad APP len", "Corrupt JPEG"); -; 2643 : } -; 2644 : L -= 2; -; 2645 : -; 2646 : if (m == 0xE0 && L >= 5) { // JFIF APP0 segment -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) -; 2652 : ok = 0; -; 2653 : L -= 5; -; 2654 : if (ok) -; 2655 : z->jfif = 1; -; 2656 : } -; 2657 : else if (m == 0xEE && L >= 12) { // Adobe APP14 segment -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) -; 2663 : ok = 0; -; 2664 : L -= 6; -; 2665 : if (ok) { -; 2666 : stbi__get8(z->s); // version -; 2667 : stbi__get16be(z->s); // flags0 -; 2668 : stbi__get16be(z->s); // flags1 -; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform -; 2670 : L -= 6; -; 2671 : } -; 2672 : } -; 2673 : -; 2674 : stbi__skip(z->s, L); -; 2675 : return 1; -; 2676 : } -; 2677 : -; 2678 : return stbi__err("unknown marker", "Corrupt JPEG"); -; 2679 : } -; 2680 : -; 2681 : // after we see SOS -; 2682 : static int stbi__process_scan_header(stbi__jpeg* z) -; 2683 : { -; 2684 : int i; -; 2685 : int Ls = stbi__get16be(z->s); -; 2686 : z->scan_n = stbi__get8(z->s); -; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); -; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); -; 2689 : for (i = 0; i < z->scan_n; ++i) { -; 2690 : int id = stbi__get8(z->s), which; -; 2691 : int q = stbi__get8(z->s); -; 2692 : for (which = 0; which < z->s->img_n; ++which) -; 2693 : if (z->img_comp[which].id == id) -; 2694 : break; -; 2695 : if (which == z->s->img_n) return 0; // no match -; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); -; 2698 : z->order[i] = which; -; 2699 : } -; 2700 : -; 2701 : { -; 2702 : int aa; -; 2703 : z->spec_start = stbi__get8(z->s); -; 2704 : z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 -; 2705 : aa = stbi__get8(z->s); -; 2706 : z->succ_high = (aa >> 4); -; 2707 : z->succ_low = (aa & 15); -; 2708 : if (z->progressive) { -; 2709 : if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) -; 2710 : return stbi__err("bad SOS", "Corrupt JPEG"); -; 2711 : } -; 2712 : else { -; 2713 : if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2714 : if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2715 : z->spec_end = 63; -; 2716 : } -; 2717 : } -; 2718 : -; 2719 : return 1; -; 2720 : } -; 2721 : -; 2722 : static int stbi__free_jpeg_components(stbi__jpeg* z, int ncomp, int why) -; 2723 : { -; 2724 : int i; -; 2725 : for (i = 0; i < ncomp; ++i) { -; 2726 : if (z->img_comp[i].raw_data) { -; 2727 : STBI_FREE(z->img_comp[i].raw_data); -; 2728 : z->img_comp[i].raw_data = NULL; -; 2729 : z->img_comp[i].data = NULL; -; 2730 : } -; 2731 : if (z->img_comp[i].raw_coeff) { -; 2732 : STBI_FREE(z->img_comp[i].raw_coeff); -; 2733 : z->img_comp[i].raw_coeff = 0; -; 2734 : z->img_comp[i].coeff = 0; -; 2735 : } -; 2736 : if (z->img_comp[i].linebuf) { -; 2737 : STBI_FREE(z->img_comp[i].linebuf); -; 2738 : z->img_comp[i].linebuf = NULL; -; 2739 : } -; 2740 : } -; 2741 : return why; -; 2742 : } -; 2743 : -; 2744 : static int stbi__process_frame_header(stbi__jpeg* z, int scan) -; 2745 : { -; 2746 : stbi__context* s = z->s; -; 2747 : int Lf, p, i, q, h_max = 1, v_max = 1, c; -; 2748 : Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG -; 2749 : p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline -; 2750 : s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG -; 2751 : s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires -; 2752 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2753 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2754 : c = stbi__get8(s); -; 2755 : if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG"); -; 2756 : s->img_n = c; -; 2757 : for (i = 0; i < c; ++i) { -; 2758 : z->img_comp[i].data = NULL; -; 2759 : z->img_comp[i].linebuf = NULL; -; 2760 : } -; 2761 : -; 2762 : if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG"); -; 2763 : -; 2764 : z->rgb = 0; -; 2765 : for (i = 0; i < s->img_n; ++i) { -; 2766 : static const unsigned char rgb[3] = { 'R', 'G', 'B' }; -; 2767 : z->img_comp[i].id = stbi__get8(s); -; 2768 : if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) -; 2769 : ++z->rgb; -; 2770 : q = stbi__get8(s); -; 2771 : z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H", "Corrupt JPEG"); -; 2772 : z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V", "Corrupt JPEG"); -; 2773 : z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ", "Corrupt JPEG"); -; 2774 : } -; 2775 : -; 2776 : if (scan != STBI__SCAN_load) return 1; -; 2777 : -; 2778 : if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); -; 2779 : -; 2780 : for (i = 0; i < s->img_n; ++i) { -; 2781 : if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; -; 2782 : if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; -; 2783 : } -; 2784 : -; 2785 : // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios -; 2786 : // and I've never seen a non-corrupted JPEG file actually use them -; 2787 : for (i = 0; i < s->img_n; ++i) { -; 2788 : if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG"); -; 2789 : if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG"); -; 2790 : } -; 2791 : -; 2792 : // compute interleaved mcu info -; 2793 : z->img_h_max = h_max; -; 2794 : z->img_v_max = v_max; -; 2795 : z->img_mcu_w = h_max * 8; -; 2796 : z->img_mcu_h = v_max * 8; -; 2797 : // these sizes can't be more than 17 bits -; 2798 : z->img_mcu_x = (s->img_x + z->img_mcu_w - 1) / z->img_mcu_w; -; 2799 : z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h; -; 2800 : -; 2801 : for (i = 0; i < s->img_n; ++i) { -; 2802 : // number of effective pixels (e.g. for non-interleaved MCU) -; 2803 : z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max - 1) / h_max; -; 2804 : z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max - 1) / v_max; -; 2805 : // to simplify generation, we'll allocate enough memory to decode -; 2806 : // the bogus oversized data from using interleaved MCUs and their -; 2807 : // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't -; 2808 : // discard the extra data until colorspace conversion -; 2809 : // -; 2810 : // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) -; 2811 : // so these muls can't overflow with 32-bit ints (which we require) -; 2812 : z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; -; 2813 : z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; -; 2814 : z->img_comp[i].coeff = 0; -; 2815 : z->img_comp[i].raw_coeff = 0; -; 2816 : z->img_comp[i].linebuf = NULL; -; 2817 : z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); -; 2818 : if (z->img_comp[i].raw_data == NULL) -; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2820 : // align blocks for idct using mmx/sse -; 2821 : z->img_comp[i].data = (stbi_uc*)(((size_t)z->img_comp[i].raw_data + 15) & ~15); -; 2822 : if (z->progressive) { -; 2823 : // w2, h2 are multiples of 8 (see above) -; 2824 : z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; -; 2825 : z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; -; 2826 : z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); -; 2827 : if (z->img_comp[i].raw_coeff == NULL) -; 2828 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2829 : z->img_comp[i].coeff = (short*)(((size_t)z->img_comp[i].raw_coeff + 15) & ~15); -; 2830 : } -; 2831 : } -; 2832 : -; 2833 : return 1; -; 2834 : } -; 2835 : -; 2836 : // use comparisons since in some cases we handle more than one case (e.g. SOF) -; 2837 : #define stbi__DNL(x) ((x) == 0xdc) -; 2838 : #define stbi__SOI(x) ((x) == 0xd8) -; 2839 : #define stbi__EOI(x) ((x) == 0xd9) -; 2840 : #define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) -; 2841 : #define stbi__SOS(x) ((x) == 0xda) -; 2842 : -; 2843 : #define stbi__SOF_progressive(x) ((x) == 0xc2) -; 2844 : -; 2845 : static int stbi__decode_jpeg_header(stbi__jpeg* z, int scan) -; 2846 : { -; 2847 : int m; -; 2848 : z->jfif = 0; -; 2849 : z->app14_color_transform = -1; // valid values are 0,1,2 -; 2850 : z->marker = STBI__MARKER_none; // initialize cached marker to empty -; 2851 : m = stbi__get_marker(z); -; 2852 : if (!stbi__SOI(m)) return stbi__err("no SOI", "Corrupt JPEG"); -; 2853 : if (scan == STBI__SCAN_type) return 1; -; 2854 : m = stbi__get_marker(z); -; 2855 : while (!stbi__SOF(m)) { -; 2856 : if (!stbi__process_marker(z, m)) return 0; -; 2857 : m = stbi__get_marker(z); -; 2858 : while (m == STBI__MARKER_none) { -; 2859 : // some files have extra padding after their blocks, so ok, we'll scan -; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); -; 2861 : m = stbi__get_marker(z); -; 2862 : } -; 2863 : } -; 2864 : z->progressive = stbi__SOF_progressive(m); -; 2865 : if (!stbi__process_frame_header(z, scan)) return 0; -; 2866 : return 1; -; 2867 : } -; 2868 : -; 2869 : static int stbi__skip_jpeg_junk_at_end(stbi__jpeg* j) -; 2870 : { -; 2871 : // some JPEGs have junk at end, skip over it but if we find what looks -; 2872 : // like a valid marker, resume there -; 2873 : while (!stbi__at_eof(j->s)) { -; 2874 : int x = stbi__get8(j->s); -; 2875 : while (x == 255) { // might be a marker -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; -; 2877 : x = stbi__get8(j->s); -; 2878 : if (x != 0x00 && x != 0xff) { -; 2879 : // not a stuffed zero or lead-in to another marker, looks -; 2880 : // like an actual marker, return it -; 2881 : return x; -; 2882 : } -; 2883 : // stuffed zero has x=0 now which ends the loop, meaning we go -; 2884 : // back to regular scan loop. -; 2885 : // repeated 0xff keeps trying to read the next byte of the marker. -; 2886 : } -; 2887 : } -; 2888 : return STBI__MARKER_none; -; 2889 : } -; 2890 : -; 2891 : // decode image to YCbCr format -; 2892 : static int stbi__decode_jpeg_image(stbi__jpeg* j) -; 2893 : { -; 2894 : int m; -; 2895 : for (m = 0; m < 4; m++) { -; 2896 : j->img_comp[m].raw_data = NULL; -; 2897 : j->img_comp[m].raw_coeff = NULL; -; 2898 : } -; 2899 : j->restart_interval = 0; -; 2900 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; -; 2901 : m = stbi__get_marker(j); -; 2902 : while (!stbi__EOI(m)) { -; 2903 : if (stbi__SOS(m)) { -; 2904 : if (!stbi__process_scan_header(j)) return 0; -; 2905 : if (!stbi__parse_entropy_coded_data(j)) return 0; -; 2906 : if (j->marker == STBI__MARKER_none) { -; 2907 : j->marker = stbi__skip_jpeg_junk_at_end(j); -; 2908 : // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 -; 2909 : } -; 2910 : m = stbi__get_marker(j); -; 2911 : if (STBI__RESTART(m)) -; 2912 : m = stbi__get_marker(j); -; 2913 : } -; 2914 : else if (stbi__DNL(m)) { -; 2915 : int Ld = stbi__get16be(j->s); -; 2916 : stbi__uint32 NL = stbi__get16be(j->s); -; 2917 : if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); -; 2918 : if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); -; 2919 : m = stbi__get_marker(j); -; 2920 : } -; 2921 : else { -; 2922 : if (!stbi__process_marker(j, m)) return 1; -; 2923 : m = stbi__get_marker(j); -; 2924 : } -; 2925 : } -; 2926 : if (j->progressive) -; 2927 : stbi__jpeg_finish(j); -; 2928 : return 1; -; 2929 : } -; 2930 : -; 2931 : // static jfif-centered resampling (across block boundaries) -; 2932 : -; 2933 : typedef stbi_uc* (*resample_row_func)(stbi_uc* out, stbi_uc* in0, stbi_uc* in1, -; 2934 : int w, int hs); -; 2935 : -; 2936 : #define stbi__div4(x) ((stbi_uc) ((x) >> 2)) -; 2937 : -; 2938 : static stbi_uc* resample_row_1(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2939 : { -; 2940 : STBI_NOTUSED(out); -; 2941 : STBI_NOTUSED(in_far); -; 2942 : STBI_NOTUSED(w); -; 2943 : STBI_NOTUSED(hs); -; 2944 : return in_near; -; 2945 : } -; 2946 : -; 2947 : static stbi_uc* stbi__resample_row_v_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2948 : { -; 2949 : // need to generate two samples vertically for every one in input -; 2950 : int i; -; 2951 : STBI_NOTUSED(hs); -; 2952 : for (i = 0; i < w; ++i) -; 2953 : out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2); -; 2954 : return out; -; 2955 : } -; 2956 : -; 2957 : static stbi_uc* stbi__resample_row_h_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2958 : { -; 2959 : // need to generate two samples horizontally for every one in input -; 2960 : int i; -; 2961 : stbi_uc* input = in_near; -; 2962 : -; 2963 : if (w == 1) { -; 2964 : // if only one sample, can't do any interpolation -; 2965 : out[0] = out[1] = input[0]; -; 2966 : return out; -; 2967 : } -; 2968 : -; 2969 : out[0] = input[0]; -; 2970 : out[1] = stbi__div4(input[0] * 3 + input[1] + 2); -; 2971 : for (i = 1; i < w - 1; ++i) { -; 2972 : int n = 3 * input[i] + 2; -; 2973 : out[i * 2 + 0] = stbi__div4(n + input[i - 1]); -; 2974 : out[i * 2 + 1] = stbi__div4(n + input[i + 1]); -; 2975 : } -; 2976 : out[i * 2 + 0] = stbi__div4(input[w - 2] * 3 + input[w - 1] + 2); -; 2977 : out[i * 2 + 1] = input[w - 1]; -; 2978 : -; 2979 : STBI_NOTUSED(in_far); -; 2980 : STBI_NOTUSED(hs); -; 2981 : -; 2982 : return out; -; 2983 : } -; 2984 : -; 2985 : #define stbi__div16(x) ((stbi_uc) ((x) >> 4)) -; 2986 : -; 2987 : static stbi_uc* stbi__resample_row_hv_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2988 : { -; 2989 : // need to generate 2x2 samples for every one in input -; 2990 : int i, t0, t1; -; 2991 : if (w == 1) { -; 2992 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 2993 : return out; -; 2994 : } -; 2995 : -; 2996 : t1 = 3 * in_near[0] + in_far[0]; -; 2997 : out[0] = stbi__div4(t1 + 2); -; 2998 : for (i = 1; i < w; ++i) { -; 2999 : t0 = t1; -; 3000 : t1 = 3 * in_near[i] + in_far[i]; -; 3001 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3002 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3003 : } -; 3004 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3005 : -; 3006 : STBI_NOTUSED(hs); -; 3007 : -; 3008 : return out; -; 3009 : } -; 3010 : -; 3011 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3012 : static stbi_uc* stbi__resample_row_hv_2_simd(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3013 : { -; 3014 : // need to generate 2x2 samples for every one in input -; 3015 : int i = 0, t0, t1; -; 3016 : -; 3017 : if (w == 1) { -; 3018 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 3019 : return out; -; 3020 : } -; 3021 : -; 3022 : t1 = 3 * in_near[0] + in_far[0]; -; 3023 : // process groups of 8 pixels for as long as we can. -; 3024 : // note we can't handle the last pixel in a row in this loop -; 3025 : // because we need to handle the filter boundary conditions. -; 3026 : for (; i < ((w - 1) & ~7); i += 8) { -; 3027 : #if defined(STBI_SSE2) -; 3028 : // load and perform the vertical filtering pass -; 3029 : // this uses 3*x + y = 4*x + (y - x) -; 3030 : __m128i zero = _mm_setzero_si128(); -; 3031 : __m128i farb = _mm_loadl_epi64((__m128i*) (in_far + i)); -; 3032 : __m128i nearb = _mm_loadl_epi64((__m128i*) (in_near + i)); -; 3033 : __m128i farw = _mm_unpacklo_epi8(farb, zero); -; 3034 : __m128i nearw = _mm_unpacklo_epi8(nearb, zero); -; 3035 : __m128i diff = _mm_sub_epi16(farw, nearw); -; 3036 : __m128i nears = _mm_slli_epi16(nearw, 2); -; 3037 : __m128i curr = _mm_add_epi16(nears, diff); // current row -; 3038 : -; 3039 : // horizontal filter works the same based on shifted vers of current -; 3040 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3041 : // insert the previous pixel value (from t1). -; 3042 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3043 : // of next block of 8 pixels added in. -; 3044 : __m128i prv0 = _mm_slli_si128(curr, 2); -; 3045 : __m128i nxt0 = _mm_srli_si128(curr, 2); -; 3046 : __m128i prev = _mm_insert_epi16(prv0, t1, 0); -; 3047 : __m128i next = _mm_insert_epi16(nxt0, 3 * in_near[i + 8] + in_far[i + 8], 7); -; 3048 : -; 3049 : // horizontal filter, polyphase implementation since it's convenient: -; 3050 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3051 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3052 : // note the shared term. -; 3053 : __m128i bias = _mm_set1_epi16(8); -; 3054 : __m128i curs = _mm_slli_epi16(curr, 2); -; 3055 : __m128i prvd = _mm_sub_epi16(prev, curr); -; 3056 : __m128i nxtd = _mm_sub_epi16(next, curr); -; 3057 : __m128i curb = _mm_add_epi16(curs, bias); -; 3058 : __m128i even = _mm_add_epi16(prvd, curb); -; 3059 : __m128i odd = _mm_add_epi16(nxtd, curb); -; 3060 : -; 3061 : // interleave even and odd pixels, then undo scaling. -; 3062 : __m128i int0 = _mm_unpacklo_epi16(even, odd); -; 3063 : __m128i int1 = _mm_unpackhi_epi16(even, odd); -; 3064 : __m128i de0 = _mm_srli_epi16(int0, 4); -; 3065 : __m128i de1 = _mm_srli_epi16(int1, 4); -; 3066 : -; 3067 : // pack and write output -; 3068 : __m128i outv = _mm_packus_epi16(de0, de1); -; 3069 : _mm_storeu_si128((__m128i*) (out + i * 2), outv); -; 3070 : #elif defined(STBI_NEON) -; 3071 : // load and perform the vertical filtering pass -; 3072 : // this uses 3*x + y = 4*x + (y - x) -; 3073 : uint8x8_t farb = vld1_u8(in_far + i); -; 3074 : uint8x8_t nearb = vld1_u8(in_near + i); -; 3075 : int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); -; 3076 : int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); -; 3077 : int16x8_t curr = vaddq_s16(nears, diff); // current row -; 3078 : -; 3079 : // horizontal filter works the same based on shifted vers of current -; 3080 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3081 : // insert the previous pixel value (from t1). -; 3082 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3083 : // of next block of 8 pixels added in. -; 3084 : int16x8_t prv0 = vextq_s16(curr, curr, 7); -; 3085 : int16x8_t nxt0 = vextq_s16(curr, curr, 1); -; 3086 : int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); -; 3087 : int16x8_t next = vsetq_lane_s16(3 * in_near[i + 8] + in_far[i + 8], nxt0, 7); -; 3088 : -; 3089 : // horizontal filter, polyphase implementation since it's convenient: -; 3090 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3091 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3092 : // note the shared term. -; 3093 : int16x8_t curs = vshlq_n_s16(curr, 2); -; 3094 : int16x8_t prvd = vsubq_s16(prev, curr); -; 3095 : int16x8_t nxtd = vsubq_s16(next, curr); -; 3096 : int16x8_t even = vaddq_s16(curs, prvd); -; 3097 : int16x8_t odd = vaddq_s16(curs, nxtd); -; 3098 : -; 3099 : // undo scaling and round, then store with even/odd phases interleaved -; 3100 : uint8x8x2_t o; -; 3101 : o.val[0] = vqrshrun_n_s16(even, 4); -; 3102 : o.val[1] = vqrshrun_n_s16(odd, 4); -; 3103 : vst2_u8(out + i * 2, o); -; 3104 : #endif -; 3105 : -; 3106 : // "previous" value for next iter -; 3107 : t1 = 3 * in_near[i + 7] + in_far[i + 7]; -; 3108 : } -; 3109 : -; 3110 : t0 = t1; -; 3111 : t1 = 3 * in_near[i] + in_far[i]; -; 3112 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3113 : -; 3114 : for (++i; i < w; ++i) { -; 3115 : t0 = t1; -; 3116 : t1 = 3 * in_near[i] + in_far[i]; -; 3117 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3118 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3119 : } -; 3120 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3121 : -; 3122 : STBI_NOTUSED(hs); -; 3123 : -; 3124 : return out; -; 3125 : } -; 3126 : #endif -; 3127 : -; 3128 : static stbi_uc* stbi__resample_row_generic(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3129 : { -; 3130 : // resample with nearest-neighbor -; 3131 : int i, j; -; 3132 : STBI_NOTUSED(in_far); -; 3133 : for (i = 0; i < w; ++i) -; 3134 : for (j = 0; j < hs; ++j) -; 3135 : out[i * hs + j] = in_near[i]; -; 3136 : return out; -; 3137 : } -; 3138 : -; 3139 : // this is a reduced-precision calculation of YCbCr-to-RGB introduced -; 3140 : // to make sure the code produces the same results in both SIMD and scalar -; 3141 : #define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) -; 3142 : static void stbi__YCbCr_to_RGB_row(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step) -; 3143 : { -; 3144 : int i; -; 3145 : for (i = 0; i < count; ++i) { -; 3146 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3147 : int r, g, b; -; 3148 : int cr = pcr[i] - 128; -; 3149 : int cb = pcb[i] - 128; -; 3150 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3151 : g = y_fixed + (cr * -stbi__float2fixed(0.71414f)) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3152 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3153 : r >>= 20; -; 3154 : g >>= 20; -; 3155 : b >>= 20; -; 3156 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3157 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3158 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3159 : out[0] = (stbi_uc)r; -; 3160 : out[1] = (stbi_uc)g; -; 3161 : out[2] = (stbi_uc)b; -; 3162 : out[3] = 255; -; 3163 : out += step; -; 3164 : } -; 3165 : } -; 3166 : -; 3167 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3168 : static void stbi__YCbCr_to_RGB_simd(stbi_uc* out, stbi_uc const* y, stbi_uc const* pcb, stbi_uc const* pcr, int count, int step) -; 3169 : { -; 3170 : int i = 0; -; 3171 : -; 3172 : #ifdef STBI_SSE2 -; 3173 : // step == 3 is pretty ugly on the final interleave, and i'm not convinced -; 3174 : // it's useful in practice (you wouldn't use it for textures, for example). -; 3175 : // so just accelerate step == 4 case. -; 3176 : if (step == 4) { -; 3177 : // this is a fairly straightforward implementation and not super-optimized. -; 3178 : __m128i signflip = _mm_set1_epi8(-0x80); -; 3179 : __m128i cr_const0 = _mm_set1_epi16((short)(1.40200f * 4096.0f + 0.5f)); -; 3180 : __m128i cr_const1 = _mm_set1_epi16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3181 : __m128i cb_const0 = _mm_set1_epi16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3182 : __m128i cb_const1 = _mm_set1_epi16((short)(1.77200f * 4096.0f + 0.5f)); -; 3183 : __m128i y_bias = _mm_set1_epi8((char)(unsigned char)128); -; 3184 : __m128i xw = _mm_set1_epi16(255); // alpha channel -; 3185 : -; 3186 : for (; i + 7 < count; i += 8) { -; 3187 : // load -; 3188 : __m128i y_bytes = _mm_loadl_epi64((__m128i*) (y + i)); -; 3189 : __m128i cr_bytes = _mm_loadl_epi64((__m128i*) (pcr + i)); -; 3190 : __m128i cb_bytes = _mm_loadl_epi64((__m128i*) (pcb + i)); -; 3191 : __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 -; 3192 : __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 -; 3193 : -; 3194 : // unpack to short (and left-shift cr, cb by 8) -; 3195 : __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); -; 3196 : __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); -; 3197 : __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); -; 3198 : -; 3199 : // color transform -; 3200 : __m128i yws = _mm_srli_epi16(yw, 4); -; 3201 : __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); -; 3202 : __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); -; 3203 : __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); -; 3204 : __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); -; 3205 : __m128i rws = _mm_add_epi16(cr0, yws); -; 3206 : __m128i gwt = _mm_add_epi16(cb0, yws); -; 3207 : __m128i bws = _mm_add_epi16(yws, cb1); -; 3208 : __m128i gws = _mm_add_epi16(gwt, cr1); -; 3209 : -; 3210 : // descale -; 3211 : __m128i rw = _mm_srai_epi16(rws, 4); -; 3212 : __m128i bw = _mm_srai_epi16(bws, 4); -; 3213 : __m128i gw = _mm_srai_epi16(gws, 4); -; 3214 : -; 3215 : // back to byte, set up for transpose -; 3216 : __m128i brb = _mm_packus_epi16(rw, bw); -; 3217 : __m128i gxb = _mm_packus_epi16(gw, xw); -; 3218 : -; 3219 : // transpose to interleave channels -; 3220 : __m128i t0 = _mm_unpacklo_epi8(brb, gxb); -; 3221 : __m128i t1 = _mm_unpackhi_epi8(brb, gxb); -; 3222 : __m128i o0 = _mm_unpacklo_epi16(t0, t1); -; 3223 : __m128i o1 = _mm_unpackhi_epi16(t0, t1); -; 3224 : -; 3225 : // store -; 3226 : _mm_storeu_si128((__m128i*) (out + 0), o0); -; 3227 : _mm_storeu_si128((__m128i*) (out + 16), o1); -; 3228 : out += 32; -; 3229 : } -; 3230 : } -; 3231 : #endif -; 3232 : -; 3233 : #ifdef STBI_NEON -; 3234 : // in this version, step=3 support would be easy to add. but is there demand? -; 3235 : if (step == 4) { -; 3236 : // this is a fairly straightforward implementation and not super-optimized. -; 3237 : uint8x8_t signflip = vdup_n_u8(0x80); -; 3238 : int16x8_t cr_const0 = vdupq_n_s16((short)(1.40200f * 4096.0f + 0.5f)); -; 3239 : int16x8_t cr_const1 = vdupq_n_s16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3240 : int16x8_t cb_const0 = vdupq_n_s16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3241 : int16x8_t cb_const1 = vdupq_n_s16((short)(1.77200f * 4096.0f + 0.5f)); -; 3242 : -; 3243 : for (; i + 7 < count; i += 8) { -; 3244 : // load -; 3245 : uint8x8_t y_bytes = vld1_u8(y + i); -; 3246 : uint8x8_t cr_bytes = vld1_u8(pcr + i); -; 3247 : uint8x8_t cb_bytes = vld1_u8(pcb + i); -; 3248 : int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); -; 3249 : int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); -; 3250 : -; 3251 : // expand to s16 -; 3252 : int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); -; 3253 : int16x8_t crw = vshll_n_s8(cr_biased, 7); -; 3254 : int16x8_t cbw = vshll_n_s8(cb_biased, 7); -; 3255 : -; 3256 : // color transform -; 3257 : int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); -; 3258 : int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); -; 3259 : int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); -; 3260 : int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); -; 3261 : int16x8_t rws = vaddq_s16(yws, cr0); -; 3262 : int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); -; 3263 : int16x8_t bws = vaddq_s16(yws, cb1); -; 3264 : -; 3265 : // undo scaling, round, convert to byte -; 3266 : uint8x8x4_t o; -; 3267 : o.val[0] = vqrshrun_n_s16(rws, 4); -; 3268 : o.val[1] = vqrshrun_n_s16(gws, 4); -; 3269 : o.val[2] = vqrshrun_n_s16(bws, 4); -; 3270 : o.val[3] = vdup_n_u8(255); -; 3271 : -; 3272 : // store, interleaving r/g/b/a -; 3273 : vst4_u8(out, o); -; 3274 : out += 8 * 4; -; 3275 : } -; 3276 : } -; 3277 : #endif -; 3278 : -; 3279 : for (; i < count; ++i) { -; 3280 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3281 : int r, g, b; -; 3282 : int cr = pcr[i] - 128; -; 3283 : int cb = pcb[i] - 128; -; 3284 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3285 : g = y_fixed + cr * -stbi__float2fixed(0.71414f) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3286 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3287 : r >>= 20; -; 3288 : g >>= 20; -; 3289 : b >>= 20; -; 3290 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3291 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3292 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3293 : out[0] = (stbi_uc)r; -; 3294 : out[1] = (stbi_uc)g; -; 3295 : out[2] = (stbi_uc)b; -; 3296 : out[3] = 255; -; 3297 : out += step; -; 3298 : } -; 3299 : } -; 3300 : #endif -; 3301 : -; 3302 : // set up the kernels -; 3303 : static void stbi__setup_jpeg(stbi__jpeg* j) -; 3304 : { -; 3305 : j->idct_block_kernel = stbi__idct_block; -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; -; 3308 : -; 3309 : #ifdef STBI_SSE2 -; 3310 : if (stbi__sse2_available()) { -; 3311 : j->idct_block_kernel = stbi__idct_simd; -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3314 : } -; 3315 : #endif -; 3316 : -; 3317 : #ifdef STBI_NEON -; 3318 : j->idct_block_kernel = stbi__idct_simd; -; 3319 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3320 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3321 : #endif -; 3322 : } -; 3323 : -; 3324 : // clean up the temporary component buffers -; 3325 : static void stbi__cleanup_jpeg(stbi__jpeg* j) -; 3326 : { -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); -; 3328 : } -; 3329 : -; 3330 : typedef struct -; 3331 : { -; 3332 : resample_row_func resample; -; 3333 : stbi_uc* line0, * line1; -; 3334 : int hs, vs; // expansion factor in each axis -; 3335 : int w_lores; // horizontal pixels pre-expansion -; 3336 : int ystep; // how far through vertical expansion we are -; 3337 : int ypos; // which pre-expansion row we're on -; 3338 : } stbi__resample; -; 3339 : -; 3340 : // fast 0..255 * 0..255 => 0..255 rounded multiplication -; 3341 : static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) -; 3342 : { -; 3343 : unsigned int t = x * y + 128; -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); -; 3345 : } -; 3346 : -; 3347 : static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp, int req_comp) -; 3348 : { -; 3349 : int n, decode_n, is_rgb; -; 3350 : z->s->img_n = 0; // make stbi__cleanup_jpeg safe -; 3351 : -; 3352 : // validate req_comp -; 3353 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 3354 : -; 3355 : // load a jpeg image from whichever source, but leave in YCbCr format -; 3356 : if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } -; 3357 : -; 3358 : // determine actual number of components to generate -; 3359 : n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; -; 3360 : -; 3361 : is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); -; 3362 : -; 3363 : if (z->s->img_n == 3 && n < 3 && !is_rgb) -; 3364 : decode_n = 1; -; 3365 : else -; 3366 : decode_n = z->s->img_n; -; 3367 : -; 3368 : // nothing to do if no components requested; check this now to avoid -; 3369 : // accessing uninitialized coutput[0] later -; 3370 : if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } -; 3371 : -; 3372 : // resample and color-convert -; 3373 : { -; 3374 : int k; -; 3375 : unsigned int i, j; -; 3376 : stbi_uc* output; -; 3377 : stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL }; -; 3378 : -; 3379 : stbi__resample res_comp[4]; -; 3380 : -; 3381 : for (k = 0; k < decode_n; ++k) { -; 3382 : stbi__resample* r = &res_comp[k]; -; 3383 : -; 3384 : // allocate line buffer big enough for upsampling off the edges -; 3385 : // with upsample factor of 4 -; 3386 : z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3); -; 3387 : if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3388 : -; 3389 : r->hs = z->img_h_max / z->img_comp[k].h; -; 3390 : r->vs = z->img_v_max / z->img_comp[k].v; -; 3391 : r->ystep = r->vs >> 1; -; 3392 : r->w_lores = (z->s->img_x + r->hs - 1) / r->hs; -; 3393 : r->ypos = 0; -; 3394 : r->line0 = r->line1 = z->img_comp[k].data; -; 3395 : -; 3396 : if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; -; 3397 : else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; -; 3398 : else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; -; 3399 : else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; -; 3400 : else r->resample = stbi__resample_row_generic; -; 3401 : } -; 3402 : -; 3403 : // can't error after this so, this is safe -; 3404 : output = (stbi_uc*)stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); -; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3406 : -; 3407 : // now go ahead and resample -; 3408 : for (j = 0; j < z->s->img_y; ++j) { -; 3409 : stbi_uc* out = output + n * z->s->img_x * j; -; 3410 : for (k = 0; k < decode_n; ++k) { -; 3411 : stbi__resample* r = &res_comp[k]; -; 3412 : int y_bot = r->ystep >= (r->vs >> 1); -; 3413 : coutput[k] = r->resample(z->img_comp[k].linebuf, -; 3414 : y_bot ? r->line1 : r->line0, -; 3415 : y_bot ? r->line0 : r->line1, -; 3416 : r->w_lores, r->hs); -; 3417 : if (++r->ystep >= r->vs) { -; 3418 : r->ystep = 0; -; 3419 : r->line0 = r->line1; -; 3420 : if (++r->ypos < z->img_comp[k].y) -; 3421 : r->line1 += z->img_comp[k].w2; -; 3422 : } -; 3423 : } -; 3424 : if (n >= 3) { -; 3425 : stbi_uc* y = coutput[0]; -; 3426 : if (z->s->img_n == 3) { -; 3427 : if (is_rgb) { -; 3428 : for (i = 0; i < z->s->img_x; ++i) { -; 3429 : out[0] = y[i]; -; 3430 : out[1] = coutput[1][i]; -; 3431 : out[2] = coutput[2][i]; -; 3432 : out[3] = 255; -; 3433 : out += n; -; 3434 : } -; 3435 : } -; 3436 : else { -; 3437 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3438 : } -; 3439 : } -; 3440 : else if (z->s->img_n == 4) { -; 3441 : if (z->app14_color_transform == 0) { // CMYK -; 3442 : for (i = 0; i < z->s->img_x; ++i) { -; 3443 : stbi_uc m = coutput[3][i]; -; 3444 : out[0] = stbi__blinn_8x8(coutput[0][i], m); -; 3445 : out[1] = stbi__blinn_8x8(coutput[1][i], m); -; 3446 : out[2] = stbi__blinn_8x8(coutput[2][i], m); -; 3447 : out[3] = 255; -; 3448 : out += n; -; 3449 : } -; 3450 : } -; 3451 : else if (z->app14_color_transform == 2) { // YCCK -; 3452 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3453 : for (i = 0; i < z->s->img_x; ++i) { -; 3454 : stbi_uc m = coutput[3][i]; -; 3455 : out[0] = stbi__blinn_8x8(255 - out[0], m); -; 3456 : out[1] = stbi__blinn_8x8(255 - out[1], m); -; 3457 : out[2] = stbi__blinn_8x8(255 - out[2], m); -; 3458 : out += n; -; 3459 : } -; 3460 : } -; 3461 : else { // YCbCr + alpha? Ignore the fourth channel for now -; 3462 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3463 : } -; 3464 : } -; 3465 : else -; 3466 : for (i = 0; i < z->s->img_x; ++i) { -; 3467 : out[0] = out[1] = out[2] = y[i]; -; 3468 : out[3] = 255; // not used if n==3 -; 3469 : out += n; -; 3470 : } -; 3471 : } -; 3472 : else { -; 3473 : if (is_rgb) { -; 3474 : if (n == 1) -; 3475 : for (i = 0; i < z->s->img_x; ++i) -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3477 : else { -; 3478 : for (i = 0; i < z->s->img_x; ++i, out += 2) { -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3480 : out[1] = 255; -; 3481 : } -; 3482 : } -; 3483 : } -; 3484 : else if (z->s->img_n == 4 && z->app14_color_transform == 0) { -; 3485 : for (i = 0; i < z->s->img_x; ++i) { -; 3486 : stbi_uc m = coutput[3][i]; -; 3487 : stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); -; 3488 : stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); -; 3489 : stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); -; 3490 : out[0] = stbi__compute_y(r, g, b); -; 3491 : out[1] = 255; -; 3492 : out += n; -; 3493 : } -; 3494 : } -; 3495 : else if (z->s->img_n == 4 && z->app14_color_transform == 2) { -; 3496 : for (i = 0; i < z->s->img_x; ++i) { -; 3497 : out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); -; 3498 : out[1] = 255; -; 3499 : out += n; -; 3500 : } -; 3501 : } -; 3502 : else { -; 3503 : stbi_uc* y = coutput[0]; -; 3504 : if (n == 1) -; 3505 : for (i = 0; i < z->s->img_x; ++i) out[i] = y[i]; -; 3506 : else -; 3507 : for (i = 0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } -; 3508 : } -; 3509 : } -; 3510 : } -; 3511 : stbi__cleanup_jpeg(z); -; 3512 : *out_x = z->s->img_x; -; 3513 : *out_y = z->s->img_y; -; 3514 : if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output -; 3515 : return output; -; 3516 : } -; 3517 : } -; 3518 : -; 3519 : static void* stbi__jpeg_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 3520 : { -; 3521 : unsigned char* result; -; 3522 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); -; 3524 : memset(j, 0, sizeof(stbi__jpeg)); -; 3525 : STBI_NOTUSED(ri); -; 3526 : j->s = s; -; 3527 : stbi__setup_jpeg(j); -; 3528 : result = load_jpeg_image(j, x, y, comp, req_comp); -; 3529 : STBI_FREE(j); -; 3530 : return result; -; 3531 : } -; 3532 : -; 3533 : static int stbi__jpeg_test(stbi__context* s) -; 3534 : { -; 3535 : int r; -; 3536 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3538 : memset(j, 0, sizeof(stbi__jpeg)); -; 3539 : j->s = s; -; 3540 : stbi__setup_jpeg(j); -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); -; 3542 : stbi__rewind(s); -; 3543 : STBI_FREE(j); -; 3544 : return r; -; 3545 : } -; 3546 : -; 3547 : static int stbi__jpeg_info_raw(stbi__jpeg* j, int* x, int* y, int* comp) -; 3548 : { -; 3549 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { -; 3550 : stbi__rewind(j->s); -; 3551 : return 0; -; 3552 : } -; 3553 : if (x) *x = j->s->img_x; -; 3554 : if (y) *y = j->s->img_y; -; 3555 : if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; -; 3556 : return 1; -; 3557 : } -; 3558 : -; 3559 : static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp) -; 3560 : { -; 3561 : int result; -; 3562 : stbi__jpeg* j = (stbi__jpeg*)(stbi__malloc(sizeof(stbi__jpeg))); -; 3563 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3564 : memset(j, 0, sizeof(stbi__jpeg)); -; 3565 : j->s = s; -; 3566 : result = stbi__jpeg_info_raw(j, x, y, comp); -; 3567 : STBI_FREE(j); -; 3568 : return result; -; 3569 : } -; 3570 : #endif -; 3571 : -; 3572 : // public domain zlib decode v0.2 Sean Barrett 2006-11-18 -; 3573 : // simple implementation -; 3574 : // - all input must be provided in an upfront buffer -; 3575 : // - all output is written to a single output buffer (can malloc/realloc) -; 3576 : // performance -; 3577 : // - fast huffman -; 3578 : -; 3579 : #ifndef STBI_NO_ZLIB -; 3580 : -; 3581 : // fast-way is faster to check than jpeg huffman, but slow way is slower -; 3582 : #define STBI__ZFAST_BITS 9 // accelerate all cases in default tables -; 3583 : #define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) -; 3584 : #define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet -; 3585 : -; 3586 : // zlib-style huffman encoding -; 3587 : // (jpegs packs from left, zlib from right, so can't share code) -; 3588 : typedef struct -; 3589 : { -; 3590 : stbi__uint16 fast[1 << STBI__ZFAST_BITS]; -; 3591 : stbi__uint16 firstcode[16]; -; 3592 : int maxcode[17]; -; 3593 : stbi__uint16 firstsymbol[16]; -; 3594 : stbi_uc size[STBI__ZNSYMS]; -; 3595 : stbi__uint16 value[STBI__ZNSYMS]; -; 3596 : } stbi__zhuffman; -; 3597 : -; 3598 : stbi_inline static int stbi__bitreverse16(int n) -; 3599 : { -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); -; 3604 : return n; -; 3605 : } -; 3606 : -; 3607 : stbi_inline static int stbi__bit_reverse(int v, int bits) -; 3608 : { -; 3609 : STBI_ASSERT(bits <= 16); -; 3610 : // to bit reverse n bits, reverse 16 and shift -; 3611 : // e.g. 11 bits, bit reverse and shift away 5 -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); -; 3613 : } -; 3614 : -; 3615 : static int stbi__zbuild_huffman(stbi__zhuffman* z, const stbi_uc* sizelist, int num) -; 3616 : { -; 3617 : int i, k = 0; -; 3618 : int code, next_code[16], sizes[17]; -; 3619 : -; 3620 : // DEFLATE spec for generating codes -; 3621 : memset(sizes, 0, sizeof(sizes)); -; 3622 : memset(z->fast, 0, sizeof(z->fast)); -; 3623 : for (i = 0; i < num; ++i) -; 3624 : ++sizes[sizelist[i]]; -; 3625 : sizes[0] = 0; -; 3626 : for (i = 1; i < 16; ++i) -; 3627 : if (sizes[i] > (1 << i)) -; 3628 : return stbi__err("bad sizes", "Corrupt PNG"); -; 3629 : code = 0; -; 3630 : for (i = 1; i < 16; ++i) { -; 3631 : next_code[i] = code; -; 3632 : z->firstcode[i] = (stbi__uint16)code; -; 3633 : z->firstsymbol[i] = (stbi__uint16)k; -; 3634 : code = (code + sizes[i]); -; 3635 : if (sizes[i]) -; 3636 : if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3637 : z->maxcode[i] = code << (16 - i); // preshift for inner loop -; 3638 : code <<= 1; -; 3639 : k += sizes[i]; -; 3640 : } -; 3641 : z->maxcode[16] = 0x10000; // sentinel -; 3642 : for (i = 0; i < num; ++i) { -; 3643 : int s = sizelist[i]; -; 3644 : if (s) { -; 3645 : int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; -; 3646 : stbi__uint16 fastv = (stbi__uint16)((s << 9) | i); -; 3647 : z->size[c] = (stbi_uc)s; -; 3648 : z->value[c] = (stbi__uint16)i; -; 3649 : if (s <= STBI__ZFAST_BITS) { -; 3650 : int j = stbi__bit_reverse(next_code[s], s); -; 3651 : while (j < (1 << STBI__ZFAST_BITS)) { -; 3652 : z->fast[j] = fastv; -; 3653 : j += (1 << s); -; 3654 : } -; 3655 : } -; 3656 : ++next_code[s]; -; 3657 : } -; 3658 : } -; 3659 : return 1; -; 3660 : } -; 3661 : -; 3662 : // zlib-from-memory implementation for PNG reading -; 3663 : // because PNG allows splitting the zlib stream arbitrarily, -; 3664 : // and it's annoying structurally to have PNG call ZLIB call PNG, -; 3665 : // we require PNG read all the IDATs and combine them into a single -; 3666 : // memory buffer -; 3667 : -; 3668 : typedef struct -; 3669 : { -; 3670 : stbi_uc* zbuffer, * zbuffer_end; -; 3671 : int num_bits; -; 3672 : stbi__uint32 code_buffer; -; 3673 : -; 3674 : char* zout; -; 3675 : char* zout_start; -; 3676 : char* zout_end; -; 3677 : int z_expandable; -; 3678 : -; 3679 : stbi__zhuffman z_length, z_distance; -; 3680 : } stbi__zbuf; -; 3681 : -; 3682 : stbi_inline static int stbi__zeof(stbi__zbuf* z) -; 3683 : { -; 3684 : return (z->zbuffer >= z->zbuffer_end); -; 3685 : } -; 3686 : -; 3687 : stbi_inline static stbi_uc stbi__zget8(stbi__zbuf* z) -; 3688 : { -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ -; 3697 : return; -; 3698 : } -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; -; 3700 : z->num_bits += 8; -; 3701 : } while (z->num_bits <= 24); -; 3702 : } -; 3703 : -; 3704 : stbi_inline static unsigned int stbi__zreceive(stbi__zbuf* z, int n) -; 3705 : { -; 3706 : unsigned int k; -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); -; 3708 : k = z->code_buffer & ((1 << n) - 1); -; 3709 : z->code_buffer >>= n; -; 3710 : z->num_bits -= n; -; 3711 : return k; -; 3712 : } -; 3713 : -; 3714 : static int stbi__zhuffman_decode_slowpath(stbi__zbuf* a, stbi__zhuffman* z) -; 3715 : { -; 3716 : int b, s, k; -; 3717 : // not resolved by fast table, so compute it the slow way -; 3718 : // use jpeg approach, which requires MSbits at top -; 3719 : k = stbi__bit_reverse(a->code_buffer, 16); -; 3720 : for (s = STBI__ZFAST_BITS + 1; ; ++s) -; 3721 : if (k < z->maxcode[s]) -; 3722 : break; -; 3723 : if (s >= 16) return -1; // invalid code! -; 3724 : // code size is s, so: -; 3725 : b = (k >> (16 - s)) - z->firstcode[s] + z->firstsymbol[s]; -; 3726 : if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! -; 3727 : if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. -; 3728 : a->code_buffer >>= s; -; 3729 : a->num_bits -= s; -; 3730 : return z->value[b]; -; 3731 : } -; 3732 : -; 3733 : stbi_inline static int stbi__zhuffman_decode(stbi__zbuf* a, stbi__zhuffman* z) -; 3734 : { -; 3735 : int b, s; -; 3736 : if (a->num_bits < 16) { -; 3737 : if (stbi__zeof(a)) { -; 3738 : return -1; /* report error for unexpected end of data. */ -; 3739 : } -; 3740 : stbi__fill_bits(a); -; 3741 : } -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; -; 3743 : if (b) { -; 3744 : s = b >> 9; -; 3745 : a->code_buffer >>= s; -; 3746 : a->num_bits -= s; -; 3747 : return b & 511; -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); -; 3750 : } -; 3751 : -; 3752 : static int stbi__zexpand(stbi__zbuf* z, char* zout, int n) // need to make room for n bytes -; 3753 : { -; 3754 : char* q; -; 3755 : unsigned int cur, limit, old_limit; -; 3756 : z->zout = zout; -; 3757 : if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG"); -; 3758 : cur = (unsigned int)(z->zout - z->zout_start); -; 3759 : limit = old_limit = (unsigned)(z->zout_end - z->zout_start); -; 3760 : if (UINT_MAX - cur < (unsigned)n) return stbi__err("outofmem", "Out of memory"); -; 3761 : while (cur + n > limit) { -; 3762 : if (limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); -; 3763 : limit *= 2; -; 3764 : } -; 3765 : q = (char*)STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); -; 3766 : STBI_NOTUSED(old_limit); -; 3767 : if (q == NULL) return stbi__err("outofmem", "Out of memory"); -; 3768 : z->zout_start = q; -; 3769 : z->zout = q + cur; -; 3770 : z->zout_end = q + limit; -; 3771 : return 1; -; 3772 : } -; 3773 : -; 3774 : static const int stbi__zlength_base[31] = { -; 3775 : 3,4,5,6,7,8,9,10,11,13, -; 3776 : 15,17,19,23,27,31,35,43,51,59, -; 3777 : 67,83,99,115,131,163,195,227,258,0,0 }; -; 3778 : -; 3779 : static const int stbi__zlength_extra[31] = -; 3780 : { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; -; 3781 : -; 3782 : static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, -; 3783 : 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0 }; -; 3784 : -; 3785 : static const int stbi__zdist_extra[32] = -; 3786 : { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 }; -; 3787 : -; 3788 : static int stbi__parse_huffman_block(stbi__zbuf* a) -; 3789 : { -; 3790 : char* zout = a->zout; -; 3791 : for (;;) { -; 3792 : int z = stbi__zhuffman_decode(a, &a->z_length); -; 3793 : if (z < 256) { -; 3794 : if (z < 0) return stbi__err("bad huffman code", "Corrupt PNG"); // error in huffman codes -; 3795 : if (zout >= a->zout_end) { -; 3796 : if (!stbi__zexpand(a, zout, 1)) return 0; -; 3797 : zout = a->zout; -; 3798 : } -; 3799 : *zout++ = (char)z; -; 3800 : } -; 3801 : else { -; 3802 : stbi_uc* p; -; 3803 : int len, dist; -; 3804 : if (z == 256) { -; 3805 : a->zout = zout; -; 3806 : return 1; -; 3807 : } -; 3808 : if (z >= 286) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data -; 3809 : z -= 257; -; 3810 : len = stbi__zlength_base[z]; -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); -; 3812 : z = stbi__zhuffman_decode(a, &a->z_distance); -; 3813 : if (z < 0 || z >= 30) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data -; 3814 : dist = stbi__zdist_base[z]; -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); -; 3816 : if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG"); -; 3817 : if (zout + len > a->zout_end) { -; 3818 : if (!stbi__zexpand(a, zout, len)) return 0; -; 3819 : zout = a->zout; -; 3820 : } -; 3821 : p = (stbi_uc*)(zout - dist); -; 3822 : if (dist == 1) { // run of one byte; common in images. -; 3823 : stbi_uc v = *p; -; 3824 : if (len) { do *zout++ = v; while (--len); } -; 3825 : } -; 3826 : else { -; 3827 : if (len) { do *zout++ = *p++; while (--len); } -; 3828 : } -; 3829 : } -; 3830 : } -; 3831 : } -; 3832 : -; 3833 : static int stbi__compute_huffman_codes(stbi__zbuf* a) -; 3834 : { -; 3835 : static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; -; 3836 : stbi__zhuffman z_codelength; -; 3837 : stbi_uc lencodes[286 + 32 + 137];//padding for maximum single op -; 3838 : stbi_uc codelength_sizes[19]; -; 3839 : int i, n; -; 3840 : -; 3841 : int hlit = stbi__zreceive(a, 5) + 257; -; 3842 : int hdist = stbi__zreceive(a, 5) + 1; -; 3843 : int hclen = stbi__zreceive(a, 4) + 4; -; 3844 : int ntot = hlit + hdist; -; 3845 : -; 3846 : memset(codelength_sizes, 0, sizeof(codelength_sizes)); -; 3847 : for (i = 0; i < hclen; ++i) { -; 3848 : int s = stbi__zreceive(a, 3); -; 3849 : codelength_sizes[length_dezigzag[i]] = (stbi_uc)s; -; 3850 : } -; 3851 : if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; -; 3852 : -; 3853 : n = 0; -; 3854 : while (n < ntot) { -; 3855 : int c = stbi__zhuffman_decode(a, &z_codelength); -; 3856 : if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3857 : if (c < 16) -; 3858 : lencodes[n++] = (stbi_uc)c; -; 3859 : else { -; 3860 : stbi_uc fill = 0; -; 3861 : if (c == 16) { -; 3862 : c = stbi__zreceive(a, 2) + 3; -; 3863 : if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3864 : fill = lencodes[n - 1]; -; 3865 : } -; 3866 : else if (c == 17) { -; 3867 : c = stbi__zreceive(a, 3) + 3; -; 3868 : } -; 3869 : else if (c == 18) { -; 3870 : c = stbi__zreceive(a, 7) + 11; -; 3871 : } -; 3872 : else { -; 3873 : return stbi__err("bad codelengths", "Corrupt PNG"); -; 3874 : } -; 3875 : if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3876 : memset(lencodes + n, fill, c); -; 3877 : n += c; -; 3878 : } -; 3879 : } -; 3880 : if (n != ntot) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3881 : if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; -; 3882 : if (!stbi__zbuild_huffman(&a->z_distance, lencodes + hlit, hdist)) return 0; -; 3883 : return 1; -; 3884 : } -; 3885 : -; 3886 : static int stbi__parse_uncompressed_block(stbi__zbuf* a) -; 3887 : { -; 3888 : stbi_uc header[4]; -; 3889 : int len, nlen, k; -; 3890 : if (a->num_bits & 7) -; 3891 : stbi__zreceive(a, a->num_bits & 7); // discard -; 3892 : // drain the bit-packed data into header -; 3893 : k = 0; -; 3894 : while (a->num_bits > 0) { -; 3895 : header[k++] = (stbi_uc)(a->code_buffer & 255); // suppress MSVC run-time check -; 3896 : a->code_buffer >>= 8; -; 3897 : a->num_bits -= 8; -; 3898 : } -; 3899 : if (a->num_bits < 0) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3900 : // now fill header the normal way -; 3901 : while (k < 4) -; 3902 : header[k++] = stbi__zget8(a); -; 3903 : len = header[1] * 256 + header[0]; -; 3904 : nlen = header[3] * 256 + header[2]; -; 3905 : if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3906 : if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG"); -; 3907 : if (a->zout + len > a->zout_end) -; 3908 : if (!stbi__zexpand(a, a->zout, len)) return 0; -; 3909 : memcpy(a->zout, a->zbuffer, len); -; 3910 : a->zbuffer += len; -; 3911 : a->zout += len; -; 3912 : return 1; -; 3913 : } -; 3914 : -; 3915 : static int stbi__parse_zlib_header(stbi__zbuf* a) -; 3916 : { -; 3917 : int cmf = stbi__zget8(a); -; 3918 : int cm = cmf & 15; -; 3919 : /* int cinfo = cmf >> 4; */ -; 3920 : int flg = stbi__zget8(a); -; 3921 : if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3922 : if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png -; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png -; 3925 : // window = 1 << (8 + cinfo)... but who cares, we fully buffer output -; 3926 : return 1; -; 3927 : } -; 3928 : -; 3929 : static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] = -; 3930 : { -; 3931 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3932 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3933 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3934 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3935 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3936 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3937 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3938 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3939 : 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 -; 3940 : }; -; 3941 : static const stbi_uc stbi__zdefault_distance[32] = -; 3942 : { -; 3943 : 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 -; 3944 : }; -; 3945 : /* -; 3946 : Init algorithm: -; 3947 : { -; 3948 : int i; // use <= to match clearly with spec -; 3949 : for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; -; 3950 : for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; -; 3951 : for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; -; 3952 : for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; -; 3953 : -; 3954 : for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; -; 3955 : } -; 3956 : */ -; 3957 : -; 3958 : static int stbi__parse_zlib(stbi__zbuf* a, int parse_header) -; 3959 : { -; 3960 : int final, type; -; 3961 : if (parse_header) -; 3962 : if (!stbi__parse_zlib_header(a)) return 0; -; 3963 : a->num_bits = 0; -; 3964 : a->code_buffer = 0; -; 3965 : do { -; 3966 : final = stbi__zreceive(a, 1); -; 3967 : type = stbi__zreceive(a, 2); -; 3968 : if (type == 0) { -; 3969 : if (!stbi__parse_uncompressed_block(a)) return 0; -; 3970 : } -; 3971 : else if (type == 3) { -; 3972 : return 0; -; 3973 : } -; 3974 : else { -; 3975 : if (type == 1) { -; 3976 : // use fixed code lengths -; 3977 : if (!stbi__zbuild_huffman(&a->z_length, stbi__zdefault_length, STBI__ZNSYMS)) return 0; -; 3978 : if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; -; 3979 : } -; 3980 : else { -; 3981 : if (!stbi__compute_huffman_codes(a)) return 0; -; 3982 : } -; 3983 : if (!stbi__parse_huffman_block(a)) return 0; -; 3984 : } -; 3985 : } while (!final); -; 3986 : return 1; -; 3987 : } -; 3988 : -; 3989 : static int stbi__do_zlib(stbi__zbuf* a, char* obuf, int olen, int exp, int parse_header) -; 3990 : { -; 3991 : a->zout_start = obuf; -; 3992 : a->zout = obuf; -; 3993 : a->zout_end = obuf + olen; -; 3994 : a->z_expandable = exp; -; 3995 : -; 3996 : return stbi__parse_zlib(a, parse_header); -; 3997 : } -; 3998 : -; 3999 : STBIDEF char* stbi_zlib_decode_malloc_guesssize(const char* buffer, int len, int initial_size, int* outlen) -; 4000 : { -; 4001 : stbi__zbuf a; -; 4002 : char* p = (char*)stbi__malloc(initial_size); -; 4003 : if (p == NULL) return NULL; -; 4004 : a.zbuffer = (stbi_uc*)buffer; -; 4005 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4006 : if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { -; 4007 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4008 : return a.zout_start; -; 4009 : } -; 4010 : else { -; 4011 : STBI_FREE(a.zout_start); -; 4012 : return NULL; -; 4013 : } -; 4014 : } -; 4015 : -; 4016 : STBIDEF char* stbi_zlib_decode_malloc(char const* buffer, int len, int* outlen) -; 4017 : { -; 4018 : return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); -; 4019 : } -; 4020 : -; 4021 : STBIDEF char* stbi_zlib_decode_malloc_guesssize_headerflag(const char* buffer, int len, int initial_size, int* outlen, int parse_header) -; 4022 : { -; 4023 : stbi__zbuf a; -; 4024 : char* p = (char*)stbi__malloc(initial_size); -; 4025 : if (p == NULL) return NULL; -; 4026 : a.zbuffer = (stbi_uc*)buffer; -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4028 : if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { -; 4029 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4030 : return a.zout_start; -; 4031 : } -; 4032 : else { -; 4033 : STBI_FREE(a.zout_start); -; 4034 : return NULL; -; 4035 : } -; 4036 : } -; 4037 : -; 4038 : STBIDEF int stbi_zlib_decode_buffer(char* obuffer, int olen, char const* ibuffer, int ilen) -; 4039 : { -; 4040 : stbi__zbuf a; -; 4041 : a.zbuffer = (stbi_uc*)ibuffer; -; 4042 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4043 : if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) -; 4044 : return (int)(a.zout - a.zout_start); -; 4045 : else -; 4046 : return -1; -; 4047 : } -; 4048 : -; 4049 : STBIDEF char* stbi_zlib_decode_noheader_malloc(char const* buffer, int len, int* outlen) -; 4050 : { -; 4051 : stbi__zbuf a; -; 4052 : char* p = (char*)stbi__malloc(16384); -; 4053 : if (p == NULL) return NULL; -; 4054 : a.zbuffer = (stbi_uc*)buffer; -; 4055 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4056 : if (stbi__do_zlib(&a, p, 16384, 1, 0)) { -; 4057 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4058 : return a.zout_start; -; 4059 : } -; 4060 : else { -; 4061 : STBI_FREE(a.zout_start); -; 4062 : return NULL; -; 4063 : } -; 4064 : } -; 4065 : -; 4066 : STBIDEF int stbi_zlib_decode_noheader_buffer(char* obuffer, int olen, const char* ibuffer, int ilen) -; 4067 : { -; 4068 : stbi__zbuf a; -; 4069 : a.zbuffer = (stbi_uc*)ibuffer; -; 4070 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4071 : if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) -; 4072 : return (int)(a.zout - a.zout_start); -; 4073 : else -; 4074 : return -1; -; 4075 : } -; 4076 : #endif -; 4077 : -; 4078 : // public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 -; 4079 : // simple implementation -; 4080 : // - only 8-bit samples -; 4081 : // - no CRC checking -; 4082 : // - allocates lots of intermediate memory -; 4083 : // - avoids problem of streaming data between subsystems -; 4084 : // - avoids explicit window management -; 4085 : // performance -; 4086 : // - uses stb_zlib, a PD zlib implementation with fast huffman decoding -; 4087 : -; 4088 : #ifndef STBI_NO_PNG -; 4089 : typedef struct -; 4090 : { -; 4091 : stbi__uint32 length; -; 4092 : stbi__uint32 type; -; 4093 : } stbi__pngchunk; -; 4094 : -; 4095 : static stbi__pngchunk stbi__get_chunk_header(stbi__context* s) -; 4096 : { -; 4097 : stbi__pngchunk c; -; 4098 : c.length = stbi__get32be(s); -; 4099 : c.type = stbi__get32be(s); -; 4100 : return c; -; 4101 : } -; 4102 : -; 4103 : static int stbi__check_png_header(stbi__context* s) -; 4104 : { -; 4105 : static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; -; 4106 : int i; -; 4107 : for (i = 0; i < 8; ++i) -; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); -; 4109 : return 1; -; 4110 : } -; 4111 : -; 4112 : typedef struct -; 4113 : { -; 4114 : stbi__context* s; -; 4115 : stbi_uc* idata, * expanded, * out; -; 4116 : int depth; -; 4117 : } stbi__png; -; 4118 : -; 4119 : enum { -; 4120 : STBI__F_none = 0, -; 4121 : STBI__F_sub = 1, -; 4122 : STBI__F_up = 2, -; 4123 : STBI__F_avg = 3, -; 4124 : STBI__F_paeth = 4, -; 4125 : // synthetic filters used for first scanline to avoid needing a dummy row of 0s -; 4126 : STBI__F_avg_first, -; 4127 : STBI__F_paeth_first -; 4128 : }; -; 4129 : -; 4130 : static stbi_uc first_row_filter[5] = -; 4131 : { -; 4132 : STBI__F_none, -; 4133 : STBI__F_sub, -; 4134 : STBI__F_none, -; 4135 : STBI__F_avg_first, -; 4136 : STBI__F_paeth_first -; 4137 : }; -; 4138 : -; 4139 : static int stbi__paeth(int a, int b, int c) -; 4140 : { -; 4141 : int p = a + b - c; -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); -; 4144 : int pc = abs(p - c); -; 4145 : if (pa <= pb && pa <= pc) return a; -; 4146 : if (pb <= pc) return b; -; 4147 : return c; -; 4148 : } -; 4149 : -; 4150 : static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; -; 4151 : -; 4152 : // create the png data from post-deflated data -; 4153 : static int stbi__create_png_image_raw(stbi__png* a, stbi_uc* raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -; 4154 : { -; 4155 : int bytes = (depth == 16 ? 2 : 1); -; 4156 : stbi__context* s = a->s; -; 4157 : stbi__uint32 i, j, stride = x * out_n * bytes; -; 4158 : stbi__uint32 img_len, img_width_bytes; -; 4159 : int k; -; 4160 : int img_n = s->img_n; // copy it into a local for later -; 4161 : -; 4162 : int output_bytes = out_n * bytes; -; 4163 : int filter_bytes = img_n * bytes; -; 4164 : int width = x; -; 4165 : -; 4166 : STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1); -; 4167 : a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into -; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); -; 4169 : -; 4170 : if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); -; 4171 : img_width_bytes = (((img_n * x * depth) + 7) >> 3); -; 4172 : img_len = (img_width_bytes + 1) * y; -; 4173 : -; 4174 : // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, -; 4175 : // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), -; 4176 : // so just check for raw_len < img_len always. -; 4177 : if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG"); -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { -; 4180 : stbi_uc* cur = a->out + stride * j; -; 4181 : stbi_uc* prior; -; 4182 : int filter = *raw++; -; 4183 : -; 4184 : if (filter > 4) -; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); -; 4186 : -; 4187 : if (depth < 8) { -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); -; 4189 : cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place -; 4190 : filter_bytes = 1; -; 4191 : width = img_width_bytes; -; 4192 : } -; 4193 : prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above -; 4194 : -; 4195 : // if first row, use special filter that doesn't sample previous row -; 4196 : if (j == 0) filter = first_row_filter[filter]; -; 4197 : -; 4198 : // handle first byte explicitly -; 4199 : for (k = 0; k < filter_bytes; ++k) { -; 4200 : switch (filter) { -; 4201 : case STBI__F_none: cur[k] = raw[k]; break; -; 4202 : case STBI__F_sub: cur[k] = raw[k]; break; -; 4203 : case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; -; 4204 : case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break; -; 4205 : case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break; -; 4206 : case STBI__F_avg_first: cur[k] = raw[k]; break; -; 4207 : case STBI__F_paeth_first: cur[k] = raw[k]; break; -; 4208 : } -; 4209 : } -; 4210 : -; 4211 : if (depth == 8) { -; 4212 : if (img_n != out_n) -; 4213 : cur[img_n] = 255; // first pixel -; 4214 : raw += img_n; -; 4215 : cur += out_n; -; 4216 : prior += out_n; -; 4217 : } -; 4218 : else if (depth == 16) { -; 4219 : if (img_n != out_n) { -; 4220 : cur[filter_bytes] = 255; // first pixel top byte -; 4221 : cur[filter_bytes + 1] = 255; // first pixel bottom byte -; 4222 : } -; 4223 : raw += filter_bytes; -; 4224 : cur += output_bytes; -; 4225 : prior += output_bytes; -; 4226 : } -; 4227 : else { -; 4228 : raw += 1; -; 4229 : cur += 1; -; 4230 : prior += 1; -; 4231 : } -; 4232 : -; 4233 : // this is a little gross, so that we don't switch per-pixel or per-component -; 4234 : if (depth < 8 || img_n == out_n) { -; 4235 : int nk = (width - 1) * filter_bytes; -; 4236 : #define STBI__CASE(f) \ -; 4237 : case f: \ -; 4238 : for (k=0; k < nk; ++k) -; 4239 : switch (filter) { -; 4240 : // "none" filter turns into a memcpy here; make that explicit. -; 4241 : case STBI__F_none: memcpy(cur, raw, nk); break; -; 4242 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break; -; 4243 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4244 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break; -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; -; 4246 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break; -; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; -; 4248 : } -; 4249 : #undef STBI__CASE -; 4250 : raw += nk; -; 4251 : } -; 4252 : else { -; 4253 : STBI_ASSERT(img_n + 1 == out_n); -; 4254 : #define STBI__CASE(f) \ -; 4255 : case f: \ -; 4256 : for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ -; 4257 : for (k=0; k < filter_bytes; ++k) -; 4258 : switch (filter) { -; 4259 : STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; -; 4260 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break; -; 4261 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4262 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break; -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; -; 4264 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break; -; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; -; 4266 : } -; 4267 : #undef STBI__CASE -; 4268 : -; 4269 : // the loop above sets the high byte of the pixels' alpha, but for -; 4270 : // 16 bit png files we also need the low byte set. we'll do that here. -; 4271 : if (depth == 16) { -; 4272 : cur = a->out + stride * j; // start at the beginning of the row again -; 4273 : for (i = 0; i < x; ++i, cur += output_bytes) { -; 4274 : cur[filter_bytes + 1] = 255; -; 4275 : } -; 4276 : } -; 4277 : } -; 4278 : } -; 4279 : -; 4280 : // we make a separate pass to expand bits to pixels; for performance, -; 4281 : // this could run two scanlines behind the above code, so it won't -; 4282 : // intefere with filtering but will still be in the cache. -; 4283 : if (depth < 8) { -; 4284 : for (j = 0; j < y; ++j) { -; 4285 : stbi_uc* cur = a->out + stride * j; -; 4286 : stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes; -; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit -; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop -; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range -; 4290 : -; 4291 : // note that the final byte might overshoot and write more data than desired. -; 4292 : // we can allocate enough data that this never writes out of memory, but it -; 4293 : // could also overwrite the next scanline. can it overwrite non-empty data -; 4294 : // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. -; 4295 : // so we need to explicitly clamp the final ones -; 4296 : -; 4297 : if (depth == 4) { -; 4298 : for (k = x * img_n; k >= 2; k -= 2, ++in) { -; 4299 : *cur++ = scale * ((*in >> 4)); -; 4300 : *cur++ = scale * ((*in) & 0x0f); -; 4301 : } -; 4302 : if (k > 0) *cur++ = scale * ((*in >> 4)); -; 4303 : } -; 4304 : else if (depth == 2) { -; 4305 : for (k = x * img_n; k >= 4; k -= 4, ++in) { -; 4306 : *cur++ = scale * ((*in >> 6)); -; 4307 : *cur++ = scale * ((*in >> 4) & 0x03); -; 4308 : *cur++ = scale * ((*in >> 2) & 0x03); -; 4309 : *cur++ = scale * ((*in) & 0x03); -; 4310 : } -; 4311 : if (k > 0) *cur++ = scale * ((*in >> 6)); -; 4312 : if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); -; 4313 : if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); -; 4314 : } -; 4315 : else if (depth == 1) { -; 4316 : for (k = x * img_n; k >= 8; k -= 8, ++in) { -; 4317 : *cur++ = scale * ((*in >> 7)); -; 4318 : *cur++ = scale * ((*in >> 6) & 0x01); -; 4319 : *cur++ = scale * ((*in >> 5) & 0x01); -; 4320 : *cur++ = scale * ((*in >> 4) & 0x01); -; 4321 : *cur++ = scale * ((*in >> 3) & 0x01); -; 4322 : *cur++ = scale * ((*in >> 2) & 0x01); -; 4323 : *cur++ = scale * ((*in >> 1) & 0x01); -; 4324 : *cur++ = scale * ((*in) & 0x01); -; 4325 : } -; 4326 : if (k > 0) *cur++ = scale * ((*in >> 7)); -; 4327 : if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); -; 4328 : if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); -; 4329 : if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); -; 4330 : if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); -; 4331 : if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); -; 4332 : if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); -; 4333 : } -; 4334 : if (img_n != out_n) { -; 4335 : int q; -; 4336 : // insert alpha = 255 -; 4337 : cur = a->out + stride * j; -; 4338 : if (img_n == 1) { -; 4339 : for (q = x - 1; q >= 0; --q) { -; 4340 : cur[q * 2 + 1] = 255; -; 4341 : cur[q * 2 + 0] = cur[q]; -; 4342 : } -; 4343 : } -; 4344 : else { -; 4345 : STBI_ASSERT(img_n == 3); -; 4346 : for (q = x - 1; q >= 0; --q) { -; 4347 : cur[q * 4 + 3] = 255; -; 4348 : cur[q * 4 + 2] = cur[q * 3 + 2]; -; 4349 : cur[q * 4 + 1] = cur[q * 3 + 1]; -; 4350 : cur[q * 4 + 0] = cur[q * 3 + 0]; -; 4351 : } -; 4352 : } -; 4353 : } -; 4354 : } -; 4355 : } -; 4356 : else if (depth == 16) { -; 4357 : // force the image data from big-endian to platform-native. -; 4358 : // this is done in a separate pass due to the decoding relying -; 4359 : // on the data being untouched, but could probably be done -; 4360 : // per-line during decode if care is taken. -; 4361 : stbi_uc* cur = a->out; -; 4362 : stbi__uint16* cur16 = (stbi__uint16*)cur; -; 4363 : -; 4364 : for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) { -; 4365 : *cur16 = (cur[0] << 8) | cur[1]; -; 4366 : } -; 4367 : } -; 4368 : -; 4369 : return 1; -; 4370 : } -; 4371 : -; 4372 : static int stbi__create_png_image(stbi__png* a, stbi_uc* image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -; 4373 : { -; 4374 : int bytes = (depth == 16 ? 2 : 1); -; 4375 : int out_bytes = out_n * bytes; -; 4376 : stbi_uc* final; -; 4377 : int p; -; 4378 : if (!interlaced) -; 4379 : return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); -; 4380 : -; 4381 : // de-interlacing -; 4382 : final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); -; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); -; 4384 : for (p = 0; p < 7; ++p) { -; 4385 : int xorig[] = { 0,4,0,2,0,1,0 }; -; 4386 : int yorig[] = { 0,0,4,0,2,0,1 }; -; 4387 : int xspc[] = { 8,8,4,4,2,2,1 }; -; 4388 : int yspc[] = { 8,8,8,4,4,2,2 }; -; 4389 : int i, j, x, y; -; 4390 : // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 -; 4391 : x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p]; -; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; -; 4393 : if (x && y) { -; 4394 : stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; -; 4395 : if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { -; 4396 : STBI_FREE(final); -; 4397 : return 0; -; 4398 : } -; 4399 : for (j = 0; j < y; ++j) { -; 4400 : for (i = 0; i < x; ++i) { -; 4401 : int out_y = j * yspc[p] + yorig[p]; -; 4402 : int out_x = i * xspc[p] + xorig[p]; -; 4403 : memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, -; 4404 : a->out + (j * x + i) * out_bytes, out_bytes); -; 4405 : } -; 4406 : } -; 4407 : STBI_FREE(a->out); -; 4408 : image_data += img_len; -; 4409 : image_data_len -= img_len; -; 4410 : } -; 4411 : } -; 4412 : a->out = final; -; 4413 : -; 4414 : return 1; -; 4415 : } -; 4416 : -; 4417 : static int stbi__compute_transparency(stbi__png* z, stbi_uc tc[3], int out_n) -; 4418 : { -; 4419 : stbi__context* s = z->s; -; 4420 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4421 : stbi_uc* p = z->out; -; 4422 : -; 4423 : // compute color-based transparency, assuming we've -; 4424 : // already got 255 as the alpha value in the output -; 4425 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4426 : -; 4427 : if (out_n == 2) { -; 4428 : for (i = 0; i < pixel_count; ++i) { -; 4429 : p[1] = (p[0] == tc[0] ? 0 : 255); -; 4430 : p += 2; -; 4431 : } -; 4432 : } -; 4433 : else { -; 4434 : for (i = 0; i < pixel_count; ++i) { -; 4435 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4436 : p[3] = 0; -; 4437 : p += 4; -; 4438 : } -; 4439 : } -; 4440 : return 1; -; 4441 : } -; 4442 : -; 4443 : static int stbi__compute_transparency16(stbi__png* z, stbi__uint16 tc[3], int out_n) -; 4444 : { -; 4445 : stbi__context* s = z->s; -; 4446 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4447 : stbi__uint16* p = (stbi__uint16*)z->out; -; 4448 : -; 4449 : // compute color-based transparency, assuming we've -; 4450 : // already got 65535 as the alpha value in the output -; 4451 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4452 : -; 4453 : if (out_n == 2) { -; 4454 : for (i = 0; i < pixel_count; ++i) { -; 4455 : p[1] = (p[0] == tc[0] ? 0 : 65535); -; 4456 : p += 2; -; 4457 : } -; 4458 : } -; 4459 : else { -; 4460 : for (i = 0; i < pixel_count; ++i) { -; 4461 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4462 : p[3] = 0; -; 4463 : p += 4; -; 4464 : } -; 4465 : } -; 4466 : return 1; -; 4467 : } -; 4468 : -; 4469 : static int stbi__expand_png_palette(stbi__png* a, stbi_uc* palette, int len, int pal_img_n) -; 4470 : { -; 4471 : stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; -; 4472 : stbi_uc* p, * temp_out, * orig = a->out; -; 4473 : -; 4474 : p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0); -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4476 : -; 4477 : // between here and free(out) below, exitting would leak -; 4478 : temp_out = p; -; 4479 : -; 4480 : if (pal_img_n == 3) { -; 4481 : for (i = 0; i < pixel_count; ++i) { -; 4482 : int n = orig[i] * 4; -; 4483 : p[0] = palette[n]; -; 4484 : p[1] = palette[n + 1]; -; 4485 : p[2] = palette[n + 2]; -; 4486 : p += 3; -; 4487 : } -; 4488 : } -; 4489 : else { -; 4490 : for (i = 0; i < pixel_count; ++i) { -; 4491 : int n = orig[i] * 4; -; 4492 : p[0] = palette[n]; -; 4493 : p[1] = palette[n + 1]; -; 4494 : p[2] = palette[n + 2]; -; 4495 : p[3] = palette[n + 3]; -; 4496 : p += 4; -; 4497 : } -; 4498 : } -; 4499 : STBI_FREE(a->out); -; 4500 : a->out = temp_out; -; 4501 : -; 4502 : STBI_NOTUSED(len); -; 4503 : -; 4504 : return 1; -; 4505 : } -; 4506 : -; 4507 : static int stbi__unpremultiply_on_load_global = 0; -; 4508 : static int stbi__de_iphone_flag_global = 0; -; 4509 : -; 4510 : STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) -; 4511 : { -; 4512 : stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; -; 4513 : } -; 4514 : -; 4515 : STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) -; 4516 : { -; 4517 : stbi__de_iphone_flag_global = flag_true_if_should_convert; -; 4518 : } -; 4519 : -; 4520 : #ifndef STBI_THREAD_LOCAL -; 4521 : #define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global -; 4522 : #define stbi__de_iphone_flag stbi__de_iphone_flag_global -; 4523 : #else -; 4524 : static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; -; 4525 : static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; -; 4526 : -; 4527 : STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) -; 4528 : { -; 4529 : stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; -; 4530 : stbi__unpremultiply_on_load_set = 1; -; 4531 : } -; 4532 : -; 4533 : STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert) -; 4534 : { -; 4535 : stbi__de_iphone_flag_local = flag_true_if_should_convert; -; 4536 : stbi__de_iphone_flag_set = 1; -; 4537 : } -; 4538 : -; 4539 : #define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \ -; 4540 : ? stbi__unpremultiply_on_load_local \ -; 4541 : : stbi__unpremultiply_on_load_global) -; 4542 : #define stbi__de_iphone_flag (stbi__de_iphone_flag_set \ -; 4543 : ? stbi__de_iphone_flag_local \ -; 4544 : : stbi__de_iphone_flag_global) -; 4545 : #endif // STBI_THREAD_LOCAL -; 4546 : -; 4547 : static void stbi__de_iphone(stbi__png* z) -; 4548 : { -; 4549 : stbi__context* s = z->s; -; 4550 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4551 : stbi_uc* p = z->out; -; 4552 : -; 4553 : if (s->img_out_n == 3) { // convert bgr to rgb -; 4554 : for (i = 0; i < pixel_count; ++i) { -; 4555 : stbi_uc t = p[0]; -; 4556 : p[0] = p[2]; -; 4557 : p[2] = t; -; 4558 : p += 3; -; 4559 : } -; 4560 : } -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { -; 4566 : stbi_uc a = p[3]; -; 4567 : stbi_uc t = p[0]; -; 4568 : if (a) { -; 4569 : stbi_uc half = a / 2; -; 4570 : p[0] = (p[2] * 255 + half) / a; -; 4571 : p[1] = (p[1] * 255 + half) / a; -; 4572 : p[2] = (t * 255 + half) / a; -; 4573 : } -; 4574 : else { -; 4575 : p[0] = p[2]; -; 4576 : p[2] = t; -; 4577 : } -; 4578 : p += 4; -; 4579 : } -; 4580 : } -; 4581 : else { -; 4582 : // convert bgr to rgb -; 4583 : for (i = 0; i < pixel_count; ++i) { -; 4584 : stbi_uc t = p[0]; -; 4585 : p[0] = p[2]; -; 4586 : p[2] = t; -; 4587 : p += 4; -; 4588 : } -; 4589 : } -; 4590 : } -; 4591 : } -; 4592 : -; 4593 : #define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) -; 4594 : -; 4595 : static int stbi__parse_png_file(stbi__png* z, int scan, int req_comp) -; 4596 : { -; 4597 : stbi_uc palette[1024], pal_img_n = 0; -; 4598 : stbi_uc has_trans = 0, tc[3] = { 0 }; -; 4599 : stbi__uint16 tc16[3]; -; 4600 : stbi__uint32 ioff = 0, idata_limit = 0, i, pal_len = 0; -; 4601 : int first = 1, k, interlace = 0, color = 0, is_iphone = 0; -; 4602 : stbi__context* s = z->s; -; 4603 : -; 4604 : z->expanded = NULL; -; 4605 : z->idata = NULL; -; 4606 : z->out = NULL; -; 4607 : -; 4608 : if (!stbi__check_png_header(s)) return 0; -; 4609 : -; 4610 : if (scan == STBI__SCAN_type) return 1; -; 4611 : -; 4612 : for (;;) { -; 4613 : stbi__pngchunk c = stbi__get_chunk_header(s); -; 4614 : switch (c.type) { -; 4615 : case STBI__PNG_TYPE('C', 'g', 'B', 'I'): -; 4616 : is_iphone = 1; -; 4617 : stbi__skip(s, c.length); -; 4618 : break; -; 4619 : case STBI__PNG_TYPE('I', 'H', 'D', 'R'): { -; 4620 : int comp, filter; -; 4621 : if (!first) return stbi__err("multiple IHDR", "Corrupt PNG"); -; 4622 : first = 0; -; 4623 : if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG"); -; 4624 : s->img_x = stbi__get32be(s); -; 4625 : s->img_y = stbi__get32be(s); -; 4626 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4627 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4628 : z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only"); -; 4629 : color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype", "Corrupt PNG"); -; 4630 : if (color == 3 && z->depth == 16) return stbi__err("bad ctype", "Corrupt PNG"); -; 4631 : if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype", "Corrupt PNG"); -; 4632 : comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG"); -; 4633 : filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG"); -; 4634 : interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG"); -; 4635 : if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG"); -; 4636 : if (!pal_img_n) { -; 4637 : s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); -; 4638 : if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); -; 4639 : } -; 4640 : else { -; 4641 : // if paletted, then pal_n is our final components, and -; 4642 : // img_n is # components to decompress/filter. -; 4643 : s->img_n = 1; -; 4644 : if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large", "Corrupt PNG"); -; 4645 : } -; 4646 : // even with SCAN_header, have to scan to see if we have a tRNS -; 4647 : break; -; 4648 : } -; 4649 : -; 4650 : case STBI__PNG_TYPE('P', 'L', 'T', 'E'): { -; 4651 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4652 : if (c.length > 256 * 3) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4653 : pal_len = c.length / 3; -; 4654 : if (pal_len * 3 != c.length) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4655 : for (i = 0; i < pal_len; ++i) { -; 4656 : palette[i * 4 + 0] = stbi__get8(s); -; 4657 : palette[i * 4 + 1] = stbi__get8(s); -; 4658 : palette[i * 4 + 2] = stbi__get8(s); -; 4659 : palette[i * 4 + 3] = 255; -; 4660 : } -; 4661 : break; -; 4662 : } -; 4663 : -; 4664 : case STBI__PNG_TYPE('t', 'R', 'N', 'S'): { -; 4665 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4666 : if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG"); -; 4667 : if (pal_img_n) { -; 4668 : if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } -; 4669 : if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG"); -; 4670 : if (c.length > pal_len) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4671 : pal_img_n = 4; -; 4672 : for (i = 0; i < c.length; ++i) -; 4673 : palette[i * 4 + 3] = stbi__get8(s); -; 4674 : } -; 4675 : else { -; 4676 : if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG"); -; 4677 : if (c.length != (stbi__uint32)s->img_n * 2) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4678 : has_trans = 1; -; 4679 : // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. -; 4680 : if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } -; 4681 : if (z->depth == 16) { -; 4682 : for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is -; 4683 : } -; 4684 : else { -; 4685 : for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger -; 4686 : } -; 4687 : } -; 4688 : break; -; 4689 : } -; 4690 : -; 4691 : case STBI__PNG_TYPE('I', 'D', 'A', 'T'): { -; 4692 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4693 : if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG"); -; 4694 : if (scan == STBI__SCAN_header) { -; 4695 : // header scan definitely stops at first IDAT -; 4696 : if (pal_img_n) -; 4697 : s->img_n = pal_img_n; -; 4698 : return 1; -; 4699 : } -; 4700 : if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); -; 4701 : if ((int)(ioff + c.length) < (int)ioff) return 0; -; 4702 : if (ioff + c.length > idata_limit) { -; 4703 : stbi__uint32 idata_limit_old = idata_limit; -; 4704 : stbi_uc* p; -; 4705 : if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; -; 4706 : while (ioff + c.length > idata_limit) -; 4707 : idata_limit *= 2; -; 4708 : STBI_NOTUSED(idata_limit_old); -; 4709 : p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4710 : z->idata = p; -; 4711 : } -; 4712 : if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG"); -; 4713 : ioff += c.length; -; 4714 : break; -; 4715 : } -; 4716 : -; 4717 : case STBI__PNG_TYPE('I', 'E', 'N', 'D'): { -; 4718 : stbi__uint32 raw_len, bpl; -; 4719 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4720 : if (scan != STBI__SCAN_load) return 1; -; 4721 : if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG"); -; 4722 : // initial guess for decoded data size to avoid unnecessary reallocs -; 4723 : bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component -; 4724 : raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); -; 4726 : if (z->expanded == NULL) return 0; // zlib should set error -; 4727 : STBI_FREE(z->idata); z->idata = NULL; -; 4728 : if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans) -; 4729 : s->img_out_n = s->img_n + 1; -; 4730 : else -; 4731 : s->img_out_n = s->img_n; -; 4732 : if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; -; 4733 : if (has_trans) { -; 4734 : if (z->depth == 16) { -; 4735 : if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; -; 4736 : } -; 4737 : else { -; 4738 : if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; -; 4739 : } -; 4740 : } -; 4741 : if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) -; 4742 : stbi__de_iphone(z); -; 4743 : if (pal_img_n) { -; 4744 : // pal_img_n == 3 or 4 -; 4745 : s->img_n = pal_img_n; // record the actual colors we had -; 4746 : s->img_out_n = pal_img_n; -; 4747 : if (req_comp >= 3) s->img_out_n = req_comp; -; 4748 : if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) -; 4749 : return 0; -; 4750 : } -; 4751 : else if (has_trans) { -; 4752 : // non-paletted image with tRNS -> source image has (constant) alpha -; 4753 : ++s->img_n; -; 4754 : } -; 4755 : STBI_FREE(z->expanded); z->expanded = NULL; -; 4756 : // end of PNG chunk, read and skip CRC -; 4757 : stbi__get32be(s); -; 4758 : return 1; -; 4759 : } -; 4760 : -; 4761 : default: -; 4762 : // if critical, fail -; 4763 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4764 : if ((c.type & (1 << 29)) == 0) { -; 4765 : #ifndef STBI_NO_FAILURE_STRINGS -; 4766 : // not threadsafe -; 4767 : static char invalid_chunk[] = "XXXX PNG chunk not known"; -; 4768 : invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); -; 4769 : invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); -; 4770 : invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); -; 4771 : invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); -; 4772 : #endif -; 4773 : return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); -; 4774 : } -; 4775 : stbi__skip(s, c.length); -; 4776 : break; -; 4777 : } -; 4778 : // end of PNG chunk, read and skip CRC -; 4779 : stbi__get32be(s); -; 4780 : } -; 4781 : } -; 4782 : -; 4783 : static void* stbi__do_png(stbi__png* p, int* x, int* y, int* n, int req_comp, stbi__result_info* ri) -; 4784 : { -; 4785 : void* result = NULL; -; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { -; 4788 : if (p->depth <= 8) -; 4789 : ri->bits_per_channel = 8; -; 4790 : else if (p->depth == 16) -; 4791 : ri->bits_per_channel = 16; -; 4792 : else -; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); -; 4794 : result = p->out; -; 4795 : p->out = NULL; -; 4796 : if (req_comp && req_comp != p->s->img_out_n) { -; 4797 : if (ri->bits_per_channel == 8) -; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4799 : else -; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4801 : p->s->img_out_n = req_comp; -; 4802 : if (result == NULL) return result; -; 4803 : } -; 4804 : *x = p->s->img_x; -; 4805 : *y = p->s->img_y; -; 4806 : if (n) *n = p->s->img_n; -; 4807 : } -; 4808 : STBI_FREE(p->out); p->out = NULL; -; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; -; 4810 : STBI_FREE(p->idata); p->idata = NULL; -; 4811 : -; 4812 : return result; -; 4813 : } -; 4814 : -; 4815 : static void* stbi__png_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 4816 : { -; 4817 : stbi__png p; -; 4818 : p.s = s; -; 4819 : return stbi__do_png(&p, x, y, comp, req_comp, ri); -; 4820 : } -; 4821 : -; 4822 : static int stbi__png_test(stbi__context* s) -; 4823 : { -; 4824 : int r; -; 4825 : r = stbi__check_png_header(s); -; 4826 : stbi__rewind(s); -; 4827 : return r; -; 4828 : } -; 4829 : -; 4830 : static int stbi__png_info_raw(stbi__png* p, int* x, int* y, int* comp) -; 4831 : { -; 4832 : if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { -; 4833 : stbi__rewind(p->s); -; 4834 : return 0; -; 4835 : } -; 4836 : if (x) *x = p->s->img_x; -; 4837 : if (y) *y = p->s->img_y; -; 4838 : if (comp) *comp = p->s->img_n; -; 4839 : return 1; -; 4840 : } -; 4841 : -; 4842 : static int stbi__png_info(stbi__context* s, int* x, int* y, int* comp) -; 4843 : { -; 4844 : stbi__png p; -; 4845 : p.s = s; -; 4846 : return stbi__png_info_raw(&p, x, y, comp); -; 4847 : } -; 4848 : -; 4849 : static int stbi__png_is16(stbi__context* s) -; 4850 : { -; 4851 : stbi__png p; -; 4852 : p.s = s; -; 4853 : if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) -; 4854 : return 0; -; 4855 : if (p.depth != 16) { -; 4856 : stbi__rewind(p.s); -; 4857 : return 0; -; 4858 : } -; 4859 : return 1; -; 4860 : } -; 4861 : #endif -; 4862 : -; 4863 : // Microsoft/Windows BMP image -; 4864 : -; 4865 : #ifndef STBI_NO_BMP -; 4866 : static int stbi__bmp_test_raw(stbi__context* s) -; 4867 : { -; 4868 : int r; -; 4869 : int sz; -; 4870 : if (stbi__get8(s) != 'B') return 0; -; 4871 : if (stbi__get8(s) != 'M') return 0; -; 4872 : stbi__get32le(s); // discard filesize -; 4873 : stbi__get16le(s); // discard reserved -; 4874 : stbi__get16le(s); // discard reserved -; 4875 : stbi__get32le(s); // discard data offset -; 4876 : sz = stbi__get32le(s); -; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); -; 4878 : return r; -; 4879 : } -; 4880 : -; 4881 : static int stbi__bmp_test(stbi__context* s) -; 4882 : { -; 4883 : int r = stbi__bmp_test_raw(s); -; 4884 : stbi__rewind(s); -; 4885 : return r; -; 4886 : } -; 4887 : -; 4888 : // returns 0..31 for the highest set bit -; 4889 : static int stbi__high_bit(unsigned int z) -; 4890 : { -; 4891 : int n = 0; -; 4892 : if (z == 0) return -1; -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } -; 4898 : return n; -; 4899 : } -; 4900 : -; 4901 : static int stbi__bitcount(unsigned int a) -; 4902 : { -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits -; 4908 : return a & 0xff; -; 4909 : } -; 4910 : -; 4911 : // extract an arbitrarily-aligned N-bit value (N=bits) -; 4912 : // from v, and then make it 8-bits long and fractionally -; 4913 : // extend it to full full range. -; 4914 : static int stbi__shiftsigned(unsigned int v, int shift, int bits) -; 4915 : { -; 4916 : static unsigned int mul_table[9] = { -; 4917 : 0, -; 4918 : 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, -; 4919 : 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, -; 4920 : }; -; 4921 : static unsigned int shift_table[9] = { -; 4922 : 0, 0,0,1,0,2,4,6,0, -; 4923 : }; -; 4924 : if (shift < 0) -; 4925 : v <<= -shift; -; 4926 : else -; 4927 : v >>= shift; -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; -; 4932 : } -; 4933 : -; 4934 : typedef struct -; 4935 : { -; 4936 : int bpp, offset, hsz; -; 4937 : unsigned int mr, mg, mb, ma, all_a; -; 4938 : int extra_read; -; 4939 : } stbi__bmp_data; -; 4940 : -; 4941 : static int stbi__bmp_set_mask_defaults(stbi__bmp_data* info, int compress) -; 4942 : { -; 4943 : // BI_BITFIELDS specifies masks explicitly, don't override -; 4944 : if (compress == 3) -; 4945 : return 1; -; 4946 : -; 4947 : if (compress == 0) { -; 4948 : if (info->bpp == 16) { -; 4949 : info->mr = 31u << 10; -; 4950 : info->mg = 31u << 5; -; 4951 : info->mb = 31u << 0; -; 4952 : } -; 4953 : else if (info->bpp == 32) { -; 4954 : info->mr = 0xffu << 16; -; 4955 : info->mg = 0xffu << 8; -; 4956 : info->mb = 0xffu << 0; -; 4957 : info->ma = 0xffu << 24; -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 -; 4959 : } -; 4960 : else { -; 4961 : // otherwise, use defaults, which is all-0 -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; -; 4963 : } -; 4964 : return 1; -; 4965 : } -; 4966 : return 0; // error -; 4967 : } -; 4968 : -; 4969 : static void* stbi__bmp_parse_header(stbi__context* s, stbi__bmp_data* info) -; 4970 : { -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); -; 4973 : stbi__get32le(s); // discard filesize -; 4974 : stbi__get16le(s); // discard reserved -; 4975 : stbi__get16le(s); // discard reserved -; 4976 : info->offset = stbi__get32le(s); -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; -; 4979 : info->extra_read = 14; -; 4980 : -; 4981 : if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); -; 4982 : -; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); -; 4984 : if (hsz == 12) { -; 4985 : s->img_x = stbi__get16le(s); -; 4986 : s->img_y = stbi__get16le(s); -; 4987 : } -; 4988 : else { -; 4989 : s->img_x = stbi__get32le(s); -; 4990 : s->img_y = stbi__get32le(s); -; 4991 : } -; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); -; 4993 : info->bpp = stbi__get16le(s); -; 4994 : if (hsz != 12) { -; 4995 : int compress = stbi__get32le(s); -; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); -; 4997 : if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes -; 4998 : if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel -; 4999 : stbi__get32le(s); // discard sizeof -; 5000 : stbi__get32le(s); // discard hres -; 5001 : stbi__get32le(s); // discard vres -; 5002 : stbi__get32le(s); // discard colorsused -; 5003 : stbi__get32le(s); // discard max important -; 5004 : if (hsz == 40 || hsz == 56) { -; 5005 : if (hsz == 56) { -; 5006 : stbi__get32le(s); -; 5007 : stbi__get32le(s); -; 5008 : stbi__get32le(s); -; 5009 : stbi__get32le(s); -; 5010 : } -; 5011 : if (info->bpp == 16 || info->bpp == 32) { -; 5012 : if (compress == 0) { -; 5013 : stbi__bmp_set_mask_defaults(info, compress); -; 5014 : } -; 5015 : else if (compress == 3) { -; 5016 : info->mr = stbi__get32le(s); -; 5017 : info->mg = stbi__get32le(s); -; 5018 : info->mb = stbi__get32le(s); -; 5019 : info->extra_read += 12; -; 5020 : // not documented, but generated by photoshop and handled by mspaint -; 5021 : if (info->mr == info->mg && info->mg == info->mb) { -; 5022 : // ?!?!? -; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5024 : } -; 5025 : } -; 5026 : else -; 5027 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5028 : } -; 5029 : } -; 5030 : else { -; 5031 : // V4/V5 header -; 5032 : int i; -; 5033 : if (hsz != 108 && hsz != 124) -; 5034 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5035 : info->mr = stbi__get32le(s); -; 5036 : info->mg = stbi__get32le(s); -; 5037 : info->mb = stbi__get32le(s); -; 5038 : info->ma = stbi__get32le(s); -; 5039 : if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs -; 5040 : stbi__bmp_set_mask_defaults(info, compress); -; 5041 : stbi__get32le(s); // discard color space -; 5042 : for (i = 0; i < 12; ++i) -; 5043 : stbi__get32le(s); // discard color space parameters -; 5044 : if (hsz == 124) { -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; -; 5053 : } -; 5054 : -; 5055 : static void* stbi__bmp_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5056 : { -; 5057 : stbi_uc* out; -; 5058 : unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a; -; 5059 : stbi_uc pal[256][4]; -; 5060 : int psize = 0, i, j, width; -; 5061 : int flip_vertically, pad, target; -; 5062 : stbi__bmp_data info; -; 5063 : STBI_NOTUSED(ri); -; 5064 : -; 5065 : info.all_a = 255; -; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) -; 5067 : return NULL; // error code already set -; 5068 : -; 5069 : flip_vertically = ((int)s->img_y) > 0; -; 5070 : s->img_y = abs((int)s->img_y); -; 5071 : -; 5072 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5073 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5074 : -; 5075 : mr = info.mr; -; 5076 : mg = info.mg; -; 5077 : mb = info.mb; -; 5078 : ma = info.ma; -; 5079 : all_a = info.all_a; -; 5080 : -; 5081 : if (info.hsz == 12) { -; 5082 : if (info.bpp < 24) -; 5083 : psize = (info.offset - info.extra_read - 24) / 3; -; 5084 : } -; 5085 : else { -; 5086 : if (info.bpp < 16) -; 5087 : psize = (info.offset - info.extra_read - info.hsz) >> 2; -; 5088 : } -; 5089 : if (psize == 0) { -; 5090 : // accept some number of extra bytes after the header, but if the offset points either to before -; 5091 : // the header ends or implies a large amount of extra data, reject the file as malformed -; 5092 : int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); -; 5093 : int header_limit = 1024; // max we actually read is below 256 bytes currently. -; 5094 : int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. -; 5095 : if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { -; 5096 : return stbi__errpuc("bad header", "Corrupt BMP"); -; 5097 : } -; 5098 : // we established that bytes_read_so_far is positive and sensible. -; 5099 : // the first half of this test rejects offsets that are either too small positives, or -; 5100 : // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn -; 5101 : // ensures the number computed in the second half of the test can't overflow. -; 5102 : if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { -; 5103 : return stbi__errpuc("bad offset", "Corrupt BMP"); -; 5104 : } -; 5105 : else { -; 5106 : stbi__skip(s, info.offset - bytes_read_so_far); -; 5107 : } -; 5108 : } -; 5109 : -; 5110 : if (info.bpp == 24 && ma == 0xff000000) -; 5111 : s->img_n = 3; -; 5112 : else -; 5113 : s->img_n = ma ? 4 : 3; -; 5114 : if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 -; 5115 : target = req_comp; -; 5116 : else -; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert -; 5118 : -; 5119 : // sanity-check size -; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) -; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); -; 5122 : -; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); -; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5125 : if (info.bpp < 16) { -; 5126 : int z = 0; -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } -; 5128 : for (i = 0; i < psize; ++i) { -; 5129 : pal[i][2] = stbi__get8(s); -; 5130 : pal[i][1] = stbi__get8(s); -; 5131 : pal[i][0] = stbi__get8(s); -; 5132 : if (info.hsz != 12) stbi__get8(s); -; 5133 : pal[i][3] = 255; -; 5134 : } -; 5135 : stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); -; 5136 : if (info.bpp == 1) width = (s->img_x + 7) >> 3; -; 5137 : else if (info.bpp == 4) width = (s->img_x + 1) >> 1; -; 5138 : else if (info.bpp == 8) width = s->img_x; -; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } -; 5140 : pad = (-width) & 3; -; 5141 : if (info.bpp == 1) { -; 5142 : for (j = 0; j < (int)s->img_y; ++j) { -; 5143 : int bit_offset = 7, v = stbi__get8(s); -; 5144 : for (i = 0; i < (int)s->img_x; ++i) { -; 5145 : int color = (v >> bit_offset) & 0x1; -; 5146 : out[z++] = pal[color][0]; -; 5147 : out[z++] = pal[color][1]; -; 5148 : out[z++] = pal[color][2]; -; 5149 : if (target == 4) out[z++] = 255; -; 5150 : if (i + 1 == (int)s->img_x) break; -; 5151 : if ((--bit_offset) < 0) { -; 5152 : bit_offset = 7; -; 5153 : v = stbi__get8(s); -; 5154 : } -; 5155 : } -; 5156 : stbi__skip(s, pad); -; 5157 : } -; 5158 : } -; 5159 : else { -; 5160 : for (j = 0; j < (int)s->img_y; ++j) { -; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { -; 5162 : int v = stbi__get8(s), v2 = 0; -; 5163 : if (info.bpp == 4) { -; 5164 : v2 = v & 15; -; 5165 : v >>= 4; -; 5166 : } -; 5167 : out[z++] = pal[v][0]; -; 5168 : out[z++] = pal[v][1]; -; 5169 : out[z++] = pal[v][2]; -; 5170 : if (target == 4) out[z++] = 255; -; 5171 : if (i + 1 == (int)s->img_x) break; -; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; -; 5173 : out[z++] = pal[v][0]; -; 5174 : out[z++] = pal[v][1]; -; 5175 : out[z++] = pal[v][2]; -; 5176 : if (target == 4) out[z++] = 255; -; 5177 : } -; 5178 : stbi__skip(s, pad); -; 5179 : } -; 5180 : } -; 5181 : } -; 5182 : else { -; 5183 : int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0; -; 5184 : int z = 0; -; 5185 : int easy = 0; -; 5186 : stbi__skip(s, info.offset - info.extra_read - info.hsz); -; 5187 : if (info.bpp == 24) width = 3 * s->img_x; -; 5188 : else if (info.bpp == 16) width = 2 * s->img_x; -; 5189 : else /* bpp = 32 and pad = 0 */ width = 0; -; 5190 : pad = (-width) & 3; -; 5191 : if (info.bpp == 24) { -; 5192 : easy = 1; -; 5193 : } -; 5194 : else if (info.bpp == 32) { -; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) -; 5196 : easy = 2; -; 5197 : } -; 5198 : if (!easy) { -; 5199 : if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); -; 5205 : if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5206 : } -; 5207 : for (j = 0; j < (int)s->img_y; ++j) { -; 5208 : if (easy) { -; 5209 : for (i = 0; i < (int)s->img_x; ++i) { -; 5210 : unsigned char a; -; 5211 : out[z + 2] = stbi__get8(s); -; 5212 : out[z + 1] = stbi__get8(s); -; 5213 : out[z + 0] = stbi__get8(s); -; 5214 : z += 3; -; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); -; 5216 : all_a |= a; -; 5217 : if (target == 4) out[z++] = a; -; 5218 : } -; 5219 : } -; 5220 : else { -; 5221 : int bpp = info.bpp; -; 5222 : for (i = 0; i < (int)s->img_x; ++i) { -; 5223 : stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s)); -; 5224 : unsigned int a; -; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); -; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); -; 5229 : all_a |= a; -; 5230 : if (target == 4) out[z++] = STBI__BYTECAST(a); -; 5231 : } -; 5232 : } -; 5233 : stbi__skip(s, pad); -; 5234 : } -; 5235 : } -; 5236 : -; 5237 : // if alpha channel is all 0s, replace with all 255s -; 5238 : if (target == 4 && all_a == 0) -; 5239 : for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4) -; 5240 : out[i] = 255; -; 5241 : -; 5242 : if (flip_vertically) { -; 5243 : stbi_uc t; -; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { -; 5245 : stbi_uc* p1 = out + j * s->img_x * target; -; 5246 : stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target; -; 5247 : for (i = 0; i < (int)s->img_x * target; ++i) { -; 5248 : t = p1[i]; p1[i] = p2[i]; p2[i] = t; -; 5249 : } -; 5250 : } -; 5251 : } -; 5252 : -; 5253 : if (req_comp && req_comp != target) { -; 5254 : out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); -; 5255 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5256 : } -; 5257 : -; 5258 : *x = s->img_x; -; 5259 : *y = s->img_y; -; 5260 : if (comp) *comp = s->img_n; -; 5261 : return out; -; 5262 : } -; 5263 : #endif -; 5264 : -; 5265 : // Targa Truevision - TGA -; 5266 : // by Jonathan Dummer -; 5267 : #ifndef STBI_NO_TGA -; 5268 : // returns STBI_rgb or whatever, 0 on error -; 5269 : static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -; 5270 : { -; 5271 : // only RGB or RGBA (incl. 16bit) or grey allowed -; 5272 : if (is_rgb16) *is_rgb16 = 0; -; 5273 : switch (bits_per_pixel) { -; 5274 : case 8: return STBI_grey; -; 5275 : case 16: if (is_grey) return STBI_grey_alpha; -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; -; 5278 : return STBI_rgb; -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; -; 5281 : default: return 0; -; 5282 : } -; 5283 : } -; 5284 : -; 5285 : static int stbi__tga_info(stbi__context* s, int* x, int* y, int* comp) -; 5286 : { -; 5287 : int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; -; 5288 : int sz, tga_colormap_type; -; 5289 : stbi__get8(s); // discard Offset -; 5290 : tga_colormap_type = stbi__get8(s); // colormap type -; 5291 : if (tga_colormap_type > 1) { -; 5292 : stbi__rewind(s); -; 5293 : return 0; // only RGB or indexed allowed -; 5294 : } -; 5295 : tga_image_type = stbi__get8(s); // image type -; 5296 : if (tga_colormap_type == 1) { // colormapped (paletted) image -; 5297 : if (tga_image_type != 1 && tga_image_type != 9) { -; 5298 : stbi__rewind(s); -; 5299 : return 0; -; 5300 : } -; 5301 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5302 : sz = stbi__get8(s); // check bits per palette color entry -; 5303 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) { -; 5304 : stbi__rewind(s); -; 5305 : return 0; -; 5306 : } -; 5307 : stbi__skip(s, 4); // skip image x and y origin -; 5308 : tga_colormap_bpp = sz; -; 5309 : } -; 5310 : else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE -; 5311 : if ((tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11)) { -; 5312 : stbi__rewind(s); -; 5313 : return 0; // only RGB or grey allowed, +/- RLE -; 5314 : } -; 5315 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5316 : tga_colormap_bpp = 0; -; 5317 : } -; 5318 : tga_w = stbi__get16le(s); -; 5319 : if (tga_w < 1) { -; 5320 : stbi__rewind(s); -; 5321 : return 0; // test width -; 5322 : } -; 5323 : tga_h = stbi__get16le(s); -; 5324 : if (tga_h < 1) { -; 5325 : stbi__rewind(s); -; 5326 : return 0; // test height -; 5327 : } -; 5328 : tga_bits_per_pixel = stbi__get8(s); // bits per pixel -; 5329 : stbi__get8(s); // ignore alpha bits -; 5330 : if (tga_colormap_bpp != 0) { -; 5331 : if ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { -; 5332 : // when using a colormap, tga_bits_per_pixel is the size of the indexes -; 5333 : // I don't think anything but 8 or 16bit indexes makes sense -; 5334 : stbi__rewind(s); -; 5335 : return 0; -; 5336 : } -; 5337 : tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); -; 5338 : } -; 5339 : else { -; 5340 : tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); -; 5341 : } -; 5342 : if (!tga_comp) { -; 5343 : stbi__rewind(s); -; 5344 : return 0; -; 5345 : } -; 5346 : if (x) *x = tga_w; -; 5347 : if (y) *y = tga_h; -; 5348 : if (comp) *comp = tga_comp; -; 5349 : return 1; // seems to have passed everything -; 5350 : } -; 5351 : -; 5352 : static int stbi__tga_test(stbi__context* s) -; 5353 : { -; 5354 : int res = 0; -; 5355 : int sz, tga_color_type; -; 5356 : stbi__get8(s); // discard Offset -; 5357 : tga_color_type = stbi__get8(s); // color type -; 5358 : if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed -; 5359 : sz = stbi__get8(s); // image type -; 5360 : if (tga_color_type == 1) { // colormapped (paletted) image -; 5361 : if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 -; 5362 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5363 : sz = stbi__get8(s); // check bits per palette color entry -; 5364 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5365 : stbi__skip(s, 4); // skip image x and y origin -; 5366 : } -; 5367 : else { // "normal" image w/o colormap -; 5368 : if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE -; 5369 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5370 : } -; 5371 : if (stbi__get16le(s) < 1) goto errorEnd; // test width -; 5372 : if (stbi__get16le(s) < 1) goto errorEnd; // test height -; 5373 : sz = stbi__get8(s); // bits per pixel -; 5374 : if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index -; 5375 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5376 : -; 5377 : res = 1; // if we got this far, everything's good and we can return 1 instead of 0 -; 5378 : -; 5379 : errorEnd: -; 5380 : stbi__rewind(s); -; 5381 : return res; -; 5382 : } -; 5383 : -; 5384 : // read 16bit value and convert to 24bit RGB -; 5385 : static void stbi__tga_read_rgb16(stbi__context* s, stbi_uc* out) -; 5386 : { -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); -; 5397 : -; 5398 : // some people claim that the most significant bit might be used for alpha -; 5399 : // (possibly if an alpha-bit is set in the "image descriptor byte") -; 5400 : // but that only made 16bit test images completely translucent.. -; 5401 : // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -; 5402 : } -; 5403 : -; 5404 : static void* stbi__tga_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5405 : { -; 5406 : // read in the TGA header stuff -; 5407 : int tga_offset = stbi__get8(s); -; 5408 : int tga_indexed = stbi__get8(s); -; 5409 : int tga_image_type = stbi__get8(s); -; 5410 : int tga_is_RLE = 0; -; 5411 : int tga_palette_start = stbi__get16le(s); -; 5412 : int tga_palette_len = stbi__get16le(s); -; 5413 : int tga_palette_bits = stbi__get8(s); -; 5414 : int tga_x_origin = stbi__get16le(s); -; 5415 : int tga_y_origin = stbi__get16le(s); -; 5416 : int tga_width = stbi__get16le(s); -; 5417 : int tga_height = stbi__get16le(s); -; 5418 : int tga_bits_per_pixel = stbi__get8(s); -; 5419 : int tga_comp, tga_rgb16 = 0; -; 5420 : int tga_inverted = stbi__get8(s); -; 5421 : // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) -; 5422 : // image data -; 5423 : unsigned char* tga_data; -; 5424 : unsigned char* tga_palette = NULL; -; 5425 : int i, j; -; 5426 : unsigned char raw_data[4] = { 0 }; -; 5427 : int RLE_count = 0; -; 5428 : int RLE_repeating = 0; -; 5429 : int read_next_pixel = 1; -; 5430 : STBI_NOTUSED(ri); -; 5431 : STBI_NOTUSED(tga_x_origin); // @TODO -; 5432 : STBI_NOTUSED(tga_y_origin); // @TODO -; 5433 : -; 5434 : if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5435 : if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5436 : -; 5437 : // do a tiny bit of precessing -; 5438 : if (tga_image_type >= 8) -; 5439 : { -; 5440 : tga_image_type -= 8; -; 5441 : tga_is_RLE = 1; -; 5442 : } -; 5443 : tga_inverted = 1 - ((tga_inverted >> 5) & 1); -; 5444 : -; 5445 : // If I'm paletted, then I'll use the number of bits from the palette -; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); -; 5447 : else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); -; 5448 : -; 5449 : if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency -; 5450 : return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); -; 5451 : -; 5452 : // tga info -; 5453 : *x = tga_width; -; 5454 : *y = tga_height; -; 5455 : if (comp) *comp = tga_comp; -; 5456 : -; 5457 : if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) -; 5458 : return stbi__errpuc("too large", "Corrupt TGA"); -; 5459 : -; 5460 : tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); -; 5461 : if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); -; 5462 : -; 5463 : // skip to the data's starting position (offset usually = 0) -; 5464 : stbi__skip(s, tga_offset); -; 5465 : -; 5466 : if (!tga_indexed && !tga_is_RLE && !tga_rgb16) { -; 5467 : for (i = 0; i < tga_height; ++i) { -; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; -; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; -; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); -; 5471 : } -; 5472 : } -; 5473 : else { -; 5474 : // do I need to load a palette? -; 5475 : if (tga_indexed) -; 5476 : { -; 5477 : if (tga_palette_len == 0) { /* you have to have at least one entry! */ -; 5478 : STBI_FREE(tga_data); -; 5479 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5480 : } -; 5481 : -; 5482 : // any data to skip? (offset usually = 0) -; 5483 : stbi__skip(s, tga_palette_start); -; 5484 : // load the palette -; 5485 : tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); -; 5486 : if (!tga_palette) { -; 5487 : STBI_FREE(tga_data); -; 5488 : return stbi__errpuc("outofmem", "Out of memory"); -; 5489 : } -; 5490 : if (tga_rgb16) { -; 5491 : stbi_uc* pal_entry = tga_palette; -; 5492 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5493 : for (i = 0; i < tga_palette_len; ++i) { -; 5494 : stbi__tga_read_rgb16(s, pal_entry); -; 5495 : pal_entry += tga_comp; -; 5496 : } -; 5497 : } -; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { -; 5499 : STBI_FREE(tga_data); -; 5500 : STBI_FREE(tga_palette); -; 5501 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) -; 5506 : { -; 5507 : // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? -; 5508 : if (tga_is_RLE) -; 5509 : { -; 5510 : if (RLE_count == 0) -; 5511 : { -; 5512 : // yep, get the next byte as a RLE command -; 5513 : int RLE_cmd = stbi__get8(s); -; 5514 : RLE_count = 1 + (RLE_cmd & 127); -; 5515 : RLE_repeating = RLE_cmd >> 7; -; 5516 : read_next_pixel = 1; -; 5517 : } -; 5518 : else if (!RLE_repeating) -; 5519 : { -; 5520 : read_next_pixel = 1; -; 5521 : } -; 5522 : } -; 5523 : else -; 5524 : { -; 5525 : read_next_pixel = 1; -; 5526 : } -; 5527 : // OK, if I need to read a pixel, do it now -; 5528 : if (read_next_pixel) -; 5529 : { -; 5530 : // load however much data we did have -; 5531 : if (tga_indexed) -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); -; 5535 : if (pal_idx >= tga_palette_len) { -; 5536 : // invalid index -; 5537 : pal_idx = 0; -; 5538 : } -; 5539 : pal_idx *= tga_comp; -; 5540 : for (j = 0; j < tga_comp; ++j) { -; 5541 : raw_data[j] = tga_palette[pal_idx + j]; -; 5542 : } -; 5543 : } -; 5544 : else if (tga_rgb16) { -; 5545 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5546 : stbi__tga_read_rgb16(s, raw_data); -; 5547 : } -; 5548 : else { -; 5549 : // read in the data raw -; 5550 : for (j = 0; j < tga_comp; ++j) { -; 5551 : raw_data[j] = stbi__get8(s); -; 5552 : } -; 5553 : } -; 5554 : // clear the reading flag for the next pixel -; 5555 : read_next_pixel = 0; -; 5556 : } // end of reading a pixel -; 5557 : -; 5558 : // copy data -; 5559 : for (j = 0; j < tga_comp; ++j) -; 5560 : tga_data[i * tga_comp + j] = raw_data[j]; -; 5561 : -; 5562 : // in case we're in RLE mode, keep counting down -; 5563 : --RLE_count; -; 5564 : } -; 5565 : // do I need to invert the image? -; 5566 : if (tga_inverted) -; 5567 : { -; 5568 : for (j = 0; j * 2 < tga_height; ++j) -; 5569 : { -; 5570 : int index1 = j * tga_width * tga_comp; -; 5571 : int index2 = (tga_height - 1 - j) * tga_width * tga_comp; -; 5572 : for (i = tga_width * tga_comp; i > 0; --i) -; 5573 : { -; 5574 : unsigned char temp = tga_data[index1]; -; 5575 : tga_data[index1] = tga_data[index2]; -; 5576 : tga_data[index2] = temp; -; 5577 : ++index1; -; 5578 : ++index2; -; 5579 : } -; 5580 : } -; 5581 : } -; 5582 : // clear my palette, if I had one -; 5583 : if (tga_palette != NULL) -; 5584 : { -; 5585 : STBI_FREE(tga_palette); -; 5586 : } -; 5587 : } -; 5588 : -; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order -; 5590 : if (tga_comp >= 3 && !tga_rgb16) -; 5591 : { -; 5592 : unsigned char* tga_pixel = tga_data; -; 5593 : for (i = 0; i < tga_width * tga_height; ++i) -; 5594 : { -; 5595 : unsigned char temp = tga_pixel[0]; -; 5596 : tga_pixel[0] = tga_pixel[2]; -; 5597 : tga_pixel[2] = temp; -; 5598 : tga_pixel += tga_comp; -; 5599 : } -; 5600 : } -; 5601 : -; 5602 : // convert to target component count -; 5603 : if (req_comp && req_comp != tga_comp) -; 5604 : tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); -; 5605 : -; 5606 : // the things I do to get rid of an error message, and yet keep -; 5607 : // Microsoft's C compilers happy... [8^( -; 5608 : tga_palette_start = tga_palette_len = tga_palette_bits = -; 5609 : tga_x_origin = tga_y_origin = 0; -; 5610 : STBI_NOTUSED(tga_palette_start); -; 5611 : // OK, done -; 5612 : return tga_data; -; 5613 : } -; 5614 : #endif -; 5615 : -; 5616 : // ************************************************************************************************* -; 5617 : // Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB -; 5618 : -; 5619 : #ifndef STBI_NO_PSD -; 5620 : static int stbi__psd_test(stbi__context* s) -; 5621 : { -; 5622 : int r = (stbi__get32be(s) == 0x38425053); -; 5623 : stbi__rewind(s); -; 5624 : return r; -; 5625 : } -; 5626 : -; 5627 : static int stbi__psd_decode_rle(stbi__context* s, stbi_uc* p, int pixelCount) -; 5628 : { -; 5629 : int count, nleft, len; -; 5630 : -; 5631 : count = 0; -; 5632 : while ((nleft = pixelCount - count) > 0) { -; 5633 : len = stbi__get8(s); -; 5634 : if (len == 128) { -; 5635 : // No-op. -; 5636 : } -; 5637 : else if (len < 128) { -; 5638 : // Copy next len+1 bytes literally. -; 5639 : len++; -; 5640 : if (len > nleft) return 0; // corrupt data -; 5641 : count += len; -; 5642 : while (len) { -; 5643 : *p = stbi__get8(s); -; 5644 : p += 4; -; 5645 : len--; -; 5646 : } -; 5647 : } -; 5648 : else if (len > 128) { -; 5649 : stbi_uc val; -; 5650 : // Next -len+1 bytes in the dest are replicated from next source byte. -; 5651 : // (Interpret len as a negative 8-bit int.) -; 5652 : len = 257 - len; -; 5653 : if (len > nleft) return 0; // corrupt data -; 5654 : val = stbi__get8(s); -; 5655 : count += len; -; 5656 : while (len) { -; 5657 : *p = val; -; 5658 : p += 4; -; 5659 : len--; -; 5660 : } -; 5661 : } -; 5662 : } -; 5663 : -; 5664 : return 1; -; 5665 : } -; 5666 : -; 5667 : static void* stbi__psd_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc) -; 5668 : { -; 5669 : int pixelCount; -; 5670 : int channelCount, compression; -; 5671 : int channel, i; -; 5672 : int bitdepth; -; 5673 : int w, h; -; 5674 : stbi_uc* out; -; 5675 : STBI_NOTUSED(ri); -; 5676 : -; 5677 : // Check identifier -; 5678 : if (stbi__get32be(s) != 0x38425053) // "8BPS" -; 5679 : return stbi__errpuc("not PSD", "Corrupt PSD image"); -; 5680 : -; 5681 : // Check file type version. -; 5682 : if (stbi__get16be(s) != 1) -; 5683 : return stbi__errpuc("wrong version", "Unsupported version of PSD image"); -; 5684 : -; 5685 : // Skip 6 reserved bytes. -; 5686 : stbi__skip(s, 6); -; 5687 : -; 5688 : // Read the number of channels (R, G, B, A, etc). -; 5689 : channelCount = stbi__get16be(s); -; 5690 : if (channelCount < 0 || channelCount > 16) -; 5691 : return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); -; 5692 : -; 5693 : // Read the rows and columns of the image. -; 5694 : h = stbi__get32be(s); -; 5695 : w = stbi__get32be(s); -; 5696 : -; 5697 : if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5698 : if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5699 : -; 5700 : // Make sure the depth is 8 bits. -; 5701 : bitdepth = stbi__get16be(s); -; 5702 : if (bitdepth != 8 && bitdepth != 16) -; 5703 : return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); -; 5704 : -; 5705 : // Make sure the color mode is RGB. -; 5706 : // Valid options are: -; 5707 : // 0: Bitmap -; 5708 : // 1: Grayscale -; 5709 : // 2: Indexed color -; 5710 : // 3: RGB color -; 5711 : // 4: CMYK color -; 5712 : // 7: Multichannel -; 5713 : // 8: Duotone -; 5714 : // 9: Lab color -; 5715 : if (stbi__get16be(s) != 3) -; 5716 : return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); -; 5717 : -; 5718 : // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) -; 5719 : stbi__skip(s, stbi__get32be(s)); -; 5720 : -; 5721 : // Skip the image resources. (resolution, pen tool paths, etc) -; 5722 : stbi__skip(s, stbi__get32be(s)); -; 5723 : -; 5724 : // Skip the reserved data. -; 5725 : stbi__skip(s, stbi__get32be(s)); -; 5726 : -; 5727 : // Find out if the data is compressed. -; 5728 : // Known values: -; 5729 : // 0: no compression -; 5730 : // 1: RLE compressed -; 5731 : compression = stbi__get16be(s); -; 5732 : if (compression > 1) -; 5733 : return stbi__errpuc("bad compression", "PSD has an unknown compression format"); -; 5734 : -; 5735 : // Check size -; 5736 : if (!stbi__mad3sizes_valid(4, w, h, 0)) -; 5737 : return stbi__errpuc("too large", "Corrupt PSD"); -; 5738 : -; 5739 : // Create the destination image. -; 5740 : -; 5741 : if (!compression && bitdepth == 16 && bpc == 16) { -; 5742 : out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0); -; 5743 : ri->bits_per_channel = 16; -; 5744 : } -; 5745 : else -; 5746 : out = (stbi_uc*)stbi__malloc(4 * w * h); -; 5747 : -; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5749 : pixelCount = w * h; -; 5750 : -; 5751 : // Initialize the data to zero. -; 5752 : //memset( out, 0, pixelCount * 4 ); -; 5753 : -; 5754 : // Finally, the image data. -; 5755 : if (compression) { -; 5756 : // RLE as used by .PSD and .TIFF -; 5757 : // Loop until you get the number of unpacked bytes you are expecting: -; 5758 : // Read the next source byte into n. -; 5759 : // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. -; 5760 : // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. -; 5761 : // Else if n is 128, noop. -; 5762 : // Endloop -; 5763 : -; 5764 : // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, -; 5765 : // which we're going to just skip. -; 5766 : stbi__skip(s, h * channelCount * 2); -; 5767 : -; 5768 : // Read the RLE data by channel. -; 5769 : for (channel = 0; channel < 4; channel++) { -; 5770 : stbi_uc* p; -; 5771 : -; 5772 : p = out + channel; -; 5773 : if (channel >= channelCount) { -; 5774 : // Fill this channel with default data. -; 5775 : for (i = 0; i < pixelCount; i++, p += 4) -; 5776 : *p = (channel == 3 ? 255 : 0); -; 5777 : } -; 5778 : else { -; 5779 : // Read the RLE data. -; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { -; 5781 : STBI_FREE(out); -; 5782 : return stbi__errpuc("corrupt", "bad RLE data"); -; 5783 : } -; 5784 : } -; 5785 : } -; 5786 : } -; 5787 : else { -; 5788 : // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) -; 5789 : // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. -; 5790 : -; 5791 : // Read the data by channel. -; 5792 : for (channel = 0; channel < 4; channel++) { -; 5793 : if (channel >= channelCount) { -; 5794 : // Fill this channel with default data. -; 5795 : if (bitdepth == 16 && bpc == 16) { -; 5796 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5797 : stbi__uint16 val = channel == 3 ? 65535 : 0; -; 5798 : for (i = 0; i < pixelCount; i++, q += 4) -; 5799 : *q = val; -; 5800 : } -; 5801 : else { -; 5802 : stbi_uc* p = out + channel; -; 5803 : stbi_uc val = channel == 3 ? 255 : 0; -; 5804 : for (i = 0; i < pixelCount; i++, p += 4) -; 5805 : *p = val; -; 5806 : } -; 5807 : } -; 5808 : else { -; 5809 : if (ri->bits_per_channel == 16) { // output bpc -; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5811 : for (i = 0; i < pixelCount; i++, q += 4) -; 5812 : *q = (stbi__uint16)stbi__get16be(s); -; 5813 : } -; 5814 : else { -; 5815 : stbi_uc* p = out + channel; -; 5816 : if (bitdepth == 16) { // input bpc -; 5817 : for (i = 0; i < pixelCount; i++, p += 4) -; 5818 : *p = (stbi_uc)(stbi__get16be(s) >> 8); -; 5819 : } -; 5820 : else { -; 5821 : for (i = 0; i < pixelCount; i++, p += 4) -; 5822 : *p = stbi__get8(s); -; 5823 : } -; 5824 : } -; 5825 : } -; 5826 : } -; 5827 : } -; 5828 : -; 5829 : // remove weird white matte from PSD -; 5830 : if (channelCount >= 4) { -; 5831 : if (ri->bits_per_channel == 16) { -; 5832 : for (i = 0; i < w * h; ++i) { -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); -; 5841 : } -; 5842 : } -; 5843 : } -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); -; 5854 : } -; 5855 : } -; 5856 : } -; 5857 : } -; 5858 : -; 5859 : // convert to desired output format -; 5860 : if (req_comp && req_comp != 4) { -; 5861 : if (ri->bits_per_channel == 16) -; 5862 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h); -; 5863 : else -; 5864 : out = stbi__convert_format(out, 4, req_comp, w, h); -; 5865 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5866 : } -; 5867 : -; 5868 : if (comp) *comp = 4; -; 5869 : *y = h; -; 5870 : *x = w; -; 5871 : -; 5872 : return out; -; 5873 : } -; 5874 : #endif -; 5875 : -; 5876 : // ************************************************************************************************* -; 5877 : // Softimage PIC loader -; 5878 : // by Tom Seddon -; 5879 : // -; 5880 : // See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -; 5881 : // See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ -; 5882 : -; 5883 : #ifndef STBI_NO_PIC -; 5884 : static int stbi__pic_is4(stbi__context* s, const char* str) -; 5885 : { -; 5886 : int i; -; 5887 : for (i = 0; i < 4; ++i) -; 5888 : if (stbi__get8(s) != (stbi_uc)str[i]) -; 5889 : return 0; -; 5890 : -; 5891 : return 1; -; 5892 : } -; 5893 : -; 5894 : static int stbi__pic_test_core(stbi__context* s) -; 5895 : { -; 5896 : int i; -; 5897 : -; 5898 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) -; 5899 : return 0; -; 5900 : -; 5901 : for (i = 0; i < 84; ++i) -; 5902 : stbi__get8(s); -; 5903 : -; 5904 : if (!stbi__pic_is4(s, "PICT")) -; 5905 : return 0; -; 5906 : -; 5907 : return 1; -; 5908 : } -; 5909 : -; 5910 : typedef struct -; 5911 : { -; 5912 : stbi_uc size, type, channel; -; 5913 : } stbi__pic_packet; -; 5914 : -; 5915 : static stbi_uc* stbi__readval(stbi__context* s, int channel, stbi_uc* dest) -; 5916 : { -; 5917 : int mask = 0x80, i; -; 5918 : -; 5919 : for (i = 0; i < 4; ++i, mask >>= 1) { -; 5920 : if (channel & mask) { -; 5921 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "PIC file too short"); -; 5922 : dest[i] = stbi__get8(s); -; 5923 : } -; 5924 : } -; 5925 : -; 5926 : return dest; -; 5927 : } -; 5928 : -; 5929 : static void stbi__copyval(int channel, stbi_uc* dest, const stbi_uc* src) -; 5930 : { -; 5931 : int mask = 0x80, i; -; 5932 : -; 5933 : for (i = 0; i < 4; ++i, mask >>= 1) -; 5934 : if (channel & mask) - +; Line 5934 00351 40 f6 c6 20 test sil, 32 ; 00000020H 00355 74 04 je SHORT $LN153@stbi__pic_ - -; 5935 : dest[i] = src[i]; - +; Line 5935 00357 44 88 43 02 mov BYTE PTR [rbx+2], r8b $LN153@stbi__pic_: - -; 1096 : } -; 1097 : -; 1098 : return s->img_buffer >= s->img_buffer_end; -; 1099 : } -; 1100 : #endif -; 1101 : -; 1102 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) -; 1103 : // nothing -; 1104 : #else -; 1105 : static void stbi__skip(stbi__context* s, int n) -; 1106 : { -; 1107 : if (n == 0) return; // already there! -; 1108 : if (n < 0) { -; 1109 : s->img_buffer = s->img_buffer_end; -; 1110 : return; -; 1111 : } -; 1112 : if (s->io.read) { -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1114 : if (blen < n) { -; 1115 : s->img_buffer = s->img_buffer_end; -; 1116 : (s->io.skip)(s->io_user_data, n - blen); -; 1117 : return; -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; -; 1121 : } -; 1122 : #endif -; 1123 : -; 1124 : #if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) -; 1125 : // nothing -; 1126 : #else -; 1127 : static int stbi__getn(stbi__context* s, stbi_uc* buffer, int n) -; 1128 : { -; 1129 : if (s->io.read) { -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1131 : if (blen < n) { -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; -; 1139 : return res; -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { -; 1144 : memcpy(buffer, s->img_buffer, n); -; 1145 : s->img_buffer += n; -; 1146 : return 1; -; 1147 : } -; 1148 : else -; 1149 : return 0; -; 1150 : } -; 1151 : #endif -; 1152 : -; 1153 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1154 : // nothing -; 1155 : #else -; 1156 : static int stbi__get16be(stbi__context* s) -; 1157 : { -; 1158 : int z = stbi__get8(s); -; 1159 : return (z << 8) + stbi__get8(s); -; 1160 : } -; 1161 : #endif -; 1162 : -; 1163 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1164 : // nothing -; 1165 : #else -; 1166 : static stbi__uint32 stbi__get32be(stbi__context* s) -; 1167 : { -; 1168 : stbi__uint32 z = stbi__get16be(s); -; 1169 : return (z << 16) + stbi__get16be(s); -; 1170 : } -; 1171 : #endif -; 1172 : -; 1173 : #if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -; 1174 : // nothing -; 1175 : #else -; 1176 : static int stbi__get16le(stbi__context* s) -; 1177 : { -; 1178 : int z = stbi__get8(s); -; 1179 : return z + (stbi__get8(s) << 8); -; 1180 : } -; 1181 : #endif -; 1182 : -; 1183 : #ifndef STBI_NO_BMP -; 1184 : static stbi__uint32 stbi__get32le(stbi__context* s) -; 1185 : { -; 1186 : stbi__uint32 z = stbi__get16le(s); -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; -; 1188 : return z; -; 1189 : } -; 1190 : #endif -; 1191 : -; 1192 : #define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings -; 1193 : -; 1194 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1195 : // nothing -; 1196 : #else -; 1197 : ////////////////////////////////////////////////////////////////////////////// -; 1198 : // -; 1199 : // generic converter from built-in img_n to req_comp -; 1200 : // individual types do this automatically as much as possible (e.g. jpeg -; 1201 : // does all cases internally since it needs to colorspace convert anyway, -; 1202 : // and it never has alpha, so very few cases ). png can automatically -; 1203 : // interleave an alpha=255 channel, but falls back to this for other cases -; 1204 : // -; 1205 : // assume data buffer is malloced, so malloc a new one and free that one -; 1206 : // only failure mode is malloc failing -; 1207 : -; 1208 : static stbi_uc stbi__compute_y(int r, int g, int b) -; 1209 : { -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1211 : } -; 1212 : #endif -; 1213 : -; 1214 : #if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1215 : // nothing -; 1216 : #else -; 1217 : static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1218 : { -; 1219 : int i, j; -; 1220 : unsigned char* good; -; 1221 : -; 1222 : if (req_comp == img_n) return data; -; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1224 : -; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); -; 1226 : if (good == NULL) { -; 1227 : STBI_FREE(data); -; 1228 : return stbi__errpuc("outofmem", "Out of memory"); -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { -; 1232 : unsigned char* src = data + j * x * img_n; -; 1233 : unsigned char* dest = good + j * x * req_comp; -; 1234 : -; 1235 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1236 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1237 : // convert source image with img_n components to one with req_comp components; -; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1239 : switch (STBI__COMBO(img_n, req_comp)) { -; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; -; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; -; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1253 : } -; 1254 : #undef STBI__CASE -; 1255 : } -; 1256 : -; 1257 : STBI_FREE(data); -; 1258 : return good; -; 1259 : } -; 1260 : #endif -; 1261 : -; 1262 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1263 : // nothing -; 1264 : #else -; 1265 : static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -; 1266 : { -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1268 : } -; 1269 : #endif -; 1270 : -; 1271 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1272 : // nothing -; 1273 : #else -; 1274 : static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1275 : { -; 1276 : int i, j; -; 1277 : stbi__uint16* good; -; 1278 : -; 1279 : if (req_comp == img_n) return data; -; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1281 : -; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); -; 1283 : if (good == NULL) { -; 1284 : STBI_FREE(data); -; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { -; 1289 : stbi__uint16* src = data + j * x * img_n; -; 1290 : stbi__uint16* dest = good + j * x * req_comp; -; 1291 : -; 1292 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1293 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1294 : // convert source image with img_n components to one with req_comp components; -; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1296 : switch (STBI__COMBO(img_n, req_comp)) { -; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; -; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; -; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1310 : } -; 1311 : #undef STBI__CASE -; 1312 : } -; 1313 : -; 1314 : STBI_FREE(data); -; 1315 : return good; -; 1316 : } -; 1317 : #endif -; 1318 : -; 1319 : #ifndef STBI_NO_LINEAR -; 1320 : static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp) -; 1321 : { -; 1322 : int i, k, n; -; 1323 : float* output; -; 1324 : if (!data) return NULL; -; 1325 : output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0); -; 1326 : if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } -; 1327 : // compute number of non-alpha components -; 1328 : if (comp & 1) n = comp; else n = comp - 1; -; 1329 : for (i = 0; i < x * y; ++i) { -; 1330 : for (k = 0; k < n; ++k) { -; 1331 : output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale); -; 1332 : } -; 1333 : } -; 1334 : if (n < comp) { -; 1335 : for (i = 0; i < x * y; ++i) { -; 1336 : output[i * comp + n] = data[i * comp + n] / 255.0f; -; 1337 : } -; 1338 : } -; 1339 : STBI_FREE(data); -; 1340 : return output; -; 1341 : } -; 1342 : #endif -; 1343 : -; 1344 : #ifndef STBI_NO_HDR -; 1345 : #define stbi__float2int(x) ((int) (x)) -; 1346 : static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp) -; 1347 : { -; 1348 : int i, k, n; -; 1349 : stbi_uc* output; -; 1350 : if (!data) return NULL; -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } -; 1353 : // compute number of non-alpha components -; 1354 : if (comp & 1) n = comp; else n = comp - 1; -; 1355 : for (i = 0; i < x * y; ++i) { -; 1356 : for (k = 0; k < n; ++k) { -; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; -; 1358 : if (z < 0) z = 0; -; 1359 : if (z > 255) z = 255; -; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1361 : } -; 1362 : if (k < comp) { -; 1363 : float z = data[i * comp + k] * 255 + 0.5f; -; 1364 : if (z < 0) z = 0; -; 1365 : if (z > 255) z = 255; -; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1367 : } -; 1368 : } -; 1369 : STBI_FREE(data); -; 1370 : return output; -; 1371 : } -; 1372 : #endif -; 1373 : -; 1374 : ////////////////////////////////////////////////////////////////////////////// -; 1375 : // -; 1376 : // "baseline" JPEG/JFIF decoder -; 1377 : // -; 1378 : // simple implementation -; 1379 : // - doesn't support delayed output of y-dimension -; 1380 : // - simple interface (only one output format: 8-bit interleaved RGB) -; 1381 : // - doesn't try to recover corrupt jpegs -; 1382 : // - doesn't allow partial loading, loading multiple at once -; 1383 : // - still fast on x86 (copying globals into locals doesn't help x86) -; 1384 : // - allocates lots of intermediate memory (full size of all components) -; 1385 : // - non-interleaved case requires this anyway -; 1386 : // - allows good upsampling (see next) -; 1387 : // high-quality -; 1388 : // - upsampled channels are bilinearly interpolated, even across blocks -; 1389 : // - quality integer IDCT derived from IJG's 'slow' -; 1390 : // performance -; 1391 : // - fast huffman; reasonable integer IDCT -; 1392 : // - some SIMD kernels for common paths on targets with SSE2/NEON -; 1393 : // - uses a lot of intermediate memory, could cache poorly -; 1394 : -; 1395 : #ifndef STBI_NO_JPEG -; 1396 : -; 1397 : // huffman decoding acceleration -; 1398 : #define FAST_BITS 9 // larger handles more cases; smaller stomps less cache -; 1399 : -; 1400 : typedef struct -; 1401 : { -; 1402 : stbi_uc fast[1 << FAST_BITS]; -; 1403 : // weirdly, repacking this into AoS is a 10% speed loss, instead of a win -; 1404 : stbi__uint16 code[256]; -; 1405 : stbi_uc values[256]; -; 1406 : stbi_uc size[257]; -; 1407 : unsigned int maxcode[18]; -; 1408 : int delta[17]; // old 'firstsymbol' - old 'firstcode' -; 1409 : } stbi__huffman; -; 1410 : -; 1411 : typedef struct -; 1412 : { -; 1413 : stbi__context* s; -; 1414 : stbi__huffman huff_dc[4]; -; 1415 : stbi__huffman huff_ac[4]; -; 1416 : stbi__uint16 dequant[4][64]; -; 1417 : stbi__int16 fast_ac[4][1 << FAST_BITS]; -; 1418 : -; 1419 : // sizes for components, interleaved MCUs -; 1420 : int img_h_max, img_v_max; -; 1421 : int img_mcu_x, img_mcu_y; -; 1422 : int img_mcu_w, img_mcu_h; -; 1423 : -; 1424 : // definition of jpeg image component -; 1425 : struct -; 1426 : { -; 1427 : int id; -; 1428 : int h, v; -; 1429 : int tq; -; 1430 : int hd, ha; -; 1431 : int dc_pred; -; 1432 : -; 1433 : int x, y, w2, h2; -; 1434 : stbi_uc* data; -; 1435 : void* raw_data, * raw_coeff; -; 1436 : stbi_uc* linebuf; -; 1437 : short* coeff; // progressive only -; 1438 : int coeff_w, coeff_h; // number of 8x8 coefficient blocks -; 1439 : } img_comp[4]; -; 1440 : -; 1441 : stbi__uint32 code_buffer; // jpeg entropy-coded buffer -; 1442 : int code_bits; // number of valid bits -; 1443 : unsigned char marker; // marker seen while filling entropy buffer -; 1444 : int nomore; // flag if we saw a marker so must stop -; 1445 : -; 1446 : int progressive; -; 1447 : int spec_start; -; 1448 : int spec_end; -; 1449 : int succ_high; -; 1450 : int succ_low; -; 1451 : int eob_run; -; 1452 : int jfif; -; 1453 : int app14_color_transform; // Adobe APP14 tag -; 1454 : int rgb; -; 1455 : -; 1456 : int scan_n, order[4]; -; 1457 : int restart_interval, todo; -; 1458 : -; 1459 : // kernels -; 1460 : void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]); -; 1461 : void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); -; 1462 : stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); -; 1463 : } stbi__jpeg; -; 1464 : -; 1465 : static int stbi__build_huffman(stbi__huffman* h, int* count) -; 1466 : { -; 1467 : int i, j, k = 0; -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { -; 1471 : for (j = 0; j < count[i]; ++j) { -; 1472 : h->size[k++] = (stbi_uc)(i + 1); -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); -; 1474 : } -; 1475 : } -; 1476 : h->size[k] = 0; -; 1477 : -; 1478 : // compute actual symbols (from jpeg spec) -; 1479 : code = 0; -; 1480 : k = 0; -; 1481 : for (j = 1; j <= 16; ++j) { -; 1482 : // compute delta to add to code to compute symbol id -; 1483 : h->delta[j] = k - code; -; 1484 : if (h->size[k] == j) { -; 1485 : while (h->size[k] == j) -; 1486 : h->code[k++] = (stbi__uint16)(code++); -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); -; 1488 : } -; 1489 : // compute largest code + 1 for this size, preshifted as needed later -; 1490 : h->maxcode[j] = code << (16 - j); -; 1491 : code <<= 1; -; 1492 : } -; 1493 : h->maxcode[j] = 0xffffffff; -; 1494 : -; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated -; 1496 : memset(h->fast, 255, 1 << FAST_BITS); -; 1497 : for (i = 0; i < k; ++i) { -; 1498 : int s = h->size[i]; -; 1499 : if (s <= FAST_BITS) { -; 1500 : int c = h->code[i] << (FAST_BITS - s); -; 1501 : int m = 1 << (FAST_BITS - s); -; 1502 : for (j = 0; j < m; ++j) { -; 1503 : h->fast[c + j] = (stbi_uc)i; -; 1504 : } -; 1505 : } -; 1506 : } -; 1507 : return 1; -; 1508 : } -; 1509 : -; 1510 : // build a table that decodes both magnitude and value of small ACs in -; 1511 : // one go. -; 1512 : static void stbi__build_fast_ac(stbi__int16* fast_ac, stbi__huffman* h) -; 1513 : { -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { -; 1516 : stbi_uc fast = h->fast[i]; -; 1517 : fast_ac[i] = 0; -; 1518 : if (fast < 255) { -; 1519 : int rs = h->values[fast]; -; 1520 : int run = (rs >> 4) & 15; -; 1521 : int magbits = rs & 15; -; 1522 : int len = h->size[fast]; -; 1523 : -; 1524 : if (magbits && len + magbits <= FAST_BITS) { -; 1525 : // magnitude code followed by receive_extend code -; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); -; 1527 : int m = 1 << (magbits - 1); -; 1528 : if (k < m) k += (~0U << magbits) + 1; -; 1529 : // if the result is small enough, we can fit it in fast_ac table -; 1530 : if (k >= -128 && k <= 127) -; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); -; 1532 : } -; 1533 : } -; 1534 : } -; 1535 : } -; 1536 : -; 1537 : static void stbi__grow_buffer_unsafe(stbi__jpeg* j) -; 1538 : { -; 1539 : do { -; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); -; 1541 : if (b == 0xff) { -; 1542 : int c = stbi__get8(j->s); -; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes -; 1544 : if (c != 0) { -; 1545 : j->marker = (unsigned char)c; -; 1546 : j->nomore = 1; -; 1547 : return; -; 1548 : } -; 1549 : } -; 1550 : j->code_buffer |= b << (24 - j->code_bits); -; 1551 : j->code_bits += 8; -; 1552 : } while (j->code_bits <= 24); -; 1553 : } -; 1554 : -; 1555 : // (1 << n) - 1 -; 1556 : static const stbi__uint32 stbi__bmask[17] = { 0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535 }; -; 1557 : -; 1558 : // decode a jpeg huffman value from the bitstream -; 1559 : stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg* j, stbi__huffman* h) -; 1560 : { -; 1561 : unsigned int temp; -; 1562 : int c, k; -; 1563 : -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1569 : k = h->fast[c]; -; 1570 : if (k < 255) { -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; -; 1575 : j->code_bits -= s; -; 1576 : return h->values[k]; -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; -; 1586 : for (k = FAST_BITS + 1; ; ++k) -; 1587 : if (temp < h->maxcode[k]) -; 1588 : break; -; 1589 : if (k == 17) { -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; -; 1608 : } -; 1609 : -; 1610 : // bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) -; 1623 : k = stbi_lrot(j->code_buffer, n); -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); -; 1628 : } -; 1629 : -; 1630 : // get some unsigned bits -; 1631 : stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg* j, int n) -; 1632 : { -; 1633 : unsigned int k; -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1636 : k = stbi_lrot(j->code_buffer, n); -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; -; 1640 : return k; -; 1641 : } -; 1642 : -; 1643 : stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg* j) -; 1644 : { -; 1645 : unsigned int k; -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1648 : k = j->code_buffer; -; 1649 : j->code_buffer <<= 1; -; 1650 : --j->code_bits; -; 1651 : return k & 0x80000000; -; 1652 : } -; 1653 : -; 1654 : // given a value that's at position X in the zigzag stream, -; 1655 : // where does it appear in the 8x8 matrix coded as row-major? -; 1656 : static const stbi_uc stbi__jpeg_dezigzag[64 + 15] = -; 1657 : { -; 1658 : 0, 1, 8, 16, 9, 2, 3, 10, -; 1659 : 17, 24, 32, 25, 18, 11, 4, 5, -; 1660 : 12, 19, 26, 33, 40, 48, 41, 34, -; 1661 : 27, 20, 13, 6, 7, 14, 21, 28, -; 1662 : 35, 42, 49, 56, 57, 50, 43, 36, -; 1663 : 29, 22, 15, 23, 30, 37, 44, 51, -; 1664 : 58, 59, 52, 45, 38, 31, 39, 46, -; 1665 : 53, 60, 61, 54, 47, 55, 62, 63, -; 1666 : // let corrupt input sample past end -; 1667 : 63, 63, 63, 63, 63, 63, 63, 63, -; 1668 : 63, 63, 63, 63, 63, 63, 63 -; 1669 : }; -; 1670 : -; 1671 : // decode one 64-entry block-- -; 1672 : static int stbi__jpeg_decode_block(stbi__jpeg* j, short data[64], stbi__huffman* hdc, stbi__huffman* hac, stbi__int16* fac, int b, stbi__uint16* dequant) -; 1673 : { -; 1674 : int diff, dc, k; -; 1675 : int t; -; 1676 : -; 1677 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1678 : t = stbi__jpeg_huff_decode(j, hdc); -; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1680 : -; 1681 : // 0 all the ac values now so we can do it 32-bits at a time -; 1682 : memset(data, 0, 64 * sizeof(data[0])); -; 1683 : -; 1684 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1686 : dc = j->img_comp[b].dc_pred + diff; -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1689 : data[0] = (short)(dc * dequant[0]); -; 1690 : -; 1691 : // decode AC components, see JPEG spec -; 1692 : k = 1; -; 1693 : do { -; 1694 : unsigned int zig; -; 1695 : int c, r, s; -; 1696 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1697 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1698 : r = fac[c]; -; 1699 : if (r) { // fast-AC path -; 1700 : k += (r >> 4) & 15; // run -; 1701 : s = r & 15; // combined length -; 1702 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1703 : j->code_buffer <<= s; -; 1704 : j->code_bits -= s; -; 1705 : // decode into unzigzag'd location -; 1706 : zig = stbi__jpeg_dezigzag[k++]; -; 1707 : data[zig] = (short)((r >> 8) * dequant[zig]); -; 1708 : } -; 1709 : else { -; 1710 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1711 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1712 : s = rs & 15; -; 1713 : r = rs >> 4; -; 1714 : if (s == 0) { -; 1715 : if (rs != 0xf0) break; // end block -; 1716 : k += 16; -; 1717 : } -; 1718 : else { -; 1719 : k += r; -; 1720 : // decode into unzigzag'd location -; 1721 : zig = stbi__jpeg_dezigzag[k++]; -; 1722 : data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]); -; 1723 : } -; 1724 : } -; 1725 : } while (k < 64); -; 1726 : return 1; -; 1727 : } -; 1728 : -; 1729 : static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg* j, short data[64], stbi__huffman* hdc, int b) -; 1730 : { -; 1731 : int diff, dc; -; 1732 : int t; -; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1734 : -; 1735 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1736 : -; 1737 : if (j->succ_high == 0) { -; 1738 : // first scan for DC coefficient, must be first -; 1739 : memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now -; 1740 : t = stbi__jpeg_huff_decode(j, hdc); -; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1742 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1745 : dc = j->img_comp[b].dc_pred + diff; -; 1746 : j->img_comp[b].dc_pred = dc; -; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1748 : data[0] = (short)(dc * (1 << j->succ_low)); -; 1749 : } -; 1750 : else { -; 1751 : // refinement scan for DC coefficient -; 1752 : if (stbi__jpeg_get_bit(j)) -; 1753 : data[0] += (short)(1 << j->succ_low); -; 1754 : } -; 1755 : return 1; -; 1756 : } -; 1757 : -; 1758 : // @OPTIMIZE: store non-zigzagged during the decode passes, -; 1759 : // and only de-zigzag when dequantizing -; 1760 : static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg* j, short data[64], stbi__huffman* hac, stbi__int16* fac) -; 1761 : { -; 1762 : int k; -; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1764 : -; 1765 : if (j->succ_high == 0) { -; 1766 : int shift = j->succ_low; -; 1767 : -; 1768 : if (j->eob_run) { -; 1769 : --j->eob_run; -; 1770 : return 1; -; 1771 : } -; 1772 : -; 1773 : k = j->spec_start; -; 1774 : do { -; 1775 : unsigned int zig; -; 1776 : int c, r, s; -; 1777 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1778 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1779 : r = fac[c]; -; 1780 : if (r) { // fast-AC path -; 1781 : k += (r >> 4) & 15; // run -; 1782 : s = r & 15; // combined length -; 1783 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1784 : j->code_buffer <<= s; -; 1785 : j->code_bits -= s; -; 1786 : zig = stbi__jpeg_dezigzag[k++]; -; 1787 : data[zig] = (short)((r >> 8) * (1 << shift)); -; 1788 : } -; 1789 : else { -; 1790 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1791 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1792 : s = rs & 15; -; 1793 : r = rs >> 4; -; 1794 : if (s == 0) { -; 1795 : if (r < 15) { -; 1796 : j->eob_run = (1 << r); -; 1797 : if (r) -; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1799 : --j->eob_run; -; 1800 : break; -; 1801 : } -; 1802 : k += 16; -; 1803 : } -; 1804 : else { -; 1805 : k += r; -; 1806 : zig = stbi__jpeg_dezigzag[k++]; -; 1807 : data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift)); -; 1808 : } -; 1809 : } -; 1810 : } while (k <= j->spec_end); -; 1811 : } -; 1812 : else { -; 1813 : // refinement scan for these AC coefficients -; 1814 : -; 1815 : short bit = (short)(1 << j->succ_low); -; 1816 : -; 1817 : if (j->eob_run) { -; 1818 : --j->eob_run; -; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { -; 1820 : short* p = &data[stbi__jpeg_dezigzag[k]]; -; 1821 : if (*p != 0) -; 1822 : if (stbi__jpeg_get_bit(j)) -; 1823 : if ((*p & bit) == 0) { -; 1824 : if (*p > 0) -; 1825 : *p += bit; -; 1826 : else -; 1827 : *p -= bit; -; 1828 : } -; 1829 : } -; 1830 : } -; 1831 : else { -; 1832 : k = j->spec_start; -; 1833 : do { -; 1834 : int r, s; -; 1835 : int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh -; 1836 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1837 : s = rs & 15; -; 1838 : r = rs >> 4; -; 1839 : if (s == 0) { -; 1840 : if (r < 15) { -; 1841 : j->eob_run = (1 << r) - 1; -; 1842 : if (r) -; 1843 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1844 : r = 64; // force end of block -; 1845 : } -; 1846 : else { -; 1847 : // r=15 s=0 should write 16 0s, so we just do -; 1848 : // a run of 15 0s and then write s (which is 0), -; 1849 : // so we don't have to do anything special here -; 1850 : } -; 1851 : } -; 1852 : else { -; 1853 : if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1854 : // sign bit -; 1855 : if (stbi__jpeg_get_bit(j)) -; 1856 : s = bit; -; 1857 : else -; 1858 : s = -bit; -; 1859 : } -; 1860 : -; 1861 : // advance by r -; 1862 : while (k <= j->spec_end) { -; 1863 : short* p = &data[stbi__jpeg_dezigzag[k++]]; -; 1864 : if (*p != 0) { -; 1865 : if (stbi__jpeg_get_bit(j)) -; 1866 : if ((*p & bit) == 0) { -; 1867 : if (*p > 0) -; 1868 : *p += bit; -; 1869 : else -; 1870 : *p -= bit; -; 1871 : } -; 1872 : } -; 1873 : else { -; 1874 : if (r == 0) { -; 1875 : *p = (short)s; -; 1876 : break; -; 1877 : } -; 1878 : --r; -; 1879 : } -; 1880 : } -; 1881 : } while (k <= j->spec_end); -; 1882 : } -; 1883 : } -; 1884 : return 1; -; 1885 : } -; 1886 : -; 1887 : // take a -128..127 value and stbi__clamp it and convert to 0..255 -; 1888 : stbi_inline static stbi_uc stbi__clamp(int x) -; 1889 : { -; 1890 : // trick to use a single test to catch both cases -; 1891 : if ((unsigned int)x > 255) { -; 1892 : if (x < 0) return 0; -; 1893 : if (x > 255) return 255; -; 1894 : } -; 1895 : return (stbi_uc)x; -; 1896 : } -; 1897 : -; 1898 : #define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -; 1899 : #define stbi__fsh(x) ((x) * 4096) -; 1900 : -; 1901 : // derived from jidctint -- DCT_ISLOW -; 1902 : #define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ -; 1903 : int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ -; 1904 : p2 = s2; \ -; 1905 : p3 = s6; \ -; 1906 : p1 = (p2+p3) * stbi__f2f(0.5411961f); \ -; 1907 : t2 = p1 + p3*stbi__f2f(-1.847759065f); \ -; 1908 : t3 = p1 + p2*stbi__f2f( 0.765366865f); \ -; 1909 : p2 = s0; \ -; 1910 : p3 = s4; \ -; 1911 : t0 = stbi__fsh(p2+p3); \ -; 1912 : t1 = stbi__fsh(p2-p3); \ -; 1913 : x0 = t0+t3; \ -; 1914 : x3 = t0-t3; \ -; 1915 : x1 = t1+t2; \ -; 1916 : x2 = t1-t2; \ -; 1917 : t0 = s7; \ -; 1918 : t1 = s5; \ -; 1919 : t2 = s3; \ -; 1920 : t3 = s1; \ -; 1921 : p3 = t0+t2; \ -; 1922 : p4 = t1+t3; \ -; 1923 : p1 = t0+t3; \ -; 1924 : p2 = t1+t2; \ -; 1925 : p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ -; 1926 : t0 = t0*stbi__f2f( 0.298631336f); \ -; 1927 : t1 = t1*stbi__f2f( 2.053119869f); \ -; 1928 : t2 = t2*stbi__f2f( 3.072711026f); \ -; 1929 : t3 = t3*stbi__f2f( 1.501321110f); \ -; 1930 : p1 = p5 + p1*stbi__f2f(-0.899976223f); \ -; 1931 : p2 = p5 + p2*stbi__f2f(-2.562915447f); \ -; 1932 : p3 = p3*stbi__f2f(-1.961570560f); \ -; 1933 : p4 = p4*stbi__f2f(-0.390180644f); \ -; 1934 : t3 += p1+p4; \ -; 1935 : t2 += p2+p3; \ -; 1936 : t1 += p2+p4; \ -; 1937 : t0 += p1+p3; -; 1938 : -; 1939 : static void stbi__idct_block(stbi_uc* out, int out_stride, short data[64]) -; 1940 : { -; 1941 : int i, val[64], * v = val; -; 1942 : stbi_uc* o; -; 1943 : short* d = data; -; 1944 : -; 1945 : // columns -; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { -; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing -; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 -; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { -; 1950 : // no shortcut 0 seconds -; 1951 : // (1|2|3|4|5|6|7)==0 0 seconds -; 1952 : // all separate -0.047 seconds -; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds -; 1954 : int dcterm = d[0] * 4; -; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; -; 1956 : } -; 1957 : else { -; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) -; 1959 : // constants scaled things up by 1<<12; let's bring them back -; 1960 : // down, but keep 2 extra bits of precision -; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; -; 1962 : v[0] = (x0 + t3) >> 10; -; 1963 : v[56] = (x0 - t3) >> 10; -; 1964 : v[8] = (x1 + t2) >> 10; -; 1965 : v[48] = (x1 - t2) >> 10; -; 1966 : v[16] = (x2 + t1) >> 10; -; 1967 : v[40] = (x2 - t1) >> 10; -; 1968 : v[24] = (x3 + t0) >> 10; -; 1969 : v[32] = (x3 - t0) >> 10; -; 1970 : } -; 1971 : } -; 1972 : -; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { -; 1974 : // no fast case since the first 1D IDCT spread components out -; 1975 : STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]) -; 1976 : // constants scaled things up by 1<<12, plus we had 1<<2 from first -; 1977 : // loop, plus horizontal and vertical each scale by sqrt(8) so together -; 1978 : // we've got an extra 1<<3, so 1<<17 total we need to remove. -; 1979 : // so we want to round that, which means adding 0.5 * 1<<17, -; 1980 : // aka 65536. Also, we'll end up with -128 to 127 that we want -; 1981 : // to encode as 0..255 by adding 128, so we'll add that before the shift -; 1982 : x0 += 65536 + (128 << 17); -; 1983 : x1 += 65536 + (128 << 17); -; 1984 : x2 += 65536 + (128 << 17); -; 1985 : x3 += 65536 + (128 << 17); -; 1986 : // tried computing the shifts into temps, or'ing the temps to see -; 1987 : // if any were out of range, but that was slower -; 1988 : o[0] = stbi__clamp((x0 + t3) >> 17); -; 1989 : o[7] = stbi__clamp((x0 - t3) >> 17); -; 1990 : o[1] = stbi__clamp((x1 + t2) >> 17); -; 1991 : o[6] = stbi__clamp((x1 - t2) >> 17); -; 1992 : o[2] = stbi__clamp((x2 + t1) >> 17); -; 1993 : o[5] = stbi__clamp((x2 - t1) >> 17); -; 1994 : o[3] = stbi__clamp((x3 + t0) >> 17); -; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); -; 1996 : } -; 1997 : } -; 1998 : -; 1999 : #ifdef STBI_SSE2 -; 2000 : // sse2 integer IDCT. not the fastest possible implementation but it -; 2001 : // produces bit-identical results to the generic C version so it's -; 2002 : // fully "transparent". -; 2003 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2004 : { -; 2005 : // This is constructed to match our regular (generic) integer IDCT exactly. -; 2006 : __m128i row0, row1, row2, row3, row4, row5, row6, row7; -; 2007 : __m128i tmp; -; 2008 : -; 2009 : // dot product constant: even elems=x, odd elems=y -; 2010 : #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) -; 2011 : -; 2012 : // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) -; 2013 : // out(1) = c1[even]*x + c1[odd]*y -; 2014 : #define dct_rot(out0,out1, x,y,c0,c1) \ -; 2015 : __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ -; 2016 : __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ -; 2017 : __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ -; 2018 : __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ -; 2019 : __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ -; 2020 : __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) -; 2021 : -; 2022 : // out = in << 12 (in 16-bit, out 32-bit) -; 2023 : #define dct_widen(out, in) \ -; 2024 : __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ -; 2025 : __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) -; 2026 : -; 2027 : // wide add -; 2028 : #define dct_wadd(out, a, b) \ -; 2029 : __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ -; 2030 : __m128i out##_h = _mm_add_epi32(a##_h, b##_h) -; 2031 : -; 2032 : // wide sub -; 2033 : #define dct_wsub(out, a, b) \ -; 2034 : __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ -; 2035 : __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) -; 2036 : -; 2037 : // butterfly a/b, add bias, then shift by "s" and pack -; 2038 : #define dct_bfly32o(out0, out1, a,b,bias,s) \ -; 2039 : { \ -; 2040 : __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ -; 2041 : __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ -; 2042 : dct_wadd(sum, abiased, b); \ -; 2043 : dct_wsub(dif, abiased, b); \ -; 2044 : out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ -; 2045 : out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ -; 2046 : } -; 2047 : -; 2048 : // 8-bit interleave step (for transposes) -; 2049 : #define dct_interleave8(a, b) \ -; 2050 : tmp = a; \ -; 2051 : a = _mm_unpacklo_epi8(a, b); \ -; 2052 : b = _mm_unpackhi_epi8(tmp, b) -; 2053 : -; 2054 : // 16-bit interleave step (for transposes) -; 2055 : #define dct_interleave16(a, b) \ -; 2056 : tmp = a; \ -; 2057 : a = _mm_unpacklo_epi16(a, b); \ -; 2058 : b = _mm_unpackhi_epi16(tmp, b) -; 2059 : -; 2060 : #define dct_pass(bias,shift) \ -; 2061 : { \ -; 2062 : /* even part */ \ -; 2063 : dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ -; 2064 : __m128i sum04 = _mm_add_epi16(row0, row4); \ -; 2065 : __m128i dif04 = _mm_sub_epi16(row0, row4); \ -; 2066 : dct_widen(t0e, sum04); \ -; 2067 : dct_widen(t1e, dif04); \ -; 2068 : dct_wadd(x0, t0e, t3e); \ -; 2069 : dct_wsub(x3, t0e, t3e); \ -; 2070 : dct_wadd(x1, t1e, t2e); \ -; 2071 : dct_wsub(x2, t1e, t2e); \ -; 2072 : /* odd part */ \ -; 2073 : dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ -; 2074 : dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ -; 2075 : __m128i sum17 = _mm_add_epi16(row1, row7); \ -; 2076 : __m128i sum35 = _mm_add_epi16(row3, row5); \ -; 2077 : dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ -; 2078 : dct_wadd(x4, y0o, y4o); \ -; 2079 : dct_wadd(x5, y1o, y5o); \ -; 2080 : dct_wadd(x6, y2o, y5o); \ -; 2081 : dct_wadd(x7, y3o, y4o); \ -; 2082 : dct_bfly32o(row0,row7, x0,x7,bias,shift); \ -; 2083 : dct_bfly32o(row1,row6, x1,x6,bias,shift); \ -; 2084 : dct_bfly32o(row2,row5, x2,x5,bias,shift); \ -; 2085 : dct_bfly32o(row3,row4, x3,x4,bias,shift); \ -; 2086 : } -; 2087 : -; 2088 : __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); -; 2089 : __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f)); -; 2090 : __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); -; 2091 : __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); -; 2092 : __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f)); -; 2093 : __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f)); -; 2094 : __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f)); -; 2095 : __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f)); -; 2096 : -; 2097 : // rounding biases in column/row passes, see stbi__idct_block for explanation. -; 2098 : __m128i bias_0 = _mm_set1_epi32(512); -; 2099 : __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17)); -; 2100 : -; 2101 : // load -; 2102 : row0 = _mm_load_si128((const __m128i*) (data + 0 * 8)); -; 2103 : row1 = _mm_load_si128((const __m128i*) (data + 1 * 8)); -; 2104 : row2 = _mm_load_si128((const __m128i*) (data + 2 * 8)); -; 2105 : row3 = _mm_load_si128((const __m128i*) (data + 3 * 8)); -; 2106 : row4 = _mm_load_si128((const __m128i*) (data + 4 * 8)); -; 2107 : row5 = _mm_load_si128((const __m128i*) (data + 5 * 8)); -; 2108 : row6 = _mm_load_si128((const __m128i*) (data + 6 * 8)); -; 2109 : row7 = _mm_load_si128((const __m128i*) (data + 7 * 8)); -; 2110 : -; 2111 : // column pass -; 2112 : dct_pass(bias_0, 10); -; 2113 : -; 2114 : { -; 2115 : // 16bit 8x8 transpose pass 1 -; 2116 : dct_interleave16(row0, row4); -; 2117 : dct_interleave16(row1, row5); -; 2118 : dct_interleave16(row2, row6); -; 2119 : dct_interleave16(row3, row7); -; 2120 : -; 2121 : // transpose pass 2 -; 2122 : dct_interleave16(row0, row2); -; 2123 : dct_interleave16(row1, row3); -; 2124 : dct_interleave16(row4, row6); -; 2125 : dct_interleave16(row5, row7); -; 2126 : -; 2127 : // transpose pass 3 -; 2128 : dct_interleave16(row0, row1); -; 2129 : dct_interleave16(row2, row3); -; 2130 : dct_interleave16(row4, row5); -; 2131 : dct_interleave16(row6, row7); -; 2132 : } -; 2133 : -; 2134 : // row pass -; 2135 : dct_pass(bias_1, 17); -; 2136 : -; 2137 : { -; 2138 : // pack -; 2139 : __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 -; 2140 : __m128i p1 = _mm_packus_epi16(row2, row3); -; 2141 : __m128i p2 = _mm_packus_epi16(row4, row5); -; 2142 : __m128i p3 = _mm_packus_epi16(row6, row7); -; 2143 : -; 2144 : // 8bit 8x8 transpose pass 1 -; 2145 : dct_interleave8(p0, p2); // a0e0a1e1... -; 2146 : dct_interleave8(p1, p3); // c0g0c1g1... -; 2147 : -; 2148 : // transpose pass 2 -; 2149 : dct_interleave8(p0, p1); // a0c0e0g0... -; 2150 : dct_interleave8(p2, p3); // b0d0f0h0... -; 2151 : -; 2152 : // transpose pass 3 -; 2153 : dct_interleave8(p0, p2); // a0b0c0d0... -; 2154 : dct_interleave8(p1, p3); // a4b4c4d4... -; 2155 : -; 2156 : // store -; 2157 : _mm_storel_epi64((__m128i*) out, p0); out += out_stride; -; 2158 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; -; 2159 : _mm_storel_epi64((__m128i*) out, p2); out += out_stride; -; 2160 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; -; 2161 : _mm_storel_epi64((__m128i*) out, p1); out += out_stride; -; 2162 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; -; 2163 : _mm_storel_epi64((__m128i*) out, p3); out += out_stride; -; 2164 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e)); -; 2165 : } -; 2166 : -; 2167 : #undef dct_const -; 2168 : #undef dct_rot -; 2169 : #undef dct_widen -; 2170 : #undef dct_wadd -; 2171 : #undef dct_wsub -; 2172 : #undef dct_bfly32o -; 2173 : #undef dct_interleave8 -; 2174 : #undef dct_interleave16 -; 2175 : #undef dct_pass -; 2176 : } -; 2177 : -; 2178 : #endif // STBI_SSE2 -; 2179 : -; 2180 : #ifdef STBI_NEON -; 2181 : -; 2182 : // NEON integer IDCT. should produce bit-identical -; 2183 : // results to the generic C version. -; 2184 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2185 : { -; 2186 : int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; -; 2187 : -; 2188 : int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); -; 2189 : int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); -; 2190 : int16x4_t rot0_2 = vdup_n_s16(stbi__f2f(0.765366865f)); -; 2191 : int16x4_t rot1_0 = vdup_n_s16(stbi__f2f(1.175875602f)); -; 2192 : int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); -; 2193 : int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); -; 2194 : int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); -; 2195 : int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); -; 2196 : int16x4_t rot3_0 = vdup_n_s16(stbi__f2f(0.298631336f)); -; 2197 : int16x4_t rot3_1 = vdup_n_s16(stbi__f2f(2.053119869f)); -; 2198 : int16x4_t rot3_2 = vdup_n_s16(stbi__f2f(3.072711026f)); -; 2199 : int16x4_t rot3_3 = vdup_n_s16(stbi__f2f(1.501321110f)); -; 2200 : -; 2201 : #define dct_long_mul(out, inq, coeff) \ -; 2202 : int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ -; 2203 : int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) -; 2204 : -; 2205 : #define dct_long_mac(out, acc, inq, coeff) \ -; 2206 : int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ -; 2207 : int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) -; 2208 : -; 2209 : #define dct_widen(out, inq) \ -; 2210 : int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ -; 2211 : int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) -; 2212 : -; 2213 : // wide add -; 2214 : #define dct_wadd(out, a, b) \ -; 2215 : int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ -; 2216 : int32x4_t out##_h = vaddq_s32(a##_h, b##_h) -; 2217 : -; 2218 : // wide sub -; 2219 : #define dct_wsub(out, a, b) \ -; 2220 : int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ -; 2221 : int32x4_t out##_h = vsubq_s32(a##_h, b##_h) -; 2222 : -; 2223 : // butterfly a/b, then shift using "shiftop" by "s" and pack -; 2224 : #define dct_bfly32o(out0,out1, a,b,shiftop,s) \ -; 2225 : { \ -; 2226 : dct_wadd(sum, a, b); \ -; 2227 : dct_wsub(dif, a, b); \ -; 2228 : out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ -; 2229 : out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ -; 2230 : } -; 2231 : -; 2232 : #define dct_pass(shiftop, shift) \ -; 2233 : { \ -; 2234 : /* even part */ \ -; 2235 : int16x8_t sum26 = vaddq_s16(row2, row6); \ -; 2236 : dct_long_mul(p1e, sum26, rot0_0); \ -; 2237 : dct_long_mac(t2e, p1e, row6, rot0_1); \ -; 2238 : dct_long_mac(t3e, p1e, row2, rot0_2); \ -; 2239 : int16x8_t sum04 = vaddq_s16(row0, row4); \ -; 2240 : int16x8_t dif04 = vsubq_s16(row0, row4); \ -; 2241 : dct_widen(t0e, sum04); \ -; 2242 : dct_widen(t1e, dif04); \ -; 2243 : dct_wadd(x0, t0e, t3e); \ -; 2244 : dct_wsub(x3, t0e, t3e); \ -; 2245 : dct_wadd(x1, t1e, t2e); \ -; 2246 : dct_wsub(x2, t1e, t2e); \ -; 2247 : /* odd part */ \ -; 2248 : int16x8_t sum15 = vaddq_s16(row1, row5); \ -; 2249 : int16x8_t sum17 = vaddq_s16(row1, row7); \ -; 2250 : int16x8_t sum35 = vaddq_s16(row3, row5); \ -; 2251 : int16x8_t sum37 = vaddq_s16(row3, row7); \ -; 2252 : int16x8_t sumodd = vaddq_s16(sum17, sum35); \ -; 2253 : dct_long_mul(p5o, sumodd, rot1_0); \ -; 2254 : dct_long_mac(p1o, p5o, sum17, rot1_1); \ -; 2255 : dct_long_mac(p2o, p5o, sum35, rot1_2); \ -; 2256 : dct_long_mul(p3o, sum37, rot2_0); \ -; 2257 : dct_long_mul(p4o, sum15, rot2_1); \ -; 2258 : dct_wadd(sump13o, p1o, p3o); \ -; 2259 : dct_wadd(sump24o, p2o, p4o); \ -; 2260 : dct_wadd(sump23o, p2o, p3o); \ -; 2261 : dct_wadd(sump14o, p1o, p4o); \ -; 2262 : dct_long_mac(x4, sump13o, row7, rot3_0); \ -; 2263 : dct_long_mac(x5, sump24o, row5, rot3_1); \ -; 2264 : dct_long_mac(x6, sump23o, row3, rot3_2); \ -; 2265 : dct_long_mac(x7, sump14o, row1, rot3_3); \ -; 2266 : dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ -; 2267 : dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ -; 2268 : dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ -; 2269 : dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ -; 2270 : } -; 2271 : -; 2272 : // load -; 2273 : row0 = vld1q_s16(data + 0 * 8); -; 2274 : row1 = vld1q_s16(data + 1 * 8); -; 2275 : row2 = vld1q_s16(data + 2 * 8); -; 2276 : row3 = vld1q_s16(data + 3 * 8); -; 2277 : row4 = vld1q_s16(data + 4 * 8); -; 2278 : row5 = vld1q_s16(data + 5 * 8); -; 2279 : row6 = vld1q_s16(data + 6 * 8); -; 2280 : row7 = vld1q_s16(data + 7 * 8); -; 2281 : -; 2282 : // add DC bias -; 2283 : row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); -; 2284 : -; 2285 : // column pass -; 2286 : dct_pass(vrshrn_n_s32, 10); -; 2287 : -; 2288 : // 16bit 8x8 transpose -; 2289 : { -; 2290 : // these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -; 2291 : // whether compilers actually get this is another story, sadly. -; 2292 : #define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -; 2293 : #define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -; 2294 : #define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } -; 2295 : -; 2296 : // pass 1 -; 2297 : dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 -; 2298 : dct_trn16(row2, row3); -; 2299 : dct_trn16(row4, row5); -; 2300 : dct_trn16(row6, row7); -; 2301 : -; 2302 : // pass 2 -; 2303 : dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 -; 2304 : dct_trn32(row1, row3); -; 2305 : dct_trn32(row4, row6); -; 2306 : dct_trn32(row5, row7); -; 2307 : -; 2308 : // pass 3 -; 2309 : dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 -; 2310 : dct_trn64(row1, row5); -; 2311 : dct_trn64(row2, row6); -; 2312 : dct_trn64(row3, row7); -; 2313 : -; 2314 : #undef dct_trn16 -; 2315 : #undef dct_trn32 -; 2316 : #undef dct_trn64 -; 2317 : } -; 2318 : -; 2319 : // row pass -; 2320 : // vrshrn_n_s32 only supports shifts up to 16, we need -; 2321 : // 17. so do a non-rounding shift of 16 first then follow -; 2322 : // up with a rounding shift by 1. -; 2323 : dct_pass(vshrn_n_s32, 16); -; 2324 : -; 2325 : { -; 2326 : // pack and round -; 2327 : uint8x8_t p0 = vqrshrun_n_s16(row0, 1); -; 2328 : uint8x8_t p1 = vqrshrun_n_s16(row1, 1); -; 2329 : uint8x8_t p2 = vqrshrun_n_s16(row2, 1); -; 2330 : uint8x8_t p3 = vqrshrun_n_s16(row3, 1); -; 2331 : uint8x8_t p4 = vqrshrun_n_s16(row4, 1); -; 2332 : uint8x8_t p5 = vqrshrun_n_s16(row5, 1); -; 2333 : uint8x8_t p6 = vqrshrun_n_s16(row6, 1); -; 2334 : uint8x8_t p7 = vqrshrun_n_s16(row7, 1); -; 2335 : -; 2336 : // again, these can translate into one instruction, but often don't. -; 2337 : #define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -; 2338 : #define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -; 2339 : #define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } -; 2340 : -; 2341 : // sadly can't use interleaved stores here since we only write -; 2342 : // 8 bytes to each scan line! -; 2343 : -; 2344 : // 8x8 8-bit transpose pass 1 -; 2345 : dct_trn8_8(p0, p1); -; 2346 : dct_trn8_8(p2, p3); -; 2347 : dct_trn8_8(p4, p5); -; 2348 : dct_trn8_8(p6, p7); -; 2349 : -; 2350 : // pass 2 -; 2351 : dct_trn8_16(p0, p2); -; 2352 : dct_trn8_16(p1, p3); -; 2353 : dct_trn8_16(p4, p6); -; 2354 : dct_trn8_16(p5, p7); -; 2355 : -; 2356 : // pass 3 -; 2357 : dct_trn8_32(p0, p4); -; 2358 : dct_trn8_32(p1, p5); -; 2359 : dct_trn8_32(p2, p6); -; 2360 : dct_trn8_32(p3, p7); -; 2361 : -; 2362 : // store -; 2363 : vst1_u8(out, p0); out += out_stride; -; 2364 : vst1_u8(out, p1); out += out_stride; -; 2365 : vst1_u8(out, p2); out += out_stride; -; 2366 : vst1_u8(out, p3); out += out_stride; -; 2367 : vst1_u8(out, p4); out += out_stride; -; 2368 : vst1_u8(out, p5); out += out_stride; -; 2369 : vst1_u8(out, p6); out += out_stride; -; 2370 : vst1_u8(out, p7); -; 2371 : -; 2372 : #undef dct_trn8_8 -; 2373 : #undef dct_trn8_16 -; 2374 : #undef dct_trn8_32 -; 2375 : } -; 2376 : -; 2377 : #undef dct_long_mul -; 2378 : #undef dct_long_mac -; 2379 : #undef dct_widen -; 2380 : #undef dct_wadd -; 2381 : #undef dct_wsub -; 2382 : #undef dct_bfly32o -; 2383 : #undef dct_pass -; 2384 : } -; 2385 : -; 2386 : #endif // STBI_NEON -; 2387 : -; 2388 : #define STBI__MARKER_none 0xff -; 2389 : // if there's a pending marker from the entropy stream, return that -; 2390 : // otherwise, fetch from the stream and get a marker. if there's no -; 2391 : // marker, return 0xff, which is never a valid marker value -; 2392 : static stbi_uc stbi__get_marker(stbi__jpeg* j) -; 2393 : { -; 2394 : stbi_uc x; -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } -; 2396 : x = stbi__get8(j->s); -; 2397 : if (x != 0xff) return STBI__MARKER_none; -; 2398 : while (x == 0xff) -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes -; 2400 : return x; -; 2401 : } -; 2402 : -; 2403 : // in each scan, we'll have scan_n components, and the order -; 2404 : // of the components is specified by order[] -; 2405 : #define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) -; 2406 : -; 2407 : // after a restart interval, stbi__jpeg_reset the entropy decoder and -; 2408 : // the dc prediction -; 2409 : static void stbi__jpeg_reset(stbi__jpeg* j) -; 2410 : { -; 2411 : j->code_bits = 0; -; 2412 : j->code_buffer = 0; -; 2413 : j->nomore = 0; -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; -; 2417 : j->eob_run = 0; -; 2418 : // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, -; 2419 : // since we don't even allow 1<<30 pixels -; 2420 : } -; 2421 : -; 2422 : static int stbi__parse_entropy_coded_data(stbi__jpeg* z) -; 2423 : { -; 2424 : stbi__jpeg_reset(z); -; 2425 : if (!z->progressive) { -; 2426 : if (z->scan_n == 1) { -; 2427 : int i, j; -; 2428 : STBI_SIMD_ALIGN(short, data[64]); -; 2429 : int n = z->order[0]; -; 2430 : // non-interleaved data, we just need to process one block at a time, -; 2431 : // in trivial scanline order -; 2432 : // number of blocks to do just depends on how many actual "pixels" this -; 2433 : // component has, independent of interleaved MCU blocking and such -; 2434 : int w = (z->img_comp[n].x + 7) >> 3; -; 2435 : int h = (z->img_comp[n].y + 7) >> 3; -; 2436 : for (j = 0; j < h; ++j) { -; 2437 : for (i = 0; i < w; ++i) { -; 2438 : int ha = z->img_comp[n].ha; -; 2439 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2440 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2441 : // every data block is an MCU, so countdown the restart interval -; 2442 : if (--z->todo <= 0) { -; 2443 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2444 : // if it's NOT a restart, then just bail, so we get corrupt data -; 2445 : // rather than no data -; 2446 : if (!STBI__RESTART(z->marker)) return 1; -; 2447 : stbi__jpeg_reset(z); -; 2448 : } -; 2449 : } -; 2450 : } -; 2451 : return 1; -; 2452 : } -; 2453 : else { // interleaved -; 2454 : int i, j, k, x, y; -; 2455 : STBI_SIMD_ALIGN(short, data[64]); -; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2458 : // scan an interleaved mcu... process scan_n components in order -; 2459 : for (k = 0; k < z->scan_n; ++k) { -; 2460 : int n = z->order[k]; -; 2461 : // scan out an mcu's worth of this component; that's just determined -; 2462 : // by the basic H and V specified for the component -; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2464 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2465 : int x2 = (i * z->img_comp[n].h + x) * 8; -; 2466 : int y2 = (j * z->img_comp[n].v + y) * 8; -; 2467 : int ha = z->img_comp[n].ha; -; 2468 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2469 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); -; 2470 : } -; 2471 : } -; 2472 : } -; 2473 : // after all interleaved components, that's an interleaved MCU, -; 2474 : // so now count down the restart interval -; 2475 : if (--z->todo <= 0) { -; 2476 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2477 : if (!STBI__RESTART(z->marker)) return 1; -; 2478 : stbi__jpeg_reset(z); -; 2479 : } -; 2480 : } -; 2481 : } -; 2482 : return 1; -; 2483 : } -; 2484 : } -; 2485 : else { -; 2486 : if (z->scan_n == 1) { -; 2487 : int i, j; -; 2488 : int n = z->order[0]; -; 2489 : // non-interleaved data, we just need to process one block at a time, -; 2490 : // in trivial scanline order -; 2491 : // number of blocks to do just depends on how many actual "pixels" this -; 2492 : // component has, independent of interleaved MCU blocking and such -; 2493 : int w = (z->img_comp[n].x + 7) >> 3; -; 2494 : int h = (z->img_comp[n].y + 7) >> 3; -; 2495 : for (j = 0; j < h; ++j) { -; 2496 : for (i = 0; i < w; ++i) { -; 2497 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2498 : if (z->spec_start == 0) { -; 2499 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2500 : return 0; -; 2501 : } -; 2502 : else { -; 2503 : int ha = z->img_comp[n].ha; -; 2504 : if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) -; 2505 : return 0; -; 2506 : } -; 2507 : // every data block is an MCU, so countdown the restart interval -; 2508 : if (--z->todo <= 0) { -; 2509 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2510 : if (!STBI__RESTART(z->marker)) return 1; -; 2511 : stbi__jpeg_reset(z); -; 2512 : } -; 2513 : } -; 2514 : } -; 2515 : return 1; -; 2516 : } -; 2517 : else { // interleaved -; 2518 : int i, j, k, x, y; -; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2521 : // scan an interleaved mcu... process scan_n components in order -; 2522 : for (k = 0; k < z->scan_n; ++k) { -; 2523 : int n = z->order[k]; -; 2524 : // scan out an mcu's worth of this component; that's just determined -; 2525 : // by the basic H and V specified for the component -; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2528 : int x2 = (i * z->img_comp[n].h + x); -; 2529 : int y2 = (j * z->img_comp[n].v + y); -; 2530 : short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); -; 2531 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2532 : return 0; -; 2533 : } -; 2534 : } -; 2535 : } -; 2536 : // after all interleaved components, that's an interleaved MCU, -; 2537 : // so now count down the restart interval -; 2538 : if (--z->todo <= 0) { -; 2539 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2540 : if (!STBI__RESTART(z->marker)) return 1; -; 2541 : stbi__jpeg_reset(z); -; 2542 : } -; 2543 : } -; 2544 : } -; 2545 : return 1; -; 2546 : } -; 2547 : } -; 2548 : } -; 2549 : -; 2550 : static void stbi__jpeg_dequantize(short* data, stbi__uint16* dequant) -; 2551 : { -; 2552 : int i; -; 2553 : for (i = 0; i < 64; ++i) -; 2554 : data[i] *= dequant[i]; -; 2555 : } -; 2556 : -; 2557 : static void stbi__jpeg_finish(stbi__jpeg* z) -; 2558 : { -; 2559 : if (z->progressive) { -; 2560 : // dequantize and idct the data -; 2561 : int i, j, n; -; 2562 : for (n = 0; n < z->s->img_n; ++n) { -; 2563 : int w = (z->img_comp[n].x + 7) >> 3; -; 2564 : int h = (z->img_comp[n].y + 7) >> 3; -; 2565 : for (j = 0; j < h; ++j) { -; 2566 : for (i = 0; i < w; ++i) { -; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2568 : stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); -; 2569 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2570 : } -; 2571 : } -; 2572 : } -; 2573 : } -; 2574 : } -; 2575 : -; 2576 : static int stbi__process_marker(stbi__jpeg* z, int m) -; 2577 : { -; 2578 : int L; -; 2579 : switch (m) { -; 2580 : case STBI__MARKER_none: // no marker found -; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); -; 2582 : -; 2583 : case 0xDD: // DRI - specify restart interval -; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); -; 2585 : z->restart_interval = stbi__get16be(z->s); -; 2586 : return 1; -; 2587 : -; 2588 : case 0xDB: // DQT - define quantization table -; 2589 : L = stbi__get16be(z->s) - 2; -; 2590 : while (L > 0) { -; 2591 : int q = stbi__get8(z->s); -; 2592 : int p = q >> 4, sixteen = (p != 0); -; 2593 : int t = q & 15, i; -; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); -; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); -; 2596 : -; 2597 : for (i = 0; i < 64; ++i) -; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); -; 2599 : L -= (sixteen ? 129 : 65); -; 2600 : } -; 2601 : return L == 0; -; 2602 : -; 2603 : case 0xC4: // DHT - define huffman table -; 2604 : L = stbi__get16be(z->s) - 2; -; 2605 : while (L > 0) { -; 2606 : stbi_uc* v; -; 2607 : int sizes[16], i, n = 0; -; 2608 : int q = stbi__get8(z->s); -; 2609 : int tc = q >> 4; -; 2610 : int th = q & 15; -; 2611 : if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG"); -; 2612 : for (i = 0; i < 16; ++i) { -; 2613 : sizes[i] = stbi__get8(z->s); -; 2614 : n += sizes[i]; -; 2615 : } -; 2616 : if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values! -; 2617 : L -= 17; -; 2618 : if (tc == 0) { -; 2619 : if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0; -; 2620 : v = z->huff_dc[th].values; -; 2621 : } -; 2622 : else { -; 2623 : if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0; -; 2624 : v = z->huff_ac[th].values; -; 2625 : } -; 2626 : for (i = 0; i < n; ++i) -; 2627 : v[i] = stbi__get8(z->s); -; 2628 : if (tc != 0) -; 2629 : stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); -; 2630 : L -= n; -; 2631 : } -; 2632 : return L == 0; -; 2633 : } -; 2634 : -; 2635 : // check for comment block or APP blocks -; 2636 : if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { -; 2637 : L = stbi__get16be(z->s); -; 2638 : if (L < 2) { -; 2639 : if (m == 0xFE) -; 2640 : return stbi__err("bad COM len", "Corrupt JPEG"); -; 2641 : else -; 2642 : return stbi__err("bad APP len", "Corrupt JPEG"); -; 2643 : } -; 2644 : L -= 2; -; 2645 : -; 2646 : if (m == 0xE0 && L >= 5) { // JFIF APP0 segment -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) -; 2652 : ok = 0; -; 2653 : L -= 5; -; 2654 : if (ok) -; 2655 : z->jfif = 1; -; 2656 : } -; 2657 : else if (m == 0xEE && L >= 12) { // Adobe APP14 segment -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) -; 2663 : ok = 0; -; 2664 : L -= 6; -; 2665 : if (ok) { -; 2666 : stbi__get8(z->s); // version -; 2667 : stbi__get16be(z->s); // flags0 -; 2668 : stbi__get16be(z->s); // flags1 -; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform -; 2670 : L -= 6; -; 2671 : } -; 2672 : } -; 2673 : -; 2674 : stbi__skip(z->s, L); -; 2675 : return 1; -; 2676 : } -; 2677 : -; 2678 : return stbi__err("unknown marker", "Corrupt JPEG"); -; 2679 : } -; 2680 : -; 2681 : // after we see SOS -; 2682 : static int stbi__process_scan_header(stbi__jpeg* z) -; 2683 : { -; 2684 : int i; -; 2685 : int Ls = stbi__get16be(z->s); -; 2686 : z->scan_n = stbi__get8(z->s); -; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); -; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); -; 2689 : for (i = 0; i < z->scan_n; ++i) { -; 2690 : int id = stbi__get8(z->s), which; -; 2691 : int q = stbi__get8(z->s); -; 2692 : for (which = 0; which < z->s->img_n; ++which) -; 2693 : if (z->img_comp[which].id == id) -; 2694 : break; -; 2695 : if (which == z->s->img_n) return 0; // no match -; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); -; 2698 : z->order[i] = which; -; 2699 : } -; 2700 : -; 2701 : { -; 2702 : int aa; -; 2703 : z->spec_start = stbi__get8(z->s); -; 2704 : z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 -; 2705 : aa = stbi__get8(z->s); -; 2706 : z->succ_high = (aa >> 4); -; 2707 : z->succ_low = (aa & 15); -; 2708 : if (z->progressive) { -; 2709 : if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) -; 2710 : return stbi__err("bad SOS", "Corrupt JPEG"); -; 2711 : } -; 2712 : else { -; 2713 : if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2714 : if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2715 : z->spec_end = 63; -; 2716 : } -; 2717 : } -; 2718 : -; 2719 : return 1; -; 2720 : } -; 2721 : -; 2722 : static int stbi__free_jpeg_components(stbi__jpeg* z, int ncomp, int why) -; 2723 : { -; 2724 : int i; -; 2725 : for (i = 0; i < ncomp; ++i) { -; 2726 : if (z->img_comp[i].raw_data) { -; 2727 : STBI_FREE(z->img_comp[i].raw_data); -; 2728 : z->img_comp[i].raw_data = NULL; -; 2729 : z->img_comp[i].data = NULL; -; 2730 : } -; 2731 : if (z->img_comp[i].raw_coeff) { -; 2732 : STBI_FREE(z->img_comp[i].raw_coeff); -; 2733 : z->img_comp[i].raw_coeff = 0; -; 2734 : z->img_comp[i].coeff = 0; -; 2735 : } -; 2736 : if (z->img_comp[i].linebuf) { -; 2737 : STBI_FREE(z->img_comp[i].linebuf); -; 2738 : z->img_comp[i].linebuf = NULL; -; 2739 : } -; 2740 : } -; 2741 : return why; -; 2742 : } -; 2743 : -; 2744 : static int stbi__process_frame_header(stbi__jpeg* z, int scan) -; 2745 : { -; 2746 : stbi__context* s = z->s; -; 2747 : int Lf, p, i, q, h_max = 1, v_max = 1, c; -; 2748 : Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG -; 2749 : p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline -; 2750 : s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG -; 2751 : s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires -; 2752 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2753 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2754 : c = stbi__get8(s); -; 2755 : if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG"); -; 2756 : s->img_n = c; -; 2757 : for (i = 0; i < c; ++i) { -; 2758 : z->img_comp[i].data = NULL; -; 2759 : z->img_comp[i].linebuf = NULL; -; 2760 : } -; 2761 : -; 2762 : if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG"); -; 2763 : -; 2764 : z->rgb = 0; -; 2765 : for (i = 0; i < s->img_n; ++i) { -; 2766 : static const unsigned char rgb[3] = { 'R', 'G', 'B' }; -; 2767 : z->img_comp[i].id = stbi__get8(s); -; 2768 : if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) -; 2769 : ++z->rgb; -; 2770 : q = stbi__get8(s); -; 2771 : z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H", "Corrupt JPEG"); -; 2772 : z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V", "Corrupt JPEG"); -; 2773 : z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ", "Corrupt JPEG"); -; 2774 : } -; 2775 : -; 2776 : if (scan != STBI__SCAN_load) return 1; -; 2777 : -; 2778 : if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); -; 2779 : -; 2780 : for (i = 0; i < s->img_n; ++i) { -; 2781 : if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; -; 2782 : if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; -; 2783 : } -; 2784 : -; 2785 : // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios -; 2786 : // and I've never seen a non-corrupted JPEG file actually use them -; 2787 : for (i = 0; i < s->img_n; ++i) { -; 2788 : if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG"); -; 2789 : if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG"); -; 2790 : } -; 2791 : -; 2792 : // compute interleaved mcu info -; 2793 : z->img_h_max = h_max; -; 2794 : z->img_v_max = v_max; -; 2795 : z->img_mcu_w = h_max * 8; -; 2796 : z->img_mcu_h = v_max * 8; -; 2797 : // these sizes can't be more than 17 bits -; 2798 : z->img_mcu_x = (s->img_x + z->img_mcu_w - 1) / z->img_mcu_w; -; 2799 : z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h; -; 2800 : -; 2801 : for (i = 0; i < s->img_n; ++i) { -; 2802 : // number of effective pixels (e.g. for non-interleaved MCU) -; 2803 : z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max - 1) / h_max; -; 2804 : z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max - 1) / v_max; -; 2805 : // to simplify generation, we'll allocate enough memory to decode -; 2806 : // the bogus oversized data from using interleaved MCUs and their -; 2807 : // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't -; 2808 : // discard the extra data until colorspace conversion -; 2809 : // -; 2810 : // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) -; 2811 : // so these muls can't overflow with 32-bit ints (which we require) -; 2812 : z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; -; 2813 : z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; -; 2814 : z->img_comp[i].coeff = 0; -; 2815 : z->img_comp[i].raw_coeff = 0; -; 2816 : z->img_comp[i].linebuf = NULL; -; 2817 : z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); -; 2818 : if (z->img_comp[i].raw_data == NULL) -; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2820 : // align blocks for idct using mmx/sse -; 2821 : z->img_comp[i].data = (stbi_uc*)(((size_t)z->img_comp[i].raw_data + 15) & ~15); -; 2822 : if (z->progressive) { -; 2823 : // w2, h2 are multiples of 8 (see above) -; 2824 : z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; -; 2825 : z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; -; 2826 : z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); -; 2827 : if (z->img_comp[i].raw_coeff == NULL) -; 2828 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2829 : z->img_comp[i].coeff = (short*)(((size_t)z->img_comp[i].raw_coeff + 15) & ~15); -; 2830 : } -; 2831 : } -; 2832 : -; 2833 : return 1; -; 2834 : } -; 2835 : -; 2836 : // use comparisons since in some cases we handle more than one case (e.g. SOF) -; 2837 : #define stbi__DNL(x) ((x) == 0xdc) -; 2838 : #define stbi__SOI(x) ((x) == 0xd8) -; 2839 : #define stbi__EOI(x) ((x) == 0xd9) -; 2840 : #define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) -; 2841 : #define stbi__SOS(x) ((x) == 0xda) -; 2842 : -; 2843 : #define stbi__SOF_progressive(x) ((x) == 0xc2) -; 2844 : -; 2845 : static int stbi__decode_jpeg_header(stbi__jpeg* z, int scan) -; 2846 : { -; 2847 : int m; -; 2848 : z->jfif = 0; -; 2849 : z->app14_color_transform = -1; // valid values are 0,1,2 -; 2850 : z->marker = STBI__MARKER_none; // initialize cached marker to empty -; 2851 : m = stbi__get_marker(z); -; 2852 : if (!stbi__SOI(m)) return stbi__err("no SOI", "Corrupt JPEG"); -; 2853 : if (scan == STBI__SCAN_type) return 1; -; 2854 : m = stbi__get_marker(z); -; 2855 : while (!stbi__SOF(m)) { -; 2856 : if (!stbi__process_marker(z, m)) return 0; -; 2857 : m = stbi__get_marker(z); -; 2858 : while (m == STBI__MARKER_none) { -; 2859 : // some files have extra padding after their blocks, so ok, we'll scan -; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); -; 2861 : m = stbi__get_marker(z); -; 2862 : } -; 2863 : } -; 2864 : z->progressive = stbi__SOF_progressive(m); -; 2865 : if (!stbi__process_frame_header(z, scan)) return 0; -; 2866 : return 1; -; 2867 : } -; 2868 : -; 2869 : static int stbi__skip_jpeg_junk_at_end(stbi__jpeg* j) -; 2870 : { -; 2871 : // some JPEGs have junk at end, skip over it but if we find what looks -; 2872 : // like a valid marker, resume there -; 2873 : while (!stbi__at_eof(j->s)) { -; 2874 : int x = stbi__get8(j->s); -; 2875 : while (x == 255) { // might be a marker -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; -; 2877 : x = stbi__get8(j->s); -; 2878 : if (x != 0x00 && x != 0xff) { -; 2879 : // not a stuffed zero or lead-in to another marker, looks -; 2880 : // like an actual marker, return it -; 2881 : return x; -; 2882 : } -; 2883 : // stuffed zero has x=0 now which ends the loop, meaning we go -; 2884 : // back to regular scan loop. -; 2885 : // repeated 0xff keeps trying to read the next byte of the marker. -; 2886 : } -; 2887 : } -; 2888 : return STBI__MARKER_none; -; 2889 : } -; 2890 : -; 2891 : // decode image to YCbCr format -; 2892 : static int stbi__decode_jpeg_image(stbi__jpeg* j) -; 2893 : { -; 2894 : int m; -; 2895 : for (m = 0; m < 4; m++) { -; 2896 : j->img_comp[m].raw_data = NULL; -; 2897 : j->img_comp[m].raw_coeff = NULL; -; 2898 : } -; 2899 : j->restart_interval = 0; -; 2900 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; -; 2901 : m = stbi__get_marker(j); -; 2902 : while (!stbi__EOI(m)) { -; 2903 : if (stbi__SOS(m)) { -; 2904 : if (!stbi__process_scan_header(j)) return 0; -; 2905 : if (!stbi__parse_entropy_coded_data(j)) return 0; -; 2906 : if (j->marker == STBI__MARKER_none) { -; 2907 : j->marker = stbi__skip_jpeg_junk_at_end(j); -; 2908 : // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 -; 2909 : } -; 2910 : m = stbi__get_marker(j); -; 2911 : if (STBI__RESTART(m)) -; 2912 : m = stbi__get_marker(j); -; 2913 : } -; 2914 : else if (stbi__DNL(m)) { -; 2915 : int Ld = stbi__get16be(j->s); -; 2916 : stbi__uint32 NL = stbi__get16be(j->s); -; 2917 : if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); -; 2918 : if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); -; 2919 : m = stbi__get_marker(j); -; 2920 : } -; 2921 : else { -; 2922 : if (!stbi__process_marker(j, m)) return 1; -; 2923 : m = stbi__get_marker(j); -; 2924 : } -; 2925 : } -; 2926 : if (j->progressive) -; 2927 : stbi__jpeg_finish(j); -; 2928 : return 1; -; 2929 : } -; 2930 : -; 2931 : // static jfif-centered resampling (across block boundaries) -; 2932 : -; 2933 : typedef stbi_uc* (*resample_row_func)(stbi_uc* out, stbi_uc* in0, stbi_uc* in1, -; 2934 : int w, int hs); -; 2935 : -; 2936 : #define stbi__div4(x) ((stbi_uc) ((x) >> 2)) -; 2937 : -; 2938 : static stbi_uc* resample_row_1(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2939 : { -; 2940 : STBI_NOTUSED(out); -; 2941 : STBI_NOTUSED(in_far); -; 2942 : STBI_NOTUSED(w); -; 2943 : STBI_NOTUSED(hs); -; 2944 : return in_near; -; 2945 : } -; 2946 : -; 2947 : static stbi_uc* stbi__resample_row_v_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2948 : { -; 2949 : // need to generate two samples vertically for every one in input -; 2950 : int i; -; 2951 : STBI_NOTUSED(hs); -; 2952 : for (i = 0; i < w; ++i) -; 2953 : out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2); -; 2954 : return out; -; 2955 : } -; 2956 : -; 2957 : static stbi_uc* stbi__resample_row_h_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2958 : { -; 2959 : // need to generate two samples horizontally for every one in input -; 2960 : int i; -; 2961 : stbi_uc* input = in_near; -; 2962 : -; 2963 : if (w == 1) { -; 2964 : // if only one sample, can't do any interpolation -; 2965 : out[0] = out[1] = input[0]; -; 2966 : return out; -; 2967 : } -; 2968 : -; 2969 : out[0] = input[0]; -; 2970 : out[1] = stbi__div4(input[0] * 3 + input[1] + 2); -; 2971 : for (i = 1; i < w - 1; ++i) { -; 2972 : int n = 3 * input[i] + 2; -; 2973 : out[i * 2 + 0] = stbi__div4(n + input[i - 1]); -; 2974 : out[i * 2 + 1] = stbi__div4(n + input[i + 1]); -; 2975 : } -; 2976 : out[i * 2 + 0] = stbi__div4(input[w - 2] * 3 + input[w - 1] + 2); -; 2977 : out[i * 2 + 1] = input[w - 1]; -; 2978 : -; 2979 : STBI_NOTUSED(in_far); -; 2980 : STBI_NOTUSED(hs); -; 2981 : -; 2982 : return out; -; 2983 : } -; 2984 : -; 2985 : #define stbi__div16(x) ((stbi_uc) ((x) >> 4)) -; 2986 : -; 2987 : static stbi_uc* stbi__resample_row_hv_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2988 : { -; 2989 : // need to generate 2x2 samples for every one in input -; 2990 : int i, t0, t1; -; 2991 : if (w == 1) { -; 2992 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 2993 : return out; -; 2994 : } -; 2995 : -; 2996 : t1 = 3 * in_near[0] + in_far[0]; -; 2997 : out[0] = stbi__div4(t1 + 2); -; 2998 : for (i = 1; i < w; ++i) { -; 2999 : t0 = t1; -; 3000 : t1 = 3 * in_near[i] + in_far[i]; -; 3001 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3002 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3003 : } -; 3004 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3005 : -; 3006 : STBI_NOTUSED(hs); -; 3007 : -; 3008 : return out; -; 3009 : } -; 3010 : -; 3011 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3012 : static stbi_uc* stbi__resample_row_hv_2_simd(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3013 : { -; 3014 : // need to generate 2x2 samples for every one in input -; 3015 : int i = 0, t0, t1; -; 3016 : -; 3017 : if (w == 1) { -; 3018 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 3019 : return out; -; 3020 : } -; 3021 : -; 3022 : t1 = 3 * in_near[0] + in_far[0]; -; 3023 : // process groups of 8 pixels for as long as we can. -; 3024 : // note we can't handle the last pixel in a row in this loop -; 3025 : // because we need to handle the filter boundary conditions. -; 3026 : for (; i < ((w - 1) & ~7); i += 8) { -; 3027 : #if defined(STBI_SSE2) -; 3028 : // load and perform the vertical filtering pass -; 3029 : // this uses 3*x + y = 4*x + (y - x) -; 3030 : __m128i zero = _mm_setzero_si128(); -; 3031 : __m128i farb = _mm_loadl_epi64((__m128i*) (in_far + i)); -; 3032 : __m128i nearb = _mm_loadl_epi64((__m128i*) (in_near + i)); -; 3033 : __m128i farw = _mm_unpacklo_epi8(farb, zero); -; 3034 : __m128i nearw = _mm_unpacklo_epi8(nearb, zero); -; 3035 : __m128i diff = _mm_sub_epi16(farw, nearw); -; 3036 : __m128i nears = _mm_slli_epi16(nearw, 2); -; 3037 : __m128i curr = _mm_add_epi16(nears, diff); // current row -; 3038 : -; 3039 : // horizontal filter works the same based on shifted vers of current -; 3040 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3041 : // insert the previous pixel value (from t1). -; 3042 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3043 : // of next block of 8 pixels added in. -; 3044 : __m128i prv0 = _mm_slli_si128(curr, 2); -; 3045 : __m128i nxt0 = _mm_srli_si128(curr, 2); -; 3046 : __m128i prev = _mm_insert_epi16(prv0, t1, 0); -; 3047 : __m128i next = _mm_insert_epi16(nxt0, 3 * in_near[i + 8] + in_far[i + 8], 7); -; 3048 : -; 3049 : // horizontal filter, polyphase implementation since it's convenient: -; 3050 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3051 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3052 : // note the shared term. -; 3053 : __m128i bias = _mm_set1_epi16(8); -; 3054 : __m128i curs = _mm_slli_epi16(curr, 2); -; 3055 : __m128i prvd = _mm_sub_epi16(prev, curr); -; 3056 : __m128i nxtd = _mm_sub_epi16(next, curr); -; 3057 : __m128i curb = _mm_add_epi16(curs, bias); -; 3058 : __m128i even = _mm_add_epi16(prvd, curb); -; 3059 : __m128i odd = _mm_add_epi16(nxtd, curb); -; 3060 : -; 3061 : // interleave even and odd pixels, then undo scaling. -; 3062 : __m128i int0 = _mm_unpacklo_epi16(even, odd); -; 3063 : __m128i int1 = _mm_unpackhi_epi16(even, odd); -; 3064 : __m128i de0 = _mm_srli_epi16(int0, 4); -; 3065 : __m128i de1 = _mm_srli_epi16(int1, 4); -; 3066 : -; 3067 : // pack and write output -; 3068 : __m128i outv = _mm_packus_epi16(de0, de1); -; 3069 : _mm_storeu_si128((__m128i*) (out + i * 2), outv); -; 3070 : #elif defined(STBI_NEON) -; 3071 : // load and perform the vertical filtering pass -; 3072 : // this uses 3*x + y = 4*x + (y - x) -; 3073 : uint8x8_t farb = vld1_u8(in_far + i); -; 3074 : uint8x8_t nearb = vld1_u8(in_near + i); -; 3075 : int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); -; 3076 : int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); -; 3077 : int16x8_t curr = vaddq_s16(nears, diff); // current row -; 3078 : -; 3079 : // horizontal filter works the same based on shifted vers of current -; 3080 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3081 : // insert the previous pixel value (from t1). -; 3082 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3083 : // of next block of 8 pixels added in. -; 3084 : int16x8_t prv0 = vextq_s16(curr, curr, 7); -; 3085 : int16x8_t nxt0 = vextq_s16(curr, curr, 1); -; 3086 : int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); -; 3087 : int16x8_t next = vsetq_lane_s16(3 * in_near[i + 8] + in_far[i + 8], nxt0, 7); -; 3088 : -; 3089 : // horizontal filter, polyphase implementation since it's convenient: -; 3090 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3091 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3092 : // note the shared term. -; 3093 : int16x8_t curs = vshlq_n_s16(curr, 2); -; 3094 : int16x8_t prvd = vsubq_s16(prev, curr); -; 3095 : int16x8_t nxtd = vsubq_s16(next, curr); -; 3096 : int16x8_t even = vaddq_s16(curs, prvd); -; 3097 : int16x8_t odd = vaddq_s16(curs, nxtd); -; 3098 : -; 3099 : // undo scaling and round, then store with even/odd phases interleaved -; 3100 : uint8x8x2_t o; -; 3101 : o.val[0] = vqrshrun_n_s16(even, 4); -; 3102 : o.val[1] = vqrshrun_n_s16(odd, 4); -; 3103 : vst2_u8(out + i * 2, o); -; 3104 : #endif -; 3105 : -; 3106 : // "previous" value for next iter -; 3107 : t1 = 3 * in_near[i + 7] + in_far[i + 7]; -; 3108 : } -; 3109 : -; 3110 : t0 = t1; -; 3111 : t1 = 3 * in_near[i] + in_far[i]; -; 3112 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3113 : -; 3114 : for (++i; i < w; ++i) { -; 3115 : t0 = t1; -; 3116 : t1 = 3 * in_near[i] + in_far[i]; -; 3117 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3118 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3119 : } -; 3120 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3121 : -; 3122 : STBI_NOTUSED(hs); -; 3123 : -; 3124 : return out; -; 3125 : } -; 3126 : #endif -; 3127 : -; 3128 : static stbi_uc* stbi__resample_row_generic(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3129 : { -; 3130 : // resample with nearest-neighbor -; 3131 : int i, j; -; 3132 : STBI_NOTUSED(in_far); -; 3133 : for (i = 0; i < w; ++i) -; 3134 : for (j = 0; j < hs; ++j) -; 3135 : out[i * hs + j] = in_near[i]; -; 3136 : return out; -; 3137 : } -; 3138 : -; 3139 : // this is a reduced-precision calculation of YCbCr-to-RGB introduced -; 3140 : // to make sure the code produces the same results in both SIMD and scalar -; 3141 : #define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) -; 3142 : static void stbi__YCbCr_to_RGB_row(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step) -; 3143 : { -; 3144 : int i; -; 3145 : for (i = 0; i < count; ++i) { -; 3146 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3147 : int r, g, b; -; 3148 : int cr = pcr[i] - 128; -; 3149 : int cb = pcb[i] - 128; -; 3150 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3151 : g = y_fixed + (cr * -stbi__float2fixed(0.71414f)) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3152 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3153 : r >>= 20; -; 3154 : g >>= 20; -; 3155 : b >>= 20; -; 3156 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3157 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3158 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3159 : out[0] = (stbi_uc)r; -; 3160 : out[1] = (stbi_uc)g; -; 3161 : out[2] = (stbi_uc)b; -; 3162 : out[3] = 255; -; 3163 : out += step; -; 3164 : } -; 3165 : } -; 3166 : -; 3167 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3168 : static void stbi__YCbCr_to_RGB_simd(stbi_uc* out, stbi_uc const* y, stbi_uc const* pcb, stbi_uc const* pcr, int count, int step) -; 3169 : { -; 3170 : int i = 0; -; 3171 : -; 3172 : #ifdef STBI_SSE2 -; 3173 : // step == 3 is pretty ugly on the final interleave, and i'm not convinced -; 3174 : // it's useful in practice (you wouldn't use it for textures, for example). -; 3175 : // so just accelerate step == 4 case. -; 3176 : if (step == 4) { -; 3177 : // this is a fairly straightforward implementation and not super-optimized. -; 3178 : __m128i signflip = _mm_set1_epi8(-0x80); -; 3179 : __m128i cr_const0 = _mm_set1_epi16((short)(1.40200f * 4096.0f + 0.5f)); -; 3180 : __m128i cr_const1 = _mm_set1_epi16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3181 : __m128i cb_const0 = _mm_set1_epi16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3182 : __m128i cb_const1 = _mm_set1_epi16((short)(1.77200f * 4096.0f + 0.5f)); -; 3183 : __m128i y_bias = _mm_set1_epi8((char)(unsigned char)128); -; 3184 : __m128i xw = _mm_set1_epi16(255); // alpha channel -; 3185 : -; 3186 : for (; i + 7 < count; i += 8) { -; 3187 : // load -; 3188 : __m128i y_bytes = _mm_loadl_epi64((__m128i*) (y + i)); -; 3189 : __m128i cr_bytes = _mm_loadl_epi64((__m128i*) (pcr + i)); -; 3190 : __m128i cb_bytes = _mm_loadl_epi64((__m128i*) (pcb + i)); -; 3191 : __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 -; 3192 : __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 -; 3193 : -; 3194 : // unpack to short (and left-shift cr, cb by 8) -; 3195 : __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); -; 3196 : __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); -; 3197 : __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); -; 3198 : -; 3199 : // color transform -; 3200 : __m128i yws = _mm_srli_epi16(yw, 4); -; 3201 : __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); -; 3202 : __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); -; 3203 : __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); -; 3204 : __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); -; 3205 : __m128i rws = _mm_add_epi16(cr0, yws); -; 3206 : __m128i gwt = _mm_add_epi16(cb0, yws); -; 3207 : __m128i bws = _mm_add_epi16(yws, cb1); -; 3208 : __m128i gws = _mm_add_epi16(gwt, cr1); -; 3209 : -; 3210 : // descale -; 3211 : __m128i rw = _mm_srai_epi16(rws, 4); -; 3212 : __m128i bw = _mm_srai_epi16(bws, 4); -; 3213 : __m128i gw = _mm_srai_epi16(gws, 4); -; 3214 : -; 3215 : // back to byte, set up for transpose -; 3216 : __m128i brb = _mm_packus_epi16(rw, bw); -; 3217 : __m128i gxb = _mm_packus_epi16(gw, xw); -; 3218 : -; 3219 : // transpose to interleave channels -; 3220 : __m128i t0 = _mm_unpacklo_epi8(brb, gxb); -; 3221 : __m128i t1 = _mm_unpackhi_epi8(brb, gxb); -; 3222 : __m128i o0 = _mm_unpacklo_epi16(t0, t1); -; 3223 : __m128i o1 = _mm_unpackhi_epi16(t0, t1); -; 3224 : -; 3225 : // store -; 3226 : _mm_storeu_si128((__m128i*) (out + 0), o0); -; 3227 : _mm_storeu_si128((__m128i*) (out + 16), o1); -; 3228 : out += 32; -; 3229 : } -; 3230 : } -; 3231 : #endif -; 3232 : -; 3233 : #ifdef STBI_NEON -; 3234 : // in this version, step=3 support would be easy to add. but is there demand? -; 3235 : if (step == 4) { -; 3236 : // this is a fairly straightforward implementation and not super-optimized. -; 3237 : uint8x8_t signflip = vdup_n_u8(0x80); -; 3238 : int16x8_t cr_const0 = vdupq_n_s16((short)(1.40200f * 4096.0f + 0.5f)); -; 3239 : int16x8_t cr_const1 = vdupq_n_s16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3240 : int16x8_t cb_const0 = vdupq_n_s16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3241 : int16x8_t cb_const1 = vdupq_n_s16((short)(1.77200f * 4096.0f + 0.5f)); -; 3242 : -; 3243 : for (; i + 7 < count; i += 8) { -; 3244 : // load -; 3245 : uint8x8_t y_bytes = vld1_u8(y + i); -; 3246 : uint8x8_t cr_bytes = vld1_u8(pcr + i); -; 3247 : uint8x8_t cb_bytes = vld1_u8(pcb + i); -; 3248 : int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); -; 3249 : int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); -; 3250 : -; 3251 : // expand to s16 -; 3252 : int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); -; 3253 : int16x8_t crw = vshll_n_s8(cr_biased, 7); -; 3254 : int16x8_t cbw = vshll_n_s8(cb_biased, 7); -; 3255 : -; 3256 : // color transform -; 3257 : int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); -; 3258 : int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); -; 3259 : int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); -; 3260 : int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); -; 3261 : int16x8_t rws = vaddq_s16(yws, cr0); -; 3262 : int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); -; 3263 : int16x8_t bws = vaddq_s16(yws, cb1); -; 3264 : -; 3265 : // undo scaling, round, convert to byte -; 3266 : uint8x8x4_t o; -; 3267 : o.val[0] = vqrshrun_n_s16(rws, 4); -; 3268 : o.val[1] = vqrshrun_n_s16(gws, 4); -; 3269 : o.val[2] = vqrshrun_n_s16(bws, 4); -; 3270 : o.val[3] = vdup_n_u8(255); -; 3271 : -; 3272 : // store, interleaving r/g/b/a -; 3273 : vst4_u8(out, o); -; 3274 : out += 8 * 4; -; 3275 : } -; 3276 : } -; 3277 : #endif -; 3278 : -; 3279 : for (; i < count; ++i) { -; 3280 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3281 : int r, g, b; -; 3282 : int cr = pcr[i] - 128; -; 3283 : int cb = pcb[i] - 128; -; 3284 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3285 : g = y_fixed + cr * -stbi__float2fixed(0.71414f) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3286 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3287 : r >>= 20; -; 3288 : g >>= 20; -; 3289 : b >>= 20; -; 3290 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3291 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3292 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3293 : out[0] = (stbi_uc)r; -; 3294 : out[1] = (stbi_uc)g; -; 3295 : out[2] = (stbi_uc)b; -; 3296 : out[3] = 255; -; 3297 : out += step; -; 3298 : } -; 3299 : } -; 3300 : #endif -; 3301 : -; 3302 : // set up the kernels -; 3303 : static void stbi__setup_jpeg(stbi__jpeg* j) -; 3304 : { -; 3305 : j->idct_block_kernel = stbi__idct_block; -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; -; 3308 : -; 3309 : #ifdef STBI_SSE2 -; 3310 : if (stbi__sse2_available()) { -; 3311 : j->idct_block_kernel = stbi__idct_simd; -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3314 : } -; 3315 : #endif -; 3316 : -; 3317 : #ifdef STBI_NEON -; 3318 : j->idct_block_kernel = stbi__idct_simd; -; 3319 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3320 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3321 : #endif -; 3322 : } -; 3323 : -; 3324 : // clean up the temporary component buffers -; 3325 : static void stbi__cleanup_jpeg(stbi__jpeg* j) -; 3326 : { -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); -; 3328 : } -; 3329 : -; 3330 : typedef struct -; 3331 : { -; 3332 : resample_row_func resample; -; 3333 : stbi_uc* line0, * line1; -; 3334 : int hs, vs; // expansion factor in each axis -; 3335 : int w_lores; // horizontal pixels pre-expansion -; 3336 : int ystep; // how far through vertical expansion we are -; 3337 : int ypos; // which pre-expansion row we're on -; 3338 : } stbi__resample; -; 3339 : -; 3340 : // fast 0..255 * 0..255 => 0..255 rounded multiplication -; 3341 : static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) -; 3342 : { -; 3343 : unsigned int t = x * y + 128; -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); -; 3345 : } -; 3346 : -; 3347 : static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp, int req_comp) -; 3348 : { -; 3349 : int n, decode_n, is_rgb; -; 3350 : z->s->img_n = 0; // make stbi__cleanup_jpeg safe -; 3351 : -; 3352 : // validate req_comp -; 3353 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 3354 : -; 3355 : // load a jpeg image from whichever source, but leave in YCbCr format -; 3356 : if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } -; 3357 : -; 3358 : // determine actual number of components to generate -; 3359 : n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; -; 3360 : -; 3361 : is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); -; 3362 : -; 3363 : if (z->s->img_n == 3 && n < 3 && !is_rgb) -; 3364 : decode_n = 1; -; 3365 : else -; 3366 : decode_n = z->s->img_n; -; 3367 : -; 3368 : // nothing to do if no components requested; check this now to avoid -; 3369 : // accessing uninitialized coutput[0] later -; 3370 : if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } -; 3371 : -; 3372 : // resample and color-convert -; 3373 : { -; 3374 : int k; -; 3375 : unsigned int i, j; -; 3376 : stbi_uc* output; -; 3377 : stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL }; -; 3378 : -; 3379 : stbi__resample res_comp[4]; -; 3380 : -; 3381 : for (k = 0; k < decode_n; ++k) { -; 3382 : stbi__resample* r = &res_comp[k]; -; 3383 : -; 3384 : // allocate line buffer big enough for upsampling off the edges -; 3385 : // with upsample factor of 4 -; 3386 : z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3); -; 3387 : if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3388 : -; 3389 : r->hs = z->img_h_max / z->img_comp[k].h; -; 3390 : r->vs = z->img_v_max / z->img_comp[k].v; -; 3391 : r->ystep = r->vs >> 1; -; 3392 : r->w_lores = (z->s->img_x + r->hs - 1) / r->hs; -; 3393 : r->ypos = 0; -; 3394 : r->line0 = r->line1 = z->img_comp[k].data; -; 3395 : -; 3396 : if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; -; 3397 : else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; -; 3398 : else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; -; 3399 : else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; -; 3400 : else r->resample = stbi__resample_row_generic; -; 3401 : } -; 3402 : -; 3403 : // can't error after this so, this is safe -; 3404 : output = (stbi_uc*)stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); -; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3406 : -; 3407 : // now go ahead and resample -; 3408 : for (j = 0; j < z->s->img_y; ++j) { -; 3409 : stbi_uc* out = output + n * z->s->img_x * j; -; 3410 : for (k = 0; k < decode_n; ++k) { -; 3411 : stbi__resample* r = &res_comp[k]; -; 3412 : int y_bot = r->ystep >= (r->vs >> 1); -; 3413 : coutput[k] = r->resample(z->img_comp[k].linebuf, -; 3414 : y_bot ? r->line1 : r->line0, -; 3415 : y_bot ? r->line0 : r->line1, -; 3416 : r->w_lores, r->hs); -; 3417 : if (++r->ystep >= r->vs) { -; 3418 : r->ystep = 0; -; 3419 : r->line0 = r->line1; -; 3420 : if (++r->ypos < z->img_comp[k].y) -; 3421 : r->line1 += z->img_comp[k].w2; -; 3422 : } -; 3423 : } -; 3424 : if (n >= 3) { -; 3425 : stbi_uc* y = coutput[0]; -; 3426 : if (z->s->img_n == 3) { -; 3427 : if (is_rgb) { -; 3428 : for (i = 0; i < z->s->img_x; ++i) { -; 3429 : out[0] = y[i]; -; 3430 : out[1] = coutput[1][i]; -; 3431 : out[2] = coutput[2][i]; -; 3432 : out[3] = 255; -; 3433 : out += n; -; 3434 : } -; 3435 : } -; 3436 : else { -; 3437 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3438 : } -; 3439 : } -; 3440 : else if (z->s->img_n == 4) { -; 3441 : if (z->app14_color_transform == 0) { // CMYK -; 3442 : for (i = 0; i < z->s->img_x; ++i) { -; 3443 : stbi_uc m = coutput[3][i]; -; 3444 : out[0] = stbi__blinn_8x8(coutput[0][i], m); -; 3445 : out[1] = stbi__blinn_8x8(coutput[1][i], m); -; 3446 : out[2] = stbi__blinn_8x8(coutput[2][i], m); -; 3447 : out[3] = 255; -; 3448 : out += n; -; 3449 : } -; 3450 : } -; 3451 : else if (z->app14_color_transform == 2) { // YCCK -; 3452 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3453 : for (i = 0; i < z->s->img_x; ++i) { -; 3454 : stbi_uc m = coutput[3][i]; -; 3455 : out[0] = stbi__blinn_8x8(255 - out[0], m); -; 3456 : out[1] = stbi__blinn_8x8(255 - out[1], m); -; 3457 : out[2] = stbi__blinn_8x8(255 - out[2], m); -; 3458 : out += n; -; 3459 : } -; 3460 : } -; 3461 : else { // YCbCr + alpha? Ignore the fourth channel for now -; 3462 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3463 : } -; 3464 : } -; 3465 : else -; 3466 : for (i = 0; i < z->s->img_x; ++i) { -; 3467 : out[0] = out[1] = out[2] = y[i]; -; 3468 : out[3] = 255; // not used if n==3 -; 3469 : out += n; -; 3470 : } -; 3471 : } -; 3472 : else { -; 3473 : if (is_rgb) { -; 3474 : if (n == 1) -; 3475 : for (i = 0; i < z->s->img_x; ++i) -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3477 : else { -; 3478 : for (i = 0; i < z->s->img_x; ++i, out += 2) { -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3480 : out[1] = 255; -; 3481 : } -; 3482 : } -; 3483 : } -; 3484 : else if (z->s->img_n == 4 && z->app14_color_transform == 0) { -; 3485 : for (i = 0; i < z->s->img_x; ++i) { -; 3486 : stbi_uc m = coutput[3][i]; -; 3487 : stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); -; 3488 : stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); -; 3489 : stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); -; 3490 : out[0] = stbi__compute_y(r, g, b); -; 3491 : out[1] = 255; -; 3492 : out += n; -; 3493 : } -; 3494 : } -; 3495 : else if (z->s->img_n == 4 && z->app14_color_transform == 2) { -; 3496 : for (i = 0; i < z->s->img_x; ++i) { -; 3497 : out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); -; 3498 : out[1] = 255; -; 3499 : out += n; -; 3500 : } -; 3501 : } -; 3502 : else { -; 3503 : stbi_uc* y = coutput[0]; -; 3504 : if (n == 1) -; 3505 : for (i = 0; i < z->s->img_x; ++i) out[i] = y[i]; -; 3506 : else -; 3507 : for (i = 0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } -; 3508 : } -; 3509 : } -; 3510 : } -; 3511 : stbi__cleanup_jpeg(z); -; 3512 : *out_x = z->s->img_x; -; 3513 : *out_y = z->s->img_y; -; 3514 : if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output -; 3515 : return output; -; 3516 : } -; 3517 : } -; 3518 : -; 3519 : static void* stbi__jpeg_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 3520 : { -; 3521 : unsigned char* result; -; 3522 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); -; 3524 : memset(j, 0, sizeof(stbi__jpeg)); -; 3525 : STBI_NOTUSED(ri); -; 3526 : j->s = s; -; 3527 : stbi__setup_jpeg(j); -; 3528 : result = load_jpeg_image(j, x, y, comp, req_comp); -; 3529 : STBI_FREE(j); -; 3530 : return result; -; 3531 : } -; 3532 : -; 3533 : static int stbi__jpeg_test(stbi__context* s) -; 3534 : { -; 3535 : int r; -; 3536 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3538 : memset(j, 0, sizeof(stbi__jpeg)); -; 3539 : j->s = s; -; 3540 : stbi__setup_jpeg(j); -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); -; 3542 : stbi__rewind(s); -; 3543 : STBI_FREE(j); -; 3544 : return r; -; 3545 : } -; 3546 : -; 3547 : static int stbi__jpeg_info_raw(stbi__jpeg* j, int* x, int* y, int* comp) -; 3548 : { -; 3549 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { -; 3550 : stbi__rewind(j->s); -; 3551 : return 0; -; 3552 : } -; 3553 : if (x) *x = j->s->img_x; -; 3554 : if (y) *y = j->s->img_y; -; 3555 : if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; -; 3556 : return 1; -; 3557 : } -; 3558 : -; 3559 : static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp) -; 3560 : { -; 3561 : int result; -; 3562 : stbi__jpeg* j = (stbi__jpeg*)(stbi__malloc(sizeof(stbi__jpeg))); -; 3563 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3564 : memset(j, 0, sizeof(stbi__jpeg)); -; 3565 : j->s = s; -; 3566 : result = stbi__jpeg_info_raw(j, x, y, comp); -; 3567 : STBI_FREE(j); -; 3568 : return result; -; 3569 : } -; 3570 : #endif -; 3571 : -; 3572 : // public domain zlib decode v0.2 Sean Barrett 2006-11-18 -; 3573 : // simple implementation -; 3574 : // - all input must be provided in an upfront buffer -; 3575 : // - all output is written to a single output buffer (can malloc/realloc) -; 3576 : // performance -; 3577 : // - fast huffman -; 3578 : -; 3579 : #ifndef STBI_NO_ZLIB -; 3580 : -; 3581 : // fast-way is faster to check than jpeg huffman, but slow way is slower -; 3582 : #define STBI__ZFAST_BITS 9 // accelerate all cases in default tables -; 3583 : #define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) -; 3584 : #define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet -; 3585 : -; 3586 : // zlib-style huffman encoding -; 3587 : // (jpegs packs from left, zlib from right, so can't share code) -; 3588 : typedef struct -; 3589 : { -; 3590 : stbi__uint16 fast[1 << STBI__ZFAST_BITS]; -; 3591 : stbi__uint16 firstcode[16]; -; 3592 : int maxcode[17]; -; 3593 : stbi__uint16 firstsymbol[16]; -; 3594 : stbi_uc size[STBI__ZNSYMS]; -; 3595 : stbi__uint16 value[STBI__ZNSYMS]; -; 3596 : } stbi__zhuffman; -; 3597 : -; 3598 : stbi_inline static int stbi__bitreverse16(int n) -; 3599 : { -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); -; 3604 : return n; -; 3605 : } -; 3606 : -; 3607 : stbi_inline static int stbi__bit_reverse(int v, int bits) -; 3608 : { -; 3609 : STBI_ASSERT(bits <= 16); -; 3610 : // to bit reverse n bits, reverse 16 and shift -; 3611 : // e.g. 11 bits, bit reverse and shift away 5 -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); -; 3613 : } -; 3614 : -; 3615 : static int stbi__zbuild_huffman(stbi__zhuffman* z, const stbi_uc* sizelist, int num) -; 3616 : { -; 3617 : int i, k = 0; -; 3618 : int code, next_code[16], sizes[17]; -; 3619 : -; 3620 : // DEFLATE spec for generating codes -; 3621 : memset(sizes, 0, sizeof(sizes)); -; 3622 : memset(z->fast, 0, sizeof(z->fast)); -; 3623 : for (i = 0; i < num; ++i) -; 3624 : ++sizes[sizelist[i]]; -; 3625 : sizes[0] = 0; -; 3626 : for (i = 1; i < 16; ++i) -; 3627 : if (sizes[i] > (1 << i)) -; 3628 : return stbi__err("bad sizes", "Corrupt PNG"); -; 3629 : code = 0; -; 3630 : for (i = 1; i < 16; ++i) { -; 3631 : next_code[i] = code; -; 3632 : z->firstcode[i] = (stbi__uint16)code; -; 3633 : z->firstsymbol[i] = (stbi__uint16)k; -; 3634 : code = (code + sizes[i]); -; 3635 : if (sizes[i]) -; 3636 : if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3637 : z->maxcode[i] = code << (16 - i); // preshift for inner loop -; 3638 : code <<= 1; -; 3639 : k += sizes[i]; -; 3640 : } -; 3641 : z->maxcode[16] = 0x10000; // sentinel -; 3642 : for (i = 0; i < num; ++i) { -; 3643 : int s = sizelist[i]; -; 3644 : if (s) { -; 3645 : int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; -; 3646 : stbi__uint16 fastv = (stbi__uint16)((s << 9) | i); -; 3647 : z->size[c] = (stbi_uc)s; -; 3648 : z->value[c] = (stbi__uint16)i; -; 3649 : if (s <= STBI__ZFAST_BITS) { -; 3650 : int j = stbi__bit_reverse(next_code[s], s); -; 3651 : while (j < (1 << STBI__ZFAST_BITS)) { -; 3652 : z->fast[j] = fastv; -; 3653 : j += (1 << s); -; 3654 : } -; 3655 : } -; 3656 : ++next_code[s]; -; 3657 : } -; 3658 : } -; 3659 : return 1; -; 3660 : } -; 3661 : -; 3662 : // zlib-from-memory implementation for PNG reading -; 3663 : // because PNG allows splitting the zlib stream arbitrarily, -; 3664 : // and it's annoying structurally to have PNG call ZLIB call PNG, -; 3665 : // we require PNG read all the IDATs and combine them into a single -; 3666 : // memory buffer -; 3667 : -; 3668 : typedef struct -; 3669 : { -; 3670 : stbi_uc* zbuffer, * zbuffer_end; -; 3671 : int num_bits; -; 3672 : stbi__uint32 code_buffer; -; 3673 : -; 3674 : char* zout; -; 3675 : char* zout_start; -; 3676 : char* zout_end; -; 3677 : int z_expandable; -; 3678 : -; 3679 : stbi__zhuffman z_length, z_distance; -; 3680 : } stbi__zbuf; -; 3681 : -; 3682 : stbi_inline static int stbi__zeof(stbi__zbuf* z) -; 3683 : { -; 3684 : return (z->zbuffer >= z->zbuffer_end); -; 3685 : } -; 3686 : -; 3687 : stbi_inline static stbi_uc stbi__zget8(stbi__zbuf* z) -; 3688 : { -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ -; 3697 : return; -; 3698 : } -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; -; 3700 : z->num_bits += 8; -; 3701 : } while (z->num_bits <= 24); -; 3702 : } -; 3703 : -; 3704 : stbi_inline static unsigned int stbi__zreceive(stbi__zbuf* z, int n) -; 3705 : { -; 3706 : unsigned int k; -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); -; 3708 : k = z->code_buffer & ((1 << n) - 1); -; 3709 : z->code_buffer >>= n; -; 3710 : z->num_bits -= n; -; 3711 : return k; -; 3712 : } -; 3713 : -; 3714 : static int stbi__zhuffman_decode_slowpath(stbi__zbuf* a, stbi__zhuffman* z) -; 3715 : { -; 3716 : int b, s, k; -; 3717 : // not resolved by fast table, so compute it the slow way -; 3718 : // use jpeg approach, which requires MSbits at top -; 3719 : k = stbi__bit_reverse(a->code_buffer, 16); -; 3720 : for (s = STBI__ZFAST_BITS + 1; ; ++s) -; 3721 : if (k < z->maxcode[s]) -; 3722 : break; -; 3723 : if (s >= 16) return -1; // invalid code! -; 3724 : // code size is s, so: -; 3725 : b = (k >> (16 - s)) - z->firstcode[s] + z->firstsymbol[s]; -; 3726 : if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! -; 3727 : if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. -; 3728 : a->code_buffer >>= s; -; 3729 : a->num_bits -= s; -; 3730 : return z->value[b]; -; 3731 : } -; 3732 : -; 3733 : stbi_inline static int stbi__zhuffman_decode(stbi__zbuf* a, stbi__zhuffman* z) -; 3734 : { -; 3735 : int b, s; -; 3736 : if (a->num_bits < 16) { -; 3737 : if (stbi__zeof(a)) { -; 3738 : return -1; /* report error for unexpected end of data. */ -; 3739 : } -; 3740 : stbi__fill_bits(a); -; 3741 : } -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; -; 3743 : if (b) { -; 3744 : s = b >> 9; -; 3745 : a->code_buffer >>= s; -; 3746 : a->num_bits -= s; -; 3747 : return b & 511; -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); -; 3750 : } -; 3751 : -; 3752 : static int stbi__zexpand(stbi__zbuf* z, char* zout, int n) // need to make room for n bytes -; 3753 : { -; 3754 : char* q; -; 3755 : unsigned int cur, limit, old_limit; -; 3756 : z->zout = zout; -; 3757 : if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG"); -; 3758 : cur = (unsigned int)(z->zout - z->zout_start); -; 3759 : limit = old_limit = (unsigned)(z->zout_end - z->zout_start); -; 3760 : if (UINT_MAX - cur < (unsigned)n) return stbi__err("outofmem", "Out of memory"); -; 3761 : while (cur + n > limit) { -; 3762 : if (limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); -; 3763 : limit *= 2; -; 3764 : } -; 3765 : q = (char*)STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); -; 3766 : STBI_NOTUSED(old_limit); -; 3767 : if (q == NULL) return stbi__err("outofmem", "Out of memory"); -; 3768 : z->zout_start = q; -; 3769 : z->zout = q + cur; -; 3770 : z->zout_end = q + limit; -; 3771 : return 1; -; 3772 : } -; 3773 : -; 3774 : static const int stbi__zlength_base[31] = { -; 3775 : 3,4,5,6,7,8,9,10,11,13, -; 3776 : 15,17,19,23,27,31,35,43,51,59, -; 3777 : 67,83,99,115,131,163,195,227,258,0,0 }; -; 3778 : -; 3779 : static const int stbi__zlength_extra[31] = -; 3780 : { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; -; 3781 : -; 3782 : static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, -; 3783 : 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0 }; -; 3784 : -; 3785 : static const int stbi__zdist_extra[32] = -; 3786 : { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 }; -; 3787 : -; 3788 : static int stbi__parse_huffman_block(stbi__zbuf* a) -; 3789 : { -; 3790 : char* zout = a->zout; -; 3791 : for (;;) { -; 3792 : int z = stbi__zhuffman_decode(a, &a->z_length); -; 3793 : if (z < 256) { -; 3794 : if (z < 0) return stbi__err("bad huffman code", "Corrupt PNG"); // error in huffman codes -; 3795 : if (zout >= a->zout_end) { -; 3796 : if (!stbi__zexpand(a, zout, 1)) return 0; -; 3797 : zout = a->zout; -; 3798 : } -; 3799 : *zout++ = (char)z; -; 3800 : } -; 3801 : else { -; 3802 : stbi_uc* p; -; 3803 : int len, dist; -; 3804 : if (z == 256) { -; 3805 : a->zout = zout; -; 3806 : return 1; -; 3807 : } -; 3808 : if (z >= 286) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data -; 3809 : z -= 257; -; 3810 : len = stbi__zlength_base[z]; -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); -; 3812 : z = stbi__zhuffman_decode(a, &a->z_distance); -; 3813 : if (z < 0 || z >= 30) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data -; 3814 : dist = stbi__zdist_base[z]; -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); -; 3816 : if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG"); -; 3817 : if (zout + len > a->zout_end) { -; 3818 : if (!stbi__zexpand(a, zout, len)) return 0; -; 3819 : zout = a->zout; -; 3820 : } -; 3821 : p = (stbi_uc*)(zout - dist); -; 3822 : if (dist == 1) { // run of one byte; common in images. -; 3823 : stbi_uc v = *p; -; 3824 : if (len) { do *zout++ = v; while (--len); } -; 3825 : } -; 3826 : else { -; 3827 : if (len) { do *zout++ = *p++; while (--len); } -; 3828 : } -; 3829 : } -; 3830 : } -; 3831 : } -; 3832 : -; 3833 : static int stbi__compute_huffman_codes(stbi__zbuf* a) -; 3834 : { -; 3835 : static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; -; 3836 : stbi__zhuffman z_codelength; -; 3837 : stbi_uc lencodes[286 + 32 + 137];//padding for maximum single op -; 3838 : stbi_uc codelength_sizes[19]; -; 3839 : int i, n; -; 3840 : -; 3841 : int hlit = stbi__zreceive(a, 5) + 257; -; 3842 : int hdist = stbi__zreceive(a, 5) + 1; -; 3843 : int hclen = stbi__zreceive(a, 4) + 4; -; 3844 : int ntot = hlit + hdist; -; 3845 : -; 3846 : memset(codelength_sizes, 0, sizeof(codelength_sizes)); -; 3847 : for (i = 0; i < hclen; ++i) { -; 3848 : int s = stbi__zreceive(a, 3); -; 3849 : codelength_sizes[length_dezigzag[i]] = (stbi_uc)s; -; 3850 : } -; 3851 : if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; -; 3852 : -; 3853 : n = 0; -; 3854 : while (n < ntot) { -; 3855 : int c = stbi__zhuffman_decode(a, &z_codelength); -; 3856 : if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3857 : if (c < 16) -; 3858 : lencodes[n++] = (stbi_uc)c; -; 3859 : else { -; 3860 : stbi_uc fill = 0; -; 3861 : if (c == 16) { -; 3862 : c = stbi__zreceive(a, 2) + 3; -; 3863 : if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3864 : fill = lencodes[n - 1]; -; 3865 : } -; 3866 : else if (c == 17) { -; 3867 : c = stbi__zreceive(a, 3) + 3; -; 3868 : } -; 3869 : else if (c == 18) { -; 3870 : c = stbi__zreceive(a, 7) + 11; -; 3871 : } -; 3872 : else { -; 3873 : return stbi__err("bad codelengths", "Corrupt PNG"); -; 3874 : } -; 3875 : if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3876 : memset(lencodes + n, fill, c); -; 3877 : n += c; -; 3878 : } -; 3879 : } -; 3880 : if (n != ntot) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3881 : if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; -; 3882 : if (!stbi__zbuild_huffman(&a->z_distance, lencodes + hlit, hdist)) return 0; -; 3883 : return 1; -; 3884 : } -; 3885 : -; 3886 : static int stbi__parse_uncompressed_block(stbi__zbuf* a) -; 3887 : { -; 3888 : stbi_uc header[4]; -; 3889 : int len, nlen, k; -; 3890 : if (a->num_bits & 7) -; 3891 : stbi__zreceive(a, a->num_bits & 7); // discard -; 3892 : // drain the bit-packed data into header -; 3893 : k = 0; -; 3894 : while (a->num_bits > 0) { -; 3895 : header[k++] = (stbi_uc)(a->code_buffer & 255); // suppress MSVC run-time check -; 3896 : a->code_buffer >>= 8; -; 3897 : a->num_bits -= 8; -; 3898 : } -; 3899 : if (a->num_bits < 0) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3900 : // now fill header the normal way -; 3901 : while (k < 4) -; 3902 : header[k++] = stbi__zget8(a); -; 3903 : len = header[1] * 256 + header[0]; -; 3904 : nlen = header[3] * 256 + header[2]; -; 3905 : if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3906 : if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG"); -; 3907 : if (a->zout + len > a->zout_end) -; 3908 : if (!stbi__zexpand(a, a->zout, len)) return 0; -; 3909 : memcpy(a->zout, a->zbuffer, len); -; 3910 : a->zbuffer += len; -; 3911 : a->zout += len; -; 3912 : return 1; -; 3913 : } -; 3914 : -; 3915 : static int stbi__parse_zlib_header(stbi__zbuf* a) -; 3916 : { -; 3917 : int cmf = stbi__zget8(a); -; 3918 : int cm = cmf & 15; -; 3919 : /* int cinfo = cmf >> 4; */ -; 3920 : int flg = stbi__zget8(a); -; 3921 : if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3922 : if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png -; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png -; 3925 : // window = 1 << (8 + cinfo)... but who cares, we fully buffer output -; 3926 : return 1; -; 3927 : } -; 3928 : -; 3929 : static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] = -; 3930 : { -; 3931 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3932 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3933 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3934 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3935 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3936 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3937 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3938 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3939 : 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 -; 3940 : }; -; 3941 : static const stbi_uc stbi__zdefault_distance[32] = -; 3942 : { -; 3943 : 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 -; 3944 : }; -; 3945 : /* -; 3946 : Init algorithm: -; 3947 : { -; 3948 : int i; // use <= to match clearly with spec -; 3949 : for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; -; 3950 : for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; -; 3951 : for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; -; 3952 : for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; -; 3953 : -; 3954 : for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; -; 3955 : } -; 3956 : */ -; 3957 : -; 3958 : static int stbi__parse_zlib(stbi__zbuf* a, int parse_header) -; 3959 : { -; 3960 : int final, type; -; 3961 : if (parse_header) -; 3962 : if (!stbi__parse_zlib_header(a)) return 0; -; 3963 : a->num_bits = 0; -; 3964 : a->code_buffer = 0; -; 3965 : do { -; 3966 : final = stbi__zreceive(a, 1); -; 3967 : type = stbi__zreceive(a, 2); -; 3968 : if (type == 0) { -; 3969 : if (!stbi__parse_uncompressed_block(a)) return 0; -; 3970 : } -; 3971 : else if (type == 3) { -; 3972 : return 0; -; 3973 : } -; 3974 : else { -; 3975 : if (type == 1) { -; 3976 : // use fixed code lengths -; 3977 : if (!stbi__zbuild_huffman(&a->z_length, stbi__zdefault_length, STBI__ZNSYMS)) return 0; -; 3978 : if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; -; 3979 : } -; 3980 : else { -; 3981 : if (!stbi__compute_huffman_codes(a)) return 0; -; 3982 : } -; 3983 : if (!stbi__parse_huffman_block(a)) return 0; -; 3984 : } -; 3985 : } while (!final); -; 3986 : return 1; -; 3987 : } -; 3988 : -; 3989 : static int stbi__do_zlib(stbi__zbuf* a, char* obuf, int olen, int exp, int parse_header) -; 3990 : { -; 3991 : a->zout_start = obuf; -; 3992 : a->zout = obuf; -; 3993 : a->zout_end = obuf + olen; -; 3994 : a->z_expandable = exp; -; 3995 : -; 3996 : return stbi__parse_zlib(a, parse_header); -; 3997 : } -; 3998 : -; 3999 : STBIDEF char* stbi_zlib_decode_malloc_guesssize(const char* buffer, int len, int initial_size, int* outlen) -; 4000 : { -; 4001 : stbi__zbuf a; -; 4002 : char* p = (char*)stbi__malloc(initial_size); -; 4003 : if (p == NULL) return NULL; -; 4004 : a.zbuffer = (stbi_uc*)buffer; -; 4005 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4006 : if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { -; 4007 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4008 : return a.zout_start; -; 4009 : } -; 4010 : else { -; 4011 : STBI_FREE(a.zout_start); -; 4012 : return NULL; -; 4013 : } -; 4014 : } -; 4015 : -; 4016 : STBIDEF char* stbi_zlib_decode_malloc(char const* buffer, int len, int* outlen) -; 4017 : { -; 4018 : return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); -; 4019 : } -; 4020 : -; 4021 : STBIDEF char* stbi_zlib_decode_malloc_guesssize_headerflag(const char* buffer, int len, int initial_size, int* outlen, int parse_header) -; 4022 : { -; 4023 : stbi__zbuf a; -; 4024 : char* p = (char*)stbi__malloc(initial_size); -; 4025 : if (p == NULL) return NULL; -; 4026 : a.zbuffer = (stbi_uc*)buffer; -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4028 : if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { -; 4029 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4030 : return a.zout_start; -; 4031 : } -; 4032 : else { -; 4033 : STBI_FREE(a.zout_start); -; 4034 : return NULL; -; 4035 : } -; 4036 : } -; 4037 : -; 4038 : STBIDEF int stbi_zlib_decode_buffer(char* obuffer, int olen, char const* ibuffer, int ilen) -; 4039 : { -; 4040 : stbi__zbuf a; -; 4041 : a.zbuffer = (stbi_uc*)ibuffer; -; 4042 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4043 : if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) -; 4044 : return (int)(a.zout - a.zout_start); -; 4045 : else -; 4046 : return -1; -; 4047 : } -; 4048 : -; 4049 : STBIDEF char* stbi_zlib_decode_noheader_malloc(char const* buffer, int len, int* outlen) -; 4050 : { -; 4051 : stbi__zbuf a; -; 4052 : char* p = (char*)stbi__malloc(16384); -; 4053 : if (p == NULL) return NULL; -; 4054 : a.zbuffer = (stbi_uc*)buffer; -; 4055 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4056 : if (stbi__do_zlib(&a, p, 16384, 1, 0)) { -; 4057 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4058 : return a.zout_start; -; 4059 : } -; 4060 : else { -; 4061 : STBI_FREE(a.zout_start); -; 4062 : return NULL; -; 4063 : } -; 4064 : } -; 4065 : -; 4066 : STBIDEF int stbi_zlib_decode_noheader_buffer(char* obuffer, int olen, const char* ibuffer, int ilen) -; 4067 : { -; 4068 : stbi__zbuf a; -; 4069 : a.zbuffer = (stbi_uc*)ibuffer; -; 4070 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4071 : if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) -; 4072 : return (int)(a.zout - a.zout_start); -; 4073 : else -; 4074 : return -1; -; 4075 : } -; 4076 : #endif -; 4077 : -; 4078 : // public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 -; 4079 : // simple implementation -; 4080 : // - only 8-bit samples -; 4081 : // - no CRC checking -; 4082 : // - allocates lots of intermediate memory -; 4083 : // - avoids problem of streaming data between subsystems -; 4084 : // - avoids explicit window management -; 4085 : // performance -; 4086 : // - uses stb_zlib, a PD zlib implementation with fast huffman decoding -; 4087 : -; 4088 : #ifndef STBI_NO_PNG -; 4089 : typedef struct -; 4090 : { -; 4091 : stbi__uint32 length; -; 4092 : stbi__uint32 type; -; 4093 : } stbi__pngchunk; -; 4094 : -; 4095 : static stbi__pngchunk stbi__get_chunk_header(stbi__context* s) -; 4096 : { -; 4097 : stbi__pngchunk c; -; 4098 : c.length = stbi__get32be(s); -; 4099 : c.type = stbi__get32be(s); -; 4100 : return c; -; 4101 : } -; 4102 : -; 4103 : static int stbi__check_png_header(stbi__context* s) -; 4104 : { -; 4105 : static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; -; 4106 : int i; -; 4107 : for (i = 0; i < 8; ++i) -; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); -; 4109 : return 1; -; 4110 : } -; 4111 : -; 4112 : typedef struct -; 4113 : { -; 4114 : stbi__context* s; -; 4115 : stbi_uc* idata, * expanded, * out; -; 4116 : int depth; -; 4117 : } stbi__png; -; 4118 : -; 4119 : enum { -; 4120 : STBI__F_none = 0, -; 4121 : STBI__F_sub = 1, -; 4122 : STBI__F_up = 2, -; 4123 : STBI__F_avg = 3, -; 4124 : STBI__F_paeth = 4, -; 4125 : // synthetic filters used for first scanline to avoid needing a dummy row of 0s -; 4126 : STBI__F_avg_first, -; 4127 : STBI__F_paeth_first -; 4128 : }; -; 4129 : -; 4130 : static stbi_uc first_row_filter[5] = -; 4131 : { -; 4132 : STBI__F_none, -; 4133 : STBI__F_sub, -; 4134 : STBI__F_none, -; 4135 : STBI__F_avg_first, -; 4136 : STBI__F_paeth_first -; 4137 : }; -; 4138 : -; 4139 : static int stbi__paeth(int a, int b, int c) -; 4140 : { -; 4141 : int p = a + b - c; -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); -; 4144 : int pc = abs(p - c); -; 4145 : if (pa <= pb && pa <= pc) return a; -; 4146 : if (pb <= pc) return b; -; 4147 : return c; -; 4148 : } -; 4149 : -; 4150 : static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; -; 4151 : -; 4152 : // create the png data from post-deflated data -; 4153 : static int stbi__create_png_image_raw(stbi__png* a, stbi_uc* raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -; 4154 : { -; 4155 : int bytes = (depth == 16 ? 2 : 1); -; 4156 : stbi__context* s = a->s; -; 4157 : stbi__uint32 i, j, stride = x * out_n * bytes; -; 4158 : stbi__uint32 img_len, img_width_bytes; -; 4159 : int k; -; 4160 : int img_n = s->img_n; // copy it into a local for later -; 4161 : -; 4162 : int output_bytes = out_n * bytes; -; 4163 : int filter_bytes = img_n * bytes; -; 4164 : int width = x; -; 4165 : -; 4166 : STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1); -; 4167 : a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into -; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); -; 4169 : -; 4170 : if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); -; 4171 : img_width_bytes = (((img_n * x * depth) + 7) >> 3); -; 4172 : img_len = (img_width_bytes + 1) * y; -; 4173 : -; 4174 : // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, -; 4175 : // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), -; 4176 : // so just check for raw_len < img_len always. -; 4177 : if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG"); -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { -; 4180 : stbi_uc* cur = a->out + stride * j; -; 4181 : stbi_uc* prior; -; 4182 : int filter = *raw++; -; 4183 : -; 4184 : if (filter > 4) -; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); -; 4186 : -; 4187 : if (depth < 8) { -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); -; 4189 : cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place -; 4190 : filter_bytes = 1; -; 4191 : width = img_width_bytes; -; 4192 : } -; 4193 : prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above -; 4194 : -; 4195 : // if first row, use special filter that doesn't sample previous row -; 4196 : if (j == 0) filter = first_row_filter[filter]; -; 4197 : -; 4198 : // handle first byte explicitly -; 4199 : for (k = 0; k < filter_bytes; ++k) { -; 4200 : switch (filter) { -; 4201 : case STBI__F_none: cur[k] = raw[k]; break; -; 4202 : case STBI__F_sub: cur[k] = raw[k]; break; -; 4203 : case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; -; 4204 : case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break; -; 4205 : case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break; -; 4206 : case STBI__F_avg_first: cur[k] = raw[k]; break; -; 4207 : case STBI__F_paeth_first: cur[k] = raw[k]; break; -; 4208 : } -; 4209 : } -; 4210 : -; 4211 : if (depth == 8) { -; 4212 : if (img_n != out_n) -; 4213 : cur[img_n] = 255; // first pixel -; 4214 : raw += img_n; -; 4215 : cur += out_n; -; 4216 : prior += out_n; -; 4217 : } -; 4218 : else if (depth == 16) { -; 4219 : if (img_n != out_n) { -; 4220 : cur[filter_bytes] = 255; // first pixel top byte -; 4221 : cur[filter_bytes + 1] = 255; // first pixel bottom byte -; 4222 : } -; 4223 : raw += filter_bytes; -; 4224 : cur += output_bytes; -; 4225 : prior += output_bytes; -; 4226 : } -; 4227 : else { -; 4228 : raw += 1; -; 4229 : cur += 1; -; 4230 : prior += 1; -; 4231 : } -; 4232 : -; 4233 : // this is a little gross, so that we don't switch per-pixel or per-component -; 4234 : if (depth < 8 || img_n == out_n) { -; 4235 : int nk = (width - 1) * filter_bytes; -; 4236 : #define STBI__CASE(f) \ -; 4237 : case f: \ -; 4238 : for (k=0; k < nk; ++k) -; 4239 : switch (filter) { -; 4240 : // "none" filter turns into a memcpy here; make that explicit. -; 4241 : case STBI__F_none: memcpy(cur, raw, nk); break; -; 4242 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break; -; 4243 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4244 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break; -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; -; 4246 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break; -; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; -; 4248 : } -; 4249 : #undef STBI__CASE -; 4250 : raw += nk; -; 4251 : } -; 4252 : else { -; 4253 : STBI_ASSERT(img_n + 1 == out_n); -; 4254 : #define STBI__CASE(f) \ -; 4255 : case f: \ -; 4256 : for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ -; 4257 : for (k=0; k < filter_bytes; ++k) -; 4258 : switch (filter) { -; 4259 : STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; -; 4260 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break; -; 4261 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4262 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break; -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; -; 4264 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break; -; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; -; 4266 : } -; 4267 : #undef STBI__CASE -; 4268 : -; 4269 : // the loop above sets the high byte of the pixels' alpha, but for -; 4270 : // 16 bit png files we also need the low byte set. we'll do that here. -; 4271 : if (depth == 16) { -; 4272 : cur = a->out + stride * j; // start at the beginning of the row again -; 4273 : for (i = 0; i < x; ++i, cur += output_bytes) { -; 4274 : cur[filter_bytes + 1] = 255; -; 4275 : } -; 4276 : } -; 4277 : } -; 4278 : } -; 4279 : -; 4280 : // we make a separate pass to expand bits to pixels; for performance, -; 4281 : // this could run two scanlines behind the above code, so it won't -; 4282 : // intefere with filtering but will still be in the cache. -; 4283 : if (depth < 8) { -; 4284 : for (j = 0; j < y; ++j) { -; 4285 : stbi_uc* cur = a->out + stride * j; -; 4286 : stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes; -; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit -; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop -; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range -; 4290 : -; 4291 : // note that the final byte might overshoot and write more data than desired. -; 4292 : // we can allocate enough data that this never writes out of memory, but it -; 4293 : // could also overwrite the next scanline. can it overwrite non-empty data -; 4294 : // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. -; 4295 : // so we need to explicitly clamp the final ones -; 4296 : -; 4297 : if (depth == 4) { -; 4298 : for (k = x * img_n; k >= 2; k -= 2, ++in) { -; 4299 : *cur++ = scale * ((*in >> 4)); -; 4300 : *cur++ = scale * ((*in) & 0x0f); -; 4301 : } -; 4302 : if (k > 0) *cur++ = scale * ((*in >> 4)); -; 4303 : } -; 4304 : else if (depth == 2) { -; 4305 : for (k = x * img_n; k >= 4; k -= 4, ++in) { -; 4306 : *cur++ = scale * ((*in >> 6)); -; 4307 : *cur++ = scale * ((*in >> 4) & 0x03); -; 4308 : *cur++ = scale * ((*in >> 2) & 0x03); -; 4309 : *cur++ = scale * ((*in) & 0x03); -; 4310 : } -; 4311 : if (k > 0) *cur++ = scale * ((*in >> 6)); -; 4312 : if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); -; 4313 : if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); -; 4314 : } -; 4315 : else if (depth == 1) { -; 4316 : for (k = x * img_n; k >= 8; k -= 8, ++in) { -; 4317 : *cur++ = scale * ((*in >> 7)); -; 4318 : *cur++ = scale * ((*in >> 6) & 0x01); -; 4319 : *cur++ = scale * ((*in >> 5) & 0x01); -; 4320 : *cur++ = scale * ((*in >> 4) & 0x01); -; 4321 : *cur++ = scale * ((*in >> 3) & 0x01); -; 4322 : *cur++ = scale * ((*in >> 2) & 0x01); -; 4323 : *cur++ = scale * ((*in >> 1) & 0x01); -; 4324 : *cur++ = scale * ((*in) & 0x01); -; 4325 : } -; 4326 : if (k > 0) *cur++ = scale * ((*in >> 7)); -; 4327 : if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); -; 4328 : if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); -; 4329 : if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); -; 4330 : if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); -; 4331 : if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); -; 4332 : if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); -; 4333 : } -; 4334 : if (img_n != out_n) { -; 4335 : int q; -; 4336 : // insert alpha = 255 -; 4337 : cur = a->out + stride * j; -; 4338 : if (img_n == 1) { -; 4339 : for (q = x - 1; q >= 0; --q) { -; 4340 : cur[q * 2 + 1] = 255; -; 4341 : cur[q * 2 + 0] = cur[q]; -; 4342 : } -; 4343 : } -; 4344 : else { -; 4345 : STBI_ASSERT(img_n == 3); -; 4346 : for (q = x - 1; q >= 0; --q) { -; 4347 : cur[q * 4 + 3] = 255; -; 4348 : cur[q * 4 + 2] = cur[q * 3 + 2]; -; 4349 : cur[q * 4 + 1] = cur[q * 3 + 1]; -; 4350 : cur[q * 4 + 0] = cur[q * 3 + 0]; -; 4351 : } -; 4352 : } -; 4353 : } -; 4354 : } -; 4355 : } -; 4356 : else if (depth == 16) { -; 4357 : // force the image data from big-endian to platform-native. -; 4358 : // this is done in a separate pass due to the decoding relying -; 4359 : // on the data being untouched, but could probably be done -; 4360 : // per-line during decode if care is taken. -; 4361 : stbi_uc* cur = a->out; -; 4362 : stbi__uint16* cur16 = (stbi__uint16*)cur; -; 4363 : -; 4364 : for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) { -; 4365 : *cur16 = (cur[0] << 8) | cur[1]; -; 4366 : } -; 4367 : } -; 4368 : -; 4369 : return 1; -; 4370 : } -; 4371 : -; 4372 : static int stbi__create_png_image(stbi__png* a, stbi_uc* image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -; 4373 : { -; 4374 : int bytes = (depth == 16 ? 2 : 1); -; 4375 : int out_bytes = out_n * bytes; -; 4376 : stbi_uc* final; -; 4377 : int p; -; 4378 : if (!interlaced) -; 4379 : return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); -; 4380 : -; 4381 : // de-interlacing -; 4382 : final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); -; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); -; 4384 : for (p = 0; p < 7; ++p) { -; 4385 : int xorig[] = { 0,4,0,2,0,1,0 }; -; 4386 : int yorig[] = { 0,0,4,0,2,0,1 }; -; 4387 : int xspc[] = { 8,8,4,4,2,2,1 }; -; 4388 : int yspc[] = { 8,8,8,4,4,2,2 }; -; 4389 : int i, j, x, y; -; 4390 : // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 -; 4391 : x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p]; -; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; -; 4393 : if (x && y) { -; 4394 : stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; -; 4395 : if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { -; 4396 : STBI_FREE(final); -; 4397 : return 0; -; 4398 : } -; 4399 : for (j = 0; j < y; ++j) { -; 4400 : for (i = 0; i < x; ++i) { -; 4401 : int out_y = j * yspc[p] + yorig[p]; -; 4402 : int out_x = i * xspc[p] + xorig[p]; -; 4403 : memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, -; 4404 : a->out + (j * x + i) * out_bytes, out_bytes); -; 4405 : } -; 4406 : } -; 4407 : STBI_FREE(a->out); -; 4408 : image_data += img_len; -; 4409 : image_data_len -= img_len; -; 4410 : } -; 4411 : } -; 4412 : a->out = final; -; 4413 : -; 4414 : return 1; -; 4415 : } -; 4416 : -; 4417 : static int stbi__compute_transparency(stbi__png* z, stbi_uc tc[3], int out_n) -; 4418 : { -; 4419 : stbi__context* s = z->s; -; 4420 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4421 : stbi_uc* p = z->out; -; 4422 : -; 4423 : // compute color-based transparency, assuming we've -; 4424 : // already got 255 as the alpha value in the output -; 4425 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4426 : -; 4427 : if (out_n == 2) { -; 4428 : for (i = 0; i < pixel_count; ++i) { -; 4429 : p[1] = (p[0] == tc[0] ? 0 : 255); -; 4430 : p += 2; -; 4431 : } -; 4432 : } -; 4433 : else { -; 4434 : for (i = 0; i < pixel_count; ++i) { -; 4435 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4436 : p[3] = 0; -; 4437 : p += 4; -; 4438 : } -; 4439 : } -; 4440 : return 1; -; 4441 : } -; 4442 : -; 4443 : static int stbi__compute_transparency16(stbi__png* z, stbi__uint16 tc[3], int out_n) -; 4444 : { -; 4445 : stbi__context* s = z->s; -; 4446 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4447 : stbi__uint16* p = (stbi__uint16*)z->out; -; 4448 : -; 4449 : // compute color-based transparency, assuming we've -; 4450 : // already got 65535 as the alpha value in the output -; 4451 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4452 : -; 4453 : if (out_n == 2) { -; 4454 : for (i = 0; i < pixel_count; ++i) { -; 4455 : p[1] = (p[0] == tc[0] ? 0 : 65535); -; 4456 : p += 2; -; 4457 : } -; 4458 : } -; 4459 : else { -; 4460 : for (i = 0; i < pixel_count; ++i) { -; 4461 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4462 : p[3] = 0; -; 4463 : p += 4; -; 4464 : } -; 4465 : } -; 4466 : return 1; -; 4467 : } -; 4468 : -; 4469 : static int stbi__expand_png_palette(stbi__png* a, stbi_uc* palette, int len, int pal_img_n) -; 4470 : { -; 4471 : stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; -; 4472 : stbi_uc* p, * temp_out, * orig = a->out; -; 4473 : -; 4474 : p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0); -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4476 : -; 4477 : // between here and free(out) below, exitting would leak -; 4478 : temp_out = p; -; 4479 : -; 4480 : if (pal_img_n == 3) { -; 4481 : for (i = 0; i < pixel_count; ++i) { -; 4482 : int n = orig[i] * 4; -; 4483 : p[0] = palette[n]; -; 4484 : p[1] = palette[n + 1]; -; 4485 : p[2] = palette[n + 2]; -; 4486 : p += 3; -; 4487 : } -; 4488 : } -; 4489 : else { -; 4490 : for (i = 0; i < pixel_count; ++i) { -; 4491 : int n = orig[i] * 4; -; 4492 : p[0] = palette[n]; -; 4493 : p[1] = palette[n + 1]; -; 4494 : p[2] = palette[n + 2]; -; 4495 : p[3] = palette[n + 3]; -; 4496 : p += 4; -; 4497 : } -; 4498 : } -; 4499 : STBI_FREE(a->out); -; 4500 : a->out = temp_out; -; 4501 : -; 4502 : STBI_NOTUSED(len); -; 4503 : -; 4504 : return 1; -; 4505 : } -; 4506 : -; 4507 : static int stbi__unpremultiply_on_load_global = 0; -; 4508 : static int stbi__de_iphone_flag_global = 0; -; 4509 : -; 4510 : STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) -; 4511 : { -; 4512 : stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; -; 4513 : } -; 4514 : -; 4515 : STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) -; 4516 : { -; 4517 : stbi__de_iphone_flag_global = flag_true_if_should_convert; -; 4518 : } -; 4519 : -; 4520 : #ifndef STBI_THREAD_LOCAL -; 4521 : #define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global -; 4522 : #define stbi__de_iphone_flag stbi__de_iphone_flag_global -; 4523 : #else -; 4524 : static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; -; 4525 : static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; -; 4526 : -; 4527 : STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) -; 4528 : { -; 4529 : stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; -; 4530 : stbi__unpremultiply_on_load_set = 1; -; 4531 : } -; 4532 : -; 4533 : STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert) -; 4534 : { -; 4535 : stbi__de_iphone_flag_local = flag_true_if_should_convert; -; 4536 : stbi__de_iphone_flag_set = 1; -; 4537 : } -; 4538 : -; 4539 : #define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \ -; 4540 : ? stbi__unpremultiply_on_load_local \ -; 4541 : : stbi__unpremultiply_on_load_global) -; 4542 : #define stbi__de_iphone_flag (stbi__de_iphone_flag_set \ -; 4543 : ? stbi__de_iphone_flag_local \ -; 4544 : : stbi__de_iphone_flag_global) -; 4545 : #endif // STBI_THREAD_LOCAL -; 4546 : -; 4547 : static void stbi__de_iphone(stbi__png* z) -; 4548 : { -; 4549 : stbi__context* s = z->s; -; 4550 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4551 : stbi_uc* p = z->out; -; 4552 : -; 4553 : if (s->img_out_n == 3) { // convert bgr to rgb -; 4554 : for (i = 0; i < pixel_count; ++i) { -; 4555 : stbi_uc t = p[0]; -; 4556 : p[0] = p[2]; -; 4557 : p[2] = t; -; 4558 : p += 3; -; 4559 : } -; 4560 : } -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { -; 4566 : stbi_uc a = p[3]; -; 4567 : stbi_uc t = p[0]; -; 4568 : if (a) { -; 4569 : stbi_uc half = a / 2; -; 4570 : p[0] = (p[2] * 255 + half) / a; -; 4571 : p[1] = (p[1] * 255 + half) / a; -; 4572 : p[2] = (t * 255 + half) / a; -; 4573 : } -; 4574 : else { -; 4575 : p[0] = p[2]; -; 4576 : p[2] = t; -; 4577 : } -; 4578 : p += 4; -; 4579 : } -; 4580 : } -; 4581 : else { -; 4582 : // convert bgr to rgb -; 4583 : for (i = 0; i < pixel_count; ++i) { -; 4584 : stbi_uc t = p[0]; -; 4585 : p[0] = p[2]; -; 4586 : p[2] = t; -; 4587 : p += 4; -; 4588 : } -; 4589 : } -; 4590 : } -; 4591 : } -; 4592 : -; 4593 : #define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) -; 4594 : -; 4595 : static int stbi__parse_png_file(stbi__png* z, int scan, int req_comp) -; 4596 : { -; 4597 : stbi_uc palette[1024], pal_img_n = 0; -; 4598 : stbi_uc has_trans = 0, tc[3] = { 0 }; -; 4599 : stbi__uint16 tc16[3]; -; 4600 : stbi__uint32 ioff = 0, idata_limit = 0, i, pal_len = 0; -; 4601 : int first = 1, k, interlace = 0, color = 0, is_iphone = 0; -; 4602 : stbi__context* s = z->s; -; 4603 : -; 4604 : z->expanded = NULL; -; 4605 : z->idata = NULL; -; 4606 : z->out = NULL; -; 4607 : -; 4608 : if (!stbi__check_png_header(s)) return 0; -; 4609 : -; 4610 : if (scan == STBI__SCAN_type) return 1; -; 4611 : -; 4612 : for (;;) { -; 4613 : stbi__pngchunk c = stbi__get_chunk_header(s); -; 4614 : switch (c.type) { -; 4615 : case STBI__PNG_TYPE('C', 'g', 'B', 'I'): -; 4616 : is_iphone = 1; -; 4617 : stbi__skip(s, c.length); -; 4618 : break; -; 4619 : case STBI__PNG_TYPE('I', 'H', 'D', 'R'): { -; 4620 : int comp, filter; -; 4621 : if (!first) return stbi__err("multiple IHDR", "Corrupt PNG"); -; 4622 : first = 0; -; 4623 : if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG"); -; 4624 : s->img_x = stbi__get32be(s); -; 4625 : s->img_y = stbi__get32be(s); -; 4626 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4627 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4628 : z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only"); -; 4629 : color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype", "Corrupt PNG"); -; 4630 : if (color == 3 && z->depth == 16) return stbi__err("bad ctype", "Corrupt PNG"); -; 4631 : if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype", "Corrupt PNG"); -; 4632 : comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG"); -; 4633 : filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG"); -; 4634 : interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG"); -; 4635 : if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG"); -; 4636 : if (!pal_img_n) { -; 4637 : s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); -; 4638 : if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); -; 4639 : } -; 4640 : else { -; 4641 : // if paletted, then pal_n is our final components, and -; 4642 : // img_n is # components to decompress/filter. -; 4643 : s->img_n = 1; -; 4644 : if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large", "Corrupt PNG"); -; 4645 : } -; 4646 : // even with SCAN_header, have to scan to see if we have a tRNS -; 4647 : break; -; 4648 : } -; 4649 : -; 4650 : case STBI__PNG_TYPE('P', 'L', 'T', 'E'): { -; 4651 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4652 : if (c.length > 256 * 3) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4653 : pal_len = c.length / 3; -; 4654 : if (pal_len * 3 != c.length) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4655 : for (i = 0; i < pal_len; ++i) { -; 4656 : palette[i * 4 + 0] = stbi__get8(s); -; 4657 : palette[i * 4 + 1] = stbi__get8(s); -; 4658 : palette[i * 4 + 2] = stbi__get8(s); -; 4659 : palette[i * 4 + 3] = 255; -; 4660 : } -; 4661 : break; -; 4662 : } -; 4663 : -; 4664 : case STBI__PNG_TYPE('t', 'R', 'N', 'S'): { -; 4665 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4666 : if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG"); -; 4667 : if (pal_img_n) { -; 4668 : if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } -; 4669 : if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG"); -; 4670 : if (c.length > pal_len) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4671 : pal_img_n = 4; -; 4672 : for (i = 0; i < c.length; ++i) -; 4673 : palette[i * 4 + 3] = stbi__get8(s); -; 4674 : } -; 4675 : else { -; 4676 : if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG"); -; 4677 : if (c.length != (stbi__uint32)s->img_n * 2) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4678 : has_trans = 1; -; 4679 : // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. -; 4680 : if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } -; 4681 : if (z->depth == 16) { -; 4682 : for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is -; 4683 : } -; 4684 : else { -; 4685 : for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger -; 4686 : } -; 4687 : } -; 4688 : break; -; 4689 : } -; 4690 : -; 4691 : case STBI__PNG_TYPE('I', 'D', 'A', 'T'): { -; 4692 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4693 : if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG"); -; 4694 : if (scan == STBI__SCAN_header) { -; 4695 : // header scan definitely stops at first IDAT -; 4696 : if (pal_img_n) -; 4697 : s->img_n = pal_img_n; -; 4698 : return 1; -; 4699 : } -; 4700 : if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); -; 4701 : if ((int)(ioff + c.length) < (int)ioff) return 0; -; 4702 : if (ioff + c.length > idata_limit) { -; 4703 : stbi__uint32 idata_limit_old = idata_limit; -; 4704 : stbi_uc* p; -; 4705 : if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; -; 4706 : while (ioff + c.length > idata_limit) -; 4707 : idata_limit *= 2; -; 4708 : STBI_NOTUSED(idata_limit_old); -; 4709 : p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4710 : z->idata = p; -; 4711 : } -; 4712 : if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG"); -; 4713 : ioff += c.length; -; 4714 : break; -; 4715 : } -; 4716 : -; 4717 : case STBI__PNG_TYPE('I', 'E', 'N', 'D'): { -; 4718 : stbi__uint32 raw_len, bpl; -; 4719 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4720 : if (scan != STBI__SCAN_load) return 1; -; 4721 : if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG"); -; 4722 : // initial guess for decoded data size to avoid unnecessary reallocs -; 4723 : bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component -; 4724 : raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); -; 4726 : if (z->expanded == NULL) return 0; // zlib should set error -; 4727 : STBI_FREE(z->idata); z->idata = NULL; -; 4728 : if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans) -; 4729 : s->img_out_n = s->img_n + 1; -; 4730 : else -; 4731 : s->img_out_n = s->img_n; -; 4732 : if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; -; 4733 : if (has_trans) { -; 4734 : if (z->depth == 16) { -; 4735 : if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; -; 4736 : } -; 4737 : else { -; 4738 : if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; -; 4739 : } -; 4740 : } -; 4741 : if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) -; 4742 : stbi__de_iphone(z); -; 4743 : if (pal_img_n) { -; 4744 : // pal_img_n == 3 or 4 -; 4745 : s->img_n = pal_img_n; // record the actual colors we had -; 4746 : s->img_out_n = pal_img_n; -; 4747 : if (req_comp >= 3) s->img_out_n = req_comp; -; 4748 : if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) -; 4749 : return 0; -; 4750 : } -; 4751 : else if (has_trans) { -; 4752 : // non-paletted image with tRNS -> source image has (constant) alpha -; 4753 : ++s->img_n; -; 4754 : } -; 4755 : STBI_FREE(z->expanded); z->expanded = NULL; -; 4756 : // end of PNG chunk, read and skip CRC -; 4757 : stbi__get32be(s); -; 4758 : return 1; -; 4759 : } -; 4760 : -; 4761 : default: -; 4762 : // if critical, fail -; 4763 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4764 : if ((c.type & (1 << 29)) == 0) { -; 4765 : #ifndef STBI_NO_FAILURE_STRINGS -; 4766 : // not threadsafe -; 4767 : static char invalid_chunk[] = "XXXX PNG chunk not known"; -; 4768 : invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); -; 4769 : invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); -; 4770 : invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); -; 4771 : invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); -; 4772 : #endif -; 4773 : return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); -; 4774 : } -; 4775 : stbi__skip(s, c.length); -; 4776 : break; -; 4777 : } -; 4778 : // end of PNG chunk, read and skip CRC -; 4779 : stbi__get32be(s); -; 4780 : } -; 4781 : } -; 4782 : -; 4783 : static void* stbi__do_png(stbi__png* p, int* x, int* y, int* n, int req_comp, stbi__result_info* ri) -; 4784 : { -; 4785 : void* result = NULL; -; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { -; 4788 : if (p->depth <= 8) -; 4789 : ri->bits_per_channel = 8; -; 4790 : else if (p->depth == 16) -; 4791 : ri->bits_per_channel = 16; -; 4792 : else -; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); -; 4794 : result = p->out; -; 4795 : p->out = NULL; -; 4796 : if (req_comp && req_comp != p->s->img_out_n) { -; 4797 : if (ri->bits_per_channel == 8) -; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4799 : else -; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4801 : p->s->img_out_n = req_comp; -; 4802 : if (result == NULL) return result; -; 4803 : } -; 4804 : *x = p->s->img_x; -; 4805 : *y = p->s->img_y; -; 4806 : if (n) *n = p->s->img_n; -; 4807 : } -; 4808 : STBI_FREE(p->out); p->out = NULL; -; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; -; 4810 : STBI_FREE(p->idata); p->idata = NULL; -; 4811 : -; 4812 : return result; -; 4813 : } -; 4814 : -; 4815 : static void* stbi__png_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 4816 : { -; 4817 : stbi__png p; -; 4818 : p.s = s; -; 4819 : return stbi__do_png(&p, x, y, comp, req_comp, ri); -; 4820 : } -; 4821 : -; 4822 : static int stbi__png_test(stbi__context* s) -; 4823 : { -; 4824 : int r; -; 4825 : r = stbi__check_png_header(s); -; 4826 : stbi__rewind(s); -; 4827 : return r; -; 4828 : } -; 4829 : -; 4830 : static int stbi__png_info_raw(stbi__png* p, int* x, int* y, int* comp) -; 4831 : { -; 4832 : if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { -; 4833 : stbi__rewind(p->s); -; 4834 : return 0; -; 4835 : } -; 4836 : if (x) *x = p->s->img_x; -; 4837 : if (y) *y = p->s->img_y; -; 4838 : if (comp) *comp = p->s->img_n; -; 4839 : return 1; -; 4840 : } -; 4841 : -; 4842 : static int stbi__png_info(stbi__context* s, int* x, int* y, int* comp) -; 4843 : { -; 4844 : stbi__png p; -; 4845 : p.s = s; -; 4846 : return stbi__png_info_raw(&p, x, y, comp); -; 4847 : } -; 4848 : -; 4849 : static int stbi__png_is16(stbi__context* s) -; 4850 : { -; 4851 : stbi__png p; -; 4852 : p.s = s; -; 4853 : if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) -; 4854 : return 0; -; 4855 : if (p.depth != 16) { -; 4856 : stbi__rewind(p.s); -; 4857 : return 0; -; 4858 : } -; 4859 : return 1; -; 4860 : } -; 4861 : #endif -; 4862 : -; 4863 : // Microsoft/Windows BMP image -; 4864 : -; 4865 : #ifndef STBI_NO_BMP -; 4866 : static int stbi__bmp_test_raw(stbi__context* s) -; 4867 : { -; 4868 : int r; -; 4869 : int sz; -; 4870 : if (stbi__get8(s) != 'B') return 0; -; 4871 : if (stbi__get8(s) != 'M') return 0; -; 4872 : stbi__get32le(s); // discard filesize -; 4873 : stbi__get16le(s); // discard reserved -; 4874 : stbi__get16le(s); // discard reserved -; 4875 : stbi__get32le(s); // discard data offset -; 4876 : sz = stbi__get32le(s); -; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); -; 4878 : return r; -; 4879 : } -; 4880 : -; 4881 : static int stbi__bmp_test(stbi__context* s) -; 4882 : { -; 4883 : int r = stbi__bmp_test_raw(s); -; 4884 : stbi__rewind(s); -; 4885 : return r; -; 4886 : } -; 4887 : -; 4888 : // returns 0..31 for the highest set bit -; 4889 : static int stbi__high_bit(unsigned int z) -; 4890 : { -; 4891 : int n = 0; -; 4892 : if (z == 0) return -1; -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } -; 4898 : return n; -; 4899 : } -; 4900 : -; 4901 : static int stbi__bitcount(unsigned int a) -; 4902 : { -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits -; 4908 : return a & 0xff; -; 4909 : } -; 4910 : -; 4911 : // extract an arbitrarily-aligned N-bit value (N=bits) -; 4912 : // from v, and then make it 8-bits long and fractionally -; 4913 : // extend it to full full range. -; 4914 : static int stbi__shiftsigned(unsigned int v, int shift, int bits) -; 4915 : { -; 4916 : static unsigned int mul_table[9] = { -; 4917 : 0, -; 4918 : 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, -; 4919 : 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, -; 4920 : }; -; 4921 : static unsigned int shift_table[9] = { -; 4922 : 0, 0,0,1,0,2,4,6,0, -; 4923 : }; -; 4924 : if (shift < 0) -; 4925 : v <<= -shift; -; 4926 : else -; 4927 : v >>= shift; -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; -; 4932 : } -; 4933 : -; 4934 : typedef struct -; 4935 : { -; 4936 : int bpp, offset, hsz; -; 4937 : unsigned int mr, mg, mb, ma, all_a; -; 4938 : int extra_read; -; 4939 : } stbi__bmp_data; -; 4940 : -; 4941 : static int stbi__bmp_set_mask_defaults(stbi__bmp_data* info, int compress) -; 4942 : { -; 4943 : // BI_BITFIELDS specifies masks explicitly, don't override -; 4944 : if (compress == 3) -; 4945 : return 1; -; 4946 : -; 4947 : if (compress == 0) { -; 4948 : if (info->bpp == 16) { -; 4949 : info->mr = 31u << 10; -; 4950 : info->mg = 31u << 5; -; 4951 : info->mb = 31u << 0; -; 4952 : } -; 4953 : else if (info->bpp == 32) { -; 4954 : info->mr = 0xffu << 16; -; 4955 : info->mg = 0xffu << 8; -; 4956 : info->mb = 0xffu << 0; -; 4957 : info->ma = 0xffu << 24; -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 -; 4959 : } -; 4960 : else { -; 4961 : // otherwise, use defaults, which is all-0 -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; -; 4963 : } -; 4964 : return 1; -; 4965 : } -; 4966 : return 0; // error -; 4967 : } -; 4968 : -; 4969 : static void* stbi__bmp_parse_header(stbi__context* s, stbi__bmp_data* info) -; 4970 : { -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); -; 4973 : stbi__get32le(s); // discard filesize -; 4974 : stbi__get16le(s); // discard reserved -; 4975 : stbi__get16le(s); // discard reserved -; 4976 : info->offset = stbi__get32le(s); -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; -; 4979 : info->extra_read = 14; -; 4980 : -; 4981 : if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); -; 4982 : -; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); -; 4984 : if (hsz == 12) { -; 4985 : s->img_x = stbi__get16le(s); -; 4986 : s->img_y = stbi__get16le(s); -; 4987 : } -; 4988 : else { -; 4989 : s->img_x = stbi__get32le(s); -; 4990 : s->img_y = stbi__get32le(s); -; 4991 : } -; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); -; 4993 : info->bpp = stbi__get16le(s); -; 4994 : if (hsz != 12) { -; 4995 : int compress = stbi__get32le(s); -; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); -; 4997 : if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes -; 4998 : if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel -; 4999 : stbi__get32le(s); // discard sizeof -; 5000 : stbi__get32le(s); // discard hres -; 5001 : stbi__get32le(s); // discard vres -; 5002 : stbi__get32le(s); // discard colorsused -; 5003 : stbi__get32le(s); // discard max important -; 5004 : if (hsz == 40 || hsz == 56) { -; 5005 : if (hsz == 56) { -; 5006 : stbi__get32le(s); -; 5007 : stbi__get32le(s); -; 5008 : stbi__get32le(s); -; 5009 : stbi__get32le(s); -; 5010 : } -; 5011 : if (info->bpp == 16 || info->bpp == 32) { -; 5012 : if (compress == 0) { -; 5013 : stbi__bmp_set_mask_defaults(info, compress); -; 5014 : } -; 5015 : else if (compress == 3) { -; 5016 : info->mr = stbi__get32le(s); -; 5017 : info->mg = stbi__get32le(s); -; 5018 : info->mb = stbi__get32le(s); -; 5019 : info->extra_read += 12; -; 5020 : // not documented, but generated by photoshop and handled by mspaint -; 5021 : if (info->mr == info->mg && info->mg == info->mb) { -; 5022 : // ?!?!? -; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5024 : } -; 5025 : } -; 5026 : else -; 5027 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5028 : } -; 5029 : } -; 5030 : else { -; 5031 : // V4/V5 header -; 5032 : int i; -; 5033 : if (hsz != 108 && hsz != 124) -; 5034 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5035 : info->mr = stbi__get32le(s); -; 5036 : info->mg = stbi__get32le(s); -; 5037 : info->mb = stbi__get32le(s); -; 5038 : info->ma = stbi__get32le(s); -; 5039 : if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs -; 5040 : stbi__bmp_set_mask_defaults(info, compress); -; 5041 : stbi__get32le(s); // discard color space -; 5042 : for (i = 0; i < 12; ++i) -; 5043 : stbi__get32le(s); // discard color space parameters -; 5044 : if (hsz == 124) { -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; -; 5053 : } -; 5054 : -; 5055 : static void* stbi__bmp_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5056 : { -; 5057 : stbi_uc* out; -; 5058 : unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a; -; 5059 : stbi_uc pal[256][4]; -; 5060 : int psize = 0, i, j, width; -; 5061 : int flip_vertically, pad, target; -; 5062 : stbi__bmp_data info; -; 5063 : STBI_NOTUSED(ri); -; 5064 : -; 5065 : info.all_a = 255; -; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) -; 5067 : return NULL; // error code already set -; 5068 : -; 5069 : flip_vertically = ((int)s->img_y) > 0; -; 5070 : s->img_y = abs((int)s->img_y); -; 5071 : -; 5072 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5073 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5074 : -; 5075 : mr = info.mr; -; 5076 : mg = info.mg; -; 5077 : mb = info.mb; -; 5078 : ma = info.ma; -; 5079 : all_a = info.all_a; -; 5080 : -; 5081 : if (info.hsz == 12) { -; 5082 : if (info.bpp < 24) -; 5083 : psize = (info.offset - info.extra_read - 24) / 3; -; 5084 : } -; 5085 : else { -; 5086 : if (info.bpp < 16) -; 5087 : psize = (info.offset - info.extra_read - info.hsz) >> 2; -; 5088 : } -; 5089 : if (psize == 0) { -; 5090 : // accept some number of extra bytes after the header, but if the offset points either to before -; 5091 : // the header ends or implies a large amount of extra data, reject the file as malformed -; 5092 : int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); -; 5093 : int header_limit = 1024; // max we actually read is below 256 bytes currently. -; 5094 : int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. -; 5095 : if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { -; 5096 : return stbi__errpuc("bad header", "Corrupt BMP"); -; 5097 : } -; 5098 : // we established that bytes_read_so_far is positive and sensible. -; 5099 : // the first half of this test rejects offsets that are either too small positives, or -; 5100 : // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn -; 5101 : // ensures the number computed in the second half of the test can't overflow. -; 5102 : if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { -; 5103 : return stbi__errpuc("bad offset", "Corrupt BMP"); -; 5104 : } -; 5105 : else { -; 5106 : stbi__skip(s, info.offset - bytes_read_so_far); -; 5107 : } -; 5108 : } -; 5109 : -; 5110 : if (info.bpp == 24 && ma == 0xff000000) -; 5111 : s->img_n = 3; -; 5112 : else -; 5113 : s->img_n = ma ? 4 : 3; -; 5114 : if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 -; 5115 : target = req_comp; -; 5116 : else -; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert -; 5118 : -; 5119 : // sanity-check size -; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) -; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); -; 5122 : -; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); -; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5125 : if (info.bpp < 16) { -; 5126 : int z = 0; -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } -; 5128 : for (i = 0; i < psize; ++i) { -; 5129 : pal[i][2] = stbi__get8(s); -; 5130 : pal[i][1] = stbi__get8(s); -; 5131 : pal[i][0] = stbi__get8(s); -; 5132 : if (info.hsz != 12) stbi__get8(s); -; 5133 : pal[i][3] = 255; -; 5134 : } -; 5135 : stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); -; 5136 : if (info.bpp == 1) width = (s->img_x + 7) >> 3; -; 5137 : else if (info.bpp == 4) width = (s->img_x + 1) >> 1; -; 5138 : else if (info.bpp == 8) width = s->img_x; -; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } -; 5140 : pad = (-width) & 3; -; 5141 : if (info.bpp == 1) { -; 5142 : for (j = 0; j < (int)s->img_y; ++j) { -; 5143 : int bit_offset = 7, v = stbi__get8(s); -; 5144 : for (i = 0; i < (int)s->img_x; ++i) { -; 5145 : int color = (v >> bit_offset) & 0x1; -; 5146 : out[z++] = pal[color][0]; -; 5147 : out[z++] = pal[color][1]; -; 5148 : out[z++] = pal[color][2]; -; 5149 : if (target == 4) out[z++] = 255; -; 5150 : if (i + 1 == (int)s->img_x) break; -; 5151 : if ((--bit_offset) < 0) { -; 5152 : bit_offset = 7; -; 5153 : v = stbi__get8(s); -; 5154 : } -; 5155 : } -; 5156 : stbi__skip(s, pad); -; 5157 : } -; 5158 : } -; 5159 : else { -; 5160 : for (j = 0; j < (int)s->img_y; ++j) { -; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { -; 5162 : int v = stbi__get8(s), v2 = 0; -; 5163 : if (info.bpp == 4) { -; 5164 : v2 = v & 15; -; 5165 : v >>= 4; -; 5166 : } -; 5167 : out[z++] = pal[v][0]; -; 5168 : out[z++] = pal[v][1]; -; 5169 : out[z++] = pal[v][2]; -; 5170 : if (target == 4) out[z++] = 255; -; 5171 : if (i + 1 == (int)s->img_x) break; -; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; -; 5173 : out[z++] = pal[v][0]; -; 5174 : out[z++] = pal[v][1]; -; 5175 : out[z++] = pal[v][2]; -; 5176 : if (target == 4) out[z++] = 255; -; 5177 : } -; 5178 : stbi__skip(s, pad); -; 5179 : } -; 5180 : } -; 5181 : } -; 5182 : else { -; 5183 : int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0; -; 5184 : int z = 0; -; 5185 : int easy = 0; -; 5186 : stbi__skip(s, info.offset - info.extra_read - info.hsz); -; 5187 : if (info.bpp == 24) width = 3 * s->img_x; -; 5188 : else if (info.bpp == 16) width = 2 * s->img_x; -; 5189 : else /* bpp = 32 and pad = 0 */ width = 0; -; 5190 : pad = (-width) & 3; -; 5191 : if (info.bpp == 24) { -; 5192 : easy = 1; -; 5193 : } -; 5194 : else if (info.bpp == 32) { -; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) -; 5196 : easy = 2; -; 5197 : } -; 5198 : if (!easy) { -; 5199 : if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); -; 5205 : if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5206 : } -; 5207 : for (j = 0; j < (int)s->img_y; ++j) { -; 5208 : if (easy) { -; 5209 : for (i = 0; i < (int)s->img_x; ++i) { -; 5210 : unsigned char a; -; 5211 : out[z + 2] = stbi__get8(s); -; 5212 : out[z + 1] = stbi__get8(s); -; 5213 : out[z + 0] = stbi__get8(s); -; 5214 : z += 3; -; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); -; 5216 : all_a |= a; -; 5217 : if (target == 4) out[z++] = a; -; 5218 : } -; 5219 : } -; 5220 : else { -; 5221 : int bpp = info.bpp; -; 5222 : for (i = 0; i < (int)s->img_x; ++i) { -; 5223 : stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s)); -; 5224 : unsigned int a; -; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); -; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); -; 5229 : all_a |= a; -; 5230 : if (target == 4) out[z++] = STBI__BYTECAST(a); -; 5231 : } -; 5232 : } -; 5233 : stbi__skip(s, pad); -; 5234 : } -; 5235 : } -; 5236 : -; 5237 : // if alpha channel is all 0s, replace with all 255s -; 5238 : if (target == 4 && all_a == 0) -; 5239 : for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4) -; 5240 : out[i] = 255; -; 5241 : -; 5242 : if (flip_vertically) { -; 5243 : stbi_uc t; -; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { -; 5245 : stbi_uc* p1 = out + j * s->img_x * target; -; 5246 : stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target; -; 5247 : for (i = 0; i < (int)s->img_x * target; ++i) { -; 5248 : t = p1[i]; p1[i] = p2[i]; p2[i] = t; -; 5249 : } -; 5250 : } -; 5251 : } -; 5252 : -; 5253 : if (req_comp && req_comp != target) { -; 5254 : out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); -; 5255 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5256 : } -; 5257 : -; 5258 : *x = s->img_x; -; 5259 : *y = s->img_y; -; 5260 : if (comp) *comp = s->img_n; -; 5261 : return out; -; 5262 : } -; 5263 : #endif -; 5264 : -; 5265 : // Targa Truevision - TGA -; 5266 : // by Jonathan Dummer -; 5267 : #ifndef STBI_NO_TGA -; 5268 : // returns STBI_rgb or whatever, 0 on error -; 5269 : static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -; 5270 : { -; 5271 : // only RGB or RGBA (incl. 16bit) or grey allowed -; 5272 : if (is_rgb16) *is_rgb16 = 0; -; 5273 : switch (bits_per_pixel) { -; 5274 : case 8: return STBI_grey; -; 5275 : case 16: if (is_grey) return STBI_grey_alpha; -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; -; 5278 : return STBI_rgb; -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; -; 5281 : default: return 0; -; 5282 : } -; 5283 : } -; 5284 : -; 5285 : static int stbi__tga_info(stbi__context* s, int* x, int* y, int* comp) -; 5286 : { -; 5287 : int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; -; 5288 : int sz, tga_colormap_type; -; 5289 : stbi__get8(s); // discard Offset -; 5290 : tga_colormap_type = stbi__get8(s); // colormap type -; 5291 : if (tga_colormap_type > 1) { -; 5292 : stbi__rewind(s); -; 5293 : return 0; // only RGB or indexed allowed -; 5294 : } -; 5295 : tga_image_type = stbi__get8(s); // image type -; 5296 : if (tga_colormap_type == 1) { // colormapped (paletted) image -; 5297 : if (tga_image_type != 1 && tga_image_type != 9) { -; 5298 : stbi__rewind(s); -; 5299 : return 0; -; 5300 : } -; 5301 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5302 : sz = stbi__get8(s); // check bits per palette color entry -; 5303 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) { -; 5304 : stbi__rewind(s); -; 5305 : return 0; -; 5306 : } -; 5307 : stbi__skip(s, 4); // skip image x and y origin -; 5308 : tga_colormap_bpp = sz; -; 5309 : } -; 5310 : else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE -; 5311 : if ((tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11)) { -; 5312 : stbi__rewind(s); -; 5313 : return 0; // only RGB or grey allowed, +/- RLE -; 5314 : } -; 5315 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5316 : tga_colormap_bpp = 0; -; 5317 : } -; 5318 : tga_w = stbi__get16le(s); -; 5319 : if (tga_w < 1) { -; 5320 : stbi__rewind(s); -; 5321 : return 0; // test width -; 5322 : } -; 5323 : tga_h = stbi__get16le(s); -; 5324 : if (tga_h < 1) { -; 5325 : stbi__rewind(s); -; 5326 : return 0; // test height -; 5327 : } -; 5328 : tga_bits_per_pixel = stbi__get8(s); // bits per pixel -; 5329 : stbi__get8(s); // ignore alpha bits -; 5330 : if (tga_colormap_bpp != 0) { -; 5331 : if ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { -; 5332 : // when using a colormap, tga_bits_per_pixel is the size of the indexes -; 5333 : // I don't think anything but 8 or 16bit indexes makes sense -; 5334 : stbi__rewind(s); -; 5335 : return 0; -; 5336 : } -; 5337 : tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); -; 5338 : } -; 5339 : else { -; 5340 : tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); -; 5341 : } -; 5342 : if (!tga_comp) { -; 5343 : stbi__rewind(s); -; 5344 : return 0; -; 5345 : } -; 5346 : if (x) *x = tga_w; -; 5347 : if (y) *y = tga_h; -; 5348 : if (comp) *comp = tga_comp; -; 5349 : return 1; // seems to have passed everything -; 5350 : } -; 5351 : -; 5352 : static int stbi__tga_test(stbi__context* s) -; 5353 : { -; 5354 : int res = 0; -; 5355 : int sz, tga_color_type; -; 5356 : stbi__get8(s); // discard Offset -; 5357 : tga_color_type = stbi__get8(s); // color type -; 5358 : if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed -; 5359 : sz = stbi__get8(s); // image type -; 5360 : if (tga_color_type == 1) { // colormapped (paletted) image -; 5361 : if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 -; 5362 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5363 : sz = stbi__get8(s); // check bits per palette color entry -; 5364 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5365 : stbi__skip(s, 4); // skip image x and y origin -; 5366 : } -; 5367 : else { // "normal" image w/o colormap -; 5368 : if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE -; 5369 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5370 : } -; 5371 : if (stbi__get16le(s) < 1) goto errorEnd; // test width -; 5372 : if (stbi__get16le(s) < 1) goto errorEnd; // test height -; 5373 : sz = stbi__get8(s); // bits per pixel -; 5374 : if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index -; 5375 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5376 : -; 5377 : res = 1; // if we got this far, everything's good and we can return 1 instead of 0 -; 5378 : -; 5379 : errorEnd: -; 5380 : stbi__rewind(s); -; 5381 : return res; -; 5382 : } -; 5383 : -; 5384 : // read 16bit value and convert to 24bit RGB -; 5385 : static void stbi__tga_read_rgb16(stbi__context* s, stbi_uc* out) -; 5386 : { -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); -; 5397 : -; 5398 : // some people claim that the most significant bit might be used for alpha -; 5399 : // (possibly if an alpha-bit is set in the "image descriptor byte") -; 5400 : // but that only made 16bit test images completely translucent.. -; 5401 : // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -; 5402 : } -; 5403 : -; 5404 : static void* stbi__tga_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5405 : { -; 5406 : // read in the TGA header stuff -; 5407 : int tga_offset = stbi__get8(s); -; 5408 : int tga_indexed = stbi__get8(s); -; 5409 : int tga_image_type = stbi__get8(s); -; 5410 : int tga_is_RLE = 0; -; 5411 : int tga_palette_start = stbi__get16le(s); -; 5412 : int tga_palette_len = stbi__get16le(s); -; 5413 : int tga_palette_bits = stbi__get8(s); -; 5414 : int tga_x_origin = stbi__get16le(s); -; 5415 : int tga_y_origin = stbi__get16le(s); -; 5416 : int tga_width = stbi__get16le(s); -; 5417 : int tga_height = stbi__get16le(s); -; 5418 : int tga_bits_per_pixel = stbi__get8(s); -; 5419 : int tga_comp, tga_rgb16 = 0; -; 5420 : int tga_inverted = stbi__get8(s); -; 5421 : // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) -; 5422 : // image data -; 5423 : unsigned char* tga_data; -; 5424 : unsigned char* tga_palette = NULL; -; 5425 : int i, j; -; 5426 : unsigned char raw_data[4] = { 0 }; -; 5427 : int RLE_count = 0; -; 5428 : int RLE_repeating = 0; -; 5429 : int read_next_pixel = 1; -; 5430 : STBI_NOTUSED(ri); -; 5431 : STBI_NOTUSED(tga_x_origin); // @TODO -; 5432 : STBI_NOTUSED(tga_y_origin); // @TODO -; 5433 : -; 5434 : if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5435 : if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5436 : -; 5437 : // do a tiny bit of precessing -; 5438 : if (tga_image_type >= 8) -; 5439 : { -; 5440 : tga_image_type -= 8; -; 5441 : tga_is_RLE = 1; -; 5442 : } -; 5443 : tga_inverted = 1 - ((tga_inverted >> 5) & 1); -; 5444 : -; 5445 : // If I'm paletted, then I'll use the number of bits from the palette -; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); -; 5447 : else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); -; 5448 : -; 5449 : if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency -; 5450 : return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); -; 5451 : -; 5452 : // tga info -; 5453 : *x = tga_width; -; 5454 : *y = tga_height; -; 5455 : if (comp) *comp = tga_comp; -; 5456 : -; 5457 : if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) -; 5458 : return stbi__errpuc("too large", "Corrupt TGA"); -; 5459 : -; 5460 : tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); -; 5461 : if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); -; 5462 : -; 5463 : // skip to the data's starting position (offset usually = 0) -; 5464 : stbi__skip(s, tga_offset); -; 5465 : -; 5466 : if (!tga_indexed && !tga_is_RLE && !tga_rgb16) { -; 5467 : for (i = 0; i < tga_height; ++i) { -; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; -; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; -; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); -; 5471 : } -; 5472 : } -; 5473 : else { -; 5474 : // do I need to load a palette? -; 5475 : if (tga_indexed) -; 5476 : { -; 5477 : if (tga_palette_len == 0) { /* you have to have at least one entry! */ -; 5478 : STBI_FREE(tga_data); -; 5479 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5480 : } -; 5481 : -; 5482 : // any data to skip? (offset usually = 0) -; 5483 : stbi__skip(s, tga_palette_start); -; 5484 : // load the palette -; 5485 : tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); -; 5486 : if (!tga_palette) { -; 5487 : STBI_FREE(tga_data); -; 5488 : return stbi__errpuc("outofmem", "Out of memory"); -; 5489 : } -; 5490 : if (tga_rgb16) { -; 5491 : stbi_uc* pal_entry = tga_palette; -; 5492 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5493 : for (i = 0; i < tga_palette_len; ++i) { -; 5494 : stbi__tga_read_rgb16(s, pal_entry); -; 5495 : pal_entry += tga_comp; -; 5496 : } -; 5497 : } -; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { -; 5499 : STBI_FREE(tga_data); -; 5500 : STBI_FREE(tga_palette); -; 5501 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) -; 5506 : { -; 5507 : // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? -; 5508 : if (tga_is_RLE) -; 5509 : { -; 5510 : if (RLE_count == 0) -; 5511 : { -; 5512 : // yep, get the next byte as a RLE command -; 5513 : int RLE_cmd = stbi__get8(s); -; 5514 : RLE_count = 1 + (RLE_cmd & 127); -; 5515 : RLE_repeating = RLE_cmd >> 7; -; 5516 : read_next_pixel = 1; -; 5517 : } -; 5518 : else if (!RLE_repeating) -; 5519 : { -; 5520 : read_next_pixel = 1; -; 5521 : } -; 5522 : } -; 5523 : else -; 5524 : { -; 5525 : read_next_pixel = 1; -; 5526 : } -; 5527 : // OK, if I need to read a pixel, do it now -; 5528 : if (read_next_pixel) -; 5529 : { -; 5530 : // load however much data we did have -; 5531 : if (tga_indexed) -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); -; 5535 : if (pal_idx >= tga_palette_len) { -; 5536 : // invalid index -; 5537 : pal_idx = 0; -; 5538 : } -; 5539 : pal_idx *= tga_comp; -; 5540 : for (j = 0; j < tga_comp; ++j) { -; 5541 : raw_data[j] = tga_palette[pal_idx + j]; -; 5542 : } -; 5543 : } -; 5544 : else if (tga_rgb16) { -; 5545 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5546 : stbi__tga_read_rgb16(s, raw_data); -; 5547 : } -; 5548 : else { -; 5549 : // read in the data raw -; 5550 : for (j = 0; j < tga_comp; ++j) { -; 5551 : raw_data[j] = stbi__get8(s); -; 5552 : } -; 5553 : } -; 5554 : // clear the reading flag for the next pixel -; 5555 : read_next_pixel = 0; -; 5556 : } // end of reading a pixel -; 5557 : -; 5558 : // copy data -; 5559 : for (j = 0; j < tga_comp; ++j) -; 5560 : tga_data[i * tga_comp + j] = raw_data[j]; -; 5561 : -; 5562 : // in case we're in RLE mode, keep counting down -; 5563 : --RLE_count; -; 5564 : } -; 5565 : // do I need to invert the image? -; 5566 : if (tga_inverted) -; 5567 : { -; 5568 : for (j = 0; j * 2 < tga_height; ++j) -; 5569 : { -; 5570 : int index1 = j * tga_width * tga_comp; -; 5571 : int index2 = (tga_height - 1 - j) * tga_width * tga_comp; -; 5572 : for (i = tga_width * tga_comp; i > 0; --i) -; 5573 : { -; 5574 : unsigned char temp = tga_data[index1]; -; 5575 : tga_data[index1] = tga_data[index2]; -; 5576 : tga_data[index2] = temp; -; 5577 : ++index1; -; 5578 : ++index2; -; 5579 : } -; 5580 : } -; 5581 : } -; 5582 : // clear my palette, if I had one -; 5583 : if (tga_palette != NULL) -; 5584 : { -; 5585 : STBI_FREE(tga_palette); -; 5586 : } -; 5587 : } -; 5588 : -; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order -; 5590 : if (tga_comp >= 3 && !tga_rgb16) -; 5591 : { -; 5592 : unsigned char* tga_pixel = tga_data; -; 5593 : for (i = 0; i < tga_width * tga_height; ++i) -; 5594 : { -; 5595 : unsigned char temp = tga_pixel[0]; -; 5596 : tga_pixel[0] = tga_pixel[2]; -; 5597 : tga_pixel[2] = temp; -; 5598 : tga_pixel += tga_comp; -; 5599 : } -; 5600 : } -; 5601 : -; 5602 : // convert to target component count -; 5603 : if (req_comp && req_comp != tga_comp) -; 5604 : tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); -; 5605 : -; 5606 : // the things I do to get rid of an error message, and yet keep -; 5607 : // Microsoft's C compilers happy... [8^( -; 5608 : tga_palette_start = tga_palette_len = tga_palette_bits = -; 5609 : tga_x_origin = tga_y_origin = 0; -; 5610 : STBI_NOTUSED(tga_palette_start); -; 5611 : // OK, done -; 5612 : return tga_data; -; 5613 : } -; 5614 : #endif -; 5615 : -; 5616 : // ************************************************************************************************* -; 5617 : // Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB -; 5618 : -; 5619 : #ifndef STBI_NO_PSD -; 5620 : static int stbi__psd_test(stbi__context* s) -; 5621 : { -; 5622 : int r = (stbi__get32be(s) == 0x38425053); -; 5623 : stbi__rewind(s); -; 5624 : return r; -; 5625 : } -; 5626 : -; 5627 : static int stbi__psd_decode_rle(stbi__context* s, stbi_uc* p, int pixelCount) -; 5628 : { -; 5629 : int count, nleft, len; -; 5630 : -; 5631 : count = 0; -; 5632 : while ((nleft = pixelCount - count) > 0) { -; 5633 : len = stbi__get8(s); -; 5634 : if (len == 128) { -; 5635 : // No-op. -; 5636 : } -; 5637 : else if (len < 128) { -; 5638 : // Copy next len+1 bytes literally. -; 5639 : len++; -; 5640 : if (len > nleft) return 0; // corrupt data -; 5641 : count += len; -; 5642 : while (len) { -; 5643 : *p = stbi__get8(s); -; 5644 : p += 4; -; 5645 : len--; -; 5646 : } -; 5647 : } -; 5648 : else if (len > 128) { -; 5649 : stbi_uc val; -; 5650 : // Next -len+1 bytes in the dest are replicated from next source byte. -; 5651 : // (Interpret len as a negative 8-bit int.) -; 5652 : len = 257 - len; -; 5653 : if (len > nleft) return 0; // corrupt data -; 5654 : val = stbi__get8(s); -; 5655 : count += len; -; 5656 : while (len) { -; 5657 : *p = val; -; 5658 : p += 4; -; 5659 : len--; -; 5660 : } -; 5661 : } -; 5662 : } -; 5663 : -; 5664 : return 1; -; 5665 : } -; 5666 : -; 5667 : static void* stbi__psd_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc) -; 5668 : { -; 5669 : int pixelCount; -; 5670 : int channelCount, compression; -; 5671 : int channel, i; -; 5672 : int bitdepth; -; 5673 : int w, h; -; 5674 : stbi_uc* out; -; 5675 : STBI_NOTUSED(ri); -; 5676 : -; 5677 : // Check identifier -; 5678 : if (stbi__get32be(s) != 0x38425053) // "8BPS" -; 5679 : return stbi__errpuc("not PSD", "Corrupt PSD image"); -; 5680 : -; 5681 : // Check file type version. -; 5682 : if (stbi__get16be(s) != 1) -; 5683 : return stbi__errpuc("wrong version", "Unsupported version of PSD image"); -; 5684 : -; 5685 : // Skip 6 reserved bytes. -; 5686 : stbi__skip(s, 6); -; 5687 : -; 5688 : // Read the number of channels (R, G, B, A, etc). -; 5689 : channelCount = stbi__get16be(s); -; 5690 : if (channelCount < 0 || channelCount > 16) -; 5691 : return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); -; 5692 : -; 5693 : // Read the rows and columns of the image. -; 5694 : h = stbi__get32be(s); -; 5695 : w = stbi__get32be(s); -; 5696 : -; 5697 : if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5698 : if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5699 : -; 5700 : // Make sure the depth is 8 bits. -; 5701 : bitdepth = stbi__get16be(s); -; 5702 : if (bitdepth != 8 && bitdepth != 16) -; 5703 : return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); -; 5704 : -; 5705 : // Make sure the color mode is RGB. -; 5706 : // Valid options are: -; 5707 : // 0: Bitmap -; 5708 : // 1: Grayscale -; 5709 : // 2: Indexed color -; 5710 : // 3: RGB color -; 5711 : // 4: CMYK color -; 5712 : // 7: Multichannel -; 5713 : // 8: Duotone -; 5714 : // 9: Lab color -; 5715 : if (stbi__get16be(s) != 3) -; 5716 : return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); -; 5717 : -; 5718 : // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) -; 5719 : stbi__skip(s, stbi__get32be(s)); -; 5720 : -; 5721 : // Skip the image resources. (resolution, pen tool paths, etc) -; 5722 : stbi__skip(s, stbi__get32be(s)); -; 5723 : -; 5724 : // Skip the reserved data. -; 5725 : stbi__skip(s, stbi__get32be(s)); -; 5726 : -; 5727 : // Find out if the data is compressed. -; 5728 : // Known values: -; 5729 : // 0: no compression -; 5730 : // 1: RLE compressed -; 5731 : compression = stbi__get16be(s); -; 5732 : if (compression > 1) -; 5733 : return stbi__errpuc("bad compression", "PSD has an unknown compression format"); -; 5734 : -; 5735 : // Check size -; 5736 : if (!stbi__mad3sizes_valid(4, w, h, 0)) -; 5737 : return stbi__errpuc("too large", "Corrupt PSD"); -; 5738 : -; 5739 : // Create the destination image. -; 5740 : -; 5741 : if (!compression && bitdepth == 16 && bpc == 16) { -; 5742 : out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0); -; 5743 : ri->bits_per_channel = 16; -; 5744 : } -; 5745 : else -; 5746 : out = (stbi_uc*)stbi__malloc(4 * w * h); -; 5747 : -; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5749 : pixelCount = w * h; -; 5750 : -; 5751 : // Initialize the data to zero. -; 5752 : //memset( out, 0, pixelCount * 4 ); -; 5753 : -; 5754 : // Finally, the image data. -; 5755 : if (compression) { -; 5756 : // RLE as used by .PSD and .TIFF -; 5757 : // Loop until you get the number of unpacked bytes you are expecting: -; 5758 : // Read the next source byte into n. -; 5759 : // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. -; 5760 : // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. -; 5761 : // Else if n is 128, noop. -; 5762 : // Endloop -; 5763 : -; 5764 : // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, -; 5765 : // which we're going to just skip. -; 5766 : stbi__skip(s, h * channelCount * 2); -; 5767 : -; 5768 : // Read the RLE data by channel. -; 5769 : for (channel = 0; channel < 4; channel++) { -; 5770 : stbi_uc* p; -; 5771 : -; 5772 : p = out + channel; -; 5773 : if (channel >= channelCount) { -; 5774 : // Fill this channel with default data. -; 5775 : for (i = 0; i < pixelCount; i++, p += 4) -; 5776 : *p = (channel == 3 ? 255 : 0); -; 5777 : } -; 5778 : else { -; 5779 : // Read the RLE data. -; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { -; 5781 : STBI_FREE(out); -; 5782 : return stbi__errpuc("corrupt", "bad RLE data"); -; 5783 : } -; 5784 : } -; 5785 : } -; 5786 : } -; 5787 : else { -; 5788 : // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) -; 5789 : // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. -; 5790 : -; 5791 : // Read the data by channel. -; 5792 : for (channel = 0; channel < 4; channel++) { -; 5793 : if (channel >= channelCount) { -; 5794 : // Fill this channel with default data. -; 5795 : if (bitdepth == 16 && bpc == 16) { -; 5796 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5797 : stbi__uint16 val = channel == 3 ? 65535 : 0; -; 5798 : for (i = 0; i < pixelCount; i++, q += 4) -; 5799 : *q = val; -; 5800 : } -; 5801 : else { -; 5802 : stbi_uc* p = out + channel; -; 5803 : stbi_uc val = channel == 3 ? 255 : 0; -; 5804 : for (i = 0; i < pixelCount; i++, p += 4) -; 5805 : *p = val; -; 5806 : } -; 5807 : } -; 5808 : else { -; 5809 : if (ri->bits_per_channel == 16) { // output bpc -; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5811 : for (i = 0; i < pixelCount; i++, q += 4) -; 5812 : *q = (stbi__uint16)stbi__get16be(s); -; 5813 : } -; 5814 : else { -; 5815 : stbi_uc* p = out + channel; -; 5816 : if (bitdepth == 16) { // input bpc -; 5817 : for (i = 0; i < pixelCount; i++, p += 4) -; 5818 : *p = (stbi_uc)(stbi__get16be(s) >> 8); -; 5819 : } -; 5820 : else { -; 5821 : for (i = 0; i < pixelCount; i++, p += 4) -; 5822 : *p = stbi__get8(s); -; 5823 : } -; 5824 : } -; 5825 : } -; 5826 : } -; 5827 : } -; 5828 : -; 5829 : // remove weird white matte from PSD -; 5830 : if (channelCount >= 4) { -; 5831 : if (ri->bits_per_channel == 16) { -; 5832 : for (i = 0; i < w * h; ++i) { -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); -; 5841 : } -; 5842 : } -; 5843 : } -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); -; 5854 : } -; 5855 : } -; 5856 : } -; 5857 : } -; 5858 : -; 5859 : // convert to desired output format -; 5860 : if (req_comp && req_comp != 4) { -; 5861 : if (ri->bits_per_channel == 16) -; 5862 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h); -; 5863 : else -; 5864 : out = stbi__convert_format(out, 4, req_comp, w, h); -; 5865 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5866 : } -; 5867 : -; 5868 : if (comp) *comp = 4; -; 5869 : *y = h; -; 5870 : *x = w; -; 5871 : -; 5872 : return out; -; 5873 : } -; 5874 : #endif -; 5875 : -; 5876 : // ************************************************************************************************* -; 5877 : // Softimage PIC loader -; 5878 : // by Tom Seddon -; 5879 : // -; 5880 : // See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -; 5881 : // See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ -; 5882 : -; 5883 : #ifndef STBI_NO_PIC -; 5884 : static int stbi__pic_is4(stbi__context* s, const char* str) -; 5885 : { -; 5886 : int i; -; 5887 : for (i = 0; i < 4; ++i) -; 5888 : if (stbi__get8(s) != (stbi_uc)str[i]) -; 5889 : return 0; -; 5890 : -; 5891 : return 1; -; 5892 : } -; 5893 : -; 5894 : static int stbi__pic_test_core(stbi__context* s) -; 5895 : { -; 5896 : int i; -; 5897 : -; 5898 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) -; 5899 : return 0; -; 5900 : -; 5901 : for (i = 0; i < 84; ++i) -; 5902 : stbi__get8(s); -; 5903 : -; 5904 : if (!stbi__pic_is4(s, "PICT")) -; 5905 : return 0; -; 5906 : -; 5907 : return 1; -; 5908 : } -; 5909 : -; 5910 : typedef struct -; 5911 : { -; 5912 : stbi_uc size, type, channel; -; 5913 : } stbi__pic_packet; -; 5914 : -; 5915 : static stbi_uc* stbi__readval(stbi__context* s, int channel, stbi_uc* dest) -; 5916 : { -; 5917 : int mask = 0x80, i; -; 5918 : -; 5919 : for (i = 0; i < 4; ++i, mask >>= 1) { -; 5920 : if (channel & mask) { -; 5921 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "PIC file too short"); -; 5922 : dest[i] = stbi__get8(s); -; 5923 : } -; 5924 : } -; 5925 : -; 5926 : return dest; -; 5927 : } -; 5928 : -; 5929 : static void stbi__copyval(int channel, stbi_uc* dest, const stbi_uc* src) -; 5930 : { -; 5931 : int mask = 0x80, i; -; 5932 : -; 5933 : for (i = 0; i < 4; ++i, mask >>= 1) -; 5934 : if (channel & mask) - +; Line 5934 0035b 40 f6 c6 10 test sil, 16 0035f 74 03 je SHORT $LN155@stbi__pic_ - -; 5935 : dest[i] = src[i]; - +; Line 5935 00361 88 53 03 mov BYTE PTR [rbx+3], dl $LN155@stbi__pic_: - -; 6025 : return 0; -; 6026 : -; 6027 : for (i = 0; i < count; ++i, dest += 4) - +; Line 6027 00364 48 83 c3 04 add rbx, 4 00368 48 83 e9 01 sub rcx, 1 0036c 75 d2 jne SHORT $LL25@stbi__pic_ - -; 6029 : } - +; Line 6029 0036e eb 41 jmp SHORT $LN27@stbi__pic_ $LN41@stbi__pic_: - -; 6030 : else { // Raw -; 6031 : ++count; - +; Line 6031 00370 ff c5 inc ebp - -; 6032 : if (count > left) return stbi__errpuc("bad file", "scanline overrun"); - +; Line 6032 00372 41 3b ef cmp ebp, r15d 00375 0f 87 de 01 00 00 ja $LN134@stbi__pic_ - -; 6033 : -; 6034 : for (i = 0; i < count; ++i, dest += 4) - +; Line 6034 0037b 33 f6 xor esi, esi 0037d 85 ed test ebp, ebp 0037f 74 30 je SHORT $LN27@stbi__pic_ @@ -69563,9 +32534,7 @@ $LN41@stbi__pic_: 00386 66 66 0f 1f 84 00 00 00 00 00 npad 10 $LL28@stbi__pic_: - -; 6035 : if (!stbi__readval(s, packet->channel, dest)) - +; Line 6035 00390 4c 8b c3 mov r8, rbx 00393 41 8b d6 mov edx, r14d 00396 48 8b cf mov rcx, rdi @@ -69573,78 +32542,48 @@ $LL28@stbi__pic_: 0039e 48 85 c0 test rax, rax 003a1 0f 84 f1 01 00 00 je $LN139@stbi__pic_ - -; 6033 : -; 6034 : for (i = 0; i < count; ++i, dest += 4) - +; Line 6034 003a7 ff c6 inc esi 003a9 48 83 c3 04 add rbx, 4 003ad 3b f5 cmp esi, ebp 003af 7c df jl SHORT $LL28@stbi__pic_ $LN27@stbi__pic_: - -; 6036 : return 0; -; 6037 : } -; 6038 : left -= count; - +; Line 6038 003b1 44 2b fd sub r15d, ebp 003b4 45 85 ff test r15d, r15d 003b7 0f 8f a3 fe ff ff jg $LL21@stbi__pic_ - -; 5981 : if (!stbi__readval(s, packet->channel, dest)) - +; Line 5981 003bd e9 3f 01 00 00 jmp $LN8@stbi__pic_ $LN35@stbi__pic_: - -; 5982 : return 0; -; 5983 : break; -; 5984 : } -; 5985 : -; 5986 : case 1://Pure RLE -; 5987 : { -; 5988 : int left = width, i; - +; Line 5988 003c2 45 8b f5 mov r14d, r13d - -; 5989 : -; 5990 : while (left > 0) { - +; Line 5990 003c5 45 85 ed test r13d, r13d 003c8 0f 8e 33 01 00 00 jle $LN8@stbi__pic_ 003ce 66 90 npad 2 $LL16@stbi__pic_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 003d0 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 003d7 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 003de 73 0f jae SHORT $LN78@stbi__pic_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 003e0 0f b6 30 movzx esi, BYTE PTR [rax] 003e3 48 ff c0 inc rax 003e6 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 003ed eb 27 jmp SHORT $LN77@stbi__pic_ $LN78@stbi__pic_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 003ef 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 003f3 74 1e je SHORT $LN79@stbi__pic_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 003f5 48 8b cf mov rcx, rdi 003f8 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 003fd 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00404 0f b6 30 movzx esi, BYTE PTR [rax] @@ -69653,39 +32592,23 @@ $LN78@stbi__pic_: 00 00 mov QWORD PTR [rdi+192], rax 00411 eb 03 jmp SHORT $LN77@stbi__pic_ $LN79@stbi__pic_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00413 40 32 f6 xor sil, sil $LN77@stbi__pic_: - -; 1091 : if (s->io.read) { - +; Line 1091 00416 48 83 7f 10 00 cmp QWORD PTR [rdi+16], 0 0041b 74 15 je SHORT $LN193@stbi__pic_ - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 0041d 48 8b 4f 28 mov rcx, QWORD PTR [rdi+40] 00421 ff 57 20 call QWORD PTR [rdi+32] 00424 85 c0 test eax, eax 00426 74 1e je SHORT $LN194@stbi__pic_ - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 00428 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 0042c 0f 84 27 01 00 00 je $LN134@stbi__pic_ $LN193@stbi__pic_: - -; 5991 : stbi_uc count, value[4]; -; 5992 : -; 5993 : count = stbi__get8(s); -; 5994 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (pure read count)"); - +; Line 5994 00432 48 8b 87 c8 00 00 00 mov rax, QWORD PTR [rdi+200] 00439 48 39 87 c0 00 @@ -69693,17 +32616,10 @@ $LN193@stbi__pic_: 00440 0f 83 13 01 00 00 jae $LN134@stbi__pic_ $LN194@stbi__pic_: - -; 5995 : -; 5996 : if (count > left) - +; Line 5996 00446 40 0f b6 ce movzx ecx, sil - -; 5997 : count = (stbi_uc)left; -; 5998 : -; 5999 : if (!stbi__readval(s, packet->channel, value)) return 0; - - 0044a 4c 8d 44 24 54 lea r8, QWORD PTR value$12[rsp] +; Line 5999 + 0044a 4c 8d 44 24 54 lea r8, QWORD PTR value$4[rsp] 0044f 41 3b ce cmp ecx, r14d 00452 40 0f b6 ee movzx ebp, sil 00456 41 0f b6 34 24 movzx esi, BYTE PTR [r12] @@ -69715,14617 +32631,64 @@ $LN194@stbi__pic_: 0046c 48 85 c0 test rax, rax 0046f 0f 84 23 01 00 00 je $LN139@stbi__pic_ - -; 6000 : -; 6001 : for (i = 0; i < count; ++i, dest += 4) - +; Line 6001 00475 40 84 ed test bpl, bpl 00478 74 47 je SHORT $LN19@stbi__pic_ - -; 6002 : stbi__copyval(packet->channel, dest, value); - - 0047a 8b 44 24 54 mov eax, DWORD PTR value$12[rsp] - 0047e 0f b6 54 24 57 movzx edx, BYTE PTR value$12[rsp+3] +; Line 6002 + 0047a 8b 44 24 54 mov eax, DWORD PTR value$4[rsp] + 0047e 0f b6 54 24 57 movzx edx, BYTE PTR value$4[rsp+3] 00483 44 0f b6 44 24 - 56 movzx r8d, BYTE PTR value$12[rsp+2] + 56 movzx r8d, BYTE PTR value$4[rsp+2] 00489 44 0f b6 4c 24 - 55 movzx r9d, BYTE PTR value$12[rsp+1] + 55 movzx r9d, BYTE PTR value$4[rsp+1] 0048f 40 0f b6 cd movzx ecx, bpl $LL20@stbi__pic_: - -; 5934 : if (channel & mask) - +; Line 5934 00493 40 84 f6 test sil, sil 00496 79 02 jns SHORT $LN51@stbi__pic_ - -; 5935 : dest[i] = src[i]; - +; Line 5935 00498 88 03 mov BYTE PTR [rbx], al $LN51@stbi__pic_: - -; 1096 : } -; 1097 : -; 1098 : return s->img_buffer >= s->img_buffer_end; -; 1099 : } -; 1100 : #endif -; 1101 : -; 1102 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) -; 1103 : // nothing -; 1104 : #else -; 1105 : static void stbi__skip(stbi__context* s, int n) -; 1106 : { -; 1107 : if (n == 0) return; // already there! -; 1108 : if (n < 0) { -; 1109 : s->img_buffer = s->img_buffer_end; -; 1110 : return; -; 1111 : } -; 1112 : if (s->io.read) { -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1114 : if (blen < n) { -; 1115 : s->img_buffer = s->img_buffer_end; -; 1116 : (s->io.skip)(s->io_user_data, n - blen); -; 1117 : return; -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; -; 1121 : } -; 1122 : #endif -; 1123 : -; 1124 : #if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) -; 1125 : // nothing -; 1126 : #else -; 1127 : static int stbi__getn(stbi__context* s, stbi_uc* buffer, int n) -; 1128 : { -; 1129 : if (s->io.read) { -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1131 : if (blen < n) { -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; -; 1139 : return res; -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { -; 1144 : memcpy(buffer, s->img_buffer, n); -; 1145 : s->img_buffer += n; -; 1146 : return 1; -; 1147 : } -; 1148 : else -; 1149 : return 0; -; 1150 : } -; 1151 : #endif -; 1152 : -; 1153 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1154 : // nothing -; 1155 : #else -; 1156 : static int stbi__get16be(stbi__context* s) -; 1157 : { -; 1158 : int z = stbi__get8(s); -; 1159 : return (z << 8) + stbi__get8(s); -; 1160 : } -; 1161 : #endif -; 1162 : -; 1163 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1164 : // nothing -; 1165 : #else -; 1166 : static stbi__uint32 stbi__get32be(stbi__context* s) -; 1167 : { -; 1168 : stbi__uint32 z = stbi__get16be(s); -; 1169 : return (z << 16) + stbi__get16be(s); -; 1170 : } -; 1171 : #endif -; 1172 : -; 1173 : #if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -; 1174 : // nothing -; 1175 : #else -; 1176 : static int stbi__get16le(stbi__context* s) -; 1177 : { -; 1178 : int z = stbi__get8(s); -; 1179 : return z + (stbi__get8(s) << 8); -; 1180 : } -; 1181 : #endif -; 1182 : -; 1183 : #ifndef STBI_NO_BMP -; 1184 : static stbi__uint32 stbi__get32le(stbi__context* s) -; 1185 : { -; 1186 : stbi__uint32 z = stbi__get16le(s); -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; -; 1188 : return z; -; 1189 : } -; 1190 : #endif -; 1191 : -; 1192 : #define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings -; 1193 : -; 1194 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1195 : // nothing -; 1196 : #else -; 1197 : ////////////////////////////////////////////////////////////////////////////// -; 1198 : // -; 1199 : // generic converter from built-in img_n to req_comp -; 1200 : // individual types do this automatically as much as possible (e.g. jpeg -; 1201 : // does all cases internally since it needs to colorspace convert anyway, -; 1202 : // and it never has alpha, so very few cases ). png can automatically -; 1203 : // interleave an alpha=255 channel, but falls back to this for other cases -; 1204 : // -; 1205 : // assume data buffer is malloced, so malloc a new one and free that one -; 1206 : // only failure mode is malloc failing -; 1207 : -; 1208 : static stbi_uc stbi__compute_y(int r, int g, int b) -; 1209 : { -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1211 : } -; 1212 : #endif -; 1213 : -; 1214 : #if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1215 : // nothing -; 1216 : #else -; 1217 : static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1218 : { -; 1219 : int i, j; -; 1220 : unsigned char* good; -; 1221 : -; 1222 : if (req_comp == img_n) return data; -; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1224 : -; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); -; 1226 : if (good == NULL) { -; 1227 : STBI_FREE(data); -; 1228 : return stbi__errpuc("outofmem", "Out of memory"); -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { -; 1232 : unsigned char* src = data + j * x * img_n; -; 1233 : unsigned char* dest = good + j * x * req_comp; -; 1234 : -; 1235 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1236 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1237 : // convert source image with img_n components to one with req_comp components; -; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1239 : switch (STBI__COMBO(img_n, req_comp)) { -; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; -; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; -; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1253 : } -; 1254 : #undef STBI__CASE -; 1255 : } -; 1256 : -; 1257 : STBI_FREE(data); -; 1258 : return good; -; 1259 : } -; 1260 : #endif -; 1261 : -; 1262 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1263 : // nothing -; 1264 : #else -; 1265 : static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -; 1266 : { -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1268 : } -; 1269 : #endif -; 1270 : -; 1271 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1272 : // nothing -; 1273 : #else -; 1274 : static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1275 : { -; 1276 : int i, j; -; 1277 : stbi__uint16* good; -; 1278 : -; 1279 : if (req_comp == img_n) return data; -; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1281 : -; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); -; 1283 : if (good == NULL) { -; 1284 : STBI_FREE(data); -; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { -; 1289 : stbi__uint16* src = data + j * x * img_n; -; 1290 : stbi__uint16* dest = good + j * x * req_comp; -; 1291 : -; 1292 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1293 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1294 : // convert source image with img_n components to one with req_comp components; -; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1296 : switch (STBI__COMBO(img_n, req_comp)) { -; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; -; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; -; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1310 : } -; 1311 : #undef STBI__CASE -; 1312 : } -; 1313 : -; 1314 : STBI_FREE(data); -; 1315 : return good; -; 1316 : } -; 1317 : #endif -; 1318 : -; 1319 : #ifndef STBI_NO_LINEAR -; 1320 : static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp) -; 1321 : { -; 1322 : int i, k, n; -; 1323 : float* output; -; 1324 : if (!data) return NULL; -; 1325 : output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0); -; 1326 : if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } -; 1327 : // compute number of non-alpha components -; 1328 : if (comp & 1) n = comp; else n = comp - 1; -; 1329 : for (i = 0; i < x * y; ++i) { -; 1330 : for (k = 0; k < n; ++k) { -; 1331 : output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale); -; 1332 : } -; 1333 : } -; 1334 : if (n < comp) { -; 1335 : for (i = 0; i < x * y; ++i) { -; 1336 : output[i * comp + n] = data[i * comp + n] / 255.0f; -; 1337 : } -; 1338 : } -; 1339 : STBI_FREE(data); -; 1340 : return output; -; 1341 : } -; 1342 : #endif -; 1343 : -; 1344 : #ifndef STBI_NO_HDR -; 1345 : #define stbi__float2int(x) ((int) (x)) -; 1346 : static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp) -; 1347 : { -; 1348 : int i, k, n; -; 1349 : stbi_uc* output; -; 1350 : if (!data) return NULL; -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } -; 1353 : // compute number of non-alpha components -; 1354 : if (comp & 1) n = comp; else n = comp - 1; -; 1355 : for (i = 0; i < x * y; ++i) { -; 1356 : for (k = 0; k < n; ++k) { -; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; -; 1358 : if (z < 0) z = 0; -; 1359 : if (z > 255) z = 255; -; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1361 : } -; 1362 : if (k < comp) { -; 1363 : float z = data[i * comp + k] * 255 + 0.5f; -; 1364 : if (z < 0) z = 0; -; 1365 : if (z > 255) z = 255; -; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1367 : } -; 1368 : } -; 1369 : STBI_FREE(data); -; 1370 : return output; -; 1371 : } -; 1372 : #endif -; 1373 : -; 1374 : ////////////////////////////////////////////////////////////////////////////// -; 1375 : // -; 1376 : // "baseline" JPEG/JFIF decoder -; 1377 : // -; 1378 : // simple implementation -; 1379 : // - doesn't support delayed output of y-dimension -; 1380 : // - simple interface (only one output format: 8-bit interleaved RGB) -; 1381 : // - doesn't try to recover corrupt jpegs -; 1382 : // - doesn't allow partial loading, loading multiple at once -; 1383 : // - still fast on x86 (copying globals into locals doesn't help x86) -; 1384 : // - allocates lots of intermediate memory (full size of all components) -; 1385 : // - non-interleaved case requires this anyway -; 1386 : // - allows good upsampling (see next) -; 1387 : // high-quality -; 1388 : // - upsampled channels are bilinearly interpolated, even across blocks -; 1389 : // - quality integer IDCT derived from IJG's 'slow' -; 1390 : // performance -; 1391 : // - fast huffman; reasonable integer IDCT -; 1392 : // - some SIMD kernels for common paths on targets with SSE2/NEON -; 1393 : // - uses a lot of intermediate memory, could cache poorly -; 1394 : -; 1395 : #ifndef STBI_NO_JPEG -; 1396 : -; 1397 : // huffman decoding acceleration -; 1398 : #define FAST_BITS 9 // larger handles more cases; smaller stomps less cache -; 1399 : -; 1400 : typedef struct -; 1401 : { -; 1402 : stbi_uc fast[1 << FAST_BITS]; -; 1403 : // weirdly, repacking this into AoS is a 10% speed loss, instead of a win -; 1404 : stbi__uint16 code[256]; -; 1405 : stbi_uc values[256]; -; 1406 : stbi_uc size[257]; -; 1407 : unsigned int maxcode[18]; -; 1408 : int delta[17]; // old 'firstsymbol' - old 'firstcode' -; 1409 : } stbi__huffman; -; 1410 : -; 1411 : typedef struct -; 1412 : { -; 1413 : stbi__context* s; -; 1414 : stbi__huffman huff_dc[4]; -; 1415 : stbi__huffman huff_ac[4]; -; 1416 : stbi__uint16 dequant[4][64]; -; 1417 : stbi__int16 fast_ac[4][1 << FAST_BITS]; -; 1418 : -; 1419 : // sizes for components, interleaved MCUs -; 1420 : int img_h_max, img_v_max; -; 1421 : int img_mcu_x, img_mcu_y; -; 1422 : int img_mcu_w, img_mcu_h; -; 1423 : -; 1424 : // definition of jpeg image component -; 1425 : struct -; 1426 : { -; 1427 : int id; -; 1428 : int h, v; -; 1429 : int tq; -; 1430 : int hd, ha; -; 1431 : int dc_pred; -; 1432 : -; 1433 : int x, y, w2, h2; -; 1434 : stbi_uc* data; -; 1435 : void* raw_data, * raw_coeff; -; 1436 : stbi_uc* linebuf; -; 1437 : short* coeff; // progressive only -; 1438 : int coeff_w, coeff_h; // number of 8x8 coefficient blocks -; 1439 : } img_comp[4]; -; 1440 : -; 1441 : stbi__uint32 code_buffer; // jpeg entropy-coded buffer -; 1442 : int code_bits; // number of valid bits -; 1443 : unsigned char marker; // marker seen while filling entropy buffer -; 1444 : int nomore; // flag if we saw a marker so must stop -; 1445 : -; 1446 : int progressive; -; 1447 : int spec_start; -; 1448 : int spec_end; -; 1449 : int succ_high; -; 1450 : int succ_low; -; 1451 : int eob_run; -; 1452 : int jfif; -; 1453 : int app14_color_transform; // Adobe APP14 tag -; 1454 : int rgb; -; 1455 : -; 1456 : int scan_n, order[4]; -; 1457 : int restart_interval, todo; -; 1458 : -; 1459 : // kernels -; 1460 : void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]); -; 1461 : void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); -; 1462 : stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); -; 1463 : } stbi__jpeg; -; 1464 : -; 1465 : static int stbi__build_huffman(stbi__huffman* h, int* count) -; 1466 : { -; 1467 : int i, j, k = 0; -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { -; 1471 : for (j = 0; j < count[i]; ++j) { -; 1472 : h->size[k++] = (stbi_uc)(i + 1); -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); -; 1474 : } -; 1475 : } -; 1476 : h->size[k] = 0; -; 1477 : -; 1478 : // compute actual symbols (from jpeg spec) -; 1479 : code = 0; -; 1480 : k = 0; -; 1481 : for (j = 1; j <= 16; ++j) { -; 1482 : // compute delta to add to code to compute symbol id -; 1483 : h->delta[j] = k - code; -; 1484 : if (h->size[k] == j) { -; 1485 : while (h->size[k] == j) -; 1486 : h->code[k++] = (stbi__uint16)(code++); -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); -; 1488 : } -; 1489 : // compute largest code + 1 for this size, preshifted as needed later -; 1490 : h->maxcode[j] = code << (16 - j); -; 1491 : code <<= 1; -; 1492 : } -; 1493 : h->maxcode[j] = 0xffffffff; -; 1494 : -; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated -; 1496 : memset(h->fast, 255, 1 << FAST_BITS); -; 1497 : for (i = 0; i < k; ++i) { -; 1498 : int s = h->size[i]; -; 1499 : if (s <= FAST_BITS) { -; 1500 : int c = h->code[i] << (FAST_BITS - s); -; 1501 : int m = 1 << (FAST_BITS - s); -; 1502 : for (j = 0; j < m; ++j) { -; 1503 : h->fast[c + j] = (stbi_uc)i; -; 1504 : } -; 1505 : } -; 1506 : } -; 1507 : return 1; -; 1508 : } -; 1509 : -; 1510 : // build a table that decodes both magnitude and value of small ACs in -; 1511 : // one go. -; 1512 : static void stbi__build_fast_ac(stbi__int16* fast_ac, stbi__huffman* h) -; 1513 : { -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { -; 1516 : stbi_uc fast = h->fast[i]; -; 1517 : fast_ac[i] = 0; -; 1518 : if (fast < 255) { -; 1519 : int rs = h->values[fast]; -; 1520 : int run = (rs >> 4) & 15; -; 1521 : int magbits = rs & 15; -; 1522 : int len = h->size[fast]; -; 1523 : -; 1524 : if (magbits && len + magbits <= FAST_BITS) { -; 1525 : // magnitude code followed by receive_extend code -; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); -; 1527 : int m = 1 << (magbits - 1); -; 1528 : if (k < m) k += (~0U << magbits) + 1; -; 1529 : // if the result is small enough, we can fit it in fast_ac table -; 1530 : if (k >= -128 && k <= 127) -; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); -; 1532 : } -; 1533 : } -; 1534 : } -; 1535 : } -; 1536 : -; 1537 : static void stbi__grow_buffer_unsafe(stbi__jpeg* j) -; 1538 : { -; 1539 : do { -; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); -; 1541 : if (b == 0xff) { -; 1542 : int c = stbi__get8(j->s); -; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes -; 1544 : if (c != 0) { -; 1545 : j->marker = (unsigned char)c; -; 1546 : j->nomore = 1; -; 1547 : return; -; 1548 : } -; 1549 : } -; 1550 : j->code_buffer |= b << (24 - j->code_bits); -; 1551 : j->code_bits += 8; -; 1552 : } while (j->code_bits <= 24); -; 1553 : } -; 1554 : -; 1555 : // (1 << n) - 1 -; 1556 : static const stbi__uint32 stbi__bmask[17] = { 0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535 }; -; 1557 : -; 1558 : // decode a jpeg huffman value from the bitstream -; 1559 : stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg* j, stbi__huffman* h) -; 1560 : { -; 1561 : unsigned int temp; -; 1562 : int c, k; -; 1563 : -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1569 : k = h->fast[c]; -; 1570 : if (k < 255) { -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; -; 1575 : j->code_bits -= s; -; 1576 : return h->values[k]; -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; -; 1586 : for (k = FAST_BITS + 1; ; ++k) -; 1587 : if (temp < h->maxcode[k]) -; 1588 : break; -; 1589 : if (k == 17) { -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; -; 1608 : } -; 1609 : -; 1610 : // bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) -; 1623 : k = stbi_lrot(j->code_buffer, n); -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); -; 1628 : } -; 1629 : -; 1630 : // get some unsigned bits -; 1631 : stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg* j, int n) -; 1632 : { -; 1633 : unsigned int k; -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1636 : k = stbi_lrot(j->code_buffer, n); -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; -; 1640 : return k; -; 1641 : } -; 1642 : -; 1643 : stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg* j) -; 1644 : { -; 1645 : unsigned int k; -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1648 : k = j->code_buffer; -; 1649 : j->code_buffer <<= 1; -; 1650 : --j->code_bits; -; 1651 : return k & 0x80000000; -; 1652 : } -; 1653 : -; 1654 : // given a value that's at position X in the zigzag stream, -; 1655 : // where does it appear in the 8x8 matrix coded as row-major? -; 1656 : static const stbi_uc stbi__jpeg_dezigzag[64 + 15] = -; 1657 : { -; 1658 : 0, 1, 8, 16, 9, 2, 3, 10, -; 1659 : 17, 24, 32, 25, 18, 11, 4, 5, -; 1660 : 12, 19, 26, 33, 40, 48, 41, 34, -; 1661 : 27, 20, 13, 6, 7, 14, 21, 28, -; 1662 : 35, 42, 49, 56, 57, 50, 43, 36, -; 1663 : 29, 22, 15, 23, 30, 37, 44, 51, -; 1664 : 58, 59, 52, 45, 38, 31, 39, 46, -; 1665 : 53, 60, 61, 54, 47, 55, 62, 63, -; 1666 : // let corrupt input sample past end -; 1667 : 63, 63, 63, 63, 63, 63, 63, 63, -; 1668 : 63, 63, 63, 63, 63, 63, 63 -; 1669 : }; -; 1670 : -; 1671 : // decode one 64-entry block-- -; 1672 : static int stbi__jpeg_decode_block(stbi__jpeg* j, short data[64], stbi__huffman* hdc, stbi__huffman* hac, stbi__int16* fac, int b, stbi__uint16* dequant) -; 1673 : { -; 1674 : int diff, dc, k; -; 1675 : int t; -; 1676 : -; 1677 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1678 : t = stbi__jpeg_huff_decode(j, hdc); -; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1680 : -; 1681 : // 0 all the ac values now so we can do it 32-bits at a time -; 1682 : memset(data, 0, 64 * sizeof(data[0])); -; 1683 : -; 1684 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1686 : dc = j->img_comp[b].dc_pred + diff; -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1689 : data[0] = (short)(dc * dequant[0]); -; 1690 : -; 1691 : // decode AC components, see JPEG spec -; 1692 : k = 1; -; 1693 : do { -; 1694 : unsigned int zig; -; 1695 : int c, r, s; -; 1696 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1697 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1698 : r = fac[c]; -; 1699 : if (r) { // fast-AC path -; 1700 : k += (r >> 4) & 15; // run -; 1701 : s = r & 15; // combined length -; 1702 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1703 : j->code_buffer <<= s; -; 1704 : j->code_bits -= s; -; 1705 : // decode into unzigzag'd location -; 1706 : zig = stbi__jpeg_dezigzag[k++]; -; 1707 : data[zig] = (short)((r >> 8) * dequant[zig]); -; 1708 : } -; 1709 : else { -; 1710 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1711 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1712 : s = rs & 15; -; 1713 : r = rs >> 4; -; 1714 : if (s == 0) { -; 1715 : if (rs != 0xf0) break; // end block -; 1716 : k += 16; -; 1717 : } -; 1718 : else { -; 1719 : k += r; -; 1720 : // decode into unzigzag'd location -; 1721 : zig = stbi__jpeg_dezigzag[k++]; -; 1722 : data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]); -; 1723 : } -; 1724 : } -; 1725 : } while (k < 64); -; 1726 : return 1; -; 1727 : } -; 1728 : -; 1729 : static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg* j, short data[64], stbi__huffman* hdc, int b) -; 1730 : { -; 1731 : int diff, dc; -; 1732 : int t; -; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1734 : -; 1735 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1736 : -; 1737 : if (j->succ_high == 0) { -; 1738 : // first scan for DC coefficient, must be first -; 1739 : memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now -; 1740 : t = stbi__jpeg_huff_decode(j, hdc); -; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1742 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1745 : dc = j->img_comp[b].dc_pred + diff; -; 1746 : j->img_comp[b].dc_pred = dc; -; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1748 : data[0] = (short)(dc * (1 << j->succ_low)); -; 1749 : } -; 1750 : else { -; 1751 : // refinement scan for DC coefficient -; 1752 : if (stbi__jpeg_get_bit(j)) -; 1753 : data[0] += (short)(1 << j->succ_low); -; 1754 : } -; 1755 : return 1; -; 1756 : } -; 1757 : -; 1758 : // @OPTIMIZE: store non-zigzagged during the decode passes, -; 1759 : // and only de-zigzag when dequantizing -; 1760 : static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg* j, short data[64], stbi__huffman* hac, stbi__int16* fac) -; 1761 : { -; 1762 : int k; -; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1764 : -; 1765 : if (j->succ_high == 0) { -; 1766 : int shift = j->succ_low; -; 1767 : -; 1768 : if (j->eob_run) { -; 1769 : --j->eob_run; -; 1770 : return 1; -; 1771 : } -; 1772 : -; 1773 : k = j->spec_start; -; 1774 : do { -; 1775 : unsigned int zig; -; 1776 : int c, r, s; -; 1777 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1778 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1779 : r = fac[c]; -; 1780 : if (r) { // fast-AC path -; 1781 : k += (r >> 4) & 15; // run -; 1782 : s = r & 15; // combined length -; 1783 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1784 : j->code_buffer <<= s; -; 1785 : j->code_bits -= s; -; 1786 : zig = stbi__jpeg_dezigzag[k++]; -; 1787 : data[zig] = (short)((r >> 8) * (1 << shift)); -; 1788 : } -; 1789 : else { -; 1790 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1791 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1792 : s = rs & 15; -; 1793 : r = rs >> 4; -; 1794 : if (s == 0) { -; 1795 : if (r < 15) { -; 1796 : j->eob_run = (1 << r); -; 1797 : if (r) -; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1799 : --j->eob_run; -; 1800 : break; -; 1801 : } -; 1802 : k += 16; -; 1803 : } -; 1804 : else { -; 1805 : k += r; -; 1806 : zig = stbi__jpeg_dezigzag[k++]; -; 1807 : data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift)); -; 1808 : } -; 1809 : } -; 1810 : } while (k <= j->spec_end); -; 1811 : } -; 1812 : else { -; 1813 : // refinement scan for these AC coefficients -; 1814 : -; 1815 : short bit = (short)(1 << j->succ_low); -; 1816 : -; 1817 : if (j->eob_run) { -; 1818 : --j->eob_run; -; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { -; 1820 : short* p = &data[stbi__jpeg_dezigzag[k]]; -; 1821 : if (*p != 0) -; 1822 : if (stbi__jpeg_get_bit(j)) -; 1823 : if ((*p & bit) == 0) { -; 1824 : if (*p > 0) -; 1825 : *p += bit; -; 1826 : else -; 1827 : *p -= bit; -; 1828 : } -; 1829 : } -; 1830 : } -; 1831 : else { -; 1832 : k = j->spec_start; -; 1833 : do { -; 1834 : int r, s; -; 1835 : int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh -; 1836 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1837 : s = rs & 15; -; 1838 : r = rs >> 4; -; 1839 : if (s == 0) { -; 1840 : if (r < 15) { -; 1841 : j->eob_run = (1 << r) - 1; -; 1842 : if (r) -; 1843 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1844 : r = 64; // force end of block -; 1845 : } -; 1846 : else { -; 1847 : // r=15 s=0 should write 16 0s, so we just do -; 1848 : // a run of 15 0s and then write s (which is 0), -; 1849 : // so we don't have to do anything special here -; 1850 : } -; 1851 : } -; 1852 : else { -; 1853 : if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1854 : // sign bit -; 1855 : if (stbi__jpeg_get_bit(j)) -; 1856 : s = bit; -; 1857 : else -; 1858 : s = -bit; -; 1859 : } -; 1860 : -; 1861 : // advance by r -; 1862 : while (k <= j->spec_end) { -; 1863 : short* p = &data[stbi__jpeg_dezigzag[k++]]; -; 1864 : if (*p != 0) { -; 1865 : if (stbi__jpeg_get_bit(j)) -; 1866 : if ((*p & bit) == 0) { -; 1867 : if (*p > 0) -; 1868 : *p += bit; -; 1869 : else -; 1870 : *p -= bit; -; 1871 : } -; 1872 : } -; 1873 : else { -; 1874 : if (r == 0) { -; 1875 : *p = (short)s; -; 1876 : break; -; 1877 : } -; 1878 : --r; -; 1879 : } -; 1880 : } -; 1881 : } while (k <= j->spec_end); -; 1882 : } -; 1883 : } -; 1884 : return 1; -; 1885 : } -; 1886 : -; 1887 : // take a -128..127 value and stbi__clamp it and convert to 0..255 -; 1888 : stbi_inline static stbi_uc stbi__clamp(int x) -; 1889 : { -; 1890 : // trick to use a single test to catch both cases -; 1891 : if ((unsigned int)x > 255) { -; 1892 : if (x < 0) return 0; -; 1893 : if (x > 255) return 255; -; 1894 : } -; 1895 : return (stbi_uc)x; -; 1896 : } -; 1897 : -; 1898 : #define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -; 1899 : #define stbi__fsh(x) ((x) * 4096) -; 1900 : -; 1901 : // derived from jidctint -- DCT_ISLOW -; 1902 : #define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ -; 1903 : int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ -; 1904 : p2 = s2; \ -; 1905 : p3 = s6; \ -; 1906 : p1 = (p2+p3) * stbi__f2f(0.5411961f); \ -; 1907 : t2 = p1 + p3*stbi__f2f(-1.847759065f); \ -; 1908 : t3 = p1 + p2*stbi__f2f( 0.765366865f); \ -; 1909 : p2 = s0; \ -; 1910 : p3 = s4; \ -; 1911 : t0 = stbi__fsh(p2+p3); \ -; 1912 : t1 = stbi__fsh(p2-p3); \ -; 1913 : x0 = t0+t3; \ -; 1914 : x3 = t0-t3; \ -; 1915 : x1 = t1+t2; \ -; 1916 : x2 = t1-t2; \ -; 1917 : t0 = s7; \ -; 1918 : t1 = s5; \ -; 1919 : t2 = s3; \ -; 1920 : t3 = s1; \ -; 1921 : p3 = t0+t2; \ -; 1922 : p4 = t1+t3; \ -; 1923 : p1 = t0+t3; \ -; 1924 : p2 = t1+t2; \ -; 1925 : p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ -; 1926 : t0 = t0*stbi__f2f( 0.298631336f); \ -; 1927 : t1 = t1*stbi__f2f( 2.053119869f); \ -; 1928 : t2 = t2*stbi__f2f( 3.072711026f); \ -; 1929 : t3 = t3*stbi__f2f( 1.501321110f); \ -; 1930 : p1 = p5 + p1*stbi__f2f(-0.899976223f); \ -; 1931 : p2 = p5 + p2*stbi__f2f(-2.562915447f); \ -; 1932 : p3 = p3*stbi__f2f(-1.961570560f); \ -; 1933 : p4 = p4*stbi__f2f(-0.390180644f); \ -; 1934 : t3 += p1+p4; \ -; 1935 : t2 += p2+p3; \ -; 1936 : t1 += p2+p4; \ -; 1937 : t0 += p1+p3; -; 1938 : -; 1939 : static void stbi__idct_block(stbi_uc* out, int out_stride, short data[64]) -; 1940 : { -; 1941 : int i, val[64], * v = val; -; 1942 : stbi_uc* o; -; 1943 : short* d = data; -; 1944 : -; 1945 : // columns -; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { -; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing -; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 -; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { -; 1950 : // no shortcut 0 seconds -; 1951 : // (1|2|3|4|5|6|7)==0 0 seconds -; 1952 : // all separate -0.047 seconds -; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds -; 1954 : int dcterm = d[0] * 4; -; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; -; 1956 : } -; 1957 : else { -; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) -; 1959 : // constants scaled things up by 1<<12; let's bring them back -; 1960 : // down, but keep 2 extra bits of precision -; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; -; 1962 : v[0] = (x0 + t3) >> 10; -; 1963 : v[56] = (x0 - t3) >> 10; -; 1964 : v[8] = (x1 + t2) >> 10; -; 1965 : v[48] = (x1 - t2) >> 10; -; 1966 : v[16] = (x2 + t1) >> 10; -; 1967 : v[40] = (x2 - t1) >> 10; -; 1968 : v[24] = (x3 + t0) >> 10; -; 1969 : v[32] = (x3 - t0) >> 10; -; 1970 : } -; 1971 : } -; 1972 : -; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { -; 1974 : // no fast case since the first 1D IDCT spread components out -; 1975 : STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]) -; 1976 : // constants scaled things up by 1<<12, plus we had 1<<2 from first -; 1977 : // loop, plus horizontal and vertical each scale by sqrt(8) so together -; 1978 : // we've got an extra 1<<3, so 1<<17 total we need to remove. -; 1979 : // so we want to round that, which means adding 0.5 * 1<<17, -; 1980 : // aka 65536. Also, we'll end up with -128 to 127 that we want -; 1981 : // to encode as 0..255 by adding 128, so we'll add that before the shift -; 1982 : x0 += 65536 + (128 << 17); -; 1983 : x1 += 65536 + (128 << 17); -; 1984 : x2 += 65536 + (128 << 17); -; 1985 : x3 += 65536 + (128 << 17); -; 1986 : // tried computing the shifts into temps, or'ing the temps to see -; 1987 : // if any were out of range, but that was slower -; 1988 : o[0] = stbi__clamp((x0 + t3) >> 17); -; 1989 : o[7] = stbi__clamp((x0 - t3) >> 17); -; 1990 : o[1] = stbi__clamp((x1 + t2) >> 17); -; 1991 : o[6] = stbi__clamp((x1 - t2) >> 17); -; 1992 : o[2] = stbi__clamp((x2 + t1) >> 17); -; 1993 : o[5] = stbi__clamp((x2 - t1) >> 17); -; 1994 : o[3] = stbi__clamp((x3 + t0) >> 17); -; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); -; 1996 : } -; 1997 : } -; 1998 : -; 1999 : #ifdef STBI_SSE2 -; 2000 : // sse2 integer IDCT. not the fastest possible implementation but it -; 2001 : // produces bit-identical results to the generic C version so it's -; 2002 : // fully "transparent". -; 2003 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2004 : { -; 2005 : // This is constructed to match our regular (generic) integer IDCT exactly. -; 2006 : __m128i row0, row1, row2, row3, row4, row5, row6, row7; -; 2007 : __m128i tmp; -; 2008 : -; 2009 : // dot product constant: even elems=x, odd elems=y -; 2010 : #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) -; 2011 : -; 2012 : // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) -; 2013 : // out(1) = c1[even]*x + c1[odd]*y -; 2014 : #define dct_rot(out0,out1, x,y,c0,c1) \ -; 2015 : __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ -; 2016 : __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ -; 2017 : __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ -; 2018 : __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ -; 2019 : __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ -; 2020 : __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) -; 2021 : -; 2022 : // out = in << 12 (in 16-bit, out 32-bit) -; 2023 : #define dct_widen(out, in) \ -; 2024 : __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ -; 2025 : __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) -; 2026 : -; 2027 : // wide add -; 2028 : #define dct_wadd(out, a, b) \ -; 2029 : __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ -; 2030 : __m128i out##_h = _mm_add_epi32(a##_h, b##_h) -; 2031 : -; 2032 : // wide sub -; 2033 : #define dct_wsub(out, a, b) \ -; 2034 : __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ -; 2035 : __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) -; 2036 : -; 2037 : // butterfly a/b, add bias, then shift by "s" and pack -; 2038 : #define dct_bfly32o(out0, out1, a,b,bias,s) \ -; 2039 : { \ -; 2040 : __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ -; 2041 : __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ -; 2042 : dct_wadd(sum, abiased, b); \ -; 2043 : dct_wsub(dif, abiased, b); \ -; 2044 : out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ -; 2045 : out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ -; 2046 : } -; 2047 : -; 2048 : // 8-bit interleave step (for transposes) -; 2049 : #define dct_interleave8(a, b) \ -; 2050 : tmp = a; \ -; 2051 : a = _mm_unpacklo_epi8(a, b); \ -; 2052 : b = _mm_unpackhi_epi8(tmp, b) -; 2053 : -; 2054 : // 16-bit interleave step (for transposes) -; 2055 : #define dct_interleave16(a, b) \ -; 2056 : tmp = a; \ -; 2057 : a = _mm_unpacklo_epi16(a, b); \ -; 2058 : b = _mm_unpackhi_epi16(tmp, b) -; 2059 : -; 2060 : #define dct_pass(bias,shift) \ -; 2061 : { \ -; 2062 : /* even part */ \ -; 2063 : dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ -; 2064 : __m128i sum04 = _mm_add_epi16(row0, row4); \ -; 2065 : __m128i dif04 = _mm_sub_epi16(row0, row4); \ -; 2066 : dct_widen(t0e, sum04); \ -; 2067 : dct_widen(t1e, dif04); \ -; 2068 : dct_wadd(x0, t0e, t3e); \ -; 2069 : dct_wsub(x3, t0e, t3e); \ -; 2070 : dct_wadd(x1, t1e, t2e); \ -; 2071 : dct_wsub(x2, t1e, t2e); \ -; 2072 : /* odd part */ \ -; 2073 : dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ -; 2074 : dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ -; 2075 : __m128i sum17 = _mm_add_epi16(row1, row7); \ -; 2076 : __m128i sum35 = _mm_add_epi16(row3, row5); \ -; 2077 : dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ -; 2078 : dct_wadd(x4, y0o, y4o); \ -; 2079 : dct_wadd(x5, y1o, y5o); \ -; 2080 : dct_wadd(x6, y2o, y5o); \ -; 2081 : dct_wadd(x7, y3o, y4o); \ -; 2082 : dct_bfly32o(row0,row7, x0,x7,bias,shift); \ -; 2083 : dct_bfly32o(row1,row6, x1,x6,bias,shift); \ -; 2084 : dct_bfly32o(row2,row5, x2,x5,bias,shift); \ -; 2085 : dct_bfly32o(row3,row4, x3,x4,bias,shift); \ -; 2086 : } -; 2087 : -; 2088 : __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); -; 2089 : __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f)); -; 2090 : __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); -; 2091 : __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); -; 2092 : __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f)); -; 2093 : __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f)); -; 2094 : __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f)); -; 2095 : __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f)); -; 2096 : -; 2097 : // rounding biases in column/row passes, see stbi__idct_block for explanation. -; 2098 : __m128i bias_0 = _mm_set1_epi32(512); -; 2099 : __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17)); -; 2100 : -; 2101 : // load -; 2102 : row0 = _mm_load_si128((const __m128i*) (data + 0 * 8)); -; 2103 : row1 = _mm_load_si128((const __m128i*) (data + 1 * 8)); -; 2104 : row2 = _mm_load_si128((const __m128i*) (data + 2 * 8)); -; 2105 : row3 = _mm_load_si128((const __m128i*) (data + 3 * 8)); -; 2106 : row4 = _mm_load_si128((const __m128i*) (data + 4 * 8)); -; 2107 : row5 = _mm_load_si128((const __m128i*) (data + 5 * 8)); -; 2108 : row6 = _mm_load_si128((const __m128i*) (data + 6 * 8)); -; 2109 : row7 = _mm_load_si128((const __m128i*) (data + 7 * 8)); -; 2110 : -; 2111 : // column pass -; 2112 : dct_pass(bias_0, 10); -; 2113 : -; 2114 : { -; 2115 : // 16bit 8x8 transpose pass 1 -; 2116 : dct_interleave16(row0, row4); -; 2117 : dct_interleave16(row1, row5); -; 2118 : dct_interleave16(row2, row6); -; 2119 : dct_interleave16(row3, row7); -; 2120 : -; 2121 : // transpose pass 2 -; 2122 : dct_interleave16(row0, row2); -; 2123 : dct_interleave16(row1, row3); -; 2124 : dct_interleave16(row4, row6); -; 2125 : dct_interleave16(row5, row7); -; 2126 : -; 2127 : // transpose pass 3 -; 2128 : dct_interleave16(row0, row1); -; 2129 : dct_interleave16(row2, row3); -; 2130 : dct_interleave16(row4, row5); -; 2131 : dct_interleave16(row6, row7); -; 2132 : } -; 2133 : -; 2134 : // row pass -; 2135 : dct_pass(bias_1, 17); -; 2136 : -; 2137 : { -; 2138 : // pack -; 2139 : __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 -; 2140 : __m128i p1 = _mm_packus_epi16(row2, row3); -; 2141 : __m128i p2 = _mm_packus_epi16(row4, row5); -; 2142 : __m128i p3 = _mm_packus_epi16(row6, row7); -; 2143 : -; 2144 : // 8bit 8x8 transpose pass 1 -; 2145 : dct_interleave8(p0, p2); // a0e0a1e1... -; 2146 : dct_interleave8(p1, p3); // c0g0c1g1... -; 2147 : -; 2148 : // transpose pass 2 -; 2149 : dct_interleave8(p0, p1); // a0c0e0g0... -; 2150 : dct_interleave8(p2, p3); // b0d0f0h0... -; 2151 : -; 2152 : // transpose pass 3 -; 2153 : dct_interleave8(p0, p2); // a0b0c0d0... -; 2154 : dct_interleave8(p1, p3); // a4b4c4d4... -; 2155 : -; 2156 : // store -; 2157 : _mm_storel_epi64((__m128i*) out, p0); out += out_stride; -; 2158 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; -; 2159 : _mm_storel_epi64((__m128i*) out, p2); out += out_stride; -; 2160 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; -; 2161 : _mm_storel_epi64((__m128i*) out, p1); out += out_stride; -; 2162 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; -; 2163 : _mm_storel_epi64((__m128i*) out, p3); out += out_stride; -; 2164 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e)); -; 2165 : } -; 2166 : -; 2167 : #undef dct_const -; 2168 : #undef dct_rot -; 2169 : #undef dct_widen -; 2170 : #undef dct_wadd -; 2171 : #undef dct_wsub -; 2172 : #undef dct_bfly32o -; 2173 : #undef dct_interleave8 -; 2174 : #undef dct_interleave16 -; 2175 : #undef dct_pass -; 2176 : } -; 2177 : -; 2178 : #endif // STBI_SSE2 -; 2179 : -; 2180 : #ifdef STBI_NEON -; 2181 : -; 2182 : // NEON integer IDCT. should produce bit-identical -; 2183 : // results to the generic C version. -; 2184 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2185 : { -; 2186 : int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; -; 2187 : -; 2188 : int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); -; 2189 : int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); -; 2190 : int16x4_t rot0_2 = vdup_n_s16(stbi__f2f(0.765366865f)); -; 2191 : int16x4_t rot1_0 = vdup_n_s16(stbi__f2f(1.175875602f)); -; 2192 : int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); -; 2193 : int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); -; 2194 : int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); -; 2195 : int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); -; 2196 : int16x4_t rot3_0 = vdup_n_s16(stbi__f2f(0.298631336f)); -; 2197 : int16x4_t rot3_1 = vdup_n_s16(stbi__f2f(2.053119869f)); -; 2198 : int16x4_t rot3_2 = vdup_n_s16(stbi__f2f(3.072711026f)); -; 2199 : int16x4_t rot3_3 = vdup_n_s16(stbi__f2f(1.501321110f)); -; 2200 : -; 2201 : #define dct_long_mul(out, inq, coeff) \ -; 2202 : int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ -; 2203 : int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) -; 2204 : -; 2205 : #define dct_long_mac(out, acc, inq, coeff) \ -; 2206 : int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ -; 2207 : int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) -; 2208 : -; 2209 : #define dct_widen(out, inq) \ -; 2210 : int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ -; 2211 : int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) -; 2212 : -; 2213 : // wide add -; 2214 : #define dct_wadd(out, a, b) \ -; 2215 : int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ -; 2216 : int32x4_t out##_h = vaddq_s32(a##_h, b##_h) -; 2217 : -; 2218 : // wide sub -; 2219 : #define dct_wsub(out, a, b) \ -; 2220 : int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ -; 2221 : int32x4_t out##_h = vsubq_s32(a##_h, b##_h) -; 2222 : -; 2223 : // butterfly a/b, then shift using "shiftop" by "s" and pack -; 2224 : #define dct_bfly32o(out0,out1, a,b,shiftop,s) \ -; 2225 : { \ -; 2226 : dct_wadd(sum, a, b); \ -; 2227 : dct_wsub(dif, a, b); \ -; 2228 : out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ -; 2229 : out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ -; 2230 : } -; 2231 : -; 2232 : #define dct_pass(shiftop, shift) \ -; 2233 : { \ -; 2234 : /* even part */ \ -; 2235 : int16x8_t sum26 = vaddq_s16(row2, row6); \ -; 2236 : dct_long_mul(p1e, sum26, rot0_0); \ -; 2237 : dct_long_mac(t2e, p1e, row6, rot0_1); \ -; 2238 : dct_long_mac(t3e, p1e, row2, rot0_2); \ -; 2239 : int16x8_t sum04 = vaddq_s16(row0, row4); \ -; 2240 : int16x8_t dif04 = vsubq_s16(row0, row4); \ -; 2241 : dct_widen(t0e, sum04); \ -; 2242 : dct_widen(t1e, dif04); \ -; 2243 : dct_wadd(x0, t0e, t3e); \ -; 2244 : dct_wsub(x3, t0e, t3e); \ -; 2245 : dct_wadd(x1, t1e, t2e); \ -; 2246 : dct_wsub(x2, t1e, t2e); \ -; 2247 : /* odd part */ \ -; 2248 : int16x8_t sum15 = vaddq_s16(row1, row5); \ -; 2249 : int16x8_t sum17 = vaddq_s16(row1, row7); \ -; 2250 : int16x8_t sum35 = vaddq_s16(row3, row5); \ -; 2251 : int16x8_t sum37 = vaddq_s16(row3, row7); \ -; 2252 : int16x8_t sumodd = vaddq_s16(sum17, sum35); \ -; 2253 : dct_long_mul(p5o, sumodd, rot1_0); \ -; 2254 : dct_long_mac(p1o, p5o, sum17, rot1_1); \ -; 2255 : dct_long_mac(p2o, p5o, sum35, rot1_2); \ -; 2256 : dct_long_mul(p3o, sum37, rot2_0); \ -; 2257 : dct_long_mul(p4o, sum15, rot2_1); \ -; 2258 : dct_wadd(sump13o, p1o, p3o); \ -; 2259 : dct_wadd(sump24o, p2o, p4o); \ -; 2260 : dct_wadd(sump23o, p2o, p3o); \ -; 2261 : dct_wadd(sump14o, p1o, p4o); \ -; 2262 : dct_long_mac(x4, sump13o, row7, rot3_0); \ -; 2263 : dct_long_mac(x5, sump24o, row5, rot3_1); \ -; 2264 : dct_long_mac(x6, sump23o, row3, rot3_2); \ -; 2265 : dct_long_mac(x7, sump14o, row1, rot3_3); \ -; 2266 : dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ -; 2267 : dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ -; 2268 : dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ -; 2269 : dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ -; 2270 : } -; 2271 : -; 2272 : // load -; 2273 : row0 = vld1q_s16(data + 0 * 8); -; 2274 : row1 = vld1q_s16(data + 1 * 8); -; 2275 : row2 = vld1q_s16(data + 2 * 8); -; 2276 : row3 = vld1q_s16(data + 3 * 8); -; 2277 : row4 = vld1q_s16(data + 4 * 8); -; 2278 : row5 = vld1q_s16(data + 5 * 8); -; 2279 : row6 = vld1q_s16(data + 6 * 8); -; 2280 : row7 = vld1q_s16(data + 7 * 8); -; 2281 : -; 2282 : // add DC bias -; 2283 : row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); -; 2284 : -; 2285 : // column pass -; 2286 : dct_pass(vrshrn_n_s32, 10); -; 2287 : -; 2288 : // 16bit 8x8 transpose -; 2289 : { -; 2290 : // these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -; 2291 : // whether compilers actually get this is another story, sadly. -; 2292 : #define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -; 2293 : #define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -; 2294 : #define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } -; 2295 : -; 2296 : // pass 1 -; 2297 : dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 -; 2298 : dct_trn16(row2, row3); -; 2299 : dct_trn16(row4, row5); -; 2300 : dct_trn16(row6, row7); -; 2301 : -; 2302 : // pass 2 -; 2303 : dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 -; 2304 : dct_trn32(row1, row3); -; 2305 : dct_trn32(row4, row6); -; 2306 : dct_trn32(row5, row7); -; 2307 : -; 2308 : // pass 3 -; 2309 : dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 -; 2310 : dct_trn64(row1, row5); -; 2311 : dct_trn64(row2, row6); -; 2312 : dct_trn64(row3, row7); -; 2313 : -; 2314 : #undef dct_trn16 -; 2315 : #undef dct_trn32 -; 2316 : #undef dct_trn64 -; 2317 : } -; 2318 : -; 2319 : // row pass -; 2320 : // vrshrn_n_s32 only supports shifts up to 16, we need -; 2321 : // 17. so do a non-rounding shift of 16 first then follow -; 2322 : // up with a rounding shift by 1. -; 2323 : dct_pass(vshrn_n_s32, 16); -; 2324 : -; 2325 : { -; 2326 : // pack and round -; 2327 : uint8x8_t p0 = vqrshrun_n_s16(row0, 1); -; 2328 : uint8x8_t p1 = vqrshrun_n_s16(row1, 1); -; 2329 : uint8x8_t p2 = vqrshrun_n_s16(row2, 1); -; 2330 : uint8x8_t p3 = vqrshrun_n_s16(row3, 1); -; 2331 : uint8x8_t p4 = vqrshrun_n_s16(row4, 1); -; 2332 : uint8x8_t p5 = vqrshrun_n_s16(row5, 1); -; 2333 : uint8x8_t p6 = vqrshrun_n_s16(row6, 1); -; 2334 : uint8x8_t p7 = vqrshrun_n_s16(row7, 1); -; 2335 : -; 2336 : // again, these can translate into one instruction, but often don't. -; 2337 : #define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -; 2338 : #define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -; 2339 : #define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } -; 2340 : -; 2341 : // sadly can't use interleaved stores here since we only write -; 2342 : // 8 bytes to each scan line! -; 2343 : -; 2344 : // 8x8 8-bit transpose pass 1 -; 2345 : dct_trn8_8(p0, p1); -; 2346 : dct_trn8_8(p2, p3); -; 2347 : dct_trn8_8(p4, p5); -; 2348 : dct_trn8_8(p6, p7); -; 2349 : -; 2350 : // pass 2 -; 2351 : dct_trn8_16(p0, p2); -; 2352 : dct_trn8_16(p1, p3); -; 2353 : dct_trn8_16(p4, p6); -; 2354 : dct_trn8_16(p5, p7); -; 2355 : -; 2356 : // pass 3 -; 2357 : dct_trn8_32(p0, p4); -; 2358 : dct_trn8_32(p1, p5); -; 2359 : dct_trn8_32(p2, p6); -; 2360 : dct_trn8_32(p3, p7); -; 2361 : -; 2362 : // store -; 2363 : vst1_u8(out, p0); out += out_stride; -; 2364 : vst1_u8(out, p1); out += out_stride; -; 2365 : vst1_u8(out, p2); out += out_stride; -; 2366 : vst1_u8(out, p3); out += out_stride; -; 2367 : vst1_u8(out, p4); out += out_stride; -; 2368 : vst1_u8(out, p5); out += out_stride; -; 2369 : vst1_u8(out, p6); out += out_stride; -; 2370 : vst1_u8(out, p7); -; 2371 : -; 2372 : #undef dct_trn8_8 -; 2373 : #undef dct_trn8_16 -; 2374 : #undef dct_trn8_32 -; 2375 : } -; 2376 : -; 2377 : #undef dct_long_mul -; 2378 : #undef dct_long_mac -; 2379 : #undef dct_widen -; 2380 : #undef dct_wadd -; 2381 : #undef dct_wsub -; 2382 : #undef dct_bfly32o -; 2383 : #undef dct_pass -; 2384 : } -; 2385 : -; 2386 : #endif // STBI_NEON -; 2387 : -; 2388 : #define STBI__MARKER_none 0xff -; 2389 : // if there's a pending marker from the entropy stream, return that -; 2390 : // otherwise, fetch from the stream and get a marker. if there's no -; 2391 : // marker, return 0xff, which is never a valid marker value -; 2392 : static stbi_uc stbi__get_marker(stbi__jpeg* j) -; 2393 : { -; 2394 : stbi_uc x; -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } -; 2396 : x = stbi__get8(j->s); -; 2397 : if (x != 0xff) return STBI__MARKER_none; -; 2398 : while (x == 0xff) -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes -; 2400 : return x; -; 2401 : } -; 2402 : -; 2403 : // in each scan, we'll have scan_n components, and the order -; 2404 : // of the components is specified by order[] -; 2405 : #define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) -; 2406 : -; 2407 : // after a restart interval, stbi__jpeg_reset the entropy decoder and -; 2408 : // the dc prediction -; 2409 : static void stbi__jpeg_reset(stbi__jpeg* j) -; 2410 : { -; 2411 : j->code_bits = 0; -; 2412 : j->code_buffer = 0; -; 2413 : j->nomore = 0; -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; -; 2417 : j->eob_run = 0; -; 2418 : // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, -; 2419 : // since we don't even allow 1<<30 pixels -; 2420 : } -; 2421 : -; 2422 : static int stbi__parse_entropy_coded_data(stbi__jpeg* z) -; 2423 : { -; 2424 : stbi__jpeg_reset(z); -; 2425 : if (!z->progressive) { -; 2426 : if (z->scan_n == 1) { -; 2427 : int i, j; -; 2428 : STBI_SIMD_ALIGN(short, data[64]); -; 2429 : int n = z->order[0]; -; 2430 : // non-interleaved data, we just need to process one block at a time, -; 2431 : // in trivial scanline order -; 2432 : // number of blocks to do just depends on how many actual "pixels" this -; 2433 : // component has, independent of interleaved MCU blocking and such -; 2434 : int w = (z->img_comp[n].x + 7) >> 3; -; 2435 : int h = (z->img_comp[n].y + 7) >> 3; -; 2436 : for (j = 0; j < h; ++j) { -; 2437 : for (i = 0; i < w; ++i) { -; 2438 : int ha = z->img_comp[n].ha; -; 2439 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2440 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2441 : // every data block is an MCU, so countdown the restart interval -; 2442 : if (--z->todo <= 0) { -; 2443 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2444 : // if it's NOT a restart, then just bail, so we get corrupt data -; 2445 : // rather than no data -; 2446 : if (!STBI__RESTART(z->marker)) return 1; -; 2447 : stbi__jpeg_reset(z); -; 2448 : } -; 2449 : } -; 2450 : } -; 2451 : return 1; -; 2452 : } -; 2453 : else { // interleaved -; 2454 : int i, j, k, x, y; -; 2455 : STBI_SIMD_ALIGN(short, data[64]); -; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2458 : // scan an interleaved mcu... process scan_n components in order -; 2459 : for (k = 0; k < z->scan_n; ++k) { -; 2460 : int n = z->order[k]; -; 2461 : // scan out an mcu's worth of this component; that's just determined -; 2462 : // by the basic H and V specified for the component -; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2464 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2465 : int x2 = (i * z->img_comp[n].h + x) * 8; -; 2466 : int y2 = (j * z->img_comp[n].v + y) * 8; -; 2467 : int ha = z->img_comp[n].ha; -; 2468 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2469 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); -; 2470 : } -; 2471 : } -; 2472 : } -; 2473 : // after all interleaved components, that's an interleaved MCU, -; 2474 : // so now count down the restart interval -; 2475 : if (--z->todo <= 0) { -; 2476 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2477 : if (!STBI__RESTART(z->marker)) return 1; -; 2478 : stbi__jpeg_reset(z); -; 2479 : } -; 2480 : } -; 2481 : } -; 2482 : return 1; -; 2483 : } -; 2484 : } -; 2485 : else { -; 2486 : if (z->scan_n == 1) { -; 2487 : int i, j; -; 2488 : int n = z->order[0]; -; 2489 : // non-interleaved data, we just need to process one block at a time, -; 2490 : // in trivial scanline order -; 2491 : // number of blocks to do just depends on how many actual "pixels" this -; 2492 : // component has, independent of interleaved MCU blocking and such -; 2493 : int w = (z->img_comp[n].x + 7) >> 3; -; 2494 : int h = (z->img_comp[n].y + 7) >> 3; -; 2495 : for (j = 0; j < h; ++j) { -; 2496 : for (i = 0; i < w; ++i) { -; 2497 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2498 : if (z->spec_start == 0) { -; 2499 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2500 : return 0; -; 2501 : } -; 2502 : else { -; 2503 : int ha = z->img_comp[n].ha; -; 2504 : if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) -; 2505 : return 0; -; 2506 : } -; 2507 : // every data block is an MCU, so countdown the restart interval -; 2508 : if (--z->todo <= 0) { -; 2509 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2510 : if (!STBI__RESTART(z->marker)) return 1; -; 2511 : stbi__jpeg_reset(z); -; 2512 : } -; 2513 : } -; 2514 : } -; 2515 : return 1; -; 2516 : } -; 2517 : else { // interleaved -; 2518 : int i, j, k, x, y; -; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2521 : // scan an interleaved mcu... process scan_n components in order -; 2522 : for (k = 0; k < z->scan_n; ++k) { -; 2523 : int n = z->order[k]; -; 2524 : // scan out an mcu's worth of this component; that's just determined -; 2525 : // by the basic H and V specified for the component -; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2528 : int x2 = (i * z->img_comp[n].h + x); -; 2529 : int y2 = (j * z->img_comp[n].v + y); -; 2530 : short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); -; 2531 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2532 : return 0; -; 2533 : } -; 2534 : } -; 2535 : } -; 2536 : // after all interleaved components, that's an interleaved MCU, -; 2537 : // so now count down the restart interval -; 2538 : if (--z->todo <= 0) { -; 2539 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2540 : if (!STBI__RESTART(z->marker)) return 1; -; 2541 : stbi__jpeg_reset(z); -; 2542 : } -; 2543 : } -; 2544 : } -; 2545 : return 1; -; 2546 : } -; 2547 : } -; 2548 : } -; 2549 : -; 2550 : static void stbi__jpeg_dequantize(short* data, stbi__uint16* dequant) -; 2551 : { -; 2552 : int i; -; 2553 : for (i = 0; i < 64; ++i) -; 2554 : data[i] *= dequant[i]; -; 2555 : } -; 2556 : -; 2557 : static void stbi__jpeg_finish(stbi__jpeg* z) -; 2558 : { -; 2559 : if (z->progressive) { -; 2560 : // dequantize and idct the data -; 2561 : int i, j, n; -; 2562 : for (n = 0; n < z->s->img_n; ++n) { -; 2563 : int w = (z->img_comp[n].x + 7) >> 3; -; 2564 : int h = (z->img_comp[n].y + 7) >> 3; -; 2565 : for (j = 0; j < h; ++j) { -; 2566 : for (i = 0; i < w; ++i) { -; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2568 : stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); -; 2569 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2570 : } -; 2571 : } -; 2572 : } -; 2573 : } -; 2574 : } -; 2575 : -; 2576 : static int stbi__process_marker(stbi__jpeg* z, int m) -; 2577 : { -; 2578 : int L; -; 2579 : switch (m) { -; 2580 : case STBI__MARKER_none: // no marker found -; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); -; 2582 : -; 2583 : case 0xDD: // DRI - specify restart interval -; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); -; 2585 : z->restart_interval = stbi__get16be(z->s); -; 2586 : return 1; -; 2587 : -; 2588 : case 0xDB: // DQT - define quantization table -; 2589 : L = stbi__get16be(z->s) - 2; -; 2590 : while (L > 0) { -; 2591 : int q = stbi__get8(z->s); -; 2592 : int p = q >> 4, sixteen = (p != 0); -; 2593 : int t = q & 15, i; -; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); -; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); -; 2596 : -; 2597 : for (i = 0; i < 64; ++i) -; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); -; 2599 : L -= (sixteen ? 129 : 65); -; 2600 : } -; 2601 : return L == 0; -; 2602 : -; 2603 : case 0xC4: // DHT - define huffman table -; 2604 : L = stbi__get16be(z->s) - 2; -; 2605 : while (L > 0) { -; 2606 : stbi_uc* v; -; 2607 : int sizes[16], i, n = 0; -; 2608 : int q = stbi__get8(z->s); -; 2609 : int tc = q >> 4; -; 2610 : int th = q & 15; -; 2611 : if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG"); -; 2612 : for (i = 0; i < 16; ++i) { -; 2613 : sizes[i] = stbi__get8(z->s); -; 2614 : n += sizes[i]; -; 2615 : } -; 2616 : if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values! -; 2617 : L -= 17; -; 2618 : if (tc == 0) { -; 2619 : if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0; -; 2620 : v = z->huff_dc[th].values; -; 2621 : } -; 2622 : else { -; 2623 : if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0; -; 2624 : v = z->huff_ac[th].values; -; 2625 : } -; 2626 : for (i = 0; i < n; ++i) -; 2627 : v[i] = stbi__get8(z->s); -; 2628 : if (tc != 0) -; 2629 : stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); -; 2630 : L -= n; -; 2631 : } -; 2632 : return L == 0; -; 2633 : } -; 2634 : -; 2635 : // check for comment block or APP blocks -; 2636 : if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { -; 2637 : L = stbi__get16be(z->s); -; 2638 : if (L < 2) { -; 2639 : if (m == 0xFE) -; 2640 : return stbi__err("bad COM len", "Corrupt JPEG"); -; 2641 : else -; 2642 : return stbi__err("bad APP len", "Corrupt JPEG"); -; 2643 : } -; 2644 : L -= 2; -; 2645 : -; 2646 : if (m == 0xE0 && L >= 5) { // JFIF APP0 segment -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) -; 2652 : ok = 0; -; 2653 : L -= 5; -; 2654 : if (ok) -; 2655 : z->jfif = 1; -; 2656 : } -; 2657 : else if (m == 0xEE && L >= 12) { // Adobe APP14 segment -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) -; 2663 : ok = 0; -; 2664 : L -= 6; -; 2665 : if (ok) { -; 2666 : stbi__get8(z->s); // version -; 2667 : stbi__get16be(z->s); // flags0 -; 2668 : stbi__get16be(z->s); // flags1 -; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform -; 2670 : L -= 6; -; 2671 : } -; 2672 : } -; 2673 : -; 2674 : stbi__skip(z->s, L); -; 2675 : return 1; -; 2676 : } -; 2677 : -; 2678 : return stbi__err("unknown marker", "Corrupt JPEG"); -; 2679 : } -; 2680 : -; 2681 : // after we see SOS -; 2682 : static int stbi__process_scan_header(stbi__jpeg* z) -; 2683 : { -; 2684 : int i; -; 2685 : int Ls = stbi__get16be(z->s); -; 2686 : z->scan_n = stbi__get8(z->s); -; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); -; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); -; 2689 : for (i = 0; i < z->scan_n; ++i) { -; 2690 : int id = stbi__get8(z->s), which; -; 2691 : int q = stbi__get8(z->s); -; 2692 : for (which = 0; which < z->s->img_n; ++which) -; 2693 : if (z->img_comp[which].id == id) -; 2694 : break; -; 2695 : if (which == z->s->img_n) return 0; // no match -; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); -; 2698 : z->order[i] = which; -; 2699 : } -; 2700 : -; 2701 : { -; 2702 : int aa; -; 2703 : z->spec_start = stbi__get8(z->s); -; 2704 : z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 -; 2705 : aa = stbi__get8(z->s); -; 2706 : z->succ_high = (aa >> 4); -; 2707 : z->succ_low = (aa & 15); -; 2708 : if (z->progressive) { -; 2709 : if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) -; 2710 : return stbi__err("bad SOS", "Corrupt JPEG"); -; 2711 : } -; 2712 : else { -; 2713 : if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2714 : if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2715 : z->spec_end = 63; -; 2716 : } -; 2717 : } -; 2718 : -; 2719 : return 1; -; 2720 : } -; 2721 : -; 2722 : static int stbi__free_jpeg_components(stbi__jpeg* z, int ncomp, int why) -; 2723 : { -; 2724 : int i; -; 2725 : for (i = 0; i < ncomp; ++i) { -; 2726 : if (z->img_comp[i].raw_data) { -; 2727 : STBI_FREE(z->img_comp[i].raw_data); -; 2728 : z->img_comp[i].raw_data = NULL; -; 2729 : z->img_comp[i].data = NULL; -; 2730 : } -; 2731 : if (z->img_comp[i].raw_coeff) { -; 2732 : STBI_FREE(z->img_comp[i].raw_coeff); -; 2733 : z->img_comp[i].raw_coeff = 0; -; 2734 : z->img_comp[i].coeff = 0; -; 2735 : } -; 2736 : if (z->img_comp[i].linebuf) { -; 2737 : STBI_FREE(z->img_comp[i].linebuf); -; 2738 : z->img_comp[i].linebuf = NULL; -; 2739 : } -; 2740 : } -; 2741 : return why; -; 2742 : } -; 2743 : -; 2744 : static int stbi__process_frame_header(stbi__jpeg* z, int scan) -; 2745 : { -; 2746 : stbi__context* s = z->s; -; 2747 : int Lf, p, i, q, h_max = 1, v_max = 1, c; -; 2748 : Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG -; 2749 : p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline -; 2750 : s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG -; 2751 : s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires -; 2752 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2753 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2754 : c = stbi__get8(s); -; 2755 : if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG"); -; 2756 : s->img_n = c; -; 2757 : for (i = 0; i < c; ++i) { -; 2758 : z->img_comp[i].data = NULL; -; 2759 : z->img_comp[i].linebuf = NULL; -; 2760 : } -; 2761 : -; 2762 : if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG"); -; 2763 : -; 2764 : z->rgb = 0; -; 2765 : for (i = 0; i < s->img_n; ++i) { -; 2766 : static const unsigned char rgb[3] = { 'R', 'G', 'B' }; -; 2767 : z->img_comp[i].id = stbi__get8(s); -; 2768 : if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) -; 2769 : ++z->rgb; -; 2770 : q = stbi__get8(s); -; 2771 : z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H", "Corrupt JPEG"); -; 2772 : z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V", "Corrupt JPEG"); -; 2773 : z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ", "Corrupt JPEG"); -; 2774 : } -; 2775 : -; 2776 : if (scan != STBI__SCAN_load) return 1; -; 2777 : -; 2778 : if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); -; 2779 : -; 2780 : for (i = 0; i < s->img_n; ++i) { -; 2781 : if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; -; 2782 : if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; -; 2783 : } -; 2784 : -; 2785 : // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios -; 2786 : // and I've never seen a non-corrupted JPEG file actually use them -; 2787 : for (i = 0; i < s->img_n; ++i) { -; 2788 : if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG"); -; 2789 : if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG"); -; 2790 : } -; 2791 : -; 2792 : // compute interleaved mcu info -; 2793 : z->img_h_max = h_max; -; 2794 : z->img_v_max = v_max; -; 2795 : z->img_mcu_w = h_max * 8; -; 2796 : z->img_mcu_h = v_max * 8; -; 2797 : // these sizes can't be more than 17 bits -; 2798 : z->img_mcu_x = (s->img_x + z->img_mcu_w - 1) / z->img_mcu_w; -; 2799 : z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h; -; 2800 : -; 2801 : for (i = 0; i < s->img_n; ++i) { -; 2802 : // number of effective pixels (e.g. for non-interleaved MCU) -; 2803 : z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max - 1) / h_max; -; 2804 : z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max - 1) / v_max; -; 2805 : // to simplify generation, we'll allocate enough memory to decode -; 2806 : // the bogus oversized data from using interleaved MCUs and their -; 2807 : // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't -; 2808 : // discard the extra data until colorspace conversion -; 2809 : // -; 2810 : // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) -; 2811 : // so these muls can't overflow with 32-bit ints (which we require) -; 2812 : z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; -; 2813 : z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; -; 2814 : z->img_comp[i].coeff = 0; -; 2815 : z->img_comp[i].raw_coeff = 0; -; 2816 : z->img_comp[i].linebuf = NULL; -; 2817 : z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); -; 2818 : if (z->img_comp[i].raw_data == NULL) -; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2820 : // align blocks for idct using mmx/sse -; 2821 : z->img_comp[i].data = (stbi_uc*)(((size_t)z->img_comp[i].raw_data + 15) & ~15); -; 2822 : if (z->progressive) { -; 2823 : // w2, h2 are multiples of 8 (see above) -; 2824 : z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; -; 2825 : z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; -; 2826 : z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); -; 2827 : if (z->img_comp[i].raw_coeff == NULL) -; 2828 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2829 : z->img_comp[i].coeff = (short*)(((size_t)z->img_comp[i].raw_coeff + 15) & ~15); -; 2830 : } -; 2831 : } -; 2832 : -; 2833 : return 1; -; 2834 : } -; 2835 : -; 2836 : // use comparisons since in some cases we handle more than one case (e.g. SOF) -; 2837 : #define stbi__DNL(x) ((x) == 0xdc) -; 2838 : #define stbi__SOI(x) ((x) == 0xd8) -; 2839 : #define stbi__EOI(x) ((x) == 0xd9) -; 2840 : #define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) -; 2841 : #define stbi__SOS(x) ((x) == 0xda) -; 2842 : -; 2843 : #define stbi__SOF_progressive(x) ((x) == 0xc2) -; 2844 : -; 2845 : static int stbi__decode_jpeg_header(stbi__jpeg* z, int scan) -; 2846 : { -; 2847 : int m; -; 2848 : z->jfif = 0; -; 2849 : z->app14_color_transform = -1; // valid values are 0,1,2 -; 2850 : z->marker = STBI__MARKER_none; // initialize cached marker to empty -; 2851 : m = stbi__get_marker(z); -; 2852 : if (!stbi__SOI(m)) return stbi__err("no SOI", "Corrupt JPEG"); -; 2853 : if (scan == STBI__SCAN_type) return 1; -; 2854 : m = stbi__get_marker(z); -; 2855 : while (!stbi__SOF(m)) { -; 2856 : if (!stbi__process_marker(z, m)) return 0; -; 2857 : m = stbi__get_marker(z); -; 2858 : while (m == STBI__MARKER_none) { -; 2859 : // some files have extra padding after their blocks, so ok, we'll scan -; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); -; 2861 : m = stbi__get_marker(z); -; 2862 : } -; 2863 : } -; 2864 : z->progressive = stbi__SOF_progressive(m); -; 2865 : if (!stbi__process_frame_header(z, scan)) return 0; -; 2866 : return 1; -; 2867 : } -; 2868 : -; 2869 : static int stbi__skip_jpeg_junk_at_end(stbi__jpeg* j) -; 2870 : { -; 2871 : // some JPEGs have junk at end, skip over it but if we find what looks -; 2872 : // like a valid marker, resume there -; 2873 : while (!stbi__at_eof(j->s)) { -; 2874 : int x = stbi__get8(j->s); -; 2875 : while (x == 255) { // might be a marker -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; -; 2877 : x = stbi__get8(j->s); -; 2878 : if (x != 0x00 && x != 0xff) { -; 2879 : // not a stuffed zero or lead-in to another marker, looks -; 2880 : // like an actual marker, return it -; 2881 : return x; -; 2882 : } -; 2883 : // stuffed zero has x=0 now which ends the loop, meaning we go -; 2884 : // back to regular scan loop. -; 2885 : // repeated 0xff keeps trying to read the next byte of the marker. -; 2886 : } -; 2887 : } -; 2888 : return STBI__MARKER_none; -; 2889 : } -; 2890 : -; 2891 : // decode image to YCbCr format -; 2892 : static int stbi__decode_jpeg_image(stbi__jpeg* j) -; 2893 : { -; 2894 : int m; -; 2895 : for (m = 0; m < 4; m++) { -; 2896 : j->img_comp[m].raw_data = NULL; -; 2897 : j->img_comp[m].raw_coeff = NULL; -; 2898 : } -; 2899 : j->restart_interval = 0; -; 2900 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; -; 2901 : m = stbi__get_marker(j); -; 2902 : while (!stbi__EOI(m)) { -; 2903 : if (stbi__SOS(m)) { -; 2904 : if (!stbi__process_scan_header(j)) return 0; -; 2905 : if (!stbi__parse_entropy_coded_data(j)) return 0; -; 2906 : if (j->marker == STBI__MARKER_none) { -; 2907 : j->marker = stbi__skip_jpeg_junk_at_end(j); -; 2908 : // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 -; 2909 : } -; 2910 : m = stbi__get_marker(j); -; 2911 : if (STBI__RESTART(m)) -; 2912 : m = stbi__get_marker(j); -; 2913 : } -; 2914 : else if (stbi__DNL(m)) { -; 2915 : int Ld = stbi__get16be(j->s); -; 2916 : stbi__uint32 NL = stbi__get16be(j->s); -; 2917 : if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); -; 2918 : if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); -; 2919 : m = stbi__get_marker(j); -; 2920 : } -; 2921 : else { -; 2922 : if (!stbi__process_marker(j, m)) return 1; -; 2923 : m = stbi__get_marker(j); -; 2924 : } -; 2925 : } -; 2926 : if (j->progressive) -; 2927 : stbi__jpeg_finish(j); -; 2928 : return 1; -; 2929 : } -; 2930 : -; 2931 : // static jfif-centered resampling (across block boundaries) -; 2932 : -; 2933 : typedef stbi_uc* (*resample_row_func)(stbi_uc* out, stbi_uc* in0, stbi_uc* in1, -; 2934 : int w, int hs); -; 2935 : -; 2936 : #define stbi__div4(x) ((stbi_uc) ((x) >> 2)) -; 2937 : -; 2938 : static stbi_uc* resample_row_1(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2939 : { -; 2940 : STBI_NOTUSED(out); -; 2941 : STBI_NOTUSED(in_far); -; 2942 : STBI_NOTUSED(w); -; 2943 : STBI_NOTUSED(hs); -; 2944 : return in_near; -; 2945 : } -; 2946 : -; 2947 : static stbi_uc* stbi__resample_row_v_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2948 : { -; 2949 : // need to generate two samples vertically for every one in input -; 2950 : int i; -; 2951 : STBI_NOTUSED(hs); -; 2952 : for (i = 0; i < w; ++i) -; 2953 : out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2); -; 2954 : return out; -; 2955 : } -; 2956 : -; 2957 : static stbi_uc* stbi__resample_row_h_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2958 : { -; 2959 : // need to generate two samples horizontally for every one in input -; 2960 : int i; -; 2961 : stbi_uc* input = in_near; -; 2962 : -; 2963 : if (w == 1) { -; 2964 : // if only one sample, can't do any interpolation -; 2965 : out[0] = out[1] = input[0]; -; 2966 : return out; -; 2967 : } -; 2968 : -; 2969 : out[0] = input[0]; -; 2970 : out[1] = stbi__div4(input[0] * 3 + input[1] + 2); -; 2971 : for (i = 1; i < w - 1; ++i) { -; 2972 : int n = 3 * input[i] + 2; -; 2973 : out[i * 2 + 0] = stbi__div4(n + input[i - 1]); -; 2974 : out[i * 2 + 1] = stbi__div4(n + input[i + 1]); -; 2975 : } -; 2976 : out[i * 2 + 0] = stbi__div4(input[w - 2] * 3 + input[w - 1] + 2); -; 2977 : out[i * 2 + 1] = input[w - 1]; -; 2978 : -; 2979 : STBI_NOTUSED(in_far); -; 2980 : STBI_NOTUSED(hs); -; 2981 : -; 2982 : return out; -; 2983 : } -; 2984 : -; 2985 : #define stbi__div16(x) ((stbi_uc) ((x) >> 4)) -; 2986 : -; 2987 : static stbi_uc* stbi__resample_row_hv_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2988 : { -; 2989 : // need to generate 2x2 samples for every one in input -; 2990 : int i, t0, t1; -; 2991 : if (w == 1) { -; 2992 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 2993 : return out; -; 2994 : } -; 2995 : -; 2996 : t1 = 3 * in_near[0] + in_far[0]; -; 2997 : out[0] = stbi__div4(t1 + 2); -; 2998 : for (i = 1; i < w; ++i) { -; 2999 : t0 = t1; -; 3000 : t1 = 3 * in_near[i] + in_far[i]; -; 3001 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3002 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3003 : } -; 3004 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3005 : -; 3006 : STBI_NOTUSED(hs); -; 3007 : -; 3008 : return out; -; 3009 : } -; 3010 : -; 3011 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3012 : static stbi_uc* stbi__resample_row_hv_2_simd(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3013 : { -; 3014 : // need to generate 2x2 samples for every one in input -; 3015 : int i = 0, t0, t1; -; 3016 : -; 3017 : if (w == 1) { -; 3018 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 3019 : return out; -; 3020 : } -; 3021 : -; 3022 : t1 = 3 * in_near[0] + in_far[0]; -; 3023 : // process groups of 8 pixels for as long as we can. -; 3024 : // note we can't handle the last pixel in a row in this loop -; 3025 : // because we need to handle the filter boundary conditions. -; 3026 : for (; i < ((w - 1) & ~7); i += 8) { -; 3027 : #if defined(STBI_SSE2) -; 3028 : // load and perform the vertical filtering pass -; 3029 : // this uses 3*x + y = 4*x + (y - x) -; 3030 : __m128i zero = _mm_setzero_si128(); -; 3031 : __m128i farb = _mm_loadl_epi64((__m128i*) (in_far + i)); -; 3032 : __m128i nearb = _mm_loadl_epi64((__m128i*) (in_near + i)); -; 3033 : __m128i farw = _mm_unpacklo_epi8(farb, zero); -; 3034 : __m128i nearw = _mm_unpacklo_epi8(nearb, zero); -; 3035 : __m128i diff = _mm_sub_epi16(farw, nearw); -; 3036 : __m128i nears = _mm_slli_epi16(nearw, 2); -; 3037 : __m128i curr = _mm_add_epi16(nears, diff); // current row -; 3038 : -; 3039 : // horizontal filter works the same based on shifted vers of current -; 3040 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3041 : // insert the previous pixel value (from t1). -; 3042 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3043 : // of next block of 8 pixels added in. -; 3044 : __m128i prv0 = _mm_slli_si128(curr, 2); -; 3045 : __m128i nxt0 = _mm_srli_si128(curr, 2); -; 3046 : __m128i prev = _mm_insert_epi16(prv0, t1, 0); -; 3047 : __m128i next = _mm_insert_epi16(nxt0, 3 * in_near[i + 8] + in_far[i + 8], 7); -; 3048 : -; 3049 : // horizontal filter, polyphase implementation since it's convenient: -; 3050 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3051 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3052 : // note the shared term. -; 3053 : __m128i bias = _mm_set1_epi16(8); -; 3054 : __m128i curs = _mm_slli_epi16(curr, 2); -; 3055 : __m128i prvd = _mm_sub_epi16(prev, curr); -; 3056 : __m128i nxtd = _mm_sub_epi16(next, curr); -; 3057 : __m128i curb = _mm_add_epi16(curs, bias); -; 3058 : __m128i even = _mm_add_epi16(prvd, curb); -; 3059 : __m128i odd = _mm_add_epi16(nxtd, curb); -; 3060 : -; 3061 : // interleave even and odd pixels, then undo scaling. -; 3062 : __m128i int0 = _mm_unpacklo_epi16(even, odd); -; 3063 : __m128i int1 = _mm_unpackhi_epi16(even, odd); -; 3064 : __m128i de0 = _mm_srli_epi16(int0, 4); -; 3065 : __m128i de1 = _mm_srli_epi16(int1, 4); -; 3066 : -; 3067 : // pack and write output -; 3068 : __m128i outv = _mm_packus_epi16(de0, de1); -; 3069 : _mm_storeu_si128((__m128i*) (out + i * 2), outv); -; 3070 : #elif defined(STBI_NEON) -; 3071 : // load and perform the vertical filtering pass -; 3072 : // this uses 3*x + y = 4*x + (y - x) -; 3073 : uint8x8_t farb = vld1_u8(in_far + i); -; 3074 : uint8x8_t nearb = vld1_u8(in_near + i); -; 3075 : int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); -; 3076 : int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); -; 3077 : int16x8_t curr = vaddq_s16(nears, diff); // current row -; 3078 : -; 3079 : // horizontal filter works the same based on shifted vers of current -; 3080 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3081 : // insert the previous pixel value (from t1). -; 3082 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3083 : // of next block of 8 pixels added in. -; 3084 : int16x8_t prv0 = vextq_s16(curr, curr, 7); -; 3085 : int16x8_t nxt0 = vextq_s16(curr, curr, 1); -; 3086 : int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); -; 3087 : int16x8_t next = vsetq_lane_s16(3 * in_near[i + 8] + in_far[i + 8], nxt0, 7); -; 3088 : -; 3089 : // horizontal filter, polyphase implementation since it's convenient: -; 3090 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3091 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3092 : // note the shared term. -; 3093 : int16x8_t curs = vshlq_n_s16(curr, 2); -; 3094 : int16x8_t prvd = vsubq_s16(prev, curr); -; 3095 : int16x8_t nxtd = vsubq_s16(next, curr); -; 3096 : int16x8_t even = vaddq_s16(curs, prvd); -; 3097 : int16x8_t odd = vaddq_s16(curs, nxtd); -; 3098 : -; 3099 : // undo scaling and round, then store with even/odd phases interleaved -; 3100 : uint8x8x2_t o; -; 3101 : o.val[0] = vqrshrun_n_s16(even, 4); -; 3102 : o.val[1] = vqrshrun_n_s16(odd, 4); -; 3103 : vst2_u8(out + i * 2, o); -; 3104 : #endif -; 3105 : -; 3106 : // "previous" value for next iter -; 3107 : t1 = 3 * in_near[i + 7] + in_far[i + 7]; -; 3108 : } -; 3109 : -; 3110 : t0 = t1; -; 3111 : t1 = 3 * in_near[i] + in_far[i]; -; 3112 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3113 : -; 3114 : for (++i; i < w; ++i) { -; 3115 : t0 = t1; -; 3116 : t1 = 3 * in_near[i] + in_far[i]; -; 3117 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3118 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3119 : } -; 3120 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3121 : -; 3122 : STBI_NOTUSED(hs); -; 3123 : -; 3124 : return out; -; 3125 : } -; 3126 : #endif -; 3127 : -; 3128 : static stbi_uc* stbi__resample_row_generic(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3129 : { -; 3130 : // resample with nearest-neighbor -; 3131 : int i, j; -; 3132 : STBI_NOTUSED(in_far); -; 3133 : for (i = 0; i < w; ++i) -; 3134 : for (j = 0; j < hs; ++j) -; 3135 : out[i * hs + j] = in_near[i]; -; 3136 : return out; -; 3137 : } -; 3138 : -; 3139 : // this is a reduced-precision calculation of YCbCr-to-RGB introduced -; 3140 : // to make sure the code produces the same results in both SIMD and scalar -; 3141 : #define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) -; 3142 : static void stbi__YCbCr_to_RGB_row(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step) -; 3143 : { -; 3144 : int i; -; 3145 : for (i = 0; i < count; ++i) { -; 3146 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3147 : int r, g, b; -; 3148 : int cr = pcr[i] - 128; -; 3149 : int cb = pcb[i] - 128; -; 3150 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3151 : g = y_fixed + (cr * -stbi__float2fixed(0.71414f)) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3152 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3153 : r >>= 20; -; 3154 : g >>= 20; -; 3155 : b >>= 20; -; 3156 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3157 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3158 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3159 : out[0] = (stbi_uc)r; -; 3160 : out[1] = (stbi_uc)g; -; 3161 : out[2] = (stbi_uc)b; -; 3162 : out[3] = 255; -; 3163 : out += step; -; 3164 : } -; 3165 : } -; 3166 : -; 3167 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3168 : static void stbi__YCbCr_to_RGB_simd(stbi_uc* out, stbi_uc const* y, stbi_uc const* pcb, stbi_uc const* pcr, int count, int step) -; 3169 : { -; 3170 : int i = 0; -; 3171 : -; 3172 : #ifdef STBI_SSE2 -; 3173 : // step == 3 is pretty ugly on the final interleave, and i'm not convinced -; 3174 : // it's useful in practice (you wouldn't use it for textures, for example). -; 3175 : // so just accelerate step == 4 case. -; 3176 : if (step == 4) { -; 3177 : // this is a fairly straightforward implementation and not super-optimized. -; 3178 : __m128i signflip = _mm_set1_epi8(-0x80); -; 3179 : __m128i cr_const0 = _mm_set1_epi16((short)(1.40200f * 4096.0f + 0.5f)); -; 3180 : __m128i cr_const1 = _mm_set1_epi16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3181 : __m128i cb_const0 = _mm_set1_epi16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3182 : __m128i cb_const1 = _mm_set1_epi16((short)(1.77200f * 4096.0f + 0.5f)); -; 3183 : __m128i y_bias = _mm_set1_epi8((char)(unsigned char)128); -; 3184 : __m128i xw = _mm_set1_epi16(255); // alpha channel -; 3185 : -; 3186 : for (; i + 7 < count; i += 8) { -; 3187 : // load -; 3188 : __m128i y_bytes = _mm_loadl_epi64((__m128i*) (y + i)); -; 3189 : __m128i cr_bytes = _mm_loadl_epi64((__m128i*) (pcr + i)); -; 3190 : __m128i cb_bytes = _mm_loadl_epi64((__m128i*) (pcb + i)); -; 3191 : __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 -; 3192 : __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 -; 3193 : -; 3194 : // unpack to short (and left-shift cr, cb by 8) -; 3195 : __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); -; 3196 : __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); -; 3197 : __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); -; 3198 : -; 3199 : // color transform -; 3200 : __m128i yws = _mm_srli_epi16(yw, 4); -; 3201 : __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); -; 3202 : __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); -; 3203 : __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); -; 3204 : __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); -; 3205 : __m128i rws = _mm_add_epi16(cr0, yws); -; 3206 : __m128i gwt = _mm_add_epi16(cb0, yws); -; 3207 : __m128i bws = _mm_add_epi16(yws, cb1); -; 3208 : __m128i gws = _mm_add_epi16(gwt, cr1); -; 3209 : -; 3210 : // descale -; 3211 : __m128i rw = _mm_srai_epi16(rws, 4); -; 3212 : __m128i bw = _mm_srai_epi16(bws, 4); -; 3213 : __m128i gw = _mm_srai_epi16(gws, 4); -; 3214 : -; 3215 : // back to byte, set up for transpose -; 3216 : __m128i brb = _mm_packus_epi16(rw, bw); -; 3217 : __m128i gxb = _mm_packus_epi16(gw, xw); -; 3218 : -; 3219 : // transpose to interleave channels -; 3220 : __m128i t0 = _mm_unpacklo_epi8(brb, gxb); -; 3221 : __m128i t1 = _mm_unpackhi_epi8(brb, gxb); -; 3222 : __m128i o0 = _mm_unpacklo_epi16(t0, t1); -; 3223 : __m128i o1 = _mm_unpackhi_epi16(t0, t1); -; 3224 : -; 3225 : // store -; 3226 : _mm_storeu_si128((__m128i*) (out + 0), o0); -; 3227 : _mm_storeu_si128((__m128i*) (out + 16), o1); -; 3228 : out += 32; -; 3229 : } -; 3230 : } -; 3231 : #endif -; 3232 : -; 3233 : #ifdef STBI_NEON -; 3234 : // in this version, step=3 support would be easy to add. but is there demand? -; 3235 : if (step == 4) { -; 3236 : // this is a fairly straightforward implementation and not super-optimized. -; 3237 : uint8x8_t signflip = vdup_n_u8(0x80); -; 3238 : int16x8_t cr_const0 = vdupq_n_s16((short)(1.40200f * 4096.0f + 0.5f)); -; 3239 : int16x8_t cr_const1 = vdupq_n_s16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3240 : int16x8_t cb_const0 = vdupq_n_s16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3241 : int16x8_t cb_const1 = vdupq_n_s16((short)(1.77200f * 4096.0f + 0.5f)); -; 3242 : -; 3243 : for (; i + 7 < count; i += 8) { -; 3244 : // load -; 3245 : uint8x8_t y_bytes = vld1_u8(y + i); -; 3246 : uint8x8_t cr_bytes = vld1_u8(pcr + i); -; 3247 : uint8x8_t cb_bytes = vld1_u8(pcb + i); -; 3248 : int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); -; 3249 : int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); -; 3250 : -; 3251 : // expand to s16 -; 3252 : int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); -; 3253 : int16x8_t crw = vshll_n_s8(cr_biased, 7); -; 3254 : int16x8_t cbw = vshll_n_s8(cb_biased, 7); -; 3255 : -; 3256 : // color transform -; 3257 : int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); -; 3258 : int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); -; 3259 : int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); -; 3260 : int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); -; 3261 : int16x8_t rws = vaddq_s16(yws, cr0); -; 3262 : int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); -; 3263 : int16x8_t bws = vaddq_s16(yws, cb1); -; 3264 : -; 3265 : // undo scaling, round, convert to byte -; 3266 : uint8x8x4_t o; -; 3267 : o.val[0] = vqrshrun_n_s16(rws, 4); -; 3268 : o.val[1] = vqrshrun_n_s16(gws, 4); -; 3269 : o.val[2] = vqrshrun_n_s16(bws, 4); -; 3270 : o.val[3] = vdup_n_u8(255); -; 3271 : -; 3272 : // store, interleaving r/g/b/a -; 3273 : vst4_u8(out, o); -; 3274 : out += 8 * 4; -; 3275 : } -; 3276 : } -; 3277 : #endif -; 3278 : -; 3279 : for (; i < count; ++i) { -; 3280 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3281 : int r, g, b; -; 3282 : int cr = pcr[i] - 128; -; 3283 : int cb = pcb[i] - 128; -; 3284 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3285 : g = y_fixed + cr * -stbi__float2fixed(0.71414f) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3286 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3287 : r >>= 20; -; 3288 : g >>= 20; -; 3289 : b >>= 20; -; 3290 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3291 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3292 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3293 : out[0] = (stbi_uc)r; -; 3294 : out[1] = (stbi_uc)g; -; 3295 : out[2] = (stbi_uc)b; -; 3296 : out[3] = 255; -; 3297 : out += step; -; 3298 : } -; 3299 : } -; 3300 : #endif -; 3301 : -; 3302 : // set up the kernels -; 3303 : static void stbi__setup_jpeg(stbi__jpeg* j) -; 3304 : { -; 3305 : j->idct_block_kernel = stbi__idct_block; -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; -; 3308 : -; 3309 : #ifdef STBI_SSE2 -; 3310 : if (stbi__sse2_available()) { -; 3311 : j->idct_block_kernel = stbi__idct_simd; -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3314 : } -; 3315 : #endif -; 3316 : -; 3317 : #ifdef STBI_NEON -; 3318 : j->idct_block_kernel = stbi__idct_simd; -; 3319 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3320 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3321 : #endif -; 3322 : } -; 3323 : -; 3324 : // clean up the temporary component buffers -; 3325 : static void stbi__cleanup_jpeg(stbi__jpeg* j) -; 3326 : { -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); -; 3328 : } -; 3329 : -; 3330 : typedef struct -; 3331 : { -; 3332 : resample_row_func resample; -; 3333 : stbi_uc* line0, * line1; -; 3334 : int hs, vs; // expansion factor in each axis -; 3335 : int w_lores; // horizontal pixels pre-expansion -; 3336 : int ystep; // how far through vertical expansion we are -; 3337 : int ypos; // which pre-expansion row we're on -; 3338 : } stbi__resample; -; 3339 : -; 3340 : // fast 0..255 * 0..255 => 0..255 rounded multiplication -; 3341 : static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) -; 3342 : { -; 3343 : unsigned int t = x * y + 128; -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); -; 3345 : } -; 3346 : -; 3347 : static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp, int req_comp) -; 3348 : { -; 3349 : int n, decode_n, is_rgb; -; 3350 : z->s->img_n = 0; // make stbi__cleanup_jpeg safe -; 3351 : -; 3352 : // validate req_comp -; 3353 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 3354 : -; 3355 : // load a jpeg image from whichever source, but leave in YCbCr format -; 3356 : if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } -; 3357 : -; 3358 : // determine actual number of components to generate -; 3359 : n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; -; 3360 : -; 3361 : is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); -; 3362 : -; 3363 : if (z->s->img_n == 3 && n < 3 && !is_rgb) -; 3364 : decode_n = 1; -; 3365 : else -; 3366 : decode_n = z->s->img_n; -; 3367 : -; 3368 : // nothing to do if no components requested; check this now to avoid -; 3369 : // accessing uninitialized coutput[0] later -; 3370 : if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } -; 3371 : -; 3372 : // resample and color-convert -; 3373 : { -; 3374 : int k; -; 3375 : unsigned int i, j; -; 3376 : stbi_uc* output; -; 3377 : stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL }; -; 3378 : -; 3379 : stbi__resample res_comp[4]; -; 3380 : -; 3381 : for (k = 0; k < decode_n; ++k) { -; 3382 : stbi__resample* r = &res_comp[k]; -; 3383 : -; 3384 : // allocate line buffer big enough for upsampling off the edges -; 3385 : // with upsample factor of 4 -; 3386 : z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3); -; 3387 : if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3388 : -; 3389 : r->hs = z->img_h_max / z->img_comp[k].h; -; 3390 : r->vs = z->img_v_max / z->img_comp[k].v; -; 3391 : r->ystep = r->vs >> 1; -; 3392 : r->w_lores = (z->s->img_x + r->hs - 1) / r->hs; -; 3393 : r->ypos = 0; -; 3394 : r->line0 = r->line1 = z->img_comp[k].data; -; 3395 : -; 3396 : if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; -; 3397 : else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; -; 3398 : else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; -; 3399 : else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; -; 3400 : else r->resample = stbi__resample_row_generic; -; 3401 : } -; 3402 : -; 3403 : // can't error after this so, this is safe -; 3404 : output = (stbi_uc*)stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); -; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3406 : -; 3407 : // now go ahead and resample -; 3408 : for (j = 0; j < z->s->img_y; ++j) { -; 3409 : stbi_uc* out = output + n * z->s->img_x * j; -; 3410 : for (k = 0; k < decode_n; ++k) { -; 3411 : stbi__resample* r = &res_comp[k]; -; 3412 : int y_bot = r->ystep >= (r->vs >> 1); -; 3413 : coutput[k] = r->resample(z->img_comp[k].linebuf, -; 3414 : y_bot ? r->line1 : r->line0, -; 3415 : y_bot ? r->line0 : r->line1, -; 3416 : r->w_lores, r->hs); -; 3417 : if (++r->ystep >= r->vs) { -; 3418 : r->ystep = 0; -; 3419 : r->line0 = r->line1; -; 3420 : if (++r->ypos < z->img_comp[k].y) -; 3421 : r->line1 += z->img_comp[k].w2; -; 3422 : } -; 3423 : } -; 3424 : if (n >= 3) { -; 3425 : stbi_uc* y = coutput[0]; -; 3426 : if (z->s->img_n == 3) { -; 3427 : if (is_rgb) { -; 3428 : for (i = 0; i < z->s->img_x; ++i) { -; 3429 : out[0] = y[i]; -; 3430 : out[1] = coutput[1][i]; -; 3431 : out[2] = coutput[2][i]; -; 3432 : out[3] = 255; -; 3433 : out += n; -; 3434 : } -; 3435 : } -; 3436 : else { -; 3437 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3438 : } -; 3439 : } -; 3440 : else if (z->s->img_n == 4) { -; 3441 : if (z->app14_color_transform == 0) { // CMYK -; 3442 : for (i = 0; i < z->s->img_x; ++i) { -; 3443 : stbi_uc m = coutput[3][i]; -; 3444 : out[0] = stbi__blinn_8x8(coutput[0][i], m); -; 3445 : out[1] = stbi__blinn_8x8(coutput[1][i], m); -; 3446 : out[2] = stbi__blinn_8x8(coutput[2][i], m); -; 3447 : out[3] = 255; -; 3448 : out += n; -; 3449 : } -; 3450 : } -; 3451 : else if (z->app14_color_transform == 2) { // YCCK -; 3452 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3453 : for (i = 0; i < z->s->img_x; ++i) { -; 3454 : stbi_uc m = coutput[3][i]; -; 3455 : out[0] = stbi__blinn_8x8(255 - out[0], m); -; 3456 : out[1] = stbi__blinn_8x8(255 - out[1], m); -; 3457 : out[2] = stbi__blinn_8x8(255 - out[2], m); -; 3458 : out += n; -; 3459 : } -; 3460 : } -; 3461 : else { // YCbCr + alpha? Ignore the fourth channel for now -; 3462 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3463 : } -; 3464 : } -; 3465 : else -; 3466 : for (i = 0; i < z->s->img_x; ++i) { -; 3467 : out[0] = out[1] = out[2] = y[i]; -; 3468 : out[3] = 255; // not used if n==3 -; 3469 : out += n; -; 3470 : } -; 3471 : } -; 3472 : else { -; 3473 : if (is_rgb) { -; 3474 : if (n == 1) -; 3475 : for (i = 0; i < z->s->img_x; ++i) -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3477 : else { -; 3478 : for (i = 0; i < z->s->img_x; ++i, out += 2) { -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3480 : out[1] = 255; -; 3481 : } -; 3482 : } -; 3483 : } -; 3484 : else if (z->s->img_n == 4 && z->app14_color_transform == 0) { -; 3485 : for (i = 0; i < z->s->img_x; ++i) { -; 3486 : stbi_uc m = coutput[3][i]; -; 3487 : stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); -; 3488 : stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); -; 3489 : stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); -; 3490 : out[0] = stbi__compute_y(r, g, b); -; 3491 : out[1] = 255; -; 3492 : out += n; -; 3493 : } -; 3494 : } -; 3495 : else if (z->s->img_n == 4 && z->app14_color_transform == 2) { -; 3496 : for (i = 0; i < z->s->img_x; ++i) { -; 3497 : out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); -; 3498 : out[1] = 255; -; 3499 : out += n; -; 3500 : } -; 3501 : } -; 3502 : else { -; 3503 : stbi_uc* y = coutput[0]; -; 3504 : if (n == 1) -; 3505 : for (i = 0; i < z->s->img_x; ++i) out[i] = y[i]; -; 3506 : else -; 3507 : for (i = 0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } -; 3508 : } -; 3509 : } -; 3510 : } -; 3511 : stbi__cleanup_jpeg(z); -; 3512 : *out_x = z->s->img_x; -; 3513 : *out_y = z->s->img_y; -; 3514 : if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output -; 3515 : return output; -; 3516 : } -; 3517 : } -; 3518 : -; 3519 : static void* stbi__jpeg_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 3520 : { -; 3521 : unsigned char* result; -; 3522 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); -; 3524 : memset(j, 0, sizeof(stbi__jpeg)); -; 3525 : STBI_NOTUSED(ri); -; 3526 : j->s = s; -; 3527 : stbi__setup_jpeg(j); -; 3528 : result = load_jpeg_image(j, x, y, comp, req_comp); -; 3529 : STBI_FREE(j); -; 3530 : return result; -; 3531 : } -; 3532 : -; 3533 : static int stbi__jpeg_test(stbi__context* s) -; 3534 : { -; 3535 : int r; -; 3536 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3538 : memset(j, 0, sizeof(stbi__jpeg)); -; 3539 : j->s = s; -; 3540 : stbi__setup_jpeg(j); -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); -; 3542 : stbi__rewind(s); -; 3543 : STBI_FREE(j); -; 3544 : return r; -; 3545 : } -; 3546 : -; 3547 : static int stbi__jpeg_info_raw(stbi__jpeg* j, int* x, int* y, int* comp) -; 3548 : { -; 3549 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { -; 3550 : stbi__rewind(j->s); -; 3551 : return 0; -; 3552 : } -; 3553 : if (x) *x = j->s->img_x; -; 3554 : if (y) *y = j->s->img_y; -; 3555 : if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; -; 3556 : return 1; -; 3557 : } -; 3558 : -; 3559 : static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp) -; 3560 : { -; 3561 : int result; -; 3562 : stbi__jpeg* j = (stbi__jpeg*)(stbi__malloc(sizeof(stbi__jpeg))); -; 3563 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3564 : memset(j, 0, sizeof(stbi__jpeg)); -; 3565 : j->s = s; -; 3566 : result = stbi__jpeg_info_raw(j, x, y, comp); -; 3567 : STBI_FREE(j); -; 3568 : return result; -; 3569 : } -; 3570 : #endif -; 3571 : -; 3572 : // public domain zlib decode v0.2 Sean Barrett 2006-11-18 -; 3573 : // simple implementation -; 3574 : // - all input must be provided in an upfront buffer -; 3575 : // - all output is written to a single output buffer (can malloc/realloc) -; 3576 : // performance -; 3577 : // - fast huffman -; 3578 : -; 3579 : #ifndef STBI_NO_ZLIB -; 3580 : -; 3581 : // fast-way is faster to check than jpeg huffman, but slow way is slower -; 3582 : #define STBI__ZFAST_BITS 9 // accelerate all cases in default tables -; 3583 : #define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) -; 3584 : #define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet -; 3585 : -; 3586 : // zlib-style huffman encoding -; 3587 : // (jpegs packs from left, zlib from right, so can't share code) -; 3588 : typedef struct -; 3589 : { -; 3590 : stbi__uint16 fast[1 << STBI__ZFAST_BITS]; -; 3591 : stbi__uint16 firstcode[16]; -; 3592 : int maxcode[17]; -; 3593 : stbi__uint16 firstsymbol[16]; -; 3594 : stbi_uc size[STBI__ZNSYMS]; -; 3595 : stbi__uint16 value[STBI__ZNSYMS]; -; 3596 : } stbi__zhuffman; -; 3597 : -; 3598 : stbi_inline static int stbi__bitreverse16(int n) -; 3599 : { -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); -; 3604 : return n; -; 3605 : } -; 3606 : -; 3607 : stbi_inline static int stbi__bit_reverse(int v, int bits) -; 3608 : { -; 3609 : STBI_ASSERT(bits <= 16); -; 3610 : // to bit reverse n bits, reverse 16 and shift -; 3611 : // e.g. 11 bits, bit reverse and shift away 5 -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); -; 3613 : } -; 3614 : -; 3615 : static int stbi__zbuild_huffman(stbi__zhuffman* z, const stbi_uc* sizelist, int num) -; 3616 : { -; 3617 : int i, k = 0; -; 3618 : int code, next_code[16], sizes[17]; -; 3619 : -; 3620 : // DEFLATE spec for generating codes -; 3621 : memset(sizes, 0, sizeof(sizes)); -; 3622 : memset(z->fast, 0, sizeof(z->fast)); -; 3623 : for (i = 0; i < num; ++i) -; 3624 : ++sizes[sizelist[i]]; -; 3625 : sizes[0] = 0; -; 3626 : for (i = 1; i < 16; ++i) -; 3627 : if (sizes[i] > (1 << i)) -; 3628 : return stbi__err("bad sizes", "Corrupt PNG"); -; 3629 : code = 0; -; 3630 : for (i = 1; i < 16; ++i) { -; 3631 : next_code[i] = code; -; 3632 : z->firstcode[i] = (stbi__uint16)code; -; 3633 : z->firstsymbol[i] = (stbi__uint16)k; -; 3634 : code = (code + sizes[i]); -; 3635 : if (sizes[i]) -; 3636 : if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3637 : z->maxcode[i] = code << (16 - i); // preshift for inner loop -; 3638 : code <<= 1; -; 3639 : k += sizes[i]; -; 3640 : } -; 3641 : z->maxcode[16] = 0x10000; // sentinel -; 3642 : for (i = 0; i < num; ++i) { -; 3643 : int s = sizelist[i]; -; 3644 : if (s) { -; 3645 : int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; -; 3646 : stbi__uint16 fastv = (stbi__uint16)((s << 9) | i); -; 3647 : z->size[c] = (stbi_uc)s; -; 3648 : z->value[c] = (stbi__uint16)i; -; 3649 : if (s <= STBI__ZFAST_BITS) { -; 3650 : int j = stbi__bit_reverse(next_code[s], s); -; 3651 : while (j < (1 << STBI__ZFAST_BITS)) { -; 3652 : z->fast[j] = fastv; -; 3653 : j += (1 << s); -; 3654 : } -; 3655 : } -; 3656 : ++next_code[s]; -; 3657 : } -; 3658 : } -; 3659 : return 1; -; 3660 : } -; 3661 : -; 3662 : // zlib-from-memory implementation for PNG reading -; 3663 : // because PNG allows splitting the zlib stream arbitrarily, -; 3664 : // and it's annoying structurally to have PNG call ZLIB call PNG, -; 3665 : // we require PNG read all the IDATs and combine them into a single -; 3666 : // memory buffer -; 3667 : -; 3668 : typedef struct -; 3669 : { -; 3670 : stbi_uc* zbuffer, * zbuffer_end; -; 3671 : int num_bits; -; 3672 : stbi__uint32 code_buffer; -; 3673 : -; 3674 : char* zout; -; 3675 : char* zout_start; -; 3676 : char* zout_end; -; 3677 : int z_expandable; -; 3678 : -; 3679 : stbi__zhuffman z_length, z_distance; -; 3680 : } stbi__zbuf; -; 3681 : -; 3682 : stbi_inline static int stbi__zeof(stbi__zbuf* z) -; 3683 : { -; 3684 : return (z->zbuffer >= z->zbuffer_end); -; 3685 : } -; 3686 : -; 3687 : stbi_inline static stbi_uc stbi__zget8(stbi__zbuf* z) -; 3688 : { -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ -; 3697 : return; -; 3698 : } -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; -; 3700 : z->num_bits += 8; -; 3701 : } while (z->num_bits <= 24); -; 3702 : } -; 3703 : -; 3704 : stbi_inline static unsigned int stbi__zreceive(stbi__zbuf* z, int n) -; 3705 : { -; 3706 : unsigned int k; -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); -; 3708 : k = z->code_buffer & ((1 << n) - 1); -; 3709 : z->code_buffer >>= n; -; 3710 : z->num_bits -= n; -; 3711 : return k; -; 3712 : } -; 3713 : -; 3714 : static int stbi__zhuffman_decode_slowpath(stbi__zbuf* a, stbi__zhuffman* z) -; 3715 : { -; 3716 : int b, s, k; -; 3717 : // not resolved by fast table, so compute it the slow way -; 3718 : // use jpeg approach, which requires MSbits at top -; 3719 : k = stbi__bit_reverse(a->code_buffer, 16); -; 3720 : for (s = STBI__ZFAST_BITS + 1; ; ++s) -; 3721 : if (k < z->maxcode[s]) -; 3722 : break; -; 3723 : if (s >= 16) return -1; // invalid code! -; 3724 : // code size is s, so: -; 3725 : b = (k >> (16 - s)) - z->firstcode[s] + z->firstsymbol[s]; -; 3726 : if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! -; 3727 : if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. -; 3728 : a->code_buffer >>= s; -; 3729 : a->num_bits -= s; -; 3730 : return z->value[b]; -; 3731 : } -; 3732 : -; 3733 : stbi_inline static int stbi__zhuffman_decode(stbi__zbuf* a, stbi__zhuffman* z) -; 3734 : { -; 3735 : int b, s; -; 3736 : if (a->num_bits < 16) { -; 3737 : if (stbi__zeof(a)) { -; 3738 : return -1; /* report error for unexpected end of data. */ -; 3739 : } -; 3740 : stbi__fill_bits(a); -; 3741 : } -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; -; 3743 : if (b) { -; 3744 : s = b >> 9; -; 3745 : a->code_buffer >>= s; -; 3746 : a->num_bits -= s; -; 3747 : return b & 511; -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); -; 3750 : } -; 3751 : -; 3752 : static int stbi__zexpand(stbi__zbuf* z, char* zout, int n) // need to make room for n bytes -; 3753 : { -; 3754 : char* q; -; 3755 : unsigned int cur, limit, old_limit; -; 3756 : z->zout = zout; -; 3757 : if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG"); -; 3758 : cur = (unsigned int)(z->zout - z->zout_start); -; 3759 : limit = old_limit = (unsigned)(z->zout_end - z->zout_start); -; 3760 : if (UINT_MAX - cur < (unsigned)n) return stbi__err("outofmem", "Out of memory"); -; 3761 : while (cur + n > limit) { -; 3762 : if (limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); -; 3763 : limit *= 2; -; 3764 : } -; 3765 : q = (char*)STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); -; 3766 : STBI_NOTUSED(old_limit); -; 3767 : if (q == NULL) return stbi__err("outofmem", "Out of memory"); -; 3768 : z->zout_start = q; -; 3769 : z->zout = q + cur; -; 3770 : z->zout_end = q + limit; -; 3771 : return 1; -; 3772 : } -; 3773 : -; 3774 : static const int stbi__zlength_base[31] = { -; 3775 : 3,4,5,6,7,8,9,10,11,13, -; 3776 : 15,17,19,23,27,31,35,43,51,59, -; 3777 : 67,83,99,115,131,163,195,227,258,0,0 }; -; 3778 : -; 3779 : static const int stbi__zlength_extra[31] = -; 3780 : { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; -; 3781 : -; 3782 : static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, -; 3783 : 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0 }; -; 3784 : -; 3785 : static const int stbi__zdist_extra[32] = -; 3786 : { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 }; -; 3787 : -; 3788 : static int stbi__parse_huffman_block(stbi__zbuf* a) -; 3789 : { -; 3790 : char* zout = a->zout; -; 3791 : for (;;) { -; 3792 : int z = stbi__zhuffman_decode(a, &a->z_length); -; 3793 : if (z < 256) { -; 3794 : if (z < 0) return stbi__err("bad huffman code", "Corrupt PNG"); // error in huffman codes -; 3795 : if (zout >= a->zout_end) { -; 3796 : if (!stbi__zexpand(a, zout, 1)) return 0; -; 3797 : zout = a->zout; -; 3798 : } -; 3799 : *zout++ = (char)z; -; 3800 : } -; 3801 : else { -; 3802 : stbi_uc* p; -; 3803 : int len, dist; -; 3804 : if (z == 256) { -; 3805 : a->zout = zout; -; 3806 : return 1; -; 3807 : } -; 3808 : if (z >= 286) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data -; 3809 : z -= 257; -; 3810 : len = stbi__zlength_base[z]; -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); -; 3812 : z = stbi__zhuffman_decode(a, &a->z_distance); -; 3813 : if (z < 0 || z >= 30) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data -; 3814 : dist = stbi__zdist_base[z]; -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); -; 3816 : if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG"); -; 3817 : if (zout + len > a->zout_end) { -; 3818 : if (!stbi__zexpand(a, zout, len)) return 0; -; 3819 : zout = a->zout; -; 3820 : } -; 3821 : p = (stbi_uc*)(zout - dist); -; 3822 : if (dist == 1) { // run of one byte; common in images. -; 3823 : stbi_uc v = *p; -; 3824 : if (len) { do *zout++ = v; while (--len); } -; 3825 : } -; 3826 : else { -; 3827 : if (len) { do *zout++ = *p++; while (--len); } -; 3828 : } -; 3829 : } -; 3830 : } -; 3831 : } -; 3832 : -; 3833 : static int stbi__compute_huffman_codes(stbi__zbuf* a) -; 3834 : { -; 3835 : static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; -; 3836 : stbi__zhuffman z_codelength; -; 3837 : stbi_uc lencodes[286 + 32 + 137];//padding for maximum single op -; 3838 : stbi_uc codelength_sizes[19]; -; 3839 : int i, n; -; 3840 : -; 3841 : int hlit = stbi__zreceive(a, 5) + 257; -; 3842 : int hdist = stbi__zreceive(a, 5) + 1; -; 3843 : int hclen = stbi__zreceive(a, 4) + 4; -; 3844 : int ntot = hlit + hdist; -; 3845 : -; 3846 : memset(codelength_sizes, 0, sizeof(codelength_sizes)); -; 3847 : for (i = 0; i < hclen; ++i) { -; 3848 : int s = stbi__zreceive(a, 3); -; 3849 : codelength_sizes[length_dezigzag[i]] = (stbi_uc)s; -; 3850 : } -; 3851 : if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; -; 3852 : -; 3853 : n = 0; -; 3854 : while (n < ntot) { -; 3855 : int c = stbi__zhuffman_decode(a, &z_codelength); -; 3856 : if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3857 : if (c < 16) -; 3858 : lencodes[n++] = (stbi_uc)c; -; 3859 : else { -; 3860 : stbi_uc fill = 0; -; 3861 : if (c == 16) { -; 3862 : c = stbi__zreceive(a, 2) + 3; -; 3863 : if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3864 : fill = lencodes[n - 1]; -; 3865 : } -; 3866 : else if (c == 17) { -; 3867 : c = stbi__zreceive(a, 3) + 3; -; 3868 : } -; 3869 : else if (c == 18) { -; 3870 : c = stbi__zreceive(a, 7) + 11; -; 3871 : } -; 3872 : else { -; 3873 : return stbi__err("bad codelengths", "Corrupt PNG"); -; 3874 : } -; 3875 : if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3876 : memset(lencodes + n, fill, c); -; 3877 : n += c; -; 3878 : } -; 3879 : } -; 3880 : if (n != ntot) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3881 : if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; -; 3882 : if (!stbi__zbuild_huffman(&a->z_distance, lencodes + hlit, hdist)) return 0; -; 3883 : return 1; -; 3884 : } -; 3885 : -; 3886 : static int stbi__parse_uncompressed_block(stbi__zbuf* a) -; 3887 : { -; 3888 : stbi_uc header[4]; -; 3889 : int len, nlen, k; -; 3890 : if (a->num_bits & 7) -; 3891 : stbi__zreceive(a, a->num_bits & 7); // discard -; 3892 : // drain the bit-packed data into header -; 3893 : k = 0; -; 3894 : while (a->num_bits > 0) { -; 3895 : header[k++] = (stbi_uc)(a->code_buffer & 255); // suppress MSVC run-time check -; 3896 : a->code_buffer >>= 8; -; 3897 : a->num_bits -= 8; -; 3898 : } -; 3899 : if (a->num_bits < 0) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3900 : // now fill header the normal way -; 3901 : while (k < 4) -; 3902 : header[k++] = stbi__zget8(a); -; 3903 : len = header[1] * 256 + header[0]; -; 3904 : nlen = header[3] * 256 + header[2]; -; 3905 : if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3906 : if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG"); -; 3907 : if (a->zout + len > a->zout_end) -; 3908 : if (!stbi__zexpand(a, a->zout, len)) return 0; -; 3909 : memcpy(a->zout, a->zbuffer, len); -; 3910 : a->zbuffer += len; -; 3911 : a->zout += len; -; 3912 : return 1; -; 3913 : } -; 3914 : -; 3915 : static int stbi__parse_zlib_header(stbi__zbuf* a) -; 3916 : { -; 3917 : int cmf = stbi__zget8(a); -; 3918 : int cm = cmf & 15; -; 3919 : /* int cinfo = cmf >> 4; */ -; 3920 : int flg = stbi__zget8(a); -; 3921 : if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3922 : if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png -; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png -; 3925 : // window = 1 << (8 + cinfo)... but who cares, we fully buffer output -; 3926 : return 1; -; 3927 : } -; 3928 : -; 3929 : static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] = -; 3930 : { -; 3931 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3932 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3933 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3934 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3935 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3936 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3937 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3938 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3939 : 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 -; 3940 : }; -; 3941 : static const stbi_uc stbi__zdefault_distance[32] = -; 3942 : { -; 3943 : 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 -; 3944 : }; -; 3945 : /* -; 3946 : Init algorithm: -; 3947 : { -; 3948 : int i; // use <= to match clearly with spec -; 3949 : for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; -; 3950 : for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; -; 3951 : for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; -; 3952 : for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; -; 3953 : -; 3954 : for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; -; 3955 : } -; 3956 : */ -; 3957 : -; 3958 : static int stbi__parse_zlib(stbi__zbuf* a, int parse_header) -; 3959 : { -; 3960 : int final, type; -; 3961 : if (parse_header) -; 3962 : if (!stbi__parse_zlib_header(a)) return 0; -; 3963 : a->num_bits = 0; -; 3964 : a->code_buffer = 0; -; 3965 : do { -; 3966 : final = stbi__zreceive(a, 1); -; 3967 : type = stbi__zreceive(a, 2); -; 3968 : if (type == 0) { -; 3969 : if (!stbi__parse_uncompressed_block(a)) return 0; -; 3970 : } -; 3971 : else if (type == 3) { -; 3972 : return 0; -; 3973 : } -; 3974 : else { -; 3975 : if (type == 1) { -; 3976 : // use fixed code lengths -; 3977 : if (!stbi__zbuild_huffman(&a->z_length, stbi__zdefault_length, STBI__ZNSYMS)) return 0; -; 3978 : if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; -; 3979 : } -; 3980 : else { -; 3981 : if (!stbi__compute_huffman_codes(a)) return 0; -; 3982 : } -; 3983 : if (!stbi__parse_huffman_block(a)) return 0; -; 3984 : } -; 3985 : } while (!final); -; 3986 : return 1; -; 3987 : } -; 3988 : -; 3989 : static int stbi__do_zlib(stbi__zbuf* a, char* obuf, int olen, int exp, int parse_header) -; 3990 : { -; 3991 : a->zout_start = obuf; -; 3992 : a->zout = obuf; -; 3993 : a->zout_end = obuf + olen; -; 3994 : a->z_expandable = exp; -; 3995 : -; 3996 : return stbi__parse_zlib(a, parse_header); -; 3997 : } -; 3998 : -; 3999 : STBIDEF char* stbi_zlib_decode_malloc_guesssize(const char* buffer, int len, int initial_size, int* outlen) -; 4000 : { -; 4001 : stbi__zbuf a; -; 4002 : char* p = (char*)stbi__malloc(initial_size); -; 4003 : if (p == NULL) return NULL; -; 4004 : a.zbuffer = (stbi_uc*)buffer; -; 4005 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4006 : if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { -; 4007 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4008 : return a.zout_start; -; 4009 : } -; 4010 : else { -; 4011 : STBI_FREE(a.zout_start); -; 4012 : return NULL; -; 4013 : } -; 4014 : } -; 4015 : -; 4016 : STBIDEF char* stbi_zlib_decode_malloc(char const* buffer, int len, int* outlen) -; 4017 : { -; 4018 : return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); -; 4019 : } -; 4020 : -; 4021 : STBIDEF char* stbi_zlib_decode_malloc_guesssize_headerflag(const char* buffer, int len, int initial_size, int* outlen, int parse_header) -; 4022 : { -; 4023 : stbi__zbuf a; -; 4024 : char* p = (char*)stbi__malloc(initial_size); -; 4025 : if (p == NULL) return NULL; -; 4026 : a.zbuffer = (stbi_uc*)buffer; -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4028 : if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { -; 4029 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4030 : return a.zout_start; -; 4031 : } -; 4032 : else { -; 4033 : STBI_FREE(a.zout_start); -; 4034 : return NULL; -; 4035 : } -; 4036 : } -; 4037 : -; 4038 : STBIDEF int stbi_zlib_decode_buffer(char* obuffer, int olen, char const* ibuffer, int ilen) -; 4039 : { -; 4040 : stbi__zbuf a; -; 4041 : a.zbuffer = (stbi_uc*)ibuffer; -; 4042 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4043 : if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) -; 4044 : return (int)(a.zout - a.zout_start); -; 4045 : else -; 4046 : return -1; -; 4047 : } -; 4048 : -; 4049 : STBIDEF char* stbi_zlib_decode_noheader_malloc(char const* buffer, int len, int* outlen) -; 4050 : { -; 4051 : stbi__zbuf a; -; 4052 : char* p = (char*)stbi__malloc(16384); -; 4053 : if (p == NULL) return NULL; -; 4054 : a.zbuffer = (stbi_uc*)buffer; -; 4055 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4056 : if (stbi__do_zlib(&a, p, 16384, 1, 0)) { -; 4057 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4058 : return a.zout_start; -; 4059 : } -; 4060 : else { -; 4061 : STBI_FREE(a.zout_start); -; 4062 : return NULL; -; 4063 : } -; 4064 : } -; 4065 : -; 4066 : STBIDEF int stbi_zlib_decode_noheader_buffer(char* obuffer, int olen, const char* ibuffer, int ilen) -; 4067 : { -; 4068 : stbi__zbuf a; -; 4069 : a.zbuffer = (stbi_uc*)ibuffer; -; 4070 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4071 : if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) -; 4072 : return (int)(a.zout - a.zout_start); -; 4073 : else -; 4074 : return -1; -; 4075 : } -; 4076 : #endif -; 4077 : -; 4078 : // public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 -; 4079 : // simple implementation -; 4080 : // - only 8-bit samples -; 4081 : // - no CRC checking -; 4082 : // - allocates lots of intermediate memory -; 4083 : // - avoids problem of streaming data between subsystems -; 4084 : // - avoids explicit window management -; 4085 : // performance -; 4086 : // - uses stb_zlib, a PD zlib implementation with fast huffman decoding -; 4087 : -; 4088 : #ifndef STBI_NO_PNG -; 4089 : typedef struct -; 4090 : { -; 4091 : stbi__uint32 length; -; 4092 : stbi__uint32 type; -; 4093 : } stbi__pngchunk; -; 4094 : -; 4095 : static stbi__pngchunk stbi__get_chunk_header(stbi__context* s) -; 4096 : { -; 4097 : stbi__pngchunk c; -; 4098 : c.length = stbi__get32be(s); -; 4099 : c.type = stbi__get32be(s); -; 4100 : return c; -; 4101 : } -; 4102 : -; 4103 : static int stbi__check_png_header(stbi__context* s) -; 4104 : { -; 4105 : static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; -; 4106 : int i; -; 4107 : for (i = 0; i < 8; ++i) -; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); -; 4109 : return 1; -; 4110 : } -; 4111 : -; 4112 : typedef struct -; 4113 : { -; 4114 : stbi__context* s; -; 4115 : stbi_uc* idata, * expanded, * out; -; 4116 : int depth; -; 4117 : } stbi__png; -; 4118 : -; 4119 : enum { -; 4120 : STBI__F_none = 0, -; 4121 : STBI__F_sub = 1, -; 4122 : STBI__F_up = 2, -; 4123 : STBI__F_avg = 3, -; 4124 : STBI__F_paeth = 4, -; 4125 : // synthetic filters used for first scanline to avoid needing a dummy row of 0s -; 4126 : STBI__F_avg_first, -; 4127 : STBI__F_paeth_first -; 4128 : }; -; 4129 : -; 4130 : static stbi_uc first_row_filter[5] = -; 4131 : { -; 4132 : STBI__F_none, -; 4133 : STBI__F_sub, -; 4134 : STBI__F_none, -; 4135 : STBI__F_avg_first, -; 4136 : STBI__F_paeth_first -; 4137 : }; -; 4138 : -; 4139 : static int stbi__paeth(int a, int b, int c) -; 4140 : { -; 4141 : int p = a + b - c; -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); -; 4144 : int pc = abs(p - c); -; 4145 : if (pa <= pb && pa <= pc) return a; -; 4146 : if (pb <= pc) return b; -; 4147 : return c; -; 4148 : } -; 4149 : -; 4150 : static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; -; 4151 : -; 4152 : // create the png data from post-deflated data -; 4153 : static int stbi__create_png_image_raw(stbi__png* a, stbi_uc* raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -; 4154 : { -; 4155 : int bytes = (depth == 16 ? 2 : 1); -; 4156 : stbi__context* s = a->s; -; 4157 : stbi__uint32 i, j, stride = x * out_n * bytes; -; 4158 : stbi__uint32 img_len, img_width_bytes; -; 4159 : int k; -; 4160 : int img_n = s->img_n; // copy it into a local for later -; 4161 : -; 4162 : int output_bytes = out_n * bytes; -; 4163 : int filter_bytes = img_n * bytes; -; 4164 : int width = x; -; 4165 : -; 4166 : STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1); -; 4167 : a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into -; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); -; 4169 : -; 4170 : if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); -; 4171 : img_width_bytes = (((img_n * x * depth) + 7) >> 3); -; 4172 : img_len = (img_width_bytes + 1) * y; -; 4173 : -; 4174 : // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, -; 4175 : // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), -; 4176 : // so just check for raw_len < img_len always. -; 4177 : if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG"); -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { -; 4180 : stbi_uc* cur = a->out + stride * j; -; 4181 : stbi_uc* prior; -; 4182 : int filter = *raw++; -; 4183 : -; 4184 : if (filter > 4) -; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); -; 4186 : -; 4187 : if (depth < 8) { -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); -; 4189 : cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place -; 4190 : filter_bytes = 1; -; 4191 : width = img_width_bytes; -; 4192 : } -; 4193 : prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above -; 4194 : -; 4195 : // if first row, use special filter that doesn't sample previous row -; 4196 : if (j == 0) filter = first_row_filter[filter]; -; 4197 : -; 4198 : // handle first byte explicitly -; 4199 : for (k = 0; k < filter_bytes; ++k) { -; 4200 : switch (filter) { -; 4201 : case STBI__F_none: cur[k] = raw[k]; break; -; 4202 : case STBI__F_sub: cur[k] = raw[k]; break; -; 4203 : case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; -; 4204 : case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break; -; 4205 : case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break; -; 4206 : case STBI__F_avg_first: cur[k] = raw[k]; break; -; 4207 : case STBI__F_paeth_first: cur[k] = raw[k]; break; -; 4208 : } -; 4209 : } -; 4210 : -; 4211 : if (depth == 8) { -; 4212 : if (img_n != out_n) -; 4213 : cur[img_n] = 255; // first pixel -; 4214 : raw += img_n; -; 4215 : cur += out_n; -; 4216 : prior += out_n; -; 4217 : } -; 4218 : else if (depth == 16) { -; 4219 : if (img_n != out_n) { -; 4220 : cur[filter_bytes] = 255; // first pixel top byte -; 4221 : cur[filter_bytes + 1] = 255; // first pixel bottom byte -; 4222 : } -; 4223 : raw += filter_bytes; -; 4224 : cur += output_bytes; -; 4225 : prior += output_bytes; -; 4226 : } -; 4227 : else { -; 4228 : raw += 1; -; 4229 : cur += 1; -; 4230 : prior += 1; -; 4231 : } -; 4232 : -; 4233 : // this is a little gross, so that we don't switch per-pixel or per-component -; 4234 : if (depth < 8 || img_n == out_n) { -; 4235 : int nk = (width - 1) * filter_bytes; -; 4236 : #define STBI__CASE(f) \ -; 4237 : case f: \ -; 4238 : for (k=0; k < nk; ++k) -; 4239 : switch (filter) { -; 4240 : // "none" filter turns into a memcpy here; make that explicit. -; 4241 : case STBI__F_none: memcpy(cur, raw, nk); break; -; 4242 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break; -; 4243 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4244 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break; -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; -; 4246 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break; -; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; -; 4248 : } -; 4249 : #undef STBI__CASE -; 4250 : raw += nk; -; 4251 : } -; 4252 : else { -; 4253 : STBI_ASSERT(img_n + 1 == out_n); -; 4254 : #define STBI__CASE(f) \ -; 4255 : case f: \ -; 4256 : for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ -; 4257 : for (k=0; k < filter_bytes; ++k) -; 4258 : switch (filter) { -; 4259 : STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; -; 4260 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break; -; 4261 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4262 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break; -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; -; 4264 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break; -; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; -; 4266 : } -; 4267 : #undef STBI__CASE -; 4268 : -; 4269 : // the loop above sets the high byte of the pixels' alpha, but for -; 4270 : // 16 bit png files we also need the low byte set. we'll do that here. -; 4271 : if (depth == 16) { -; 4272 : cur = a->out + stride * j; // start at the beginning of the row again -; 4273 : for (i = 0; i < x; ++i, cur += output_bytes) { -; 4274 : cur[filter_bytes + 1] = 255; -; 4275 : } -; 4276 : } -; 4277 : } -; 4278 : } -; 4279 : -; 4280 : // we make a separate pass to expand bits to pixels; for performance, -; 4281 : // this could run two scanlines behind the above code, so it won't -; 4282 : // intefere with filtering but will still be in the cache. -; 4283 : if (depth < 8) { -; 4284 : for (j = 0; j < y; ++j) { -; 4285 : stbi_uc* cur = a->out + stride * j; -; 4286 : stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes; -; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit -; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop -; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range -; 4290 : -; 4291 : // note that the final byte might overshoot and write more data than desired. -; 4292 : // we can allocate enough data that this never writes out of memory, but it -; 4293 : // could also overwrite the next scanline. can it overwrite non-empty data -; 4294 : // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. -; 4295 : // so we need to explicitly clamp the final ones -; 4296 : -; 4297 : if (depth == 4) { -; 4298 : for (k = x * img_n; k >= 2; k -= 2, ++in) { -; 4299 : *cur++ = scale * ((*in >> 4)); -; 4300 : *cur++ = scale * ((*in) & 0x0f); -; 4301 : } -; 4302 : if (k > 0) *cur++ = scale * ((*in >> 4)); -; 4303 : } -; 4304 : else if (depth == 2) { -; 4305 : for (k = x * img_n; k >= 4; k -= 4, ++in) { -; 4306 : *cur++ = scale * ((*in >> 6)); -; 4307 : *cur++ = scale * ((*in >> 4) & 0x03); -; 4308 : *cur++ = scale * ((*in >> 2) & 0x03); -; 4309 : *cur++ = scale * ((*in) & 0x03); -; 4310 : } -; 4311 : if (k > 0) *cur++ = scale * ((*in >> 6)); -; 4312 : if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); -; 4313 : if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); -; 4314 : } -; 4315 : else if (depth == 1) { -; 4316 : for (k = x * img_n; k >= 8; k -= 8, ++in) { -; 4317 : *cur++ = scale * ((*in >> 7)); -; 4318 : *cur++ = scale * ((*in >> 6) & 0x01); -; 4319 : *cur++ = scale * ((*in >> 5) & 0x01); -; 4320 : *cur++ = scale * ((*in >> 4) & 0x01); -; 4321 : *cur++ = scale * ((*in >> 3) & 0x01); -; 4322 : *cur++ = scale * ((*in >> 2) & 0x01); -; 4323 : *cur++ = scale * ((*in >> 1) & 0x01); -; 4324 : *cur++ = scale * ((*in) & 0x01); -; 4325 : } -; 4326 : if (k > 0) *cur++ = scale * ((*in >> 7)); -; 4327 : if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); -; 4328 : if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); -; 4329 : if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); -; 4330 : if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); -; 4331 : if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); -; 4332 : if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); -; 4333 : } -; 4334 : if (img_n != out_n) { -; 4335 : int q; -; 4336 : // insert alpha = 255 -; 4337 : cur = a->out + stride * j; -; 4338 : if (img_n == 1) { -; 4339 : for (q = x - 1; q >= 0; --q) { -; 4340 : cur[q * 2 + 1] = 255; -; 4341 : cur[q * 2 + 0] = cur[q]; -; 4342 : } -; 4343 : } -; 4344 : else { -; 4345 : STBI_ASSERT(img_n == 3); -; 4346 : for (q = x - 1; q >= 0; --q) { -; 4347 : cur[q * 4 + 3] = 255; -; 4348 : cur[q * 4 + 2] = cur[q * 3 + 2]; -; 4349 : cur[q * 4 + 1] = cur[q * 3 + 1]; -; 4350 : cur[q * 4 + 0] = cur[q * 3 + 0]; -; 4351 : } -; 4352 : } -; 4353 : } -; 4354 : } -; 4355 : } -; 4356 : else if (depth == 16) { -; 4357 : // force the image data from big-endian to platform-native. -; 4358 : // this is done in a separate pass due to the decoding relying -; 4359 : // on the data being untouched, but could probably be done -; 4360 : // per-line during decode if care is taken. -; 4361 : stbi_uc* cur = a->out; -; 4362 : stbi__uint16* cur16 = (stbi__uint16*)cur; -; 4363 : -; 4364 : for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) { -; 4365 : *cur16 = (cur[0] << 8) | cur[1]; -; 4366 : } -; 4367 : } -; 4368 : -; 4369 : return 1; -; 4370 : } -; 4371 : -; 4372 : static int stbi__create_png_image(stbi__png* a, stbi_uc* image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -; 4373 : { -; 4374 : int bytes = (depth == 16 ? 2 : 1); -; 4375 : int out_bytes = out_n * bytes; -; 4376 : stbi_uc* final; -; 4377 : int p; -; 4378 : if (!interlaced) -; 4379 : return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); -; 4380 : -; 4381 : // de-interlacing -; 4382 : final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); -; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); -; 4384 : for (p = 0; p < 7; ++p) { -; 4385 : int xorig[] = { 0,4,0,2,0,1,0 }; -; 4386 : int yorig[] = { 0,0,4,0,2,0,1 }; -; 4387 : int xspc[] = { 8,8,4,4,2,2,1 }; -; 4388 : int yspc[] = { 8,8,8,4,4,2,2 }; -; 4389 : int i, j, x, y; -; 4390 : // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 -; 4391 : x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p]; -; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; -; 4393 : if (x && y) { -; 4394 : stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; -; 4395 : if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { -; 4396 : STBI_FREE(final); -; 4397 : return 0; -; 4398 : } -; 4399 : for (j = 0; j < y; ++j) { -; 4400 : for (i = 0; i < x; ++i) { -; 4401 : int out_y = j * yspc[p] + yorig[p]; -; 4402 : int out_x = i * xspc[p] + xorig[p]; -; 4403 : memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, -; 4404 : a->out + (j * x + i) * out_bytes, out_bytes); -; 4405 : } -; 4406 : } -; 4407 : STBI_FREE(a->out); -; 4408 : image_data += img_len; -; 4409 : image_data_len -= img_len; -; 4410 : } -; 4411 : } -; 4412 : a->out = final; -; 4413 : -; 4414 : return 1; -; 4415 : } -; 4416 : -; 4417 : static int stbi__compute_transparency(stbi__png* z, stbi_uc tc[3], int out_n) -; 4418 : { -; 4419 : stbi__context* s = z->s; -; 4420 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4421 : stbi_uc* p = z->out; -; 4422 : -; 4423 : // compute color-based transparency, assuming we've -; 4424 : // already got 255 as the alpha value in the output -; 4425 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4426 : -; 4427 : if (out_n == 2) { -; 4428 : for (i = 0; i < pixel_count; ++i) { -; 4429 : p[1] = (p[0] == tc[0] ? 0 : 255); -; 4430 : p += 2; -; 4431 : } -; 4432 : } -; 4433 : else { -; 4434 : for (i = 0; i < pixel_count; ++i) { -; 4435 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4436 : p[3] = 0; -; 4437 : p += 4; -; 4438 : } -; 4439 : } -; 4440 : return 1; -; 4441 : } -; 4442 : -; 4443 : static int stbi__compute_transparency16(stbi__png* z, stbi__uint16 tc[3], int out_n) -; 4444 : { -; 4445 : stbi__context* s = z->s; -; 4446 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4447 : stbi__uint16* p = (stbi__uint16*)z->out; -; 4448 : -; 4449 : // compute color-based transparency, assuming we've -; 4450 : // already got 65535 as the alpha value in the output -; 4451 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4452 : -; 4453 : if (out_n == 2) { -; 4454 : for (i = 0; i < pixel_count; ++i) { -; 4455 : p[1] = (p[0] == tc[0] ? 0 : 65535); -; 4456 : p += 2; -; 4457 : } -; 4458 : } -; 4459 : else { -; 4460 : for (i = 0; i < pixel_count; ++i) { -; 4461 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4462 : p[3] = 0; -; 4463 : p += 4; -; 4464 : } -; 4465 : } -; 4466 : return 1; -; 4467 : } -; 4468 : -; 4469 : static int stbi__expand_png_palette(stbi__png* a, stbi_uc* palette, int len, int pal_img_n) -; 4470 : { -; 4471 : stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; -; 4472 : stbi_uc* p, * temp_out, * orig = a->out; -; 4473 : -; 4474 : p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0); -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4476 : -; 4477 : // between here and free(out) below, exitting would leak -; 4478 : temp_out = p; -; 4479 : -; 4480 : if (pal_img_n == 3) { -; 4481 : for (i = 0; i < pixel_count; ++i) { -; 4482 : int n = orig[i] * 4; -; 4483 : p[0] = palette[n]; -; 4484 : p[1] = palette[n + 1]; -; 4485 : p[2] = palette[n + 2]; -; 4486 : p += 3; -; 4487 : } -; 4488 : } -; 4489 : else { -; 4490 : for (i = 0; i < pixel_count; ++i) { -; 4491 : int n = orig[i] * 4; -; 4492 : p[0] = palette[n]; -; 4493 : p[1] = palette[n + 1]; -; 4494 : p[2] = palette[n + 2]; -; 4495 : p[3] = palette[n + 3]; -; 4496 : p += 4; -; 4497 : } -; 4498 : } -; 4499 : STBI_FREE(a->out); -; 4500 : a->out = temp_out; -; 4501 : -; 4502 : STBI_NOTUSED(len); -; 4503 : -; 4504 : return 1; -; 4505 : } -; 4506 : -; 4507 : static int stbi__unpremultiply_on_load_global = 0; -; 4508 : static int stbi__de_iphone_flag_global = 0; -; 4509 : -; 4510 : STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) -; 4511 : { -; 4512 : stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; -; 4513 : } -; 4514 : -; 4515 : STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) -; 4516 : { -; 4517 : stbi__de_iphone_flag_global = flag_true_if_should_convert; -; 4518 : } -; 4519 : -; 4520 : #ifndef STBI_THREAD_LOCAL -; 4521 : #define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global -; 4522 : #define stbi__de_iphone_flag stbi__de_iphone_flag_global -; 4523 : #else -; 4524 : static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; -; 4525 : static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; -; 4526 : -; 4527 : STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) -; 4528 : { -; 4529 : stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; -; 4530 : stbi__unpremultiply_on_load_set = 1; -; 4531 : } -; 4532 : -; 4533 : STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert) -; 4534 : { -; 4535 : stbi__de_iphone_flag_local = flag_true_if_should_convert; -; 4536 : stbi__de_iphone_flag_set = 1; -; 4537 : } -; 4538 : -; 4539 : #define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \ -; 4540 : ? stbi__unpremultiply_on_load_local \ -; 4541 : : stbi__unpremultiply_on_load_global) -; 4542 : #define stbi__de_iphone_flag (stbi__de_iphone_flag_set \ -; 4543 : ? stbi__de_iphone_flag_local \ -; 4544 : : stbi__de_iphone_flag_global) -; 4545 : #endif // STBI_THREAD_LOCAL -; 4546 : -; 4547 : static void stbi__de_iphone(stbi__png* z) -; 4548 : { -; 4549 : stbi__context* s = z->s; -; 4550 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4551 : stbi_uc* p = z->out; -; 4552 : -; 4553 : if (s->img_out_n == 3) { // convert bgr to rgb -; 4554 : for (i = 0; i < pixel_count; ++i) { -; 4555 : stbi_uc t = p[0]; -; 4556 : p[0] = p[2]; -; 4557 : p[2] = t; -; 4558 : p += 3; -; 4559 : } -; 4560 : } -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { -; 4566 : stbi_uc a = p[3]; -; 4567 : stbi_uc t = p[0]; -; 4568 : if (a) { -; 4569 : stbi_uc half = a / 2; -; 4570 : p[0] = (p[2] * 255 + half) / a; -; 4571 : p[1] = (p[1] * 255 + half) / a; -; 4572 : p[2] = (t * 255 + half) / a; -; 4573 : } -; 4574 : else { -; 4575 : p[0] = p[2]; -; 4576 : p[2] = t; -; 4577 : } -; 4578 : p += 4; -; 4579 : } -; 4580 : } -; 4581 : else { -; 4582 : // convert bgr to rgb -; 4583 : for (i = 0; i < pixel_count; ++i) { -; 4584 : stbi_uc t = p[0]; -; 4585 : p[0] = p[2]; -; 4586 : p[2] = t; -; 4587 : p += 4; -; 4588 : } -; 4589 : } -; 4590 : } -; 4591 : } -; 4592 : -; 4593 : #define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) -; 4594 : -; 4595 : static int stbi__parse_png_file(stbi__png* z, int scan, int req_comp) -; 4596 : { -; 4597 : stbi_uc palette[1024], pal_img_n = 0; -; 4598 : stbi_uc has_trans = 0, tc[3] = { 0 }; -; 4599 : stbi__uint16 tc16[3]; -; 4600 : stbi__uint32 ioff = 0, idata_limit = 0, i, pal_len = 0; -; 4601 : int first = 1, k, interlace = 0, color = 0, is_iphone = 0; -; 4602 : stbi__context* s = z->s; -; 4603 : -; 4604 : z->expanded = NULL; -; 4605 : z->idata = NULL; -; 4606 : z->out = NULL; -; 4607 : -; 4608 : if (!stbi__check_png_header(s)) return 0; -; 4609 : -; 4610 : if (scan == STBI__SCAN_type) return 1; -; 4611 : -; 4612 : for (;;) { -; 4613 : stbi__pngchunk c = stbi__get_chunk_header(s); -; 4614 : switch (c.type) { -; 4615 : case STBI__PNG_TYPE('C', 'g', 'B', 'I'): -; 4616 : is_iphone = 1; -; 4617 : stbi__skip(s, c.length); -; 4618 : break; -; 4619 : case STBI__PNG_TYPE('I', 'H', 'D', 'R'): { -; 4620 : int comp, filter; -; 4621 : if (!first) return stbi__err("multiple IHDR", "Corrupt PNG"); -; 4622 : first = 0; -; 4623 : if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG"); -; 4624 : s->img_x = stbi__get32be(s); -; 4625 : s->img_y = stbi__get32be(s); -; 4626 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4627 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4628 : z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only"); -; 4629 : color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype", "Corrupt PNG"); -; 4630 : if (color == 3 && z->depth == 16) return stbi__err("bad ctype", "Corrupt PNG"); -; 4631 : if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype", "Corrupt PNG"); -; 4632 : comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG"); -; 4633 : filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG"); -; 4634 : interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG"); -; 4635 : if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG"); -; 4636 : if (!pal_img_n) { -; 4637 : s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); -; 4638 : if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); -; 4639 : } -; 4640 : else { -; 4641 : // if paletted, then pal_n is our final components, and -; 4642 : // img_n is # components to decompress/filter. -; 4643 : s->img_n = 1; -; 4644 : if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large", "Corrupt PNG"); -; 4645 : } -; 4646 : // even with SCAN_header, have to scan to see if we have a tRNS -; 4647 : break; -; 4648 : } -; 4649 : -; 4650 : case STBI__PNG_TYPE('P', 'L', 'T', 'E'): { -; 4651 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4652 : if (c.length > 256 * 3) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4653 : pal_len = c.length / 3; -; 4654 : if (pal_len * 3 != c.length) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4655 : for (i = 0; i < pal_len; ++i) { -; 4656 : palette[i * 4 + 0] = stbi__get8(s); -; 4657 : palette[i * 4 + 1] = stbi__get8(s); -; 4658 : palette[i * 4 + 2] = stbi__get8(s); -; 4659 : palette[i * 4 + 3] = 255; -; 4660 : } -; 4661 : break; -; 4662 : } -; 4663 : -; 4664 : case STBI__PNG_TYPE('t', 'R', 'N', 'S'): { -; 4665 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4666 : if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG"); -; 4667 : if (pal_img_n) { -; 4668 : if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } -; 4669 : if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG"); -; 4670 : if (c.length > pal_len) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4671 : pal_img_n = 4; -; 4672 : for (i = 0; i < c.length; ++i) -; 4673 : palette[i * 4 + 3] = stbi__get8(s); -; 4674 : } -; 4675 : else { -; 4676 : if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG"); -; 4677 : if (c.length != (stbi__uint32)s->img_n * 2) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4678 : has_trans = 1; -; 4679 : // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. -; 4680 : if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } -; 4681 : if (z->depth == 16) { -; 4682 : for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is -; 4683 : } -; 4684 : else { -; 4685 : for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger -; 4686 : } -; 4687 : } -; 4688 : break; -; 4689 : } -; 4690 : -; 4691 : case STBI__PNG_TYPE('I', 'D', 'A', 'T'): { -; 4692 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4693 : if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG"); -; 4694 : if (scan == STBI__SCAN_header) { -; 4695 : // header scan definitely stops at first IDAT -; 4696 : if (pal_img_n) -; 4697 : s->img_n = pal_img_n; -; 4698 : return 1; -; 4699 : } -; 4700 : if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); -; 4701 : if ((int)(ioff + c.length) < (int)ioff) return 0; -; 4702 : if (ioff + c.length > idata_limit) { -; 4703 : stbi__uint32 idata_limit_old = idata_limit; -; 4704 : stbi_uc* p; -; 4705 : if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; -; 4706 : while (ioff + c.length > idata_limit) -; 4707 : idata_limit *= 2; -; 4708 : STBI_NOTUSED(idata_limit_old); -; 4709 : p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4710 : z->idata = p; -; 4711 : } -; 4712 : if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG"); -; 4713 : ioff += c.length; -; 4714 : break; -; 4715 : } -; 4716 : -; 4717 : case STBI__PNG_TYPE('I', 'E', 'N', 'D'): { -; 4718 : stbi__uint32 raw_len, bpl; -; 4719 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4720 : if (scan != STBI__SCAN_load) return 1; -; 4721 : if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG"); -; 4722 : // initial guess for decoded data size to avoid unnecessary reallocs -; 4723 : bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component -; 4724 : raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); -; 4726 : if (z->expanded == NULL) return 0; // zlib should set error -; 4727 : STBI_FREE(z->idata); z->idata = NULL; -; 4728 : if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans) -; 4729 : s->img_out_n = s->img_n + 1; -; 4730 : else -; 4731 : s->img_out_n = s->img_n; -; 4732 : if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; -; 4733 : if (has_trans) { -; 4734 : if (z->depth == 16) { -; 4735 : if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; -; 4736 : } -; 4737 : else { -; 4738 : if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; -; 4739 : } -; 4740 : } -; 4741 : if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) -; 4742 : stbi__de_iphone(z); -; 4743 : if (pal_img_n) { -; 4744 : // pal_img_n == 3 or 4 -; 4745 : s->img_n = pal_img_n; // record the actual colors we had -; 4746 : s->img_out_n = pal_img_n; -; 4747 : if (req_comp >= 3) s->img_out_n = req_comp; -; 4748 : if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) -; 4749 : return 0; -; 4750 : } -; 4751 : else if (has_trans) { -; 4752 : // non-paletted image with tRNS -> source image has (constant) alpha -; 4753 : ++s->img_n; -; 4754 : } -; 4755 : STBI_FREE(z->expanded); z->expanded = NULL; -; 4756 : // end of PNG chunk, read and skip CRC -; 4757 : stbi__get32be(s); -; 4758 : return 1; -; 4759 : } -; 4760 : -; 4761 : default: -; 4762 : // if critical, fail -; 4763 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4764 : if ((c.type & (1 << 29)) == 0) { -; 4765 : #ifndef STBI_NO_FAILURE_STRINGS -; 4766 : // not threadsafe -; 4767 : static char invalid_chunk[] = "XXXX PNG chunk not known"; -; 4768 : invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); -; 4769 : invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); -; 4770 : invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); -; 4771 : invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); -; 4772 : #endif -; 4773 : return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); -; 4774 : } -; 4775 : stbi__skip(s, c.length); -; 4776 : break; -; 4777 : } -; 4778 : // end of PNG chunk, read and skip CRC -; 4779 : stbi__get32be(s); -; 4780 : } -; 4781 : } -; 4782 : -; 4783 : static void* stbi__do_png(stbi__png* p, int* x, int* y, int* n, int req_comp, stbi__result_info* ri) -; 4784 : { -; 4785 : void* result = NULL; -; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { -; 4788 : if (p->depth <= 8) -; 4789 : ri->bits_per_channel = 8; -; 4790 : else if (p->depth == 16) -; 4791 : ri->bits_per_channel = 16; -; 4792 : else -; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); -; 4794 : result = p->out; -; 4795 : p->out = NULL; -; 4796 : if (req_comp && req_comp != p->s->img_out_n) { -; 4797 : if (ri->bits_per_channel == 8) -; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4799 : else -; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4801 : p->s->img_out_n = req_comp; -; 4802 : if (result == NULL) return result; -; 4803 : } -; 4804 : *x = p->s->img_x; -; 4805 : *y = p->s->img_y; -; 4806 : if (n) *n = p->s->img_n; -; 4807 : } -; 4808 : STBI_FREE(p->out); p->out = NULL; -; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; -; 4810 : STBI_FREE(p->idata); p->idata = NULL; -; 4811 : -; 4812 : return result; -; 4813 : } -; 4814 : -; 4815 : static void* stbi__png_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 4816 : { -; 4817 : stbi__png p; -; 4818 : p.s = s; -; 4819 : return stbi__do_png(&p, x, y, comp, req_comp, ri); -; 4820 : } -; 4821 : -; 4822 : static int stbi__png_test(stbi__context* s) -; 4823 : { -; 4824 : int r; -; 4825 : r = stbi__check_png_header(s); -; 4826 : stbi__rewind(s); -; 4827 : return r; -; 4828 : } -; 4829 : -; 4830 : static int stbi__png_info_raw(stbi__png* p, int* x, int* y, int* comp) -; 4831 : { -; 4832 : if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { -; 4833 : stbi__rewind(p->s); -; 4834 : return 0; -; 4835 : } -; 4836 : if (x) *x = p->s->img_x; -; 4837 : if (y) *y = p->s->img_y; -; 4838 : if (comp) *comp = p->s->img_n; -; 4839 : return 1; -; 4840 : } -; 4841 : -; 4842 : static int stbi__png_info(stbi__context* s, int* x, int* y, int* comp) -; 4843 : { -; 4844 : stbi__png p; -; 4845 : p.s = s; -; 4846 : return stbi__png_info_raw(&p, x, y, comp); -; 4847 : } -; 4848 : -; 4849 : static int stbi__png_is16(stbi__context* s) -; 4850 : { -; 4851 : stbi__png p; -; 4852 : p.s = s; -; 4853 : if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) -; 4854 : return 0; -; 4855 : if (p.depth != 16) { -; 4856 : stbi__rewind(p.s); -; 4857 : return 0; -; 4858 : } -; 4859 : return 1; -; 4860 : } -; 4861 : #endif -; 4862 : -; 4863 : // Microsoft/Windows BMP image -; 4864 : -; 4865 : #ifndef STBI_NO_BMP -; 4866 : static int stbi__bmp_test_raw(stbi__context* s) -; 4867 : { -; 4868 : int r; -; 4869 : int sz; -; 4870 : if (stbi__get8(s) != 'B') return 0; -; 4871 : if (stbi__get8(s) != 'M') return 0; -; 4872 : stbi__get32le(s); // discard filesize -; 4873 : stbi__get16le(s); // discard reserved -; 4874 : stbi__get16le(s); // discard reserved -; 4875 : stbi__get32le(s); // discard data offset -; 4876 : sz = stbi__get32le(s); -; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); -; 4878 : return r; -; 4879 : } -; 4880 : -; 4881 : static int stbi__bmp_test(stbi__context* s) -; 4882 : { -; 4883 : int r = stbi__bmp_test_raw(s); -; 4884 : stbi__rewind(s); -; 4885 : return r; -; 4886 : } -; 4887 : -; 4888 : // returns 0..31 for the highest set bit -; 4889 : static int stbi__high_bit(unsigned int z) -; 4890 : { -; 4891 : int n = 0; -; 4892 : if (z == 0) return -1; -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } -; 4898 : return n; -; 4899 : } -; 4900 : -; 4901 : static int stbi__bitcount(unsigned int a) -; 4902 : { -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits -; 4908 : return a & 0xff; -; 4909 : } -; 4910 : -; 4911 : // extract an arbitrarily-aligned N-bit value (N=bits) -; 4912 : // from v, and then make it 8-bits long and fractionally -; 4913 : // extend it to full full range. -; 4914 : static int stbi__shiftsigned(unsigned int v, int shift, int bits) -; 4915 : { -; 4916 : static unsigned int mul_table[9] = { -; 4917 : 0, -; 4918 : 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, -; 4919 : 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, -; 4920 : }; -; 4921 : static unsigned int shift_table[9] = { -; 4922 : 0, 0,0,1,0,2,4,6,0, -; 4923 : }; -; 4924 : if (shift < 0) -; 4925 : v <<= -shift; -; 4926 : else -; 4927 : v >>= shift; -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; -; 4932 : } -; 4933 : -; 4934 : typedef struct -; 4935 : { -; 4936 : int bpp, offset, hsz; -; 4937 : unsigned int mr, mg, mb, ma, all_a; -; 4938 : int extra_read; -; 4939 : } stbi__bmp_data; -; 4940 : -; 4941 : static int stbi__bmp_set_mask_defaults(stbi__bmp_data* info, int compress) -; 4942 : { -; 4943 : // BI_BITFIELDS specifies masks explicitly, don't override -; 4944 : if (compress == 3) -; 4945 : return 1; -; 4946 : -; 4947 : if (compress == 0) { -; 4948 : if (info->bpp == 16) { -; 4949 : info->mr = 31u << 10; -; 4950 : info->mg = 31u << 5; -; 4951 : info->mb = 31u << 0; -; 4952 : } -; 4953 : else if (info->bpp == 32) { -; 4954 : info->mr = 0xffu << 16; -; 4955 : info->mg = 0xffu << 8; -; 4956 : info->mb = 0xffu << 0; -; 4957 : info->ma = 0xffu << 24; -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 -; 4959 : } -; 4960 : else { -; 4961 : // otherwise, use defaults, which is all-0 -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; -; 4963 : } -; 4964 : return 1; -; 4965 : } -; 4966 : return 0; // error -; 4967 : } -; 4968 : -; 4969 : static void* stbi__bmp_parse_header(stbi__context* s, stbi__bmp_data* info) -; 4970 : { -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); -; 4973 : stbi__get32le(s); // discard filesize -; 4974 : stbi__get16le(s); // discard reserved -; 4975 : stbi__get16le(s); // discard reserved -; 4976 : info->offset = stbi__get32le(s); -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; -; 4979 : info->extra_read = 14; -; 4980 : -; 4981 : if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); -; 4982 : -; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); -; 4984 : if (hsz == 12) { -; 4985 : s->img_x = stbi__get16le(s); -; 4986 : s->img_y = stbi__get16le(s); -; 4987 : } -; 4988 : else { -; 4989 : s->img_x = stbi__get32le(s); -; 4990 : s->img_y = stbi__get32le(s); -; 4991 : } -; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); -; 4993 : info->bpp = stbi__get16le(s); -; 4994 : if (hsz != 12) { -; 4995 : int compress = stbi__get32le(s); -; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); -; 4997 : if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes -; 4998 : if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel -; 4999 : stbi__get32le(s); // discard sizeof -; 5000 : stbi__get32le(s); // discard hres -; 5001 : stbi__get32le(s); // discard vres -; 5002 : stbi__get32le(s); // discard colorsused -; 5003 : stbi__get32le(s); // discard max important -; 5004 : if (hsz == 40 || hsz == 56) { -; 5005 : if (hsz == 56) { -; 5006 : stbi__get32le(s); -; 5007 : stbi__get32le(s); -; 5008 : stbi__get32le(s); -; 5009 : stbi__get32le(s); -; 5010 : } -; 5011 : if (info->bpp == 16 || info->bpp == 32) { -; 5012 : if (compress == 0) { -; 5013 : stbi__bmp_set_mask_defaults(info, compress); -; 5014 : } -; 5015 : else if (compress == 3) { -; 5016 : info->mr = stbi__get32le(s); -; 5017 : info->mg = stbi__get32le(s); -; 5018 : info->mb = stbi__get32le(s); -; 5019 : info->extra_read += 12; -; 5020 : // not documented, but generated by photoshop and handled by mspaint -; 5021 : if (info->mr == info->mg && info->mg == info->mb) { -; 5022 : // ?!?!? -; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5024 : } -; 5025 : } -; 5026 : else -; 5027 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5028 : } -; 5029 : } -; 5030 : else { -; 5031 : // V4/V5 header -; 5032 : int i; -; 5033 : if (hsz != 108 && hsz != 124) -; 5034 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5035 : info->mr = stbi__get32le(s); -; 5036 : info->mg = stbi__get32le(s); -; 5037 : info->mb = stbi__get32le(s); -; 5038 : info->ma = stbi__get32le(s); -; 5039 : if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs -; 5040 : stbi__bmp_set_mask_defaults(info, compress); -; 5041 : stbi__get32le(s); // discard color space -; 5042 : for (i = 0; i < 12; ++i) -; 5043 : stbi__get32le(s); // discard color space parameters -; 5044 : if (hsz == 124) { -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; -; 5053 : } -; 5054 : -; 5055 : static void* stbi__bmp_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5056 : { -; 5057 : stbi_uc* out; -; 5058 : unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a; -; 5059 : stbi_uc pal[256][4]; -; 5060 : int psize = 0, i, j, width; -; 5061 : int flip_vertically, pad, target; -; 5062 : stbi__bmp_data info; -; 5063 : STBI_NOTUSED(ri); -; 5064 : -; 5065 : info.all_a = 255; -; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) -; 5067 : return NULL; // error code already set -; 5068 : -; 5069 : flip_vertically = ((int)s->img_y) > 0; -; 5070 : s->img_y = abs((int)s->img_y); -; 5071 : -; 5072 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5073 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5074 : -; 5075 : mr = info.mr; -; 5076 : mg = info.mg; -; 5077 : mb = info.mb; -; 5078 : ma = info.ma; -; 5079 : all_a = info.all_a; -; 5080 : -; 5081 : if (info.hsz == 12) { -; 5082 : if (info.bpp < 24) -; 5083 : psize = (info.offset - info.extra_read - 24) / 3; -; 5084 : } -; 5085 : else { -; 5086 : if (info.bpp < 16) -; 5087 : psize = (info.offset - info.extra_read - info.hsz) >> 2; -; 5088 : } -; 5089 : if (psize == 0) { -; 5090 : // accept some number of extra bytes after the header, but if the offset points either to before -; 5091 : // the header ends or implies a large amount of extra data, reject the file as malformed -; 5092 : int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); -; 5093 : int header_limit = 1024; // max we actually read is below 256 bytes currently. -; 5094 : int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. -; 5095 : if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { -; 5096 : return stbi__errpuc("bad header", "Corrupt BMP"); -; 5097 : } -; 5098 : // we established that bytes_read_so_far is positive and sensible. -; 5099 : // the first half of this test rejects offsets that are either too small positives, or -; 5100 : // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn -; 5101 : // ensures the number computed in the second half of the test can't overflow. -; 5102 : if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { -; 5103 : return stbi__errpuc("bad offset", "Corrupt BMP"); -; 5104 : } -; 5105 : else { -; 5106 : stbi__skip(s, info.offset - bytes_read_so_far); -; 5107 : } -; 5108 : } -; 5109 : -; 5110 : if (info.bpp == 24 && ma == 0xff000000) -; 5111 : s->img_n = 3; -; 5112 : else -; 5113 : s->img_n = ma ? 4 : 3; -; 5114 : if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 -; 5115 : target = req_comp; -; 5116 : else -; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert -; 5118 : -; 5119 : // sanity-check size -; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) -; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); -; 5122 : -; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); -; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5125 : if (info.bpp < 16) { -; 5126 : int z = 0; -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } -; 5128 : for (i = 0; i < psize; ++i) { -; 5129 : pal[i][2] = stbi__get8(s); -; 5130 : pal[i][1] = stbi__get8(s); -; 5131 : pal[i][0] = stbi__get8(s); -; 5132 : if (info.hsz != 12) stbi__get8(s); -; 5133 : pal[i][3] = 255; -; 5134 : } -; 5135 : stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); -; 5136 : if (info.bpp == 1) width = (s->img_x + 7) >> 3; -; 5137 : else if (info.bpp == 4) width = (s->img_x + 1) >> 1; -; 5138 : else if (info.bpp == 8) width = s->img_x; -; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } -; 5140 : pad = (-width) & 3; -; 5141 : if (info.bpp == 1) { -; 5142 : for (j = 0; j < (int)s->img_y; ++j) { -; 5143 : int bit_offset = 7, v = stbi__get8(s); -; 5144 : for (i = 0; i < (int)s->img_x; ++i) { -; 5145 : int color = (v >> bit_offset) & 0x1; -; 5146 : out[z++] = pal[color][0]; -; 5147 : out[z++] = pal[color][1]; -; 5148 : out[z++] = pal[color][2]; -; 5149 : if (target == 4) out[z++] = 255; -; 5150 : if (i + 1 == (int)s->img_x) break; -; 5151 : if ((--bit_offset) < 0) { -; 5152 : bit_offset = 7; -; 5153 : v = stbi__get8(s); -; 5154 : } -; 5155 : } -; 5156 : stbi__skip(s, pad); -; 5157 : } -; 5158 : } -; 5159 : else { -; 5160 : for (j = 0; j < (int)s->img_y; ++j) { -; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { -; 5162 : int v = stbi__get8(s), v2 = 0; -; 5163 : if (info.bpp == 4) { -; 5164 : v2 = v & 15; -; 5165 : v >>= 4; -; 5166 : } -; 5167 : out[z++] = pal[v][0]; -; 5168 : out[z++] = pal[v][1]; -; 5169 : out[z++] = pal[v][2]; -; 5170 : if (target == 4) out[z++] = 255; -; 5171 : if (i + 1 == (int)s->img_x) break; -; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; -; 5173 : out[z++] = pal[v][0]; -; 5174 : out[z++] = pal[v][1]; -; 5175 : out[z++] = pal[v][2]; -; 5176 : if (target == 4) out[z++] = 255; -; 5177 : } -; 5178 : stbi__skip(s, pad); -; 5179 : } -; 5180 : } -; 5181 : } -; 5182 : else { -; 5183 : int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0; -; 5184 : int z = 0; -; 5185 : int easy = 0; -; 5186 : stbi__skip(s, info.offset - info.extra_read - info.hsz); -; 5187 : if (info.bpp == 24) width = 3 * s->img_x; -; 5188 : else if (info.bpp == 16) width = 2 * s->img_x; -; 5189 : else /* bpp = 32 and pad = 0 */ width = 0; -; 5190 : pad = (-width) & 3; -; 5191 : if (info.bpp == 24) { -; 5192 : easy = 1; -; 5193 : } -; 5194 : else if (info.bpp == 32) { -; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) -; 5196 : easy = 2; -; 5197 : } -; 5198 : if (!easy) { -; 5199 : if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); -; 5205 : if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5206 : } -; 5207 : for (j = 0; j < (int)s->img_y; ++j) { -; 5208 : if (easy) { -; 5209 : for (i = 0; i < (int)s->img_x; ++i) { -; 5210 : unsigned char a; -; 5211 : out[z + 2] = stbi__get8(s); -; 5212 : out[z + 1] = stbi__get8(s); -; 5213 : out[z + 0] = stbi__get8(s); -; 5214 : z += 3; -; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); -; 5216 : all_a |= a; -; 5217 : if (target == 4) out[z++] = a; -; 5218 : } -; 5219 : } -; 5220 : else { -; 5221 : int bpp = info.bpp; -; 5222 : for (i = 0; i < (int)s->img_x; ++i) { -; 5223 : stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s)); -; 5224 : unsigned int a; -; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); -; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); -; 5229 : all_a |= a; -; 5230 : if (target == 4) out[z++] = STBI__BYTECAST(a); -; 5231 : } -; 5232 : } -; 5233 : stbi__skip(s, pad); -; 5234 : } -; 5235 : } -; 5236 : -; 5237 : // if alpha channel is all 0s, replace with all 255s -; 5238 : if (target == 4 && all_a == 0) -; 5239 : for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4) -; 5240 : out[i] = 255; -; 5241 : -; 5242 : if (flip_vertically) { -; 5243 : stbi_uc t; -; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { -; 5245 : stbi_uc* p1 = out + j * s->img_x * target; -; 5246 : stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target; -; 5247 : for (i = 0; i < (int)s->img_x * target; ++i) { -; 5248 : t = p1[i]; p1[i] = p2[i]; p2[i] = t; -; 5249 : } -; 5250 : } -; 5251 : } -; 5252 : -; 5253 : if (req_comp && req_comp != target) { -; 5254 : out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); -; 5255 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5256 : } -; 5257 : -; 5258 : *x = s->img_x; -; 5259 : *y = s->img_y; -; 5260 : if (comp) *comp = s->img_n; -; 5261 : return out; -; 5262 : } -; 5263 : #endif -; 5264 : -; 5265 : // Targa Truevision - TGA -; 5266 : // by Jonathan Dummer -; 5267 : #ifndef STBI_NO_TGA -; 5268 : // returns STBI_rgb or whatever, 0 on error -; 5269 : static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -; 5270 : { -; 5271 : // only RGB or RGBA (incl. 16bit) or grey allowed -; 5272 : if (is_rgb16) *is_rgb16 = 0; -; 5273 : switch (bits_per_pixel) { -; 5274 : case 8: return STBI_grey; -; 5275 : case 16: if (is_grey) return STBI_grey_alpha; -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; -; 5278 : return STBI_rgb; -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; -; 5281 : default: return 0; -; 5282 : } -; 5283 : } -; 5284 : -; 5285 : static int stbi__tga_info(stbi__context* s, int* x, int* y, int* comp) -; 5286 : { -; 5287 : int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; -; 5288 : int sz, tga_colormap_type; -; 5289 : stbi__get8(s); // discard Offset -; 5290 : tga_colormap_type = stbi__get8(s); // colormap type -; 5291 : if (tga_colormap_type > 1) { -; 5292 : stbi__rewind(s); -; 5293 : return 0; // only RGB or indexed allowed -; 5294 : } -; 5295 : tga_image_type = stbi__get8(s); // image type -; 5296 : if (tga_colormap_type == 1) { // colormapped (paletted) image -; 5297 : if (tga_image_type != 1 && tga_image_type != 9) { -; 5298 : stbi__rewind(s); -; 5299 : return 0; -; 5300 : } -; 5301 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5302 : sz = stbi__get8(s); // check bits per palette color entry -; 5303 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) { -; 5304 : stbi__rewind(s); -; 5305 : return 0; -; 5306 : } -; 5307 : stbi__skip(s, 4); // skip image x and y origin -; 5308 : tga_colormap_bpp = sz; -; 5309 : } -; 5310 : else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE -; 5311 : if ((tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11)) { -; 5312 : stbi__rewind(s); -; 5313 : return 0; // only RGB or grey allowed, +/- RLE -; 5314 : } -; 5315 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5316 : tga_colormap_bpp = 0; -; 5317 : } -; 5318 : tga_w = stbi__get16le(s); -; 5319 : if (tga_w < 1) { -; 5320 : stbi__rewind(s); -; 5321 : return 0; // test width -; 5322 : } -; 5323 : tga_h = stbi__get16le(s); -; 5324 : if (tga_h < 1) { -; 5325 : stbi__rewind(s); -; 5326 : return 0; // test height -; 5327 : } -; 5328 : tga_bits_per_pixel = stbi__get8(s); // bits per pixel -; 5329 : stbi__get8(s); // ignore alpha bits -; 5330 : if (tga_colormap_bpp != 0) { -; 5331 : if ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { -; 5332 : // when using a colormap, tga_bits_per_pixel is the size of the indexes -; 5333 : // I don't think anything but 8 or 16bit indexes makes sense -; 5334 : stbi__rewind(s); -; 5335 : return 0; -; 5336 : } -; 5337 : tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); -; 5338 : } -; 5339 : else { -; 5340 : tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); -; 5341 : } -; 5342 : if (!tga_comp) { -; 5343 : stbi__rewind(s); -; 5344 : return 0; -; 5345 : } -; 5346 : if (x) *x = tga_w; -; 5347 : if (y) *y = tga_h; -; 5348 : if (comp) *comp = tga_comp; -; 5349 : return 1; // seems to have passed everything -; 5350 : } -; 5351 : -; 5352 : static int stbi__tga_test(stbi__context* s) -; 5353 : { -; 5354 : int res = 0; -; 5355 : int sz, tga_color_type; -; 5356 : stbi__get8(s); // discard Offset -; 5357 : tga_color_type = stbi__get8(s); // color type -; 5358 : if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed -; 5359 : sz = stbi__get8(s); // image type -; 5360 : if (tga_color_type == 1) { // colormapped (paletted) image -; 5361 : if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 -; 5362 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5363 : sz = stbi__get8(s); // check bits per palette color entry -; 5364 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5365 : stbi__skip(s, 4); // skip image x and y origin -; 5366 : } -; 5367 : else { // "normal" image w/o colormap -; 5368 : if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE -; 5369 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5370 : } -; 5371 : if (stbi__get16le(s) < 1) goto errorEnd; // test width -; 5372 : if (stbi__get16le(s) < 1) goto errorEnd; // test height -; 5373 : sz = stbi__get8(s); // bits per pixel -; 5374 : if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index -; 5375 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5376 : -; 5377 : res = 1; // if we got this far, everything's good and we can return 1 instead of 0 -; 5378 : -; 5379 : errorEnd: -; 5380 : stbi__rewind(s); -; 5381 : return res; -; 5382 : } -; 5383 : -; 5384 : // read 16bit value and convert to 24bit RGB -; 5385 : static void stbi__tga_read_rgb16(stbi__context* s, stbi_uc* out) -; 5386 : { -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); -; 5397 : -; 5398 : // some people claim that the most significant bit might be used for alpha -; 5399 : // (possibly if an alpha-bit is set in the "image descriptor byte") -; 5400 : // but that only made 16bit test images completely translucent.. -; 5401 : // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -; 5402 : } -; 5403 : -; 5404 : static void* stbi__tga_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5405 : { -; 5406 : // read in the TGA header stuff -; 5407 : int tga_offset = stbi__get8(s); -; 5408 : int tga_indexed = stbi__get8(s); -; 5409 : int tga_image_type = stbi__get8(s); -; 5410 : int tga_is_RLE = 0; -; 5411 : int tga_palette_start = stbi__get16le(s); -; 5412 : int tga_palette_len = stbi__get16le(s); -; 5413 : int tga_palette_bits = stbi__get8(s); -; 5414 : int tga_x_origin = stbi__get16le(s); -; 5415 : int tga_y_origin = stbi__get16le(s); -; 5416 : int tga_width = stbi__get16le(s); -; 5417 : int tga_height = stbi__get16le(s); -; 5418 : int tga_bits_per_pixel = stbi__get8(s); -; 5419 : int tga_comp, tga_rgb16 = 0; -; 5420 : int tga_inverted = stbi__get8(s); -; 5421 : // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) -; 5422 : // image data -; 5423 : unsigned char* tga_data; -; 5424 : unsigned char* tga_palette = NULL; -; 5425 : int i, j; -; 5426 : unsigned char raw_data[4] = { 0 }; -; 5427 : int RLE_count = 0; -; 5428 : int RLE_repeating = 0; -; 5429 : int read_next_pixel = 1; -; 5430 : STBI_NOTUSED(ri); -; 5431 : STBI_NOTUSED(tga_x_origin); // @TODO -; 5432 : STBI_NOTUSED(tga_y_origin); // @TODO -; 5433 : -; 5434 : if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5435 : if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5436 : -; 5437 : // do a tiny bit of precessing -; 5438 : if (tga_image_type >= 8) -; 5439 : { -; 5440 : tga_image_type -= 8; -; 5441 : tga_is_RLE = 1; -; 5442 : } -; 5443 : tga_inverted = 1 - ((tga_inverted >> 5) & 1); -; 5444 : -; 5445 : // If I'm paletted, then I'll use the number of bits from the palette -; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); -; 5447 : else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); -; 5448 : -; 5449 : if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency -; 5450 : return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); -; 5451 : -; 5452 : // tga info -; 5453 : *x = tga_width; -; 5454 : *y = tga_height; -; 5455 : if (comp) *comp = tga_comp; -; 5456 : -; 5457 : if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) -; 5458 : return stbi__errpuc("too large", "Corrupt TGA"); -; 5459 : -; 5460 : tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); -; 5461 : if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); -; 5462 : -; 5463 : // skip to the data's starting position (offset usually = 0) -; 5464 : stbi__skip(s, tga_offset); -; 5465 : -; 5466 : if (!tga_indexed && !tga_is_RLE && !tga_rgb16) { -; 5467 : for (i = 0; i < tga_height; ++i) { -; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; -; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; -; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); -; 5471 : } -; 5472 : } -; 5473 : else { -; 5474 : // do I need to load a palette? -; 5475 : if (tga_indexed) -; 5476 : { -; 5477 : if (tga_palette_len == 0) { /* you have to have at least one entry! */ -; 5478 : STBI_FREE(tga_data); -; 5479 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5480 : } -; 5481 : -; 5482 : // any data to skip? (offset usually = 0) -; 5483 : stbi__skip(s, tga_palette_start); -; 5484 : // load the palette -; 5485 : tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); -; 5486 : if (!tga_palette) { -; 5487 : STBI_FREE(tga_data); -; 5488 : return stbi__errpuc("outofmem", "Out of memory"); -; 5489 : } -; 5490 : if (tga_rgb16) { -; 5491 : stbi_uc* pal_entry = tga_palette; -; 5492 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5493 : for (i = 0; i < tga_palette_len; ++i) { -; 5494 : stbi__tga_read_rgb16(s, pal_entry); -; 5495 : pal_entry += tga_comp; -; 5496 : } -; 5497 : } -; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { -; 5499 : STBI_FREE(tga_data); -; 5500 : STBI_FREE(tga_palette); -; 5501 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) -; 5506 : { -; 5507 : // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? -; 5508 : if (tga_is_RLE) -; 5509 : { -; 5510 : if (RLE_count == 0) -; 5511 : { -; 5512 : // yep, get the next byte as a RLE command -; 5513 : int RLE_cmd = stbi__get8(s); -; 5514 : RLE_count = 1 + (RLE_cmd & 127); -; 5515 : RLE_repeating = RLE_cmd >> 7; -; 5516 : read_next_pixel = 1; -; 5517 : } -; 5518 : else if (!RLE_repeating) -; 5519 : { -; 5520 : read_next_pixel = 1; -; 5521 : } -; 5522 : } -; 5523 : else -; 5524 : { -; 5525 : read_next_pixel = 1; -; 5526 : } -; 5527 : // OK, if I need to read a pixel, do it now -; 5528 : if (read_next_pixel) -; 5529 : { -; 5530 : // load however much data we did have -; 5531 : if (tga_indexed) -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); -; 5535 : if (pal_idx >= tga_palette_len) { -; 5536 : // invalid index -; 5537 : pal_idx = 0; -; 5538 : } -; 5539 : pal_idx *= tga_comp; -; 5540 : for (j = 0; j < tga_comp; ++j) { -; 5541 : raw_data[j] = tga_palette[pal_idx + j]; -; 5542 : } -; 5543 : } -; 5544 : else if (tga_rgb16) { -; 5545 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5546 : stbi__tga_read_rgb16(s, raw_data); -; 5547 : } -; 5548 : else { -; 5549 : // read in the data raw -; 5550 : for (j = 0; j < tga_comp; ++j) { -; 5551 : raw_data[j] = stbi__get8(s); -; 5552 : } -; 5553 : } -; 5554 : // clear the reading flag for the next pixel -; 5555 : read_next_pixel = 0; -; 5556 : } // end of reading a pixel -; 5557 : -; 5558 : // copy data -; 5559 : for (j = 0; j < tga_comp; ++j) -; 5560 : tga_data[i * tga_comp + j] = raw_data[j]; -; 5561 : -; 5562 : // in case we're in RLE mode, keep counting down -; 5563 : --RLE_count; -; 5564 : } -; 5565 : // do I need to invert the image? -; 5566 : if (tga_inverted) -; 5567 : { -; 5568 : for (j = 0; j * 2 < tga_height; ++j) -; 5569 : { -; 5570 : int index1 = j * tga_width * tga_comp; -; 5571 : int index2 = (tga_height - 1 - j) * tga_width * tga_comp; -; 5572 : for (i = tga_width * tga_comp; i > 0; --i) -; 5573 : { -; 5574 : unsigned char temp = tga_data[index1]; -; 5575 : tga_data[index1] = tga_data[index2]; -; 5576 : tga_data[index2] = temp; -; 5577 : ++index1; -; 5578 : ++index2; -; 5579 : } -; 5580 : } -; 5581 : } -; 5582 : // clear my palette, if I had one -; 5583 : if (tga_palette != NULL) -; 5584 : { -; 5585 : STBI_FREE(tga_palette); -; 5586 : } -; 5587 : } -; 5588 : -; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order -; 5590 : if (tga_comp >= 3 && !tga_rgb16) -; 5591 : { -; 5592 : unsigned char* tga_pixel = tga_data; -; 5593 : for (i = 0; i < tga_width * tga_height; ++i) -; 5594 : { -; 5595 : unsigned char temp = tga_pixel[0]; -; 5596 : tga_pixel[0] = tga_pixel[2]; -; 5597 : tga_pixel[2] = temp; -; 5598 : tga_pixel += tga_comp; -; 5599 : } -; 5600 : } -; 5601 : -; 5602 : // convert to target component count -; 5603 : if (req_comp && req_comp != tga_comp) -; 5604 : tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); -; 5605 : -; 5606 : // the things I do to get rid of an error message, and yet keep -; 5607 : // Microsoft's C compilers happy... [8^( -; 5608 : tga_palette_start = tga_palette_len = tga_palette_bits = -; 5609 : tga_x_origin = tga_y_origin = 0; -; 5610 : STBI_NOTUSED(tga_palette_start); -; 5611 : // OK, done -; 5612 : return tga_data; -; 5613 : } -; 5614 : #endif -; 5615 : -; 5616 : // ************************************************************************************************* -; 5617 : // Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB -; 5618 : -; 5619 : #ifndef STBI_NO_PSD -; 5620 : static int stbi__psd_test(stbi__context* s) -; 5621 : { -; 5622 : int r = (stbi__get32be(s) == 0x38425053); -; 5623 : stbi__rewind(s); -; 5624 : return r; -; 5625 : } -; 5626 : -; 5627 : static int stbi__psd_decode_rle(stbi__context* s, stbi_uc* p, int pixelCount) -; 5628 : { -; 5629 : int count, nleft, len; -; 5630 : -; 5631 : count = 0; -; 5632 : while ((nleft = pixelCount - count) > 0) { -; 5633 : len = stbi__get8(s); -; 5634 : if (len == 128) { -; 5635 : // No-op. -; 5636 : } -; 5637 : else if (len < 128) { -; 5638 : // Copy next len+1 bytes literally. -; 5639 : len++; -; 5640 : if (len > nleft) return 0; // corrupt data -; 5641 : count += len; -; 5642 : while (len) { -; 5643 : *p = stbi__get8(s); -; 5644 : p += 4; -; 5645 : len--; -; 5646 : } -; 5647 : } -; 5648 : else if (len > 128) { -; 5649 : stbi_uc val; -; 5650 : // Next -len+1 bytes in the dest are replicated from next source byte. -; 5651 : // (Interpret len as a negative 8-bit int.) -; 5652 : len = 257 - len; -; 5653 : if (len > nleft) return 0; // corrupt data -; 5654 : val = stbi__get8(s); -; 5655 : count += len; -; 5656 : while (len) { -; 5657 : *p = val; -; 5658 : p += 4; -; 5659 : len--; -; 5660 : } -; 5661 : } -; 5662 : } -; 5663 : -; 5664 : return 1; -; 5665 : } -; 5666 : -; 5667 : static void* stbi__psd_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc) -; 5668 : { -; 5669 : int pixelCount; -; 5670 : int channelCount, compression; -; 5671 : int channel, i; -; 5672 : int bitdepth; -; 5673 : int w, h; -; 5674 : stbi_uc* out; -; 5675 : STBI_NOTUSED(ri); -; 5676 : -; 5677 : // Check identifier -; 5678 : if (stbi__get32be(s) != 0x38425053) // "8BPS" -; 5679 : return stbi__errpuc("not PSD", "Corrupt PSD image"); -; 5680 : -; 5681 : // Check file type version. -; 5682 : if (stbi__get16be(s) != 1) -; 5683 : return stbi__errpuc("wrong version", "Unsupported version of PSD image"); -; 5684 : -; 5685 : // Skip 6 reserved bytes. -; 5686 : stbi__skip(s, 6); -; 5687 : -; 5688 : // Read the number of channels (R, G, B, A, etc). -; 5689 : channelCount = stbi__get16be(s); -; 5690 : if (channelCount < 0 || channelCount > 16) -; 5691 : return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); -; 5692 : -; 5693 : // Read the rows and columns of the image. -; 5694 : h = stbi__get32be(s); -; 5695 : w = stbi__get32be(s); -; 5696 : -; 5697 : if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5698 : if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5699 : -; 5700 : // Make sure the depth is 8 bits. -; 5701 : bitdepth = stbi__get16be(s); -; 5702 : if (bitdepth != 8 && bitdepth != 16) -; 5703 : return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); -; 5704 : -; 5705 : // Make sure the color mode is RGB. -; 5706 : // Valid options are: -; 5707 : // 0: Bitmap -; 5708 : // 1: Grayscale -; 5709 : // 2: Indexed color -; 5710 : // 3: RGB color -; 5711 : // 4: CMYK color -; 5712 : // 7: Multichannel -; 5713 : // 8: Duotone -; 5714 : // 9: Lab color -; 5715 : if (stbi__get16be(s) != 3) -; 5716 : return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); -; 5717 : -; 5718 : // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) -; 5719 : stbi__skip(s, stbi__get32be(s)); -; 5720 : -; 5721 : // Skip the image resources. (resolution, pen tool paths, etc) -; 5722 : stbi__skip(s, stbi__get32be(s)); -; 5723 : -; 5724 : // Skip the reserved data. -; 5725 : stbi__skip(s, stbi__get32be(s)); -; 5726 : -; 5727 : // Find out if the data is compressed. -; 5728 : // Known values: -; 5729 : // 0: no compression -; 5730 : // 1: RLE compressed -; 5731 : compression = stbi__get16be(s); -; 5732 : if (compression > 1) -; 5733 : return stbi__errpuc("bad compression", "PSD has an unknown compression format"); -; 5734 : -; 5735 : // Check size -; 5736 : if (!stbi__mad3sizes_valid(4, w, h, 0)) -; 5737 : return stbi__errpuc("too large", "Corrupt PSD"); -; 5738 : -; 5739 : // Create the destination image. -; 5740 : -; 5741 : if (!compression && bitdepth == 16 && bpc == 16) { -; 5742 : out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0); -; 5743 : ri->bits_per_channel = 16; -; 5744 : } -; 5745 : else -; 5746 : out = (stbi_uc*)stbi__malloc(4 * w * h); -; 5747 : -; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5749 : pixelCount = w * h; -; 5750 : -; 5751 : // Initialize the data to zero. -; 5752 : //memset( out, 0, pixelCount * 4 ); -; 5753 : -; 5754 : // Finally, the image data. -; 5755 : if (compression) { -; 5756 : // RLE as used by .PSD and .TIFF -; 5757 : // Loop until you get the number of unpacked bytes you are expecting: -; 5758 : // Read the next source byte into n. -; 5759 : // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. -; 5760 : // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. -; 5761 : // Else if n is 128, noop. -; 5762 : // Endloop -; 5763 : -; 5764 : // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, -; 5765 : // which we're going to just skip. -; 5766 : stbi__skip(s, h * channelCount * 2); -; 5767 : -; 5768 : // Read the RLE data by channel. -; 5769 : for (channel = 0; channel < 4; channel++) { -; 5770 : stbi_uc* p; -; 5771 : -; 5772 : p = out + channel; -; 5773 : if (channel >= channelCount) { -; 5774 : // Fill this channel with default data. -; 5775 : for (i = 0; i < pixelCount; i++, p += 4) -; 5776 : *p = (channel == 3 ? 255 : 0); -; 5777 : } -; 5778 : else { -; 5779 : // Read the RLE data. -; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { -; 5781 : STBI_FREE(out); -; 5782 : return stbi__errpuc("corrupt", "bad RLE data"); -; 5783 : } -; 5784 : } -; 5785 : } -; 5786 : } -; 5787 : else { -; 5788 : // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) -; 5789 : // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. -; 5790 : -; 5791 : // Read the data by channel. -; 5792 : for (channel = 0; channel < 4; channel++) { -; 5793 : if (channel >= channelCount) { -; 5794 : // Fill this channel with default data. -; 5795 : if (bitdepth == 16 && bpc == 16) { -; 5796 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5797 : stbi__uint16 val = channel == 3 ? 65535 : 0; -; 5798 : for (i = 0; i < pixelCount; i++, q += 4) -; 5799 : *q = val; -; 5800 : } -; 5801 : else { -; 5802 : stbi_uc* p = out + channel; -; 5803 : stbi_uc val = channel == 3 ? 255 : 0; -; 5804 : for (i = 0; i < pixelCount; i++, p += 4) -; 5805 : *p = val; -; 5806 : } -; 5807 : } -; 5808 : else { -; 5809 : if (ri->bits_per_channel == 16) { // output bpc -; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5811 : for (i = 0; i < pixelCount; i++, q += 4) -; 5812 : *q = (stbi__uint16)stbi__get16be(s); -; 5813 : } -; 5814 : else { -; 5815 : stbi_uc* p = out + channel; -; 5816 : if (bitdepth == 16) { // input bpc -; 5817 : for (i = 0; i < pixelCount; i++, p += 4) -; 5818 : *p = (stbi_uc)(stbi__get16be(s) >> 8); -; 5819 : } -; 5820 : else { -; 5821 : for (i = 0; i < pixelCount; i++, p += 4) -; 5822 : *p = stbi__get8(s); -; 5823 : } -; 5824 : } -; 5825 : } -; 5826 : } -; 5827 : } -; 5828 : -; 5829 : // remove weird white matte from PSD -; 5830 : if (channelCount >= 4) { -; 5831 : if (ri->bits_per_channel == 16) { -; 5832 : for (i = 0; i < w * h; ++i) { -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); -; 5841 : } -; 5842 : } -; 5843 : } -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); -; 5854 : } -; 5855 : } -; 5856 : } -; 5857 : } -; 5858 : -; 5859 : // convert to desired output format -; 5860 : if (req_comp && req_comp != 4) { -; 5861 : if (ri->bits_per_channel == 16) -; 5862 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h); -; 5863 : else -; 5864 : out = stbi__convert_format(out, 4, req_comp, w, h); -; 5865 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5866 : } -; 5867 : -; 5868 : if (comp) *comp = 4; -; 5869 : *y = h; -; 5870 : *x = w; -; 5871 : -; 5872 : return out; -; 5873 : } -; 5874 : #endif -; 5875 : -; 5876 : // ************************************************************************************************* -; 5877 : // Softimage PIC loader -; 5878 : // by Tom Seddon -; 5879 : // -; 5880 : // See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -; 5881 : // See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ -; 5882 : -; 5883 : #ifndef STBI_NO_PIC -; 5884 : static int stbi__pic_is4(stbi__context* s, const char* str) -; 5885 : { -; 5886 : int i; -; 5887 : for (i = 0; i < 4; ++i) -; 5888 : if (stbi__get8(s) != (stbi_uc)str[i]) -; 5889 : return 0; -; 5890 : -; 5891 : return 1; -; 5892 : } -; 5893 : -; 5894 : static int stbi__pic_test_core(stbi__context* s) -; 5895 : { -; 5896 : int i; -; 5897 : -; 5898 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) -; 5899 : return 0; -; 5900 : -; 5901 : for (i = 0; i < 84; ++i) -; 5902 : stbi__get8(s); -; 5903 : -; 5904 : if (!stbi__pic_is4(s, "PICT")) -; 5905 : return 0; -; 5906 : -; 5907 : return 1; -; 5908 : } -; 5909 : -; 5910 : typedef struct -; 5911 : { -; 5912 : stbi_uc size, type, channel; -; 5913 : } stbi__pic_packet; -; 5914 : -; 5915 : static stbi_uc* stbi__readval(stbi__context* s, int channel, stbi_uc* dest) -; 5916 : { -; 5917 : int mask = 0x80, i; -; 5918 : -; 5919 : for (i = 0; i < 4; ++i, mask >>= 1) { -; 5920 : if (channel & mask) { -; 5921 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "PIC file too short"); -; 5922 : dest[i] = stbi__get8(s); -; 5923 : } -; 5924 : } -; 5925 : -; 5926 : return dest; -; 5927 : } -; 5928 : -; 5929 : static void stbi__copyval(int channel, stbi_uc* dest, const stbi_uc* src) -; 5930 : { -; 5931 : int mask = 0x80, i; -; 5932 : -; 5933 : for (i = 0; i < 4; ++i, mask >>= 1) -; 5934 : if (channel & mask) - +; Line 5934 0049a 40 f6 c6 40 test sil, 64 ; 00000040H 0049e 74 04 je SHORT $LN157@stbi__pic_ - -; 5935 : dest[i] = src[i]; - +; Line 5935 004a0 44 88 4b 01 mov BYTE PTR [rbx+1], r9b $LN157@stbi__pic_: - -; 1096 : } -; 1097 : -; 1098 : return s->img_buffer >= s->img_buffer_end; -; 1099 : } -; 1100 : #endif -; 1101 : -; 1102 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) -; 1103 : // nothing -; 1104 : #else -; 1105 : static void stbi__skip(stbi__context* s, int n) -; 1106 : { -; 1107 : if (n == 0) return; // already there! -; 1108 : if (n < 0) { -; 1109 : s->img_buffer = s->img_buffer_end; -; 1110 : return; -; 1111 : } -; 1112 : if (s->io.read) { -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1114 : if (blen < n) { -; 1115 : s->img_buffer = s->img_buffer_end; -; 1116 : (s->io.skip)(s->io_user_data, n - blen); -; 1117 : return; -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; -; 1121 : } -; 1122 : #endif -; 1123 : -; 1124 : #if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) -; 1125 : // nothing -; 1126 : #else -; 1127 : static int stbi__getn(stbi__context* s, stbi_uc* buffer, int n) -; 1128 : { -; 1129 : if (s->io.read) { -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1131 : if (blen < n) { -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; -; 1139 : return res; -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { -; 1144 : memcpy(buffer, s->img_buffer, n); -; 1145 : s->img_buffer += n; -; 1146 : return 1; -; 1147 : } -; 1148 : else -; 1149 : return 0; -; 1150 : } -; 1151 : #endif -; 1152 : -; 1153 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1154 : // nothing -; 1155 : #else -; 1156 : static int stbi__get16be(stbi__context* s) -; 1157 : { -; 1158 : int z = stbi__get8(s); -; 1159 : return (z << 8) + stbi__get8(s); -; 1160 : } -; 1161 : #endif -; 1162 : -; 1163 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1164 : // nothing -; 1165 : #else -; 1166 : static stbi__uint32 stbi__get32be(stbi__context* s) -; 1167 : { -; 1168 : stbi__uint32 z = stbi__get16be(s); -; 1169 : return (z << 16) + stbi__get16be(s); -; 1170 : } -; 1171 : #endif -; 1172 : -; 1173 : #if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -; 1174 : // nothing -; 1175 : #else -; 1176 : static int stbi__get16le(stbi__context* s) -; 1177 : { -; 1178 : int z = stbi__get8(s); -; 1179 : return z + (stbi__get8(s) << 8); -; 1180 : } -; 1181 : #endif -; 1182 : -; 1183 : #ifndef STBI_NO_BMP -; 1184 : static stbi__uint32 stbi__get32le(stbi__context* s) -; 1185 : { -; 1186 : stbi__uint32 z = stbi__get16le(s); -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; -; 1188 : return z; -; 1189 : } -; 1190 : #endif -; 1191 : -; 1192 : #define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings -; 1193 : -; 1194 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1195 : // nothing -; 1196 : #else -; 1197 : ////////////////////////////////////////////////////////////////////////////// -; 1198 : // -; 1199 : // generic converter from built-in img_n to req_comp -; 1200 : // individual types do this automatically as much as possible (e.g. jpeg -; 1201 : // does all cases internally since it needs to colorspace convert anyway, -; 1202 : // and it never has alpha, so very few cases ). png can automatically -; 1203 : // interleave an alpha=255 channel, but falls back to this for other cases -; 1204 : // -; 1205 : // assume data buffer is malloced, so malloc a new one and free that one -; 1206 : // only failure mode is malloc failing -; 1207 : -; 1208 : static stbi_uc stbi__compute_y(int r, int g, int b) -; 1209 : { -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1211 : } -; 1212 : #endif -; 1213 : -; 1214 : #if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1215 : // nothing -; 1216 : #else -; 1217 : static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1218 : { -; 1219 : int i, j; -; 1220 : unsigned char* good; -; 1221 : -; 1222 : if (req_comp == img_n) return data; -; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1224 : -; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); -; 1226 : if (good == NULL) { -; 1227 : STBI_FREE(data); -; 1228 : return stbi__errpuc("outofmem", "Out of memory"); -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { -; 1232 : unsigned char* src = data + j * x * img_n; -; 1233 : unsigned char* dest = good + j * x * req_comp; -; 1234 : -; 1235 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1236 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1237 : // convert source image with img_n components to one with req_comp components; -; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1239 : switch (STBI__COMBO(img_n, req_comp)) { -; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; -; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; -; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1253 : } -; 1254 : #undef STBI__CASE -; 1255 : } -; 1256 : -; 1257 : STBI_FREE(data); -; 1258 : return good; -; 1259 : } -; 1260 : #endif -; 1261 : -; 1262 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1263 : // nothing -; 1264 : #else -; 1265 : static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -; 1266 : { -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1268 : } -; 1269 : #endif -; 1270 : -; 1271 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1272 : // nothing -; 1273 : #else -; 1274 : static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1275 : { -; 1276 : int i, j; -; 1277 : stbi__uint16* good; -; 1278 : -; 1279 : if (req_comp == img_n) return data; -; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1281 : -; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); -; 1283 : if (good == NULL) { -; 1284 : STBI_FREE(data); -; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { -; 1289 : stbi__uint16* src = data + j * x * img_n; -; 1290 : stbi__uint16* dest = good + j * x * req_comp; -; 1291 : -; 1292 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1293 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1294 : // convert source image with img_n components to one with req_comp components; -; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1296 : switch (STBI__COMBO(img_n, req_comp)) { -; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; -; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; -; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1310 : } -; 1311 : #undef STBI__CASE -; 1312 : } -; 1313 : -; 1314 : STBI_FREE(data); -; 1315 : return good; -; 1316 : } -; 1317 : #endif -; 1318 : -; 1319 : #ifndef STBI_NO_LINEAR -; 1320 : static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp) -; 1321 : { -; 1322 : int i, k, n; -; 1323 : float* output; -; 1324 : if (!data) return NULL; -; 1325 : output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0); -; 1326 : if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } -; 1327 : // compute number of non-alpha components -; 1328 : if (comp & 1) n = comp; else n = comp - 1; -; 1329 : for (i = 0; i < x * y; ++i) { -; 1330 : for (k = 0; k < n; ++k) { -; 1331 : output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale); -; 1332 : } -; 1333 : } -; 1334 : if (n < comp) { -; 1335 : for (i = 0; i < x * y; ++i) { -; 1336 : output[i * comp + n] = data[i * comp + n] / 255.0f; -; 1337 : } -; 1338 : } -; 1339 : STBI_FREE(data); -; 1340 : return output; -; 1341 : } -; 1342 : #endif -; 1343 : -; 1344 : #ifndef STBI_NO_HDR -; 1345 : #define stbi__float2int(x) ((int) (x)) -; 1346 : static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp) -; 1347 : { -; 1348 : int i, k, n; -; 1349 : stbi_uc* output; -; 1350 : if (!data) return NULL; -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } -; 1353 : // compute number of non-alpha components -; 1354 : if (comp & 1) n = comp; else n = comp - 1; -; 1355 : for (i = 0; i < x * y; ++i) { -; 1356 : for (k = 0; k < n; ++k) { -; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; -; 1358 : if (z < 0) z = 0; -; 1359 : if (z > 255) z = 255; -; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1361 : } -; 1362 : if (k < comp) { -; 1363 : float z = data[i * comp + k] * 255 + 0.5f; -; 1364 : if (z < 0) z = 0; -; 1365 : if (z > 255) z = 255; -; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1367 : } -; 1368 : } -; 1369 : STBI_FREE(data); -; 1370 : return output; -; 1371 : } -; 1372 : #endif -; 1373 : -; 1374 : ////////////////////////////////////////////////////////////////////////////// -; 1375 : // -; 1376 : // "baseline" JPEG/JFIF decoder -; 1377 : // -; 1378 : // simple implementation -; 1379 : // - doesn't support delayed output of y-dimension -; 1380 : // - simple interface (only one output format: 8-bit interleaved RGB) -; 1381 : // - doesn't try to recover corrupt jpegs -; 1382 : // - doesn't allow partial loading, loading multiple at once -; 1383 : // - still fast on x86 (copying globals into locals doesn't help x86) -; 1384 : // - allocates lots of intermediate memory (full size of all components) -; 1385 : // - non-interleaved case requires this anyway -; 1386 : // - allows good upsampling (see next) -; 1387 : // high-quality -; 1388 : // - upsampled channels are bilinearly interpolated, even across blocks -; 1389 : // - quality integer IDCT derived from IJG's 'slow' -; 1390 : // performance -; 1391 : // - fast huffman; reasonable integer IDCT -; 1392 : // - some SIMD kernels for common paths on targets with SSE2/NEON -; 1393 : // - uses a lot of intermediate memory, could cache poorly -; 1394 : -; 1395 : #ifndef STBI_NO_JPEG -; 1396 : -; 1397 : // huffman decoding acceleration -; 1398 : #define FAST_BITS 9 // larger handles more cases; smaller stomps less cache -; 1399 : -; 1400 : typedef struct -; 1401 : { -; 1402 : stbi_uc fast[1 << FAST_BITS]; -; 1403 : // weirdly, repacking this into AoS is a 10% speed loss, instead of a win -; 1404 : stbi__uint16 code[256]; -; 1405 : stbi_uc values[256]; -; 1406 : stbi_uc size[257]; -; 1407 : unsigned int maxcode[18]; -; 1408 : int delta[17]; // old 'firstsymbol' - old 'firstcode' -; 1409 : } stbi__huffman; -; 1410 : -; 1411 : typedef struct -; 1412 : { -; 1413 : stbi__context* s; -; 1414 : stbi__huffman huff_dc[4]; -; 1415 : stbi__huffman huff_ac[4]; -; 1416 : stbi__uint16 dequant[4][64]; -; 1417 : stbi__int16 fast_ac[4][1 << FAST_BITS]; -; 1418 : -; 1419 : // sizes for components, interleaved MCUs -; 1420 : int img_h_max, img_v_max; -; 1421 : int img_mcu_x, img_mcu_y; -; 1422 : int img_mcu_w, img_mcu_h; -; 1423 : -; 1424 : // definition of jpeg image component -; 1425 : struct -; 1426 : { -; 1427 : int id; -; 1428 : int h, v; -; 1429 : int tq; -; 1430 : int hd, ha; -; 1431 : int dc_pred; -; 1432 : -; 1433 : int x, y, w2, h2; -; 1434 : stbi_uc* data; -; 1435 : void* raw_data, * raw_coeff; -; 1436 : stbi_uc* linebuf; -; 1437 : short* coeff; // progressive only -; 1438 : int coeff_w, coeff_h; // number of 8x8 coefficient blocks -; 1439 : } img_comp[4]; -; 1440 : -; 1441 : stbi__uint32 code_buffer; // jpeg entropy-coded buffer -; 1442 : int code_bits; // number of valid bits -; 1443 : unsigned char marker; // marker seen while filling entropy buffer -; 1444 : int nomore; // flag if we saw a marker so must stop -; 1445 : -; 1446 : int progressive; -; 1447 : int spec_start; -; 1448 : int spec_end; -; 1449 : int succ_high; -; 1450 : int succ_low; -; 1451 : int eob_run; -; 1452 : int jfif; -; 1453 : int app14_color_transform; // Adobe APP14 tag -; 1454 : int rgb; -; 1455 : -; 1456 : int scan_n, order[4]; -; 1457 : int restart_interval, todo; -; 1458 : -; 1459 : // kernels -; 1460 : void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]); -; 1461 : void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); -; 1462 : stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); -; 1463 : } stbi__jpeg; -; 1464 : -; 1465 : static int stbi__build_huffman(stbi__huffman* h, int* count) -; 1466 : { -; 1467 : int i, j, k = 0; -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { -; 1471 : for (j = 0; j < count[i]; ++j) { -; 1472 : h->size[k++] = (stbi_uc)(i + 1); -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); -; 1474 : } -; 1475 : } -; 1476 : h->size[k] = 0; -; 1477 : -; 1478 : // compute actual symbols (from jpeg spec) -; 1479 : code = 0; -; 1480 : k = 0; -; 1481 : for (j = 1; j <= 16; ++j) { -; 1482 : // compute delta to add to code to compute symbol id -; 1483 : h->delta[j] = k - code; -; 1484 : if (h->size[k] == j) { -; 1485 : while (h->size[k] == j) -; 1486 : h->code[k++] = (stbi__uint16)(code++); -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); -; 1488 : } -; 1489 : // compute largest code + 1 for this size, preshifted as needed later -; 1490 : h->maxcode[j] = code << (16 - j); -; 1491 : code <<= 1; -; 1492 : } -; 1493 : h->maxcode[j] = 0xffffffff; -; 1494 : -; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated -; 1496 : memset(h->fast, 255, 1 << FAST_BITS); -; 1497 : for (i = 0; i < k; ++i) { -; 1498 : int s = h->size[i]; -; 1499 : if (s <= FAST_BITS) { -; 1500 : int c = h->code[i] << (FAST_BITS - s); -; 1501 : int m = 1 << (FAST_BITS - s); -; 1502 : for (j = 0; j < m; ++j) { -; 1503 : h->fast[c + j] = (stbi_uc)i; -; 1504 : } -; 1505 : } -; 1506 : } -; 1507 : return 1; -; 1508 : } -; 1509 : -; 1510 : // build a table that decodes both magnitude and value of small ACs in -; 1511 : // one go. -; 1512 : static void stbi__build_fast_ac(stbi__int16* fast_ac, stbi__huffman* h) -; 1513 : { -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { -; 1516 : stbi_uc fast = h->fast[i]; -; 1517 : fast_ac[i] = 0; -; 1518 : if (fast < 255) { -; 1519 : int rs = h->values[fast]; -; 1520 : int run = (rs >> 4) & 15; -; 1521 : int magbits = rs & 15; -; 1522 : int len = h->size[fast]; -; 1523 : -; 1524 : if (magbits && len + magbits <= FAST_BITS) { -; 1525 : // magnitude code followed by receive_extend code -; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); -; 1527 : int m = 1 << (magbits - 1); -; 1528 : if (k < m) k += (~0U << magbits) + 1; -; 1529 : // if the result is small enough, we can fit it in fast_ac table -; 1530 : if (k >= -128 && k <= 127) -; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); -; 1532 : } -; 1533 : } -; 1534 : } -; 1535 : } -; 1536 : -; 1537 : static void stbi__grow_buffer_unsafe(stbi__jpeg* j) -; 1538 : { -; 1539 : do { -; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); -; 1541 : if (b == 0xff) { -; 1542 : int c = stbi__get8(j->s); -; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes -; 1544 : if (c != 0) { -; 1545 : j->marker = (unsigned char)c; -; 1546 : j->nomore = 1; -; 1547 : return; -; 1548 : } -; 1549 : } -; 1550 : j->code_buffer |= b << (24 - j->code_bits); -; 1551 : j->code_bits += 8; -; 1552 : } while (j->code_bits <= 24); -; 1553 : } -; 1554 : -; 1555 : // (1 << n) - 1 -; 1556 : static const stbi__uint32 stbi__bmask[17] = { 0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535 }; -; 1557 : -; 1558 : // decode a jpeg huffman value from the bitstream -; 1559 : stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg* j, stbi__huffman* h) -; 1560 : { -; 1561 : unsigned int temp; -; 1562 : int c, k; -; 1563 : -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1569 : k = h->fast[c]; -; 1570 : if (k < 255) { -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; -; 1575 : j->code_bits -= s; -; 1576 : return h->values[k]; -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; -; 1586 : for (k = FAST_BITS + 1; ; ++k) -; 1587 : if (temp < h->maxcode[k]) -; 1588 : break; -; 1589 : if (k == 17) { -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; -; 1608 : } -; 1609 : -; 1610 : // bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) -; 1623 : k = stbi_lrot(j->code_buffer, n); -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); -; 1628 : } -; 1629 : -; 1630 : // get some unsigned bits -; 1631 : stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg* j, int n) -; 1632 : { -; 1633 : unsigned int k; -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1636 : k = stbi_lrot(j->code_buffer, n); -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; -; 1640 : return k; -; 1641 : } -; 1642 : -; 1643 : stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg* j) -; 1644 : { -; 1645 : unsigned int k; -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1648 : k = j->code_buffer; -; 1649 : j->code_buffer <<= 1; -; 1650 : --j->code_bits; -; 1651 : return k & 0x80000000; -; 1652 : } -; 1653 : -; 1654 : // given a value that's at position X in the zigzag stream, -; 1655 : // where does it appear in the 8x8 matrix coded as row-major? -; 1656 : static const stbi_uc stbi__jpeg_dezigzag[64 + 15] = -; 1657 : { -; 1658 : 0, 1, 8, 16, 9, 2, 3, 10, -; 1659 : 17, 24, 32, 25, 18, 11, 4, 5, -; 1660 : 12, 19, 26, 33, 40, 48, 41, 34, -; 1661 : 27, 20, 13, 6, 7, 14, 21, 28, -; 1662 : 35, 42, 49, 56, 57, 50, 43, 36, -; 1663 : 29, 22, 15, 23, 30, 37, 44, 51, -; 1664 : 58, 59, 52, 45, 38, 31, 39, 46, -; 1665 : 53, 60, 61, 54, 47, 55, 62, 63, -; 1666 : // let corrupt input sample past end -; 1667 : 63, 63, 63, 63, 63, 63, 63, 63, -; 1668 : 63, 63, 63, 63, 63, 63, 63 -; 1669 : }; -; 1670 : -; 1671 : // decode one 64-entry block-- -; 1672 : static int stbi__jpeg_decode_block(stbi__jpeg* j, short data[64], stbi__huffman* hdc, stbi__huffman* hac, stbi__int16* fac, int b, stbi__uint16* dequant) -; 1673 : { -; 1674 : int diff, dc, k; -; 1675 : int t; -; 1676 : -; 1677 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1678 : t = stbi__jpeg_huff_decode(j, hdc); -; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1680 : -; 1681 : // 0 all the ac values now so we can do it 32-bits at a time -; 1682 : memset(data, 0, 64 * sizeof(data[0])); -; 1683 : -; 1684 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1686 : dc = j->img_comp[b].dc_pred + diff; -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1689 : data[0] = (short)(dc * dequant[0]); -; 1690 : -; 1691 : // decode AC components, see JPEG spec -; 1692 : k = 1; -; 1693 : do { -; 1694 : unsigned int zig; -; 1695 : int c, r, s; -; 1696 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1697 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1698 : r = fac[c]; -; 1699 : if (r) { // fast-AC path -; 1700 : k += (r >> 4) & 15; // run -; 1701 : s = r & 15; // combined length -; 1702 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1703 : j->code_buffer <<= s; -; 1704 : j->code_bits -= s; -; 1705 : // decode into unzigzag'd location -; 1706 : zig = stbi__jpeg_dezigzag[k++]; -; 1707 : data[zig] = (short)((r >> 8) * dequant[zig]); -; 1708 : } -; 1709 : else { -; 1710 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1711 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1712 : s = rs & 15; -; 1713 : r = rs >> 4; -; 1714 : if (s == 0) { -; 1715 : if (rs != 0xf0) break; // end block -; 1716 : k += 16; -; 1717 : } -; 1718 : else { -; 1719 : k += r; -; 1720 : // decode into unzigzag'd location -; 1721 : zig = stbi__jpeg_dezigzag[k++]; -; 1722 : data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]); -; 1723 : } -; 1724 : } -; 1725 : } while (k < 64); -; 1726 : return 1; -; 1727 : } -; 1728 : -; 1729 : static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg* j, short data[64], stbi__huffman* hdc, int b) -; 1730 : { -; 1731 : int diff, dc; -; 1732 : int t; -; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1734 : -; 1735 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1736 : -; 1737 : if (j->succ_high == 0) { -; 1738 : // first scan for DC coefficient, must be first -; 1739 : memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now -; 1740 : t = stbi__jpeg_huff_decode(j, hdc); -; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1742 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1745 : dc = j->img_comp[b].dc_pred + diff; -; 1746 : j->img_comp[b].dc_pred = dc; -; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1748 : data[0] = (short)(dc * (1 << j->succ_low)); -; 1749 : } -; 1750 : else { -; 1751 : // refinement scan for DC coefficient -; 1752 : if (stbi__jpeg_get_bit(j)) -; 1753 : data[0] += (short)(1 << j->succ_low); -; 1754 : } -; 1755 : return 1; -; 1756 : } -; 1757 : -; 1758 : // @OPTIMIZE: store non-zigzagged during the decode passes, -; 1759 : // and only de-zigzag when dequantizing -; 1760 : static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg* j, short data[64], stbi__huffman* hac, stbi__int16* fac) -; 1761 : { -; 1762 : int k; -; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1764 : -; 1765 : if (j->succ_high == 0) { -; 1766 : int shift = j->succ_low; -; 1767 : -; 1768 : if (j->eob_run) { -; 1769 : --j->eob_run; -; 1770 : return 1; -; 1771 : } -; 1772 : -; 1773 : k = j->spec_start; -; 1774 : do { -; 1775 : unsigned int zig; -; 1776 : int c, r, s; -; 1777 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1778 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1779 : r = fac[c]; -; 1780 : if (r) { // fast-AC path -; 1781 : k += (r >> 4) & 15; // run -; 1782 : s = r & 15; // combined length -; 1783 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1784 : j->code_buffer <<= s; -; 1785 : j->code_bits -= s; -; 1786 : zig = stbi__jpeg_dezigzag[k++]; -; 1787 : data[zig] = (short)((r >> 8) * (1 << shift)); -; 1788 : } -; 1789 : else { -; 1790 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1791 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1792 : s = rs & 15; -; 1793 : r = rs >> 4; -; 1794 : if (s == 0) { -; 1795 : if (r < 15) { -; 1796 : j->eob_run = (1 << r); -; 1797 : if (r) -; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1799 : --j->eob_run; -; 1800 : break; -; 1801 : } -; 1802 : k += 16; -; 1803 : } -; 1804 : else { -; 1805 : k += r; -; 1806 : zig = stbi__jpeg_dezigzag[k++]; -; 1807 : data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift)); -; 1808 : } -; 1809 : } -; 1810 : } while (k <= j->spec_end); -; 1811 : } -; 1812 : else { -; 1813 : // refinement scan for these AC coefficients -; 1814 : -; 1815 : short bit = (short)(1 << j->succ_low); -; 1816 : -; 1817 : if (j->eob_run) { -; 1818 : --j->eob_run; -; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { -; 1820 : short* p = &data[stbi__jpeg_dezigzag[k]]; -; 1821 : if (*p != 0) -; 1822 : if (stbi__jpeg_get_bit(j)) -; 1823 : if ((*p & bit) == 0) { -; 1824 : if (*p > 0) -; 1825 : *p += bit; -; 1826 : else -; 1827 : *p -= bit; -; 1828 : } -; 1829 : } -; 1830 : } -; 1831 : else { -; 1832 : k = j->spec_start; -; 1833 : do { -; 1834 : int r, s; -; 1835 : int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh -; 1836 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1837 : s = rs & 15; -; 1838 : r = rs >> 4; -; 1839 : if (s == 0) { -; 1840 : if (r < 15) { -; 1841 : j->eob_run = (1 << r) - 1; -; 1842 : if (r) -; 1843 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1844 : r = 64; // force end of block -; 1845 : } -; 1846 : else { -; 1847 : // r=15 s=0 should write 16 0s, so we just do -; 1848 : // a run of 15 0s and then write s (which is 0), -; 1849 : // so we don't have to do anything special here -; 1850 : } -; 1851 : } -; 1852 : else { -; 1853 : if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1854 : // sign bit -; 1855 : if (stbi__jpeg_get_bit(j)) -; 1856 : s = bit; -; 1857 : else -; 1858 : s = -bit; -; 1859 : } -; 1860 : -; 1861 : // advance by r -; 1862 : while (k <= j->spec_end) { -; 1863 : short* p = &data[stbi__jpeg_dezigzag[k++]]; -; 1864 : if (*p != 0) { -; 1865 : if (stbi__jpeg_get_bit(j)) -; 1866 : if ((*p & bit) == 0) { -; 1867 : if (*p > 0) -; 1868 : *p += bit; -; 1869 : else -; 1870 : *p -= bit; -; 1871 : } -; 1872 : } -; 1873 : else { -; 1874 : if (r == 0) { -; 1875 : *p = (short)s; -; 1876 : break; -; 1877 : } -; 1878 : --r; -; 1879 : } -; 1880 : } -; 1881 : } while (k <= j->spec_end); -; 1882 : } -; 1883 : } -; 1884 : return 1; -; 1885 : } -; 1886 : -; 1887 : // take a -128..127 value and stbi__clamp it and convert to 0..255 -; 1888 : stbi_inline static stbi_uc stbi__clamp(int x) -; 1889 : { -; 1890 : // trick to use a single test to catch both cases -; 1891 : if ((unsigned int)x > 255) { -; 1892 : if (x < 0) return 0; -; 1893 : if (x > 255) return 255; -; 1894 : } -; 1895 : return (stbi_uc)x; -; 1896 : } -; 1897 : -; 1898 : #define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -; 1899 : #define stbi__fsh(x) ((x) * 4096) -; 1900 : -; 1901 : // derived from jidctint -- DCT_ISLOW -; 1902 : #define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ -; 1903 : int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ -; 1904 : p2 = s2; \ -; 1905 : p3 = s6; \ -; 1906 : p1 = (p2+p3) * stbi__f2f(0.5411961f); \ -; 1907 : t2 = p1 + p3*stbi__f2f(-1.847759065f); \ -; 1908 : t3 = p1 + p2*stbi__f2f( 0.765366865f); \ -; 1909 : p2 = s0; \ -; 1910 : p3 = s4; \ -; 1911 : t0 = stbi__fsh(p2+p3); \ -; 1912 : t1 = stbi__fsh(p2-p3); \ -; 1913 : x0 = t0+t3; \ -; 1914 : x3 = t0-t3; \ -; 1915 : x1 = t1+t2; \ -; 1916 : x2 = t1-t2; \ -; 1917 : t0 = s7; \ -; 1918 : t1 = s5; \ -; 1919 : t2 = s3; \ -; 1920 : t3 = s1; \ -; 1921 : p3 = t0+t2; \ -; 1922 : p4 = t1+t3; \ -; 1923 : p1 = t0+t3; \ -; 1924 : p2 = t1+t2; \ -; 1925 : p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ -; 1926 : t0 = t0*stbi__f2f( 0.298631336f); \ -; 1927 : t1 = t1*stbi__f2f( 2.053119869f); \ -; 1928 : t2 = t2*stbi__f2f( 3.072711026f); \ -; 1929 : t3 = t3*stbi__f2f( 1.501321110f); \ -; 1930 : p1 = p5 + p1*stbi__f2f(-0.899976223f); \ -; 1931 : p2 = p5 + p2*stbi__f2f(-2.562915447f); \ -; 1932 : p3 = p3*stbi__f2f(-1.961570560f); \ -; 1933 : p4 = p4*stbi__f2f(-0.390180644f); \ -; 1934 : t3 += p1+p4; \ -; 1935 : t2 += p2+p3; \ -; 1936 : t1 += p2+p4; \ -; 1937 : t0 += p1+p3; -; 1938 : -; 1939 : static void stbi__idct_block(stbi_uc* out, int out_stride, short data[64]) -; 1940 : { -; 1941 : int i, val[64], * v = val; -; 1942 : stbi_uc* o; -; 1943 : short* d = data; -; 1944 : -; 1945 : // columns -; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { -; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing -; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 -; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { -; 1950 : // no shortcut 0 seconds -; 1951 : // (1|2|3|4|5|6|7)==0 0 seconds -; 1952 : // all separate -0.047 seconds -; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds -; 1954 : int dcterm = d[0] * 4; -; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; -; 1956 : } -; 1957 : else { -; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) -; 1959 : // constants scaled things up by 1<<12; let's bring them back -; 1960 : // down, but keep 2 extra bits of precision -; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; -; 1962 : v[0] = (x0 + t3) >> 10; -; 1963 : v[56] = (x0 - t3) >> 10; -; 1964 : v[8] = (x1 + t2) >> 10; -; 1965 : v[48] = (x1 - t2) >> 10; -; 1966 : v[16] = (x2 + t1) >> 10; -; 1967 : v[40] = (x2 - t1) >> 10; -; 1968 : v[24] = (x3 + t0) >> 10; -; 1969 : v[32] = (x3 - t0) >> 10; -; 1970 : } -; 1971 : } -; 1972 : -; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { -; 1974 : // no fast case since the first 1D IDCT spread components out -; 1975 : STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]) -; 1976 : // constants scaled things up by 1<<12, plus we had 1<<2 from first -; 1977 : // loop, plus horizontal and vertical each scale by sqrt(8) so together -; 1978 : // we've got an extra 1<<3, so 1<<17 total we need to remove. -; 1979 : // so we want to round that, which means adding 0.5 * 1<<17, -; 1980 : // aka 65536. Also, we'll end up with -128 to 127 that we want -; 1981 : // to encode as 0..255 by adding 128, so we'll add that before the shift -; 1982 : x0 += 65536 + (128 << 17); -; 1983 : x1 += 65536 + (128 << 17); -; 1984 : x2 += 65536 + (128 << 17); -; 1985 : x3 += 65536 + (128 << 17); -; 1986 : // tried computing the shifts into temps, or'ing the temps to see -; 1987 : // if any were out of range, but that was slower -; 1988 : o[0] = stbi__clamp((x0 + t3) >> 17); -; 1989 : o[7] = stbi__clamp((x0 - t3) >> 17); -; 1990 : o[1] = stbi__clamp((x1 + t2) >> 17); -; 1991 : o[6] = stbi__clamp((x1 - t2) >> 17); -; 1992 : o[2] = stbi__clamp((x2 + t1) >> 17); -; 1993 : o[5] = stbi__clamp((x2 - t1) >> 17); -; 1994 : o[3] = stbi__clamp((x3 + t0) >> 17); -; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); -; 1996 : } -; 1997 : } -; 1998 : -; 1999 : #ifdef STBI_SSE2 -; 2000 : // sse2 integer IDCT. not the fastest possible implementation but it -; 2001 : // produces bit-identical results to the generic C version so it's -; 2002 : // fully "transparent". -; 2003 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2004 : { -; 2005 : // This is constructed to match our regular (generic) integer IDCT exactly. -; 2006 : __m128i row0, row1, row2, row3, row4, row5, row6, row7; -; 2007 : __m128i tmp; -; 2008 : -; 2009 : // dot product constant: even elems=x, odd elems=y -; 2010 : #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) -; 2011 : -; 2012 : // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) -; 2013 : // out(1) = c1[even]*x + c1[odd]*y -; 2014 : #define dct_rot(out0,out1, x,y,c0,c1) \ -; 2015 : __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ -; 2016 : __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ -; 2017 : __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ -; 2018 : __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ -; 2019 : __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ -; 2020 : __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) -; 2021 : -; 2022 : // out = in << 12 (in 16-bit, out 32-bit) -; 2023 : #define dct_widen(out, in) \ -; 2024 : __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ -; 2025 : __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) -; 2026 : -; 2027 : // wide add -; 2028 : #define dct_wadd(out, a, b) \ -; 2029 : __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ -; 2030 : __m128i out##_h = _mm_add_epi32(a##_h, b##_h) -; 2031 : -; 2032 : // wide sub -; 2033 : #define dct_wsub(out, a, b) \ -; 2034 : __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ -; 2035 : __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) -; 2036 : -; 2037 : // butterfly a/b, add bias, then shift by "s" and pack -; 2038 : #define dct_bfly32o(out0, out1, a,b,bias,s) \ -; 2039 : { \ -; 2040 : __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ -; 2041 : __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ -; 2042 : dct_wadd(sum, abiased, b); \ -; 2043 : dct_wsub(dif, abiased, b); \ -; 2044 : out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ -; 2045 : out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ -; 2046 : } -; 2047 : -; 2048 : // 8-bit interleave step (for transposes) -; 2049 : #define dct_interleave8(a, b) \ -; 2050 : tmp = a; \ -; 2051 : a = _mm_unpacklo_epi8(a, b); \ -; 2052 : b = _mm_unpackhi_epi8(tmp, b) -; 2053 : -; 2054 : // 16-bit interleave step (for transposes) -; 2055 : #define dct_interleave16(a, b) \ -; 2056 : tmp = a; \ -; 2057 : a = _mm_unpacklo_epi16(a, b); \ -; 2058 : b = _mm_unpackhi_epi16(tmp, b) -; 2059 : -; 2060 : #define dct_pass(bias,shift) \ -; 2061 : { \ -; 2062 : /* even part */ \ -; 2063 : dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ -; 2064 : __m128i sum04 = _mm_add_epi16(row0, row4); \ -; 2065 : __m128i dif04 = _mm_sub_epi16(row0, row4); \ -; 2066 : dct_widen(t0e, sum04); \ -; 2067 : dct_widen(t1e, dif04); \ -; 2068 : dct_wadd(x0, t0e, t3e); \ -; 2069 : dct_wsub(x3, t0e, t3e); \ -; 2070 : dct_wadd(x1, t1e, t2e); \ -; 2071 : dct_wsub(x2, t1e, t2e); \ -; 2072 : /* odd part */ \ -; 2073 : dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ -; 2074 : dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ -; 2075 : __m128i sum17 = _mm_add_epi16(row1, row7); \ -; 2076 : __m128i sum35 = _mm_add_epi16(row3, row5); \ -; 2077 : dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ -; 2078 : dct_wadd(x4, y0o, y4o); \ -; 2079 : dct_wadd(x5, y1o, y5o); \ -; 2080 : dct_wadd(x6, y2o, y5o); \ -; 2081 : dct_wadd(x7, y3o, y4o); \ -; 2082 : dct_bfly32o(row0,row7, x0,x7,bias,shift); \ -; 2083 : dct_bfly32o(row1,row6, x1,x6,bias,shift); \ -; 2084 : dct_bfly32o(row2,row5, x2,x5,bias,shift); \ -; 2085 : dct_bfly32o(row3,row4, x3,x4,bias,shift); \ -; 2086 : } -; 2087 : -; 2088 : __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); -; 2089 : __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f)); -; 2090 : __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); -; 2091 : __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); -; 2092 : __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f)); -; 2093 : __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f)); -; 2094 : __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f)); -; 2095 : __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f)); -; 2096 : -; 2097 : // rounding biases in column/row passes, see stbi__idct_block for explanation. -; 2098 : __m128i bias_0 = _mm_set1_epi32(512); -; 2099 : __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17)); -; 2100 : -; 2101 : // load -; 2102 : row0 = _mm_load_si128((const __m128i*) (data + 0 * 8)); -; 2103 : row1 = _mm_load_si128((const __m128i*) (data + 1 * 8)); -; 2104 : row2 = _mm_load_si128((const __m128i*) (data + 2 * 8)); -; 2105 : row3 = _mm_load_si128((const __m128i*) (data + 3 * 8)); -; 2106 : row4 = _mm_load_si128((const __m128i*) (data + 4 * 8)); -; 2107 : row5 = _mm_load_si128((const __m128i*) (data + 5 * 8)); -; 2108 : row6 = _mm_load_si128((const __m128i*) (data + 6 * 8)); -; 2109 : row7 = _mm_load_si128((const __m128i*) (data + 7 * 8)); -; 2110 : -; 2111 : // column pass -; 2112 : dct_pass(bias_0, 10); -; 2113 : -; 2114 : { -; 2115 : // 16bit 8x8 transpose pass 1 -; 2116 : dct_interleave16(row0, row4); -; 2117 : dct_interleave16(row1, row5); -; 2118 : dct_interleave16(row2, row6); -; 2119 : dct_interleave16(row3, row7); -; 2120 : -; 2121 : // transpose pass 2 -; 2122 : dct_interleave16(row0, row2); -; 2123 : dct_interleave16(row1, row3); -; 2124 : dct_interleave16(row4, row6); -; 2125 : dct_interleave16(row5, row7); -; 2126 : -; 2127 : // transpose pass 3 -; 2128 : dct_interleave16(row0, row1); -; 2129 : dct_interleave16(row2, row3); -; 2130 : dct_interleave16(row4, row5); -; 2131 : dct_interleave16(row6, row7); -; 2132 : } -; 2133 : -; 2134 : // row pass -; 2135 : dct_pass(bias_1, 17); -; 2136 : -; 2137 : { -; 2138 : // pack -; 2139 : __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 -; 2140 : __m128i p1 = _mm_packus_epi16(row2, row3); -; 2141 : __m128i p2 = _mm_packus_epi16(row4, row5); -; 2142 : __m128i p3 = _mm_packus_epi16(row6, row7); -; 2143 : -; 2144 : // 8bit 8x8 transpose pass 1 -; 2145 : dct_interleave8(p0, p2); // a0e0a1e1... -; 2146 : dct_interleave8(p1, p3); // c0g0c1g1... -; 2147 : -; 2148 : // transpose pass 2 -; 2149 : dct_interleave8(p0, p1); // a0c0e0g0... -; 2150 : dct_interleave8(p2, p3); // b0d0f0h0... -; 2151 : -; 2152 : // transpose pass 3 -; 2153 : dct_interleave8(p0, p2); // a0b0c0d0... -; 2154 : dct_interleave8(p1, p3); // a4b4c4d4... -; 2155 : -; 2156 : // store -; 2157 : _mm_storel_epi64((__m128i*) out, p0); out += out_stride; -; 2158 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; -; 2159 : _mm_storel_epi64((__m128i*) out, p2); out += out_stride; -; 2160 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; -; 2161 : _mm_storel_epi64((__m128i*) out, p1); out += out_stride; -; 2162 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; -; 2163 : _mm_storel_epi64((__m128i*) out, p3); out += out_stride; -; 2164 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e)); -; 2165 : } -; 2166 : -; 2167 : #undef dct_const -; 2168 : #undef dct_rot -; 2169 : #undef dct_widen -; 2170 : #undef dct_wadd -; 2171 : #undef dct_wsub -; 2172 : #undef dct_bfly32o -; 2173 : #undef dct_interleave8 -; 2174 : #undef dct_interleave16 -; 2175 : #undef dct_pass -; 2176 : } -; 2177 : -; 2178 : #endif // STBI_SSE2 -; 2179 : -; 2180 : #ifdef STBI_NEON -; 2181 : -; 2182 : // NEON integer IDCT. should produce bit-identical -; 2183 : // results to the generic C version. -; 2184 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2185 : { -; 2186 : int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; -; 2187 : -; 2188 : int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); -; 2189 : int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); -; 2190 : int16x4_t rot0_2 = vdup_n_s16(stbi__f2f(0.765366865f)); -; 2191 : int16x4_t rot1_0 = vdup_n_s16(stbi__f2f(1.175875602f)); -; 2192 : int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); -; 2193 : int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); -; 2194 : int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); -; 2195 : int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); -; 2196 : int16x4_t rot3_0 = vdup_n_s16(stbi__f2f(0.298631336f)); -; 2197 : int16x4_t rot3_1 = vdup_n_s16(stbi__f2f(2.053119869f)); -; 2198 : int16x4_t rot3_2 = vdup_n_s16(stbi__f2f(3.072711026f)); -; 2199 : int16x4_t rot3_3 = vdup_n_s16(stbi__f2f(1.501321110f)); -; 2200 : -; 2201 : #define dct_long_mul(out, inq, coeff) \ -; 2202 : int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ -; 2203 : int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) -; 2204 : -; 2205 : #define dct_long_mac(out, acc, inq, coeff) \ -; 2206 : int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ -; 2207 : int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) -; 2208 : -; 2209 : #define dct_widen(out, inq) \ -; 2210 : int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ -; 2211 : int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) -; 2212 : -; 2213 : // wide add -; 2214 : #define dct_wadd(out, a, b) \ -; 2215 : int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ -; 2216 : int32x4_t out##_h = vaddq_s32(a##_h, b##_h) -; 2217 : -; 2218 : // wide sub -; 2219 : #define dct_wsub(out, a, b) \ -; 2220 : int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ -; 2221 : int32x4_t out##_h = vsubq_s32(a##_h, b##_h) -; 2222 : -; 2223 : // butterfly a/b, then shift using "shiftop" by "s" and pack -; 2224 : #define dct_bfly32o(out0,out1, a,b,shiftop,s) \ -; 2225 : { \ -; 2226 : dct_wadd(sum, a, b); \ -; 2227 : dct_wsub(dif, a, b); \ -; 2228 : out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ -; 2229 : out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ -; 2230 : } -; 2231 : -; 2232 : #define dct_pass(shiftop, shift) \ -; 2233 : { \ -; 2234 : /* even part */ \ -; 2235 : int16x8_t sum26 = vaddq_s16(row2, row6); \ -; 2236 : dct_long_mul(p1e, sum26, rot0_0); \ -; 2237 : dct_long_mac(t2e, p1e, row6, rot0_1); \ -; 2238 : dct_long_mac(t3e, p1e, row2, rot0_2); \ -; 2239 : int16x8_t sum04 = vaddq_s16(row0, row4); \ -; 2240 : int16x8_t dif04 = vsubq_s16(row0, row4); \ -; 2241 : dct_widen(t0e, sum04); \ -; 2242 : dct_widen(t1e, dif04); \ -; 2243 : dct_wadd(x0, t0e, t3e); \ -; 2244 : dct_wsub(x3, t0e, t3e); \ -; 2245 : dct_wadd(x1, t1e, t2e); \ -; 2246 : dct_wsub(x2, t1e, t2e); \ -; 2247 : /* odd part */ \ -; 2248 : int16x8_t sum15 = vaddq_s16(row1, row5); \ -; 2249 : int16x8_t sum17 = vaddq_s16(row1, row7); \ -; 2250 : int16x8_t sum35 = vaddq_s16(row3, row5); \ -; 2251 : int16x8_t sum37 = vaddq_s16(row3, row7); \ -; 2252 : int16x8_t sumodd = vaddq_s16(sum17, sum35); \ -; 2253 : dct_long_mul(p5o, sumodd, rot1_0); \ -; 2254 : dct_long_mac(p1o, p5o, sum17, rot1_1); \ -; 2255 : dct_long_mac(p2o, p5o, sum35, rot1_2); \ -; 2256 : dct_long_mul(p3o, sum37, rot2_0); \ -; 2257 : dct_long_mul(p4o, sum15, rot2_1); \ -; 2258 : dct_wadd(sump13o, p1o, p3o); \ -; 2259 : dct_wadd(sump24o, p2o, p4o); \ -; 2260 : dct_wadd(sump23o, p2o, p3o); \ -; 2261 : dct_wadd(sump14o, p1o, p4o); \ -; 2262 : dct_long_mac(x4, sump13o, row7, rot3_0); \ -; 2263 : dct_long_mac(x5, sump24o, row5, rot3_1); \ -; 2264 : dct_long_mac(x6, sump23o, row3, rot3_2); \ -; 2265 : dct_long_mac(x7, sump14o, row1, rot3_3); \ -; 2266 : dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ -; 2267 : dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ -; 2268 : dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ -; 2269 : dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ -; 2270 : } -; 2271 : -; 2272 : // load -; 2273 : row0 = vld1q_s16(data + 0 * 8); -; 2274 : row1 = vld1q_s16(data + 1 * 8); -; 2275 : row2 = vld1q_s16(data + 2 * 8); -; 2276 : row3 = vld1q_s16(data + 3 * 8); -; 2277 : row4 = vld1q_s16(data + 4 * 8); -; 2278 : row5 = vld1q_s16(data + 5 * 8); -; 2279 : row6 = vld1q_s16(data + 6 * 8); -; 2280 : row7 = vld1q_s16(data + 7 * 8); -; 2281 : -; 2282 : // add DC bias -; 2283 : row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); -; 2284 : -; 2285 : // column pass -; 2286 : dct_pass(vrshrn_n_s32, 10); -; 2287 : -; 2288 : // 16bit 8x8 transpose -; 2289 : { -; 2290 : // these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -; 2291 : // whether compilers actually get this is another story, sadly. -; 2292 : #define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -; 2293 : #define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -; 2294 : #define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } -; 2295 : -; 2296 : // pass 1 -; 2297 : dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 -; 2298 : dct_trn16(row2, row3); -; 2299 : dct_trn16(row4, row5); -; 2300 : dct_trn16(row6, row7); -; 2301 : -; 2302 : // pass 2 -; 2303 : dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 -; 2304 : dct_trn32(row1, row3); -; 2305 : dct_trn32(row4, row6); -; 2306 : dct_trn32(row5, row7); -; 2307 : -; 2308 : // pass 3 -; 2309 : dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 -; 2310 : dct_trn64(row1, row5); -; 2311 : dct_trn64(row2, row6); -; 2312 : dct_trn64(row3, row7); -; 2313 : -; 2314 : #undef dct_trn16 -; 2315 : #undef dct_trn32 -; 2316 : #undef dct_trn64 -; 2317 : } -; 2318 : -; 2319 : // row pass -; 2320 : // vrshrn_n_s32 only supports shifts up to 16, we need -; 2321 : // 17. so do a non-rounding shift of 16 first then follow -; 2322 : // up with a rounding shift by 1. -; 2323 : dct_pass(vshrn_n_s32, 16); -; 2324 : -; 2325 : { -; 2326 : // pack and round -; 2327 : uint8x8_t p0 = vqrshrun_n_s16(row0, 1); -; 2328 : uint8x8_t p1 = vqrshrun_n_s16(row1, 1); -; 2329 : uint8x8_t p2 = vqrshrun_n_s16(row2, 1); -; 2330 : uint8x8_t p3 = vqrshrun_n_s16(row3, 1); -; 2331 : uint8x8_t p4 = vqrshrun_n_s16(row4, 1); -; 2332 : uint8x8_t p5 = vqrshrun_n_s16(row5, 1); -; 2333 : uint8x8_t p6 = vqrshrun_n_s16(row6, 1); -; 2334 : uint8x8_t p7 = vqrshrun_n_s16(row7, 1); -; 2335 : -; 2336 : // again, these can translate into one instruction, but often don't. -; 2337 : #define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -; 2338 : #define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -; 2339 : #define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } -; 2340 : -; 2341 : // sadly can't use interleaved stores here since we only write -; 2342 : // 8 bytes to each scan line! -; 2343 : -; 2344 : // 8x8 8-bit transpose pass 1 -; 2345 : dct_trn8_8(p0, p1); -; 2346 : dct_trn8_8(p2, p3); -; 2347 : dct_trn8_8(p4, p5); -; 2348 : dct_trn8_8(p6, p7); -; 2349 : -; 2350 : // pass 2 -; 2351 : dct_trn8_16(p0, p2); -; 2352 : dct_trn8_16(p1, p3); -; 2353 : dct_trn8_16(p4, p6); -; 2354 : dct_trn8_16(p5, p7); -; 2355 : -; 2356 : // pass 3 -; 2357 : dct_trn8_32(p0, p4); -; 2358 : dct_trn8_32(p1, p5); -; 2359 : dct_trn8_32(p2, p6); -; 2360 : dct_trn8_32(p3, p7); -; 2361 : -; 2362 : // store -; 2363 : vst1_u8(out, p0); out += out_stride; -; 2364 : vst1_u8(out, p1); out += out_stride; -; 2365 : vst1_u8(out, p2); out += out_stride; -; 2366 : vst1_u8(out, p3); out += out_stride; -; 2367 : vst1_u8(out, p4); out += out_stride; -; 2368 : vst1_u8(out, p5); out += out_stride; -; 2369 : vst1_u8(out, p6); out += out_stride; -; 2370 : vst1_u8(out, p7); -; 2371 : -; 2372 : #undef dct_trn8_8 -; 2373 : #undef dct_trn8_16 -; 2374 : #undef dct_trn8_32 -; 2375 : } -; 2376 : -; 2377 : #undef dct_long_mul -; 2378 : #undef dct_long_mac -; 2379 : #undef dct_widen -; 2380 : #undef dct_wadd -; 2381 : #undef dct_wsub -; 2382 : #undef dct_bfly32o -; 2383 : #undef dct_pass -; 2384 : } -; 2385 : -; 2386 : #endif // STBI_NEON -; 2387 : -; 2388 : #define STBI__MARKER_none 0xff -; 2389 : // if there's a pending marker from the entropy stream, return that -; 2390 : // otherwise, fetch from the stream and get a marker. if there's no -; 2391 : // marker, return 0xff, which is never a valid marker value -; 2392 : static stbi_uc stbi__get_marker(stbi__jpeg* j) -; 2393 : { -; 2394 : stbi_uc x; -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } -; 2396 : x = stbi__get8(j->s); -; 2397 : if (x != 0xff) return STBI__MARKER_none; -; 2398 : while (x == 0xff) -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes -; 2400 : return x; -; 2401 : } -; 2402 : -; 2403 : // in each scan, we'll have scan_n components, and the order -; 2404 : // of the components is specified by order[] -; 2405 : #define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) -; 2406 : -; 2407 : // after a restart interval, stbi__jpeg_reset the entropy decoder and -; 2408 : // the dc prediction -; 2409 : static void stbi__jpeg_reset(stbi__jpeg* j) -; 2410 : { -; 2411 : j->code_bits = 0; -; 2412 : j->code_buffer = 0; -; 2413 : j->nomore = 0; -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; -; 2417 : j->eob_run = 0; -; 2418 : // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, -; 2419 : // since we don't even allow 1<<30 pixels -; 2420 : } -; 2421 : -; 2422 : static int stbi__parse_entropy_coded_data(stbi__jpeg* z) -; 2423 : { -; 2424 : stbi__jpeg_reset(z); -; 2425 : if (!z->progressive) { -; 2426 : if (z->scan_n == 1) { -; 2427 : int i, j; -; 2428 : STBI_SIMD_ALIGN(short, data[64]); -; 2429 : int n = z->order[0]; -; 2430 : // non-interleaved data, we just need to process one block at a time, -; 2431 : // in trivial scanline order -; 2432 : // number of blocks to do just depends on how many actual "pixels" this -; 2433 : // component has, independent of interleaved MCU blocking and such -; 2434 : int w = (z->img_comp[n].x + 7) >> 3; -; 2435 : int h = (z->img_comp[n].y + 7) >> 3; -; 2436 : for (j = 0; j < h; ++j) { -; 2437 : for (i = 0; i < w; ++i) { -; 2438 : int ha = z->img_comp[n].ha; -; 2439 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2440 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2441 : // every data block is an MCU, so countdown the restart interval -; 2442 : if (--z->todo <= 0) { -; 2443 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2444 : // if it's NOT a restart, then just bail, so we get corrupt data -; 2445 : // rather than no data -; 2446 : if (!STBI__RESTART(z->marker)) return 1; -; 2447 : stbi__jpeg_reset(z); -; 2448 : } -; 2449 : } -; 2450 : } -; 2451 : return 1; -; 2452 : } -; 2453 : else { // interleaved -; 2454 : int i, j, k, x, y; -; 2455 : STBI_SIMD_ALIGN(short, data[64]); -; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2458 : // scan an interleaved mcu... process scan_n components in order -; 2459 : for (k = 0; k < z->scan_n; ++k) { -; 2460 : int n = z->order[k]; -; 2461 : // scan out an mcu's worth of this component; that's just determined -; 2462 : // by the basic H and V specified for the component -; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2464 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2465 : int x2 = (i * z->img_comp[n].h + x) * 8; -; 2466 : int y2 = (j * z->img_comp[n].v + y) * 8; -; 2467 : int ha = z->img_comp[n].ha; -; 2468 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2469 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); -; 2470 : } -; 2471 : } -; 2472 : } -; 2473 : // after all interleaved components, that's an interleaved MCU, -; 2474 : // so now count down the restart interval -; 2475 : if (--z->todo <= 0) { -; 2476 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2477 : if (!STBI__RESTART(z->marker)) return 1; -; 2478 : stbi__jpeg_reset(z); -; 2479 : } -; 2480 : } -; 2481 : } -; 2482 : return 1; -; 2483 : } -; 2484 : } -; 2485 : else { -; 2486 : if (z->scan_n == 1) { -; 2487 : int i, j; -; 2488 : int n = z->order[0]; -; 2489 : // non-interleaved data, we just need to process one block at a time, -; 2490 : // in trivial scanline order -; 2491 : // number of blocks to do just depends on how many actual "pixels" this -; 2492 : // component has, independent of interleaved MCU blocking and such -; 2493 : int w = (z->img_comp[n].x + 7) >> 3; -; 2494 : int h = (z->img_comp[n].y + 7) >> 3; -; 2495 : for (j = 0; j < h; ++j) { -; 2496 : for (i = 0; i < w; ++i) { -; 2497 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2498 : if (z->spec_start == 0) { -; 2499 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2500 : return 0; -; 2501 : } -; 2502 : else { -; 2503 : int ha = z->img_comp[n].ha; -; 2504 : if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) -; 2505 : return 0; -; 2506 : } -; 2507 : // every data block is an MCU, so countdown the restart interval -; 2508 : if (--z->todo <= 0) { -; 2509 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2510 : if (!STBI__RESTART(z->marker)) return 1; -; 2511 : stbi__jpeg_reset(z); -; 2512 : } -; 2513 : } -; 2514 : } -; 2515 : return 1; -; 2516 : } -; 2517 : else { // interleaved -; 2518 : int i, j, k, x, y; -; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2521 : // scan an interleaved mcu... process scan_n components in order -; 2522 : for (k = 0; k < z->scan_n; ++k) { -; 2523 : int n = z->order[k]; -; 2524 : // scan out an mcu's worth of this component; that's just determined -; 2525 : // by the basic H and V specified for the component -; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2528 : int x2 = (i * z->img_comp[n].h + x); -; 2529 : int y2 = (j * z->img_comp[n].v + y); -; 2530 : short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); -; 2531 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2532 : return 0; -; 2533 : } -; 2534 : } -; 2535 : } -; 2536 : // after all interleaved components, that's an interleaved MCU, -; 2537 : // so now count down the restart interval -; 2538 : if (--z->todo <= 0) { -; 2539 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2540 : if (!STBI__RESTART(z->marker)) return 1; -; 2541 : stbi__jpeg_reset(z); -; 2542 : } -; 2543 : } -; 2544 : } -; 2545 : return 1; -; 2546 : } -; 2547 : } -; 2548 : } -; 2549 : -; 2550 : static void stbi__jpeg_dequantize(short* data, stbi__uint16* dequant) -; 2551 : { -; 2552 : int i; -; 2553 : for (i = 0; i < 64; ++i) -; 2554 : data[i] *= dequant[i]; -; 2555 : } -; 2556 : -; 2557 : static void stbi__jpeg_finish(stbi__jpeg* z) -; 2558 : { -; 2559 : if (z->progressive) { -; 2560 : // dequantize and idct the data -; 2561 : int i, j, n; -; 2562 : for (n = 0; n < z->s->img_n; ++n) { -; 2563 : int w = (z->img_comp[n].x + 7) >> 3; -; 2564 : int h = (z->img_comp[n].y + 7) >> 3; -; 2565 : for (j = 0; j < h; ++j) { -; 2566 : for (i = 0; i < w; ++i) { -; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2568 : stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); -; 2569 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2570 : } -; 2571 : } -; 2572 : } -; 2573 : } -; 2574 : } -; 2575 : -; 2576 : static int stbi__process_marker(stbi__jpeg* z, int m) -; 2577 : { -; 2578 : int L; -; 2579 : switch (m) { -; 2580 : case STBI__MARKER_none: // no marker found -; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); -; 2582 : -; 2583 : case 0xDD: // DRI - specify restart interval -; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); -; 2585 : z->restart_interval = stbi__get16be(z->s); -; 2586 : return 1; -; 2587 : -; 2588 : case 0xDB: // DQT - define quantization table -; 2589 : L = stbi__get16be(z->s) - 2; -; 2590 : while (L > 0) { -; 2591 : int q = stbi__get8(z->s); -; 2592 : int p = q >> 4, sixteen = (p != 0); -; 2593 : int t = q & 15, i; -; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); -; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); -; 2596 : -; 2597 : for (i = 0; i < 64; ++i) -; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); -; 2599 : L -= (sixteen ? 129 : 65); -; 2600 : } -; 2601 : return L == 0; -; 2602 : -; 2603 : case 0xC4: // DHT - define huffman table -; 2604 : L = stbi__get16be(z->s) - 2; -; 2605 : while (L > 0) { -; 2606 : stbi_uc* v; -; 2607 : int sizes[16], i, n = 0; -; 2608 : int q = stbi__get8(z->s); -; 2609 : int tc = q >> 4; -; 2610 : int th = q & 15; -; 2611 : if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG"); -; 2612 : for (i = 0; i < 16; ++i) { -; 2613 : sizes[i] = stbi__get8(z->s); -; 2614 : n += sizes[i]; -; 2615 : } -; 2616 : if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values! -; 2617 : L -= 17; -; 2618 : if (tc == 0) { -; 2619 : if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0; -; 2620 : v = z->huff_dc[th].values; -; 2621 : } -; 2622 : else { -; 2623 : if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0; -; 2624 : v = z->huff_ac[th].values; -; 2625 : } -; 2626 : for (i = 0; i < n; ++i) -; 2627 : v[i] = stbi__get8(z->s); -; 2628 : if (tc != 0) -; 2629 : stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); -; 2630 : L -= n; -; 2631 : } -; 2632 : return L == 0; -; 2633 : } -; 2634 : -; 2635 : // check for comment block or APP blocks -; 2636 : if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { -; 2637 : L = stbi__get16be(z->s); -; 2638 : if (L < 2) { -; 2639 : if (m == 0xFE) -; 2640 : return stbi__err("bad COM len", "Corrupt JPEG"); -; 2641 : else -; 2642 : return stbi__err("bad APP len", "Corrupt JPEG"); -; 2643 : } -; 2644 : L -= 2; -; 2645 : -; 2646 : if (m == 0xE0 && L >= 5) { // JFIF APP0 segment -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) -; 2652 : ok = 0; -; 2653 : L -= 5; -; 2654 : if (ok) -; 2655 : z->jfif = 1; -; 2656 : } -; 2657 : else if (m == 0xEE && L >= 12) { // Adobe APP14 segment -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) -; 2663 : ok = 0; -; 2664 : L -= 6; -; 2665 : if (ok) { -; 2666 : stbi__get8(z->s); // version -; 2667 : stbi__get16be(z->s); // flags0 -; 2668 : stbi__get16be(z->s); // flags1 -; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform -; 2670 : L -= 6; -; 2671 : } -; 2672 : } -; 2673 : -; 2674 : stbi__skip(z->s, L); -; 2675 : return 1; -; 2676 : } -; 2677 : -; 2678 : return stbi__err("unknown marker", "Corrupt JPEG"); -; 2679 : } -; 2680 : -; 2681 : // after we see SOS -; 2682 : static int stbi__process_scan_header(stbi__jpeg* z) -; 2683 : { -; 2684 : int i; -; 2685 : int Ls = stbi__get16be(z->s); -; 2686 : z->scan_n = stbi__get8(z->s); -; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); -; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); -; 2689 : for (i = 0; i < z->scan_n; ++i) { -; 2690 : int id = stbi__get8(z->s), which; -; 2691 : int q = stbi__get8(z->s); -; 2692 : for (which = 0; which < z->s->img_n; ++which) -; 2693 : if (z->img_comp[which].id == id) -; 2694 : break; -; 2695 : if (which == z->s->img_n) return 0; // no match -; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); -; 2698 : z->order[i] = which; -; 2699 : } -; 2700 : -; 2701 : { -; 2702 : int aa; -; 2703 : z->spec_start = stbi__get8(z->s); -; 2704 : z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 -; 2705 : aa = stbi__get8(z->s); -; 2706 : z->succ_high = (aa >> 4); -; 2707 : z->succ_low = (aa & 15); -; 2708 : if (z->progressive) { -; 2709 : if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) -; 2710 : return stbi__err("bad SOS", "Corrupt JPEG"); -; 2711 : } -; 2712 : else { -; 2713 : if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2714 : if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2715 : z->spec_end = 63; -; 2716 : } -; 2717 : } -; 2718 : -; 2719 : return 1; -; 2720 : } -; 2721 : -; 2722 : static int stbi__free_jpeg_components(stbi__jpeg* z, int ncomp, int why) -; 2723 : { -; 2724 : int i; -; 2725 : for (i = 0; i < ncomp; ++i) { -; 2726 : if (z->img_comp[i].raw_data) { -; 2727 : STBI_FREE(z->img_comp[i].raw_data); -; 2728 : z->img_comp[i].raw_data = NULL; -; 2729 : z->img_comp[i].data = NULL; -; 2730 : } -; 2731 : if (z->img_comp[i].raw_coeff) { -; 2732 : STBI_FREE(z->img_comp[i].raw_coeff); -; 2733 : z->img_comp[i].raw_coeff = 0; -; 2734 : z->img_comp[i].coeff = 0; -; 2735 : } -; 2736 : if (z->img_comp[i].linebuf) { -; 2737 : STBI_FREE(z->img_comp[i].linebuf); -; 2738 : z->img_comp[i].linebuf = NULL; -; 2739 : } -; 2740 : } -; 2741 : return why; -; 2742 : } -; 2743 : -; 2744 : static int stbi__process_frame_header(stbi__jpeg* z, int scan) -; 2745 : { -; 2746 : stbi__context* s = z->s; -; 2747 : int Lf, p, i, q, h_max = 1, v_max = 1, c; -; 2748 : Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG -; 2749 : p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline -; 2750 : s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG -; 2751 : s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires -; 2752 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2753 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2754 : c = stbi__get8(s); -; 2755 : if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG"); -; 2756 : s->img_n = c; -; 2757 : for (i = 0; i < c; ++i) { -; 2758 : z->img_comp[i].data = NULL; -; 2759 : z->img_comp[i].linebuf = NULL; -; 2760 : } -; 2761 : -; 2762 : if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG"); -; 2763 : -; 2764 : z->rgb = 0; -; 2765 : for (i = 0; i < s->img_n; ++i) { -; 2766 : static const unsigned char rgb[3] = { 'R', 'G', 'B' }; -; 2767 : z->img_comp[i].id = stbi__get8(s); -; 2768 : if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) -; 2769 : ++z->rgb; -; 2770 : q = stbi__get8(s); -; 2771 : z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H", "Corrupt JPEG"); -; 2772 : z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V", "Corrupt JPEG"); -; 2773 : z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ", "Corrupt JPEG"); -; 2774 : } -; 2775 : -; 2776 : if (scan != STBI__SCAN_load) return 1; -; 2777 : -; 2778 : if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); -; 2779 : -; 2780 : for (i = 0; i < s->img_n; ++i) { -; 2781 : if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; -; 2782 : if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; -; 2783 : } -; 2784 : -; 2785 : // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios -; 2786 : // and I've never seen a non-corrupted JPEG file actually use them -; 2787 : for (i = 0; i < s->img_n; ++i) { -; 2788 : if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG"); -; 2789 : if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG"); -; 2790 : } -; 2791 : -; 2792 : // compute interleaved mcu info -; 2793 : z->img_h_max = h_max; -; 2794 : z->img_v_max = v_max; -; 2795 : z->img_mcu_w = h_max * 8; -; 2796 : z->img_mcu_h = v_max * 8; -; 2797 : // these sizes can't be more than 17 bits -; 2798 : z->img_mcu_x = (s->img_x + z->img_mcu_w - 1) / z->img_mcu_w; -; 2799 : z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h; -; 2800 : -; 2801 : for (i = 0; i < s->img_n; ++i) { -; 2802 : // number of effective pixels (e.g. for non-interleaved MCU) -; 2803 : z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max - 1) / h_max; -; 2804 : z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max - 1) / v_max; -; 2805 : // to simplify generation, we'll allocate enough memory to decode -; 2806 : // the bogus oversized data from using interleaved MCUs and their -; 2807 : // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't -; 2808 : // discard the extra data until colorspace conversion -; 2809 : // -; 2810 : // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) -; 2811 : // so these muls can't overflow with 32-bit ints (which we require) -; 2812 : z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; -; 2813 : z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; -; 2814 : z->img_comp[i].coeff = 0; -; 2815 : z->img_comp[i].raw_coeff = 0; -; 2816 : z->img_comp[i].linebuf = NULL; -; 2817 : z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); -; 2818 : if (z->img_comp[i].raw_data == NULL) -; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2820 : // align blocks for idct using mmx/sse -; 2821 : z->img_comp[i].data = (stbi_uc*)(((size_t)z->img_comp[i].raw_data + 15) & ~15); -; 2822 : if (z->progressive) { -; 2823 : // w2, h2 are multiples of 8 (see above) -; 2824 : z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; -; 2825 : z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; -; 2826 : z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); -; 2827 : if (z->img_comp[i].raw_coeff == NULL) -; 2828 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2829 : z->img_comp[i].coeff = (short*)(((size_t)z->img_comp[i].raw_coeff + 15) & ~15); -; 2830 : } -; 2831 : } -; 2832 : -; 2833 : return 1; -; 2834 : } -; 2835 : -; 2836 : // use comparisons since in some cases we handle more than one case (e.g. SOF) -; 2837 : #define stbi__DNL(x) ((x) == 0xdc) -; 2838 : #define stbi__SOI(x) ((x) == 0xd8) -; 2839 : #define stbi__EOI(x) ((x) == 0xd9) -; 2840 : #define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) -; 2841 : #define stbi__SOS(x) ((x) == 0xda) -; 2842 : -; 2843 : #define stbi__SOF_progressive(x) ((x) == 0xc2) -; 2844 : -; 2845 : static int stbi__decode_jpeg_header(stbi__jpeg* z, int scan) -; 2846 : { -; 2847 : int m; -; 2848 : z->jfif = 0; -; 2849 : z->app14_color_transform = -1; // valid values are 0,1,2 -; 2850 : z->marker = STBI__MARKER_none; // initialize cached marker to empty -; 2851 : m = stbi__get_marker(z); -; 2852 : if (!stbi__SOI(m)) return stbi__err("no SOI", "Corrupt JPEG"); -; 2853 : if (scan == STBI__SCAN_type) return 1; -; 2854 : m = stbi__get_marker(z); -; 2855 : while (!stbi__SOF(m)) { -; 2856 : if (!stbi__process_marker(z, m)) return 0; -; 2857 : m = stbi__get_marker(z); -; 2858 : while (m == STBI__MARKER_none) { -; 2859 : // some files have extra padding after their blocks, so ok, we'll scan -; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); -; 2861 : m = stbi__get_marker(z); -; 2862 : } -; 2863 : } -; 2864 : z->progressive = stbi__SOF_progressive(m); -; 2865 : if (!stbi__process_frame_header(z, scan)) return 0; -; 2866 : return 1; -; 2867 : } -; 2868 : -; 2869 : static int stbi__skip_jpeg_junk_at_end(stbi__jpeg* j) -; 2870 : { -; 2871 : // some JPEGs have junk at end, skip over it but if we find what looks -; 2872 : // like a valid marker, resume there -; 2873 : while (!stbi__at_eof(j->s)) { -; 2874 : int x = stbi__get8(j->s); -; 2875 : while (x == 255) { // might be a marker -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; -; 2877 : x = stbi__get8(j->s); -; 2878 : if (x != 0x00 && x != 0xff) { -; 2879 : // not a stuffed zero or lead-in to another marker, looks -; 2880 : // like an actual marker, return it -; 2881 : return x; -; 2882 : } -; 2883 : // stuffed zero has x=0 now which ends the loop, meaning we go -; 2884 : // back to regular scan loop. -; 2885 : // repeated 0xff keeps trying to read the next byte of the marker. -; 2886 : } -; 2887 : } -; 2888 : return STBI__MARKER_none; -; 2889 : } -; 2890 : -; 2891 : // decode image to YCbCr format -; 2892 : static int stbi__decode_jpeg_image(stbi__jpeg* j) -; 2893 : { -; 2894 : int m; -; 2895 : for (m = 0; m < 4; m++) { -; 2896 : j->img_comp[m].raw_data = NULL; -; 2897 : j->img_comp[m].raw_coeff = NULL; -; 2898 : } -; 2899 : j->restart_interval = 0; -; 2900 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; -; 2901 : m = stbi__get_marker(j); -; 2902 : while (!stbi__EOI(m)) { -; 2903 : if (stbi__SOS(m)) { -; 2904 : if (!stbi__process_scan_header(j)) return 0; -; 2905 : if (!stbi__parse_entropy_coded_data(j)) return 0; -; 2906 : if (j->marker == STBI__MARKER_none) { -; 2907 : j->marker = stbi__skip_jpeg_junk_at_end(j); -; 2908 : // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 -; 2909 : } -; 2910 : m = stbi__get_marker(j); -; 2911 : if (STBI__RESTART(m)) -; 2912 : m = stbi__get_marker(j); -; 2913 : } -; 2914 : else if (stbi__DNL(m)) { -; 2915 : int Ld = stbi__get16be(j->s); -; 2916 : stbi__uint32 NL = stbi__get16be(j->s); -; 2917 : if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); -; 2918 : if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); -; 2919 : m = stbi__get_marker(j); -; 2920 : } -; 2921 : else { -; 2922 : if (!stbi__process_marker(j, m)) return 1; -; 2923 : m = stbi__get_marker(j); -; 2924 : } -; 2925 : } -; 2926 : if (j->progressive) -; 2927 : stbi__jpeg_finish(j); -; 2928 : return 1; -; 2929 : } -; 2930 : -; 2931 : // static jfif-centered resampling (across block boundaries) -; 2932 : -; 2933 : typedef stbi_uc* (*resample_row_func)(stbi_uc* out, stbi_uc* in0, stbi_uc* in1, -; 2934 : int w, int hs); -; 2935 : -; 2936 : #define stbi__div4(x) ((stbi_uc) ((x) >> 2)) -; 2937 : -; 2938 : static stbi_uc* resample_row_1(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2939 : { -; 2940 : STBI_NOTUSED(out); -; 2941 : STBI_NOTUSED(in_far); -; 2942 : STBI_NOTUSED(w); -; 2943 : STBI_NOTUSED(hs); -; 2944 : return in_near; -; 2945 : } -; 2946 : -; 2947 : static stbi_uc* stbi__resample_row_v_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2948 : { -; 2949 : // need to generate two samples vertically for every one in input -; 2950 : int i; -; 2951 : STBI_NOTUSED(hs); -; 2952 : for (i = 0; i < w; ++i) -; 2953 : out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2); -; 2954 : return out; -; 2955 : } -; 2956 : -; 2957 : static stbi_uc* stbi__resample_row_h_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2958 : { -; 2959 : // need to generate two samples horizontally for every one in input -; 2960 : int i; -; 2961 : stbi_uc* input = in_near; -; 2962 : -; 2963 : if (w == 1) { -; 2964 : // if only one sample, can't do any interpolation -; 2965 : out[0] = out[1] = input[0]; -; 2966 : return out; -; 2967 : } -; 2968 : -; 2969 : out[0] = input[0]; -; 2970 : out[1] = stbi__div4(input[0] * 3 + input[1] + 2); -; 2971 : for (i = 1; i < w - 1; ++i) { -; 2972 : int n = 3 * input[i] + 2; -; 2973 : out[i * 2 + 0] = stbi__div4(n + input[i - 1]); -; 2974 : out[i * 2 + 1] = stbi__div4(n + input[i + 1]); -; 2975 : } -; 2976 : out[i * 2 + 0] = stbi__div4(input[w - 2] * 3 + input[w - 1] + 2); -; 2977 : out[i * 2 + 1] = input[w - 1]; -; 2978 : -; 2979 : STBI_NOTUSED(in_far); -; 2980 : STBI_NOTUSED(hs); -; 2981 : -; 2982 : return out; -; 2983 : } -; 2984 : -; 2985 : #define stbi__div16(x) ((stbi_uc) ((x) >> 4)) -; 2986 : -; 2987 : static stbi_uc* stbi__resample_row_hv_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2988 : { -; 2989 : // need to generate 2x2 samples for every one in input -; 2990 : int i, t0, t1; -; 2991 : if (w == 1) { -; 2992 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 2993 : return out; -; 2994 : } -; 2995 : -; 2996 : t1 = 3 * in_near[0] + in_far[0]; -; 2997 : out[0] = stbi__div4(t1 + 2); -; 2998 : for (i = 1; i < w; ++i) { -; 2999 : t0 = t1; -; 3000 : t1 = 3 * in_near[i] + in_far[i]; -; 3001 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3002 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3003 : } -; 3004 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3005 : -; 3006 : STBI_NOTUSED(hs); -; 3007 : -; 3008 : return out; -; 3009 : } -; 3010 : -; 3011 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3012 : static stbi_uc* stbi__resample_row_hv_2_simd(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3013 : { -; 3014 : // need to generate 2x2 samples for every one in input -; 3015 : int i = 0, t0, t1; -; 3016 : -; 3017 : if (w == 1) { -; 3018 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 3019 : return out; -; 3020 : } -; 3021 : -; 3022 : t1 = 3 * in_near[0] + in_far[0]; -; 3023 : // process groups of 8 pixels for as long as we can. -; 3024 : // note we can't handle the last pixel in a row in this loop -; 3025 : // because we need to handle the filter boundary conditions. -; 3026 : for (; i < ((w - 1) & ~7); i += 8) { -; 3027 : #if defined(STBI_SSE2) -; 3028 : // load and perform the vertical filtering pass -; 3029 : // this uses 3*x + y = 4*x + (y - x) -; 3030 : __m128i zero = _mm_setzero_si128(); -; 3031 : __m128i farb = _mm_loadl_epi64((__m128i*) (in_far + i)); -; 3032 : __m128i nearb = _mm_loadl_epi64((__m128i*) (in_near + i)); -; 3033 : __m128i farw = _mm_unpacklo_epi8(farb, zero); -; 3034 : __m128i nearw = _mm_unpacklo_epi8(nearb, zero); -; 3035 : __m128i diff = _mm_sub_epi16(farw, nearw); -; 3036 : __m128i nears = _mm_slli_epi16(nearw, 2); -; 3037 : __m128i curr = _mm_add_epi16(nears, diff); // current row -; 3038 : -; 3039 : // horizontal filter works the same based on shifted vers of current -; 3040 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3041 : // insert the previous pixel value (from t1). -; 3042 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3043 : // of next block of 8 pixels added in. -; 3044 : __m128i prv0 = _mm_slli_si128(curr, 2); -; 3045 : __m128i nxt0 = _mm_srli_si128(curr, 2); -; 3046 : __m128i prev = _mm_insert_epi16(prv0, t1, 0); -; 3047 : __m128i next = _mm_insert_epi16(nxt0, 3 * in_near[i + 8] + in_far[i + 8], 7); -; 3048 : -; 3049 : // horizontal filter, polyphase implementation since it's convenient: -; 3050 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3051 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3052 : // note the shared term. -; 3053 : __m128i bias = _mm_set1_epi16(8); -; 3054 : __m128i curs = _mm_slli_epi16(curr, 2); -; 3055 : __m128i prvd = _mm_sub_epi16(prev, curr); -; 3056 : __m128i nxtd = _mm_sub_epi16(next, curr); -; 3057 : __m128i curb = _mm_add_epi16(curs, bias); -; 3058 : __m128i even = _mm_add_epi16(prvd, curb); -; 3059 : __m128i odd = _mm_add_epi16(nxtd, curb); -; 3060 : -; 3061 : // interleave even and odd pixels, then undo scaling. -; 3062 : __m128i int0 = _mm_unpacklo_epi16(even, odd); -; 3063 : __m128i int1 = _mm_unpackhi_epi16(even, odd); -; 3064 : __m128i de0 = _mm_srli_epi16(int0, 4); -; 3065 : __m128i de1 = _mm_srli_epi16(int1, 4); -; 3066 : -; 3067 : // pack and write output -; 3068 : __m128i outv = _mm_packus_epi16(de0, de1); -; 3069 : _mm_storeu_si128((__m128i*) (out + i * 2), outv); -; 3070 : #elif defined(STBI_NEON) -; 3071 : // load and perform the vertical filtering pass -; 3072 : // this uses 3*x + y = 4*x + (y - x) -; 3073 : uint8x8_t farb = vld1_u8(in_far + i); -; 3074 : uint8x8_t nearb = vld1_u8(in_near + i); -; 3075 : int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); -; 3076 : int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); -; 3077 : int16x8_t curr = vaddq_s16(nears, diff); // current row -; 3078 : -; 3079 : // horizontal filter works the same based on shifted vers of current -; 3080 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3081 : // insert the previous pixel value (from t1). -; 3082 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3083 : // of next block of 8 pixels added in. -; 3084 : int16x8_t prv0 = vextq_s16(curr, curr, 7); -; 3085 : int16x8_t nxt0 = vextq_s16(curr, curr, 1); -; 3086 : int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); -; 3087 : int16x8_t next = vsetq_lane_s16(3 * in_near[i + 8] + in_far[i + 8], nxt0, 7); -; 3088 : -; 3089 : // horizontal filter, polyphase implementation since it's convenient: -; 3090 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3091 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3092 : // note the shared term. -; 3093 : int16x8_t curs = vshlq_n_s16(curr, 2); -; 3094 : int16x8_t prvd = vsubq_s16(prev, curr); -; 3095 : int16x8_t nxtd = vsubq_s16(next, curr); -; 3096 : int16x8_t even = vaddq_s16(curs, prvd); -; 3097 : int16x8_t odd = vaddq_s16(curs, nxtd); -; 3098 : -; 3099 : // undo scaling and round, then store with even/odd phases interleaved -; 3100 : uint8x8x2_t o; -; 3101 : o.val[0] = vqrshrun_n_s16(even, 4); -; 3102 : o.val[1] = vqrshrun_n_s16(odd, 4); -; 3103 : vst2_u8(out + i * 2, o); -; 3104 : #endif -; 3105 : -; 3106 : // "previous" value for next iter -; 3107 : t1 = 3 * in_near[i + 7] + in_far[i + 7]; -; 3108 : } -; 3109 : -; 3110 : t0 = t1; -; 3111 : t1 = 3 * in_near[i] + in_far[i]; -; 3112 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3113 : -; 3114 : for (++i; i < w; ++i) { -; 3115 : t0 = t1; -; 3116 : t1 = 3 * in_near[i] + in_far[i]; -; 3117 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3118 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3119 : } -; 3120 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3121 : -; 3122 : STBI_NOTUSED(hs); -; 3123 : -; 3124 : return out; -; 3125 : } -; 3126 : #endif -; 3127 : -; 3128 : static stbi_uc* stbi__resample_row_generic(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3129 : { -; 3130 : // resample with nearest-neighbor -; 3131 : int i, j; -; 3132 : STBI_NOTUSED(in_far); -; 3133 : for (i = 0; i < w; ++i) -; 3134 : for (j = 0; j < hs; ++j) -; 3135 : out[i * hs + j] = in_near[i]; -; 3136 : return out; -; 3137 : } -; 3138 : -; 3139 : // this is a reduced-precision calculation of YCbCr-to-RGB introduced -; 3140 : // to make sure the code produces the same results in both SIMD and scalar -; 3141 : #define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) -; 3142 : static void stbi__YCbCr_to_RGB_row(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step) -; 3143 : { -; 3144 : int i; -; 3145 : for (i = 0; i < count; ++i) { -; 3146 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3147 : int r, g, b; -; 3148 : int cr = pcr[i] - 128; -; 3149 : int cb = pcb[i] - 128; -; 3150 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3151 : g = y_fixed + (cr * -stbi__float2fixed(0.71414f)) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3152 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3153 : r >>= 20; -; 3154 : g >>= 20; -; 3155 : b >>= 20; -; 3156 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3157 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3158 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3159 : out[0] = (stbi_uc)r; -; 3160 : out[1] = (stbi_uc)g; -; 3161 : out[2] = (stbi_uc)b; -; 3162 : out[3] = 255; -; 3163 : out += step; -; 3164 : } -; 3165 : } -; 3166 : -; 3167 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3168 : static void stbi__YCbCr_to_RGB_simd(stbi_uc* out, stbi_uc const* y, stbi_uc const* pcb, stbi_uc const* pcr, int count, int step) -; 3169 : { -; 3170 : int i = 0; -; 3171 : -; 3172 : #ifdef STBI_SSE2 -; 3173 : // step == 3 is pretty ugly on the final interleave, and i'm not convinced -; 3174 : // it's useful in practice (you wouldn't use it for textures, for example). -; 3175 : // so just accelerate step == 4 case. -; 3176 : if (step == 4) { -; 3177 : // this is a fairly straightforward implementation and not super-optimized. -; 3178 : __m128i signflip = _mm_set1_epi8(-0x80); -; 3179 : __m128i cr_const0 = _mm_set1_epi16((short)(1.40200f * 4096.0f + 0.5f)); -; 3180 : __m128i cr_const1 = _mm_set1_epi16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3181 : __m128i cb_const0 = _mm_set1_epi16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3182 : __m128i cb_const1 = _mm_set1_epi16((short)(1.77200f * 4096.0f + 0.5f)); -; 3183 : __m128i y_bias = _mm_set1_epi8((char)(unsigned char)128); -; 3184 : __m128i xw = _mm_set1_epi16(255); // alpha channel -; 3185 : -; 3186 : for (; i + 7 < count; i += 8) { -; 3187 : // load -; 3188 : __m128i y_bytes = _mm_loadl_epi64((__m128i*) (y + i)); -; 3189 : __m128i cr_bytes = _mm_loadl_epi64((__m128i*) (pcr + i)); -; 3190 : __m128i cb_bytes = _mm_loadl_epi64((__m128i*) (pcb + i)); -; 3191 : __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 -; 3192 : __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 -; 3193 : -; 3194 : // unpack to short (and left-shift cr, cb by 8) -; 3195 : __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); -; 3196 : __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); -; 3197 : __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); -; 3198 : -; 3199 : // color transform -; 3200 : __m128i yws = _mm_srli_epi16(yw, 4); -; 3201 : __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); -; 3202 : __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); -; 3203 : __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); -; 3204 : __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); -; 3205 : __m128i rws = _mm_add_epi16(cr0, yws); -; 3206 : __m128i gwt = _mm_add_epi16(cb0, yws); -; 3207 : __m128i bws = _mm_add_epi16(yws, cb1); -; 3208 : __m128i gws = _mm_add_epi16(gwt, cr1); -; 3209 : -; 3210 : // descale -; 3211 : __m128i rw = _mm_srai_epi16(rws, 4); -; 3212 : __m128i bw = _mm_srai_epi16(bws, 4); -; 3213 : __m128i gw = _mm_srai_epi16(gws, 4); -; 3214 : -; 3215 : // back to byte, set up for transpose -; 3216 : __m128i brb = _mm_packus_epi16(rw, bw); -; 3217 : __m128i gxb = _mm_packus_epi16(gw, xw); -; 3218 : -; 3219 : // transpose to interleave channels -; 3220 : __m128i t0 = _mm_unpacklo_epi8(brb, gxb); -; 3221 : __m128i t1 = _mm_unpackhi_epi8(brb, gxb); -; 3222 : __m128i o0 = _mm_unpacklo_epi16(t0, t1); -; 3223 : __m128i o1 = _mm_unpackhi_epi16(t0, t1); -; 3224 : -; 3225 : // store -; 3226 : _mm_storeu_si128((__m128i*) (out + 0), o0); -; 3227 : _mm_storeu_si128((__m128i*) (out + 16), o1); -; 3228 : out += 32; -; 3229 : } -; 3230 : } -; 3231 : #endif -; 3232 : -; 3233 : #ifdef STBI_NEON -; 3234 : // in this version, step=3 support would be easy to add. but is there demand? -; 3235 : if (step == 4) { -; 3236 : // this is a fairly straightforward implementation and not super-optimized. -; 3237 : uint8x8_t signflip = vdup_n_u8(0x80); -; 3238 : int16x8_t cr_const0 = vdupq_n_s16((short)(1.40200f * 4096.0f + 0.5f)); -; 3239 : int16x8_t cr_const1 = vdupq_n_s16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3240 : int16x8_t cb_const0 = vdupq_n_s16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3241 : int16x8_t cb_const1 = vdupq_n_s16((short)(1.77200f * 4096.0f + 0.5f)); -; 3242 : -; 3243 : for (; i + 7 < count; i += 8) { -; 3244 : // load -; 3245 : uint8x8_t y_bytes = vld1_u8(y + i); -; 3246 : uint8x8_t cr_bytes = vld1_u8(pcr + i); -; 3247 : uint8x8_t cb_bytes = vld1_u8(pcb + i); -; 3248 : int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); -; 3249 : int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); -; 3250 : -; 3251 : // expand to s16 -; 3252 : int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); -; 3253 : int16x8_t crw = vshll_n_s8(cr_biased, 7); -; 3254 : int16x8_t cbw = vshll_n_s8(cb_biased, 7); -; 3255 : -; 3256 : // color transform -; 3257 : int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); -; 3258 : int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); -; 3259 : int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); -; 3260 : int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); -; 3261 : int16x8_t rws = vaddq_s16(yws, cr0); -; 3262 : int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); -; 3263 : int16x8_t bws = vaddq_s16(yws, cb1); -; 3264 : -; 3265 : // undo scaling, round, convert to byte -; 3266 : uint8x8x4_t o; -; 3267 : o.val[0] = vqrshrun_n_s16(rws, 4); -; 3268 : o.val[1] = vqrshrun_n_s16(gws, 4); -; 3269 : o.val[2] = vqrshrun_n_s16(bws, 4); -; 3270 : o.val[3] = vdup_n_u8(255); -; 3271 : -; 3272 : // store, interleaving r/g/b/a -; 3273 : vst4_u8(out, o); -; 3274 : out += 8 * 4; -; 3275 : } -; 3276 : } -; 3277 : #endif -; 3278 : -; 3279 : for (; i < count; ++i) { -; 3280 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3281 : int r, g, b; -; 3282 : int cr = pcr[i] - 128; -; 3283 : int cb = pcb[i] - 128; -; 3284 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3285 : g = y_fixed + cr * -stbi__float2fixed(0.71414f) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3286 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3287 : r >>= 20; -; 3288 : g >>= 20; -; 3289 : b >>= 20; -; 3290 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3291 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3292 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3293 : out[0] = (stbi_uc)r; -; 3294 : out[1] = (stbi_uc)g; -; 3295 : out[2] = (stbi_uc)b; -; 3296 : out[3] = 255; -; 3297 : out += step; -; 3298 : } -; 3299 : } -; 3300 : #endif -; 3301 : -; 3302 : // set up the kernels -; 3303 : static void stbi__setup_jpeg(stbi__jpeg* j) -; 3304 : { -; 3305 : j->idct_block_kernel = stbi__idct_block; -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; -; 3308 : -; 3309 : #ifdef STBI_SSE2 -; 3310 : if (stbi__sse2_available()) { -; 3311 : j->idct_block_kernel = stbi__idct_simd; -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3314 : } -; 3315 : #endif -; 3316 : -; 3317 : #ifdef STBI_NEON -; 3318 : j->idct_block_kernel = stbi__idct_simd; -; 3319 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3320 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3321 : #endif -; 3322 : } -; 3323 : -; 3324 : // clean up the temporary component buffers -; 3325 : static void stbi__cleanup_jpeg(stbi__jpeg* j) -; 3326 : { -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); -; 3328 : } -; 3329 : -; 3330 : typedef struct -; 3331 : { -; 3332 : resample_row_func resample; -; 3333 : stbi_uc* line0, * line1; -; 3334 : int hs, vs; // expansion factor in each axis -; 3335 : int w_lores; // horizontal pixels pre-expansion -; 3336 : int ystep; // how far through vertical expansion we are -; 3337 : int ypos; // which pre-expansion row we're on -; 3338 : } stbi__resample; -; 3339 : -; 3340 : // fast 0..255 * 0..255 => 0..255 rounded multiplication -; 3341 : static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) -; 3342 : { -; 3343 : unsigned int t = x * y + 128; -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); -; 3345 : } -; 3346 : -; 3347 : static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp, int req_comp) -; 3348 : { -; 3349 : int n, decode_n, is_rgb; -; 3350 : z->s->img_n = 0; // make stbi__cleanup_jpeg safe -; 3351 : -; 3352 : // validate req_comp -; 3353 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 3354 : -; 3355 : // load a jpeg image from whichever source, but leave in YCbCr format -; 3356 : if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } -; 3357 : -; 3358 : // determine actual number of components to generate -; 3359 : n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; -; 3360 : -; 3361 : is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); -; 3362 : -; 3363 : if (z->s->img_n == 3 && n < 3 && !is_rgb) -; 3364 : decode_n = 1; -; 3365 : else -; 3366 : decode_n = z->s->img_n; -; 3367 : -; 3368 : // nothing to do if no components requested; check this now to avoid -; 3369 : // accessing uninitialized coutput[0] later -; 3370 : if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } -; 3371 : -; 3372 : // resample and color-convert -; 3373 : { -; 3374 : int k; -; 3375 : unsigned int i, j; -; 3376 : stbi_uc* output; -; 3377 : stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL }; -; 3378 : -; 3379 : stbi__resample res_comp[4]; -; 3380 : -; 3381 : for (k = 0; k < decode_n; ++k) { -; 3382 : stbi__resample* r = &res_comp[k]; -; 3383 : -; 3384 : // allocate line buffer big enough for upsampling off the edges -; 3385 : // with upsample factor of 4 -; 3386 : z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3); -; 3387 : if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3388 : -; 3389 : r->hs = z->img_h_max / z->img_comp[k].h; -; 3390 : r->vs = z->img_v_max / z->img_comp[k].v; -; 3391 : r->ystep = r->vs >> 1; -; 3392 : r->w_lores = (z->s->img_x + r->hs - 1) / r->hs; -; 3393 : r->ypos = 0; -; 3394 : r->line0 = r->line1 = z->img_comp[k].data; -; 3395 : -; 3396 : if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; -; 3397 : else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; -; 3398 : else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; -; 3399 : else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; -; 3400 : else r->resample = stbi__resample_row_generic; -; 3401 : } -; 3402 : -; 3403 : // can't error after this so, this is safe -; 3404 : output = (stbi_uc*)stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); -; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3406 : -; 3407 : // now go ahead and resample -; 3408 : for (j = 0; j < z->s->img_y; ++j) { -; 3409 : stbi_uc* out = output + n * z->s->img_x * j; -; 3410 : for (k = 0; k < decode_n; ++k) { -; 3411 : stbi__resample* r = &res_comp[k]; -; 3412 : int y_bot = r->ystep >= (r->vs >> 1); -; 3413 : coutput[k] = r->resample(z->img_comp[k].linebuf, -; 3414 : y_bot ? r->line1 : r->line0, -; 3415 : y_bot ? r->line0 : r->line1, -; 3416 : r->w_lores, r->hs); -; 3417 : if (++r->ystep >= r->vs) { -; 3418 : r->ystep = 0; -; 3419 : r->line0 = r->line1; -; 3420 : if (++r->ypos < z->img_comp[k].y) -; 3421 : r->line1 += z->img_comp[k].w2; -; 3422 : } -; 3423 : } -; 3424 : if (n >= 3) { -; 3425 : stbi_uc* y = coutput[0]; -; 3426 : if (z->s->img_n == 3) { -; 3427 : if (is_rgb) { -; 3428 : for (i = 0; i < z->s->img_x; ++i) { -; 3429 : out[0] = y[i]; -; 3430 : out[1] = coutput[1][i]; -; 3431 : out[2] = coutput[2][i]; -; 3432 : out[3] = 255; -; 3433 : out += n; -; 3434 : } -; 3435 : } -; 3436 : else { -; 3437 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3438 : } -; 3439 : } -; 3440 : else if (z->s->img_n == 4) { -; 3441 : if (z->app14_color_transform == 0) { // CMYK -; 3442 : for (i = 0; i < z->s->img_x; ++i) { -; 3443 : stbi_uc m = coutput[3][i]; -; 3444 : out[0] = stbi__blinn_8x8(coutput[0][i], m); -; 3445 : out[1] = stbi__blinn_8x8(coutput[1][i], m); -; 3446 : out[2] = stbi__blinn_8x8(coutput[2][i], m); -; 3447 : out[3] = 255; -; 3448 : out += n; -; 3449 : } -; 3450 : } -; 3451 : else if (z->app14_color_transform == 2) { // YCCK -; 3452 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3453 : for (i = 0; i < z->s->img_x; ++i) { -; 3454 : stbi_uc m = coutput[3][i]; -; 3455 : out[0] = stbi__blinn_8x8(255 - out[0], m); -; 3456 : out[1] = stbi__blinn_8x8(255 - out[1], m); -; 3457 : out[2] = stbi__blinn_8x8(255 - out[2], m); -; 3458 : out += n; -; 3459 : } -; 3460 : } -; 3461 : else { // YCbCr + alpha? Ignore the fourth channel for now -; 3462 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3463 : } -; 3464 : } -; 3465 : else -; 3466 : for (i = 0; i < z->s->img_x; ++i) { -; 3467 : out[0] = out[1] = out[2] = y[i]; -; 3468 : out[3] = 255; // not used if n==3 -; 3469 : out += n; -; 3470 : } -; 3471 : } -; 3472 : else { -; 3473 : if (is_rgb) { -; 3474 : if (n == 1) -; 3475 : for (i = 0; i < z->s->img_x; ++i) -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3477 : else { -; 3478 : for (i = 0; i < z->s->img_x; ++i, out += 2) { -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3480 : out[1] = 255; -; 3481 : } -; 3482 : } -; 3483 : } -; 3484 : else if (z->s->img_n == 4 && z->app14_color_transform == 0) { -; 3485 : for (i = 0; i < z->s->img_x; ++i) { -; 3486 : stbi_uc m = coutput[3][i]; -; 3487 : stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); -; 3488 : stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); -; 3489 : stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); -; 3490 : out[0] = stbi__compute_y(r, g, b); -; 3491 : out[1] = 255; -; 3492 : out += n; -; 3493 : } -; 3494 : } -; 3495 : else if (z->s->img_n == 4 && z->app14_color_transform == 2) { -; 3496 : for (i = 0; i < z->s->img_x; ++i) { -; 3497 : out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); -; 3498 : out[1] = 255; -; 3499 : out += n; -; 3500 : } -; 3501 : } -; 3502 : else { -; 3503 : stbi_uc* y = coutput[0]; -; 3504 : if (n == 1) -; 3505 : for (i = 0; i < z->s->img_x; ++i) out[i] = y[i]; -; 3506 : else -; 3507 : for (i = 0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } -; 3508 : } -; 3509 : } -; 3510 : } -; 3511 : stbi__cleanup_jpeg(z); -; 3512 : *out_x = z->s->img_x; -; 3513 : *out_y = z->s->img_y; -; 3514 : if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output -; 3515 : return output; -; 3516 : } -; 3517 : } -; 3518 : -; 3519 : static void* stbi__jpeg_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 3520 : { -; 3521 : unsigned char* result; -; 3522 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); -; 3524 : memset(j, 0, sizeof(stbi__jpeg)); -; 3525 : STBI_NOTUSED(ri); -; 3526 : j->s = s; -; 3527 : stbi__setup_jpeg(j); -; 3528 : result = load_jpeg_image(j, x, y, comp, req_comp); -; 3529 : STBI_FREE(j); -; 3530 : return result; -; 3531 : } -; 3532 : -; 3533 : static int stbi__jpeg_test(stbi__context* s) -; 3534 : { -; 3535 : int r; -; 3536 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3538 : memset(j, 0, sizeof(stbi__jpeg)); -; 3539 : j->s = s; -; 3540 : stbi__setup_jpeg(j); -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); -; 3542 : stbi__rewind(s); -; 3543 : STBI_FREE(j); -; 3544 : return r; -; 3545 : } -; 3546 : -; 3547 : static int stbi__jpeg_info_raw(stbi__jpeg* j, int* x, int* y, int* comp) -; 3548 : { -; 3549 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { -; 3550 : stbi__rewind(j->s); -; 3551 : return 0; -; 3552 : } -; 3553 : if (x) *x = j->s->img_x; -; 3554 : if (y) *y = j->s->img_y; -; 3555 : if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; -; 3556 : return 1; -; 3557 : } -; 3558 : -; 3559 : static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp) -; 3560 : { -; 3561 : int result; -; 3562 : stbi__jpeg* j = (stbi__jpeg*)(stbi__malloc(sizeof(stbi__jpeg))); -; 3563 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3564 : memset(j, 0, sizeof(stbi__jpeg)); -; 3565 : j->s = s; -; 3566 : result = stbi__jpeg_info_raw(j, x, y, comp); -; 3567 : STBI_FREE(j); -; 3568 : return result; -; 3569 : } -; 3570 : #endif -; 3571 : -; 3572 : // public domain zlib decode v0.2 Sean Barrett 2006-11-18 -; 3573 : // simple implementation -; 3574 : // - all input must be provided in an upfront buffer -; 3575 : // - all output is written to a single output buffer (can malloc/realloc) -; 3576 : // performance -; 3577 : // - fast huffman -; 3578 : -; 3579 : #ifndef STBI_NO_ZLIB -; 3580 : -; 3581 : // fast-way is faster to check than jpeg huffman, but slow way is slower -; 3582 : #define STBI__ZFAST_BITS 9 // accelerate all cases in default tables -; 3583 : #define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) -; 3584 : #define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet -; 3585 : -; 3586 : // zlib-style huffman encoding -; 3587 : // (jpegs packs from left, zlib from right, so can't share code) -; 3588 : typedef struct -; 3589 : { -; 3590 : stbi__uint16 fast[1 << STBI__ZFAST_BITS]; -; 3591 : stbi__uint16 firstcode[16]; -; 3592 : int maxcode[17]; -; 3593 : stbi__uint16 firstsymbol[16]; -; 3594 : stbi_uc size[STBI__ZNSYMS]; -; 3595 : stbi__uint16 value[STBI__ZNSYMS]; -; 3596 : } stbi__zhuffman; -; 3597 : -; 3598 : stbi_inline static int stbi__bitreverse16(int n) -; 3599 : { -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); -; 3604 : return n; -; 3605 : } -; 3606 : -; 3607 : stbi_inline static int stbi__bit_reverse(int v, int bits) -; 3608 : { -; 3609 : STBI_ASSERT(bits <= 16); -; 3610 : // to bit reverse n bits, reverse 16 and shift -; 3611 : // e.g. 11 bits, bit reverse and shift away 5 -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); -; 3613 : } -; 3614 : -; 3615 : static int stbi__zbuild_huffman(stbi__zhuffman* z, const stbi_uc* sizelist, int num) -; 3616 : { -; 3617 : int i, k = 0; -; 3618 : int code, next_code[16], sizes[17]; -; 3619 : -; 3620 : // DEFLATE spec for generating codes -; 3621 : memset(sizes, 0, sizeof(sizes)); -; 3622 : memset(z->fast, 0, sizeof(z->fast)); -; 3623 : for (i = 0; i < num; ++i) -; 3624 : ++sizes[sizelist[i]]; -; 3625 : sizes[0] = 0; -; 3626 : for (i = 1; i < 16; ++i) -; 3627 : if (sizes[i] > (1 << i)) -; 3628 : return stbi__err("bad sizes", "Corrupt PNG"); -; 3629 : code = 0; -; 3630 : for (i = 1; i < 16; ++i) { -; 3631 : next_code[i] = code; -; 3632 : z->firstcode[i] = (stbi__uint16)code; -; 3633 : z->firstsymbol[i] = (stbi__uint16)k; -; 3634 : code = (code + sizes[i]); -; 3635 : if (sizes[i]) -; 3636 : if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3637 : z->maxcode[i] = code << (16 - i); // preshift for inner loop -; 3638 : code <<= 1; -; 3639 : k += sizes[i]; -; 3640 : } -; 3641 : z->maxcode[16] = 0x10000; // sentinel -; 3642 : for (i = 0; i < num; ++i) { -; 3643 : int s = sizelist[i]; -; 3644 : if (s) { -; 3645 : int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; -; 3646 : stbi__uint16 fastv = (stbi__uint16)((s << 9) | i); -; 3647 : z->size[c] = (stbi_uc)s; -; 3648 : z->value[c] = (stbi__uint16)i; -; 3649 : if (s <= STBI__ZFAST_BITS) { -; 3650 : int j = stbi__bit_reverse(next_code[s], s); -; 3651 : while (j < (1 << STBI__ZFAST_BITS)) { -; 3652 : z->fast[j] = fastv; -; 3653 : j += (1 << s); -; 3654 : } -; 3655 : } -; 3656 : ++next_code[s]; -; 3657 : } -; 3658 : } -; 3659 : return 1; -; 3660 : } -; 3661 : -; 3662 : // zlib-from-memory implementation for PNG reading -; 3663 : // because PNG allows splitting the zlib stream arbitrarily, -; 3664 : // and it's annoying structurally to have PNG call ZLIB call PNG, -; 3665 : // we require PNG read all the IDATs and combine them into a single -; 3666 : // memory buffer -; 3667 : -; 3668 : typedef struct -; 3669 : { -; 3670 : stbi_uc* zbuffer, * zbuffer_end; -; 3671 : int num_bits; -; 3672 : stbi__uint32 code_buffer; -; 3673 : -; 3674 : char* zout; -; 3675 : char* zout_start; -; 3676 : char* zout_end; -; 3677 : int z_expandable; -; 3678 : -; 3679 : stbi__zhuffman z_length, z_distance; -; 3680 : } stbi__zbuf; -; 3681 : -; 3682 : stbi_inline static int stbi__zeof(stbi__zbuf* z) -; 3683 : { -; 3684 : return (z->zbuffer >= z->zbuffer_end); -; 3685 : } -; 3686 : -; 3687 : stbi_inline static stbi_uc stbi__zget8(stbi__zbuf* z) -; 3688 : { -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ -; 3697 : return; -; 3698 : } -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; -; 3700 : z->num_bits += 8; -; 3701 : } while (z->num_bits <= 24); -; 3702 : } -; 3703 : -; 3704 : stbi_inline static unsigned int stbi__zreceive(stbi__zbuf* z, int n) -; 3705 : { -; 3706 : unsigned int k; -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); -; 3708 : k = z->code_buffer & ((1 << n) - 1); -; 3709 : z->code_buffer >>= n; -; 3710 : z->num_bits -= n; -; 3711 : return k; -; 3712 : } -; 3713 : -; 3714 : static int stbi__zhuffman_decode_slowpath(stbi__zbuf* a, stbi__zhuffman* z) -; 3715 : { -; 3716 : int b, s, k; -; 3717 : // not resolved by fast table, so compute it the slow way -; 3718 : // use jpeg approach, which requires MSbits at top -; 3719 : k = stbi__bit_reverse(a->code_buffer, 16); -; 3720 : for (s = STBI__ZFAST_BITS + 1; ; ++s) -; 3721 : if (k < z->maxcode[s]) -; 3722 : break; -; 3723 : if (s >= 16) return -1; // invalid code! -; 3724 : // code size is s, so: -; 3725 : b = (k >> (16 - s)) - z->firstcode[s] + z->firstsymbol[s]; -; 3726 : if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! -; 3727 : if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. -; 3728 : a->code_buffer >>= s; -; 3729 : a->num_bits -= s; -; 3730 : return z->value[b]; -; 3731 : } -; 3732 : -; 3733 : stbi_inline static int stbi__zhuffman_decode(stbi__zbuf* a, stbi__zhuffman* z) -; 3734 : { -; 3735 : int b, s; -; 3736 : if (a->num_bits < 16) { -; 3737 : if (stbi__zeof(a)) { -; 3738 : return -1; /* report error for unexpected end of data. */ -; 3739 : } -; 3740 : stbi__fill_bits(a); -; 3741 : } -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; -; 3743 : if (b) { -; 3744 : s = b >> 9; -; 3745 : a->code_buffer >>= s; -; 3746 : a->num_bits -= s; -; 3747 : return b & 511; -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); -; 3750 : } -; 3751 : -; 3752 : static int stbi__zexpand(stbi__zbuf* z, char* zout, int n) // need to make room for n bytes -; 3753 : { -; 3754 : char* q; -; 3755 : unsigned int cur, limit, old_limit; -; 3756 : z->zout = zout; -; 3757 : if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG"); -; 3758 : cur = (unsigned int)(z->zout - z->zout_start); -; 3759 : limit = old_limit = (unsigned)(z->zout_end - z->zout_start); -; 3760 : if (UINT_MAX - cur < (unsigned)n) return stbi__err("outofmem", "Out of memory"); -; 3761 : while (cur + n > limit) { -; 3762 : if (limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); -; 3763 : limit *= 2; -; 3764 : } -; 3765 : q = (char*)STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); -; 3766 : STBI_NOTUSED(old_limit); -; 3767 : if (q == NULL) return stbi__err("outofmem", "Out of memory"); -; 3768 : z->zout_start = q; -; 3769 : z->zout = q + cur; -; 3770 : z->zout_end = q + limit; -; 3771 : return 1; -; 3772 : } -; 3773 : -; 3774 : static const int stbi__zlength_base[31] = { -; 3775 : 3,4,5,6,7,8,9,10,11,13, -; 3776 : 15,17,19,23,27,31,35,43,51,59, -; 3777 : 67,83,99,115,131,163,195,227,258,0,0 }; -; 3778 : -; 3779 : static const int stbi__zlength_extra[31] = -; 3780 : { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; -; 3781 : -; 3782 : static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, -; 3783 : 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0 }; -; 3784 : -; 3785 : static const int stbi__zdist_extra[32] = -; 3786 : { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 }; -; 3787 : -; 3788 : static int stbi__parse_huffman_block(stbi__zbuf* a) -; 3789 : { -; 3790 : char* zout = a->zout; -; 3791 : for (;;) { -; 3792 : int z = stbi__zhuffman_decode(a, &a->z_length); -; 3793 : if (z < 256) { -; 3794 : if (z < 0) return stbi__err("bad huffman code", "Corrupt PNG"); // error in huffman codes -; 3795 : if (zout >= a->zout_end) { -; 3796 : if (!stbi__zexpand(a, zout, 1)) return 0; -; 3797 : zout = a->zout; -; 3798 : } -; 3799 : *zout++ = (char)z; -; 3800 : } -; 3801 : else { -; 3802 : stbi_uc* p; -; 3803 : int len, dist; -; 3804 : if (z == 256) { -; 3805 : a->zout = zout; -; 3806 : return 1; -; 3807 : } -; 3808 : if (z >= 286) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data -; 3809 : z -= 257; -; 3810 : len = stbi__zlength_base[z]; -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); -; 3812 : z = stbi__zhuffman_decode(a, &a->z_distance); -; 3813 : if (z < 0 || z >= 30) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data -; 3814 : dist = stbi__zdist_base[z]; -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); -; 3816 : if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG"); -; 3817 : if (zout + len > a->zout_end) { -; 3818 : if (!stbi__zexpand(a, zout, len)) return 0; -; 3819 : zout = a->zout; -; 3820 : } -; 3821 : p = (stbi_uc*)(zout - dist); -; 3822 : if (dist == 1) { // run of one byte; common in images. -; 3823 : stbi_uc v = *p; -; 3824 : if (len) { do *zout++ = v; while (--len); } -; 3825 : } -; 3826 : else { -; 3827 : if (len) { do *zout++ = *p++; while (--len); } -; 3828 : } -; 3829 : } -; 3830 : } -; 3831 : } -; 3832 : -; 3833 : static int stbi__compute_huffman_codes(stbi__zbuf* a) -; 3834 : { -; 3835 : static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; -; 3836 : stbi__zhuffman z_codelength; -; 3837 : stbi_uc lencodes[286 + 32 + 137];//padding for maximum single op -; 3838 : stbi_uc codelength_sizes[19]; -; 3839 : int i, n; -; 3840 : -; 3841 : int hlit = stbi__zreceive(a, 5) + 257; -; 3842 : int hdist = stbi__zreceive(a, 5) + 1; -; 3843 : int hclen = stbi__zreceive(a, 4) + 4; -; 3844 : int ntot = hlit + hdist; -; 3845 : -; 3846 : memset(codelength_sizes, 0, sizeof(codelength_sizes)); -; 3847 : for (i = 0; i < hclen; ++i) { -; 3848 : int s = stbi__zreceive(a, 3); -; 3849 : codelength_sizes[length_dezigzag[i]] = (stbi_uc)s; -; 3850 : } -; 3851 : if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; -; 3852 : -; 3853 : n = 0; -; 3854 : while (n < ntot) { -; 3855 : int c = stbi__zhuffman_decode(a, &z_codelength); -; 3856 : if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3857 : if (c < 16) -; 3858 : lencodes[n++] = (stbi_uc)c; -; 3859 : else { -; 3860 : stbi_uc fill = 0; -; 3861 : if (c == 16) { -; 3862 : c = stbi__zreceive(a, 2) + 3; -; 3863 : if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3864 : fill = lencodes[n - 1]; -; 3865 : } -; 3866 : else if (c == 17) { -; 3867 : c = stbi__zreceive(a, 3) + 3; -; 3868 : } -; 3869 : else if (c == 18) { -; 3870 : c = stbi__zreceive(a, 7) + 11; -; 3871 : } -; 3872 : else { -; 3873 : return stbi__err("bad codelengths", "Corrupt PNG"); -; 3874 : } -; 3875 : if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3876 : memset(lencodes + n, fill, c); -; 3877 : n += c; -; 3878 : } -; 3879 : } -; 3880 : if (n != ntot) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3881 : if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; -; 3882 : if (!stbi__zbuild_huffman(&a->z_distance, lencodes + hlit, hdist)) return 0; -; 3883 : return 1; -; 3884 : } -; 3885 : -; 3886 : static int stbi__parse_uncompressed_block(stbi__zbuf* a) -; 3887 : { -; 3888 : stbi_uc header[4]; -; 3889 : int len, nlen, k; -; 3890 : if (a->num_bits & 7) -; 3891 : stbi__zreceive(a, a->num_bits & 7); // discard -; 3892 : // drain the bit-packed data into header -; 3893 : k = 0; -; 3894 : while (a->num_bits > 0) { -; 3895 : header[k++] = (stbi_uc)(a->code_buffer & 255); // suppress MSVC run-time check -; 3896 : a->code_buffer >>= 8; -; 3897 : a->num_bits -= 8; -; 3898 : } -; 3899 : if (a->num_bits < 0) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3900 : // now fill header the normal way -; 3901 : while (k < 4) -; 3902 : header[k++] = stbi__zget8(a); -; 3903 : len = header[1] * 256 + header[0]; -; 3904 : nlen = header[3] * 256 + header[2]; -; 3905 : if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3906 : if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG"); -; 3907 : if (a->zout + len > a->zout_end) -; 3908 : if (!stbi__zexpand(a, a->zout, len)) return 0; -; 3909 : memcpy(a->zout, a->zbuffer, len); -; 3910 : a->zbuffer += len; -; 3911 : a->zout += len; -; 3912 : return 1; -; 3913 : } -; 3914 : -; 3915 : static int stbi__parse_zlib_header(stbi__zbuf* a) -; 3916 : { -; 3917 : int cmf = stbi__zget8(a); -; 3918 : int cm = cmf & 15; -; 3919 : /* int cinfo = cmf >> 4; */ -; 3920 : int flg = stbi__zget8(a); -; 3921 : if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3922 : if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png -; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png -; 3925 : // window = 1 << (8 + cinfo)... but who cares, we fully buffer output -; 3926 : return 1; -; 3927 : } -; 3928 : -; 3929 : static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] = -; 3930 : { -; 3931 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3932 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3933 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3934 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3935 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3936 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3937 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3938 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3939 : 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 -; 3940 : }; -; 3941 : static const stbi_uc stbi__zdefault_distance[32] = -; 3942 : { -; 3943 : 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 -; 3944 : }; -; 3945 : /* -; 3946 : Init algorithm: -; 3947 : { -; 3948 : int i; // use <= to match clearly with spec -; 3949 : for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; -; 3950 : for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; -; 3951 : for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; -; 3952 : for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; -; 3953 : -; 3954 : for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; -; 3955 : } -; 3956 : */ -; 3957 : -; 3958 : static int stbi__parse_zlib(stbi__zbuf* a, int parse_header) -; 3959 : { -; 3960 : int final, type; -; 3961 : if (parse_header) -; 3962 : if (!stbi__parse_zlib_header(a)) return 0; -; 3963 : a->num_bits = 0; -; 3964 : a->code_buffer = 0; -; 3965 : do { -; 3966 : final = stbi__zreceive(a, 1); -; 3967 : type = stbi__zreceive(a, 2); -; 3968 : if (type == 0) { -; 3969 : if (!stbi__parse_uncompressed_block(a)) return 0; -; 3970 : } -; 3971 : else if (type == 3) { -; 3972 : return 0; -; 3973 : } -; 3974 : else { -; 3975 : if (type == 1) { -; 3976 : // use fixed code lengths -; 3977 : if (!stbi__zbuild_huffman(&a->z_length, stbi__zdefault_length, STBI__ZNSYMS)) return 0; -; 3978 : if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; -; 3979 : } -; 3980 : else { -; 3981 : if (!stbi__compute_huffman_codes(a)) return 0; -; 3982 : } -; 3983 : if (!stbi__parse_huffman_block(a)) return 0; -; 3984 : } -; 3985 : } while (!final); -; 3986 : return 1; -; 3987 : } -; 3988 : -; 3989 : static int stbi__do_zlib(stbi__zbuf* a, char* obuf, int olen, int exp, int parse_header) -; 3990 : { -; 3991 : a->zout_start = obuf; -; 3992 : a->zout = obuf; -; 3993 : a->zout_end = obuf + olen; -; 3994 : a->z_expandable = exp; -; 3995 : -; 3996 : return stbi__parse_zlib(a, parse_header); -; 3997 : } -; 3998 : -; 3999 : STBIDEF char* stbi_zlib_decode_malloc_guesssize(const char* buffer, int len, int initial_size, int* outlen) -; 4000 : { -; 4001 : stbi__zbuf a; -; 4002 : char* p = (char*)stbi__malloc(initial_size); -; 4003 : if (p == NULL) return NULL; -; 4004 : a.zbuffer = (stbi_uc*)buffer; -; 4005 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4006 : if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { -; 4007 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4008 : return a.zout_start; -; 4009 : } -; 4010 : else { -; 4011 : STBI_FREE(a.zout_start); -; 4012 : return NULL; -; 4013 : } -; 4014 : } -; 4015 : -; 4016 : STBIDEF char* stbi_zlib_decode_malloc(char const* buffer, int len, int* outlen) -; 4017 : { -; 4018 : return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); -; 4019 : } -; 4020 : -; 4021 : STBIDEF char* stbi_zlib_decode_malloc_guesssize_headerflag(const char* buffer, int len, int initial_size, int* outlen, int parse_header) -; 4022 : { -; 4023 : stbi__zbuf a; -; 4024 : char* p = (char*)stbi__malloc(initial_size); -; 4025 : if (p == NULL) return NULL; -; 4026 : a.zbuffer = (stbi_uc*)buffer; -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4028 : if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { -; 4029 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4030 : return a.zout_start; -; 4031 : } -; 4032 : else { -; 4033 : STBI_FREE(a.zout_start); -; 4034 : return NULL; -; 4035 : } -; 4036 : } -; 4037 : -; 4038 : STBIDEF int stbi_zlib_decode_buffer(char* obuffer, int olen, char const* ibuffer, int ilen) -; 4039 : { -; 4040 : stbi__zbuf a; -; 4041 : a.zbuffer = (stbi_uc*)ibuffer; -; 4042 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4043 : if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) -; 4044 : return (int)(a.zout - a.zout_start); -; 4045 : else -; 4046 : return -1; -; 4047 : } -; 4048 : -; 4049 : STBIDEF char* stbi_zlib_decode_noheader_malloc(char const* buffer, int len, int* outlen) -; 4050 : { -; 4051 : stbi__zbuf a; -; 4052 : char* p = (char*)stbi__malloc(16384); -; 4053 : if (p == NULL) return NULL; -; 4054 : a.zbuffer = (stbi_uc*)buffer; -; 4055 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4056 : if (stbi__do_zlib(&a, p, 16384, 1, 0)) { -; 4057 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4058 : return a.zout_start; -; 4059 : } -; 4060 : else { -; 4061 : STBI_FREE(a.zout_start); -; 4062 : return NULL; -; 4063 : } -; 4064 : } -; 4065 : -; 4066 : STBIDEF int stbi_zlib_decode_noheader_buffer(char* obuffer, int olen, const char* ibuffer, int ilen) -; 4067 : { -; 4068 : stbi__zbuf a; -; 4069 : a.zbuffer = (stbi_uc*)ibuffer; -; 4070 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4071 : if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) -; 4072 : return (int)(a.zout - a.zout_start); -; 4073 : else -; 4074 : return -1; -; 4075 : } -; 4076 : #endif -; 4077 : -; 4078 : // public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 -; 4079 : // simple implementation -; 4080 : // - only 8-bit samples -; 4081 : // - no CRC checking -; 4082 : // - allocates lots of intermediate memory -; 4083 : // - avoids problem of streaming data between subsystems -; 4084 : // - avoids explicit window management -; 4085 : // performance -; 4086 : // - uses stb_zlib, a PD zlib implementation with fast huffman decoding -; 4087 : -; 4088 : #ifndef STBI_NO_PNG -; 4089 : typedef struct -; 4090 : { -; 4091 : stbi__uint32 length; -; 4092 : stbi__uint32 type; -; 4093 : } stbi__pngchunk; -; 4094 : -; 4095 : static stbi__pngchunk stbi__get_chunk_header(stbi__context* s) -; 4096 : { -; 4097 : stbi__pngchunk c; -; 4098 : c.length = stbi__get32be(s); -; 4099 : c.type = stbi__get32be(s); -; 4100 : return c; -; 4101 : } -; 4102 : -; 4103 : static int stbi__check_png_header(stbi__context* s) -; 4104 : { -; 4105 : static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; -; 4106 : int i; -; 4107 : for (i = 0; i < 8; ++i) -; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); -; 4109 : return 1; -; 4110 : } -; 4111 : -; 4112 : typedef struct -; 4113 : { -; 4114 : stbi__context* s; -; 4115 : stbi_uc* idata, * expanded, * out; -; 4116 : int depth; -; 4117 : } stbi__png; -; 4118 : -; 4119 : enum { -; 4120 : STBI__F_none = 0, -; 4121 : STBI__F_sub = 1, -; 4122 : STBI__F_up = 2, -; 4123 : STBI__F_avg = 3, -; 4124 : STBI__F_paeth = 4, -; 4125 : // synthetic filters used for first scanline to avoid needing a dummy row of 0s -; 4126 : STBI__F_avg_first, -; 4127 : STBI__F_paeth_first -; 4128 : }; -; 4129 : -; 4130 : static stbi_uc first_row_filter[5] = -; 4131 : { -; 4132 : STBI__F_none, -; 4133 : STBI__F_sub, -; 4134 : STBI__F_none, -; 4135 : STBI__F_avg_first, -; 4136 : STBI__F_paeth_first -; 4137 : }; -; 4138 : -; 4139 : static int stbi__paeth(int a, int b, int c) -; 4140 : { -; 4141 : int p = a + b - c; -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); -; 4144 : int pc = abs(p - c); -; 4145 : if (pa <= pb && pa <= pc) return a; -; 4146 : if (pb <= pc) return b; -; 4147 : return c; -; 4148 : } -; 4149 : -; 4150 : static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; -; 4151 : -; 4152 : // create the png data from post-deflated data -; 4153 : static int stbi__create_png_image_raw(stbi__png* a, stbi_uc* raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -; 4154 : { -; 4155 : int bytes = (depth == 16 ? 2 : 1); -; 4156 : stbi__context* s = a->s; -; 4157 : stbi__uint32 i, j, stride = x * out_n * bytes; -; 4158 : stbi__uint32 img_len, img_width_bytes; -; 4159 : int k; -; 4160 : int img_n = s->img_n; // copy it into a local for later -; 4161 : -; 4162 : int output_bytes = out_n * bytes; -; 4163 : int filter_bytes = img_n * bytes; -; 4164 : int width = x; -; 4165 : -; 4166 : STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1); -; 4167 : a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into -; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); -; 4169 : -; 4170 : if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); -; 4171 : img_width_bytes = (((img_n * x * depth) + 7) >> 3); -; 4172 : img_len = (img_width_bytes + 1) * y; -; 4173 : -; 4174 : // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, -; 4175 : // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), -; 4176 : // so just check for raw_len < img_len always. -; 4177 : if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG"); -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { -; 4180 : stbi_uc* cur = a->out + stride * j; -; 4181 : stbi_uc* prior; -; 4182 : int filter = *raw++; -; 4183 : -; 4184 : if (filter > 4) -; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); -; 4186 : -; 4187 : if (depth < 8) { -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); -; 4189 : cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place -; 4190 : filter_bytes = 1; -; 4191 : width = img_width_bytes; -; 4192 : } -; 4193 : prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above -; 4194 : -; 4195 : // if first row, use special filter that doesn't sample previous row -; 4196 : if (j == 0) filter = first_row_filter[filter]; -; 4197 : -; 4198 : // handle first byte explicitly -; 4199 : for (k = 0; k < filter_bytes; ++k) { -; 4200 : switch (filter) { -; 4201 : case STBI__F_none: cur[k] = raw[k]; break; -; 4202 : case STBI__F_sub: cur[k] = raw[k]; break; -; 4203 : case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; -; 4204 : case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break; -; 4205 : case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break; -; 4206 : case STBI__F_avg_first: cur[k] = raw[k]; break; -; 4207 : case STBI__F_paeth_first: cur[k] = raw[k]; break; -; 4208 : } -; 4209 : } -; 4210 : -; 4211 : if (depth == 8) { -; 4212 : if (img_n != out_n) -; 4213 : cur[img_n] = 255; // first pixel -; 4214 : raw += img_n; -; 4215 : cur += out_n; -; 4216 : prior += out_n; -; 4217 : } -; 4218 : else if (depth == 16) { -; 4219 : if (img_n != out_n) { -; 4220 : cur[filter_bytes] = 255; // first pixel top byte -; 4221 : cur[filter_bytes + 1] = 255; // first pixel bottom byte -; 4222 : } -; 4223 : raw += filter_bytes; -; 4224 : cur += output_bytes; -; 4225 : prior += output_bytes; -; 4226 : } -; 4227 : else { -; 4228 : raw += 1; -; 4229 : cur += 1; -; 4230 : prior += 1; -; 4231 : } -; 4232 : -; 4233 : // this is a little gross, so that we don't switch per-pixel or per-component -; 4234 : if (depth < 8 || img_n == out_n) { -; 4235 : int nk = (width - 1) * filter_bytes; -; 4236 : #define STBI__CASE(f) \ -; 4237 : case f: \ -; 4238 : for (k=0; k < nk; ++k) -; 4239 : switch (filter) { -; 4240 : // "none" filter turns into a memcpy here; make that explicit. -; 4241 : case STBI__F_none: memcpy(cur, raw, nk); break; -; 4242 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break; -; 4243 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4244 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break; -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; -; 4246 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break; -; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; -; 4248 : } -; 4249 : #undef STBI__CASE -; 4250 : raw += nk; -; 4251 : } -; 4252 : else { -; 4253 : STBI_ASSERT(img_n + 1 == out_n); -; 4254 : #define STBI__CASE(f) \ -; 4255 : case f: \ -; 4256 : for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ -; 4257 : for (k=0; k < filter_bytes; ++k) -; 4258 : switch (filter) { -; 4259 : STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; -; 4260 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break; -; 4261 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4262 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break; -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; -; 4264 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break; -; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; -; 4266 : } -; 4267 : #undef STBI__CASE -; 4268 : -; 4269 : // the loop above sets the high byte of the pixels' alpha, but for -; 4270 : // 16 bit png files we also need the low byte set. we'll do that here. -; 4271 : if (depth == 16) { -; 4272 : cur = a->out + stride * j; // start at the beginning of the row again -; 4273 : for (i = 0; i < x; ++i, cur += output_bytes) { -; 4274 : cur[filter_bytes + 1] = 255; -; 4275 : } -; 4276 : } -; 4277 : } -; 4278 : } -; 4279 : -; 4280 : // we make a separate pass to expand bits to pixels; for performance, -; 4281 : // this could run two scanlines behind the above code, so it won't -; 4282 : // intefere with filtering but will still be in the cache. -; 4283 : if (depth < 8) { -; 4284 : for (j = 0; j < y; ++j) { -; 4285 : stbi_uc* cur = a->out + stride * j; -; 4286 : stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes; -; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit -; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop -; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range -; 4290 : -; 4291 : // note that the final byte might overshoot and write more data than desired. -; 4292 : // we can allocate enough data that this never writes out of memory, but it -; 4293 : // could also overwrite the next scanline. can it overwrite non-empty data -; 4294 : // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. -; 4295 : // so we need to explicitly clamp the final ones -; 4296 : -; 4297 : if (depth == 4) { -; 4298 : for (k = x * img_n; k >= 2; k -= 2, ++in) { -; 4299 : *cur++ = scale * ((*in >> 4)); -; 4300 : *cur++ = scale * ((*in) & 0x0f); -; 4301 : } -; 4302 : if (k > 0) *cur++ = scale * ((*in >> 4)); -; 4303 : } -; 4304 : else if (depth == 2) { -; 4305 : for (k = x * img_n; k >= 4; k -= 4, ++in) { -; 4306 : *cur++ = scale * ((*in >> 6)); -; 4307 : *cur++ = scale * ((*in >> 4) & 0x03); -; 4308 : *cur++ = scale * ((*in >> 2) & 0x03); -; 4309 : *cur++ = scale * ((*in) & 0x03); -; 4310 : } -; 4311 : if (k > 0) *cur++ = scale * ((*in >> 6)); -; 4312 : if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); -; 4313 : if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); -; 4314 : } -; 4315 : else if (depth == 1) { -; 4316 : for (k = x * img_n; k >= 8; k -= 8, ++in) { -; 4317 : *cur++ = scale * ((*in >> 7)); -; 4318 : *cur++ = scale * ((*in >> 6) & 0x01); -; 4319 : *cur++ = scale * ((*in >> 5) & 0x01); -; 4320 : *cur++ = scale * ((*in >> 4) & 0x01); -; 4321 : *cur++ = scale * ((*in >> 3) & 0x01); -; 4322 : *cur++ = scale * ((*in >> 2) & 0x01); -; 4323 : *cur++ = scale * ((*in >> 1) & 0x01); -; 4324 : *cur++ = scale * ((*in) & 0x01); -; 4325 : } -; 4326 : if (k > 0) *cur++ = scale * ((*in >> 7)); -; 4327 : if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); -; 4328 : if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); -; 4329 : if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); -; 4330 : if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); -; 4331 : if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); -; 4332 : if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); -; 4333 : } -; 4334 : if (img_n != out_n) { -; 4335 : int q; -; 4336 : // insert alpha = 255 -; 4337 : cur = a->out + stride * j; -; 4338 : if (img_n == 1) { -; 4339 : for (q = x - 1; q >= 0; --q) { -; 4340 : cur[q * 2 + 1] = 255; -; 4341 : cur[q * 2 + 0] = cur[q]; -; 4342 : } -; 4343 : } -; 4344 : else { -; 4345 : STBI_ASSERT(img_n == 3); -; 4346 : for (q = x - 1; q >= 0; --q) { -; 4347 : cur[q * 4 + 3] = 255; -; 4348 : cur[q * 4 + 2] = cur[q * 3 + 2]; -; 4349 : cur[q * 4 + 1] = cur[q * 3 + 1]; -; 4350 : cur[q * 4 + 0] = cur[q * 3 + 0]; -; 4351 : } -; 4352 : } -; 4353 : } -; 4354 : } -; 4355 : } -; 4356 : else if (depth == 16) { -; 4357 : // force the image data from big-endian to platform-native. -; 4358 : // this is done in a separate pass due to the decoding relying -; 4359 : // on the data being untouched, but could probably be done -; 4360 : // per-line during decode if care is taken. -; 4361 : stbi_uc* cur = a->out; -; 4362 : stbi__uint16* cur16 = (stbi__uint16*)cur; -; 4363 : -; 4364 : for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) { -; 4365 : *cur16 = (cur[0] << 8) | cur[1]; -; 4366 : } -; 4367 : } -; 4368 : -; 4369 : return 1; -; 4370 : } -; 4371 : -; 4372 : static int stbi__create_png_image(stbi__png* a, stbi_uc* image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -; 4373 : { -; 4374 : int bytes = (depth == 16 ? 2 : 1); -; 4375 : int out_bytes = out_n * bytes; -; 4376 : stbi_uc* final; -; 4377 : int p; -; 4378 : if (!interlaced) -; 4379 : return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); -; 4380 : -; 4381 : // de-interlacing -; 4382 : final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); -; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); -; 4384 : for (p = 0; p < 7; ++p) { -; 4385 : int xorig[] = { 0,4,0,2,0,1,0 }; -; 4386 : int yorig[] = { 0,0,4,0,2,0,1 }; -; 4387 : int xspc[] = { 8,8,4,4,2,2,1 }; -; 4388 : int yspc[] = { 8,8,8,4,4,2,2 }; -; 4389 : int i, j, x, y; -; 4390 : // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 -; 4391 : x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p]; -; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; -; 4393 : if (x && y) { -; 4394 : stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; -; 4395 : if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { -; 4396 : STBI_FREE(final); -; 4397 : return 0; -; 4398 : } -; 4399 : for (j = 0; j < y; ++j) { -; 4400 : for (i = 0; i < x; ++i) { -; 4401 : int out_y = j * yspc[p] + yorig[p]; -; 4402 : int out_x = i * xspc[p] + xorig[p]; -; 4403 : memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, -; 4404 : a->out + (j * x + i) * out_bytes, out_bytes); -; 4405 : } -; 4406 : } -; 4407 : STBI_FREE(a->out); -; 4408 : image_data += img_len; -; 4409 : image_data_len -= img_len; -; 4410 : } -; 4411 : } -; 4412 : a->out = final; -; 4413 : -; 4414 : return 1; -; 4415 : } -; 4416 : -; 4417 : static int stbi__compute_transparency(stbi__png* z, stbi_uc tc[3], int out_n) -; 4418 : { -; 4419 : stbi__context* s = z->s; -; 4420 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4421 : stbi_uc* p = z->out; -; 4422 : -; 4423 : // compute color-based transparency, assuming we've -; 4424 : // already got 255 as the alpha value in the output -; 4425 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4426 : -; 4427 : if (out_n == 2) { -; 4428 : for (i = 0; i < pixel_count; ++i) { -; 4429 : p[1] = (p[0] == tc[0] ? 0 : 255); -; 4430 : p += 2; -; 4431 : } -; 4432 : } -; 4433 : else { -; 4434 : for (i = 0; i < pixel_count; ++i) { -; 4435 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4436 : p[3] = 0; -; 4437 : p += 4; -; 4438 : } -; 4439 : } -; 4440 : return 1; -; 4441 : } -; 4442 : -; 4443 : static int stbi__compute_transparency16(stbi__png* z, stbi__uint16 tc[3], int out_n) -; 4444 : { -; 4445 : stbi__context* s = z->s; -; 4446 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4447 : stbi__uint16* p = (stbi__uint16*)z->out; -; 4448 : -; 4449 : // compute color-based transparency, assuming we've -; 4450 : // already got 65535 as the alpha value in the output -; 4451 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4452 : -; 4453 : if (out_n == 2) { -; 4454 : for (i = 0; i < pixel_count; ++i) { -; 4455 : p[1] = (p[0] == tc[0] ? 0 : 65535); -; 4456 : p += 2; -; 4457 : } -; 4458 : } -; 4459 : else { -; 4460 : for (i = 0; i < pixel_count; ++i) { -; 4461 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4462 : p[3] = 0; -; 4463 : p += 4; -; 4464 : } -; 4465 : } -; 4466 : return 1; -; 4467 : } -; 4468 : -; 4469 : static int stbi__expand_png_palette(stbi__png* a, stbi_uc* palette, int len, int pal_img_n) -; 4470 : { -; 4471 : stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; -; 4472 : stbi_uc* p, * temp_out, * orig = a->out; -; 4473 : -; 4474 : p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0); -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4476 : -; 4477 : // between here and free(out) below, exitting would leak -; 4478 : temp_out = p; -; 4479 : -; 4480 : if (pal_img_n == 3) { -; 4481 : for (i = 0; i < pixel_count; ++i) { -; 4482 : int n = orig[i] * 4; -; 4483 : p[0] = palette[n]; -; 4484 : p[1] = palette[n + 1]; -; 4485 : p[2] = palette[n + 2]; -; 4486 : p += 3; -; 4487 : } -; 4488 : } -; 4489 : else { -; 4490 : for (i = 0; i < pixel_count; ++i) { -; 4491 : int n = orig[i] * 4; -; 4492 : p[0] = palette[n]; -; 4493 : p[1] = palette[n + 1]; -; 4494 : p[2] = palette[n + 2]; -; 4495 : p[3] = palette[n + 3]; -; 4496 : p += 4; -; 4497 : } -; 4498 : } -; 4499 : STBI_FREE(a->out); -; 4500 : a->out = temp_out; -; 4501 : -; 4502 : STBI_NOTUSED(len); -; 4503 : -; 4504 : return 1; -; 4505 : } -; 4506 : -; 4507 : static int stbi__unpremultiply_on_load_global = 0; -; 4508 : static int stbi__de_iphone_flag_global = 0; -; 4509 : -; 4510 : STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) -; 4511 : { -; 4512 : stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; -; 4513 : } -; 4514 : -; 4515 : STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) -; 4516 : { -; 4517 : stbi__de_iphone_flag_global = flag_true_if_should_convert; -; 4518 : } -; 4519 : -; 4520 : #ifndef STBI_THREAD_LOCAL -; 4521 : #define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global -; 4522 : #define stbi__de_iphone_flag stbi__de_iphone_flag_global -; 4523 : #else -; 4524 : static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; -; 4525 : static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; -; 4526 : -; 4527 : STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) -; 4528 : { -; 4529 : stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; -; 4530 : stbi__unpremultiply_on_load_set = 1; -; 4531 : } -; 4532 : -; 4533 : STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert) -; 4534 : { -; 4535 : stbi__de_iphone_flag_local = flag_true_if_should_convert; -; 4536 : stbi__de_iphone_flag_set = 1; -; 4537 : } -; 4538 : -; 4539 : #define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \ -; 4540 : ? stbi__unpremultiply_on_load_local \ -; 4541 : : stbi__unpremultiply_on_load_global) -; 4542 : #define stbi__de_iphone_flag (stbi__de_iphone_flag_set \ -; 4543 : ? stbi__de_iphone_flag_local \ -; 4544 : : stbi__de_iphone_flag_global) -; 4545 : #endif // STBI_THREAD_LOCAL -; 4546 : -; 4547 : static void stbi__de_iphone(stbi__png* z) -; 4548 : { -; 4549 : stbi__context* s = z->s; -; 4550 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4551 : stbi_uc* p = z->out; -; 4552 : -; 4553 : if (s->img_out_n == 3) { // convert bgr to rgb -; 4554 : for (i = 0; i < pixel_count; ++i) { -; 4555 : stbi_uc t = p[0]; -; 4556 : p[0] = p[2]; -; 4557 : p[2] = t; -; 4558 : p += 3; -; 4559 : } -; 4560 : } -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { -; 4566 : stbi_uc a = p[3]; -; 4567 : stbi_uc t = p[0]; -; 4568 : if (a) { -; 4569 : stbi_uc half = a / 2; -; 4570 : p[0] = (p[2] * 255 + half) / a; -; 4571 : p[1] = (p[1] * 255 + half) / a; -; 4572 : p[2] = (t * 255 + half) / a; -; 4573 : } -; 4574 : else { -; 4575 : p[0] = p[2]; -; 4576 : p[2] = t; -; 4577 : } -; 4578 : p += 4; -; 4579 : } -; 4580 : } -; 4581 : else { -; 4582 : // convert bgr to rgb -; 4583 : for (i = 0; i < pixel_count; ++i) { -; 4584 : stbi_uc t = p[0]; -; 4585 : p[0] = p[2]; -; 4586 : p[2] = t; -; 4587 : p += 4; -; 4588 : } -; 4589 : } -; 4590 : } -; 4591 : } -; 4592 : -; 4593 : #define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) -; 4594 : -; 4595 : static int stbi__parse_png_file(stbi__png* z, int scan, int req_comp) -; 4596 : { -; 4597 : stbi_uc palette[1024], pal_img_n = 0; -; 4598 : stbi_uc has_trans = 0, tc[3] = { 0 }; -; 4599 : stbi__uint16 tc16[3]; -; 4600 : stbi__uint32 ioff = 0, idata_limit = 0, i, pal_len = 0; -; 4601 : int first = 1, k, interlace = 0, color = 0, is_iphone = 0; -; 4602 : stbi__context* s = z->s; -; 4603 : -; 4604 : z->expanded = NULL; -; 4605 : z->idata = NULL; -; 4606 : z->out = NULL; -; 4607 : -; 4608 : if (!stbi__check_png_header(s)) return 0; -; 4609 : -; 4610 : if (scan == STBI__SCAN_type) return 1; -; 4611 : -; 4612 : for (;;) { -; 4613 : stbi__pngchunk c = stbi__get_chunk_header(s); -; 4614 : switch (c.type) { -; 4615 : case STBI__PNG_TYPE('C', 'g', 'B', 'I'): -; 4616 : is_iphone = 1; -; 4617 : stbi__skip(s, c.length); -; 4618 : break; -; 4619 : case STBI__PNG_TYPE('I', 'H', 'D', 'R'): { -; 4620 : int comp, filter; -; 4621 : if (!first) return stbi__err("multiple IHDR", "Corrupt PNG"); -; 4622 : first = 0; -; 4623 : if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG"); -; 4624 : s->img_x = stbi__get32be(s); -; 4625 : s->img_y = stbi__get32be(s); -; 4626 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4627 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4628 : z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only"); -; 4629 : color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype", "Corrupt PNG"); -; 4630 : if (color == 3 && z->depth == 16) return stbi__err("bad ctype", "Corrupt PNG"); -; 4631 : if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype", "Corrupt PNG"); -; 4632 : comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG"); -; 4633 : filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG"); -; 4634 : interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG"); -; 4635 : if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG"); -; 4636 : if (!pal_img_n) { -; 4637 : s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); -; 4638 : if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); -; 4639 : } -; 4640 : else { -; 4641 : // if paletted, then pal_n is our final components, and -; 4642 : // img_n is # components to decompress/filter. -; 4643 : s->img_n = 1; -; 4644 : if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large", "Corrupt PNG"); -; 4645 : } -; 4646 : // even with SCAN_header, have to scan to see if we have a tRNS -; 4647 : break; -; 4648 : } -; 4649 : -; 4650 : case STBI__PNG_TYPE('P', 'L', 'T', 'E'): { -; 4651 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4652 : if (c.length > 256 * 3) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4653 : pal_len = c.length / 3; -; 4654 : if (pal_len * 3 != c.length) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4655 : for (i = 0; i < pal_len; ++i) { -; 4656 : palette[i * 4 + 0] = stbi__get8(s); -; 4657 : palette[i * 4 + 1] = stbi__get8(s); -; 4658 : palette[i * 4 + 2] = stbi__get8(s); -; 4659 : palette[i * 4 + 3] = 255; -; 4660 : } -; 4661 : break; -; 4662 : } -; 4663 : -; 4664 : case STBI__PNG_TYPE('t', 'R', 'N', 'S'): { -; 4665 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4666 : if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG"); -; 4667 : if (pal_img_n) { -; 4668 : if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } -; 4669 : if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG"); -; 4670 : if (c.length > pal_len) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4671 : pal_img_n = 4; -; 4672 : for (i = 0; i < c.length; ++i) -; 4673 : palette[i * 4 + 3] = stbi__get8(s); -; 4674 : } -; 4675 : else { -; 4676 : if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG"); -; 4677 : if (c.length != (stbi__uint32)s->img_n * 2) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4678 : has_trans = 1; -; 4679 : // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. -; 4680 : if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } -; 4681 : if (z->depth == 16) { -; 4682 : for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is -; 4683 : } -; 4684 : else { -; 4685 : for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger -; 4686 : } -; 4687 : } -; 4688 : break; -; 4689 : } -; 4690 : -; 4691 : case STBI__PNG_TYPE('I', 'D', 'A', 'T'): { -; 4692 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4693 : if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG"); -; 4694 : if (scan == STBI__SCAN_header) { -; 4695 : // header scan definitely stops at first IDAT -; 4696 : if (pal_img_n) -; 4697 : s->img_n = pal_img_n; -; 4698 : return 1; -; 4699 : } -; 4700 : if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); -; 4701 : if ((int)(ioff + c.length) < (int)ioff) return 0; -; 4702 : if (ioff + c.length > idata_limit) { -; 4703 : stbi__uint32 idata_limit_old = idata_limit; -; 4704 : stbi_uc* p; -; 4705 : if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; -; 4706 : while (ioff + c.length > idata_limit) -; 4707 : idata_limit *= 2; -; 4708 : STBI_NOTUSED(idata_limit_old); -; 4709 : p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4710 : z->idata = p; -; 4711 : } -; 4712 : if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG"); -; 4713 : ioff += c.length; -; 4714 : break; -; 4715 : } -; 4716 : -; 4717 : case STBI__PNG_TYPE('I', 'E', 'N', 'D'): { -; 4718 : stbi__uint32 raw_len, bpl; -; 4719 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4720 : if (scan != STBI__SCAN_load) return 1; -; 4721 : if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG"); -; 4722 : // initial guess for decoded data size to avoid unnecessary reallocs -; 4723 : bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component -; 4724 : raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); -; 4726 : if (z->expanded == NULL) return 0; // zlib should set error -; 4727 : STBI_FREE(z->idata); z->idata = NULL; -; 4728 : if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans) -; 4729 : s->img_out_n = s->img_n + 1; -; 4730 : else -; 4731 : s->img_out_n = s->img_n; -; 4732 : if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; -; 4733 : if (has_trans) { -; 4734 : if (z->depth == 16) { -; 4735 : if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; -; 4736 : } -; 4737 : else { -; 4738 : if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; -; 4739 : } -; 4740 : } -; 4741 : if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) -; 4742 : stbi__de_iphone(z); -; 4743 : if (pal_img_n) { -; 4744 : // pal_img_n == 3 or 4 -; 4745 : s->img_n = pal_img_n; // record the actual colors we had -; 4746 : s->img_out_n = pal_img_n; -; 4747 : if (req_comp >= 3) s->img_out_n = req_comp; -; 4748 : if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) -; 4749 : return 0; -; 4750 : } -; 4751 : else if (has_trans) { -; 4752 : // non-paletted image with tRNS -> source image has (constant) alpha -; 4753 : ++s->img_n; -; 4754 : } -; 4755 : STBI_FREE(z->expanded); z->expanded = NULL; -; 4756 : // end of PNG chunk, read and skip CRC -; 4757 : stbi__get32be(s); -; 4758 : return 1; -; 4759 : } -; 4760 : -; 4761 : default: -; 4762 : // if critical, fail -; 4763 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4764 : if ((c.type & (1 << 29)) == 0) { -; 4765 : #ifndef STBI_NO_FAILURE_STRINGS -; 4766 : // not threadsafe -; 4767 : static char invalid_chunk[] = "XXXX PNG chunk not known"; -; 4768 : invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); -; 4769 : invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); -; 4770 : invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); -; 4771 : invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); -; 4772 : #endif -; 4773 : return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); -; 4774 : } -; 4775 : stbi__skip(s, c.length); -; 4776 : break; -; 4777 : } -; 4778 : // end of PNG chunk, read and skip CRC -; 4779 : stbi__get32be(s); -; 4780 : } -; 4781 : } -; 4782 : -; 4783 : static void* stbi__do_png(stbi__png* p, int* x, int* y, int* n, int req_comp, stbi__result_info* ri) -; 4784 : { -; 4785 : void* result = NULL; -; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { -; 4788 : if (p->depth <= 8) -; 4789 : ri->bits_per_channel = 8; -; 4790 : else if (p->depth == 16) -; 4791 : ri->bits_per_channel = 16; -; 4792 : else -; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); -; 4794 : result = p->out; -; 4795 : p->out = NULL; -; 4796 : if (req_comp && req_comp != p->s->img_out_n) { -; 4797 : if (ri->bits_per_channel == 8) -; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4799 : else -; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4801 : p->s->img_out_n = req_comp; -; 4802 : if (result == NULL) return result; -; 4803 : } -; 4804 : *x = p->s->img_x; -; 4805 : *y = p->s->img_y; -; 4806 : if (n) *n = p->s->img_n; -; 4807 : } -; 4808 : STBI_FREE(p->out); p->out = NULL; -; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; -; 4810 : STBI_FREE(p->idata); p->idata = NULL; -; 4811 : -; 4812 : return result; -; 4813 : } -; 4814 : -; 4815 : static void* stbi__png_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 4816 : { -; 4817 : stbi__png p; -; 4818 : p.s = s; -; 4819 : return stbi__do_png(&p, x, y, comp, req_comp, ri); -; 4820 : } -; 4821 : -; 4822 : static int stbi__png_test(stbi__context* s) -; 4823 : { -; 4824 : int r; -; 4825 : r = stbi__check_png_header(s); -; 4826 : stbi__rewind(s); -; 4827 : return r; -; 4828 : } -; 4829 : -; 4830 : static int stbi__png_info_raw(stbi__png* p, int* x, int* y, int* comp) -; 4831 : { -; 4832 : if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { -; 4833 : stbi__rewind(p->s); -; 4834 : return 0; -; 4835 : } -; 4836 : if (x) *x = p->s->img_x; -; 4837 : if (y) *y = p->s->img_y; -; 4838 : if (comp) *comp = p->s->img_n; -; 4839 : return 1; -; 4840 : } -; 4841 : -; 4842 : static int stbi__png_info(stbi__context* s, int* x, int* y, int* comp) -; 4843 : { -; 4844 : stbi__png p; -; 4845 : p.s = s; -; 4846 : return stbi__png_info_raw(&p, x, y, comp); -; 4847 : } -; 4848 : -; 4849 : static int stbi__png_is16(stbi__context* s) -; 4850 : { -; 4851 : stbi__png p; -; 4852 : p.s = s; -; 4853 : if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) -; 4854 : return 0; -; 4855 : if (p.depth != 16) { -; 4856 : stbi__rewind(p.s); -; 4857 : return 0; -; 4858 : } -; 4859 : return 1; -; 4860 : } -; 4861 : #endif -; 4862 : -; 4863 : // Microsoft/Windows BMP image -; 4864 : -; 4865 : #ifndef STBI_NO_BMP -; 4866 : static int stbi__bmp_test_raw(stbi__context* s) -; 4867 : { -; 4868 : int r; -; 4869 : int sz; -; 4870 : if (stbi__get8(s) != 'B') return 0; -; 4871 : if (stbi__get8(s) != 'M') return 0; -; 4872 : stbi__get32le(s); // discard filesize -; 4873 : stbi__get16le(s); // discard reserved -; 4874 : stbi__get16le(s); // discard reserved -; 4875 : stbi__get32le(s); // discard data offset -; 4876 : sz = stbi__get32le(s); -; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); -; 4878 : return r; -; 4879 : } -; 4880 : -; 4881 : static int stbi__bmp_test(stbi__context* s) -; 4882 : { -; 4883 : int r = stbi__bmp_test_raw(s); -; 4884 : stbi__rewind(s); -; 4885 : return r; -; 4886 : } -; 4887 : -; 4888 : // returns 0..31 for the highest set bit -; 4889 : static int stbi__high_bit(unsigned int z) -; 4890 : { -; 4891 : int n = 0; -; 4892 : if (z == 0) return -1; -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } -; 4898 : return n; -; 4899 : } -; 4900 : -; 4901 : static int stbi__bitcount(unsigned int a) -; 4902 : { -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits -; 4908 : return a & 0xff; -; 4909 : } -; 4910 : -; 4911 : // extract an arbitrarily-aligned N-bit value (N=bits) -; 4912 : // from v, and then make it 8-bits long and fractionally -; 4913 : // extend it to full full range. -; 4914 : static int stbi__shiftsigned(unsigned int v, int shift, int bits) -; 4915 : { -; 4916 : static unsigned int mul_table[9] = { -; 4917 : 0, -; 4918 : 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, -; 4919 : 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, -; 4920 : }; -; 4921 : static unsigned int shift_table[9] = { -; 4922 : 0, 0,0,1,0,2,4,6,0, -; 4923 : }; -; 4924 : if (shift < 0) -; 4925 : v <<= -shift; -; 4926 : else -; 4927 : v >>= shift; -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; -; 4932 : } -; 4933 : -; 4934 : typedef struct -; 4935 : { -; 4936 : int bpp, offset, hsz; -; 4937 : unsigned int mr, mg, mb, ma, all_a; -; 4938 : int extra_read; -; 4939 : } stbi__bmp_data; -; 4940 : -; 4941 : static int stbi__bmp_set_mask_defaults(stbi__bmp_data* info, int compress) -; 4942 : { -; 4943 : // BI_BITFIELDS specifies masks explicitly, don't override -; 4944 : if (compress == 3) -; 4945 : return 1; -; 4946 : -; 4947 : if (compress == 0) { -; 4948 : if (info->bpp == 16) { -; 4949 : info->mr = 31u << 10; -; 4950 : info->mg = 31u << 5; -; 4951 : info->mb = 31u << 0; -; 4952 : } -; 4953 : else if (info->bpp == 32) { -; 4954 : info->mr = 0xffu << 16; -; 4955 : info->mg = 0xffu << 8; -; 4956 : info->mb = 0xffu << 0; -; 4957 : info->ma = 0xffu << 24; -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 -; 4959 : } -; 4960 : else { -; 4961 : // otherwise, use defaults, which is all-0 -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; -; 4963 : } -; 4964 : return 1; -; 4965 : } -; 4966 : return 0; // error -; 4967 : } -; 4968 : -; 4969 : static void* stbi__bmp_parse_header(stbi__context* s, stbi__bmp_data* info) -; 4970 : { -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); -; 4973 : stbi__get32le(s); // discard filesize -; 4974 : stbi__get16le(s); // discard reserved -; 4975 : stbi__get16le(s); // discard reserved -; 4976 : info->offset = stbi__get32le(s); -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; -; 4979 : info->extra_read = 14; -; 4980 : -; 4981 : if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); -; 4982 : -; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); -; 4984 : if (hsz == 12) { -; 4985 : s->img_x = stbi__get16le(s); -; 4986 : s->img_y = stbi__get16le(s); -; 4987 : } -; 4988 : else { -; 4989 : s->img_x = stbi__get32le(s); -; 4990 : s->img_y = stbi__get32le(s); -; 4991 : } -; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); -; 4993 : info->bpp = stbi__get16le(s); -; 4994 : if (hsz != 12) { -; 4995 : int compress = stbi__get32le(s); -; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); -; 4997 : if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes -; 4998 : if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel -; 4999 : stbi__get32le(s); // discard sizeof -; 5000 : stbi__get32le(s); // discard hres -; 5001 : stbi__get32le(s); // discard vres -; 5002 : stbi__get32le(s); // discard colorsused -; 5003 : stbi__get32le(s); // discard max important -; 5004 : if (hsz == 40 || hsz == 56) { -; 5005 : if (hsz == 56) { -; 5006 : stbi__get32le(s); -; 5007 : stbi__get32le(s); -; 5008 : stbi__get32le(s); -; 5009 : stbi__get32le(s); -; 5010 : } -; 5011 : if (info->bpp == 16 || info->bpp == 32) { -; 5012 : if (compress == 0) { -; 5013 : stbi__bmp_set_mask_defaults(info, compress); -; 5014 : } -; 5015 : else if (compress == 3) { -; 5016 : info->mr = stbi__get32le(s); -; 5017 : info->mg = stbi__get32le(s); -; 5018 : info->mb = stbi__get32le(s); -; 5019 : info->extra_read += 12; -; 5020 : // not documented, but generated by photoshop and handled by mspaint -; 5021 : if (info->mr == info->mg && info->mg == info->mb) { -; 5022 : // ?!?!? -; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5024 : } -; 5025 : } -; 5026 : else -; 5027 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5028 : } -; 5029 : } -; 5030 : else { -; 5031 : // V4/V5 header -; 5032 : int i; -; 5033 : if (hsz != 108 && hsz != 124) -; 5034 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5035 : info->mr = stbi__get32le(s); -; 5036 : info->mg = stbi__get32le(s); -; 5037 : info->mb = stbi__get32le(s); -; 5038 : info->ma = stbi__get32le(s); -; 5039 : if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs -; 5040 : stbi__bmp_set_mask_defaults(info, compress); -; 5041 : stbi__get32le(s); // discard color space -; 5042 : for (i = 0; i < 12; ++i) -; 5043 : stbi__get32le(s); // discard color space parameters -; 5044 : if (hsz == 124) { -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; -; 5053 : } -; 5054 : -; 5055 : static void* stbi__bmp_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5056 : { -; 5057 : stbi_uc* out; -; 5058 : unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a; -; 5059 : stbi_uc pal[256][4]; -; 5060 : int psize = 0, i, j, width; -; 5061 : int flip_vertically, pad, target; -; 5062 : stbi__bmp_data info; -; 5063 : STBI_NOTUSED(ri); -; 5064 : -; 5065 : info.all_a = 255; -; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) -; 5067 : return NULL; // error code already set -; 5068 : -; 5069 : flip_vertically = ((int)s->img_y) > 0; -; 5070 : s->img_y = abs((int)s->img_y); -; 5071 : -; 5072 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5073 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5074 : -; 5075 : mr = info.mr; -; 5076 : mg = info.mg; -; 5077 : mb = info.mb; -; 5078 : ma = info.ma; -; 5079 : all_a = info.all_a; -; 5080 : -; 5081 : if (info.hsz == 12) { -; 5082 : if (info.bpp < 24) -; 5083 : psize = (info.offset - info.extra_read - 24) / 3; -; 5084 : } -; 5085 : else { -; 5086 : if (info.bpp < 16) -; 5087 : psize = (info.offset - info.extra_read - info.hsz) >> 2; -; 5088 : } -; 5089 : if (psize == 0) { -; 5090 : // accept some number of extra bytes after the header, but if the offset points either to before -; 5091 : // the header ends or implies a large amount of extra data, reject the file as malformed -; 5092 : int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); -; 5093 : int header_limit = 1024; // max we actually read is below 256 bytes currently. -; 5094 : int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. -; 5095 : if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { -; 5096 : return stbi__errpuc("bad header", "Corrupt BMP"); -; 5097 : } -; 5098 : // we established that bytes_read_so_far is positive and sensible. -; 5099 : // the first half of this test rejects offsets that are either too small positives, or -; 5100 : // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn -; 5101 : // ensures the number computed in the second half of the test can't overflow. -; 5102 : if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { -; 5103 : return stbi__errpuc("bad offset", "Corrupt BMP"); -; 5104 : } -; 5105 : else { -; 5106 : stbi__skip(s, info.offset - bytes_read_so_far); -; 5107 : } -; 5108 : } -; 5109 : -; 5110 : if (info.bpp == 24 && ma == 0xff000000) -; 5111 : s->img_n = 3; -; 5112 : else -; 5113 : s->img_n = ma ? 4 : 3; -; 5114 : if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 -; 5115 : target = req_comp; -; 5116 : else -; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert -; 5118 : -; 5119 : // sanity-check size -; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) -; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); -; 5122 : -; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); -; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5125 : if (info.bpp < 16) { -; 5126 : int z = 0; -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } -; 5128 : for (i = 0; i < psize; ++i) { -; 5129 : pal[i][2] = stbi__get8(s); -; 5130 : pal[i][1] = stbi__get8(s); -; 5131 : pal[i][0] = stbi__get8(s); -; 5132 : if (info.hsz != 12) stbi__get8(s); -; 5133 : pal[i][3] = 255; -; 5134 : } -; 5135 : stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); -; 5136 : if (info.bpp == 1) width = (s->img_x + 7) >> 3; -; 5137 : else if (info.bpp == 4) width = (s->img_x + 1) >> 1; -; 5138 : else if (info.bpp == 8) width = s->img_x; -; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } -; 5140 : pad = (-width) & 3; -; 5141 : if (info.bpp == 1) { -; 5142 : for (j = 0; j < (int)s->img_y; ++j) { -; 5143 : int bit_offset = 7, v = stbi__get8(s); -; 5144 : for (i = 0; i < (int)s->img_x; ++i) { -; 5145 : int color = (v >> bit_offset) & 0x1; -; 5146 : out[z++] = pal[color][0]; -; 5147 : out[z++] = pal[color][1]; -; 5148 : out[z++] = pal[color][2]; -; 5149 : if (target == 4) out[z++] = 255; -; 5150 : if (i + 1 == (int)s->img_x) break; -; 5151 : if ((--bit_offset) < 0) { -; 5152 : bit_offset = 7; -; 5153 : v = stbi__get8(s); -; 5154 : } -; 5155 : } -; 5156 : stbi__skip(s, pad); -; 5157 : } -; 5158 : } -; 5159 : else { -; 5160 : for (j = 0; j < (int)s->img_y; ++j) { -; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { -; 5162 : int v = stbi__get8(s), v2 = 0; -; 5163 : if (info.bpp == 4) { -; 5164 : v2 = v & 15; -; 5165 : v >>= 4; -; 5166 : } -; 5167 : out[z++] = pal[v][0]; -; 5168 : out[z++] = pal[v][1]; -; 5169 : out[z++] = pal[v][2]; -; 5170 : if (target == 4) out[z++] = 255; -; 5171 : if (i + 1 == (int)s->img_x) break; -; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; -; 5173 : out[z++] = pal[v][0]; -; 5174 : out[z++] = pal[v][1]; -; 5175 : out[z++] = pal[v][2]; -; 5176 : if (target == 4) out[z++] = 255; -; 5177 : } -; 5178 : stbi__skip(s, pad); -; 5179 : } -; 5180 : } -; 5181 : } -; 5182 : else { -; 5183 : int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0; -; 5184 : int z = 0; -; 5185 : int easy = 0; -; 5186 : stbi__skip(s, info.offset - info.extra_read - info.hsz); -; 5187 : if (info.bpp == 24) width = 3 * s->img_x; -; 5188 : else if (info.bpp == 16) width = 2 * s->img_x; -; 5189 : else /* bpp = 32 and pad = 0 */ width = 0; -; 5190 : pad = (-width) & 3; -; 5191 : if (info.bpp == 24) { -; 5192 : easy = 1; -; 5193 : } -; 5194 : else if (info.bpp == 32) { -; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) -; 5196 : easy = 2; -; 5197 : } -; 5198 : if (!easy) { -; 5199 : if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); -; 5205 : if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5206 : } -; 5207 : for (j = 0; j < (int)s->img_y; ++j) { -; 5208 : if (easy) { -; 5209 : for (i = 0; i < (int)s->img_x; ++i) { -; 5210 : unsigned char a; -; 5211 : out[z + 2] = stbi__get8(s); -; 5212 : out[z + 1] = stbi__get8(s); -; 5213 : out[z + 0] = stbi__get8(s); -; 5214 : z += 3; -; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); -; 5216 : all_a |= a; -; 5217 : if (target == 4) out[z++] = a; -; 5218 : } -; 5219 : } -; 5220 : else { -; 5221 : int bpp = info.bpp; -; 5222 : for (i = 0; i < (int)s->img_x; ++i) { -; 5223 : stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s)); -; 5224 : unsigned int a; -; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); -; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); -; 5229 : all_a |= a; -; 5230 : if (target == 4) out[z++] = STBI__BYTECAST(a); -; 5231 : } -; 5232 : } -; 5233 : stbi__skip(s, pad); -; 5234 : } -; 5235 : } -; 5236 : -; 5237 : // if alpha channel is all 0s, replace with all 255s -; 5238 : if (target == 4 && all_a == 0) -; 5239 : for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4) -; 5240 : out[i] = 255; -; 5241 : -; 5242 : if (flip_vertically) { -; 5243 : stbi_uc t; -; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { -; 5245 : stbi_uc* p1 = out + j * s->img_x * target; -; 5246 : stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target; -; 5247 : for (i = 0; i < (int)s->img_x * target; ++i) { -; 5248 : t = p1[i]; p1[i] = p2[i]; p2[i] = t; -; 5249 : } -; 5250 : } -; 5251 : } -; 5252 : -; 5253 : if (req_comp && req_comp != target) { -; 5254 : out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); -; 5255 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5256 : } -; 5257 : -; 5258 : *x = s->img_x; -; 5259 : *y = s->img_y; -; 5260 : if (comp) *comp = s->img_n; -; 5261 : return out; -; 5262 : } -; 5263 : #endif -; 5264 : -; 5265 : // Targa Truevision - TGA -; 5266 : // by Jonathan Dummer -; 5267 : #ifndef STBI_NO_TGA -; 5268 : // returns STBI_rgb or whatever, 0 on error -; 5269 : static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -; 5270 : { -; 5271 : // only RGB or RGBA (incl. 16bit) or grey allowed -; 5272 : if (is_rgb16) *is_rgb16 = 0; -; 5273 : switch (bits_per_pixel) { -; 5274 : case 8: return STBI_grey; -; 5275 : case 16: if (is_grey) return STBI_grey_alpha; -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; -; 5278 : return STBI_rgb; -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; -; 5281 : default: return 0; -; 5282 : } -; 5283 : } -; 5284 : -; 5285 : static int stbi__tga_info(stbi__context* s, int* x, int* y, int* comp) -; 5286 : { -; 5287 : int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; -; 5288 : int sz, tga_colormap_type; -; 5289 : stbi__get8(s); // discard Offset -; 5290 : tga_colormap_type = stbi__get8(s); // colormap type -; 5291 : if (tga_colormap_type > 1) { -; 5292 : stbi__rewind(s); -; 5293 : return 0; // only RGB or indexed allowed -; 5294 : } -; 5295 : tga_image_type = stbi__get8(s); // image type -; 5296 : if (tga_colormap_type == 1) { // colormapped (paletted) image -; 5297 : if (tga_image_type != 1 && tga_image_type != 9) { -; 5298 : stbi__rewind(s); -; 5299 : return 0; -; 5300 : } -; 5301 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5302 : sz = stbi__get8(s); // check bits per palette color entry -; 5303 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) { -; 5304 : stbi__rewind(s); -; 5305 : return 0; -; 5306 : } -; 5307 : stbi__skip(s, 4); // skip image x and y origin -; 5308 : tga_colormap_bpp = sz; -; 5309 : } -; 5310 : else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE -; 5311 : if ((tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11)) { -; 5312 : stbi__rewind(s); -; 5313 : return 0; // only RGB or grey allowed, +/- RLE -; 5314 : } -; 5315 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5316 : tga_colormap_bpp = 0; -; 5317 : } -; 5318 : tga_w = stbi__get16le(s); -; 5319 : if (tga_w < 1) { -; 5320 : stbi__rewind(s); -; 5321 : return 0; // test width -; 5322 : } -; 5323 : tga_h = stbi__get16le(s); -; 5324 : if (tga_h < 1) { -; 5325 : stbi__rewind(s); -; 5326 : return 0; // test height -; 5327 : } -; 5328 : tga_bits_per_pixel = stbi__get8(s); // bits per pixel -; 5329 : stbi__get8(s); // ignore alpha bits -; 5330 : if (tga_colormap_bpp != 0) { -; 5331 : if ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { -; 5332 : // when using a colormap, tga_bits_per_pixel is the size of the indexes -; 5333 : // I don't think anything but 8 or 16bit indexes makes sense -; 5334 : stbi__rewind(s); -; 5335 : return 0; -; 5336 : } -; 5337 : tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); -; 5338 : } -; 5339 : else { -; 5340 : tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); -; 5341 : } -; 5342 : if (!tga_comp) { -; 5343 : stbi__rewind(s); -; 5344 : return 0; -; 5345 : } -; 5346 : if (x) *x = tga_w; -; 5347 : if (y) *y = tga_h; -; 5348 : if (comp) *comp = tga_comp; -; 5349 : return 1; // seems to have passed everything -; 5350 : } -; 5351 : -; 5352 : static int stbi__tga_test(stbi__context* s) -; 5353 : { -; 5354 : int res = 0; -; 5355 : int sz, tga_color_type; -; 5356 : stbi__get8(s); // discard Offset -; 5357 : tga_color_type = stbi__get8(s); // color type -; 5358 : if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed -; 5359 : sz = stbi__get8(s); // image type -; 5360 : if (tga_color_type == 1) { // colormapped (paletted) image -; 5361 : if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 -; 5362 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5363 : sz = stbi__get8(s); // check bits per palette color entry -; 5364 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5365 : stbi__skip(s, 4); // skip image x and y origin -; 5366 : } -; 5367 : else { // "normal" image w/o colormap -; 5368 : if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE -; 5369 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5370 : } -; 5371 : if (stbi__get16le(s) < 1) goto errorEnd; // test width -; 5372 : if (stbi__get16le(s) < 1) goto errorEnd; // test height -; 5373 : sz = stbi__get8(s); // bits per pixel -; 5374 : if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index -; 5375 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5376 : -; 5377 : res = 1; // if we got this far, everything's good and we can return 1 instead of 0 -; 5378 : -; 5379 : errorEnd: -; 5380 : stbi__rewind(s); -; 5381 : return res; -; 5382 : } -; 5383 : -; 5384 : // read 16bit value and convert to 24bit RGB -; 5385 : static void stbi__tga_read_rgb16(stbi__context* s, stbi_uc* out) -; 5386 : { -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); -; 5397 : -; 5398 : // some people claim that the most significant bit might be used for alpha -; 5399 : // (possibly if an alpha-bit is set in the "image descriptor byte") -; 5400 : // but that only made 16bit test images completely translucent.. -; 5401 : // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -; 5402 : } -; 5403 : -; 5404 : static void* stbi__tga_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5405 : { -; 5406 : // read in the TGA header stuff -; 5407 : int tga_offset = stbi__get8(s); -; 5408 : int tga_indexed = stbi__get8(s); -; 5409 : int tga_image_type = stbi__get8(s); -; 5410 : int tga_is_RLE = 0; -; 5411 : int tga_palette_start = stbi__get16le(s); -; 5412 : int tga_palette_len = stbi__get16le(s); -; 5413 : int tga_palette_bits = stbi__get8(s); -; 5414 : int tga_x_origin = stbi__get16le(s); -; 5415 : int tga_y_origin = stbi__get16le(s); -; 5416 : int tga_width = stbi__get16le(s); -; 5417 : int tga_height = stbi__get16le(s); -; 5418 : int tga_bits_per_pixel = stbi__get8(s); -; 5419 : int tga_comp, tga_rgb16 = 0; -; 5420 : int tga_inverted = stbi__get8(s); -; 5421 : // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) -; 5422 : // image data -; 5423 : unsigned char* tga_data; -; 5424 : unsigned char* tga_palette = NULL; -; 5425 : int i, j; -; 5426 : unsigned char raw_data[4] = { 0 }; -; 5427 : int RLE_count = 0; -; 5428 : int RLE_repeating = 0; -; 5429 : int read_next_pixel = 1; -; 5430 : STBI_NOTUSED(ri); -; 5431 : STBI_NOTUSED(tga_x_origin); // @TODO -; 5432 : STBI_NOTUSED(tga_y_origin); // @TODO -; 5433 : -; 5434 : if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5435 : if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5436 : -; 5437 : // do a tiny bit of precessing -; 5438 : if (tga_image_type >= 8) -; 5439 : { -; 5440 : tga_image_type -= 8; -; 5441 : tga_is_RLE = 1; -; 5442 : } -; 5443 : tga_inverted = 1 - ((tga_inverted >> 5) & 1); -; 5444 : -; 5445 : // If I'm paletted, then I'll use the number of bits from the palette -; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); -; 5447 : else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); -; 5448 : -; 5449 : if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency -; 5450 : return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); -; 5451 : -; 5452 : // tga info -; 5453 : *x = tga_width; -; 5454 : *y = tga_height; -; 5455 : if (comp) *comp = tga_comp; -; 5456 : -; 5457 : if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) -; 5458 : return stbi__errpuc("too large", "Corrupt TGA"); -; 5459 : -; 5460 : tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); -; 5461 : if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); -; 5462 : -; 5463 : // skip to the data's starting position (offset usually = 0) -; 5464 : stbi__skip(s, tga_offset); -; 5465 : -; 5466 : if (!tga_indexed && !tga_is_RLE && !tga_rgb16) { -; 5467 : for (i = 0; i < tga_height; ++i) { -; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; -; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; -; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); -; 5471 : } -; 5472 : } -; 5473 : else { -; 5474 : // do I need to load a palette? -; 5475 : if (tga_indexed) -; 5476 : { -; 5477 : if (tga_palette_len == 0) { /* you have to have at least one entry! */ -; 5478 : STBI_FREE(tga_data); -; 5479 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5480 : } -; 5481 : -; 5482 : // any data to skip? (offset usually = 0) -; 5483 : stbi__skip(s, tga_palette_start); -; 5484 : // load the palette -; 5485 : tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); -; 5486 : if (!tga_palette) { -; 5487 : STBI_FREE(tga_data); -; 5488 : return stbi__errpuc("outofmem", "Out of memory"); -; 5489 : } -; 5490 : if (tga_rgb16) { -; 5491 : stbi_uc* pal_entry = tga_palette; -; 5492 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5493 : for (i = 0; i < tga_palette_len; ++i) { -; 5494 : stbi__tga_read_rgb16(s, pal_entry); -; 5495 : pal_entry += tga_comp; -; 5496 : } -; 5497 : } -; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { -; 5499 : STBI_FREE(tga_data); -; 5500 : STBI_FREE(tga_palette); -; 5501 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) -; 5506 : { -; 5507 : // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? -; 5508 : if (tga_is_RLE) -; 5509 : { -; 5510 : if (RLE_count == 0) -; 5511 : { -; 5512 : // yep, get the next byte as a RLE command -; 5513 : int RLE_cmd = stbi__get8(s); -; 5514 : RLE_count = 1 + (RLE_cmd & 127); -; 5515 : RLE_repeating = RLE_cmd >> 7; -; 5516 : read_next_pixel = 1; -; 5517 : } -; 5518 : else if (!RLE_repeating) -; 5519 : { -; 5520 : read_next_pixel = 1; -; 5521 : } -; 5522 : } -; 5523 : else -; 5524 : { -; 5525 : read_next_pixel = 1; -; 5526 : } -; 5527 : // OK, if I need to read a pixel, do it now -; 5528 : if (read_next_pixel) -; 5529 : { -; 5530 : // load however much data we did have -; 5531 : if (tga_indexed) -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); -; 5535 : if (pal_idx >= tga_palette_len) { -; 5536 : // invalid index -; 5537 : pal_idx = 0; -; 5538 : } -; 5539 : pal_idx *= tga_comp; -; 5540 : for (j = 0; j < tga_comp; ++j) { -; 5541 : raw_data[j] = tga_palette[pal_idx + j]; -; 5542 : } -; 5543 : } -; 5544 : else if (tga_rgb16) { -; 5545 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5546 : stbi__tga_read_rgb16(s, raw_data); -; 5547 : } -; 5548 : else { -; 5549 : // read in the data raw -; 5550 : for (j = 0; j < tga_comp; ++j) { -; 5551 : raw_data[j] = stbi__get8(s); -; 5552 : } -; 5553 : } -; 5554 : // clear the reading flag for the next pixel -; 5555 : read_next_pixel = 0; -; 5556 : } // end of reading a pixel -; 5557 : -; 5558 : // copy data -; 5559 : for (j = 0; j < tga_comp; ++j) -; 5560 : tga_data[i * tga_comp + j] = raw_data[j]; -; 5561 : -; 5562 : // in case we're in RLE mode, keep counting down -; 5563 : --RLE_count; -; 5564 : } -; 5565 : // do I need to invert the image? -; 5566 : if (tga_inverted) -; 5567 : { -; 5568 : for (j = 0; j * 2 < tga_height; ++j) -; 5569 : { -; 5570 : int index1 = j * tga_width * tga_comp; -; 5571 : int index2 = (tga_height - 1 - j) * tga_width * tga_comp; -; 5572 : for (i = tga_width * tga_comp; i > 0; --i) -; 5573 : { -; 5574 : unsigned char temp = tga_data[index1]; -; 5575 : tga_data[index1] = tga_data[index2]; -; 5576 : tga_data[index2] = temp; -; 5577 : ++index1; -; 5578 : ++index2; -; 5579 : } -; 5580 : } -; 5581 : } -; 5582 : // clear my palette, if I had one -; 5583 : if (tga_palette != NULL) -; 5584 : { -; 5585 : STBI_FREE(tga_palette); -; 5586 : } -; 5587 : } -; 5588 : -; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order -; 5590 : if (tga_comp >= 3 && !tga_rgb16) -; 5591 : { -; 5592 : unsigned char* tga_pixel = tga_data; -; 5593 : for (i = 0; i < tga_width * tga_height; ++i) -; 5594 : { -; 5595 : unsigned char temp = tga_pixel[0]; -; 5596 : tga_pixel[0] = tga_pixel[2]; -; 5597 : tga_pixel[2] = temp; -; 5598 : tga_pixel += tga_comp; -; 5599 : } -; 5600 : } -; 5601 : -; 5602 : // convert to target component count -; 5603 : if (req_comp && req_comp != tga_comp) -; 5604 : tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); -; 5605 : -; 5606 : // the things I do to get rid of an error message, and yet keep -; 5607 : // Microsoft's C compilers happy... [8^( -; 5608 : tga_palette_start = tga_palette_len = tga_palette_bits = -; 5609 : tga_x_origin = tga_y_origin = 0; -; 5610 : STBI_NOTUSED(tga_palette_start); -; 5611 : // OK, done -; 5612 : return tga_data; -; 5613 : } -; 5614 : #endif -; 5615 : -; 5616 : // ************************************************************************************************* -; 5617 : // Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB -; 5618 : -; 5619 : #ifndef STBI_NO_PSD -; 5620 : static int stbi__psd_test(stbi__context* s) -; 5621 : { -; 5622 : int r = (stbi__get32be(s) == 0x38425053); -; 5623 : stbi__rewind(s); -; 5624 : return r; -; 5625 : } -; 5626 : -; 5627 : static int stbi__psd_decode_rle(stbi__context* s, stbi_uc* p, int pixelCount) -; 5628 : { -; 5629 : int count, nleft, len; -; 5630 : -; 5631 : count = 0; -; 5632 : while ((nleft = pixelCount - count) > 0) { -; 5633 : len = stbi__get8(s); -; 5634 : if (len == 128) { -; 5635 : // No-op. -; 5636 : } -; 5637 : else if (len < 128) { -; 5638 : // Copy next len+1 bytes literally. -; 5639 : len++; -; 5640 : if (len > nleft) return 0; // corrupt data -; 5641 : count += len; -; 5642 : while (len) { -; 5643 : *p = stbi__get8(s); -; 5644 : p += 4; -; 5645 : len--; -; 5646 : } -; 5647 : } -; 5648 : else if (len > 128) { -; 5649 : stbi_uc val; -; 5650 : // Next -len+1 bytes in the dest are replicated from next source byte. -; 5651 : // (Interpret len as a negative 8-bit int.) -; 5652 : len = 257 - len; -; 5653 : if (len > nleft) return 0; // corrupt data -; 5654 : val = stbi__get8(s); -; 5655 : count += len; -; 5656 : while (len) { -; 5657 : *p = val; -; 5658 : p += 4; -; 5659 : len--; -; 5660 : } -; 5661 : } -; 5662 : } -; 5663 : -; 5664 : return 1; -; 5665 : } -; 5666 : -; 5667 : static void* stbi__psd_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc) -; 5668 : { -; 5669 : int pixelCount; -; 5670 : int channelCount, compression; -; 5671 : int channel, i; -; 5672 : int bitdepth; -; 5673 : int w, h; -; 5674 : stbi_uc* out; -; 5675 : STBI_NOTUSED(ri); -; 5676 : -; 5677 : // Check identifier -; 5678 : if (stbi__get32be(s) != 0x38425053) // "8BPS" -; 5679 : return stbi__errpuc("not PSD", "Corrupt PSD image"); -; 5680 : -; 5681 : // Check file type version. -; 5682 : if (stbi__get16be(s) != 1) -; 5683 : return stbi__errpuc("wrong version", "Unsupported version of PSD image"); -; 5684 : -; 5685 : // Skip 6 reserved bytes. -; 5686 : stbi__skip(s, 6); -; 5687 : -; 5688 : // Read the number of channels (R, G, B, A, etc). -; 5689 : channelCount = stbi__get16be(s); -; 5690 : if (channelCount < 0 || channelCount > 16) -; 5691 : return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); -; 5692 : -; 5693 : // Read the rows and columns of the image. -; 5694 : h = stbi__get32be(s); -; 5695 : w = stbi__get32be(s); -; 5696 : -; 5697 : if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5698 : if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5699 : -; 5700 : // Make sure the depth is 8 bits. -; 5701 : bitdepth = stbi__get16be(s); -; 5702 : if (bitdepth != 8 && bitdepth != 16) -; 5703 : return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); -; 5704 : -; 5705 : // Make sure the color mode is RGB. -; 5706 : // Valid options are: -; 5707 : // 0: Bitmap -; 5708 : // 1: Grayscale -; 5709 : // 2: Indexed color -; 5710 : // 3: RGB color -; 5711 : // 4: CMYK color -; 5712 : // 7: Multichannel -; 5713 : // 8: Duotone -; 5714 : // 9: Lab color -; 5715 : if (stbi__get16be(s) != 3) -; 5716 : return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); -; 5717 : -; 5718 : // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) -; 5719 : stbi__skip(s, stbi__get32be(s)); -; 5720 : -; 5721 : // Skip the image resources. (resolution, pen tool paths, etc) -; 5722 : stbi__skip(s, stbi__get32be(s)); -; 5723 : -; 5724 : // Skip the reserved data. -; 5725 : stbi__skip(s, stbi__get32be(s)); -; 5726 : -; 5727 : // Find out if the data is compressed. -; 5728 : // Known values: -; 5729 : // 0: no compression -; 5730 : // 1: RLE compressed -; 5731 : compression = stbi__get16be(s); -; 5732 : if (compression > 1) -; 5733 : return stbi__errpuc("bad compression", "PSD has an unknown compression format"); -; 5734 : -; 5735 : // Check size -; 5736 : if (!stbi__mad3sizes_valid(4, w, h, 0)) -; 5737 : return stbi__errpuc("too large", "Corrupt PSD"); -; 5738 : -; 5739 : // Create the destination image. -; 5740 : -; 5741 : if (!compression && bitdepth == 16 && bpc == 16) { -; 5742 : out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0); -; 5743 : ri->bits_per_channel = 16; -; 5744 : } -; 5745 : else -; 5746 : out = (stbi_uc*)stbi__malloc(4 * w * h); -; 5747 : -; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5749 : pixelCount = w * h; -; 5750 : -; 5751 : // Initialize the data to zero. -; 5752 : //memset( out, 0, pixelCount * 4 ); -; 5753 : -; 5754 : // Finally, the image data. -; 5755 : if (compression) { -; 5756 : // RLE as used by .PSD and .TIFF -; 5757 : // Loop until you get the number of unpacked bytes you are expecting: -; 5758 : // Read the next source byte into n. -; 5759 : // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. -; 5760 : // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. -; 5761 : // Else if n is 128, noop. -; 5762 : // Endloop -; 5763 : -; 5764 : // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, -; 5765 : // which we're going to just skip. -; 5766 : stbi__skip(s, h * channelCount * 2); -; 5767 : -; 5768 : // Read the RLE data by channel. -; 5769 : for (channel = 0; channel < 4; channel++) { -; 5770 : stbi_uc* p; -; 5771 : -; 5772 : p = out + channel; -; 5773 : if (channel >= channelCount) { -; 5774 : // Fill this channel with default data. -; 5775 : for (i = 0; i < pixelCount; i++, p += 4) -; 5776 : *p = (channel == 3 ? 255 : 0); -; 5777 : } -; 5778 : else { -; 5779 : // Read the RLE data. -; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { -; 5781 : STBI_FREE(out); -; 5782 : return stbi__errpuc("corrupt", "bad RLE data"); -; 5783 : } -; 5784 : } -; 5785 : } -; 5786 : } -; 5787 : else { -; 5788 : // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) -; 5789 : // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. -; 5790 : -; 5791 : // Read the data by channel. -; 5792 : for (channel = 0; channel < 4; channel++) { -; 5793 : if (channel >= channelCount) { -; 5794 : // Fill this channel with default data. -; 5795 : if (bitdepth == 16 && bpc == 16) { -; 5796 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5797 : stbi__uint16 val = channel == 3 ? 65535 : 0; -; 5798 : for (i = 0; i < pixelCount; i++, q += 4) -; 5799 : *q = val; -; 5800 : } -; 5801 : else { -; 5802 : stbi_uc* p = out + channel; -; 5803 : stbi_uc val = channel == 3 ? 255 : 0; -; 5804 : for (i = 0; i < pixelCount; i++, p += 4) -; 5805 : *p = val; -; 5806 : } -; 5807 : } -; 5808 : else { -; 5809 : if (ri->bits_per_channel == 16) { // output bpc -; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5811 : for (i = 0; i < pixelCount; i++, q += 4) -; 5812 : *q = (stbi__uint16)stbi__get16be(s); -; 5813 : } -; 5814 : else { -; 5815 : stbi_uc* p = out + channel; -; 5816 : if (bitdepth == 16) { // input bpc -; 5817 : for (i = 0; i < pixelCount; i++, p += 4) -; 5818 : *p = (stbi_uc)(stbi__get16be(s) >> 8); -; 5819 : } -; 5820 : else { -; 5821 : for (i = 0; i < pixelCount; i++, p += 4) -; 5822 : *p = stbi__get8(s); -; 5823 : } -; 5824 : } -; 5825 : } -; 5826 : } -; 5827 : } -; 5828 : -; 5829 : // remove weird white matte from PSD -; 5830 : if (channelCount >= 4) { -; 5831 : if (ri->bits_per_channel == 16) { -; 5832 : for (i = 0; i < w * h; ++i) { -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); -; 5841 : } -; 5842 : } -; 5843 : } -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); -; 5854 : } -; 5855 : } -; 5856 : } -; 5857 : } -; 5858 : -; 5859 : // convert to desired output format -; 5860 : if (req_comp && req_comp != 4) { -; 5861 : if (ri->bits_per_channel == 16) -; 5862 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h); -; 5863 : else -; 5864 : out = stbi__convert_format(out, 4, req_comp, w, h); -; 5865 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5866 : } -; 5867 : -; 5868 : if (comp) *comp = 4; -; 5869 : *y = h; -; 5870 : *x = w; -; 5871 : -; 5872 : return out; -; 5873 : } -; 5874 : #endif -; 5875 : -; 5876 : // ************************************************************************************************* -; 5877 : // Softimage PIC loader -; 5878 : // by Tom Seddon -; 5879 : // -; 5880 : // See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -; 5881 : // See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ -; 5882 : -; 5883 : #ifndef STBI_NO_PIC -; 5884 : static int stbi__pic_is4(stbi__context* s, const char* str) -; 5885 : { -; 5886 : int i; -; 5887 : for (i = 0; i < 4; ++i) -; 5888 : if (stbi__get8(s) != (stbi_uc)str[i]) -; 5889 : return 0; -; 5890 : -; 5891 : return 1; -; 5892 : } -; 5893 : -; 5894 : static int stbi__pic_test_core(stbi__context* s) -; 5895 : { -; 5896 : int i; -; 5897 : -; 5898 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) -; 5899 : return 0; -; 5900 : -; 5901 : for (i = 0; i < 84; ++i) -; 5902 : stbi__get8(s); -; 5903 : -; 5904 : if (!stbi__pic_is4(s, "PICT")) -; 5905 : return 0; -; 5906 : -; 5907 : return 1; -; 5908 : } -; 5909 : -; 5910 : typedef struct -; 5911 : { -; 5912 : stbi_uc size, type, channel; -; 5913 : } stbi__pic_packet; -; 5914 : -; 5915 : static stbi_uc* stbi__readval(stbi__context* s, int channel, stbi_uc* dest) -; 5916 : { -; 5917 : int mask = 0x80, i; -; 5918 : -; 5919 : for (i = 0; i < 4; ++i, mask >>= 1) { -; 5920 : if (channel & mask) { -; 5921 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "PIC file too short"); -; 5922 : dest[i] = stbi__get8(s); -; 5923 : } -; 5924 : } -; 5925 : -; 5926 : return dest; -; 5927 : } -; 5928 : -; 5929 : static void stbi__copyval(int channel, stbi_uc* dest, const stbi_uc* src) -; 5930 : { -; 5931 : int mask = 0x80, i; -; 5932 : -; 5933 : for (i = 0; i < 4; ++i, mask >>= 1) -; 5934 : if (channel & mask) - +; Line 5934 004a4 40 f6 c6 20 test sil, 32 ; 00000020H 004a8 74 04 je SHORT $LN159@stbi__pic_ - -; 5935 : dest[i] = src[i]; - +; Line 5935 004aa 44 88 43 02 mov BYTE PTR [rbx+2], r8b $LN159@stbi__pic_: - -; 1096 : } -; 1097 : -; 1098 : return s->img_buffer >= s->img_buffer_end; -; 1099 : } -; 1100 : #endif -; 1101 : -; 1102 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) -; 1103 : // nothing -; 1104 : #else -; 1105 : static void stbi__skip(stbi__context* s, int n) -; 1106 : { -; 1107 : if (n == 0) return; // already there! -; 1108 : if (n < 0) { -; 1109 : s->img_buffer = s->img_buffer_end; -; 1110 : return; -; 1111 : } -; 1112 : if (s->io.read) { -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1114 : if (blen < n) { -; 1115 : s->img_buffer = s->img_buffer_end; -; 1116 : (s->io.skip)(s->io_user_data, n - blen); -; 1117 : return; -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; -; 1121 : } -; 1122 : #endif -; 1123 : -; 1124 : #if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) -; 1125 : // nothing -; 1126 : #else -; 1127 : static int stbi__getn(stbi__context* s, stbi_uc* buffer, int n) -; 1128 : { -; 1129 : if (s->io.read) { -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1131 : if (blen < n) { -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; -; 1139 : return res; -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { -; 1144 : memcpy(buffer, s->img_buffer, n); -; 1145 : s->img_buffer += n; -; 1146 : return 1; -; 1147 : } -; 1148 : else -; 1149 : return 0; -; 1150 : } -; 1151 : #endif -; 1152 : -; 1153 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1154 : // nothing -; 1155 : #else -; 1156 : static int stbi__get16be(stbi__context* s) -; 1157 : { -; 1158 : int z = stbi__get8(s); -; 1159 : return (z << 8) + stbi__get8(s); -; 1160 : } -; 1161 : #endif -; 1162 : -; 1163 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1164 : // nothing -; 1165 : #else -; 1166 : static stbi__uint32 stbi__get32be(stbi__context* s) -; 1167 : { -; 1168 : stbi__uint32 z = stbi__get16be(s); -; 1169 : return (z << 16) + stbi__get16be(s); -; 1170 : } -; 1171 : #endif -; 1172 : -; 1173 : #if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -; 1174 : // nothing -; 1175 : #else -; 1176 : static int stbi__get16le(stbi__context* s) -; 1177 : { -; 1178 : int z = stbi__get8(s); -; 1179 : return z + (stbi__get8(s) << 8); -; 1180 : } -; 1181 : #endif -; 1182 : -; 1183 : #ifndef STBI_NO_BMP -; 1184 : static stbi__uint32 stbi__get32le(stbi__context* s) -; 1185 : { -; 1186 : stbi__uint32 z = stbi__get16le(s); -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; -; 1188 : return z; -; 1189 : } -; 1190 : #endif -; 1191 : -; 1192 : #define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings -; 1193 : -; 1194 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1195 : // nothing -; 1196 : #else -; 1197 : ////////////////////////////////////////////////////////////////////////////// -; 1198 : // -; 1199 : // generic converter from built-in img_n to req_comp -; 1200 : // individual types do this automatically as much as possible (e.g. jpeg -; 1201 : // does all cases internally since it needs to colorspace convert anyway, -; 1202 : // and it never has alpha, so very few cases ). png can automatically -; 1203 : // interleave an alpha=255 channel, but falls back to this for other cases -; 1204 : // -; 1205 : // assume data buffer is malloced, so malloc a new one and free that one -; 1206 : // only failure mode is malloc failing -; 1207 : -; 1208 : static stbi_uc stbi__compute_y(int r, int g, int b) -; 1209 : { -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1211 : } -; 1212 : #endif -; 1213 : -; 1214 : #if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1215 : // nothing -; 1216 : #else -; 1217 : static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1218 : { -; 1219 : int i, j; -; 1220 : unsigned char* good; -; 1221 : -; 1222 : if (req_comp == img_n) return data; -; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1224 : -; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); -; 1226 : if (good == NULL) { -; 1227 : STBI_FREE(data); -; 1228 : return stbi__errpuc("outofmem", "Out of memory"); -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { -; 1232 : unsigned char* src = data + j * x * img_n; -; 1233 : unsigned char* dest = good + j * x * req_comp; -; 1234 : -; 1235 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1236 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1237 : // convert source image with img_n components to one with req_comp components; -; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1239 : switch (STBI__COMBO(img_n, req_comp)) { -; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; -; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; -; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1253 : } -; 1254 : #undef STBI__CASE -; 1255 : } -; 1256 : -; 1257 : STBI_FREE(data); -; 1258 : return good; -; 1259 : } -; 1260 : #endif -; 1261 : -; 1262 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1263 : // nothing -; 1264 : #else -; 1265 : static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -; 1266 : { -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1268 : } -; 1269 : #endif -; 1270 : -; 1271 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1272 : // nothing -; 1273 : #else -; 1274 : static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1275 : { -; 1276 : int i, j; -; 1277 : stbi__uint16* good; -; 1278 : -; 1279 : if (req_comp == img_n) return data; -; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1281 : -; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); -; 1283 : if (good == NULL) { -; 1284 : STBI_FREE(data); -; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { -; 1289 : stbi__uint16* src = data + j * x * img_n; -; 1290 : stbi__uint16* dest = good + j * x * req_comp; -; 1291 : -; 1292 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1293 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1294 : // convert source image with img_n components to one with req_comp components; -; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1296 : switch (STBI__COMBO(img_n, req_comp)) { -; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; -; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; -; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1310 : } -; 1311 : #undef STBI__CASE -; 1312 : } -; 1313 : -; 1314 : STBI_FREE(data); -; 1315 : return good; -; 1316 : } -; 1317 : #endif -; 1318 : -; 1319 : #ifndef STBI_NO_LINEAR -; 1320 : static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp) -; 1321 : { -; 1322 : int i, k, n; -; 1323 : float* output; -; 1324 : if (!data) return NULL; -; 1325 : output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0); -; 1326 : if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } -; 1327 : // compute number of non-alpha components -; 1328 : if (comp & 1) n = comp; else n = comp - 1; -; 1329 : for (i = 0; i < x * y; ++i) { -; 1330 : for (k = 0; k < n; ++k) { -; 1331 : output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale); -; 1332 : } -; 1333 : } -; 1334 : if (n < comp) { -; 1335 : for (i = 0; i < x * y; ++i) { -; 1336 : output[i * comp + n] = data[i * comp + n] / 255.0f; -; 1337 : } -; 1338 : } -; 1339 : STBI_FREE(data); -; 1340 : return output; -; 1341 : } -; 1342 : #endif -; 1343 : -; 1344 : #ifndef STBI_NO_HDR -; 1345 : #define stbi__float2int(x) ((int) (x)) -; 1346 : static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp) -; 1347 : { -; 1348 : int i, k, n; -; 1349 : stbi_uc* output; -; 1350 : if (!data) return NULL; -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } -; 1353 : // compute number of non-alpha components -; 1354 : if (comp & 1) n = comp; else n = comp - 1; -; 1355 : for (i = 0; i < x * y; ++i) { -; 1356 : for (k = 0; k < n; ++k) { -; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; -; 1358 : if (z < 0) z = 0; -; 1359 : if (z > 255) z = 255; -; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1361 : } -; 1362 : if (k < comp) { -; 1363 : float z = data[i * comp + k] * 255 + 0.5f; -; 1364 : if (z < 0) z = 0; -; 1365 : if (z > 255) z = 255; -; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1367 : } -; 1368 : } -; 1369 : STBI_FREE(data); -; 1370 : return output; -; 1371 : } -; 1372 : #endif -; 1373 : -; 1374 : ////////////////////////////////////////////////////////////////////////////// -; 1375 : // -; 1376 : // "baseline" JPEG/JFIF decoder -; 1377 : // -; 1378 : // simple implementation -; 1379 : // - doesn't support delayed output of y-dimension -; 1380 : // - simple interface (only one output format: 8-bit interleaved RGB) -; 1381 : // - doesn't try to recover corrupt jpegs -; 1382 : // - doesn't allow partial loading, loading multiple at once -; 1383 : // - still fast on x86 (copying globals into locals doesn't help x86) -; 1384 : // - allocates lots of intermediate memory (full size of all components) -; 1385 : // - non-interleaved case requires this anyway -; 1386 : // - allows good upsampling (see next) -; 1387 : // high-quality -; 1388 : // - upsampled channels are bilinearly interpolated, even across blocks -; 1389 : // - quality integer IDCT derived from IJG's 'slow' -; 1390 : // performance -; 1391 : // - fast huffman; reasonable integer IDCT -; 1392 : // - some SIMD kernels for common paths on targets with SSE2/NEON -; 1393 : // - uses a lot of intermediate memory, could cache poorly -; 1394 : -; 1395 : #ifndef STBI_NO_JPEG -; 1396 : -; 1397 : // huffman decoding acceleration -; 1398 : #define FAST_BITS 9 // larger handles more cases; smaller stomps less cache -; 1399 : -; 1400 : typedef struct -; 1401 : { -; 1402 : stbi_uc fast[1 << FAST_BITS]; -; 1403 : // weirdly, repacking this into AoS is a 10% speed loss, instead of a win -; 1404 : stbi__uint16 code[256]; -; 1405 : stbi_uc values[256]; -; 1406 : stbi_uc size[257]; -; 1407 : unsigned int maxcode[18]; -; 1408 : int delta[17]; // old 'firstsymbol' - old 'firstcode' -; 1409 : } stbi__huffman; -; 1410 : -; 1411 : typedef struct -; 1412 : { -; 1413 : stbi__context* s; -; 1414 : stbi__huffman huff_dc[4]; -; 1415 : stbi__huffman huff_ac[4]; -; 1416 : stbi__uint16 dequant[4][64]; -; 1417 : stbi__int16 fast_ac[4][1 << FAST_BITS]; -; 1418 : -; 1419 : // sizes for components, interleaved MCUs -; 1420 : int img_h_max, img_v_max; -; 1421 : int img_mcu_x, img_mcu_y; -; 1422 : int img_mcu_w, img_mcu_h; -; 1423 : -; 1424 : // definition of jpeg image component -; 1425 : struct -; 1426 : { -; 1427 : int id; -; 1428 : int h, v; -; 1429 : int tq; -; 1430 : int hd, ha; -; 1431 : int dc_pred; -; 1432 : -; 1433 : int x, y, w2, h2; -; 1434 : stbi_uc* data; -; 1435 : void* raw_data, * raw_coeff; -; 1436 : stbi_uc* linebuf; -; 1437 : short* coeff; // progressive only -; 1438 : int coeff_w, coeff_h; // number of 8x8 coefficient blocks -; 1439 : } img_comp[4]; -; 1440 : -; 1441 : stbi__uint32 code_buffer; // jpeg entropy-coded buffer -; 1442 : int code_bits; // number of valid bits -; 1443 : unsigned char marker; // marker seen while filling entropy buffer -; 1444 : int nomore; // flag if we saw a marker so must stop -; 1445 : -; 1446 : int progressive; -; 1447 : int spec_start; -; 1448 : int spec_end; -; 1449 : int succ_high; -; 1450 : int succ_low; -; 1451 : int eob_run; -; 1452 : int jfif; -; 1453 : int app14_color_transform; // Adobe APP14 tag -; 1454 : int rgb; -; 1455 : -; 1456 : int scan_n, order[4]; -; 1457 : int restart_interval, todo; -; 1458 : -; 1459 : // kernels -; 1460 : void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]); -; 1461 : void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); -; 1462 : stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); -; 1463 : } stbi__jpeg; -; 1464 : -; 1465 : static int stbi__build_huffman(stbi__huffman* h, int* count) -; 1466 : { -; 1467 : int i, j, k = 0; -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { -; 1471 : for (j = 0; j < count[i]; ++j) { -; 1472 : h->size[k++] = (stbi_uc)(i + 1); -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); -; 1474 : } -; 1475 : } -; 1476 : h->size[k] = 0; -; 1477 : -; 1478 : // compute actual symbols (from jpeg spec) -; 1479 : code = 0; -; 1480 : k = 0; -; 1481 : for (j = 1; j <= 16; ++j) { -; 1482 : // compute delta to add to code to compute symbol id -; 1483 : h->delta[j] = k - code; -; 1484 : if (h->size[k] == j) { -; 1485 : while (h->size[k] == j) -; 1486 : h->code[k++] = (stbi__uint16)(code++); -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); -; 1488 : } -; 1489 : // compute largest code + 1 for this size, preshifted as needed later -; 1490 : h->maxcode[j] = code << (16 - j); -; 1491 : code <<= 1; -; 1492 : } -; 1493 : h->maxcode[j] = 0xffffffff; -; 1494 : -; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated -; 1496 : memset(h->fast, 255, 1 << FAST_BITS); -; 1497 : for (i = 0; i < k; ++i) { -; 1498 : int s = h->size[i]; -; 1499 : if (s <= FAST_BITS) { -; 1500 : int c = h->code[i] << (FAST_BITS - s); -; 1501 : int m = 1 << (FAST_BITS - s); -; 1502 : for (j = 0; j < m; ++j) { -; 1503 : h->fast[c + j] = (stbi_uc)i; -; 1504 : } -; 1505 : } -; 1506 : } -; 1507 : return 1; -; 1508 : } -; 1509 : -; 1510 : // build a table that decodes both magnitude and value of small ACs in -; 1511 : // one go. -; 1512 : static void stbi__build_fast_ac(stbi__int16* fast_ac, stbi__huffman* h) -; 1513 : { -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { -; 1516 : stbi_uc fast = h->fast[i]; -; 1517 : fast_ac[i] = 0; -; 1518 : if (fast < 255) { -; 1519 : int rs = h->values[fast]; -; 1520 : int run = (rs >> 4) & 15; -; 1521 : int magbits = rs & 15; -; 1522 : int len = h->size[fast]; -; 1523 : -; 1524 : if (magbits && len + magbits <= FAST_BITS) { -; 1525 : // magnitude code followed by receive_extend code -; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); -; 1527 : int m = 1 << (magbits - 1); -; 1528 : if (k < m) k += (~0U << magbits) + 1; -; 1529 : // if the result is small enough, we can fit it in fast_ac table -; 1530 : if (k >= -128 && k <= 127) -; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); -; 1532 : } -; 1533 : } -; 1534 : } -; 1535 : } -; 1536 : -; 1537 : static void stbi__grow_buffer_unsafe(stbi__jpeg* j) -; 1538 : { -; 1539 : do { -; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); -; 1541 : if (b == 0xff) { -; 1542 : int c = stbi__get8(j->s); -; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes -; 1544 : if (c != 0) { -; 1545 : j->marker = (unsigned char)c; -; 1546 : j->nomore = 1; -; 1547 : return; -; 1548 : } -; 1549 : } -; 1550 : j->code_buffer |= b << (24 - j->code_bits); -; 1551 : j->code_bits += 8; -; 1552 : } while (j->code_bits <= 24); -; 1553 : } -; 1554 : -; 1555 : // (1 << n) - 1 -; 1556 : static const stbi__uint32 stbi__bmask[17] = { 0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535 }; -; 1557 : -; 1558 : // decode a jpeg huffman value from the bitstream -; 1559 : stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg* j, stbi__huffman* h) -; 1560 : { -; 1561 : unsigned int temp; -; 1562 : int c, k; -; 1563 : -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1569 : k = h->fast[c]; -; 1570 : if (k < 255) { -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; -; 1575 : j->code_bits -= s; -; 1576 : return h->values[k]; -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; -; 1586 : for (k = FAST_BITS + 1; ; ++k) -; 1587 : if (temp < h->maxcode[k]) -; 1588 : break; -; 1589 : if (k == 17) { -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; -; 1608 : } -; 1609 : -; 1610 : // bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) -; 1623 : k = stbi_lrot(j->code_buffer, n); -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); -; 1628 : } -; 1629 : -; 1630 : // get some unsigned bits -; 1631 : stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg* j, int n) -; 1632 : { -; 1633 : unsigned int k; -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1636 : k = stbi_lrot(j->code_buffer, n); -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; -; 1640 : return k; -; 1641 : } -; 1642 : -; 1643 : stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg* j) -; 1644 : { -; 1645 : unsigned int k; -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1648 : k = j->code_buffer; -; 1649 : j->code_buffer <<= 1; -; 1650 : --j->code_bits; -; 1651 : return k & 0x80000000; -; 1652 : } -; 1653 : -; 1654 : // given a value that's at position X in the zigzag stream, -; 1655 : // where does it appear in the 8x8 matrix coded as row-major? -; 1656 : static const stbi_uc stbi__jpeg_dezigzag[64 + 15] = -; 1657 : { -; 1658 : 0, 1, 8, 16, 9, 2, 3, 10, -; 1659 : 17, 24, 32, 25, 18, 11, 4, 5, -; 1660 : 12, 19, 26, 33, 40, 48, 41, 34, -; 1661 : 27, 20, 13, 6, 7, 14, 21, 28, -; 1662 : 35, 42, 49, 56, 57, 50, 43, 36, -; 1663 : 29, 22, 15, 23, 30, 37, 44, 51, -; 1664 : 58, 59, 52, 45, 38, 31, 39, 46, -; 1665 : 53, 60, 61, 54, 47, 55, 62, 63, -; 1666 : // let corrupt input sample past end -; 1667 : 63, 63, 63, 63, 63, 63, 63, 63, -; 1668 : 63, 63, 63, 63, 63, 63, 63 -; 1669 : }; -; 1670 : -; 1671 : // decode one 64-entry block-- -; 1672 : static int stbi__jpeg_decode_block(stbi__jpeg* j, short data[64], stbi__huffman* hdc, stbi__huffman* hac, stbi__int16* fac, int b, stbi__uint16* dequant) -; 1673 : { -; 1674 : int diff, dc, k; -; 1675 : int t; -; 1676 : -; 1677 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1678 : t = stbi__jpeg_huff_decode(j, hdc); -; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1680 : -; 1681 : // 0 all the ac values now so we can do it 32-bits at a time -; 1682 : memset(data, 0, 64 * sizeof(data[0])); -; 1683 : -; 1684 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1686 : dc = j->img_comp[b].dc_pred + diff; -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1689 : data[0] = (short)(dc * dequant[0]); -; 1690 : -; 1691 : // decode AC components, see JPEG spec -; 1692 : k = 1; -; 1693 : do { -; 1694 : unsigned int zig; -; 1695 : int c, r, s; -; 1696 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1697 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1698 : r = fac[c]; -; 1699 : if (r) { // fast-AC path -; 1700 : k += (r >> 4) & 15; // run -; 1701 : s = r & 15; // combined length -; 1702 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1703 : j->code_buffer <<= s; -; 1704 : j->code_bits -= s; -; 1705 : // decode into unzigzag'd location -; 1706 : zig = stbi__jpeg_dezigzag[k++]; -; 1707 : data[zig] = (short)((r >> 8) * dequant[zig]); -; 1708 : } -; 1709 : else { -; 1710 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1711 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1712 : s = rs & 15; -; 1713 : r = rs >> 4; -; 1714 : if (s == 0) { -; 1715 : if (rs != 0xf0) break; // end block -; 1716 : k += 16; -; 1717 : } -; 1718 : else { -; 1719 : k += r; -; 1720 : // decode into unzigzag'd location -; 1721 : zig = stbi__jpeg_dezigzag[k++]; -; 1722 : data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]); -; 1723 : } -; 1724 : } -; 1725 : } while (k < 64); -; 1726 : return 1; -; 1727 : } -; 1728 : -; 1729 : static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg* j, short data[64], stbi__huffman* hdc, int b) -; 1730 : { -; 1731 : int diff, dc; -; 1732 : int t; -; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1734 : -; 1735 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1736 : -; 1737 : if (j->succ_high == 0) { -; 1738 : // first scan for DC coefficient, must be first -; 1739 : memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now -; 1740 : t = stbi__jpeg_huff_decode(j, hdc); -; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1742 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1745 : dc = j->img_comp[b].dc_pred + diff; -; 1746 : j->img_comp[b].dc_pred = dc; -; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1748 : data[0] = (short)(dc * (1 << j->succ_low)); -; 1749 : } -; 1750 : else { -; 1751 : // refinement scan for DC coefficient -; 1752 : if (stbi__jpeg_get_bit(j)) -; 1753 : data[0] += (short)(1 << j->succ_low); -; 1754 : } -; 1755 : return 1; -; 1756 : } -; 1757 : -; 1758 : // @OPTIMIZE: store non-zigzagged during the decode passes, -; 1759 : // and only de-zigzag when dequantizing -; 1760 : static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg* j, short data[64], stbi__huffman* hac, stbi__int16* fac) -; 1761 : { -; 1762 : int k; -; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1764 : -; 1765 : if (j->succ_high == 0) { -; 1766 : int shift = j->succ_low; -; 1767 : -; 1768 : if (j->eob_run) { -; 1769 : --j->eob_run; -; 1770 : return 1; -; 1771 : } -; 1772 : -; 1773 : k = j->spec_start; -; 1774 : do { -; 1775 : unsigned int zig; -; 1776 : int c, r, s; -; 1777 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1778 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1779 : r = fac[c]; -; 1780 : if (r) { // fast-AC path -; 1781 : k += (r >> 4) & 15; // run -; 1782 : s = r & 15; // combined length -; 1783 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1784 : j->code_buffer <<= s; -; 1785 : j->code_bits -= s; -; 1786 : zig = stbi__jpeg_dezigzag[k++]; -; 1787 : data[zig] = (short)((r >> 8) * (1 << shift)); -; 1788 : } -; 1789 : else { -; 1790 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1791 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1792 : s = rs & 15; -; 1793 : r = rs >> 4; -; 1794 : if (s == 0) { -; 1795 : if (r < 15) { -; 1796 : j->eob_run = (1 << r); -; 1797 : if (r) -; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1799 : --j->eob_run; -; 1800 : break; -; 1801 : } -; 1802 : k += 16; -; 1803 : } -; 1804 : else { -; 1805 : k += r; -; 1806 : zig = stbi__jpeg_dezigzag[k++]; -; 1807 : data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift)); -; 1808 : } -; 1809 : } -; 1810 : } while (k <= j->spec_end); -; 1811 : } -; 1812 : else { -; 1813 : // refinement scan for these AC coefficients -; 1814 : -; 1815 : short bit = (short)(1 << j->succ_low); -; 1816 : -; 1817 : if (j->eob_run) { -; 1818 : --j->eob_run; -; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { -; 1820 : short* p = &data[stbi__jpeg_dezigzag[k]]; -; 1821 : if (*p != 0) -; 1822 : if (stbi__jpeg_get_bit(j)) -; 1823 : if ((*p & bit) == 0) { -; 1824 : if (*p > 0) -; 1825 : *p += bit; -; 1826 : else -; 1827 : *p -= bit; -; 1828 : } -; 1829 : } -; 1830 : } -; 1831 : else { -; 1832 : k = j->spec_start; -; 1833 : do { -; 1834 : int r, s; -; 1835 : int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh -; 1836 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1837 : s = rs & 15; -; 1838 : r = rs >> 4; -; 1839 : if (s == 0) { -; 1840 : if (r < 15) { -; 1841 : j->eob_run = (1 << r) - 1; -; 1842 : if (r) -; 1843 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1844 : r = 64; // force end of block -; 1845 : } -; 1846 : else { -; 1847 : // r=15 s=0 should write 16 0s, so we just do -; 1848 : // a run of 15 0s and then write s (which is 0), -; 1849 : // so we don't have to do anything special here -; 1850 : } -; 1851 : } -; 1852 : else { -; 1853 : if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1854 : // sign bit -; 1855 : if (stbi__jpeg_get_bit(j)) -; 1856 : s = bit; -; 1857 : else -; 1858 : s = -bit; -; 1859 : } -; 1860 : -; 1861 : // advance by r -; 1862 : while (k <= j->spec_end) { -; 1863 : short* p = &data[stbi__jpeg_dezigzag[k++]]; -; 1864 : if (*p != 0) { -; 1865 : if (stbi__jpeg_get_bit(j)) -; 1866 : if ((*p & bit) == 0) { -; 1867 : if (*p > 0) -; 1868 : *p += bit; -; 1869 : else -; 1870 : *p -= bit; -; 1871 : } -; 1872 : } -; 1873 : else { -; 1874 : if (r == 0) { -; 1875 : *p = (short)s; -; 1876 : break; -; 1877 : } -; 1878 : --r; -; 1879 : } -; 1880 : } -; 1881 : } while (k <= j->spec_end); -; 1882 : } -; 1883 : } -; 1884 : return 1; -; 1885 : } -; 1886 : -; 1887 : // take a -128..127 value and stbi__clamp it and convert to 0..255 -; 1888 : stbi_inline static stbi_uc stbi__clamp(int x) -; 1889 : { -; 1890 : // trick to use a single test to catch both cases -; 1891 : if ((unsigned int)x > 255) { -; 1892 : if (x < 0) return 0; -; 1893 : if (x > 255) return 255; -; 1894 : } -; 1895 : return (stbi_uc)x; -; 1896 : } -; 1897 : -; 1898 : #define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -; 1899 : #define stbi__fsh(x) ((x) * 4096) -; 1900 : -; 1901 : // derived from jidctint -- DCT_ISLOW -; 1902 : #define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ -; 1903 : int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ -; 1904 : p2 = s2; \ -; 1905 : p3 = s6; \ -; 1906 : p1 = (p2+p3) * stbi__f2f(0.5411961f); \ -; 1907 : t2 = p1 + p3*stbi__f2f(-1.847759065f); \ -; 1908 : t3 = p1 + p2*stbi__f2f( 0.765366865f); \ -; 1909 : p2 = s0; \ -; 1910 : p3 = s4; \ -; 1911 : t0 = stbi__fsh(p2+p3); \ -; 1912 : t1 = stbi__fsh(p2-p3); \ -; 1913 : x0 = t0+t3; \ -; 1914 : x3 = t0-t3; \ -; 1915 : x1 = t1+t2; \ -; 1916 : x2 = t1-t2; \ -; 1917 : t0 = s7; \ -; 1918 : t1 = s5; \ -; 1919 : t2 = s3; \ -; 1920 : t3 = s1; \ -; 1921 : p3 = t0+t2; \ -; 1922 : p4 = t1+t3; \ -; 1923 : p1 = t0+t3; \ -; 1924 : p2 = t1+t2; \ -; 1925 : p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ -; 1926 : t0 = t0*stbi__f2f( 0.298631336f); \ -; 1927 : t1 = t1*stbi__f2f( 2.053119869f); \ -; 1928 : t2 = t2*stbi__f2f( 3.072711026f); \ -; 1929 : t3 = t3*stbi__f2f( 1.501321110f); \ -; 1930 : p1 = p5 + p1*stbi__f2f(-0.899976223f); \ -; 1931 : p2 = p5 + p2*stbi__f2f(-2.562915447f); \ -; 1932 : p3 = p3*stbi__f2f(-1.961570560f); \ -; 1933 : p4 = p4*stbi__f2f(-0.390180644f); \ -; 1934 : t3 += p1+p4; \ -; 1935 : t2 += p2+p3; \ -; 1936 : t1 += p2+p4; \ -; 1937 : t0 += p1+p3; -; 1938 : -; 1939 : static void stbi__idct_block(stbi_uc* out, int out_stride, short data[64]) -; 1940 : { -; 1941 : int i, val[64], * v = val; -; 1942 : stbi_uc* o; -; 1943 : short* d = data; -; 1944 : -; 1945 : // columns -; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { -; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing -; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 -; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { -; 1950 : // no shortcut 0 seconds -; 1951 : // (1|2|3|4|5|6|7)==0 0 seconds -; 1952 : // all separate -0.047 seconds -; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds -; 1954 : int dcterm = d[0] * 4; -; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; -; 1956 : } -; 1957 : else { -; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) -; 1959 : // constants scaled things up by 1<<12; let's bring them back -; 1960 : // down, but keep 2 extra bits of precision -; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; -; 1962 : v[0] = (x0 + t3) >> 10; -; 1963 : v[56] = (x0 - t3) >> 10; -; 1964 : v[8] = (x1 + t2) >> 10; -; 1965 : v[48] = (x1 - t2) >> 10; -; 1966 : v[16] = (x2 + t1) >> 10; -; 1967 : v[40] = (x2 - t1) >> 10; -; 1968 : v[24] = (x3 + t0) >> 10; -; 1969 : v[32] = (x3 - t0) >> 10; -; 1970 : } -; 1971 : } -; 1972 : -; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { -; 1974 : // no fast case since the first 1D IDCT spread components out -; 1975 : STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]) -; 1976 : // constants scaled things up by 1<<12, plus we had 1<<2 from first -; 1977 : // loop, plus horizontal and vertical each scale by sqrt(8) so together -; 1978 : // we've got an extra 1<<3, so 1<<17 total we need to remove. -; 1979 : // so we want to round that, which means adding 0.5 * 1<<17, -; 1980 : // aka 65536. Also, we'll end up with -128 to 127 that we want -; 1981 : // to encode as 0..255 by adding 128, so we'll add that before the shift -; 1982 : x0 += 65536 + (128 << 17); -; 1983 : x1 += 65536 + (128 << 17); -; 1984 : x2 += 65536 + (128 << 17); -; 1985 : x3 += 65536 + (128 << 17); -; 1986 : // tried computing the shifts into temps, or'ing the temps to see -; 1987 : // if any were out of range, but that was slower -; 1988 : o[0] = stbi__clamp((x0 + t3) >> 17); -; 1989 : o[7] = stbi__clamp((x0 - t3) >> 17); -; 1990 : o[1] = stbi__clamp((x1 + t2) >> 17); -; 1991 : o[6] = stbi__clamp((x1 - t2) >> 17); -; 1992 : o[2] = stbi__clamp((x2 + t1) >> 17); -; 1993 : o[5] = stbi__clamp((x2 - t1) >> 17); -; 1994 : o[3] = stbi__clamp((x3 + t0) >> 17); -; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); -; 1996 : } -; 1997 : } -; 1998 : -; 1999 : #ifdef STBI_SSE2 -; 2000 : // sse2 integer IDCT. not the fastest possible implementation but it -; 2001 : // produces bit-identical results to the generic C version so it's -; 2002 : // fully "transparent". -; 2003 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2004 : { -; 2005 : // This is constructed to match our regular (generic) integer IDCT exactly. -; 2006 : __m128i row0, row1, row2, row3, row4, row5, row6, row7; -; 2007 : __m128i tmp; -; 2008 : -; 2009 : // dot product constant: even elems=x, odd elems=y -; 2010 : #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) -; 2011 : -; 2012 : // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) -; 2013 : // out(1) = c1[even]*x + c1[odd]*y -; 2014 : #define dct_rot(out0,out1, x,y,c0,c1) \ -; 2015 : __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ -; 2016 : __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ -; 2017 : __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ -; 2018 : __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ -; 2019 : __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ -; 2020 : __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) -; 2021 : -; 2022 : // out = in << 12 (in 16-bit, out 32-bit) -; 2023 : #define dct_widen(out, in) \ -; 2024 : __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ -; 2025 : __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) -; 2026 : -; 2027 : // wide add -; 2028 : #define dct_wadd(out, a, b) \ -; 2029 : __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ -; 2030 : __m128i out##_h = _mm_add_epi32(a##_h, b##_h) -; 2031 : -; 2032 : // wide sub -; 2033 : #define dct_wsub(out, a, b) \ -; 2034 : __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ -; 2035 : __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) -; 2036 : -; 2037 : // butterfly a/b, add bias, then shift by "s" and pack -; 2038 : #define dct_bfly32o(out0, out1, a,b,bias,s) \ -; 2039 : { \ -; 2040 : __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ -; 2041 : __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ -; 2042 : dct_wadd(sum, abiased, b); \ -; 2043 : dct_wsub(dif, abiased, b); \ -; 2044 : out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ -; 2045 : out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ -; 2046 : } -; 2047 : -; 2048 : // 8-bit interleave step (for transposes) -; 2049 : #define dct_interleave8(a, b) \ -; 2050 : tmp = a; \ -; 2051 : a = _mm_unpacklo_epi8(a, b); \ -; 2052 : b = _mm_unpackhi_epi8(tmp, b) -; 2053 : -; 2054 : // 16-bit interleave step (for transposes) -; 2055 : #define dct_interleave16(a, b) \ -; 2056 : tmp = a; \ -; 2057 : a = _mm_unpacklo_epi16(a, b); \ -; 2058 : b = _mm_unpackhi_epi16(tmp, b) -; 2059 : -; 2060 : #define dct_pass(bias,shift) \ -; 2061 : { \ -; 2062 : /* even part */ \ -; 2063 : dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ -; 2064 : __m128i sum04 = _mm_add_epi16(row0, row4); \ -; 2065 : __m128i dif04 = _mm_sub_epi16(row0, row4); \ -; 2066 : dct_widen(t0e, sum04); \ -; 2067 : dct_widen(t1e, dif04); \ -; 2068 : dct_wadd(x0, t0e, t3e); \ -; 2069 : dct_wsub(x3, t0e, t3e); \ -; 2070 : dct_wadd(x1, t1e, t2e); \ -; 2071 : dct_wsub(x2, t1e, t2e); \ -; 2072 : /* odd part */ \ -; 2073 : dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ -; 2074 : dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ -; 2075 : __m128i sum17 = _mm_add_epi16(row1, row7); \ -; 2076 : __m128i sum35 = _mm_add_epi16(row3, row5); \ -; 2077 : dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ -; 2078 : dct_wadd(x4, y0o, y4o); \ -; 2079 : dct_wadd(x5, y1o, y5o); \ -; 2080 : dct_wadd(x6, y2o, y5o); \ -; 2081 : dct_wadd(x7, y3o, y4o); \ -; 2082 : dct_bfly32o(row0,row7, x0,x7,bias,shift); \ -; 2083 : dct_bfly32o(row1,row6, x1,x6,bias,shift); \ -; 2084 : dct_bfly32o(row2,row5, x2,x5,bias,shift); \ -; 2085 : dct_bfly32o(row3,row4, x3,x4,bias,shift); \ -; 2086 : } -; 2087 : -; 2088 : __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); -; 2089 : __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f)); -; 2090 : __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); -; 2091 : __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); -; 2092 : __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f)); -; 2093 : __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f)); -; 2094 : __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f)); -; 2095 : __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f)); -; 2096 : -; 2097 : // rounding biases in column/row passes, see stbi__idct_block for explanation. -; 2098 : __m128i bias_0 = _mm_set1_epi32(512); -; 2099 : __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17)); -; 2100 : -; 2101 : // load -; 2102 : row0 = _mm_load_si128((const __m128i*) (data + 0 * 8)); -; 2103 : row1 = _mm_load_si128((const __m128i*) (data + 1 * 8)); -; 2104 : row2 = _mm_load_si128((const __m128i*) (data + 2 * 8)); -; 2105 : row3 = _mm_load_si128((const __m128i*) (data + 3 * 8)); -; 2106 : row4 = _mm_load_si128((const __m128i*) (data + 4 * 8)); -; 2107 : row5 = _mm_load_si128((const __m128i*) (data + 5 * 8)); -; 2108 : row6 = _mm_load_si128((const __m128i*) (data + 6 * 8)); -; 2109 : row7 = _mm_load_si128((const __m128i*) (data + 7 * 8)); -; 2110 : -; 2111 : // column pass -; 2112 : dct_pass(bias_0, 10); -; 2113 : -; 2114 : { -; 2115 : // 16bit 8x8 transpose pass 1 -; 2116 : dct_interleave16(row0, row4); -; 2117 : dct_interleave16(row1, row5); -; 2118 : dct_interleave16(row2, row6); -; 2119 : dct_interleave16(row3, row7); -; 2120 : -; 2121 : // transpose pass 2 -; 2122 : dct_interleave16(row0, row2); -; 2123 : dct_interleave16(row1, row3); -; 2124 : dct_interleave16(row4, row6); -; 2125 : dct_interleave16(row5, row7); -; 2126 : -; 2127 : // transpose pass 3 -; 2128 : dct_interleave16(row0, row1); -; 2129 : dct_interleave16(row2, row3); -; 2130 : dct_interleave16(row4, row5); -; 2131 : dct_interleave16(row6, row7); -; 2132 : } -; 2133 : -; 2134 : // row pass -; 2135 : dct_pass(bias_1, 17); -; 2136 : -; 2137 : { -; 2138 : // pack -; 2139 : __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 -; 2140 : __m128i p1 = _mm_packus_epi16(row2, row3); -; 2141 : __m128i p2 = _mm_packus_epi16(row4, row5); -; 2142 : __m128i p3 = _mm_packus_epi16(row6, row7); -; 2143 : -; 2144 : // 8bit 8x8 transpose pass 1 -; 2145 : dct_interleave8(p0, p2); // a0e0a1e1... -; 2146 : dct_interleave8(p1, p3); // c0g0c1g1... -; 2147 : -; 2148 : // transpose pass 2 -; 2149 : dct_interleave8(p0, p1); // a0c0e0g0... -; 2150 : dct_interleave8(p2, p3); // b0d0f0h0... -; 2151 : -; 2152 : // transpose pass 3 -; 2153 : dct_interleave8(p0, p2); // a0b0c0d0... -; 2154 : dct_interleave8(p1, p3); // a4b4c4d4... -; 2155 : -; 2156 : // store -; 2157 : _mm_storel_epi64((__m128i*) out, p0); out += out_stride; -; 2158 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; -; 2159 : _mm_storel_epi64((__m128i*) out, p2); out += out_stride; -; 2160 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; -; 2161 : _mm_storel_epi64((__m128i*) out, p1); out += out_stride; -; 2162 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; -; 2163 : _mm_storel_epi64((__m128i*) out, p3); out += out_stride; -; 2164 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e)); -; 2165 : } -; 2166 : -; 2167 : #undef dct_const -; 2168 : #undef dct_rot -; 2169 : #undef dct_widen -; 2170 : #undef dct_wadd -; 2171 : #undef dct_wsub -; 2172 : #undef dct_bfly32o -; 2173 : #undef dct_interleave8 -; 2174 : #undef dct_interleave16 -; 2175 : #undef dct_pass -; 2176 : } -; 2177 : -; 2178 : #endif // STBI_SSE2 -; 2179 : -; 2180 : #ifdef STBI_NEON -; 2181 : -; 2182 : // NEON integer IDCT. should produce bit-identical -; 2183 : // results to the generic C version. -; 2184 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2185 : { -; 2186 : int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; -; 2187 : -; 2188 : int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); -; 2189 : int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); -; 2190 : int16x4_t rot0_2 = vdup_n_s16(stbi__f2f(0.765366865f)); -; 2191 : int16x4_t rot1_0 = vdup_n_s16(stbi__f2f(1.175875602f)); -; 2192 : int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); -; 2193 : int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); -; 2194 : int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); -; 2195 : int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); -; 2196 : int16x4_t rot3_0 = vdup_n_s16(stbi__f2f(0.298631336f)); -; 2197 : int16x4_t rot3_1 = vdup_n_s16(stbi__f2f(2.053119869f)); -; 2198 : int16x4_t rot3_2 = vdup_n_s16(stbi__f2f(3.072711026f)); -; 2199 : int16x4_t rot3_3 = vdup_n_s16(stbi__f2f(1.501321110f)); -; 2200 : -; 2201 : #define dct_long_mul(out, inq, coeff) \ -; 2202 : int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ -; 2203 : int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) -; 2204 : -; 2205 : #define dct_long_mac(out, acc, inq, coeff) \ -; 2206 : int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ -; 2207 : int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) -; 2208 : -; 2209 : #define dct_widen(out, inq) \ -; 2210 : int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ -; 2211 : int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) -; 2212 : -; 2213 : // wide add -; 2214 : #define dct_wadd(out, a, b) \ -; 2215 : int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ -; 2216 : int32x4_t out##_h = vaddq_s32(a##_h, b##_h) -; 2217 : -; 2218 : // wide sub -; 2219 : #define dct_wsub(out, a, b) \ -; 2220 : int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ -; 2221 : int32x4_t out##_h = vsubq_s32(a##_h, b##_h) -; 2222 : -; 2223 : // butterfly a/b, then shift using "shiftop" by "s" and pack -; 2224 : #define dct_bfly32o(out0,out1, a,b,shiftop,s) \ -; 2225 : { \ -; 2226 : dct_wadd(sum, a, b); \ -; 2227 : dct_wsub(dif, a, b); \ -; 2228 : out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ -; 2229 : out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ -; 2230 : } -; 2231 : -; 2232 : #define dct_pass(shiftop, shift) \ -; 2233 : { \ -; 2234 : /* even part */ \ -; 2235 : int16x8_t sum26 = vaddq_s16(row2, row6); \ -; 2236 : dct_long_mul(p1e, sum26, rot0_0); \ -; 2237 : dct_long_mac(t2e, p1e, row6, rot0_1); \ -; 2238 : dct_long_mac(t3e, p1e, row2, rot0_2); \ -; 2239 : int16x8_t sum04 = vaddq_s16(row0, row4); \ -; 2240 : int16x8_t dif04 = vsubq_s16(row0, row4); \ -; 2241 : dct_widen(t0e, sum04); \ -; 2242 : dct_widen(t1e, dif04); \ -; 2243 : dct_wadd(x0, t0e, t3e); \ -; 2244 : dct_wsub(x3, t0e, t3e); \ -; 2245 : dct_wadd(x1, t1e, t2e); \ -; 2246 : dct_wsub(x2, t1e, t2e); \ -; 2247 : /* odd part */ \ -; 2248 : int16x8_t sum15 = vaddq_s16(row1, row5); \ -; 2249 : int16x8_t sum17 = vaddq_s16(row1, row7); \ -; 2250 : int16x8_t sum35 = vaddq_s16(row3, row5); \ -; 2251 : int16x8_t sum37 = vaddq_s16(row3, row7); \ -; 2252 : int16x8_t sumodd = vaddq_s16(sum17, sum35); \ -; 2253 : dct_long_mul(p5o, sumodd, rot1_0); \ -; 2254 : dct_long_mac(p1o, p5o, sum17, rot1_1); \ -; 2255 : dct_long_mac(p2o, p5o, sum35, rot1_2); \ -; 2256 : dct_long_mul(p3o, sum37, rot2_0); \ -; 2257 : dct_long_mul(p4o, sum15, rot2_1); \ -; 2258 : dct_wadd(sump13o, p1o, p3o); \ -; 2259 : dct_wadd(sump24o, p2o, p4o); \ -; 2260 : dct_wadd(sump23o, p2o, p3o); \ -; 2261 : dct_wadd(sump14o, p1o, p4o); \ -; 2262 : dct_long_mac(x4, sump13o, row7, rot3_0); \ -; 2263 : dct_long_mac(x5, sump24o, row5, rot3_1); \ -; 2264 : dct_long_mac(x6, sump23o, row3, rot3_2); \ -; 2265 : dct_long_mac(x7, sump14o, row1, rot3_3); \ -; 2266 : dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ -; 2267 : dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ -; 2268 : dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ -; 2269 : dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ -; 2270 : } -; 2271 : -; 2272 : // load -; 2273 : row0 = vld1q_s16(data + 0 * 8); -; 2274 : row1 = vld1q_s16(data + 1 * 8); -; 2275 : row2 = vld1q_s16(data + 2 * 8); -; 2276 : row3 = vld1q_s16(data + 3 * 8); -; 2277 : row4 = vld1q_s16(data + 4 * 8); -; 2278 : row5 = vld1q_s16(data + 5 * 8); -; 2279 : row6 = vld1q_s16(data + 6 * 8); -; 2280 : row7 = vld1q_s16(data + 7 * 8); -; 2281 : -; 2282 : // add DC bias -; 2283 : row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); -; 2284 : -; 2285 : // column pass -; 2286 : dct_pass(vrshrn_n_s32, 10); -; 2287 : -; 2288 : // 16bit 8x8 transpose -; 2289 : { -; 2290 : // these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -; 2291 : // whether compilers actually get this is another story, sadly. -; 2292 : #define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -; 2293 : #define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -; 2294 : #define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } -; 2295 : -; 2296 : // pass 1 -; 2297 : dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 -; 2298 : dct_trn16(row2, row3); -; 2299 : dct_trn16(row4, row5); -; 2300 : dct_trn16(row6, row7); -; 2301 : -; 2302 : // pass 2 -; 2303 : dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 -; 2304 : dct_trn32(row1, row3); -; 2305 : dct_trn32(row4, row6); -; 2306 : dct_trn32(row5, row7); -; 2307 : -; 2308 : // pass 3 -; 2309 : dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 -; 2310 : dct_trn64(row1, row5); -; 2311 : dct_trn64(row2, row6); -; 2312 : dct_trn64(row3, row7); -; 2313 : -; 2314 : #undef dct_trn16 -; 2315 : #undef dct_trn32 -; 2316 : #undef dct_trn64 -; 2317 : } -; 2318 : -; 2319 : // row pass -; 2320 : // vrshrn_n_s32 only supports shifts up to 16, we need -; 2321 : // 17. so do a non-rounding shift of 16 first then follow -; 2322 : // up with a rounding shift by 1. -; 2323 : dct_pass(vshrn_n_s32, 16); -; 2324 : -; 2325 : { -; 2326 : // pack and round -; 2327 : uint8x8_t p0 = vqrshrun_n_s16(row0, 1); -; 2328 : uint8x8_t p1 = vqrshrun_n_s16(row1, 1); -; 2329 : uint8x8_t p2 = vqrshrun_n_s16(row2, 1); -; 2330 : uint8x8_t p3 = vqrshrun_n_s16(row3, 1); -; 2331 : uint8x8_t p4 = vqrshrun_n_s16(row4, 1); -; 2332 : uint8x8_t p5 = vqrshrun_n_s16(row5, 1); -; 2333 : uint8x8_t p6 = vqrshrun_n_s16(row6, 1); -; 2334 : uint8x8_t p7 = vqrshrun_n_s16(row7, 1); -; 2335 : -; 2336 : // again, these can translate into one instruction, but often don't. -; 2337 : #define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -; 2338 : #define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -; 2339 : #define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } -; 2340 : -; 2341 : // sadly can't use interleaved stores here since we only write -; 2342 : // 8 bytes to each scan line! -; 2343 : -; 2344 : // 8x8 8-bit transpose pass 1 -; 2345 : dct_trn8_8(p0, p1); -; 2346 : dct_trn8_8(p2, p3); -; 2347 : dct_trn8_8(p4, p5); -; 2348 : dct_trn8_8(p6, p7); -; 2349 : -; 2350 : // pass 2 -; 2351 : dct_trn8_16(p0, p2); -; 2352 : dct_trn8_16(p1, p3); -; 2353 : dct_trn8_16(p4, p6); -; 2354 : dct_trn8_16(p5, p7); -; 2355 : -; 2356 : // pass 3 -; 2357 : dct_trn8_32(p0, p4); -; 2358 : dct_trn8_32(p1, p5); -; 2359 : dct_trn8_32(p2, p6); -; 2360 : dct_trn8_32(p3, p7); -; 2361 : -; 2362 : // store -; 2363 : vst1_u8(out, p0); out += out_stride; -; 2364 : vst1_u8(out, p1); out += out_stride; -; 2365 : vst1_u8(out, p2); out += out_stride; -; 2366 : vst1_u8(out, p3); out += out_stride; -; 2367 : vst1_u8(out, p4); out += out_stride; -; 2368 : vst1_u8(out, p5); out += out_stride; -; 2369 : vst1_u8(out, p6); out += out_stride; -; 2370 : vst1_u8(out, p7); -; 2371 : -; 2372 : #undef dct_trn8_8 -; 2373 : #undef dct_trn8_16 -; 2374 : #undef dct_trn8_32 -; 2375 : } -; 2376 : -; 2377 : #undef dct_long_mul -; 2378 : #undef dct_long_mac -; 2379 : #undef dct_widen -; 2380 : #undef dct_wadd -; 2381 : #undef dct_wsub -; 2382 : #undef dct_bfly32o -; 2383 : #undef dct_pass -; 2384 : } -; 2385 : -; 2386 : #endif // STBI_NEON -; 2387 : -; 2388 : #define STBI__MARKER_none 0xff -; 2389 : // if there's a pending marker from the entropy stream, return that -; 2390 : // otherwise, fetch from the stream and get a marker. if there's no -; 2391 : // marker, return 0xff, which is never a valid marker value -; 2392 : static stbi_uc stbi__get_marker(stbi__jpeg* j) -; 2393 : { -; 2394 : stbi_uc x; -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } -; 2396 : x = stbi__get8(j->s); -; 2397 : if (x != 0xff) return STBI__MARKER_none; -; 2398 : while (x == 0xff) -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes -; 2400 : return x; -; 2401 : } -; 2402 : -; 2403 : // in each scan, we'll have scan_n components, and the order -; 2404 : // of the components is specified by order[] -; 2405 : #define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) -; 2406 : -; 2407 : // after a restart interval, stbi__jpeg_reset the entropy decoder and -; 2408 : // the dc prediction -; 2409 : static void stbi__jpeg_reset(stbi__jpeg* j) -; 2410 : { -; 2411 : j->code_bits = 0; -; 2412 : j->code_buffer = 0; -; 2413 : j->nomore = 0; -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; -; 2417 : j->eob_run = 0; -; 2418 : // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, -; 2419 : // since we don't even allow 1<<30 pixels -; 2420 : } -; 2421 : -; 2422 : static int stbi__parse_entropy_coded_data(stbi__jpeg* z) -; 2423 : { -; 2424 : stbi__jpeg_reset(z); -; 2425 : if (!z->progressive) { -; 2426 : if (z->scan_n == 1) { -; 2427 : int i, j; -; 2428 : STBI_SIMD_ALIGN(short, data[64]); -; 2429 : int n = z->order[0]; -; 2430 : // non-interleaved data, we just need to process one block at a time, -; 2431 : // in trivial scanline order -; 2432 : // number of blocks to do just depends on how many actual "pixels" this -; 2433 : // component has, independent of interleaved MCU blocking and such -; 2434 : int w = (z->img_comp[n].x + 7) >> 3; -; 2435 : int h = (z->img_comp[n].y + 7) >> 3; -; 2436 : for (j = 0; j < h; ++j) { -; 2437 : for (i = 0; i < w; ++i) { -; 2438 : int ha = z->img_comp[n].ha; -; 2439 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2440 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2441 : // every data block is an MCU, so countdown the restart interval -; 2442 : if (--z->todo <= 0) { -; 2443 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2444 : // if it's NOT a restart, then just bail, so we get corrupt data -; 2445 : // rather than no data -; 2446 : if (!STBI__RESTART(z->marker)) return 1; -; 2447 : stbi__jpeg_reset(z); -; 2448 : } -; 2449 : } -; 2450 : } -; 2451 : return 1; -; 2452 : } -; 2453 : else { // interleaved -; 2454 : int i, j, k, x, y; -; 2455 : STBI_SIMD_ALIGN(short, data[64]); -; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2458 : // scan an interleaved mcu... process scan_n components in order -; 2459 : for (k = 0; k < z->scan_n; ++k) { -; 2460 : int n = z->order[k]; -; 2461 : // scan out an mcu's worth of this component; that's just determined -; 2462 : // by the basic H and V specified for the component -; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2464 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2465 : int x2 = (i * z->img_comp[n].h + x) * 8; -; 2466 : int y2 = (j * z->img_comp[n].v + y) * 8; -; 2467 : int ha = z->img_comp[n].ha; -; 2468 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2469 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); -; 2470 : } -; 2471 : } -; 2472 : } -; 2473 : // after all interleaved components, that's an interleaved MCU, -; 2474 : // so now count down the restart interval -; 2475 : if (--z->todo <= 0) { -; 2476 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2477 : if (!STBI__RESTART(z->marker)) return 1; -; 2478 : stbi__jpeg_reset(z); -; 2479 : } -; 2480 : } -; 2481 : } -; 2482 : return 1; -; 2483 : } -; 2484 : } -; 2485 : else { -; 2486 : if (z->scan_n == 1) { -; 2487 : int i, j; -; 2488 : int n = z->order[0]; -; 2489 : // non-interleaved data, we just need to process one block at a time, -; 2490 : // in trivial scanline order -; 2491 : // number of blocks to do just depends on how many actual "pixels" this -; 2492 : // component has, independent of interleaved MCU blocking and such -; 2493 : int w = (z->img_comp[n].x + 7) >> 3; -; 2494 : int h = (z->img_comp[n].y + 7) >> 3; -; 2495 : for (j = 0; j < h; ++j) { -; 2496 : for (i = 0; i < w; ++i) { -; 2497 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2498 : if (z->spec_start == 0) { -; 2499 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2500 : return 0; -; 2501 : } -; 2502 : else { -; 2503 : int ha = z->img_comp[n].ha; -; 2504 : if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) -; 2505 : return 0; -; 2506 : } -; 2507 : // every data block is an MCU, so countdown the restart interval -; 2508 : if (--z->todo <= 0) { -; 2509 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2510 : if (!STBI__RESTART(z->marker)) return 1; -; 2511 : stbi__jpeg_reset(z); -; 2512 : } -; 2513 : } -; 2514 : } -; 2515 : return 1; -; 2516 : } -; 2517 : else { // interleaved -; 2518 : int i, j, k, x, y; -; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2521 : // scan an interleaved mcu... process scan_n components in order -; 2522 : for (k = 0; k < z->scan_n; ++k) { -; 2523 : int n = z->order[k]; -; 2524 : // scan out an mcu's worth of this component; that's just determined -; 2525 : // by the basic H and V specified for the component -; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2528 : int x2 = (i * z->img_comp[n].h + x); -; 2529 : int y2 = (j * z->img_comp[n].v + y); -; 2530 : short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); -; 2531 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2532 : return 0; -; 2533 : } -; 2534 : } -; 2535 : } -; 2536 : // after all interleaved components, that's an interleaved MCU, -; 2537 : // so now count down the restart interval -; 2538 : if (--z->todo <= 0) { -; 2539 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2540 : if (!STBI__RESTART(z->marker)) return 1; -; 2541 : stbi__jpeg_reset(z); -; 2542 : } -; 2543 : } -; 2544 : } -; 2545 : return 1; -; 2546 : } -; 2547 : } -; 2548 : } -; 2549 : -; 2550 : static void stbi__jpeg_dequantize(short* data, stbi__uint16* dequant) -; 2551 : { -; 2552 : int i; -; 2553 : for (i = 0; i < 64; ++i) -; 2554 : data[i] *= dequant[i]; -; 2555 : } -; 2556 : -; 2557 : static void stbi__jpeg_finish(stbi__jpeg* z) -; 2558 : { -; 2559 : if (z->progressive) { -; 2560 : // dequantize and idct the data -; 2561 : int i, j, n; -; 2562 : for (n = 0; n < z->s->img_n; ++n) { -; 2563 : int w = (z->img_comp[n].x + 7) >> 3; -; 2564 : int h = (z->img_comp[n].y + 7) >> 3; -; 2565 : for (j = 0; j < h; ++j) { -; 2566 : for (i = 0; i < w; ++i) { -; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2568 : stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); -; 2569 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2570 : } -; 2571 : } -; 2572 : } -; 2573 : } -; 2574 : } -; 2575 : -; 2576 : static int stbi__process_marker(stbi__jpeg* z, int m) -; 2577 : { -; 2578 : int L; -; 2579 : switch (m) { -; 2580 : case STBI__MARKER_none: // no marker found -; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); -; 2582 : -; 2583 : case 0xDD: // DRI - specify restart interval -; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); -; 2585 : z->restart_interval = stbi__get16be(z->s); -; 2586 : return 1; -; 2587 : -; 2588 : case 0xDB: // DQT - define quantization table -; 2589 : L = stbi__get16be(z->s) - 2; -; 2590 : while (L > 0) { -; 2591 : int q = stbi__get8(z->s); -; 2592 : int p = q >> 4, sixteen = (p != 0); -; 2593 : int t = q & 15, i; -; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); -; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); -; 2596 : -; 2597 : for (i = 0; i < 64; ++i) -; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); -; 2599 : L -= (sixteen ? 129 : 65); -; 2600 : } -; 2601 : return L == 0; -; 2602 : -; 2603 : case 0xC4: // DHT - define huffman table -; 2604 : L = stbi__get16be(z->s) - 2; -; 2605 : while (L > 0) { -; 2606 : stbi_uc* v; -; 2607 : int sizes[16], i, n = 0; -; 2608 : int q = stbi__get8(z->s); -; 2609 : int tc = q >> 4; -; 2610 : int th = q & 15; -; 2611 : if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG"); -; 2612 : for (i = 0; i < 16; ++i) { -; 2613 : sizes[i] = stbi__get8(z->s); -; 2614 : n += sizes[i]; -; 2615 : } -; 2616 : if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values! -; 2617 : L -= 17; -; 2618 : if (tc == 0) { -; 2619 : if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0; -; 2620 : v = z->huff_dc[th].values; -; 2621 : } -; 2622 : else { -; 2623 : if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0; -; 2624 : v = z->huff_ac[th].values; -; 2625 : } -; 2626 : for (i = 0; i < n; ++i) -; 2627 : v[i] = stbi__get8(z->s); -; 2628 : if (tc != 0) -; 2629 : stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); -; 2630 : L -= n; -; 2631 : } -; 2632 : return L == 0; -; 2633 : } -; 2634 : -; 2635 : // check for comment block or APP blocks -; 2636 : if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { -; 2637 : L = stbi__get16be(z->s); -; 2638 : if (L < 2) { -; 2639 : if (m == 0xFE) -; 2640 : return stbi__err("bad COM len", "Corrupt JPEG"); -; 2641 : else -; 2642 : return stbi__err("bad APP len", "Corrupt JPEG"); -; 2643 : } -; 2644 : L -= 2; -; 2645 : -; 2646 : if (m == 0xE0 && L >= 5) { // JFIF APP0 segment -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) -; 2652 : ok = 0; -; 2653 : L -= 5; -; 2654 : if (ok) -; 2655 : z->jfif = 1; -; 2656 : } -; 2657 : else if (m == 0xEE && L >= 12) { // Adobe APP14 segment -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) -; 2663 : ok = 0; -; 2664 : L -= 6; -; 2665 : if (ok) { -; 2666 : stbi__get8(z->s); // version -; 2667 : stbi__get16be(z->s); // flags0 -; 2668 : stbi__get16be(z->s); // flags1 -; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform -; 2670 : L -= 6; -; 2671 : } -; 2672 : } -; 2673 : -; 2674 : stbi__skip(z->s, L); -; 2675 : return 1; -; 2676 : } -; 2677 : -; 2678 : return stbi__err("unknown marker", "Corrupt JPEG"); -; 2679 : } -; 2680 : -; 2681 : // after we see SOS -; 2682 : static int stbi__process_scan_header(stbi__jpeg* z) -; 2683 : { -; 2684 : int i; -; 2685 : int Ls = stbi__get16be(z->s); -; 2686 : z->scan_n = stbi__get8(z->s); -; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); -; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); -; 2689 : for (i = 0; i < z->scan_n; ++i) { -; 2690 : int id = stbi__get8(z->s), which; -; 2691 : int q = stbi__get8(z->s); -; 2692 : for (which = 0; which < z->s->img_n; ++which) -; 2693 : if (z->img_comp[which].id == id) -; 2694 : break; -; 2695 : if (which == z->s->img_n) return 0; // no match -; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); -; 2698 : z->order[i] = which; -; 2699 : } -; 2700 : -; 2701 : { -; 2702 : int aa; -; 2703 : z->spec_start = stbi__get8(z->s); -; 2704 : z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 -; 2705 : aa = stbi__get8(z->s); -; 2706 : z->succ_high = (aa >> 4); -; 2707 : z->succ_low = (aa & 15); -; 2708 : if (z->progressive) { -; 2709 : if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) -; 2710 : return stbi__err("bad SOS", "Corrupt JPEG"); -; 2711 : } -; 2712 : else { -; 2713 : if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2714 : if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2715 : z->spec_end = 63; -; 2716 : } -; 2717 : } -; 2718 : -; 2719 : return 1; -; 2720 : } -; 2721 : -; 2722 : static int stbi__free_jpeg_components(stbi__jpeg* z, int ncomp, int why) -; 2723 : { -; 2724 : int i; -; 2725 : for (i = 0; i < ncomp; ++i) { -; 2726 : if (z->img_comp[i].raw_data) { -; 2727 : STBI_FREE(z->img_comp[i].raw_data); -; 2728 : z->img_comp[i].raw_data = NULL; -; 2729 : z->img_comp[i].data = NULL; -; 2730 : } -; 2731 : if (z->img_comp[i].raw_coeff) { -; 2732 : STBI_FREE(z->img_comp[i].raw_coeff); -; 2733 : z->img_comp[i].raw_coeff = 0; -; 2734 : z->img_comp[i].coeff = 0; -; 2735 : } -; 2736 : if (z->img_comp[i].linebuf) { -; 2737 : STBI_FREE(z->img_comp[i].linebuf); -; 2738 : z->img_comp[i].linebuf = NULL; -; 2739 : } -; 2740 : } -; 2741 : return why; -; 2742 : } -; 2743 : -; 2744 : static int stbi__process_frame_header(stbi__jpeg* z, int scan) -; 2745 : { -; 2746 : stbi__context* s = z->s; -; 2747 : int Lf, p, i, q, h_max = 1, v_max = 1, c; -; 2748 : Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG -; 2749 : p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline -; 2750 : s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG -; 2751 : s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires -; 2752 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2753 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2754 : c = stbi__get8(s); -; 2755 : if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG"); -; 2756 : s->img_n = c; -; 2757 : for (i = 0; i < c; ++i) { -; 2758 : z->img_comp[i].data = NULL; -; 2759 : z->img_comp[i].linebuf = NULL; -; 2760 : } -; 2761 : -; 2762 : if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG"); -; 2763 : -; 2764 : z->rgb = 0; -; 2765 : for (i = 0; i < s->img_n; ++i) { -; 2766 : static const unsigned char rgb[3] = { 'R', 'G', 'B' }; -; 2767 : z->img_comp[i].id = stbi__get8(s); -; 2768 : if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) -; 2769 : ++z->rgb; -; 2770 : q = stbi__get8(s); -; 2771 : z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H", "Corrupt JPEG"); -; 2772 : z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V", "Corrupt JPEG"); -; 2773 : z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ", "Corrupt JPEG"); -; 2774 : } -; 2775 : -; 2776 : if (scan != STBI__SCAN_load) return 1; -; 2777 : -; 2778 : if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); -; 2779 : -; 2780 : for (i = 0; i < s->img_n; ++i) { -; 2781 : if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; -; 2782 : if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; -; 2783 : } -; 2784 : -; 2785 : // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios -; 2786 : // and I've never seen a non-corrupted JPEG file actually use them -; 2787 : for (i = 0; i < s->img_n; ++i) { -; 2788 : if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG"); -; 2789 : if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG"); -; 2790 : } -; 2791 : -; 2792 : // compute interleaved mcu info -; 2793 : z->img_h_max = h_max; -; 2794 : z->img_v_max = v_max; -; 2795 : z->img_mcu_w = h_max * 8; -; 2796 : z->img_mcu_h = v_max * 8; -; 2797 : // these sizes can't be more than 17 bits -; 2798 : z->img_mcu_x = (s->img_x + z->img_mcu_w - 1) / z->img_mcu_w; -; 2799 : z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h; -; 2800 : -; 2801 : for (i = 0; i < s->img_n; ++i) { -; 2802 : // number of effective pixels (e.g. for non-interleaved MCU) -; 2803 : z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max - 1) / h_max; -; 2804 : z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max - 1) / v_max; -; 2805 : // to simplify generation, we'll allocate enough memory to decode -; 2806 : // the bogus oversized data from using interleaved MCUs and their -; 2807 : // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't -; 2808 : // discard the extra data until colorspace conversion -; 2809 : // -; 2810 : // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) -; 2811 : // so these muls can't overflow with 32-bit ints (which we require) -; 2812 : z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; -; 2813 : z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; -; 2814 : z->img_comp[i].coeff = 0; -; 2815 : z->img_comp[i].raw_coeff = 0; -; 2816 : z->img_comp[i].linebuf = NULL; -; 2817 : z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); -; 2818 : if (z->img_comp[i].raw_data == NULL) -; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2820 : // align blocks for idct using mmx/sse -; 2821 : z->img_comp[i].data = (stbi_uc*)(((size_t)z->img_comp[i].raw_data + 15) & ~15); -; 2822 : if (z->progressive) { -; 2823 : // w2, h2 are multiples of 8 (see above) -; 2824 : z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; -; 2825 : z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; -; 2826 : z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); -; 2827 : if (z->img_comp[i].raw_coeff == NULL) -; 2828 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2829 : z->img_comp[i].coeff = (short*)(((size_t)z->img_comp[i].raw_coeff + 15) & ~15); -; 2830 : } -; 2831 : } -; 2832 : -; 2833 : return 1; -; 2834 : } -; 2835 : -; 2836 : // use comparisons since in some cases we handle more than one case (e.g. SOF) -; 2837 : #define stbi__DNL(x) ((x) == 0xdc) -; 2838 : #define stbi__SOI(x) ((x) == 0xd8) -; 2839 : #define stbi__EOI(x) ((x) == 0xd9) -; 2840 : #define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) -; 2841 : #define stbi__SOS(x) ((x) == 0xda) -; 2842 : -; 2843 : #define stbi__SOF_progressive(x) ((x) == 0xc2) -; 2844 : -; 2845 : static int stbi__decode_jpeg_header(stbi__jpeg* z, int scan) -; 2846 : { -; 2847 : int m; -; 2848 : z->jfif = 0; -; 2849 : z->app14_color_transform = -1; // valid values are 0,1,2 -; 2850 : z->marker = STBI__MARKER_none; // initialize cached marker to empty -; 2851 : m = stbi__get_marker(z); -; 2852 : if (!stbi__SOI(m)) return stbi__err("no SOI", "Corrupt JPEG"); -; 2853 : if (scan == STBI__SCAN_type) return 1; -; 2854 : m = stbi__get_marker(z); -; 2855 : while (!stbi__SOF(m)) { -; 2856 : if (!stbi__process_marker(z, m)) return 0; -; 2857 : m = stbi__get_marker(z); -; 2858 : while (m == STBI__MARKER_none) { -; 2859 : // some files have extra padding after their blocks, so ok, we'll scan -; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); -; 2861 : m = stbi__get_marker(z); -; 2862 : } -; 2863 : } -; 2864 : z->progressive = stbi__SOF_progressive(m); -; 2865 : if (!stbi__process_frame_header(z, scan)) return 0; -; 2866 : return 1; -; 2867 : } -; 2868 : -; 2869 : static int stbi__skip_jpeg_junk_at_end(stbi__jpeg* j) -; 2870 : { -; 2871 : // some JPEGs have junk at end, skip over it but if we find what looks -; 2872 : // like a valid marker, resume there -; 2873 : while (!stbi__at_eof(j->s)) { -; 2874 : int x = stbi__get8(j->s); -; 2875 : while (x == 255) { // might be a marker -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; -; 2877 : x = stbi__get8(j->s); -; 2878 : if (x != 0x00 && x != 0xff) { -; 2879 : // not a stuffed zero or lead-in to another marker, looks -; 2880 : // like an actual marker, return it -; 2881 : return x; -; 2882 : } -; 2883 : // stuffed zero has x=0 now which ends the loop, meaning we go -; 2884 : // back to regular scan loop. -; 2885 : // repeated 0xff keeps trying to read the next byte of the marker. -; 2886 : } -; 2887 : } -; 2888 : return STBI__MARKER_none; -; 2889 : } -; 2890 : -; 2891 : // decode image to YCbCr format -; 2892 : static int stbi__decode_jpeg_image(stbi__jpeg* j) -; 2893 : { -; 2894 : int m; -; 2895 : for (m = 0; m < 4; m++) { -; 2896 : j->img_comp[m].raw_data = NULL; -; 2897 : j->img_comp[m].raw_coeff = NULL; -; 2898 : } -; 2899 : j->restart_interval = 0; -; 2900 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; -; 2901 : m = stbi__get_marker(j); -; 2902 : while (!stbi__EOI(m)) { -; 2903 : if (stbi__SOS(m)) { -; 2904 : if (!stbi__process_scan_header(j)) return 0; -; 2905 : if (!stbi__parse_entropy_coded_data(j)) return 0; -; 2906 : if (j->marker == STBI__MARKER_none) { -; 2907 : j->marker = stbi__skip_jpeg_junk_at_end(j); -; 2908 : // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 -; 2909 : } -; 2910 : m = stbi__get_marker(j); -; 2911 : if (STBI__RESTART(m)) -; 2912 : m = stbi__get_marker(j); -; 2913 : } -; 2914 : else if (stbi__DNL(m)) { -; 2915 : int Ld = stbi__get16be(j->s); -; 2916 : stbi__uint32 NL = stbi__get16be(j->s); -; 2917 : if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); -; 2918 : if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); -; 2919 : m = stbi__get_marker(j); -; 2920 : } -; 2921 : else { -; 2922 : if (!stbi__process_marker(j, m)) return 1; -; 2923 : m = stbi__get_marker(j); -; 2924 : } -; 2925 : } -; 2926 : if (j->progressive) -; 2927 : stbi__jpeg_finish(j); -; 2928 : return 1; -; 2929 : } -; 2930 : -; 2931 : // static jfif-centered resampling (across block boundaries) -; 2932 : -; 2933 : typedef stbi_uc* (*resample_row_func)(stbi_uc* out, stbi_uc* in0, stbi_uc* in1, -; 2934 : int w, int hs); -; 2935 : -; 2936 : #define stbi__div4(x) ((stbi_uc) ((x) >> 2)) -; 2937 : -; 2938 : static stbi_uc* resample_row_1(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2939 : { -; 2940 : STBI_NOTUSED(out); -; 2941 : STBI_NOTUSED(in_far); -; 2942 : STBI_NOTUSED(w); -; 2943 : STBI_NOTUSED(hs); -; 2944 : return in_near; -; 2945 : } -; 2946 : -; 2947 : static stbi_uc* stbi__resample_row_v_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2948 : { -; 2949 : // need to generate two samples vertically for every one in input -; 2950 : int i; -; 2951 : STBI_NOTUSED(hs); -; 2952 : for (i = 0; i < w; ++i) -; 2953 : out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2); -; 2954 : return out; -; 2955 : } -; 2956 : -; 2957 : static stbi_uc* stbi__resample_row_h_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2958 : { -; 2959 : // need to generate two samples horizontally for every one in input -; 2960 : int i; -; 2961 : stbi_uc* input = in_near; -; 2962 : -; 2963 : if (w == 1) { -; 2964 : // if only one sample, can't do any interpolation -; 2965 : out[0] = out[1] = input[0]; -; 2966 : return out; -; 2967 : } -; 2968 : -; 2969 : out[0] = input[0]; -; 2970 : out[1] = stbi__div4(input[0] * 3 + input[1] + 2); -; 2971 : for (i = 1; i < w - 1; ++i) { -; 2972 : int n = 3 * input[i] + 2; -; 2973 : out[i * 2 + 0] = stbi__div4(n + input[i - 1]); -; 2974 : out[i * 2 + 1] = stbi__div4(n + input[i + 1]); -; 2975 : } -; 2976 : out[i * 2 + 0] = stbi__div4(input[w - 2] * 3 + input[w - 1] + 2); -; 2977 : out[i * 2 + 1] = input[w - 1]; -; 2978 : -; 2979 : STBI_NOTUSED(in_far); -; 2980 : STBI_NOTUSED(hs); -; 2981 : -; 2982 : return out; -; 2983 : } -; 2984 : -; 2985 : #define stbi__div16(x) ((stbi_uc) ((x) >> 4)) -; 2986 : -; 2987 : static stbi_uc* stbi__resample_row_hv_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2988 : { -; 2989 : // need to generate 2x2 samples for every one in input -; 2990 : int i, t0, t1; -; 2991 : if (w == 1) { -; 2992 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 2993 : return out; -; 2994 : } -; 2995 : -; 2996 : t1 = 3 * in_near[0] + in_far[0]; -; 2997 : out[0] = stbi__div4(t1 + 2); -; 2998 : for (i = 1; i < w; ++i) { -; 2999 : t0 = t1; -; 3000 : t1 = 3 * in_near[i] + in_far[i]; -; 3001 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3002 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3003 : } -; 3004 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3005 : -; 3006 : STBI_NOTUSED(hs); -; 3007 : -; 3008 : return out; -; 3009 : } -; 3010 : -; 3011 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3012 : static stbi_uc* stbi__resample_row_hv_2_simd(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3013 : { -; 3014 : // need to generate 2x2 samples for every one in input -; 3015 : int i = 0, t0, t1; -; 3016 : -; 3017 : if (w == 1) { -; 3018 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 3019 : return out; -; 3020 : } -; 3021 : -; 3022 : t1 = 3 * in_near[0] + in_far[0]; -; 3023 : // process groups of 8 pixels for as long as we can. -; 3024 : // note we can't handle the last pixel in a row in this loop -; 3025 : // because we need to handle the filter boundary conditions. -; 3026 : for (; i < ((w - 1) & ~7); i += 8) { -; 3027 : #if defined(STBI_SSE2) -; 3028 : // load and perform the vertical filtering pass -; 3029 : // this uses 3*x + y = 4*x + (y - x) -; 3030 : __m128i zero = _mm_setzero_si128(); -; 3031 : __m128i farb = _mm_loadl_epi64((__m128i*) (in_far + i)); -; 3032 : __m128i nearb = _mm_loadl_epi64((__m128i*) (in_near + i)); -; 3033 : __m128i farw = _mm_unpacklo_epi8(farb, zero); -; 3034 : __m128i nearw = _mm_unpacklo_epi8(nearb, zero); -; 3035 : __m128i diff = _mm_sub_epi16(farw, nearw); -; 3036 : __m128i nears = _mm_slli_epi16(nearw, 2); -; 3037 : __m128i curr = _mm_add_epi16(nears, diff); // current row -; 3038 : -; 3039 : // horizontal filter works the same based on shifted vers of current -; 3040 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3041 : // insert the previous pixel value (from t1). -; 3042 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3043 : // of next block of 8 pixels added in. -; 3044 : __m128i prv0 = _mm_slli_si128(curr, 2); -; 3045 : __m128i nxt0 = _mm_srli_si128(curr, 2); -; 3046 : __m128i prev = _mm_insert_epi16(prv0, t1, 0); -; 3047 : __m128i next = _mm_insert_epi16(nxt0, 3 * in_near[i + 8] + in_far[i + 8], 7); -; 3048 : -; 3049 : // horizontal filter, polyphase implementation since it's convenient: -; 3050 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3051 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3052 : // note the shared term. -; 3053 : __m128i bias = _mm_set1_epi16(8); -; 3054 : __m128i curs = _mm_slli_epi16(curr, 2); -; 3055 : __m128i prvd = _mm_sub_epi16(prev, curr); -; 3056 : __m128i nxtd = _mm_sub_epi16(next, curr); -; 3057 : __m128i curb = _mm_add_epi16(curs, bias); -; 3058 : __m128i even = _mm_add_epi16(prvd, curb); -; 3059 : __m128i odd = _mm_add_epi16(nxtd, curb); -; 3060 : -; 3061 : // interleave even and odd pixels, then undo scaling. -; 3062 : __m128i int0 = _mm_unpacklo_epi16(even, odd); -; 3063 : __m128i int1 = _mm_unpackhi_epi16(even, odd); -; 3064 : __m128i de0 = _mm_srli_epi16(int0, 4); -; 3065 : __m128i de1 = _mm_srli_epi16(int1, 4); -; 3066 : -; 3067 : // pack and write output -; 3068 : __m128i outv = _mm_packus_epi16(de0, de1); -; 3069 : _mm_storeu_si128((__m128i*) (out + i * 2), outv); -; 3070 : #elif defined(STBI_NEON) -; 3071 : // load and perform the vertical filtering pass -; 3072 : // this uses 3*x + y = 4*x + (y - x) -; 3073 : uint8x8_t farb = vld1_u8(in_far + i); -; 3074 : uint8x8_t nearb = vld1_u8(in_near + i); -; 3075 : int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); -; 3076 : int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); -; 3077 : int16x8_t curr = vaddq_s16(nears, diff); // current row -; 3078 : -; 3079 : // horizontal filter works the same based on shifted vers of current -; 3080 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3081 : // insert the previous pixel value (from t1). -; 3082 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3083 : // of next block of 8 pixels added in. -; 3084 : int16x8_t prv0 = vextq_s16(curr, curr, 7); -; 3085 : int16x8_t nxt0 = vextq_s16(curr, curr, 1); -; 3086 : int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); -; 3087 : int16x8_t next = vsetq_lane_s16(3 * in_near[i + 8] + in_far[i + 8], nxt0, 7); -; 3088 : -; 3089 : // horizontal filter, polyphase implementation since it's convenient: -; 3090 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3091 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3092 : // note the shared term. -; 3093 : int16x8_t curs = vshlq_n_s16(curr, 2); -; 3094 : int16x8_t prvd = vsubq_s16(prev, curr); -; 3095 : int16x8_t nxtd = vsubq_s16(next, curr); -; 3096 : int16x8_t even = vaddq_s16(curs, prvd); -; 3097 : int16x8_t odd = vaddq_s16(curs, nxtd); -; 3098 : -; 3099 : // undo scaling and round, then store with even/odd phases interleaved -; 3100 : uint8x8x2_t o; -; 3101 : o.val[0] = vqrshrun_n_s16(even, 4); -; 3102 : o.val[1] = vqrshrun_n_s16(odd, 4); -; 3103 : vst2_u8(out + i * 2, o); -; 3104 : #endif -; 3105 : -; 3106 : // "previous" value for next iter -; 3107 : t1 = 3 * in_near[i + 7] + in_far[i + 7]; -; 3108 : } -; 3109 : -; 3110 : t0 = t1; -; 3111 : t1 = 3 * in_near[i] + in_far[i]; -; 3112 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3113 : -; 3114 : for (++i; i < w; ++i) { -; 3115 : t0 = t1; -; 3116 : t1 = 3 * in_near[i] + in_far[i]; -; 3117 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3118 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3119 : } -; 3120 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3121 : -; 3122 : STBI_NOTUSED(hs); -; 3123 : -; 3124 : return out; -; 3125 : } -; 3126 : #endif -; 3127 : -; 3128 : static stbi_uc* stbi__resample_row_generic(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3129 : { -; 3130 : // resample with nearest-neighbor -; 3131 : int i, j; -; 3132 : STBI_NOTUSED(in_far); -; 3133 : for (i = 0; i < w; ++i) -; 3134 : for (j = 0; j < hs; ++j) -; 3135 : out[i * hs + j] = in_near[i]; -; 3136 : return out; -; 3137 : } -; 3138 : -; 3139 : // this is a reduced-precision calculation of YCbCr-to-RGB introduced -; 3140 : // to make sure the code produces the same results in both SIMD and scalar -; 3141 : #define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) -; 3142 : static void stbi__YCbCr_to_RGB_row(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step) -; 3143 : { -; 3144 : int i; -; 3145 : for (i = 0; i < count; ++i) { -; 3146 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3147 : int r, g, b; -; 3148 : int cr = pcr[i] - 128; -; 3149 : int cb = pcb[i] - 128; -; 3150 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3151 : g = y_fixed + (cr * -stbi__float2fixed(0.71414f)) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3152 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3153 : r >>= 20; -; 3154 : g >>= 20; -; 3155 : b >>= 20; -; 3156 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3157 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3158 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3159 : out[0] = (stbi_uc)r; -; 3160 : out[1] = (stbi_uc)g; -; 3161 : out[2] = (stbi_uc)b; -; 3162 : out[3] = 255; -; 3163 : out += step; -; 3164 : } -; 3165 : } -; 3166 : -; 3167 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3168 : static void stbi__YCbCr_to_RGB_simd(stbi_uc* out, stbi_uc const* y, stbi_uc const* pcb, stbi_uc const* pcr, int count, int step) -; 3169 : { -; 3170 : int i = 0; -; 3171 : -; 3172 : #ifdef STBI_SSE2 -; 3173 : // step == 3 is pretty ugly on the final interleave, and i'm not convinced -; 3174 : // it's useful in practice (you wouldn't use it for textures, for example). -; 3175 : // so just accelerate step == 4 case. -; 3176 : if (step == 4) { -; 3177 : // this is a fairly straightforward implementation and not super-optimized. -; 3178 : __m128i signflip = _mm_set1_epi8(-0x80); -; 3179 : __m128i cr_const0 = _mm_set1_epi16((short)(1.40200f * 4096.0f + 0.5f)); -; 3180 : __m128i cr_const1 = _mm_set1_epi16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3181 : __m128i cb_const0 = _mm_set1_epi16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3182 : __m128i cb_const1 = _mm_set1_epi16((short)(1.77200f * 4096.0f + 0.5f)); -; 3183 : __m128i y_bias = _mm_set1_epi8((char)(unsigned char)128); -; 3184 : __m128i xw = _mm_set1_epi16(255); // alpha channel -; 3185 : -; 3186 : for (; i + 7 < count; i += 8) { -; 3187 : // load -; 3188 : __m128i y_bytes = _mm_loadl_epi64((__m128i*) (y + i)); -; 3189 : __m128i cr_bytes = _mm_loadl_epi64((__m128i*) (pcr + i)); -; 3190 : __m128i cb_bytes = _mm_loadl_epi64((__m128i*) (pcb + i)); -; 3191 : __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 -; 3192 : __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 -; 3193 : -; 3194 : // unpack to short (and left-shift cr, cb by 8) -; 3195 : __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); -; 3196 : __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); -; 3197 : __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); -; 3198 : -; 3199 : // color transform -; 3200 : __m128i yws = _mm_srli_epi16(yw, 4); -; 3201 : __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); -; 3202 : __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); -; 3203 : __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); -; 3204 : __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); -; 3205 : __m128i rws = _mm_add_epi16(cr0, yws); -; 3206 : __m128i gwt = _mm_add_epi16(cb0, yws); -; 3207 : __m128i bws = _mm_add_epi16(yws, cb1); -; 3208 : __m128i gws = _mm_add_epi16(gwt, cr1); -; 3209 : -; 3210 : // descale -; 3211 : __m128i rw = _mm_srai_epi16(rws, 4); -; 3212 : __m128i bw = _mm_srai_epi16(bws, 4); -; 3213 : __m128i gw = _mm_srai_epi16(gws, 4); -; 3214 : -; 3215 : // back to byte, set up for transpose -; 3216 : __m128i brb = _mm_packus_epi16(rw, bw); -; 3217 : __m128i gxb = _mm_packus_epi16(gw, xw); -; 3218 : -; 3219 : // transpose to interleave channels -; 3220 : __m128i t0 = _mm_unpacklo_epi8(brb, gxb); -; 3221 : __m128i t1 = _mm_unpackhi_epi8(brb, gxb); -; 3222 : __m128i o0 = _mm_unpacklo_epi16(t0, t1); -; 3223 : __m128i o1 = _mm_unpackhi_epi16(t0, t1); -; 3224 : -; 3225 : // store -; 3226 : _mm_storeu_si128((__m128i*) (out + 0), o0); -; 3227 : _mm_storeu_si128((__m128i*) (out + 16), o1); -; 3228 : out += 32; -; 3229 : } -; 3230 : } -; 3231 : #endif -; 3232 : -; 3233 : #ifdef STBI_NEON -; 3234 : // in this version, step=3 support would be easy to add. but is there demand? -; 3235 : if (step == 4) { -; 3236 : // this is a fairly straightforward implementation and not super-optimized. -; 3237 : uint8x8_t signflip = vdup_n_u8(0x80); -; 3238 : int16x8_t cr_const0 = vdupq_n_s16((short)(1.40200f * 4096.0f + 0.5f)); -; 3239 : int16x8_t cr_const1 = vdupq_n_s16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3240 : int16x8_t cb_const0 = vdupq_n_s16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3241 : int16x8_t cb_const1 = vdupq_n_s16((short)(1.77200f * 4096.0f + 0.5f)); -; 3242 : -; 3243 : for (; i + 7 < count; i += 8) { -; 3244 : // load -; 3245 : uint8x8_t y_bytes = vld1_u8(y + i); -; 3246 : uint8x8_t cr_bytes = vld1_u8(pcr + i); -; 3247 : uint8x8_t cb_bytes = vld1_u8(pcb + i); -; 3248 : int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); -; 3249 : int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); -; 3250 : -; 3251 : // expand to s16 -; 3252 : int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); -; 3253 : int16x8_t crw = vshll_n_s8(cr_biased, 7); -; 3254 : int16x8_t cbw = vshll_n_s8(cb_biased, 7); -; 3255 : -; 3256 : // color transform -; 3257 : int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); -; 3258 : int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); -; 3259 : int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); -; 3260 : int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); -; 3261 : int16x8_t rws = vaddq_s16(yws, cr0); -; 3262 : int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); -; 3263 : int16x8_t bws = vaddq_s16(yws, cb1); -; 3264 : -; 3265 : // undo scaling, round, convert to byte -; 3266 : uint8x8x4_t o; -; 3267 : o.val[0] = vqrshrun_n_s16(rws, 4); -; 3268 : o.val[1] = vqrshrun_n_s16(gws, 4); -; 3269 : o.val[2] = vqrshrun_n_s16(bws, 4); -; 3270 : o.val[3] = vdup_n_u8(255); -; 3271 : -; 3272 : // store, interleaving r/g/b/a -; 3273 : vst4_u8(out, o); -; 3274 : out += 8 * 4; -; 3275 : } -; 3276 : } -; 3277 : #endif -; 3278 : -; 3279 : for (; i < count; ++i) { -; 3280 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3281 : int r, g, b; -; 3282 : int cr = pcr[i] - 128; -; 3283 : int cb = pcb[i] - 128; -; 3284 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3285 : g = y_fixed + cr * -stbi__float2fixed(0.71414f) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3286 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3287 : r >>= 20; -; 3288 : g >>= 20; -; 3289 : b >>= 20; -; 3290 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3291 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3292 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3293 : out[0] = (stbi_uc)r; -; 3294 : out[1] = (stbi_uc)g; -; 3295 : out[2] = (stbi_uc)b; -; 3296 : out[3] = 255; -; 3297 : out += step; -; 3298 : } -; 3299 : } -; 3300 : #endif -; 3301 : -; 3302 : // set up the kernels -; 3303 : static void stbi__setup_jpeg(stbi__jpeg* j) -; 3304 : { -; 3305 : j->idct_block_kernel = stbi__idct_block; -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; -; 3308 : -; 3309 : #ifdef STBI_SSE2 -; 3310 : if (stbi__sse2_available()) { -; 3311 : j->idct_block_kernel = stbi__idct_simd; -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3314 : } -; 3315 : #endif -; 3316 : -; 3317 : #ifdef STBI_NEON -; 3318 : j->idct_block_kernel = stbi__idct_simd; -; 3319 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3320 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3321 : #endif -; 3322 : } -; 3323 : -; 3324 : // clean up the temporary component buffers -; 3325 : static void stbi__cleanup_jpeg(stbi__jpeg* j) -; 3326 : { -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); -; 3328 : } -; 3329 : -; 3330 : typedef struct -; 3331 : { -; 3332 : resample_row_func resample; -; 3333 : stbi_uc* line0, * line1; -; 3334 : int hs, vs; // expansion factor in each axis -; 3335 : int w_lores; // horizontal pixels pre-expansion -; 3336 : int ystep; // how far through vertical expansion we are -; 3337 : int ypos; // which pre-expansion row we're on -; 3338 : } stbi__resample; -; 3339 : -; 3340 : // fast 0..255 * 0..255 => 0..255 rounded multiplication -; 3341 : static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) -; 3342 : { -; 3343 : unsigned int t = x * y + 128; -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); -; 3345 : } -; 3346 : -; 3347 : static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp, int req_comp) -; 3348 : { -; 3349 : int n, decode_n, is_rgb; -; 3350 : z->s->img_n = 0; // make stbi__cleanup_jpeg safe -; 3351 : -; 3352 : // validate req_comp -; 3353 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 3354 : -; 3355 : // load a jpeg image from whichever source, but leave in YCbCr format -; 3356 : if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } -; 3357 : -; 3358 : // determine actual number of components to generate -; 3359 : n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; -; 3360 : -; 3361 : is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); -; 3362 : -; 3363 : if (z->s->img_n == 3 && n < 3 && !is_rgb) -; 3364 : decode_n = 1; -; 3365 : else -; 3366 : decode_n = z->s->img_n; -; 3367 : -; 3368 : // nothing to do if no components requested; check this now to avoid -; 3369 : // accessing uninitialized coutput[0] later -; 3370 : if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } -; 3371 : -; 3372 : // resample and color-convert -; 3373 : { -; 3374 : int k; -; 3375 : unsigned int i, j; -; 3376 : stbi_uc* output; -; 3377 : stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL }; -; 3378 : -; 3379 : stbi__resample res_comp[4]; -; 3380 : -; 3381 : for (k = 0; k < decode_n; ++k) { -; 3382 : stbi__resample* r = &res_comp[k]; -; 3383 : -; 3384 : // allocate line buffer big enough for upsampling off the edges -; 3385 : // with upsample factor of 4 -; 3386 : z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3); -; 3387 : if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3388 : -; 3389 : r->hs = z->img_h_max / z->img_comp[k].h; -; 3390 : r->vs = z->img_v_max / z->img_comp[k].v; -; 3391 : r->ystep = r->vs >> 1; -; 3392 : r->w_lores = (z->s->img_x + r->hs - 1) / r->hs; -; 3393 : r->ypos = 0; -; 3394 : r->line0 = r->line1 = z->img_comp[k].data; -; 3395 : -; 3396 : if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; -; 3397 : else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; -; 3398 : else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; -; 3399 : else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; -; 3400 : else r->resample = stbi__resample_row_generic; -; 3401 : } -; 3402 : -; 3403 : // can't error after this so, this is safe -; 3404 : output = (stbi_uc*)stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); -; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3406 : -; 3407 : // now go ahead and resample -; 3408 : for (j = 0; j < z->s->img_y; ++j) { -; 3409 : stbi_uc* out = output + n * z->s->img_x * j; -; 3410 : for (k = 0; k < decode_n; ++k) { -; 3411 : stbi__resample* r = &res_comp[k]; -; 3412 : int y_bot = r->ystep >= (r->vs >> 1); -; 3413 : coutput[k] = r->resample(z->img_comp[k].linebuf, -; 3414 : y_bot ? r->line1 : r->line0, -; 3415 : y_bot ? r->line0 : r->line1, -; 3416 : r->w_lores, r->hs); -; 3417 : if (++r->ystep >= r->vs) { -; 3418 : r->ystep = 0; -; 3419 : r->line0 = r->line1; -; 3420 : if (++r->ypos < z->img_comp[k].y) -; 3421 : r->line1 += z->img_comp[k].w2; -; 3422 : } -; 3423 : } -; 3424 : if (n >= 3) { -; 3425 : stbi_uc* y = coutput[0]; -; 3426 : if (z->s->img_n == 3) { -; 3427 : if (is_rgb) { -; 3428 : for (i = 0; i < z->s->img_x; ++i) { -; 3429 : out[0] = y[i]; -; 3430 : out[1] = coutput[1][i]; -; 3431 : out[2] = coutput[2][i]; -; 3432 : out[3] = 255; -; 3433 : out += n; -; 3434 : } -; 3435 : } -; 3436 : else { -; 3437 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3438 : } -; 3439 : } -; 3440 : else if (z->s->img_n == 4) { -; 3441 : if (z->app14_color_transform == 0) { // CMYK -; 3442 : for (i = 0; i < z->s->img_x; ++i) { -; 3443 : stbi_uc m = coutput[3][i]; -; 3444 : out[0] = stbi__blinn_8x8(coutput[0][i], m); -; 3445 : out[1] = stbi__blinn_8x8(coutput[1][i], m); -; 3446 : out[2] = stbi__blinn_8x8(coutput[2][i], m); -; 3447 : out[3] = 255; -; 3448 : out += n; -; 3449 : } -; 3450 : } -; 3451 : else if (z->app14_color_transform == 2) { // YCCK -; 3452 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3453 : for (i = 0; i < z->s->img_x; ++i) { -; 3454 : stbi_uc m = coutput[3][i]; -; 3455 : out[0] = stbi__blinn_8x8(255 - out[0], m); -; 3456 : out[1] = stbi__blinn_8x8(255 - out[1], m); -; 3457 : out[2] = stbi__blinn_8x8(255 - out[2], m); -; 3458 : out += n; -; 3459 : } -; 3460 : } -; 3461 : else { // YCbCr + alpha? Ignore the fourth channel for now -; 3462 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3463 : } -; 3464 : } -; 3465 : else -; 3466 : for (i = 0; i < z->s->img_x; ++i) { -; 3467 : out[0] = out[1] = out[2] = y[i]; -; 3468 : out[3] = 255; // not used if n==3 -; 3469 : out += n; -; 3470 : } -; 3471 : } -; 3472 : else { -; 3473 : if (is_rgb) { -; 3474 : if (n == 1) -; 3475 : for (i = 0; i < z->s->img_x; ++i) -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3477 : else { -; 3478 : for (i = 0; i < z->s->img_x; ++i, out += 2) { -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3480 : out[1] = 255; -; 3481 : } -; 3482 : } -; 3483 : } -; 3484 : else if (z->s->img_n == 4 && z->app14_color_transform == 0) { -; 3485 : for (i = 0; i < z->s->img_x; ++i) { -; 3486 : stbi_uc m = coutput[3][i]; -; 3487 : stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); -; 3488 : stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); -; 3489 : stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); -; 3490 : out[0] = stbi__compute_y(r, g, b); -; 3491 : out[1] = 255; -; 3492 : out += n; -; 3493 : } -; 3494 : } -; 3495 : else if (z->s->img_n == 4 && z->app14_color_transform == 2) { -; 3496 : for (i = 0; i < z->s->img_x; ++i) { -; 3497 : out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); -; 3498 : out[1] = 255; -; 3499 : out += n; -; 3500 : } -; 3501 : } -; 3502 : else { -; 3503 : stbi_uc* y = coutput[0]; -; 3504 : if (n == 1) -; 3505 : for (i = 0; i < z->s->img_x; ++i) out[i] = y[i]; -; 3506 : else -; 3507 : for (i = 0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } -; 3508 : } -; 3509 : } -; 3510 : } -; 3511 : stbi__cleanup_jpeg(z); -; 3512 : *out_x = z->s->img_x; -; 3513 : *out_y = z->s->img_y; -; 3514 : if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output -; 3515 : return output; -; 3516 : } -; 3517 : } -; 3518 : -; 3519 : static void* stbi__jpeg_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 3520 : { -; 3521 : unsigned char* result; -; 3522 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); -; 3524 : memset(j, 0, sizeof(stbi__jpeg)); -; 3525 : STBI_NOTUSED(ri); -; 3526 : j->s = s; -; 3527 : stbi__setup_jpeg(j); -; 3528 : result = load_jpeg_image(j, x, y, comp, req_comp); -; 3529 : STBI_FREE(j); -; 3530 : return result; -; 3531 : } -; 3532 : -; 3533 : static int stbi__jpeg_test(stbi__context* s) -; 3534 : { -; 3535 : int r; -; 3536 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3538 : memset(j, 0, sizeof(stbi__jpeg)); -; 3539 : j->s = s; -; 3540 : stbi__setup_jpeg(j); -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); -; 3542 : stbi__rewind(s); -; 3543 : STBI_FREE(j); -; 3544 : return r; -; 3545 : } -; 3546 : -; 3547 : static int stbi__jpeg_info_raw(stbi__jpeg* j, int* x, int* y, int* comp) -; 3548 : { -; 3549 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { -; 3550 : stbi__rewind(j->s); -; 3551 : return 0; -; 3552 : } -; 3553 : if (x) *x = j->s->img_x; -; 3554 : if (y) *y = j->s->img_y; -; 3555 : if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; -; 3556 : return 1; -; 3557 : } -; 3558 : -; 3559 : static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp) -; 3560 : { -; 3561 : int result; -; 3562 : stbi__jpeg* j = (stbi__jpeg*)(stbi__malloc(sizeof(stbi__jpeg))); -; 3563 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3564 : memset(j, 0, sizeof(stbi__jpeg)); -; 3565 : j->s = s; -; 3566 : result = stbi__jpeg_info_raw(j, x, y, comp); -; 3567 : STBI_FREE(j); -; 3568 : return result; -; 3569 : } -; 3570 : #endif -; 3571 : -; 3572 : // public domain zlib decode v0.2 Sean Barrett 2006-11-18 -; 3573 : // simple implementation -; 3574 : // - all input must be provided in an upfront buffer -; 3575 : // - all output is written to a single output buffer (can malloc/realloc) -; 3576 : // performance -; 3577 : // - fast huffman -; 3578 : -; 3579 : #ifndef STBI_NO_ZLIB -; 3580 : -; 3581 : // fast-way is faster to check than jpeg huffman, but slow way is slower -; 3582 : #define STBI__ZFAST_BITS 9 // accelerate all cases in default tables -; 3583 : #define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) -; 3584 : #define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet -; 3585 : -; 3586 : // zlib-style huffman encoding -; 3587 : // (jpegs packs from left, zlib from right, so can't share code) -; 3588 : typedef struct -; 3589 : { -; 3590 : stbi__uint16 fast[1 << STBI__ZFAST_BITS]; -; 3591 : stbi__uint16 firstcode[16]; -; 3592 : int maxcode[17]; -; 3593 : stbi__uint16 firstsymbol[16]; -; 3594 : stbi_uc size[STBI__ZNSYMS]; -; 3595 : stbi__uint16 value[STBI__ZNSYMS]; -; 3596 : } stbi__zhuffman; -; 3597 : -; 3598 : stbi_inline static int stbi__bitreverse16(int n) -; 3599 : { -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); -; 3604 : return n; -; 3605 : } -; 3606 : -; 3607 : stbi_inline static int stbi__bit_reverse(int v, int bits) -; 3608 : { -; 3609 : STBI_ASSERT(bits <= 16); -; 3610 : // to bit reverse n bits, reverse 16 and shift -; 3611 : // e.g. 11 bits, bit reverse and shift away 5 -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); -; 3613 : } -; 3614 : -; 3615 : static int stbi__zbuild_huffman(stbi__zhuffman* z, const stbi_uc* sizelist, int num) -; 3616 : { -; 3617 : int i, k = 0; -; 3618 : int code, next_code[16], sizes[17]; -; 3619 : -; 3620 : // DEFLATE spec for generating codes -; 3621 : memset(sizes, 0, sizeof(sizes)); -; 3622 : memset(z->fast, 0, sizeof(z->fast)); -; 3623 : for (i = 0; i < num; ++i) -; 3624 : ++sizes[sizelist[i]]; -; 3625 : sizes[0] = 0; -; 3626 : for (i = 1; i < 16; ++i) -; 3627 : if (sizes[i] > (1 << i)) -; 3628 : return stbi__err("bad sizes", "Corrupt PNG"); -; 3629 : code = 0; -; 3630 : for (i = 1; i < 16; ++i) { -; 3631 : next_code[i] = code; -; 3632 : z->firstcode[i] = (stbi__uint16)code; -; 3633 : z->firstsymbol[i] = (stbi__uint16)k; -; 3634 : code = (code + sizes[i]); -; 3635 : if (sizes[i]) -; 3636 : if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3637 : z->maxcode[i] = code << (16 - i); // preshift for inner loop -; 3638 : code <<= 1; -; 3639 : k += sizes[i]; -; 3640 : } -; 3641 : z->maxcode[16] = 0x10000; // sentinel -; 3642 : for (i = 0; i < num; ++i) { -; 3643 : int s = sizelist[i]; -; 3644 : if (s) { -; 3645 : int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; -; 3646 : stbi__uint16 fastv = (stbi__uint16)((s << 9) | i); -; 3647 : z->size[c] = (stbi_uc)s; -; 3648 : z->value[c] = (stbi__uint16)i; -; 3649 : if (s <= STBI__ZFAST_BITS) { -; 3650 : int j = stbi__bit_reverse(next_code[s], s); -; 3651 : while (j < (1 << STBI__ZFAST_BITS)) { -; 3652 : z->fast[j] = fastv; -; 3653 : j += (1 << s); -; 3654 : } -; 3655 : } -; 3656 : ++next_code[s]; -; 3657 : } -; 3658 : } -; 3659 : return 1; -; 3660 : } -; 3661 : -; 3662 : // zlib-from-memory implementation for PNG reading -; 3663 : // because PNG allows splitting the zlib stream arbitrarily, -; 3664 : // and it's annoying structurally to have PNG call ZLIB call PNG, -; 3665 : // we require PNG read all the IDATs and combine them into a single -; 3666 : // memory buffer -; 3667 : -; 3668 : typedef struct -; 3669 : { -; 3670 : stbi_uc* zbuffer, * zbuffer_end; -; 3671 : int num_bits; -; 3672 : stbi__uint32 code_buffer; -; 3673 : -; 3674 : char* zout; -; 3675 : char* zout_start; -; 3676 : char* zout_end; -; 3677 : int z_expandable; -; 3678 : -; 3679 : stbi__zhuffman z_length, z_distance; -; 3680 : } stbi__zbuf; -; 3681 : -; 3682 : stbi_inline static int stbi__zeof(stbi__zbuf* z) -; 3683 : { -; 3684 : return (z->zbuffer >= z->zbuffer_end); -; 3685 : } -; 3686 : -; 3687 : stbi_inline static stbi_uc stbi__zget8(stbi__zbuf* z) -; 3688 : { -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ -; 3697 : return; -; 3698 : } -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; -; 3700 : z->num_bits += 8; -; 3701 : } while (z->num_bits <= 24); -; 3702 : } -; 3703 : -; 3704 : stbi_inline static unsigned int stbi__zreceive(stbi__zbuf* z, int n) -; 3705 : { -; 3706 : unsigned int k; -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); -; 3708 : k = z->code_buffer & ((1 << n) - 1); -; 3709 : z->code_buffer >>= n; -; 3710 : z->num_bits -= n; -; 3711 : return k; -; 3712 : } -; 3713 : -; 3714 : static int stbi__zhuffman_decode_slowpath(stbi__zbuf* a, stbi__zhuffman* z) -; 3715 : { -; 3716 : int b, s, k; -; 3717 : // not resolved by fast table, so compute it the slow way -; 3718 : // use jpeg approach, which requires MSbits at top -; 3719 : k = stbi__bit_reverse(a->code_buffer, 16); -; 3720 : for (s = STBI__ZFAST_BITS + 1; ; ++s) -; 3721 : if (k < z->maxcode[s]) -; 3722 : break; -; 3723 : if (s >= 16) return -1; // invalid code! -; 3724 : // code size is s, so: -; 3725 : b = (k >> (16 - s)) - z->firstcode[s] + z->firstsymbol[s]; -; 3726 : if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! -; 3727 : if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. -; 3728 : a->code_buffer >>= s; -; 3729 : a->num_bits -= s; -; 3730 : return z->value[b]; -; 3731 : } -; 3732 : -; 3733 : stbi_inline static int stbi__zhuffman_decode(stbi__zbuf* a, stbi__zhuffman* z) -; 3734 : { -; 3735 : int b, s; -; 3736 : if (a->num_bits < 16) { -; 3737 : if (stbi__zeof(a)) { -; 3738 : return -1; /* report error for unexpected end of data. */ -; 3739 : } -; 3740 : stbi__fill_bits(a); -; 3741 : } -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; -; 3743 : if (b) { -; 3744 : s = b >> 9; -; 3745 : a->code_buffer >>= s; -; 3746 : a->num_bits -= s; -; 3747 : return b & 511; -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); -; 3750 : } -; 3751 : -; 3752 : static int stbi__zexpand(stbi__zbuf* z, char* zout, int n) // need to make room for n bytes -; 3753 : { -; 3754 : char* q; -; 3755 : unsigned int cur, limit, old_limit; -; 3756 : z->zout = zout; -; 3757 : if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG"); -; 3758 : cur = (unsigned int)(z->zout - z->zout_start); -; 3759 : limit = old_limit = (unsigned)(z->zout_end - z->zout_start); -; 3760 : if (UINT_MAX - cur < (unsigned)n) return stbi__err("outofmem", "Out of memory"); -; 3761 : while (cur + n > limit) { -; 3762 : if (limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); -; 3763 : limit *= 2; -; 3764 : } -; 3765 : q = (char*)STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); -; 3766 : STBI_NOTUSED(old_limit); -; 3767 : if (q == NULL) return stbi__err("outofmem", "Out of memory"); -; 3768 : z->zout_start = q; -; 3769 : z->zout = q + cur; -; 3770 : z->zout_end = q + limit; -; 3771 : return 1; -; 3772 : } -; 3773 : -; 3774 : static const int stbi__zlength_base[31] = { -; 3775 : 3,4,5,6,7,8,9,10,11,13, -; 3776 : 15,17,19,23,27,31,35,43,51,59, -; 3777 : 67,83,99,115,131,163,195,227,258,0,0 }; -; 3778 : -; 3779 : static const int stbi__zlength_extra[31] = -; 3780 : { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; -; 3781 : -; 3782 : static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, -; 3783 : 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0 }; -; 3784 : -; 3785 : static const int stbi__zdist_extra[32] = -; 3786 : { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 }; -; 3787 : -; 3788 : static int stbi__parse_huffman_block(stbi__zbuf* a) -; 3789 : { -; 3790 : char* zout = a->zout; -; 3791 : for (;;) { -; 3792 : int z = stbi__zhuffman_decode(a, &a->z_length); -; 3793 : if (z < 256) { -; 3794 : if (z < 0) return stbi__err("bad huffman code", "Corrupt PNG"); // error in huffman codes -; 3795 : if (zout >= a->zout_end) { -; 3796 : if (!stbi__zexpand(a, zout, 1)) return 0; -; 3797 : zout = a->zout; -; 3798 : } -; 3799 : *zout++ = (char)z; -; 3800 : } -; 3801 : else { -; 3802 : stbi_uc* p; -; 3803 : int len, dist; -; 3804 : if (z == 256) { -; 3805 : a->zout = zout; -; 3806 : return 1; -; 3807 : } -; 3808 : if (z >= 286) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data -; 3809 : z -= 257; -; 3810 : len = stbi__zlength_base[z]; -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); -; 3812 : z = stbi__zhuffman_decode(a, &a->z_distance); -; 3813 : if (z < 0 || z >= 30) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data -; 3814 : dist = stbi__zdist_base[z]; -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); -; 3816 : if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG"); -; 3817 : if (zout + len > a->zout_end) { -; 3818 : if (!stbi__zexpand(a, zout, len)) return 0; -; 3819 : zout = a->zout; -; 3820 : } -; 3821 : p = (stbi_uc*)(zout - dist); -; 3822 : if (dist == 1) { // run of one byte; common in images. -; 3823 : stbi_uc v = *p; -; 3824 : if (len) { do *zout++ = v; while (--len); } -; 3825 : } -; 3826 : else { -; 3827 : if (len) { do *zout++ = *p++; while (--len); } -; 3828 : } -; 3829 : } -; 3830 : } -; 3831 : } -; 3832 : -; 3833 : static int stbi__compute_huffman_codes(stbi__zbuf* a) -; 3834 : { -; 3835 : static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; -; 3836 : stbi__zhuffman z_codelength; -; 3837 : stbi_uc lencodes[286 + 32 + 137];//padding for maximum single op -; 3838 : stbi_uc codelength_sizes[19]; -; 3839 : int i, n; -; 3840 : -; 3841 : int hlit = stbi__zreceive(a, 5) + 257; -; 3842 : int hdist = stbi__zreceive(a, 5) + 1; -; 3843 : int hclen = stbi__zreceive(a, 4) + 4; -; 3844 : int ntot = hlit + hdist; -; 3845 : -; 3846 : memset(codelength_sizes, 0, sizeof(codelength_sizes)); -; 3847 : for (i = 0; i < hclen; ++i) { -; 3848 : int s = stbi__zreceive(a, 3); -; 3849 : codelength_sizes[length_dezigzag[i]] = (stbi_uc)s; -; 3850 : } -; 3851 : if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; -; 3852 : -; 3853 : n = 0; -; 3854 : while (n < ntot) { -; 3855 : int c = stbi__zhuffman_decode(a, &z_codelength); -; 3856 : if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3857 : if (c < 16) -; 3858 : lencodes[n++] = (stbi_uc)c; -; 3859 : else { -; 3860 : stbi_uc fill = 0; -; 3861 : if (c == 16) { -; 3862 : c = stbi__zreceive(a, 2) + 3; -; 3863 : if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3864 : fill = lencodes[n - 1]; -; 3865 : } -; 3866 : else if (c == 17) { -; 3867 : c = stbi__zreceive(a, 3) + 3; -; 3868 : } -; 3869 : else if (c == 18) { -; 3870 : c = stbi__zreceive(a, 7) + 11; -; 3871 : } -; 3872 : else { -; 3873 : return stbi__err("bad codelengths", "Corrupt PNG"); -; 3874 : } -; 3875 : if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3876 : memset(lencodes + n, fill, c); -; 3877 : n += c; -; 3878 : } -; 3879 : } -; 3880 : if (n != ntot) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3881 : if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; -; 3882 : if (!stbi__zbuild_huffman(&a->z_distance, lencodes + hlit, hdist)) return 0; -; 3883 : return 1; -; 3884 : } -; 3885 : -; 3886 : static int stbi__parse_uncompressed_block(stbi__zbuf* a) -; 3887 : { -; 3888 : stbi_uc header[4]; -; 3889 : int len, nlen, k; -; 3890 : if (a->num_bits & 7) -; 3891 : stbi__zreceive(a, a->num_bits & 7); // discard -; 3892 : // drain the bit-packed data into header -; 3893 : k = 0; -; 3894 : while (a->num_bits > 0) { -; 3895 : header[k++] = (stbi_uc)(a->code_buffer & 255); // suppress MSVC run-time check -; 3896 : a->code_buffer >>= 8; -; 3897 : a->num_bits -= 8; -; 3898 : } -; 3899 : if (a->num_bits < 0) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3900 : // now fill header the normal way -; 3901 : while (k < 4) -; 3902 : header[k++] = stbi__zget8(a); -; 3903 : len = header[1] * 256 + header[0]; -; 3904 : nlen = header[3] * 256 + header[2]; -; 3905 : if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3906 : if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG"); -; 3907 : if (a->zout + len > a->zout_end) -; 3908 : if (!stbi__zexpand(a, a->zout, len)) return 0; -; 3909 : memcpy(a->zout, a->zbuffer, len); -; 3910 : a->zbuffer += len; -; 3911 : a->zout += len; -; 3912 : return 1; -; 3913 : } -; 3914 : -; 3915 : static int stbi__parse_zlib_header(stbi__zbuf* a) -; 3916 : { -; 3917 : int cmf = stbi__zget8(a); -; 3918 : int cm = cmf & 15; -; 3919 : /* int cinfo = cmf >> 4; */ -; 3920 : int flg = stbi__zget8(a); -; 3921 : if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3922 : if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png -; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png -; 3925 : // window = 1 << (8 + cinfo)... but who cares, we fully buffer output -; 3926 : return 1; -; 3927 : } -; 3928 : -; 3929 : static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] = -; 3930 : { -; 3931 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3932 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3933 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3934 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3935 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3936 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3937 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3938 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3939 : 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 -; 3940 : }; -; 3941 : static const stbi_uc stbi__zdefault_distance[32] = -; 3942 : { -; 3943 : 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 -; 3944 : }; -; 3945 : /* -; 3946 : Init algorithm: -; 3947 : { -; 3948 : int i; // use <= to match clearly with spec -; 3949 : for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; -; 3950 : for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; -; 3951 : for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; -; 3952 : for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; -; 3953 : -; 3954 : for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; -; 3955 : } -; 3956 : */ -; 3957 : -; 3958 : static int stbi__parse_zlib(stbi__zbuf* a, int parse_header) -; 3959 : { -; 3960 : int final, type; -; 3961 : if (parse_header) -; 3962 : if (!stbi__parse_zlib_header(a)) return 0; -; 3963 : a->num_bits = 0; -; 3964 : a->code_buffer = 0; -; 3965 : do { -; 3966 : final = stbi__zreceive(a, 1); -; 3967 : type = stbi__zreceive(a, 2); -; 3968 : if (type == 0) { -; 3969 : if (!stbi__parse_uncompressed_block(a)) return 0; -; 3970 : } -; 3971 : else if (type == 3) { -; 3972 : return 0; -; 3973 : } -; 3974 : else { -; 3975 : if (type == 1) { -; 3976 : // use fixed code lengths -; 3977 : if (!stbi__zbuild_huffman(&a->z_length, stbi__zdefault_length, STBI__ZNSYMS)) return 0; -; 3978 : if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; -; 3979 : } -; 3980 : else { -; 3981 : if (!stbi__compute_huffman_codes(a)) return 0; -; 3982 : } -; 3983 : if (!stbi__parse_huffman_block(a)) return 0; -; 3984 : } -; 3985 : } while (!final); -; 3986 : return 1; -; 3987 : } -; 3988 : -; 3989 : static int stbi__do_zlib(stbi__zbuf* a, char* obuf, int olen, int exp, int parse_header) -; 3990 : { -; 3991 : a->zout_start = obuf; -; 3992 : a->zout = obuf; -; 3993 : a->zout_end = obuf + olen; -; 3994 : a->z_expandable = exp; -; 3995 : -; 3996 : return stbi__parse_zlib(a, parse_header); -; 3997 : } -; 3998 : -; 3999 : STBIDEF char* stbi_zlib_decode_malloc_guesssize(const char* buffer, int len, int initial_size, int* outlen) -; 4000 : { -; 4001 : stbi__zbuf a; -; 4002 : char* p = (char*)stbi__malloc(initial_size); -; 4003 : if (p == NULL) return NULL; -; 4004 : a.zbuffer = (stbi_uc*)buffer; -; 4005 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4006 : if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { -; 4007 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4008 : return a.zout_start; -; 4009 : } -; 4010 : else { -; 4011 : STBI_FREE(a.zout_start); -; 4012 : return NULL; -; 4013 : } -; 4014 : } -; 4015 : -; 4016 : STBIDEF char* stbi_zlib_decode_malloc(char const* buffer, int len, int* outlen) -; 4017 : { -; 4018 : return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); -; 4019 : } -; 4020 : -; 4021 : STBIDEF char* stbi_zlib_decode_malloc_guesssize_headerflag(const char* buffer, int len, int initial_size, int* outlen, int parse_header) -; 4022 : { -; 4023 : stbi__zbuf a; -; 4024 : char* p = (char*)stbi__malloc(initial_size); -; 4025 : if (p == NULL) return NULL; -; 4026 : a.zbuffer = (stbi_uc*)buffer; -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4028 : if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { -; 4029 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4030 : return a.zout_start; -; 4031 : } -; 4032 : else { -; 4033 : STBI_FREE(a.zout_start); -; 4034 : return NULL; -; 4035 : } -; 4036 : } -; 4037 : -; 4038 : STBIDEF int stbi_zlib_decode_buffer(char* obuffer, int olen, char const* ibuffer, int ilen) -; 4039 : { -; 4040 : stbi__zbuf a; -; 4041 : a.zbuffer = (stbi_uc*)ibuffer; -; 4042 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4043 : if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) -; 4044 : return (int)(a.zout - a.zout_start); -; 4045 : else -; 4046 : return -1; -; 4047 : } -; 4048 : -; 4049 : STBIDEF char* stbi_zlib_decode_noheader_malloc(char const* buffer, int len, int* outlen) -; 4050 : { -; 4051 : stbi__zbuf a; -; 4052 : char* p = (char*)stbi__malloc(16384); -; 4053 : if (p == NULL) return NULL; -; 4054 : a.zbuffer = (stbi_uc*)buffer; -; 4055 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4056 : if (stbi__do_zlib(&a, p, 16384, 1, 0)) { -; 4057 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4058 : return a.zout_start; -; 4059 : } -; 4060 : else { -; 4061 : STBI_FREE(a.zout_start); -; 4062 : return NULL; -; 4063 : } -; 4064 : } -; 4065 : -; 4066 : STBIDEF int stbi_zlib_decode_noheader_buffer(char* obuffer, int olen, const char* ibuffer, int ilen) -; 4067 : { -; 4068 : stbi__zbuf a; -; 4069 : a.zbuffer = (stbi_uc*)ibuffer; -; 4070 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4071 : if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) -; 4072 : return (int)(a.zout - a.zout_start); -; 4073 : else -; 4074 : return -1; -; 4075 : } -; 4076 : #endif -; 4077 : -; 4078 : // public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 -; 4079 : // simple implementation -; 4080 : // - only 8-bit samples -; 4081 : // - no CRC checking -; 4082 : // - allocates lots of intermediate memory -; 4083 : // - avoids problem of streaming data between subsystems -; 4084 : // - avoids explicit window management -; 4085 : // performance -; 4086 : // - uses stb_zlib, a PD zlib implementation with fast huffman decoding -; 4087 : -; 4088 : #ifndef STBI_NO_PNG -; 4089 : typedef struct -; 4090 : { -; 4091 : stbi__uint32 length; -; 4092 : stbi__uint32 type; -; 4093 : } stbi__pngchunk; -; 4094 : -; 4095 : static stbi__pngchunk stbi__get_chunk_header(stbi__context* s) -; 4096 : { -; 4097 : stbi__pngchunk c; -; 4098 : c.length = stbi__get32be(s); -; 4099 : c.type = stbi__get32be(s); -; 4100 : return c; -; 4101 : } -; 4102 : -; 4103 : static int stbi__check_png_header(stbi__context* s) -; 4104 : { -; 4105 : static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; -; 4106 : int i; -; 4107 : for (i = 0; i < 8; ++i) -; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); -; 4109 : return 1; -; 4110 : } -; 4111 : -; 4112 : typedef struct -; 4113 : { -; 4114 : stbi__context* s; -; 4115 : stbi_uc* idata, * expanded, * out; -; 4116 : int depth; -; 4117 : } stbi__png; -; 4118 : -; 4119 : enum { -; 4120 : STBI__F_none = 0, -; 4121 : STBI__F_sub = 1, -; 4122 : STBI__F_up = 2, -; 4123 : STBI__F_avg = 3, -; 4124 : STBI__F_paeth = 4, -; 4125 : // synthetic filters used for first scanline to avoid needing a dummy row of 0s -; 4126 : STBI__F_avg_first, -; 4127 : STBI__F_paeth_first -; 4128 : }; -; 4129 : -; 4130 : static stbi_uc first_row_filter[5] = -; 4131 : { -; 4132 : STBI__F_none, -; 4133 : STBI__F_sub, -; 4134 : STBI__F_none, -; 4135 : STBI__F_avg_first, -; 4136 : STBI__F_paeth_first -; 4137 : }; -; 4138 : -; 4139 : static int stbi__paeth(int a, int b, int c) -; 4140 : { -; 4141 : int p = a + b - c; -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); -; 4144 : int pc = abs(p - c); -; 4145 : if (pa <= pb && pa <= pc) return a; -; 4146 : if (pb <= pc) return b; -; 4147 : return c; -; 4148 : } -; 4149 : -; 4150 : static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; -; 4151 : -; 4152 : // create the png data from post-deflated data -; 4153 : static int stbi__create_png_image_raw(stbi__png* a, stbi_uc* raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -; 4154 : { -; 4155 : int bytes = (depth == 16 ? 2 : 1); -; 4156 : stbi__context* s = a->s; -; 4157 : stbi__uint32 i, j, stride = x * out_n * bytes; -; 4158 : stbi__uint32 img_len, img_width_bytes; -; 4159 : int k; -; 4160 : int img_n = s->img_n; // copy it into a local for later -; 4161 : -; 4162 : int output_bytes = out_n * bytes; -; 4163 : int filter_bytes = img_n * bytes; -; 4164 : int width = x; -; 4165 : -; 4166 : STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1); -; 4167 : a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into -; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); -; 4169 : -; 4170 : if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); -; 4171 : img_width_bytes = (((img_n * x * depth) + 7) >> 3); -; 4172 : img_len = (img_width_bytes + 1) * y; -; 4173 : -; 4174 : // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, -; 4175 : // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), -; 4176 : // so just check for raw_len < img_len always. -; 4177 : if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG"); -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { -; 4180 : stbi_uc* cur = a->out + stride * j; -; 4181 : stbi_uc* prior; -; 4182 : int filter = *raw++; -; 4183 : -; 4184 : if (filter > 4) -; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); -; 4186 : -; 4187 : if (depth < 8) { -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); -; 4189 : cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place -; 4190 : filter_bytes = 1; -; 4191 : width = img_width_bytes; -; 4192 : } -; 4193 : prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above -; 4194 : -; 4195 : // if first row, use special filter that doesn't sample previous row -; 4196 : if (j == 0) filter = first_row_filter[filter]; -; 4197 : -; 4198 : // handle first byte explicitly -; 4199 : for (k = 0; k < filter_bytes; ++k) { -; 4200 : switch (filter) { -; 4201 : case STBI__F_none: cur[k] = raw[k]; break; -; 4202 : case STBI__F_sub: cur[k] = raw[k]; break; -; 4203 : case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; -; 4204 : case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break; -; 4205 : case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break; -; 4206 : case STBI__F_avg_first: cur[k] = raw[k]; break; -; 4207 : case STBI__F_paeth_first: cur[k] = raw[k]; break; -; 4208 : } -; 4209 : } -; 4210 : -; 4211 : if (depth == 8) { -; 4212 : if (img_n != out_n) -; 4213 : cur[img_n] = 255; // first pixel -; 4214 : raw += img_n; -; 4215 : cur += out_n; -; 4216 : prior += out_n; -; 4217 : } -; 4218 : else if (depth == 16) { -; 4219 : if (img_n != out_n) { -; 4220 : cur[filter_bytes] = 255; // first pixel top byte -; 4221 : cur[filter_bytes + 1] = 255; // first pixel bottom byte -; 4222 : } -; 4223 : raw += filter_bytes; -; 4224 : cur += output_bytes; -; 4225 : prior += output_bytes; -; 4226 : } -; 4227 : else { -; 4228 : raw += 1; -; 4229 : cur += 1; -; 4230 : prior += 1; -; 4231 : } -; 4232 : -; 4233 : // this is a little gross, so that we don't switch per-pixel or per-component -; 4234 : if (depth < 8 || img_n == out_n) { -; 4235 : int nk = (width - 1) * filter_bytes; -; 4236 : #define STBI__CASE(f) \ -; 4237 : case f: \ -; 4238 : for (k=0; k < nk; ++k) -; 4239 : switch (filter) { -; 4240 : // "none" filter turns into a memcpy here; make that explicit. -; 4241 : case STBI__F_none: memcpy(cur, raw, nk); break; -; 4242 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break; -; 4243 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4244 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break; -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; -; 4246 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break; -; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; -; 4248 : } -; 4249 : #undef STBI__CASE -; 4250 : raw += nk; -; 4251 : } -; 4252 : else { -; 4253 : STBI_ASSERT(img_n + 1 == out_n); -; 4254 : #define STBI__CASE(f) \ -; 4255 : case f: \ -; 4256 : for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ -; 4257 : for (k=0; k < filter_bytes; ++k) -; 4258 : switch (filter) { -; 4259 : STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; -; 4260 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break; -; 4261 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4262 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break; -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; -; 4264 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break; -; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; -; 4266 : } -; 4267 : #undef STBI__CASE -; 4268 : -; 4269 : // the loop above sets the high byte of the pixels' alpha, but for -; 4270 : // 16 bit png files we also need the low byte set. we'll do that here. -; 4271 : if (depth == 16) { -; 4272 : cur = a->out + stride * j; // start at the beginning of the row again -; 4273 : for (i = 0; i < x; ++i, cur += output_bytes) { -; 4274 : cur[filter_bytes + 1] = 255; -; 4275 : } -; 4276 : } -; 4277 : } -; 4278 : } -; 4279 : -; 4280 : // we make a separate pass to expand bits to pixels; for performance, -; 4281 : // this could run two scanlines behind the above code, so it won't -; 4282 : // intefere with filtering but will still be in the cache. -; 4283 : if (depth < 8) { -; 4284 : for (j = 0; j < y; ++j) { -; 4285 : stbi_uc* cur = a->out + stride * j; -; 4286 : stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes; -; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit -; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop -; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range -; 4290 : -; 4291 : // note that the final byte might overshoot and write more data than desired. -; 4292 : // we can allocate enough data that this never writes out of memory, but it -; 4293 : // could also overwrite the next scanline. can it overwrite non-empty data -; 4294 : // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. -; 4295 : // so we need to explicitly clamp the final ones -; 4296 : -; 4297 : if (depth == 4) { -; 4298 : for (k = x * img_n; k >= 2; k -= 2, ++in) { -; 4299 : *cur++ = scale * ((*in >> 4)); -; 4300 : *cur++ = scale * ((*in) & 0x0f); -; 4301 : } -; 4302 : if (k > 0) *cur++ = scale * ((*in >> 4)); -; 4303 : } -; 4304 : else if (depth == 2) { -; 4305 : for (k = x * img_n; k >= 4; k -= 4, ++in) { -; 4306 : *cur++ = scale * ((*in >> 6)); -; 4307 : *cur++ = scale * ((*in >> 4) & 0x03); -; 4308 : *cur++ = scale * ((*in >> 2) & 0x03); -; 4309 : *cur++ = scale * ((*in) & 0x03); -; 4310 : } -; 4311 : if (k > 0) *cur++ = scale * ((*in >> 6)); -; 4312 : if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); -; 4313 : if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); -; 4314 : } -; 4315 : else if (depth == 1) { -; 4316 : for (k = x * img_n; k >= 8; k -= 8, ++in) { -; 4317 : *cur++ = scale * ((*in >> 7)); -; 4318 : *cur++ = scale * ((*in >> 6) & 0x01); -; 4319 : *cur++ = scale * ((*in >> 5) & 0x01); -; 4320 : *cur++ = scale * ((*in >> 4) & 0x01); -; 4321 : *cur++ = scale * ((*in >> 3) & 0x01); -; 4322 : *cur++ = scale * ((*in >> 2) & 0x01); -; 4323 : *cur++ = scale * ((*in >> 1) & 0x01); -; 4324 : *cur++ = scale * ((*in) & 0x01); -; 4325 : } -; 4326 : if (k > 0) *cur++ = scale * ((*in >> 7)); -; 4327 : if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); -; 4328 : if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); -; 4329 : if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); -; 4330 : if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); -; 4331 : if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); -; 4332 : if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); -; 4333 : } -; 4334 : if (img_n != out_n) { -; 4335 : int q; -; 4336 : // insert alpha = 255 -; 4337 : cur = a->out + stride * j; -; 4338 : if (img_n == 1) { -; 4339 : for (q = x - 1; q >= 0; --q) { -; 4340 : cur[q * 2 + 1] = 255; -; 4341 : cur[q * 2 + 0] = cur[q]; -; 4342 : } -; 4343 : } -; 4344 : else { -; 4345 : STBI_ASSERT(img_n == 3); -; 4346 : for (q = x - 1; q >= 0; --q) { -; 4347 : cur[q * 4 + 3] = 255; -; 4348 : cur[q * 4 + 2] = cur[q * 3 + 2]; -; 4349 : cur[q * 4 + 1] = cur[q * 3 + 1]; -; 4350 : cur[q * 4 + 0] = cur[q * 3 + 0]; -; 4351 : } -; 4352 : } -; 4353 : } -; 4354 : } -; 4355 : } -; 4356 : else if (depth == 16) { -; 4357 : // force the image data from big-endian to platform-native. -; 4358 : // this is done in a separate pass due to the decoding relying -; 4359 : // on the data being untouched, but could probably be done -; 4360 : // per-line during decode if care is taken. -; 4361 : stbi_uc* cur = a->out; -; 4362 : stbi__uint16* cur16 = (stbi__uint16*)cur; -; 4363 : -; 4364 : for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) { -; 4365 : *cur16 = (cur[0] << 8) | cur[1]; -; 4366 : } -; 4367 : } -; 4368 : -; 4369 : return 1; -; 4370 : } -; 4371 : -; 4372 : static int stbi__create_png_image(stbi__png* a, stbi_uc* image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -; 4373 : { -; 4374 : int bytes = (depth == 16 ? 2 : 1); -; 4375 : int out_bytes = out_n * bytes; -; 4376 : stbi_uc* final; -; 4377 : int p; -; 4378 : if (!interlaced) -; 4379 : return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); -; 4380 : -; 4381 : // de-interlacing -; 4382 : final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); -; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); -; 4384 : for (p = 0; p < 7; ++p) { -; 4385 : int xorig[] = { 0,4,0,2,0,1,0 }; -; 4386 : int yorig[] = { 0,0,4,0,2,0,1 }; -; 4387 : int xspc[] = { 8,8,4,4,2,2,1 }; -; 4388 : int yspc[] = { 8,8,8,4,4,2,2 }; -; 4389 : int i, j, x, y; -; 4390 : // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 -; 4391 : x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p]; -; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; -; 4393 : if (x && y) { -; 4394 : stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; -; 4395 : if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { -; 4396 : STBI_FREE(final); -; 4397 : return 0; -; 4398 : } -; 4399 : for (j = 0; j < y; ++j) { -; 4400 : for (i = 0; i < x; ++i) { -; 4401 : int out_y = j * yspc[p] + yorig[p]; -; 4402 : int out_x = i * xspc[p] + xorig[p]; -; 4403 : memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, -; 4404 : a->out + (j * x + i) * out_bytes, out_bytes); -; 4405 : } -; 4406 : } -; 4407 : STBI_FREE(a->out); -; 4408 : image_data += img_len; -; 4409 : image_data_len -= img_len; -; 4410 : } -; 4411 : } -; 4412 : a->out = final; -; 4413 : -; 4414 : return 1; -; 4415 : } -; 4416 : -; 4417 : static int stbi__compute_transparency(stbi__png* z, stbi_uc tc[3], int out_n) -; 4418 : { -; 4419 : stbi__context* s = z->s; -; 4420 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4421 : stbi_uc* p = z->out; -; 4422 : -; 4423 : // compute color-based transparency, assuming we've -; 4424 : // already got 255 as the alpha value in the output -; 4425 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4426 : -; 4427 : if (out_n == 2) { -; 4428 : for (i = 0; i < pixel_count; ++i) { -; 4429 : p[1] = (p[0] == tc[0] ? 0 : 255); -; 4430 : p += 2; -; 4431 : } -; 4432 : } -; 4433 : else { -; 4434 : for (i = 0; i < pixel_count; ++i) { -; 4435 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4436 : p[3] = 0; -; 4437 : p += 4; -; 4438 : } -; 4439 : } -; 4440 : return 1; -; 4441 : } -; 4442 : -; 4443 : static int stbi__compute_transparency16(stbi__png* z, stbi__uint16 tc[3], int out_n) -; 4444 : { -; 4445 : stbi__context* s = z->s; -; 4446 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4447 : stbi__uint16* p = (stbi__uint16*)z->out; -; 4448 : -; 4449 : // compute color-based transparency, assuming we've -; 4450 : // already got 65535 as the alpha value in the output -; 4451 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4452 : -; 4453 : if (out_n == 2) { -; 4454 : for (i = 0; i < pixel_count; ++i) { -; 4455 : p[1] = (p[0] == tc[0] ? 0 : 65535); -; 4456 : p += 2; -; 4457 : } -; 4458 : } -; 4459 : else { -; 4460 : for (i = 0; i < pixel_count; ++i) { -; 4461 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4462 : p[3] = 0; -; 4463 : p += 4; -; 4464 : } -; 4465 : } -; 4466 : return 1; -; 4467 : } -; 4468 : -; 4469 : static int stbi__expand_png_palette(stbi__png* a, stbi_uc* palette, int len, int pal_img_n) -; 4470 : { -; 4471 : stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; -; 4472 : stbi_uc* p, * temp_out, * orig = a->out; -; 4473 : -; 4474 : p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0); -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4476 : -; 4477 : // between here and free(out) below, exitting would leak -; 4478 : temp_out = p; -; 4479 : -; 4480 : if (pal_img_n == 3) { -; 4481 : for (i = 0; i < pixel_count; ++i) { -; 4482 : int n = orig[i] * 4; -; 4483 : p[0] = palette[n]; -; 4484 : p[1] = palette[n + 1]; -; 4485 : p[2] = palette[n + 2]; -; 4486 : p += 3; -; 4487 : } -; 4488 : } -; 4489 : else { -; 4490 : for (i = 0; i < pixel_count; ++i) { -; 4491 : int n = orig[i] * 4; -; 4492 : p[0] = palette[n]; -; 4493 : p[1] = palette[n + 1]; -; 4494 : p[2] = palette[n + 2]; -; 4495 : p[3] = palette[n + 3]; -; 4496 : p += 4; -; 4497 : } -; 4498 : } -; 4499 : STBI_FREE(a->out); -; 4500 : a->out = temp_out; -; 4501 : -; 4502 : STBI_NOTUSED(len); -; 4503 : -; 4504 : return 1; -; 4505 : } -; 4506 : -; 4507 : static int stbi__unpremultiply_on_load_global = 0; -; 4508 : static int stbi__de_iphone_flag_global = 0; -; 4509 : -; 4510 : STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) -; 4511 : { -; 4512 : stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; -; 4513 : } -; 4514 : -; 4515 : STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) -; 4516 : { -; 4517 : stbi__de_iphone_flag_global = flag_true_if_should_convert; -; 4518 : } -; 4519 : -; 4520 : #ifndef STBI_THREAD_LOCAL -; 4521 : #define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global -; 4522 : #define stbi__de_iphone_flag stbi__de_iphone_flag_global -; 4523 : #else -; 4524 : static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; -; 4525 : static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; -; 4526 : -; 4527 : STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) -; 4528 : { -; 4529 : stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; -; 4530 : stbi__unpremultiply_on_load_set = 1; -; 4531 : } -; 4532 : -; 4533 : STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert) -; 4534 : { -; 4535 : stbi__de_iphone_flag_local = flag_true_if_should_convert; -; 4536 : stbi__de_iphone_flag_set = 1; -; 4537 : } -; 4538 : -; 4539 : #define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \ -; 4540 : ? stbi__unpremultiply_on_load_local \ -; 4541 : : stbi__unpremultiply_on_load_global) -; 4542 : #define stbi__de_iphone_flag (stbi__de_iphone_flag_set \ -; 4543 : ? stbi__de_iphone_flag_local \ -; 4544 : : stbi__de_iphone_flag_global) -; 4545 : #endif // STBI_THREAD_LOCAL -; 4546 : -; 4547 : static void stbi__de_iphone(stbi__png* z) -; 4548 : { -; 4549 : stbi__context* s = z->s; -; 4550 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4551 : stbi_uc* p = z->out; -; 4552 : -; 4553 : if (s->img_out_n == 3) { // convert bgr to rgb -; 4554 : for (i = 0; i < pixel_count; ++i) { -; 4555 : stbi_uc t = p[0]; -; 4556 : p[0] = p[2]; -; 4557 : p[2] = t; -; 4558 : p += 3; -; 4559 : } -; 4560 : } -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { -; 4566 : stbi_uc a = p[3]; -; 4567 : stbi_uc t = p[0]; -; 4568 : if (a) { -; 4569 : stbi_uc half = a / 2; -; 4570 : p[0] = (p[2] * 255 + half) / a; -; 4571 : p[1] = (p[1] * 255 + half) / a; -; 4572 : p[2] = (t * 255 + half) / a; -; 4573 : } -; 4574 : else { -; 4575 : p[0] = p[2]; -; 4576 : p[2] = t; -; 4577 : } -; 4578 : p += 4; -; 4579 : } -; 4580 : } -; 4581 : else { -; 4582 : // convert bgr to rgb -; 4583 : for (i = 0; i < pixel_count; ++i) { -; 4584 : stbi_uc t = p[0]; -; 4585 : p[0] = p[2]; -; 4586 : p[2] = t; -; 4587 : p += 4; -; 4588 : } -; 4589 : } -; 4590 : } -; 4591 : } -; 4592 : -; 4593 : #define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) -; 4594 : -; 4595 : static int stbi__parse_png_file(stbi__png* z, int scan, int req_comp) -; 4596 : { -; 4597 : stbi_uc palette[1024], pal_img_n = 0; -; 4598 : stbi_uc has_trans = 0, tc[3] = { 0 }; -; 4599 : stbi__uint16 tc16[3]; -; 4600 : stbi__uint32 ioff = 0, idata_limit = 0, i, pal_len = 0; -; 4601 : int first = 1, k, interlace = 0, color = 0, is_iphone = 0; -; 4602 : stbi__context* s = z->s; -; 4603 : -; 4604 : z->expanded = NULL; -; 4605 : z->idata = NULL; -; 4606 : z->out = NULL; -; 4607 : -; 4608 : if (!stbi__check_png_header(s)) return 0; -; 4609 : -; 4610 : if (scan == STBI__SCAN_type) return 1; -; 4611 : -; 4612 : for (;;) { -; 4613 : stbi__pngchunk c = stbi__get_chunk_header(s); -; 4614 : switch (c.type) { -; 4615 : case STBI__PNG_TYPE('C', 'g', 'B', 'I'): -; 4616 : is_iphone = 1; -; 4617 : stbi__skip(s, c.length); -; 4618 : break; -; 4619 : case STBI__PNG_TYPE('I', 'H', 'D', 'R'): { -; 4620 : int comp, filter; -; 4621 : if (!first) return stbi__err("multiple IHDR", "Corrupt PNG"); -; 4622 : first = 0; -; 4623 : if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG"); -; 4624 : s->img_x = stbi__get32be(s); -; 4625 : s->img_y = stbi__get32be(s); -; 4626 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4627 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4628 : z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only"); -; 4629 : color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype", "Corrupt PNG"); -; 4630 : if (color == 3 && z->depth == 16) return stbi__err("bad ctype", "Corrupt PNG"); -; 4631 : if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype", "Corrupt PNG"); -; 4632 : comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG"); -; 4633 : filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG"); -; 4634 : interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG"); -; 4635 : if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG"); -; 4636 : if (!pal_img_n) { -; 4637 : s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); -; 4638 : if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); -; 4639 : } -; 4640 : else { -; 4641 : // if paletted, then pal_n is our final components, and -; 4642 : // img_n is # components to decompress/filter. -; 4643 : s->img_n = 1; -; 4644 : if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large", "Corrupt PNG"); -; 4645 : } -; 4646 : // even with SCAN_header, have to scan to see if we have a tRNS -; 4647 : break; -; 4648 : } -; 4649 : -; 4650 : case STBI__PNG_TYPE('P', 'L', 'T', 'E'): { -; 4651 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4652 : if (c.length > 256 * 3) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4653 : pal_len = c.length / 3; -; 4654 : if (pal_len * 3 != c.length) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4655 : for (i = 0; i < pal_len; ++i) { -; 4656 : palette[i * 4 + 0] = stbi__get8(s); -; 4657 : palette[i * 4 + 1] = stbi__get8(s); -; 4658 : palette[i * 4 + 2] = stbi__get8(s); -; 4659 : palette[i * 4 + 3] = 255; -; 4660 : } -; 4661 : break; -; 4662 : } -; 4663 : -; 4664 : case STBI__PNG_TYPE('t', 'R', 'N', 'S'): { -; 4665 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4666 : if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG"); -; 4667 : if (pal_img_n) { -; 4668 : if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } -; 4669 : if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG"); -; 4670 : if (c.length > pal_len) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4671 : pal_img_n = 4; -; 4672 : for (i = 0; i < c.length; ++i) -; 4673 : palette[i * 4 + 3] = stbi__get8(s); -; 4674 : } -; 4675 : else { -; 4676 : if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG"); -; 4677 : if (c.length != (stbi__uint32)s->img_n * 2) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4678 : has_trans = 1; -; 4679 : // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. -; 4680 : if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } -; 4681 : if (z->depth == 16) { -; 4682 : for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is -; 4683 : } -; 4684 : else { -; 4685 : for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger -; 4686 : } -; 4687 : } -; 4688 : break; -; 4689 : } -; 4690 : -; 4691 : case STBI__PNG_TYPE('I', 'D', 'A', 'T'): { -; 4692 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4693 : if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG"); -; 4694 : if (scan == STBI__SCAN_header) { -; 4695 : // header scan definitely stops at first IDAT -; 4696 : if (pal_img_n) -; 4697 : s->img_n = pal_img_n; -; 4698 : return 1; -; 4699 : } -; 4700 : if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); -; 4701 : if ((int)(ioff + c.length) < (int)ioff) return 0; -; 4702 : if (ioff + c.length > idata_limit) { -; 4703 : stbi__uint32 idata_limit_old = idata_limit; -; 4704 : stbi_uc* p; -; 4705 : if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; -; 4706 : while (ioff + c.length > idata_limit) -; 4707 : idata_limit *= 2; -; 4708 : STBI_NOTUSED(idata_limit_old); -; 4709 : p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4710 : z->idata = p; -; 4711 : } -; 4712 : if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG"); -; 4713 : ioff += c.length; -; 4714 : break; -; 4715 : } -; 4716 : -; 4717 : case STBI__PNG_TYPE('I', 'E', 'N', 'D'): { -; 4718 : stbi__uint32 raw_len, bpl; -; 4719 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4720 : if (scan != STBI__SCAN_load) return 1; -; 4721 : if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG"); -; 4722 : // initial guess for decoded data size to avoid unnecessary reallocs -; 4723 : bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component -; 4724 : raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); -; 4726 : if (z->expanded == NULL) return 0; // zlib should set error -; 4727 : STBI_FREE(z->idata); z->idata = NULL; -; 4728 : if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans) -; 4729 : s->img_out_n = s->img_n + 1; -; 4730 : else -; 4731 : s->img_out_n = s->img_n; -; 4732 : if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; -; 4733 : if (has_trans) { -; 4734 : if (z->depth == 16) { -; 4735 : if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; -; 4736 : } -; 4737 : else { -; 4738 : if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; -; 4739 : } -; 4740 : } -; 4741 : if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) -; 4742 : stbi__de_iphone(z); -; 4743 : if (pal_img_n) { -; 4744 : // pal_img_n == 3 or 4 -; 4745 : s->img_n = pal_img_n; // record the actual colors we had -; 4746 : s->img_out_n = pal_img_n; -; 4747 : if (req_comp >= 3) s->img_out_n = req_comp; -; 4748 : if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) -; 4749 : return 0; -; 4750 : } -; 4751 : else if (has_trans) { -; 4752 : // non-paletted image with tRNS -> source image has (constant) alpha -; 4753 : ++s->img_n; -; 4754 : } -; 4755 : STBI_FREE(z->expanded); z->expanded = NULL; -; 4756 : // end of PNG chunk, read and skip CRC -; 4757 : stbi__get32be(s); -; 4758 : return 1; -; 4759 : } -; 4760 : -; 4761 : default: -; 4762 : // if critical, fail -; 4763 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4764 : if ((c.type & (1 << 29)) == 0) { -; 4765 : #ifndef STBI_NO_FAILURE_STRINGS -; 4766 : // not threadsafe -; 4767 : static char invalid_chunk[] = "XXXX PNG chunk not known"; -; 4768 : invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); -; 4769 : invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); -; 4770 : invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); -; 4771 : invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); -; 4772 : #endif -; 4773 : return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); -; 4774 : } -; 4775 : stbi__skip(s, c.length); -; 4776 : break; -; 4777 : } -; 4778 : // end of PNG chunk, read and skip CRC -; 4779 : stbi__get32be(s); -; 4780 : } -; 4781 : } -; 4782 : -; 4783 : static void* stbi__do_png(stbi__png* p, int* x, int* y, int* n, int req_comp, stbi__result_info* ri) -; 4784 : { -; 4785 : void* result = NULL; -; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { -; 4788 : if (p->depth <= 8) -; 4789 : ri->bits_per_channel = 8; -; 4790 : else if (p->depth == 16) -; 4791 : ri->bits_per_channel = 16; -; 4792 : else -; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); -; 4794 : result = p->out; -; 4795 : p->out = NULL; -; 4796 : if (req_comp && req_comp != p->s->img_out_n) { -; 4797 : if (ri->bits_per_channel == 8) -; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4799 : else -; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4801 : p->s->img_out_n = req_comp; -; 4802 : if (result == NULL) return result; -; 4803 : } -; 4804 : *x = p->s->img_x; -; 4805 : *y = p->s->img_y; -; 4806 : if (n) *n = p->s->img_n; -; 4807 : } -; 4808 : STBI_FREE(p->out); p->out = NULL; -; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; -; 4810 : STBI_FREE(p->idata); p->idata = NULL; -; 4811 : -; 4812 : return result; -; 4813 : } -; 4814 : -; 4815 : static void* stbi__png_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 4816 : { -; 4817 : stbi__png p; -; 4818 : p.s = s; -; 4819 : return stbi__do_png(&p, x, y, comp, req_comp, ri); -; 4820 : } -; 4821 : -; 4822 : static int stbi__png_test(stbi__context* s) -; 4823 : { -; 4824 : int r; -; 4825 : r = stbi__check_png_header(s); -; 4826 : stbi__rewind(s); -; 4827 : return r; -; 4828 : } -; 4829 : -; 4830 : static int stbi__png_info_raw(stbi__png* p, int* x, int* y, int* comp) -; 4831 : { -; 4832 : if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { -; 4833 : stbi__rewind(p->s); -; 4834 : return 0; -; 4835 : } -; 4836 : if (x) *x = p->s->img_x; -; 4837 : if (y) *y = p->s->img_y; -; 4838 : if (comp) *comp = p->s->img_n; -; 4839 : return 1; -; 4840 : } -; 4841 : -; 4842 : static int stbi__png_info(stbi__context* s, int* x, int* y, int* comp) -; 4843 : { -; 4844 : stbi__png p; -; 4845 : p.s = s; -; 4846 : return stbi__png_info_raw(&p, x, y, comp); -; 4847 : } -; 4848 : -; 4849 : static int stbi__png_is16(stbi__context* s) -; 4850 : { -; 4851 : stbi__png p; -; 4852 : p.s = s; -; 4853 : if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) -; 4854 : return 0; -; 4855 : if (p.depth != 16) { -; 4856 : stbi__rewind(p.s); -; 4857 : return 0; -; 4858 : } -; 4859 : return 1; -; 4860 : } -; 4861 : #endif -; 4862 : -; 4863 : // Microsoft/Windows BMP image -; 4864 : -; 4865 : #ifndef STBI_NO_BMP -; 4866 : static int stbi__bmp_test_raw(stbi__context* s) -; 4867 : { -; 4868 : int r; -; 4869 : int sz; -; 4870 : if (stbi__get8(s) != 'B') return 0; -; 4871 : if (stbi__get8(s) != 'M') return 0; -; 4872 : stbi__get32le(s); // discard filesize -; 4873 : stbi__get16le(s); // discard reserved -; 4874 : stbi__get16le(s); // discard reserved -; 4875 : stbi__get32le(s); // discard data offset -; 4876 : sz = stbi__get32le(s); -; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); -; 4878 : return r; -; 4879 : } -; 4880 : -; 4881 : static int stbi__bmp_test(stbi__context* s) -; 4882 : { -; 4883 : int r = stbi__bmp_test_raw(s); -; 4884 : stbi__rewind(s); -; 4885 : return r; -; 4886 : } -; 4887 : -; 4888 : // returns 0..31 for the highest set bit -; 4889 : static int stbi__high_bit(unsigned int z) -; 4890 : { -; 4891 : int n = 0; -; 4892 : if (z == 0) return -1; -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } -; 4898 : return n; -; 4899 : } -; 4900 : -; 4901 : static int stbi__bitcount(unsigned int a) -; 4902 : { -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits -; 4908 : return a & 0xff; -; 4909 : } -; 4910 : -; 4911 : // extract an arbitrarily-aligned N-bit value (N=bits) -; 4912 : // from v, and then make it 8-bits long and fractionally -; 4913 : // extend it to full full range. -; 4914 : static int stbi__shiftsigned(unsigned int v, int shift, int bits) -; 4915 : { -; 4916 : static unsigned int mul_table[9] = { -; 4917 : 0, -; 4918 : 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, -; 4919 : 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, -; 4920 : }; -; 4921 : static unsigned int shift_table[9] = { -; 4922 : 0, 0,0,1,0,2,4,6,0, -; 4923 : }; -; 4924 : if (shift < 0) -; 4925 : v <<= -shift; -; 4926 : else -; 4927 : v >>= shift; -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; -; 4932 : } -; 4933 : -; 4934 : typedef struct -; 4935 : { -; 4936 : int bpp, offset, hsz; -; 4937 : unsigned int mr, mg, mb, ma, all_a; -; 4938 : int extra_read; -; 4939 : } stbi__bmp_data; -; 4940 : -; 4941 : static int stbi__bmp_set_mask_defaults(stbi__bmp_data* info, int compress) -; 4942 : { -; 4943 : // BI_BITFIELDS specifies masks explicitly, don't override -; 4944 : if (compress == 3) -; 4945 : return 1; -; 4946 : -; 4947 : if (compress == 0) { -; 4948 : if (info->bpp == 16) { -; 4949 : info->mr = 31u << 10; -; 4950 : info->mg = 31u << 5; -; 4951 : info->mb = 31u << 0; -; 4952 : } -; 4953 : else if (info->bpp == 32) { -; 4954 : info->mr = 0xffu << 16; -; 4955 : info->mg = 0xffu << 8; -; 4956 : info->mb = 0xffu << 0; -; 4957 : info->ma = 0xffu << 24; -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 -; 4959 : } -; 4960 : else { -; 4961 : // otherwise, use defaults, which is all-0 -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; -; 4963 : } -; 4964 : return 1; -; 4965 : } -; 4966 : return 0; // error -; 4967 : } -; 4968 : -; 4969 : static void* stbi__bmp_parse_header(stbi__context* s, stbi__bmp_data* info) -; 4970 : { -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); -; 4973 : stbi__get32le(s); // discard filesize -; 4974 : stbi__get16le(s); // discard reserved -; 4975 : stbi__get16le(s); // discard reserved -; 4976 : info->offset = stbi__get32le(s); -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; -; 4979 : info->extra_read = 14; -; 4980 : -; 4981 : if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); -; 4982 : -; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); -; 4984 : if (hsz == 12) { -; 4985 : s->img_x = stbi__get16le(s); -; 4986 : s->img_y = stbi__get16le(s); -; 4987 : } -; 4988 : else { -; 4989 : s->img_x = stbi__get32le(s); -; 4990 : s->img_y = stbi__get32le(s); -; 4991 : } -; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); -; 4993 : info->bpp = stbi__get16le(s); -; 4994 : if (hsz != 12) { -; 4995 : int compress = stbi__get32le(s); -; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); -; 4997 : if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes -; 4998 : if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel -; 4999 : stbi__get32le(s); // discard sizeof -; 5000 : stbi__get32le(s); // discard hres -; 5001 : stbi__get32le(s); // discard vres -; 5002 : stbi__get32le(s); // discard colorsused -; 5003 : stbi__get32le(s); // discard max important -; 5004 : if (hsz == 40 || hsz == 56) { -; 5005 : if (hsz == 56) { -; 5006 : stbi__get32le(s); -; 5007 : stbi__get32le(s); -; 5008 : stbi__get32le(s); -; 5009 : stbi__get32le(s); -; 5010 : } -; 5011 : if (info->bpp == 16 || info->bpp == 32) { -; 5012 : if (compress == 0) { -; 5013 : stbi__bmp_set_mask_defaults(info, compress); -; 5014 : } -; 5015 : else if (compress == 3) { -; 5016 : info->mr = stbi__get32le(s); -; 5017 : info->mg = stbi__get32le(s); -; 5018 : info->mb = stbi__get32le(s); -; 5019 : info->extra_read += 12; -; 5020 : // not documented, but generated by photoshop and handled by mspaint -; 5021 : if (info->mr == info->mg && info->mg == info->mb) { -; 5022 : // ?!?!? -; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5024 : } -; 5025 : } -; 5026 : else -; 5027 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5028 : } -; 5029 : } -; 5030 : else { -; 5031 : // V4/V5 header -; 5032 : int i; -; 5033 : if (hsz != 108 && hsz != 124) -; 5034 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5035 : info->mr = stbi__get32le(s); -; 5036 : info->mg = stbi__get32le(s); -; 5037 : info->mb = stbi__get32le(s); -; 5038 : info->ma = stbi__get32le(s); -; 5039 : if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs -; 5040 : stbi__bmp_set_mask_defaults(info, compress); -; 5041 : stbi__get32le(s); // discard color space -; 5042 : for (i = 0; i < 12; ++i) -; 5043 : stbi__get32le(s); // discard color space parameters -; 5044 : if (hsz == 124) { -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; -; 5053 : } -; 5054 : -; 5055 : static void* stbi__bmp_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5056 : { -; 5057 : stbi_uc* out; -; 5058 : unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a; -; 5059 : stbi_uc pal[256][4]; -; 5060 : int psize = 0, i, j, width; -; 5061 : int flip_vertically, pad, target; -; 5062 : stbi__bmp_data info; -; 5063 : STBI_NOTUSED(ri); -; 5064 : -; 5065 : info.all_a = 255; -; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) -; 5067 : return NULL; // error code already set -; 5068 : -; 5069 : flip_vertically = ((int)s->img_y) > 0; -; 5070 : s->img_y = abs((int)s->img_y); -; 5071 : -; 5072 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5073 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5074 : -; 5075 : mr = info.mr; -; 5076 : mg = info.mg; -; 5077 : mb = info.mb; -; 5078 : ma = info.ma; -; 5079 : all_a = info.all_a; -; 5080 : -; 5081 : if (info.hsz == 12) { -; 5082 : if (info.bpp < 24) -; 5083 : psize = (info.offset - info.extra_read - 24) / 3; -; 5084 : } -; 5085 : else { -; 5086 : if (info.bpp < 16) -; 5087 : psize = (info.offset - info.extra_read - info.hsz) >> 2; -; 5088 : } -; 5089 : if (psize == 0) { -; 5090 : // accept some number of extra bytes after the header, but if the offset points either to before -; 5091 : // the header ends or implies a large amount of extra data, reject the file as malformed -; 5092 : int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); -; 5093 : int header_limit = 1024; // max we actually read is below 256 bytes currently. -; 5094 : int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. -; 5095 : if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { -; 5096 : return stbi__errpuc("bad header", "Corrupt BMP"); -; 5097 : } -; 5098 : // we established that bytes_read_so_far is positive and sensible. -; 5099 : // the first half of this test rejects offsets that are either too small positives, or -; 5100 : // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn -; 5101 : // ensures the number computed in the second half of the test can't overflow. -; 5102 : if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { -; 5103 : return stbi__errpuc("bad offset", "Corrupt BMP"); -; 5104 : } -; 5105 : else { -; 5106 : stbi__skip(s, info.offset - bytes_read_so_far); -; 5107 : } -; 5108 : } -; 5109 : -; 5110 : if (info.bpp == 24 && ma == 0xff000000) -; 5111 : s->img_n = 3; -; 5112 : else -; 5113 : s->img_n = ma ? 4 : 3; -; 5114 : if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 -; 5115 : target = req_comp; -; 5116 : else -; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert -; 5118 : -; 5119 : // sanity-check size -; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) -; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); -; 5122 : -; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); -; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5125 : if (info.bpp < 16) { -; 5126 : int z = 0; -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } -; 5128 : for (i = 0; i < psize; ++i) { -; 5129 : pal[i][2] = stbi__get8(s); -; 5130 : pal[i][1] = stbi__get8(s); -; 5131 : pal[i][0] = stbi__get8(s); -; 5132 : if (info.hsz != 12) stbi__get8(s); -; 5133 : pal[i][3] = 255; -; 5134 : } -; 5135 : stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); -; 5136 : if (info.bpp == 1) width = (s->img_x + 7) >> 3; -; 5137 : else if (info.bpp == 4) width = (s->img_x + 1) >> 1; -; 5138 : else if (info.bpp == 8) width = s->img_x; -; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } -; 5140 : pad = (-width) & 3; -; 5141 : if (info.bpp == 1) { -; 5142 : for (j = 0; j < (int)s->img_y; ++j) { -; 5143 : int bit_offset = 7, v = stbi__get8(s); -; 5144 : for (i = 0; i < (int)s->img_x; ++i) { -; 5145 : int color = (v >> bit_offset) & 0x1; -; 5146 : out[z++] = pal[color][0]; -; 5147 : out[z++] = pal[color][1]; -; 5148 : out[z++] = pal[color][2]; -; 5149 : if (target == 4) out[z++] = 255; -; 5150 : if (i + 1 == (int)s->img_x) break; -; 5151 : if ((--bit_offset) < 0) { -; 5152 : bit_offset = 7; -; 5153 : v = stbi__get8(s); -; 5154 : } -; 5155 : } -; 5156 : stbi__skip(s, pad); -; 5157 : } -; 5158 : } -; 5159 : else { -; 5160 : for (j = 0; j < (int)s->img_y; ++j) { -; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { -; 5162 : int v = stbi__get8(s), v2 = 0; -; 5163 : if (info.bpp == 4) { -; 5164 : v2 = v & 15; -; 5165 : v >>= 4; -; 5166 : } -; 5167 : out[z++] = pal[v][0]; -; 5168 : out[z++] = pal[v][1]; -; 5169 : out[z++] = pal[v][2]; -; 5170 : if (target == 4) out[z++] = 255; -; 5171 : if (i + 1 == (int)s->img_x) break; -; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; -; 5173 : out[z++] = pal[v][0]; -; 5174 : out[z++] = pal[v][1]; -; 5175 : out[z++] = pal[v][2]; -; 5176 : if (target == 4) out[z++] = 255; -; 5177 : } -; 5178 : stbi__skip(s, pad); -; 5179 : } -; 5180 : } -; 5181 : } -; 5182 : else { -; 5183 : int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0; -; 5184 : int z = 0; -; 5185 : int easy = 0; -; 5186 : stbi__skip(s, info.offset - info.extra_read - info.hsz); -; 5187 : if (info.bpp == 24) width = 3 * s->img_x; -; 5188 : else if (info.bpp == 16) width = 2 * s->img_x; -; 5189 : else /* bpp = 32 and pad = 0 */ width = 0; -; 5190 : pad = (-width) & 3; -; 5191 : if (info.bpp == 24) { -; 5192 : easy = 1; -; 5193 : } -; 5194 : else if (info.bpp == 32) { -; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) -; 5196 : easy = 2; -; 5197 : } -; 5198 : if (!easy) { -; 5199 : if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); -; 5205 : if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5206 : } -; 5207 : for (j = 0; j < (int)s->img_y; ++j) { -; 5208 : if (easy) { -; 5209 : for (i = 0; i < (int)s->img_x; ++i) { -; 5210 : unsigned char a; -; 5211 : out[z + 2] = stbi__get8(s); -; 5212 : out[z + 1] = stbi__get8(s); -; 5213 : out[z + 0] = stbi__get8(s); -; 5214 : z += 3; -; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); -; 5216 : all_a |= a; -; 5217 : if (target == 4) out[z++] = a; -; 5218 : } -; 5219 : } -; 5220 : else { -; 5221 : int bpp = info.bpp; -; 5222 : for (i = 0; i < (int)s->img_x; ++i) { -; 5223 : stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s)); -; 5224 : unsigned int a; -; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); -; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); -; 5229 : all_a |= a; -; 5230 : if (target == 4) out[z++] = STBI__BYTECAST(a); -; 5231 : } -; 5232 : } -; 5233 : stbi__skip(s, pad); -; 5234 : } -; 5235 : } -; 5236 : -; 5237 : // if alpha channel is all 0s, replace with all 255s -; 5238 : if (target == 4 && all_a == 0) -; 5239 : for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4) -; 5240 : out[i] = 255; -; 5241 : -; 5242 : if (flip_vertically) { -; 5243 : stbi_uc t; -; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { -; 5245 : stbi_uc* p1 = out + j * s->img_x * target; -; 5246 : stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target; -; 5247 : for (i = 0; i < (int)s->img_x * target; ++i) { -; 5248 : t = p1[i]; p1[i] = p2[i]; p2[i] = t; -; 5249 : } -; 5250 : } -; 5251 : } -; 5252 : -; 5253 : if (req_comp && req_comp != target) { -; 5254 : out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); -; 5255 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5256 : } -; 5257 : -; 5258 : *x = s->img_x; -; 5259 : *y = s->img_y; -; 5260 : if (comp) *comp = s->img_n; -; 5261 : return out; -; 5262 : } -; 5263 : #endif -; 5264 : -; 5265 : // Targa Truevision - TGA -; 5266 : // by Jonathan Dummer -; 5267 : #ifndef STBI_NO_TGA -; 5268 : // returns STBI_rgb or whatever, 0 on error -; 5269 : static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -; 5270 : { -; 5271 : // only RGB or RGBA (incl. 16bit) or grey allowed -; 5272 : if (is_rgb16) *is_rgb16 = 0; -; 5273 : switch (bits_per_pixel) { -; 5274 : case 8: return STBI_grey; -; 5275 : case 16: if (is_grey) return STBI_grey_alpha; -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; -; 5278 : return STBI_rgb; -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; -; 5281 : default: return 0; -; 5282 : } -; 5283 : } -; 5284 : -; 5285 : static int stbi__tga_info(stbi__context* s, int* x, int* y, int* comp) -; 5286 : { -; 5287 : int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; -; 5288 : int sz, tga_colormap_type; -; 5289 : stbi__get8(s); // discard Offset -; 5290 : tga_colormap_type = stbi__get8(s); // colormap type -; 5291 : if (tga_colormap_type > 1) { -; 5292 : stbi__rewind(s); -; 5293 : return 0; // only RGB or indexed allowed -; 5294 : } -; 5295 : tga_image_type = stbi__get8(s); // image type -; 5296 : if (tga_colormap_type == 1) { // colormapped (paletted) image -; 5297 : if (tga_image_type != 1 && tga_image_type != 9) { -; 5298 : stbi__rewind(s); -; 5299 : return 0; -; 5300 : } -; 5301 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5302 : sz = stbi__get8(s); // check bits per palette color entry -; 5303 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) { -; 5304 : stbi__rewind(s); -; 5305 : return 0; -; 5306 : } -; 5307 : stbi__skip(s, 4); // skip image x and y origin -; 5308 : tga_colormap_bpp = sz; -; 5309 : } -; 5310 : else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE -; 5311 : if ((tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11)) { -; 5312 : stbi__rewind(s); -; 5313 : return 0; // only RGB or grey allowed, +/- RLE -; 5314 : } -; 5315 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5316 : tga_colormap_bpp = 0; -; 5317 : } -; 5318 : tga_w = stbi__get16le(s); -; 5319 : if (tga_w < 1) { -; 5320 : stbi__rewind(s); -; 5321 : return 0; // test width -; 5322 : } -; 5323 : tga_h = stbi__get16le(s); -; 5324 : if (tga_h < 1) { -; 5325 : stbi__rewind(s); -; 5326 : return 0; // test height -; 5327 : } -; 5328 : tga_bits_per_pixel = stbi__get8(s); // bits per pixel -; 5329 : stbi__get8(s); // ignore alpha bits -; 5330 : if (tga_colormap_bpp != 0) { -; 5331 : if ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { -; 5332 : // when using a colormap, tga_bits_per_pixel is the size of the indexes -; 5333 : // I don't think anything but 8 or 16bit indexes makes sense -; 5334 : stbi__rewind(s); -; 5335 : return 0; -; 5336 : } -; 5337 : tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); -; 5338 : } -; 5339 : else { -; 5340 : tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); -; 5341 : } -; 5342 : if (!tga_comp) { -; 5343 : stbi__rewind(s); -; 5344 : return 0; -; 5345 : } -; 5346 : if (x) *x = tga_w; -; 5347 : if (y) *y = tga_h; -; 5348 : if (comp) *comp = tga_comp; -; 5349 : return 1; // seems to have passed everything -; 5350 : } -; 5351 : -; 5352 : static int stbi__tga_test(stbi__context* s) -; 5353 : { -; 5354 : int res = 0; -; 5355 : int sz, tga_color_type; -; 5356 : stbi__get8(s); // discard Offset -; 5357 : tga_color_type = stbi__get8(s); // color type -; 5358 : if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed -; 5359 : sz = stbi__get8(s); // image type -; 5360 : if (tga_color_type == 1) { // colormapped (paletted) image -; 5361 : if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 -; 5362 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5363 : sz = stbi__get8(s); // check bits per palette color entry -; 5364 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5365 : stbi__skip(s, 4); // skip image x and y origin -; 5366 : } -; 5367 : else { // "normal" image w/o colormap -; 5368 : if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE -; 5369 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5370 : } -; 5371 : if (stbi__get16le(s) < 1) goto errorEnd; // test width -; 5372 : if (stbi__get16le(s) < 1) goto errorEnd; // test height -; 5373 : sz = stbi__get8(s); // bits per pixel -; 5374 : if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index -; 5375 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5376 : -; 5377 : res = 1; // if we got this far, everything's good and we can return 1 instead of 0 -; 5378 : -; 5379 : errorEnd: -; 5380 : stbi__rewind(s); -; 5381 : return res; -; 5382 : } -; 5383 : -; 5384 : // read 16bit value and convert to 24bit RGB -; 5385 : static void stbi__tga_read_rgb16(stbi__context* s, stbi_uc* out) -; 5386 : { -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); -; 5397 : -; 5398 : // some people claim that the most significant bit might be used for alpha -; 5399 : // (possibly if an alpha-bit is set in the "image descriptor byte") -; 5400 : // but that only made 16bit test images completely translucent.. -; 5401 : // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -; 5402 : } -; 5403 : -; 5404 : static void* stbi__tga_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5405 : { -; 5406 : // read in the TGA header stuff -; 5407 : int tga_offset = stbi__get8(s); -; 5408 : int tga_indexed = stbi__get8(s); -; 5409 : int tga_image_type = stbi__get8(s); -; 5410 : int tga_is_RLE = 0; -; 5411 : int tga_palette_start = stbi__get16le(s); -; 5412 : int tga_palette_len = stbi__get16le(s); -; 5413 : int tga_palette_bits = stbi__get8(s); -; 5414 : int tga_x_origin = stbi__get16le(s); -; 5415 : int tga_y_origin = stbi__get16le(s); -; 5416 : int tga_width = stbi__get16le(s); -; 5417 : int tga_height = stbi__get16le(s); -; 5418 : int tga_bits_per_pixel = stbi__get8(s); -; 5419 : int tga_comp, tga_rgb16 = 0; -; 5420 : int tga_inverted = stbi__get8(s); -; 5421 : // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) -; 5422 : // image data -; 5423 : unsigned char* tga_data; -; 5424 : unsigned char* tga_palette = NULL; -; 5425 : int i, j; -; 5426 : unsigned char raw_data[4] = { 0 }; -; 5427 : int RLE_count = 0; -; 5428 : int RLE_repeating = 0; -; 5429 : int read_next_pixel = 1; -; 5430 : STBI_NOTUSED(ri); -; 5431 : STBI_NOTUSED(tga_x_origin); // @TODO -; 5432 : STBI_NOTUSED(tga_y_origin); // @TODO -; 5433 : -; 5434 : if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5435 : if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5436 : -; 5437 : // do a tiny bit of precessing -; 5438 : if (tga_image_type >= 8) -; 5439 : { -; 5440 : tga_image_type -= 8; -; 5441 : tga_is_RLE = 1; -; 5442 : } -; 5443 : tga_inverted = 1 - ((tga_inverted >> 5) & 1); -; 5444 : -; 5445 : // If I'm paletted, then I'll use the number of bits from the palette -; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); -; 5447 : else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); -; 5448 : -; 5449 : if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency -; 5450 : return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); -; 5451 : -; 5452 : // tga info -; 5453 : *x = tga_width; -; 5454 : *y = tga_height; -; 5455 : if (comp) *comp = tga_comp; -; 5456 : -; 5457 : if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) -; 5458 : return stbi__errpuc("too large", "Corrupt TGA"); -; 5459 : -; 5460 : tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); -; 5461 : if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); -; 5462 : -; 5463 : // skip to the data's starting position (offset usually = 0) -; 5464 : stbi__skip(s, tga_offset); -; 5465 : -; 5466 : if (!tga_indexed && !tga_is_RLE && !tga_rgb16) { -; 5467 : for (i = 0; i < tga_height; ++i) { -; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; -; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; -; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); -; 5471 : } -; 5472 : } -; 5473 : else { -; 5474 : // do I need to load a palette? -; 5475 : if (tga_indexed) -; 5476 : { -; 5477 : if (tga_palette_len == 0) { /* you have to have at least one entry! */ -; 5478 : STBI_FREE(tga_data); -; 5479 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5480 : } -; 5481 : -; 5482 : // any data to skip? (offset usually = 0) -; 5483 : stbi__skip(s, tga_palette_start); -; 5484 : // load the palette -; 5485 : tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); -; 5486 : if (!tga_palette) { -; 5487 : STBI_FREE(tga_data); -; 5488 : return stbi__errpuc("outofmem", "Out of memory"); -; 5489 : } -; 5490 : if (tga_rgb16) { -; 5491 : stbi_uc* pal_entry = tga_palette; -; 5492 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5493 : for (i = 0; i < tga_palette_len; ++i) { -; 5494 : stbi__tga_read_rgb16(s, pal_entry); -; 5495 : pal_entry += tga_comp; -; 5496 : } -; 5497 : } -; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { -; 5499 : STBI_FREE(tga_data); -; 5500 : STBI_FREE(tga_palette); -; 5501 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) -; 5506 : { -; 5507 : // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? -; 5508 : if (tga_is_RLE) -; 5509 : { -; 5510 : if (RLE_count == 0) -; 5511 : { -; 5512 : // yep, get the next byte as a RLE command -; 5513 : int RLE_cmd = stbi__get8(s); -; 5514 : RLE_count = 1 + (RLE_cmd & 127); -; 5515 : RLE_repeating = RLE_cmd >> 7; -; 5516 : read_next_pixel = 1; -; 5517 : } -; 5518 : else if (!RLE_repeating) -; 5519 : { -; 5520 : read_next_pixel = 1; -; 5521 : } -; 5522 : } -; 5523 : else -; 5524 : { -; 5525 : read_next_pixel = 1; -; 5526 : } -; 5527 : // OK, if I need to read a pixel, do it now -; 5528 : if (read_next_pixel) -; 5529 : { -; 5530 : // load however much data we did have -; 5531 : if (tga_indexed) -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); -; 5535 : if (pal_idx >= tga_palette_len) { -; 5536 : // invalid index -; 5537 : pal_idx = 0; -; 5538 : } -; 5539 : pal_idx *= tga_comp; -; 5540 : for (j = 0; j < tga_comp; ++j) { -; 5541 : raw_data[j] = tga_palette[pal_idx + j]; -; 5542 : } -; 5543 : } -; 5544 : else if (tga_rgb16) { -; 5545 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5546 : stbi__tga_read_rgb16(s, raw_data); -; 5547 : } -; 5548 : else { -; 5549 : // read in the data raw -; 5550 : for (j = 0; j < tga_comp; ++j) { -; 5551 : raw_data[j] = stbi__get8(s); -; 5552 : } -; 5553 : } -; 5554 : // clear the reading flag for the next pixel -; 5555 : read_next_pixel = 0; -; 5556 : } // end of reading a pixel -; 5557 : -; 5558 : // copy data -; 5559 : for (j = 0; j < tga_comp; ++j) -; 5560 : tga_data[i * tga_comp + j] = raw_data[j]; -; 5561 : -; 5562 : // in case we're in RLE mode, keep counting down -; 5563 : --RLE_count; -; 5564 : } -; 5565 : // do I need to invert the image? -; 5566 : if (tga_inverted) -; 5567 : { -; 5568 : for (j = 0; j * 2 < tga_height; ++j) -; 5569 : { -; 5570 : int index1 = j * tga_width * tga_comp; -; 5571 : int index2 = (tga_height - 1 - j) * tga_width * tga_comp; -; 5572 : for (i = tga_width * tga_comp; i > 0; --i) -; 5573 : { -; 5574 : unsigned char temp = tga_data[index1]; -; 5575 : tga_data[index1] = tga_data[index2]; -; 5576 : tga_data[index2] = temp; -; 5577 : ++index1; -; 5578 : ++index2; -; 5579 : } -; 5580 : } -; 5581 : } -; 5582 : // clear my palette, if I had one -; 5583 : if (tga_palette != NULL) -; 5584 : { -; 5585 : STBI_FREE(tga_palette); -; 5586 : } -; 5587 : } -; 5588 : -; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order -; 5590 : if (tga_comp >= 3 && !tga_rgb16) -; 5591 : { -; 5592 : unsigned char* tga_pixel = tga_data; -; 5593 : for (i = 0; i < tga_width * tga_height; ++i) -; 5594 : { -; 5595 : unsigned char temp = tga_pixel[0]; -; 5596 : tga_pixel[0] = tga_pixel[2]; -; 5597 : tga_pixel[2] = temp; -; 5598 : tga_pixel += tga_comp; -; 5599 : } -; 5600 : } -; 5601 : -; 5602 : // convert to target component count -; 5603 : if (req_comp && req_comp != tga_comp) -; 5604 : tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); -; 5605 : -; 5606 : // the things I do to get rid of an error message, and yet keep -; 5607 : // Microsoft's C compilers happy... [8^( -; 5608 : tga_palette_start = tga_palette_len = tga_palette_bits = -; 5609 : tga_x_origin = tga_y_origin = 0; -; 5610 : STBI_NOTUSED(tga_palette_start); -; 5611 : // OK, done -; 5612 : return tga_data; -; 5613 : } -; 5614 : #endif -; 5615 : -; 5616 : // ************************************************************************************************* -; 5617 : // Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB -; 5618 : -; 5619 : #ifndef STBI_NO_PSD -; 5620 : static int stbi__psd_test(stbi__context* s) -; 5621 : { -; 5622 : int r = (stbi__get32be(s) == 0x38425053); -; 5623 : stbi__rewind(s); -; 5624 : return r; -; 5625 : } -; 5626 : -; 5627 : static int stbi__psd_decode_rle(stbi__context* s, stbi_uc* p, int pixelCount) -; 5628 : { -; 5629 : int count, nleft, len; -; 5630 : -; 5631 : count = 0; -; 5632 : while ((nleft = pixelCount - count) > 0) { -; 5633 : len = stbi__get8(s); -; 5634 : if (len == 128) { -; 5635 : // No-op. -; 5636 : } -; 5637 : else if (len < 128) { -; 5638 : // Copy next len+1 bytes literally. -; 5639 : len++; -; 5640 : if (len > nleft) return 0; // corrupt data -; 5641 : count += len; -; 5642 : while (len) { -; 5643 : *p = stbi__get8(s); -; 5644 : p += 4; -; 5645 : len--; -; 5646 : } -; 5647 : } -; 5648 : else if (len > 128) { -; 5649 : stbi_uc val; -; 5650 : // Next -len+1 bytes in the dest are replicated from next source byte. -; 5651 : // (Interpret len as a negative 8-bit int.) -; 5652 : len = 257 - len; -; 5653 : if (len > nleft) return 0; // corrupt data -; 5654 : val = stbi__get8(s); -; 5655 : count += len; -; 5656 : while (len) { -; 5657 : *p = val; -; 5658 : p += 4; -; 5659 : len--; -; 5660 : } -; 5661 : } -; 5662 : } -; 5663 : -; 5664 : return 1; -; 5665 : } -; 5666 : -; 5667 : static void* stbi__psd_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc) -; 5668 : { -; 5669 : int pixelCount; -; 5670 : int channelCount, compression; -; 5671 : int channel, i; -; 5672 : int bitdepth; -; 5673 : int w, h; -; 5674 : stbi_uc* out; -; 5675 : STBI_NOTUSED(ri); -; 5676 : -; 5677 : // Check identifier -; 5678 : if (stbi__get32be(s) != 0x38425053) // "8BPS" -; 5679 : return stbi__errpuc("not PSD", "Corrupt PSD image"); -; 5680 : -; 5681 : // Check file type version. -; 5682 : if (stbi__get16be(s) != 1) -; 5683 : return stbi__errpuc("wrong version", "Unsupported version of PSD image"); -; 5684 : -; 5685 : // Skip 6 reserved bytes. -; 5686 : stbi__skip(s, 6); -; 5687 : -; 5688 : // Read the number of channels (R, G, B, A, etc). -; 5689 : channelCount = stbi__get16be(s); -; 5690 : if (channelCount < 0 || channelCount > 16) -; 5691 : return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); -; 5692 : -; 5693 : // Read the rows and columns of the image. -; 5694 : h = stbi__get32be(s); -; 5695 : w = stbi__get32be(s); -; 5696 : -; 5697 : if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5698 : if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5699 : -; 5700 : // Make sure the depth is 8 bits. -; 5701 : bitdepth = stbi__get16be(s); -; 5702 : if (bitdepth != 8 && bitdepth != 16) -; 5703 : return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); -; 5704 : -; 5705 : // Make sure the color mode is RGB. -; 5706 : // Valid options are: -; 5707 : // 0: Bitmap -; 5708 : // 1: Grayscale -; 5709 : // 2: Indexed color -; 5710 : // 3: RGB color -; 5711 : // 4: CMYK color -; 5712 : // 7: Multichannel -; 5713 : // 8: Duotone -; 5714 : // 9: Lab color -; 5715 : if (stbi__get16be(s) != 3) -; 5716 : return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); -; 5717 : -; 5718 : // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) -; 5719 : stbi__skip(s, stbi__get32be(s)); -; 5720 : -; 5721 : // Skip the image resources. (resolution, pen tool paths, etc) -; 5722 : stbi__skip(s, stbi__get32be(s)); -; 5723 : -; 5724 : // Skip the reserved data. -; 5725 : stbi__skip(s, stbi__get32be(s)); -; 5726 : -; 5727 : // Find out if the data is compressed. -; 5728 : // Known values: -; 5729 : // 0: no compression -; 5730 : // 1: RLE compressed -; 5731 : compression = stbi__get16be(s); -; 5732 : if (compression > 1) -; 5733 : return stbi__errpuc("bad compression", "PSD has an unknown compression format"); -; 5734 : -; 5735 : // Check size -; 5736 : if (!stbi__mad3sizes_valid(4, w, h, 0)) -; 5737 : return stbi__errpuc("too large", "Corrupt PSD"); -; 5738 : -; 5739 : // Create the destination image. -; 5740 : -; 5741 : if (!compression && bitdepth == 16 && bpc == 16) { -; 5742 : out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0); -; 5743 : ri->bits_per_channel = 16; -; 5744 : } -; 5745 : else -; 5746 : out = (stbi_uc*)stbi__malloc(4 * w * h); -; 5747 : -; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5749 : pixelCount = w * h; -; 5750 : -; 5751 : // Initialize the data to zero. -; 5752 : //memset( out, 0, pixelCount * 4 ); -; 5753 : -; 5754 : // Finally, the image data. -; 5755 : if (compression) { -; 5756 : // RLE as used by .PSD and .TIFF -; 5757 : // Loop until you get the number of unpacked bytes you are expecting: -; 5758 : // Read the next source byte into n. -; 5759 : // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. -; 5760 : // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. -; 5761 : // Else if n is 128, noop. -; 5762 : // Endloop -; 5763 : -; 5764 : // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, -; 5765 : // which we're going to just skip. -; 5766 : stbi__skip(s, h * channelCount * 2); -; 5767 : -; 5768 : // Read the RLE data by channel. -; 5769 : for (channel = 0; channel < 4; channel++) { -; 5770 : stbi_uc* p; -; 5771 : -; 5772 : p = out + channel; -; 5773 : if (channel >= channelCount) { -; 5774 : // Fill this channel with default data. -; 5775 : for (i = 0; i < pixelCount; i++, p += 4) -; 5776 : *p = (channel == 3 ? 255 : 0); -; 5777 : } -; 5778 : else { -; 5779 : // Read the RLE data. -; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { -; 5781 : STBI_FREE(out); -; 5782 : return stbi__errpuc("corrupt", "bad RLE data"); -; 5783 : } -; 5784 : } -; 5785 : } -; 5786 : } -; 5787 : else { -; 5788 : // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) -; 5789 : // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. -; 5790 : -; 5791 : // Read the data by channel. -; 5792 : for (channel = 0; channel < 4; channel++) { -; 5793 : if (channel >= channelCount) { -; 5794 : // Fill this channel with default data. -; 5795 : if (bitdepth == 16 && bpc == 16) { -; 5796 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5797 : stbi__uint16 val = channel == 3 ? 65535 : 0; -; 5798 : for (i = 0; i < pixelCount; i++, q += 4) -; 5799 : *q = val; -; 5800 : } -; 5801 : else { -; 5802 : stbi_uc* p = out + channel; -; 5803 : stbi_uc val = channel == 3 ? 255 : 0; -; 5804 : for (i = 0; i < pixelCount; i++, p += 4) -; 5805 : *p = val; -; 5806 : } -; 5807 : } -; 5808 : else { -; 5809 : if (ri->bits_per_channel == 16) { // output bpc -; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5811 : for (i = 0; i < pixelCount; i++, q += 4) -; 5812 : *q = (stbi__uint16)stbi__get16be(s); -; 5813 : } -; 5814 : else { -; 5815 : stbi_uc* p = out + channel; -; 5816 : if (bitdepth == 16) { // input bpc -; 5817 : for (i = 0; i < pixelCount; i++, p += 4) -; 5818 : *p = (stbi_uc)(stbi__get16be(s) >> 8); -; 5819 : } -; 5820 : else { -; 5821 : for (i = 0; i < pixelCount; i++, p += 4) -; 5822 : *p = stbi__get8(s); -; 5823 : } -; 5824 : } -; 5825 : } -; 5826 : } -; 5827 : } -; 5828 : -; 5829 : // remove weird white matte from PSD -; 5830 : if (channelCount >= 4) { -; 5831 : if (ri->bits_per_channel == 16) { -; 5832 : for (i = 0; i < w * h; ++i) { -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); -; 5841 : } -; 5842 : } -; 5843 : } -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); -; 5854 : } -; 5855 : } -; 5856 : } -; 5857 : } -; 5858 : -; 5859 : // convert to desired output format -; 5860 : if (req_comp && req_comp != 4) { -; 5861 : if (ri->bits_per_channel == 16) -; 5862 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h); -; 5863 : else -; 5864 : out = stbi__convert_format(out, 4, req_comp, w, h); -; 5865 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5866 : } -; 5867 : -; 5868 : if (comp) *comp = 4; -; 5869 : *y = h; -; 5870 : *x = w; -; 5871 : -; 5872 : return out; -; 5873 : } -; 5874 : #endif -; 5875 : -; 5876 : // ************************************************************************************************* -; 5877 : // Softimage PIC loader -; 5878 : // by Tom Seddon -; 5879 : // -; 5880 : // See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -; 5881 : // See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ -; 5882 : -; 5883 : #ifndef STBI_NO_PIC -; 5884 : static int stbi__pic_is4(stbi__context* s, const char* str) -; 5885 : { -; 5886 : int i; -; 5887 : for (i = 0; i < 4; ++i) -; 5888 : if (stbi__get8(s) != (stbi_uc)str[i]) -; 5889 : return 0; -; 5890 : -; 5891 : return 1; -; 5892 : } -; 5893 : -; 5894 : static int stbi__pic_test_core(stbi__context* s) -; 5895 : { -; 5896 : int i; -; 5897 : -; 5898 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) -; 5899 : return 0; -; 5900 : -; 5901 : for (i = 0; i < 84; ++i) -; 5902 : stbi__get8(s); -; 5903 : -; 5904 : if (!stbi__pic_is4(s, "PICT")) -; 5905 : return 0; -; 5906 : -; 5907 : return 1; -; 5908 : } -; 5909 : -; 5910 : typedef struct -; 5911 : { -; 5912 : stbi_uc size, type, channel; -; 5913 : } stbi__pic_packet; -; 5914 : -; 5915 : static stbi_uc* stbi__readval(stbi__context* s, int channel, stbi_uc* dest) -; 5916 : { -; 5917 : int mask = 0x80, i; -; 5918 : -; 5919 : for (i = 0; i < 4; ++i, mask >>= 1) { -; 5920 : if (channel & mask) { -; 5921 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "PIC file too short"); -; 5922 : dest[i] = stbi__get8(s); -; 5923 : } -; 5924 : } -; 5925 : -; 5926 : return dest; -; 5927 : } -; 5928 : -; 5929 : static void stbi__copyval(int channel, stbi_uc* dest, const stbi_uc* src) -; 5930 : { -; 5931 : int mask = 0x80, i; -; 5932 : -; 5933 : for (i = 0; i < 4; ++i, mask >>= 1) -; 5934 : if (channel & mask) - +; Line 5934 004ae 40 f6 c6 10 test sil, 16 004b2 74 03 je SHORT $LN161@stbi__pic_ - -; 5935 : dest[i] = src[i]; - +; Line 5935 004b4 88 53 03 mov BYTE PTR [rbx+3], dl $LN161@stbi__pic_: - -; 6000 : -; 6001 : for (i = 0; i < count; ++i, dest += 4) - +; Line 6001 004b7 48 83 c3 04 add rbx, 4 004bb 48 83 e9 01 sub rcx, 1 004bf 75 d2 jne SHORT $LL20@stbi__pic_ $LN19@stbi__pic_: - -; 6003 : left -= count; - +; Line 6003 004c1 40 0f b6 c5 movzx eax, bpl 004c5 44 2b f0 sub r14d, eax 004c8 45 85 f6 test r14d, r14d 004cb 0f 8f ff fe ff ff jg $LL16@stbi__pic_ - -; 5989 : -; 5990 : while (left > 0) { - +; Line 5990 004d1 eb 2e jmp SHORT $LN8@stbi__pic_ $LN33@stbi__pic_: - -; 5974 : default: -; 5975 : return stbi__errpuc("bad format", "packet has bad compression type"); -; 5976 : -; 5977 : case 0: {//uncompressed -; 5978 : int x; -; 5979 : -; 5980 : for (x = 0; x < width; ++x, dest += 4) - +; Line 5980 004d3 33 f6 xor esi, esi 004d5 45 85 ed test r13d, r13d 004d8 7e 27 jle SHORT $LN8@stbi__pic_ 004da 41 0f b6 2c 24 movzx ebp, BYTE PTR [r12] 004df 90 npad 1 $LL15@stbi__pic_: - -; 5981 : if (!stbi__readval(s, packet->channel, dest)) - +; Line 5981 004e0 4c 8b c3 mov r8, rbx 004e3 8b d5 mov edx, ebp 004e5 48 8b cf mov rcx, rdi @@ -84333,44 +32696,29 @@ $LL15@stbi__pic_: 004ed 48 85 c0 test rax, rax 004f0 0f 84 a2 00 00 00 je $LN139@stbi__pic_ - -; 5974 : default: -; 5975 : return stbi__errpuc("bad format", "packet has bad compression type"); -; 5976 : -; 5977 : case 0: {//uncompressed -; 5978 : int x; -; 5979 : -; 5980 : for (x = 0; x < width; ++x, dest += 4) - +; Line 5980 004f6 ff c6 inc esi 004f8 48 83 c3 04 add rbx, 4 004fc 41 3b f5 cmp esi, r13d 004ff 7c df jl SHORT $LL15@stbi__pic_ $LN8@stbi__pic_: - -; 5967 : int packet_idx; -; 5968 : -; 5969 : for (packet_idx = 0; packet_idx < num_packets; ++packet_idx) { - - 00501 48 8b 44 24 38 mov rax, QWORD PTR $T10[rsp] +; Line 5969 + 00501 48 8b 44 24 38 mov rax, QWORD PTR $T2[rsp] 00506 49 83 c4 03 add r12, 3 0050a 48 ff c0 inc rax - 0050d 48 3b 44 24 30 cmp rax, QWORD PTR $T9[rsp] - 00512 48 89 44 24 38 mov QWORD PTR $T10[rsp], rax + 0050d 48 3b 44 24 30 cmp rax, QWORD PTR $T1[rsp] + 00512 48 89 44 24 38 mov QWORD PTR $T2[rsp], rax 00517 48 8b 44 24 48 mov rax, QWORD PTR tv1705[rsp] 0051c 0f 8c 02 fd ff ff jl $LL10@stbi__pic_ - 00522 48 8b 44 24 30 mov rax, QWORD PTR $T9[rsp] + 00522 48 8b 44 24 30 mov rax, QWORD PTR $T1[rsp] 00527 46 8d 04 ad 00 00 00 00 lea r8d, DWORD PTR [r13*4] 0052f 8b 4c 24 24 mov ecx, DWORD PTR y$1$[rsp] 00533 8b 54 24 28 mov edx, DWORD PTR tv1687[rsp] 00537 44 8b 4c 24 20 mov r9d, DWORD PTR height$1$[rsp] $LN5@stbi__pic_: - -; 5965 : -; 5966 : for (y = 0; y < height; ++y) { - +; Line 5966 0053c ff c1 inc ecx 0053e 41 03 d0 add edx, r8d 00541 89 4c 24 24 mov DWORD PTR y$1$[rsp], ecx @@ -84379,22 +32727,11 @@ $LN5@stbi__pic_: 0054c 0f 8c ae fc ff ff jl $LL7@stbi__pic_ $LN202@stbi__pic_: - -; 6039 : } -; 6040 : break; -; 6041 : } -; 6042 : } -; 6043 : } -; 6044 : } -; 6045 : -; 6046 : return result; - +; Line 6046 00552 48 8b 44 24 40 mov rax, QWORD PTR result$GSCopy$1$[rsp] 00557 eb 41 jmp SHORT $LN1@stbi__pic_ $LN134@stbi__pic_: - -; 6047 : } - +; Line 6047 00559 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0055f 65 48 8b 04 25 @@ -84437,7 +32774,6 @@ $LN1@stbi__pic_: stbi__pic_load_core ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__pic_load _TEXT SEGMENT py$GSCopy$1$ = 48 @@ -84450,9 +32786,8 @@ comp$ = 184 req_comp$ = 192 ri$dead$ = 200 stbi__pic_load PROC ; COMDAT - -; 6050 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6050 00000 40 53 push rbx 00002 56 push rsi 00003 57 push rdi @@ -84466,15 +32801,7 @@ stbi__pic_load PROC ; COMDAT 00018 48 89 44 24 40 mov QWORD PTR __$ArrayPad$[rsp], rax 0001d 44 8b bc 24 c0 00 00 00 mov r15d, DWORD PTR req_comp$[rsp] - -; 6051 : stbi_uc* result; -; 6052 : int i, x, y, internal_comp; -; 6053 : STBI_NOTUSED(ri); -; 6054 : -; 6055 : if (!comp) comp = &internal_comp; -; 6056 : -; 6057 : for (i = 0; i < 92; ++i) - +; Line 6057 00025 4c 8d 64 24 38 lea r12, QWORD PTR internal_comp$[rsp] 0002a 4d 85 c9 test r9, r9 0002d 4c 89 44 24 30 mov QWORD PTR py$GSCopy$1$[rsp], r8 @@ -84486,73 +32813,44 @@ stbi__pic_load PROC ; COMDAT 66 66 0f 1f 84 00 00 00 00 00 npad 15 $LL4@stbi__pic_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00050 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00057 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0005e 73 0c jae SHORT $LN15@stbi__pic_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00060 48 ff c0 inc rax 00063 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0006a eb 15 jmp SHORT $LN2@stbi__pic_ $LN15@stbi__pic_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0006c 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00070 74 0f je SHORT $LN2@stbi__pic_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00072 48 8b cb mov rcx, rbx 00075 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0007a 48 ff 83 c0 00 00 00 inc QWORD PTR [rbx+192] $LN2@stbi__pic_: - -; 6051 : stbi_uc* result; -; 6052 : int i, x, y, internal_comp; -; 6053 : STBI_NOTUSED(ri); -; 6054 : -; 6055 : if (!comp) comp = &internal_comp; -; 6056 : -; 6057 : for (i = 0; i < 92; ++i) - +; Line 6057 00081 48 83 ef 01 sub rdi, 1 00085 75 c9 jne SHORT $LL4@stbi__pic_ - -; 6058 : stbi__get8(s); -; 6059 : -; 6060 : x = stbi__get16be(s); - +; Line 6060 00087 48 8b cb mov rcx, rbx 0008a e8 00 00 00 00 call stbi__get16be - -; 6061 : y = stbi__get16be(s); - +; Line 6061 0008f 48 8b cb mov rcx, rbx 00092 8b f0 mov esi, eax 00094 e8 00 00 00 00 call stbi__get16be 00099 8b f8 mov edi, eax - -; 6062 : -; 6063 : if (y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - +; Line 6063 0009b 3d 00 00 00 01 cmp eax, 16777216 ; 01000000H 000a0 7e 2a jle SHORT $LN6@stbi__pic_ $LN108@stbi__pic_: - -; 6088 : } - +; Line 6088 000a2 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 000a8 65 48 8b 04 25 @@ -84565,45 +32863,30 @@ $LN108@stbi__pic_: 000c5 33 c0 xor eax, eax 000c7 e9 7c 01 00 00 jmp $LN1@stbi__pic_ $LN6@stbi__pic_: - -; 6064 : if (x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - +; Line 6064 000cc 81 fe 00 00 00 01 cmp esi, 16777216 ; 01000000H 000d2 7f ce jg SHORT $LN108@stbi__pic_ - -; 1091 : if (s->io.read) { - +; Line 1091 000d4 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 000d9 74 11 je SHORT $LN25@stbi__pic_ - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 000db 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 000df ff 53 20 call QWORD PTR [rbx+32] 000e2 85 c0 test eax, eax 000e4 74 40 je SHORT $LN8@stbi__pic_ - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 000e6 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 000ea 74 10 je SHORT $LN85@stbi__pic_ $LN25@stbi__pic_: - -; 6065 : -; 6066 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (pic header)"); - +; Line 6066 000ec 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] 000f3 48 39 83 c0 00 00 00 cmp QWORD PTR [rbx+192], rax 000fa 72 2a jb SHORT $LN8@stbi__pic_ $LN85@stbi__pic_: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 000fc 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00102 65 48 8b 04 25 @@ -84613,51 +32896,35 @@ $LN85@stbi__pic_: 00114 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08GGMBIFE@bad?5file@ 0011b 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 6065 : -; 6066 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (pic header)"); - +; Line 6066 0011f 33 c0 xor eax, eax 00121 e9 22 01 00 00 jmp $LN1@stbi__pic_ $LN8@stbi__pic_: - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00126 85 f6 test esi, esi 00128 0f 88 74 ff ff ff js $LN108@stbi__pic_ 0012e 85 ff test edi, edi 00130 0f 88 6c ff ff ff js $LN108@stbi__pic_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 00136 74 10 je SHORT $LN84@stbi__pic_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 00138 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 0013d 99 cdq 0013e f7 ff idiv edi - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00140 3b f0 cmp esi, eax 00142 0f 8f 5a ff ff ff jg $LN108@stbi__pic_ $LN84@stbi__pic_: 00148 8b cf mov ecx, edi 0014a 0f af ce imul ecx, esi - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 0014d 85 c9 test ecx, ecx 0014f 0f 88 4d ff ff ff js $LN108@stbi__pic_ - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00155 81 f9 ff ff ff 1f cmp ecx, 536870911 ; 1fffffffH 0015b 0f 8f 41 ff ff @@ -84672,62 +32939,36 @@ $LN84@stbi__pic_: 0017e e8 00 00 00 00 call stbi__get16be 00183 48 8b cb mov rcx, rbx 00186 e8 00 00 00 00 call stbi__get16be - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 0018b 85 ff test edi, edi 0018d 74 0c je SHORT $LN51@stbi__pic_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 0018f b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00194 99 cdq 00195 f7 ff idiv edi - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00197 3b f0 cmp esi, eax 00199 7f 7e jg SHORT $LN79@stbi__pic_ $LN51@stbi__pic_: - -; 509 : return stbi__malloc(a * b * c + add); - +; Line 509 0019b 8b c7 mov eax, edi 0019d 0f af c6 imul eax, esi 001a0 c1 e0 02 shl eax, 2 001a3 4c 63 f0 movsxd r14, eax - -; 438 : return STBI_MALLOC(size); - +; Line 438 001a6 49 8b ce mov rcx, r14 001a9 ff 15 00 00 00 00 call QWORD PTR __imp_malloc 001af 48 8b e8 mov rbp, rax - -; 6067 : if (!stbi__mad3sizes_valid(x, y, 4, 0)) return stbi__errpuc("too large", "PIC image too large to decode"); -; 6068 : -; 6069 : stbi__get32be(s); //skip `ratio' -; 6070 : stbi__get16be(s); //skip `fields' -; 6071 : stbi__get16be(s); //skip `pad' -; 6072 : -; 6073 : // intermediate buffer is RGBA -; 6074 : result = (stbi_uc*)stbi__malloc_mad3(x, y, 4, 0); -; 6075 : if (!result) return stbi__errpuc("outofmem", "Out of memory"); - +; Line 6075 001b2 48 85 c0 test rax, rax 001b5 74 62 je SHORT $LN79@stbi__pic_ - -; 6076 : memset(result, 0xff, x * y * 4); - +; Line 6076 001b7 4d 8b c6 mov r8, r14 001ba ba ff 00 00 00 mov edx, 255 ; 000000ffH 001bf 48 8b c8 mov rcx, rax 001c2 e8 00 00 00 00 call memset - -; 6077 : -; 6078 : if (!stbi__pic_load_core(s, x, y, comp, result)) { - +; Line 6078 001c7 4d 8b cc mov r9, r12 001ca 48 89 6c 24 20 mov QWORD PTR [rsp+32], rbp 001cf 44 8b c7 mov r8d, edi @@ -84736,50 +32977,33 @@ $LN51@stbi__pic_: 001d7 e8 00 00 00 00 call stbi__pic_load_core 001dc 48 85 c0 test rax, rax 001df 75 0b jne SHORT $LN11@stbi__pic_ - -; 6079 : STBI_FREE(result); - +; Line 6079 001e1 48 8b cd mov rcx, rbp 001e4 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 6080 : result = 0; - +; Line 6080 001ea 33 ed xor ebp, ebp $LN11@stbi__pic_: - -; 6081 : } -; 6082 : *px = x; -; 6083 : *py = y; - +; Line 6083 001ec 48 8b 44 24 30 mov rax, QWORD PTR py$GSCopy$1$[rsp] 001f1 41 89 75 00 mov DWORD PTR [r13], esi 001f5 89 38 mov DWORD PTR [rax], edi - -; 6084 : if (req_comp == 0) req_comp = *comp; - +; Line 6084 001f7 45 85 ff test r15d, r15d 001fa 75 04 jne SHORT $LN12@stbi__pic_ 001fc 45 8b 3c 24 mov r15d, DWORD PTR [r12] $LN12@stbi__pic_: - -; 6085 : result = stbi__convert_format(result, 4, req_comp, x, y); - +; Line 6085 00200 44 8b ce mov r9d, esi 00203 89 7c 24 20 mov DWORD PTR [rsp+32], edi 00207 45 8b c7 mov r8d, r15d 0020a ba 04 00 00 00 mov edx, 4 0020f 48 8b cd mov rcx, rbp 00212 e8 00 00 00 00 call stbi__convert_format - -; 6086 : -; 6087 : return result; - +; Line 6087 00217 eb 25 jmp SHORT $LN107@stbi__pic_ $LN79@stbi__pic_: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00219 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0021f 65 48 8b 04 25 @@ -84789,25 +33013,13 @@ $LN79@stbi__pic_: 00231 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ 00238 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 6067 : if (!stbi__mad3sizes_valid(x, y, 4, 0)) return stbi__errpuc("too large", "PIC image too large to decode"); -; 6068 : -; 6069 : stbi__get32be(s); //skip `ratio' -; 6070 : stbi__get16be(s); //skip `fields' -; 6071 : stbi__get16be(s); //skip `pad' -; 6072 : -; 6073 : // intermediate buffer is RGBA -; 6074 : result = (stbi_uc*)stbi__malloc_mad3(x, y, 4, 0); -; 6075 : if (!result) return stbi__errpuc("outofmem", "Out of memory"); - +; Line 6075 0023c 33 c0 xor eax, eax $LN107@stbi__pic_: 0023e 48 8b 6c 24 60 mov rbp, QWORD PTR [rsp+96] 00243 4c 8b 74 24 58 mov r14, QWORD PTR [rsp+88] $LN1@stbi__pic_: - -; 6088 : } - +; Line 6088 00248 48 8b 4c 24 40 mov rcx, QWORD PTR __$ArrayPad$[rsp] 0024d 48 33 cc xor rcx, rsp 00250 e8 00 00 00 00 call __security_check_cookie @@ -84822,47 +33034,34 @@ $LN1@stbi__pic_: stbi__pic_load ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__pic_test _TEXT SEGMENT s$ = 64 stbi__pic_test PROC ; COMDAT - -; 6091 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6091 00000 48 89 5c 24 20 mov QWORD PTR [rsp+32], rbx 00005 55 push rbp 00006 41 56 push r14 00008 41 57 push r15 0000a 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 5898 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) - +; Line 5898 0000e 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_04KBFEPHFH@S?$IA?v4@ - -; 6091 : { - +; Line 6091 00015 48 8b e9 mov rbp, rcx - -; 5898 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) - +; Line 5898 00018 48 8d 99 c0 00 00 00 lea rbx, QWORD PTR [rcx+192] 0001f e8 00 00 00 00 call stbi__pic_is4 00024 85 c0 test eax, eax 00026 75 08 jne SHORT $LN7@stbi__pic_ - -; 5899 : return 0; - +; Line 5899 00028 45 33 ff xor r15d, r15d 0002b e9 b5 00 00 00 jmp $LN3@stbi__pic_ $LN7@stbi__pic_: 00030 48 89 7c 24 48 mov QWORD PTR [rsp+72], rdi - -; 5900 : -; 5901 : for (i = 0; i < 84; ++i) - +; Line 5901 00035 bf 54 00 00 00 mov edi, 84 ; 00000054H 0003a 4c 89 64 24 50 mov QWORD PTR [rsp+80], r12 0003f 48 89 74 24 40 mov QWORD PTR [rsp+64], rsi @@ -84870,40 +33069,28 @@ $LN7@stbi__pic_: 1f 84 00 00 00 00 00 npad 12 $LL6@stbi__pic_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00050 48 8b 03 mov rax, QWORD PTR [rbx] 00053 48 8d 75 30 lea rsi, QWORD PTR [rbp+48] 00057 48 3b 85 c8 00 00 00 cmp rax, QWORD PTR [rbp+200] 0005e 73 08 jae SHORT $LN11@stbi__pic_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00060 48 ff c0 inc rax 00063 48 89 03 mov QWORD PTR [rbx], rax 00066 eb 13 jmp SHORT $LN4@stbi__pic_ $LN11@stbi__pic_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00068 83 3e 00 cmp DWORD PTR [rsi], 0 0006b 74 0e je SHORT $LN4@stbi__pic_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0006d 48 8b cd mov rcx, rbp 00070 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00075 48 ff 03 inc QWORD PTR [rbx] 00078 48 8b 03 mov rax, QWORD PTR [rbx] $LN4@stbi__pic_: - -; 5901 : for (i = 0; i < 84; ++i) - +; Line 5901 0007b 48 83 ef 01 sub rdi, 1 0007f 75 cf jne SHORT $LL6@stbi__pic_ 00081 45 33 ff xor r15d, r15d @@ -84912,4862 +33099,40 @@ $LN4@stbi__pic_: 0008b 41 8b ff mov edi, r15d 0008e 66 90 npad 2 $LL17@stbi__pic_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00090 48 3b 85 c8 00 00 00 cmp rax, QWORD PTR [rbp+200] 00097 73 0b jae SHORT $LN21@stbi__pic_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00099 0f b6 08 movzx ecx, BYTE PTR [rax] 0009c 48 ff c0 inc rax 0009f 48 89 03 mov QWORD PTR [rbx], rax 000a2 eb 1d jmp SHORT $LN20@stbi__pic_ $LN21@stbi__pic_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000a4 44 39 3e cmp DWORD PTR [rsi], r15d 000a7 74 16 je SHORT $LN22@stbi__pic_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000a9 48 8b cd mov rcx, rbp 000ac e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000b1 48 8b 03 mov rax, QWORD PTR [rbx] 000b4 0f b6 08 movzx ecx, BYTE PTR [rax] 000b7 48 ff c0 inc rax 000ba 48 89 03 mov QWORD PTR [rbx], rax 000bd eb 02 jmp SHORT $LN20@stbi__pic_ $LN22@stbi__pic_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000bf 32 c9 xor cl, cl $LN20@stbi__pic_: - -; 5888 : if (stbi__get8(s) != (stbi_uc)str[i]) - +; Line 5888 000c1 42 3a 0c 27 cmp cl, BYTE PTR [rdi+r12] 000c5 75 0f jne SHORT $LN36@stbi__pic_ - -; 1084 : } -; 1085 : -; 1086 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_HDR) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1087 : // nothing -; 1088 : #else -; 1089 : stbi_inline static int stbi__at_eof(stbi__context* s) -; 1090 : { -; 1091 : if (s->io.read) { -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; -; 1096 : } -; 1097 : -; 1098 : return s->img_buffer >= s->img_buffer_end; -; 1099 : } -; 1100 : #endif -; 1101 : -; 1102 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) -; 1103 : // nothing -; 1104 : #else -; 1105 : static void stbi__skip(stbi__context* s, int n) -; 1106 : { -; 1107 : if (n == 0) return; // already there! -; 1108 : if (n < 0) { -; 1109 : s->img_buffer = s->img_buffer_end; -; 1110 : return; -; 1111 : } -; 1112 : if (s->io.read) { -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1114 : if (blen < n) { -; 1115 : s->img_buffer = s->img_buffer_end; -; 1116 : (s->io.skip)(s->io_user_data, n - blen); -; 1117 : return; -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; -; 1121 : } -; 1122 : #endif -; 1123 : -; 1124 : #if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) -; 1125 : // nothing -; 1126 : #else -; 1127 : static int stbi__getn(stbi__context* s, stbi_uc* buffer, int n) -; 1128 : { -; 1129 : if (s->io.read) { -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1131 : if (blen < n) { -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; -; 1139 : return res; -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { -; 1144 : memcpy(buffer, s->img_buffer, n); -; 1145 : s->img_buffer += n; -; 1146 : return 1; -; 1147 : } -; 1148 : else -; 1149 : return 0; -; 1150 : } -; 1151 : #endif -; 1152 : -; 1153 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1154 : // nothing -; 1155 : #else -; 1156 : static int stbi__get16be(stbi__context* s) -; 1157 : { -; 1158 : int z = stbi__get8(s); -; 1159 : return (z << 8) + stbi__get8(s); -; 1160 : } -; 1161 : #endif -; 1162 : -; 1163 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1164 : // nothing -; 1165 : #else -; 1166 : static stbi__uint32 stbi__get32be(stbi__context* s) -; 1167 : { -; 1168 : stbi__uint32 z = stbi__get16be(s); -; 1169 : return (z << 16) + stbi__get16be(s); -; 1170 : } -; 1171 : #endif -; 1172 : -; 1173 : #if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -; 1174 : // nothing -; 1175 : #else -; 1176 : static int stbi__get16le(stbi__context* s) -; 1177 : { -; 1178 : int z = stbi__get8(s); -; 1179 : return z + (stbi__get8(s) << 8); -; 1180 : } -; 1181 : #endif -; 1182 : -; 1183 : #ifndef STBI_NO_BMP -; 1184 : static stbi__uint32 stbi__get32le(stbi__context* s) -; 1185 : { -; 1186 : stbi__uint32 z = stbi__get16le(s); -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; -; 1188 : return z; -; 1189 : } -; 1190 : #endif -; 1191 : -; 1192 : #define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings -; 1193 : -; 1194 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1195 : // nothing -; 1196 : #else -; 1197 : ////////////////////////////////////////////////////////////////////////////// -; 1198 : // -; 1199 : // generic converter from built-in img_n to req_comp -; 1200 : // individual types do this automatically as much as possible (e.g. jpeg -; 1201 : // does all cases internally since it needs to colorspace convert anyway, -; 1202 : // and it never has alpha, so very few cases ). png can automatically -; 1203 : // interleave an alpha=255 channel, but falls back to this for other cases -; 1204 : // -; 1205 : // assume data buffer is malloced, so malloc a new one and free that one -; 1206 : // only failure mode is malloc failing -; 1207 : -; 1208 : static stbi_uc stbi__compute_y(int r, int g, int b) -; 1209 : { -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1211 : } -; 1212 : #endif -; 1213 : -; 1214 : #if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1215 : // nothing -; 1216 : #else -; 1217 : static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1218 : { -; 1219 : int i, j; -; 1220 : unsigned char* good; -; 1221 : -; 1222 : if (req_comp == img_n) return data; -; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1224 : -; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); -; 1226 : if (good == NULL) { -; 1227 : STBI_FREE(data); -; 1228 : return stbi__errpuc("outofmem", "Out of memory"); -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { -; 1232 : unsigned char* src = data + j * x * img_n; -; 1233 : unsigned char* dest = good + j * x * req_comp; -; 1234 : -; 1235 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1236 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1237 : // convert source image with img_n components to one with req_comp components; -; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1239 : switch (STBI__COMBO(img_n, req_comp)) { -; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; -; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; -; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1253 : } -; 1254 : #undef STBI__CASE -; 1255 : } -; 1256 : -; 1257 : STBI_FREE(data); -; 1258 : return good; -; 1259 : } -; 1260 : #endif -; 1261 : -; 1262 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1263 : // nothing -; 1264 : #else -; 1265 : static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -; 1266 : { -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1268 : } -; 1269 : #endif -; 1270 : -; 1271 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1272 : // nothing -; 1273 : #else -; 1274 : static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1275 : { -; 1276 : int i, j; -; 1277 : stbi__uint16* good; -; 1278 : -; 1279 : if (req_comp == img_n) return data; -; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1281 : -; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); -; 1283 : if (good == NULL) { -; 1284 : STBI_FREE(data); -; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { -; 1289 : stbi__uint16* src = data + j * x * img_n; -; 1290 : stbi__uint16* dest = good + j * x * req_comp; -; 1291 : -; 1292 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1293 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1294 : // convert source image with img_n components to one with req_comp components; -; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1296 : switch (STBI__COMBO(img_n, req_comp)) { -; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; -; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; -; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1310 : } -; 1311 : #undef STBI__CASE -; 1312 : } -; 1313 : -; 1314 : STBI_FREE(data); -; 1315 : return good; -; 1316 : } -; 1317 : #endif -; 1318 : -; 1319 : #ifndef STBI_NO_LINEAR -; 1320 : static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp) -; 1321 : { -; 1322 : int i, k, n; -; 1323 : float* output; -; 1324 : if (!data) return NULL; -; 1325 : output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0); -; 1326 : if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } -; 1327 : // compute number of non-alpha components -; 1328 : if (comp & 1) n = comp; else n = comp - 1; -; 1329 : for (i = 0; i < x * y; ++i) { -; 1330 : for (k = 0; k < n; ++k) { -; 1331 : output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale); -; 1332 : } -; 1333 : } -; 1334 : if (n < comp) { -; 1335 : for (i = 0; i < x * y; ++i) { -; 1336 : output[i * comp + n] = data[i * comp + n] / 255.0f; -; 1337 : } -; 1338 : } -; 1339 : STBI_FREE(data); -; 1340 : return output; -; 1341 : } -; 1342 : #endif -; 1343 : -; 1344 : #ifndef STBI_NO_HDR -; 1345 : #define stbi__float2int(x) ((int) (x)) -; 1346 : static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp) -; 1347 : { -; 1348 : int i, k, n; -; 1349 : stbi_uc* output; -; 1350 : if (!data) return NULL; -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } -; 1353 : // compute number of non-alpha components -; 1354 : if (comp & 1) n = comp; else n = comp - 1; -; 1355 : for (i = 0; i < x * y; ++i) { -; 1356 : for (k = 0; k < n; ++k) { -; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; -; 1358 : if (z < 0) z = 0; -; 1359 : if (z > 255) z = 255; -; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1361 : } -; 1362 : if (k < comp) { -; 1363 : float z = data[i * comp + k] * 255 + 0.5f; -; 1364 : if (z < 0) z = 0; -; 1365 : if (z > 255) z = 255; -; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1367 : } -; 1368 : } -; 1369 : STBI_FREE(data); -; 1370 : return output; -; 1371 : } -; 1372 : #endif -; 1373 : -; 1374 : ////////////////////////////////////////////////////////////////////////////// -; 1375 : // -; 1376 : // "baseline" JPEG/JFIF decoder -; 1377 : // -; 1378 : // simple implementation -; 1379 : // - doesn't support delayed output of y-dimension -; 1380 : // - simple interface (only one output format: 8-bit interleaved RGB) -; 1381 : // - doesn't try to recover corrupt jpegs -; 1382 : // - doesn't allow partial loading, loading multiple at once -; 1383 : // - still fast on x86 (copying globals into locals doesn't help x86) -; 1384 : // - allocates lots of intermediate memory (full size of all components) -; 1385 : // - non-interleaved case requires this anyway -; 1386 : // - allows good upsampling (see next) -; 1387 : // high-quality -; 1388 : // - upsampled channels are bilinearly interpolated, even across blocks -; 1389 : // - quality integer IDCT derived from IJG's 'slow' -; 1390 : // performance -; 1391 : // - fast huffman; reasonable integer IDCT -; 1392 : // - some SIMD kernels for common paths on targets with SSE2/NEON -; 1393 : // - uses a lot of intermediate memory, could cache poorly -; 1394 : -; 1395 : #ifndef STBI_NO_JPEG -; 1396 : -; 1397 : // huffman decoding acceleration -; 1398 : #define FAST_BITS 9 // larger handles more cases; smaller stomps less cache -; 1399 : -; 1400 : typedef struct -; 1401 : { -; 1402 : stbi_uc fast[1 << FAST_BITS]; -; 1403 : // weirdly, repacking this into AoS is a 10% speed loss, instead of a win -; 1404 : stbi__uint16 code[256]; -; 1405 : stbi_uc values[256]; -; 1406 : stbi_uc size[257]; -; 1407 : unsigned int maxcode[18]; -; 1408 : int delta[17]; // old 'firstsymbol' - old 'firstcode' -; 1409 : } stbi__huffman; -; 1410 : -; 1411 : typedef struct -; 1412 : { -; 1413 : stbi__context* s; -; 1414 : stbi__huffman huff_dc[4]; -; 1415 : stbi__huffman huff_ac[4]; -; 1416 : stbi__uint16 dequant[4][64]; -; 1417 : stbi__int16 fast_ac[4][1 << FAST_BITS]; -; 1418 : -; 1419 : // sizes for components, interleaved MCUs -; 1420 : int img_h_max, img_v_max; -; 1421 : int img_mcu_x, img_mcu_y; -; 1422 : int img_mcu_w, img_mcu_h; -; 1423 : -; 1424 : // definition of jpeg image component -; 1425 : struct -; 1426 : { -; 1427 : int id; -; 1428 : int h, v; -; 1429 : int tq; -; 1430 : int hd, ha; -; 1431 : int dc_pred; -; 1432 : -; 1433 : int x, y, w2, h2; -; 1434 : stbi_uc* data; -; 1435 : void* raw_data, * raw_coeff; -; 1436 : stbi_uc* linebuf; -; 1437 : short* coeff; // progressive only -; 1438 : int coeff_w, coeff_h; // number of 8x8 coefficient blocks -; 1439 : } img_comp[4]; -; 1440 : -; 1441 : stbi__uint32 code_buffer; // jpeg entropy-coded buffer -; 1442 : int code_bits; // number of valid bits -; 1443 : unsigned char marker; // marker seen while filling entropy buffer -; 1444 : int nomore; // flag if we saw a marker so must stop -; 1445 : -; 1446 : int progressive; -; 1447 : int spec_start; -; 1448 : int spec_end; -; 1449 : int succ_high; -; 1450 : int succ_low; -; 1451 : int eob_run; -; 1452 : int jfif; -; 1453 : int app14_color_transform; // Adobe APP14 tag -; 1454 : int rgb; -; 1455 : -; 1456 : int scan_n, order[4]; -; 1457 : int restart_interval, todo; -; 1458 : -; 1459 : // kernels -; 1460 : void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]); -; 1461 : void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); -; 1462 : stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); -; 1463 : } stbi__jpeg; -; 1464 : -; 1465 : static int stbi__build_huffman(stbi__huffman* h, int* count) -; 1466 : { -; 1467 : int i, j, k = 0; -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { -; 1471 : for (j = 0; j < count[i]; ++j) { -; 1472 : h->size[k++] = (stbi_uc)(i + 1); -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); -; 1474 : } -; 1475 : } -; 1476 : h->size[k] = 0; -; 1477 : -; 1478 : // compute actual symbols (from jpeg spec) -; 1479 : code = 0; -; 1480 : k = 0; -; 1481 : for (j = 1; j <= 16; ++j) { -; 1482 : // compute delta to add to code to compute symbol id -; 1483 : h->delta[j] = k - code; -; 1484 : if (h->size[k] == j) { -; 1485 : while (h->size[k] == j) -; 1486 : h->code[k++] = (stbi__uint16)(code++); -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); -; 1488 : } -; 1489 : // compute largest code + 1 for this size, preshifted as needed later -; 1490 : h->maxcode[j] = code << (16 - j); -; 1491 : code <<= 1; -; 1492 : } -; 1493 : h->maxcode[j] = 0xffffffff; -; 1494 : -; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated -; 1496 : memset(h->fast, 255, 1 << FAST_BITS); -; 1497 : for (i = 0; i < k; ++i) { -; 1498 : int s = h->size[i]; -; 1499 : if (s <= FAST_BITS) { -; 1500 : int c = h->code[i] << (FAST_BITS - s); -; 1501 : int m = 1 << (FAST_BITS - s); -; 1502 : for (j = 0; j < m; ++j) { -; 1503 : h->fast[c + j] = (stbi_uc)i; -; 1504 : } -; 1505 : } -; 1506 : } -; 1507 : return 1; -; 1508 : } -; 1509 : -; 1510 : // build a table that decodes both magnitude and value of small ACs in -; 1511 : // one go. -; 1512 : static void stbi__build_fast_ac(stbi__int16* fast_ac, stbi__huffman* h) -; 1513 : { -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { -; 1516 : stbi_uc fast = h->fast[i]; -; 1517 : fast_ac[i] = 0; -; 1518 : if (fast < 255) { -; 1519 : int rs = h->values[fast]; -; 1520 : int run = (rs >> 4) & 15; -; 1521 : int magbits = rs & 15; -; 1522 : int len = h->size[fast]; -; 1523 : -; 1524 : if (magbits && len + magbits <= FAST_BITS) { -; 1525 : // magnitude code followed by receive_extend code -; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); -; 1527 : int m = 1 << (magbits - 1); -; 1528 : if (k < m) k += (~0U << magbits) + 1; -; 1529 : // if the result is small enough, we can fit it in fast_ac table -; 1530 : if (k >= -128 && k <= 127) -; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); -; 1532 : } -; 1533 : } -; 1534 : } -; 1535 : } -; 1536 : -; 1537 : static void stbi__grow_buffer_unsafe(stbi__jpeg* j) -; 1538 : { -; 1539 : do { -; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); -; 1541 : if (b == 0xff) { -; 1542 : int c = stbi__get8(j->s); -; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes -; 1544 : if (c != 0) { -; 1545 : j->marker = (unsigned char)c; -; 1546 : j->nomore = 1; -; 1547 : return; -; 1548 : } -; 1549 : } -; 1550 : j->code_buffer |= b << (24 - j->code_bits); -; 1551 : j->code_bits += 8; -; 1552 : } while (j->code_bits <= 24); -; 1553 : } -; 1554 : -; 1555 : // (1 << n) - 1 -; 1556 : static const stbi__uint32 stbi__bmask[17] = { 0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535 }; -; 1557 : -; 1558 : // decode a jpeg huffman value from the bitstream -; 1559 : stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg* j, stbi__huffman* h) -; 1560 : { -; 1561 : unsigned int temp; -; 1562 : int c, k; -; 1563 : -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1569 : k = h->fast[c]; -; 1570 : if (k < 255) { -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; -; 1575 : j->code_bits -= s; -; 1576 : return h->values[k]; -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; -; 1586 : for (k = FAST_BITS + 1; ; ++k) -; 1587 : if (temp < h->maxcode[k]) -; 1588 : break; -; 1589 : if (k == 17) { -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; -; 1608 : } -; 1609 : -; 1610 : // bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) -; 1623 : k = stbi_lrot(j->code_buffer, n); -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); -; 1628 : } -; 1629 : -; 1630 : // get some unsigned bits -; 1631 : stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg* j, int n) -; 1632 : { -; 1633 : unsigned int k; -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1636 : k = stbi_lrot(j->code_buffer, n); -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; -; 1640 : return k; -; 1641 : } -; 1642 : -; 1643 : stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg* j) -; 1644 : { -; 1645 : unsigned int k; -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1648 : k = j->code_buffer; -; 1649 : j->code_buffer <<= 1; -; 1650 : --j->code_bits; -; 1651 : return k & 0x80000000; -; 1652 : } -; 1653 : -; 1654 : // given a value that's at position X in the zigzag stream, -; 1655 : // where does it appear in the 8x8 matrix coded as row-major? -; 1656 : static const stbi_uc stbi__jpeg_dezigzag[64 + 15] = -; 1657 : { -; 1658 : 0, 1, 8, 16, 9, 2, 3, 10, -; 1659 : 17, 24, 32, 25, 18, 11, 4, 5, -; 1660 : 12, 19, 26, 33, 40, 48, 41, 34, -; 1661 : 27, 20, 13, 6, 7, 14, 21, 28, -; 1662 : 35, 42, 49, 56, 57, 50, 43, 36, -; 1663 : 29, 22, 15, 23, 30, 37, 44, 51, -; 1664 : 58, 59, 52, 45, 38, 31, 39, 46, -; 1665 : 53, 60, 61, 54, 47, 55, 62, 63, -; 1666 : // let corrupt input sample past end -; 1667 : 63, 63, 63, 63, 63, 63, 63, 63, -; 1668 : 63, 63, 63, 63, 63, 63, 63 -; 1669 : }; -; 1670 : -; 1671 : // decode one 64-entry block-- -; 1672 : static int stbi__jpeg_decode_block(stbi__jpeg* j, short data[64], stbi__huffman* hdc, stbi__huffman* hac, stbi__int16* fac, int b, stbi__uint16* dequant) -; 1673 : { -; 1674 : int diff, dc, k; -; 1675 : int t; -; 1676 : -; 1677 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1678 : t = stbi__jpeg_huff_decode(j, hdc); -; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1680 : -; 1681 : // 0 all the ac values now so we can do it 32-bits at a time -; 1682 : memset(data, 0, 64 * sizeof(data[0])); -; 1683 : -; 1684 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1686 : dc = j->img_comp[b].dc_pred + diff; -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1689 : data[0] = (short)(dc * dequant[0]); -; 1690 : -; 1691 : // decode AC components, see JPEG spec -; 1692 : k = 1; -; 1693 : do { -; 1694 : unsigned int zig; -; 1695 : int c, r, s; -; 1696 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1697 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1698 : r = fac[c]; -; 1699 : if (r) { // fast-AC path -; 1700 : k += (r >> 4) & 15; // run -; 1701 : s = r & 15; // combined length -; 1702 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1703 : j->code_buffer <<= s; -; 1704 : j->code_bits -= s; -; 1705 : // decode into unzigzag'd location -; 1706 : zig = stbi__jpeg_dezigzag[k++]; -; 1707 : data[zig] = (short)((r >> 8) * dequant[zig]); -; 1708 : } -; 1709 : else { -; 1710 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1711 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1712 : s = rs & 15; -; 1713 : r = rs >> 4; -; 1714 : if (s == 0) { -; 1715 : if (rs != 0xf0) break; // end block -; 1716 : k += 16; -; 1717 : } -; 1718 : else { -; 1719 : k += r; -; 1720 : // decode into unzigzag'd location -; 1721 : zig = stbi__jpeg_dezigzag[k++]; -; 1722 : data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]); -; 1723 : } -; 1724 : } -; 1725 : } while (k < 64); -; 1726 : return 1; -; 1727 : } -; 1728 : -; 1729 : static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg* j, short data[64], stbi__huffman* hdc, int b) -; 1730 : { -; 1731 : int diff, dc; -; 1732 : int t; -; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1734 : -; 1735 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1736 : -; 1737 : if (j->succ_high == 0) { -; 1738 : // first scan for DC coefficient, must be first -; 1739 : memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now -; 1740 : t = stbi__jpeg_huff_decode(j, hdc); -; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1742 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1745 : dc = j->img_comp[b].dc_pred + diff; -; 1746 : j->img_comp[b].dc_pred = dc; -; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1748 : data[0] = (short)(dc * (1 << j->succ_low)); -; 1749 : } -; 1750 : else { -; 1751 : // refinement scan for DC coefficient -; 1752 : if (stbi__jpeg_get_bit(j)) -; 1753 : data[0] += (short)(1 << j->succ_low); -; 1754 : } -; 1755 : return 1; -; 1756 : } -; 1757 : -; 1758 : // @OPTIMIZE: store non-zigzagged during the decode passes, -; 1759 : // and only de-zigzag when dequantizing -; 1760 : static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg* j, short data[64], stbi__huffman* hac, stbi__int16* fac) -; 1761 : { -; 1762 : int k; -; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1764 : -; 1765 : if (j->succ_high == 0) { -; 1766 : int shift = j->succ_low; -; 1767 : -; 1768 : if (j->eob_run) { -; 1769 : --j->eob_run; -; 1770 : return 1; -; 1771 : } -; 1772 : -; 1773 : k = j->spec_start; -; 1774 : do { -; 1775 : unsigned int zig; -; 1776 : int c, r, s; -; 1777 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1778 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1779 : r = fac[c]; -; 1780 : if (r) { // fast-AC path -; 1781 : k += (r >> 4) & 15; // run -; 1782 : s = r & 15; // combined length -; 1783 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1784 : j->code_buffer <<= s; -; 1785 : j->code_bits -= s; -; 1786 : zig = stbi__jpeg_dezigzag[k++]; -; 1787 : data[zig] = (short)((r >> 8) * (1 << shift)); -; 1788 : } -; 1789 : else { -; 1790 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1791 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1792 : s = rs & 15; -; 1793 : r = rs >> 4; -; 1794 : if (s == 0) { -; 1795 : if (r < 15) { -; 1796 : j->eob_run = (1 << r); -; 1797 : if (r) -; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1799 : --j->eob_run; -; 1800 : break; -; 1801 : } -; 1802 : k += 16; -; 1803 : } -; 1804 : else { -; 1805 : k += r; -; 1806 : zig = stbi__jpeg_dezigzag[k++]; -; 1807 : data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift)); -; 1808 : } -; 1809 : } -; 1810 : } while (k <= j->spec_end); -; 1811 : } -; 1812 : else { -; 1813 : // refinement scan for these AC coefficients -; 1814 : -; 1815 : short bit = (short)(1 << j->succ_low); -; 1816 : -; 1817 : if (j->eob_run) { -; 1818 : --j->eob_run; -; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { -; 1820 : short* p = &data[stbi__jpeg_dezigzag[k]]; -; 1821 : if (*p != 0) -; 1822 : if (stbi__jpeg_get_bit(j)) -; 1823 : if ((*p & bit) == 0) { -; 1824 : if (*p > 0) -; 1825 : *p += bit; -; 1826 : else -; 1827 : *p -= bit; -; 1828 : } -; 1829 : } -; 1830 : } -; 1831 : else { -; 1832 : k = j->spec_start; -; 1833 : do { -; 1834 : int r, s; -; 1835 : int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh -; 1836 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1837 : s = rs & 15; -; 1838 : r = rs >> 4; -; 1839 : if (s == 0) { -; 1840 : if (r < 15) { -; 1841 : j->eob_run = (1 << r) - 1; -; 1842 : if (r) -; 1843 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1844 : r = 64; // force end of block -; 1845 : } -; 1846 : else { -; 1847 : // r=15 s=0 should write 16 0s, so we just do -; 1848 : // a run of 15 0s and then write s (which is 0), -; 1849 : // so we don't have to do anything special here -; 1850 : } -; 1851 : } -; 1852 : else { -; 1853 : if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1854 : // sign bit -; 1855 : if (stbi__jpeg_get_bit(j)) -; 1856 : s = bit; -; 1857 : else -; 1858 : s = -bit; -; 1859 : } -; 1860 : -; 1861 : // advance by r -; 1862 : while (k <= j->spec_end) { -; 1863 : short* p = &data[stbi__jpeg_dezigzag[k++]]; -; 1864 : if (*p != 0) { -; 1865 : if (stbi__jpeg_get_bit(j)) -; 1866 : if ((*p & bit) == 0) { -; 1867 : if (*p > 0) -; 1868 : *p += bit; -; 1869 : else -; 1870 : *p -= bit; -; 1871 : } -; 1872 : } -; 1873 : else { -; 1874 : if (r == 0) { -; 1875 : *p = (short)s; -; 1876 : break; -; 1877 : } -; 1878 : --r; -; 1879 : } -; 1880 : } -; 1881 : } while (k <= j->spec_end); -; 1882 : } -; 1883 : } -; 1884 : return 1; -; 1885 : } -; 1886 : -; 1887 : // take a -128..127 value and stbi__clamp it and convert to 0..255 -; 1888 : stbi_inline static stbi_uc stbi__clamp(int x) -; 1889 : { -; 1890 : // trick to use a single test to catch both cases -; 1891 : if ((unsigned int)x > 255) { -; 1892 : if (x < 0) return 0; -; 1893 : if (x > 255) return 255; -; 1894 : } -; 1895 : return (stbi_uc)x; -; 1896 : } -; 1897 : -; 1898 : #define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -; 1899 : #define stbi__fsh(x) ((x) * 4096) -; 1900 : -; 1901 : // derived from jidctint -- DCT_ISLOW -; 1902 : #define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ -; 1903 : int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ -; 1904 : p2 = s2; \ -; 1905 : p3 = s6; \ -; 1906 : p1 = (p2+p3) * stbi__f2f(0.5411961f); \ -; 1907 : t2 = p1 + p3*stbi__f2f(-1.847759065f); \ -; 1908 : t3 = p1 + p2*stbi__f2f( 0.765366865f); \ -; 1909 : p2 = s0; \ -; 1910 : p3 = s4; \ -; 1911 : t0 = stbi__fsh(p2+p3); \ -; 1912 : t1 = stbi__fsh(p2-p3); \ -; 1913 : x0 = t0+t3; \ -; 1914 : x3 = t0-t3; \ -; 1915 : x1 = t1+t2; \ -; 1916 : x2 = t1-t2; \ -; 1917 : t0 = s7; \ -; 1918 : t1 = s5; \ -; 1919 : t2 = s3; \ -; 1920 : t3 = s1; \ -; 1921 : p3 = t0+t2; \ -; 1922 : p4 = t1+t3; \ -; 1923 : p1 = t0+t3; \ -; 1924 : p2 = t1+t2; \ -; 1925 : p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ -; 1926 : t0 = t0*stbi__f2f( 0.298631336f); \ -; 1927 : t1 = t1*stbi__f2f( 2.053119869f); \ -; 1928 : t2 = t2*stbi__f2f( 3.072711026f); \ -; 1929 : t3 = t3*stbi__f2f( 1.501321110f); \ -; 1930 : p1 = p5 + p1*stbi__f2f(-0.899976223f); \ -; 1931 : p2 = p5 + p2*stbi__f2f(-2.562915447f); \ -; 1932 : p3 = p3*stbi__f2f(-1.961570560f); \ -; 1933 : p4 = p4*stbi__f2f(-0.390180644f); \ -; 1934 : t3 += p1+p4; \ -; 1935 : t2 += p2+p3; \ -; 1936 : t1 += p2+p4; \ -; 1937 : t0 += p1+p3; -; 1938 : -; 1939 : static void stbi__idct_block(stbi_uc* out, int out_stride, short data[64]) -; 1940 : { -; 1941 : int i, val[64], * v = val; -; 1942 : stbi_uc* o; -; 1943 : short* d = data; -; 1944 : -; 1945 : // columns -; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { -; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing -; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 -; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { -; 1950 : // no shortcut 0 seconds -; 1951 : // (1|2|3|4|5|6|7)==0 0 seconds -; 1952 : // all separate -0.047 seconds -; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds -; 1954 : int dcterm = d[0] * 4; -; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; -; 1956 : } -; 1957 : else { -; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) -; 1959 : // constants scaled things up by 1<<12; let's bring them back -; 1960 : // down, but keep 2 extra bits of precision -; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; -; 1962 : v[0] = (x0 + t3) >> 10; -; 1963 : v[56] = (x0 - t3) >> 10; -; 1964 : v[8] = (x1 + t2) >> 10; -; 1965 : v[48] = (x1 - t2) >> 10; -; 1966 : v[16] = (x2 + t1) >> 10; -; 1967 : v[40] = (x2 - t1) >> 10; -; 1968 : v[24] = (x3 + t0) >> 10; -; 1969 : v[32] = (x3 - t0) >> 10; -; 1970 : } -; 1971 : } -; 1972 : -; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { -; 1974 : // no fast case since the first 1D IDCT spread components out -; 1975 : STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]) -; 1976 : // constants scaled things up by 1<<12, plus we had 1<<2 from first -; 1977 : // loop, plus horizontal and vertical each scale by sqrt(8) so together -; 1978 : // we've got an extra 1<<3, so 1<<17 total we need to remove. -; 1979 : // so we want to round that, which means adding 0.5 * 1<<17, -; 1980 : // aka 65536. Also, we'll end up with -128 to 127 that we want -; 1981 : // to encode as 0..255 by adding 128, so we'll add that before the shift -; 1982 : x0 += 65536 + (128 << 17); -; 1983 : x1 += 65536 + (128 << 17); -; 1984 : x2 += 65536 + (128 << 17); -; 1985 : x3 += 65536 + (128 << 17); -; 1986 : // tried computing the shifts into temps, or'ing the temps to see -; 1987 : // if any were out of range, but that was slower -; 1988 : o[0] = stbi__clamp((x0 + t3) >> 17); -; 1989 : o[7] = stbi__clamp((x0 - t3) >> 17); -; 1990 : o[1] = stbi__clamp((x1 + t2) >> 17); -; 1991 : o[6] = stbi__clamp((x1 - t2) >> 17); -; 1992 : o[2] = stbi__clamp((x2 + t1) >> 17); -; 1993 : o[5] = stbi__clamp((x2 - t1) >> 17); -; 1994 : o[3] = stbi__clamp((x3 + t0) >> 17); -; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); -; 1996 : } -; 1997 : } -; 1998 : -; 1999 : #ifdef STBI_SSE2 -; 2000 : // sse2 integer IDCT. not the fastest possible implementation but it -; 2001 : // produces bit-identical results to the generic C version so it's -; 2002 : // fully "transparent". -; 2003 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2004 : { -; 2005 : // This is constructed to match our regular (generic) integer IDCT exactly. -; 2006 : __m128i row0, row1, row2, row3, row4, row5, row6, row7; -; 2007 : __m128i tmp; -; 2008 : -; 2009 : // dot product constant: even elems=x, odd elems=y -; 2010 : #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) -; 2011 : -; 2012 : // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) -; 2013 : // out(1) = c1[even]*x + c1[odd]*y -; 2014 : #define dct_rot(out0,out1, x,y,c0,c1) \ -; 2015 : __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ -; 2016 : __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ -; 2017 : __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ -; 2018 : __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ -; 2019 : __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ -; 2020 : __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) -; 2021 : -; 2022 : // out = in << 12 (in 16-bit, out 32-bit) -; 2023 : #define dct_widen(out, in) \ -; 2024 : __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ -; 2025 : __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) -; 2026 : -; 2027 : // wide add -; 2028 : #define dct_wadd(out, a, b) \ -; 2029 : __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ -; 2030 : __m128i out##_h = _mm_add_epi32(a##_h, b##_h) -; 2031 : -; 2032 : // wide sub -; 2033 : #define dct_wsub(out, a, b) \ -; 2034 : __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ -; 2035 : __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) -; 2036 : -; 2037 : // butterfly a/b, add bias, then shift by "s" and pack -; 2038 : #define dct_bfly32o(out0, out1, a,b,bias,s) \ -; 2039 : { \ -; 2040 : __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ -; 2041 : __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ -; 2042 : dct_wadd(sum, abiased, b); \ -; 2043 : dct_wsub(dif, abiased, b); \ -; 2044 : out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ -; 2045 : out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ -; 2046 : } -; 2047 : -; 2048 : // 8-bit interleave step (for transposes) -; 2049 : #define dct_interleave8(a, b) \ -; 2050 : tmp = a; \ -; 2051 : a = _mm_unpacklo_epi8(a, b); \ -; 2052 : b = _mm_unpackhi_epi8(tmp, b) -; 2053 : -; 2054 : // 16-bit interleave step (for transposes) -; 2055 : #define dct_interleave16(a, b) \ -; 2056 : tmp = a; \ -; 2057 : a = _mm_unpacklo_epi16(a, b); \ -; 2058 : b = _mm_unpackhi_epi16(tmp, b) -; 2059 : -; 2060 : #define dct_pass(bias,shift) \ -; 2061 : { \ -; 2062 : /* even part */ \ -; 2063 : dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ -; 2064 : __m128i sum04 = _mm_add_epi16(row0, row4); \ -; 2065 : __m128i dif04 = _mm_sub_epi16(row0, row4); \ -; 2066 : dct_widen(t0e, sum04); \ -; 2067 : dct_widen(t1e, dif04); \ -; 2068 : dct_wadd(x0, t0e, t3e); \ -; 2069 : dct_wsub(x3, t0e, t3e); \ -; 2070 : dct_wadd(x1, t1e, t2e); \ -; 2071 : dct_wsub(x2, t1e, t2e); \ -; 2072 : /* odd part */ \ -; 2073 : dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ -; 2074 : dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ -; 2075 : __m128i sum17 = _mm_add_epi16(row1, row7); \ -; 2076 : __m128i sum35 = _mm_add_epi16(row3, row5); \ -; 2077 : dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ -; 2078 : dct_wadd(x4, y0o, y4o); \ -; 2079 : dct_wadd(x5, y1o, y5o); \ -; 2080 : dct_wadd(x6, y2o, y5o); \ -; 2081 : dct_wadd(x7, y3o, y4o); \ -; 2082 : dct_bfly32o(row0,row7, x0,x7,bias,shift); \ -; 2083 : dct_bfly32o(row1,row6, x1,x6,bias,shift); \ -; 2084 : dct_bfly32o(row2,row5, x2,x5,bias,shift); \ -; 2085 : dct_bfly32o(row3,row4, x3,x4,bias,shift); \ -; 2086 : } -; 2087 : -; 2088 : __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); -; 2089 : __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f)); -; 2090 : __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); -; 2091 : __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); -; 2092 : __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f)); -; 2093 : __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f)); -; 2094 : __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f)); -; 2095 : __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f)); -; 2096 : -; 2097 : // rounding biases in column/row passes, see stbi__idct_block for explanation. -; 2098 : __m128i bias_0 = _mm_set1_epi32(512); -; 2099 : __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17)); -; 2100 : -; 2101 : // load -; 2102 : row0 = _mm_load_si128((const __m128i*) (data + 0 * 8)); -; 2103 : row1 = _mm_load_si128((const __m128i*) (data + 1 * 8)); -; 2104 : row2 = _mm_load_si128((const __m128i*) (data + 2 * 8)); -; 2105 : row3 = _mm_load_si128((const __m128i*) (data + 3 * 8)); -; 2106 : row4 = _mm_load_si128((const __m128i*) (data + 4 * 8)); -; 2107 : row5 = _mm_load_si128((const __m128i*) (data + 5 * 8)); -; 2108 : row6 = _mm_load_si128((const __m128i*) (data + 6 * 8)); -; 2109 : row7 = _mm_load_si128((const __m128i*) (data + 7 * 8)); -; 2110 : -; 2111 : // column pass -; 2112 : dct_pass(bias_0, 10); -; 2113 : -; 2114 : { -; 2115 : // 16bit 8x8 transpose pass 1 -; 2116 : dct_interleave16(row0, row4); -; 2117 : dct_interleave16(row1, row5); -; 2118 : dct_interleave16(row2, row6); -; 2119 : dct_interleave16(row3, row7); -; 2120 : -; 2121 : // transpose pass 2 -; 2122 : dct_interleave16(row0, row2); -; 2123 : dct_interleave16(row1, row3); -; 2124 : dct_interleave16(row4, row6); -; 2125 : dct_interleave16(row5, row7); -; 2126 : -; 2127 : // transpose pass 3 -; 2128 : dct_interleave16(row0, row1); -; 2129 : dct_interleave16(row2, row3); -; 2130 : dct_interleave16(row4, row5); -; 2131 : dct_interleave16(row6, row7); -; 2132 : } -; 2133 : -; 2134 : // row pass -; 2135 : dct_pass(bias_1, 17); -; 2136 : -; 2137 : { -; 2138 : // pack -; 2139 : __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 -; 2140 : __m128i p1 = _mm_packus_epi16(row2, row3); -; 2141 : __m128i p2 = _mm_packus_epi16(row4, row5); -; 2142 : __m128i p3 = _mm_packus_epi16(row6, row7); -; 2143 : -; 2144 : // 8bit 8x8 transpose pass 1 -; 2145 : dct_interleave8(p0, p2); // a0e0a1e1... -; 2146 : dct_interleave8(p1, p3); // c0g0c1g1... -; 2147 : -; 2148 : // transpose pass 2 -; 2149 : dct_interleave8(p0, p1); // a0c0e0g0... -; 2150 : dct_interleave8(p2, p3); // b0d0f0h0... -; 2151 : -; 2152 : // transpose pass 3 -; 2153 : dct_interleave8(p0, p2); // a0b0c0d0... -; 2154 : dct_interleave8(p1, p3); // a4b4c4d4... -; 2155 : -; 2156 : // store -; 2157 : _mm_storel_epi64((__m128i*) out, p0); out += out_stride; -; 2158 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; -; 2159 : _mm_storel_epi64((__m128i*) out, p2); out += out_stride; -; 2160 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; -; 2161 : _mm_storel_epi64((__m128i*) out, p1); out += out_stride; -; 2162 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; -; 2163 : _mm_storel_epi64((__m128i*) out, p3); out += out_stride; -; 2164 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e)); -; 2165 : } -; 2166 : -; 2167 : #undef dct_const -; 2168 : #undef dct_rot -; 2169 : #undef dct_widen -; 2170 : #undef dct_wadd -; 2171 : #undef dct_wsub -; 2172 : #undef dct_bfly32o -; 2173 : #undef dct_interleave8 -; 2174 : #undef dct_interleave16 -; 2175 : #undef dct_pass -; 2176 : } -; 2177 : -; 2178 : #endif // STBI_SSE2 -; 2179 : -; 2180 : #ifdef STBI_NEON -; 2181 : -; 2182 : // NEON integer IDCT. should produce bit-identical -; 2183 : // results to the generic C version. -; 2184 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2185 : { -; 2186 : int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; -; 2187 : -; 2188 : int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); -; 2189 : int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); -; 2190 : int16x4_t rot0_2 = vdup_n_s16(stbi__f2f(0.765366865f)); -; 2191 : int16x4_t rot1_0 = vdup_n_s16(stbi__f2f(1.175875602f)); -; 2192 : int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); -; 2193 : int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); -; 2194 : int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); -; 2195 : int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); -; 2196 : int16x4_t rot3_0 = vdup_n_s16(stbi__f2f(0.298631336f)); -; 2197 : int16x4_t rot3_1 = vdup_n_s16(stbi__f2f(2.053119869f)); -; 2198 : int16x4_t rot3_2 = vdup_n_s16(stbi__f2f(3.072711026f)); -; 2199 : int16x4_t rot3_3 = vdup_n_s16(stbi__f2f(1.501321110f)); -; 2200 : -; 2201 : #define dct_long_mul(out, inq, coeff) \ -; 2202 : int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ -; 2203 : int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) -; 2204 : -; 2205 : #define dct_long_mac(out, acc, inq, coeff) \ -; 2206 : int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ -; 2207 : int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) -; 2208 : -; 2209 : #define dct_widen(out, inq) \ -; 2210 : int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ -; 2211 : int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) -; 2212 : -; 2213 : // wide add -; 2214 : #define dct_wadd(out, a, b) \ -; 2215 : int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ -; 2216 : int32x4_t out##_h = vaddq_s32(a##_h, b##_h) -; 2217 : -; 2218 : // wide sub -; 2219 : #define dct_wsub(out, a, b) \ -; 2220 : int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ -; 2221 : int32x4_t out##_h = vsubq_s32(a##_h, b##_h) -; 2222 : -; 2223 : // butterfly a/b, then shift using "shiftop" by "s" and pack -; 2224 : #define dct_bfly32o(out0,out1, a,b,shiftop,s) \ -; 2225 : { \ -; 2226 : dct_wadd(sum, a, b); \ -; 2227 : dct_wsub(dif, a, b); \ -; 2228 : out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ -; 2229 : out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ -; 2230 : } -; 2231 : -; 2232 : #define dct_pass(shiftop, shift) \ -; 2233 : { \ -; 2234 : /* even part */ \ -; 2235 : int16x8_t sum26 = vaddq_s16(row2, row6); \ -; 2236 : dct_long_mul(p1e, sum26, rot0_0); \ -; 2237 : dct_long_mac(t2e, p1e, row6, rot0_1); \ -; 2238 : dct_long_mac(t3e, p1e, row2, rot0_2); \ -; 2239 : int16x8_t sum04 = vaddq_s16(row0, row4); \ -; 2240 : int16x8_t dif04 = vsubq_s16(row0, row4); \ -; 2241 : dct_widen(t0e, sum04); \ -; 2242 : dct_widen(t1e, dif04); \ -; 2243 : dct_wadd(x0, t0e, t3e); \ -; 2244 : dct_wsub(x3, t0e, t3e); \ -; 2245 : dct_wadd(x1, t1e, t2e); \ -; 2246 : dct_wsub(x2, t1e, t2e); \ -; 2247 : /* odd part */ \ -; 2248 : int16x8_t sum15 = vaddq_s16(row1, row5); \ -; 2249 : int16x8_t sum17 = vaddq_s16(row1, row7); \ -; 2250 : int16x8_t sum35 = vaddq_s16(row3, row5); \ -; 2251 : int16x8_t sum37 = vaddq_s16(row3, row7); \ -; 2252 : int16x8_t sumodd = vaddq_s16(sum17, sum35); \ -; 2253 : dct_long_mul(p5o, sumodd, rot1_0); \ -; 2254 : dct_long_mac(p1o, p5o, sum17, rot1_1); \ -; 2255 : dct_long_mac(p2o, p5o, sum35, rot1_2); \ -; 2256 : dct_long_mul(p3o, sum37, rot2_0); \ -; 2257 : dct_long_mul(p4o, sum15, rot2_1); \ -; 2258 : dct_wadd(sump13o, p1o, p3o); \ -; 2259 : dct_wadd(sump24o, p2o, p4o); \ -; 2260 : dct_wadd(sump23o, p2o, p3o); \ -; 2261 : dct_wadd(sump14o, p1o, p4o); \ -; 2262 : dct_long_mac(x4, sump13o, row7, rot3_0); \ -; 2263 : dct_long_mac(x5, sump24o, row5, rot3_1); \ -; 2264 : dct_long_mac(x6, sump23o, row3, rot3_2); \ -; 2265 : dct_long_mac(x7, sump14o, row1, rot3_3); \ -; 2266 : dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ -; 2267 : dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ -; 2268 : dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ -; 2269 : dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ -; 2270 : } -; 2271 : -; 2272 : // load -; 2273 : row0 = vld1q_s16(data + 0 * 8); -; 2274 : row1 = vld1q_s16(data + 1 * 8); -; 2275 : row2 = vld1q_s16(data + 2 * 8); -; 2276 : row3 = vld1q_s16(data + 3 * 8); -; 2277 : row4 = vld1q_s16(data + 4 * 8); -; 2278 : row5 = vld1q_s16(data + 5 * 8); -; 2279 : row6 = vld1q_s16(data + 6 * 8); -; 2280 : row7 = vld1q_s16(data + 7 * 8); -; 2281 : -; 2282 : // add DC bias -; 2283 : row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); -; 2284 : -; 2285 : // column pass -; 2286 : dct_pass(vrshrn_n_s32, 10); -; 2287 : -; 2288 : // 16bit 8x8 transpose -; 2289 : { -; 2290 : // these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -; 2291 : // whether compilers actually get this is another story, sadly. -; 2292 : #define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -; 2293 : #define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -; 2294 : #define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } -; 2295 : -; 2296 : // pass 1 -; 2297 : dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 -; 2298 : dct_trn16(row2, row3); -; 2299 : dct_trn16(row4, row5); -; 2300 : dct_trn16(row6, row7); -; 2301 : -; 2302 : // pass 2 -; 2303 : dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 -; 2304 : dct_trn32(row1, row3); -; 2305 : dct_trn32(row4, row6); -; 2306 : dct_trn32(row5, row7); -; 2307 : -; 2308 : // pass 3 -; 2309 : dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 -; 2310 : dct_trn64(row1, row5); -; 2311 : dct_trn64(row2, row6); -; 2312 : dct_trn64(row3, row7); -; 2313 : -; 2314 : #undef dct_trn16 -; 2315 : #undef dct_trn32 -; 2316 : #undef dct_trn64 -; 2317 : } -; 2318 : -; 2319 : // row pass -; 2320 : // vrshrn_n_s32 only supports shifts up to 16, we need -; 2321 : // 17. so do a non-rounding shift of 16 first then follow -; 2322 : // up with a rounding shift by 1. -; 2323 : dct_pass(vshrn_n_s32, 16); -; 2324 : -; 2325 : { -; 2326 : // pack and round -; 2327 : uint8x8_t p0 = vqrshrun_n_s16(row0, 1); -; 2328 : uint8x8_t p1 = vqrshrun_n_s16(row1, 1); -; 2329 : uint8x8_t p2 = vqrshrun_n_s16(row2, 1); -; 2330 : uint8x8_t p3 = vqrshrun_n_s16(row3, 1); -; 2331 : uint8x8_t p4 = vqrshrun_n_s16(row4, 1); -; 2332 : uint8x8_t p5 = vqrshrun_n_s16(row5, 1); -; 2333 : uint8x8_t p6 = vqrshrun_n_s16(row6, 1); -; 2334 : uint8x8_t p7 = vqrshrun_n_s16(row7, 1); -; 2335 : -; 2336 : // again, these can translate into one instruction, but often don't. -; 2337 : #define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -; 2338 : #define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -; 2339 : #define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } -; 2340 : -; 2341 : // sadly can't use interleaved stores here since we only write -; 2342 : // 8 bytes to each scan line! -; 2343 : -; 2344 : // 8x8 8-bit transpose pass 1 -; 2345 : dct_trn8_8(p0, p1); -; 2346 : dct_trn8_8(p2, p3); -; 2347 : dct_trn8_8(p4, p5); -; 2348 : dct_trn8_8(p6, p7); -; 2349 : -; 2350 : // pass 2 -; 2351 : dct_trn8_16(p0, p2); -; 2352 : dct_trn8_16(p1, p3); -; 2353 : dct_trn8_16(p4, p6); -; 2354 : dct_trn8_16(p5, p7); -; 2355 : -; 2356 : // pass 3 -; 2357 : dct_trn8_32(p0, p4); -; 2358 : dct_trn8_32(p1, p5); -; 2359 : dct_trn8_32(p2, p6); -; 2360 : dct_trn8_32(p3, p7); -; 2361 : -; 2362 : // store -; 2363 : vst1_u8(out, p0); out += out_stride; -; 2364 : vst1_u8(out, p1); out += out_stride; -; 2365 : vst1_u8(out, p2); out += out_stride; -; 2366 : vst1_u8(out, p3); out += out_stride; -; 2367 : vst1_u8(out, p4); out += out_stride; -; 2368 : vst1_u8(out, p5); out += out_stride; -; 2369 : vst1_u8(out, p6); out += out_stride; -; 2370 : vst1_u8(out, p7); -; 2371 : -; 2372 : #undef dct_trn8_8 -; 2373 : #undef dct_trn8_16 -; 2374 : #undef dct_trn8_32 -; 2375 : } -; 2376 : -; 2377 : #undef dct_long_mul -; 2378 : #undef dct_long_mac -; 2379 : #undef dct_widen -; 2380 : #undef dct_wadd -; 2381 : #undef dct_wsub -; 2382 : #undef dct_bfly32o -; 2383 : #undef dct_pass -; 2384 : } -; 2385 : -; 2386 : #endif // STBI_NEON -; 2387 : -; 2388 : #define STBI__MARKER_none 0xff -; 2389 : // if there's a pending marker from the entropy stream, return that -; 2390 : // otherwise, fetch from the stream and get a marker. if there's no -; 2391 : // marker, return 0xff, which is never a valid marker value -; 2392 : static stbi_uc stbi__get_marker(stbi__jpeg* j) -; 2393 : { -; 2394 : stbi_uc x; -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } -; 2396 : x = stbi__get8(j->s); -; 2397 : if (x != 0xff) return STBI__MARKER_none; -; 2398 : while (x == 0xff) -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes -; 2400 : return x; -; 2401 : } -; 2402 : -; 2403 : // in each scan, we'll have scan_n components, and the order -; 2404 : // of the components is specified by order[] -; 2405 : #define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) -; 2406 : -; 2407 : // after a restart interval, stbi__jpeg_reset the entropy decoder and -; 2408 : // the dc prediction -; 2409 : static void stbi__jpeg_reset(stbi__jpeg* j) -; 2410 : { -; 2411 : j->code_bits = 0; -; 2412 : j->code_buffer = 0; -; 2413 : j->nomore = 0; -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; -; 2417 : j->eob_run = 0; -; 2418 : // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, -; 2419 : // since we don't even allow 1<<30 pixels -; 2420 : } -; 2421 : -; 2422 : static int stbi__parse_entropy_coded_data(stbi__jpeg* z) -; 2423 : { -; 2424 : stbi__jpeg_reset(z); -; 2425 : if (!z->progressive) { -; 2426 : if (z->scan_n == 1) { -; 2427 : int i, j; -; 2428 : STBI_SIMD_ALIGN(short, data[64]); -; 2429 : int n = z->order[0]; -; 2430 : // non-interleaved data, we just need to process one block at a time, -; 2431 : // in trivial scanline order -; 2432 : // number of blocks to do just depends on how many actual "pixels" this -; 2433 : // component has, independent of interleaved MCU blocking and such -; 2434 : int w = (z->img_comp[n].x + 7) >> 3; -; 2435 : int h = (z->img_comp[n].y + 7) >> 3; -; 2436 : for (j = 0; j < h; ++j) { -; 2437 : for (i = 0; i < w; ++i) { -; 2438 : int ha = z->img_comp[n].ha; -; 2439 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2440 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2441 : // every data block is an MCU, so countdown the restart interval -; 2442 : if (--z->todo <= 0) { -; 2443 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2444 : // if it's NOT a restart, then just bail, so we get corrupt data -; 2445 : // rather than no data -; 2446 : if (!STBI__RESTART(z->marker)) return 1; -; 2447 : stbi__jpeg_reset(z); -; 2448 : } -; 2449 : } -; 2450 : } -; 2451 : return 1; -; 2452 : } -; 2453 : else { // interleaved -; 2454 : int i, j, k, x, y; -; 2455 : STBI_SIMD_ALIGN(short, data[64]); -; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2458 : // scan an interleaved mcu... process scan_n components in order -; 2459 : for (k = 0; k < z->scan_n; ++k) { -; 2460 : int n = z->order[k]; -; 2461 : // scan out an mcu's worth of this component; that's just determined -; 2462 : // by the basic H and V specified for the component -; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2464 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2465 : int x2 = (i * z->img_comp[n].h + x) * 8; -; 2466 : int y2 = (j * z->img_comp[n].v + y) * 8; -; 2467 : int ha = z->img_comp[n].ha; -; 2468 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2469 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); -; 2470 : } -; 2471 : } -; 2472 : } -; 2473 : // after all interleaved components, that's an interleaved MCU, -; 2474 : // so now count down the restart interval -; 2475 : if (--z->todo <= 0) { -; 2476 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2477 : if (!STBI__RESTART(z->marker)) return 1; -; 2478 : stbi__jpeg_reset(z); -; 2479 : } -; 2480 : } -; 2481 : } -; 2482 : return 1; -; 2483 : } -; 2484 : } -; 2485 : else { -; 2486 : if (z->scan_n == 1) { -; 2487 : int i, j; -; 2488 : int n = z->order[0]; -; 2489 : // non-interleaved data, we just need to process one block at a time, -; 2490 : // in trivial scanline order -; 2491 : // number of blocks to do just depends on how many actual "pixels" this -; 2492 : // component has, independent of interleaved MCU blocking and such -; 2493 : int w = (z->img_comp[n].x + 7) >> 3; -; 2494 : int h = (z->img_comp[n].y + 7) >> 3; -; 2495 : for (j = 0; j < h; ++j) { -; 2496 : for (i = 0; i < w; ++i) { -; 2497 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2498 : if (z->spec_start == 0) { -; 2499 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2500 : return 0; -; 2501 : } -; 2502 : else { -; 2503 : int ha = z->img_comp[n].ha; -; 2504 : if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) -; 2505 : return 0; -; 2506 : } -; 2507 : // every data block is an MCU, so countdown the restart interval -; 2508 : if (--z->todo <= 0) { -; 2509 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2510 : if (!STBI__RESTART(z->marker)) return 1; -; 2511 : stbi__jpeg_reset(z); -; 2512 : } -; 2513 : } -; 2514 : } -; 2515 : return 1; -; 2516 : } -; 2517 : else { // interleaved -; 2518 : int i, j, k, x, y; -; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2521 : // scan an interleaved mcu... process scan_n components in order -; 2522 : for (k = 0; k < z->scan_n; ++k) { -; 2523 : int n = z->order[k]; -; 2524 : // scan out an mcu's worth of this component; that's just determined -; 2525 : // by the basic H and V specified for the component -; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2528 : int x2 = (i * z->img_comp[n].h + x); -; 2529 : int y2 = (j * z->img_comp[n].v + y); -; 2530 : short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); -; 2531 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2532 : return 0; -; 2533 : } -; 2534 : } -; 2535 : } -; 2536 : // after all interleaved components, that's an interleaved MCU, -; 2537 : // so now count down the restart interval -; 2538 : if (--z->todo <= 0) { -; 2539 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2540 : if (!STBI__RESTART(z->marker)) return 1; -; 2541 : stbi__jpeg_reset(z); -; 2542 : } -; 2543 : } -; 2544 : } -; 2545 : return 1; -; 2546 : } -; 2547 : } -; 2548 : } -; 2549 : -; 2550 : static void stbi__jpeg_dequantize(short* data, stbi__uint16* dequant) -; 2551 : { -; 2552 : int i; -; 2553 : for (i = 0; i < 64; ++i) -; 2554 : data[i] *= dequant[i]; -; 2555 : } -; 2556 : -; 2557 : static void stbi__jpeg_finish(stbi__jpeg* z) -; 2558 : { -; 2559 : if (z->progressive) { -; 2560 : // dequantize and idct the data -; 2561 : int i, j, n; -; 2562 : for (n = 0; n < z->s->img_n; ++n) { -; 2563 : int w = (z->img_comp[n].x + 7) >> 3; -; 2564 : int h = (z->img_comp[n].y + 7) >> 3; -; 2565 : for (j = 0; j < h; ++j) { -; 2566 : for (i = 0; i < w; ++i) { -; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2568 : stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); -; 2569 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2570 : } -; 2571 : } -; 2572 : } -; 2573 : } -; 2574 : } -; 2575 : -; 2576 : static int stbi__process_marker(stbi__jpeg* z, int m) -; 2577 : { -; 2578 : int L; -; 2579 : switch (m) { -; 2580 : case STBI__MARKER_none: // no marker found -; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); -; 2582 : -; 2583 : case 0xDD: // DRI - specify restart interval -; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); -; 2585 : z->restart_interval = stbi__get16be(z->s); -; 2586 : return 1; -; 2587 : -; 2588 : case 0xDB: // DQT - define quantization table -; 2589 : L = stbi__get16be(z->s) - 2; -; 2590 : while (L > 0) { -; 2591 : int q = stbi__get8(z->s); -; 2592 : int p = q >> 4, sixteen = (p != 0); -; 2593 : int t = q & 15, i; -; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); -; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); -; 2596 : -; 2597 : for (i = 0; i < 64; ++i) -; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); -; 2599 : L -= (sixteen ? 129 : 65); -; 2600 : } -; 2601 : return L == 0; -; 2602 : -; 2603 : case 0xC4: // DHT - define huffman table -; 2604 : L = stbi__get16be(z->s) - 2; -; 2605 : while (L > 0) { -; 2606 : stbi_uc* v; -; 2607 : int sizes[16], i, n = 0; -; 2608 : int q = stbi__get8(z->s); -; 2609 : int tc = q >> 4; -; 2610 : int th = q & 15; -; 2611 : if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG"); -; 2612 : for (i = 0; i < 16; ++i) { -; 2613 : sizes[i] = stbi__get8(z->s); -; 2614 : n += sizes[i]; -; 2615 : } -; 2616 : if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values! -; 2617 : L -= 17; -; 2618 : if (tc == 0) { -; 2619 : if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0; -; 2620 : v = z->huff_dc[th].values; -; 2621 : } -; 2622 : else { -; 2623 : if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0; -; 2624 : v = z->huff_ac[th].values; -; 2625 : } -; 2626 : for (i = 0; i < n; ++i) -; 2627 : v[i] = stbi__get8(z->s); -; 2628 : if (tc != 0) -; 2629 : stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); -; 2630 : L -= n; -; 2631 : } -; 2632 : return L == 0; -; 2633 : } -; 2634 : -; 2635 : // check for comment block or APP blocks -; 2636 : if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { -; 2637 : L = stbi__get16be(z->s); -; 2638 : if (L < 2) { -; 2639 : if (m == 0xFE) -; 2640 : return stbi__err("bad COM len", "Corrupt JPEG"); -; 2641 : else -; 2642 : return stbi__err("bad APP len", "Corrupt JPEG"); -; 2643 : } -; 2644 : L -= 2; -; 2645 : -; 2646 : if (m == 0xE0 && L >= 5) { // JFIF APP0 segment -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) -; 2652 : ok = 0; -; 2653 : L -= 5; -; 2654 : if (ok) -; 2655 : z->jfif = 1; -; 2656 : } -; 2657 : else if (m == 0xEE && L >= 12) { // Adobe APP14 segment -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) -; 2663 : ok = 0; -; 2664 : L -= 6; -; 2665 : if (ok) { -; 2666 : stbi__get8(z->s); // version -; 2667 : stbi__get16be(z->s); // flags0 -; 2668 : stbi__get16be(z->s); // flags1 -; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform -; 2670 : L -= 6; -; 2671 : } -; 2672 : } -; 2673 : -; 2674 : stbi__skip(z->s, L); -; 2675 : return 1; -; 2676 : } -; 2677 : -; 2678 : return stbi__err("unknown marker", "Corrupt JPEG"); -; 2679 : } -; 2680 : -; 2681 : // after we see SOS -; 2682 : static int stbi__process_scan_header(stbi__jpeg* z) -; 2683 : { -; 2684 : int i; -; 2685 : int Ls = stbi__get16be(z->s); -; 2686 : z->scan_n = stbi__get8(z->s); -; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); -; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); -; 2689 : for (i = 0; i < z->scan_n; ++i) { -; 2690 : int id = stbi__get8(z->s), which; -; 2691 : int q = stbi__get8(z->s); -; 2692 : for (which = 0; which < z->s->img_n; ++which) -; 2693 : if (z->img_comp[which].id == id) -; 2694 : break; -; 2695 : if (which == z->s->img_n) return 0; // no match -; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); -; 2698 : z->order[i] = which; -; 2699 : } -; 2700 : -; 2701 : { -; 2702 : int aa; -; 2703 : z->spec_start = stbi__get8(z->s); -; 2704 : z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 -; 2705 : aa = stbi__get8(z->s); -; 2706 : z->succ_high = (aa >> 4); -; 2707 : z->succ_low = (aa & 15); -; 2708 : if (z->progressive) { -; 2709 : if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) -; 2710 : return stbi__err("bad SOS", "Corrupt JPEG"); -; 2711 : } -; 2712 : else { -; 2713 : if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2714 : if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2715 : z->spec_end = 63; -; 2716 : } -; 2717 : } -; 2718 : -; 2719 : return 1; -; 2720 : } -; 2721 : -; 2722 : static int stbi__free_jpeg_components(stbi__jpeg* z, int ncomp, int why) -; 2723 : { -; 2724 : int i; -; 2725 : for (i = 0; i < ncomp; ++i) { -; 2726 : if (z->img_comp[i].raw_data) { -; 2727 : STBI_FREE(z->img_comp[i].raw_data); -; 2728 : z->img_comp[i].raw_data = NULL; -; 2729 : z->img_comp[i].data = NULL; -; 2730 : } -; 2731 : if (z->img_comp[i].raw_coeff) { -; 2732 : STBI_FREE(z->img_comp[i].raw_coeff); -; 2733 : z->img_comp[i].raw_coeff = 0; -; 2734 : z->img_comp[i].coeff = 0; -; 2735 : } -; 2736 : if (z->img_comp[i].linebuf) { -; 2737 : STBI_FREE(z->img_comp[i].linebuf); -; 2738 : z->img_comp[i].linebuf = NULL; -; 2739 : } -; 2740 : } -; 2741 : return why; -; 2742 : } -; 2743 : -; 2744 : static int stbi__process_frame_header(stbi__jpeg* z, int scan) -; 2745 : { -; 2746 : stbi__context* s = z->s; -; 2747 : int Lf, p, i, q, h_max = 1, v_max = 1, c; -; 2748 : Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG -; 2749 : p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline -; 2750 : s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG -; 2751 : s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires -; 2752 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2753 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2754 : c = stbi__get8(s); -; 2755 : if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG"); -; 2756 : s->img_n = c; -; 2757 : for (i = 0; i < c; ++i) { -; 2758 : z->img_comp[i].data = NULL; -; 2759 : z->img_comp[i].linebuf = NULL; -; 2760 : } -; 2761 : -; 2762 : if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG"); -; 2763 : -; 2764 : z->rgb = 0; -; 2765 : for (i = 0; i < s->img_n; ++i) { -; 2766 : static const unsigned char rgb[3] = { 'R', 'G', 'B' }; -; 2767 : z->img_comp[i].id = stbi__get8(s); -; 2768 : if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) -; 2769 : ++z->rgb; -; 2770 : q = stbi__get8(s); -; 2771 : z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H", "Corrupt JPEG"); -; 2772 : z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V", "Corrupt JPEG"); -; 2773 : z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ", "Corrupt JPEG"); -; 2774 : } -; 2775 : -; 2776 : if (scan != STBI__SCAN_load) return 1; -; 2777 : -; 2778 : if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); -; 2779 : -; 2780 : for (i = 0; i < s->img_n; ++i) { -; 2781 : if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; -; 2782 : if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; -; 2783 : } -; 2784 : -; 2785 : // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios -; 2786 : // and I've never seen a non-corrupted JPEG file actually use them -; 2787 : for (i = 0; i < s->img_n; ++i) { -; 2788 : if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG"); -; 2789 : if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG"); -; 2790 : } -; 2791 : -; 2792 : // compute interleaved mcu info -; 2793 : z->img_h_max = h_max; -; 2794 : z->img_v_max = v_max; -; 2795 : z->img_mcu_w = h_max * 8; -; 2796 : z->img_mcu_h = v_max * 8; -; 2797 : // these sizes can't be more than 17 bits -; 2798 : z->img_mcu_x = (s->img_x + z->img_mcu_w - 1) / z->img_mcu_w; -; 2799 : z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h; -; 2800 : -; 2801 : for (i = 0; i < s->img_n; ++i) { -; 2802 : // number of effective pixels (e.g. for non-interleaved MCU) -; 2803 : z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max - 1) / h_max; -; 2804 : z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max - 1) / v_max; -; 2805 : // to simplify generation, we'll allocate enough memory to decode -; 2806 : // the bogus oversized data from using interleaved MCUs and their -; 2807 : // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't -; 2808 : // discard the extra data until colorspace conversion -; 2809 : // -; 2810 : // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) -; 2811 : // so these muls can't overflow with 32-bit ints (which we require) -; 2812 : z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; -; 2813 : z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; -; 2814 : z->img_comp[i].coeff = 0; -; 2815 : z->img_comp[i].raw_coeff = 0; -; 2816 : z->img_comp[i].linebuf = NULL; -; 2817 : z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); -; 2818 : if (z->img_comp[i].raw_data == NULL) -; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2820 : // align blocks for idct using mmx/sse -; 2821 : z->img_comp[i].data = (stbi_uc*)(((size_t)z->img_comp[i].raw_data + 15) & ~15); -; 2822 : if (z->progressive) { -; 2823 : // w2, h2 are multiples of 8 (see above) -; 2824 : z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; -; 2825 : z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; -; 2826 : z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); -; 2827 : if (z->img_comp[i].raw_coeff == NULL) -; 2828 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2829 : z->img_comp[i].coeff = (short*)(((size_t)z->img_comp[i].raw_coeff + 15) & ~15); -; 2830 : } -; 2831 : } -; 2832 : -; 2833 : return 1; -; 2834 : } -; 2835 : -; 2836 : // use comparisons since in some cases we handle more than one case (e.g. SOF) -; 2837 : #define stbi__DNL(x) ((x) == 0xdc) -; 2838 : #define stbi__SOI(x) ((x) == 0xd8) -; 2839 : #define stbi__EOI(x) ((x) == 0xd9) -; 2840 : #define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) -; 2841 : #define stbi__SOS(x) ((x) == 0xda) -; 2842 : -; 2843 : #define stbi__SOF_progressive(x) ((x) == 0xc2) -; 2844 : -; 2845 : static int stbi__decode_jpeg_header(stbi__jpeg* z, int scan) -; 2846 : { -; 2847 : int m; -; 2848 : z->jfif = 0; -; 2849 : z->app14_color_transform = -1; // valid values are 0,1,2 -; 2850 : z->marker = STBI__MARKER_none; // initialize cached marker to empty -; 2851 : m = stbi__get_marker(z); -; 2852 : if (!stbi__SOI(m)) return stbi__err("no SOI", "Corrupt JPEG"); -; 2853 : if (scan == STBI__SCAN_type) return 1; -; 2854 : m = stbi__get_marker(z); -; 2855 : while (!stbi__SOF(m)) { -; 2856 : if (!stbi__process_marker(z, m)) return 0; -; 2857 : m = stbi__get_marker(z); -; 2858 : while (m == STBI__MARKER_none) { -; 2859 : // some files have extra padding after their blocks, so ok, we'll scan -; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); -; 2861 : m = stbi__get_marker(z); -; 2862 : } -; 2863 : } -; 2864 : z->progressive = stbi__SOF_progressive(m); -; 2865 : if (!stbi__process_frame_header(z, scan)) return 0; -; 2866 : return 1; -; 2867 : } -; 2868 : -; 2869 : static int stbi__skip_jpeg_junk_at_end(stbi__jpeg* j) -; 2870 : { -; 2871 : // some JPEGs have junk at end, skip over it but if we find what looks -; 2872 : // like a valid marker, resume there -; 2873 : while (!stbi__at_eof(j->s)) { -; 2874 : int x = stbi__get8(j->s); -; 2875 : while (x == 255) { // might be a marker -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; -; 2877 : x = stbi__get8(j->s); -; 2878 : if (x != 0x00 && x != 0xff) { -; 2879 : // not a stuffed zero or lead-in to another marker, looks -; 2880 : // like an actual marker, return it -; 2881 : return x; -; 2882 : } -; 2883 : // stuffed zero has x=0 now which ends the loop, meaning we go -; 2884 : // back to regular scan loop. -; 2885 : // repeated 0xff keeps trying to read the next byte of the marker. -; 2886 : } -; 2887 : } -; 2888 : return STBI__MARKER_none; -; 2889 : } -; 2890 : -; 2891 : // decode image to YCbCr format -; 2892 : static int stbi__decode_jpeg_image(stbi__jpeg* j) -; 2893 : { -; 2894 : int m; -; 2895 : for (m = 0; m < 4; m++) { -; 2896 : j->img_comp[m].raw_data = NULL; -; 2897 : j->img_comp[m].raw_coeff = NULL; -; 2898 : } -; 2899 : j->restart_interval = 0; -; 2900 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; -; 2901 : m = stbi__get_marker(j); -; 2902 : while (!stbi__EOI(m)) { -; 2903 : if (stbi__SOS(m)) { -; 2904 : if (!stbi__process_scan_header(j)) return 0; -; 2905 : if (!stbi__parse_entropy_coded_data(j)) return 0; -; 2906 : if (j->marker == STBI__MARKER_none) { -; 2907 : j->marker = stbi__skip_jpeg_junk_at_end(j); -; 2908 : // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 -; 2909 : } -; 2910 : m = stbi__get_marker(j); -; 2911 : if (STBI__RESTART(m)) -; 2912 : m = stbi__get_marker(j); -; 2913 : } -; 2914 : else if (stbi__DNL(m)) { -; 2915 : int Ld = stbi__get16be(j->s); -; 2916 : stbi__uint32 NL = stbi__get16be(j->s); -; 2917 : if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); -; 2918 : if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); -; 2919 : m = stbi__get_marker(j); -; 2920 : } -; 2921 : else { -; 2922 : if (!stbi__process_marker(j, m)) return 1; -; 2923 : m = stbi__get_marker(j); -; 2924 : } -; 2925 : } -; 2926 : if (j->progressive) -; 2927 : stbi__jpeg_finish(j); -; 2928 : return 1; -; 2929 : } -; 2930 : -; 2931 : // static jfif-centered resampling (across block boundaries) -; 2932 : -; 2933 : typedef stbi_uc* (*resample_row_func)(stbi_uc* out, stbi_uc* in0, stbi_uc* in1, -; 2934 : int w, int hs); -; 2935 : -; 2936 : #define stbi__div4(x) ((stbi_uc) ((x) >> 2)) -; 2937 : -; 2938 : static stbi_uc* resample_row_1(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2939 : { -; 2940 : STBI_NOTUSED(out); -; 2941 : STBI_NOTUSED(in_far); -; 2942 : STBI_NOTUSED(w); -; 2943 : STBI_NOTUSED(hs); -; 2944 : return in_near; -; 2945 : } -; 2946 : -; 2947 : static stbi_uc* stbi__resample_row_v_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2948 : { -; 2949 : // need to generate two samples vertically for every one in input -; 2950 : int i; -; 2951 : STBI_NOTUSED(hs); -; 2952 : for (i = 0; i < w; ++i) -; 2953 : out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2); -; 2954 : return out; -; 2955 : } -; 2956 : -; 2957 : static stbi_uc* stbi__resample_row_h_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2958 : { -; 2959 : // need to generate two samples horizontally for every one in input -; 2960 : int i; -; 2961 : stbi_uc* input = in_near; -; 2962 : -; 2963 : if (w == 1) { -; 2964 : // if only one sample, can't do any interpolation -; 2965 : out[0] = out[1] = input[0]; -; 2966 : return out; -; 2967 : } -; 2968 : -; 2969 : out[0] = input[0]; -; 2970 : out[1] = stbi__div4(input[0] * 3 + input[1] + 2); -; 2971 : for (i = 1; i < w - 1; ++i) { -; 2972 : int n = 3 * input[i] + 2; -; 2973 : out[i * 2 + 0] = stbi__div4(n + input[i - 1]); -; 2974 : out[i * 2 + 1] = stbi__div4(n + input[i + 1]); -; 2975 : } -; 2976 : out[i * 2 + 0] = stbi__div4(input[w - 2] * 3 + input[w - 1] + 2); -; 2977 : out[i * 2 + 1] = input[w - 1]; -; 2978 : -; 2979 : STBI_NOTUSED(in_far); -; 2980 : STBI_NOTUSED(hs); -; 2981 : -; 2982 : return out; -; 2983 : } -; 2984 : -; 2985 : #define stbi__div16(x) ((stbi_uc) ((x) >> 4)) -; 2986 : -; 2987 : static stbi_uc* stbi__resample_row_hv_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2988 : { -; 2989 : // need to generate 2x2 samples for every one in input -; 2990 : int i, t0, t1; -; 2991 : if (w == 1) { -; 2992 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 2993 : return out; -; 2994 : } -; 2995 : -; 2996 : t1 = 3 * in_near[0] + in_far[0]; -; 2997 : out[0] = stbi__div4(t1 + 2); -; 2998 : for (i = 1; i < w; ++i) { -; 2999 : t0 = t1; -; 3000 : t1 = 3 * in_near[i] + in_far[i]; -; 3001 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3002 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3003 : } -; 3004 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3005 : -; 3006 : STBI_NOTUSED(hs); -; 3007 : -; 3008 : return out; -; 3009 : } -; 3010 : -; 3011 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3012 : static stbi_uc* stbi__resample_row_hv_2_simd(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3013 : { -; 3014 : // need to generate 2x2 samples for every one in input -; 3015 : int i = 0, t0, t1; -; 3016 : -; 3017 : if (w == 1) { -; 3018 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 3019 : return out; -; 3020 : } -; 3021 : -; 3022 : t1 = 3 * in_near[0] + in_far[0]; -; 3023 : // process groups of 8 pixels for as long as we can. -; 3024 : // note we can't handle the last pixel in a row in this loop -; 3025 : // because we need to handle the filter boundary conditions. -; 3026 : for (; i < ((w - 1) & ~7); i += 8) { -; 3027 : #if defined(STBI_SSE2) -; 3028 : // load and perform the vertical filtering pass -; 3029 : // this uses 3*x + y = 4*x + (y - x) -; 3030 : __m128i zero = _mm_setzero_si128(); -; 3031 : __m128i farb = _mm_loadl_epi64((__m128i*) (in_far + i)); -; 3032 : __m128i nearb = _mm_loadl_epi64((__m128i*) (in_near + i)); -; 3033 : __m128i farw = _mm_unpacklo_epi8(farb, zero); -; 3034 : __m128i nearw = _mm_unpacklo_epi8(nearb, zero); -; 3035 : __m128i diff = _mm_sub_epi16(farw, nearw); -; 3036 : __m128i nears = _mm_slli_epi16(nearw, 2); -; 3037 : __m128i curr = _mm_add_epi16(nears, diff); // current row -; 3038 : -; 3039 : // horizontal filter works the same based on shifted vers of current -; 3040 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3041 : // insert the previous pixel value (from t1). -; 3042 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3043 : // of next block of 8 pixels added in. -; 3044 : __m128i prv0 = _mm_slli_si128(curr, 2); -; 3045 : __m128i nxt0 = _mm_srli_si128(curr, 2); -; 3046 : __m128i prev = _mm_insert_epi16(prv0, t1, 0); -; 3047 : __m128i next = _mm_insert_epi16(nxt0, 3 * in_near[i + 8] + in_far[i + 8], 7); -; 3048 : -; 3049 : // horizontal filter, polyphase implementation since it's convenient: -; 3050 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3051 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3052 : // note the shared term. -; 3053 : __m128i bias = _mm_set1_epi16(8); -; 3054 : __m128i curs = _mm_slli_epi16(curr, 2); -; 3055 : __m128i prvd = _mm_sub_epi16(prev, curr); -; 3056 : __m128i nxtd = _mm_sub_epi16(next, curr); -; 3057 : __m128i curb = _mm_add_epi16(curs, bias); -; 3058 : __m128i even = _mm_add_epi16(prvd, curb); -; 3059 : __m128i odd = _mm_add_epi16(nxtd, curb); -; 3060 : -; 3061 : // interleave even and odd pixels, then undo scaling. -; 3062 : __m128i int0 = _mm_unpacklo_epi16(even, odd); -; 3063 : __m128i int1 = _mm_unpackhi_epi16(even, odd); -; 3064 : __m128i de0 = _mm_srli_epi16(int0, 4); -; 3065 : __m128i de1 = _mm_srli_epi16(int1, 4); -; 3066 : -; 3067 : // pack and write output -; 3068 : __m128i outv = _mm_packus_epi16(de0, de1); -; 3069 : _mm_storeu_si128((__m128i*) (out + i * 2), outv); -; 3070 : #elif defined(STBI_NEON) -; 3071 : // load and perform the vertical filtering pass -; 3072 : // this uses 3*x + y = 4*x + (y - x) -; 3073 : uint8x8_t farb = vld1_u8(in_far + i); -; 3074 : uint8x8_t nearb = vld1_u8(in_near + i); -; 3075 : int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); -; 3076 : int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); -; 3077 : int16x8_t curr = vaddq_s16(nears, diff); // current row -; 3078 : -; 3079 : // horizontal filter works the same based on shifted vers of current -; 3080 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3081 : // insert the previous pixel value (from t1). -; 3082 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3083 : // of next block of 8 pixels added in. -; 3084 : int16x8_t prv0 = vextq_s16(curr, curr, 7); -; 3085 : int16x8_t nxt0 = vextq_s16(curr, curr, 1); -; 3086 : int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); -; 3087 : int16x8_t next = vsetq_lane_s16(3 * in_near[i + 8] + in_far[i + 8], nxt0, 7); -; 3088 : -; 3089 : // horizontal filter, polyphase implementation since it's convenient: -; 3090 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3091 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3092 : // note the shared term. -; 3093 : int16x8_t curs = vshlq_n_s16(curr, 2); -; 3094 : int16x8_t prvd = vsubq_s16(prev, curr); -; 3095 : int16x8_t nxtd = vsubq_s16(next, curr); -; 3096 : int16x8_t even = vaddq_s16(curs, prvd); -; 3097 : int16x8_t odd = vaddq_s16(curs, nxtd); -; 3098 : -; 3099 : // undo scaling and round, then store with even/odd phases interleaved -; 3100 : uint8x8x2_t o; -; 3101 : o.val[0] = vqrshrun_n_s16(even, 4); -; 3102 : o.val[1] = vqrshrun_n_s16(odd, 4); -; 3103 : vst2_u8(out + i * 2, o); -; 3104 : #endif -; 3105 : -; 3106 : // "previous" value for next iter -; 3107 : t1 = 3 * in_near[i + 7] + in_far[i + 7]; -; 3108 : } -; 3109 : -; 3110 : t0 = t1; -; 3111 : t1 = 3 * in_near[i] + in_far[i]; -; 3112 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3113 : -; 3114 : for (++i; i < w; ++i) { -; 3115 : t0 = t1; -; 3116 : t1 = 3 * in_near[i] + in_far[i]; -; 3117 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3118 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3119 : } -; 3120 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3121 : -; 3122 : STBI_NOTUSED(hs); -; 3123 : -; 3124 : return out; -; 3125 : } -; 3126 : #endif -; 3127 : -; 3128 : static stbi_uc* stbi__resample_row_generic(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3129 : { -; 3130 : // resample with nearest-neighbor -; 3131 : int i, j; -; 3132 : STBI_NOTUSED(in_far); -; 3133 : for (i = 0; i < w; ++i) -; 3134 : for (j = 0; j < hs; ++j) -; 3135 : out[i * hs + j] = in_near[i]; -; 3136 : return out; -; 3137 : } -; 3138 : -; 3139 : // this is a reduced-precision calculation of YCbCr-to-RGB introduced -; 3140 : // to make sure the code produces the same results in both SIMD and scalar -; 3141 : #define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) -; 3142 : static void stbi__YCbCr_to_RGB_row(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step) -; 3143 : { -; 3144 : int i; -; 3145 : for (i = 0; i < count; ++i) { -; 3146 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3147 : int r, g, b; -; 3148 : int cr = pcr[i] - 128; -; 3149 : int cb = pcb[i] - 128; -; 3150 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3151 : g = y_fixed + (cr * -stbi__float2fixed(0.71414f)) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3152 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3153 : r >>= 20; -; 3154 : g >>= 20; -; 3155 : b >>= 20; -; 3156 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3157 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3158 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3159 : out[0] = (stbi_uc)r; -; 3160 : out[1] = (stbi_uc)g; -; 3161 : out[2] = (stbi_uc)b; -; 3162 : out[3] = 255; -; 3163 : out += step; -; 3164 : } -; 3165 : } -; 3166 : -; 3167 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3168 : static void stbi__YCbCr_to_RGB_simd(stbi_uc* out, stbi_uc const* y, stbi_uc const* pcb, stbi_uc const* pcr, int count, int step) -; 3169 : { -; 3170 : int i = 0; -; 3171 : -; 3172 : #ifdef STBI_SSE2 -; 3173 : // step == 3 is pretty ugly on the final interleave, and i'm not convinced -; 3174 : // it's useful in practice (you wouldn't use it for textures, for example). -; 3175 : // so just accelerate step == 4 case. -; 3176 : if (step == 4) { -; 3177 : // this is a fairly straightforward implementation and not super-optimized. -; 3178 : __m128i signflip = _mm_set1_epi8(-0x80); -; 3179 : __m128i cr_const0 = _mm_set1_epi16((short)(1.40200f * 4096.0f + 0.5f)); -; 3180 : __m128i cr_const1 = _mm_set1_epi16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3181 : __m128i cb_const0 = _mm_set1_epi16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3182 : __m128i cb_const1 = _mm_set1_epi16((short)(1.77200f * 4096.0f + 0.5f)); -; 3183 : __m128i y_bias = _mm_set1_epi8((char)(unsigned char)128); -; 3184 : __m128i xw = _mm_set1_epi16(255); // alpha channel -; 3185 : -; 3186 : for (; i + 7 < count; i += 8) { -; 3187 : // load -; 3188 : __m128i y_bytes = _mm_loadl_epi64((__m128i*) (y + i)); -; 3189 : __m128i cr_bytes = _mm_loadl_epi64((__m128i*) (pcr + i)); -; 3190 : __m128i cb_bytes = _mm_loadl_epi64((__m128i*) (pcb + i)); -; 3191 : __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 -; 3192 : __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 -; 3193 : -; 3194 : // unpack to short (and left-shift cr, cb by 8) -; 3195 : __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); -; 3196 : __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); -; 3197 : __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); -; 3198 : -; 3199 : // color transform -; 3200 : __m128i yws = _mm_srli_epi16(yw, 4); -; 3201 : __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); -; 3202 : __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); -; 3203 : __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); -; 3204 : __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); -; 3205 : __m128i rws = _mm_add_epi16(cr0, yws); -; 3206 : __m128i gwt = _mm_add_epi16(cb0, yws); -; 3207 : __m128i bws = _mm_add_epi16(yws, cb1); -; 3208 : __m128i gws = _mm_add_epi16(gwt, cr1); -; 3209 : -; 3210 : // descale -; 3211 : __m128i rw = _mm_srai_epi16(rws, 4); -; 3212 : __m128i bw = _mm_srai_epi16(bws, 4); -; 3213 : __m128i gw = _mm_srai_epi16(gws, 4); -; 3214 : -; 3215 : // back to byte, set up for transpose -; 3216 : __m128i brb = _mm_packus_epi16(rw, bw); -; 3217 : __m128i gxb = _mm_packus_epi16(gw, xw); -; 3218 : -; 3219 : // transpose to interleave channels -; 3220 : __m128i t0 = _mm_unpacklo_epi8(brb, gxb); -; 3221 : __m128i t1 = _mm_unpackhi_epi8(brb, gxb); -; 3222 : __m128i o0 = _mm_unpacklo_epi16(t0, t1); -; 3223 : __m128i o1 = _mm_unpackhi_epi16(t0, t1); -; 3224 : -; 3225 : // store -; 3226 : _mm_storeu_si128((__m128i*) (out + 0), o0); -; 3227 : _mm_storeu_si128((__m128i*) (out + 16), o1); -; 3228 : out += 32; -; 3229 : } -; 3230 : } -; 3231 : #endif -; 3232 : -; 3233 : #ifdef STBI_NEON -; 3234 : // in this version, step=3 support would be easy to add. but is there demand? -; 3235 : if (step == 4) { -; 3236 : // this is a fairly straightforward implementation and not super-optimized. -; 3237 : uint8x8_t signflip = vdup_n_u8(0x80); -; 3238 : int16x8_t cr_const0 = vdupq_n_s16((short)(1.40200f * 4096.0f + 0.5f)); -; 3239 : int16x8_t cr_const1 = vdupq_n_s16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3240 : int16x8_t cb_const0 = vdupq_n_s16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3241 : int16x8_t cb_const1 = vdupq_n_s16((short)(1.77200f * 4096.0f + 0.5f)); -; 3242 : -; 3243 : for (; i + 7 < count; i += 8) { -; 3244 : // load -; 3245 : uint8x8_t y_bytes = vld1_u8(y + i); -; 3246 : uint8x8_t cr_bytes = vld1_u8(pcr + i); -; 3247 : uint8x8_t cb_bytes = vld1_u8(pcb + i); -; 3248 : int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); -; 3249 : int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); -; 3250 : -; 3251 : // expand to s16 -; 3252 : int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); -; 3253 : int16x8_t crw = vshll_n_s8(cr_biased, 7); -; 3254 : int16x8_t cbw = vshll_n_s8(cb_biased, 7); -; 3255 : -; 3256 : // color transform -; 3257 : int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); -; 3258 : int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); -; 3259 : int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); -; 3260 : int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); -; 3261 : int16x8_t rws = vaddq_s16(yws, cr0); -; 3262 : int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); -; 3263 : int16x8_t bws = vaddq_s16(yws, cb1); -; 3264 : -; 3265 : // undo scaling, round, convert to byte -; 3266 : uint8x8x4_t o; -; 3267 : o.val[0] = vqrshrun_n_s16(rws, 4); -; 3268 : o.val[1] = vqrshrun_n_s16(gws, 4); -; 3269 : o.val[2] = vqrshrun_n_s16(bws, 4); -; 3270 : o.val[3] = vdup_n_u8(255); -; 3271 : -; 3272 : // store, interleaving r/g/b/a -; 3273 : vst4_u8(out, o); -; 3274 : out += 8 * 4; -; 3275 : } -; 3276 : } -; 3277 : #endif -; 3278 : -; 3279 : for (; i < count; ++i) { -; 3280 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3281 : int r, g, b; -; 3282 : int cr = pcr[i] - 128; -; 3283 : int cb = pcb[i] - 128; -; 3284 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3285 : g = y_fixed + cr * -stbi__float2fixed(0.71414f) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3286 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3287 : r >>= 20; -; 3288 : g >>= 20; -; 3289 : b >>= 20; -; 3290 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3291 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3292 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3293 : out[0] = (stbi_uc)r; -; 3294 : out[1] = (stbi_uc)g; -; 3295 : out[2] = (stbi_uc)b; -; 3296 : out[3] = 255; -; 3297 : out += step; -; 3298 : } -; 3299 : } -; 3300 : #endif -; 3301 : -; 3302 : // set up the kernels -; 3303 : static void stbi__setup_jpeg(stbi__jpeg* j) -; 3304 : { -; 3305 : j->idct_block_kernel = stbi__idct_block; -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; -; 3308 : -; 3309 : #ifdef STBI_SSE2 -; 3310 : if (stbi__sse2_available()) { -; 3311 : j->idct_block_kernel = stbi__idct_simd; -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3314 : } -; 3315 : #endif -; 3316 : -; 3317 : #ifdef STBI_NEON -; 3318 : j->idct_block_kernel = stbi__idct_simd; -; 3319 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3320 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3321 : #endif -; 3322 : } -; 3323 : -; 3324 : // clean up the temporary component buffers -; 3325 : static void stbi__cleanup_jpeg(stbi__jpeg* j) -; 3326 : { -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); -; 3328 : } -; 3329 : -; 3330 : typedef struct -; 3331 : { -; 3332 : resample_row_func resample; -; 3333 : stbi_uc* line0, * line1; -; 3334 : int hs, vs; // expansion factor in each axis -; 3335 : int w_lores; // horizontal pixels pre-expansion -; 3336 : int ystep; // how far through vertical expansion we are -; 3337 : int ypos; // which pre-expansion row we're on -; 3338 : } stbi__resample; -; 3339 : -; 3340 : // fast 0..255 * 0..255 => 0..255 rounded multiplication -; 3341 : static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) -; 3342 : { -; 3343 : unsigned int t = x * y + 128; -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); -; 3345 : } -; 3346 : -; 3347 : static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp, int req_comp) -; 3348 : { -; 3349 : int n, decode_n, is_rgb; -; 3350 : z->s->img_n = 0; // make stbi__cleanup_jpeg safe -; 3351 : -; 3352 : // validate req_comp -; 3353 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 3354 : -; 3355 : // load a jpeg image from whichever source, but leave in YCbCr format -; 3356 : if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } -; 3357 : -; 3358 : // determine actual number of components to generate -; 3359 : n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; -; 3360 : -; 3361 : is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); -; 3362 : -; 3363 : if (z->s->img_n == 3 && n < 3 && !is_rgb) -; 3364 : decode_n = 1; -; 3365 : else -; 3366 : decode_n = z->s->img_n; -; 3367 : -; 3368 : // nothing to do if no components requested; check this now to avoid -; 3369 : // accessing uninitialized coutput[0] later -; 3370 : if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } -; 3371 : -; 3372 : // resample and color-convert -; 3373 : { -; 3374 : int k; -; 3375 : unsigned int i, j; -; 3376 : stbi_uc* output; -; 3377 : stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL }; -; 3378 : -; 3379 : stbi__resample res_comp[4]; -; 3380 : -; 3381 : for (k = 0; k < decode_n; ++k) { -; 3382 : stbi__resample* r = &res_comp[k]; -; 3383 : -; 3384 : // allocate line buffer big enough for upsampling off the edges -; 3385 : // with upsample factor of 4 -; 3386 : z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3); -; 3387 : if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3388 : -; 3389 : r->hs = z->img_h_max / z->img_comp[k].h; -; 3390 : r->vs = z->img_v_max / z->img_comp[k].v; -; 3391 : r->ystep = r->vs >> 1; -; 3392 : r->w_lores = (z->s->img_x + r->hs - 1) / r->hs; -; 3393 : r->ypos = 0; -; 3394 : r->line0 = r->line1 = z->img_comp[k].data; -; 3395 : -; 3396 : if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; -; 3397 : else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; -; 3398 : else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; -; 3399 : else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; -; 3400 : else r->resample = stbi__resample_row_generic; -; 3401 : } -; 3402 : -; 3403 : // can't error after this so, this is safe -; 3404 : output = (stbi_uc*)stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); -; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3406 : -; 3407 : // now go ahead and resample -; 3408 : for (j = 0; j < z->s->img_y; ++j) { -; 3409 : stbi_uc* out = output + n * z->s->img_x * j; -; 3410 : for (k = 0; k < decode_n; ++k) { -; 3411 : stbi__resample* r = &res_comp[k]; -; 3412 : int y_bot = r->ystep >= (r->vs >> 1); -; 3413 : coutput[k] = r->resample(z->img_comp[k].linebuf, -; 3414 : y_bot ? r->line1 : r->line0, -; 3415 : y_bot ? r->line0 : r->line1, -; 3416 : r->w_lores, r->hs); -; 3417 : if (++r->ystep >= r->vs) { -; 3418 : r->ystep = 0; -; 3419 : r->line0 = r->line1; -; 3420 : if (++r->ypos < z->img_comp[k].y) -; 3421 : r->line1 += z->img_comp[k].w2; -; 3422 : } -; 3423 : } -; 3424 : if (n >= 3) { -; 3425 : stbi_uc* y = coutput[0]; -; 3426 : if (z->s->img_n == 3) { -; 3427 : if (is_rgb) { -; 3428 : for (i = 0; i < z->s->img_x; ++i) { -; 3429 : out[0] = y[i]; -; 3430 : out[1] = coutput[1][i]; -; 3431 : out[2] = coutput[2][i]; -; 3432 : out[3] = 255; -; 3433 : out += n; -; 3434 : } -; 3435 : } -; 3436 : else { -; 3437 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3438 : } -; 3439 : } -; 3440 : else if (z->s->img_n == 4) { -; 3441 : if (z->app14_color_transform == 0) { // CMYK -; 3442 : for (i = 0; i < z->s->img_x; ++i) { -; 3443 : stbi_uc m = coutput[3][i]; -; 3444 : out[0] = stbi__blinn_8x8(coutput[0][i], m); -; 3445 : out[1] = stbi__blinn_8x8(coutput[1][i], m); -; 3446 : out[2] = stbi__blinn_8x8(coutput[2][i], m); -; 3447 : out[3] = 255; -; 3448 : out += n; -; 3449 : } -; 3450 : } -; 3451 : else if (z->app14_color_transform == 2) { // YCCK -; 3452 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3453 : for (i = 0; i < z->s->img_x; ++i) { -; 3454 : stbi_uc m = coutput[3][i]; -; 3455 : out[0] = stbi__blinn_8x8(255 - out[0], m); -; 3456 : out[1] = stbi__blinn_8x8(255 - out[1], m); -; 3457 : out[2] = stbi__blinn_8x8(255 - out[2], m); -; 3458 : out += n; -; 3459 : } -; 3460 : } -; 3461 : else { // YCbCr + alpha? Ignore the fourth channel for now -; 3462 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3463 : } -; 3464 : } -; 3465 : else -; 3466 : for (i = 0; i < z->s->img_x; ++i) { -; 3467 : out[0] = out[1] = out[2] = y[i]; -; 3468 : out[3] = 255; // not used if n==3 -; 3469 : out += n; -; 3470 : } -; 3471 : } -; 3472 : else { -; 3473 : if (is_rgb) { -; 3474 : if (n == 1) -; 3475 : for (i = 0; i < z->s->img_x; ++i) -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3477 : else { -; 3478 : for (i = 0; i < z->s->img_x; ++i, out += 2) { -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3480 : out[1] = 255; -; 3481 : } -; 3482 : } -; 3483 : } -; 3484 : else if (z->s->img_n == 4 && z->app14_color_transform == 0) { -; 3485 : for (i = 0; i < z->s->img_x; ++i) { -; 3486 : stbi_uc m = coutput[3][i]; -; 3487 : stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); -; 3488 : stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); -; 3489 : stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); -; 3490 : out[0] = stbi__compute_y(r, g, b); -; 3491 : out[1] = 255; -; 3492 : out += n; -; 3493 : } -; 3494 : } -; 3495 : else if (z->s->img_n == 4 && z->app14_color_transform == 2) { -; 3496 : for (i = 0; i < z->s->img_x; ++i) { -; 3497 : out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); -; 3498 : out[1] = 255; -; 3499 : out += n; -; 3500 : } -; 3501 : } -; 3502 : else { -; 3503 : stbi_uc* y = coutput[0]; -; 3504 : if (n == 1) -; 3505 : for (i = 0; i < z->s->img_x; ++i) out[i] = y[i]; -; 3506 : else -; 3507 : for (i = 0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } -; 3508 : } -; 3509 : } -; 3510 : } -; 3511 : stbi__cleanup_jpeg(z); -; 3512 : *out_x = z->s->img_x; -; 3513 : *out_y = z->s->img_y; -; 3514 : if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output -; 3515 : return output; -; 3516 : } -; 3517 : } -; 3518 : -; 3519 : static void* stbi__jpeg_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 3520 : { -; 3521 : unsigned char* result; -; 3522 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); -; 3524 : memset(j, 0, sizeof(stbi__jpeg)); -; 3525 : STBI_NOTUSED(ri); -; 3526 : j->s = s; -; 3527 : stbi__setup_jpeg(j); -; 3528 : result = load_jpeg_image(j, x, y, comp, req_comp); -; 3529 : STBI_FREE(j); -; 3530 : return result; -; 3531 : } -; 3532 : -; 3533 : static int stbi__jpeg_test(stbi__context* s) -; 3534 : { -; 3535 : int r; -; 3536 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3538 : memset(j, 0, sizeof(stbi__jpeg)); -; 3539 : j->s = s; -; 3540 : stbi__setup_jpeg(j); -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); -; 3542 : stbi__rewind(s); -; 3543 : STBI_FREE(j); -; 3544 : return r; -; 3545 : } -; 3546 : -; 3547 : static int stbi__jpeg_info_raw(stbi__jpeg* j, int* x, int* y, int* comp) -; 3548 : { -; 3549 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { -; 3550 : stbi__rewind(j->s); -; 3551 : return 0; -; 3552 : } -; 3553 : if (x) *x = j->s->img_x; -; 3554 : if (y) *y = j->s->img_y; -; 3555 : if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; -; 3556 : return 1; -; 3557 : } -; 3558 : -; 3559 : static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp) -; 3560 : { -; 3561 : int result; -; 3562 : stbi__jpeg* j = (stbi__jpeg*)(stbi__malloc(sizeof(stbi__jpeg))); -; 3563 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3564 : memset(j, 0, sizeof(stbi__jpeg)); -; 3565 : j->s = s; -; 3566 : result = stbi__jpeg_info_raw(j, x, y, comp); -; 3567 : STBI_FREE(j); -; 3568 : return result; -; 3569 : } -; 3570 : #endif -; 3571 : -; 3572 : // public domain zlib decode v0.2 Sean Barrett 2006-11-18 -; 3573 : // simple implementation -; 3574 : // - all input must be provided in an upfront buffer -; 3575 : // - all output is written to a single output buffer (can malloc/realloc) -; 3576 : // performance -; 3577 : // - fast huffman -; 3578 : -; 3579 : #ifndef STBI_NO_ZLIB -; 3580 : -; 3581 : // fast-way is faster to check than jpeg huffman, but slow way is slower -; 3582 : #define STBI__ZFAST_BITS 9 // accelerate all cases in default tables -; 3583 : #define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) -; 3584 : #define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet -; 3585 : -; 3586 : // zlib-style huffman encoding -; 3587 : // (jpegs packs from left, zlib from right, so can't share code) -; 3588 : typedef struct -; 3589 : { -; 3590 : stbi__uint16 fast[1 << STBI__ZFAST_BITS]; -; 3591 : stbi__uint16 firstcode[16]; -; 3592 : int maxcode[17]; -; 3593 : stbi__uint16 firstsymbol[16]; -; 3594 : stbi_uc size[STBI__ZNSYMS]; -; 3595 : stbi__uint16 value[STBI__ZNSYMS]; -; 3596 : } stbi__zhuffman; -; 3597 : -; 3598 : stbi_inline static int stbi__bitreverse16(int n) -; 3599 : { -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); -; 3604 : return n; -; 3605 : } -; 3606 : -; 3607 : stbi_inline static int stbi__bit_reverse(int v, int bits) -; 3608 : { -; 3609 : STBI_ASSERT(bits <= 16); -; 3610 : // to bit reverse n bits, reverse 16 and shift -; 3611 : // e.g. 11 bits, bit reverse and shift away 5 -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); -; 3613 : } -; 3614 : -; 3615 : static int stbi__zbuild_huffman(stbi__zhuffman* z, const stbi_uc* sizelist, int num) -; 3616 : { -; 3617 : int i, k = 0; -; 3618 : int code, next_code[16], sizes[17]; -; 3619 : -; 3620 : // DEFLATE spec for generating codes -; 3621 : memset(sizes, 0, sizeof(sizes)); -; 3622 : memset(z->fast, 0, sizeof(z->fast)); -; 3623 : for (i = 0; i < num; ++i) -; 3624 : ++sizes[sizelist[i]]; -; 3625 : sizes[0] = 0; -; 3626 : for (i = 1; i < 16; ++i) -; 3627 : if (sizes[i] > (1 << i)) -; 3628 : return stbi__err("bad sizes", "Corrupt PNG"); -; 3629 : code = 0; -; 3630 : for (i = 1; i < 16; ++i) { -; 3631 : next_code[i] = code; -; 3632 : z->firstcode[i] = (stbi__uint16)code; -; 3633 : z->firstsymbol[i] = (stbi__uint16)k; -; 3634 : code = (code + sizes[i]); -; 3635 : if (sizes[i]) -; 3636 : if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3637 : z->maxcode[i] = code << (16 - i); // preshift for inner loop -; 3638 : code <<= 1; -; 3639 : k += sizes[i]; -; 3640 : } -; 3641 : z->maxcode[16] = 0x10000; // sentinel -; 3642 : for (i = 0; i < num; ++i) { -; 3643 : int s = sizelist[i]; -; 3644 : if (s) { -; 3645 : int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; -; 3646 : stbi__uint16 fastv = (stbi__uint16)((s << 9) | i); -; 3647 : z->size[c] = (stbi_uc)s; -; 3648 : z->value[c] = (stbi__uint16)i; -; 3649 : if (s <= STBI__ZFAST_BITS) { -; 3650 : int j = stbi__bit_reverse(next_code[s], s); -; 3651 : while (j < (1 << STBI__ZFAST_BITS)) { -; 3652 : z->fast[j] = fastv; -; 3653 : j += (1 << s); -; 3654 : } -; 3655 : } -; 3656 : ++next_code[s]; -; 3657 : } -; 3658 : } -; 3659 : return 1; -; 3660 : } -; 3661 : -; 3662 : // zlib-from-memory implementation for PNG reading -; 3663 : // because PNG allows splitting the zlib stream arbitrarily, -; 3664 : // and it's annoying structurally to have PNG call ZLIB call PNG, -; 3665 : // we require PNG read all the IDATs and combine them into a single -; 3666 : // memory buffer -; 3667 : -; 3668 : typedef struct -; 3669 : { -; 3670 : stbi_uc* zbuffer, * zbuffer_end; -; 3671 : int num_bits; -; 3672 : stbi__uint32 code_buffer; -; 3673 : -; 3674 : char* zout; -; 3675 : char* zout_start; -; 3676 : char* zout_end; -; 3677 : int z_expandable; -; 3678 : -; 3679 : stbi__zhuffman z_length, z_distance; -; 3680 : } stbi__zbuf; -; 3681 : -; 3682 : stbi_inline static int stbi__zeof(stbi__zbuf* z) -; 3683 : { -; 3684 : return (z->zbuffer >= z->zbuffer_end); -; 3685 : } -; 3686 : -; 3687 : stbi_inline static stbi_uc stbi__zget8(stbi__zbuf* z) -; 3688 : { -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ -; 3697 : return; -; 3698 : } -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; -; 3700 : z->num_bits += 8; -; 3701 : } while (z->num_bits <= 24); -; 3702 : } -; 3703 : -; 3704 : stbi_inline static unsigned int stbi__zreceive(stbi__zbuf* z, int n) -; 3705 : { -; 3706 : unsigned int k; -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); -; 3708 : k = z->code_buffer & ((1 << n) - 1); -; 3709 : z->code_buffer >>= n; -; 3710 : z->num_bits -= n; -; 3711 : return k; -; 3712 : } -; 3713 : -; 3714 : static int stbi__zhuffman_decode_slowpath(stbi__zbuf* a, stbi__zhuffman* z) -; 3715 : { -; 3716 : int b, s, k; -; 3717 : // not resolved by fast table, so compute it the slow way -; 3718 : // use jpeg approach, which requires MSbits at top -; 3719 : k = stbi__bit_reverse(a->code_buffer, 16); -; 3720 : for (s = STBI__ZFAST_BITS + 1; ; ++s) -; 3721 : if (k < z->maxcode[s]) -; 3722 : break; -; 3723 : if (s >= 16) return -1; // invalid code! -; 3724 : // code size is s, so: -; 3725 : b = (k >> (16 - s)) - z->firstcode[s] + z->firstsymbol[s]; -; 3726 : if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! -; 3727 : if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. -; 3728 : a->code_buffer >>= s; -; 3729 : a->num_bits -= s; -; 3730 : return z->value[b]; -; 3731 : } -; 3732 : -; 3733 : stbi_inline static int stbi__zhuffman_decode(stbi__zbuf* a, stbi__zhuffman* z) -; 3734 : { -; 3735 : int b, s; -; 3736 : if (a->num_bits < 16) { -; 3737 : if (stbi__zeof(a)) { -; 3738 : return -1; /* report error for unexpected end of data. */ -; 3739 : } -; 3740 : stbi__fill_bits(a); -; 3741 : } -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; -; 3743 : if (b) { -; 3744 : s = b >> 9; -; 3745 : a->code_buffer >>= s; -; 3746 : a->num_bits -= s; -; 3747 : return b & 511; -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); -; 3750 : } -; 3751 : -; 3752 : static int stbi__zexpand(stbi__zbuf* z, char* zout, int n) // need to make room for n bytes -; 3753 : { -; 3754 : char* q; -; 3755 : unsigned int cur, limit, old_limit; -; 3756 : z->zout = zout; -; 3757 : if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG"); -; 3758 : cur = (unsigned int)(z->zout - z->zout_start); -; 3759 : limit = old_limit = (unsigned)(z->zout_end - z->zout_start); -; 3760 : if (UINT_MAX - cur < (unsigned)n) return stbi__err("outofmem", "Out of memory"); -; 3761 : while (cur + n > limit) { -; 3762 : if (limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); -; 3763 : limit *= 2; -; 3764 : } -; 3765 : q = (char*)STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); -; 3766 : STBI_NOTUSED(old_limit); -; 3767 : if (q == NULL) return stbi__err("outofmem", "Out of memory"); -; 3768 : z->zout_start = q; -; 3769 : z->zout = q + cur; -; 3770 : z->zout_end = q + limit; -; 3771 : return 1; -; 3772 : } -; 3773 : -; 3774 : static const int stbi__zlength_base[31] = { -; 3775 : 3,4,5,6,7,8,9,10,11,13, -; 3776 : 15,17,19,23,27,31,35,43,51,59, -; 3777 : 67,83,99,115,131,163,195,227,258,0,0 }; -; 3778 : -; 3779 : static const int stbi__zlength_extra[31] = -; 3780 : { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; -; 3781 : -; 3782 : static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, -; 3783 : 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0 }; -; 3784 : -; 3785 : static const int stbi__zdist_extra[32] = -; 3786 : { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 }; -; 3787 : -; 3788 : static int stbi__parse_huffman_block(stbi__zbuf* a) -; 3789 : { -; 3790 : char* zout = a->zout; -; 3791 : for (;;) { -; 3792 : int z = stbi__zhuffman_decode(a, &a->z_length); -; 3793 : if (z < 256) { -; 3794 : if (z < 0) return stbi__err("bad huffman code", "Corrupt PNG"); // error in huffman codes -; 3795 : if (zout >= a->zout_end) { -; 3796 : if (!stbi__zexpand(a, zout, 1)) return 0; -; 3797 : zout = a->zout; -; 3798 : } -; 3799 : *zout++ = (char)z; -; 3800 : } -; 3801 : else { -; 3802 : stbi_uc* p; -; 3803 : int len, dist; -; 3804 : if (z == 256) { -; 3805 : a->zout = zout; -; 3806 : return 1; -; 3807 : } -; 3808 : if (z >= 286) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data -; 3809 : z -= 257; -; 3810 : len = stbi__zlength_base[z]; -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); -; 3812 : z = stbi__zhuffman_decode(a, &a->z_distance); -; 3813 : if (z < 0 || z >= 30) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data -; 3814 : dist = stbi__zdist_base[z]; -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); -; 3816 : if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG"); -; 3817 : if (zout + len > a->zout_end) { -; 3818 : if (!stbi__zexpand(a, zout, len)) return 0; -; 3819 : zout = a->zout; -; 3820 : } -; 3821 : p = (stbi_uc*)(zout - dist); -; 3822 : if (dist == 1) { // run of one byte; common in images. -; 3823 : stbi_uc v = *p; -; 3824 : if (len) { do *zout++ = v; while (--len); } -; 3825 : } -; 3826 : else { -; 3827 : if (len) { do *zout++ = *p++; while (--len); } -; 3828 : } -; 3829 : } -; 3830 : } -; 3831 : } -; 3832 : -; 3833 : static int stbi__compute_huffman_codes(stbi__zbuf* a) -; 3834 : { -; 3835 : static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; -; 3836 : stbi__zhuffman z_codelength; -; 3837 : stbi_uc lencodes[286 + 32 + 137];//padding for maximum single op -; 3838 : stbi_uc codelength_sizes[19]; -; 3839 : int i, n; -; 3840 : -; 3841 : int hlit = stbi__zreceive(a, 5) + 257; -; 3842 : int hdist = stbi__zreceive(a, 5) + 1; -; 3843 : int hclen = stbi__zreceive(a, 4) + 4; -; 3844 : int ntot = hlit + hdist; -; 3845 : -; 3846 : memset(codelength_sizes, 0, sizeof(codelength_sizes)); -; 3847 : for (i = 0; i < hclen; ++i) { -; 3848 : int s = stbi__zreceive(a, 3); -; 3849 : codelength_sizes[length_dezigzag[i]] = (stbi_uc)s; -; 3850 : } -; 3851 : if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; -; 3852 : -; 3853 : n = 0; -; 3854 : while (n < ntot) { -; 3855 : int c = stbi__zhuffman_decode(a, &z_codelength); -; 3856 : if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3857 : if (c < 16) -; 3858 : lencodes[n++] = (stbi_uc)c; -; 3859 : else { -; 3860 : stbi_uc fill = 0; -; 3861 : if (c == 16) { -; 3862 : c = stbi__zreceive(a, 2) + 3; -; 3863 : if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3864 : fill = lencodes[n - 1]; -; 3865 : } -; 3866 : else if (c == 17) { -; 3867 : c = stbi__zreceive(a, 3) + 3; -; 3868 : } -; 3869 : else if (c == 18) { -; 3870 : c = stbi__zreceive(a, 7) + 11; -; 3871 : } -; 3872 : else { -; 3873 : return stbi__err("bad codelengths", "Corrupt PNG"); -; 3874 : } -; 3875 : if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3876 : memset(lencodes + n, fill, c); -; 3877 : n += c; -; 3878 : } -; 3879 : } -; 3880 : if (n != ntot) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3881 : if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; -; 3882 : if (!stbi__zbuild_huffman(&a->z_distance, lencodes + hlit, hdist)) return 0; -; 3883 : return 1; -; 3884 : } -; 3885 : -; 3886 : static int stbi__parse_uncompressed_block(stbi__zbuf* a) -; 3887 : { -; 3888 : stbi_uc header[4]; -; 3889 : int len, nlen, k; -; 3890 : if (a->num_bits & 7) -; 3891 : stbi__zreceive(a, a->num_bits & 7); // discard -; 3892 : // drain the bit-packed data into header -; 3893 : k = 0; -; 3894 : while (a->num_bits > 0) { -; 3895 : header[k++] = (stbi_uc)(a->code_buffer & 255); // suppress MSVC run-time check -; 3896 : a->code_buffer >>= 8; -; 3897 : a->num_bits -= 8; -; 3898 : } -; 3899 : if (a->num_bits < 0) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3900 : // now fill header the normal way -; 3901 : while (k < 4) -; 3902 : header[k++] = stbi__zget8(a); -; 3903 : len = header[1] * 256 + header[0]; -; 3904 : nlen = header[3] * 256 + header[2]; -; 3905 : if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3906 : if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG"); -; 3907 : if (a->zout + len > a->zout_end) -; 3908 : if (!stbi__zexpand(a, a->zout, len)) return 0; -; 3909 : memcpy(a->zout, a->zbuffer, len); -; 3910 : a->zbuffer += len; -; 3911 : a->zout += len; -; 3912 : return 1; -; 3913 : } -; 3914 : -; 3915 : static int stbi__parse_zlib_header(stbi__zbuf* a) -; 3916 : { -; 3917 : int cmf = stbi__zget8(a); -; 3918 : int cm = cmf & 15; -; 3919 : /* int cinfo = cmf >> 4; */ -; 3920 : int flg = stbi__zget8(a); -; 3921 : if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3922 : if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png -; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png -; 3925 : // window = 1 << (8 + cinfo)... but who cares, we fully buffer output -; 3926 : return 1; -; 3927 : } -; 3928 : -; 3929 : static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] = -; 3930 : { -; 3931 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3932 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3933 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3934 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3935 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3936 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3937 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3938 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3939 : 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 -; 3940 : }; -; 3941 : static const stbi_uc stbi__zdefault_distance[32] = -; 3942 : { -; 3943 : 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 -; 3944 : }; -; 3945 : /* -; 3946 : Init algorithm: -; 3947 : { -; 3948 : int i; // use <= to match clearly with spec -; 3949 : for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; -; 3950 : for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; -; 3951 : for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; -; 3952 : for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; -; 3953 : -; 3954 : for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; -; 3955 : } -; 3956 : */ -; 3957 : -; 3958 : static int stbi__parse_zlib(stbi__zbuf* a, int parse_header) -; 3959 : { -; 3960 : int final, type; -; 3961 : if (parse_header) -; 3962 : if (!stbi__parse_zlib_header(a)) return 0; -; 3963 : a->num_bits = 0; -; 3964 : a->code_buffer = 0; -; 3965 : do { -; 3966 : final = stbi__zreceive(a, 1); -; 3967 : type = stbi__zreceive(a, 2); -; 3968 : if (type == 0) { -; 3969 : if (!stbi__parse_uncompressed_block(a)) return 0; -; 3970 : } -; 3971 : else if (type == 3) { -; 3972 : return 0; -; 3973 : } -; 3974 : else { -; 3975 : if (type == 1) { -; 3976 : // use fixed code lengths -; 3977 : if (!stbi__zbuild_huffman(&a->z_length, stbi__zdefault_length, STBI__ZNSYMS)) return 0; -; 3978 : if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; -; 3979 : } -; 3980 : else { -; 3981 : if (!stbi__compute_huffman_codes(a)) return 0; -; 3982 : } -; 3983 : if (!stbi__parse_huffman_block(a)) return 0; -; 3984 : } -; 3985 : } while (!final); -; 3986 : return 1; -; 3987 : } -; 3988 : -; 3989 : static int stbi__do_zlib(stbi__zbuf* a, char* obuf, int olen, int exp, int parse_header) -; 3990 : { -; 3991 : a->zout_start = obuf; -; 3992 : a->zout = obuf; -; 3993 : a->zout_end = obuf + olen; -; 3994 : a->z_expandable = exp; -; 3995 : -; 3996 : return stbi__parse_zlib(a, parse_header); -; 3997 : } -; 3998 : -; 3999 : STBIDEF char* stbi_zlib_decode_malloc_guesssize(const char* buffer, int len, int initial_size, int* outlen) -; 4000 : { -; 4001 : stbi__zbuf a; -; 4002 : char* p = (char*)stbi__malloc(initial_size); -; 4003 : if (p == NULL) return NULL; -; 4004 : a.zbuffer = (stbi_uc*)buffer; -; 4005 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4006 : if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { -; 4007 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4008 : return a.zout_start; -; 4009 : } -; 4010 : else { -; 4011 : STBI_FREE(a.zout_start); -; 4012 : return NULL; -; 4013 : } -; 4014 : } -; 4015 : -; 4016 : STBIDEF char* stbi_zlib_decode_malloc(char const* buffer, int len, int* outlen) -; 4017 : { -; 4018 : return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); -; 4019 : } -; 4020 : -; 4021 : STBIDEF char* stbi_zlib_decode_malloc_guesssize_headerflag(const char* buffer, int len, int initial_size, int* outlen, int parse_header) -; 4022 : { -; 4023 : stbi__zbuf a; -; 4024 : char* p = (char*)stbi__malloc(initial_size); -; 4025 : if (p == NULL) return NULL; -; 4026 : a.zbuffer = (stbi_uc*)buffer; -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4028 : if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { -; 4029 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4030 : return a.zout_start; -; 4031 : } -; 4032 : else { -; 4033 : STBI_FREE(a.zout_start); -; 4034 : return NULL; -; 4035 : } -; 4036 : } -; 4037 : -; 4038 : STBIDEF int stbi_zlib_decode_buffer(char* obuffer, int olen, char const* ibuffer, int ilen) -; 4039 : { -; 4040 : stbi__zbuf a; -; 4041 : a.zbuffer = (stbi_uc*)ibuffer; -; 4042 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4043 : if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) -; 4044 : return (int)(a.zout - a.zout_start); -; 4045 : else -; 4046 : return -1; -; 4047 : } -; 4048 : -; 4049 : STBIDEF char* stbi_zlib_decode_noheader_malloc(char const* buffer, int len, int* outlen) -; 4050 : { -; 4051 : stbi__zbuf a; -; 4052 : char* p = (char*)stbi__malloc(16384); -; 4053 : if (p == NULL) return NULL; -; 4054 : a.zbuffer = (stbi_uc*)buffer; -; 4055 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4056 : if (stbi__do_zlib(&a, p, 16384, 1, 0)) { -; 4057 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4058 : return a.zout_start; -; 4059 : } -; 4060 : else { -; 4061 : STBI_FREE(a.zout_start); -; 4062 : return NULL; -; 4063 : } -; 4064 : } -; 4065 : -; 4066 : STBIDEF int stbi_zlib_decode_noheader_buffer(char* obuffer, int olen, const char* ibuffer, int ilen) -; 4067 : { -; 4068 : stbi__zbuf a; -; 4069 : a.zbuffer = (stbi_uc*)ibuffer; -; 4070 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4071 : if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) -; 4072 : return (int)(a.zout - a.zout_start); -; 4073 : else -; 4074 : return -1; -; 4075 : } -; 4076 : #endif -; 4077 : -; 4078 : // public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 -; 4079 : // simple implementation -; 4080 : // - only 8-bit samples -; 4081 : // - no CRC checking -; 4082 : // - allocates lots of intermediate memory -; 4083 : // - avoids problem of streaming data between subsystems -; 4084 : // - avoids explicit window management -; 4085 : // performance -; 4086 : // - uses stb_zlib, a PD zlib implementation with fast huffman decoding -; 4087 : -; 4088 : #ifndef STBI_NO_PNG -; 4089 : typedef struct -; 4090 : { -; 4091 : stbi__uint32 length; -; 4092 : stbi__uint32 type; -; 4093 : } stbi__pngchunk; -; 4094 : -; 4095 : static stbi__pngchunk stbi__get_chunk_header(stbi__context* s) -; 4096 : { -; 4097 : stbi__pngchunk c; -; 4098 : c.length = stbi__get32be(s); -; 4099 : c.type = stbi__get32be(s); -; 4100 : return c; -; 4101 : } -; 4102 : -; 4103 : static int stbi__check_png_header(stbi__context* s) -; 4104 : { -; 4105 : static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; -; 4106 : int i; -; 4107 : for (i = 0; i < 8; ++i) -; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); -; 4109 : return 1; -; 4110 : } -; 4111 : -; 4112 : typedef struct -; 4113 : { -; 4114 : stbi__context* s; -; 4115 : stbi_uc* idata, * expanded, * out; -; 4116 : int depth; -; 4117 : } stbi__png; -; 4118 : -; 4119 : enum { -; 4120 : STBI__F_none = 0, -; 4121 : STBI__F_sub = 1, -; 4122 : STBI__F_up = 2, -; 4123 : STBI__F_avg = 3, -; 4124 : STBI__F_paeth = 4, -; 4125 : // synthetic filters used for first scanline to avoid needing a dummy row of 0s -; 4126 : STBI__F_avg_first, -; 4127 : STBI__F_paeth_first -; 4128 : }; -; 4129 : -; 4130 : static stbi_uc first_row_filter[5] = -; 4131 : { -; 4132 : STBI__F_none, -; 4133 : STBI__F_sub, -; 4134 : STBI__F_none, -; 4135 : STBI__F_avg_first, -; 4136 : STBI__F_paeth_first -; 4137 : }; -; 4138 : -; 4139 : static int stbi__paeth(int a, int b, int c) -; 4140 : { -; 4141 : int p = a + b - c; -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); -; 4144 : int pc = abs(p - c); -; 4145 : if (pa <= pb && pa <= pc) return a; -; 4146 : if (pb <= pc) return b; -; 4147 : return c; -; 4148 : } -; 4149 : -; 4150 : static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; -; 4151 : -; 4152 : // create the png data from post-deflated data -; 4153 : static int stbi__create_png_image_raw(stbi__png* a, stbi_uc* raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -; 4154 : { -; 4155 : int bytes = (depth == 16 ? 2 : 1); -; 4156 : stbi__context* s = a->s; -; 4157 : stbi__uint32 i, j, stride = x * out_n * bytes; -; 4158 : stbi__uint32 img_len, img_width_bytes; -; 4159 : int k; -; 4160 : int img_n = s->img_n; // copy it into a local for later -; 4161 : -; 4162 : int output_bytes = out_n * bytes; -; 4163 : int filter_bytes = img_n * bytes; -; 4164 : int width = x; -; 4165 : -; 4166 : STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1); -; 4167 : a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into -; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); -; 4169 : -; 4170 : if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); -; 4171 : img_width_bytes = (((img_n * x * depth) + 7) >> 3); -; 4172 : img_len = (img_width_bytes + 1) * y; -; 4173 : -; 4174 : // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, -; 4175 : // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), -; 4176 : // so just check for raw_len < img_len always. -; 4177 : if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG"); -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { -; 4180 : stbi_uc* cur = a->out + stride * j; -; 4181 : stbi_uc* prior; -; 4182 : int filter = *raw++; -; 4183 : -; 4184 : if (filter > 4) -; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); -; 4186 : -; 4187 : if (depth < 8) { -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); -; 4189 : cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place -; 4190 : filter_bytes = 1; -; 4191 : width = img_width_bytes; -; 4192 : } -; 4193 : prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above -; 4194 : -; 4195 : // if first row, use special filter that doesn't sample previous row -; 4196 : if (j == 0) filter = first_row_filter[filter]; -; 4197 : -; 4198 : // handle first byte explicitly -; 4199 : for (k = 0; k < filter_bytes; ++k) { -; 4200 : switch (filter) { -; 4201 : case STBI__F_none: cur[k] = raw[k]; break; -; 4202 : case STBI__F_sub: cur[k] = raw[k]; break; -; 4203 : case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; -; 4204 : case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break; -; 4205 : case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break; -; 4206 : case STBI__F_avg_first: cur[k] = raw[k]; break; -; 4207 : case STBI__F_paeth_first: cur[k] = raw[k]; break; -; 4208 : } -; 4209 : } -; 4210 : -; 4211 : if (depth == 8) { -; 4212 : if (img_n != out_n) -; 4213 : cur[img_n] = 255; // first pixel -; 4214 : raw += img_n; -; 4215 : cur += out_n; -; 4216 : prior += out_n; -; 4217 : } -; 4218 : else if (depth == 16) { -; 4219 : if (img_n != out_n) { -; 4220 : cur[filter_bytes] = 255; // first pixel top byte -; 4221 : cur[filter_bytes + 1] = 255; // first pixel bottom byte -; 4222 : } -; 4223 : raw += filter_bytes; -; 4224 : cur += output_bytes; -; 4225 : prior += output_bytes; -; 4226 : } -; 4227 : else { -; 4228 : raw += 1; -; 4229 : cur += 1; -; 4230 : prior += 1; -; 4231 : } -; 4232 : -; 4233 : // this is a little gross, so that we don't switch per-pixel or per-component -; 4234 : if (depth < 8 || img_n == out_n) { -; 4235 : int nk = (width - 1) * filter_bytes; -; 4236 : #define STBI__CASE(f) \ -; 4237 : case f: \ -; 4238 : for (k=0; k < nk; ++k) -; 4239 : switch (filter) { -; 4240 : // "none" filter turns into a memcpy here; make that explicit. -; 4241 : case STBI__F_none: memcpy(cur, raw, nk); break; -; 4242 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break; -; 4243 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4244 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break; -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; -; 4246 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break; -; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; -; 4248 : } -; 4249 : #undef STBI__CASE -; 4250 : raw += nk; -; 4251 : } -; 4252 : else { -; 4253 : STBI_ASSERT(img_n + 1 == out_n); -; 4254 : #define STBI__CASE(f) \ -; 4255 : case f: \ -; 4256 : for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ -; 4257 : for (k=0; k < filter_bytes; ++k) -; 4258 : switch (filter) { -; 4259 : STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; -; 4260 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break; -; 4261 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4262 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break; -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; -; 4264 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break; -; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; -; 4266 : } -; 4267 : #undef STBI__CASE -; 4268 : -; 4269 : // the loop above sets the high byte of the pixels' alpha, but for -; 4270 : // 16 bit png files we also need the low byte set. we'll do that here. -; 4271 : if (depth == 16) { -; 4272 : cur = a->out + stride * j; // start at the beginning of the row again -; 4273 : for (i = 0; i < x; ++i, cur += output_bytes) { -; 4274 : cur[filter_bytes + 1] = 255; -; 4275 : } -; 4276 : } -; 4277 : } -; 4278 : } -; 4279 : -; 4280 : // we make a separate pass to expand bits to pixels; for performance, -; 4281 : // this could run two scanlines behind the above code, so it won't -; 4282 : // intefere with filtering but will still be in the cache. -; 4283 : if (depth < 8) { -; 4284 : for (j = 0; j < y; ++j) { -; 4285 : stbi_uc* cur = a->out + stride * j; -; 4286 : stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes; -; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit -; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop -; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range -; 4290 : -; 4291 : // note that the final byte might overshoot and write more data than desired. -; 4292 : // we can allocate enough data that this never writes out of memory, but it -; 4293 : // could also overwrite the next scanline. can it overwrite non-empty data -; 4294 : // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. -; 4295 : // so we need to explicitly clamp the final ones -; 4296 : -; 4297 : if (depth == 4) { -; 4298 : for (k = x * img_n; k >= 2; k -= 2, ++in) { -; 4299 : *cur++ = scale * ((*in >> 4)); -; 4300 : *cur++ = scale * ((*in) & 0x0f); -; 4301 : } -; 4302 : if (k > 0) *cur++ = scale * ((*in >> 4)); -; 4303 : } -; 4304 : else if (depth == 2) { -; 4305 : for (k = x * img_n; k >= 4; k -= 4, ++in) { -; 4306 : *cur++ = scale * ((*in >> 6)); -; 4307 : *cur++ = scale * ((*in >> 4) & 0x03); -; 4308 : *cur++ = scale * ((*in >> 2) & 0x03); -; 4309 : *cur++ = scale * ((*in) & 0x03); -; 4310 : } -; 4311 : if (k > 0) *cur++ = scale * ((*in >> 6)); -; 4312 : if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); -; 4313 : if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); -; 4314 : } -; 4315 : else if (depth == 1) { -; 4316 : for (k = x * img_n; k >= 8; k -= 8, ++in) { -; 4317 : *cur++ = scale * ((*in >> 7)); -; 4318 : *cur++ = scale * ((*in >> 6) & 0x01); -; 4319 : *cur++ = scale * ((*in >> 5) & 0x01); -; 4320 : *cur++ = scale * ((*in >> 4) & 0x01); -; 4321 : *cur++ = scale * ((*in >> 3) & 0x01); -; 4322 : *cur++ = scale * ((*in >> 2) & 0x01); -; 4323 : *cur++ = scale * ((*in >> 1) & 0x01); -; 4324 : *cur++ = scale * ((*in) & 0x01); -; 4325 : } -; 4326 : if (k > 0) *cur++ = scale * ((*in >> 7)); -; 4327 : if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); -; 4328 : if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); -; 4329 : if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); -; 4330 : if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); -; 4331 : if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); -; 4332 : if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); -; 4333 : } -; 4334 : if (img_n != out_n) { -; 4335 : int q; -; 4336 : // insert alpha = 255 -; 4337 : cur = a->out + stride * j; -; 4338 : if (img_n == 1) { -; 4339 : for (q = x - 1; q >= 0; --q) { -; 4340 : cur[q * 2 + 1] = 255; -; 4341 : cur[q * 2 + 0] = cur[q]; -; 4342 : } -; 4343 : } -; 4344 : else { -; 4345 : STBI_ASSERT(img_n == 3); -; 4346 : for (q = x - 1; q >= 0; --q) { -; 4347 : cur[q * 4 + 3] = 255; -; 4348 : cur[q * 4 + 2] = cur[q * 3 + 2]; -; 4349 : cur[q * 4 + 1] = cur[q * 3 + 1]; -; 4350 : cur[q * 4 + 0] = cur[q * 3 + 0]; -; 4351 : } -; 4352 : } -; 4353 : } -; 4354 : } -; 4355 : } -; 4356 : else if (depth == 16) { -; 4357 : // force the image data from big-endian to platform-native. -; 4358 : // this is done in a separate pass due to the decoding relying -; 4359 : // on the data being untouched, but could probably be done -; 4360 : // per-line during decode if care is taken. -; 4361 : stbi_uc* cur = a->out; -; 4362 : stbi__uint16* cur16 = (stbi__uint16*)cur; -; 4363 : -; 4364 : for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) { -; 4365 : *cur16 = (cur[0] << 8) | cur[1]; -; 4366 : } -; 4367 : } -; 4368 : -; 4369 : return 1; -; 4370 : } -; 4371 : -; 4372 : static int stbi__create_png_image(stbi__png* a, stbi_uc* image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -; 4373 : { -; 4374 : int bytes = (depth == 16 ? 2 : 1); -; 4375 : int out_bytes = out_n * bytes; -; 4376 : stbi_uc* final; -; 4377 : int p; -; 4378 : if (!interlaced) -; 4379 : return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); -; 4380 : -; 4381 : // de-interlacing -; 4382 : final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); -; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); -; 4384 : for (p = 0; p < 7; ++p) { -; 4385 : int xorig[] = { 0,4,0,2,0,1,0 }; -; 4386 : int yorig[] = { 0,0,4,0,2,0,1 }; -; 4387 : int xspc[] = { 8,8,4,4,2,2,1 }; -; 4388 : int yspc[] = { 8,8,8,4,4,2,2 }; -; 4389 : int i, j, x, y; -; 4390 : // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 -; 4391 : x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p]; -; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; -; 4393 : if (x && y) { -; 4394 : stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; -; 4395 : if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { -; 4396 : STBI_FREE(final); -; 4397 : return 0; -; 4398 : } -; 4399 : for (j = 0; j < y; ++j) { -; 4400 : for (i = 0; i < x; ++i) { -; 4401 : int out_y = j * yspc[p] + yorig[p]; -; 4402 : int out_x = i * xspc[p] + xorig[p]; -; 4403 : memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, -; 4404 : a->out + (j * x + i) * out_bytes, out_bytes); -; 4405 : } -; 4406 : } -; 4407 : STBI_FREE(a->out); -; 4408 : image_data += img_len; -; 4409 : image_data_len -= img_len; -; 4410 : } -; 4411 : } -; 4412 : a->out = final; -; 4413 : -; 4414 : return 1; -; 4415 : } -; 4416 : -; 4417 : static int stbi__compute_transparency(stbi__png* z, stbi_uc tc[3], int out_n) -; 4418 : { -; 4419 : stbi__context* s = z->s; -; 4420 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4421 : stbi_uc* p = z->out; -; 4422 : -; 4423 : // compute color-based transparency, assuming we've -; 4424 : // already got 255 as the alpha value in the output -; 4425 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4426 : -; 4427 : if (out_n == 2) { -; 4428 : for (i = 0; i < pixel_count; ++i) { -; 4429 : p[1] = (p[0] == tc[0] ? 0 : 255); -; 4430 : p += 2; -; 4431 : } -; 4432 : } -; 4433 : else { -; 4434 : for (i = 0; i < pixel_count; ++i) { -; 4435 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4436 : p[3] = 0; -; 4437 : p += 4; -; 4438 : } -; 4439 : } -; 4440 : return 1; -; 4441 : } -; 4442 : -; 4443 : static int stbi__compute_transparency16(stbi__png* z, stbi__uint16 tc[3], int out_n) -; 4444 : { -; 4445 : stbi__context* s = z->s; -; 4446 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4447 : stbi__uint16* p = (stbi__uint16*)z->out; -; 4448 : -; 4449 : // compute color-based transparency, assuming we've -; 4450 : // already got 65535 as the alpha value in the output -; 4451 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4452 : -; 4453 : if (out_n == 2) { -; 4454 : for (i = 0; i < pixel_count; ++i) { -; 4455 : p[1] = (p[0] == tc[0] ? 0 : 65535); -; 4456 : p += 2; -; 4457 : } -; 4458 : } -; 4459 : else { -; 4460 : for (i = 0; i < pixel_count; ++i) { -; 4461 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4462 : p[3] = 0; -; 4463 : p += 4; -; 4464 : } -; 4465 : } -; 4466 : return 1; -; 4467 : } -; 4468 : -; 4469 : static int stbi__expand_png_palette(stbi__png* a, stbi_uc* palette, int len, int pal_img_n) -; 4470 : { -; 4471 : stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; -; 4472 : stbi_uc* p, * temp_out, * orig = a->out; -; 4473 : -; 4474 : p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0); -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4476 : -; 4477 : // between here and free(out) below, exitting would leak -; 4478 : temp_out = p; -; 4479 : -; 4480 : if (pal_img_n == 3) { -; 4481 : for (i = 0; i < pixel_count; ++i) { -; 4482 : int n = orig[i] * 4; -; 4483 : p[0] = palette[n]; -; 4484 : p[1] = palette[n + 1]; -; 4485 : p[2] = palette[n + 2]; -; 4486 : p += 3; -; 4487 : } -; 4488 : } -; 4489 : else { -; 4490 : for (i = 0; i < pixel_count; ++i) { -; 4491 : int n = orig[i] * 4; -; 4492 : p[0] = palette[n]; -; 4493 : p[1] = palette[n + 1]; -; 4494 : p[2] = palette[n + 2]; -; 4495 : p[3] = palette[n + 3]; -; 4496 : p += 4; -; 4497 : } -; 4498 : } -; 4499 : STBI_FREE(a->out); -; 4500 : a->out = temp_out; -; 4501 : -; 4502 : STBI_NOTUSED(len); -; 4503 : -; 4504 : return 1; -; 4505 : } -; 4506 : -; 4507 : static int stbi__unpremultiply_on_load_global = 0; -; 4508 : static int stbi__de_iphone_flag_global = 0; -; 4509 : -; 4510 : STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) -; 4511 : { -; 4512 : stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; -; 4513 : } -; 4514 : -; 4515 : STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) -; 4516 : { -; 4517 : stbi__de_iphone_flag_global = flag_true_if_should_convert; -; 4518 : } -; 4519 : -; 4520 : #ifndef STBI_THREAD_LOCAL -; 4521 : #define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global -; 4522 : #define stbi__de_iphone_flag stbi__de_iphone_flag_global -; 4523 : #else -; 4524 : static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; -; 4525 : static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; -; 4526 : -; 4527 : STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) -; 4528 : { -; 4529 : stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; -; 4530 : stbi__unpremultiply_on_load_set = 1; -; 4531 : } -; 4532 : -; 4533 : STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert) -; 4534 : { -; 4535 : stbi__de_iphone_flag_local = flag_true_if_should_convert; -; 4536 : stbi__de_iphone_flag_set = 1; -; 4537 : } -; 4538 : -; 4539 : #define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \ -; 4540 : ? stbi__unpremultiply_on_load_local \ -; 4541 : : stbi__unpremultiply_on_load_global) -; 4542 : #define stbi__de_iphone_flag (stbi__de_iphone_flag_set \ -; 4543 : ? stbi__de_iphone_flag_local \ -; 4544 : : stbi__de_iphone_flag_global) -; 4545 : #endif // STBI_THREAD_LOCAL -; 4546 : -; 4547 : static void stbi__de_iphone(stbi__png* z) -; 4548 : { -; 4549 : stbi__context* s = z->s; -; 4550 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4551 : stbi_uc* p = z->out; -; 4552 : -; 4553 : if (s->img_out_n == 3) { // convert bgr to rgb -; 4554 : for (i = 0; i < pixel_count; ++i) { -; 4555 : stbi_uc t = p[0]; -; 4556 : p[0] = p[2]; -; 4557 : p[2] = t; -; 4558 : p += 3; -; 4559 : } -; 4560 : } -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { -; 4566 : stbi_uc a = p[3]; -; 4567 : stbi_uc t = p[0]; -; 4568 : if (a) { -; 4569 : stbi_uc half = a / 2; -; 4570 : p[0] = (p[2] * 255 + half) / a; -; 4571 : p[1] = (p[1] * 255 + half) / a; -; 4572 : p[2] = (t * 255 + half) / a; -; 4573 : } -; 4574 : else { -; 4575 : p[0] = p[2]; -; 4576 : p[2] = t; -; 4577 : } -; 4578 : p += 4; -; 4579 : } -; 4580 : } -; 4581 : else { -; 4582 : // convert bgr to rgb -; 4583 : for (i = 0; i < pixel_count; ++i) { -; 4584 : stbi_uc t = p[0]; -; 4585 : p[0] = p[2]; -; 4586 : p[2] = t; -; 4587 : p += 4; -; 4588 : } -; 4589 : } -; 4590 : } -; 4591 : } -; 4592 : -; 4593 : #define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) -; 4594 : -; 4595 : static int stbi__parse_png_file(stbi__png* z, int scan, int req_comp) -; 4596 : { -; 4597 : stbi_uc palette[1024], pal_img_n = 0; -; 4598 : stbi_uc has_trans = 0, tc[3] = { 0 }; -; 4599 : stbi__uint16 tc16[3]; -; 4600 : stbi__uint32 ioff = 0, idata_limit = 0, i, pal_len = 0; -; 4601 : int first = 1, k, interlace = 0, color = 0, is_iphone = 0; -; 4602 : stbi__context* s = z->s; -; 4603 : -; 4604 : z->expanded = NULL; -; 4605 : z->idata = NULL; -; 4606 : z->out = NULL; -; 4607 : -; 4608 : if (!stbi__check_png_header(s)) return 0; -; 4609 : -; 4610 : if (scan == STBI__SCAN_type) return 1; -; 4611 : -; 4612 : for (;;) { -; 4613 : stbi__pngchunk c = stbi__get_chunk_header(s); -; 4614 : switch (c.type) { -; 4615 : case STBI__PNG_TYPE('C', 'g', 'B', 'I'): -; 4616 : is_iphone = 1; -; 4617 : stbi__skip(s, c.length); -; 4618 : break; -; 4619 : case STBI__PNG_TYPE('I', 'H', 'D', 'R'): { -; 4620 : int comp, filter; -; 4621 : if (!first) return stbi__err("multiple IHDR", "Corrupt PNG"); -; 4622 : first = 0; -; 4623 : if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG"); -; 4624 : s->img_x = stbi__get32be(s); -; 4625 : s->img_y = stbi__get32be(s); -; 4626 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4627 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4628 : z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only"); -; 4629 : color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype", "Corrupt PNG"); -; 4630 : if (color == 3 && z->depth == 16) return stbi__err("bad ctype", "Corrupt PNG"); -; 4631 : if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype", "Corrupt PNG"); -; 4632 : comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG"); -; 4633 : filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG"); -; 4634 : interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG"); -; 4635 : if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG"); -; 4636 : if (!pal_img_n) { -; 4637 : s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); -; 4638 : if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); -; 4639 : } -; 4640 : else { -; 4641 : // if paletted, then pal_n is our final components, and -; 4642 : // img_n is # components to decompress/filter. -; 4643 : s->img_n = 1; -; 4644 : if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large", "Corrupt PNG"); -; 4645 : } -; 4646 : // even with SCAN_header, have to scan to see if we have a tRNS -; 4647 : break; -; 4648 : } -; 4649 : -; 4650 : case STBI__PNG_TYPE('P', 'L', 'T', 'E'): { -; 4651 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4652 : if (c.length > 256 * 3) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4653 : pal_len = c.length / 3; -; 4654 : if (pal_len * 3 != c.length) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4655 : for (i = 0; i < pal_len; ++i) { -; 4656 : palette[i * 4 + 0] = stbi__get8(s); -; 4657 : palette[i * 4 + 1] = stbi__get8(s); -; 4658 : palette[i * 4 + 2] = stbi__get8(s); -; 4659 : palette[i * 4 + 3] = 255; -; 4660 : } -; 4661 : break; -; 4662 : } -; 4663 : -; 4664 : case STBI__PNG_TYPE('t', 'R', 'N', 'S'): { -; 4665 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4666 : if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG"); -; 4667 : if (pal_img_n) { -; 4668 : if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } -; 4669 : if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG"); -; 4670 : if (c.length > pal_len) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4671 : pal_img_n = 4; -; 4672 : for (i = 0; i < c.length; ++i) -; 4673 : palette[i * 4 + 3] = stbi__get8(s); -; 4674 : } -; 4675 : else { -; 4676 : if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG"); -; 4677 : if (c.length != (stbi__uint32)s->img_n * 2) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4678 : has_trans = 1; -; 4679 : // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. -; 4680 : if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } -; 4681 : if (z->depth == 16) { -; 4682 : for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is -; 4683 : } -; 4684 : else { -; 4685 : for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger -; 4686 : } -; 4687 : } -; 4688 : break; -; 4689 : } -; 4690 : -; 4691 : case STBI__PNG_TYPE('I', 'D', 'A', 'T'): { -; 4692 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4693 : if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG"); -; 4694 : if (scan == STBI__SCAN_header) { -; 4695 : // header scan definitely stops at first IDAT -; 4696 : if (pal_img_n) -; 4697 : s->img_n = pal_img_n; -; 4698 : return 1; -; 4699 : } -; 4700 : if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); -; 4701 : if ((int)(ioff + c.length) < (int)ioff) return 0; -; 4702 : if (ioff + c.length > idata_limit) { -; 4703 : stbi__uint32 idata_limit_old = idata_limit; -; 4704 : stbi_uc* p; -; 4705 : if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; -; 4706 : while (ioff + c.length > idata_limit) -; 4707 : idata_limit *= 2; -; 4708 : STBI_NOTUSED(idata_limit_old); -; 4709 : p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4710 : z->idata = p; -; 4711 : } -; 4712 : if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG"); -; 4713 : ioff += c.length; -; 4714 : break; -; 4715 : } -; 4716 : -; 4717 : case STBI__PNG_TYPE('I', 'E', 'N', 'D'): { -; 4718 : stbi__uint32 raw_len, bpl; -; 4719 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4720 : if (scan != STBI__SCAN_load) return 1; -; 4721 : if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG"); -; 4722 : // initial guess for decoded data size to avoid unnecessary reallocs -; 4723 : bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component -; 4724 : raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); -; 4726 : if (z->expanded == NULL) return 0; // zlib should set error -; 4727 : STBI_FREE(z->idata); z->idata = NULL; -; 4728 : if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans) -; 4729 : s->img_out_n = s->img_n + 1; -; 4730 : else -; 4731 : s->img_out_n = s->img_n; -; 4732 : if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; -; 4733 : if (has_trans) { -; 4734 : if (z->depth == 16) { -; 4735 : if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; -; 4736 : } -; 4737 : else { -; 4738 : if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; -; 4739 : } -; 4740 : } -; 4741 : if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) -; 4742 : stbi__de_iphone(z); -; 4743 : if (pal_img_n) { -; 4744 : // pal_img_n == 3 or 4 -; 4745 : s->img_n = pal_img_n; // record the actual colors we had -; 4746 : s->img_out_n = pal_img_n; -; 4747 : if (req_comp >= 3) s->img_out_n = req_comp; -; 4748 : if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) -; 4749 : return 0; -; 4750 : } -; 4751 : else if (has_trans) { -; 4752 : // non-paletted image with tRNS -> source image has (constant) alpha -; 4753 : ++s->img_n; -; 4754 : } -; 4755 : STBI_FREE(z->expanded); z->expanded = NULL; -; 4756 : // end of PNG chunk, read and skip CRC -; 4757 : stbi__get32be(s); -; 4758 : return 1; -; 4759 : } -; 4760 : -; 4761 : default: -; 4762 : // if critical, fail -; 4763 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4764 : if ((c.type & (1 << 29)) == 0) { -; 4765 : #ifndef STBI_NO_FAILURE_STRINGS -; 4766 : // not threadsafe -; 4767 : static char invalid_chunk[] = "XXXX PNG chunk not known"; -; 4768 : invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); -; 4769 : invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); -; 4770 : invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); -; 4771 : invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); -; 4772 : #endif -; 4773 : return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); -; 4774 : } -; 4775 : stbi__skip(s, c.length); -; 4776 : break; -; 4777 : } -; 4778 : // end of PNG chunk, read and skip CRC -; 4779 : stbi__get32be(s); -; 4780 : } -; 4781 : } -; 4782 : -; 4783 : static void* stbi__do_png(stbi__png* p, int* x, int* y, int* n, int req_comp, stbi__result_info* ri) -; 4784 : { -; 4785 : void* result = NULL; -; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { -; 4788 : if (p->depth <= 8) -; 4789 : ri->bits_per_channel = 8; -; 4790 : else if (p->depth == 16) -; 4791 : ri->bits_per_channel = 16; -; 4792 : else -; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); -; 4794 : result = p->out; -; 4795 : p->out = NULL; -; 4796 : if (req_comp && req_comp != p->s->img_out_n) { -; 4797 : if (ri->bits_per_channel == 8) -; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4799 : else -; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4801 : p->s->img_out_n = req_comp; -; 4802 : if (result == NULL) return result; -; 4803 : } -; 4804 : *x = p->s->img_x; -; 4805 : *y = p->s->img_y; -; 4806 : if (n) *n = p->s->img_n; -; 4807 : } -; 4808 : STBI_FREE(p->out); p->out = NULL; -; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; -; 4810 : STBI_FREE(p->idata); p->idata = NULL; -; 4811 : -; 4812 : return result; -; 4813 : } -; 4814 : -; 4815 : static void* stbi__png_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 4816 : { -; 4817 : stbi__png p; -; 4818 : p.s = s; -; 4819 : return stbi__do_png(&p, x, y, comp, req_comp, ri); -; 4820 : } -; 4821 : -; 4822 : static int stbi__png_test(stbi__context* s) -; 4823 : { -; 4824 : int r; -; 4825 : r = stbi__check_png_header(s); -; 4826 : stbi__rewind(s); -; 4827 : return r; -; 4828 : } -; 4829 : -; 4830 : static int stbi__png_info_raw(stbi__png* p, int* x, int* y, int* comp) -; 4831 : { -; 4832 : if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { -; 4833 : stbi__rewind(p->s); -; 4834 : return 0; -; 4835 : } -; 4836 : if (x) *x = p->s->img_x; -; 4837 : if (y) *y = p->s->img_y; -; 4838 : if (comp) *comp = p->s->img_n; -; 4839 : return 1; -; 4840 : } -; 4841 : -; 4842 : static int stbi__png_info(stbi__context* s, int* x, int* y, int* comp) -; 4843 : { -; 4844 : stbi__png p; -; 4845 : p.s = s; -; 4846 : return stbi__png_info_raw(&p, x, y, comp); -; 4847 : } -; 4848 : -; 4849 : static int stbi__png_is16(stbi__context* s) -; 4850 : { -; 4851 : stbi__png p; -; 4852 : p.s = s; -; 4853 : if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) -; 4854 : return 0; -; 4855 : if (p.depth != 16) { -; 4856 : stbi__rewind(p.s); -; 4857 : return 0; -; 4858 : } -; 4859 : return 1; -; 4860 : } -; 4861 : #endif -; 4862 : -; 4863 : // Microsoft/Windows BMP image -; 4864 : -; 4865 : #ifndef STBI_NO_BMP -; 4866 : static int stbi__bmp_test_raw(stbi__context* s) -; 4867 : { -; 4868 : int r; -; 4869 : int sz; -; 4870 : if (stbi__get8(s) != 'B') return 0; -; 4871 : if (stbi__get8(s) != 'M') return 0; -; 4872 : stbi__get32le(s); // discard filesize -; 4873 : stbi__get16le(s); // discard reserved -; 4874 : stbi__get16le(s); // discard reserved -; 4875 : stbi__get32le(s); // discard data offset -; 4876 : sz = stbi__get32le(s); -; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); -; 4878 : return r; -; 4879 : } -; 4880 : -; 4881 : static int stbi__bmp_test(stbi__context* s) -; 4882 : { -; 4883 : int r = stbi__bmp_test_raw(s); -; 4884 : stbi__rewind(s); -; 4885 : return r; -; 4886 : } -; 4887 : -; 4888 : // returns 0..31 for the highest set bit -; 4889 : static int stbi__high_bit(unsigned int z) -; 4890 : { -; 4891 : int n = 0; -; 4892 : if (z == 0) return -1; -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } -; 4898 : return n; -; 4899 : } -; 4900 : -; 4901 : static int stbi__bitcount(unsigned int a) -; 4902 : { -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits -; 4908 : return a & 0xff; -; 4909 : } -; 4910 : -; 4911 : // extract an arbitrarily-aligned N-bit value (N=bits) -; 4912 : // from v, and then make it 8-bits long and fractionally -; 4913 : // extend it to full full range. -; 4914 : static int stbi__shiftsigned(unsigned int v, int shift, int bits) -; 4915 : { -; 4916 : static unsigned int mul_table[9] = { -; 4917 : 0, -; 4918 : 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, -; 4919 : 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, -; 4920 : }; -; 4921 : static unsigned int shift_table[9] = { -; 4922 : 0, 0,0,1,0,2,4,6,0, -; 4923 : }; -; 4924 : if (shift < 0) -; 4925 : v <<= -shift; -; 4926 : else -; 4927 : v >>= shift; -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; -; 4932 : } -; 4933 : -; 4934 : typedef struct -; 4935 : { -; 4936 : int bpp, offset, hsz; -; 4937 : unsigned int mr, mg, mb, ma, all_a; -; 4938 : int extra_read; -; 4939 : } stbi__bmp_data; -; 4940 : -; 4941 : static int stbi__bmp_set_mask_defaults(stbi__bmp_data* info, int compress) -; 4942 : { -; 4943 : // BI_BITFIELDS specifies masks explicitly, don't override -; 4944 : if (compress == 3) -; 4945 : return 1; -; 4946 : -; 4947 : if (compress == 0) { -; 4948 : if (info->bpp == 16) { -; 4949 : info->mr = 31u << 10; -; 4950 : info->mg = 31u << 5; -; 4951 : info->mb = 31u << 0; -; 4952 : } -; 4953 : else if (info->bpp == 32) { -; 4954 : info->mr = 0xffu << 16; -; 4955 : info->mg = 0xffu << 8; -; 4956 : info->mb = 0xffu << 0; -; 4957 : info->ma = 0xffu << 24; -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 -; 4959 : } -; 4960 : else { -; 4961 : // otherwise, use defaults, which is all-0 -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; -; 4963 : } -; 4964 : return 1; -; 4965 : } -; 4966 : return 0; // error -; 4967 : } -; 4968 : -; 4969 : static void* stbi__bmp_parse_header(stbi__context* s, stbi__bmp_data* info) -; 4970 : { -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); -; 4973 : stbi__get32le(s); // discard filesize -; 4974 : stbi__get16le(s); // discard reserved -; 4975 : stbi__get16le(s); // discard reserved -; 4976 : info->offset = stbi__get32le(s); -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; -; 4979 : info->extra_read = 14; -; 4980 : -; 4981 : if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); -; 4982 : -; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); -; 4984 : if (hsz == 12) { -; 4985 : s->img_x = stbi__get16le(s); -; 4986 : s->img_y = stbi__get16le(s); -; 4987 : } -; 4988 : else { -; 4989 : s->img_x = stbi__get32le(s); -; 4990 : s->img_y = stbi__get32le(s); -; 4991 : } -; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); -; 4993 : info->bpp = stbi__get16le(s); -; 4994 : if (hsz != 12) { -; 4995 : int compress = stbi__get32le(s); -; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); -; 4997 : if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes -; 4998 : if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel -; 4999 : stbi__get32le(s); // discard sizeof -; 5000 : stbi__get32le(s); // discard hres -; 5001 : stbi__get32le(s); // discard vres -; 5002 : stbi__get32le(s); // discard colorsused -; 5003 : stbi__get32le(s); // discard max important -; 5004 : if (hsz == 40 || hsz == 56) { -; 5005 : if (hsz == 56) { -; 5006 : stbi__get32le(s); -; 5007 : stbi__get32le(s); -; 5008 : stbi__get32le(s); -; 5009 : stbi__get32le(s); -; 5010 : } -; 5011 : if (info->bpp == 16 || info->bpp == 32) { -; 5012 : if (compress == 0) { -; 5013 : stbi__bmp_set_mask_defaults(info, compress); -; 5014 : } -; 5015 : else if (compress == 3) { -; 5016 : info->mr = stbi__get32le(s); -; 5017 : info->mg = stbi__get32le(s); -; 5018 : info->mb = stbi__get32le(s); -; 5019 : info->extra_read += 12; -; 5020 : // not documented, but generated by photoshop and handled by mspaint -; 5021 : if (info->mr == info->mg && info->mg == info->mb) { -; 5022 : // ?!?!? -; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5024 : } -; 5025 : } -; 5026 : else -; 5027 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5028 : } -; 5029 : } -; 5030 : else { -; 5031 : // V4/V5 header -; 5032 : int i; -; 5033 : if (hsz != 108 && hsz != 124) -; 5034 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5035 : info->mr = stbi__get32le(s); -; 5036 : info->mg = stbi__get32le(s); -; 5037 : info->mb = stbi__get32le(s); -; 5038 : info->ma = stbi__get32le(s); -; 5039 : if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs -; 5040 : stbi__bmp_set_mask_defaults(info, compress); -; 5041 : stbi__get32le(s); // discard color space -; 5042 : for (i = 0; i < 12; ++i) -; 5043 : stbi__get32le(s); // discard color space parameters -; 5044 : if (hsz == 124) { -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; -; 5053 : } -; 5054 : -; 5055 : static void* stbi__bmp_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5056 : { -; 5057 : stbi_uc* out; -; 5058 : unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a; -; 5059 : stbi_uc pal[256][4]; -; 5060 : int psize = 0, i, j, width; -; 5061 : int flip_vertically, pad, target; -; 5062 : stbi__bmp_data info; -; 5063 : STBI_NOTUSED(ri); -; 5064 : -; 5065 : info.all_a = 255; -; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) -; 5067 : return NULL; // error code already set -; 5068 : -; 5069 : flip_vertically = ((int)s->img_y) > 0; -; 5070 : s->img_y = abs((int)s->img_y); -; 5071 : -; 5072 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5073 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5074 : -; 5075 : mr = info.mr; -; 5076 : mg = info.mg; -; 5077 : mb = info.mb; -; 5078 : ma = info.ma; -; 5079 : all_a = info.all_a; -; 5080 : -; 5081 : if (info.hsz == 12) { -; 5082 : if (info.bpp < 24) -; 5083 : psize = (info.offset - info.extra_read - 24) / 3; -; 5084 : } -; 5085 : else { -; 5086 : if (info.bpp < 16) -; 5087 : psize = (info.offset - info.extra_read - info.hsz) >> 2; -; 5088 : } -; 5089 : if (psize == 0) { -; 5090 : // accept some number of extra bytes after the header, but if the offset points either to before -; 5091 : // the header ends or implies a large amount of extra data, reject the file as malformed -; 5092 : int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); -; 5093 : int header_limit = 1024; // max we actually read is below 256 bytes currently. -; 5094 : int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. -; 5095 : if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { -; 5096 : return stbi__errpuc("bad header", "Corrupt BMP"); -; 5097 : } -; 5098 : // we established that bytes_read_so_far is positive and sensible. -; 5099 : // the first half of this test rejects offsets that are either too small positives, or -; 5100 : // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn -; 5101 : // ensures the number computed in the second half of the test can't overflow. -; 5102 : if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { -; 5103 : return stbi__errpuc("bad offset", "Corrupt BMP"); -; 5104 : } -; 5105 : else { -; 5106 : stbi__skip(s, info.offset - bytes_read_so_far); -; 5107 : } -; 5108 : } -; 5109 : -; 5110 : if (info.bpp == 24 && ma == 0xff000000) -; 5111 : s->img_n = 3; -; 5112 : else -; 5113 : s->img_n = ma ? 4 : 3; -; 5114 : if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 -; 5115 : target = req_comp; -; 5116 : else -; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert -; 5118 : -; 5119 : // sanity-check size -; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) -; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); -; 5122 : -; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); -; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5125 : if (info.bpp < 16) { -; 5126 : int z = 0; -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } -; 5128 : for (i = 0; i < psize; ++i) { -; 5129 : pal[i][2] = stbi__get8(s); -; 5130 : pal[i][1] = stbi__get8(s); -; 5131 : pal[i][0] = stbi__get8(s); -; 5132 : if (info.hsz != 12) stbi__get8(s); -; 5133 : pal[i][3] = 255; -; 5134 : } -; 5135 : stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); -; 5136 : if (info.bpp == 1) width = (s->img_x + 7) >> 3; -; 5137 : else if (info.bpp == 4) width = (s->img_x + 1) >> 1; -; 5138 : else if (info.bpp == 8) width = s->img_x; -; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } -; 5140 : pad = (-width) & 3; -; 5141 : if (info.bpp == 1) { -; 5142 : for (j = 0; j < (int)s->img_y; ++j) { -; 5143 : int bit_offset = 7, v = stbi__get8(s); -; 5144 : for (i = 0; i < (int)s->img_x; ++i) { -; 5145 : int color = (v >> bit_offset) & 0x1; -; 5146 : out[z++] = pal[color][0]; -; 5147 : out[z++] = pal[color][1]; -; 5148 : out[z++] = pal[color][2]; -; 5149 : if (target == 4) out[z++] = 255; -; 5150 : if (i + 1 == (int)s->img_x) break; -; 5151 : if ((--bit_offset) < 0) { -; 5152 : bit_offset = 7; -; 5153 : v = stbi__get8(s); -; 5154 : } -; 5155 : } -; 5156 : stbi__skip(s, pad); -; 5157 : } -; 5158 : } -; 5159 : else { -; 5160 : for (j = 0; j < (int)s->img_y; ++j) { -; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { -; 5162 : int v = stbi__get8(s), v2 = 0; -; 5163 : if (info.bpp == 4) { -; 5164 : v2 = v & 15; -; 5165 : v >>= 4; -; 5166 : } -; 5167 : out[z++] = pal[v][0]; -; 5168 : out[z++] = pal[v][1]; -; 5169 : out[z++] = pal[v][2]; -; 5170 : if (target == 4) out[z++] = 255; -; 5171 : if (i + 1 == (int)s->img_x) break; -; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; -; 5173 : out[z++] = pal[v][0]; -; 5174 : out[z++] = pal[v][1]; -; 5175 : out[z++] = pal[v][2]; -; 5176 : if (target == 4) out[z++] = 255; -; 5177 : } -; 5178 : stbi__skip(s, pad); -; 5179 : } -; 5180 : } -; 5181 : } -; 5182 : else { -; 5183 : int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0; -; 5184 : int z = 0; -; 5185 : int easy = 0; -; 5186 : stbi__skip(s, info.offset - info.extra_read - info.hsz); -; 5187 : if (info.bpp == 24) width = 3 * s->img_x; -; 5188 : else if (info.bpp == 16) width = 2 * s->img_x; -; 5189 : else /* bpp = 32 and pad = 0 */ width = 0; -; 5190 : pad = (-width) & 3; -; 5191 : if (info.bpp == 24) { -; 5192 : easy = 1; -; 5193 : } -; 5194 : else if (info.bpp == 32) { -; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) -; 5196 : easy = 2; -; 5197 : } -; 5198 : if (!easy) { -; 5199 : if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); -; 5205 : if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5206 : } -; 5207 : for (j = 0; j < (int)s->img_y; ++j) { -; 5208 : if (easy) { -; 5209 : for (i = 0; i < (int)s->img_x; ++i) { -; 5210 : unsigned char a; -; 5211 : out[z + 2] = stbi__get8(s); -; 5212 : out[z + 1] = stbi__get8(s); -; 5213 : out[z + 0] = stbi__get8(s); -; 5214 : z += 3; -; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); -; 5216 : all_a |= a; -; 5217 : if (target == 4) out[z++] = a; -; 5218 : } -; 5219 : } -; 5220 : else { -; 5221 : int bpp = info.bpp; -; 5222 : for (i = 0; i < (int)s->img_x; ++i) { -; 5223 : stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s)); -; 5224 : unsigned int a; -; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); -; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); -; 5229 : all_a |= a; -; 5230 : if (target == 4) out[z++] = STBI__BYTECAST(a); -; 5231 : } -; 5232 : } -; 5233 : stbi__skip(s, pad); -; 5234 : } -; 5235 : } -; 5236 : -; 5237 : // if alpha channel is all 0s, replace with all 255s -; 5238 : if (target == 4 && all_a == 0) -; 5239 : for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4) -; 5240 : out[i] = 255; -; 5241 : -; 5242 : if (flip_vertically) { -; 5243 : stbi_uc t; -; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { -; 5245 : stbi_uc* p1 = out + j * s->img_x * target; -; 5246 : stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target; -; 5247 : for (i = 0; i < (int)s->img_x * target; ++i) { -; 5248 : t = p1[i]; p1[i] = p2[i]; p2[i] = t; -; 5249 : } -; 5250 : } -; 5251 : } -; 5252 : -; 5253 : if (req_comp && req_comp != target) { -; 5254 : out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); -; 5255 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5256 : } -; 5257 : -; 5258 : *x = s->img_x; -; 5259 : *y = s->img_y; -; 5260 : if (comp) *comp = s->img_n; -; 5261 : return out; -; 5262 : } -; 5263 : #endif -; 5264 : -; 5265 : // Targa Truevision - TGA -; 5266 : // by Jonathan Dummer -; 5267 : #ifndef STBI_NO_TGA -; 5268 : // returns STBI_rgb or whatever, 0 on error -; 5269 : static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -; 5270 : { -; 5271 : // only RGB or RGBA (incl. 16bit) or grey allowed -; 5272 : if (is_rgb16) *is_rgb16 = 0; -; 5273 : switch (bits_per_pixel) { -; 5274 : case 8: return STBI_grey; -; 5275 : case 16: if (is_grey) return STBI_grey_alpha; -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; -; 5278 : return STBI_rgb; -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; -; 5281 : default: return 0; -; 5282 : } -; 5283 : } -; 5284 : -; 5285 : static int stbi__tga_info(stbi__context* s, int* x, int* y, int* comp) -; 5286 : { -; 5287 : int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; -; 5288 : int sz, tga_colormap_type; -; 5289 : stbi__get8(s); // discard Offset -; 5290 : tga_colormap_type = stbi__get8(s); // colormap type -; 5291 : if (tga_colormap_type > 1) { -; 5292 : stbi__rewind(s); -; 5293 : return 0; // only RGB or indexed allowed -; 5294 : } -; 5295 : tga_image_type = stbi__get8(s); // image type -; 5296 : if (tga_colormap_type == 1) { // colormapped (paletted) image -; 5297 : if (tga_image_type != 1 && tga_image_type != 9) { -; 5298 : stbi__rewind(s); -; 5299 : return 0; -; 5300 : } -; 5301 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5302 : sz = stbi__get8(s); // check bits per palette color entry -; 5303 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) { -; 5304 : stbi__rewind(s); -; 5305 : return 0; -; 5306 : } -; 5307 : stbi__skip(s, 4); // skip image x and y origin -; 5308 : tga_colormap_bpp = sz; -; 5309 : } -; 5310 : else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE -; 5311 : if ((tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11)) { -; 5312 : stbi__rewind(s); -; 5313 : return 0; // only RGB or grey allowed, +/- RLE -; 5314 : } -; 5315 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5316 : tga_colormap_bpp = 0; -; 5317 : } -; 5318 : tga_w = stbi__get16le(s); -; 5319 : if (tga_w < 1) { -; 5320 : stbi__rewind(s); -; 5321 : return 0; // test width -; 5322 : } -; 5323 : tga_h = stbi__get16le(s); -; 5324 : if (tga_h < 1) { -; 5325 : stbi__rewind(s); -; 5326 : return 0; // test height -; 5327 : } -; 5328 : tga_bits_per_pixel = stbi__get8(s); // bits per pixel -; 5329 : stbi__get8(s); // ignore alpha bits -; 5330 : if (tga_colormap_bpp != 0) { -; 5331 : if ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { -; 5332 : // when using a colormap, tga_bits_per_pixel is the size of the indexes -; 5333 : // I don't think anything but 8 or 16bit indexes makes sense -; 5334 : stbi__rewind(s); -; 5335 : return 0; -; 5336 : } -; 5337 : tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); -; 5338 : } -; 5339 : else { -; 5340 : tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); -; 5341 : } -; 5342 : if (!tga_comp) { -; 5343 : stbi__rewind(s); -; 5344 : return 0; -; 5345 : } -; 5346 : if (x) *x = tga_w; -; 5347 : if (y) *y = tga_h; -; 5348 : if (comp) *comp = tga_comp; -; 5349 : return 1; // seems to have passed everything -; 5350 : } -; 5351 : -; 5352 : static int stbi__tga_test(stbi__context* s) -; 5353 : { -; 5354 : int res = 0; -; 5355 : int sz, tga_color_type; -; 5356 : stbi__get8(s); // discard Offset -; 5357 : tga_color_type = stbi__get8(s); // color type -; 5358 : if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed -; 5359 : sz = stbi__get8(s); // image type -; 5360 : if (tga_color_type == 1) { // colormapped (paletted) image -; 5361 : if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 -; 5362 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5363 : sz = stbi__get8(s); // check bits per palette color entry -; 5364 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5365 : stbi__skip(s, 4); // skip image x and y origin -; 5366 : } -; 5367 : else { // "normal" image w/o colormap -; 5368 : if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE -; 5369 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5370 : } -; 5371 : if (stbi__get16le(s) < 1) goto errorEnd; // test width -; 5372 : if (stbi__get16le(s) < 1) goto errorEnd; // test height -; 5373 : sz = stbi__get8(s); // bits per pixel -; 5374 : if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index -; 5375 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5376 : -; 5377 : res = 1; // if we got this far, everything's good and we can return 1 instead of 0 -; 5378 : -; 5379 : errorEnd: -; 5380 : stbi__rewind(s); -; 5381 : return res; -; 5382 : } -; 5383 : -; 5384 : // read 16bit value and convert to 24bit RGB -; 5385 : static void stbi__tga_read_rgb16(stbi__context* s, stbi_uc* out) -; 5386 : { -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); -; 5397 : -; 5398 : // some people claim that the most significant bit might be used for alpha -; 5399 : // (possibly if an alpha-bit is set in the "image descriptor byte") -; 5400 : // but that only made 16bit test images completely translucent.. -; 5401 : // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -; 5402 : } -; 5403 : -; 5404 : static void* stbi__tga_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5405 : { -; 5406 : // read in the TGA header stuff -; 5407 : int tga_offset = stbi__get8(s); -; 5408 : int tga_indexed = stbi__get8(s); -; 5409 : int tga_image_type = stbi__get8(s); -; 5410 : int tga_is_RLE = 0; -; 5411 : int tga_palette_start = stbi__get16le(s); -; 5412 : int tga_palette_len = stbi__get16le(s); -; 5413 : int tga_palette_bits = stbi__get8(s); -; 5414 : int tga_x_origin = stbi__get16le(s); -; 5415 : int tga_y_origin = stbi__get16le(s); -; 5416 : int tga_width = stbi__get16le(s); -; 5417 : int tga_height = stbi__get16le(s); -; 5418 : int tga_bits_per_pixel = stbi__get8(s); -; 5419 : int tga_comp, tga_rgb16 = 0; -; 5420 : int tga_inverted = stbi__get8(s); -; 5421 : // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) -; 5422 : // image data -; 5423 : unsigned char* tga_data; -; 5424 : unsigned char* tga_palette = NULL; -; 5425 : int i, j; -; 5426 : unsigned char raw_data[4] = { 0 }; -; 5427 : int RLE_count = 0; -; 5428 : int RLE_repeating = 0; -; 5429 : int read_next_pixel = 1; -; 5430 : STBI_NOTUSED(ri); -; 5431 : STBI_NOTUSED(tga_x_origin); // @TODO -; 5432 : STBI_NOTUSED(tga_y_origin); // @TODO -; 5433 : -; 5434 : if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5435 : if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5436 : -; 5437 : // do a tiny bit of precessing -; 5438 : if (tga_image_type >= 8) -; 5439 : { -; 5440 : tga_image_type -= 8; -; 5441 : tga_is_RLE = 1; -; 5442 : } -; 5443 : tga_inverted = 1 - ((tga_inverted >> 5) & 1); -; 5444 : -; 5445 : // If I'm paletted, then I'll use the number of bits from the palette -; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); -; 5447 : else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); -; 5448 : -; 5449 : if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency -; 5450 : return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); -; 5451 : -; 5452 : // tga info -; 5453 : *x = tga_width; -; 5454 : *y = tga_height; -; 5455 : if (comp) *comp = tga_comp; -; 5456 : -; 5457 : if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) -; 5458 : return stbi__errpuc("too large", "Corrupt TGA"); -; 5459 : -; 5460 : tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); -; 5461 : if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); -; 5462 : -; 5463 : // skip to the data's starting position (offset usually = 0) -; 5464 : stbi__skip(s, tga_offset); -; 5465 : -; 5466 : if (!tga_indexed && !tga_is_RLE && !tga_rgb16) { -; 5467 : for (i = 0; i < tga_height; ++i) { -; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; -; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; -; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); -; 5471 : } -; 5472 : } -; 5473 : else { -; 5474 : // do I need to load a palette? -; 5475 : if (tga_indexed) -; 5476 : { -; 5477 : if (tga_palette_len == 0) { /* you have to have at least one entry! */ -; 5478 : STBI_FREE(tga_data); -; 5479 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5480 : } -; 5481 : -; 5482 : // any data to skip? (offset usually = 0) -; 5483 : stbi__skip(s, tga_palette_start); -; 5484 : // load the palette -; 5485 : tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); -; 5486 : if (!tga_palette) { -; 5487 : STBI_FREE(tga_data); -; 5488 : return stbi__errpuc("outofmem", "Out of memory"); -; 5489 : } -; 5490 : if (tga_rgb16) { -; 5491 : stbi_uc* pal_entry = tga_palette; -; 5492 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5493 : for (i = 0; i < tga_palette_len; ++i) { -; 5494 : stbi__tga_read_rgb16(s, pal_entry); -; 5495 : pal_entry += tga_comp; -; 5496 : } -; 5497 : } -; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { -; 5499 : STBI_FREE(tga_data); -; 5500 : STBI_FREE(tga_palette); -; 5501 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) -; 5506 : { -; 5507 : // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? -; 5508 : if (tga_is_RLE) -; 5509 : { -; 5510 : if (RLE_count == 0) -; 5511 : { -; 5512 : // yep, get the next byte as a RLE command -; 5513 : int RLE_cmd = stbi__get8(s); -; 5514 : RLE_count = 1 + (RLE_cmd & 127); -; 5515 : RLE_repeating = RLE_cmd >> 7; -; 5516 : read_next_pixel = 1; -; 5517 : } -; 5518 : else if (!RLE_repeating) -; 5519 : { -; 5520 : read_next_pixel = 1; -; 5521 : } -; 5522 : } -; 5523 : else -; 5524 : { -; 5525 : read_next_pixel = 1; -; 5526 : } -; 5527 : // OK, if I need to read a pixel, do it now -; 5528 : if (read_next_pixel) -; 5529 : { -; 5530 : // load however much data we did have -; 5531 : if (tga_indexed) -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); -; 5535 : if (pal_idx >= tga_palette_len) { -; 5536 : // invalid index -; 5537 : pal_idx = 0; -; 5538 : } -; 5539 : pal_idx *= tga_comp; -; 5540 : for (j = 0; j < tga_comp; ++j) { -; 5541 : raw_data[j] = tga_palette[pal_idx + j]; -; 5542 : } -; 5543 : } -; 5544 : else if (tga_rgb16) { -; 5545 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5546 : stbi__tga_read_rgb16(s, raw_data); -; 5547 : } -; 5548 : else { -; 5549 : // read in the data raw -; 5550 : for (j = 0; j < tga_comp; ++j) { -; 5551 : raw_data[j] = stbi__get8(s); -; 5552 : } -; 5553 : } -; 5554 : // clear the reading flag for the next pixel -; 5555 : read_next_pixel = 0; -; 5556 : } // end of reading a pixel -; 5557 : -; 5558 : // copy data -; 5559 : for (j = 0; j < tga_comp; ++j) -; 5560 : tga_data[i * tga_comp + j] = raw_data[j]; -; 5561 : -; 5562 : // in case we're in RLE mode, keep counting down -; 5563 : --RLE_count; -; 5564 : } -; 5565 : // do I need to invert the image? -; 5566 : if (tga_inverted) -; 5567 : { -; 5568 : for (j = 0; j * 2 < tga_height; ++j) -; 5569 : { -; 5570 : int index1 = j * tga_width * tga_comp; -; 5571 : int index2 = (tga_height - 1 - j) * tga_width * tga_comp; -; 5572 : for (i = tga_width * tga_comp; i > 0; --i) -; 5573 : { -; 5574 : unsigned char temp = tga_data[index1]; -; 5575 : tga_data[index1] = tga_data[index2]; -; 5576 : tga_data[index2] = temp; -; 5577 : ++index1; -; 5578 : ++index2; -; 5579 : } -; 5580 : } -; 5581 : } -; 5582 : // clear my palette, if I had one -; 5583 : if (tga_palette != NULL) -; 5584 : { -; 5585 : STBI_FREE(tga_palette); -; 5586 : } -; 5587 : } -; 5588 : -; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order -; 5590 : if (tga_comp >= 3 && !tga_rgb16) -; 5591 : { -; 5592 : unsigned char* tga_pixel = tga_data; -; 5593 : for (i = 0; i < tga_width * tga_height; ++i) -; 5594 : { -; 5595 : unsigned char temp = tga_pixel[0]; -; 5596 : tga_pixel[0] = tga_pixel[2]; -; 5597 : tga_pixel[2] = temp; -; 5598 : tga_pixel += tga_comp; -; 5599 : } -; 5600 : } -; 5601 : -; 5602 : // convert to target component count -; 5603 : if (req_comp && req_comp != tga_comp) -; 5604 : tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); -; 5605 : -; 5606 : // the things I do to get rid of an error message, and yet keep -; 5607 : // Microsoft's C compilers happy... [8^( -; 5608 : tga_palette_start = tga_palette_len = tga_palette_bits = -; 5609 : tga_x_origin = tga_y_origin = 0; -; 5610 : STBI_NOTUSED(tga_palette_start); -; 5611 : // OK, done -; 5612 : return tga_data; -; 5613 : } -; 5614 : #endif -; 5615 : -; 5616 : // ************************************************************************************************* -; 5617 : // Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB -; 5618 : -; 5619 : #ifndef STBI_NO_PSD -; 5620 : static int stbi__psd_test(stbi__context* s) -; 5621 : { -; 5622 : int r = (stbi__get32be(s) == 0x38425053); -; 5623 : stbi__rewind(s); -; 5624 : return r; -; 5625 : } -; 5626 : -; 5627 : static int stbi__psd_decode_rle(stbi__context* s, stbi_uc* p, int pixelCount) -; 5628 : { -; 5629 : int count, nleft, len; -; 5630 : -; 5631 : count = 0; -; 5632 : while ((nleft = pixelCount - count) > 0) { -; 5633 : len = stbi__get8(s); -; 5634 : if (len == 128) { -; 5635 : // No-op. -; 5636 : } -; 5637 : else if (len < 128) { -; 5638 : // Copy next len+1 bytes literally. -; 5639 : len++; -; 5640 : if (len > nleft) return 0; // corrupt data -; 5641 : count += len; -; 5642 : while (len) { -; 5643 : *p = stbi__get8(s); -; 5644 : p += 4; -; 5645 : len--; -; 5646 : } -; 5647 : } -; 5648 : else if (len > 128) { -; 5649 : stbi_uc val; -; 5650 : // Next -len+1 bytes in the dest are replicated from next source byte. -; 5651 : // (Interpret len as a negative 8-bit int.) -; 5652 : len = 257 - len; -; 5653 : if (len > nleft) return 0; // corrupt data -; 5654 : val = stbi__get8(s); -; 5655 : count += len; -; 5656 : while (len) { -; 5657 : *p = val; -; 5658 : p += 4; -; 5659 : len--; -; 5660 : } -; 5661 : } -; 5662 : } -; 5663 : -; 5664 : return 1; -; 5665 : } -; 5666 : -; 5667 : static void* stbi__psd_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc) -; 5668 : { -; 5669 : int pixelCount; -; 5670 : int channelCount, compression; -; 5671 : int channel, i; -; 5672 : int bitdepth; -; 5673 : int w, h; -; 5674 : stbi_uc* out; -; 5675 : STBI_NOTUSED(ri); -; 5676 : -; 5677 : // Check identifier -; 5678 : if (stbi__get32be(s) != 0x38425053) // "8BPS" -; 5679 : return stbi__errpuc("not PSD", "Corrupt PSD image"); -; 5680 : -; 5681 : // Check file type version. -; 5682 : if (stbi__get16be(s) != 1) -; 5683 : return stbi__errpuc("wrong version", "Unsupported version of PSD image"); -; 5684 : -; 5685 : // Skip 6 reserved bytes. -; 5686 : stbi__skip(s, 6); -; 5687 : -; 5688 : // Read the number of channels (R, G, B, A, etc). -; 5689 : channelCount = stbi__get16be(s); -; 5690 : if (channelCount < 0 || channelCount > 16) -; 5691 : return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); -; 5692 : -; 5693 : // Read the rows and columns of the image. -; 5694 : h = stbi__get32be(s); -; 5695 : w = stbi__get32be(s); -; 5696 : -; 5697 : if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5698 : if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5699 : -; 5700 : // Make sure the depth is 8 bits. -; 5701 : bitdepth = stbi__get16be(s); -; 5702 : if (bitdepth != 8 && bitdepth != 16) -; 5703 : return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); -; 5704 : -; 5705 : // Make sure the color mode is RGB. -; 5706 : // Valid options are: -; 5707 : // 0: Bitmap -; 5708 : // 1: Grayscale -; 5709 : // 2: Indexed color -; 5710 : // 3: RGB color -; 5711 : // 4: CMYK color -; 5712 : // 7: Multichannel -; 5713 : // 8: Duotone -; 5714 : // 9: Lab color -; 5715 : if (stbi__get16be(s) != 3) -; 5716 : return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); -; 5717 : -; 5718 : // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) -; 5719 : stbi__skip(s, stbi__get32be(s)); -; 5720 : -; 5721 : // Skip the image resources. (resolution, pen tool paths, etc) -; 5722 : stbi__skip(s, stbi__get32be(s)); -; 5723 : -; 5724 : // Skip the reserved data. -; 5725 : stbi__skip(s, stbi__get32be(s)); -; 5726 : -; 5727 : // Find out if the data is compressed. -; 5728 : // Known values: -; 5729 : // 0: no compression -; 5730 : // 1: RLE compressed -; 5731 : compression = stbi__get16be(s); -; 5732 : if (compression > 1) -; 5733 : return stbi__errpuc("bad compression", "PSD has an unknown compression format"); -; 5734 : -; 5735 : // Check size -; 5736 : if (!stbi__mad3sizes_valid(4, w, h, 0)) -; 5737 : return stbi__errpuc("too large", "Corrupt PSD"); -; 5738 : -; 5739 : // Create the destination image. -; 5740 : -; 5741 : if (!compression && bitdepth == 16 && bpc == 16) { -; 5742 : out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0); -; 5743 : ri->bits_per_channel = 16; -; 5744 : } -; 5745 : else -; 5746 : out = (stbi_uc*)stbi__malloc(4 * w * h); -; 5747 : -; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5749 : pixelCount = w * h; -; 5750 : -; 5751 : // Initialize the data to zero. -; 5752 : //memset( out, 0, pixelCount * 4 ); -; 5753 : -; 5754 : // Finally, the image data. -; 5755 : if (compression) { -; 5756 : // RLE as used by .PSD and .TIFF -; 5757 : // Loop until you get the number of unpacked bytes you are expecting: -; 5758 : // Read the next source byte into n. -; 5759 : // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. -; 5760 : // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. -; 5761 : // Else if n is 128, noop. -; 5762 : // Endloop -; 5763 : -; 5764 : // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, -; 5765 : // which we're going to just skip. -; 5766 : stbi__skip(s, h * channelCount * 2); -; 5767 : -; 5768 : // Read the RLE data by channel. -; 5769 : for (channel = 0; channel < 4; channel++) { -; 5770 : stbi_uc* p; -; 5771 : -; 5772 : p = out + channel; -; 5773 : if (channel >= channelCount) { -; 5774 : // Fill this channel with default data. -; 5775 : for (i = 0; i < pixelCount; i++, p += 4) -; 5776 : *p = (channel == 3 ? 255 : 0); -; 5777 : } -; 5778 : else { -; 5779 : // Read the RLE data. -; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { -; 5781 : STBI_FREE(out); -; 5782 : return stbi__errpuc("corrupt", "bad RLE data"); -; 5783 : } -; 5784 : } -; 5785 : } -; 5786 : } -; 5787 : else { -; 5788 : // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) -; 5789 : // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. -; 5790 : -; 5791 : // Read the data by channel. -; 5792 : for (channel = 0; channel < 4; channel++) { -; 5793 : if (channel >= channelCount) { -; 5794 : // Fill this channel with default data. -; 5795 : if (bitdepth == 16 && bpc == 16) { -; 5796 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5797 : stbi__uint16 val = channel == 3 ? 65535 : 0; -; 5798 : for (i = 0; i < pixelCount; i++, q += 4) -; 5799 : *q = val; -; 5800 : } -; 5801 : else { -; 5802 : stbi_uc* p = out + channel; -; 5803 : stbi_uc val = channel == 3 ? 255 : 0; -; 5804 : for (i = 0; i < pixelCount; i++, p += 4) -; 5805 : *p = val; -; 5806 : } -; 5807 : } -; 5808 : else { -; 5809 : if (ri->bits_per_channel == 16) { // output bpc -; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5811 : for (i = 0; i < pixelCount; i++, q += 4) -; 5812 : *q = (stbi__uint16)stbi__get16be(s); -; 5813 : } -; 5814 : else { -; 5815 : stbi_uc* p = out + channel; -; 5816 : if (bitdepth == 16) { // input bpc -; 5817 : for (i = 0; i < pixelCount; i++, p += 4) -; 5818 : *p = (stbi_uc)(stbi__get16be(s) >> 8); -; 5819 : } -; 5820 : else { -; 5821 : for (i = 0; i < pixelCount; i++, p += 4) -; 5822 : *p = stbi__get8(s); -; 5823 : } -; 5824 : } -; 5825 : } -; 5826 : } -; 5827 : } -; 5828 : -; 5829 : // remove weird white matte from PSD -; 5830 : if (channelCount >= 4) { -; 5831 : if (ri->bits_per_channel == 16) { -; 5832 : for (i = 0; i < w * h; ++i) { -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); -; 5841 : } -; 5842 : } -; 5843 : } -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); -; 5854 : } -; 5855 : } -; 5856 : } -; 5857 : } -; 5858 : -; 5859 : // convert to desired output format -; 5860 : if (req_comp && req_comp != 4) { -; 5861 : if (ri->bits_per_channel == 16) -; 5862 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h); -; 5863 : else -; 5864 : out = stbi__convert_format(out, 4, req_comp, w, h); -; 5865 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5866 : } -; 5867 : -; 5868 : if (comp) *comp = 4; -; 5869 : *y = h; -; 5870 : *x = w; -; 5871 : -; 5872 : return out; -; 5873 : } -; 5874 : #endif -; 5875 : -; 5876 : // ************************************************************************************************* -; 5877 : // Softimage PIC loader -; 5878 : // by Tom Seddon -; 5879 : // -; 5880 : // See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -; 5881 : // See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ -; 5882 : -; 5883 : #ifndef STBI_NO_PIC -; 5884 : static int stbi__pic_is4(stbi__context* s, const char* str) -; 5885 : { -; 5886 : int i; -; 5887 : for (i = 0; i < 4; ++i) - +; Line 5887 000c7 48 ff c7 inc rdi 000ca 48 83 ff 04 cmp rdi, 4 000ce 7c c0 jl SHORT $LL17@stbi__pic_ - -; 5907 : return 1; - +; Line 5907 000d0 41 bf 01 00 00 00 mov r15d, 1 $LN36@stbi__pic_: @@ -89775,38 +33140,22 @@ $LN36@stbi__pic_: 000db 48 8b 7c 24 48 mov rdi, QWORD PTR [rsp+72] 000e0 4c 8b 64 24 50 mov r12, QWORD PTR [rsp+80] $LN3@stbi__pic_: - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 000e5 48 8b 8d d0 00 00 00 mov rcx, QWORD PTR [rbp+208] - -; 6092 : int r = stbi__pic_test_core(s); -; 6093 : stbi__rewind(s); -; 6094 : return r; - +; Line 6094 000ec 41 8b c7 mov eax, r15d - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 000ef 48 89 0b mov QWORD PTR [rbx], rcx - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 000f2 48 8b 8d d8 00 00 00 mov rcx, QWORD PTR [rbp+216] - -; 6095 : } - +; Line 6095 000f9 48 8b 5c 24 58 mov rbx, QWORD PTR [rsp+88] - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 000fe 48 89 8d c8 00 00 00 mov QWORD PTR [rbp+200], rcx - -; 6095 : } - +; Line 6095 00105 48 83 c4 20 add rsp, 32 ; 00000020H 00109 41 5f pop r15 0010b 41 5e pop r14 @@ -89815,53 +33164,35 @@ $LN3@stbi__pic_: stbi__pic_test ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__gif_test_raw _TEXT SEGMENT s$ = 48 stbi__gif_test_raw PROC ; COMDAT - -; 6130 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6130 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0000a 48 8b 81 c0 00 00 00 mov rax, QWORD PTR [rcx+192] - -; 6130 : { - +; Line 6130 00011 48 8b d9 mov rbx, rcx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00014 48 3b 81 c8 00 00 00 cmp rax, QWORD PTR [rcx+200] 0001b 72 16 jb SHORT $LN52@stbi__gif_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0001d 83 79 30 00 cmp DWORD PTR [rcx+48], 0 00021 0f 84 3b 01 00 00 je $LN3@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00027 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0002c 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN52@stbi__gif_: - -; 6131 : int sz; -; 6132 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0; - +; Line 6132 00033 0f b6 08 movzx ecx, BYTE PTR [rax] 00036 48 ff c0 inc rax 00039 48 89 83 c0 00 @@ -89869,34 +33200,22 @@ $LN52@stbi__gif_: 00040 80 f9 47 cmp cl, 71 ; 00000047H 00043 0f 85 19 01 00 00 jne $LN3@stbi__gif_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00049 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00050 72 19 jb SHORT $LN53@stbi__gif_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00052 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00056 0f 84 06 01 00 00 je $LN3@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0005c 48 8b cb mov rcx, rbx 0005f e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00064 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN53@stbi__gif_: - -; 6131 : int sz; -; 6132 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0; - +; Line 6132 0006b 0f b6 08 movzx ecx, BYTE PTR [rax] 0006e 48 ff c0 inc rax 00071 48 89 83 c0 00 @@ -89904,34 +33223,22 @@ $LN53@stbi__gif_: 00078 80 f9 49 cmp cl, 73 ; 00000049H 0007b 0f 85 e1 00 00 00 jne $LN3@stbi__gif_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00081 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00088 72 19 jb SHORT $LN54@stbi__gif_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0008a 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0008e 0f 84 ce 00 00 00 je $LN3@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00094 48 8b cb mov rcx, rbx 00097 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0009c 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN54@stbi__gif_: - -; 6131 : int sz; -; 6132 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0; - +; Line 6132 000a3 0f b6 08 movzx ecx, BYTE PTR [rax] 000a6 48 ff c0 inc rax 000a9 48 89 83 c0 00 @@ -89939,67 +33246,43 @@ $LN54@stbi__gif_: 000b0 80 f9 46 cmp cl, 70 ; 00000046H 000b3 0f 85 a9 00 00 00 jne $LN3@stbi__gif_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000b9 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 000c0 72 19 jb SHORT $LN55@stbi__gif_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000c2 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 000c6 0f 84 96 00 00 00 je $LN3@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000cc 48 8b cb mov rcx, rbx 000cf e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000d4 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN55@stbi__gif_: - -; 6131 : int sz; -; 6132 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0; - +; Line 6132 000db 0f b6 08 movzx ecx, BYTE PTR [rax] 000de 48 ff c0 inc rax 000e1 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 000e8 80 f9 38 cmp cl, 56 ; 00000038H 000eb 75 75 jne SHORT $LN3@stbi__gif_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000ed 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 000f4 72 15 jb SHORT $LN56@stbi__gif_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000f6 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 000fa 74 66 je SHORT $LN3@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000fc 48 8b cb mov rcx, rbx 000ff e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00104 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN56@stbi__gif_: - -; 6133 : sz = stbi__get8(s); -; 6134 : if (sz != '9' && sz != '7') return 0; - +; Line 6134 0010b 0f b6 08 movzx ecx, BYTE PTR [rax] 0010e 48 ff c0 inc rax 00111 48 89 83 c0 00 @@ -90009,45 +33292,30 @@ $LN56@stbi__gif_: 0011d 80 f9 37 cmp cl, 55 ; 00000037H 00120 75 40 jne SHORT $LN3@stbi__gif_ $LN4@stbi__gif_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00122 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00129 72 15 jb SHORT $LN57@stbi__gif_ - -; 1078 : return *s->img_buffer++; -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0012b 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0012f 74 31 je SHORT $LN3@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00131 48 8b cb mov rcx, rbx 00134 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00139 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN57@stbi__gif_: - -; 6135 : if (stbi__get8(s) != 'a') return 0; - +; Line 6135 00140 0f b6 08 movzx ecx, BYTE PTR [rax] 00143 48 ff c0 inc rax 00146 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0014d 80 f9 61 cmp cl, 97 ; 00000061H 00150 75 10 jne SHORT $LN3@stbi__gif_ - -; 6136 : return 1; - +; Line 6136 00152 b8 01 00 00 00 mov eax, 1 - -; 6137 : } - +; Line 6137 00157 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 0015c 48 83 c4 20 add rsp, 32 ; 00000020H 00160 5f pop rdi @@ -90061,47 +33329,34 @@ $LN3@stbi__gif_: stbi__gif_test_raw ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__gif_test _TEXT SEGMENT s$ = 48 stbi__gif_test PROC ; COMDAT - -; 6140 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6140 00000 40 53 push rbx 00002 48 83 ec 20 sub rsp, 32 ; 00000020H 00006 48 8b d9 mov rbx, rcx - -; 6141 : int r = stbi__gif_test_raw(s); - +; Line 6141 00009 e8 00 00 00 00 call stbi__gif_test_raw - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 0000e 48 8b 93 d0 00 00 00 mov rdx, QWORD PTR [rbx+208] 00015 48 89 93 c0 00 00 00 mov QWORD PTR [rbx+192], rdx - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 0001c 48 8b 93 d8 00 00 00 mov rdx, QWORD PTR [rbx+216] 00023 48 89 93 c8 00 00 00 mov QWORD PTR [rbx+200], rdx - -; 6142 : stbi__rewind(s); -; 6143 : return r; -; 6144 : } - +; Line 6144 0002a 48 83 c4 20 add rsp, 32 ; 00000020H 0002e 5b pop rbx 0002f c3 ret 0 stbi__gif_test ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__gif_parse_colortable _TEXT SEGMENT s$ = 64 @@ -90109,10 +33364,8 @@ pal$ = 72 num_entries$ = 80 transp$ = 88 stbi__gif_parse_colortable PROC ; COMDAT - -; 6148 : int i; -; 6149 : for (i = 0; i < num_entries; ++i) { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6149 00000 45 85 c0 test r8d, r8d 00003 0f 8e 45 01 00 00 jle $LN29@stbi__gif_ @@ -90133,36 +33386,26 @@ stbi__gif_parse_colortable PROC ; COMDAT 1f 84 00 00 00 00 00 npad 12 $LL4@stbi__gif_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00040 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00047 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0004e 73 0f jae SHORT $LN7@stbi__gif_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00050 0f b6 08 movzx ecx, BYTE PTR [rax] 00053 48 ff c0 inc rax 00056 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0005d eb 26 jmp SHORT $LN6@stbi__gif_ $LN7@stbi__gif_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0005f 44 39 7b 30 cmp DWORD PTR [rbx+48], r15d 00063 74 1e je SHORT $LN8@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00065 48 8b cb mov rcx, rbx 00068 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0006d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00074 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -90171,46 +33414,31 @@ $LN7@stbi__gif_: 00 00 mov QWORD PTR [rbx+192], rax 00081 eb 02 jmp SHORT $LN6@stbi__gif_ $LN8@stbi__gif_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00083 32 c9 xor cl, cl $LN6@stbi__gif_: - -; 6150 : pal[i][2] = stbi__get8(s); - +; Line 6150 00085 88 4f 01 mov BYTE PTR [rdi+1], cl - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00088 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0008f 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00096 73 0f jae SHORT $LN11@stbi__gif_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00098 0f b6 08 movzx ecx, BYTE PTR [rax] 0009b 48 ff c0 inc rax 0009e 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 000a5 eb 26 jmp SHORT $LN10@stbi__gif_ $LN11@stbi__gif_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000a7 44 39 7b 30 cmp DWORD PTR [rbx+48], r15d 000ab 74 1e je SHORT $LN12@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000ad 48 8b cb mov rcx, rbx 000b0 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000b5 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000bc 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -90219,46 +33447,31 @@ $LN11@stbi__gif_: 00 00 mov QWORD PTR [rbx+192], rax 000c9 eb 02 jmp SHORT $LN10@stbi__gif_ $LN12@stbi__gif_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000cb 32 c9 xor cl, cl $LN10@stbi__gif_: - -; 6151 : pal[i][1] = stbi__get8(s); - +; Line 6151 000cd 88 0f mov BYTE PTR [rdi], cl - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000cf 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000d6 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 000dd 73 0f jae SHORT $LN15@stbi__gif_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 000df 0f b6 08 movzx ecx, BYTE PTR [rax] 000e2 48 ff c0 inc rax 000e5 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 000ec eb 26 jmp SHORT $LN14@stbi__gif_ $LN15@stbi__gif_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000ee 44 39 7b 30 cmp DWORD PTR [rbx+48], r15d 000f2 74 1e je SHORT $LN16@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000f4 48 8b cb mov rcx, rbx 000f7 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000fc 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00103 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -90267,16 +33480,10 @@ $LN15@stbi__gif_: 00 00 mov QWORD PTR [rbx+192], rax 00110 eb 02 jmp SHORT $LN14@stbi__gif_ $LN16@stbi__gif_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00112 32 c9 xor cl, cl $LN14@stbi__gif_: - -; 6152 : pal[i][0] = stbi__get8(s); -; 6153 : pal[i][3] = transp == i ? 0 : 255; - +; Line 6153 00114 44 3b f6 cmp r14d, esi 00117 88 4f ff mov BYTE PTR [rdi-1], cl 0011a b8 ff 00 00 00 mov eax, 255 ; 000000ffH @@ -90287,10 +33494,7 @@ $LN14@stbi__gif_: 0012c 48 83 ed 01 sub rbp, 1 00130 0f 85 0a ff ff ff jne $LL4@stbi__gif_ - -; 6154 : } -; 6155 : } - +; Line 6155 00136 48 8b 7c 24 40 mov rdi, QWORD PTR [rsp+64] 0013b 48 8b 5c 24 48 mov rbx, QWORD PTR [rsp+72] 00140 48 8b 6c 24 50 mov rbp, QWORD PTR [rsp+80] @@ -90303,7 +33507,6 @@ $LN29@stbi__gif_: stbi__gif_parse_colortable ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__gif_header _TEXT SEGMENT s$ = 48 @@ -90311,51 +33514,35 @@ g$ = 56 comp$ = 64 is_info$dead$ = 72 stbi__gif_header PROC ; COMDAT - -; 6158 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6158 00000 48 89 5c 24 10 mov QWORD PTR [rsp+16], rbx 00005 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi 0000a 48 89 7c 24 20 mov QWORD PTR [rsp+32], rdi 0000f 41 57 push r15 00011 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00015 48 8b 81 c0 00 00 00 mov rax, QWORD PTR [rcx+192] - -; 6158 : { - +; Line 6158 0001c 4d 8b f8 mov r15, r8 0001f 48 8b f2 mov rsi, rdx 00022 48 8b d9 mov rbx, rcx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00025 48 3b 81 c8 00 00 00 cmp rax, QWORD PTR [rcx+200] 0002c 72 16 jb SHORT $LN92@stbi__gif_ - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0002e 83 79 30 00 cmp DWORD PTR [rcx+48], 0 00032 0f 84 ff 02 00 00 je $LN60@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00038 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0003d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN92@stbi__gif_: - -; 6159 : stbi_uc version; -; 6160 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') - +; Line 6160 00044 0f b6 08 movzx ecx, BYTE PTR [rax] 00047 48 ff c0 inc rax 0004a 48 89 83 c0 00 @@ -90363,33 +33550,22 @@ $LN92@stbi__gif_: 00051 80 f9 47 cmp cl, 71 ; 00000047H 00054 0f 85 dd 02 00 00 jne $LN60@stbi__gif_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0005a 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00061 72 19 jb SHORT $LN93@stbi__gif_ - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00063 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00067 0f 84 ca 02 00 00 je $LN60@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0006d 48 8b cb mov rcx, rbx 00070 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00075 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN93@stbi__gif_: - -; 6159 : stbi_uc version; -; 6160 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') - +; Line 6160 0007c 0f b6 08 movzx ecx, BYTE PTR [rax] 0007f 48 ff c0 inc rax 00082 48 89 83 c0 00 @@ -90397,33 +33573,22 @@ $LN93@stbi__gif_: 00089 80 f9 49 cmp cl, 73 ; 00000049H 0008c 0f 85 a5 02 00 00 jne $LN60@stbi__gif_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00092 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00099 72 19 jb SHORT $LN94@stbi__gif_ - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0009b 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0009f 0f 84 92 02 00 00 je $LN60@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000a5 48 8b cb mov rcx, rbx 000a8 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000ad 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN94@stbi__gif_: - -; 6159 : stbi_uc version; -; 6160 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') - +; Line 6160 000b4 0f b6 08 movzx ecx, BYTE PTR [rax] 000b7 48 ff c0 inc rax 000ba 48 89 83 c0 00 @@ -90431,33 +33596,22 @@ $LN94@stbi__gif_: 000c1 80 f9 46 cmp cl, 70 ; 00000046H 000c4 0f 85 6d 02 00 00 jne $LN60@stbi__gif_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000ca 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 000d1 72 19 jb SHORT $LN95@stbi__gif_ - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000d3 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 000d7 0f 84 5a 02 00 00 je $LN60@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000dd 48 8b cb mov rcx, rbx 000e0 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000e5 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN95@stbi__gif_: - -; 6159 : stbi_uc version; -; 6160 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') - +; Line 6160 000ec 0f b6 08 movzx ecx, BYTE PTR [rax] 000ef 48 ff c0 inc rax 000f2 48 89 83 c0 00 @@ -90465,35 +33619,22 @@ $LN95@stbi__gif_: 000f9 80 f9 38 cmp cl, 56 ; 00000038H 000fc 0f 85 35 02 00 00 jne $LN60@stbi__gif_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00102 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00109 72 19 jb SHORT $LN96@stbi__gif_ - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0010b 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0010f 0f 84 22 02 00 00 je $LN60@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00115 48 8b cb mov rcx, rbx 00118 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0011d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN96@stbi__gif_: - -; 6161 : return stbi__err("not GIF", "Corrupt GIF"); -; 6162 : -; 6163 : version = stbi__get8(s); -; 6164 : if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF"); - +; Line 6164 00124 0f b6 08 movzx ecx, BYTE PTR [rax] 00127 48 ff c0 inc rax 0012a 48 89 83 c0 00 @@ -90504,32 +33645,22 @@ $LN96@stbi__gif_: 00139 0f 85 f8 01 00 00 jne $LN60@stbi__gif_ $LN4@stbi__gif_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0013f 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00146 72 19 jb SHORT $LN97@stbi__gif_ - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00148 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0014c 0f 84 bd 01 00 00 je $LN36@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00152 48 8b cb mov rcx, rbx 00155 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0015a 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN97@stbi__gif_: - -; 6165 : if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF"); - +; Line 6165 00161 0f b6 10 movzx edx, BYTE PTR [rax] 00164 48 ff c0 inc rax 00167 48 89 83 c0 00 @@ -90539,10 +33670,7 @@ $LN97@stbi__gif_: 00174 80 fa 61 cmp dl, 97 ; 00000061H 00177 0f 85 98 01 00 00 jne $LN58@stbi__gif_ - -; 6166 : -; 6167 : stbi__g_failure_reason = ""; - +; Line 6167 0017d 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index 00183 65 48 8b 04 25 @@ -90552,49 +33680,35 @@ $LN97@stbi__gif_: 00195 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_00CNPNBAHC@@ 0019c 4d 03 f1 add r14, r9 - -; 6168 : g->w = stbi__get16le(s); - +; Line 6168 0019f 48 8b cb mov rcx, rbx 001a2 49 89 06 mov QWORD PTR [r14], rax 001a5 e8 00 00 00 00 call stbi__get16le - -; 6169 : g->h = stbi__get16le(s); - +; Line 6169 001aa 48 8b cb mov rcx, rbx 001ad 89 06 mov DWORD PTR [rsi], eax 001af e8 00 00 00 00 call stbi__get16le 001b4 89 46 04 mov DWORD PTR [rsi+4], eax - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 001b7 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 001be 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 001c5 73 0f jae SHORT $LN41@stbi__gif_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 001c7 0f b6 08 movzx ecx, BYTE PTR [rax] 001ca 48 ff c0 inc rax 001cd 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 001d4 eb 26 jmp SHORT $LN40@stbi__gif_ $LN41@stbi__gif_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 001d6 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 001da 74 1e je SHORT $LN42@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 001dc 48 8b cb mov rcx, rbx 001df e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 001e4 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 001eb 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -90603,47 +33717,32 @@ $LN41@stbi__gif_: 00 00 mov QWORD PTR [rbx+192], rax 001f8 eb 02 jmp SHORT $LN40@stbi__gif_ $LN42@stbi__gif_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 001fa 32 c9 xor cl, cl $LN40@stbi__gif_: - -; 6170 : g->flags = stbi__get8(s); - +; Line 6170 001fc 0f b6 c1 movzx eax, cl 001ff 89 46 20 mov DWORD PTR [rsi+32], eax - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00202 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00209 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00210 73 0f jae SHORT $LN45@stbi__gif_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00212 0f b6 08 movzx ecx, BYTE PTR [rax] 00215 48 ff c0 inc rax 00218 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0021f eb 26 jmp SHORT $LN44@stbi__gif_ $LN45@stbi__gif_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00221 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00225 74 1e je SHORT $LN46@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00227 48 8b cb mov rcx, rbx 0022a e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0022f 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00236 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -90652,47 +33751,32 @@ $LN45@stbi__gif_: 00 00 mov QWORD PTR [rbx+192], rax 00243 eb 02 jmp SHORT $LN44@stbi__gif_ $LN46@stbi__gif_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00245 32 c9 xor cl, cl $LN44@stbi__gif_: - -; 6171 : g->bgindex = stbi__get8(s); - +; Line 6171 00247 0f b6 c1 movzx eax, cl 0024a 89 46 24 mov DWORD PTR [rsi+36], eax - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0024d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00254 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0025b 73 0f jae SHORT $LN49@stbi__gif_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 0025d 0f b6 08 movzx ecx, BYTE PTR [rax] 00260 48 ff c0 inc rax 00263 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0026a eb 26 jmp SHORT $LN48@stbi__gif_ $LN49@stbi__gif_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0026c 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00270 74 1e je SHORT $LN50@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00272 48 8b cb mov rcx, rbx 00275 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0027a 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00281 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -90701,18 +33785,10 @@ $LN49@stbi__gif_: 00 00 mov QWORD PTR [rbx+192], rax 0028e eb 02 jmp SHORT $LN48@stbi__gif_ $LN50@stbi__gif_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00290 32 c9 xor cl, cl $LN48@stbi__gif_: - -; 6172 : g->ratio = stbi__get8(s); -; 6173 : g->transparent = -1; -; 6174 : -; 6175 : if (g->w > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); - +; Line 6175 00292 81 3e 00 00 00 01 cmp DWORD PTR [rsi], 16777216 ; 01000000H 00298 0f b6 c1 movzx eax, cl @@ -90720,33 +33796,21 @@ $LN48@stbi__gif_: 0029e c7 46 2c ff ff ff ff mov DWORD PTR [rsi+44], -1 002a5 7f 5a jg SHORT $LN61@stbi__gif_ - -; 6176 : if (g->h > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); - +; Line 6176 002a7 81 7e 04 00 00 00 01 cmp DWORD PTR [rsi+4], 16777216 ; 01000000H 002ae 7f 51 jg SHORT $LN61@stbi__gif_ - -; 6177 : -; 6178 : if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments - +; Line 6178 002b0 4d 85 ff test r15, r15 002b3 74 07 je SHORT $LN8@stbi__gif_ 002b5 41 c7 07 04 00 00 00 mov DWORD PTR [r15], 4 $LN8@stbi__gif_: - -; 6179 : -; 6180 : if (is_info) return 1; -; 6181 : -; 6182 : if (g->flags & 0x80) - +; Line 6182 002bc 8b 4e 20 mov ecx, DWORD PTR [rsi+32] 002bf 84 c9 test cl, cl 002c1 79 1e jns SHORT $LN10@stbi__gif_ - -; 6183 : stbi__gif_parse_colortable(s, g->pal, 2 << (g->flags & 7), -1); - +; Line 6183 002c3 83 e1 07 and ecx, 7 002c6 48 8d 56 34 lea rdx, QWORD PTR [rsi+52] 002ca 41 b8 02 00 00 @@ -90757,17 +33821,12 @@ $LN8@stbi__gif_: 002d9 48 8b cb mov rcx, rbx 002dc e8 00 00 00 00 call stbi__gif_parse_colortable $LN10@stbi__gif_: - -; 6184 : -; 6185 : return 1; - +; Line 6185 002e1 b8 01 00 00 00 mov eax, 1 $LN91@stbi__gif_: 002e6 4c 8b 74 24 30 mov r14, QWORD PTR [rsp+48] $LN1@stbi__gif_: - -; 6186 : } - +; Line 6186 002eb 48 8b 5c 24 38 mov rbx, QWORD PTR [rsp+56] 002f0 48 8b 74 24 40 mov rsi, QWORD PTR [rsp+64] 002f5 48 8b 7c 24 48 mov rdi, QWORD PTR [rsp+72] @@ -90775,27 +33834,19 @@ $LN1@stbi__gif_: 002fe 41 5f pop r15 00300 c3 ret 0 $LN61@stbi__gif_: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00301 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ 00308 49 89 06 mov QWORD PTR [r14], rax - -; 6176 : if (g->h > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); - +; Line 6176 0030b 33 c0 xor eax, eax 0030d eb d7 jmp SHORT $LN91@stbi__gif_ $LN36@stbi__gif_: - -; 1083 : return 0; - +; Line 1083 0030f 41 b9 00 00 00 00 mov r9d, OFFSET FLAT:stbi__g_failure_reason $LN58@stbi__gif_: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00315 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 0031e 4c 8d 05 00 00 @@ -90803,22 +33854,14 @@ $LN58@stbi__gif_: 00325 8b 0d 00 00 00 00 mov ecx, DWORD PTR _tls_index 0032b 48 8b 14 c8 mov rdx, QWORD PTR [rax+rcx*8] - -; 6165 : if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF"); - +; Line 6165 0032f 33 c0 xor eax, eax - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00331 4d 89 04 11 mov QWORD PTR [r9+rdx], r8 - -; 6165 : if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF"); - +; Line 6165 00335 eb b4 jmp SHORT $LN1@stbi__gif_ $LN60@stbi__gif_: - -; 6186 : } - +; Line 6186 00337 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0033d 4c 8d 05 00 00 @@ -90833,61 +33876,40 @@ $LN60@stbi__gif_: stbi__gif_header ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__out_gif_code _TEXT SEGMENT g$ = 48 code$ = 56 stbi__out_gif_code PROC ; COMDAT - -; 6204 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6204 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 6205 : stbi_uc* p, * c; -; 6206 : int idx; -; 6207 : -; 6208 : // recurse to decode the prefixes, since the linked-list is backwards, -; 6209 : // and working backwards through an interleaved image would be nasty -; 6210 : if (g->codes[code].prefix >= 0) - +; Line 6210 0000a 0f b7 fa movzx edi, dx 0000d 48 8b d9 mov rbx, rcx 00010 0f b7 94 b9 34 08 00 00 movzx edx, WORD PTR [rcx+rdi*4+2100] 00018 66 85 d2 test dx, dx 0001b 78 05 js SHORT $LN4@stbi__out_ - -; 6211 : stbi__out_gif_code(g, g->codes[code].prefix); - +; Line 6211 0001d e8 00 00 00 00 call stbi__out_gif_code $LN4@stbi__out_: - -; 6212 : -; 6213 : if (g->cur_y >= g->max_y) return; - +; Line 6213 00022 8b 8b 60 88 00 00 mov ecx, DWORD PTR [rbx+34912] 00028 3b 8b 58 88 00 00 cmp ecx, DWORD PTR [rbx+34904] 0002e 0f 8d d8 00 00 00 jge $LN13@stbi__out_ - -; 6214 : -; 6215 : idx = g->cur_x + g->cur_y; - +; Line 6215 00034 8b 83 5c 88 00 00 mov eax, DWORD PTR [rbx+34908] 0003a 03 c1 add eax, ecx - -; 6216 : p = &g->out[idx]; - +; Line 6216 0003c 4c 63 c0 movsxd r8, eax - -; 6217 : g->history[idx / 4] = 1; - +; Line 6217 0003f 99 cdq 00040 4c 03 43 08 add r8, QWORD PTR [rbx+8] 00044 83 e2 03 and edx, 3 @@ -90896,66 +33918,41 @@ $LN4@stbi__out_: 0004c 48 63 c8 movsxd rcx, eax 0004f 48 8b 43 18 mov rax, QWORD PTR [rbx+24] 00053 c6 04 01 01 mov BYTE PTR [rcx+rax], 1 - -; 6218 : -; 6219 : c = &g->color_table[g->codes[code].suffix * 4]; - +; Line 6219 00057 0f b6 8c bb 37 08 00 00 movzx ecx, BYTE PTR [rbx+rdi*4+2103] 0005f 48 8b 83 38 88 00 00 mov rax, QWORD PTR [rbx+34872] - -; 6220 : if (c[3] > 128) { // don't render transparent pixels; - +; Line 6220 00066 80 7c 88 03 80 cmp BYTE PTR [rax+rcx*4+3], 128 ; 00000080H 0006b 48 8d 14 88 lea rdx, QWORD PTR [rax+rcx*4] 0006f 76 1e jbe SHORT $LN6@stbi__out_ - -; 6221 : p[0] = c[2]; - +; Line 6221 00071 0f b6 42 02 movzx eax, BYTE PTR [rdx+2] 00075 41 88 00 mov BYTE PTR [r8], al - -; 6222 : p[1] = c[1]; - +; Line 6222 00078 0f b6 42 01 movzx eax, BYTE PTR [rdx+1] 0007c 41 88 40 01 mov BYTE PTR [r8+1], al - -; 6223 : p[2] = c[0]; - +; Line 6223 00080 0f b6 02 movzx eax, BYTE PTR [rdx] 00083 41 88 40 02 mov BYTE PTR [r8+2], al - -; 6224 : p[3] = c[3]; - +; Line 6224 00087 0f b6 42 03 movzx eax, BYTE PTR [rdx+3] 0008b 41 88 40 03 mov BYTE PTR [r8+3], al $LN6@stbi__out_: - -; 6225 : } -; 6226 : g->cur_x += 4; - +; Line 6226 0008f 83 83 5c 88 00 00 04 add DWORD PTR [rbx+34908], 4 00096 8b 83 5c 88 00 00 mov eax, DWORD PTR [rbx+34908] - -; 6227 : -; 6228 : if (g->cur_x >= g->max_x) { - +; Line 6228 0009c 3b 83 54 88 00 00 cmp eax, DWORD PTR [rbx+34900] 000a2 7c 68 jl SHORT $LN13@stbi__out_ - -; 6229 : g->cur_x = g->start_x; - +; Line 6229 000a4 8b 83 4c 88 00 00 mov eax, DWORD PTR [rbx+34892] - -; 6230 : g->cur_y += g->step; -; 6231 : -; 6232 : while (g->cur_y >= g->max_y && g->parse > 0) { - +; Line 6232 000aa 44 8b 8b 58 88 00 00 mov r9d, DWORD PTR [rbx+34904] 000b1 89 83 5c 88 00 @@ -90973,15 +33970,10 @@ $LL2@stbi__out_: 00 00 mov r8d, DWORD PTR [rbx+34880] 000d7 45 85 c0 test r8d, r8d 000da 7e 30 jle SHORT $LN13@stbi__out_ - -; 6233 : g->step = (1 << g->parse) * g->line_size; - +; Line 6233 000dc 8b 93 64 88 00 00 mov edx, DWORD PTR [rbx+34916] - -; 6234 : g->cur_y = g->start_y + (g->step >> 1); -; 6235 : --g->parse; - +; Line 6235 000e2 41 8d 40 ff lea eax, DWORD PTR [r8-1] 000e6 41 8b c8 mov ecx, r8d 000e9 89 83 40 88 00 @@ -90998,11 +33990,7 @@ $LL2@stbi__out_: 00107 41 3b c9 cmp ecx, r9d 0010a 7d c4 jge SHORT $LL2@stbi__out_ $LN13@stbi__out_: - -; 6236 : } -; 6237 : } -; 6238 : } - +; Line 6238 0010c 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00111 48 83 c4 20 add rsp, 32 ; 00000020H 00115 5f pop rdi @@ -91010,65 +33998,42 @@ $LN13@stbi__out_: stbi__out_gif_code ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__process_gif_raster _TEXT SEGMENT tv922 = 32 tv925 = 36 -$T4 = 40 +$T1 = 40 bits$1$ = 112 s$ = 112 g$ = 120 first$1$ = 128 clear$1$ = 136 stbi__process_gif_raster PROC ; COMDAT - -; 6241 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6241 00000 40 53 push rbx 00002 41 55 push r13 00004 48 83 ec 58 sub rsp, 88 ; 00000058H - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00008 48 8b 81 c0 00 00 00 mov rax, QWORD PTR [rcx+192] - -; 6241 : { - +; Line 6241 0000f 4c 8b ea mov r13, rdx 00012 48 8b d9 mov rbx, rcx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00015 48 3b 81 c8 00 00 00 cmp rax, QWORD PTR [rcx+200] 0001c 72 12 jb SHORT $LN123@stbi__proc - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0001e 83 79 30 00 cmp DWORD PTR [rcx+48], 0 00022 74 28 je SHORT $LN32@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00024 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00029 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN123@stbi__proc: - -; 6242 : stbi_uc lzw_cs; -; 6243 : stbi__int32 len, init_code; -; 6244 : stbi__uint32 first; -; 6245 : stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear; -; 6246 : stbi__gif_lzw* p; -; 6247 : -; 6248 : lzw_cs = stbi__get8(s); -; 6249 : if (lzw_cs > 12) return NULL; - +; Line 6249 00030 0f b6 08 movzx ecx, BYTE PTR [rax] 00033 48 ff c0 inc rax 00036 48 89 83 c0 00 @@ -91076,41 +34041,28 @@ $LN123@stbi__proc: 0003d 80 f9 0c cmp cl, 12 00040 76 0c jbe SHORT $LN86@stbi__proc 00042 33 c0 xor eax, eax - -; 6328 : } - +; Line 6328 00044 48 83 c4 58 add rsp, 88 ; 00000058H 00048 41 5d pop r13 0004a 5b pop rbx 0004b c3 ret 0 $LN32@stbi__proc: - -; 1083 : return 0; - +; Line 1083 0004c 32 c9 xor cl, cl $LN86@stbi__proc: 0004e 48 89 6c 24 78 mov QWORD PTR [rsp+120], rbp - -; 6251 : first = 1; - +; Line 6251 00053 41 bb 01 00 00 00 mov r11d, 1 00059 0f b6 c9 movzx ecx, cl - -; 6252 : codesize = lzw_cs + 1; -; 6253 : codemask = (1 << codesize) - 1; -; 6254 : bits = 0; - +; Line 6254 0005c 45 33 c9 xor r9d, r9d 0005f 48 89 74 24 50 mov QWORD PTR [rsp+80], rsi 00064 ba 01 00 00 00 mov edx, 1 00069 d3 e2 shl edx, cl 0006b 41 8b eb mov ebp, r11d 0006e 48 89 7c 24 48 mov QWORD PTR [rsp+72], rdi - -; 6255 : valid_bits = 0; -; 6256 : for (init_code = 0; init_code < clear; init_code++) { - +; Line 6256 00073 45 8d 43 fe lea r8d, QWORD PTR [r11-2] 00077 8d 41 01 lea eax, DWORD PTR [rcx+1] 0007a 4c 89 64 24 40 mov QWORD PTR [rsp+64], r12 @@ -91130,22 +34082,15 @@ $LN86@stbi__proc: 000aa 44 89 4c 24 70 mov DWORD PTR bits$1$[rsp], r9d 000af 85 d2 test edx, edx 000b1 7e 21 jle SHORT $LN3@stbi__proc - -; 6250 : clear = 1 << lzw_cs; - +; Line 6250 000b3 49 8d 85 36 08 00 00 lea rax, QWORD PTR [r13+2102] 000ba 66 0f 1f 44 00 00 npad 6 $LL4@stbi__proc: - -; 6257 : g->codes[init_code].prefix = -1; -; 6258 : g->codes[init_code].first = (stbi_uc)init_code; - +; Line 6258 000c0 88 08 mov BYTE PTR [rax], cl - -; 6259 : g->codes[init_code].suffix = (stbi_uc)init_code; - +; Line 6259 000c2 88 48 01 mov BYTE PTR [rax+1], cl 000c5 ff c1 inc ecx 000c7 66 44 89 40 fe mov WORD PTR [rax-2], r8w @@ -91153,71 +34098,46 @@ $LL4@stbi__proc: 000d0 3b ca cmp ecx, edx 000d2 7c ec jl SHORT $LL4@stbi__proc $LN3@stbi__proc: - -; 6260 : } -; 6261 : -; 6262 : // support no starting clear code -; 6263 : avail = clear + 2; - +; Line 6263 000d4 8d 42 02 lea eax, DWORD PTR [rdx+2] - -; 6264 : oldcode = -1; - +; Line 6264 000d7 45 8b f0 mov r14d, r8d 000da 48 63 f0 movsxd rsi, eax - -; 6265 : -; 6266 : len = 0; - +; Line 6266 000dd 33 ff xor edi, edi 000df 4c 8b c6 mov r8, rsi - 000e2 48 89 74 24 28 mov QWORD PTR $T4[rsp], rsi + 000e2 48 89 74 24 28 mov QWORD PTR $T1[rsp], rsi 000e7 89 44 24 20 mov DWORD PTR tv922[rsp], eax 000eb 0f 1f 44 00 00 npad 5 $LL5@stbi__proc: - -; 6267 : for (;;) { -; 6268 : if (valid_bits < codesize) { - +; Line 6268 000f0 45 3b e7 cmp r12d, r15d 000f3 0f 8d 10 01 00 00 jge $LN11@stbi__proc - -; 6269 : if (len == 0) { - +; Line 6269 000f9 85 ff test edi, edi 000fb 0f 85 87 00 00 00 jne $LN87@stbi__proc - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00101 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00108 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0010f 73 0f jae SHORT $LN35@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00111 0f b6 08 movzx ecx, BYTE PTR [rax] 00114 48 ff c0 inc rax 00117 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0011e eb 2b jmp SHORT $LN124@stbi__proc $LN35@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00120 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00124 74 23 je SHORT $LN36@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00126 48 8b cb mov rcx, rbx 00129 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0012e 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00135 44 8b 4c 24 70 mov r9d, DWORD PTR bits$1$[rsp] @@ -91227,28 +34147,19 @@ $LN35@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 00147 eb 02 jmp SHORT $LN124@stbi__proc $LN36@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00149 32 c9 xor cl, cl $LN124@stbi__proc: - -; 6270 : len = stbi__get8(s); // start new block - +; Line 6270 0014b 0f b6 f9 movzx edi, cl 0014e ba 30 00 00 00 mov edx, 48 ; 00000030H 00153 48 8b c3 mov rax, rbx 00156 4c 8d 04 1a lea r8, QWORD PTR [rdx+rbx] - -; 6271 : if (len == 0) - +; Line 6271 0015a 84 c9 test cl, cl 0015c 75 2e jne SHORT $LN80@stbi__proc $LN9@stbi__proc: - -; 6294 : return g->out; - +; Line 6294 0015e 49 8b 45 08 mov rax, QWORD PTR [r13+8] $LN122@stbi__proc: 00162 4c 8b 74 24 38 mov r14, QWORD PTR [rsp+56] @@ -91257,58 +34168,38 @@ $LN122@stbi__proc: 00171 48 8b 74 24 50 mov rsi, QWORD PTR [rsp+80] 00176 48 8b 6c 24 78 mov rbp, QWORD PTR [rsp+120] 0017b 4c 8b 7c 24 30 mov r15, QWORD PTR [rsp+48] - -; 6328 : } - +; Line 6328 00180 48 83 c4 58 add rsp, 88 ; 00000058H 00184 41 5d pop r13 00186 5b pop rbx 00187 c3 ret 0 $LN87@stbi__proc: - -; 6271 : if (len == 0) - +; Line 6271 00188 4c 8d 43 30 lea r8, QWORD PTR [rbx+48] $LN80@stbi__proc: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0018c 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - -; 6272 : return g->out; -; 6273 : } -; 6274 : --len; - +; Line 6274 00193 ff cf dec edi - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00195 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0019c 73 0f jae SHORT $LN39@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 0019e 0f b6 08 movzx ecx, BYTE PTR [rax] 001a1 48 ff c0 inc rax 001a4 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 001ab eb 2b jmp SHORT $LN38@stbi__proc $LN39@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 001ad 41 83 38 00 cmp DWORD PTR [r8], 0 001b1 74 23 je SHORT $LN40@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 001b3 48 8b cb mov rcx, rbx 001b6 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 001bb 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 001c2 44 8b 4c 24 70 mov r9d, DWORD PTR bits$1$[rsp] @@ -91318,20 +34209,13 @@ $LN39@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rax 001d4 eb 02 jmp SHORT $LN38@stbi__proc $LN40@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 001d6 32 c9 xor cl, cl $LN38@stbi__proc: - -; 6275 : bits |= (stbi__int32)stbi__get8(s) << valid_bits; -; 6276 : valid_bits += 8; -; 6277 : } - +; Line 6277 001d8 8b 94 24 88 00 00 00 mov edx, DWORD PTR clear$1$[rsp] - 001df 4c 8b 44 24 28 mov r8, QWORD PTR $T4[rsp] + 001df 4c 8b 44 24 28 mov r8, QWORD PTR $T1[rsp] 001e4 44 8b 9c 24 80 00 00 00 mov r11d, DWORD PTR first$1$[rsp] 001ec 0f b6 c1 movzx eax, cl @@ -91343,108 +34227,67 @@ $LN38@stbi__proc: 00200 41 83 c4 08 add r12d, 8 00204 e9 e7 fe ff ff jmp $LL5@stbi__proc $LN11@stbi__proc: - -; 6278 : else { -; 6279 : stbi__int32 code = bits & codemask; - +; Line 6279 00209 45 8b d1 mov r10d, r9d - -; 6280 : bits >>= codesize; - +; Line 6280 0020c 41 8b cf mov ecx, r15d 0020f 41 d3 f9 sar r9d, cl 00212 44 23 d5 and r10d, ebp - -; 6281 : valid_bits -= codesize; - +; Line 6281 00215 45 2b e7 sub r12d, r15d 00218 44 89 4c 24 70 mov DWORD PTR bits$1$[rsp], r9d - -; 6282 : // @OPTIMIZE: is there some way we can accelerate the non-clear path? -; 6283 : if (code == clear) { // clear code - +; Line 6283 0021d 44 3b d2 cmp r10d, edx 00220 75 35 jne SHORT $LN15@stbi__proc - -; 6284 : codesize = lzw_cs + 1; - +; Line 6284 00222 44 8b 7c 24 24 mov r15d, DWORD PTR tv925[rsp] - -; 6285 : codemask = (1 << codesize) - 1; - +; Line 6285 00227 bd 01 00 00 00 mov ebp, 1 0022c 41 8b cf mov ecx, r15d - -; 6286 : avail = clear + 2; - +; Line 6286 0022f 4c 63 c2 movsxd r8, edx 00232 d3 e5 shl ebp, cl 00234 49 83 c0 02 add r8, 2 00238 ff cd dec ebp - 0023a 4c 89 44 24 28 mov QWORD PTR $T4[rsp], r8 - -; 6287 : oldcode = -1; -; 6288 : first = 0; - + 0023a 4c 89 44 24 28 mov QWORD PTR $T1[rsp], r8 +; Line 6288 0023f 45 33 db xor r11d, r11d 00242 8b f0 mov esi, eax 00244 44 89 9c 24 80 00 00 00 mov DWORD PTR first$1$[rsp], r11d 0024c 41 be ff ff ff ff mov r14d, -1 - -; 6289 : } - +; Line 6289 00252 e9 99 fe ff ff jmp $LL5@stbi__proc $LN15@stbi__proc: - -; 6290 : else if (code == clear + 1) { // end of stream code - +; Line 6290 00257 8d 42 01 lea eax, DWORD PTR [rdx+1] 0025a 44 3b d0 cmp r10d, eax 0025d 0f 84 38 01 00 00 je $LN70@stbi__proc - -; 6295 : } -; 6296 : else if (code <= avail) { - +; Line 6296 00263 44 3b d6 cmp r10d, esi 00266 0f 8f 05 01 00 00 jg $LN19@stbi__proc - -; 6297 : if (first) { - +; Line 6297 0026c 45 85 db test r11d, r11d 0026f 0f 85 d2 00 00 00 jne $LN71@stbi__proc - -; 6299 : } -; 6300 : -; 6301 : if (oldcode >= 0) { - +; Line 6301 00275 45 85 f6 test r14d, r14d 00278 78 56 js SHORT $LN22@stbi__proc - -; 6302 : p = &g->codes[avail++]; - +; Line 6302 0027a 4a 8d 14 85 00 00 00 00 lea rdx, QWORD PTR [r8*4] 00282 ff c6 inc esi 00284 49 ff c0 inc r8 - 00287 4c 89 44 24 28 mov QWORD PTR $T4[rsp], r8 - -; 6303 : if (avail > 8192) { - + 00287 4c 89 44 24 28 mov QWORD PTR $T1[rsp], r8 +; Line 6303 0028c 81 fe 00 20 00 00 cmp esi, 8192 ; 00002000H 00292 0f 8f 85 00 00 00 jg $LN72@stbi__proc - -; 6305 : } -; 6306 : -; 6307 : p->prefix = (stbi__int16)oldcode; -; 6308 : p->first = g->codes[oldcode].first; - +; Line 6308 00298 49 63 c6 movsxd rax, r14d 0029b 66 46 89 b4 2a 34 08 00 00 mov WORD PTR [rdx+r13+2100], r14w @@ -91452,9 +34295,7 @@ $LN15@stbi__proc: 36 08 00 00 movzx ecx, BYTE PTR [r13+rax*4+2102] 002ad 42 88 8c 2a 36 08 00 00 mov BYTE PTR [rdx+r13+2102], cl - -; 6309 : p->suffix = (code == avail) ? p->first : g->codes[code].first; - +; Line 6309 002b5 44 3b d6 cmp r10d, esi 002b8 74 0c je SHORT $LN29@stbi__proc 002ba 49 63 c2 movsxd rax, r10d @@ -91463,63 +34304,42 @@ $LN15@stbi__proc: $LN29@stbi__proc: 002c6 42 88 8c 2a 37 08 00 00 mov BYTE PTR [rdx+r13+2103], cl - -; 6310 : } - +; Line 6310 002ce eb 09 jmp SHORT $LN25@stbi__proc $LN22@stbi__proc: - -; 6311 : else if (code == avail) - +; Line 6311 002d0 44 3b d6 cmp r10d, esi 002d3 0f 84 98 00 00 00 je $LN19@stbi__proc $LN25@stbi__proc: - -; 6312 : return stbi__errpuc("illegal code in raster", "Corrupt GIF"); -; 6313 : -; 6314 : stbi__out_gif_code(g, (stbi__uint16)code); - +; Line 6314 002d9 41 0f b7 d2 movzx edx, r10w 002dd 49 8b cd mov rcx, r13 002e0 e8 00 00 00 00 call stbi__out_gif_code - -; 6315 : -; 6316 : if ((avail & codemask) == 0 && avail <= 0x0FFF) { - +; Line 6316 002e5 85 f5 test esi, ebp 002e7 75 17 jne SHORT $LN26@stbi__proc 002e9 81 fe ff 0f 00 00 cmp esi, 4095 ; 00000fffH 002ef 7f 0f jg SHORT $LN26@stbi__proc - -; 6317 : codesize++; - +; Line 6317 002f1 41 ff c7 inc r15d - -; 6318 : codemask = (1 << codesize) - 1; - +; Line 6318 002f4 bd 01 00 00 00 mov ebp, 1 002f9 41 8b cf mov ecx, r15d 002fc d3 e5 shl ebp, cl 002fe ff cd dec ebp $LN26@stbi__proc: - -; 6325 : } -; 6326 : } -; 6327 : } - +; Line 6327 00300 8b 94 24 88 00 00 00 mov edx, DWORD PTR clear$1$[rsp] 00307 45 8b f2 mov r14d, r10d - 0030a 4c 8b 44 24 28 mov r8, QWORD PTR $T4[rsp] + 0030a 4c 8b 44 24 28 mov r8, QWORD PTR $T1[rsp] 0030f 44 8b 4c 24 70 mov r9d, DWORD PTR bits$1$[rsp] 00314 8b 44 24 20 mov eax, DWORD PTR tv922[rsp] 00318 e9 d3 fd ff ff jmp $LL5@stbi__proc $LN72@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0031d 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00323 65 48 8b 04 25 @@ -91529,15 +34349,11 @@ $LN72@stbi__proc: 00335 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0P@GJNJCPDJ@too?5many?5codes@ 0033c 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 6304 : return stbi__errpuc("too many codes", "Corrupt GIF"); - +; Line 6304 00340 33 c0 xor eax, eax 00342 e9 1b fe ff ff jmp $LN122@stbi__proc $LN71@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00347 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0034d 65 48 8b 04 25 @@ -91547,15 +34363,11 @@ $LN71@stbi__proc: 0035f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0O@MGDACKOJ@no?5clear?5code@ 00366 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 6298 : return stbi__errpuc("no clear code", "Corrupt GIF"); - +; Line 6298 0036a 33 c0 xor eax, eax 0036c e9 f1 fd ff ff jmp $LN122@stbi__proc $LN19@stbi__proc: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00371 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00377 65 48 8b 04 25 @@ -91565,115 +34377,73 @@ $LN19@stbi__proc: 00389 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BH@LOKBIIOJ@illegal?5code?5in?5raster@ 00390 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 6319 : } -; 6320 : -; 6321 : oldcode = code; -; 6322 : } -; 6323 : else { -; 6324 : return stbi__errpuc("illegal code in raster", "Corrupt GIF"); - +; Line 6324 00394 33 c0 xor eax, eax 00396 e9 c7 fd ff ff jmp $LN122@stbi__proc $LN70@stbi__proc: - -; 1107 : if (n == 0) return; // already there! - +; Line 1107 0039b 85 ff test edi, edi 0039d 74 51 je SHORT $LL8@stbi__proc - -; 1108 : if (n < 0) { - +; Line 1108 0039f 79 10 jns SHORT $LN44@stbi__proc - -; 1109 : s->img_buffer = s->img_buffer_end; - +; Line 1109 003a1 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] 003a8 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - -; 1110 : return; - +; Line 1110 003af eb 3f jmp SHORT $LL8@stbi__proc $LN44@stbi__proc: - -; 1111 : } -; 1112 : if (s->io.read) { - +; Line 1112 003b1 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 003b6 74 2b je SHORT $LN46@stbi__proc - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - +; Line 1113 003b8 8b 8b c8 00 00 00 mov ecx, DWORD PTR [rbx+200] 003be 2b 8b c0 00 00 00 sub ecx, DWORD PTR [rbx+192] - -; 1114 : if (blen < n) { - +; Line 1114 003c4 3b cf cmp ecx, edi 003c6 7d 1b jge SHORT $LN46@stbi__proc - -; 1115 : s->img_buffer = s->img_buffer_end; - +; Line 1115 003c8 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - +; Line 1116 003cf 2b f9 sub edi, ecx 003d1 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 003d5 8b d7 mov edx, edi 003d7 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 003de ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - +; Line 1117 003e1 eb 0d jmp SHORT $LL8@stbi__proc $LN46@stbi__proc: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - +; Line 1120 003e3 48 63 c7 movsxd rax, edi 003e6 48 01 83 c0 00 00 00 add QWORD PTR [rbx+192], rax 003ed 0f 1f 00 npad 3 $LL8@stbi__proc: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 003f0 48 8b 8b c0 00 00 00 mov rcx, QWORD PTR [rbx+192] 003f7 48 3b 8b c8 00 00 00 cmp rcx, QWORD PTR [rbx+200] 003fe 73 0f jae SHORT $LN49@stbi__proc - -; 1078 : return *s->img_buffer++; - +; Line 1078 00400 0f b6 11 movzx edx, BYTE PTR [rcx] 00403 48 ff c1 inc rcx 00406 48 89 8b c0 00 00 00 mov QWORD PTR [rbx+192], rcx 0040d eb 27 jmp SHORT $LN48@stbi__proc $LN49@stbi__proc: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0040f 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00413 74 1f je SHORT $LN50@stbi__proc - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00415 48 8b cb mov rcx, rbx 00418 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0041d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00424 0f b6 10 movzx edx, BYTE PTR [rax] @@ -91682,70 +34452,45 @@ $LN49@stbi__proc: 00 00 mov QWORD PTR [rbx+192], rcx 00432 eb 02 jmp SHORT $LN48@stbi__proc $LN50@stbi__proc: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00434 32 d2 xor dl, dl $LN48@stbi__proc: - -; 6291 : stbi__skip(s, len); -; 6292 : while ((len = stbi__get8(s)) > 0) - +; Line 6292 00436 0f b6 d2 movzx edx, dl 00439 85 d2 test edx, edx 0043b 0f 84 1d fd ff ff je $LN9@stbi__proc - -; 1112 : if (s->io.read) { - +; Line 1112 00441 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 00446 74 2c je SHORT $LN56@stbi__proc - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - +; Line 1113 00448 44 8b 83 c8 00 00 00 mov r8d, DWORD PTR [rbx+200] 0044f 44 2b c1 sub r8d, ecx - -; 1114 : if (blen < n) { - +; Line 1114 00452 44 3b c2 cmp r8d, edx 00455 7d 1d jge SHORT $LN56@stbi__proc - -; 1115 : s->img_buffer = s->img_buffer_end; - +; Line 1115 00457 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - +; Line 1116 0045e 41 2b d0 sub edx, r8d 00461 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 00465 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0046c ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - +; Line 1117 0046f e9 7c ff ff ff jmp $LL8@stbi__proc $LN56@stbi__proc: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - +; Line 1120 00474 48 8d 04 11 lea rax, QWORD PTR [rcx+rdx] 00478 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - -; 6293 : stbi__skip(s, len); - +; Line 6293 0047f e9 6c ff ff ff jmp $LL8@stbi__proc stbi__process_gif_raster ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__gif_load_next _TEXT SEGMENT s$ = 80 @@ -91755,9 +34500,8 @@ first_frame$1$ = 104 req_comp$dead$ = 104 two_back$dead$ = 112 stbi__gif_load_next PROC ; COMDAT - -; 6333 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6333 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi @@ -91768,70 +34512,44 @@ stbi__gif_load_next PROC ; COMDAT 00019 41 56 push r14 0001b 41 57 push r15 0001d 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 6334 : int dispose; -; 6335 : int first_frame; -; 6336 : int pi; -; 6337 : int pcount; -; 6338 : STBI_NOTUSED(req_comp); -; 6339 : -; 6340 : // on first frame, any non-written pixels get the background colour (non-transparent) -; 6341 : first_frame = 0; - +; Line 6341 00021 45 33 e4 xor r12d, r12d 00024 48 8b f2 mov rsi, rdx 00027 48 8b d9 mov rbx, rcx 0002a 44 89 64 24 68 mov DWORD PTR first_frame$1$[rsp], r12d - -; 6342 : if (g->out == 0) { - +; Line 6342 0002f 4c 39 62 08 cmp QWORD PTR [rdx+8], r12 00033 0f 85 1f 01 00 00 jne $LN18@stbi__gif_ - -; 6343 : if (!stbi__gif_header(s, g, comp, 0)) return 0; // stbi__g_failure_reason set by stbi__gif_header - +; Line 6343 00039 e8 00 00 00 00 call stbi__gif_header 0003e 85 c0 test eax, eax 00040 0f 84 a6 06 00 00 je $LN181@stbi__gif_ - -; 6344 : if (!stbi__mad3sizes_valid(4, g->w, g->h, 0)) - +; Line 6344 00046 8b 0e mov ecx, DWORD PTR [rsi] 00048 8b 7e 04 mov edi, DWORD PTR [rsi+4] - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 0004b 85 c9 test ecx, ecx 0004d 0f 88 e6 00 00 00 js $LN174@stbi__gif_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 00053 75 0a jne SHORT $LN116@stbi__gif_ 00055 44 8d 04 8d 00 00 00 00 lea r8d, DWORD PTR [rcx*4] 0005d eb 22 jmp SHORT $LN178@stbi__gif_ $LN116@stbi__gif_: - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 0005f b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00064 99 cdq 00065 f7 f9 idiv ecx - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00067 83 f8 04 cmp eax, 4 0006a 0f 8c c9 00 00 00 jl $LN174@stbi__gif_ 00070 44 8d 04 8d 00 00 00 00 lea r8d, DWORD PTR [rcx*4] - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 00078 45 85 c0 test r8d, r8d 0007b 0f 88 b8 00 00 00 js $LN174@stbi__gif_ @@ -91839,72 +34557,43 @@ $LN178@stbi__gif_: 00081 85 ff test edi, edi 00083 0f 88 b0 00 00 00 js $LN174@stbi__gif_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - +; Line 468 00089 74 11 je SHORT $LN175@stbi__gif_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - +; Line 470 0008b b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH 00090 99 cdq 00091 f7 ff idiv edi - -; 484 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - +; Line 484 00093 44 3b c0 cmp r8d, eax 00096 0f 8f 9d 00 00 00 jg $LN174@stbi__gif_ $LN175@stbi__gif_: - -; 6344 : if (!stbi__mad3sizes_valid(4, g->w, g->h, 0)) - +; Line 6344 0009c 0f af f9 imul edi, ecx - -; 6346 : pcount = g->w * g->h; -; 6347 : g->out = (stbi_uc*)stbi__malloc(4 * pcount); - +; Line 6347 0009f 8d 04 bd 00 00 00 00 lea eax, DWORD PTR [rdi*4] 000a6 48 63 e8 movsxd rbp, eax - -; 438 : return STBI_MALLOC(size); - +; Line 438 000a9 48 8b cd mov rcx, rbp 000ac ff 15 00 00 00 00 call QWORD PTR __imp_malloc 000b2 48 8b cd mov rcx, rbp - -; 6346 : pcount = g->w * g->h; -; 6347 : g->out = (stbi_uc*)stbi__malloc(4 * pcount); - +; Line 6347 000b5 48 89 46 08 mov QWORD PTR [rsi+8], rax - -; 438 : return STBI_MALLOC(size); - +; Line 438 000b9 ff 15 00 00 00 00 call QWORD PTR __imp_malloc - -; 6349 : g->history = (stbi_uc*)stbi__malloc(pcount); - +; Line 6349 000bf 48 63 ff movsxd rdi, edi - -; 438 : return STBI_MALLOC(size); - +; Line 438 000c2 48 8b cf mov rcx, rdi - -; 6348 : g->background = (stbi_uc*)stbi__malloc(4 * pcount); - +; Line 6348 000c5 48 89 46 10 mov QWORD PTR [rsi+16], rax - -; 438 : return STBI_MALLOC(size); - +; Line 438 000c9 ff 15 00 00 00 00 call QWORD PTR __imp_malloc - -; 6350 : if (!g->out || !g->background || !g->history) - +; Line 6350 000cf 48 8b 4e 08 mov rcx, QWORD PTR [rsi+8] 000d3 48 89 46 18 mov QWORD PTR [rsi+24], rax 000d7 48 85 c9 test rcx, rcx @@ -91913,43 +34602,27 @@ $LN175@stbi__gif_: 000e0 74 38 je SHORT $LN23@stbi__gif_ 000e2 48 85 c0 test rax, rax 000e5 74 33 je SHORT $LN23@stbi__gif_ - -; 6352 : -; 6353 : // image is treated as "transparent" at the start - ie, nothing overwrites the current background; -; 6354 : // background colour is only used for pixels that are not rendered first frame, after that "background" -; 6355 : // color refers to the color that was there the previous frame. -; 6356 : memset(g->out, 0x00, 4 * pcount); - +; Line 6356 000e7 4c 8b c5 mov r8, rbp 000ea 33 d2 xor edx, edx 000ec e8 00 00 00 00 call memset - -; 6357 : memset(g->background, 0x00, 4 * pcount); // state of the background (starts transparent) - +; Line 6357 000f1 48 8b 4e 10 mov rcx, QWORD PTR [rsi+16] 000f5 4c 8b c5 mov r8, rbp 000f8 33 d2 xor edx, edx 000fa e8 00 00 00 00 call memset - -; 6358 : memset(g->history, 0x00, pcount); // pixels that were affected previous frame - +; Line 6358 000ff 48 8b 4e 18 mov rcx, QWORD PTR [rsi+24] 00103 4c 8b c7 mov r8, rdi 00106 33 d2 xor edx, edx 00108 e8 00 00 00 00 call memset - -; 6359 : first_frame = 1; - +; Line 6359 0010d c7 44 24 68 01 00 00 00 mov DWORD PTR first_frame$1$[rsp], 1 - -; 6360 : } - +; Line 6360 00115 e9 9f 00 00 00 jmp $LN19@stbi__gif_ $LN23@stbi__gif_: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 0011a 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00120 65 48 8b 04 25 @@ -91957,14 +34630,10 @@ $LN23@stbi__gif_: 00129 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 0012d 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - -; 6351 : return stbi__errpuc("outofmem", "Out of memory"); - +; Line 6351 00134 e9 aa 05 00 00 jmp $LN236@stbi__gif_ $LN174@stbi__gif_: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00139 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0013f 65 48 8b 04 25 @@ -91972,91 +34641,46 @@ $LN174@stbi__gif_: 00148 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 0014c 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - -; 6345 : return stbi__errpuc("too large", "GIF image is too large"); - +; Line 6345 00153 e9 8b 05 00 00 jmp $LN236@stbi__gif_ $LN18@stbi__gif_: - -; 6361 : else { -; 6362 : // second frame - how do we dispose of the previous one? -; 6363 : dispose = (g->eflags & 0x1C) >> 2; -; 6364 : pcount = g->w * g->h; - +; Line 6364 00158 8b 02 mov eax, DWORD PTR [rdx] 0015a 0f af 42 04 imul eax, DWORD PTR [rdx+4] 0015e 8b 4a 30 mov ecx, DWORD PTR [rdx+48] 00161 4c 63 c0 movsxd r8, eax - -; 6365 : -; 6366 : if ((dispose == 3) && (two_back == 0)) { - +; Line 6366 00164 8b c1 mov eax, ecx 00166 83 e0 1c and eax, 28 00169 3c 0c cmp al, 12 0016b 74 08 je SHORT $LN177@stbi__gif_ - -; 6367 : dispose = 2; // if I don't have an image to revert back to, default to the old background -; 6368 : } -; 6369 : -; 6370 : if (dispose == 3) { // use previous graphic -; 6371 : for (pi = 0; pi < pcount; ++pi) { -; 6372 : if (g->history[pi]) { -; 6373 : memcpy(&g->out[pi * 4], &two_back[pi * 4], 4); -; 6374 : } -; 6375 : } -; 6376 : } -; 6377 : else if (dispose == 2) { - +; Line 6377 0016d 80 e1 1c and cl, 28 00170 80 f9 08 cmp cl, 8 00173 75 2b jne SHORT $LN6@stbi__gif_ $LN177@stbi__gif_: - -; 6378 : // restore what was changed last frame to background before that frame; -; 6379 : for (pi = 0; pi < pcount; ++pi) { - +; Line 6379 00175 4d 85 c0 test r8, r8 00178 7e 26 jle SHORT $LN6@stbi__gif_ 0017a 49 8b d4 mov rdx, r12 0017d 0f 1f 00 npad 3 $LL7@stbi__gif_: - -; 6380 : if (g->history[pi]) { - +; Line 6380 00180 48 8b 46 18 mov rax, QWORD PTR [rsi+24] 00184 44 38 24 02 cmp BYTE PTR [rdx+rax], r12b 00188 74 0e je SHORT $LN5@stbi__gif_ - -; 6381 : memcpy(&g->out[pi * 4], &g->background[pi * 4], 4); - +; Line 6381 0018a 48 8b 46 10 mov rax, QWORD PTR [rsi+16] 0018e 48 8b 4e 08 mov rcx, QWORD PTR [rsi+8] 00192 8b 04 90 mov eax, DWORD PTR [rax+rdx*4] 00195 89 04 91 mov DWORD PTR [rcx+rdx*4], eax $LN5@stbi__gif_: - -; 6378 : // restore what was changed last frame to background before that frame; -; 6379 : for (pi = 0; pi < pcount; ++pi) { - +; Line 6379 00198 48 ff c2 inc rdx 0019b 49 3b d0 cmp rdx, r8 0019e 7c e0 jl SHORT $LL7@stbi__gif_ $LN6@stbi__gif_: - -; 6382 : } -; 6383 : } -; 6384 : } -; 6385 : else { -; 6386 : // This is a non-disposal case eithe way, so just -; 6387 : // leave the pixels as is, and they will become the new background -; 6388 : // 1: do not dispose -; 6389 : // 0: not specified. -; 6390 : } -; 6391 : -; 6392 : // background is what out is after the undoing of the previou frame; -; 6393 : memcpy(g->background, g->out, 4 * g->w * g->h); - +; Line 6393 001a0 8b 46 04 mov eax, DWORD PTR [rsi+4] 001a3 0f af 06 imul eax, DWORD PTR [rsi] 001a6 48 8b 56 08 mov rdx, QWORD PTR [rsi+8] @@ -92065,12 +34689,7 @@ $LN6@stbi__gif_: 001b1 4c 63 c0 movsxd r8, eax 001b4 e8 00 00 00 00 call memcpy $LN19@stbi__gif_: - -; 6394 : } -; 6395 : -; 6396 : // clear my history; -; 6397 : memset(g->history, 0x00, g->w * g->h); // pixels that were affected previous frame - +; Line 6397 001b9 8b 46 04 mov eax, DWORD PTR [rsi+4] 001bc 33 d2 xor edx, edx 001be 0f af 06 imul eax, DWORD PTR [rsi] @@ -92080,9 +34699,7 @@ $LN19@stbi__gif_: 001cd 41 bd ff ff ff ff mov r13d, -1 $LN85@stbi__gif_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 001d3 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] 001d7 66 0f 1f 84 00 00 00 00 00 npad 9 @@ -92092,118 +34709,77 @@ $LL8@stbi__gif_: 001e7 48 3b 8b c8 00 00 00 cmp rcx, QWORD PTR [rbx+200] 001ee 73 08 jae SHORT $LN68@stbi__gif_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 001f0 0f b6 11 movzx edx, BYTE PTR [rcx] 001f3 48 ff c1 inc rcx 001f6 eb 24 jmp SHORT $LN237@stbi__gif_ $LN68@stbi__gif_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 001f8 44 39 63 30 cmp DWORD PTR [rbx+48], r12d 001fc 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] 00200 0f 84 c3 04 00 00 je $LN180@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00206 48 8b cb mov rcx, rbx 00209 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0020e 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00215 0f b6 10 movzx edx, BYTE PTR [rax] 00218 48 8d 48 01 lea rcx, QWORD PTR [rax+1] $LN237@stbi__gif_: - -; 6398 : -; 6399 : for (;;) { -; 6400 : int tag = stbi__get8(s); -; 6401 : switch (tag) { - +; Line 6401 0021c 48 89 8b c0 00 00 00 mov QWORD PTR [rbx+192], rcx 00223 80 fa 21 cmp dl, 33 ; 00000021H 00226 0f 85 81 02 00 00 jne $LN142@stbi__gif_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0022c 48 3b 8b c8 00 00 00 cmp rcx, QWORD PTR [rbx+200] 00233 73 08 jae SHORT $LN72@stbi__gif_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00235 0f b6 11 movzx edx, BYTE PTR [rcx] 00238 48 ff c1 inc rcx 0023b eb 1f jmp SHORT $LN238@stbi__gif_ $LN72@stbi__gif_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0023d 44 39 27 cmp DWORD PTR [rdi], r12d 00240 0f 84 36 01 00 00 je $LN169@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00246 48 8b cb mov rcx, rbx 00249 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0024e 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00255 0f b6 10 movzx edx, BYTE PTR [rax] 00258 48 8d 48 01 lea rcx, QWORD PTR [rax+1] $LN238@stbi__gif_: - -; 6466 : } -; 6467 : -; 6468 : case 0x21: // Comment Extension. -; 6469 : { -; 6470 : int len; -; 6471 : int ext = stbi__get8(s); -; 6472 : if (ext == 0xF9) { // Graphic Control Extension. - +; Line 6472 0025c 48 89 8b c0 00 00 00 mov QWORD PTR [rbx+192], rcx 00263 80 fa f9 cmp dl, 249 ; 000000f9H 00266 0f 85 10 01 00 00 jne $LN169@stbi__gif_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0026c 48 3b 8b c8 00 00 00 cmp rcx, QWORD PTR [rbx+200] 00273 73 0f jae SHORT $LN76@stbi__gif_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00275 0f b6 11 movzx edx, BYTE PTR [rcx] 00278 48 ff c1 inc rcx 0027b 48 89 8b c0 00 00 00 mov QWORD PTR [rbx+192], rcx 00282 eb 26 jmp SHORT $LN75@stbi__gif_ $LN76@stbi__gif_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00284 44 39 27 cmp DWORD PTR [rdi], r12d 00287 74 1f je SHORT $LN77@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00289 48 8b cb mov rcx, rbx 0028c e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00291 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00298 0f b6 10 movzx edx, BYTE PTR [rax] @@ -92212,50 +34788,33 @@ $LN76@stbi__gif_: 00 00 mov QWORD PTR [rbx+192], rcx 002a6 eb 02 jmp SHORT $LN75@stbi__gif_ $LN77@stbi__gif_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 002a8 32 d2 xor dl, dl $LN75@stbi__gif_: - -; 6473 : len = stbi__get8(s); - +; Line 6473 002aa 0f b6 d2 movzx edx, dl - -; 6474 : if (len == 4) { - +; Line 6474 002ad 83 fa 04 cmp edx, 4 002b0 0f 85 3a 01 00 00 jne $LN46@stbi__gif_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 002b6 48 3b 8b c8 00 00 00 cmp rcx, QWORD PTR [rbx+200] 002bd 73 10 jae SHORT $LN82@stbi__gif_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 002bf 0f b6 11 movzx edx, BYTE PTR [rcx] 002c2 48 8d 41 01 lea rax, QWORD PTR [rcx+1] 002c6 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 002cd eb 26 jmp SHORT $LN239@stbi__gif_ $LN82@stbi__gif_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 002cf 44 39 63 30 cmp DWORD PTR [rbx+48], r12d 002d3 74 1e je SHORT $LN83@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 002d5 48 8b cb mov rcx, rbx 002d8 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 002dd 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 002e4 0f b6 10 movzx edx, BYTE PTR [rax] @@ -92264,78 +34823,52 @@ $LN82@stbi__gif_: 00 00 mov QWORD PTR [rbx+192], rax 002f1 eb 02 jmp SHORT $LN239@stbi__gif_ $LN83@stbi__gif_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 002f3 32 d2 xor dl, dl $LN239@stbi__gif_: - -; 6475 : g->eflags = stbi__get8(s); - +; Line 6475 002f5 b9 30 00 00 00 mov ecx, 48 ; 00000030H 002fa 48 8b c3 mov rax, rbx 002fd 0f b6 c2 movzx eax, dl 00300 89 46 30 mov DWORD PTR [rsi+48], eax 00303 48 8d 3c 0b lea rdi, QWORD PTR [rbx+rcx] - -; 6476 : g->delay = 10 * stbi__get16le(s); // delay - 1/100th of a second, saving as 1/1000ths. - +; Line 6476 00307 48 8b cb mov rcx, rbx 0030a e8 00 00 00 00 call stbi__get16le 0030f 8d 0c 80 lea ecx, DWORD PTR [rax+rax*4] - -; 6477 : -; 6478 : // unset old transparent -; 6479 : if (g->transparent >= 0) { - +; Line 6479 00312 48 63 46 2c movsxd rax, DWORD PTR [rsi+44] 00316 03 c9 add ecx, ecx 00318 89 8e 68 88 00 00 mov DWORD PTR [rsi+34920], ecx 0031e 85 c0 test eax, eax 00320 78 05 js SHORT $LN48@stbi__gif_ - -; 6480 : g->pal[g->transparent][3] = 255; - +; Line 6480 00322 c6 44 86 37 ff mov BYTE PTR [rsi+rax*4+55], 255 ; 000000ffH $LN48@stbi__gif_: - -; 6481 : } -; 6482 : if (g->eflags & 0x01) { - +; Line 6482 00327 f6 46 30 01 test BYTE PTR [rsi+48], 1 0032b 74 7d je SHORT $LN49@stbi__gif_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0032d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00334 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0033b 73 0f jae SHORT $LN94@stbi__gif_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 0033d 0f b6 08 movzx ecx, BYTE PTR [rax] 00340 48 ff c0 inc rax 00343 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0034a eb 25 jmp SHORT $LN93@stbi__gif_ $LN94@stbi__gif_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0034c 44 39 27 cmp DWORD PTR [rdi], r12d 0034f 74 1e je SHORT $LN95@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00351 48 8b cb mov rcx, rbx 00354 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00359 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00360 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -92344,40 +34877,26 @@ $LN94@stbi__gif_: 00 00 mov QWORD PTR [rbx+192], rax 0036d eb 02 jmp SHORT $LN93@stbi__gif_ $LN95@stbi__gif_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 0036f 32 c9 xor cl, cl $LN93@stbi__gif_: - -; 6483 : g->transparent = stbi__get8(s); - +; Line 6483 00371 0f b6 c1 movzx eax, cl 00374 89 46 2c mov DWORD PTR [rsi+44], eax - -; 6484 : if (g->transparent >= 0) { -; 6485 : g->pal[g->transparent][3] = 0; - +; Line 6485 00377 44 88 64 86 37 mov BYTE PTR [rsi+rax*4+55], r12b $LN169@stbi__gif_: - -; 6381 : memcpy(&g->out[pi * 4], &g->background[pi * 4], 4); - +; Line 6381 0037c 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] $LL16@stbi__gif_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00380 48 8b 8b c0 00 00 00 mov rcx, QWORD PTR [rbx+192] 00387 48 3b 8b c8 00 00 00 cmp rcx, QWORD PTR [rbx+200] 0038e 0f 83 a6 00 00 00 jae $LN58@stbi__gif_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00394 0f b6 11 movzx edx, BYTE PTR [rcx] 00397 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] 0039b 48 ff c1 inc rcx @@ -92385,144 +34904,80 @@ $LL16@stbi__gif_: 00 00 mov QWORD PTR [rbx+192], rcx 003a5 e9 b6 00 00 00 jmp $LN57@stbi__gif_ $LN49@stbi__gif_: - -; 1112 : if (s->io.read) { - +; Line 1112 003aa 4c 39 63 10 cmp QWORD PTR [rbx+16], r12 003ae 74 33 je SHORT $LN173@stbi__gif_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - +; Line 1113 003b0 8b 8b c8 00 00 00 mov ecx, DWORD PTR [rbx+200] 003b6 2b 8b c0 00 00 00 sub ecx, DWORD PTR [rbx+192] - -; 1114 : if (blen < n) { - +; Line 1114 003bc 83 f9 01 cmp ecx, 1 003bf 7d 22 jge SHORT $LN173@stbi__gif_ - -; 1115 : s->img_buffer = s->img_buffer_end; - +; Line 1115 003c1 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - +; Line 1116 003c8 ba 01 00 00 00 mov edx, 1 003cd 2b d1 sub edx, ecx 003cf 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 003d6 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 003da ff 53 18 call QWORD PTR [rbx+24] - -; 6486 : } -; 6487 : } -; 6488 : else { -; 6489 : // don't need transparent -; 6490 : stbi__skip(s, 1); -; 6491 : g->transparent = -1; - +; Line 6491 003dd 44 89 6e 2c mov DWORD PTR [rsi+44], r13d - -; 6492 : } -; 6493 : } - +; Line 6493 003e1 eb 99 jmp SHORT $LN169@stbi__gif_ $LN173@stbi__gif_: - -; 1120 : s->img_buffer += n; - +; Line 1120 003e3 48 ff 83 c0 00 00 00 inc QWORD PTR [rbx+192] - -; 6486 : } -; 6487 : } -; 6488 : else { -; 6489 : // don't need transparent -; 6490 : stbi__skip(s, 1); -; 6491 : g->transparent = -1; - +; Line 6491 003ea 44 89 6e 2c mov DWORD PTR [rsi+44], r13d - -; 6492 : } -; 6493 : } - +; Line 6493 003ee eb 8c jmp SHORT $LN169@stbi__gif_ $LN46@stbi__gif_: - -; 1107 : if (n == 0) return; // already there! - +; Line 1107 003f0 85 d2 test edx, edx 003f2 0f 84 db fd ff ff je $LN85@stbi__gif_ - -; 1108 : if (n < 0) { -; 1109 : s->img_buffer = s->img_buffer_end; -; 1110 : return; -; 1111 : } -; 1112 : if (s->io.read) { - +; Line 1112 003f8 4c 39 63 10 cmp QWORD PTR [rbx+16], r12 003fc 74 2c je SHORT $LN89@stbi__gif_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - +; Line 1113 003fe 44 8b 83 c8 00 00 00 mov r8d, DWORD PTR [rbx+200] 00405 44 2b c1 sub r8d, ecx - -; 1114 : if (blen < n) { - +; Line 1114 00408 44 3b c2 cmp r8d, edx 0040b 7d 1d jge SHORT $LN89@stbi__gif_ - -; 1115 : s->img_buffer = s->img_buffer_end; - +; Line 1115 0040d 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - +; Line 1116 00414 41 2b d0 sub edx, r8d 00417 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 0041b 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00422 ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - +; Line 1117 00425 e9 a9 fd ff ff jmp $LN85@stbi__gif_ $LN89@stbi__gif_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - +; Line 1120 0042a 48 8d 04 11 lea rax, QWORD PTR [rcx+rdx] 0042e 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - -; 6494 : else { -; 6495 : stbi__skip(s, len); -; 6496 : break; - +; Line 6496 00435 e9 99 fd ff ff jmp $LN85@stbi__gif_ $LN58@stbi__gif_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0043a 44 39 27 cmp DWORD PTR [rdi], r12d 0043d 74 1f je SHORT $LN59@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0043f 48 8b cb mov rcx, rbx 00442 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00447 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0044e 0f b6 10 movzx edx, BYTE PTR [rax] @@ -92531,121 +34986,69 @@ $LN58@stbi__gif_: 00 00 mov QWORD PTR [rbx+192], rcx 0045c eb 02 jmp SHORT $LN57@stbi__gif_ $LN59@stbi__gif_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 0045e 32 d2 xor dl, dl $LN57@stbi__gif_: - -; 6497 : } -; 6498 : } -; 6499 : while ((len = stbi__get8(s)) != 0) { - +; Line 6499 00460 0f b6 d2 movzx edx, dl 00463 85 d2 test edx, edx 00465 0f 84 75 fd ff ff je $LL8@stbi__gif_ - -; 1112 : if (s->io.read) { - +; Line 1112 0046b 4c 39 63 10 cmp QWORD PTR [rbx+16], r12 0046f 74 2c je SHORT $LN65@stbi__gif_ - -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); - +; Line 1113 00471 44 8b 83 c8 00 00 00 mov r8d, DWORD PTR [rbx+200] 00478 44 2b c1 sub r8d, ecx - -; 1114 : if (blen < n) { - +; Line 1114 0047b 44 3b c2 cmp r8d, edx 0047e 7d 1d jge SHORT $LN65@stbi__gif_ - -; 1115 : s->img_buffer = s->img_buffer_end; - +; Line 1115 00480 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] - -; 1116 : (s->io.skip)(s->io_user_data, n - blen); - +; Line 1116 00487 41 2b d0 sub edx, r8d 0048a 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 0048e 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00495 ff 53 18 call QWORD PTR [rbx+24] - -; 1117 : return; - +; Line 1117 00498 e9 e3 fe ff ff jmp $LL16@stbi__gif_ $LN65@stbi__gif_: - -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; - +; Line 1120 0049d 48 8d 04 11 lea rax, QWORD PTR [rcx+rdx] 004a1 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - -; 6500 : stbi__skip(s, len); -; 6501 : } - +; Line 6501 004a8 e9 d3 fe ff ff jmp $LL16@stbi__gif_ $LN142@stbi__gif_: - -; 6398 : -; 6399 : for (;;) { -; 6400 : int tag = stbi__get8(s); -; 6401 : switch (tag) { - +; Line 6401 004ad 80 fa 2c cmp dl, 44 ; 0000002cH 004b0 74 11 je SHORT $LN31@stbi__gif_ 004b2 80 fa 3b cmp dl, 59 ; 0000003bH 004b5 0f 85 0e 02 00 00 jne $LN180@stbi__gif_ - -; 6502 : break; -; 6503 : } -; 6504 : -; 6505 : case 0x3B: // gif stream termination code -; 6506 : return (stbi_uc*)s; // using '1' causes warning on some compilers - +; Line 6506 004bb 48 8b c3 mov rax, rbx 004be e9 2b 02 00 00 jmp $LN9@stbi__gif_ $LN31@stbi__gif_: - -; 6402 : case 0x2C: /* Image Descriptor */ -; 6403 : { -; 6404 : stbi__int32 x, y, w, h; -; 6405 : stbi_uc* o; -; 6406 : -; 6407 : x = stbi__get16le(s); - +; Line 6407 004c3 48 8b cb mov rcx, rbx 004c6 e8 00 00 00 00 call stbi__get16le - -; 6408 : y = stbi__get16le(s); - +; Line 6408 004cb 48 8b cb mov rcx, rbx 004ce 44 8b f8 mov r15d, eax 004d1 e8 00 00 00 00 call stbi__get16le - -; 6409 : w = stbi__get16le(s); - +; Line 6409 004d6 48 8b cb mov rcx, rbx 004d9 8b e8 mov ebp, eax 004db e8 00 00 00 00 call stbi__get16le - -; 6410 : h = stbi__get16le(s); - +; Line 6410 004e0 48 8b cb mov rcx, rbx 004e3 44 8b f0 mov r14d, eax 004e6 e8 00 00 00 00 call stbi__get16le - -; 6411 : if (((x + w) > (g->w)) || ((y + h) > (g->h))) - +; Line 6411 004eb 44 8b 06 mov r8d, DWORD PTR [rsi] 004ee 43 8d 0c 3e lea ecx, DWORD PTR [r14+r15] 004f2 44 8b c8 mov r9d, eax @@ -92656,98 +35059,64 @@ $LN31@stbi__gif_: 00501 3b 4e 04 cmp ecx, DWORD PTR [rsi+4] 00504 0f 8f a3 01 00 00 jg $LN33@stbi__gif_ - -; 6413 : -; 6414 : g->line_size = g->w * 4; - +; Line 6414 0050a 46 8d 04 85 00 00 00 00 lea r8d, DWORD PTR [r8*4] - -; 6415 : g->start_x = x * 4; - +; Line 6415 00512 42 8d 0c bd 00 00 00 00 lea ecx, DWORD PTR [r15*4] 0051a 44 89 86 64 88 00 00 mov DWORD PTR [rsi+34916], r8d - -; 6416 : g->start_y = y * g->line_size; - +; Line 6416 00521 41 8b d0 mov edx, r8d 00524 89 8e 4c 88 00 00 mov DWORD PTR [rsi+34892], ecx 0052a 0f af d5 imul edx, ebp - -; 6417 : g->max_x = g->start_x + w * 4; - +; Line 6417 0052d 42 8d 04 b1 lea eax, DWORD PTR [rcx+r14*4] - -; 6418 : g->max_y = g->start_y + h * g->line_size; - +; Line 6418 00531 45 0f af c1 imul r8d, r9d 00535 89 86 54 88 00 00 mov DWORD PTR [rsi+34900], eax - -; 6419 : g->cur_x = g->start_x; - +; Line 6419 0053b 89 8e 5c 88 00 00 mov DWORD PTR [rsi+34908], ecx 00541 89 96 50 88 00 00 mov DWORD PTR [rsi+34896], edx - -; 6420 : g->cur_y = g->start_y; - +; Line 6420 00547 89 96 60 88 00 00 mov DWORD PTR [rsi+34912], edx 0054d 41 8d 04 10 lea eax, DWORD PTR [r8+rdx] 00551 89 86 58 88 00 00 mov DWORD PTR [rsi+34904], eax - -; 6421 : -; 6422 : // if the width of the specified rectangle is 0, that means -; 6423 : // we may not see *any* pixels or the image is malformed; -; 6424 : // to make sure this is caught, move the current y down to -; 6425 : // max_y (which is what out_gif_code checks). -; 6426 : if (w == 0) - +; Line 6426 00557 45 85 f6 test r14d, r14d 0055a 75 0a jne SHORT $LN34@stbi__gif_ - -; 6427 : g->cur_y = g->max_y; - +; Line 6427 0055c 89 86 60 88 00 00 mov DWORD PTR [rsi+34912], eax 00562 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] $LN34@stbi__gif_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00566 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0056d 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00574 73 0f jae SHORT $LN98@stbi__gif_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00576 0f b6 08 movzx ecx, BYTE PTR [rax] 00579 48 ff c0 inc rax 0057c 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00583 eb 25 jmp SHORT $LN97@stbi__gif_ $LN98@stbi__gif_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00585 44 39 27 cmp DWORD PTR [rdi], r12d 00588 74 1e je SHORT $LN99@stbi__gif_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0058a 48 8b cb mov rcx, rbx 0058d e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00592 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00599 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -92756,38 +35125,19 @@ $LN98@stbi__gif_: 00 00 mov QWORD PTR [rbx+192], rax 005a6 eb 02 jmp SHORT $LN97@stbi__gif_ $LN99@stbi__gif_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 005a8 32 c9 xor cl, cl $LN97@stbi__gif_: - -; 6428 : -; 6429 : g->lflags = stbi__get8(s); - +; Line 6429 005aa 44 0f b6 c9 movzx r9d, cl - -; 6430 : -; 6431 : if (g->lflags & 0x40) { - +; Line 6431 005ae 8b 8e 64 88 00 00 mov ecx, DWORD PTR [rsi+34916] 005b4 41 8b d1 mov edx, r9d 005b7 83 e2 40 and edx, 64 ; 00000040H 005ba 44 89 8e 48 88 00 00 mov DWORD PTR [rsi+34888], r9d - -; 6432 : g->step = 8 * g->line_size; // first interlaced spacing -; 6433 : g->parse = 3; -; 6434 : } -; 6435 : else { -; 6436 : g->step = g->line_size; -; 6437 : g->parse = 0; -; 6438 : } -; 6439 : -; 6440 : if (g->lflags & 0x80) { - +; Line 6440 005c1 8d 04 cd 00 00 00 00 lea eax, DWORD PTR [rcx*8] 005c8 0f 44 c1 cmove eax, ecx @@ -92800,9 +35150,7 @@ $LN97@stbi__gif_: 00 mov DWORD PTR [rsi+34880], eax 005de 45 84 c9 test r9b, r9b 005e1 79 32 jns SHORT $LN37@stbi__gif_ - -; 6441 : stbi__gif_parse_colortable(s, g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1); - +; Line 6441 005e3 f6 46 30 01 test BYTE PTR [rsi+48], 1 005e7 74 04 je SHORT $LN55@stbi__gif_ 005e9 44 8b 6e 2c mov r13d, DWORD PTR [rsi+44] @@ -92818,102 +35166,64 @@ $LN55@stbi__gif_: 00608 48 8b cb mov rcx, rbx 0060b 48 8b d7 mov rdx, rdi 0060e e8 00 00 00 00 call stbi__gif_parse_colortable - -; 6442 : g->color_table = (stbi_uc*)g->lpal; -; 6443 : } - +; Line 6443 00613 eb 0a jmp SHORT $LN40@stbi__gif_ $LN37@stbi__gif_: - -; 6444 : else if (g->flags & 0x80) { - +; Line 6444 00615 f6 46 20 80 test BYTE PTR [rsi+32], 128 ; 00000080H 00619 74 76 je SHORT $LN39@stbi__gif_ - -; 6445 : g->color_table = (stbi_uc*)g->pal; - +; Line 6445 0061b 48 8d 7e 34 lea rdi, QWORD PTR [rsi+52] $LN40@stbi__gif_: - -; 6449 : -; 6450 : o = stbi__process_gif_raster(s, g); - +; Line 6450 0061f 48 8b d6 mov rdx, rsi 00622 48 89 be 38 88 00 00 mov QWORD PTR [rsi+34872], rdi 00629 48 8b cb mov rcx, rbx 0062c e8 00 00 00 00 call stbi__process_gif_raster 00631 4c 8b c0 mov r8, rax - -; 6451 : if (!o) return NULL; - +; Line 6451 00634 48 85 c0 test rax, rax 00637 0f 84 af 00 00 00 je $LN181@stbi__gif_ - -; 6455 : if (first_frame && (g->bgindex > 0)) { - +; Line 6455 0063d 44 39 64 24 68 cmp DWORD PTR first_frame$1$[rsp], r12d 00642 74 48 je SHORT $LN14@stbi__gif_ 00644 44 39 66 24 cmp DWORD PTR [rsi+36], r12d 00648 7e 42 jle SHORT $LN14@stbi__gif_ - -; 6452 : -; 6453 : // if this was the first frame, -; 6454 : pcount = g->w * g->h; - +; Line 6454 0064a 8b 46 04 mov eax, DWORD PTR [rsi+4] 0064d 0f af 06 imul eax, DWORD PTR [rsi] - -; 6456 : // if first frame, any pixel not drawn to gets the background color -; 6457 : for (pi = 0; pi < pcount; ++pi) { - +; Line 6457 00650 48 63 d0 movsxd rdx, eax 00653 85 c0 test eax, eax 00655 7e 35 jle SHORT $LN14@stbi__gif_ 00657 66 0f 1f 84 00 00 00 00 00 npad 9 $LL15@stbi__gif_: - -; 6458 : if (g->history[pi] == 0) { - +; Line 6458 00660 48 8b 46 18 mov rax, QWORD PTR [rsi+24] 00664 41 80 3c 04 00 cmp BYTE PTR [r12+rax], 0 00669 75 19 jne SHORT $LN13@stbi__gif_ - -; 6459 : g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; - +; Line 6459 0066b 48 63 46 24 movsxd rax, DWORD PTR [rsi+36] 0066f c6 44 86 37 ff mov BYTE PTR [rsi+rax*4+55], 255 ; 000000ffH - -; 6460 : memcpy(&g->out[pi * 4], &g->pal[g->bgindex], 4); - +; Line 6460 00674 48 63 46 24 movsxd rax, DWORD PTR [rsi+36] 00678 48 8b 4e 08 mov rcx, QWORD PTR [rsi+8] 0067c 8b 44 86 34 mov eax, DWORD PTR [rsi+rax*4+52] 00680 42 89 04 a1 mov DWORD PTR [rcx+r12*4], eax $LN13@stbi__gif_: - -; 6456 : // if first frame, any pixel not drawn to gets the background color -; 6457 : for (pi = 0; pi < pcount; ++pi) { - +; Line 6457 00684 49 ff c4 inc r12 00687 4c 3b e2 cmp r12, rdx 0068a 7c d4 jl SHORT $LL15@stbi__gif_ $LN14@stbi__gif_: - -; 6461 : } -; 6462 : } -; 6463 : } -; 6464 : -; 6465 : return o; - +; Line 6465 0068c 49 8b c0 mov rax, r8 0068f eb 5d jmp SHORT $LN9@stbi__gif_ $LN39@stbi__gif_: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 00691 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 00697 65 48 8b 04 25 @@ -92921,16 +35231,10 @@ $LN39@stbi__gif_: 006a0 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 006a4 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BE@NAMJKDNF@missing?5color?5table@ - -; 6446 : } -; 6447 : else -; 6448 : return stbi__errpuc("missing color table", "Corrupt GIF"); - +; Line 6448 006ab eb 36 jmp SHORT $LN236@stbi__gif_ $LN33@stbi__gif_: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 006ad 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 006b3 65 48 8b 04 25 @@ -92938,14 +35242,10 @@ $LN33@stbi__gif_: 006bc 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 006c0 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BF@GIAALCNJ@bad?5Image?5Descriptor@ - -; 6412 : return stbi__errpuc("bad Image Descriptor", "Corrupt GIF"); - +; Line 6412 006c7 eb 1a jmp SHORT $LN236@stbi__gif_ $LN180@stbi__gif_: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 006c9 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 006cf 65 48 8b 04 25 @@ -92954,14 +35254,7 @@ $LN180@stbi__gif_: 006dc 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0N@DJABBOOH@unknown?5code@ $LN236@stbi__gif_: - -; 6507 : -; 6508 : default: -; 6509 : return stbi__errpuc("unknown code", "Corrupt GIF"); -; 6510 : } -; 6511 : } -; 6512 : } - +; Line 6512 006e3 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason 006e8 48 89 14 01 mov QWORD PTR [rcx+rax], rdx $LN181@stbi__gif_: @@ -92980,7 +35273,6 @@ $LN9@stbi__gif_: stbi__gif_load_next ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__gif_load _TEXT SEGMENT g$ = 48 @@ -92992,9 +35284,8 @@ comp$ = 35080 req_comp$ = 35088 ri$dead$ = 35096 stbi__gif_load PROC ; COMDAT - -; 6613 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6613 00000 40 53 push rbx 00002 55 push rbp 00003 56 push rsi @@ -93014,22 +35305,14 @@ stbi__gif_load PROC ; COMDAT 0002f 4d 8b f8 mov r15, r8 00032 4c 8b f2 mov r14, rdx 00035 48 8b f9 mov rdi, rcx - -; 6614 : stbi_uc* u = 0; -; 6615 : stbi__gif g; -; 6616 : memset(&g, 0, sizeof(g)); - +; Line 6616 00038 33 d2 xor edx, edx 0003a 48 8d 4c 24 30 lea rcx, QWORD PTR g$[rsp] 0003f 41 b8 70 88 00 00 mov r8d, 34928 ; 00008870H 00045 49 8b d9 mov rbx, r9 00048 e8 00 00 00 00 call memset - -; 6617 : STBI_NOTUSED(ri); -; 6618 : -; 6619 : u = stbi__gif_load_next(s, &g, comp, req_comp, 0); - +; Line 6619 0004d 33 f6 xor esi, esi 0004f 48 8d 54 24 30 lea rdx, QWORD PTR g$[rsp] 00054 44 8b cd mov r9d, ebp @@ -93037,85 +35320,52 @@ stbi__gif_load PROC ; COMDAT 0005c 4c 8b c3 mov r8, rbx 0005f 48 8b cf mov rcx, rdi 00062 e8 00 00 00 00 call stbi__gif_load_next - -; 6620 : if (u == (stbi_uc*)s) u = 0; // end of animated gif marker -; 6621 : if (u) { - +; Line 6621 00067 48 3b c7 cmp rax, rdi 0006a 48 0f 45 f0 cmovne rsi, rax 0006e 48 8b de mov rbx, rsi 00071 48 85 f6 test rsi, rsi 00074 74 31 je SHORT $LN3@stbi__gif_ - -; 6622 : *x = g.w; - +; Line 6622 00076 44 8b 4c 24 30 mov r9d, DWORD PTR g$[rsp] - -; 6623 : *y = g.h; - +; Line 6623 0007b 8b 44 24 34 mov eax, DWORD PTR g$[rsp+4] 0007f 45 89 0e mov DWORD PTR [r14], r9d 00082 41 89 07 mov DWORD PTR [r15], eax - -; 6624 : -; 6625 : // moved conversion to after successful load so that the same -; 6626 : // can be done for multiple frames. -; 6627 : if (req_comp && req_comp != 4) - +; Line 6627 00085 85 ed test ebp, ebp 00087 74 2e je SHORT $LN6@stbi__gif_ 00089 83 fd 04 cmp ebp, 4 0008c 74 29 je SHORT $LN6@stbi__gif_ - -; 6628 : u = stbi__convert_format(u, 4, req_comp, g.w, g.h); - +; Line 6628 0008e 44 8b c5 mov r8d, ebp 00091 89 44 24 20 mov DWORD PTR [rsp+32], eax 00095 ba 04 00 00 00 mov edx, 4 0009a 48 8b ce mov rcx, rsi 0009d e8 00 00 00 00 call stbi__convert_format 000a2 48 8b d8 mov rbx, rax - -; 6629 : } - +; Line 6629 000a5 eb 10 jmp SHORT $LN6@stbi__gif_ $LN3@stbi__gif_: - -; 6630 : else if (g.out) { - +; Line 6630 000a7 48 8b 4c 24 38 mov rcx, QWORD PTR g$[rsp+8] 000ac 48 85 c9 test rcx, rcx 000af 74 06 je SHORT $LN6@stbi__gif_ - -; 6631 : // if there was an error and we allocated an image buffer, free it! -; 6632 : STBI_FREE(g.out); - +; Line 6632 000b1 ff 15 00 00 00 00 call QWORD PTR __imp_free $LN6@stbi__gif_: - -; 6633 : } -; 6634 : -; 6635 : // free buffers needed for multiple frame loading; -; 6636 : STBI_FREE(g.history); - +; Line 6636 000b7 48 8b 4c 24 48 mov rcx, QWORD PTR g$[rsp+24] 000bc ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 6637 : STBI_FREE(g.background); - +; Line 6637 000c2 48 8b 4c 24 40 mov rcx, QWORD PTR g$[rsp+16] 000c7 ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 6638 : -; 6639 : return u; - +; Line 6639 000cd 48 8b c3 mov rax, rbx - -; 6640 : } - +; Line 6640 000d0 48 8b 8c 24 a0 88 00 00 mov rcx, QWORD PTR __$ArrayPad$[rsp] 000d8 48 33 cc xor rcx, rsp @@ -93132,23 +35382,18 @@ $LN6@stbi__gif_: stbi__gif_load ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__hdr_test_core _TEXT SEGMENT s$ = 48 signature$ = 56 stbi__hdr_test_core PROC ; COMDAT - -; 6653 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6653 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 74 24 10 mov QWORD PTR [rsp+16], rsi 0000a 57 push rdi 0000b 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 6654 : int i; -; 6655 : for (i = 0; signature[i]; ++i) - +; Line 6655 0000f 80 3a 00 cmp BYTE PTR [rdx], 0 00012 48 8b da mov rbx, rdx 00015 48 8b f9 mov rdi, rcx @@ -93156,36 +35401,26 @@ stbi__hdr_test_core PROC ; COMDAT 0001a 66 0f 1f 44 00 00 npad 6 $LL4@stbi__hdr_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00020 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00027 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 0002e 73 0f jae SHORT $LN8@stbi__hdr_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00030 0f b6 08 movzx ecx, BYTE PTR [rax] 00033 48 ff c0 inc rax 00036 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax 0003d eb 26 jmp SHORT $LN7@stbi__hdr_ $LN8@stbi__hdr_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0003f 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 00043 74 1e je SHORT $LN9@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00045 48 8b cf mov rcx, rdi 00048 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0004d 48 8b 87 c0 00 00 00 mov rax, QWORD PTR [rdi+192] 00054 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -93194,50 +35429,32 @@ $LN8@stbi__hdr_: 00 00 mov QWORD PTR [rdi+192], rax 00061 eb 02 jmp SHORT $LN7@stbi__hdr_ $LN9@stbi__hdr_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00063 32 c9 xor cl, cl $LN7@stbi__hdr_: - -; 6656 : if (stbi__get8(s) != signature[i]) - +; Line 6656 00065 0f be 03 movsx eax, BYTE PTR [rbx] 00068 0f b6 c9 movzx ecx, cl 0006b 3b c8 cmp ecx, eax 0006d 75 39 jne SHORT $LN14@stbi__hdr_ - -; 6654 : int i; -; 6655 : for (i = 0; signature[i]; ++i) - +; Line 6655 0006f 48 ff c3 inc rbx 00072 80 3b 00 cmp BYTE PTR [rbx], 0 00075 75 a9 jne SHORT $LL4@stbi__hdr_ $LN18@stbi__hdr_: - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 00077 48 8b 87 d0 00 00 00 mov rax, QWORD PTR [rdi+208] 0007e 48 89 87 c0 00 00 00 mov QWORD PTR [rdi+192], rax - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 00085 48 8b 87 d8 00 00 00 mov rax, QWORD PTR [rdi+216] 0008c 48 89 87 c8 00 00 00 mov QWORD PTR [rdi+200], rax - -; 6657 : return 0; -; 6658 : stbi__rewind(s); -; 6659 : return 1; - +; Line 6659 00093 b8 01 00 00 00 mov eax, 1 - -; 6660 : } - +; Line 6660 00098 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 0009d 48 8b 74 24 38 mov rsi, QWORD PTR [rsp+56] 000a2 48 83 c4 20 add rsp, 32 ; 00000020H @@ -93253,14 +35470,12 @@ $LN14@stbi__hdr_: stbi__hdr_test_core ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__hdr_test _TEXT SEGMENT s$ = 48 stbi__hdr_test PROC ; COMDAT - -; 6663 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6663 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 74 24 10 mov QWORD PTR [rsp+16], rsi 0000a 48 89 7c 24 18 mov QWORD PTR [rsp+24], rdi @@ -93274,5640 +35489,47 @@ stbi__hdr_test PROC ; COMDAT 00026 66 66 0f 1f 84 00 00 00 00 00 npad 10 $LL7@stbi__hdr_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00030 48 8b 03 mov rax, QWORD PTR [rbx] 00033 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 0003a 73 0b jae SHORT $LN11@stbi__hdr_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 0003c 0f b6 08 movzx ecx, BYTE PTR [rax] 0003f 48 ff c0 inc rax 00042 48 89 03 mov QWORD PTR [rbx], rax 00045 eb 1e jmp SHORT $LN10@stbi__hdr_ $LN11@stbi__hdr_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00047 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 0004b 74 16 je SHORT $LN12@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0004d 48 8b cf mov rcx, rdi 00050 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00055 48 8b 03 mov rax, QWORD PTR [rbx] 00058 0f b6 08 movzx ecx, BYTE PTR [rax] 0005b 48 ff c0 inc rax 0005e 48 89 03 mov QWORD PTR [rbx], rax 00061 eb 02 jmp SHORT $LN10@stbi__hdr_ $LN12@stbi__hdr_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00063 32 c9 xor cl, cl $LN10@stbi__hdr_: - -; 6656 : if (stbi__get8(s) != signature[i]) - +; Line 6656 00065 0f be 06 movsx eax, BYTE PTR [rsi] 00068 0f b6 c9 movzx ecx, cl 0006b 3b c8 cmp ecx, eax 0006d 75 0f jne SHORT $LN34@stbi__hdr_ - -; 1084 : } -; 1085 : -; 1086 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_HDR) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1087 : // nothing -; 1088 : #else -; 1089 : stbi_inline static int stbi__at_eof(stbi__context* s) -; 1090 : { -; 1091 : if (s->io.read) { -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; -; 1096 : } -; 1097 : -; 1098 : return s->img_buffer >= s->img_buffer_end; -; 1099 : } -; 1100 : #endif -; 1101 : -; 1102 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) -; 1103 : // nothing -; 1104 : #else -; 1105 : static void stbi__skip(stbi__context* s, int n) -; 1106 : { -; 1107 : if (n == 0) return; // already there! -; 1108 : if (n < 0) { -; 1109 : s->img_buffer = s->img_buffer_end; -; 1110 : return; -; 1111 : } -; 1112 : if (s->io.read) { -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1114 : if (blen < n) { -; 1115 : s->img_buffer = s->img_buffer_end; -; 1116 : (s->io.skip)(s->io_user_data, n - blen); -; 1117 : return; -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; -; 1121 : } -; 1122 : #endif -; 1123 : -; 1124 : #if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) -; 1125 : // nothing -; 1126 : #else -; 1127 : static int stbi__getn(stbi__context* s, stbi_uc* buffer, int n) -; 1128 : { -; 1129 : if (s->io.read) { -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1131 : if (blen < n) { -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; -; 1139 : return res; -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { -; 1144 : memcpy(buffer, s->img_buffer, n); -; 1145 : s->img_buffer += n; -; 1146 : return 1; -; 1147 : } -; 1148 : else -; 1149 : return 0; -; 1150 : } -; 1151 : #endif -; 1152 : -; 1153 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1154 : // nothing -; 1155 : #else -; 1156 : static int stbi__get16be(stbi__context* s) -; 1157 : { -; 1158 : int z = stbi__get8(s); -; 1159 : return (z << 8) + stbi__get8(s); -; 1160 : } -; 1161 : #endif -; 1162 : -; 1163 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1164 : // nothing -; 1165 : #else -; 1166 : static stbi__uint32 stbi__get32be(stbi__context* s) -; 1167 : { -; 1168 : stbi__uint32 z = stbi__get16be(s); -; 1169 : return (z << 16) + stbi__get16be(s); -; 1170 : } -; 1171 : #endif -; 1172 : -; 1173 : #if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -; 1174 : // nothing -; 1175 : #else -; 1176 : static int stbi__get16le(stbi__context* s) -; 1177 : { -; 1178 : int z = stbi__get8(s); -; 1179 : return z + (stbi__get8(s) << 8); -; 1180 : } -; 1181 : #endif -; 1182 : -; 1183 : #ifndef STBI_NO_BMP -; 1184 : static stbi__uint32 stbi__get32le(stbi__context* s) -; 1185 : { -; 1186 : stbi__uint32 z = stbi__get16le(s); -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; -; 1188 : return z; -; 1189 : } -; 1190 : #endif -; 1191 : -; 1192 : #define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings -; 1193 : -; 1194 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1195 : // nothing -; 1196 : #else -; 1197 : ////////////////////////////////////////////////////////////////////////////// -; 1198 : // -; 1199 : // generic converter from built-in img_n to req_comp -; 1200 : // individual types do this automatically as much as possible (e.g. jpeg -; 1201 : // does all cases internally since it needs to colorspace convert anyway, -; 1202 : // and it never has alpha, so very few cases ). png can automatically -; 1203 : // interleave an alpha=255 channel, but falls back to this for other cases -; 1204 : // -; 1205 : // assume data buffer is malloced, so malloc a new one and free that one -; 1206 : // only failure mode is malloc failing -; 1207 : -; 1208 : static stbi_uc stbi__compute_y(int r, int g, int b) -; 1209 : { -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1211 : } -; 1212 : #endif -; 1213 : -; 1214 : #if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1215 : // nothing -; 1216 : #else -; 1217 : static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1218 : { -; 1219 : int i, j; -; 1220 : unsigned char* good; -; 1221 : -; 1222 : if (req_comp == img_n) return data; -; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1224 : -; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); -; 1226 : if (good == NULL) { -; 1227 : STBI_FREE(data); -; 1228 : return stbi__errpuc("outofmem", "Out of memory"); -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { -; 1232 : unsigned char* src = data + j * x * img_n; -; 1233 : unsigned char* dest = good + j * x * req_comp; -; 1234 : -; 1235 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1236 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1237 : // convert source image with img_n components to one with req_comp components; -; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1239 : switch (STBI__COMBO(img_n, req_comp)) { -; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; -; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; -; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1253 : } -; 1254 : #undef STBI__CASE -; 1255 : } -; 1256 : -; 1257 : STBI_FREE(data); -; 1258 : return good; -; 1259 : } -; 1260 : #endif -; 1261 : -; 1262 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1263 : // nothing -; 1264 : #else -; 1265 : static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -; 1266 : { -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1268 : } -; 1269 : #endif -; 1270 : -; 1271 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1272 : // nothing -; 1273 : #else -; 1274 : static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1275 : { -; 1276 : int i, j; -; 1277 : stbi__uint16* good; -; 1278 : -; 1279 : if (req_comp == img_n) return data; -; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1281 : -; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); -; 1283 : if (good == NULL) { -; 1284 : STBI_FREE(data); -; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { -; 1289 : stbi__uint16* src = data + j * x * img_n; -; 1290 : stbi__uint16* dest = good + j * x * req_comp; -; 1291 : -; 1292 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1293 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1294 : // convert source image with img_n components to one with req_comp components; -; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1296 : switch (STBI__COMBO(img_n, req_comp)) { -; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; -; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; -; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1310 : } -; 1311 : #undef STBI__CASE -; 1312 : } -; 1313 : -; 1314 : STBI_FREE(data); -; 1315 : return good; -; 1316 : } -; 1317 : #endif -; 1318 : -; 1319 : #ifndef STBI_NO_LINEAR -; 1320 : static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp) -; 1321 : { -; 1322 : int i, k, n; -; 1323 : float* output; -; 1324 : if (!data) return NULL; -; 1325 : output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0); -; 1326 : if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } -; 1327 : // compute number of non-alpha components -; 1328 : if (comp & 1) n = comp; else n = comp - 1; -; 1329 : for (i = 0; i < x * y; ++i) { -; 1330 : for (k = 0; k < n; ++k) { -; 1331 : output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale); -; 1332 : } -; 1333 : } -; 1334 : if (n < comp) { -; 1335 : for (i = 0; i < x * y; ++i) { -; 1336 : output[i * comp + n] = data[i * comp + n] / 255.0f; -; 1337 : } -; 1338 : } -; 1339 : STBI_FREE(data); -; 1340 : return output; -; 1341 : } -; 1342 : #endif -; 1343 : -; 1344 : #ifndef STBI_NO_HDR -; 1345 : #define stbi__float2int(x) ((int) (x)) -; 1346 : static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp) -; 1347 : { -; 1348 : int i, k, n; -; 1349 : stbi_uc* output; -; 1350 : if (!data) return NULL; -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } -; 1353 : // compute number of non-alpha components -; 1354 : if (comp & 1) n = comp; else n = comp - 1; -; 1355 : for (i = 0; i < x * y; ++i) { -; 1356 : for (k = 0; k < n; ++k) { -; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; -; 1358 : if (z < 0) z = 0; -; 1359 : if (z > 255) z = 255; -; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1361 : } -; 1362 : if (k < comp) { -; 1363 : float z = data[i * comp + k] * 255 + 0.5f; -; 1364 : if (z < 0) z = 0; -; 1365 : if (z > 255) z = 255; -; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1367 : } -; 1368 : } -; 1369 : STBI_FREE(data); -; 1370 : return output; -; 1371 : } -; 1372 : #endif -; 1373 : -; 1374 : ////////////////////////////////////////////////////////////////////////////// -; 1375 : // -; 1376 : // "baseline" JPEG/JFIF decoder -; 1377 : // -; 1378 : // simple implementation -; 1379 : // - doesn't support delayed output of y-dimension -; 1380 : // - simple interface (only one output format: 8-bit interleaved RGB) -; 1381 : // - doesn't try to recover corrupt jpegs -; 1382 : // - doesn't allow partial loading, loading multiple at once -; 1383 : // - still fast on x86 (copying globals into locals doesn't help x86) -; 1384 : // - allocates lots of intermediate memory (full size of all components) -; 1385 : // - non-interleaved case requires this anyway -; 1386 : // - allows good upsampling (see next) -; 1387 : // high-quality -; 1388 : // - upsampled channels are bilinearly interpolated, even across blocks -; 1389 : // - quality integer IDCT derived from IJG's 'slow' -; 1390 : // performance -; 1391 : // - fast huffman; reasonable integer IDCT -; 1392 : // - some SIMD kernels for common paths on targets with SSE2/NEON -; 1393 : // - uses a lot of intermediate memory, could cache poorly -; 1394 : -; 1395 : #ifndef STBI_NO_JPEG -; 1396 : -; 1397 : // huffman decoding acceleration -; 1398 : #define FAST_BITS 9 // larger handles more cases; smaller stomps less cache -; 1399 : -; 1400 : typedef struct -; 1401 : { -; 1402 : stbi_uc fast[1 << FAST_BITS]; -; 1403 : // weirdly, repacking this into AoS is a 10% speed loss, instead of a win -; 1404 : stbi__uint16 code[256]; -; 1405 : stbi_uc values[256]; -; 1406 : stbi_uc size[257]; -; 1407 : unsigned int maxcode[18]; -; 1408 : int delta[17]; // old 'firstsymbol' - old 'firstcode' -; 1409 : } stbi__huffman; -; 1410 : -; 1411 : typedef struct -; 1412 : { -; 1413 : stbi__context* s; -; 1414 : stbi__huffman huff_dc[4]; -; 1415 : stbi__huffman huff_ac[4]; -; 1416 : stbi__uint16 dequant[4][64]; -; 1417 : stbi__int16 fast_ac[4][1 << FAST_BITS]; -; 1418 : -; 1419 : // sizes for components, interleaved MCUs -; 1420 : int img_h_max, img_v_max; -; 1421 : int img_mcu_x, img_mcu_y; -; 1422 : int img_mcu_w, img_mcu_h; -; 1423 : -; 1424 : // definition of jpeg image component -; 1425 : struct -; 1426 : { -; 1427 : int id; -; 1428 : int h, v; -; 1429 : int tq; -; 1430 : int hd, ha; -; 1431 : int dc_pred; -; 1432 : -; 1433 : int x, y, w2, h2; -; 1434 : stbi_uc* data; -; 1435 : void* raw_data, * raw_coeff; -; 1436 : stbi_uc* linebuf; -; 1437 : short* coeff; // progressive only -; 1438 : int coeff_w, coeff_h; // number of 8x8 coefficient blocks -; 1439 : } img_comp[4]; -; 1440 : -; 1441 : stbi__uint32 code_buffer; // jpeg entropy-coded buffer -; 1442 : int code_bits; // number of valid bits -; 1443 : unsigned char marker; // marker seen while filling entropy buffer -; 1444 : int nomore; // flag if we saw a marker so must stop -; 1445 : -; 1446 : int progressive; -; 1447 : int spec_start; -; 1448 : int spec_end; -; 1449 : int succ_high; -; 1450 : int succ_low; -; 1451 : int eob_run; -; 1452 : int jfif; -; 1453 : int app14_color_transform; // Adobe APP14 tag -; 1454 : int rgb; -; 1455 : -; 1456 : int scan_n, order[4]; -; 1457 : int restart_interval, todo; -; 1458 : -; 1459 : // kernels -; 1460 : void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]); -; 1461 : void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); -; 1462 : stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); -; 1463 : } stbi__jpeg; -; 1464 : -; 1465 : static int stbi__build_huffman(stbi__huffman* h, int* count) -; 1466 : { -; 1467 : int i, j, k = 0; -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { -; 1471 : for (j = 0; j < count[i]; ++j) { -; 1472 : h->size[k++] = (stbi_uc)(i + 1); -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); -; 1474 : } -; 1475 : } -; 1476 : h->size[k] = 0; -; 1477 : -; 1478 : // compute actual symbols (from jpeg spec) -; 1479 : code = 0; -; 1480 : k = 0; -; 1481 : for (j = 1; j <= 16; ++j) { -; 1482 : // compute delta to add to code to compute symbol id -; 1483 : h->delta[j] = k - code; -; 1484 : if (h->size[k] == j) { -; 1485 : while (h->size[k] == j) -; 1486 : h->code[k++] = (stbi__uint16)(code++); -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); -; 1488 : } -; 1489 : // compute largest code + 1 for this size, preshifted as needed later -; 1490 : h->maxcode[j] = code << (16 - j); -; 1491 : code <<= 1; -; 1492 : } -; 1493 : h->maxcode[j] = 0xffffffff; -; 1494 : -; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated -; 1496 : memset(h->fast, 255, 1 << FAST_BITS); -; 1497 : for (i = 0; i < k; ++i) { -; 1498 : int s = h->size[i]; -; 1499 : if (s <= FAST_BITS) { -; 1500 : int c = h->code[i] << (FAST_BITS - s); -; 1501 : int m = 1 << (FAST_BITS - s); -; 1502 : for (j = 0; j < m; ++j) { -; 1503 : h->fast[c + j] = (stbi_uc)i; -; 1504 : } -; 1505 : } -; 1506 : } -; 1507 : return 1; -; 1508 : } -; 1509 : -; 1510 : // build a table that decodes both magnitude and value of small ACs in -; 1511 : // one go. -; 1512 : static void stbi__build_fast_ac(stbi__int16* fast_ac, stbi__huffman* h) -; 1513 : { -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { -; 1516 : stbi_uc fast = h->fast[i]; -; 1517 : fast_ac[i] = 0; -; 1518 : if (fast < 255) { -; 1519 : int rs = h->values[fast]; -; 1520 : int run = (rs >> 4) & 15; -; 1521 : int magbits = rs & 15; -; 1522 : int len = h->size[fast]; -; 1523 : -; 1524 : if (magbits && len + magbits <= FAST_BITS) { -; 1525 : // magnitude code followed by receive_extend code -; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); -; 1527 : int m = 1 << (magbits - 1); -; 1528 : if (k < m) k += (~0U << magbits) + 1; -; 1529 : // if the result is small enough, we can fit it in fast_ac table -; 1530 : if (k >= -128 && k <= 127) -; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); -; 1532 : } -; 1533 : } -; 1534 : } -; 1535 : } -; 1536 : -; 1537 : static void stbi__grow_buffer_unsafe(stbi__jpeg* j) -; 1538 : { -; 1539 : do { -; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); -; 1541 : if (b == 0xff) { -; 1542 : int c = stbi__get8(j->s); -; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes -; 1544 : if (c != 0) { -; 1545 : j->marker = (unsigned char)c; -; 1546 : j->nomore = 1; -; 1547 : return; -; 1548 : } -; 1549 : } -; 1550 : j->code_buffer |= b << (24 - j->code_bits); -; 1551 : j->code_bits += 8; -; 1552 : } while (j->code_bits <= 24); -; 1553 : } -; 1554 : -; 1555 : // (1 << n) - 1 -; 1556 : static const stbi__uint32 stbi__bmask[17] = { 0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535 }; -; 1557 : -; 1558 : // decode a jpeg huffman value from the bitstream -; 1559 : stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg* j, stbi__huffman* h) -; 1560 : { -; 1561 : unsigned int temp; -; 1562 : int c, k; -; 1563 : -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1569 : k = h->fast[c]; -; 1570 : if (k < 255) { -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; -; 1575 : j->code_bits -= s; -; 1576 : return h->values[k]; -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; -; 1586 : for (k = FAST_BITS + 1; ; ++k) -; 1587 : if (temp < h->maxcode[k]) -; 1588 : break; -; 1589 : if (k == 17) { -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; -; 1608 : } -; 1609 : -; 1610 : // bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) -; 1623 : k = stbi_lrot(j->code_buffer, n); -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); -; 1628 : } -; 1629 : -; 1630 : // get some unsigned bits -; 1631 : stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg* j, int n) -; 1632 : { -; 1633 : unsigned int k; -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1636 : k = stbi_lrot(j->code_buffer, n); -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; -; 1640 : return k; -; 1641 : } -; 1642 : -; 1643 : stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg* j) -; 1644 : { -; 1645 : unsigned int k; -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1648 : k = j->code_buffer; -; 1649 : j->code_buffer <<= 1; -; 1650 : --j->code_bits; -; 1651 : return k & 0x80000000; -; 1652 : } -; 1653 : -; 1654 : // given a value that's at position X in the zigzag stream, -; 1655 : // where does it appear in the 8x8 matrix coded as row-major? -; 1656 : static const stbi_uc stbi__jpeg_dezigzag[64 + 15] = -; 1657 : { -; 1658 : 0, 1, 8, 16, 9, 2, 3, 10, -; 1659 : 17, 24, 32, 25, 18, 11, 4, 5, -; 1660 : 12, 19, 26, 33, 40, 48, 41, 34, -; 1661 : 27, 20, 13, 6, 7, 14, 21, 28, -; 1662 : 35, 42, 49, 56, 57, 50, 43, 36, -; 1663 : 29, 22, 15, 23, 30, 37, 44, 51, -; 1664 : 58, 59, 52, 45, 38, 31, 39, 46, -; 1665 : 53, 60, 61, 54, 47, 55, 62, 63, -; 1666 : // let corrupt input sample past end -; 1667 : 63, 63, 63, 63, 63, 63, 63, 63, -; 1668 : 63, 63, 63, 63, 63, 63, 63 -; 1669 : }; -; 1670 : -; 1671 : // decode one 64-entry block-- -; 1672 : static int stbi__jpeg_decode_block(stbi__jpeg* j, short data[64], stbi__huffman* hdc, stbi__huffman* hac, stbi__int16* fac, int b, stbi__uint16* dequant) -; 1673 : { -; 1674 : int diff, dc, k; -; 1675 : int t; -; 1676 : -; 1677 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1678 : t = stbi__jpeg_huff_decode(j, hdc); -; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1680 : -; 1681 : // 0 all the ac values now so we can do it 32-bits at a time -; 1682 : memset(data, 0, 64 * sizeof(data[0])); -; 1683 : -; 1684 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1686 : dc = j->img_comp[b].dc_pred + diff; -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1689 : data[0] = (short)(dc * dequant[0]); -; 1690 : -; 1691 : // decode AC components, see JPEG spec -; 1692 : k = 1; -; 1693 : do { -; 1694 : unsigned int zig; -; 1695 : int c, r, s; -; 1696 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1697 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1698 : r = fac[c]; -; 1699 : if (r) { // fast-AC path -; 1700 : k += (r >> 4) & 15; // run -; 1701 : s = r & 15; // combined length -; 1702 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1703 : j->code_buffer <<= s; -; 1704 : j->code_bits -= s; -; 1705 : // decode into unzigzag'd location -; 1706 : zig = stbi__jpeg_dezigzag[k++]; -; 1707 : data[zig] = (short)((r >> 8) * dequant[zig]); -; 1708 : } -; 1709 : else { -; 1710 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1711 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1712 : s = rs & 15; -; 1713 : r = rs >> 4; -; 1714 : if (s == 0) { -; 1715 : if (rs != 0xf0) break; // end block -; 1716 : k += 16; -; 1717 : } -; 1718 : else { -; 1719 : k += r; -; 1720 : // decode into unzigzag'd location -; 1721 : zig = stbi__jpeg_dezigzag[k++]; -; 1722 : data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]); -; 1723 : } -; 1724 : } -; 1725 : } while (k < 64); -; 1726 : return 1; -; 1727 : } -; 1728 : -; 1729 : static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg* j, short data[64], stbi__huffman* hdc, int b) -; 1730 : { -; 1731 : int diff, dc; -; 1732 : int t; -; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1734 : -; 1735 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1736 : -; 1737 : if (j->succ_high == 0) { -; 1738 : // first scan for DC coefficient, must be first -; 1739 : memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now -; 1740 : t = stbi__jpeg_huff_decode(j, hdc); -; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1742 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1745 : dc = j->img_comp[b].dc_pred + diff; -; 1746 : j->img_comp[b].dc_pred = dc; -; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1748 : data[0] = (short)(dc * (1 << j->succ_low)); -; 1749 : } -; 1750 : else { -; 1751 : // refinement scan for DC coefficient -; 1752 : if (stbi__jpeg_get_bit(j)) -; 1753 : data[0] += (short)(1 << j->succ_low); -; 1754 : } -; 1755 : return 1; -; 1756 : } -; 1757 : -; 1758 : // @OPTIMIZE: store non-zigzagged during the decode passes, -; 1759 : // and only de-zigzag when dequantizing -; 1760 : static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg* j, short data[64], stbi__huffman* hac, stbi__int16* fac) -; 1761 : { -; 1762 : int k; -; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1764 : -; 1765 : if (j->succ_high == 0) { -; 1766 : int shift = j->succ_low; -; 1767 : -; 1768 : if (j->eob_run) { -; 1769 : --j->eob_run; -; 1770 : return 1; -; 1771 : } -; 1772 : -; 1773 : k = j->spec_start; -; 1774 : do { -; 1775 : unsigned int zig; -; 1776 : int c, r, s; -; 1777 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1778 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1779 : r = fac[c]; -; 1780 : if (r) { // fast-AC path -; 1781 : k += (r >> 4) & 15; // run -; 1782 : s = r & 15; // combined length -; 1783 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1784 : j->code_buffer <<= s; -; 1785 : j->code_bits -= s; -; 1786 : zig = stbi__jpeg_dezigzag[k++]; -; 1787 : data[zig] = (short)((r >> 8) * (1 << shift)); -; 1788 : } -; 1789 : else { -; 1790 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1791 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1792 : s = rs & 15; -; 1793 : r = rs >> 4; -; 1794 : if (s == 0) { -; 1795 : if (r < 15) { -; 1796 : j->eob_run = (1 << r); -; 1797 : if (r) -; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1799 : --j->eob_run; -; 1800 : break; -; 1801 : } -; 1802 : k += 16; -; 1803 : } -; 1804 : else { -; 1805 : k += r; -; 1806 : zig = stbi__jpeg_dezigzag[k++]; -; 1807 : data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift)); -; 1808 : } -; 1809 : } -; 1810 : } while (k <= j->spec_end); -; 1811 : } -; 1812 : else { -; 1813 : // refinement scan for these AC coefficients -; 1814 : -; 1815 : short bit = (short)(1 << j->succ_low); -; 1816 : -; 1817 : if (j->eob_run) { -; 1818 : --j->eob_run; -; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { -; 1820 : short* p = &data[stbi__jpeg_dezigzag[k]]; -; 1821 : if (*p != 0) -; 1822 : if (stbi__jpeg_get_bit(j)) -; 1823 : if ((*p & bit) == 0) { -; 1824 : if (*p > 0) -; 1825 : *p += bit; -; 1826 : else -; 1827 : *p -= bit; -; 1828 : } -; 1829 : } -; 1830 : } -; 1831 : else { -; 1832 : k = j->spec_start; -; 1833 : do { -; 1834 : int r, s; -; 1835 : int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh -; 1836 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1837 : s = rs & 15; -; 1838 : r = rs >> 4; -; 1839 : if (s == 0) { -; 1840 : if (r < 15) { -; 1841 : j->eob_run = (1 << r) - 1; -; 1842 : if (r) -; 1843 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1844 : r = 64; // force end of block -; 1845 : } -; 1846 : else { -; 1847 : // r=15 s=0 should write 16 0s, so we just do -; 1848 : // a run of 15 0s and then write s (which is 0), -; 1849 : // so we don't have to do anything special here -; 1850 : } -; 1851 : } -; 1852 : else { -; 1853 : if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1854 : // sign bit -; 1855 : if (stbi__jpeg_get_bit(j)) -; 1856 : s = bit; -; 1857 : else -; 1858 : s = -bit; -; 1859 : } -; 1860 : -; 1861 : // advance by r -; 1862 : while (k <= j->spec_end) { -; 1863 : short* p = &data[stbi__jpeg_dezigzag[k++]]; -; 1864 : if (*p != 0) { -; 1865 : if (stbi__jpeg_get_bit(j)) -; 1866 : if ((*p & bit) == 0) { -; 1867 : if (*p > 0) -; 1868 : *p += bit; -; 1869 : else -; 1870 : *p -= bit; -; 1871 : } -; 1872 : } -; 1873 : else { -; 1874 : if (r == 0) { -; 1875 : *p = (short)s; -; 1876 : break; -; 1877 : } -; 1878 : --r; -; 1879 : } -; 1880 : } -; 1881 : } while (k <= j->spec_end); -; 1882 : } -; 1883 : } -; 1884 : return 1; -; 1885 : } -; 1886 : -; 1887 : // take a -128..127 value and stbi__clamp it and convert to 0..255 -; 1888 : stbi_inline static stbi_uc stbi__clamp(int x) -; 1889 : { -; 1890 : // trick to use a single test to catch both cases -; 1891 : if ((unsigned int)x > 255) { -; 1892 : if (x < 0) return 0; -; 1893 : if (x > 255) return 255; -; 1894 : } -; 1895 : return (stbi_uc)x; -; 1896 : } -; 1897 : -; 1898 : #define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -; 1899 : #define stbi__fsh(x) ((x) * 4096) -; 1900 : -; 1901 : // derived from jidctint -- DCT_ISLOW -; 1902 : #define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ -; 1903 : int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ -; 1904 : p2 = s2; \ -; 1905 : p3 = s6; \ -; 1906 : p1 = (p2+p3) * stbi__f2f(0.5411961f); \ -; 1907 : t2 = p1 + p3*stbi__f2f(-1.847759065f); \ -; 1908 : t3 = p1 + p2*stbi__f2f( 0.765366865f); \ -; 1909 : p2 = s0; \ -; 1910 : p3 = s4; \ -; 1911 : t0 = stbi__fsh(p2+p3); \ -; 1912 : t1 = stbi__fsh(p2-p3); \ -; 1913 : x0 = t0+t3; \ -; 1914 : x3 = t0-t3; \ -; 1915 : x1 = t1+t2; \ -; 1916 : x2 = t1-t2; \ -; 1917 : t0 = s7; \ -; 1918 : t1 = s5; \ -; 1919 : t2 = s3; \ -; 1920 : t3 = s1; \ -; 1921 : p3 = t0+t2; \ -; 1922 : p4 = t1+t3; \ -; 1923 : p1 = t0+t3; \ -; 1924 : p2 = t1+t2; \ -; 1925 : p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ -; 1926 : t0 = t0*stbi__f2f( 0.298631336f); \ -; 1927 : t1 = t1*stbi__f2f( 2.053119869f); \ -; 1928 : t2 = t2*stbi__f2f( 3.072711026f); \ -; 1929 : t3 = t3*stbi__f2f( 1.501321110f); \ -; 1930 : p1 = p5 + p1*stbi__f2f(-0.899976223f); \ -; 1931 : p2 = p5 + p2*stbi__f2f(-2.562915447f); \ -; 1932 : p3 = p3*stbi__f2f(-1.961570560f); \ -; 1933 : p4 = p4*stbi__f2f(-0.390180644f); \ -; 1934 : t3 += p1+p4; \ -; 1935 : t2 += p2+p3; \ -; 1936 : t1 += p2+p4; \ -; 1937 : t0 += p1+p3; -; 1938 : -; 1939 : static void stbi__idct_block(stbi_uc* out, int out_stride, short data[64]) -; 1940 : { -; 1941 : int i, val[64], * v = val; -; 1942 : stbi_uc* o; -; 1943 : short* d = data; -; 1944 : -; 1945 : // columns -; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { -; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing -; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 -; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { -; 1950 : // no shortcut 0 seconds -; 1951 : // (1|2|3|4|5|6|7)==0 0 seconds -; 1952 : // all separate -0.047 seconds -; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds -; 1954 : int dcterm = d[0] * 4; -; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; -; 1956 : } -; 1957 : else { -; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) -; 1959 : // constants scaled things up by 1<<12; let's bring them back -; 1960 : // down, but keep 2 extra bits of precision -; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; -; 1962 : v[0] = (x0 + t3) >> 10; -; 1963 : v[56] = (x0 - t3) >> 10; -; 1964 : v[8] = (x1 + t2) >> 10; -; 1965 : v[48] = (x1 - t2) >> 10; -; 1966 : v[16] = (x2 + t1) >> 10; -; 1967 : v[40] = (x2 - t1) >> 10; -; 1968 : v[24] = (x3 + t0) >> 10; -; 1969 : v[32] = (x3 - t0) >> 10; -; 1970 : } -; 1971 : } -; 1972 : -; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { -; 1974 : // no fast case since the first 1D IDCT spread components out -; 1975 : STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]) -; 1976 : // constants scaled things up by 1<<12, plus we had 1<<2 from first -; 1977 : // loop, plus horizontal and vertical each scale by sqrt(8) so together -; 1978 : // we've got an extra 1<<3, so 1<<17 total we need to remove. -; 1979 : // so we want to round that, which means adding 0.5 * 1<<17, -; 1980 : // aka 65536. Also, we'll end up with -128 to 127 that we want -; 1981 : // to encode as 0..255 by adding 128, so we'll add that before the shift -; 1982 : x0 += 65536 + (128 << 17); -; 1983 : x1 += 65536 + (128 << 17); -; 1984 : x2 += 65536 + (128 << 17); -; 1985 : x3 += 65536 + (128 << 17); -; 1986 : // tried computing the shifts into temps, or'ing the temps to see -; 1987 : // if any were out of range, but that was slower -; 1988 : o[0] = stbi__clamp((x0 + t3) >> 17); -; 1989 : o[7] = stbi__clamp((x0 - t3) >> 17); -; 1990 : o[1] = stbi__clamp((x1 + t2) >> 17); -; 1991 : o[6] = stbi__clamp((x1 - t2) >> 17); -; 1992 : o[2] = stbi__clamp((x2 + t1) >> 17); -; 1993 : o[5] = stbi__clamp((x2 - t1) >> 17); -; 1994 : o[3] = stbi__clamp((x3 + t0) >> 17); -; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); -; 1996 : } -; 1997 : } -; 1998 : -; 1999 : #ifdef STBI_SSE2 -; 2000 : // sse2 integer IDCT. not the fastest possible implementation but it -; 2001 : // produces bit-identical results to the generic C version so it's -; 2002 : // fully "transparent". -; 2003 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2004 : { -; 2005 : // This is constructed to match our regular (generic) integer IDCT exactly. -; 2006 : __m128i row0, row1, row2, row3, row4, row5, row6, row7; -; 2007 : __m128i tmp; -; 2008 : -; 2009 : // dot product constant: even elems=x, odd elems=y -; 2010 : #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) -; 2011 : -; 2012 : // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) -; 2013 : // out(1) = c1[even]*x + c1[odd]*y -; 2014 : #define dct_rot(out0,out1, x,y,c0,c1) \ -; 2015 : __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ -; 2016 : __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ -; 2017 : __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ -; 2018 : __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ -; 2019 : __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ -; 2020 : __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) -; 2021 : -; 2022 : // out = in << 12 (in 16-bit, out 32-bit) -; 2023 : #define dct_widen(out, in) \ -; 2024 : __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ -; 2025 : __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) -; 2026 : -; 2027 : // wide add -; 2028 : #define dct_wadd(out, a, b) \ -; 2029 : __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ -; 2030 : __m128i out##_h = _mm_add_epi32(a##_h, b##_h) -; 2031 : -; 2032 : // wide sub -; 2033 : #define dct_wsub(out, a, b) \ -; 2034 : __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ -; 2035 : __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) -; 2036 : -; 2037 : // butterfly a/b, add bias, then shift by "s" and pack -; 2038 : #define dct_bfly32o(out0, out1, a,b,bias,s) \ -; 2039 : { \ -; 2040 : __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ -; 2041 : __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ -; 2042 : dct_wadd(sum, abiased, b); \ -; 2043 : dct_wsub(dif, abiased, b); \ -; 2044 : out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ -; 2045 : out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ -; 2046 : } -; 2047 : -; 2048 : // 8-bit interleave step (for transposes) -; 2049 : #define dct_interleave8(a, b) \ -; 2050 : tmp = a; \ -; 2051 : a = _mm_unpacklo_epi8(a, b); \ -; 2052 : b = _mm_unpackhi_epi8(tmp, b) -; 2053 : -; 2054 : // 16-bit interleave step (for transposes) -; 2055 : #define dct_interleave16(a, b) \ -; 2056 : tmp = a; \ -; 2057 : a = _mm_unpacklo_epi16(a, b); \ -; 2058 : b = _mm_unpackhi_epi16(tmp, b) -; 2059 : -; 2060 : #define dct_pass(bias,shift) \ -; 2061 : { \ -; 2062 : /* even part */ \ -; 2063 : dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ -; 2064 : __m128i sum04 = _mm_add_epi16(row0, row4); \ -; 2065 : __m128i dif04 = _mm_sub_epi16(row0, row4); \ -; 2066 : dct_widen(t0e, sum04); \ -; 2067 : dct_widen(t1e, dif04); \ -; 2068 : dct_wadd(x0, t0e, t3e); \ -; 2069 : dct_wsub(x3, t0e, t3e); \ -; 2070 : dct_wadd(x1, t1e, t2e); \ -; 2071 : dct_wsub(x2, t1e, t2e); \ -; 2072 : /* odd part */ \ -; 2073 : dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ -; 2074 : dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ -; 2075 : __m128i sum17 = _mm_add_epi16(row1, row7); \ -; 2076 : __m128i sum35 = _mm_add_epi16(row3, row5); \ -; 2077 : dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ -; 2078 : dct_wadd(x4, y0o, y4o); \ -; 2079 : dct_wadd(x5, y1o, y5o); \ -; 2080 : dct_wadd(x6, y2o, y5o); \ -; 2081 : dct_wadd(x7, y3o, y4o); \ -; 2082 : dct_bfly32o(row0,row7, x0,x7,bias,shift); \ -; 2083 : dct_bfly32o(row1,row6, x1,x6,bias,shift); \ -; 2084 : dct_bfly32o(row2,row5, x2,x5,bias,shift); \ -; 2085 : dct_bfly32o(row3,row4, x3,x4,bias,shift); \ -; 2086 : } -; 2087 : -; 2088 : __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); -; 2089 : __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f)); -; 2090 : __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); -; 2091 : __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); -; 2092 : __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f)); -; 2093 : __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f)); -; 2094 : __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f)); -; 2095 : __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f)); -; 2096 : -; 2097 : // rounding biases in column/row passes, see stbi__idct_block for explanation. -; 2098 : __m128i bias_0 = _mm_set1_epi32(512); -; 2099 : __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17)); -; 2100 : -; 2101 : // load -; 2102 : row0 = _mm_load_si128((const __m128i*) (data + 0 * 8)); -; 2103 : row1 = _mm_load_si128((const __m128i*) (data + 1 * 8)); -; 2104 : row2 = _mm_load_si128((const __m128i*) (data + 2 * 8)); -; 2105 : row3 = _mm_load_si128((const __m128i*) (data + 3 * 8)); -; 2106 : row4 = _mm_load_si128((const __m128i*) (data + 4 * 8)); -; 2107 : row5 = _mm_load_si128((const __m128i*) (data + 5 * 8)); -; 2108 : row6 = _mm_load_si128((const __m128i*) (data + 6 * 8)); -; 2109 : row7 = _mm_load_si128((const __m128i*) (data + 7 * 8)); -; 2110 : -; 2111 : // column pass -; 2112 : dct_pass(bias_0, 10); -; 2113 : -; 2114 : { -; 2115 : // 16bit 8x8 transpose pass 1 -; 2116 : dct_interleave16(row0, row4); -; 2117 : dct_interleave16(row1, row5); -; 2118 : dct_interleave16(row2, row6); -; 2119 : dct_interleave16(row3, row7); -; 2120 : -; 2121 : // transpose pass 2 -; 2122 : dct_interleave16(row0, row2); -; 2123 : dct_interleave16(row1, row3); -; 2124 : dct_interleave16(row4, row6); -; 2125 : dct_interleave16(row5, row7); -; 2126 : -; 2127 : // transpose pass 3 -; 2128 : dct_interleave16(row0, row1); -; 2129 : dct_interleave16(row2, row3); -; 2130 : dct_interleave16(row4, row5); -; 2131 : dct_interleave16(row6, row7); -; 2132 : } -; 2133 : -; 2134 : // row pass -; 2135 : dct_pass(bias_1, 17); -; 2136 : -; 2137 : { -; 2138 : // pack -; 2139 : __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 -; 2140 : __m128i p1 = _mm_packus_epi16(row2, row3); -; 2141 : __m128i p2 = _mm_packus_epi16(row4, row5); -; 2142 : __m128i p3 = _mm_packus_epi16(row6, row7); -; 2143 : -; 2144 : // 8bit 8x8 transpose pass 1 -; 2145 : dct_interleave8(p0, p2); // a0e0a1e1... -; 2146 : dct_interleave8(p1, p3); // c0g0c1g1... -; 2147 : -; 2148 : // transpose pass 2 -; 2149 : dct_interleave8(p0, p1); // a0c0e0g0... -; 2150 : dct_interleave8(p2, p3); // b0d0f0h0... -; 2151 : -; 2152 : // transpose pass 3 -; 2153 : dct_interleave8(p0, p2); // a0b0c0d0... -; 2154 : dct_interleave8(p1, p3); // a4b4c4d4... -; 2155 : -; 2156 : // store -; 2157 : _mm_storel_epi64((__m128i*) out, p0); out += out_stride; -; 2158 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; -; 2159 : _mm_storel_epi64((__m128i*) out, p2); out += out_stride; -; 2160 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; -; 2161 : _mm_storel_epi64((__m128i*) out, p1); out += out_stride; -; 2162 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; -; 2163 : _mm_storel_epi64((__m128i*) out, p3); out += out_stride; -; 2164 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e)); -; 2165 : } -; 2166 : -; 2167 : #undef dct_const -; 2168 : #undef dct_rot -; 2169 : #undef dct_widen -; 2170 : #undef dct_wadd -; 2171 : #undef dct_wsub -; 2172 : #undef dct_bfly32o -; 2173 : #undef dct_interleave8 -; 2174 : #undef dct_interleave16 -; 2175 : #undef dct_pass -; 2176 : } -; 2177 : -; 2178 : #endif // STBI_SSE2 -; 2179 : -; 2180 : #ifdef STBI_NEON -; 2181 : -; 2182 : // NEON integer IDCT. should produce bit-identical -; 2183 : // results to the generic C version. -; 2184 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2185 : { -; 2186 : int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; -; 2187 : -; 2188 : int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); -; 2189 : int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); -; 2190 : int16x4_t rot0_2 = vdup_n_s16(stbi__f2f(0.765366865f)); -; 2191 : int16x4_t rot1_0 = vdup_n_s16(stbi__f2f(1.175875602f)); -; 2192 : int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); -; 2193 : int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); -; 2194 : int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); -; 2195 : int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); -; 2196 : int16x4_t rot3_0 = vdup_n_s16(stbi__f2f(0.298631336f)); -; 2197 : int16x4_t rot3_1 = vdup_n_s16(stbi__f2f(2.053119869f)); -; 2198 : int16x4_t rot3_2 = vdup_n_s16(stbi__f2f(3.072711026f)); -; 2199 : int16x4_t rot3_3 = vdup_n_s16(stbi__f2f(1.501321110f)); -; 2200 : -; 2201 : #define dct_long_mul(out, inq, coeff) \ -; 2202 : int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ -; 2203 : int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) -; 2204 : -; 2205 : #define dct_long_mac(out, acc, inq, coeff) \ -; 2206 : int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ -; 2207 : int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) -; 2208 : -; 2209 : #define dct_widen(out, inq) \ -; 2210 : int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ -; 2211 : int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) -; 2212 : -; 2213 : // wide add -; 2214 : #define dct_wadd(out, a, b) \ -; 2215 : int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ -; 2216 : int32x4_t out##_h = vaddq_s32(a##_h, b##_h) -; 2217 : -; 2218 : // wide sub -; 2219 : #define dct_wsub(out, a, b) \ -; 2220 : int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ -; 2221 : int32x4_t out##_h = vsubq_s32(a##_h, b##_h) -; 2222 : -; 2223 : // butterfly a/b, then shift using "shiftop" by "s" and pack -; 2224 : #define dct_bfly32o(out0,out1, a,b,shiftop,s) \ -; 2225 : { \ -; 2226 : dct_wadd(sum, a, b); \ -; 2227 : dct_wsub(dif, a, b); \ -; 2228 : out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ -; 2229 : out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ -; 2230 : } -; 2231 : -; 2232 : #define dct_pass(shiftop, shift) \ -; 2233 : { \ -; 2234 : /* even part */ \ -; 2235 : int16x8_t sum26 = vaddq_s16(row2, row6); \ -; 2236 : dct_long_mul(p1e, sum26, rot0_0); \ -; 2237 : dct_long_mac(t2e, p1e, row6, rot0_1); \ -; 2238 : dct_long_mac(t3e, p1e, row2, rot0_2); \ -; 2239 : int16x8_t sum04 = vaddq_s16(row0, row4); \ -; 2240 : int16x8_t dif04 = vsubq_s16(row0, row4); \ -; 2241 : dct_widen(t0e, sum04); \ -; 2242 : dct_widen(t1e, dif04); \ -; 2243 : dct_wadd(x0, t0e, t3e); \ -; 2244 : dct_wsub(x3, t0e, t3e); \ -; 2245 : dct_wadd(x1, t1e, t2e); \ -; 2246 : dct_wsub(x2, t1e, t2e); \ -; 2247 : /* odd part */ \ -; 2248 : int16x8_t sum15 = vaddq_s16(row1, row5); \ -; 2249 : int16x8_t sum17 = vaddq_s16(row1, row7); \ -; 2250 : int16x8_t sum35 = vaddq_s16(row3, row5); \ -; 2251 : int16x8_t sum37 = vaddq_s16(row3, row7); \ -; 2252 : int16x8_t sumodd = vaddq_s16(sum17, sum35); \ -; 2253 : dct_long_mul(p5o, sumodd, rot1_0); \ -; 2254 : dct_long_mac(p1o, p5o, sum17, rot1_1); \ -; 2255 : dct_long_mac(p2o, p5o, sum35, rot1_2); \ -; 2256 : dct_long_mul(p3o, sum37, rot2_0); \ -; 2257 : dct_long_mul(p4o, sum15, rot2_1); \ -; 2258 : dct_wadd(sump13o, p1o, p3o); \ -; 2259 : dct_wadd(sump24o, p2o, p4o); \ -; 2260 : dct_wadd(sump23o, p2o, p3o); \ -; 2261 : dct_wadd(sump14o, p1o, p4o); \ -; 2262 : dct_long_mac(x4, sump13o, row7, rot3_0); \ -; 2263 : dct_long_mac(x5, sump24o, row5, rot3_1); \ -; 2264 : dct_long_mac(x6, sump23o, row3, rot3_2); \ -; 2265 : dct_long_mac(x7, sump14o, row1, rot3_3); \ -; 2266 : dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ -; 2267 : dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ -; 2268 : dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ -; 2269 : dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ -; 2270 : } -; 2271 : -; 2272 : // load -; 2273 : row0 = vld1q_s16(data + 0 * 8); -; 2274 : row1 = vld1q_s16(data + 1 * 8); -; 2275 : row2 = vld1q_s16(data + 2 * 8); -; 2276 : row3 = vld1q_s16(data + 3 * 8); -; 2277 : row4 = vld1q_s16(data + 4 * 8); -; 2278 : row5 = vld1q_s16(data + 5 * 8); -; 2279 : row6 = vld1q_s16(data + 6 * 8); -; 2280 : row7 = vld1q_s16(data + 7 * 8); -; 2281 : -; 2282 : // add DC bias -; 2283 : row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); -; 2284 : -; 2285 : // column pass -; 2286 : dct_pass(vrshrn_n_s32, 10); -; 2287 : -; 2288 : // 16bit 8x8 transpose -; 2289 : { -; 2290 : // these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -; 2291 : // whether compilers actually get this is another story, sadly. -; 2292 : #define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -; 2293 : #define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -; 2294 : #define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } -; 2295 : -; 2296 : // pass 1 -; 2297 : dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 -; 2298 : dct_trn16(row2, row3); -; 2299 : dct_trn16(row4, row5); -; 2300 : dct_trn16(row6, row7); -; 2301 : -; 2302 : // pass 2 -; 2303 : dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 -; 2304 : dct_trn32(row1, row3); -; 2305 : dct_trn32(row4, row6); -; 2306 : dct_trn32(row5, row7); -; 2307 : -; 2308 : // pass 3 -; 2309 : dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 -; 2310 : dct_trn64(row1, row5); -; 2311 : dct_trn64(row2, row6); -; 2312 : dct_trn64(row3, row7); -; 2313 : -; 2314 : #undef dct_trn16 -; 2315 : #undef dct_trn32 -; 2316 : #undef dct_trn64 -; 2317 : } -; 2318 : -; 2319 : // row pass -; 2320 : // vrshrn_n_s32 only supports shifts up to 16, we need -; 2321 : // 17. so do a non-rounding shift of 16 first then follow -; 2322 : // up with a rounding shift by 1. -; 2323 : dct_pass(vshrn_n_s32, 16); -; 2324 : -; 2325 : { -; 2326 : // pack and round -; 2327 : uint8x8_t p0 = vqrshrun_n_s16(row0, 1); -; 2328 : uint8x8_t p1 = vqrshrun_n_s16(row1, 1); -; 2329 : uint8x8_t p2 = vqrshrun_n_s16(row2, 1); -; 2330 : uint8x8_t p3 = vqrshrun_n_s16(row3, 1); -; 2331 : uint8x8_t p4 = vqrshrun_n_s16(row4, 1); -; 2332 : uint8x8_t p5 = vqrshrun_n_s16(row5, 1); -; 2333 : uint8x8_t p6 = vqrshrun_n_s16(row6, 1); -; 2334 : uint8x8_t p7 = vqrshrun_n_s16(row7, 1); -; 2335 : -; 2336 : // again, these can translate into one instruction, but often don't. -; 2337 : #define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -; 2338 : #define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -; 2339 : #define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } -; 2340 : -; 2341 : // sadly can't use interleaved stores here since we only write -; 2342 : // 8 bytes to each scan line! -; 2343 : -; 2344 : // 8x8 8-bit transpose pass 1 -; 2345 : dct_trn8_8(p0, p1); -; 2346 : dct_trn8_8(p2, p3); -; 2347 : dct_trn8_8(p4, p5); -; 2348 : dct_trn8_8(p6, p7); -; 2349 : -; 2350 : // pass 2 -; 2351 : dct_trn8_16(p0, p2); -; 2352 : dct_trn8_16(p1, p3); -; 2353 : dct_trn8_16(p4, p6); -; 2354 : dct_trn8_16(p5, p7); -; 2355 : -; 2356 : // pass 3 -; 2357 : dct_trn8_32(p0, p4); -; 2358 : dct_trn8_32(p1, p5); -; 2359 : dct_trn8_32(p2, p6); -; 2360 : dct_trn8_32(p3, p7); -; 2361 : -; 2362 : // store -; 2363 : vst1_u8(out, p0); out += out_stride; -; 2364 : vst1_u8(out, p1); out += out_stride; -; 2365 : vst1_u8(out, p2); out += out_stride; -; 2366 : vst1_u8(out, p3); out += out_stride; -; 2367 : vst1_u8(out, p4); out += out_stride; -; 2368 : vst1_u8(out, p5); out += out_stride; -; 2369 : vst1_u8(out, p6); out += out_stride; -; 2370 : vst1_u8(out, p7); -; 2371 : -; 2372 : #undef dct_trn8_8 -; 2373 : #undef dct_trn8_16 -; 2374 : #undef dct_trn8_32 -; 2375 : } -; 2376 : -; 2377 : #undef dct_long_mul -; 2378 : #undef dct_long_mac -; 2379 : #undef dct_widen -; 2380 : #undef dct_wadd -; 2381 : #undef dct_wsub -; 2382 : #undef dct_bfly32o -; 2383 : #undef dct_pass -; 2384 : } -; 2385 : -; 2386 : #endif // STBI_NEON -; 2387 : -; 2388 : #define STBI__MARKER_none 0xff -; 2389 : // if there's a pending marker from the entropy stream, return that -; 2390 : // otherwise, fetch from the stream and get a marker. if there's no -; 2391 : // marker, return 0xff, which is never a valid marker value -; 2392 : static stbi_uc stbi__get_marker(stbi__jpeg* j) -; 2393 : { -; 2394 : stbi_uc x; -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } -; 2396 : x = stbi__get8(j->s); -; 2397 : if (x != 0xff) return STBI__MARKER_none; -; 2398 : while (x == 0xff) -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes -; 2400 : return x; -; 2401 : } -; 2402 : -; 2403 : // in each scan, we'll have scan_n components, and the order -; 2404 : // of the components is specified by order[] -; 2405 : #define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) -; 2406 : -; 2407 : // after a restart interval, stbi__jpeg_reset the entropy decoder and -; 2408 : // the dc prediction -; 2409 : static void stbi__jpeg_reset(stbi__jpeg* j) -; 2410 : { -; 2411 : j->code_bits = 0; -; 2412 : j->code_buffer = 0; -; 2413 : j->nomore = 0; -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; -; 2417 : j->eob_run = 0; -; 2418 : // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, -; 2419 : // since we don't even allow 1<<30 pixels -; 2420 : } -; 2421 : -; 2422 : static int stbi__parse_entropy_coded_data(stbi__jpeg* z) -; 2423 : { -; 2424 : stbi__jpeg_reset(z); -; 2425 : if (!z->progressive) { -; 2426 : if (z->scan_n == 1) { -; 2427 : int i, j; -; 2428 : STBI_SIMD_ALIGN(short, data[64]); -; 2429 : int n = z->order[0]; -; 2430 : // non-interleaved data, we just need to process one block at a time, -; 2431 : // in trivial scanline order -; 2432 : // number of blocks to do just depends on how many actual "pixels" this -; 2433 : // component has, independent of interleaved MCU blocking and such -; 2434 : int w = (z->img_comp[n].x + 7) >> 3; -; 2435 : int h = (z->img_comp[n].y + 7) >> 3; -; 2436 : for (j = 0; j < h; ++j) { -; 2437 : for (i = 0; i < w; ++i) { -; 2438 : int ha = z->img_comp[n].ha; -; 2439 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2440 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2441 : // every data block is an MCU, so countdown the restart interval -; 2442 : if (--z->todo <= 0) { -; 2443 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2444 : // if it's NOT a restart, then just bail, so we get corrupt data -; 2445 : // rather than no data -; 2446 : if (!STBI__RESTART(z->marker)) return 1; -; 2447 : stbi__jpeg_reset(z); -; 2448 : } -; 2449 : } -; 2450 : } -; 2451 : return 1; -; 2452 : } -; 2453 : else { // interleaved -; 2454 : int i, j, k, x, y; -; 2455 : STBI_SIMD_ALIGN(short, data[64]); -; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2458 : // scan an interleaved mcu... process scan_n components in order -; 2459 : for (k = 0; k < z->scan_n; ++k) { -; 2460 : int n = z->order[k]; -; 2461 : // scan out an mcu's worth of this component; that's just determined -; 2462 : // by the basic H and V specified for the component -; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2464 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2465 : int x2 = (i * z->img_comp[n].h + x) * 8; -; 2466 : int y2 = (j * z->img_comp[n].v + y) * 8; -; 2467 : int ha = z->img_comp[n].ha; -; 2468 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2469 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); -; 2470 : } -; 2471 : } -; 2472 : } -; 2473 : // after all interleaved components, that's an interleaved MCU, -; 2474 : // so now count down the restart interval -; 2475 : if (--z->todo <= 0) { -; 2476 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2477 : if (!STBI__RESTART(z->marker)) return 1; -; 2478 : stbi__jpeg_reset(z); -; 2479 : } -; 2480 : } -; 2481 : } -; 2482 : return 1; -; 2483 : } -; 2484 : } -; 2485 : else { -; 2486 : if (z->scan_n == 1) { -; 2487 : int i, j; -; 2488 : int n = z->order[0]; -; 2489 : // non-interleaved data, we just need to process one block at a time, -; 2490 : // in trivial scanline order -; 2491 : // number of blocks to do just depends on how many actual "pixels" this -; 2492 : // component has, independent of interleaved MCU blocking and such -; 2493 : int w = (z->img_comp[n].x + 7) >> 3; -; 2494 : int h = (z->img_comp[n].y + 7) >> 3; -; 2495 : for (j = 0; j < h; ++j) { -; 2496 : for (i = 0; i < w; ++i) { -; 2497 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2498 : if (z->spec_start == 0) { -; 2499 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2500 : return 0; -; 2501 : } -; 2502 : else { -; 2503 : int ha = z->img_comp[n].ha; -; 2504 : if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) -; 2505 : return 0; -; 2506 : } -; 2507 : // every data block is an MCU, so countdown the restart interval -; 2508 : if (--z->todo <= 0) { -; 2509 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2510 : if (!STBI__RESTART(z->marker)) return 1; -; 2511 : stbi__jpeg_reset(z); -; 2512 : } -; 2513 : } -; 2514 : } -; 2515 : return 1; -; 2516 : } -; 2517 : else { // interleaved -; 2518 : int i, j, k, x, y; -; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2521 : // scan an interleaved mcu... process scan_n components in order -; 2522 : for (k = 0; k < z->scan_n; ++k) { -; 2523 : int n = z->order[k]; -; 2524 : // scan out an mcu's worth of this component; that's just determined -; 2525 : // by the basic H and V specified for the component -; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2528 : int x2 = (i * z->img_comp[n].h + x); -; 2529 : int y2 = (j * z->img_comp[n].v + y); -; 2530 : short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); -; 2531 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2532 : return 0; -; 2533 : } -; 2534 : } -; 2535 : } -; 2536 : // after all interleaved components, that's an interleaved MCU, -; 2537 : // so now count down the restart interval -; 2538 : if (--z->todo <= 0) { -; 2539 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2540 : if (!STBI__RESTART(z->marker)) return 1; -; 2541 : stbi__jpeg_reset(z); -; 2542 : } -; 2543 : } -; 2544 : } -; 2545 : return 1; -; 2546 : } -; 2547 : } -; 2548 : } -; 2549 : -; 2550 : static void stbi__jpeg_dequantize(short* data, stbi__uint16* dequant) -; 2551 : { -; 2552 : int i; -; 2553 : for (i = 0; i < 64; ++i) -; 2554 : data[i] *= dequant[i]; -; 2555 : } -; 2556 : -; 2557 : static void stbi__jpeg_finish(stbi__jpeg* z) -; 2558 : { -; 2559 : if (z->progressive) { -; 2560 : // dequantize and idct the data -; 2561 : int i, j, n; -; 2562 : for (n = 0; n < z->s->img_n; ++n) { -; 2563 : int w = (z->img_comp[n].x + 7) >> 3; -; 2564 : int h = (z->img_comp[n].y + 7) >> 3; -; 2565 : for (j = 0; j < h; ++j) { -; 2566 : for (i = 0; i < w; ++i) { -; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2568 : stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); -; 2569 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2570 : } -; 2571 : } -; 2572 : } -; 2573 : } -; 2574 : } -; 2575 : -; 2576 : static int stbi__process_marker(stbi__jpeg* z, int m) -; 2577 : { -; 2578 : int L; -; 2579 : switch (m) { -; 2580 : case STBI__MARKER_none: // no marker found -; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); -; 2582 : -; 2583 : case 0xDD: // DRI - specify restart interval -; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); -; 2585 : z->restart_interval = stbi__get16be(z->s); -; 2586 : return 1; -; 2587 : -; 2588 : case 0xDB: // DQT - define quantization table -; 2589 : L = stbi__get16be(z->s) - 2; -; 2590 : while (L > 0) { -; 2591 : int q = stbi__get8(z->s); -; 2592 : int p = q >> 4, sixteen = (p != 0); -; 2593 : int t = q & 15, i; -; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); -; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); -; 2596 : -; 2597 : for (i = 0; i < 64; ++i) -; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); -; 2599 : L -= (sixteen ? 129 : 65); -; 2600 : } -; 2601 : return L == 0; -; 2602 : -; 2603 : case 0xC4: // DHT - define huffman table -; 2604 : L = stbi__get16be(z->s) - 2; -; 2605 : while (L > 0) { -; 2606 : stbi_uc* v; -; 2607 : int sizes[16], i, n = 0; -; 2608 : int q = stbi__get8(z->s); -; 2609 : int tc = q >> 4; -; 2610 : int th = q & 15; -; 2611 : if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG"); -; 2612 : for (i = 0; i < 16; ++i) { -; 2613 : sizes[i] = stbi__get8(z->s); -; 2614 : n += sizes[i]; -; 2615 : } -; 2616 : if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values! -; 2617 : L -= 17; -; 2618 : if (tc == 0) { -; 2619 : if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0; -; 2620 : v = z->huff_dc[th].values; -; 2621 : } -; 2622 : else { -; 2623 : if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0; -; 2624 : v = z->huff_ac[th].values; -; 2625 : } -; 2626 : for (i = 0; i < n; ++i) -; 2627 : v[i] = stbi__get8(z->s); -; 2628 : if (tc != 0) -; 2629 : stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); -; 2630 : L -= n; -; 2631 : } -; 2632 : return L == 0; -; 2633 : } -; 2634 : -; 2635 : // check for comment block or APP blocks -; 2636 : if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { -; 2637 : L = stbi__get16be(z->s); -; 2638 : if (L < 2) { -; 2639 : if (m == 0xFE) -; 2640 : return stbi__err("bad COM len", "Corrupt JPEG"); -; 2641 : else -; 2642 : return stbi__err("bad APP len", "Corrupt JPEG"); -; 2643 : } -; 2644 : L -= 2; -; 2645 : -; 2646 : if (m == 0xE0 && L >= 5) { // JFIF APP0 segment -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) -; 2652 : ok = 0; -; 2653 : L -= 5; -; 2654 : if (ok) -; 2655 : z->jfif = 1; -; 2656 : } -; 2657 : else if (m == 0xEE && L >= 12) { // Adobe APP14 segment -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) -; 2663 : ok = 0; -; 2664 : L -= 6; -; 2665 : if (ok) { -; 2666 : stbi__get8(z->s); // version -; 2667 : stbi__get16be(z->s); // flags0 -; 2668 : stbi__get16be(z->s); // flags1 -; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform -; 2670 : L -= 6; -; 2671 : } -; 2672 : } -; 2673 : -; 2674 : stbi__skip(z->s, L); -; 2675 : return 1; -; 2676 : } -; 2677 : -; 2678 : return stbi__err("unknown marker", "Corrupt JPEG"); -; 2679 : } -; 2680 : -; 2681 : // after we see SOS -; 2682 : static int stbi__process_scan_header(stbi__jpeg* z) -; 2683 : { -; 2684 : int i; -; 2685 : int Ls = stbi__get16be(z->s); -; 2686 : z->scan_n = stbi__get8(z->s); -; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); -; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); -; 2689 : for (i = 0; i < z->scan_n; ++i) { -; 2690 : int id = stbi__get8(z->s), which; -; 2691 : int q = stbi__get8(z->s); -; 2692 : for (which = 0; which < z->s->img_n; ++which) -; 2693 : if (z->img_comp[which].id == id) -; 2694 : break; -; 2695 : if (which == z->s->img_n) return 0; // no match -; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); -; 2698 : z->order[i] = which; -; 2699 : } -; 2700 : -; 2701 : { -; 2702 : int aa; -; 2703 : z->spec_start = stbi__get8(z->s); -; 2704 : z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 -; 2705 : aa = stbi__get8(z->s); -; 2706 : z->succ_high = (aa >> 4); -; 2707 : z->succ_low = (aa & 15); -; 2708 : if (z->progressive) { -; 2709 : if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) -; 2710 : return stbi__err("bad SOS", "Corrupt JPEG"); -; 2711 : } -; 2712 : else { -; 2713 : if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2714 : if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2715 : z->spec_end = 63; -; 2716 : } -; 2717 : } -; 2718 : -; 2719 : return 1; -; 2720 : } -; 2721 : -; 2722 : static int stbi__free_jpeg_components(stbi__jpeg* z, int ncomp, int why) -; 2723 : { -; 2724 : int i; -; 2725 : for (i = 0; i < ncomp; ++i) { -; 2726 : if (z->img_comp[i].raw_data) { -; 2727 : STBI_FREE(z->img_comp[i].raw_data); -; 2728 : z->img_comp[i].raw_data = NULL; -; 2729 : z->img_comp[i].data = NULL; -; 2730 : } -; 2731 : if (z->img_comp[i].raw_coeff) { -; 2732 : STBI_FREE(z->img_comp[i].raw_coeff); -; 2733 : z->img_comp[i].raw_coeff = 0; -; 2734 : z->img_comp[i].coeff = 0; -; 2735 : } -; 2736 : if (z->img_comp[i].linebuf) { -; 2737 : STBI_FREE(z->img_comp[i].linebuf); -; 2738 : z->img_comp[i].linebuf = NULL; -; 2739 : } -; 2740 : } -; 2741 : return why; -; 2742 : } -; 2743 : -; 2744 : static int stbi__process_frame_header(stbi__jpeg* z, int scan) -; 2745 : { -; 2746 : stbi__context* s = z->s; -; 2747 : int Lf, p, i, q, h_max = 1, v_max = 1, c; -; 2748 : Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG -; 2749 : p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline -; 2750 : s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG -; 2751 : s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires -; 2752 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2753 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2754 : c = stbi__get8(s); -; 2755 : if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG"); -; 2756 : s->img_n = c; -; 2757 : for (i = 0; i < c; ++i) { -; 2758 : z->img_comp[i].data = NULL; -; 2759 : z->img_comp[i].linebuf = NULL; -; 2760 : } -; 2761 : -; 2762 : if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG"); -; 2763 : -; 2764 : z->rgb = 0; -; 2765 : for (i = 0; i < s->img_n; ++i) { -; 2766 : static const unsigned char rgb[3] = { 'R', 'G', 'B' }; -; 2767 : z->img_comp[i].id = stbi__get8(s); -; 2768 : if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) -; 2769 : ++z->rgb; -; 2770 : q = stbi__get8(s); -; 2771 : z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H", "Corrupt JPEG"); -; 2772 : z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V", "Corrupt JPEG"); -; 2773 : z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ", "Corrupt JPEG"); -; 2774 : } -; 2775 : -; 2776 : if (scan != STBI__SCAN_load) return 1; -; 2777 : -; 2778 : if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); -; 2779 : -; 2780 : for (i = 0; i < s->img_n; ++i) { -; 2781 : if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; -; 2782 : if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; -; 2783 : } -; 2784 : -; 2785 : // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios -; 2786 : // and I've never seen a non-corrupted JPEG file actually use them -; 2787 : for (i = 0; i < s->img_n; ++i) { -; 2788 : if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG"); -; 2789 : if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG"); -; 2790 : } -; 2791 : -; 2792 : // compute interleaved mcu info -; 2793 : z->img_h_max = h_max; -; 2794 : z->img_v_max = v_max; -; 2795 : z->img_mcu_w = h_max * 8; -; 2796 : z->img_mcu_h = v_max * 8; -; 2797 : // these sizes can't be more than 17 bits -; 2798 : z->img_mcu_x = (s->img_x + z->img_mcu_w - 1) / z->img_mcu_w; -; 2799 : z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h; -; 2800 : -; 2801 : for (i = 0; i < s->img_n; ++i) { -; 2802 : // number of effective pixels (e.g. for non-interleaved MCU) -; 2803 : z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max - 1) / h_max; -; 2804 : z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max - 1) / v_max; -; 2805 : // to simplify generation, we'll allocate enough memory to decode -; 2806 : // the bogus oversized data from using interleaved MCUs and their -; 2807 : // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't -; 2808 : // discard the extra data until colorspace conversion -; 2809 : // -; 2810 : // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) -; 2811 : // so these muls can't overflow with 32-bit ints (which we require) -; 2812 : z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; -; 2813 : z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; -; 2814 : z->img_comp[i].coeff = 0; -; 2815 : z->img_comp[i].raw_coeff = 0; -; 2816 : z->img_comp[i].linebuf = NULL; -; 2817 : z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); -; 2818 : if (z->img_comp[i].raw_data == NULL) -; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2820 : // align blocks for idct using mmx/sse -; 2821 : z->img_comp[i].data = (stbi_uc*)(((size_t)z->img_comp[i].raw_data + 15) & ~15); -; 2822 : if (z->progressive) { -; 2823 : // w2, h2 are multiples of 8 (see above) -; 2824 : z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; -; 2825 : z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; -; 2826 : z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); -; 2827 : if (z->img_comp[i].raw_coeff == NULL) -; 2828 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2829 : z->img_comp[i].coeff = (short*)(((size_t)z->img_comp[i].raw_coeff + 15) & ~15); -; 2830 : } -; 2831 : } -; 2832 : -; 2833 : return 1; -; 2834 : } -; 2835 : -; 2836 : // use comparisons since in some cases we handle more than one case (e.g. SOF) -; 2837 : #define stbi__DNL(x) ((x) == 0xdc) -; 2838 : #define stbi__SOI(x) ((x) == 0xd8) -; 2839 : #define stbi__EOI(x) ((x) == 0xd9) -; 2840 : #define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) -; 2841 : #define stbi__SOS(x) ((x) == 0xda) -; 2842 : -; 2843 : #define stbi__SOF_progressive(x) ((x) == 0xc2) -; 2844 : -; 2845 : static int stbi__decode_jpeg_header(stbi__jpeg* z, int scan) -; 2846 : { -; 2847 : int m; -; 2848 : z->jfif = 0; -; 2849 : z->app14_color_transform = -1; // valid values are 0,1,2 -; 2850 : z->marker = STBI__MARKER_none; // initialize cached marker to empty -; 2851 : m = stbi__get_marker(z); -; 2852 : if (!stbi__SOI(m)) return stbi__err("no SOI", "Corrupt JPEG"); -; 2853 : if (scan == STBI__SCAN_type) return 1; -; 2854 : m = stbi__get_marker(z); -; 2855 : while (!stbi__SOF(m)) { -; 2856 : if (!stbi__process_marker(z, m)) return 0; -; 2857 : m = stbi__get_marker(z); -; 2858 : while (m == STBI__MARKER_none) { -; 2859 : // some files have extra padding after their blocks, so ok, we'll scan -; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); -; 2861 : m = stbi__get_marker(z); -; 2862 : } -; 2863 : } -; 2864 : z->progressive = stbi__SOF_progressive(m); -; 2865 : if (!stbi__process_frame_header(z, scan)) return 0; -; 2866 : return 1; -; 2867 : } -; 2868 : -; 2869 : static int stbi__skip_jpeg_junk_at_end(stbi__jpeg* j) -; 2870 : { -; 2871 : // some JPEGs have junk at end, skip over it but if we find what looks -; 2872 : // like a valid marker, resume there -; 2873 : while (!stbi__at_eof(j->s)) { -; 2874 : int x = stbi__get8(j->s); -; 2875 : while (x == 255) { // might be a marker -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; -; 2877 : x = stbi__get8(j->s); -; 2878 : if (x != 0x00 && x != 0xff) { -; 2879 : // not a stuffed zero or lead-in to another marker, looks -; 2880 : // like an actual marker, return it -; 2881 : return x; -; 2882 : } -; 2883 : // stuffed zero has x=0 now which ends the loop, meaning we go -; 2884 : // back to regular scan loop. -; 2885 : // repeated 0xff keeps trying to read the next byte of the marker. -; 2886 : } -; 2887 : } -; 2888 : return STBI__MARKER_none; -; 2889 : } -; 2890 : -; 2891 : // decode image to YCbCr format -; 2892 : static int stbi__decode_jpeg_image(stbi__jpeg* j) -; 2893 : { -; 2894 : int m; -; 2895 : for (m = 0; m < 4; m++) { -; 2896 : j->img_comp[m].raw_data = NULL; -; 2897 : j->img_comp[m].raw_coeff = NULL; -; 2898 : } -; 2899 : j->restart_interval = 0; -; 2900 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; -; 2901 : m = stbi__get_marker(j); -; 2902 : while (!stbi__EOI(m)) { -; 2903 : if (stbi__SOS(m)) { -; 2904 : if (!stbi__process_scan_header(j)) return 0; -; 2905 : if (!stbi__parse_entropy_coded_data(j)) return 0; -; 2906 : if (j->marker == STBI__MARKER_none) { -; 2907 : j->marker = stbi__skip_jpeg_junk_at_end(j); -; 2908 : // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 -; 2909 : } -; 2910 : m = stbi__get_marker(j); -; 2911 : if (STBI__RESTART(m)) -; 2912 : m = stbi__get_marker(j); -; 2913 : } -; 2914 : else if (stbi__DNL(m)) { -; 2915 : int Ld = stbi__get16be(j->s); -; 2916 : stbi__uint32 NL = stbi__get16be(j->s); -; 2917 : if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); -; 2918 : if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); -; 2919 : m = stbi__get_marker(j); -; 2920 : } -; 2921 : else { -; 2922 : if (!stbi__process_marker(j, m)) return 1; -; 2923 : m = stbi__get_marker(j); -; 2924 : } -; 2925 : } -; 2926 : if (j->progressive) -; 2927 : stbi__jpeg_finish(j); -; 2928 : return 1; -; 2929 : } -; 2930 : -; 2931 : // static jfif-centered resampling (across block boundaries) -; 2932 : -; 2933 : typedef stbi_uc* (*resample_row_func)(stbi_uc* out, stbi_uc* in0, stbi_uc* in1, -; 2934 : int w, int hs); -; 2935 : -; 2936 : #define stbi__div4(x) ((stbi_uc) ((x) >> 2)) -; 2937 : -; 2938 : static stbi_uc* resample_row_1(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2939 : { -; 2940 : STBI_NOTUSED(out); -; 2941 : STBI_NOTUSED(in_far); -; 2942 : STBI_NOTUSED(w); -; 2943 : STBI_NOTUSED(hs); -; 2944 : return in_near; -; 2945 : } -; 2946 : -; 2947 : static stbi_uc* stbi__resample_row_v_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2948 : { -; 2949 : // need to generate two samples vertically for every one in input -; 2950 : int i; -; 2951 : STBI_NOTUSED(hs); -; 2952 : for (i = 0; i < w; ++i) -; 2953 : out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2); -; 2954 : return out; -; 2955 : } -; 2956 : -; 2957 : static stbi_uc* stbi__resample_row_h_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2958 : { -; 2959 : // need to generate two samples horizontally for every one in input -; 2960 : int i; -; 2961 : stbi_uc* input = in_near; -; 2962 : -; 2963 : if (w == 1) { -; 2964 : // if only one sample, can't do any interpolation -; 2965 : out[0] = out[1] = input[0]; -; 2966 : return out; -; 2967 : } -; 2968 : -; 2969 : out[0] = input[0]; -; 2970 : out[1] = stbi__div4(input[0] * 3 + input[1] + 2); -; 2971 : for (i = 1; i < w - 1; ++i) { -; 2972 : int n = 3 * input[i] + 2; -; 2973 : out[i * 2 + 0] = stbi__div4(n + input[i - 1]); -; 2974 : out[i * 2 + 1] = stbi__div4(n + input[i + 1]); -; 2975 : } -; 2976 : out[i * 2 + 0] = stbi__div4(input[w - 2] * 3 + input[w - 1] + 2); -; 2977 : out[i * 2 + 1] = input[w - 1]; -; 2978 : -; 2979 : STBI_NOTUSED(in_far); -; 2980 : STBI_NOTUSED(hs); -; 2981 : -; 2982 : return out; -; 2983 : } -; 2984 : -; 2985 : #define stbi__div16(x) ((stbi_uc) ((x) >> 4)) -; 2986 : -; 2987 : static stbi_uc* stbi__resample_row_hv_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2988 : { -; 2989 : // need to generate 2x2 samples for every one in input -; 2990 : int i, t0, t1; -; 2991 : if (w == 1) { -; 2992 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 2993 : return out; -; 2994 : } -; 2995 : -; 2996 : t1 = 3 * in_near[0] + in_far[0]; -; 2997 : out[0] = stbi__div4(t1 + 2); -; 2998 : for (i = 1; i < w; ++i) { -; 2999 : t0 = t1; -; 3000 : t1 = 3 * in_near[i] + in_far[i]; -; 3001 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3002 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3003 : } -; 3004 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3005 : -; 3006 : STBI_NOTUSED(hs); -; 3007 : -; 3008 : return out; -; 3009 : } -; 3010 : -; 3011 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3012 : static stbi_uc* stbi__resample_row_hv_2_simd(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3013 : { -; 3014 : // need to generate 2x2 samples for every one in input -; 3015 : int i = 0, t0, t1; -; 3016 : -; 3017 : if (w == 1) { -; 3018 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 3019 : return out; -; 3020 : } -; 3021 : -; 3022 : t1 = 3 * in_near[0] + in_far[0]; -; 3023 : // process groups of 8 pixels for as long as we can. -; 3024 : // note we can't handle the last pixel in a row in this loop -; 3025 : // because we need to handle the filter boundary conditions. -; 3026 : for (; i < ((w - 1) & ~7); i += 8) { -; 3027 : #if defined(STBI_SSE2) -; 3028 : // load and perform the vertical filtering pass -; 3029 : // this uses 3*x + y = 4*x + (y - x) -; 3030 : __m128i zero = _mm_setzero_si128(); -; 3031 : __m128i farb = _mm_loadl_epi64((__m128i*) (in_far + i)); -; 3032 : __m128i nearb = _mm_loadl_epi64((__m128i*) (in_near + i)); -; 3033 : __m128i farw = _mm_unpacklo_epi8(farb, zero); -; 3034 : __m128i nearw = _mm_unpacklo_epi8(nearb, zero); -; 3035 : __m128i diff = _mm_sub_epi16(farw, nearw); -; 3036 : __m128i nears = _mm_slli_epi16(nearw, 2); -; 3037 : __m128i curr = _mm_add_epi16(nears, diff); // current row -; 3038 : -; 3039 : // horizontal filter works the same based on shifted vers of current -; 3040 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3041 : // insert the previous pixel value (from t1). -; 3042 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3043 : // of next block of 8 pixels added in. -; 3044 : __m128i prv0 = _mm_slli_si128(curr, 2); -; 3045 : __m128i nxt0 = _mm_srli_si128(curr, 2); -; 3046 : __m128i prev = _mm_insert_epi16(prv0, t1, 0); -; 3047 : __m128i next = _mm_insert_epi16(nxt0, 3 * in_near[i + 8] + in_far[i + 8], 7); -; 3048 : -; 3049 : // horizontal filter, polyphase implementation since it's convenient: -; 3050 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3051 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3052 : // note the shared term. -; 3053 : __m128i bias = _mm_set1_epi16(8); -; 3054 : __m128i curs = _mm_slli_epi16(curr, 2); -; 3055 : __m128i prvd = _mm_sub_epi16(prev, curr); -; 3056 : __m128i nxtd = _mm_sub_epi16(next, curr); -; 3057 : __m128i curb = _mm_add_epi16(curs, bias); -; 3058 : __m128i even = _mm_add_epi16(prvd, curb); -; 3059 : __m128i odd = _mm_add_epi16(nxtd, curb); -; 3060 : -; 3061 : // interleave even and odd pixels, then undo scaling. -; 3062 : __m128i int0 = _mm_unpacklo_epi16(even, odd); -; 3063 : __m128i int1 = _mm_unpackhi_epi16(even, odd); -; 3064 : __m128i de0 = _mm_srli_epi16(int0, 4); -; 3065 : __m128i de1 = _mm_srli_epi16(int1, 4); -; 3066 : -; 3067 : // pack and write output -; 3068 : __m128i outv = _mm_packus_epi16(de0, de1); -; 3069 : _mm_storeu_si128((__m128i*) (out + i * 2), outv); -; 3070 : #elif defined(STBI_NEON) -; 3071 : // load and perform the vertical filtering pass -; 3072 : // this uses 3*x + y = 4*x + (y - x) -; 3073 : uint8x8_t farb = vld1_u8(in_far + i); -; 3074 : uint8x8_t nearb = vld1_u8(in_near + i); -; 3075 : int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); -; 3076 : int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); -; 3077 : int16x8_t curr = vaddq_s16(nears, diff); // current row -; 3078 : -; 3079 : // horizontal filter works the same based on shifted vers of current -; 3080 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3081 : // insert the previous pixel value (from t1). -; 3082 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3083 : // of next block of 8 pixels added in. -; 3084 : int16x8_t prv0 = vextq_s16(curr, curr, 7); -; 3085 : int16x8_t nxt0 = vextq_s16(curr, curr, 1); -; 3086 : int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); -; 3087 : int16x8_t next = vsetq_lane_s16(3 * in_near[i + 8] + in_far[i + 8], nxt0, 7); -; 3088 : -; 3089 : // horizontal filter, polyphase implementation since it's convenient: -; 3090 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3091 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3092 : // note the shared term. -; 3093 : int16x8_t curs = vshlq_n_s16(curr, 2); -; 3094 : int16x8_t prvd = vsubq_s16(prev, curr); -; 3095 : int16x8_t nxtd = vsubq_s16(next, curr); -; 3096 : int16x8_t even = vaddq_s16(curs, prvd); -; 3097 : int16x8_t odd = vaddq_s16(curs, nxtd); -; 3098 : -; 3099 : // undo scaling and round, then store with even/odd phases interleaved -; 3100 : uint8x8x2_t o; -; 3101 : o.val[0] = vqrshrun_n_s16(even, 4); -; 3102 : o.val[1] = vqrshrun_n_s16(odd, 4); -; 3103 : vst2_u8(out + i * 2, o); -; 3104 : #endif -; 3105 : -; 3106 : // "previous" value for next iter -; 3107 : t1 = 3 * in_near[i + 7] + in_far[i + 7]; -; 3108 : } -; 3109 : -; 3110 : t0 = t1; -; 3111 : t1 = 3 * in_near[i] + in_far[i]; -; 3112 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3113 : -; 3114 : for (++i; i < w; ++i) { -; 3115 : t0 = t1; -; 3116 : t1 = 3 * in_near[i] + in_far[i]; -; 3117 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3118 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3119 : } -; 3120 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3121 : -; 3122 : STBI_NOTUSED(hs); -; 3123 : -; 3124 : return out; -; 3125 : } -; 3126 : #endif -; 3127 : -; 3128 : static stbi_uc* stbi__resample_row_generic(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3129 : { -; 3130 : // resample with nearest-neighbor -; 3131 : int i, j; -; 3132 : STBI_NOTUSED(in_far); -; 3133 : for (i = 0; i < w; ++i) -; 3134 : for (j = 0; j < hs; ++j) -; 3135 : out[i * hs + j] = in_near[i]; -; 3136 : return out; -; 3137 : } -; 3138 : -; 3139 : // this is a reduced-precision calculation of YCbCr-to-RGB introduced -; 3140 : // to make sure the code produces the same results in both SIMD and scalar -; 3141 : #define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) -; 3142 : static void stbi__YCbCr_to_RGB_row(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step) -; 3143 : { -; 3144 : int i; -; 3145 : for (i = 0; i < count; ++i) { -; 3146 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3147 : int r, g, b; -; 3148 : int cr = pcr[i] - 128; -; 3149 : int cb = pcb[i] - 128; -; 3150 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3151 : g = y_fixed + (cr * -stbi__float2fixed(0.71414f)) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3152 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3153 : r >>= 20; -; 3154 : g >>= 20; -; 3155 : b >>= 20; -; 3156 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3157 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3158 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3159 : out[0] = (stbi_uc)r; -; 3160 : out[1] = (stbi_uc)g; -; 3161 : out[2] = (stbi_uc)b; -; 3162 : out[3] = 255; -; 3163 : out += step; -; 3164 : } -; 3165 : } -; 3166 : -; 3167 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3168 : static void stbi__YCbCr_to_RGB_simd(stbi_uc* out, stbi_uc const* y, stbi_uc const* pcb, stbi_uc const* pcr, int count, int step) -; 3169 : { -; 3170 : int i = 0; -; 3171 : -; 3172 : #ifdef STBI_SSE2 -; 3173 : // step == 3 is pretty ugly on the final interleave, and i'm not convinced -; 3174 : // it's useful in practice (you wouldn't use it for textures, for example). -; 3175 : // so just accelerate step == 4 case. -; 3176 : if (step == 4) { -; 3177 : // this is a fairly straightforward implementation and not super-optimized. -; 3178 : __m128i signflip = _mm_set1_epi8(-0x80); -; 3179 : __m128i cr_const0 = _mm_set1_epi16((short)(1.40200f * 4096.0f + 0.5f)); -; 3180 : __m128i cr_const1 = _mm_set1_epi16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3181 : __m128i cb_const0 = _mm_set1_epi16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3182 : __m128i cb_const1 = _mm_set1_epi16((short)(1.77200f * 4096.0f + 0.5f)); -; 3183 : __m128i y_bias = _mm_set1_epi8((char)(unsigned char)128); -; 3184 : __m128i xw = _mm_set1_epi16(255); // alpha channel -; 3185 : -; 3186 : for (; i + 7 < count; i += 8) { -; 3187 : // load -; 3188 : __m128i y_bytes = _mm_loadl_epi64((__m128i*) (y + i)); -; 3189 : __m128i cr_bytes = _mm_loadl_epi64((__m128i*) (pcr + i)); -; 3190 : __m128i cb_bytes = _mm_loadl_epi64((__m128i*) (pcb + i)); -; 3191 : __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 -; 3192 : __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 -; 3193 : -; 3194 : // unpack to short (and left-shift cr, cb by 8) -; 3195 : __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); -; 3196 : __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); -; 3197 : __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); -; 3198 : -; 3199 : // color transform -; 3200 : __m128i yws = _mm_srli_epi16(yw, 4); -; 3201 : __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); -; 3202 : __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); -; 3203 : __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); -; 3204 : __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); -; 3205 : __m128i rws = _mm_add_epi16(cr0, yws); -; 3206 : __m128i gwt = _mm_add_epi16(cb0, yws); -; 3207 : __m128i bws = _mm_add_epi16(yws, cb1); -; 3208 : __m128i gws = _mm_add_epi16(gwt, cr1); -; 3209 : -; 3210 : // descale -; 3211 : __m128i rw = _mm_srai_epi16(rws, 4); -; 3212 : __m128i bw = _mm_srai_epi16(bws, 4); -; 3213 : __m128i gw = _mm_srai_epi16(gws, 4); -; 3214 : -; 3215 : // back to byte, set up for transpose -; 3216 : __m128i brb = _mm_packus_epi16(rw, bw); -; 3217 : __m128i gxb = _mm_packus_epi16(gw, xw); -; 3218 : -; 3219 : // transpose to interleave channels -; 3220 : __m128i t0 = _mm_unpacklo_epi8(brb, gxb); -; 3221 : __m128i t1 = _mm_unpackhi_epi8(brb, gxb); -; 3222 : __m128i o0 = _mm_unpacklo_epi16(t0, t1); -; 3223 : __m128i o1 = _mm_unpackhi_epi16(t0, t1); -; 3224 : -; 3225 : // store -; 3226 : _mm_storeu_si128((__m128i*) (out + 0), o0); -; 3227 : _mm_storeu_si128((__m128i*) (out + 16), o1); -; 3228 : out += 32; -; 3229 : } -; 3230 : } -; 3231 : #endif -; 3232 : -; 3233 : #ifdef STBI_NEON -; 3234 : // in this version, step=3 support would be easy to add. but is there demand? -; 3235 : if (step == 4) { -; 3236 : // this is a fairly straightforward implementation and not super-optimized. -; 3237 : uint8x8_t signflip = vdup_n_u8(0x80); -; 3238 : int16x8_t cr_const0 = vdupq_n_s16((short)(1.40200f * 4096.0f + 0.5f)); -; 3239 : int16x8_t cr_const1 = vdupq_n_s16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3240 : int16x8_t cb_const0 = vdupq_n_s16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3241 : int16x8_t cb_const1 = vdupq_n_s16((short)(1.77200f * 4096.0f + 0.5f)); -; 3242 : -; 3243 : for (; i + 7 < count; i += 8) { -; 3244 : // load -; 3245 : uint8x8_t y_bytes = vld1_u8(y + i); -; 3246 : uint8x8_t cr_bytes = vld1_u8(pcr + i); -; 3247 : uint8x8_t cb_bytes = vld1_u8(pcb + i); -; 3248 : int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); -; 3249 : int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); -; 3250 : -; 3251 : // expand to s16 -; 3252 : int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); -; 3253 : int16x8_t crw = vshll_n_s8(cr_biased, 7); -; 3254 : int16x8_t cbw = vshll_n_s8(cb_biased, 7); -; 3255 : -; 3256 : // color transform -; 3257 : int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); -; 3258 : int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); -; 3259 : int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); -; 3260 : int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); -; 3261 : int16x8_t rws = vaddq_s16(yws, cr0); -; 3262 : int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); -; 3263 : int16x8_t bws = vaddq_s16(yws, cb1); -; 3264 : -; 3265 : // undo scaling, round, convert to byte -; 3266 : uint8x8x4_t o; -; 3267 : o.val[0] = vqrshrun_n_s16(rws, 4); -; 3268 : o.val[1] = vqrshrun_n_s16(gws, 4); -; 3269 : o.val[2] = vqrshrun_n_s16(bws, 4); -; 3270 : o.val[3] = vdup_n_u8(255); -; 3271 : -; 3272 : // store, interleaving r/g/b/a -; 3273 : vst4_u8(out, o); -; 3274 : out += 8 * 4; -; 3275 : } -; 3276 : } -; 3277 : #endif -; 3278 : -; 3279 : for (; i < count; ++i) { -; 3280 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3281 : int r, g, b; -; 3282 : int cr = pcr[i] - 128; -; 3283 : int cb = pcb[i] - 128; -; 3284 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3285 : g = y_fixed + cr * -stbi__float2fixed(0.71414f) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3286 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3287 : r >>= 20; -; 3288 : g >>= 20; -; 3289 : b >>= 20; -; 3290 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3291 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3292 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3293 : out[0] = (stbi_uc)r; -; 3294 : out[1] = (stbi_uc)g; -; 3295 : out[2] = (stbi_uc)b; -; 3296 : out[3] = 255; -; 3297 : out += step; -; 3298 : } -; 3299 : } -; 3300 : #endif -; 3301 : -; 3302 : // set up the kernels -; 3303 : static void stbi__setup_jpeg(stbi__jpeg* j) -; 3304 : { -; 3305 : j->idct_block_kernel = stbi__idct_block; -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; -; 3308 : -; 3309 : #ifdef STBI_SSE2 -; 3310 : if (stbi__sse2_available()) { -; 3311 : j->idct_block_kernel = stbi__idct_simd; -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3314 : } -; 3315 : #endif -; 3316 : -; 3317 : #ifdef STBI_NEON -; 3318 : j->idct_block_kernel = stbi__idct_simd; -; 3319 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3320 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3321 : #endif -; 3322 : } -; 3323 : -; 3324 : // clean up the temporary component buffers -; 3325 : static void stbi__cleanup_jpeg(stbi__jpeg* j) -; 3326 : { -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); -; 3328 : } -; 3329 : -; 3330 : typedef struct -; 3331 : { -; 3332 : resample_row_func resample; -; 3333 : stbi_uc* line0, * line1; -; 3334 : int hs, vs; // expansion factor in each axis -; 3335 : int w_lores; // horizontal pixels pre-expansion -; 3336 : int ystep; // how far through vertical expansion we are -; 3337 : int ypos; // which pre-expansion row we're on -; 3338 : } stbi__resample; -; 3339 : -; 3340 : // fast 0..255 * 0..255 => 0..255 rounded multiplication -; 3341 : static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) -; 3342 : { -; 3343 : unsigned int t = x * y + 128; -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); -; 3345 : } -; 3346 : -; 3347 : static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp, int req_comp) -; 3348 : { -; 3349 : int n, decode_n, is_rgb; -; 3350 : z->s->img_n = 0; // make stbi__cleanup_jpeg safe -; 3351 : -; 3352 : // validate req_comp -; 3353 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 3354 : -; 3355 : // load a jpeg image from whichever source, but leave in YCbCr format -; 3356 : if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } -; 3357 : -; 3358 : // determine actual number of components to generate -; 3359 : n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; -; 3360 : -; 3361 : is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); -; 3362 : -; 3363 : if (z->s->img_n == 3 && n < 3 && !is_rgb) -; 3364 : decode_n = 1; -; 3365 : else -; 3366 : decode_n = z->s->img_n; -; 3367 : -; 3368 : // nothing to do if no components requested; check this now to avoid -; 3369 : // accessing uninitialized coutput[0] later -; 3370 : if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } -; 3371 : -; 3372 : // resample and color-convert -; 3373 : { -; 3374 : int k; -; 3375 : unsigned int i, j; -; 3376 : stbi_uc* output; -; 3377 : stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL }; -; 3378 : -; 3379 : stbi__resample res_comp[4]; -; 3380 : -; 3381 : for (k = 0; k < decode_n; ++k) { -; 3382 : stbi__resample* r = &res_comp[k]; -; 3383 : -; 3384 : // allocate line buffer big enough for upsampling off the edges -; 3385 : // with upsample factor of 4 -; 3386 : z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3); -; 3387 : if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3388 : -; 3389 : r->hs = z->img_h_max / z->img_comp[k].h; -; 3390 : r->vs = z->img_v_max / z->img_comp[k].v; -; 3391 : r->ystep = r->vs >> 1; -; 3392 : r->w_lores = (z->s->img_x + r->hs - 1) / r->hs; -; 3393 : r->ypos = 0; -; 3394 : r->line0 = r->line1 = z->img_comp[k].data; -; 3395 : -; 3396 : if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; -; 3397 : else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; -; 3398 : else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; -; 3399 : else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; -; 3400 : else r->resample = stbi__resample_row_generic; -; 3401 : } -; 3402 : -; 3403 : // can't error after this so, this is safe -; 3404 : output = (stbi_uc*)stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); -; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3406 : -; 3407 : // now go ahead and resample -; 3408 : for (j = 0; j < z->s->img_y; ++j) { -; 3409 : stbi_uc* out = output + n * z->s->img_x * j; -; 3410 : for (k = 0; k < decode_n; ++k) { -; 3411 : stbi__resample* r = &res_comp[k]; -; 3412 : int y_bot = r->ystep >= (r->vs >> 1); -; 3413 : coutput[k] = r->resample(z->img_comp[k].linebuf, -; 3414 : y_bot ? r->line1 : r->line0, -; 3415 : y_bot ? r->line0 : r->line1, -; 3416 : r->w_lores, r->hs); -; 3417 : if (++r->ystep >= r->vs) { -; 3418 : r->ystep = 0; -; 3419 : r->line0 = r->line1; -; 3420 : if (++r->ypos < z->img_comp[k].y) -; 3421 : r->line1 += z->img_comp[k].w2; -; 3422 : } -; 3423 : } -; 3424 : if (n >= 3) { -; 3425 : stbi_uc* y = coutput[0]; -; 3426 : if (z->s->img_n == 3) { -; 3427 : if (is_rgb) { -; 3428 : for (i = 0; i < z->s->img_x; ++i) { -; 3429 : out[0] = y[i]; -; 3430 : out[1] = coutput[1][i]; -; 3431 : out[2] = coutput[2][i]; -; 3432 : out[3] = 255; -; 3433 : out += n; -; 3434 : } -; 3435 : } -; 3436 : else { -; 3437 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3438 : } -; 3439 : } -; 3440 : else if (z->s->img_n == 4) { -; 3441 : if (z->app14_color_transform == 0) { // CMYK -; 3442 : for (i = 0; i < z->s->img_x; ++i) { -; 3443 : stbi_uc m = coutput[3][i]; -; 3444 : out[0] = stbi__blinn_8x8(coutput[0][i], m); -; 3445 : out[1] = stbi__blinn_8x8(coutput[1][i], m); -; 3446 : out[2] = stbi__blinn_8x8(coutput[2][i], m); -; 3447 : out[3] = 255; -; 3448 : out += n; -; 3449 : } -; 3450 : } -; 3451 : else if (z->app14_color_transform == 2) { // YCCK -; 3452 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3453 : for (i = 0; i < z->s->img_x; ++i) { -; 3454 : stbi_uc m = coutput[3][i]; -; 3455 : out[0] = stbi__blinn_8x8(255 - out[0], m); -; 3456 : out[1] = stbi__blinn_8x8(255 - out[1], m); -; 3457 : out[2] = stbi__blinn_8x8(255 - out[2], m); -; 3458 : out += n; -; 3459 : } -; 3460 : } -; 3461 : else { // YCbCr + alpha? Ignore the fourth channel for now -; 3462 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3463 : } -; 3464 : } -; 3465 : else -; 3466 : for (i = 0; i < z->s->img_x; ++i) { -; 3467 : out[0] = out[1] = out[2] = y[i]; -; 3468 : out[3] = 255; // not used if n==3 -; 3469 : out += n; -; 3470 : } -; 3471 : } -; 3472 : else { -; 3473 : if (is_rgb) { -; 3474 : if (n == 1) -; 3475 : for (i = 0; i < z->s->img_x; ++i) -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3477 : else { -; 3478 : for (i = 0; i < z->s->img_x; ++i, out += 2) { -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3480 : out[1] = 255; -; 3481 : } -; 3482 : } -; 3483 : } -; 3484 : else if (z->s->img_n == 4 && z->app14_color_transform == 0) { -; 3485 : for (i = 0; i < z->s->img_x; ++i) { -; 3486 : stbi_uc m = coutput[3][i]; -; 3487 : stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); -; 3488 : stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); -; 3489 : stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); -; 3490 : out[0] = stbi__compute_y(r, g, b); -; 3491 : out[1] = 255; -; 3492 : out += n; -; 3493 : } -; 3494 : } -; 3495 : else if (z->s->img_n == 4 && z->app14_color_transform == 2) { -; 3496 : for (i = 0; i < z->s->img_x; ++i) { -; 3497 : out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); -; 3498 : out[1] = 255; -; 3499 : out += n; -; 3500 : } -; 3501 : } -; 3502 : else { -; 3503 : stbi_uc* y = coutput[0]; -; 3504 : if (n == 1) -; 3505 : for (i = 0; i < z->s->img_x; ++i) out[i] = y[i]; -; 3506 : else -; 3507 : for (i = 0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } -; 3508 : } -; 3509 : } -; 3510 : } -; 3511 : stbi__cleanup_jpeg(z); -; 3512 : *out_x = z->s->img_x; -; 3513 : *out_y = z->s->img_y; -; 3514 : if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output -; 3515 : return output; -; 3516 : } -; 3517 : } -; 3518 : -; 3519 : static void* stbi__jpeg_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 3520 : { -; 3521 : unsigned char* result; -; 3522 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); -; 3524 : memset(j, 0, sizeof(stbi__jpeg)); -; 3525 : STBI_NOTUSED(ri); -; 3526 : j->s = s; -; 3527 : stbi__setup_jpeg(j); -; 3528 : result = load_jpeg_image(j, x, y, comp, req_comp); -; 3529 : STBI_FREE(j); -; 3530 : return result; -; 3531 : } -; 3532 : -; 3533 : static int stbi__jpeg_test(stbi__context* s) -; 3534 : { -; 3535 : int r; -; 3536 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3538 : memset(j, 0, sizeof(stbi__jpeg)); -; 3539 : j->s = s; -; 3540 : stbi__setup_jpeg(j); -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); -; 3542 : stbi__rewind(s); -; 3543 : STBI_FREE(j); -; 3544 : return r; -; 3545 : } -; 3546 : -; 3547 : static int stbi__jpeg_info_raw(stbi__jpeg* j, int* x, int* y, int* comp) -; 3548 : { -; 3549 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { -; 3550 : stbi__rewind(j->s); -; 3551 : return 0; -; 3552 : } -; 3553 : if (x) *x = j->s->img_x; -; 3554 : if (y) *y = j->s->img_y; -; 3555 : if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; -; 3556 : return 1; -; 3557 : } -; 3558 : -; 3559 : static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp) -; 3560 : { -; 3561 : int result; -; 3562 : stbi__jpeg* j = (stbi__jpeg*)(stbi__malloc(sizeof(stbi__jpeg))); -; 3563 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3564 : memset(j, 0, sizeof(stbi__jpeg)); -; 3565 : j->s = s; -; 3566 : result = stbi__jpeg_info_raw(j, x, y, comp); -; 3567 : STBI_FREE(j); -; 3568 : return result; -; 3569 : } -; 3570 : #endif -; 3571 : -; 3572 : // public domain zlib decode v0.2 Sean Barrett 2006-11-18 -; 3573 : // simple implementation -; 3574 : // - all input must be provided in an upfront buffer -; 3575 : // - all output is written to a single output buffer (can malloc/realloc) -; 3576 : // performance -; 3577 : // - fast huffman -; 3578 : -; 3579 : #ifndef STBI_NO_ZLIB -; 3580 : -; 3581 : // fast-way is faster to check than jpeg huffman, but slow way is slower -; 3582 : #define STBI__ZFAST_BITS 9 // accelerate all cases in default tables -; 3583 : #define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) -; 3584 : #define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet -; 3585 : -; 3586 : // zlib-style huffman encoding -; 3587 : // (jpegs packs from left, zlib from right, so can't share code) -; 3588 : typedef struct -; 3589 : { -; 3590 : stbi__uint16 fast[1 << STBI__ZFAST_BITS]; -; 3591 : stbi__uint16 firstcode[16]; -; 3592 : int maxcode[17]; -; 3593 : stbi__uint16 firstsymbol[16]; -; 3594 : stbi_uc size[STBI__ZNSYMS]; -; 3595 : stbi__uint16 value[STBI__ZNSYMS]; -; 3596 : } stbi__zhuffman; -; 3597 : -; 3598 : stbi_inline static int stbi__bitreverse16(int n) -; 3599 : { -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); -; 3604 : return n; -; 3605 : } -; 3606 : -; 3607 : stbi_inline static int stbi__bit_reverse(int v, int bits) -; 3608 : { -; 3609 : STBI_ASSERT(bits <= 16); -; 3610 : // to bit reverse n bits, reverse 16 and shift -; 3611 : // e.g. 11 bits, bit reverse and shift away 5 -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); -; 3613 : } -; 3614 : -; 3615 : static int stbi__zbuild_huffman(stbi__zhuffman* z, const stbi_uc* sizelist, int num) -; 3616 : { -; 3617 : int i, k = 0; -; 3618 : int code, next_code[16], sizes[17]; -; 3619 : -; 3620 : // DEFLATE spec for generating codes -; 3621 : memset(sizes, 0, sizeof(sizes)); -; 3622 : memset(z->fast, 0, sizeof(z->fast)); -; 3623 : for (i = 0; i < num; ++i) -; 3624 : ++sizes[sizelist[i]]; -; 3625 : sizes[0] = 0; -; 3626 : for (i = 1; i < 16; ++i) -; 3627 : if (sizes[i] > (1 << i)) -; 3628 : return stbi__err("bad sizes", "Corrupt PNG"); -; 3629 : code = 0; -; 3630 : for (i = 1; i < 16; ++i) { -; 3631 : next_code[i] = code; -; 3632 : z->firstcode[i] = (stbi__uint16)code; -; 3633 : z->firstsymbol[i] = (stbi__uint16)k; -; 3634 : code = (code + sizes[i]); -; 3635 : if (sizes[i]) -; 3636 : if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3637 : z->maxcode[i] = code << (16 - i); // preshift for inner loop -; 3638 : code <<= 1; -; 3639 : k += sizes[i]; -; 3640 : } -; 3641 : z->maxcode[16] = 0x10000; // sentinel -; 3642 : for (i = 0; i < num; ++i) { -; 3643 : int s = sizelist[i]; -; 3644 : if (s) { -; 3645 : int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; -; 3646 : stbi__uint16 fastv = (stbi__uint16)((s << 9) | i); -; 3647 : z->size[c] = (stbi_uc)s; -; 3648 : z->value[c] = (stbi__uint16)i; -; 3649 : if (s <= STBI__ZFAST_BITS) { -; 3650 : int j = stbi__bit_reverse(next_code[s], s); -; 3651 : while (j < (1 << STBI__ZFAST_BITS)) { -; 3652 : z->fast[j] = fastv; -; 3653 : j += (1 << s); -; 3654 : } -; 3655 : } -; 3656 : ++next_code[s]; -; 3657 : } -; 3658 : } -; 3659 : return 1; -; 3660 : } -; 3661 : -; 3662 : // zlib-from-memory implementation for PNG reading -; 3663 : // because PNG allows splitting the zlib stream arbitrarily, -; 3664 : // and it's annoying structurally to have PNG call ZLIB call PNG, -; 3665 : // we require PNG read all the IDATs and combine them into a single -; 3666 : // memory buffer -; 3667 : -; 3668 : typedef struct -; 3669 : { -; 3670 : stbi_uc* zbuffer, * zbuffer_end; -; 3671 : int num_bits; -; 3672 : stbi__uint32 code_buffer; -; 3673 : -; 3674 : char* zout; -; 3675 : char* zout_start; -; 3676 : char* zout_end; -; 3677 : int z_expandable; -; 3678 : -; 3679 : stbi__zhuffman z_length, z_distance; -; 3680 : } stbi__zbuf; -; 3681 : -; 3682 : stbi_inline static int stbi__zeof(stbi__zbuf* z) -; 3683 : { -; 3684 : return (z->zbuffer >= z->zbuffer_end); -; 3685 : } -; 3686 : -; 3687 : stbi_inline static stbi_uc stbi__zget8(stbi__zbuf* z) -; 3688 : { -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ -; 3697 : return; -; 3698 : } -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; -; 3700 : z->num_bits += 8; -; 3701 : } while (z->num_bits <= 24); -; 3702 : } -; 3703 : -; 3704 : stbi_inline static unsigned int stbi__zreceive(stbi__zbuf* z, int n) -; 3705 : { -; 3706 : unsigned int k; -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); -; 3708 : k = z->code_buffer & ((1 << n) - 1); -; 3709 : z->code_buffer >>= n; -; 3710 : z->num_bits -= n; -; 3711 : return k; -; 3712 : } -; 3713 : -; 3714 : static int stbi__zhuffman_decode_slowpath(stbi__zbuf* a, stbi__zhuffman* z) -; 3715 : { -; 3716 : int b, s, k; -; 3717 : // not resolved by fast table, so compute it the slow way -; 3718 : // use jpeg approach, which requires MSbits at top -; 3719 : k = stbi__bit_reverse(a->code_buffer, 16); -; 3720 : for (s = STBI__ZFAST_BITS + 1; ; ++s) -; 3721 : if (k < z->maxcode[s]) -; 3722 : break; -; 3723 : if (s >= 16) return -1; // invalid code! -; 3724 : // code size is s, so: -; 3725 : b = (k >> (16 - s)) - z->firstcode[s] + z->firstsymbol[s]; -; 3726 : if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! -; 3727 : if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. -; 3728 : a->code_buffer >>= s; -; 3729 : a->num_bits -= s; -; 3730 : return z->value[b]; -; 3731 : } -; 3732 : -; 3733 : stbi_inline static int stbi__zhuffman_decode(stbi__zbuf* a, stbi__zhuffman* z) -; 3734 : { -; 3735 : int b, s; -; 3736 : if (a->num_bits < 16) { -; 3737 : if (stbi__zeof(a)) { -; 3738 : return -1; /* report error for unexpected end of data. */ -; 3739 : } -; 3740 : stbi__fill_bits(a); -; 3741 : } -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; -; 3743 : if (b) { -; 3744 : s = b >> 9; -; 3745 : a->code_buffer >>= s; -; 3746 : a->num_bits -= s; -; 3747 : return b & 511; -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); -; 3750 : } -; 3751 : -; 3752 : static int stbi__zexpand(stbi__zbuf* z, char* zout, int n) // need to make room for n bytes -; 3753 : { -; 3754 : char* q; -; 3755 : unsigned int cur, limit, old_limit; -; 3756 : z->zout = zout; -; 3757 : if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG"); -; 3758 : cur = (unsigned int)(z->zout - z->zout_start); -; 3759 : limit = old_limit = (unsigned)(z->zout_end - z->zout_start); -; 3760 : if (UINT_MAX - cur < (unsigned)n) return stbi__err("outofmem", "Out of memory"); -; 3761 : while (cur + n > limit) { -; 3762 : if (limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); -; 3763 : limit *= 2; -; 3764 : } -; 3765 : q = (char*)STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); -; 3766 : STBI_NOTUSED(old_limit); -; 3767 : if (q == NULL) return stbi__err("outofmem", "Out of memory"); -; 3768 : z->zout_start = q; -; 3769 : z->zout = q + cur; -; 3770 : z->zout_end = q + limit; -; 3771 : return 1; -; 3772 : } -; 3773 : -; 3774 : static const int stbi__zlength_base[31] = { -; 3775 : 3,4,5,6,7,8,9,10,11,13, -; 3776 : 15,17,19,23,27,31,35,43,51,59, -; 3777 : 67,83,99,115,131,163,195,227,258,0,0 }; -; 3778 : -; 3779 : static const int stbi__zlength_extra[31] = -; 3780 : { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; -; 3781 : -; 3782 : static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, -; 3783 : 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0 }; -; 3784 : -; 3785 : static const int stbi__zdist_extra[32] = -; 3786 : { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 }; -; 3787 : -; 3788 : static int stbi__parse_huffman_block(stbi__zbuf* a) -; 3789 : { -; 3790 : char* zout = a->zout; -; 3791 : for (;;) { -; 3792 : int z = stbi__zhuffman_decode(a, &a->z_length); -; 3793 : if (z < 256) { -; 3794 : if (z < 0) return stbi__err("bad huffman code", "Corrupt PNG"); // error in huffman codes -; 3795 : if (zout >= a->zout_end) { -; 3796 : if (!stbi__zexpand(a, zout, 1)) return 0; -; 3797 : zout = a->zout; -; 3798 : } -; 3799 : *zout++ = (char)z; -; 3800 : } -; 3801 : else { -; 3802 : stbi_uc* p; -; 3803 : int len, dist; -; 3804 : if (z == 256) { -; 3805 : a->zout = zout; -; 3806 : return 1; -; 3807 : } -; 3808 : if (z >= 286) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data -; 3809 : z -= 257; -; 3810 : len = stbi__zlength_base[z]; -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); -; 3812 : z = stbi__zhuffman_decode(a, &a->z_distance); -; 3813 : if (z < 0 || z >= 30) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data -; 3814 : dist = stbi__zdist_base[z]; -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); -; 3816 : if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG"); -; 3817 : if (zout + len > a->zout_end) { -; 3818 : if (!stbi__zexpand(a, zout, len)) return 0; -; 3819 : zout = a->zout; -; 3820 : } -; 3821 : p = (stbi_uc*)(zout - dist); -; 3822 : if (dist == 1) { // run of one byte; common in images. -; 3823 : stbi_uc v = *p; -; 3824 : if (len) { do *zout++ = v; while (--len); } -; 3825 : } -; 3826 : else { -; 3827 : if (len) { do *zout++ = *p++; while (--len); } -; 3828 : } -; 3829 : } -; 3830 : } -; 3831 : } -; 3832 : -; 3833 : static int stbi__compute_huffman_codes(stbi__zbuf* a) -; 3834 : { -; 3835 : static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; -; 3836 : stbi__zhuffman z_codelength; -; 3837 : stbi_uc lencodes[286 + 32 + 137];//padding for maximum single op -; 3838 : stbi_uc codelength_sizes[19]; -; 3839 : int i, n; -; 3840 : -; 3841 : int hlit = stbi__zreceive(a, 5) + 257; -; 3842 : int hdist = stbi__zreceive(a, 5) + 1; -; 3843 : int hclen = stbi__zreceive(a, 4) + 4; -; 3844 : int ntot = hlit + hdist; -; 3845 : -; 3846 : memset(codelength_sizes, 0, sizeof(codelength_sizes)); -; 3847 : for (i = 0; i < hclen; ++i) { -; 3848 : int s = stbi__zreceive(a, 3); -; 3849 : codelength_sizes[length_dezigzag[i]] = (stbi_uc)s; -; 3850 : } -; 3851 : if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; -; 3852 : -; 3853 : n = 0; -; 3854 : while (n < ntot) { -; 3855 : int c = stbi__zhuffman_decode(a, &z_codelength); -; 3856 : if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3857 : if (c < 16) -; 3858 : lencodes[n++] = (stbi_uc)c; -; 3859 : else { -; 3860 : stbi_uc fill = 0; -; 3861 : if (c == 16) { -; 3862 : c = stbi__zreceive(a, 2) + 3; -; 3863 : if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3864 : fill = lencodes[n - 1]; -; 3865 : } -; 3866 : else if (c == 17) { -; 3867 : c = stbi__zreceive(a, 3) + 3; -; 3868 : } -; 3869 : else if (c == 18) { -; 3870 : c = stbi__zreceive(a, 7) + 11; -; 3871 : } -; 3872 : else { -; 3873 : return stbi__err("bad codelengths", "Corrupt PNG"); -; 3874 : } -; 3875 : if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3876 : memset(lencodes + n, fill, c); -; 3877 : n += c; -; 3878 : } -; 3879 : } -; 3880 : if (n != ntot) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3881 : if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; -; 3882 : if (!stbi__zbuild_huffman(&a->z_distance, lencodes + hlit, hdist)) return 0; -; 3883 : return 1; -; 3884 : } -; 3885 : -; 3886 : static int stbi__parse_uncompressed_block(stbi__zbuf* a) -; 3887 : { -; 3888 : stbi_uc header[4]; -; 3889 : int len, nlen, k; -; 3890 : if (a->num_bits & 7) -; 3891 : stbi__zreceive(a, a->num_bits & 7); // discard -; 3892 : // drain the bit-packed data into header -; 3893 : k = 0; -; 3894 : while (a->num_bits > 0) { -; 3895 : header[k++] = (stbi_uc)(a->code_buffer & 255); // suppress MSVC run-time check -; 3896 : a->code_buffer >>= 8; -; 3897 : a->num_bits -= 8; -; 3898 : } -; 3899 : if (a->num_bits < 0) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3900 : // now fill header the normal way -; 3901 : while (k < 4) -; 3902 : header[k++] = stbi__zget8(a); -; 3903 : len = header[1] * 256 + header[0]; -; 3904 : nlen = header[3] * 256 + header[2]; -; 3905 : if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3906 : if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG"); -; 3907 : if (a->zout + len > a->zout_end) -; 3908 : if (!stbi__zexpand(a, a->zout, len)) return 0; -; 3909 : memcpy(a->zout, a->zbuffer, len); -; 3910 : a->zbuffer += len; -; 3911 : a->zout += len; -; 3912 : return 1; -; 3913 : } -; 3914 : -; 3915 : static int stbi__parse_zlib_header(stbi__zbuf* a) -; 3916 : { -; 3917 : int cmf = stbi__zget8(a); -; 3918 : int cm = cmf & 15; -; 3919 : /* int cinfo = cmf >> 4; */ -; 3920 : int flg = stbi__zget8(a); -; 3921 : if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3922 : if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png -; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png -; 3925 : // window = 1 << (8 + cinfo)... but who cares, we fully buffer output -; 3926 : return 1; -; 3927 : } -; 3928 : -; 3929 : static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] = -; 3930 : { -; 3931 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3932 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3933 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3934 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3935 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3936 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3937 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3938 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3939 : 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 -; 3940 : }; -; 3941 : static const stbi_uc stbi__zdefault_distance[32] = -; 3942 : { -; 3943 : 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 -; 3944 : }; -; 3945 : /* -; 3946 : Init algorithm: -; 3947 : { -; 3948 : int i; // use <= to match clearly with spec -; 3949 : for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; -; 3950 : for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; -; 3951 : for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; -; 3952 : for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; -; 3953 : -; 3954 : for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; -; 3955 : } -; 3956 : */ -; 3957 : -; 3958 : static int stbi__parse_zlib(stbi__zbuf* a, int parse_header) -; 3959 : { -; 3960 : int final, type; -; 3961 : if (parse_header) -; 3962 : if (!stbi__parse_zlib_header(a)) return 0; -; 3963 : a->num_bits = 0; -; 3964 : a->code_buffer = 0; -; 3965 : do { -; 3966 : final = stbi__zreceive(a, 1); -; 3967 : type = stbi__zreceive(a, 2); -; 3968 : if (type == 0) { -; 3969 : if (!stbi__parse_uncompressed_block(a)) return 0; -; 3970 : } -; 3971 : else if (type == 3) { -; 3972 : return 0; -; 3973 : } -; 3974 : else { -; 3975 : if (type == 1) { -; 3976 : // use fixed code lengths -; 3977 : if (!stbi__zbuild_huffman(&a->z_length, stbi__zdefault_length, STBI__ZNSYMS)) return 0; -; 3978 : if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; -; 3979 : } -; 3980 : else { -; 3981 : if (!stbi__compute_huffman_codes(a)) return 0; -; 3982 : } -; 3983 : if (!stbi__parse_huffman_block(a)) return 0; -; 3984 : } -; 3985 : } while (!final); -; 3986 : return 1; -; 3987 : } -; 3988 : -; 3989 : static int stbi__do_zlib(stbi__zbuf* a, char* obuf, int olen, int exp, int parse_header) -; 3990 : { -; 3991 : a->zout_start = obuf; -; 3992 : a->zout = obuf; -; 3993 : a->zout_end = obuf + olen; -; 3994 : a->z_expandable = exp; -; 3995 : -; 3996 : return stbi__parse_zlib(a, parse_header); -; 3997 : } -; 3998 : -; 3999 : STBIDEF char* stbi_zlib_decode_malloc_guesssize(const char* buffer, int len, int initial_size, int* outlen) -; 4000 : { -; 4001 : stbi__zbuf a; -; 4002 : char* p = (char*)stbi__malloc(initial_size); -; 4003 : if (p == NULL) return NULL; -; 4004 : a.zbuffer = (stbi_uc*)buffer; -; 4005 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4006 : if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { -; 4007 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4008 : return a.zout_start; -; 4009 : } -; 4010 : else { -; 4011 : STBI_FREE(a.zout_start); -; 4012 : return NULL; -; 4013 : } -; 4014 : } -; 4015 : -; 4016 : STBIDEF char* stbi_zlib_decode_malloc(char const* buffer, int len, int* outlen) -; 4017 : { -; 4018 : return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); -; 4019 : } -; 4020 : -; 4021 : STBIDEF char* stbi_zlib_decode_malloc_guesssize_headerflag(const char* buffer, int len, int initial_size, int* outlen, int parse_header) -; 4022 : { -; 4023 : stbi__zbuf a; -; 4024 : char* p = (char*)stbi__malloc(initial_size); -; 4025 : if (p == NULL) return NULL; -; 4026 : a.zbuffer = (stbi_uc*)buffer; -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4028 : if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { -; 4029 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4030 : return a.zout_start; -; 4031 : } -; 4032 : else { -; 4033 : STBI_FREE(a.zout_start); -; 4034 : return NULL; -; 4035 : } -; 4036 : } -; 4037 : -; 4038 : STBIDEF int stbi_zlib_decode_buffer(char* obuffer, int olen, char const* ibuffer, int ilen) -; 4039 : { -; 4040 : stbi__zbuf a; -; 4041 : a.zbuffer = (stbi_uc*)ibuffer; -; 4042 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4043 : if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) -; 4044 : return (int)(a.zout - a.zout_start); -; 4045 : else -; 4046 : return -1; -; 4047 : } -; 4048 : -; 4049 : STBIDEF char* stbi_zlib_decode_noheader_malloc(char const* buffer, int len, int* outlen) -; 4050 : { -; 4051 : stbi__zbuf a; -; 4052 : char* p = (char*)stbi__malloc(16384); -; 4053 : if (p == NULL) return NULL; -; 4054 : a.zbuffer = (stbi_uc*)buffer; -; 4055 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4056 : if (stbi__do_zlib(&a, p, 16384, 1, 0)) { -; 4057 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4058 : return a.zout_start; -; 4059 : } -; 4060 : else { -; 4061 : STBI_FREE(a.zout_start); -; 4062 : return NULL; -; 4063 : } -; 4064 : } -; 4065 : -; 4066 : STBIDEF int stbi_zlib_decode_noheader_buffer(char* obuffer, int olen, const char* ibuffer, int ilen) -; 4067 : { -; 4068 : stbi__zbuf a; -; 4069 : a.zbuffer = (stbi_uc*)ibuffer; -; 4070 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4071 : if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) -; 4072 : return (int)(a.zout - a.zout_start); -; 4073 : else -; 4074 : return -1; -; 4075 : } -; 4076 : #endif -; 4077 : -; 4078 : // public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 -; 4079 : // simple implementation -; 4080 : // - only 8-bit samples -; 4081 : // - no CRC checking -; 4082 : // - allocates lots of intermediate memory -; 4083 : // - avoids problem of streaming data between subsystems -; 4084 : // - avoids explicit window management -; 4085 : // performance -; 4086 : // - uses stb_zlib, a PD zlib implementation with fast huffman decoding -; 4087 : -; 4088 : #ifndef STBI_NO_PNG -; 4089 : typedef struct -; 4090 : { -; 4091 : stbi__uint32 length; -; 4092 : stbi__uint32 type; -; 4093 : } stbi__pngchunk; -; 4094 : -; 4095 : static stbi__pngchunk stbi__get_chunk_header(stbi__context* s) -; 4096 : { -; 4097 : stbi__pngchunk c; -; 4098 : c.length = stbi__get32be(s); -; 4099 : c.type = stbi__get32be(s); -; 4100 : return c; -; 4101 : } -; 4102 : -; 4103 : static int stbi__check_png_header(stbi__context* s) -; 4104 : { -; 4105 : static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; -; 4106 : int i; -; 4107 : for (i = 0; i < 8; ++i) -; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); -; 4109 : return 1; -; 4110 : } -; 4111 : -; 4112 : typedef struct -; 4113 : { -; 4114 : stbi__context* s; -; 4115 : stbi_uc* idata, * expanded, * out; -; 4116 : int depth; -; 4117 : } stbi__png; -; 4118 : -; 4119 : enum { -; 4120 : STBI__F_none = 0, -; 4121 : STBI__F_sub = 1, -; 4122 : STBI__F_up = 2, -; 4123 : STBI__F_avg = 3, -; 4124 : STBI__F_paeth = 4, -; 4125 : // synthetic filters used for first scanline to avoid needing a dummy row of 0s -; 4126 : STBI__F_avg_first, -; 4127 : STBI__F_paeth_first -; 4128 : }; -; 4129 : -; 4130 : static stbi_uc first_row_filter[5] = -; 4131 : { -; 4132 : STBI__F_none, -; 4133 : STBI__F_sub, -; 4134 : STBI__F_none, -; 4135 : STBI__F_avg_first, -; 4136 : STBI__F_paeth_first -; 4137 : }; -; 4138 : -; 4139 : static int stbi__paeth(int a, int b, int c) -; 4140 : { -; 4141 : int p = a + b - c; -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); -; 4144 : int pc = abs(p - c); -; 4145 : if (pa <= pb && pa <= pc) return a; -; 4146 : if (pb <= pc) return b; -; 4147 : return c; -; 4148 : } -; 4149 : -; 4150 : static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; -; 4151 : -; 4152 : // create the png data from post-deflated data -; 4153 : static int stbi__create_png_image_raw(stbi__png* a, stbi_uc* raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -; 4154 : { -; 4155 : int bytes = (depth == 16 ? 2 : 1); -; 4156 : stbi__context* s = a->s; -; 4157 : stbi__uint32 i, j, stride = x * out_n * bytes; -; 4158 : stbi__uint32 img_len, img_width_bytes; -; 4159 : int k; -; 4160 : int img_n = s->img_n; // copy it into a local for later -; 4161 : -; 4162 : int output_bytes = out_n * bytes; -; 4163 : int filter_bytes = img_n * bytes; -; 4164 : int width = x; -; 4165 : -; 4166 : STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1); -; 4167 : a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into -; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); -; 4169 : -; 4170 : if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); -; 4171 : img_width_bytes = (((img_n * x * depth) + 7) >> 3); -; 4172 : img_len = (img_width_bytes + 1) * y; -; 4173 : -; 4174 : // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, -; 4175 : // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), -; 4176 : // so just check for raw_len < img_len always. -; 4177 : if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG"); -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { -; 4180 : stbi_uc* cur = a->out + stride * j; -; 4181 : stbi_uc* prior; -; 4182 : int filter = *raw++; -; 4183 : -; 4184 : if (filter > 4) -; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); -; 4186 : -; 4187 : if (depth < 8) { -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); -; 4189 : cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place -; 4190 : filter_bytes = 1; -; 4191 : width = img_width_bytes; -; 4192 : } -; 4193 : prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above -; 4194 : -; 4195 : // if first row, use special filter that doesn't sample previous row -; 4196 : if (j == 0) filter = first_row_filter[filter]; -; 4197 : -; 4198 : // handle first byte explicitly -; 4199 : for (k = 0; k < filter_bytes; ++k) { -; 4200 : switch (filter) { -; 4201 : case STBI__F_none: cur[k] = raw[k]; break; -; 4202 : case STBI__F_sub: cur[k] = raw[k]; break; -; 4203 : case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; -; 4204 : case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break; -; 4205 : case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break; -; 4206 : case STBI__F_avg_first: cur[k] = raw[k]; break; -; 4207 : case STBI__F_paeth_first: cur[k] = raw[k]; break; -; 4208 : } -; 4209 : } -; 4210 : -; 4211 : if (depth == 8) { -; 4212 : if (img_n != out_n) -; 4213 : cur[img_n] = 255; // first pixel -; 4214 : raw += img_n; -; 4215 : cur += out_n; -; 4216 : prior += out_n; -; 4217 : } -; 4218 : else if (depth == 16) { -; 4219 : if (img_n != out_n) { -; 4220 : cur[filter_bytes] = 255; // first pixel top byte -; 4221 : cur[filter_bytes + 1] = 255; // first pixel bottom byte -; 4222 : } -; 4223 : raw += filter_bytes; -; 4224 : cur += output_bytes; -; 4225 : prior += output_bytes; -; 4226 : } -; 4227 : else { -; 4228 : raw += 1; -; 4229 : cur += 1; -; 4230 : prior += 1; -; 4231 : } -; 4232 : -; 4233 : // this is a little gross, so that we don't switch per-pixel or per-component -; 4234 : if (depth < 8 || img_n == out_n) { -; 4235 : int nk = (width - 1) * filter_bytes; -; 4236 : #define STBI__CASE(f) \ -; 4237 : case f: \ -; 4238 : for (k=0; k < nk; ++k) -; 4239 : switch (filter) { -; 4240 : // "none" filter turns into a memcpy here; make that explicit. -; 4241 : case STBI__F_none: memcpy(cur, raw, nk); break; -; 4242 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break; -; 4243 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4244 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break; -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; -; 4246 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break; -; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; -; 4248 : } -; 4249 : #undef STBI__CASE -; 4250 : raw += nk; -; 4251 : } -; 4252 : else { -; 4253 : STBI_ASSERT(img_n + 1 == out_n); -; 4254 : #define STBI__CASE(f) \ -; 4255 : case f: \ -; 4256 : for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ -; 4257 : for (k=0; k < filter_bytes; ++k) -; 4258 : switch (filter) { -; 4259 : STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; -; 4260 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break; -; 4261 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4262 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break; -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; -; 4264 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break; -; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; -; 4266 : } -; 4267 : #undef STBI__CASE -; 4268 : -; 4269 : // the loop above sets the high byte of the pixels' alpha, but for -; 4270 : // 16 bit png files we also need the low byte set. we'll do that here. -; 4271 : if (depth == 16) { -; 4272 : cur = a->out + stride * j; // start at the beginning of the row again -; 4273 : for (i = 0; i < x; ++i, cur += output_bytes) { -; 4274 : cur[filter_bytes + 1] = 255; -; 4275 : } -; 4276 : } -; 4277 : } -; 4278 : } -; 4279 : -; 4280 : // we make a separate pass to expand bits to pixels; for performance, -; 4281 : // this could run two scanlines behind the above code, so it won't -; 4282 : // intefere with filtering but will still be in the cache. -; 4283 : if (depth < 8) { -; 4284 : for (j = 0; j < y; ++j) { -; 4285 : stbi_uc* cur = a->out + stride * j; -; 4286 : stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes; -; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit -; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop -; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range -; 4290 : -; 4291 : // note that the final byte might overshoot and write more data than desired. -; 4292 : // we can allocate enough data that this never writes out of memory, but it -; 4293 : // could also overwrite the next scanline. can it overwrite non-empty data -; 4294 : // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. -; 4295 : // so we need to explicitly clamp the final ones -; 4296 : -; 4297 : if (depth == 4) { -; 4298 : for (k = x * img_n; k >= 2; k -= 2, ++in) { -; 4299 : *cur++ = scale * ((*in >> 4)); -; 4300 : *cur++ = scale * ((*in) & 0x0f); -; 4301 : } -; 4302 : if (k > 0) *cur++ = scale * ((*in >> 4)); -; 4303 : } -; 4304 : else if (depth == 2) { -; 4305 : for (k = x * img_n; k >= 4; k -= 4, ++in) { -; 4306 : *cur++ = scale * ((*in >> 6)); -; 4307 : *cur++ = scale * ((*in >> 4) & 0x03); -; 4308 : *cur++ = scale * ((*in >> 2) & 0x03); -; 4309 : *cur++ = scale * ((*in) & 0x03); -; 4310 : } -; 4311 : if (k > 0) *cur++ = scale * ((*in >> 6)); -; 4312 : if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); -; 4313 : if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); -; 4314 : } -; 4315 : else if (depth == 1) { -; 4316 : for (k = x * img_n; k >= 8; k -= 8, ++in) { -; 4317 : *cur++ = scale * ((*in >> 7)); -; 4318 : *cur++ = scale * ((*in >> 6) & 0x01); -; 4319 : *cur++ = scale * ((*in >> 5) & 0x01); -; 4320 : *cur++ = scale * ((*in >> 4) & 0x01); -; 4321 : *cur++ = scale * ((*in >> 3) & 0x01); -; 4322 : *cur++ = scale * ((*in >> 2) & 0x01); -; 4323 : *cur++ = scale * ((*in >> 1) & 0x01); -; 4324 : *cur++ = scale * ((*in) & 0x01); -; 4325 : } -; 4326 : if (k > 0) *cur++ = scale * ((*in >> 7)); -; 4327 : if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); -; 4328 : if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); -; 4329 : if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); -; 4330 : if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); -; 4331 : if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); -; 4332 : if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); -; 4333 : } -; 4334 : if (img_n != out_n) { -; 4335 : int q; -; 4336 : // insert alpha = 255 -; 4337 : cur = a->out + stride * j; -; 4338 : if (img_n == 1) { -; 4339 : for (q = x - 1; q >= 0; --q) { -; 4340 : cur[q * 2 + 1] = 255; -; 4341 : cur[q * 2 + 0] = cur[q]; -; 4342 : } -; 4343 : } -; 4344 : else { -; 4345 : STBI_ASSERT(img_n == 3); -; 4346 : for (q = x - 1; q >= 0; --q) { -; 4347 : cur[q * 4 + 3] = 255; -; 4348 : cur[q * 4 + 2] = cur[q * 3 + 2]; -; 4349 : cur[q * 4 + 1] = cur[q * 3 + 1]; -; 4350 : cur[q * 4 + 0] = cur[q * 3 + 0]; -; 4351 : } -; 4352 : } -; 4353 : } -; 4354 : } -; 4355 : } -; 4356 : else if (depth == 16) { -; 4357 : // force the image data from big-endian to platform-native. -; 4358 : // this is done in a separate pass due to the decoding relying -; 4359 : // on the data being untouched, but could probably be done -; 4360 : // per-line during decode if care is taken. -; 4361 : stbi_uc* cur = a->out; -; 4362 : stbi__uint16* cur16 = (stbi__uint16*)cur; -; 4363 : -; 4364 : for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) { -; 4365 : *cur16 = (cur[0] << 8) | cur[1]; -; 4366 : } -; 4367 : } -; 4368 : -; 4369 : return 1; -; 4370 : } -; 4371 : -; 4372 : static int stbi__create_png_image(stbi__png* a, stbi_uc* image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -; 4373 : { -; 4374 : int bytes = (depth == 16 ? 2 : 1); -; 4375 : int out_bytes = out_n * bytes; -; 4376 : stbi_uc* final; -; 4377 : int p; -; 4378 : if (!interlaced) -; 4379 : return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); -; 4380 : -; 4381 : // de-interlacing -; 4382 : final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); -; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); -; 4384 : for (p = 0; p < 7; ++p) { -; 4385 : int xorig[] = { 0,4,0,2,0,1,0 }; -; 4386 : int yorig[] = { 0,0,4,0,2,0,1 }; -; 4387 : int xspc[] = { 8,8,4,4,2,2,1 }; -; 4388 : int yspc[] = { 8,8,8,4,4,2,2 }; -; 4389 : int i, j, x, y; -; 4390 : // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 -; 4391 : x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p]; -; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; -; 4393 : if (x && y) { -; 4394 : stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; -; 4395 : if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { -; 4396 : STBI_FREE(final); -; 4397 : return 0; -; 4398 : } -; 4399 : for (j = 0; j < y; ++j) { -; 4400 : for (i = 0; i < x; ++i) { -; 4401 : int out_y = j * yspc[p] + yorig[p]; -; 4402 : int out_x = i * xspc[p] + xorig[p]; -; 4403 : memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, -; 4404 : a->out + (j * x + i) * out_bytes, out_bytes); -; 4405 : } -; 4406 : } -; 4407 : STBI_FREE(a->out); -; 4408 : image_data += img_len; -; 4409 : image_data_len -= img_len; -; 4410 : } -; 4411 : } -; 4412 : a->out = final; -; 4413 : -; 4414 : return 1; -; 4415 : } -; 4416 : -; 4417 : static int stbi__compute_transparency(stbi__png* z, stbi_uc tc[3], int out_n) -; 4418 : { -; 4419 : stbi__context* s = z->s; -; 4420 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4421 : stbi_uc* p = z->out; -; 4422 : -; 4423 : // compute color-based transparency, assuming we've -; 4424 : // already got 255 as the alpha value in the output -; 4425 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4426 : -; 4427 : if (out_n == 2) { -; 4428 : for (i = 0; i < pixel_count; ++i) { -; 4429 : p[1] = (p[0] == tc[0] ? 0 : 255); -; 4430 : p += 2; -; 4431 : } -; 4432 : } -; 4433 : else { -; 4434 : for (i = 0; i < pixel_count; ++i) { -; 4435 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4436 : p[3] = 0; -; 4437 : p += 4; -; 4438 : } -; 4439 : } -; 4440 : return 1; -; 4441 : } -; 4442 : -; 4443 : static int stbi__compute_transparency16(stbi__png* z, stbi__uint16 tc[3], int out_n) -; 4444 : { -; 4445 : stbi__context* s = z->s; -; 4446 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4447 : stbi__uint16* p = (stbi__uint16*)z->out; -; 4448 : -; 4449 : // compute color-based transparency, assuming we've -; 4450 : // already got 65535 as the alpha value in the output -; 4451 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4452 : -; 4453 : if (out_n == 2) { -; 4454 : for (i = 0; i < pixel_count; ++i) { -; 4455 : p[1] = (p[0] == tc[0] ? 0 : 65535); -; 4456 : p += 2; -; 4457 : } -; 4458 : } -; 4459 : else { -; 4460 : for (i = 0; i < pixel_count; ++i) { -; 4461 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4462 : p[3] = 0; -; 4463 : p += 4; -; 4464 : } -; 4465 : } -; 4466 : return 1; -; 4467 : } -; 4468 : -; 4469 : static int stbi__expand_png_palette(stbi__png* a, stbi_uc* palette, int len, int pal_img_n) -; 4470 : { -; 4471 : stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; -; 4472 : stbi_uc* p, * temp_out, * orig = a->out; -; 4473 : -; 4474 : p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0); -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4476 : -; 4477 : // between here and free(out) below, exitting would leak -; 4478 : temp_out = p; -; 4479 : -; 4480 : if (pal_img_n == 3) { -; 4481 : for (i = 0; i < pixel_count; ++i) { -; 4482 : int n = orig[i] * 4; -; 4483 : p[0] = palette[n]; -; 4484 : p[1] = palette[n + 1]; -; 4485 : p[2] = palette[n + 2]; -; 4486 : p += 3; -; 4487 : } -; 4488 : } -; 4489 : else { -; 4490 : for (i = 0; i < pixel_count; ++i) { -; 4491 : int n = orig[i] * 4; -; 4492 : p[0] = palette[n]; -; 4493 : p[1] = palette[n + 1]; -; 4494 : p[2] = palette[n + 2]; -; 4495 : p[3] = palette[n + 3]; -; 4496 : p += 4; -; 4497 : } -; 4498 : } -; 4499 : STBI_FREE(a->out); -; 4500 : a->out = temp_out; -; 4501 : -; 4502 : STBI_NOTUSED(len); -; 4503 : -; 4504 : return 1; -; 4505 : } -; 4506 : -; 4507 : static int stbi__unpremultiply_on_load_global = 0; -; 4508 : static int stbi__de_iphone_flag_global = 0; -; 4509 : -; 4510 : STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) -; 4511 : { -; 4512 : stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; -; 4513 : } -; 4514 : -; 4515 : STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) -; 4516 : { -; 4517 : stbi__de_iphone_flag_global = flag_true_if_should_convert; -; 4518 : } -; 4519 : -; 4520 : #ifndef STBI_THREAD_LOCAL -; 4521 : #define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global -; 4522 : #define stbi__de_iphone_flag stbi__de_iphone_flag_global -; 4523 : #else -; 4524 : static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; -; 4525 : static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; -; 4526 : -; 4527 : STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) -; 4528 : { -; 4529 : stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; -; 4530 : stbi__unpremultiply_on_load_set = 1; -; 4531 : } -; 4532 : -; 4533 : STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert) -; 4534 : { -; 4535 : stbi__de_iphone_flag_local = flag_true_if_should_convert; -; 4536 : stbi__de_iphone_flag_set = 1; -; 4537 : } -; 4538 : -; 4539 : #define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \ -; 4540 : ? stbi__unpremultiply_on_load_local \ -; 4541 : : stbi__unpremultiply_on_load_global) -; 4542 : #define stbi__de_iphone_flag (stbi__de_iphone_flag_set \ -; 4543 : ? stbi__de_iphone_flag_local \ -; 4544 : : stbi__de_iphone_flag_global) -; 4545 : #endif // STBI_THREAD_LOCAL -; 4546 : -; 4547 : static void stbi__de_iphone(stbi__png* z) -; 4548 : { -; 4549 : stbi__context* s = z->s; -; 4550 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4551 : stbi_uc* p = z->out; -; 4552 : -; 4553 : if (s->img_out_n == 3) { // convert bgr to rgb -; 4554 : for (i = 0; i < pixel_count; ++i) { -; 4555 : stbi_uc t = p[0]; -; 4556 : p[0] = p[2]; -; 4557 : p[2] = t; -; 4558 : p += 3; -; 4559 : } -; 4560 : } -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { -; 4566 : stbi_uc a = p[3]; -; 4567 : stbi_uc t = p[0]; -; 4568 : if (a) { -; 4569 : stbi_uc half = a / 2; -; 4570 : p[0] = (p[2] * 255 + half) / a; -; 4571 : p[1] = (p[1] * 255 + half) / a; -; 4572 : p[2] = (t * 255 + half) / a; -; 4573 : } -; 4574 : else { -; 4575 : p[0] = p[2]; -; 4576 : p[2] = t; -; 4577 : } -; 4578 : p += 4; -; 4579 : } -; 4580 : } -; 4581 : else { -; 4582 : // convert bgr to rgb -; 4583 : for (i = 0; i < pixel_count; ++i) { -; 4584 : stbi_uc t = p[0]; -; 4585 : p[0] = p[2]; -; 4586 : p[2] = t; -; 4587 : p += 4; -; 4588 : } -; 4589 : } -; 4590 : } -; 4591 : } -; 4592 : -; 4593 : #define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) -; 4594 : -; 4595 : static int stbi__parse_png_file(stbi__png* z, int scan, int req_comp) -; 4596 : { -; 4597 : stbi_uc palette[1024], pal_img_n = 0; -; 4598 : stbi_uc has_trans = 0, tc[3] = { 0 }; -; 4599 : stbi__uint16 tc16[3]; -; 4600 : stbi__uint32 ioff = 0, idata_limit = 0, i, pal_len = 0; -; 4601 : int first = 1, k, interlace = 0, color = 0, is_iphone = 0; -; 4602 : stbi__context* s = z->s; -; 4603 : -; 4604 : z->expanded = NULL; -; 4605 : z->idata = NULL; -; 4606 : z->out = NULL; -; 4607 : -; 4608 : if (!stbi__check_png_header(s)) return 0; -; 4609 : -; 4610 : if (scan == STBI__SCAN_type) return 1; -; 4611 : -; 4612 : for (;;) { -; 4613 : stbi__pngchunk c = stbi__get_chunk_header(s); -; 4614 : switch (c.type) { -; 4615 : case STBI__PNG_TYPE('C', 'g', 'B', 'I'): -; 4616 : is_iphone = 1; -; 4617 : stbi__skip(s, c.length); -; 4618 : break; -; 4619 : case STBI__PNG_TYPE('I', 'H', 'D', 'R'): { -; 4620 : int comp, filter; -; 4621 : if (!first) return stbi__err("multiple IHDR", "Corrupt PNG"); -; 4622 : first = 0; -; 4623 : if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG"); -; 4624 : s->img_x = stbi__get32be(s); -; 4625 : s->img_y = stbi__get32be(s); -; 4626 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4627 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4628 : z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only"); -; 4629 : color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype", "Corrupt PNG"); -; 4630 : if (color == 3 && z->depth == 16) return stbi__err("bad ctype", "Corrupt PNG"); -; 4631 : if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype", "Corrupt PNG"); -; 4632 : comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG"); -; 4633 : filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG"); -; 4634 : interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG"); -; 4635 : if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG"); -; 4636 : if (!pal_img_n) { -; 4637 : s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); -; 4638 : if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); -; 4639 : } -; 4640 : else { -; 4641 : // if paletted, then pal_n is our final components, and -; 4642 : // img_n is # components to decompress/filter. -; 4643 : s->img_n = 1; -; 4644 : if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large", "Corrupt PNG"); -; 4645 : } -; 4646 : // even with SCAN_header, have to scan to see if we have a tRNS -; 4647 : break; -; 4648 : } -; 4649 : -; 4650 : case STBI__PNG_TYPE('P', 'L', 'T', 'E'): { -; 4651 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4652 : if (c.length > 256 * 3) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4653 : pal_len = c.length / 3; -; 4654 : if (pal_len * 3 != c.length) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4655 : for (i = 0; i < pal_len; ++i) { -; 4656 : palette[i * 4 + 0] = stbi__get8(s); -; 4657 : palette[i * 4 + 1] = stbi__get8(s); -; 4658 : palette[i * 4 + 2] = stbi__get8(s); -; 4659 : palette[i * 4 + 3] = 255; -; 4660 : } -; 4661 : break; -; 4662 : } -; 4663 : -; 4664 : case STBI__PNG_TYPE('t', 'R', 'N', 'S'): { -; 4665 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4666 : if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG"); -; 4667 : if (pal_img_n) { -; 4668 : if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } -; 4669 : if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG"); -; 4670 : if (c.length > pal_len) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4671 : pal_img_n = 4; -; 4672 : for (i = 0; i < c.length; ++i) -; 4673 : palette[i * 4 + 3] = stbi__get8(s); -; 4674 : } -; 4675 : else { -; 4676 : if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG"); -; 4677 : if (c.length != (stbi__uint32)s->img_n * 2) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4678 : has_trans = 1; -; 4679 : // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. -; 4680 : if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } -; 4681 : if (z->depth == 16) { -; 4682 : for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is -; 4683 : } -; 4684 : else { -; 4685 : for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger -; 4686 : } -; 4687 : } -; 4688 : break; -; 4689 : } -; 4690 : -; 4691 : case STBI__PNG_TYPE('I', 'D', 'A', 'T'): { -; 4692 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4693 : if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG"); -; 4694 : if (scan == STBI__SCAN_header) { -; 4695 : // header scan definitely stops at first IDAT -; 4696 : if (pal_img_n) -; 4697 : s->img_n = pal_img_n; -; 4698 : return 1; -; 4699 : } -; 4700 : if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); -; 4701 : if ((int)(ioff + c.length) < (int)ioff) return 0; -; 4702 : if (ioff + c.length > idata_limit) { -; 4703 : stbi__uint32 idata_limit_old = idata_limit; -; 4704 : stbi_uc* p; -; 4705 : if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; -; 4706 : while (ioff + c.length > idata_limit) -; 4707 : idata_limit *= 2; -; 4708 : STBI_NOTUSED(idata_limit_old); -; 4709 : p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4710 : z->idata = p; -; 4711 : } -; 4712 : if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG"); -; 4713 : ioff += c.length; -; 4714 : break; -; 4715 : } -; 4716 : -; 4717 : case STBI__PNG_TYPE('I', 'E', 'N', 'D'): { -; 4718 : stbi__uint32 raw_len, bpl; -; 4719 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4720 : if (scan != STBI__SCAN_load) return 1; -; 4721 : if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG"); -; 4722 : // initial guess for decoded data size to avoid unnecessary reallocs -; 4723 : bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component -; 4724 : raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); -; 4726 : if (z->expanded == NULL) return 0; // zlib should set error -; 4727 : STBI_FREE(z->idata); z->idata = NULL; -; 4728 : if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans) -; 4729 : s->img_out_n = s->img_n + 1; -; 4730 : else -; 4731 : s->img_out_n = s->img_n; -; 4732 : if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; -; 4733 : if (has_trans) { -; 4734 : if (z->depth == 16) { -; 4735 : if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; -; 4736 : } -; 4737 : else { -; 4738 : if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; -; 4739 : } -; 4740 : } -; 4741 : if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) -; 4742 : stbi__de_iphone(z); -; 4743 : if (pal_img_n) { -; 4744 : // pal_img_n == 3 or 4 -; 4745 : s->img_n = pal_img_n; // record the actual colors we had -; 4746 : s->img_out_n = pal_img_n; -; 4747 : if (req_comp >= 3) s->img_out_n = req_comp; -; 4748 : if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) -; 4749 : return 0; -; 4750 : } -; 4751 : else if (has_trans) { -; 4752 : // non-paletted image with tRNS -> source image has (constant) alpha -; 4753 : ++s->img_n; -; 4754 : } -; 4755 : STBI_FREE(z->expanded); z->expanded = NULL; -; 4756 : // end of PNG chunk, read and skip CRC -; 4757 : stbi__get32be(s); -; 4758 : return 1; -; 4759 : } -; 4760 : -; 4761 : default: -; 4762 : // if critical, fail -; 4763 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4764 : if ((c.type & (1 << 29)) == 0) { -; 4765 : #ifndef STBI_NO_FAILURE_STRINGS -; 4766 : // not threadsafe -; 4767 : static char invalid_chunk[] = "XXXX PNG chunk not known"; -; 4768 : invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); -; 4769 : invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); -; 4770 : invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); -; 4771 : invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); -; 4772 : #endif -; 4773 : return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); -; 4774 : } -; 4775 : stbi__skip(s, c.length); -; 4776 : break; -; 4777 : } -; 4778 : // end of PNG chunk, read and skip CRC -; 4779 : stbi__get32be(s); -; 4780 : } -; 4781 : } -; 4782 : -; 4783 : static void* stbi__do_png(stbi__png* p, int* x, int* y, int* n, int req_comp, stbi__result_info* ri) -; 4784 : { -; 4785 : void* result = NULL; -; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { -; 4788 : if (p->depth <= 8) -; 4789 : ri->bits_per_channel = 8; -; 4790 : else if (p->depth == 16) -; 4791 : ri->bits_per_channel = 16; -; 4792 : else -; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); -; 4794 : result = p->out; -; 4795 : p->out = NULL; -; 4796 : if (req_comp && req_comp != p->s->img_out_n) { -; 4797 : if (ri->bits_per_channel == 8) -; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4799 : else -; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4801 : p->s->img_out_n = req_comp; -; 4802 : if (result == NULL) return result; -; 4803 : } -; 4804 : *x = p->s->img_x; -; 4805 : *y = p->s->img_y; -; 4806 : if (n) *n = p->s->img_n; -; 4807 : } -; 4808 : STBI_FREE(p->out); p->out = NULL; -; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; -; 4810 : STBI_FREE(p->idata); p->idata = NULL; -; 4811 : -; 4812 : return result; -; 4813 : } -; 4814 : -; 4815 : static void* stbi__png_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 4816 : { -; 4817 : stbi__png p; -; 4818 : p.s = s; -; 4819 : return stbi__do_png(&p, x, y, comp, req_comp, ri); -; 4820 : } -; 4821 : -; 4822 : static int stbi__png_test(stbi__context* s) -; 4823 : { -; 4824 : int r; -; 4825 : r = stbi__check_png_header(s); -; 4826 : stbi__rewind(s); -; 4827 : return r; -; 4828 : } -; 4829 : -; 4830 : static int stbi__png_info_raw(stbi__png* p, int* x, int* y, int* comp) -; 4831 : { -; 4832 : if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { -; 4833 : stbi__rewind(p->s); -; 4834 : return 0; -; 4835 : } -; 4836 : if (x) *x = p->s->img_x; -; 4837 : if (y) *y = p->s->img_y; -; 4838 : if (comp) *comp = p->s->img_n; -; 4839 : return 1; -; 4840 : } -; 4841 : -; 4842 : static int stbi__png_info(stbi__context* s, int* x, int* y, int* comp) -; 4843 : { -; 4844 : stbi__png p; -; 4845 : p.s = s; -; 4846 : return stbi__png_info_raw(&p, x, y, comp); -; 4847 : } -; 4848 : -; 4849 : static int stbi__png_is16(stbi__context* s) -; 4850 : { -; 4851 : stbi__png p; -; 4852 : p.s = s; -; 4853 : if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) -; 4854 : return 0; -; 4855 : if (p.depth != 16) { -; 4856 : stbi__rewind(p.s); -; 4857 : return 0; -; 4858 : } -; 4859 : return 1; -; 4860 : } -; 4861 : #endif -; 4862 : -; 4863 : // Microsoft/Windows BMP image -; 4864 : -; 4865 : #ifndef STBI_NO_BMP -; 4866 : static int stbi__bmp_test_raw(stbi__context* s) -; 4867 : { -; 4868 : int r; -; 4869 : int sz; -; 4870 : if (stbi__get8(s) != 'B') return 0; -; 4871 : if (stbi__get8(s) != 'M') return 0; -; 4872 : stbi__get32le(s); // discard filesize -; 4873 : stbi__get16le(s); // discard reserved -; 4874 : stbi__get16le(s); // discard reserved -; 4875 : stbi__get32le(s); // discard data offset -; 4876 : sz = stbi__get32le(s); -; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); -; 4878 : return r; -; 4879 : } -; 4880 : -; 4881 : static int stbi__bmp_test(stbi__context* s) -; 4882 : { -; 4883 : int r = stbi__bmp_test_raw(s); -; 4884 : stbi__rewind(s); -; 4885 : return r; -; 4886 : } -; 4887 : -; 4888 : // returns 0..31 for the highest set bit -; 4889 : static int stbi__high_bit(unsigned int z) -; 4890 : { -; 4891 : int n = 0; -; 4892 : if (z == 0) return -1; -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } -; 4898 : return n; -; 4899 : } -; 4900 : -; 4901 : static int stbi__bitcount(unsigned int a) -; 4902 : { -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits -; 4908 : return a & 0xff; -; 4909 : } -; 4910 : -; 4911 : // extract an arbitrarily-aligned N-bit value (N=bits) -; 4912 : // from v, and then make it 8-bits long and fractionally -; 4913 : // extend it to full full range. -; 4914 : static int stbi__shiftsigned(unsigned int v, int shift, int bits) -; 4915 : { -; 4916 : static unsigned int mul_table[9] = { -; 4917 : 0, -; 4918 : 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, -; 4919 : 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, -; 4920 : }; -; 4921 : static unsigned int shift_table[9] = { -; 4922 : 0, 0,0,1,0,2,4,6,0, -; 4923 : }; -; 4924 : if (shift < 0) -; 4925 : v <<= -shift; -; 4926 : else -; 4927 : v >>= shift; -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; -; 4932 : } -; 4933 : -; 4934 : typedef struct -; 4935 : { -; 4936 : int bpp, offset, hsz; -; 4937 : unsigned int mr, mg, mb, ma, all_a; -; 4938 : int extra_read; -; 4939 : } stbi__bmp_data; -; 4940 : -; 4941 : static int stbi__bmp_set_mask_defaults(stbi__bmp_data* info, int compress) -; 4942 : { -; 4943 : // BI_BITFIELDS specifies masks explicitly, don't override -; 4944 : if (compress == 3) -; 4945 : return 1; -; 4946 : -; 4947 : if (compress == 0) { -; 4948 : if (info->bpp == 16) { -; 4949 : info->mr = 31u << 10; -; 4950 : info->mg = 31u << 5; -; 4951 : info->mb = 31u << 0; -; 4952 : } -; 4953 : else if (info->bpp == 32) { -; 4954 : info->mr = 0xffu << 16; -; 4955 : info->mg = 0xffu << 8; -; 4956 : info->mb = 0xffu << 0; -; 4957 : info->ma = 0xffu << 24; -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 -; 4959 : } -; 4960 : else { -; 4961 : // otherwise, use defaults, which is all-0 -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; -; 4963 : } -; 4964 : return 1; -; 4965 : } -; 4966 : return 0; // error -; 4967 : } -; 4968 : -; 4969 : static void* stbi__bmp_parse_header(stbi__context* s, stbi__bmp_data* info) -; 4970 : { -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); -; 4973 : stbi__get32le(s); // discard filesize -; 4974 : stbi__get16le(s); // discard reserved -; 4975 : stbi__get16le(s); // discard reserved -; 4976 : info->offset = stbi__get32le(s); -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; -; 4979 : info->extra_read = 14; -; 4980 : -; 4981 : if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); -; 4982 : -; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); -; 4984 : if (hsz == 12) { -; 4985 : s->img_x = stbi__get16le(s); -; 4986 : s->img_y = stbi__get16le(s); -; 4987 : } -; 4988 : else { -; 4989 : s->img_x = stbi__get32le(s); -; 4990 : s->img_y = stbi__get32le(s); -; 4991 : } -; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); -; 4993 : info->bpp = stbi__get16le(s); -; 4994 : if (hsz != 12) { -; 4995 : int compress = stbi__get32le(s); -; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); -; 4997 : if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes -; 4998 : if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel -; 4999 : stbi__get32le(s); // discard sizeof -; 5000 : stbi__get32le(s); // discard hres -; 5001 : stbi__get32le(s); // discard vres -; 5002 : stbi__get32le(s); // discard colorsused -; 5003 : stbi__get32le(s); // discard max important -; 5004 : if (hsz == 40 || hsz == 56) { -; 5005 : if (hsz == 56) { -; 5006 : stbi__get32le(s); -; 5007 : stbi__get32le(s); -; 5008 : stbi__get32le(s); -; 5009 : stbi__get32le(s); -; 5010 : } -; 5011 : if (info->bpp == 16 || info->bpp == 32) { -; 5012 : if (compress == 0) { -; 5013 : stbi__bmp_set_mask_defaults(info, compress); -; 5014 : } -; 5015 : else if (compress == 3) { -; 5016 : info->mr = stbi__get32le(s); -; 5017 : info->mg = stbi__get32le(s); -; 5018 : info->mb = stbi__get32le(s); -; 5019 : info->extra_read += 12; -; 5020 : // not documented, but generated by photoshop and handled by mspaint -; 5021 : if (info->mr == info->mg && info->mg == info->mb) { -; 5022 : // ?!?!? -; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5024 : } -; 5025 : } -; 5026 : else -; 5027 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5028 : } -; 5029 : } -; 5030 : else { -; 5031 : // V4/V5 header -; 5032 : int i; -; 5033 : if (hsz != 108 && hsz != 124) -; 5034 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5035 : info->mr = stbi__get32le(s); -; 5036 : info->mg = stbi__get32le(s); -; 5037 : info->mb = stbi__get32le(s); -; 5038 : info->ma = stbi__get32le(s); -; 5039 : if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs -; 5040 : stbi__bmp_set_mask_defaults(info, compress); -; 5041 : stbi__get32le(s); // discard color space -; 5042 : for (i = 0; i < 12; ++i) -; 5043 : stbi__get32le(s); // discard color space parameters -; 5044 : if (hsz == 124) { -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; -; 5053 : } -; 5054 : -; 5055 : static void* stbi__bmp_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5056 : { -; 5057 : stbi_uc* out; -; 5058 : unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a; -; 5059 : stbi_uc pal[256][4]; -; 5060 : int psize = 0, i, j, width; -; 5061 : int flip_vertically, pad, target; -; 5062 : stbi__bmp_data info; -; 5063 : STBI_NOTUSED(ri); -; 5064 : -; 5065 : info.all_a = 255; -; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) -; 5067 : return NULL; // error code already set -; 5068 : -; 5069 : flip_vertically = ((int)s->img_y) > 0; -; 5070 : s->img_y = abs((int)s->img_y); -; 5071 : -; 5072 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5073 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5074 : -; 5075 : mr = info.mr; -; 5076 : mg = info.mg; -; 5077 : mb = info.mb; -; 5078 : ma = info.ma; -; 5079 : all_a = info.all_a; -; 5080 : -; 5081 : if (info.hsz == 12) { -; 5082 : if (info.bpp < 24) -; 5083 : psize = (info.offset - info.extra_read - 24) / 3; -; 5084 : } -; 5085 : else { -; 5086 : if (info.bpp < 16) -; 5087 : psize = (info.offset - info.extra_read - info.hsz) >> 2; -; 5088 : } -; 5089 : if (psize == 0) { -; 5090 : // accept some number of extra bytes after the header, but if the offset points either to before -; 5091 : // the header ends or implies a large amount of extra data, reject the file as malformed -; 5092 : int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); -; 5093 : int header_limit = 1024; // max we actually read is below 256 bytes currently. -; 5094 : int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. -; 5095 : if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { -; 5096 : return stbi__errpuc("bad header", "Corrupt BMP"); -; 5097 : } -; 5098 : // we established that bytes_read_so_far is positive and sensible. -; 5099 : // the first half of this test rejects offsets that are either too small positives, or -; 5100 : // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn -; 5101 : // ensures the number computed in the second half of the test can't overflow. -; 5102 : if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { -; 5103 : return stbi__errpuc("bad offset", "Corrupt BMP"); -; 5104 : } -; 5105 : else { -; 5106 : stbi__skip(s, info.offset - bytes_read_so_far); -; 5107 : } -; 5108 : } -; 5109 : -; 5110 : if (info.bpp == 24 && ma == 0xff000000) -; 5111 : s->img_n = 3; -; 5112 : else -; 5113 : s->img_n = ma ? 4 : 3; -; 5114 : if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 -; 5115 : target = req_comp; -; 5116 : else -; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert -; 5118 : -; 5119 : // sanity-check size -; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) -; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); -; 5122 : -; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); -; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5125 : if (info.bpp < 16) { -; 5126 : int z = 0; -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } -; 5128 : for (i = 0; i < psize; ++i) { -; 5129 : pal[i][2] = stbi__get8(s); -; 5130 : pal[i][1] = stbi__get8(s); -; 5131 : pal[i][0] = stbi__get8(s); -; 5132 : if (info.hsz != 12) stbi__get8(s); -; 5133 : pal[i][3] = 255; -; 5134 : } -; 5135 : stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); -; 5136 : if (info.bpp == 1) width = (s->img_x + 7) >> 3; -; 5137 : else if (info.bpp == 4) width = (s->img_x + 1) >> 1; -; 5138 : else if (info.bpp == 8) width = s->img_x; -; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } -; 5140 : pad = (-width) & 3; -; 5141 : if (info.bpp == 1) { -; 5142 : for (j = 0; j < (int)s->img_y; ++j) { -; 5143 : int bit_offset = 7, v = stbi__get8(s); -; 5144 : for (i = 0; i < (int)s->img_x; ++i) { -; 5145 : int color = (v >> bit_offset) & 0x1; -; 5146 : out[z++] = pal[color][0]; -; 5147 : out[z++] = pal[color][1]; -; 5148 : out[z++] = pal[color][2]; -; 5149 : if (target == 4) out[z++] = 255; -; 5150 : if (i + 1 == (int)s->img_x) break; -; 5151 : if ((--bit_offset) < 0) { -; 5152 : bit_offset = 7; -; 5153 : v = stbi__get8(s); -; 5154 : } -; 5155 : } -; 5156 : stbi__skip(s, pad); -; 5157 : } -; 5158 : } -; 5159 : else { -; 5160 : for (j = 0; j < (int)s->img_y; ++j) { -; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { -; 5162 : int v = stbi__get8(s), v2 = 0; -; 5163 : if (info.bpp == 4) { -; 5164 : v2 = v & 15; -; 5165 : v >>= 4; -; 5166 : } -; 5167 : out[z++] = pal[v][0]; -; 5168 : out[z++] = pal[v][1]; -; 5169 : out[z++] = pal[v][2]; -; 5170 : if (target == 4) out[z++] = 255; -; 5171 : if (i + 1 == (int)s->img_x) break; -; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; -; 5173 : out[z++] = pal[v][0]; -; 5174 : out[z++] = pal[v][1]; -; 5175 : out[z++] = pal[v][2]; -; 5176 : if (target == 4) out[z++] = 255; -; 5177 : } -; 5178 : stbi__skip(s, pad); -; 5179 : } -; 5180 : } -; 5181 : } -; 5182 : else { -; 5183 : int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0; -; 5184 : int z = 0; -; 5185 : int easy = 0; -; 5186 : stbi__skip(s, info.offset - info.extra_read - info.hsz); -; 5187 : if (info.bpp == 24) width = 3 * s->img_x; -; 5188 : else if (info.bpp == 16) width = 2 * s->img_x; -; 5189 : else /* bpp = 32 and pad = 0 */ width = 0; -; 5190 : pad = (-width) & 3; -; 5191 : if (info.bpp == 24) { -; 5192 : easy = 1; -; 5193 : } -; 5194 : else if (info.bpp == 32) { -; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) -; 5196 : easy = 2; -; 5197 : } -; 5198 : if (!easy) { -; 5199 : if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); -; 5205 : if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5206 : } -; 5207 : for (j = 0; j < (int)s->img_y; ++j) { -; 5208 : if (easy) { -; 5209 : for (i = 0; i < (int)s->img_x; ++i) { -; 5210 : unsigned char a; -; 5211 : out[z + 2] = stbi__get8(s); -; 5212 : out[z + 1] = stbi__get8(s); -; 5213 : out[z + 0] = stbi__get8(s); -; 5214 : z += 3; -; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); -; 5216 : all_a |= a; -; 5217 : if (target == 4) out[z++] = a; -; 5218 : } -; 5219 : } -; 5220 : else { -; 5221 : int bpp = info.bpp; -; 5222 : for (i = 0; i < (int)s->img_x; ++i) { -; 5223 : stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s)); -; 5224 : unsigned int a; -; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); -; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); -; 5229 : all_a |= a; -; 5230 : if (target == 4) out[z++] = STBI__BYTECAST(a); -; 5231 : } -; 5232 : } -; 5233 : stbi__skip(s, pad); -; 5234 : } -; 5235 : } -; 5236 : -; 5237 : // if alpha channel is all 0s, replace with all 255s -; 5238 : if (target == 4 && all_a == 0) -; 5239 : for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4) -; 5240 : out[i] = 255; -; 5241 : -; 5242 : if (flip_vertically) { -; 5243 : stbi_uc t; -; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { -; 5245 : stbi_uc* p1 = out + j * s->img_x * target; -; 5246 : stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target; -; 5247 : for (i = 0; i < (int)s->img_x * target; ++i) { -; 5248 : t = p1[i]; p1[i] = p2[i]; p2[i] = t; -; 5249 : } -; 5250 : } -; 5251 : } -; 5252 : -; 5253 : if (req_comp && req_comp != target) { -; 5254 : out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); -; 5255 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5256 : } -; 5257 : -; 5258 : *x = s->img_x; -; 5259 : *y = s->img_y; -; 5260 : if (comp) *comp = s->img_n; -; 5261 : return out; -; 5262 : } -; 5263 : #endif -; 5264 : -; 5265 : // Targa Truevision - TGA -; 5266 : // by Jonathan Dummer -; 5267 : #ifndef STBI_NO_TGA -; 5268 : // returns STBI_rgb or whatever, 0 on error -; 5269 : static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -; 5270 : { -; 5271 : // only RGB or RGBA (incl. 16bit) or grey allowed -; 5272 : if (is_rgb16) *is_rgb16 = 0; -; 5273 : switch (bits_per_pixel) { -; 5274 : case 8: return STBI_grey; -; 5275 : case 16: if (is_grey) return STBI_grey_alpha; -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; -; 5278 : return STBI_rgb; -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; -; 5281 : default: return 0; -; 5282 : } -; 5283 : } -; 5284 : -; 5285 : static int stbi__tga_info(stbi__context* s, int* x, int* y, int* comp) -; 5286 : { -; 5287 : int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; -; 5288 : int sz, tga_colormap_type; -; 5289 : stbi__get8(s); // discard Offset -; 5290 : tga_colormap_type = stbi__get8(s); // colormap type -; 5291 : if (tga_colormap_type > 1) { -; 5292 : stbi__rewind(s); -; 5293 : return 0; // only RGB or indexed allowed -; 5294 : } -; 5295 : tga_image_type = stbi__get8(s); // image type -; 5296 : if (tga_colormap_type == 1) { // colormapped (paletted) image -; 5297 : if (tga_image_type != 1 && tga_image_type != 9) { -; 5298 : stbi__rewind(s); -; 5299 : return 0; -; 5300 : } -; 5301 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5302 : sz = stbi__get8(s); // check bits per palette color entry -; 5303 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) { -; 5304 : stbi__rewind(s); -; 5305 : return 0; -; 5306 : } -; 5307 : stbi__skip(s, 4); // skip image x and y origin -; 5308 : tga_colormap_bpp = sz; -; 5309 : } -; 5310 : else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE -; 5311 : if ((tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11)) { -; 5312 : stbi__rewind(s); -; 5313 : return 0; // only RGB or grey allowed, +/- RLE -; 5314 : } -; 5315 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5316 : tga_colormap_bpp = 0; -; 5317 : } -; 5318 : tga_w = stbi__get16le(s); -; 5319 : if (tga_w < 1) { -; 5320 : stbi__rewind(s); -; 5321 : return 0; // test width -; 5322 : } -; 5323 : tga_h = stbi__get16le(s); -; 5324 : if (tga_h < 1) { -; 5325 : stbi__rewind(s); -; 5326 : return 0; // test height -; 5327 : } -; 5328 : tga_bits_per_pixel = stbi__get8(s); // bits per pixel -; 5329 : stbi__get8(s); // ignore alpha bits -; 5330 : if (tga_colormap_bpp != 0) { -; 5331 : if ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { -; 5332 : // when using a colormap, tga_bits_per_pixel is the size of the indexes -; 5333 : // I don't think anything but 8 or 16bit indexes makes sense -; 5334 : stbi__rewind(s); -; 5335 : return 0; -; 5336 : } -; 5337 : tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); -; 5338 : } -; 5339 : else { -; 5340 : tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); -; 5341 : } -; 5342 : if (!tga_comp) { -; 5343 : stbi__rewind(s); -; 5344 : return 0; -; 5345 : } -; 5346 : if (x) *x = tga_w; -; 5347 : if (y) *y = tga_h; -; 5348 : if (comp) *comp = tga_comp; -; 5349 : return 1; // seems to have passed everything -; 5350 : } -; 5351 : -; 5352 : static int stbi__tga_test(stbi__context* s) -; 5353 : { -; 5354 : int res = 0; -; 5355 : int sz, tga_color_type; -; 5356 : stbi__get8(s); // discard Offset -; 5357 : tga_color_type = stbi__get8(s); // color type -; 5358 : if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed -; 5359 : sz = stbi__get8(s); // image type -; 5360 : if (tga_color_type == 1) { // colormapped (paletted) image -; 5361 : if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 -; 5362 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5363 : sz = stbi__get8(s); // check bits per palette color entry -; 5364 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5365 : stbi__skip(s, 4); // skip image x and y origin -; 5366 : } -; 5367 : else { // "normal" image w/o colormap -; 5368 : if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE -; 5369 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5370 : } -; 5371 : if (stbi__get16le(s) < 1) goto errorEnd; // test width -; 5372 : if (stbi__get16le(s) < 1) goto errorEnd; // test height -; 5373 : sz = stbi__get8(s); // bits per pixel -; 5374 : if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index -; 5375 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5376 : -; 5377 : res = 1; // if we got this far, everything's good and we can return 1 instead of 0 -; 5378 : -; 5379 : errorEnd: -; 5380 : stbi__rewind(s); -; 5381 : return res; -; 5382 : } -; 5383 : -; 5384 : // read 16bit value and convert to 24bit RGB -; 5385 : static void stbi__tga_read_rgb16(stbi__context* s, stbi_uc* out) -; 5386 : { -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); -; 5397 : -; 5398 : // some people claim that the most significant bit might be used for alpha -; 5399 : // (possibly if an alpha-bit is set in the "image descriptor byte") -; 5400 : // but that only made 16bit test images completely translucent.. -; 5401 : // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -; 5402 : } -; 5403 : -; 5404 : static void* stbi__tga_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5405 : { -; 5406 : // read in the TGA header stuff -; 5407 : int tga_offset = stbi__get8(s); -; 5408 : int tga_indexed = stbi__get8(s); -; 5409 : int tga_image_type = stbi__get8(s); -; 5410 : int tga_is_RLE = 0; -; 5411 : int tga_palette_start = stbi__get16le(s); -; 5412 : int tga_palette_len = stbi__get16le(s); -; 5413 : int tga_palette_bits = stbi__get8(s); -; 5414 : int tga_x_origin = stbi__get16le(s); -; 5415 : int tga_y_origin = stbi__get16le(s); -; 5416 : int tga_width = stbi__get16le(s); -; 5417 : int tga_height = stbi__get16le(s); -; 5418 : int tga_bits_per_pixel = stbi__get8(s); -; 5419 : int tga_comp, tga_rgb16 = 0; -; 5420 : int tga_inverted = stbi__get8(s); -; 5421 : // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) -; 5422 : // image data -; 5423 : unsigned char* tga_data; -; 5424 : unsigned char* tga_palette = NULL; -; 5425 : int i, j; -; 5426 : unsigned char raw_data[4] = { 0 }; -; 5427 : int RLE_count = 0; -; 5428 : int RLE_repeating = 0; -; 5429 : int read_next_pixel = 1; -; 5430 : STBI_NOTUSED(ri); -; 5431 : STBI_NOTUSED(tga_x_origin); // @TODO -; 5432 : STBI_NOTUSED(tga_y_origin); // @TODO -; 5433 : -; 5434 : if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5435 : if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5436 : -; 5437 : // do a tiny bit of precessing -; 5438 : if (tga_image_type >= 8) -; 5439 : { -; 5440 : tga_image_type -= 8; -; 5441 : tga_is_RLE = 1; -; 5442 : } -; 5443 : tga_inverted = 1 - ((tga_inverted >> 5) & 1); -; 5444 : -; 5445 : // If I'm paletted, then I'll use the number of bits from the palette -; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); -; 5447 : else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); -; 5448 : -; 5449 : if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency -; 5450 : return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); -; 5451 : -; 5452 : // tga info -; 5453 : *x = tga_width; -; 5454 : *y = tga_height; -; 5455 : if (comp) *comp = tga_comp; -; 5456 : -; 5457 : if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) -; 5458 : return stbi__errpuc("too large", "Corrupt TGA"); -; 5459 : -; 5460 : tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); -; 5461 : if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); -; 5462 : -; 5463 : // skip to the data's starting position (offset usually = 0) -; 5464 : stbi__skip(s, tga_offset); -; 5465 : -; 5466 : if (!tga_indexed && !tga_is_RLE && !tga_rgb16) { -; 5467 : for (i = 0; i < tga_height; ++i) { -; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; -; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; -; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); -; 5471 : } -; 5472 : } -; 5473 : else { -; 5474 : // do I need to load a palette? -; 5475 : if (tga_indexed) -; 5476 : { -; 5477 : if (tga_palette_len == 0) { /* you have to have at least one entry! */ -; 5478 : STBI_FREE(tga_data); -; 5479 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5480 : } -; 5481 : -; 5482 : // any data to skip? (offset usually = 0) -; 5483 : stbi__skip(s, tga_palette_start); -; 5484 : // load the palette -; 5485 : tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); -; 5486 : if (!tga_palette) { -; 5487 : STBI_FREE(tga_data); -; 5488 : return stbi__errpuc("outofmem", "Out of memory"); -; 5489 : } -; 5490 : if (tga_rgb16) { -; 5491 : stbi_uc* pal_entry = tga_palette; -; 5492 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5493 : for (i = 0; i < tga_palette_len; ++i) { -; 5494 : stbi__tga_read_rgb16(s, pal_entry); -; 5495 : pal_entry += tga_comp; -; 5496 : } -; 5497 : } -; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { -; 5499 : STBI_FREE(tga_data); -; 5500 : STBI_FREE(tga_palette); -; 5501 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) -; 5506 : { -; 5507 : // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? -; 5508 : if (tga_is_RLE) -; 5509 : { -; 5510 : if (RLE_count == 0) -; 5511 : { -; 5512 : // yep, get the next byte as a RLE command -; 5513 : int RLE_cmd = stbi__get8(s); -; 5514 : RLE_count = 1 + (RLE_cmd & 127); -; 5515 : RLE_repeating = RLE_cmd >> 7; -; 5516 : read_next_pixel = 1; -; 5517 : } -; 5518 : else if (!RLE_repeating) -; 5519 : { -; 5520 : read_next_pixel = 1; -; 5521 : } -; 5522 : } -; 5523 : else -; 5524 : { -; 5525 : read_next_pixel = 1; -; 5526 : } -; 5527 : // OK, if I need to read a pixel, do it now -; 5528 : if (read_next_pixel) -; 5529 : { -; 5530 : // load however much data we did have -; 5531 : if (tga_indexed) -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); -; 5535 : if (pal_idx >= tga_palette_len) { -; 5536 : // invalid index -; 5537 : pal_idx = 0; -; 5538 : } -; 5539 : pal_idx *= tga_comp; -; 5540 : for (j = 0; j < tga_comp; ++j) { -; 5541 : raw_data[j] = tga_palette[pal_idx + j]; -; 5542 : } -; 5543 : } -; 5544 : else if (tga_rgb16) { -; 5545 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5546 : stbi__tga_read_rgb16(s, raw_data); -; 5547 : } -; 5548 : else { -; 5549 : // read in the data raw -; 5550 : for (j = 0; j < tga_comp; ++j) { -; 5551 : raw_data[j] = stbi__get8(s); -; 5552 : } -; 5553 : } -; 5554 : // clear the reading flag for the next pixel -; 5555 : read_next_pixel = 0; -; 5556 : } // end of reading a pixel -; 5557 : -; 5558 : // copy data -; 5559 : for (j = 0; j < tga_comp; ++j) -; 5560 : tga_data[i * tga_comp + j] = raw_data[j]; -; 5561 : -; 5562 : // in case we're in RLE mode, keep counting down -; 5563 : --RLE_count; -; 5564 : } -; 5565 : // do I need to invert the image? -; 5566 : if (tga_inverted) -; 5567 : { -; 5568 : for (j = 0; j * 2 < tga_height; ++j) -; 5569 : { -; 5570 : int index1 = j * tga_width * tga_comp; -; 5571 : int index2 = (tga_height - 1 - j) * tga_width * tga_comp; -; 5572 : for (i = tga_width * tga_comp; i > 0; --i) -; 5573 : { -; 5574 : unsigned char temp = tga_data[index1]; -; 5575 : tga_data[index1] = tga_data[index2]; -; 5576 : tga_data[index2] = temp; -; 5577 : ++index1; -; 5578 : ++index2; -; 5579 : } -; 5580 : } -; 5581 : } -; 5582 : // clear my palette, if I had one -; 5583 : if (tga_palette != NULL) -; 5584 : { -; 5585 : STBI_FREE(tga_palette); -; 5586 : } -; 5587 : } -; 5588 : -; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order -; 5590 : if (tga_comp >= 3 && !tga_rgb16) -; 5591 : { -; 5592 : unsigned char* tga_pixel = tga_data; -; 5593 : for (i = 0; i < tga_width * tga_height; ++i) -; 5594 : { -; 5595 : unsigned char temp = tga_pixel[0]; -; 5596 : tga_pixel[0] = tga_pixel[2]; -; 5597 : tga_pixel[2] = temp; -; 5598 : tga_pixel += tga_comp; -; 5599 : } -; 5600 : } -; 5601 : -; 5602 : // convert to target component count -; 5603 : if (req_comp && req_comp != tga_comp) -; 5604 : tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); -; 5605 : -; 5606 : // the things I do to get rid of an error message, and yet keep -; 5607 : // Microsoft's C compilers happy... [8^( -; 5608 : tga_palette_start = tga_palette_len = tga_palette_bits = -; 5609 : tga_x_origin = tga_y_origin = 0; -; 5610 : STBI_NOTUSED(tga_palette_start); -; 5611 : // OK, done -; 5612 : return tga_data; -; 5613 : } -; 5614 : #endif -; 5615 : -; 5616 : // ************************************************************************************************* -; 5617 : // Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB -; 5618 : -; 5619 : #ifndef STBI_NO_PSD -; 5620 : static int stbi__psd_test(stbi__context* s) -; 5621 : { -; 5622 : int r = (stbi__get32be(s) == 0x38425053); -; 5623 : stbi__rewind(s); -; 5624 : return r; -; 5625 : } -; 5626 : -; 5627 : static int stbi__psd_decode_rle(stbi__context* s, stbi_uc* p, int pixelCount) -; 5628 : { -; 5629 : int count, nleft, len; -; 5630 : -; 5631 : count = 0; -; 5632 : while ((nleft = pixelCount - count) > 0) { -; 5633 : len = stbi__get8(s); -; 5634 : if (len == 128) { -; 5635 : // No-op. -; 5636 : } -; 5637 : else if (len < 128) { -; 5638 : // Copy next len+1 bytes literally. -; 5639 : len++; -; 5640 : if (len > nleft) return 0; // corrupt data -; 5641 : count += len; -; 5642 : while (len) { -; 5643 : *p = stbi__get8(s); -; 5644 : p += 4; -; 5645 : len--; -; 5646 : } -; 5647 : } -; 5648 : else if (len > 128) { -; 5649 : stbi_uc val; -; 5650 : // Next -len+1 bytes in the dest are replicated from next source byte. -; 5651 : // (Interpret len as a negative 8-bit int.) -; 5652 : len = 257 - len; -; 5653 : if (len > nleft) return 0; // corrupt data -; 5654 : val = stbi__get8(s); -; 5655 : count += len; -; 5656 : while (len) { -; 5657 : *p = val; -; 5658 : p += 4; -; 5659 : len--; -; 5660 : } -; 5661 : } -; 5662 : } -; 5663 : -; 5664 : return 1; -; 5665 : } -; 5666 : -; 5667 : static void* stbi__psd_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc) -; 5668 : { -; 5669 : int pixelCount; -; 5670 : int channelCount, compression; -; 5671 : int channel, i; -; 5672 : int bitdepth; -; 5673 : int w, h; -; 5674 : stbi_uc* out; -; 5675 : STBI_NOTUSED(ri); -; 5676 : -; 5677 : // Check identifier -; 5678 : if (stbi__get32be(s) != 0x38425053) // "8BPS" -; 5679 : return stbi__errpuc("not PSD", "Corrupt PSD image"); -; 5680 : -; 5681 : // Check file type version. -; 5682 : if (stbi__get16be(s) != 1) -; 5683 : return stbi__errpuc("wrong version", "Unsupported version of PSD image"); -; 5684 : -; 5685 : // Skip 6 reserved bytes. -; 5686 : stbi__skip(s, 6); -; 5687 : -; 5688 : // Read the number of channels (R, G, B, A, etc). -; 5689 : channelCount = stbi__get16be(s); -; 5690 : if (channelCount < 0 || channelCount > 16) -; 5691 : return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); -; 5692 : -; 5693 : // Read the rows and columns of the image. -; 5694 : h = stbi__get32be(s); -; 5695 : w = stbi__get32be(s); -; 5696 : -; 5697 : if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5698 : if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5699 : -; 5700 : // Make sure the depth is 8 bits. -; 5701 : bitdepth = stbi__get16be(s); -; 5702 : if (bitdepth != 8 && bitdepth != 16) -; 5703 : return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); -; 5704 : -; 5705 : // Make sure the color mode is RGB. -; 5706 : // Valid options are: -; 5707 : // 0: Bitmap -; 5708 : // 1: Grayscale -; 5709 : // 2: Indexed color -; 5710 : // 3: RGB color -; 5711 : // 4: CMYK color -; 5712 : // 7: Multichannel -; 5713 : // 8: Duotone -; 5714 : // 9: Lab color -; 5715 : if (stbi__get16be(s) != 3) -; 5716 : return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); -; 5717 : -; 5718 : // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) -; 5719 : stbi__skip(s, stbi__get32be(s)); -; 5720 : -; 5721 : // Skip the image resources. (resolution, pen tool paths, etc) -; 5722 : stbi__skip(s, stbi__get32be(s)); -; 5723 : -; 5724 : // Skip the reserved data. -; 5725 : stbi__skip(s, stbi__get32be(s)); -; 5726 : -; 5727 : // Find out if the data is compressed. -; 5728 : // Known values: -; 5729 : // 0: no compression -; 5730 : // 1: RLE compressed -; 5731 : compression = stbi__get16be(s); -; 5732 : if (compression > 1) -; 5733 : return stbi__errpuc("bad compression", "PSD has an unknown compression format"); -; 5734 : -; 5735 : // Check size -; 5736 : if (!stbi__mad3sizes_valid(4, w, h, 0)) -; 5737 : return stbi__errpuc("too large", "Corrupt PSD"); -; 5738 : -; 5739 : // Create the destination image. -; 5740 : -; 5741 : if (!compression && bitdepth == 16 && bpc == 16) { -; 5742 : out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0); -; 5743 : ri->bits_per_channel = 16; -; 5744 : } -; 5745 : else -; 5746 : out = (stbi_uc*)stbi__malloc(4 * w * h); -; 5747 : -; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5749 : pixelCount = w * h; -; 5750 : -; 5751 : // Initialize the data to zero. -; 5752 : //memset( out, 0, pixelCount * 4 ); -; 5753 : -; 5754 : // Finally, the image data. -; 5755 : if (compression) { -; 5756 : // RLE as used by .PSD and .TIFF -; 5757 : // Loop until you get the number of unpacked bytes you are expecting: -; 5758 : // Read the next source byte into n. -; 5759 : // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. -; 5760 : // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. -; 5761 : // Else if n is 128, noop. -; 5762 : // Endloop -; 5763 : -; 5764 : // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, -; 5765 : // which we're going to just skip. -; 5766 : stbi__skip(s, h * channelCount * 2); -; 5767 : -; 5768 : // Read the RLE data by channel. -; 5769 : for (channel = 0; channel < 4; channel++) { -; 5770 : stbi_uc* p; -; 5771 : -; 5772 : p = out + channel; -; 5773 : if (channel >= channelCount) { -; 5774 : // Fill this channel with default data. -; 5775 : for (i = 0; i < pixelCount; i++, p += 4) -; 5776 : *p = (channel == 3 ? 255 : 0); -; 5777 : } -; 5778 : else { -; 5779 : // Read the RLE data. -; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { -; 5781 : STBI_FREE(out); -; 5782 : return stbi__errpuc("corrupt", "bad RLE data"); -; 5783 : } -; 5784 : } -; 5785 : } -; 5786 : } -; 5787 : else { -; 5788 : // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) -; 5789 : // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. -; 5790 : -; 5791 : // Read the data by channel. -; 5792 : for (channel = 0; channel < 4; channel++) { -; 5793 : if (channel >= channelCount) { -; 5794 : // Fill this channel with default data. -; 5795 : if (bitdepth == 16 && bpc == 16) { -; 5796 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5797 : stbi__uint16 val = channel == 3 ? 65535 : 0; -; 5798 : for (i = 0; i < pixelCount; i++, q += 4) -; 5799 : *q = val; -; 5800 : } -; 5801 : else { -; 5802 : stbi_uc* p = out + channel; -; 5803 : stbi_uc val = channel == 3 ? 255 : 0; -; 5804 : for (i = 0; i < pixelCount; i++, p += 4) -; 5805 : *p = val; -; 5806 : } -; 5807 : } -; 5808 : else { -; 5809 : if (ri->bits_per_channel == 16) { // output bpc -; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5811 : for (i = 0; i < pixelCount; i++, q += 4) -; 5812 : *q = (stbi__uint16)stbi__get16be(s); -; 5813 : } -; 5814 : else { -; 5815 : stbi_uc* p = out + channel; -; 5816 : if (bitdepth == 16) { // input bpc -; 5817 : for (i = 0; i < pixelCount; i++, p += 4) -; 5818 : *p = (stbi_uc)(stbi__get16be(s) >> 8); -; 5819 : } -; 5820 : else { -; 5821 : for (i = 0; i < pixelCount; i++, p += 4) -; 5822 : *p = stbi__get8(s); -; 5823 : } -; 5824 : } -; 5825 : } -; 5826 : } -; 5827 : } -; 5828 : -; 5829 : // remove weird white matte from PSD -; 5830 : if (channelCount >= 4) { -; 5831 : if (ri->bits_per_channel == 16) { -; 5832 : for (i = 0; i < w * h; ++i) { -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); -; 5841 : } -; 5842 : } -; 5843 : } -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); -; 5854 : } -; 5855 : } -; 5856 : } -; 5857 : } -; 5858 : -; 5859 : // convert to desired output format -; 5860 : if (req_comp && req_comp != 4) { -; 5861 : if (ri->bits_per_channel == 16) -; 5862 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h); -; 5863 : else -; 5864 : out = stbi__convert_format(out, 4, req_comp, w, h); -; 5865 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5866 : } -; 5867 : -; 5868 : if (comp) *comp = 4; -; 5869 : *y = h; -; 5870 : *x = w; -; 5871 : -; 5872 : return out; -; 5873 : } -; 5874 : #endif -; 5875 : -; 5876 : // ************************************************************************************************* -; 5877 : // Softimage PIC loader -; 5878 : // by Tom Seddon -; 5879 : // -; 5880 : // See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -; 5881 : // See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ -; 5882 : -; 5883 : #ifndef STBI_NO_PIC -; 5884 : static int stbi__pic_is4(stbi__context* s, const char* str) -; 5885 : { -; 5886 : int i; -; 5887 : for (i = 0; i < 4; ++i) -; 5888 : if (stbi__get8(s) != (stbi_uc)str[i]) -; 5889 : return 0; -; 5890 : -; 5891 : return 1; -; 5892 : } -; 5893 : -; 5894 : static int stbi__pic_test_core(stbi__context* s) -; 5895 : { -; 5896 : int i; -; 5897 : -; 5898 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) -; 5899 : return 0; -; 5900 : -; 5901 : for (i = 0; i < 84; ++i) -; 5902 : stbi__get8(s); -; 5903 : -; 5904 : if (!stbi__pic_is4(s, "PICT")) -; 5905 : return 0; -; 5906 : -; 5907 : return 1; -; 5908 : } -; 5909 : -; 5910 : typedef struct -; 5911 : { -; 5912 : stbi_uc size, type, channel; -; 5913 : } stbi__pic_packet; -; 5914 : -; 5915 : static stbi_uc* stbi__readval(stbi__context* s, int channel, stbi_uc* dest) -; 5916 : { -; 5917 : int mask = 0x80, i; -; 5918 : -; 5919 : for (i = 0; i < 4; ++i, mask >>= 1) { -; 5920 : if (channel & mask) { -; 5921 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "PIC file too short"); -; 5922 : dest[i] = stbi__get8(s); -; 5923 : } -; 5924 : } -; 5925 : -; 5926 : return dest; -; 5927 : } -; 5928 : -; 5929 : static void stbi__copyval(int channel, stbi_uc* dest, const stbi_uc* src) -; 5930 : { -; 5931 : int mask = 0x80, i; -; 5932 : -; 5933 : for (i = 0; i < 4; ++i, mask >>= 1) -; 5934 : if (channel & mask) -; 5935 : dest[i] = src[i]; -; 5936 : } -; 5937 : -; 5938 : static stbi_uc* stbi__pic_load_core(stbi__context* s, int width, int height, int* comp, stbi_uc* result) -; 5939 : { -; 5940 : int act_comp = 0, num_packets = 0, y, chained; -; 5941 : stbi__pic_packet packets[10]; -; 5942 : -; 5943 : // this will (should...) cater for even some bizarre stuff like having data -; 5944 : // for the same channel in multiple packets. -; 5945 : do { -; 5946 : stbi__pic_packet* packet; -; 5947 : -; 5948 : if (num_packets == sizeof(packets) / sizeof(packets[0])) -; 5949 : return stbi__errpuc("bad format", "too many packets"); -; 5950 : -; 5951 : packet = &packets[num_packets++]; -; 5952 : -; 5953 : chained = stbi__get8(s); -; 5954 : packet->size = stbi__get8(s); -; 5955 : packet->type = stbi__get8(s); -; 5956 : packet->channel = stbi__get8(s); -; 5957 : -; 5958 : act_comp |= packet->channel; -; 5959 : -; 5960 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (reading packets)"); -; 5961 : if (packet->size != 8) return stbi__errpuc("bad format", "packet isn't 8bpp"); -; 5962 : } while (chained); -; 5963 : -; 5964 : *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel? -; 5965 : -; 5966 : for (y = 0; y < height; ++y) { -; 5967 : int packet_idx; -; 5968 : -; 5969 : for (packet_idx = 0; packet_idx < num_packets; ++packet_idx) { -; 5970 : stbi__pic_packet* packet = &packets[packet_idx]; -; 5971 : stbi_uc* dest = result + y * width * 4; -; 5972 : -; 5973 : switch (packet->type) { -; 5974 : default: -; 5975 : return stbi__errpuc("bad format", "packet has bad compression type"); -; 5976 : -; 5977 : case 0: {//uncompressed -; 5978 : int x; -; 5979 : -; 5980 : for (x = 0; x < width; ++x, dest += 4) -; 5981 : if (!stbi__readval(s, packet->channel, dest)) -; 5982 : return 0; -; 5983 : break; -; 5984 : } -; 5985 : -; 5986 : case 1://Pure RLE -; 5987 : { -; 5988 : int left = width, i; -; 5989 : -; 5990 : while (left > 0) { -; 5991 : stbi_uc count, value[4]; -; 5992 : -; 5993 : count = stbi__get8(s); -; 5994 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (pure read count)"); -; 5995 : -; 5996 : if (count > left) -; 5997 : count = (stbi_uc)left; -; 5998 : -; 5999 : if (!stbi__readval(s, packet->channel, value)) return 0; -; 6000 : -; 6001 : for (i = 0; i < count; ++i, dest += 4) -; 6002 : stbi__copyval(packet->channel, dest, value); -; 6003 : left -= count; -; 6004 : } -; 6005 : } -; 6006 : break; -; 6007 : -; 6008 : case 2: {//Mixed RLE -; 6009 : int left = width; -; 6010 : while (left > 0) { -; 6011 : int count = stbi__get8(s), i; -; 6012 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (mixed read count)"); -; 6013 : -; 6014 : if (count >= 128) { // Repeated -; 6015 : stbi_uc value[4]; -; 6016 : -; 6017 : if (count == 128) -; 6018 : count = stbi__get16be(s); -; 6019 : else -; 6020 : count -= 127; -; 6021 : if (count > left) -; 6022 : return stbi__errpuc("bad file", "scanline overrun"); -; 6023 : -; 6024 : if (!stbi__readval(s, packet->channel, value)) -; 6025 : return 0; -; 6026 : -; 6027 : for (i = 0; i < count; ++i, dest += 4) -; 6028 : stbi__copyval(packet->channel, dest, value); -; 6029 : } -; 6030 : else { // Raw -; 6031 : ++count; -; 6032 : if (count > left) return stbi__errpuc("bad file", "scanline overrun"); -; 6033 : -; 6034 : for (i = 0; i < count; ++i, dest += 4) -; 6035 : if (!stbi__readval(s, packet->channel, dest)) -; 6036 : return 0; -; 6037 : } -; 6038 : left -= count; -; 6039 : } -; 6040 : break; -; 6041 : } -; 6042 : } -; 6043 : } -; 6044 : } -; 6045 : -; 6046 : return result; -; 6047 : } -; 6048 : -; 6049 : static void* stbi__pic_load(stbi__context* s, int* px, int* py, int* comp, int req_comp, stbi__result_info* ri) -; 6050 : { -; 6051 : stbi_uc* result; -; 6052 : int i, x, y, internal_comp; -; 6053 : STBI_NOTUSED(ri); -; 6054 : -; 6055 : if (!comp) comp = &internal_comp; -; 6056 : -; 6057 : for (i = 0; i < 92; ++i) -; 6058 : stbi__get8(s); -; 6059 : -; 6060 : x = stbi__get16be(s); -; 6061 : y = stbi__get16be(s); -; 6062 : -; 6063 : if (y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 6064 : if (x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 6065 : -; 6066 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (pic header)"); -; 6067 : if (!stbi__mad3sizes_valid(x, y, 4, 0)) return stbi__errpuc("too large", "PIC image too large to decode"); -; 6068 : -; 6069 : stbi__get32be(s); //skip `ratio' -; 6070 : stbi__get16be(s); //skip `fields' -; 6071 : stbi__get16be(s); //skip `pad' -; 6072 : -; 6073 : // intermediate buffer is RGBA -; 6074 : result = (stbi_uc*)stbi__malloc_mad3(x, y, 4, 0); -; 6075 : if (!result) return stbi__errpuc("outofmem", "Out of memory"); -; 6076 : memset(result, 0xff, x * y * 4); -; 6077 : -; 6078 : if (!stbi__pic_load_core(s, x, y, comp, result)) { -; 6079 : STBI_FREE(result); -; 6080 : result = 0; -; 6081 : } -; 6082 : *px = x; -; 6083 : *py = y; -; 6084 : if (req_comp == 0) req_comp = *comp; -; 6085 : result = stbi__convert_format(result, 4, req_comp, x, y); -; 6086 : -; 6087 : return result; -; 6088 : } -; 6089 : -; 6090 : static int stbi__pic_test(stbi__context* s) -; 6091 : { -; 6092 : int r = stbi__pic_test_core(s); -; 6093 : stbi__rewind(s); -; 6094 : return r; -; 6095 : } -; 6096 : #endif -; 6097 : -; 6098 : // ************************************************************************************************* -; 6099 : // GIF loader -- public domain by Jean-Marc Lienher -- simplified/shrunk by stb -; 6100 : -; 6101 : #ifndef STBI_NO_GIF -; 6102 : typedef struct -; 6103 : { -; 6104 : stbi__int16 prefix; -; 6105 : stbi_uc first; -; 6106 : stbi_uc suffix; -; 6107 : } stbi__gif_lzw; -; 6108 : -; 6109 : typedef struct -; 6110 : { -; 6111 : int w, h; -; 6112 : stbi_uc* out; // output buffer (always 4 components) -; 6113 : stbi_uc* background; // The current "background" as far as a gif is concerned -; 6114 : stbi_uc* history; -; 6115 : int flags, bgindex, ratio, transparent, eflags; -; 6116 : stbi_uc pal[256][4]; -; 6117 : stbi_uc lpal[256][4]; -; 6118 : stbi__gif_lzw codes[8192]; -; 6119 : stbi_uc* color_table; -; 6120 : int parse, step; -; 6121 : int lflags; -; 6122 : int start_x, start_y; -; 6123 : int max_x, max_y; -; 6124 : int cur_x, cur_y; -; 6125 : int line_size; -; 6126 : int delay; -; 6127 : } stbi__gif; -; 6128 : -; 6129 : static int stbi__gif_test_raw(stbi__context* s) -; 6130 : { -; 6131 : int sz; -; 6132 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0; -; 6133 : sz = stbi__get8(s); -; 6134 : if (sz != '9' && sz != '7') return 0; -; 6135 : if (stbi__get8(s) != 'a') return 0; -; 6136 : return 1; -; 6137 : } -; 6138 : -; 6139 : static int stbi__gif_test(stbi__context* s) -; 6140 : { -; 6141 : int r = stbi__gif_test_raw(s); -; 6142 : stbi__rewind(s); -; 6143 : return r; -; 6144 : } -; 6145 : -; 6146 : static void stbi__gif_parse_colortable(stbi__context* s, stbi_uc pal[256][4], int num_entries, int transp) -; 6147 : { -; 6148 : int i; -; 6149 : for (i = 0; i < num_entries; ++i) { -; 6150 : pal[i][2] = stbi__get8(s); -; 6151 : pal[i][1] = stbi__get8(s); -; 6152 : pal[i][0] = stbi__get8(s); -; 6153 : pal[i][3] = transp == i ? 0 : 255; -; 6154 : } -; 6155 : } -; 6156 : -; 6157 : static int stbi__gif_header(stbi__context* s, stbi__gif* g, int* comp, int is_info) -; 6158 : { -; 6159 : stbi_uc version; -; 6160 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') -; 6161 : return stbi__err("not GIF", "Corrupt GIF"); -; 6162 : -; 6163 : version = stbi__get8(s); -; 6164 : if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF"); -; 6165 : if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF"); -; 6166 : -; 6167 : stbi__g_failure_reason = ""; -; 6168 : g->w = stbi__get16le(s); -; 6169 : g->h = stbi__get16le(s); -; 6170 : g->flags = stbi__get8(s); -; 6171 : g->bgindex = stbi__get8(s); -; 6172 : g->ratio = stbi__get8(s); -; 6173 : g->transparent = -1; -; 6174 : -; 6175 : if (g->w > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 6176 : if (g->h > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 6177 : -; 6178 : if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments -; 6179 : -; 6180 : if (is_info) return 1; -; 6181 : -; 6182 : if (g->flags & 0x80) -; 6183 : stbi__gif_parse_colortable(s, g->pal, 2 << (g->flags & 7), -1); -; 6184 : -; 6185 : return 1; -; 6186 : } -; 6187 : -; 6188 : static int stbi__gif_info_raw(stbi__context* s, int* x, int* y, int* comp) -; 6189 : { -; 6190 : stbi__gif* g = (stbi__gif*)stbi__malloc(sizeof(stbi__gif)); -; 6191 : if (!g) return stbi__err("outofmem", "Out of memory"); -; 6192 : if (!stbi__gif_header(s, g, comp, 1)) { -; 6193 : STBI_FREE(g); -; 6194 : stbi__rewind(s); -; 6195 : return 0; -; 6196 : } -; 6197 : if (x) *x = g->w; -; 6198 : if (y) *y = g->h; -; 6199 : STBI_FREE(g); -; 6200 : return 1; -; 6201 : } -; 6202 : -; 6203 : static void stbi__out_gif_code(stbi__gif* g, stbi__uint16 code) -; 6204 : { -; 6205 : stbi_uc* p, * c; -; 6206 : int idx; -; 6207 : -; 6208 : // recurse to decode the prefixes, since the linked-list is backwards, -; 6209 : // and working backwards through an interleaved image would be nasty -; 6210 : if (g->codes[code].prefix >= 0) -; 6211 : stbi__out_gif_code(g, g->codes[code].prefix); -; 6212 : -; 6213 : if (g->cur_y >= g->max_y) return; -; 6214 : -; 6215 : idx = g->cur_x + g->cur_y; -; 6216 : p = &g->out[idx]; -; 6217 : g->history[idx / 4] = 1; -; 6218 : -; 6219 : c = &g->color_table[g->codes[code].suffix * 4]; -; 6220 : if (c[3] > 128) { // don't render transparent pixels; -; 6221 : p[0] = c[2]; -; 6222 : p[1] = c[1]; -; 6223 : p[2] = c[0]; -; 6224 : p[3] = c[3]; -; 6225 : } -; 6226 : g->cur_x += 4; -; 6227 : -; 6228 : if (g->cur_x >= g->max_x) { -; 6229 : g->cur_x = g->start_x; -; 6230 : g->cur_y += g->step; -; 6231 : -; 6232 : while (g->cur_y >= g->max_y && g->parse > 0) { -; 6233 : g->step = (1 << g->parse) * g->line_size; -; 6234 : g->cur_y = g->start_y + (g->step >> 1); -; 6235 : --g->parse; -; 6236 : } -; 6237 : } -; 6238 : } -; 6239 : -; 6240 : static stbi_uc* stbi__process_gif_raster(stbi__context* s, stbi__gif* g) -; 6241 : { -; 6242 : stbi_uc lzw_cs; -; 6243 : stbi__int32 len, init_code; -; 6244 : stbi__uint32 first; -; 6245 : stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear; -; 6246 : stbi__gif_lzw* p; -; 6247 : -; 6248 : lzw_cs = stbi__get8(s); -; 6249 : if (lzw_cs > 12) return NULL; -; 6250 : clear = 1 << lzw_cs; -; 6251 : first = 1; -; 6252 : codesize = lzw_cs + 1; -; 6253 : codemask = (1 << codesize) - 1; -; 6254 : bits = 0; -; 6255 : valid_bits = 0; -; 6256 : for (init_code = 0; init_code < clear; init_code++) { -; 6257 : g->codes[init_code].prefix = -1; -; 6258 : g->codes[init_code].first = (stbi_uc)init_code; -; 6259 : g->codes[init_code].suffix = (stbi_uc)init_code; -; 6260 : } -; 6261 : -; 6262 : // support no starting clear code -; 6263 : avail = clear + 2; -; 6264 : oldcode = -1; -; 6265 : -; 6266 : len = 0; -; 6267 : for (;;) { -; 6268 : if (valid_bits < codesize) { -; 6269 : if (len == 0) { -; 6270 : len = stbi__get8(s); // start new block -; 6271 : if (len == 0) -; 6272 : return g->out; -; 6273 : } -; 6274 : --len; -; 6275 : bits |= (stbi__int32)stbi__get8(s) << valid_bits; -; 6276 : valid_bits += 8; -; 6277 : } -; 6278 : else { -; 6279 : stbi__int32 code = bits & codemask; -; 6280 : bits >>= codesize; -; 6281 : valid_bits -= codesize; -; 6282 : // @OPTIMIZE: is there some way we can accelerate the non-clear path? -; 6283 : if (code == clear) { // clear code -; 6284 : codesize = lzw_cs + 1; -; 6285 : codemask = (1 << codesize) - 1; -; 6286 : avail = clear + 2; -; 6287 : oldcode = -1; -; 6288 : first = 0; -; 6289 : } -; 6290 : else if (code == clear + 1) { // end of stream code -; 6291 : stbi__skip(s, len); -; 6292 : while ((len = stbi__get8(s)) > 0) -; 6293 : stbi__skip(s, len); -; 6294 : return g->out; -; 6295 : } -; 6296 : else if (code <= avail) { -; 6297 : if (first) { -; 6298 : return stbi__errpuc("no clear code", "Corrupt GIF"); -; 6299 : } -; 6300 : -; 6301 : if (oldcode >= 0) { -; 6302 : p = &g->codes[avail++]; -; 6303 : if (avail > 8192) { -; 6304 : return stbi__errpuc("too many codes", "Corrupt GIF"); -; 6305 : } -; 6306 : -; 6307 : p->prefix = (stbi__int16)oldcode; -; 6308 : p->first = g->codes[oldcode].first; -; 6309 : p->suffix = (code == avail) ? p->first : g->codes[code].first; -; 6310 : } -; 6311 : else if (code == avail) -; 6312 : return stbi__errpuc("illegal code in raster", "Corrupt GIF"); -; 6313 : -; 6314 : stbi__out_gif_code(g, (stbi__uint16)code); -; 6315 : -; 6316 : if ((avail & codemask) == 0 && avail <= 0x0FFF) { -; 6317 : codesize++; -; 6318 : codemask = (1 << codesize) - 1; -; 6319 : } -; 6320 : -; 6321 : oldcode = code; -; 6322 : } -; 6323 : else { -; 6324 : return stbi__errpuc("illegal code in raster", "Corrupt GIF"); -; 6325 : } -; 6326 : } -; 6327 : } -; 6328 : } -; 6329 : -; 6330 : // this function is designed to support animated gifs, although stb_image doesn't support it -; 6331 : // two back is the image from two frames ago, used for a very specific disposal format -; 6332 : static stbi_uc* stbi__gif_load_next(stbi__context* s, stbi__gif* g, int* comp, int req_comp, stbi_uc* two_back) -; 6333 : { -; 6334 : int dispose; -; 6335 : int first_frame; -; 6336 : int pi; -; 6337 : int pcount; -; 6338 : STBI_NOTUSED(req_comp); -; 6339 : -; 6340 : // on first frame, any non-written pixels get the background colour (non-transparent) -; 6341 : first_frame = 0; -; 6342 : if (g->out == 0) { -; 6343 : if (!stbi__gif_header(s, g, comp, 0)) return 0; // stbi__g_failure_reason set by stbi__gif_header -; 6344 : if (!stbi__mad3sizes_valid(4, g->w, g->h, 0)) -; 6345 : return stbi__errpuc("too large", "GIF image is too large"); -; 6346 : pcount = g->w * g->h; -; 6347 : g->out = (stbi_uc*)stbi__malloc(4 * pcount); -; 6348 : g->background = (stbi_uc*)stbi__malloc(4 * pcount); -; 6349 : g->history = (stbi_uc*)stbi__malloc(pcount); -; 6350 : if (!g->out || !g->background || !g->history) -; 6351 : return stbi__errpuc("outofmem", "Out of memory"); -; 6352 : -; 6353 : // image is treated as "transparent" at the start - ie, nothing overwrites the current background; -; 6354 : // background colour is only used for pixels that are not rendered first frame, after that "background" -; 6355 : // color refers to the color that was there the previous frame. -; 6356 : memset(g->out, 0x00, 4 * pcount); -; 6357 : memset(g->background, 0x00, 4 * pcount); // state of the background (starts transparent) -; 6358 : memset(g->history, 0x00, pcount); // pixels that were affected previous frame -; 6359 : first_frame = 1; -; 6360 : } -; 6361 : else { -; 6362 : // second frame - how do we dispose of the previous one? -; 6363 : dispose = (g->eflags & 0x1C) >> 2; -; 6364 : pcount = g->w * g->h; -; 6365 : -; 6366 : if ((dispose == 3) && (two_back == 0)) { -; 6367 : dispose = 2; // if I don't have an image to revert back to, default to the old background -; 6368 : } -; 6369 : -; 6370 : if (dispose == 3) { // use previous graphic -; 6371 : for (pi = 0; pi < pcount; ++pi) { -; 6372 : if (g->history[pi]) { -; 6373 : memcpy(&g->out[pi * 4], &two_back[pi * 4], 4); -; 6374 : } -; 6375 : } -; 6376 : } -; 6377 : else if (dispose == 2) { -; 6378 : // restore what was changed last frame to background before that frame; -; 6379 : for (pi = 0; pi < pcount; ++pi) { -; 6380 : if (g->history[pi]) { -; 6381 : memcpy(&g->out[pi * 4], &g->background[pi * 4], 4); -; 6382 : } -; 6383 : } -; 6384 : } -; 6385 : else { -; 6386 : // This is a non-disposal case eithe way, so just -; 6387 : // leave the pixels as is, and they will become the new background -; 6388 : // 1: do not dispose -; 6389 : // 0: not specified. -; 6390 : } -; 6391 : -; 6392 : // background is what out is after the undoing of the previou frame; -; 6393 : memcpy(g->background, g->out, 4 * g->w * g->h); -; 6394 : } -; 6395 : -; 6396 : // clear my history; -; 6397 : memset(g->history, 0x00, g->w * g->h); // pixels that were affected previous frame -; 6398 : -; 6399 : for (;;) { -; 6400 : int tag = stbi__get8(s); -; 6401 : switch (tag) { -; 6402 : case 0x2C: /* Image Descriptor */ -; 6403 : { -; 6404 : stbi__int32 x, y, w, h; -; 6405 : stbi_uc* o; -; 6406 : -; 6407 : x = stbi__get16le(s); -; 6408 : y = stbi__get16le(s); -; 6409 : w = stbi__get16le(s); -; 6410 : h = stbi__get16le(s); -; 6411 : if (((x + w) > (g->w)) || ((y + h) > (g->h))) -; 6412 : return stbi__errpuc("bad Image Descriptor", "Corrupt GIF"); -; 6413 : -; 6414 : g->line_size = g->w * 4; -; 6415 : g->start_x = x * 4; -; 6416 : g->start_y = y * g->line_size; -; 6417 : g->max_x = g->start_x + w * 4; -; 6418 : g->max_y = g->start_y + h * g->line_size; -; 6419 : g->cur_x = g->start_x; -; 6420 : g->cur_y = g->start_y; -; 6421 : -; 6422 : // if the width of the specified rectangle is 0, that means -; 6423 : // we may not see *any* pixels or the image is malformed; -; 6424 : // to make sure this is caught, move the current y down to -; 6425 : // max_y (which is what out_gif_code checks). -; 6426 : if (w == 0) -; 6427 : g->cur_y = g->max_y; -; 6428 : -; 6429 : g->lflags = stbi__get8(s); -; 6430 : -; 6431 : if (g->lflags & 0x40) { -; 6432 : g->step = 8 * g->line_size; // first interlaced spacing -; 6433 : g->parse = 3; -; 6434 : } -; 6435 : else { -; 6436 : g->step = g->line_size; -; 6437 : g->parse = 0; -; 6438 : } -; 6439 : -; 6440 : if (g->lflags & 0x80) { -; 6441 : stbi__gif_parse_colortable(s, g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1); -; 6442 : g->color_table = (stbi_uc*)g->lpal; -; 6443 : } -; 6444 : else if (g->flags & 0x80) { -; 6445 : g->color_table = (stbi_uc*)g->pal; -; 6446 : } -; 6447 : else -; 6448 : return stbi__errpuc("missing color table", "Corrupt GIF"); -; 6449 : -; 6450 : o = stbi__process_gif_raster(s, g); -; 6451 : if (!o) return NULL; -; 6452 : -; 6453 : // if this was the first frame, -; 6454 : pcount = g->w * g->h; -; 6455 : if (first_frame && (g->bgindex > 0)) { -; 6456 : // if first frame, any pixel not drawn to gets the background color -; 6457 : for (pi = 0; pi < pcount; ++pi) { -; 6458 : if (g->history[pi] == 0) { -; 6459 : g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; -; 6460 : memcpy(&g->out[pi * 4], &g->pal[g->bgindex], 4); -; 6461 : } -; 6462 : } -; 6463 : } -; 6464 : -; 6465 : return o; -; 6466 : } -; 6467 : -; 6468 : case 0x21: // Comment Extension. -; 6469 : { -; 6470 : int len; -; 6471 : int ext = stbi__get8(s); -; 6472 : if (ext == 0xF9) { // Graphic Control Extension. -; 6473 : len = stbi__get8(s); -; 6474 : if (len == 4) { -; 6475 : g->eflags = stbi__get8(s); -; 6476 : g->delay = 10 * stbi__get16le(s); // delay - 1/100th of a second, saving as 1/1000ths. -; 6477 : -; 6478 : // unset old transparent -; 6479 : if (g->transparent >= 0) { -; 6480 : g->pal[g->transparent][3] = 255; -; 6481 : } -; 6482 : if (g->eflags & 0x01) { -; 6483 : g->transparent = stbi__get8(s); -; 6484 : if (g->transparent >= 0) { -; 6485 : g->pal[g->transparent][3] = 0; -; 6486 : } -; 6487 : } -; 6488 : else { -; 6489 : // don't need transparent -; 6490 : stbi__skip(s, 1); -; 6491 : g->transparent = -1; -; 6492 : } -; 6493 : } -; 6494 : else { -; 6495 : stbi__skip(s, len); -; 6496 : break; -; 6497 : } -; 6498 : } -; 6499 : while ((len = stbi__get8(s)) != 0) { -; 6500 : stbi__skip(s, len); -; 6501 : } -; 6502 : break; -; 6503 : } -; 6504 : -; 6505 : case 0x3B: // gif stream termination code -; 6506 : return (stbi_uc*)s; // using '1' causes warning on some compilers -; 6507 : -; 6508 : default: -; 6509 : return stbi__errpuc("unknown code", "Corrupt GIF"); -; 6510 : } -; 6511 : } -; 6512 : } -; 6513 : -; 6514 : static void* stbi__load_gif_main_outofmem(stbi__gif* g, stbi_uc* out, int** delays) -; 6515 : { -; 6516 : STBI_FREE(g->out); -; 6517 : STBI_FREE(g->history); -; 6518 : STBI_FREE(g->background); -; 6519 : -; 6520 : if (out) STBI_FREE(out); -; 6521 : if (delays && *delays) STBI_FREE(*delays); -; 6522 : return stbi__errpuc("outofmem", "Out of memory"); -; 6523 : } -; 6524 : -; 6525 : static void* stbi__load_gif_main(stbi__context* s, int** delays, int* x, int* y, int* z, int* comp, int req_comp) -; 6526 : { -; 6527 : if (stbi__gif_test(s)) { -; 6528 : int layers = 0; -; 6529 : stbi_uc* u = 0; -; 6530 : stbi_uc* out = 0; -; 6531 : stbi_uc* two_back = 0; -; 6532 : stbi__gif g; -; 6533 : int stride; -; 6534 : int out_size = 0; -; 6535 : int delays_size = 0; -; 6536 : -; 6537 : STBI_NOTUSED(out_size); -; 6538 : STBI_NOTUSED(delays_size); -; 6539 : -; 6540 : memset(&g, 0, sizeof(g)); -; 6541 : if (delays) { -; 6542 : *delays = 0; -; 6543 : } -; 6544 : -; 6545 : do { -; 6546 : u = stbi__gif_load_next(s, &g, comp, req_comp, two_back); -; 6547 : if (u == (stbi_uc*)s) u = 0; // end of animated gif marker -; 6548 : -; 6549 : if (u) { -; 6550 : *x = g.w; -; 6551 : *y = g.h; -; 6552 : ++layers; -; 6553 : stride = g.w * g.h * 4; -; 6554 : -; 6555 : if (out) { -; 6556 : void* tmp = (stbi_uc*)STBI_REALLOC_SIZED(out, out_size, layers * stride); -; 6557 : if (!tmp) -; 6558 : return stbi__load_gif_main_outofmem(&g, out, delays); -; 6559 : else { -; 6560 : out = (stbi_uc*)tmp; -; 6561 : out_size = layers * stride; -; 6562 : } -; 6563 : -; 6564 : if (delays) { -; 6565 : int* new_delays = (int*)STBI_REALLOC_SIZED(*delays, delays_size, sizeof(int) * layers); -; 6566 : if (!new_delays) -; 6567 : return stbi__load_gif_main_outofmem(&g, out, delays); -; 6568 : *delays = new_delays; -; 6569 : delays_size = layers * sizeof(int); -; 6570 : } -; 6571 : } -; 6572 : else { -; 6573 : out = (stbi_uc*)stbi__malloc(layers * stride); -; 6574 : if (!out) -; 6575 : return stbi__load_gif_main_outofmem(&g, out, delays); -; 6576 : out_size = layers * stride; -; 6577 : if (delays) { -; 6578 : *delays = (int*)stbi__malloc(layers * sizeof(int)); -; 6579 : if (!*delays) -; 6580 : return stbi__load_gif_main_outofmem(&g, out, delays); -; 6581 : delays_size = layers * sizeof(int); -; 6582 : } -; 6583 : } -; 6584 : memcpy(out + ((layers - 1) * stride), u, stride); -; 6585 : if (layers >= 2) { -; 6586 : two_back = out - 2 * stride; -; 6587 : } -; 6588 : -; 6589 : if (delays) { -; 6590 : (*delays)[layers - 1U] = g.delay; -; 6591 : } -; 6592 : } -; 6593 : } while (u != 0); -; 6594 : -; 6595 : // free temp buffer; -; 6596 : STBI_FREE(g.out); -; 6597 : STBI_FREE(g.history); -; 6598 : STBI_FREE(g.background); -; 6599 : -; 6600 : // do the final conversion after loading everything; -; 6601 : if (req_comp && req_comp != 4) -; 6602 : out = stbi__convert_format(out, 4, req_comp, layers * g.w, g.h); -; 6603 : -; 6604 : *z = layers; -; 6605 : return out; -; 6606 : } -; 6607 : else { -; 6608 : return stbi__errpuc("not GIF", "Image was not as a gif type."); -; 6609 : } -; 6610 : } -; 6611 : -; 6612 : static void* stbi__gif_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 6613 : { -; 6614 : stbi_uc* u = 0; -; 6615 : stbi__gif g; -; 6616 : memset(&g, 0, sizeof(g)); -; 6617 : STBI_NOTUSED(ri); -; 6618 : -; 6619 : u = stbi__gif_load_next(s, &g, comp, req_comp, 0); -; 6620 : if (u == (stbi_uc*)s) u = 0; // end of animated gif marker -; 6621 : if (u) { -; 6622 : *x = g.w; -; 6623 : *y = g.h; -; 6624 : -; 6625 : // moved conversion to after successful load so that the same -; 6626 : // can be done for multiple frames. -; 6627 : if (req_comp && req_comp != 4) -; 6628 : u = stbi__convert_format(u, 4, req_comp, g.w, g.h); -; 6629 : } -; 6630 : else if (g.out) { -; 6631 : // if there was an error and we allocated an image buffer, free it! -; 6632 : STBI_FREE(g.out); -; 6633 : } -; 6634 : -; 6635 : // free buffers needed for multiple frame loading; -; 6636 : STBI_FREE(g.history); -; 6637 : STBI_FREE(g.background); -; 6638 : -; 6639 : return u; -; 6640 : } -; 6641 : -; 6642 : static int stbi__gif_info(stbi__context* s, int* x, int* y, int* comp) -; 6643 : { -; 6644 : return stbi__gif_info_raw(s, x, y, comp); -; 6645 : } -; 6646 : #endif -; 6647 : -; 6648 : // ************************************************************************************************* -; 6649 : // Radiance RGBE HDR loader -; 6650 : // originally by Nicolas Schulz -; 6651 : #ifndef STBI_NO_HDR -; 6652 : static int stbi__hdr_test_core(stbi__context* s, const char* signature) -; 6653 : { -; 6654 : int i; -; 6655 : for (i = 0; signature[i]; ++i) - +; Line 6655 0006f 48 ff c6 inc rsi 00072 80 3e 00 cmp BYTE PTR [rsi], 0 00075 75 b9 jne SHORT $LL7@stbi__hdr_ - -; 6658 : stbi__rewind(s); -; 6659 : return 1; - +; Line 6659 00077 b8 01 00 00 00 mov eax, 1 0007c eb 6f jmp SHORT $LN18@stbi__hdr_ $LN34@stbi__hdr_: - -; 6657 : return 0; - +; Line 6657 0007e 48 8b 87 d0 00 00 00 mov rax, QWORD PTR [rdi+208] 00085 48 8d 35 00 00 @@ -98919,5650 +35541,49 @@ $LN34@stbi__hdr_: 00 00 mov QWORD PTR [rdi+200], rcx 0009d 0f 1f 00 npad 3 $LL21@stbi__hdr_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000a0 48 3b 87 c8 00 00 00 cmp rax, QWORD PTR [rdi+200] 000a7 73 0b jae SHORT $LN25@stbi__hdr_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 000a9 0f b6 08 movzx ecx, BYTE PTR [rax] 000ac 48 ff c0 inc rax 000af 48 89 03 mov QWORD PTR [rbx], rax 000b2 eb 1e jmp SHORT $LN24@stbi__hdr_ $LN25@stbi__hdr_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000b4 83 7f 30 00 cmp DWORD PTR [rdi+48], 0 000b8 74 16 je SHORT $LN26@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000ba 48 8b cf mov rcx, rdi 000bd e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000c2 48 8b 03 mov rax, QWORD PTR [rbx] 000c5 0f b6 08 movzx ecx, BYTE PTR [rax] 000c8 48 ff c0 inc rax 000cb 48 89 03 mov QWORD PTR [rbx], rax 000ce eb 02 jmp SHORT $LN24@stbi__hdr_ $LN26@stbi__hdr_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000d0 32 c9 xor cl, cl $LN24@stbi__hdr_: - -; 6656 : if (stbi__get8(s) != signature[i]) - +; Line 6656 000d2 0f b6 d1 movzx edx, cl 000d5 0f be 0e movsx ecx, BYTE PTR [rsi] 000d8 3b d1 cmp edx, ecx 000da 75 0f jne SHORT $LN35@stbi__hdr_ - -; 1084 : } -; 1085 : -; 1086 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_HDR) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1087 : // nothing -; 1088 : #else -; 1089 : stbi_inline static int stbi__at_eof(stbi__context* s) -; 1090 : { -; 1091 : if (s->io.read) { -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; -; 1096 : } -; 1097 : -; 1098 : return s->img_buffer >= s->img_buffer_end; -; 1099 : } -; 1100 : #endif -; 1101 : -; 1102 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) -; 1103 : // nothing -; 1104 : #else -; 1105 : static void stbi__skip(stbi__context* s, int n) -; 1106 : { -; 1107 : if (n == 0) return; // already there! -; 1108 : if (n < 0) { -; 1109 : s->img_buffer = s->img_buffer_end; -; 1110 : return; -; 1111 : } -; 1112 : if (s->io.read) { -; 1113 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1114 : if (blen < n) { -; 1115 : s->img_buffer = s->img_buffer_end; -; 1116 : (s->io.skip)(s->io_user_data, n - blen); -; 1117 : return; -; 1118 : } -; 1119 : } -; 1120 : s->img_buffer += n; -; 1121 : } -; 1122 : #endif -; 1123 : -; 1124 : #if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) -; 1125 : // nothing -; 1126 : #else -; 1127 : static int stbi__getn(stbi__context* s, stbi_uc* buffer, int n) -; 1128 : { -; 1129 : if (s->io.read) { -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); -; 1131 : if (blen < n) { -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; -; 1139 : return res; -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { -; 1144 : memcpy(buffer, s->img_buffer, n); -; 1145 : s->img_buffer += n; -; 1146 : return 1; -; 1147 : } -; 1148 : else -; 1149 : return 0; -; 1150 : } -; 1151 : #endif -; 1152 : -; 1153 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1154 : // nothing -; 1155 : #else -; 1156 : static int stbi__get16be(stbi__context* s) -; 1157 : { -; 1158 : int z = stbi__get8(s); -; 1159 : return (z << 8) + stbi__get8(s); -; 1160 : } -; 1161 : #endif -; 1162 : -; 1163 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) -; 1164 : // nothing -; 1165 : #else -; 1166 : static stbi__uint32 stbi__get32be(stbi__context* s) -; 1167 : { -; 1168 : stbi__uint32 z = stbi__get16be(s); -; 1169 : return (z << 16) + stbi__get16be(s); -; 1170 : } -; 1171 : #endif -; 1172 : -; 1173 : #if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -; 1174 : // nothing -; 1175 : #else -; 1176 : static int stbi__get16le(stbi__context* s) -; 1177 : { -; 1178 : int z = stbi__get8(s); -; 1179 : return z + (stbi__get8(s) << 8); -; 1180 : } -; 1181 : #endif -; 1182 : -; 1183 : #ifndef STBI_NO_BMP -; 1184 : static stbi__uint32 stbi__get32le(stbi__context* s) -; 1185 : { -; 1186 : stbi__uint32 z = stbi__get16le(s); -; 1187 : z += (stbi__uint32)stbi__get16le(s) << 16; -; 1188 : return z; -; 1189 : } -; 1190 : #endif -; 1191 : -; 1192 : #define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings -; 1193 : -; 1194 : #if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1195 : // nothing -; 1196 : #else -; 1197 : ////////////////////////////////////////////////////////////////////////////// -; 1198 : // -; 1199 : // generic converter from built-in img_n to req_comp -; 1200 : // individual types do this automatically as much as possible (e.g. jpeg -; 1201 : // does all cases internally since it needs to colorspace convert anyway, -; 1202 : // and it never has alpha, so very few cases ). png can automatically -; 1203 : // interleave an alpha=255 channel, but falls back to this for other cases -; 1204 : // -; 1205 : // assume data buffer is malloced, so malloc a new one and free that one -; 1206 : // only failure mode is malloc failing -; 1207 : -; 1208 : static stbi_uc stbi__compute_y(int r, int g, int b) -; 1209 : { -; 1210 : return (stbi_uc)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1211 : } -; 1212 : #endif -; 1213 : -; 1214 : #if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) -; 1215 : // nothing -; 1216 : #else -; 1217 : static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1218 : { -; 1219 : int i, j; -; 1220 : unsigned char* good; -; 1221 : -; 1222 : if (req_comp == img_n) return data; -; 1223 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1224 : -; 1225 : good = (unsigned char*)stbi__malloc_mad3(req_comp, x, y, 0); -; 1226 : if (good == NULL) { -; 1227 : STBI_FREE(data); -; 1228 : return stbi__errpuc("outofmem", "Out of memory"); -; 1229 : } -; 1230 : -; 1231 : for (j = 0; j < (int)y; ++j) { -; 1232 : unsigned char* src = data + j * x * img_n; -; 1233 : unsigned char* dest = good + j * x * req_comp; -; 1234 : -; 1235 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1236 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1237 : // convert source image with img_n components to one with req_comp components; -; 1238 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1239 : switch (STBI__COMBO(img_n, req_comp)) { -; 1240 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 255; } break; -; 1241 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1242 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 255; } break; -; 1243 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1244 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1245 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1246 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 255; } break; -; 1247 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1248 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = 255; } break; -; 1249 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); } break; -; 1250 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1251 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1252 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1253 : } -; 1254 : #undef STBI__CASE -; 1255 : } -; 1256 : -; 1257 : STBI_FREE(data); -; 1258 : return good; -; 1259 : } -; 1260 : #endif -; 1261 : -; 1262 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1263 : // nothing -; 1264 : #else -; 1265 : static stbi__uint16 stbi__compute_y_16(int r, int g, int b) -; 1266 : { -; 1267 : return (stbi__uint16)(((r * 77) + (g * 150) + (29 * b)) >> 8); -; 1268 : } -; 1269 : #endif -; 1270 : -; 1271 : #if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) -; 1272 : // nothing -; 1273 : #else -; 1274 : static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int req_comp, unsigned int x, unsigned int y) -; 1275 : { -; 1276 : int i, j; -; 1277 : stbi__uint16* good; -; 1278 : -; 1279 : if (req_comp == img_n) return data; -; 1280 : STBI_ASSERT(req_comp >= 1 && req_comp <= 4); -; 1281 : -; 1282 : good = (stbi__uint16*)stbi__malloc(req_comp * x * y * 2); -; 1283 : if (good == NULL) { -; 1284 : STBI_FREE(data); -; 1285 : return (stbi__uint16*)stbi__errpuc("outofmem", "Out of memory"); -; 1286 : } -; 1287 : -; 1288 : for (j = 0; j < (int)y; ++j) { -; 1289 : stbi__uint16* src = data + j * x * img_n; -; 1290 : stbi__uint16* dest = good + j * x * req_comp; -; 1291 : -; 1292 : #define STBI__COMBO(a,b) ((a)*8+(b)) -; 1293 : #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) -; 1294 : // convert source image with img_n components to one with req_comp components; -; 1295 : // avoid switch per pixel, so use switch per scanline and massive macros -; 1296 : switch (STBI__COMBO(img_n, req_comp)) { -; 1297 : STBI__CASE(1, 2) { dest[0] = src[0]; dest[1] = 0xffff; } break; -; 1298 : STBI__CASE(1, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1299 : STBI__CASE(1, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = 0xffff; } break; -; 1300 : STBI__CASE(2, 1) { dest[0] = src[0]; } break; -; 1301 : STBI__CASE(2, 3) { dest[0] = dest[1] = dest[2] = src[0]; } break; -; 1302 : STBI__CASE(2, 4) { dest[0] = dest[1] = dest[2] = src[0]; dest[3] = src[1]; } break; -; 1303 : STBI__CASE(3, 4) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xffff; } break; -; 1304 : STBI__CASE(3, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1305 : STBI__CASE(3, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = 0xffff; } break; -; 1306 : STBI__CASE(4, 1) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); } break; -; 1307 : STBI__CASE(4, 2) { dest[0] = stbi__compute_y_16(src[0], src[1], src[2]); dest[1] = src[3]; } break; -; 1308 : STBI__CASE(4, 3) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; } break; -; 1309 : default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*)stbi__errpuc("unsupported", "Unsupported format conversion"); -; 1310 : } -; 1311 : #undef STBI__CASE -; 1312 : } -; 1313 : -; 1314 : STBI_FREE(data); -; 1315 : return good; -; 1316 : } -; 1317 : #endif -; 1318 : -; 1319 : #ifndef STBI_NO_LINEAR -; 1320 : static float* stbi__ldr_to_hdr(stbi_uc* data, int x, int y, int comp) -; 1321 : { -; 1322 : int i, k, n; -; 1323 : float* output; -; 1324 : if (!data) return NULL; -; 1325 : output = (float*)stbi__malloc_mad4(x, y, comp, sizeof(float), 0); -; 1326 : if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } -; 1327 : // compute number of non-alpha components -; 1328 : if (comp & 1) n = comp; else n = comp - 1; -; 1329 : for (i = 0; i < x * y; ++i) { -; 1330 : for (k = 0; k < n; ++k) { -; 1331 : output[i * comp + k] = (float)(pow(data[i * comp + k] / 255.0f, stbi__l2h_gamma) * stbi__l2h_scale); -; 1332 : } -; 1333 : } -; 1334 : if (n < comp) { -; 1335 : for (i = 0; i < x * y; ++i) { -; 1336 : output[i * comp + n] = data[i * comp + n] / 255.0f; -; 1337 : } -; 1338 : } -; 1339 : STBI_FREE(data); -; 1340 : return output; -; 1341 : } -; 1342 : #endif -; 1343 : -; 1344 : #ifndef STBI_NO_HDR -; 1345 : #define stbi__float2int(x) ((int) (x)) -; 1346 : static stbi_uc* stbi__hdr_to_ldr(float* data, int x, int y, int comp) -; 1347 : { -; 1348 : int i, k, n; -; 1349 : stbi_uc* output; -; 1350 : if (!data) return NULL; -; 1351 : output = (stbi_uc*)stbi__malloc_mad3(x, y, comp, 0); -; 1352 : if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } -; 1353 : // compute number of non-alpha components -; 1354 : if (comp & 1) n = comp; else n = comp - 1; -; 1355 : for (i = 0; i < x * y; ++i) { -; 1356 : for (k = 0; k < n; ++k) { -; 1357 : float z = (float)pow(data[i * comp + k] * stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; -; 1358 : if (z < 0) z = 0; -; 1359 : if (z > 255) z = 255; -; 1360 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1361 : } -; 1362 : if (k < comp) { -; 1363 : float z = data[i * comp + k] * 255 + 0.5f; -; 1364 : if (z < 0) z = 0; -; 1365 : if (z > 255) z = 255; -; 1366 : output[i * comp + k] = (stbi_uc)stbi__float2int(z); -; 1367 : } -; 1368 : } -; 1369 : STBI_FREE(data); -; 1370 : return output; -; 1371 : } -; 1372 : #endif -; 1373 : -; 1374 : ////////////////////////////////////////////////////////////////////////////// -; 1375 : // -; 1376 : // "baseline" JPEG/JFIF decoder -; 1377 : // -; 1378 : // simple implementation -; 1379 : // - doesn't support delayed output of y-dimension -; 1380 : // - simple interface (only one output format: 8-bit interleaved RGB) -; 1381 : // - doesn't try to recover corrupt jpegs -; 1382 : // - doesn't allow partial loading, loading multiple at once -; 1383 : // - still fast on x86 (copying globals into locals doesn't help x86) -; 1384 : // - allocates lots of intermediate memory (full size of all components) -; 1385 : // - non-interleaved case requires this anyway -; 1386 : // - allows good upsampling (see next) -; 1387 : // high-quality -; 1388 : // - upsampled channels are bilinearly interpolated, even across blocks -; 1389 : // - quality integer IDCT derived from IJG's 'slow' -; 1390 : // performance -; 1391 : // - fast huffman; reasonable integer IDCT -; 1392 : // - some SIMD kernels for common paths on targets with SSE2/NEON -; 1393 : // - uses a lot of intermediate memory, could cache poorly -; 1394 : -; 1395 : #ifndef STBI_NO_JPEG -; 1396 : -; 1397 : // huffman decoding acceleration -; 1398 : #define FAST_BITS 9 // larger handles more cases; smaller stomps less cache -; 1399 : -; 1400 : typedef struct -; 1401 : { -; 1402 : stbi_uc fast[1 << FAST_BITS]; -; 1403 : // weirdly, repacking this into AoS is a 10% speed loss, instead of a win -; 1404 : stbi__uint16 code[256]; -; 1405 : stbi_uc values[256]; -; 1406 : stbi_uc size[257]; -; 1407 : unsigned int maxcode[18]; -; 1408 : int delta[17]; // old 'firstsymbol' - old 'firstcode' -; 1409 : } stbi__huffman; -; 1410 : -; 1411 : typedef struct -; 1412 : { -; 1413 : stbi__context* s; -; 1414 : stbi__huffman huff_dc[4]; -; 1415 : stbi__huffman huff_ac[4]; -; 1416 : stbi__uint16 dequant[4][64]; -; 1417 : stbi__int16 fast_ac[4][1 << FAST_BITS]; -; 1418 : -; 1419 : // sizes for components, interleaved MCUs -; 1420 : int img_h_max, img_v_max; -; 1421 : int img_mcu_x, img_mcu_y; -; 1422 : int img_mcu_w, img_mcu_h; -; 1423 : -; 1424 : // definition of jpeg image component -; 1425 : struct -; 1426 : { -; 1427 : int id; -; 1428 : int h, v; -; 1429 : int tq; -; 1430 : int hd, ha; -; 1431 : int dc_pred; -; 1432 : -; 1433 : int x, y, w2, h2; -; 1434 : stbi_uc* data; -; 1435 : void* raw_data, * raw_coeff; -; 1436 : stbi_uc* linebuf; -; 1437 : short* coeff; // progressive only -; 1438 : int coeff_w, coeff_h; // number of 8x8 coefficient blocks -; 1439 : } img_comp[4]; -; 1440 : -; 1441 : stbi__uint32 code_buffer; // jpeg entropy-coded buffer -; 1442 : int code_bits; // number of valid bits -; 1443 : unsigned char marker; // marker seen while filling entropy buffer -; 1444 : int nomore; // flag if we saw a marker so must stop -; 1445 : -; 1446 : int progressive; -; 1447 : int spec_start; -; 1448 : int spec_end; -; 1449 : int succ_high; -; 1450 : int succ_low; -; 1451 : int eob_run; -; 1452 : int jfif; -; 1453 : int app14_color_transform; // Adobe APP14 tag -; 1454 : int rgb; -; 1455 : -; 1456 : int scan_n, order[4]; -; 1457 : int restart_interval, todo; -; 1458 : -; 1459 : // kernels -; 1460 : void (*idct_block_kernel)(stbi_uc* out, int out_stride, short data[64]); -; 1461 : void (*YCbCr_to_RGB_kernel)(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step); -; 1462 : stbi_uc* (*resample_row_hv_2_kernel)(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs); -; 1463 : } stbi__jpeg; -; 1464 : -; 1465 : static int stbi__build_huffman(stbi__huffman* h, int* count) -; 1466 : { -; 1467 : int i, j, k = 0; -; 1468 : unsigned int code; -; 1469 : // build size list for each symbol (from JPEG spec) -; 1470 : for (i = 0; i < 16; ++i) { -; 1471 : for (j = 0; j < count[i]; ++j) { -; 1472 : h->size[k++] = (stbi_uc)(i + 1); -; 1473 : if (k >= 257) return stbi__err("bad size list", "Corrupt JPEG"); -; 1474 : } -; 1475 : } -; 1476 : h->size[k] = 0; -; 1477 : -; 1478 : // compute actual symbols (from jpeg spec) -; 1479 : code = 0; -; 1480 : k = 0; -; 1481 : for (j = 1; j <= 16; ++j) { -; 1482 : // compute delta to add to code to compute symbol id -; 1483 : h->delta[j] = k - code; -; 1484 : if (h->size[k] == j) { -; 1485 : while (h->size[k] == j) -; 1486 : h->code[k++] = (stbi__uint16)(code++); -; 1487 : if (code - 1 >= (1u << j)) return stbi__err("bad code lengths", "Corrupt JPEG"); -; 1488 : } -; 1489 : // compute largest code + 1 for this size, preshifted as needed later -; 1490 : h->maxcode[j] = code << (16 - j); -; 1491 : code <<= 1; -; 1492 : } -; 1493 : h->maxcode[j] = 0xffffffff; -; 1494 : -; 1495 : // build non-spec acceleration table; 255 is flag for not-accelerated -; 1496 : memset(h->fast, 255, 1 << FAST_BITS); -; 1497 : for (i = 0; i < k; ++i) { -; 1498 : int s = h->size[i]; -; 1499 : if (s <= FAST_BITS) { -; 1500 : int c = h->code[i] << (FAST_BITS - s); -; 1501 : int m = 1 << (FAST_BITS - s); -; 1502 : for (j = 0; j < m; ++j) { -; 1503 : h->fast[c + j] = (stbi_uc)i; -; 1504 : } -; 1505 : } -; 1506 : } -; 1507 : return 1; -; 1508 : } -; 1509 : -; 1510 : // build a table that decodes both magnitude and value of small ACs in -; 1511 : // one go. -; 1512 : static void stbi__build_fast_ac(stbi__int16* fast_ac, stbi__huffman* h) -; 1513 : { -; 1514 : int i; -; 1515 : for (i = 0; i < (1 << FAST_BITS); ++i) { -; 1516 : stbi_uc fast = h->fast[i]; -; 1517 : fast_ac[i] = 0; -; 1518 : if (fast < 255) { -; 1519 : int rs = h->values[fast]; -; 1520 : int run = (rs >> 4) & 15; -; 1521 : int magbits = rs & 15; -; 1522 : int len = h->size[fast]; -; 1523 : -; 1524 : if (magbits && len + magbits <= FAST_BITS) { -; 1525 : // magnitude code followed by receive_extend code -; 1526 : int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); -; 1527 : int m = 1 << (magbits - 1); -; 1528 : if (k < m) k += (~0U << magbits) + 1; -; 1529 : // if the result is small enough, we can fit it in fast_ac table -; 1530 : if (k >= -128 && k <= 127) -; 1531 : fast_ac[i] = (stbi__int16)((k * 256) + (run * 16) + (len + magbits)); -; 1532 : } -; 1533 : } -; 1534 : } -; 1535 : } -; 1536 : -; 1537 : static void stbi__grow_buffer_unsafe(stbi__jpeg* j) -; 1538 : { -; 1539 : do { -; 1540 : unsigned int b = j->nomore ? 0 : stbi__get8(j->s); -; 1541 : if (b == 0xff) { -; 1542 : int c = stbi__get8(j->s); -; 1543 : while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes -; 1544 : if (c != 0) { -; 1545 : j->marker = (unsigned char)c; -; 1546 : j->nomore = 1; -; 1547 : return; -; 1548 : } -; 1549 : } -; 1550 : j->code_buffer |= b << (24 - j->code_bits); -; 1551 : j->code_bits += 8; -; 1552 : } while (j->code_bits <= 24); -; 1553 : } -; 1554 : -; 1555 : // (1 << n) - 1 -; 1556 : static const stbi__uint32 stbi__bmask[17] = { 0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535 }; -; 1557 : -; 1558 : // decode a jpeg huffman value from the bitstream -; 1559 : stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg* j, stbi__huffman* h) -; 1560 : { -; 1561 : unsigned int temp; -; 1562 : int c, k; -; 1563 : -; 1564 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1565 : -; 1566 : // look at the top FAST_BITS and determine what symbol ID it is, -; 1567 : // if the code is <= FAST_BITS -; 1568 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1569 : k = h->fast[c]; -; 1570 : if (k < 255) { -; 1571 : int s = h->size[k]; -; 1572 : if (s > j->code_bits) -; 1573 : return -1; -; 1574 : j->code_buffer <<= s; -; 1575 : j->code_bits -= s; -; 1576 : return h->values[k]; -; 1577 : } -; 1578 : -; 1579 : // naive test is to shift the code_buffer down so k bits are -; 1580 : // valid, then test against maxcode. To speed this up, we've -; 1581 : // preshifted maxcode left so that it has (16-k) 0s at the -; 1582 : // end; in other words, regardless of the number of bits, it -; 1583 : // wants to be compared against something shifted to have 16; -; 1584 : // that way we don't need to shift inside the loop. -; 1585 : temp = j->code_buffer >> 16; -; 1586 : for (k = FAST_BITS + 1; ; ++k) -; 1587 : if (temp < h->maxcode[k]) -; 1588 : break; -; 1589 : if (k == 17) { -; 1590 : // error! code not found -; 1591 : j->code_bits -= 16; -; 1592 : return -1; -; 1593 : } -; 1594 : -; 1595 : if (k > j->code_bits) -; 1596 : return -1; -; 1597 : -; 1598 : // convert the huffman code to the symbol id -; 1599 : c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; -; 1600 : if (c < 0 || c >= 256) // symbol id out of bounds! -; 1601 : return -1; -; 1602 : STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); -; 1603 : -; 1604 : // convert the id to a symbol -; 1605 : j->code_bits -= k; -; 1606 : j->code_buffer <<= k; -; 1607 : return h->values[c]; -; 1608 : } -; 1609 : -; 1610 : // bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); -; 1620 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1621 : -; 1622 : sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) -; 1623 : k = stbi_lrot(j->code_buffer, n); -; 1624 : j->code_buffer = k & ~stbi__bmask[n]; -; 1625 : k &= stbi__bmask[n]; -; 1626 : j->code_bits -= n; -; 1627 : return k + (stbi__jbias[n] & (sgn - 1)); -; 1628 : } -; 1629 : -; 1630 : // get some unsigned bits -; 1631 : stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg* j, int n) -; 1632 : { -; 1633 : unsigned int k; -; 1634 : if (j->code_bits < n) stbi__grow_buffer_unsafe(j); -; 1635 : if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1636 : k = stbi_lrot(j->code_buffer, n); -; 1637 : j->code_buffer = k & ~stbi__bmask[n]; -; 1638 : k &= stbi__bmask[n]; -; 1639 : j->code_bits -= n; -; 1640 : return k; -; 1641 : } -; 1642 : -; 1643 : stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg* j) -; 1644 : { -; 1645 : unsigned int k; -; 1646 : if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); -; 1647 : if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing -; 1648 : k = j->code_buffer; -; 1649 : j->code_buffer <<= 1; -; 1650 : --j->code_bits; -; 1651 : return k & 0x80000000; -; 1652 : } -; 1653 : -; 1654 : // given a value that's at position X in the zigzag stream, -; 1655 : // where does it appear in the 8x8 matrix coded as row-major? -; 1656 : static const stbi_uc stbi__jpeg_dezigzag[64 + 15] = -; 1657 : { -; 1658 : 0, 1, 8, 16, 9, 2, 3, 10, -; 1659 : 17, 24, 32, 25, 18, 11, 4, 5, -; 1660 : 12, 19, 26, 33, 40, 48, 41, 34, -; 1661 : 27, 20, 13, 6, 7, 14, 21, 28, -; 1662 : 35, 42, 49, 56, 57, 50, 43, 36, -; 1663 : 29, 22, 15, 23, 30, 37, 44, 51, -; 1664 : 58, 59, 52, 45, 38, 31, 39, 46, -; 1665 : 53, 60, 61, 54, 47, 55, 62, 63, -; 1666 : // let corrupt input sample past end -; 1667 : 63, 63, 63, 63, 63, 63, 63, 63, -; 1668 : 63, 63, 63, 63, 63, 63, 63 -; 1669 : }; -; 1670 : -; 1671 : // decode one 64-entry block-- -; 1672 : static int stbi__jpeg_decode_block(stbi__jpeg* j, short data[64], stbi__huffman* hdc, stbi__huffman* hac, stbi__int16* fac, int b, stbi__uint16* dequant) -; 1673 : { -; 1674 : int diff, dc, k; -; 1675 : int t; -; 1676 : -; 1677 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1678 : t = stbi__jpeg_huff_decode(j, hdc); -; 1679 : if (t < 0 || t > 15) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1680 : -; 1681 : // 0 all the ac values now so we can do it 32-bits at a time -; 1682 : memset(data, 0, 64 * sizeof(data[0])); -; 1683 : -; 1684 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1685 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1686 : dc = j->img_comp[b].dc_pred + diff; -; 1687 : j->img_comp[b].dc_pred = dc; -; 1688 : if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1689 : data[0] = (short)(dc * dequant[0]); -; 1690 : -; 1691 : // decode AC components, see JPEG spec -; 1692 : k = 1; -; 1693 : do { -; 1694 : unsigned int zig; -; 1695 : int c, r, s; -; 1696 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1697 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1698 : r = fac[c]; -; 1699 : if (r) { // fast-AC path -; 1700 : k += (r >> 4) & 15; // run -; 1701 : s = r & 15; // combined length -; 1702 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1703 : j->code_buffer <<= s; -; 1704 : j->code_bits -= s; -; 1705 : // decode into unzigzag'd location -; 1706 : zig = stbi__jpeg_dezigzag[k++]; -; 1707 : data[zig] = (short)((r >> 8) * dequant[zig]); -; 1708 : } -; 1709 : else { -; 1710 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1711 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1712 : s = rs & 15; -; 1713 : r = rs >> 4; -; 1714 : if (s == 0) { -; 1715 : if (rs != 0xf0) break; // end block -; 1716 : k += 16; -; 1717 : } -; 1718 : else { -; 1719 : k += r; -; 1720 : // decode into unzigzag'd location -; 1721 : zig = stbi__jpeg_dezigzag[k++]; -; 1722 : data[zig] = (short)(stbi__extend_receive(j, s) * dequant[zig]); -; 1723 : } -; 1724 : } -; 1725 : } while (k < 64); -; 1726 : return 1; -; 1727 : } -; 1728 : -; 1729 : static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg* j, short data[64], stbi__huffman* hdc, int b) -; 1730 : { -; 1731 : int diff, dc; -; 1732 : int t; -; 1733 : if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1734 : -; 1735 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1736 : -; 1737 : if (j->succ_high == 0) { -; 1738 : // first scan for DC coefficient, must be first -; 1739 : memset(data, 0, 64 * sizeof(data[0])); // 0 all the ac values now -; 1740 : t = stbi__jpeg_huff_decode(j, hdc); -; 1741 : if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1742 : diff = t ? stbi__extend_receive(j, t) : 0; -; 1743 : -; 1744 : if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); -; 1745 : dc = j->img_comp[b].dc_pred + diff; -; 1746 : j->img_comp[b].dc_pred = dc; -; 1747 : if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1748 : data[0] = (short)(dc * (1 << j->succ_low)); -; 1749 : } -; 1750 : else { -; 1751 : // refinement scan for DC coefficient -; 1752 : if (stbi__jpeg_get_bit(j)) -; 1753 : data[0] += (short)(1 << j->succ_low); -; 1754 : } -; 1755 : return 1; -; 1756 : } -; 1757 : -; 1758 : // @OPTIMIZE: store non-zigzagged during the decode passes, -; 1759 : // and only de-zigzag when dequantizing -; 1760 : static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg* j, short data[64], stbi__huffman* hac, stbi__int16* fac) -; 1761 : { -; 1762 : int k; -; 1763 : if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); -; 1764 : -; 1765 : if (j->succ_high == 0) { -; 1766 : int shift = j->succ_low; -; 1767 : -; 1768 : if (j->eob_run) { -; 1769 : --j->eob_run; -; 1770 : return 1; -; 1771 : } -; 1772 : -; 1773 : k = j->spec_start; -; 1774 : do { -; 1775 : unsigned int zig; -; 1776 : int c, r, s; -; 1777 : if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); -; 1778 : c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS) - 1); -; 1779 : r = fac[c]; -; 1780 : if (r) { // fast-AC path -; 1781 : k += (r >> 4) & 15; // run -; 1782 : s = r & 15; // combined length -; 1783 : if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); -; 1784 : j->code_buffer <<= s; -; 1785 : j->code_bits -= s; -; 1786 : zig = stbi__jpeg_dezigzag[k++]; -; 1787 : data[zig] = (short)((r >> 8) * (1 << shift)); -; 1788 : } -; 1789 : else { -; 1790 : int rs = stbi__jpeg_huff_decode(j, hac); -; 1791 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1792 : s = rs & 15; -; 1793 : r = rs >> 4; -; 1794 : if (s == 0) { -; 1795 : if (r < 15) { -; 1796 : j->eob_run = (1 << r); -; 1797 : if (r) -; 1798 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1799 : --j->eob_run; -; 1800 : break; -; 1801 : } -; 1802 : k += 16; -; 1803 : } -; 1804 : else { -; 1805 : k += r; -; 1806 : zig = stbi__jpeg_dezigzag[k++]; -; 1807 : data[zig] = (short)(stbi__extend_receive(j, s) * (1 << shift)); -; 1808 : } -; 1809 : } -; 1810 : } while (k <= j->spec_end); -; 1811 : } -; 1812 : else { -; 1813 : // refinement scan for these AC coefficients -; 1814 : -; 1815 : short bit = (short)(1 << j->succ_low); -; 1816 : -; 1817 : if (j->eob_run) { -; 1818 : --j->eob_run; -; 1819 : for (k = j->spec_start; k <= j->spec_end; ++k) { -; 1820 : short* p = &data[stbi__jpeg_dezigzag[k]]; -; 1821 : if (*p != 0) -; 1822 : if (stbi__jpeg_get_bit(j)) -; 1823 : if ((*p & bit) == 0) { -; 1824 : if (*p > 0) -; 1825 : *p += bit; -; 1826 : else -; 1827 : *p -= bit; -; 1828 : } -; 1829 : } -; 1830 : } -; 1831 : else { -; 1832 : k = j->spec_start; -; 1833 : do { -; 1834 : int r, s; -; 1835 : int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh -; 1836 : if (rs < 0) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1837 : s = rs & 15; -; 1838 : r = rs >> 4; -; 1839 : if (s == 0) { -; 1840 : if (r < 15) { -; 1841 : j->eob_run = (1 << r) - 1; -; 1842 : if (r) -; 1843 : j->eob_run += stbi__jpeg_get_bits(j, r); -; 1844 : r = 64; // force end of block -; 1845 : } -; 1846 : else { -; 1847 : // r=15 s=0 should write 16 0s, so we just do -; 1848 : // a run of 15 0s and then write s (which is 0), -; 1849 : // so we don't have to do anything special here -; 1850 : } -; 1851 : } -; 1852 : else { -; 1853 : if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); -; 1854 : // sign bit -; 1855 : if (stbi__jpeg_get_bit(j)) -; 1856 : s = bit; -; 1857 : else -; 1858 : s = -bit; -; 1859 : } -; 1860 : -; 1861 : // advance by r -; 1862 : while (k <= j->spec_end) { -; 1863 : short* p = &data[stbi__jpeg_dezigzag[k++]]; -; 1864 : if (*p != 0) { -; 1865 : if (stbi__jpeg_get_bit(j)) -; 1866 : if ((*p & bit) == 0) { -; 1867 : if (*p > 0) -; 1868 : *p += bit; -; 1869 : else -; 1870 : *p -= bit; -; 1871 : } -; 1872 : } -; 1873 : else { -; 1874 : if (r == 0) { -; 1875 : *p = (short)s; -; 1876 : break; -; 1877 : } -; 1878 : --r; -; 1879 : } -; 1880 : } -; 1881 : } while (k <= j->spec_end); -; 1882 : } -; 1883 : } -; 1884 : return 1; -; 1885 : } -; 1886 : -; 1887 : // take a -128..127 value and stbi__clamp it and convert to 0..255 -; 1888 : stbi_inline static stbi_uc stbi__clamp(int x) -; 1889 : { -; 1890 : // trick to use a single test to catch both cases -; 1891 : if ((unsigned int)x > 255) { -; 1892 : if (x < 0) return 0; -; 1893 : if (x > 255) return 255; -; 1894 : } -; 1895 : return (stbi_uc)x; -; 1896 : } -; 1897 : -; 1898 : #define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -; 1899 : #define stbi__fsh(x) ((x) * 4096) -; 1900 : -; 1901 : // derived from jidctint -- DCT_ISLOW -; 1902 : #define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ -; 1903 : int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ -; 1904 : p2 = s2; \ -; 1905 : p3 = s6; \ -; 1906 : p1 = (p2+p3) * stbi__f2f(0.5411961f); \ -; 1907 : t2 = p1 + p3*stbi__f2f(-1.847759065f); \ -; 1908 : t3 = p1 + p2*stbi__f2f( 0.765366865f); \ -; 1909 : p2 = s0; \ -; 1910 : p3 = s4; \ -; 1911 : t0 = stbi__fsh(p2+p3); \ -; 1912 : t1 = stbi__fsh(p2-p3); \ -; 1913 : x0 = t0+t3; \ -; 1914 : x3 = t0-t3; \ -; 1915 : x1 = t1+t2; \ -; 1916 : x2 = t1-t2; \ -; 1917 : t0 = s7; \ -; 1918 : t1 = s5; \ -; 1919 : t2 = s3; \ -; 1920 : t3 = s1; \ -; 1921 : p3 = t0+t2; \ -; 1922 : p4 = t1+t3; \ -; 1923 : p1 = t0+t3; \ -; 1924 : p2 = t1+t2; \ -; 1925 : p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ -; 1926 : t0 = t0*stbi__f2f( 0.298631336f); \ -; 1927 : t1 = t1*stbi__f2f( 2.053119869f); \ -; 1928 : t2 = t2*stbi__f2f( 3.072711026f); \ -; 1929 : t3 = t3*stbi__f2f( 1.501321110f); \ -; 1930 : p1 = p5 + p1*stbi__f2f(-0.899976223f); \ -; 1931 : p2 = p5 + p2*stbi__f2f(-2.562915447f); \ -; 1932 : p3 = p3*stbi__f2f(-1.961570560f); \ -; 1933 : p4 = p4*stbi__f2f(-0.390180644f); \ -; 1934 : t3 += p1+p4; \ -; 1935 : t2 += p2+p3; \ -; 1936 : t1 += p2+p4; \ -; 1937 : t0 += p1+p3; -; 1938 : -; 1939 : static void stbi__idct_block(stbi_uc* out, int out_stride, short data[64]) -; 1940 : { -; 1941 : int i, val[64], * v = val; -; 1942 : stbi_uc* o; -; 1943 : short* d = data; -; 1944 : -; 1945 : // columns -; 1946 : for (i = 0; i < 8; ++i, ++d, ++v) { -; 1947 : // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing -; 1948 : if (d[8] == 0 && d[16] == 0 && d[24] == 0 && d[32] == 0 -; 1949 : && d[40] == 0 && d[48] == 0 && d[56] == 0) { -; 1950 : // no shortcut 0 seconds -; 1951 : // (1|2|3|4|5|6|7)==0 0 seconds -; 1952 : // all separate -0.047 seconds -; 1953 : // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds -; 1954 : int dcterm = d[0] * 4; -; 1955 : v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; -; 1956 : } -; 1957 : else { -; 1958 : STBI__IDCT_1D(d[0], d[8], d[16], d[24], d[32], d[40], d[48], d[56]) -; 1959 : // constants scaled things up by 1<<12; let's bring them back -; 1960 : // down, but keep 2 extra bits of precision -; 1961 : x0 += 512; x1 += 512; x2 += 512; x3 += 512; -; 1962 : v[0] = (x0 + t3) >> 10; -; 1963 : v[56] = (x0 - t3) >> 10; -; 1964 : v[8] = (x1 + t2) >> 10; -; 1965 : v[48] = (x1 - t2) >> 10; -; 1966 : v[16] = (x2 + t1) >> 10; -; 1967 : v[40] = (x2 - t1) >> 10; -; 1968 : v[24] = (x3 + t0) >> 10; -; 1969 : v[32] = (x3 - t0) >> 10; -; 1970 : } -; 1971 : } -; 1972 : -; 1973 : for (i = 0, v = val, o = out; i < 8; ++i, v += 8, o += out_stride) { -; 1974 : // no fast case since the first 1D IDCT spread components out -; 1975 : STBI__IDCT_1D(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]) -; 1976 : // constants scaled things up by 1<<12, plus we had 1<<2 from first -; 1977 : // loop, plus horizontal and vertical each scale by sqrt(8) so together -; 1978 : // we've got an extra 1<<3, so 1<<17 total we need to remove. -; 1979 : // so we want to round that, which means adding 0.5 * 1<<17, -; 1980 : // aka 65536. Also, we'll end up with -128 to 127 that we want -; 1981 : // to encode as 0..255 by adding 128, so we'll add that before the shift -; 1982 : x0 += 65536 + (128 << 17); -; 1983 : x1 += 65536 + (128 << 17); -; 1984 : x2 += 65536 + (128 << 17); -; 1985 : x3 += 65536 + (128 << 17); -; 1986 : // tried computing the shifts into temps, or'ing the temps to see -; 1987 : // if any were out of range, but that was slower -; 1988 : o[0] = stbi__clamp((x0 + t3) >> 17); -; 1989 : o[7] = stbi__clamp((x0 - t3) >> 17); -; 1990 : o[1] = stbi__clamp((x1 + t2) >> 17); -; 1991 : o[6] = stbi__clamp((x1 - t2) >> 17); -; 1992 : o[2] = stbi__clamp((x2 + t1) >> 17); -; 1993 : o[5] = stbi__clamp((x2 - t1) >> 17); -; 1994 : o[3] = stbi__clamp((x3 + t0) >> 17); -; 1995 : o[4] = stbi__clamp((x3 - t0) >> 17); -; 1996 : } -; 1997 : } -; 1998 : -; 1999 : #ifdef STBI_SSE2 -; 2000 : // sse2 integer IDCT. not the fastest possible implementation but it -; 2001 : // produces bit-identical results to the generic C version so it's -; 2002 : // fully "transparent". -; 2003 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2004 : { -; 2005 : // This is constructed to match our regular (generic) integer IDCT exactly. -; 2006 : __m128i row0, row1, row2, row3, row4, row5, row6, row7; -; 2007 : __m128i tmp; -; 2008 : -; 2009 : // dot product constant: even elems=x, odd elems=y -; 2010 : #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) -; 2011 : -; 2012 : // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) -; 2013 : // out(1) = c1[even]*x + c1[odd]*y -; 2014 : #define dct_rot(out0,out1, x,y,c0,c1) \ -; 2015 : __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ -; 2016 : __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ -; 2017 : __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ -; 2018 : __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ -; 2019 : __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ -; 2020 : __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) -; 2021 : -; 2022 : // out = in << 12 (in 16-bit, out 32-bit) -; 2023 : #define dct_widen(out, in) \ -; 2024 : __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ -; 2025 : __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) -; 2026 : -; 2027 : // wide add -; 2028 : #define dct_wadd(out, a, b) \ -; 2029 : __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ -; 2030 : __m128i out##_h = _mm_add_epi32(a##_h, b##_h) -; 2031 : -; 2032 : // wide sub -; 2033 : #define dct_wsub(out, a, b) \ -; 2034 : __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ -; 2035 : __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) -; 2036 : -; 2037 : // butterfly a/b, add bias, then shift by "s" and pack -; 2038 : #define dct_bfly32o(out0, out1, a,b,bias,s) \ -; 2039 : { \ -; 2040 : __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ -; 2041 : __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ -; 2042 : dct_wadd(sum, abiased, b); \ -; 2043 : dct_wsub(dif, abiased, b); \ -; 2044 : out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ -; 2045 : out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ -; 2046 : } -; 2047 : -; 2048 : // 8-bit interleave step (for transposes) -; 2049 : #define dct_interleave8(a, b) \ -; 2050 : tmp = a; \ -; 2051 : a = _mm_unpacklo_epi8(a, b); \ -; 2052 : b = _mm_unpackhi_epi8(tmp, b) -; 2053 : -; 2054 : // 16-bit interleave step (for transposes) -; 2055 : #define dct_interleave16(a, b) \ -; 2056 : tmp = a; \ -; 2057 : a = _mm_unpacklo_epi16(a, b); \ -; 2058 : b = _mm_unpackhi_epi16(tmp, b) -; 2059 : -; 2060 : #define dct_pass(bias,shift) \ -; 2061 : { \ -; 2062 : /* even part */ \ -; 2063 : dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ -; 2064 : __m128i sum04 = _mm_add_epi16(row0, row4); \ -; 2065 : __m128i dif04 = _mm_sub_epi16(row0, row4); \ -; 2066 : dct_widen(t0e, sum04); \ -; 2067 : dct_widen(t1e, dif04); \ -; 2068 : dct_wadd(x0, t0e, t3e); \ -; 2069 : dct_wsub(x3, t0e, t3e); \ -; 2070 : dct_wadd(x1, t1e, t2e); \ -; 2071 : dct_wsub(x2, t1e, t2e); \ -; 2072 : /* odd part */ \ -; 2073 : dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ -; 2074 : dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ -; 2075 : __m128i sum17 = _mm_add_epi16(row1, row7); \ -; 2076 : __m128i sum35 = _mm_add_epi16(row3, row5); \ -; 2077 : dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ -; 2078 : dct_wadd(x4, y0o, y4o); \ -; 2079 : dct_wadd(x5, y1o, y5o); \ -; 2080 : dct_wadd(x6, y2o, y5o); \ -; 2081 : dct_wadd(x7, y3o, y4o); \ -; 2082 : dct_bfly32o(row0,row7, x0,x7,bias,shift); \ -; 2083 : dct_bfly32o(row1,row6, x1,x6,bias,shift); \ -; 2084 : dct_bfly32o(row2,row5, x2,x5,bias,shift); \ -; 2085 : dct_bfly32o(row3,row4, x3,x4,bias,shift); \ -; 2086 : } -; 2087 : -; 2088 : __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); -; 2089 : __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f(0.765366865f), stbi__f2f(0.5411961f)); -; 2090 : __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); -; 2091 : __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); -; 2092 : __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f(0.298631336f), stbi__f2f(-1.961570560f)); -; 2093 : __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f(3.072711026f)); -; 2094 : __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f(2.053119869f), stbi__f2f(-0.390180644f)); -; 2095 : __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f(1.501321110f)); -; 2096 : -; 2097 : // rounding biases in column/row passes, see stbi__idct_block for explanation. -; 2098 : __m128i bias_0 = _mm_set1_epi32(512); -; 2099 : __m128i bias_1 = _mm_set1_epi32(65536 + (128 << 17)); -; 2100 : -; 2101 : // load -; 2102 : row0 = _mm_load_si128((const __m128i*) (data + 0 * 8)); -; 2103 : row1 = _mm_load_si128((const __m128i*) (data + 1 * 8)); -; 2104 : row2 = _mm_load_si128((const __m128i*) (data + 2 * 8)); -; 2105 : row3 = _mm_load_si128((const __m128i*) (data + 3 * 8)); -; 2106 : row4 = _mm_load_si128((const __m128i*) (data + 4 * 8)); -; 2107 : row5 = _mm_load_si128((const __m128i*) (data + 5 * 8)); -; 2108 : row6 = _mm_load_si128((const __m128i*) (data + 6 * 8)); -; 2109 : row7 = _mm_load_si128((const __m128i*) (data + 7 * 8)); -; 2110 : -; 2111 : // column pass -; 2112 : dct_pass(bias_0, 10); -; 2113 : -; 2114 : { -; 2115 : // 16bit 8x8 transpose pass 1 -; 2116 : dct_interleave16(row0, row4); -; 2117 : dct_interleave16(row1, row5); -; 2118 : dct_interleave16(row2, row6); -; 2119 : dct_interleave16(row3, row7); -; 2120 : -; 2121 : // transpose pass 2 -; 2122 : dct_interleave16(row0, row2); -; 2123 : dct_interleave16(row1, row3); -; 2124 : dct_interleave16(row4, row6); -; 2125 : dct_interleave16(row5, row7); -; 2126 : -; 2127 : // transpose pass 3 -; 2128 : dct_interleave16(row0, row1); -; 2129 : dct_interleave16(row2, row3); -; 2130 : dct_interleave16(row4, row5); -; 2131 : dct_interleave16(row6, row7); -; 2132 : } -; 2133 : -; 2134 : // row pass -; 2135 : dct_pass(bias_1, 17); -; 2136 : -; 2137 : { -; 2138 : // pack -; 2139 : __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 -; 2140 : __m128i p1 = _mm_packus_epi16(row2, row3); -; 2141 : __m128i p2 = _mm_packus_epi16(row4, row5); -; 2142 : __m128i p3 = _mm_packus_epi16(row6, row7); -; 2143 : -; 2144 : // 8bit 8x8 transpose pass 1 -; 2145 : dct_interleave8(p0, p2); // a0e0a1e1... -; 2146 : dct_interleave8(p1, p3); // c0g0c1g1... -; 2147 : -; 2148 : // transpose pass 2 -; 2149 : dct_interleave8(p0, p1); // a0c0e0g0... -; 2150 : dct_interleave8(p2, p3); // b0d0f0h0... -; 2151 : -; 2152 : // transpose pass 3 -; 2153 : dct_interleave8(p0, p2); // a0b0c0d0... -; 2154 : dct_interleave8(p1, p3); // a4b4c4d4... -; 2155 : -; 2156 : // store -; 2157 : _mm_storel_epi64((__m128i*) out, p0); out += out_stride; -; 2158 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; -; 2159 : _mm_storel_epi64((__m128i*) out, p2); out += out_stride; -; 2160 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; -; 2161 : _mm_storel_epi64((__m128i*) out, p1); out += out_stride; -; 2162 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; -; 2163 : _mm_storel_epi64((__m128i*) out, p3); out += out_stride; -; 2164 : _mm_storel_epi64((__m128i*) out, _mm_shuffle_epi32(p3, 0x4e)); -; 2165 : } -; 2166 : -; 2167 : #undef dct_const -; 2168 : #undef dct_rot -; 2169 : #undef dct_widen -; 2170 : #undef dct_wadd -; 2171 : #undef dct_wsub -; 2172 : #undef dct_bfly32o -; 2173 : #undef dct_interleave8 -; 2174 : #undef dct_interleave16 -; 2175 : #undef dct_pass -; 2176 : } -; 2177 : -; 2178 : #endif // STBI_SSE2 -; 2179 : -; 2180 : #ifdef STBI_NEON -; 2181 : -; 2182 : // NEON integer IDCT. should produce bit-identical -; 2183 : // results to the generic C version. -; 2184 : static void stbi__idct_simd(stbi_uc* out, int out_stride, short data[64]) -; 2185 : { -; 2186 : int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; -; 2187 : -; 2188 : int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); -; 2189 : int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); -; 2190 : int16x4_t rot0_2 = vdup_n_s16(stbi__f2f(0.765366865f)); -; 2191 : int16x4_t rot1_0 = vdup_n_s16(stbi__f2f(1.175875602f)); -; 2192 : int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); -; 2193 : int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); -; 2194 : int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); -; 2195 : int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); -; 2196 : int16x4_t rot3_0 = vdup_n_s16(stbi__f2f(0.298631336f)); -; 2197 : int16x4_t rot3_1 = vdup_n_s16(stbi__f2f(2.053119869f)); -; 2198 : int16x4_t rot3_2 = vdup_n_s16(stbi__f2f(3.072711026f)); -; 2199 : int16x4_t rot3_3 = vdup_n_s16(stbi__f2f(1.501321110f)); -; 2200 : -; 2201 : #define dct_long_mul(out, inq, coeff) \ -; 2202 : int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ -; 2203 : int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) -; 2204 : -; 2205 : #define dct_long_mac(out, acc, inq, coeff) \ -; 2206 : int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ -; 2207 : int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) -; 2208 : -; 2209 : #define dct_widen(out, inq) \ -; 2210 : int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ -; 2211 : int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) -; 2212 : -; 2213 : // wide add -; 2214 : #define dct_wadd(out, a, b) \ -; 2215 : int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ -; 2216 : int32x4_t out##_h = vaddq_s32(a##_h, b##_h) -; 2217 : -; 2218 : // wide sub -; 2219 : #define dct_wsub(out, a, b) \ -; 2220 : int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ -; 2221 : int32x4_t out##_h = vsubq_s32(a##_h, b##_h) -; 2222 : -; 2223 : // butterfly a/b, then shift using "shiftop" by "s" and pack -; 2224 : #define dct_bfly32o(out0,out1, a,b,shiftop,s) \ -; 2225 : { \ -; 2226 : dct_wadd(sum, a, b); \ -; 2227 : dct_wsub(dif, a, b); \ -; 2228 : out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ -; 2229 : out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ -; 2230 : } -; 2231 : -; 2232 : #define dct_pass(shiftop, shift) \ -; 2233 : { \ -; 2234 : /* even part */ \ -; 2235 : int16x8_t sum26 = vaddq_s16(row2, row6); \ -; 2236 : dct_long_mul(p1e, sum26, rot0_0); \ -; 2237 : dct_long_mac(t2e, p1e, row6, rot0_1); \ -; 2238 : dct_long_mac(t3e, p1e, row2, rot0_2); \ -; 2239 : int16x8_t sum04 = vaddq_s16(row0, row4); \ -; 2240 : int16x8_t dif04 = vsubq_s16(row0, row4); \ -; 2241 : dct_widen(t0e, sum04); \ -; 2242 : dct_widen(t1e, dif04); \ -; 2243 : dct_wadd(x0, t0e, t3e); \ -; 2244 : dct_wsub(x3, t0e, t3e); \ -; 2245 : dct_wadd(x1, t1e, t2e); \ -; 2246 : dct_wsub(x2, t1e, t2e); \ -; 2247 : /* odd part */ \ -; 2248 : int16x8_t sum15 = vaddq_s16(row1, row5); \ -; 2249 : int16x8_t sum17 = vaddq_s16(row1, row7); \ -; 2250 : int16x8_t sum35 = vaddq_s16(row3, row5); \ -; 2251 : int16x8_t sum37 = vaddq_s16(row3, row7); \ -; 2252 : int16x8_t sumodd = vaddq_s16(sum17, sum35); \ -; 2253 : dct_long_mul(p5o, sumodd, rot1_0); \ -; 2254 : dct_long_mac(p1o, p5o, sum17, rot1_1); \ -; 2255 : dct_long_mac(p2o, p5o, sum35, rot1_2); \ -; 2256 : dct_long_mul(p3o, sum37, rot2_0); \ -; 2257 : dct_long_mul(p4o, sum15, rot2_1); \ -; 2258 : dct_wadd(sump13o, p1o, p3o); \ -; 2259 : dct_wadd(sump24o, p2o, p4o); \ -; 2260 : dct_wadd(sump23o, p2o, p3o); \ -; 2261 : dct_wadd(sump14o, p1o, p4o); \ -; 2262 : dct_long_mac(x4, sump13o, row7, rot3_0); \ -; 2263 : dct_long_mac(x5, sump24o, row5, rot3_1); \ -; 2264 : dct_long_mac(x6, sump23o, row3, rot3_2); \ -; 2265 : dct_long_mac(x7, sump14o, row1, rot3_3); \ -; 2266 : dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ -; 2267 : dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ -; 2268 : dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ -; 2269 : dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ -; 2270 : } -; 2271 : -; 2272 : // load -; 2273 : row0 = vld1q_s16(data + 0 * 8); -; 2274 : row1 = vld1q_s16(data + 1 * 8); -; 2275 : row2 = vld1q_s16(data + 2 * 8); -; 2276 : row3 = vld1q_s16(data + 3 * 8); -; 2277 : row4 = vld1q_s16(data + 4 * 8); -; 2278 : row5 = vld1q_s16(data + 5 * 8); -; 2279 : row6 = vld1q_s16(data + 6 * 8); -; 2280 : row7 = vld1q_s16(data + 7 * 8); -; 2281 : -; 2282 : // add DC bias -; 2283 : row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); -; 2284 : -; 2285 : // column pass -; 2286 : dct_pass(vrshrn_n_s32, 10); -; 2287 : -; 2288 : // 16bit 8x8 transpose -; 2289 : { -; 2290 : // these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -; 2291 : // whether compilers actually get this is another story, sadly. -; 2292 : #define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -; 2293 : #define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -; 2294 : #define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } -; 2295 : -; 2296 : // pass 1 -; 2297 : dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 -; 2298 : dct_trn16(row2, row3); -; 2299 : dct_trn16(row4, row5); -; 2300 : dct_trn16(row6, row7); -; 2301 : -; 2302 : // pass 2 -; 2303 : dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 -; 2304 : dct_trn32(row1, row3); -; 2305 : dct_trn32(row4, row6); -; 2306 : dct_trn32(row5, row7); -; 2307 : -; 2308 : // pass 3 -; 2309 : dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 -; 2310 : dct_trn64(row1, row5); -; 2311 : dct_trn64(row2, row6); -; 2312 : dct_trn64(row3, row7); -; 2313 : -; 2314 : #undef dct_trn16 -; 2315 : #undef dct_trn32 -; 2316 : #undef dct_trn64 -; 2317 : } -; 2318 : -; 2319 : // row pass -; 2320 : // vrshrn_n_s32 only supports shifts up to 16, we need -; 2321 : // 17. so do a non-rounding shift of 16 first then follow -; 2322 : // up with a rounding shift by 1. -; 2323 : dct_pass(vshrn_n_s32, 16); -; 2324 : -; 2325 : { -; 2326 : // pack and round -; 2327 : uint8x8_t p0 = vqrshrun_n_s16(row0, 1); -; 2328 : uint8x8_t p1 = vqrshrun_n_s16(row1, 1); -; 2329 : uint8x8_t p2 = vqrshrun_n_s16(row2, 1); -; 2330 : uint8x8_t p3 = vqrshrun_n_s16(row3, 1); -; 2331 : uint8x8_t p4 = vqrshrun_n_s16(row4, 1); -; 2332 : uint8x8_t p5 = vqrshrun_n_s16(row5, 1); -; 2333 : uint8x8_t p6 = vqrshrun_n_s16(row6, 1); -; 2334 : uint8x8_t p7 = vqrshrun_n_s16(row7, 1); -; 2335 : -; 2336 : // again, these can translate into one instruction, but often don't. -; 2337 : #define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -; 2338 : #define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -; 2339 : #define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } -; 2340 : -; 2341 : // sadly can't use interleaved stores here since we only write -; 2342 : // 8 bytes to each scan line! -; 2343 : -; 2344 : // 8x8 8-bit transpose pass 1 -; 2345 : dct_trn8_8(p0, p1); -; 2346 : dct_trn8_8(p2, p3); -; 2347 : dct_trn8_8(p4, p5); -; 2348 : dct_trn8_8(p6, p7); -; 2349 : -; 2350 : // pass 2 -; 2351 : dct_trn8_16(p0, p2); -; 2352 : dct_trn8_16(p1, p3); -; 2353 : dct_trn8_16(p4, p6); -; 2354 : dct_trn8_16(p5, p7); -; 2355 : -; 2356 : // pass 3 -; 2357 : dct_trn8_32(p0, p4); -; 2358 : dct_trn8_32(p1, p5); -; 2359 : dct_trn8_32(p2, p6); -; 2360 : dct_trn8_32(p3, p7); -; 2361 : -; 2362 : // store -; 2363 : vst1_u8(out, p0); out += out_stride; -; 2364 : vst1_u8(out, p1); out += out_stride; -; 2365 : vst1_u8(out, p2); out += out_stride; -; 2366 : vst1_u8(out, p3); out += out_stride; -; 2367 : vst1_u8(out, p4); out += out_stride; -; 2368 : vst1_u8(out, p5); out += out_stride; -; 2369 : vst1_u8(out, p6); out += out_stride; -; 2370 : vst1_u8(out, p7); -; 2371 : -; 2372 : #undef dct_trn8_8 -; 2373 : #undef dct_trn8_16 -; 2374 : #undef dct_trn8_32 -; 2375 : } -; 2376 : -; 2377 : #undef dct_long_mul -; 2378 : #undef dct_long_mac -; 2379 : #undef dct_widen -; 2380 : #undef dct_wadd -; 2381 : #undef dct_wsub -; 2382 : #undef dct_bfly32o -; 2383 : #undef dct_pass -; 2384 : } -; 2385 : -; 2386 : #endif // STBI_NEON -; 2387 : -; 2388 : #define STBI__MARKER_none 0xff -; 2389 : // if there's a pending marker from the entropy stream, return that -; 2390 : // otherwise, fetch from the stream and get a marker. if there's no -; 2391 : // marker, return 0xff, which is never a valid marker value -; 2392 : static stbi_uc stbi__get_marker(stbi__jpeg* j) -; 2393 : { -; 2394 : stbi_uc x; -; 2395 : if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } -; 2396 : x = stbi__get8(j->s); -; 2397 : if (x != 0xff) return STBI__MARKER_none; -; 2398 : while (x == 0xff) -; 2399 : x = stbi__get8(j->s); // consume repeated 0xff fill bytes -; 2400 : return x; -; 2401 : } -; 2402 : -; 2403 : // in each scan, we'll have scan_n components, and the order -; 2404 : // of the components is specified by order[] -; 2405 : #define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) -; 2406 : -; 2407 : // after a restart interval, stbi__jpeg_reset the entropy decoder and -; 2408 : // the dc prediction -; 2409 : static void stbi__jpeg_reset(stbi__jpeg* j) -; 2410 : { -; 2411 : j->code_bits = 0; -; 2412 : j->code_buffer = 0; -; 2413 : j->nomore = 0; -; 2414 : j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; -; 2415 : j->marker = STBI__MARKER_none; -; 2416 : j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; -; 2417 : j->eob_run = 0; -; 2418 : // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, -; 2419 : // since we don't even allow 1<<30 pixels -; 2420 : } -; 2421 : -; 2422 : static int stbi__parse_entropy_coded_data(stbi__jpeg* z) -; 2423 : { -; 2424 : stbi__jpeg_reset(z); -; 2425 : if (!z->progressive) { -; 2426 : if (z->scan_n == 1) { -; 2427 : int i, j; -; 2428 : STBI_SIMD_ALIGN(short, data[64]); -; 2429 : int n = z->order[0]; -; 2430 : // non-interleaved data, we just need to process one block at a time, -; 2431 : // in trivial scanline order -; 2432 : // number of blocks to do just depends on how many actual "pixels" this -; 2433 : // component has, independent of interleaved MCU blocking and such -; 2434 : int w = (z->img_comp[n].x + 7) >> 3; -; 2435 : int h = (z->img_comp[n].y + 7) >> 3; -; 2436 : for (j = 0; j < h; ++j) { -; 2437 : for (i = 0; i < w; ++i) { -; 2438 : int ha = z->img_comp[n].ha; -; 2439 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2440 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2441 : // every data block is an MCU, so countdown the restart interval -; 2442 : if (--z->todo <= 0) { -; 2443 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2444 : // if it's NOT a restart, then just bail, so we get corrupt data -; 2445 : // rather than no data -; 2446 : if (!STBI__RESTART(z->marker)) return 1; -; 2447 : stbi__jpeg_reset(z); -; 2448 : } -; 2449 : } -; 2450 : } -; 2451 : return 1; -; 2452 : } -; 2453 : else { // interleaved -; 2454 : int i, j, k, x, y; -; 2455 : STBI_SIMD_ALIGN(short, data[64]); -; 2456 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2457 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2458 : // scan an interleaved mcu... process scan_n components in order -; 2459 : for (k = 0; k < z->scan_n; ++k) { -; 2460 : int n = z->order[k]; -; 2461 : // scan out an mcu's worth of this component; that's just determined -; 2462 : // by the basic H and V specified for the component -; 2463 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2464 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2465 : int x2 = (i * z->img_comp[n].h + x) * 8; -; 2466 : int y2 = (j * z->img_comp[n].v + y) * 8; -; 2467 : int ha = z->img_comp[n].ha; -; 2468 : if (!stbi__jpeg_decode_block(z, data, z->huff_dc + z->img_comp[n].hd, z->huff_ac + ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; -; 2469 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * y2 + x2, z->img_comp[n].w2, data); -; 2470 : } -; 2471 : } -; 2472 : } -; 2473 : // after all interleaved components, that's an interleaved MCU, -; 2474 : // so now count down the restart interval -; 2475 : if (--z->todo <= 0) { -; 2476 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2477 : if (!STBI__RESTART(z->marker)) return 1; -; 2478 : stbi__jpeg_reset(z); -; 2479 : } -; 2480 : } -; 2481 : } -; 2482 : return 1; -; 2483 : } -; 2484 : } -; 2485 : else { -; 2486 : if (z->scan_n == 1) { -; 2487 : int i, j; -; 2488 : int n = z->order[0]; -; 2489 : // non-interleaved data, we just need to process one block at a time, -; 2490 : // in trivial scanline order -; 2491 : // number of blocks to do just depends on how many actual "pixels" this -; 2492 : // component has, independent of interleaved MCU blocking and such -; 2493 : int w = (z->img_comp[n].x + 7) >> 3; -; 2494 : int h = (z->img_comp[n].y + 7) >> 3; -; 2495 : for (j = 0; j < h; ++j) { -; 2496 : for (i = 0; i < w; ++i) { -; 2497 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2498 : if (z->spec_start == 0) { -; 2499 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2500 : return 0; -; 2501 : } -; 2502 : else { -; 2503 : int ha = z->img_comp[n].ha; -; 2504 : if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) -; 2505 : return 0; -; 2506 : } -; 2507 : // every data block is an MCU, so countdown the restart interval -; 2508 : if (--z->todo <= 0) { -; 2509 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2510 : if (!STBI__RESTART(z->marker)) return 1; -; 2511 : stbi__jpeg_reset(z); -; 2512 : } -; 2513 : } -; 2514 : } -; 2515 : return 1; -; 2516 : } -; 2517 : else { // interleaved -; 2518 : int i, j, k, x, y; -; 2519 : for (j = 0; j < z->img_mcu_y; ++j) { -; 2520 : for (i = 0; i < z->img_mcu_x; ++i) { -; 2521 : // scan an interleaved mcu... process scan_n components in order -; 2522 : for (k = 0; k < z->scan_n; ++k) { -; 2523 : int n = z->order[k]; -; 2524 : // scan out an mcu's worth of this component; that's just determined -; 2525 : // by the basic H and V specified for the component -; 2526 : for (y = 0; y < z->img_comp[n].v; ++y) { -; 2527 : for (x = 0; x < z->img_comp[n].h; ++x) { -; 2528 : int x2 = (i * z->img_comp[n].h + x); -; 2529 : int y2 = (j * z->img_comp[n].v + y); -; 2530 : short* data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); -; 2531 : if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) -; 2532 : return 0; -; 2533 : } -; 2534 : } -; 2535 : } -; 2536 : // after all interleaved components, that's an interleaved MCU, -; 2537 : // so now count down the restart interval -; 2538 : if (--z->todo <= 0) { -; 2539 : if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); -; 2540 : if (!STBI__RESTART(z->marker)) return 1; -; 2541 : stbi__jpeg_reset(z); -; 2542 : } -; 2543 : } -; 2544 : } -; 2545 : return 1; -; 2546 : } -; 2547 : } -; 2548 : } -; 2549 : -; 2550 : static void stbi__jpeg_dequantize(short* data, stbi__uint16* dequant) -; 2551 : { -; 2552 : int i; -; 2553 : for (i = 0; i < 64; ++i) -; 2554 : data[i] *= dequant[i]; -; 2555 : } -; 2556 : -; 2557 : static void stbi__jpeg_finish(stbi__jpeg* z) -; 2558 : { -; 2559 : if (z->progressive) { -; 2560 : // dequantize and idct the data -; 2561 : int i, j, n; -; 2562 : for (n = 0; n < z->s->img_n; ++n) { -; 2563 : int w = (z->img_comp[n].x + 7) >> 3; -; 2564 : int h = (z->img_comp[n].y + 7) >> 3; -; 2565 : for (j = 0; j < h; ++j) { -; 2566 : for (i = 0; i < w; ++i) { -; 2567 : short* data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); -; 2568 : stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); -; 2569 : z->idct_block_kernel(z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, z->img_comp[n].w2, data); -; 2570 : } -; 2571 : } -; 2572 : } -; 2573 : } -; 2574 : } -; 2575 : -; 2576 : static int stbi__process_marker(stbi__jpeg* z, int m) -; 2577 : { -; 2578 : int L; -; 2579 : switch (m) { -; 2580 : case STBI__MARKER_none: // no marker found -; 2581 : return stbi__err("expected marker", "Corrupt JPEG"); -; 2582 : -; 2583 : case 0xDD: // DRI - specify restart interval -; 2584 : if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len", "Corrupt JPEG"); -; 2585 : z->restart_interval = stbi__get16be(z->s); -; 2586 : return 1; -; 2587 : -; 2588 : case 0xDB: // DQT - define quantization table -; 2589 : L = stbi__get16be(z->s) - 2; -; 2590 : while (L > 0) { -; 2591 : int q = stbi__get8(z->s); -; 2592 : int p = q >> 4, sixteen = (p != 0); -; 2593 : int t = q & 15, i; -; 2594 : if (p != 0 && p != 1) return stbi__err("bad DQT type", "Corrupt JPEG"); -; 2595 : if (t > 3) return stbi__err("bad DQT table", "Corrupt JPEG"); -; 2596 : -; 2597 : for (i = 0; i < 64; ++i) -; 2598 : z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); -; 2599 : L -= (sixteen ? 129 : 65); -; 2600 : } -; 2601 : return L == 0; -; 2602 : -; 2603 : case 0xC4: // DHT - define huffman table -; 2604 : L = stbi__get16be(z->s) - 2; -; 2605 : while (L > 0) { -; 2606 : stbi_uc* v; -; 2607 : int sizes[16], i, n = 0; -; 2608 : int q = stbi__get8(z->s); -; 2609 : int tc = q >> 4; -; 2610 : int th = q & 15; -; 2611 : if (tc > 1 || th > 3) return stbi__err("bad DHT header", "Corrupt JPEG"); -; 2612 : for (i = 0; i < 16; ++i) { -; 2613 : sizes[i] = stbi__get8(z->s); -; 2614 : n += sizes[i]; -; 2615 : } -; 2616 : if (n > 256) return stbi__err("bad DHT header", "Corrupt JPEG"); // Loop over i < n would write past end of values! -; 2617 : L -= 17; -; 2618 : if (tc == 0) { -; 2619 : if (!stbi__build_huffman(z->huff_dc + th, sizes)) return 0; -; 2620 : v = z->huff_dc[th].values; -; 2621 : } -; 2622 : else { -; 2623 : if (!stbi__build_huffman(z->huff_ac + th, sizes)) return 0; -; 2624 : v = z->huff_ac[th].values; -; 2625 : } -; 2626 : for (i = 0; i < n; ++i) -; 2627 : v[i] = stbi__get8(z->s); -; 2628 : if (tc != 0) -; 2629 : stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); -; 2630 : L -= n; -; 2631 : } -; 2632 : return L == 0; -; 2633 : } -; 2634 : -; 2635 : // check for comment block or APP blocks -; 2636 : if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { -; 2637 : L = stbi__get16be(z->s); -; 2638 : if (L < 2) { -; 2639 : if (m == 0xFE) -; 2640 : return stbi__err("bad COM len", "Corrupt JPEG"); -; 2641 : else -; 2642 : return stbi__err("bad APP len", "Corrupt JPEG"); -; 2643 : } -; 2644 : L -= 2; -; 2645 : -; 2646 : if (m == 0xE0 && L >= 5) { // JFIF APP0 segment -; 2647 : static const unsigned char tag[5] = { 'J','F','I','F','\0' }; -; 2648 : int ok = 1; -; 2649 : int i; -; 2650 : for (i = 0; i < 5; ++i) -; 2651 : if (stbi__get8(z->s) != tag[i]) -; 2652 : ok = 0; -; 2653 : L -= 5; -; 2654 : if (ok) -; 2655 : z->jfif = 1; -; 2656 : } -; 2657 : else if (m == 0xEE && L >= 12) { // Adobe APP14 segment -; 2658 : static const unsigned char tag[6] = { 'A','d','o','b','e','\0' }; -; 2659 : int ok = 1; -; 2660 : int i; -; 2661 : for (i = 0; i < 6; ++i) -; 2662 : if (stbi__get8(z->s) != tag[i]) -; 2663 : ok = 0; -; 2664 : L -= 6; -; 2665 : if (ok) { -; 2666 : stbi__get8(z->s); // version -; 2667 : stbi__get16be(z->s); // flags0 -; 2668 : stbi__get16be(z->s); // flags1 -; 2669 : z->app14_color_transform = stbi__get8(z->s); // color transform -; 2670 : L -= 6; -; 2671 : } -; 2672 : } -; 2673 : -; 2674 : stbi__skip(z->s, L); -; 2675 : return 1; -; 2676 : } -; 2677 : -; 2678 : return stbi__err("unknown marker", "Corrupt JPEG"); -; 2679 : } -; 2680 : -; 2681 : // after we see SOS -; 2682 : static int stbi__process_scan_header(stbi__jpeg* z) -; 2683 : { -; 2684 : int i; -; 2685 : int Ls = stbi__get16be(z->s); -; 2686 : z->scan_n = stbi__get8(z->s); -; 2687 : if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int)z->s->img_n) return stbi__err("bad SOS component count", "Corrupt JPEG"); -; 2688 : if (Ls != 6 + 2 * z->scan_n) return stbi__err("bad SOS len", "Corrupt JPEG"); -; 2689 : for (i = 0; i < z->scan_n; ++i) { -; 2690 : int id = stbi__get8(z->s), which; -; 2691 : int q = stbi__get8(z->s); -; 2692 : for (which = 0; which < z->s->img_n; ++which) -; 2693 : if (z->img_comp[which].id == id) -; 2694 : break; -; 2695 : if (which == z->s->img_n) return 0; // no match -; 2696 : z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff", "Corrupt JPEG"); -; 2697 : z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff", "Corrupt JPEG"); -; 2698 : z->order[i] = which; -; 2699 : } -; 2700 : -; 2701 : { -; 2702 : int aa; -; 2703 : z->spec_start = stbi__get8(z->s); -; 2704 : z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 -; 2705 : aa = stbi__get8(z->s); -; 2706 : z->succ_high = (aa >> 4); -; 2707 : z->succ_low = (aa & 15); -; 2708 : if (z->progressive) { -; 2709 : if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) -; 2710 : return stbi__err("bad SOS", "Corrupt JPEG"); -; 2711 : } -; 2712 : else { -; 2713 : if (z->spec_start != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2714 : if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS", "Corrupt JPEG"); -; 2715 : z->spec_end = 63; -; 2716 : } -; 2717 : } -; 2718 : -; 2719 : return 1; -; 2720 : } -; 2721 : -; 2722 : static int stbi__free_jpeg_components(stbi__jpeg* z, int ncomp, int why) -; 2723 : { -; 2724 : int i; -; 2725 : for (i = 0; i < ncomp; ++i) { -; 2726 : if (z->img_comp[i].raw_data) { -; 2727 : STBI_FREE(z->img_comp[i].raw_data); -; 2728 : z->img_comp[i].raw_data = NULL; -; 2729 : z->img_comp[i].data = NULL; -; 2730 : } -; 2731 : if (z->img_comp[i].raw_coeff) { -; 2732 : STBI_FREE(z->img_comp[i].raw_coeff); -; 2733 : z->img_comp[i].raw_coeff = 0; -; 2734 : z->img_comp[i].coeff = 0; -; 2735 : } -; 2736 : if (z->img_comp[i].linebuf) { -; 2737 : STBI_FREE(z->img_comp[i].linebuf); -; 2738 : z->img_comp[i].linebuf = NULL; -; 2739 : } -; 2740 : } -; 2741 : return why; -; 2742 : } -; 2743 : -; 2744 : static int stbi__process_frame_header(stbi__jpeg* z, int scan) -; 2745 : { -; 2746 : stbi__context* s = z->s; -; 2747 : int Lf, p, i, q, h_max = 1, v_max = 1, c; -; 2748 : Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len", "Corrupt JPEG"); // JPEG -; 2749 : p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit", "JPEG format not supported: 8-bit only"); // JPEG baseline -; 2750 : s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG -; 2751 : s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width", "Corrupt JPEG"); // JPEG requires -; 2752 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2753 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 2754 : c = stbi__get8(s); -; 2755 : if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count", "Corrupt JPEG"); -; 2756 : s->img_n = c; -; 2757 : for (i = 0; i < c; ++i) { -; 2758 : z->img_comp[i].data = NULL; -; 2759 : z->img_comp[i].linebuf = NULL; -; 2760 : } -; 2761 : -; 2762 : if (Lf != 8 + 3 * s->img_n) return stbi__err("bad SOF len", "Corrupt JPEG"); -; 2763 : -; 2764 : z->rgb = 0; -; 2765 : for (i = 0; i < s->img_n; ++i) { -; 2766 : static const unsigned char rgb[3] = { 'R', 'G', 'B' }; -; 2767 : z->img_comp[i].id = stbi__get8(s); -; 2768 : if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) -; 2769 : ++z->rgb; -; 2770 : q = stbi__get8(s); -; 2771 : z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H", "Corrupt JPEG"); -; 2772 : z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V", "Corrupt JPEG"); -; 2773 : z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ", "Corrupt JPEG"); -; 2774 : } -; 2775 : -; 2776 : if (scan != STBI__SCAN_load) return 1; -; 2777 : -; 2778 : if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); -; 2779 : -; 2780 : for (i = 0; i < s->img_n; ++i) { -; 2781 : if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; -; 2782 : if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; -; 2783 : } -; 2784 : -; 2785 : // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios -; 2786 : // and I've never seen a non-corrupted JPEG file actually use them -; 2787 : for (i = 0; i < s->img_n; ++i) { -; 2788 : if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H", "Corrupt JPEG"); -; 2789 : if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V", "Corrupt JPEG"); -; 2790 : } -; 2791 : -; 2792 : // compute interleaved mcu info -; 2793 : z->img_h_max = h_max; -; 2794 : z->img_v_max = v_max; -; 2795 : z->img_mcu_w = h_max * 8; -; 2796 : z->img_mcu_h = v_max * 8; -; 2797 : // these sizes can't be more than 17 bits -; 2798 : z->img_mcu_x = (s->img_x + z->img_mcu_w - 1) / z->img_mcu_w; -; 2799 : z->img_mcu_y = (s->img_y + z->img_mcu_h - 1) / z->img_mcu_h; -; 2800 : -; 2801 : for (i = 0; i < s->img_n; ++i) { -; 2802 : // number of effective pixels (e.g. for non-interleaved MCU) -; 2803 : z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max - 1) / h_max; -; 2804 : z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max - 1) / v_max; -; 2805 : // to simplify generation, we'll allocate enough memory to decode -; 2806 : // the bogus oversized data from using interleaved MCUs and their -; 2807 : // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't -; 2808 : // discard the extra data until colorspace conversion -; 2809 : // -; 2810 : // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) -; 2811 : // so these muls can't overflow with 32-bit ints (which we require) -; 2812 : z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; -; 2813 : z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; -; 2814 : z->img_comp[i].coeff = 0; -; 2815 : z->img_comp[i].raw_coeff = 0; -; 2816 : z->img_comp[i].linebuf = NULL; -; 2817 : z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); -; 2818 : if (z->img_comp[i].raw_data == NULL) -; 2819 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2820 : // align blocks for idct using mmx/sse -; 2821 : z->img_comp[i].data = (stbi_uc*)(((size_t)z->img_comp[i].raw_data + 15) & ~15); -; 2822 : if (z->progressive) { -; 2823 : // w2, h2 are multiples of 8 (see above) -; 2824 : z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; -; 2825 : z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; -; 2826 : z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); -; 2827 : if (z->img_comp[i].raw_coeff == NULL) -; 2828 : return stbi__free_jpeg_components(z, i + 1, stbi__err("outofmem", "Out of memory")); -; 2829 : z->img_comp[i].coeff = (short*)(((size_t)z->img_comp[i].raw_coeff + 15) & ~15); -; 2830 : } -; 2831 : } -; 2832 : -; 2833 : return 1; -; 2834 : } -; 2835 : -; 2836 : // use comparisons since in some cases we handle more than one case (e.g. SOF) -; 2837 : #define stbi__DNL(x) ((x) == 0xdc) -; 2838 : #define stbi__SOI(x) ((x) == 0xd8) -; 2839 : #define stbi__EOI(x) ((x) == 0xd9) -; 2840 : #define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) -; 2841 : #define stbi__SOS(x) ((x) == 0xda) -; 2842 : -; 2843 : #define stbi__SOF_progressive(x) ((x) == 0xc2) -; 2844 : -; 2845 : static int stbi__decode_jpeg_header(stbi__jpeg* z, int scan) -; 2846 : { -; 2847 : int m; -; 2848 : z->jfif = 0; -; 2849 : z->app14_color_transform = -1; // valid values are 0,1,2 -; 2850 : z->marker = STBI__MARKER_none; // initialize cached marker to empty -; 2851 : m = stbi__get_marker(z); -; 2852 : if (!stbi__SOI(m)) return stbi__err("no SOI", "Corrupt JPEG"); -; 2853 : if (scan == STBI__SCAN_type) return 1; -; 2854 : m = stbi__get_marker(z); -; 2855 : while (!stbi__SOF(m)) { -; 2856 : if (!stbi__process_marker(z, m)) return 0; -; 2857 : m = stbi__get_marker(z); -; 2858 : while (m == STBI__MARKER_none) { -; 2859 : // some files have extra padding after their blocks, so ok, we'll scan -; 2860 : if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); -; 2861 : m = stbi__get_marker(z); -; 2862 : } -; 2863 : } -; 2864 : z->progressive = stbi__SOF_progressive(m); -; 2865 : if (!stbi__process_frame_header(z, scan)) return 0; -; 2866 : return 1; -; 2867 : } -; 2868 : -; 2869 : static int stbi__skip_jpeg_junk_at_end(stbi__jpeg* j) -; 2870 : { -; 2871 : // some JPEGs have junk at end, skip over it but if we find what looks -; 2872 : // like a valid marker, resume there -; 2873 : while (!stbi__at_eof(j->s)) { -; 2874 : int x = stbi__get8(j->s); -; 2875 : while (x == 255) { // might be a marker -; 2876 : if (stbi__at_eof(j->s)) return STBI__MARKER_none; -; 2877 : x = stbi__get8(j->s); -; 2878 : if (x != 0x00 && x != 0xff) { -; 2879 : // not a stuffed zero or lead-in to another marker, looks -; 2880 : // like an actual marker, return it -; 2881 : return x; -; 2882 : } -; 2883 : // stuffed zero has x=0 now which ends the loop, meaning we go -; 2884 : // back to regular scan loop. -; 2885 : // repeated 0xff keeps trying to read the next byte of the marker. -; 2886 : } -; 2887 : } -; 2888 : return STBI__MARKER_none; -; 2889 : } -; 2890 : -; 2891 : // decode image to YCbCr format -; 2892 : static int stbi__decode_jpeg_image(stbi__jpeg* j) -; 2893 : { -; 2894 : int m; -; 2895 : for (m = 0; m < 4; m++) { -; 2896 : j->img_comp[m].raw_data = NULL; -; 2897 : j->img_comp[m].raw_coeff = NULL; -; 2898 : } -; 2899 : j->restart_interval = 0; -; 2900 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; -; 2901 : m = stbi__get_marker(j); -; 2902 : while (!stbi__EOI(m)) { -; 2903 : if (stbi__SOS(m)) { -; 2904 : if (!stbi__process_scan_header(j)) return 0; -; 2905 : if (!stbi__parse_entropy_coded_data(j)) return 0; -; 2906 : if (j->marker == STBI__MARKER_none) { -; 2907 : j->marker = stbi__skip_jpeg_junk_at_end(j); -; 2908 : // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 -; 2909 : } -; 2910 : m = stbi__get_marker(j); -; 2911 : if (STBI__RESTART(m)) -; 2912 : m = stbi__get_marker(j); -; 2913 : } -; 2914 : else if (stbi__DNL(m)) { -; 2915 : int Ld = stbi__get16be(j->s); -; 2916 : stbi__uint32 NL = stbi__get16be(j->s); -; 2917 : if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); -; 2918 : if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); -; 2919 : m = stbi__get_marker(j); -; 2920 : } -; 2921 : else { -; 2922 : if (!stbi__process_marker(j, m)) return 1; -; 2923 : m = stbi__get_marker(j); -; 2924 : } -; 2925 : } -; 2926 : if (j->progressive) -; 2927 : stbi__jpeg_finish(j); -; 2928 : return 1; -; 2929 : } -; 2930 : -; 2931 : // static jfif-centered resampling (across block boundaries) -; 2932 : -; 2933 : typedef stbi_uc* (*resample_row_func)(stbi_uc* out, stbi_uc* in0, stbi_uc* in1, -; 2934 : int w, int hs); -; 2935 : -; 2936 : #define stbi__div4(x) ((stbi_uc) ((x) >> 2)) -; 2937 : -; 2938 : static stbi_uc* resample_row_1(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2939 : { -; 2940 : STBI_NOTUSED(out); -; 2941 : STBI_NOTUSED(in_far); -; 2942 : STBI_NOTUSED(w); -; 2943 : STBI_NOTUSED(hs); -; 2944 : return in_near; -; 2945 : } -; 2946 : -; 2947 : static stbi_uc* stbi__resample_row_v_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2948 : { -; 2949 : // need to generate two samples vertically for every one in input -; 2950 : int i; -; 2951 : STBI_NOTUSED(hs); -; 2952 : for (i = 0; i < w; ++i) -; 2953 : out[i] = stbi__div4(3 * in_near[i] + in_far[i] + 2); -; 2954 : return out; -; 2955 : } -; 2956 : -; 2957 : static stbi_uc* stbi__resample_row_h_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2958 : { -; 2959 : // need to generate two samples horizontally for every one in input -; 2960 : int i; -; 2961 : stbi_uc* input = in_near; -; 2962 : -; 2963 : if (w == 1) { -; 2964 : // if only one sample, can't do any interpolation -; 2965 : out[0] = out[1] = input[0]; -; 2966 : return out; -; 2967 : } -; 2968 : -; 2969 : out[0] = input[0]; -; 2970 : out[1] = stbi__div4(input[0] * 3 + input[1] + 2); -; 2971 : for (i = 1; i < w - 1; ++i) { -; 2972 : int n = 3 * input[i] + 2; -; 2973 : out[i * 2 + 0] = stbi__div4(n + input[i - 1]); -; 2974 : out[i * 2 + 1] = stbi__div4(n + input[i + 1]); -; 2975 : } -; 2976 : out[i * 2 + 0] = stbi__div4(input[w - 2] * 3 + input[w - 1] + 2); -; 2977 : out[i * 2 + 1] = input[w - 1]; -; 2978 : -; 2979 : STBI_NOTUSED(in_far); -; 2980 : STBI_NOTUSED(hs); -; 2981 : -; 2982 : return out; -; 2983 : } -; 2984 : -; 2985 : #define stbi__div16(x) ((stbi_uc) ((x) >> 4)) -; 2986 : -; 2987 : static stbi_uc* stbi__resample_row_hv_2(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 2988 : { -; 2989 : // need to generate 2x2 samples for every one in input -; 2990 : int i, t0, t1; -; 2991 : if (w == 1) { -; 2992 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 2993 : return out; -; 2994 : } -; 2995 : -; 2996 : t1 = 3 * in_near[0] + in_far[0]; -; 2997 : out[0] = stbi__div4(t1 + 2); -; 2998 : for (i = 1; i < w; ++i) { -; 2999 : t0 = t1; -; 3000 : t1 = 3 * in_near[i] + in_far[i]; -; 3001 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3002 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3003 : } -; 3004 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3005 : -; 3006 : STBI_NOTUSED(hs); -; 3007 : -; 3008 : return out; -; 3009 : } -; 3010 : -; 3011 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3012 : static stbi_uc* stbi__resample_row_hv_2_simd(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3013 : { -; 3014 : // need to generate 2x2 samples for every one in input -; 3015 : int i = 0, t0, t1; -; 3016 : -; 3017 : if (w == 1) { -; 3018 : out[0] = out[1] = stbi__div4(3 * in_near[0] + in_far[0] + 2); -; 3019 : return out; -; 3020 : } -; 3021 : -; 3022 : t1 = 3 * in_near[0] + in_far[0]; -; 3023 : // process groups of 8 pixels for as long as we can. -; 3024 : // note we can't handle the last pixel in a row in this loop -; 3025 : // because we need to handle the filter boundary conditions. -; 3026 : for (; i < ((w - 1) & ~7); i += 8) { -; 3027 : #if defined(STBI_SSE2) -; 3028 : // load and perform the vertical filtering pass -; 3029 : // this uses 3*x + y = 4*x + (y - x) -; 3030 : __m128i zero = _mm_setzero_si128(); -; 3031 : __m128i farb = _mm_loadl_epi64((__m128i*) (in_far + i)); -; 3032 : __m128i nearb = _mm_loadl_epi64((__m128i*) (in_near + i)); -; 3033 : __m128i farw = _mm_unpacklo_epi8(farb, zero); -; 3034 : __m128i nearw = _mm_unpacklo_epi8(nearb, zero); -; 3035 : __m128i diff = _mm_sub_epi16(farw, nearw); -; 3036 : __m128i nears = _mm_slli_epi16(nearw, 2); -; 3037 : __m128i curr = _mm_add_epi16(nears, diff); // current row -; 3038 : -; 3039 : // horizontal filter works the same based on shifted vers of current -; 3040 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3041 : // insert the previous pixel value (from t1). -; 3042 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3043 : // of next block of 8 pixels added in. -; 3044 : __m128i prv0 = _mm_slli_si128(curr, 2); -; 3045 : __m128i nxt0 = _mm_srli_si128(curr, 2); -; 3046 : __m128i prev = _mm_insert_epi16(prv0, t1, 0); -; 3047 : __m128i next = _mm_insert_epi16(nxt0, 3 * in_near[i + 8] + in_far[i + 8], 7); -; 3048 : -; 3049 : // horizontal filter, polyphase implementation since it's convenient: -; 3050 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3051 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3052 : // note the shared term. -; 3053 : __m128i bias = _mm_set1_epi16(8); -; 3054 : __m128i curs = _mm_slli_epi16(curr, 2); -; 3055 : __m128i prvd = _mm_sub_epi16(prev, curr); -; 3056 : __m128i nxtd = _mm_sub_epi16(next, curr); -; 3057 : __m128i curb = _mm_add_epi16(curs, bias); -; 3058 : __m128i even = _mm_add_epi16(prvd, curb); -; 3059 : __m128i odd = _mm_add_epi16(nxtd, curb); -; 3060 : -; 3061 : // interleave even and odd pixels, then undo scaling. -; 3062 : __m128i int0 = _mm_unpacklo_epi16(even, odd); -; 3063 : __m128i int1 = _mm_unpackhi_epi16(even, odd); -; 3064 : __m128i de0 = _mm_srli_epi16(int0, 4); -; 3065 : __m128i de1 = _mm_srli_epi16(int1, 4); -; 3066 : -; 3067 : // pack and write output -; 3068 : __m128i outv = _mm_packus_epi16(de0, de1); -; 3069 : _mm_storeu_si128((__m128i*) (out + i * 2), outv); -; 3070 : #elif defined(STBI_NEON) -; 3071 : // load and perform the vertical filtering pass -; 3072 : // this uses 3*x + y = 4*x + (y - x) -; 3073 : uint8x8_t farb = vld1_u8(in_far + i); -; 3074 : uint8x8_t nearb = vld1_u8(in_near + i); -; 3075 : int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); -; 3076 : int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); -; 3077 : int16x8_t curr = vaddq_s16(nears, diff); // current row -; 3078 : -; 3079 : // horizontal filter works the same based on shifted vers of current -; 3080 : // row. "prev" is current row shifted right by 1 pixel; we need to -; 3081 : // insert the previous pixel value (from t1). -; 3082 : // "next" is current row shifted left by 1 pixel, with first pixel -; 3083 : // of next block of 8 pixels added in. -; 3084 : int16x8_t prv0 = vextq_s16(curr, curr, 7); -; 3085 : int16x8_t nxt0 = vextq_s16(curr, curr, 1); -; 3086 : int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); -; 3087 : int16x8_t next = vsetq_lane_s16(3 * in_near[i + 8] + in_far[i + 8], nxt0, 7); -; 3088 : -; 3089 : // horizontal filter, polyphase implementation since it's convenient: -; 3090 : // even pixels = 3*cur + prev = cur*4 + (prev - cur) -; 3091 : // odd pixels = 3*cur + next = cur*4 + (next - cur) -; 3092 : // note the shared term. -; 3093 : int16x8_t curs = vshlq_n_s16(curr, 2); -; 3094 : int16x8_t prvd = vsubq_s16(prev, curr); -; 3095 : int16x8_t nxtd = vsubq_s16(next, curr); -; 3096 : int16x8_t even = vaddq_s16(curs, prvd); -; 3097 : int16x8_t odd = vaddq_s16(curs, nxtd); -; 3098 : -; 3099 : // undo scaling and round, then store with even/odd phases interleaved -; 3100 : uint8x8x2_t o; -; 3101 : o.val[0] = vqrshrun_n_s16(even, 4); -; 3102 : o.val[1] = vqrshrun_n_s16(odd, 4); -; 3103 : vst2_u8(out + i * 2, o); -; 3104 : #endif -; 3105 : -; 3106 : // "previous" value for next iter -; 3107 : t1 = 3 * in_near[i + 7] + in_far[i + 7]; -; 3108 : } -; 3109 : -; 3110 : t0 = t1; -; 3111 : t1 = 3 * in_near[i] + in_far[i]; -; 3112 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3113 : -; 3114 : for (++i; i < w; ++i) { -; 3115 : t0 = t1; -; 3116 : t1 = 3 * in_near[i] + in_far[i]; -; 3117 : out[i * 2 - 1] = stbi__div16(3 * t0 + t1 + 8); -; 3118 : out[i * 2] = stbi__div16(3 * t1 + t0 + 8); -; 3119 : } -; 3120 : out[w * 2 - 1] = stbi__div4(t1 + 2); -; 3121 : -; 3122 : STBI_NOTUSED(hs); -; 3123 : -; 3124 : return out; -; 3125 : } -; 3126 : #endif -; 3127 : -; 3128 : static stbi_uc* stbi__resample_row_generic(stbi_uc* out, stbi_uc* in_near, stbi_uc* in_far, int w, int hs) -; 3129 : { -; 3130 : // resample with nearest-neighbor -; 3131 : int i, j; -; 3132 : STBI_NOTUSED(in_far); -; 3133 : for (i = 0; i < w; ++i) -; 3134 : for (j = 0; j < hs; ++j) -; 3135 : out[i * hs + j] = in_near[i]; -; 3136 : return out; -; 3137 : } -; 3138 : -; 3139 : // this is a reduced-precision calculation of YCbCr-to-RGB introduced -; 3140 : // to make sure the code produces the same results in both SIMD and scalar -; 3141 : #define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) -; 3142 : static void stbi__YCbCr_to_RGB_row(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step) -; 3143 : { -; 3144 : int i; -; 3145 : for (i = 0; i < count; ++i) { -; 3146 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3147 : int r, g, b; -; 3148 : int cr = pcr[i] - 128; -; 3149 : int cb = pcb[i] - 128; -; 3150 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3151 : g = y_fixed + (cr * -stbi__float2fixed(0.71414f)) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3152 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3153 : r >>= 20; -; 3154 : g >>= 20; -; 3155 : b >>= 20; -; 3156 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3157 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3158 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3159 : out[0] = (stbi_uc)r; -; 3160 : out[1] = (stbi_uc)g; -; 3161 : out[2] = (stbi_uc)b; -; 3162 : out[3] = 255; -; 3163 : out += step; -; 3164 : } -; 3165 : } -; 3166 : -; 3167 : #if defined(STBI_SSE2) || defined(STBI_NEON) -; 3168 : static void stbi__YCbCr_to_RGB_simd(stbi_uc* out, stbi_uc const* y, stbi_uc const* pcb, stbi_uc const* pcr, int count, int step) -; 3169 : { -; 3170 : int i = 0; -; 3171 : -; 3172 : #ifdef STBI_SSE2 -; 3173 : // step == 3 is pretty ugly on the final interleave, and i'm not convinced -; 3174 : // it's useful in practice (you wouldn't use it for textures, for example). -; 3175 : // so just accelerate step == 4 case. -; 3176 : if (step == 4) { -; 3177 : // this is a fairly straightforward implementation and not super-optimized. -; 3178 : __m128i signflip = _mm_set1_epi8(-0x80); -; 3179 : __m128i cr_const0 = _mm_set1_epi16((short)(1.40200f * 4096.0f + 0.5f)); -; 3180 : __m128i cr_const1 = _mm_set1_epi16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3181 : __m128i cb_const0 = _mm_set1_epi16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3182 : __m128i cb_const1 = _mm_set1_epi16((short)(1.77200f * 4096.0f + 0.5f)); -; 3183 : __m128i y_bias = _mm_set1_epi8((char)(unsigned char)128); -; 3184 : __m128i xw = _mm_set1_epi16(255); // alpha channel -; 3185 : -; 3186 : for (; i + 7 < count; i += 8) { -; 3187 : // load -; 3188 : __m128i y_bytes = _mm_loadl_epi64((__m128i*) (y + i)); -; 3189 : __m128i cr_bytes = _mm_loadl_epi64((__m128i*) (pcr + i)); -; 3190 : __m128i cb_bytes = _mm_loadl_epi64((__m128i*) (pcb + i)); -; 3191 : __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 -; 3192 : __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 -; 3193 : -; 3194 : // unpack to short (and left-shift cr, cb by 8) -; 3195 : __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); -; 3196 : __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); -; 3197 : __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); -; 3198 : -; 3199 : // color transform -; 3200 : __m128i yws = _mm_srli_epi16(yw, 4); -; 3201 : __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); -; 3202 : __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); -; 3203 : __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); -; 3204 : __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); -; 3205 : __m128i rws = _mm_add_epi16(cr0, yws); -; 3206 : __m128i gwt = _mm_add_epi16(cb0, yws); -; 3207 : __m128i bws = _mm_add_epi16(yws, cb1); -; 3208 : __m128i gws = _mm_add_epi16(gwt, cr1); -; 3209 : -; 3210 : // descale -; 3211 : __m128i rw = _mm_srai_epi16(rws, 4); -; 3212 : __m128i bw = _mm_srai_epi16(bws, 4); -; 3213 : __m128i gw = _mm_srai_epi16(gws, 4); -; 3214 : -; 3215 : // back to byte, set up for transpose -; 3216 : __m128i brb = _mm_packus_epi16(rw, bw); -; 3217 : __m128i gxb = _mm_packus_epi16(gw, xw); -; 3218 : -; 3219 : // transpose to interleave channels -; 3220 : __m128i t0 = _mm_unpacklo_epi8(brb, gxb); -; 3221 : __m128i t1 = _mm_unpackhi_epi8(brb, gxb); -; 3222 : __m128i o0 = _mm_unpacklo_epi16(t0, t1); -; 3223 : __m128i o1 = _mm_unpackhi_epi16(t0, t1); -; 3224 : -; 3225 : // store -; 3226 : _mm_storeu_si128((__m128i*) (out + 0), o0); -; 3227 : _mm_storeu_si128((__m128i*) (out + 16), o1); -; 3228 : out += 32; -; 3229 : } -; 3230 : } -; 3231 : #endif -; 3232 : -; 3233 : #ifdef STBI_NEON -; 3234 : // in this version, step=3 support would be easy to add. but is there demand? -; 3235 : if (step == 4) { -; 3236 : // this is a fairly straightforward implementation and not super-optimized. -; 3237 : uint8x8_t signflip = vdup_n_u8(0x80); -; 3238 : int16x8_t cr_const0 = vdupq_n_s16((short)(1.40200f * 4096.0f + 0.5f)); -; 3239 : int16x8_t cr_const1 = vdupq_n_s16(-(short)(0.71414f * 4096.0f + 0.5f)); -; 3240 : int16x8_t cb_const0 = vdupq_n_s16(-(short)(0.34414f * 4096.0f + 0.5f)); -; 3241 : int16x8_t cb_const1 = vdupq_n_s16((short)(1.77200f * 4096.0f + 0.5f)); -; 3242 : -; 3243 : for (; i + 7 < count; i += 8) { -; 3244 : // load -; 3245 : uint8x8_t y_bytes = vld1_u8(y + i); -; 3246 : uint8x8_t cr_bytes = vld1_u8(pcr + i); -; 3247 : uint8x8_t cb_bytes = vld1_u8(pcb + i); -; 3248 : int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); -; 3249 : int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); -; 3250 : -; 3251 : // expand to s16 -; 3252 : int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); -; 3253 : int16x8_t crw = vshll_n_s8(cr_biased, 7); -; 3254 : int16x8_t cbw = vshll_n_s8(cb_biased, 7); -; 3255 : -; 3256 : // color transform -; 3257 : int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); -; 3258 : int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); -; 3259 : int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); -; 3260 : int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); -; 3261 : int16x8_t rws = vaddq_s16(yws, cr0); -; 3262 : int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); -; 3263 : int16x8_t bws = vaddq_s16(yws, cb1); -; 3264 : -; 3265 : // undo scaling, round, convert to byte -; 3266 : uint8x8x4_t o; -; 3267 : o.val[0] = vqrshrun_n_s16(rws, 4); -; 3268 : o.val[1] = vqrshrun_n_s16(gws, 4); -; 3269 : o.val[2] = vqrshrun_n_s16(bws, 4); -; 3270 : o.val[3] = vdup_n_u8(255); -; 3271 : -; 3272 : // store, interleaving r/g/b/a -; 3273 : vst4_u8(out, o); -; 3274 : out += 8 * 4; -; 3275 : } -; 3276 : } -; 3277 : #endif -; 3278 : -; 3279 : for (; i < count; ++i) { -; 3280 : int y_fixed = (y[i] << 20) + (1 << 19); // rounding -; 3281 : int r, g, b; -; 3282 : int cr = pcr[i] - 128; -; 3283 : int cb = pcb[i] - 128; -; 3284 : r = y_fixed + cr * stbi__float2fixed(1.40200f); -; 3285 : g = y_fixed + cr * -stbi__float2fixed(0.71414f) + ((cb * -stbi__float2fixed(0.34414f)) & 0xffff0000); -; 3286 : b = y_fixed + cb * stbi__float2fixed(1.77200f); -; 3287 : r >>= 20; -; 3288 : g >>= 20; -; 3289 : b >>= 20; -; 3290 : if ((unsigned)r > 255) { if (r < 0) r = 0; else r = 255; } -; 3291 : if ((unsigned)g > 255) { if (g < 0) g = 0; else g = 255; } -; 3292 : if ((unsigned)b > 255) { if (b < 0) b = 0; else b = 255; } -; 3293 : out[0] = (stbi_uc)r; -; 3294 : out[1] = (stbi_uc)g; -; 3295 : out[2] = (stbi_uc)b; -; 3296 : out[3] = 255; -; 3297 : out += step; -; 3298 : } -; 3299 : } -; 3300 : #endif -; 3301 : -; 3302 : // set up the kernels -; 3303 : static void stbi__setup_jpeg(stbi__jpeg* j) -; 3304 : { -; 3305 : j->idct_block_kernel = stbi__idct_block; -; 3306 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; -; 3307 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; -; 3308 : -; 3309 : #ifdef STBI_SSE2 -; 3310 : if (stbi__sse2_available()) { -; 3311 : j->idct_block_kernel = stbi__idct_simd; -; 3312 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3313 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3314 : } -; 3315 : #endif -; 3316 : -; 3317 : #ifdef STBI_NEON -; 3318 : j->idct_block_kernel = stbi__idct_simd; -; 3319 : j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; -; 3320 : j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -; 3321 : #endif -; 3322 : } -; 3323 : -; 3324 : // clean up the temporary component buffers -; 3325 : static void stbi__cleanup_jpeg(stbi__jpeg* j) -; 3326 : { -; 3327 : stbi__free_jpeg_components(j, j->s->img_n, 0); -; 3328 : } -; 3329 : -; 3330 : typedef struct -; 3331 : { -; 3332 : resample_row_func resample; -; 3333 : stbi_uc* line0, * line1; -; 3334 : int hs, vs; // expansion factor in each axis -; 3335 : int w_lores; // horizontal pixels pre-expansion -; 3336 : int ystep; // how far through vertical expansion we are -; 3337 : int ypos; // which pre-expansion row we're on -; 3338 : } stbi__resample; -; 3339 : -; 3340 : // fast 0..255 * 0..255 => 0..255 rounded multiplication -; 3341 : static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) -; 3342 : { -; 3343 : unsigned int t = x * y + 128; -; 3344 : return (stbi_uc)((t + (t >> 8)) >> 8); -; 3345 : } -; 3346 : -; 3347 : static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp, int req_comp) -; 3348 : { -; 3349 : int n, decode_n, is_rgb; -; 3350 : z->s->img_n = 0; // make stbi__cleanup_jpeg safe -; 3351 : -; 3352 : // validate req_comp -; 3353 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 3354 : -; 3355 : // load a jpeg image from whichever source, but leave in YCbCr format -; 3356 : if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } -; 3357 : -; 3358 : // determine actual number of components to generate -; 3359 : n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; -; 3360 : -; 3361 : is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); -; 3362 : -; 3363 : if (z->s->img_n == 3 && n < 3 && !is_rgb) -; 3364 : decode_n = 1; -; 3365 : else -; 3366 : decode_n = z->s->img_n; -; 3367 : -; 3368 : // nothing to do if no components requested; check this now to avoid -; 3369 : // accessing uninitialized coutput[0] later -; 3370 : if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } -; 3371 : -; 3372 : // resample and color-convert -; 3373 : { -; 3374 : int k; -; 3375 : unsigned int i, j; -; 3376 : stbi_uc* output; -; 3377 : stbi_uc* coutput[4] = { NULL, NULL, NULL, NULL }; -; 3378 : -; 3379 : stbi__resample res_comp[4]; -; 3380 : -; 3381 : for (k = 0; k < decode_n; ++k) { -; 3382 : stbi__resample* r = &res_comp[k]; -; 3383 : -; 3384 : // allocate line buffer big enough for upsampling off the edges -; 3385 : // with upsample factor of 4 -; 3386 : z->img_comp[k].linebuf = (stbi_uc*)stbi__malloc(z->s->img_x + 3); -; 3387 : if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3388 : -; 3389 : r->hs = z->img_h_max / z->img_comp[k].h; -; 3390 : r->vs = z->img_v_max / z->img_comp[k].v; -; 3391 : r->ystep = r->vs >> 1; -; 3392 : r->w_lores = (z->s->img_x + r->hs - 1) / r->hs; -; 3393 : r->ypos = 0; -; 3394 : r->line0 = r->line1 = z->img_comp[k].data; -; 3395 : -; 3396 : if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; -; 3397 : else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; -; 3398 : else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; -; 3399 : else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; -; 3400 : else r->resample = stbi__resample_row_generic; -; 3401 : } -; 3402 : -; 3403 : // can't error after this so, this is safe -; 3404 : output = (stbi_uc*)stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); -; 3405 : if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } -; 3406 : -; 3407 : // now go ahead and resample -; 3408 : for (j = 0; j < z->s->img_y; ++j) { -; 3409 : stbi_uc* out = output + n * z->s->img_x * j; -; 3410 : for (k = 0; k < decode_n; ++k) { -; 3411 : stbi__resample* r = &res_comp[k]; -; 3412 : int y_bot = r->ystep >= (r->vs >> 1); -; 3413 : coutput[k] = r->resample(z->img_comp[k].linebuf, -; 3414 : y_bot ? r->line1 : r->line0, -; 3415 : y_bot ? r->line0 : r->line1, -; 3416 : r->w_lores, r->hs); -; 3417 : if (++r->ystep >= r->vs) { -; 3418 : r->ystep = 0; -; 3419 : r->line0 = r->line1; -; 3420 : if (++r->ypos < z->img_comp[k].y) -; 3421 : r->line1 += z->img_comp[k].w2; -; 3422 : } -; 3423 : } -; 3424 : if (n >= 3) { -; 3425 : stbi_uc* y = coutput[0]; -; 3426 : if (z->s->img_n == 3) { -; 3427 : if (is_rgb) { -; 3428 : for (i = 0; i < z->s->img_x; ++i) { -; 3429 : out[0] = y[i]; -; 3430 : out[1] = coutput[1][i]; -; 3431 : out[2] = coutput[2][i]; -; 3432 : out[3] = 255; -; 3433 : out += n; -; 3434 : } -; 3435 : } -; 3436 : else { -; 3437 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3438 : } -; 3439 : } -; 3440 : else if (z->s->img_n == 4) { -; 3441 : if (z->app14_color_transform == 0) { // CMYK -; 3442 : for (i = 0; i < z->s->img_x; ++i) { -; 3443 : stbi_uc m = coutput[3][i]; -; 3444 : out[0] = stbi__blinn_8x8(coutput[0][i], m); -; 3445 : out[1] = stbi__blinn_8x8(coutput[1][i], m); -; 3446 : out[2] = stbi__blinn_8x8(coutput[2][i], m); -; 3447 : out[3] = 255; -; 3448 : out += n; -; 3449 : } -; 3450 : } -; 3451 : else if (z->app14_color_transform == 2) { // YCCK -; 3452 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3453 : for (i = 0; i < z->s->img_x; ++i) { -; 3454 : stbi_uc m = coutput[3][i]; -; 3455 : out[0] = stbi__blinn_8x8(255 - out[0], m); -; 3456 : out[1] = stbi__blinn_8x8(255 - out[1], m); -; 3457 : out[2] = stbi__blinn_8x8(255 - out[2], m); -; 3458 : out += n; -; 3459 : } -; 3460 : } -; 3461 : else { // YCbCr + alpha? Ignore the fourth channel for now -; 3462 : z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); -; 3463 : } -; 3464 : } -; 3465 : else -; 3466 : for (i = 0; i < z->s->img_x; ++i) { -; 3467 : out[0] = out[1] = out[2] = y[i]; -; 3468 : out[3] = 255; // not used if n==3 -; 3469 : out += n; -; 3470 : } -; 3471 : } -; 3472 : else { -; 3473 : if (is_rgb) { -; 3474 : if (n == 1) -; 3475 : for (i = 0; i < z->s->img_x; ++i) -; 3476 : *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3477 : else { -; 3478 : for (i = 0; i < z->s->img_x; ++i, out += 2) { -; 3479 : out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); -; 3480 : out[1] = 255; -; 3481 : } -; 3482 : } -; 3483 : } -; 3484 : else if (z->s->img_n == 4 && z->app14_color_transform == 0) { -; 3485 : for (i = 0; i < z->s->img_x; ++i) { -; 3486 : stbi_uc m = coutput[3][i]; -; 3487 : stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); -; 3488 : stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); -; 3489 : stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); -; 3490 : out[0] = stbi__compute_y(r, g, b); -; 3491 : out[1] = 255; -; 3492 : out += n; -; 3493 : } -; 3494 : } -; 3495 : else if (z->s->img_n == 4 && z->app14_color_transform == 2) { -; 3496 : for (i = 0; i < z->s->img_x; ++i) { -; 3497 : out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); -; 3498 : out[1] = 255; -; 3499 : out += n; -; 3500 : } -; 3501 : } -; 3502 : else { -; 3503 : stbi_uc* y = coutput[0]; -; 3504 : if (n == 1) -; 3505 : for (i = 0; i < z->s->img_x; ++i) out[i] = y[i]; -; 3506 : else -; 3507 : for (i = 0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } -; 3508 : } -; 3509 : } -; 3510 : } -; 3511 : stbi__cleanup_jpeg(z); -; 3512 : *out_x = z->s->img_x; -; 3513 : *out_y = z->s->img_y; -; 3514 : if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output -; 3515 : return output; -; 3516 : } -; 3517 : } -; 3518 : -; 3519 : static void* stbi__jpeg_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 3520 : { -; 3521 : unsigned char* result; -; 3522 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3523 : if (!j) return stbi__errpuc("outofmem", "Out of memory"); -; 3524 : memset(j, 0, sizeof(stbi__jpeg)); -; 3525 : STBI_NOTUSED(ri); -; 3526 : j->s = s; -; 3527 : stbi__setup_jpeg(j); -; 3528 : result = load_jpeg_image(j, x, y, comp, req_comp); -; 3529 : STBI_FREE(j); -; 3530 : return result; -; 3531 : } -; 3532 : -; 3533 : static int stbi__jpeg_test(stbi__context* s) -; 3534 : { -; 3535 : int r; -; 3536 : stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); -; 3537 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3538 : memset(j, 0, sizeof(stbi__jpeg)); -; 3539 : j->s = s; -; 3540 : stbi__setup_jpeg(j); -; 3541 : r = stbi__decode_jpeg_header(j, STBI__SCAN_type); -; 3542 : stbi__rewind(s); -; 3543 : STBI_FREE(j); -; 3544 : return r; -; 3545 : } -; 3546 : -; 3547 : static int stbi__jpeg_info_raw(stbi__jpeg* j, int* x, int* y, int* comp) -; 3548 : { -; 3549 : if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { -; 3550 : stbi__rewind(j->s); -; 3551 : return 0; -; 3552 : } -; 3553 : if (x) *x = j->s->img_x; -; 3554 : if (y) *y = j->s->img_y; -; 3555 : if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; -; 3556 : return 1; -; 3557 : } -; 3558 : -; 3559 : static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp) -; 3560 : { -; 3561 : int result; -; 3562 : stbi__jpeg* j = (stbi__jpeg*)(stbi__malloc(sizeof(stbi__jpeg))); -; 3563 : if (!j) return stbi__err("outofmem", "Out of memory"); -; 3564 : memset(j, 0, sizeof(stbi__jpeg)); -; 3565 : j->s = s; -; 3566 : result = stbi__jpeg_info_raw(j, x, y, comp); -; 3567 : STBI_FREE(j); -; 3568 : return result; -; 3569 : } -; 3570 : #endif -; 3571 : -; 3572 : // public domain zlib decode v0.2 Sean Barrett 2006-11-18 -; 3573 : // simple implementation -; 3574 : // - all input must be provided in an upfront buffer -; 3575 : // - all output is written to a single output buffer (can malloc/realloc) -; 3576 : // performance -; 3577 : // - fast huffman -; 3578 : -; 3579 : #ifndef STBI_NO_ZLIB -; 3580 : -; 3581 : // fast-way is faster to check than jpeg huffman, but slow way is slower -; 3582 : #define STBI__ZFAST_BITS 9 // accelerate all cases in default tables -; 3583 : #define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) -; 3584 : #define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet -; 3585 : -; 3586 : // zlib-style huffman encoding -; 3587 : // (jpegs packs from left, zlib from right, so can't share code) -; 3588 : typedef struct -; 3589 : { -; 3590 : stbi__uint16 fast[1 << STBI__ZFAST_BITS]; -; 3591 : stbi__uint16 firstcode[16]; -; 3592 : int maxcode[17]; -; 3593 : stbi__uint16 firstsymbol[16]; -; 3594 : stbi_uc size[STBI__ZNSYMS]; -; 3595 : stbi__uint16 value[STBI__ZNSYMS]; -; 3596 : } stbi__zhuffman; -; 3597 : -; 3598 : stbi_inline static int stbi__bitreverse16(int n) -; 3599 : { -; 3600 : n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); -; 3601 : n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); -; 3602 : n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); -; 3603 : n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); -; 3604 : return n; -; 3605 : } -; 3606 : -; 3607 : stbi_inline static int stbi__bit_reverse(int v, int bits) -; 3608 : { -; 3609 : STBI_ASSERT(bits <= 16); -; 3610 : // to bit reverse n bits, reverse 16 and shift -; 3611 : // e.g. 11 bits, bit reverse and shift away 5 -; 3612 : return stbi__bitreverse16(v) >> (16 - bits); -; 3613 : } -; 3614 : -; 3615 : static int stbi__zbuild_huffman(stbi__zhuffman* z, const stbi_uc* sizelist, int num) -; 3616 : { -; 3617 : int i, k = 0; -; 3618 : int code, next_code[16], sizes[17]; -; 3619 : -; 3620 : // DEFLATE spec for generating codes -; 3621 : memset(sizes, 0, sizeof(sizes)); -; 3622 : memset(z->fast, 0, sizeof(z->fast)); -; 3623 : for (i = 0; i < num; ++i) -; 3624 : ++sizes[sizelist[i]]; -; 3625 : sizes[0] = 0; -; 3626 : for (i = 1; i < 16; ++i) -; 3627 : if (sizes[i] > (1 << i)) -; 3628 : return stbi__err("bad sizes", "Corrupt PNG"); -; 3629 : code = 0; -; 3630 : for (i = 1; i < 16; ++i) { -; 3631 : next_code[i] = code; -; 3632 : z->firstcode[i] = (stbi__uint16)code; -; 3633 : z->firstsymbol[i] = (stbi__uint16)k; -; 3634 : code = (code + sizes[i]); -; 3635 : if (sizes[i]) -; 3636 : if (code - 1 >= (1 << i)) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3637 : z->maxcode[i] = code << (16 - i); // preshift for inner loop -; 3638 : code <<= 1; -; 3639 : k += sizes[i]; -; 3640 : } -; 3641 : z->maxcode[16] = 0x10000; // sentinel -; 3642 : for (i = 0; i < num; ++i) { -; 3643 : int s = sizelist[i]; -; 3644 : if (s) { -; 3645 : int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; -; 3646 : stbi__uint16 fastv = (stbi__uint16)((s << 9) | i); -; 3647 : z->size[c] = (stbi_uc)s; -; 3648 : z->value[c] = (stbi__uint16)i; -; 3649 : if (s <= STBI__ZFAST_BITS) { -; 3650 : int j = stbi__bit_reverse(next_code[s], s); -; 3651 : while (j < (1 << STBI__ZFAST_BITS)) { -; 3652 : z->fast[j] = fastv; -; 3653 : j += (1 << s); -; 3654 : } -; 3655 : } -; 3656 : ++next_code[s]; -; 3657 : } -; 3658 : } -; 3659 : return 1; -; 3660 : } -; 3661 : -; 3662 : // zlib-from-memory implementation for PNG reading -; 3663 : // because PNG allows splitting the zlib stream arbitrarily, -; 3664 : // and it's annoying structurally to have PNG call ZLIB call PNG, -; 3665 : // we require PNG read all the IDATs and combine them into a single -; 3666 : // memory buffer -; 3667 : -; 3668 : typedef struct -; 3669 : { -; 3670 : stbi_uc* zbuffer, * zbuffer_end; -; 3671 : int num_bits; -; 3672 : stbi__uint32 code_buffer; -; 3673 : -; 3674 : char* zout; -; 3675 : char* zout_start; -; 3676 : char* zout_end; -; 3677 : int z_expandable; -; 3678 : -; 3679 : stbi__zhuffman z_length, z_distance; -; 3680 : } stbi__zbuf; -; 3681 : -; 3682 : stbi_inline static int stbi__zeof(stbi__zbuf* z) -; 3683 : { -; 3684 : return (z->zbuffer >= z->zbuffer_end); -; 3685 : } -; 3686 : -; 3687 : stbi_inline static stbi_uc stbi__zget8(stbi__zbuf* z) -; 3688 : { -; 3689 : return stbi__zeof(z) ? 0 : *z->zbuffer++; -; 3690 : } -; 3691 : -; 3692 : static void stbi__fill_bits(stbi__zbuf* z) -; 3693 : { -; 3694 : do { -; 3695 : if (z->code_buffer >= (1U << z->num_bits)) { -; 3696 : z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ -; 3697 : return; -; 3698 : } -; 3699 : z->code_buffer |= (unsigned int)stbi__zget8(z) << z->num_bits; -; 3700 : z->num_bits += 8; -; 3701 : } while (z->num_bits <= 24); -; 3702 : } -; 3703 : -; 3704 : stbi_inline static unsigned int stbi__zreceive(stbi__zbuf* z, int n) -; 3705 : { -; 3706 : unsigned int k; -; 3707 : if (z->num_bits < n) stbi__fill_bits(z); -; 3708 : k = z->code_buffer & ((1 << n) - 1); -; 3709 : z->code_buffer >>= n; -; 3710 : z->num_bits -= n; -; 3711 : return k; -; 3712 : } -; 3713 : -; 3714 : static int stbi__zhuffman_decode_slowpath(stbi__zbuf* a, stbi__zhuffman* z) -; 3715 : { -; 3716 : int b, s, k; -; 3717 : // not resolved by fast table, so compute it the slow way -; 3718 : // use jpeg approach, which requires MSbits at top -; 3719 : k = stbi__bit_reverse(a->code_buffer, 16); -; 3720 : for (s = STBI__ZFAST_BITS + 1; ; ++s) -; 3721 : if (k < z->maxcode[s]) -; 3722 : break; -; 3723 : if (s >= 16) return -1; // invalid code! -; 3724 : // code size is s, so: -; 3725 : b = (k >> (16 - s)) - z->firstcode[s] + z->firstsymbol[s]; -; 3726 : if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! -; 3727 : if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. -; 3728 : a->code_buffer >>= s; -; 3729 : a->num_bits -= s; -; 3730 : return z->value[b]; -; 3731 : } -; 3732 : -; 3733 : stbi_inline static int stbi__zhuffman_decode(stbi__zbuf* a, stbi__zhuffman* z) -; 3734 : { -; 3735 : int b, s; -; 3736 : if (a->num_bits < 16) { -; 3737 : if (stbi__zeof(a)) { -; 3738 : return -1; /* report error for unexpected end of data. */ -; 3739 : } -; 3740 : stbi__fill_bits(a); -; 3741 : } -; 3742 : b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; -; 3743 : if (b) { -; 3744 : s = b >> 9; -; 3745 : a->code_buffer >>= s; -; 3746 : a->num_bits -= s; -; 3747 : return b & 511; -; 3748 : } -; 3749 : return stbi__zhuffman_decode_slowpath(a, z); -; 3750 : } -; 3751 : -; 3752 : static int stbi__zexpand(stbi__zbuf* z, char* zout, int n) // need to make room for n bytes -; 3753 : { -; 3754 : char* q; -; 3755 : unsigned int cur, limit, old_limit; -; 3756 : z->zout = zout; -; 3757 : if (!z->z_expandable) return stbi__err("output buffer limit", "Corrupt PNG"); -; 3758 : cur = (unsigned int)(z->zout - z->zout_start); -; 3759 : limit = old_limit = (unsigned)(z->zout_end - z->zout_start); -; 3760 : if (UINT_MAX - cur < (unsigned)n) return stbi__err("outofmem", "Out of memory"); -; 3761 : while (cur + n > limit) { -; 3762 : if (limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); -; 3763 : limit *= 2; -; 3764 : } -; 3765 : q = (char*)STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); -; 3766 : STBI_NOTUSED(old_limit); -; 3767 : if (q == NULL) return stbi__err("outofmem", "Out of memory"); -; 3768 : z->zout_start = q; -; 3769 : z->zout = q + cur; -; 3770 : z->zout_end = q + limit; -; 3771 : return 1; -; 3772 : } -; 3773 : -; 3774 : static const int stbi__zlength_base[31] = { -; 3775 : 3,4,5,6,7,8,9,10,11,13, -; 3776 : 15,17,19,23,27,31,35,43,51,59, -; 3777 : 67,83,99,115,131,163,195,227,258,0,0 }; -; 3778 : -; 3779 : static const int stbi__zlength_extra[31] = -; 3780 : { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; -; 3781 : -; 3782 : static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, -; 3783 : 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0 }; -; 3784 : -; 3785 : static const int stbi__zdist_extra[32] = -; 3786 : { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 }; -; 3787 : -; 3788 : static int stbi__parse_huffman_block(stbi__zbuf* a) -; 3789 : { -; 3790 : char* zout = a->zout; -; 3791 : for (;;) { -; 3792 : int z = stbi__zhuffman_decode(a, &a->z_length); -; 3793 : if (z < 256) { -; 3794 : if (z < 0) return stbi__err("bad huffman code", "Corrupt PNG"); // error in huffman codes -; 3795 : if (zout >= a->zout_end) { -; 3796 : if (!stbi__zexpand(a, zout, 1)) return 0; -; 3797 : zout = a->zout; -; 3798 : } -; 3799 : *zout++ = (char)z; -; 3800 : } -; 3801 : else { -; 3802 : stbi_uc* p; -; 3803 : int len, dist; -; 3804 : if (z == 256) { -; 3805 : a->zout = zout; -; 3806 : return 1; -; 3807 : } -; 3808 : if (z >= 286) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data -; 3809 : z -= 257; -; 3810 : len = stbi__zlength_base[z]; -; 3811 : if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); -; 3812 : z = stbi__zhuffman_decode(a, &a->z_distance); -; 3813 : if (z < 0 || z >= 30) return stbi__err("bad huffman code", "Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data -; 3814 : dist = stbi__zdist_base[z]; -; 3815 : if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); -; 3816 : if (zout - a->zout_start < dist) return stbi__err("bad dist", "Corrupt PNG"); -; 3817 : if (zout + len > a->zout_end) { -; 3818 : if (!stbi__zexpand(a, zout, len)) return 0; -; 3819 : zout = a->zout; -; 3820 : } -; 3821 : p = (stbi_uc*)(zout - dist); -; 3822 : if (dist == 1) { // run of one byte; common in images. -; 3823 : stbi_uc v = *p; -; 3824 : if (len) { do *zout++ = v; while (--len); } -; 3825 : } -; 3826 : else { -; 3827 : if (len) { do *zout++ = *p++; while (--len); } -; 3828 : } -; 3829 : } -; 3830 : } -; 3831 : } -; 3832 : -; 3833 : static int stbi__compute_huffman_codes(stbi__zbuf* a) -; 3834 : { -; 3835 : static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; -; 3836 : stbi__zhuffman z_codelength; -; 3837 : stbi_uc lencodes[286 + 32 + 137];//padding for maximum single op -; 3838 : stbi_uc codelength_sizes[19]; -; 3839 : int i, n; -; 3840 : -; 3841 : int hlit = stbi__zreceive(a, 5) + 257; -; 3842 : int hdist = stbi__zreceive(a, 5) + 1; -; 3843 : int hclen = stbi__zreceive(a, 4) + 4; -; 3844 : int ntot = hlit + hdist; -; 3845 : -; 3846 : memset(codelength_sizes, 0, sizeof(codelength_sizes)); -; 3847 : for (i = 0; i < hclen; ++i) { -; 3848 : int s = stbi__zreceive(a, 3); -; 3849 : codelength_sizes[length_dezigzag[i]] = (stbi_uc)s; -; 3850 : } -; 3851 : if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; -; 3852 : -; 3853 : n = 0; -; 3854 : while (n < ntot) { -; 3855 : int c = stbi__zhuffman_decode(a, &z_codelength); -; 3856 : if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3857 : if (c < 16) -; 3858 : lencodes[n++] = (stbi_uc)c; -; 3859 : else { -; 3860 : stbi_uc fill = 0; -; 3861 : if (c == 16) { -; 3862 : c = stbi__zreceive(a, 2) + 3; -; 3863 : if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3864 : fill = lencodes[n - 1]; -; 3865 : } -; 3866 : else if (c == 17) { -; 3867 : c = stbi__zreceive(a, 3) + 3; -; 3868 : } -; 3869 : else if (c == 18) { -; 3870 : c = stbi__zreceive(a, 7) + 11; -; 3871 : } -; 3872 : else { -; 3873 : return stbi__err("bad codelengths", "Corrupt PNG"); -; 3874 : } -; 3875 : if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3876 : memset(lencodes + n, fill, c); -; 3877 : n += c; -; 3878 : } -; 3879 : } -; 3880 : if (n != ntot) return stbi__err("bad codelengths", "Corrupt PNG"); -; 3881 : if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; -; 3882 : if (!stbi__zbuild_huffman(&a->z_distance, lencodes + hlit, hdist)) return 0; -; 3883 : return 1; -; 3884 : } -; 3885 : -; 3886 : static int stbi__parse_uncompressed_block(stbi__zbuf* a) -; 3887 : { -; 3888 : stbi_uc header[4]; -; 3889 : int len, nlen, k; -; 3890 : if (a->num_bits & 7) -; 3891 : stbi__zreceive(a, a->num_bits & 7); // discard -; 3892 : // drain the bit-packed data into header -; 3893 : k = 0; -; 3894 : while (a->num_bits > 0) { -; 3895 : header[k++] = (stbi_uc)(a->code_buffer & 255); // suppress MSVC run-time check -; 3896 : a->code_buffer >>= 8; -; 3897 : a->num_bits -= 8; -; 3898 : } -; 3899 : if (a->num_bits < 0) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3900 : // now fill header the normal way -; 3901 : while (k < 4) -; 3902 : header[k++] = stbi__zget8(a); -; 3903 : len = header[1] * 256 + header[0]; -; 3904 : nlen = header[3] * 256 + header[2]; -; 3905 : if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt", "Corrupt PNG"); -; 3906 : if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer", "Corrupt PNG"); -; 3907 : if (a->zout + len > a->zout_end) -; 3908 : if (!stbi__zexpand(a, a->zout, len)) return 0; -; 3909 : memcpy(a->zout, a->zbuffer, len); -; 3910 : a->zbuffer += len; -; 3911 : a->zout += len; -; 3912 : return 1; -; 3913 : } -; 3914 : -; 3915 : static int stbi__parse_zlib_header(stbi__zbuf* a) -; 3916 : { -; 3917 : int cmf = stbi__zget8(a); -; 3918 : int cm = cmf & 15; -; 3919 : /* int cinfo = cmf >> 4; */ -; 3920 : int flg = stbi__zget8(a); -; 3921 : if (stbi__zeof(a)) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3922 : if ((cmf * 256 + flg) % 31 != 0) return stbi__err("bad zlib header", "Corrupt PNG"); // zlib spec -; 3923 : if (flg & 32) return stbi__err("no preset dict", "Corrupt PNG"); // preset dictionary not allowed in png -; 3924 : if (cm != 8) return stbi__err("bad compression", "Corrupt PNG"); // DEFLATE required for png -; 3925 : // window = 1 << (8 + cinfo)... but who cares, we fully buffer output -; 3926 : return 1; -; 3927 : } -; 3928 : -; 3929 : static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] = -; 3930 : { -; 3931 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3932 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3933 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3934 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -; 3935 : 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3936 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3937 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3938 : 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, -; 3939 : 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 -; 3940 : }; -; 3941 : static const stbi_uc stbi__zdefault_distance[32] = -; 3942 : { -; 3943 : 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 -; 3944 : }; -; 3945 : /* -; 3946 : Init algorithm: -; 3947 : { -; 3948 : int i; // use <= to match clearly with spec -; 3949 : for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; -; 3950 : for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; -; 3951 : for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; -; 3952 : for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; -; 3953 : -; 3954 : for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; -; 3955 : } -; 3956 : */ -; 3957 : -; 3958 : static int stbi__parse_zlib(stbi__zbuf* a, int parse_header) -; 3959 : { -; 3960 : int final, type; -; 3961 : if (parse_header) -; 3962 : if (!stbi__parse_zlib_header(a)) return 0; -; 3963 : a->num_bits = 0; -; 3964 : a->code_buffer = 0; -; 3965 : do { -; 3966 : final = stbi__zreceive(a, 1); -; 3967 : type = stbi__zreceive(a, 2); -; 3968 : if (type == 0) { -; 3969 : if (!stbi__parse_uncompressed_block(a)) return 0; -; 3970 : } -; 3971 : else if (type == 3) { -; 3972 : return 0; -; 3973 : } -; 3974 : else { -; 3975 : if (type == 1) { -; 3976 : // use fixed code lengths -; 3977 : if (!stbi__zbuild_huffman(&a->z_length, stbi__zdefault_length, STBI__ZNSYMS)) return 0; -; 3978 : if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; -; 3979 : } -; 3980 : else { -; 3981 : if (!stbi__compute_huffman_codes(a)) return 0; -; 3982 : } -; 3983 : if (!stbi__parse_huffman_block(a)) return 0; -; 3984 : } -; 3985 : } while (!final); -; 3986 : return 1; -; 3987 : } -; 3988 : -; 3989 : static int stbi__do_zlib(stbi__zbuf* a, char* obuf, int olen, int exp, int parse_header) -; 3990 : { -; 3991 : a->zout_start = obuf; -; 3992 : a->zout = obuf; -; 3993 : a->zout_end = obuf + olen; -; 3994 : a->z_expandable = exp; -; 3995 : -; 3996 : return stbi__parse_zlib(a, parse_header); -; 3997 : } -; 3998 : -; 3999 : STBIDEF char* stbi_zlib_decode_malloc_guesssize(const char* buffer, int len, int initial_size, int* outlen) -; 4000 : { -; 4001 : stbi__zbuf a; -; 4002 : char* p = (char*)stbi__malloc(initial_size); -; 4003 : if (p == NULL) return NULL; -; 4004 : a.zbuffer = (stbi_uc*)buffer; -; 4005 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4006 : if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { -; 4007 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4008 : return a.zout_start; -; 4009 : } -; 4010 : else { -; 4011 : STBI_FREE(a.zout_start); -; 4012 : return NULL; -; 4013 : } -; 4014 : } -; 4015 : -; 4016 : STBIDEF char* stbi_zlib_decode_malloc(char const* buffer, int len, int* outlen) -; 4017 : { -; 4018 : return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); -; 4019 : } -; 4020 : -; 4021 : STBIDEF char* stbi_zlib_decode_malloc_guesssize_headerflag(const char* buffer, int len, int initial_size, int* outlen, int parse_header) -; 4022 : { -; 4023 : stbi__zbuf a; -; 4024 : char* p = (char*)stbi__malloc(initial_size); -; 4025 : if (p == NULL) return NULL; -; 4026 : a.zbuffer = (stbi_uc*)buffer; -; 4027 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4028 : if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { -; 4029 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4030 : return a.zout_start; -; 4031 : } -; 4032 : else { -; 4033 : STBI_FREE(a.zout_start); -; 4034 : return NULL; -; 4035 : } -; 4036 : } -; 4037 : -; 4038 : STBIDEF int stbi_zlib_decode_buffer(char* obuffer, int olen, char const* ibuffer, int ilen) -; 4039 : { -; 4040 : stbi__zbuf a; -; 4041 : a.zbuffer = (stbi_uc*)ibuffer; -; 4042 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4043 : if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) -; 4044 : return (int)(a.zout - a.zout_start); -; 4045 : else -; 4046 : return -1; -; 4047 : } -; 4048 : -; 4049 : STBIDEF char* stbi_zlib_decode_noheader_malloc(char const* buffer, int len, int* outlen) -; 4050 : { -; 4051 : stbi__zbuf a; -; 4052 : char* p = (char*)stbi__malloc(16384); -; 4053 : if (p == NULL) return NULL; -; 4054 : a.zbuffer = (stbi_uc*)buffer; -; 4055 : a.zbuffer_end = (stbi_uc*)buffer + len; -; 4056 : if (stbi__do_zlib(&a, p, 16384, 1, 0)) { -; 4057 : if (outlen) *outlen = (int)(a.zout - a.zout_start); -; 4058 : return a.zout_start; -; 4059 : } -; 4060 : else { -; 4061 : STBI_FREE(a.zout_start); -; 4062 : return NULL; -; 4063 : } -; 4064 : } -; 4065 : -; 4066 : STBIDEF int stbi_zlib_decode_noheader_buffer(char* obuffer, int olen, const char* ibuffer, int ilen) -; 4067 : { -; 4068 : stbi__zbuf a; -; 4069 : a.zbuffer = (stbi_uc*)ibuffer; -; 4070 : a.zbuffer_end = (stbi_uc*)ibuffer + ilen; -; 4071 : if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) -; 4072 : return (int)(a.zout - a.zout_start); -; 4073 : else -; 4074 : return -1; -; 4075 : } -; 4076 : #endif -; 4077 : -; 4078 : // public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 -; 4079 : // simple implementation -; 4080 : // - only 8-bit samples -; 4081 : // - no CRC checking -; 4082 : // - allocates lots of intermediate memory -; 4083 : // - avoids problem of streaming data between subsystems -; 4084 : // - avoids explicit window management -; 4085 : // performance -; 4086 : // - uses stb_zlib, a PD zlib implementation with fast huffman decoding -; 4087 : -; 4088 : #ifndef STBI_NO_PNG -; 4089 : typedef struct -; 4090 : { -; 4091 : stbi__uint32 length; -; 4092 : stbi__uint32 type; -; 4093 : } stbi__pngchunk; -; 4094 : -; 4095 : static stbi__pngchunk stbi__get_chunk_header(stbi__context* s) -; 4096 : { -; 4097 : stbi__pngchunk c; -; 4098 : c.length = stbi__get32be(s); -; 4099 : c.type = stbi__get32be(s); -; 4100 : return c; -; 4101 : } -; 4102 : -; 4103 : static int stbi__check_png_header(stbi__context* s) -; 4104 : { -; 4105 : static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; -; 4106 : int i; -; 4107 : for (i = 0; i < 8; ++i) -; 4108 : if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig", "Not a PNG"); -; 4109 : return 1; -; 4110 : } -; 4111 : -; 4112 : typedef struct -; 4113 : { -; 4114 : stbi__context* s; -; 4115 : stbi_uc* idata, * expanded, * out; -; 4116 : int depth; -; 4117 : } stbi__png; -; 4118 : -; 4119 : enum { -; 4120 : STBI__F_none = 0, -; 4121 : STBI__F_sub = 1, -; 4122 : STBI__F_up = 2, -; 4123 : STBI__F_avg = 3, -; 4124 : STBI__F_paeth = 4, -; 4125 : // synthetic filters used for first scanline to avoid needing a dummy row of 0s -; 4126 : STBI__F_avg_first, -; 4127 : STBI__F_paeth_first -; 4128 : }; -; 4129 : -; 4130 : static stbi_uc first_row_filter[5] = -; 4131 : { -; 4132 : STBI__F_none, -; 4133 : STBI__F_sub, -; 4134 : STBI__F_none, -; 4135 : STBI__F_avg_first, -; 4136 : STBI__F_paeth_first -; 4137 : }; -; 4138 : -; 4139 : static int stbi__paeth(int a, int b, int c) -; 4140 : { -; 4141 : int p = a + b - c; -; 4142 : int pa = abs(p - a); -; 4143 : int pb = abs(p - b); -; 4144 : int pc = abs(p - c); -; 4145 : if (pa <= pb && pa <= pc) return a; -; 4146 : if (pb <= pc) return b; -; 4147 : return c; -; 4148 : } -; 4149 : -; 4150 : static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; -; 4151 : -; 4152 : // create the png data from post-deflated data -; 4153 : static int stbi__create_png_image_raw(stbi__png* a, stbi_uc* raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -; 4154 : { -; 4155 : int bytes = (depth == 16 ? 2 : 1); -; 4156 : stbi__context* s = a->s; -; 4157 : stbi__uint32 i, j, stride = x * out_n * bytes; -; 4158 : stbi__uint32 img_len, img_width_bytes; -; 4159 : int k; -; 4160 : int img_n = s->img_n; // copy it into a local for later -; 4161 : -; 4162 : int output_bytes = out_n * bytes; -; 4163 : int filter_bytes = img_n * bytes; -; 4164 : int width = x; -; 4165 : -; 4166 : STBI_ASSERT(out_n == s->img_n || out_n == s->img_n + 1); -; 4167 : a->out = (stbi_uc*)stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into -; 4168 : if (!a->out) return stbi__err("outofmem", "Out of memory"); -; 4169 : -; 4170 : if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); -; 4171 : img_width_bytes = (((img_n * x * depth) + 7) >> 3); -; 4172 : img_len = (img_width_bytes + 1) * y; -; 4173 : -; 4174 : // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, -; 4175 : // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), -; 4176 : // so just check for raw_len < img_len always. -; 4177 : if (raw_len < img_len) return stbi__err("not enough pixels", "Corrupt PNG"); -; 4178 : -; 4179 : for (j = 0; j < y; ++j) { -; 4180 : stbi_uc* cur = a->out + stride * j; -; 4181 : stbi_uc* prior; -; 4182 : int filter = *raw++; -; 4183 : -; 4184 : if (filter > 4) -; 4185 : return stbi__err("invalid filter", "Corrupt PNG"); -; 4186 : -; 4187 : if (depth < 8) { -; 4188 : if (img_width_bytes > x) return stbi__err("invalid width", "Corrupt PNG"); -; 4189 : cur += x * out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place -; 4190 : filter_bytes = 1; -; 4191 : width = img_width_bytes; -; 4192 : } -; 4193 : prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above -; 4194 : -; 4195 : // if first row, use special filter that doesn't sample previous row -; 4196 : if (j == 0) filter = first_row_filter[filter]; -; 4197 : -; 4198 : // handle first byte explicitly -; 4199 : for (k = 0; k < filter_bytes; ++k) { -; 4200 : switch (filter) { -; 4201 : case STBI__F_none: cur[k] = raw[k]; break; -; 4202 : case STBI__F_sub: cur[k] = raw[k]; break; -; 4203 : case STBI__F_up: cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; -; 4204 : case STBI__F_avg: cur[k] = STBI__BYTECAST(raw[k] + (prior[k] >> 1)); break; -; 4205 : case STBI__F_paeth: cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0, prior[k], 0)); break; -; 4206 : case STBI__F_avg_first: cur[k] = raw[k]; break; -; 4207 : case STBI__F_paeth_first: cur[k] = raw[k]; break; -; 4208 : } -; 4209 : } -; 4210 : -; 4211 : if (depth == 8) { -; 4212 : if (img_n != out_n) -; 4213 : cur[img_n] = 255; // first pixel -; 4214 : raw += img_n; -; 4215 : cur += out_n; -; 4216 : prior += out_n; -; 4217 : } -; 4218 : else if (depth == 16) { -; 4219 : if (img_n != out_n) { -; 4220 : cur[filter_bytes] = 255; // first pixel top byte -; 4221 : cur[filter_bytes + 1] = 255; // first pixel bottom byte -; 4222 : } -; 4223 : raw += filter_bytes; -; 4224 : cur += output_bytes; -; 4225 : prior += output_bytes; -; 4226 : } -; 4227 : else { -; 4228 : raw += 1; -; 4229 : cur += 1; -; 4230 : prior += 1; -; 4231 : } -; 4232 : -; 4233 : // this is a little gross, so that we don't switch per-pixel or per-component -; 4234 : if (depth < 8 || img_n == out_n) { -; 4235 : int nk = (width - 1) * filter_bytes; -; 4236 : #define STBI__CASE(f) \ -; 4237 : case f: \ -; 4238 : for (k=0; k < nk; ++k) -; 4239 : switch (filter) { -; 4240 : // "none" filter turns into a memcpy here; make that explicit. -; 4241 : case STBI__F_none: memcpy(cur, raw, nk); break; -; 4242 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - filter_bytes]); } break; -; 4243 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4244 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - filter_bytes]) >> 1)); } break; -; 4245 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], prior[k], prior[k - filter_bytes])); } break; -; 4246 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - filter_bytes] >> 1)); } break; -; 4247 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - filter_bytes], 0, 0)); } break; -; 4248 : } -; 4249 : #undef STBI__CASE -; 4250 : raw += nk; -; 4251 : } -; 4252 : else { -; 4253 : STBI_ASSERT(img_n + 1 == out_n); -; 4254 : #define STBI__CASE(f) \ -; 4255 : case f: \ -; 4256 : for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ -; 4257 : for (k=0; k < filter_bytes; ++k) -; 4258 : switch (filter) { -; 4259 : STBI__CASE(STBI__F_none) { cur[k] = raw[k]; } break; -; 4260 : STBI__CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k - output_bytes]); } break; -; 4261 : STBI__CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break; -; 4262 : STBI__CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k - output_bytes]) >> 1)); } break; -; 4263 : STBI__CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], prior[k], prior[k - output_bytes])); } break; -; 4264 : STBI__CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k - output_bytes] >> 1)); } break; -; 4265 : STBI__CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k - output_bytes], 0, 0)); } break; -; 4266 : } -; 4267 : #undef STBI__CASE -; 4268 : -; 4269 : // the loop above sets the high byte of the pixels' alpha, but for -; 4270 : // 16 bit png files we also need the low byte set. we'll do that here. -; 4271 : if (depth == 16) { -; 4272 : cur = a->out + stride * j; // start at the beginning of the row again -; 4273 : for (i = 0; i < x; ++i, cur += output_bytes) { -; 4274 : cur[filter_bytes + 1] = 255; -; 4275 : } -; 4276 : } -; 4277 : } -; 4278 : } -; 4279 : -; 4280 : // we make a separate pass to expand bits to pixels; for performance, -; 4281 : // this could run two scanlines behind the above code, so it won't -; 4282 : // intefere with filtering but will still be in the cache. -; 4283 : if (depth < 8) { -; 4284 : for (j = 0; j < y; ++j) { -; 4285 : stbi_uc* cur = a->out + stride * j; -; 4286 : stbi_uc* in = a->out + stride * j + x * out_n - img_width_bytes; -; 4287 : // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit -; 4288 : // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop -; 4289 : stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range -; 4290 : -; 4291 : // note that the final byte might overshoot and write more data than desired. -; 4292 : // we can allocate enough data that this never writes out of memory, but it -; 4293 : // could also overwrite the next scanline. can it overwrite non-empty data -; 4294 : // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. -; 4295 : // so we need to explicitly clamp the final ones -; 4296 : -; 4297 : if (depth == 4) { -; 4298 : for (k = x * img_n; k >= 2; k -= 2, ++in) { -; 4299 : *cur++ = scale * ((*in >> 4)); -; 4300 : *cur++ = scale * ((*in) & 0x0f); -; 4301 : } -; 4302 : if (k > 0) *cur++ = scale * ((*in >> 4)); -; 4303 : } -; 4304 : else if (depth == 2) { -; 4305 : for (k = x * img_n; k >= 4; k -= 4, ++in) { -; 4306 : *cur++ = scale * ((*in >> 6)); -; 4307 : *cur++ = scale * ((*in >> 4) & 0x03); -; 4308 : *cur++ = scale * ((*in >> 2) & 0x03); -; 4309 : *cur++ = scale * ((*in) & 0x03); -; 4310 : } -; 4311 : if (k > 0) *cur++ = scale * ((*in >> 6)); -; 4312 : if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); -; 4313 : if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); -; 4314 : } -; 4315 : else if (depth == 1) { -; 4316 : for (k = x * img_n; k >= 8; k -= 8, ++in) { -; 4317 : *cur++ = scale * ((*in >> 7)); -; 4318 : *cur++ = scale * ((*in >> 6) & 0x01); -; 4319 : *cur++ = scale * ((*in >> 5) & 0x01); -; 4320 : *cur++ = scale * ((*in >> 4) & 0x01); -; 4321 : *cur++ = scale * ((*in >> 3) & 0x01); -; 4322 : *cur++ = scale * ((*in >> 2) & 0x01); -; 4323 : *cur++ = scale * ((*in >> 1) & 0x01); -; 4324 : *cur++ = scale * ((*in) & 0x01); -; 4325 : } -; 4326 : if (k > 0) *cur++ = scale * ((*in >> 7)); -; 4327 : if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); -; 4328 : if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); -; 4329 : if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); -; 4330 : if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); -; 4331 : if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); -; 4332 : if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); -; 4333 : } -; 4334 : if (img_n != out_n) { -; 4335 : int q; -; 4336 : // insert alpha = 255 -; 4337 : cur = a->out + stride * j; -; 4338 : if (img_n == 1) { -; 4339 : for (q = x - 1; q >= 0; --q) { -; 4340 : cur[q * 2 + 1] = 255; -; 4341 : cur[q * 2 + 0] = cur[q]; -; 4342 : } -; 4343 : } -; 4344 : else { -; 4345 : STBI_ASSERT(img_n == 3); -; 4346 : for (q = x - 1; q >= 0; --q) { -; 4347 : cur[q * 4 + 3] = 255; -; 4348 : cur[q * 4 + 2] = cur[q * 3 + 2]; -; 4349 : cur[q * 4 + 1] = cur[q * 3 + 1]; -; 4350 : cur[q * 4 + 0] = cur[q * 3 + 0]; -; 4351 : } -; 4352 : } -; 4353 : } -; 4354 : } -; 4355 : } -; 4356 : else if (depth == 16) { -; 4357 : // force the image data from big-endian to platform-native. -; 4358 : // this is done in a separate pass due to the decoding relying -; 4359 : // on the data being untouched, but could probably be done -; 4360 : // per-line during decode if care is taken. -; 4361 : stbi_uc* cur = a->out; -; 4362 : stbi__uint16* cur16 = (stbi__uint16*)cur; -; 4363 : -; 4364 : for (i = 0; i < x * y * out_n; ++i, cur16++, cur += 2) { -; 4365 : *cur16 = (cur[0] << 8) | cur[1]; -; 4366 : } -; 4367 : } -; 4368 : -; 4369 : return 1; -; 4370 : } -; 4371 : -; 4372 : static int stbi__create_png_image(stbi__png* a, stbi_uc* image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -; 4373 : { -; 4374 : int bytes = (depth == 16 ? 2 : 1); -; 4375 : int out_bytes = out_n * bytes; -; 4376 : stbi_uc* final; -; 4377 : int p; -; 4378 : if (!interlaced) -; 4379 : return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); -; 4380 : -; 4381 : // de-interlacing -; 4382 : final = (stbi_uc*)stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); -; 4383 : if (!final) return stbi__err("outofmem", "Out of memory"); -; 4384 : for (p = 0; p < 7; ++p) { -; 4385 : int xorig[] = { 0,4,0,2,0,1,0 }; -; 4386 : int yorig[] = { 0,0,4,0,2,0,1 }; -; 4387 : int xspc[] = { 8,8,4,4,2,2,1 }; -; 4388 : int yspc[] = { 8,8,8,4,4,2,2 }; -; 4389 : int i, j, x, y; -; 4390 : // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 -; 4391 : x = (a->s->img_x - xorig[p] + xspc[p] - 1) / xspc[p]; -; 4392 : y = (a->s->img_y - yorig[p] + yspc[p] - 1) / yspc[p]; -; 4393 : if (x && y) { -; 4394 : stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; -; 4395 : if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { -; 4396 : STBI_FREE(final); -; 4397 : return 0; -; 4398 : } -; 4399 : for (j = 0; j < y; ++j) { -; 4400 : for (i = 0; i < x; ++i) { -; 4401 : int out_y = j * yspc[p] + yorig[p]; -; 4402 : int out_x = i * xspc[p] + xorig[p]; -; 4403 : memcpy(final + out_y * a->s->img_x * out_bytes + out_x * out_bytes, -; 4404 : a->out + (j * x + i) * out_bytes, out_bytes); -; 4405 : } -; 4406 : } -; 4407 : STBI_FREE(a->out); -; 4408 : image_data += img_len; -; 4409 : image_data_len -= img_len; -; 4410 : } -; 4411 : } -; 4412 : a->out = final; -; 4413 : -; 4414 : return 1; -; 4415 : } -; 4416 : -; 4417 : static int stbi__compute_transparency(stbi__png* z, stbi_uc tc[3], int out_n) -; 4418 : { -; 4419 : stbi__context* s = z->s; -; 4420 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4421 : stbi_uc* p = z->out; -; 4422 : -; 4423 : // compute color-based transparency, assuming we've -; 4424 : // already got 255 as the alpha value in the output -; 4425 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4426 : -; 4427 : if (out_n == 2) { -; 4428 : for (i = 0; i < pixel_count; ++i) { -; 4429 : p[1] = (p[0] == tc[0] ? 0 : 255); -; 4430 : p += 2; -; 4431 : } -; 4432 : } -; 4433 : else { -; 4434 : for (i = 0; i < pixel_count; ++i) { -; 4435 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4436 : p[3] = 0; -; 4437 : p += 4; -; 4438 : } -; 4439 : } -; 4440 : return 1; -; 4441 : } -; 4442 : -; 4443 : static int stbi__compute_transparency16(stbi__png* z, stbi__uint16 tc[3], int out_n) -; 4444 : { -; 4445 : stbi__context* s = z->s; -; 4446 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4447 : stbi__uint16* p = (stbi__uint16*)z->out; -; 4448 : -; 4449 : // compute color-based transparency, assuming we've -; 4450 : // already got 65535 as the alpha value in the output -; 4451 : STBI_ASSERT(out_n == 2 || out_n == 4); -; 4452 : -; 4453 : if (out_n == 2) { -; 4454 : for (i = 0; i < pixel_count; ++i) { -; 4455 : p[1] = (p[0] == tc[0] ? 0 : 65535); -; 4456 : p += 2; -; 4457 : } -; 4458 : } -; 4459 : else { -; 4460 : for (i = 0; i < pixel_count; ++i) { -; 4461 : if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) -; 4462 : p[3] = 0; -; 4463 : p += 4; -; 4464 : } -; 4465 : } -; 4466 : return 1; -; 4467 : } -; 4468 : -; 4469 : static int stbi__expand_png_palette(stbi__png* a, stbi_uc* palette, int len, int pal_img_n) -; 4470 : { -; 4471 : stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; -; 4472 : stbi_uc* p, * temp_out, * orig = a->out; -; 4473 : -; 4474 : p = (stbi_uc*)stbi__malloc_mad2(pixel_count, pal_img_n, 0); -; 4475 : if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4476 : -; 4477 : // between here and free(out) below, exitting would leak -; 4478 : temp_out = p; -; 4479 : -; 4480 : if (pal_img_n == 3) { -; 4481 : for (i = 0; i < pixel_count; ++i) { -; 4482 : int n = orig[i] * 4; -; 4483 : p[0] = palette[n]; -; 4484 : p[1] = palette[n + 1]; -; 4485 : p[2] = palette[n + 2]; -; 4486 : p += 3; -; 4487 : } -; 4488 : } -; 4489 : else { -; 4490 : for (i = 0; i < pixel_count; ++i) { -; 4491 : int n = orig[i] * 4; -; 4492 : p[0] = palette[n]; -; 4493 : p[1] = palette[n + 1]; -; 4494 : p[2] = palette[n + 2]; -; 4495 : p[3] = palette[n + 3]; -; 4496 : p += 4; -; 4497 : } -; 4498 : } -; 4499 : STBI_FREE(a->out); -; 4500 : a->out = temp_out; -; 4501 : -; 4502 : STBI_NOTUSED(len); -; 4503 : -; 4504 : return 1; -; 4505 : } -; 4506 : -; 4507 : static int stbi__unpremultiply_on_load_global = 0; -; 4508 : static int stbi__de_iphone_flag_global = 0; -; 4509 : -; 4510 : STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) -; 4511 : { -; 4512 : stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; -; 4513 : } -; 4514 : -; 4515 : STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) -; 4516 : { -; 4517 : stbi__de_iphone_flag_global = flag_true_if_should_convert; -; 4518 : } -; 4519 : -; 4520 : #ifndef STBI_THREAD_LOCAL -; 4521 : #define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global -; 4522 : #define stbi__de_iphone_flag stbi__de_iphone_flag_global -; 4523 : #else -; 4524 : static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; -; 4525 : static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; -; 4526 : -; 4527 : STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) -; 4528 : { -; 4529 : stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; -; 4530 : stbi__unpremultiply_on_load_set = 1; -; 4531 : } -; 4532 : -; 4533 : STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert) -; 4534 : { -; 4535 : stbi__de_iphone_flag_local = flag_true_if_should_convert; -; 4536 : stbi__de_iphone_flag_set = 1; -; 4537 : } -; 4538 : -; 4539 : #define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \ -; 4540 : ? stbi__unpremultiply_on_load_local \ -; 4541 : : stbi__unpremultiply_on_load_global) -; 4542 : #define stbi__de_iphone_flag (stbi__de_iphone_flag_set \ -; 4543 : ? stbi__de_iphone_flag_local \ -; 4544 : : stbi__de_iphone_flag_global) -; 4545 : #endif // STBI_THREAD_LOCAL -; 4546 : -; 4547 : static void stbi__de_iphone(stbi__png* z) -; 4548 : { -; 4549 : stbi__context* s = z->s; -; 4550 : stbi__uint32 i, pixel_count = s->img_x * s->img_y; -; 4551 : stbi_uc* p = z->out; -; 4552 : -; 4553 : if (s->img_out_n == 3) { // convert bgr to rgb -; 4554 : for (i = 0; i < pixel_count; ++i) { -; 4555 : stbi_uc t = p[0]; -; 4556 : p[0] = p[2]; -; 4557 : p[2] = t; -; 4558 : p += 3; -; 4559 : } -; 4560 : } -; 4561 : else { -; 4562 : STBI_ASSERT(s->img_out_n == 4); -; 4563 : if (stbi__unpremultiply_on_load) { -; 4564 : // convert bgr to rgb and unpremultiply -; 4565 : for (i = 0; i < pixel_count; ++i) { -; 4566 : stbi_uc a = p[3]; -; 4567 : stbi_uc t = p[0]; -; 4568 : if (a) { -; 4569 : stbi_uc half = a / 2; -; 4570 : p[0] = (p[2] * 255 + half) / a; -; 4571 : p[1] = (p[1] * 255 + half) / a; -; 4572 : p[2] = (t * 255 + half) / a; -; 4573 : } -; 4574 : else { -; 4575 : p[0] = p[2]; -; 4576 : p[2] = t; -; 4577 : } -; 4578 : p += 4; -; 4579 : } -; 4580 : } -; 4581 : else { -; 4582 : // convert bgr to rgb -; 4583 : for (i = 0; i < pixel_count; ++i) { -; 4584 : stbi_uc t = p[0]; -; 4585 : p[0] = p[2]; -; 4586 : p[2] = t; -; 4587 : p += 4; -; 4588 : } -; 4589 : } -; 4590 : } -; 4591 : } -; 4592 : -; 4593 : #define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) -; 4594 : -; 4595 : static int stbi__parse_png_file(stbi__png* z, int scan, int req_comp) -; 4596 : { -; 4597 : stbi_uc palette[1024], pal_img_n = 0; -; 4598 : stbi_uc has_trans = 0, tc[3] = { 0 }; -; 4599 : stbi__uint16 tc16[3]; -; 4600 : stbi__uint32 ioff = 0, idata_limit = 0, i, pal_len = 0; -; 4601 : int first = 1, k, interlace = 0, color = 0, is_iphone = 0; -; 4602 : stbi__context* s = z->s; -; 4603 : -; 4604 : z->expanded = NULL; -; 4605 : z->idata = NULL; -; 4606 : z->out = NULL; -; 4607 : -; 4608 : if (!stbi__check_png_header(s)) return 0; -; 4609 : -; 4610 : if (scan == STBI__SCAN_type) return 1; -; 4611 : -; 4612 : for (;;) { -; 4613 : stbi__pngchunk c = stbi__get_chunk_header(s); -; 4614 : switch (c.type) { -; 4615 : case STBI__PNG_TYPE('C', 'g', 'B', 'I'): -; 4616 : is_iphone = 1; -; 4617 : stbi__skip(s, c.length); -; 4618 : break; -; 4619 : case STBI__PNG_TYPE('I', 'H', 'D', 'R'): { -; 4620 : int comp, filter; -; 4621 : if (!first) return stbi__err("multiple IHDR", "Corrupt PNG"); -; 4622 : first = 0; -; 4623 : if (c.length != 13) return stbi__err("bad IHDR len", "Corrupt PNG"); -; 4624 : s->img_x = stbi__get32be(s); -; 4625 : s->img_y = stbi__get32be(s); -; 4626 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4627 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 4628 : z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only", "PNG not supported: 1/2/4/8/16-bit only"); -; 4629 : color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype", "Corrupt PNG"); -; 4630 : if (color == 3 && z->depth == 16) return stbi__err("bad ctype", "Corrupt PNG"); -; 4631 : if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype", "Corrupt PNG"); -; 4632 : comp = stbi__get8(s); if (comp) return stbi__err("bad comp method", "Corrupt PNG"); -; 4633 : filter = stbi__get8(s); if (filter) return stbi__err("bad filter method", "Corrupt PNG"); -; 4634 : interlace = stbi__get8(s); if (interlace > 1) return stbi__err("bad interlace method", "Corrupt PNG"); -; 4635 : if (!s->img_x || !s->img_y) return stbi__err("0-pixel image", "Corrupt PNG"); -; 4636 : if (!pal_img_n) { -; 4637 : s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); -; 4638 : if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); -; 4639 : } -; 4640 : else { -; 4641 : // if paletted, then pal_n is our final components, and -; 4642 : // img_n is # components to decompress/filter. -; 4643 : s->img_n = 1; -; 4644 : if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large", "Corrupt PNG"); -; 4645 : } -; 4646 : // even with SCAN_header, have to scan to see if we have a tRNS -; 4647 : break; -; 4648 : } -; 4649 : -; 4650 : case STBI__PNG_TYPE('P', 'L', 'T', 'E'): { -; 4651 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4652 : if (c.length > 256 * 3) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4653 : pal_len = c.length / 3; -; 4654 : if (pal_len * 3 != c.length) return stbi__err("invalid PLTE", "Corrupt PNG"); -; 4655 : for (i = 0; i < pal_len; ++i) { -; 4656 : palette[i * 4 + 0] = stbi__get8(s); -; 4657 : palette[i * 4 + 1] = stbi__get8(s); -; 4658 : palette[i * 4 + 2] = stbi__get8(s); -; 4659 : palette[i * 4 + 3] = 255; -; 4660 : } -; 4661 : break; -; 4662 : } -; 4663 : -; 4664 : case STBI__PNG_TYPE('t', 'R', 'N', 'S'): { -; 4665 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4666 : if (z->idata) return stbi__err("tRNS after IDAT", "Corrupt PNG"); -; 4667 : if (pal_img_n) { -; 4668 : if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } -; 4669 : if (pal_len == 0) return stbi__err("tRNS before PLTE", "Corrupt PNG"); -; 4670 : if (c.length > pal_len) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4671 : pal_img_n = 4; -; 4672 : for (i = 0; i < c.length; ++i) -; 4673 : palette[i * 4 + 3] = stbi__get8(s); -; 4674 : } -; 4675 : else { -; 4676 : if (!(s->img_n & 1)) return stbi__err("tRNS with alpha", "Corrupt PNG"); -; 4677 : if (c.length != (stbi__uint32)s->img_n * 2) return stbi__err("bad tRNS len", "Corrupt PNG"); -; 4678 : has_trans = 1; -; 4679 : // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. -; 4680 : if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } -; 4681 : if (z->depth == 16) { -; 4682 : for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is -; 4683 : } -; 4684 : else { -; 4685 : for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger -; 4686 : } -; 4687 : } -; 4688 : break; -; 4689 : } -; 4690 : -; 4691 : case STBI__PNG_TYPE('I', 'D', 'A', 'T'): { -; 4692 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4693 : if (pal_img_n && !pal_len) return stbi__err("no PLTE", "Corrupt PNG"); -; 4694 : if (scan == STBI__SCAN_header) { -; 4695 : // header scan definitely stops at first IDAT -; 4696 : if (pal_img_n) -; 4697 : s->img_n = pal_img_n; -; 4698 : return 1; -; 4699 : } -; 4700 : if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); -; 4701 : if ((int)(ioff + c.length) < (int)ioff) return 0; -; 4702 : if (ioff + c.length > idata_limit) { -; 4703 : stbi__uint32 idata_limit_old = idata_limit; -; 4704 : stbi_uc* p; -; 4705 : if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; -; 4706 : while (ioff + c.length > idata_limit) -; 4707 : idata_limit *= 2; -; 4708 : STBI_NOTUSED(idata_limit_old); -; 4709 : p = (stbi_uc*)STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); -; 4710 : z->idata = p; -; 4711 : } -; 4712 : if (!stbi__getn(s, z->idata + ioff, c.length)) return stbi__err("outofdata", "Corrupt PNG"); -; 4713 : ioff += c.length; -; 4714 : break; -; 4715 : } -; 4716 : -; 4717 : case STBI__PNG_TYPE('I', 'E', 'N', 'D'): { -; 4718 : stbi__uint32 raw_len, bpl; -; 4719 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4720 : if (scan != STBI__SCAN_load) return 1; -; 4721 : if (z->idata == NULL) return stbi__err("no IDAT", "Corrupt PNG"); -; 4722 : // initial guess for decoded data size to avoid unnecessary reallocs -; 4723 : bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component -; 4724 : raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; -; 4725 : z->expanded = (stbi_uc*)stbi_zlib_decode_malloc_guesssize_headerflag((char*)z->idata, ioff, raw_len, (int*)&raw_len, !is_iphone); -; 4726 : if (z->expanded == NULL) return 0; // zlib should set error -; 4727 : STBI_FREE(z->idata); z->idata = NULL; -; 4728 : if ((req_comp == s->img_n + 1 && req_comp != 3 && !pal_img_n) || has_trans) -; 4729 : s->img_out_n = s->img_n + 1; -; 4730 : else -; 4731 : s->img_out_n = s->img_n; -; 4732 : if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; -; 4733 : if (has_trans) { -; 4734 : if (z->depth == 16) { -; 4735 : if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; -; 4736 : } -; 4737 : else { -; 4738 : if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; -; 4739 : } -; 4740 : } -; 4741 : if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) -; 4742 : stbi__de_iphone(z); -; 4743 : if (pal_img_n) { -; 4744 : // pal_img_n == 3 or 4 -; 4745 : s->img_n = pal_img_n; // record the actual colors we had -; 4746 : s->img_out_n = pal_img_n; -; 4747 : if (req_comp >= 3) s->img_out_n = req_comp; -; 4748 : if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) -; 4749 : return 0; -; 4750 : } -; 4751 : else if (has_trans) { -; 4752 : // non-paletted image with tRNS -> source image has (constant) alpha -; 4753 : ++s->img_n; -; 4754 : } -; 4755 : STBI_FREE(z->expanded); z->expanded = NULL; -; 4756 : // end of PNG chunk, read and skip CRC -; 4757 : stbi__get32be(s); -; 4758 : return 1; -; 4759 : } -; 4760 : -; 4761 : default: -; 4762 : // if critical, fail -; 4763 : if (first) return stbi__err("first not IHDR", "Corrupt PNG"); -; 4764 : if ((c.type & (1 << 29)) == 0) { -; 4765 : #ifndef STBI_NO_FAILURE_STRINGS -; 4766 : // not threadsafe -; 4767 : static char invalid_chunk[] = "XXXX PNG chunk not known"; -; 4768 : invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); -; 4769 : invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); -; 4770 : invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); -; 4771 : invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); -; 4772 : #endif -; 4773 : return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); -; 4774 : } -; 4775 : stbi__skip(s, c.length); -; 4776 : break; -; 4777 : } -; 4778 : // end of PNG chunk, read and skip CRC -; 4779 : stbi__get32be(s); -; 4780 : } -; 4781 : } -; 4782 : -; 4783 : static void* stbi__do_png(stbi__png* p, int* x, int* y, int* n, int req_comp, stbi__result_info* ri) -; 4784 : { -; 4785 : void* result = NULL; -; 4786 : if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); -; 4787 : if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { -; 4788 : if (p->depth <= 8) -; 4789 : ri->bits_per_channel = 8; -; 4790 : else if (p->depth == 16) -; 4791 : ri->bits_per_channel = 16; -; 4792 : else -; 4793 : return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); -; 4794 : result = p->out; -; 4795 : p->out = NULL; -; 4796 : if (req_comp && req_comp != p->s->img_out_n) { -; 4797 : if (ri->bits_per_channel == 8) -; 4798 : result = stbi__convert_format((unsigned char*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4799 : else -; 4800 : result = stbi__convert_format16((stbi__uint16*)result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); -; 4801 : p->s->img_out_n = req_comp; -; 4802 : if (result == NULL) return result; -; 4803 : } -; 4804 : *x = p->s->img_x; -; 4805 : *y = p->s->img_y; -; 4806 : if (n) *n = p->s->img_n; -; 4807 : } -; 4808 : STBI_FREE(p->out); p->out = NULL; -; 4809 : STBI_FREE(p->expanded); p->expanded = NULL; -; 4810 : STBI_FREE(p->idata); p->idata = NULL; -; 4811 : -; 4812 : return result; -; 4813 : } -; 4814 : -; 4815 : static void* stbi__png_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 4816 : { -; 4817 : stbi__png p; -; 4818 : p.s = s; -; 4819 : return stbi__do_png(&p, x, y, comp, req_comp, ri); -; 4820 : } -; 4821 : -; 4822 : static int stbi__png_test(stbi__context* s) -; 4823 : { -; 4824 : int r; -; 4825 : r = stbi__check_png_header(s); -; 4826 : stbi__rewind(s); -; 4827 : return r; -; 4828 : } -; 4829 : -; 4830 : static int stbi__png_info_raw(stbi__png* p, int* x, int* y, int* comp) -; 4831 : { -; 4832 : if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { -; 4833 : stbi__rewind(p->s); -; 4834 : return 0; -; 4835 : } -; 4836 : if (x) *x = p->s->img_x; -; 4837 : if (y) *y = p->s->img_y; -; 4838 : if (comp) *comp = p->s->img_n; -; 4839 : return 1; -; 4840 : } -; 4841 : -; 4842 : static int stbi__png_info(stbi__context* s, int* x, int* y, int* comp) -; 4843 : { -; 4844 : stbi__png p; -; 4845 : p.s = s; -; 4846 : return stbi__png_info_raw(&p, x, y, comp); -; 4847 : } -; 4848 : -; 4849 : static int stbi__png_is16(stbi__context* s) -; 4850 : { -; 4851 : stbi__png p; -; 4852 : p.s = s; -; 4853 : if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) -; 4854 : return 0; -; 4855 : if (p.depth != 16) { -; 4856 : stbi__rewind(p.s); -; 4857 : return 0; -; 4858 : } -; 4859 : return 1; -; 4860 : } -; 4861 : #endif -; 4862 : -; 4863 : // Microsoft/Windows BMP image -; 4864 : -; 4865 : #ifndef STBI_NO_BMP -; 4866 : static int stbi__bmp_test_raw(stbi__context* s) -; 4867 : { -; 4868 : int r; -; 4869 : int sz; -; 4870 : if (stbi__get8(s) != 'B') return 0; -; 4871 : if (stbi__get8(s) != 'M') return 0; -; 4872 : stbi__get32le(s); // discard filesize -; 4873 : stbi__get16le(s); // discard reserved -; 4874 : stbi__get16le(s); // discard reserved -; 4875 : stbi__get32le(s); // discard data offset -; 4876 : sz = stbi__get32le(s); -; 4877 : r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); -; 4878 : return r; -; 4879 : } -; 4880 : -; 4881 : static int stbi__bmp_test(stbi__context* s) -; 4882 : { -; 4883 : int r = stbi__bmp_test_raw(s); -; 4884 : stbi__rewind(s); -; 4885 : return r; -; 4886 : } -; 4887 : -; 4888 : // returns 0..31 for the highest set bit -; 4889 : static int stbi__high_bit(unsigned int z) -; 4890 : { -; 4891 : int n = 0; -; 4892 : if (z == 0) return -1; -; 4893 : if (z >= 0x10000) { n += 16; z >>= 16; } -; 4894 : if (z >= 0x00100) { n += 8; z >>= 8; } -; 4895 : if (z >= 0x00010) { n += 4; z >>= 4; } -; 4896 : if (z >= 0x00004) { n += 2; z >>= 2; } -; 4897 : if (z >= 0x00002) { n += 1;/* >>= 1;*/ } -; 4898 : return n; -; 4899 : } -; 4900 : -; 4901 : static int stbi__bitcount(unsigned int a) -; 4902 : { -; 4903 : a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 -; 4904 : a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 -; 4905 : a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits -; 4906 : a = (a + (a >> 8)); // max 16 per 8 bits -; 4907 : a = (a + (a >> 16)); // max 32 per 8 bits -; 4908 : return a & 0xff; -; 4909 : } -; 4910 : -; 4911 : // extract an arbitrarily-aligned N-bit value (N=bits) -; 4912 : // from v, and then make it 8-bits long and fractionally -; 4913 : // extend it to full full range. -; 4914 : static int stbi__shiftsigned(unsigned int v, int shift, int bits) -; 4915 : { -; 4916 : static unsigned int mul_table[9] = { -; 4917 : 0, -; 4918 : 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, -; 4919 : 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, -; 4920 : }; -; 4921 : static unsigned int shift_table[9] = { -; 4922 : 0, 0,0,1,0,2,4,6,0, -; 4923 : }; -; 4924 : if (shift < 0) -; 4925 : v <<= -shift; -; 4926 : else -; 4927 : v >>= shift; -; 4928 : STBI_ASSERT(v < 256); -; 4929 : v >>= (8 - bits); -; 4930 : STBI_ASSERT(bits >= 0 && bits <= 8); -; 4931 : return (int)((unsigned)v * mul_table[bits]) >> shift_table[bits]; -; 4932 : } -; 4933 : -; 4934 : typedef struct -; 4935 : { -; 4936 : int bpp, offset, hsz; -; 4937 : unsigned int mr, mg, mb, ma, all_a; -; 4938 : int extra_read; -; 4939 : } stbi__bmp_data; -; 4940 : -; 4941 : static int stbi__bmp_set_mask_defaults(stbi__bmp_data* info, int compress) -; 4942 : { -; 4943 : // BI_BITFIELDS specifies masks explicitly, don't override -; 4944 : if (compress == 3) -; 4945 : return 1; -; 4946 : -; 4947 : if (compress == 0) { -; 4948 : if (info->bpp == 16) { -; 4949 : info->mr = 31u << 10; -; 4950 : info->mg = 31u << 5; -; 4951 : info->mb = 31u << 0; -; 4952 : } -; 4953 : else if (info->bpp == 32) { -; 4954 : info->mr = 0xffu << 16; -; 4955 : info->mg = 0xffu << 8; -; 4956 : info->mb = 0xffu << 0; -; 4957 : info->ma = 0xffu << 24; -; 4958 : info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 -; 4959 : } -; 4960 : else { -; 4961 : // otherwise, use defaults, which is all-0 -; 4962 : info->mr = info->mg = info->mb = info->ma = 0; -; 4963 : } -; 4964 : return 1; -; 4965 : } -; 4966 : return 0; // error -; 4967 : } -; 4968 : -; 4969 : static void* stbi__bmp_parse_header(stbi__context* s, stbi__bmp_data* info) -; 4970 : { -; 4971 : int hsz; -; 4972 : if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); -; 4973 : stbi__get32le(s); // discard filesize -; 4974 : stbi__get16le(s); // discard reserved -; 4975 : stbi__get16le(s); // discard reserved -; 4976 : info->offset = stbi__get32le(s); -; 4977 : info->hsz = hsz = stbi__get32le(s); -; 4978 : info->mr = info->mg = info->mb = info->ma = 0; -; 4979 : info->extra_read = 14; -; 4980 : -; 4981 : if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); -; 4982 : -; 4983 : if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); -; 4984 : if (hsz == 12) { -; 4985 : s->img_x = stbi__get16le(s); -; 4986 : s->img_y = stbi__get16le(s); -; 4987 : } -; 4988 : else { -; 4989 : s->img_x = stbi__get32le(s); -; 4990 : s->img_y = stbi__get32le(s); -; 4991 : } -; 4992 : if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); -; 4993 : info->bpp = stbi__get16le(s); -; 4994 : if (hsz != 12) { -; 4995 : int compress = stbi__get32le(s); -; 4996 : if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); -; 4997 : if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes -; 4998 : if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel -; 4999 : stbi__get32le(s); // discard sizeof -; 5000 : stbi__get32le(s); // discard hres -; 5001 : stbi__get32le(s); // discard vres -; 5002 : stbi__get32le(s); // discard colorsused -; 5003 : stbi__get32le(s); // discard max important -; 5004 : if (hsz == 40 || hsz == 56) { -; 5005 : if (hsz == 56) { -; 5006 : stbi__get32le(s); -; 5007 : stbi__get32le(s); -; 5008 : stbi__get32le(s); -; 5009 : stbi__get32le(s); -; 5010 : } -; 5011 : if (info->bpp == 16 || info->bpp == 32) { -; 5012 : if (compress == 0) { -; 5013 : stbi__bmp_set_mask_defaults(info, compress); -; 5014 : } -; 5015 : else if (compress == 3) { -; 5016 : info->mr = stbi__get32le(s); -; 5017 : info->mg = stbi__get32le(s); -; 5018 : info->mb = stbi__get32le(s); -; 5019 : info->extra_read += 12; -; 5020 : // not documented, but generated by photoshop and handled by mspaint -; 5021 : if (info->mr == info->mg && info->mg == info->mb) { -; 5022 : // ?!?!? -; 5023 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5024 : } -; 5025 : } -; 5026 : else -; 5027 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5028 : } -; 5029 : } -; 5030 : else { -; 5031 : // V4/V5 header -; 5032 : int i; -; 5033 : if (hsz != 108 && hsz != 124) -; 5034 : return stbi__errpuc("bad BMP", "bad BMP"); -; 5035 : info->mr = stbi__get32le(s); -; 5036 : info->mg = stbi__get32le(s); -; 5037 : info->mb = stbi__get32le(s); -; 5038 : info->ma = stbi__get32le(s); -; 5039 : if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs -; 5040 : stbi__bmp_set_mask_defaults(info, compress); -; 5041 : stbi__get32le(s); // discard color space -; 5042 : for (i = 0; i < 12; ++i) -; 5043 : stbi__get32le(s); // discard color space parameters -; 5044 : if (hsz == 124) { -; 5045 : stbi__get32le(s); // discard rendering intent -; 5046 : stbi__get32le(s); // discard offset of profile data -; 5047 : stbi__get32le(s); // discard size of profile data -; 5048 : stbi__get32le(s); // discard reserved -; 5049 : } -; 5050 : } -; 5051 : } -; 5052 : return (void*)1; -; 5053 : } -; 5054 : -; 5055 : static void* stbi__bmp_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5056 : { -; 5057 : stbi_uc* out; -; 5058 : unsigned int mr = 0, mg = 0, mb = 0, ma = 0, all_a; -; 5059 : stbi_uc pal[256][4]; -; 5060 : int psize = 0, i, j, width; -; 5061 : int flip_vertically, pad, target; -; 5062 : stbi__bmp_data info; -; 5063 : STBI_NOTUSED(ri); -; 5064 : -; 5065 : info.all_a = 255; -; 5066 : if (stbi__bmp_parse_header(s, &info) == NULL) -; 5067 : return NULL; // error code already set -; 5068 : -; 5069 : flip_vertically = ((int)s->img_y) > 0; -; 5070 : s->img_y = abs((int)s->img_y); -; 5071 : -; 5072 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5073 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5074 : -; 5075 : mr = info.mr; -; 5076 : mg = info.mg; -; 5077 : mb = info.mb; -; 5078 : ma = info.ma; -; 5079 : all_a = info.all_a; -; 5080 : -; 5081 : if (info.hsz == 12) { -; 5082 : if (info.bpp < 24) -; 5083 : psize = (info.offset - info.extra_read - 24) / 3; -; 5084 : } -; 5085 : else { -; 5086 : if (info.bpp < 16) -; 5087 : psize = (info.offset - info.extra_read - info.hsz) >> 2; -; 5088 : } -; 5089 : if (psize == 0) { -; 5090 : // accept some number of extra bytes after the header, but if the offset points either to before -; 5091 : // the header ends or implies a large amount of extra data, reject the file as malformed -; 5092 : int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); -; 5093 : int header_limit = 1024; // max we actually read is below 256 bytes currently. -; 5094 : int extra_data_limit = 256 * 4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. -; 5095 : if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { -; 5096 : return stbi__errpuc("bad header", "Corrupt BMP"); -; 5097 : } -; 5098 : // we established that bytes_read_so_far is positive and sensible. -; 5099 : // the first half of this test rejects offsets that are either too small positives, or -; 5100 : // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn -; 5101 : // ensures the number computed in the second half of the test can't overflow. -; 5102 : if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { -; 5103 : return stbi__errpuc("bad offset", "Corrupt BMP"); -; 5104 : } -; 5105 : else { -; 5106 : stbi__skip(s, info.offset - bytes_read_so_far); -; 5107 : } -; 5108 : } -; 5109 : -; 5110 : if (info.bpp == 24 && ma == 0xff000000) -; 5111 : s->img_n = 3; -; 5112 : else -; 5113 : s->img_n = ma ? 4 : 3; -; 5114 : if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 -; 5115 : target = req_comp; -; 5116 : else -; 5117 : target = s->img_n; // if they want monochrome, we'll post-convert -; 5118 : -; 5119 : // sanity-check size -; 5120 : if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) -; 5121 : return stbi__errpuc("too large", "Corrupt BMP"); -; 5122 : -; 5123 : out = (stbi_uc*)stbi__malloc_mad3(target, s->img_x, s->img_y, 0); -; 5124 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5125 : if (info.bpp < 16) { -; 5126 : int z = 0; -; 5127 : if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } -; 5128 : for (i = 0; i < psize; ++i) { -; 5129 : pal[i][2] = stbi__get8(s); -; 5130 : pal[i][1] = stbi__get8(s); -; 5131 : pal[i][0] = stbi__get8(s); -; 5132 : if (info.hsz != 12) stbi__get8(s); -; 5133 : pal[i][3] = 255; -; 5134 : } -; 5135 : stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); -; 5136 : if (info.bpp == 1) width = (s->img_x + 7) >> 3; -; 5137 : else if (info.bpp == 4) width = (s->img_x + 1) >> 1; -; 5138 : else if (info.bpp == 8) width = s->img_x; -; 5139 : else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } -; 5140 : pad = (-width) & 3; -; 5141 : if (info.bpp == 1) { -; 5142 : for (j = 0; j < (int)s->img_y; ++j) { -; 5143 : int bit_offset = 7, v = stbi__get8(s); -; 5144 : for (i = 0; i < (int)s->img_x; ++i) { -; 5145 : int color = (v >> bit_offset) & 0x1; -; 5146 : out[z++] = pal[color][0]; -; 5147 : out[z++] = pal[color][1]; -; 5148 : out[z++] = pal[color][2]; -; 5149 : if (target == 4) out[z++] = 255; -; 5150 : if (i + 1 == (int)s->img_x) break; -; 5151 : if ((--bit_offset) < 0) { -; 5152 : bit_offset = 7; -; 5153 : v = stbi__get8(s); -; 5154 : } -; 5155 : } -; 5156 : stbi__skip(s, pad); -; 5157 : } -; 5158 : } -; 5159 : else { -; 5160 : for (j = 0; j < (int)s->img_y; ++j) { -; 5161 : for (i = 0; i < (int)s->img_x; i += 2) { -; 5162 : int v = stbi__get8(s), v2 = 0; -; 5163 : if (info.bpp == 4) { -; 5164 : v2 = v & 15; -; 5165 : v >>= 4; -; 5166 : } -; 5167 : out[z++] = pal[v][0]; -; 5168 : out[z++] = pal[v][1]; -; 5169 : out[z++] = pal[v][2]; -; 5170 : if (target == 4) out[z++] = 255; -; 5171 : if (i + 1 == (int)s->img_x) break; -; 5172 : v = (info.bpp == 8) ? stbi__get8(s) : v2; -; 5173 : out[z++] = pal[v][0]; -; 5174 : out[z++] = pal[v][1]; -; 5175 : out[z++] = pal[v][2]; -; 5176 : if (target == 4) out[z++] = 255; -; 5177 : } -; 5178 : stbi__skip(s, pad); -; 5179 : } -; 5180 : } -; 5181 : } -; 5182 : else { -; 5183 : int rshift = 0, gshift = 0, bshift = 0, ashift = 0, rcount = 0, gcount = 0, bcount = 0, acount = 0; -; 5184 : int z = 0; -; 5185 : int easy = 0; -; 5186 : stbi__skip(s, info.offset - info.extra_read - info.hsz); -; 5187 : if (info.bpp == 24) width = 3 * s->img_x; -; 5188 : else if (info.bpp == 16) width = 2 * s->img_x; -; 5189 : else /* bpp = 32 and pad = 0 */ width = 0; -; 5190 : pad = (-width) & 3; -; 5191 : if (info.bpp == 24) { -; 5192 : easy = 1; -; 5193 : } -; 5194 : else if (info.bpp == 32) { -; 5195 : if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) -; 5196 : easy = 2; -; 5197 : } -; 5198 : if (!easy) { -; 5199 : if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5200 : // right shift amt to put high bit in position #7 -; 5201 : rshift = stbi__high_bit(mr) - 7; rcount = stbi__bitcount(mr); -; 5202 : gshift = stbi__high_bit(mg) - 7; gcount = stbi__bitcount(mg); -; 5203 : bshift = stbi__high_bit(mb) - 7; bcount = stbi__bitcount(mb); -; 5204 : ashift = stbi__high_bit(ma) - 7; acount = stbi__bitcount(ma); -; 5205 : if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } -; 5206 : } -; 5207 : for (j = 0; j < (int)s->img_y; ++j) { -; 5208 : if (easy) { -; 5209 : for (i = 0; i < (int)s->img_x; ++i) { -; 5210 : unsigned char a; -; 5211 : out[z + 2] = stbi__get8(s); -; 5212 : out[z + 1] = stbi__get8(s); -; 5213 : out[z + 0] = stbi__get8(s); -; 5214 : z += 3; -; 5215 : a = (easy == 2 ? stbi__get8(s) : 255); -; 5216 : all_a |= a; -; 5217 : if (target == 4) out[z++] = a; -; 5218 : } -; 5219 : } -; 5220 : else { -; 5221 : int bpp = info.bpp; -; 5222 : for (i = 0; i < (int)s->img_x; ++i) { -; 5223 : stbi__uint32 v = (bpp == 16 ? (stbi__uint32)stbi__get16le(s) : stbi__get32le(s)); -; 5224 : unsigned int a; -; 5225 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); -; 5226 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); -; 5227 : out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); -; 5228 : a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); -; 5229 : all_a |= a; -; 5230 : if (target == 4) out[z++] = STBI__BYTECAST(a); -; 5231 : } -; 5232 : } -; 5233 : stbi__skip(s, pad); -; 5234 : } -; 5235 : } -; 5236 : -; 5237 : // if alpha channel is all 0s, replace with all 255s -; 5238 : if (target == 4 && all_a == 0) -; 5239 : for (i = 4 * s->img_x * s->img_y - 1; i >= 0; i -= 4) -; 5240 : out[i] = 255; -; 5241 : -; 5242 : if (flip_vertically) { -; 5243 : stbi_uc t; -; 5244 : for (j = 0; j < (int)s->img_y >> 1; ++j) { -; 5245 : stbi_uc* p1 = out + j * s->img_x * target; -; 5246 : stbi_uc* p2 = out + (s->img_y - 1 - j) * s->img_x * target; -; 5247 : for (i = 0; i < (int)s->img_x * target; ++i) { -; 5248 : t = p1[i]; p1[i] = p2[i]; p2[i] = t; -; 5249 : } -; 5250 : } -; 5251 : } -; 5252 : -; 5253 : if (req_comp && req_comp != target) { -; 5254 : out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); -; 5255 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5256 : } -; 5257 : -; 5258 : *x = s->img_x; -; 5259 : *y = s->img_y; -; 5260 : if (comp) *comp = s->img_n; -; 5261 : return out; -; 5262 : } -; 5263 : #endif -; 5264 : -; 5265 : // Targa Truevision - TGA -; 5266 : // by Jonathan Dummer -; 5267 : #ifndef STBI_NO_TGA -; 5268 : // returns STBI_rgb or whatever, 0 on error -; 5269 : static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -; 5270 : { -; 5271 : // only RGB or RGBA (incl. 16bit) or grey allowed -; 5272 : if (is_rgb16) *is_rgb16 = 0; -; 5273 : switch (bits_per_pixel) { -; 5274 : case 8: return STBI_grey; -; 5275 : case 16: if (is_grey) return STBI_grey_alpha; -; 5276 : // fallthrough -; 5277 : case 15: if (is_rgb16) *is_rgb16 = 1; -; 5278 : return STBI_rgb; -; 5279 : case 24: // fallthrough -; 5280 : case 32: return bits_per_pixel / 8; -; 5281 : default: return 0; -; 5282 : } -; 5283 : } -; 5284 : -; 5285 : static int stbi__tga_info(stbi__context* s, int* x, int* y, int* comp) -; 5286 : { -; 5287 : int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; -; 5288 : int sz, tga_colormap_type; -; 5289 : stbi__get8(s); // discard Offset -; 5290 : tga_colormap_type = stbi__get8(s); // colormap type -; 5291 : if (tga_colormap_type > 1) { -; 5292 : stbi__rewind(s); -; 5293 : return 0; // only RGB or indexed allowed -; 5294 : } -; 5295 : tga_image_type = stbi__get8(s); // image type -; 5296 : if (tga_colormap_type == 1) { // colormapped (paletted) image -; 5297 : if (tga_image_type != 1 && tga_image_type != 9) { -; 5298 : stbi__rewind(s); -; 5299 : return 0; -; 5300 : } -; 5301 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5302 : sz = stbi__get8(s); // check bits per palette color entry -; 5303 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) { -; 5304 : stbi__rewind(s); -; 5305 : return 0; -; 5306 : } -; 5307 : stbi__skip(s, 4); // skip image x and y origin -; 5308 : tga_colormap_bpp = sz; -; 5309 : } -; 5310 : else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE -; 5311 : if ((tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11)) { -; 5312 : stbi__rewind(s); -; 5313 : return 0; // only RGB or grey allowed, +/- RLE -; 5314 : } -; 5315 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5316 : tga_colormap_bpp = 0; -; 5317 : } -; 5318 : tga_w = stbi__get16le(s); -; 5319 : if (tga_w < 1) { -; 5320 : stbi__rewind(s); -; 5321 : return 0; // test width -; 5322 : } -; 5323 : tga_h = stbi__get16le(s); -; 5324 : if (tga_h < 1) { -; 5325 : stbi__rewind(s); -; 5326 : return 0; // test height -; 5327 : } -; 5328 : tga_bits_per_pixel = stbi__get8(s); // bits per pixel -; 5329 : stbi__get8(s); // ignore alpha bits -; 5330 : if (tga_colormap_bpp != 0) { -; 5331 : if ((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { -; 5332 : // when using a colormap, tga_bits_per_pixel is the size of the indexes -; 5333 : // I don't think anything but 8 or 16bit indexes makes sense -; 5334 : stbi__rewind(s); -; 5335 : return 0; -; 5336 : } -; 5337 : tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); -; 5338 : } -; 5339 : else { -; 5340 : tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); -; 5341 : } -; 5342 : if (!tga_comp) { -; 5343 : stbi__rewind(s); -; 5344 : return 0; -; 5345 : } -; 5346 : if (x) *x = tga_w; -; 5347 : if (y) *y = tga_h; -; 5348 : if (comp) *comp = tga_comp; -; 5349 : return 1; // seems to have passed everything -; 5350 : } -; 5351 : -; 5352 : static int stbi__tga_test(stbi__context* s) -; 5353 : { -; 5354 : int res = 0; -; 5355 : int sz, tga_color_type; -; 5356 : stbi__get8(s); // discard Offset -; 5357 : tga_color_type = stbi__get8(s); // color type -; 5358 : if (tga_color_type > 1) goto errorEnd; // only RGB or indexed allowed -; 5359 : sz = stbi__get8(s); // image type -; 5360 : if (tga_color_type == 1) { // colormapped (paletted) image -; 5361 : if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 -; 5362 : stbi__skip(s, 4); // skip index of first colormap entry and number of entries -; 5363 : sz = stbi__get8(s); // check bits per palette color entry -; 5364 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5365 : stbi__skip(s, 4); // skip image x and y origin -; 5366 : } -; 5367 : else { // "normal" image w/o colormap -; 5368 : if ((sz != 2) && (sz != 3) && (sz != 10) && (sz != 11)) goto errorEnd; // only RGB or grey allowed, +/- RLE -; 5369 : stbi__skip(s, 9); // skip colormap specification and image x/y origin -; 5370 : } -; 5371 : if (stbi__get16le(s) < 1) goto errorEnd; // test width -; 5372 : if (stbi__get16le(s) < 1) goto errorEnd; // test height -; 5373 : sz = stbi__get8(s); // bits per pixel -; 5374 : if ((tga_color_type == 1) && (sz != 8) && (sz != 16)) goto errorEnd; // for colormapped images, bpp is size of an index -; 5375 : if ((sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32)) goto errorEnd; -; 5376 : -; 5377 : res = 1; // if we got this far, everything's good and we can return 1 instead of 0 -; 5378 : -; 5379 : errorEnd: -; 5380 : stbi__rewind(s); -; 5381 : return res; -; 5382 : } -; 5383 : -; 5384 : // read 16bit value and convert to 24bit RGB -; 5385 : static void stbi__tga_read_rgb16(stbi__context* s, stbi_uc* out) -; 5386 : { -; 5387 : stbi__uint16 px = (stbi__uint16)stbi__get16le(s); -; 5388 : stbi__uint16 fiveBitMask = 31; -; 5389 : // we have 3 channels with 5bits each -; 5390 : int r = (px >> 10) & fiveBitMask; -; 5391 : int g = (px >> 5) & fiveBitMask; -; 5392 : int b = px & fiveBitMask; -; 5393 : // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later -; 5394 : out[0] = (stbi_uc)((r * 255) / 31); -; 5395 : out[1] = (stbi_uc)((g * 255) / 31); -; 5396 : out[2] = (stbi_uc)((b * 255) / 31); -; 5397 : -; 5398 : // some people claim that the most significant bit might be used for alpha -; 5399 : // (possibly if an alpha-bit is set in the "image descriptor byte") -; 5400 : // but that only made 16bit test images completely translucent.. -; 5401 : // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -; 5402 : } -; 5403 : -; 5404 : static void* stbi__tga_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 5405 : { -; 5406 : // read in the TGA header stuff -; 5407 : int tga_offset = stbi__get8(s); -; 5408 : int tga_indexed = stbi__get8(s); -; 5409 : int tga_image_type = stbi__get8(s); -; 5410 : int tga_is_RLE = 0; -; 5411 : int tga_palette_start = stbi__get16le(s); -; 5412 : int tga_palette_len = stbi__get16le(s); -; 5413 : int tga_palette_bits = stbi__get8(s); -; 5414 : int tga_x_origin = stbi__get16le(s); -; 5415 : int tga_y_origin = stbi__get16le(s); -; 5416 : int tga_width = stbi__get16le(s); -; 5417 : int tga_height = stbi__get16le(s); -; 5418 : int tga_bits_per_pixel = stbi__get8(s); -; 5419 : int tga_comp, tga_rgb16 = 0; -; 5420 : int tga_inverted = stbi__get8(s); -; 5421 : // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) -; 5422 : // image data -; 5423 : unsigned char* tga_data; -; 5424 : unsigned char* tga_palette = NULL; -; 5425 : int i, j; -; 5426 : unsigned char raw_data[4] = { 0 }; -; 5427 : int RLE_count = 0; -; 5428 : int RLE_repeating = 0; -; 5429 : int read_next_pixel = 1; -; 5430 : STBI_NOTUSED(ri); -; 5431 : STBI_NOTUSED(tga_x_origin); // @TODO -; 5432 : STBI_NOTUSED(tga_y_origin); // @TODO -; 5433 : -; 5434 : if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5435 : if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5436 : -; 5437 : // do a tiny bit of precessing -; 5438 : if (tga_image_type >= 8) -; 5439 : { -; 5440 : tga_image_type -= 8; -; 5441 : tga_is_RLE = 1; -; 5442 : } -; 5443 : tga_inverted = 1 - ((tga_inverted >> 5) & 1); -; 5444 : -; 5445 : // If I'm paletted, then I'll use the number of bits from the palette -; 5446 : if (tga_indexed) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); -; 5447 : else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); -; 5448 : -; 5449 : if (!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency -; 5450 : return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); -; 5451 : -; 5452 : // tga info -; 5453 : *x = tga_width; -; 5454 : *y = tga_height; -; 5455 : if (comp) *comp = tga_comp; -; 5456 : -; 5457 : if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) -; 5458 : return stbi__errpuc("too large", "Corrupt TGA"); -; 5459 : -; 5460 : tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); -; 5461 : if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); -; 5462 : -; 5463 : // skip to the data's starting position (offset usually = 0) -; 5464 : stbi__skip(s, tga_offset); -; 5465 : -; 5466 : if (!tga_indexed && !tga_is_RLE && !tga_rgb16) { -; 5467 : for (i = 0; i < tga_height; ++i) { -; 5468 : int row = tga_inverted ? tga_height - i - 1 : i; -; 5469 : stbi_uc* tga_row = tga_data + row * tga_width * tga_comp; -; 5470 : stbi__getn(s, tga_row, tga_width * tga_comp); -; 5471 : } -; 5472 : } -; 5473 : else { -; 5474 : // do I need to load a palette? -; 5475 : if (tga_indexed) -; 5476 : { -; 5477 : if (tga_palette_len == 0) { /* you have to have at least one entry! */ -; 5478 : STBI_FREE(tga_data); -; 5479 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5480 : } -; 5481 : -; 5482 : // any data to skip? (offset usually = 0) -; 5483 : stbi__skip(s, tga_palette_start); -; 5484 : // load the palette -; 5485 : tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); -; 5486 : if (!tga_palette) { -; 5487 : STBI_FREE(tga_data); -; 5488 : return stbi__errpuc("outofmem", "Out of memory"); -; 5489 : } -; 5490 : if (tga_rgb16) { -; 5491 : stbi_uc* pal_entry = tga_palette; -; 5492 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5493 : for (i = 0; i < tga_palette_len; ++i) { -; 5494 : stbi__tga_read_rgb16(s, pal_entry); -; 5495 : pal_entry += tga_comp; -; 5496 : } -; 5497 : } -; 5498 : else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { -; 5499 : STBI_FREE(tga_data); -; 5500 : STBI_FREE(tga_palette); -; 5501 : return stbi__errpuc("bad palette", "Corrupt TGA"); -; 5502 : } -; 5503 : } -; 5504 : // load the data -; 5505 : for (i = 0; i < tga_width * tga_height; ++i) -; 5506 : { -; 5507 : // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? -; 5508 : if (tga_is_RLE) -; 5509 : { -; 5510 : if (RLE_count == 0) -; 5511 : { -; 5512 : // yep, get the next byte as a RLE command -; 5513 : int RLE_cmd = stbi__get8(s); -; 5514 : RLE_count = 1 + (RLE_cmd & 127); -; 5515 : RLE_repeating = RLE_cmd >> 7; -; 5516 : read_next_pixel = 1; -; 5517 : } -; 5518 : else if (!RLE_repeating) -; 5519 : { -; 5520 : read_next_pixel = 1; -; 5521 : } -; 5522 : } -; 5523 : else -; 5524 : { -; 5525 : read_next_pixel = 1; -; 5526 : } -; 5527 : // OK, if I need to read a pixel, do it now -; 5528 : if (read_next_pixel) -; 5529 : { -; 5530 : // load however much data we did have -; 5531 : if (tga_indexed) -; 5532 : { -; 5533 : // read in index, then perform the lookup -; 5534 : int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); -; 5535 : if (pal_idx >= tga_palette_len) { -; 5536 : // invalid index -; 5537 : pal_idx = 0; -; 5538 : } -; 5539 : pal_idx *= tga_comp; -; 5540 : for (j = 0; j < tga_comp; ++j) { -; 5541 : raw_data[j] = tga_palette[pal_idx + j]; -; 5542 : } -; 5543 : } -; 5544 : else if (tga_rgb16) { -; 5545 : STBI_ASSERT(tga_comp == STBI_rgb); -; 5546 : stbi__tga_read_rgb16(s, raw_data); -; 5547 : } -; 5548 : else { -; 5549 : // read in the data raw -; 5550 : for (j = 0; j < tga_comp; ++j) { -; 5551 : raw_data[j] = stbi__get8(s); -; 5552 : } -; 5553 : } -; 5554 : // clear the reading flag for the next pixel -; 5555 : read_next_pixel = 0; -; 5556 : } // end of reading a pixel -; 5557 : -; 5558 : // copy data -; 5559 : for (j = 0; j < tga_comp; ++j) -; 5560 : tga_data[i * tga_comp + j] = raw_data[j]; -; 5561 : -; 5562 : // in case we're in RLE mode, keep counting down -; 5563 : --RLE_count; -; 5564 : } -; 5565 : // do I need to invert the image? -; 5566 : if (tga_inverted) -; 5567 : { -; 5568 : for (j = 0; j * 2 < tga_height; ++j) -; 5569 : { -; 5570 : int index1 = j * tga_width * tga_comp; -; 5571 : int index2 = (tga_height - 1 - j) * tga_width * tga_comp; -; 5572 : for (i = tga_width * tga_comp; i > 0; --i) -; 5573 : { -; 5574 : unsigned char temp = tga_data[index1]; -; 5575 : tga_data[index1] = tga_data[index2]; -; 5576 : tga_data[index2] = temp; -; 5577 : ++index1; -; 5578 : ++index2; -; 5579 : } -; 5580 : } -; 5581 : } -; 5582 : // clear my palette, if I had one -; 5583 : if (tga_palette != NULL) -; 5584 : { -; 5585 : STBI_FREE(tga_palette); -; 5586 : } -; 5587 : } -; 5588 : -; 5589 : // swap RGB - if the source data was RGB16, it already is in the right order -; 5590 : if (tga_comp >= 3 && !tga_rgb16) -; 5591 : { -; 5592 : unsigned char* tga_pixel = tga_data; -; 5593 : for (i = 0; i < tga_width * tga_height; ++i) -; 5594 : { -; 5595 : unsigned char temp = tga_pixel[0]; -; 5596 : tga_pixel[0] = tga_pixel[2]; -; 5597 : tga_pixel[2] = temp; -; 5598 : tga_pixel += tga_comp; -; 5599 : } -; 5600 : } -; 5601 : -; 5602 : // convert to target component count -; 5603 : if (req_comp && req_comp != tga_comp) -; 5604 : tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); -; 5605 : -; 5606 : // the things I do to get rid of an error message, and yet keep -; 5607 : // Microsoft's C compilers happy... [8^( -; 5608 : tga_palette_start = tga_palette_len = tga_palette_bits = -; 5609 : tga_x_origin = tga_y_origin = 0; -; 5610 : STBI_NOTUSED(tga_palette_start); -; 5611 : // OK, done -; 5612 : return tga_data; -; 5613 : } -; 5614 : #endif -; 5615 : -; 5616 : // ************************************************************************************************* -; 5617 : // Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB -; 5618 : -; 5619 : #ifndef STBI_NO_PSD -; 5620 : static int stbi__psd_test(stbi__context* s) -; 5621 : { -; 5622 : int r = (stbi__get32be(s) == 0x38425053); -; 5623 : stbi__rewind(s); -; 5624 : return r; -; 5625 : } -; 5626 : -; 5627 : static int stbi__psd_decode_rle(stbi__context* s, stbi_uc* p, int pixelCount) -; 5628 : { -; 5629 : int count, nleft, len; -; 5630 : -; 5631 : count = 0; -; 5632 : while ((nleft = pixelCount - count) > 0) { -; 5633 : len = stbi__get8(s); -; 5634 : if (len == 128) { -; 5635 : // No-op. -; 5636 : } -; 5637 : else if (len < 128) { -; 5638 : // Copy next len+1 bytes literally. -; 5639 : len++; -; 5640 : if (len > nleft) return 0; // corrupt data -; 5641 : count += len; -; 5642 : while (len) { -; 5643 : *p = stbi__get8(s); -; 5644 : p += 4; -; 5645 : len--; -; 5646 : } -; 5647 : } -; 5648 : else if (len > 128) { -; 5649 : stbi_uc val; -; 5650 : // Next -len+1 bytes in the dest are replicated from next source byte. -; 5651 : // (Interpret len as a negative 8-bit int.) -; 5652 : len = 257 - len; -; 5653 : if (len > nleft) return 0; // corrupt data -; 5654 : val = stbi__get8(s); -; 5655 : count += len; -; 5656 : while (len) { -; 5657 : *p = val; -; 5658 : p += 4; -; 5659 : len--; -; 5660 : } -; 5661 : } -; 5662 : } -; 5663 : -; 5664 : return 1; -; 5665 : } -; 5666 : -; 5667 : static void* stbi__psd_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri, int bpc) -; 5668 : { -; 5669 : int pixelCount; -; 5670 : int channelCount, compression; -; 5671 : int channel, i; -; 5672 : int bitdepth; -; 5673 : int w, h; -; 5674 : stbi_uc* out; -; 5675 : STBI_NOTUSED(ri); -; 5676 : -; 5677 : // Check identifier -; 5678 : if (stbi__get32be(s) != 0x38425053) // "8BPS" -; 5679 : return stbi__errpuc("not PSD", "Corrupt PSD image"); -; 5680 : -; 5681 : // Check file type version. -; 5682 : if (stbi__get16be(s) != 1) -; 5683 : return stbi__errpuc("wrong version", "Unsupported version of PSD image"); -; 5684 : -; 5685 : // Skip 6 reserved bytes. -; 5686 : stbi__skip(s, 6); -; 5687 : -; 5688 : // Read the number of channels (R, G, B, A, etc). -; 5689 : channelCount = stbi__get16be(s); -; 5690 : if (channelCount < 0 || channelCount > 16) -; 5691 : return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); -; 5692 : -; 5693 : // Read the rows and columns of the image. -; 5694 : h = stbi__get32be(s); -; 5695 : w = stbi__get32be(s); -; 5696 : -; 5697 : if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5698 : if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 5699 : -; 5700 : // Make sure the depth is 8 bits. -; 5701 : bitdepth = stbi__get16be(s); -; 5702 : if (bitdepth != 8 && bitdepth != 16) -; 5703 : return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); -; 5704 : -; 5705 : // Make sure the color mode is RGB. -; 5706 : // Valid options are: -; 5707 : // 0: Bitmap -; 5708 : // 1: Grayscale -; 5709 : // 2: Indexed color -; 5710 : // 3: RGB color -; 5711 : // 4: CMYK color -; 5712 : // 7: Multichannel -; 5713 : // 8: Duotone -; 5714 : // 9: Lab color -; 5715 : if (stbi__get16be(s) != 3) -; 5716 : return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); -; 5717 : -; 5718 : // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) -; 5719 : stbi__skip(s, stbi__get32be(s)); -; 5720 : -; 5721 : // Skip the image resources. (resolution, pen tool paths, etc) -; 5722 : stbi__skip(s, stbi__get32be(s)); -; 5723 : -; 5724 : // Skip the reserved data. -; 5725 : stbi__skip(s, stbi__get32be(s)); -; 5726 : -; 5727 : // Find out if the data is compressed. -; 5728 : // Known values: -; 5729 : // 0: no compression -; 5730 : // 1: RLE compressed -; 5731 : compression = stbi__get16be(s); -; 5732 : if (compression > 1) -; 5733 : return stbi__errpuc("bad compression", "PSD has an unknown compression format"); -; 5734 : -; 5735 : // Check size -; 5736 : if (!stbi__mad3sizes_valid(4, w, h, 0)) -; 5737 : return stbi__errpuc("too large", "Corrupt PSD"); -; 5738 : -; 5739 : // Create the destination image. -; 5740 : -; 5741 : if (!compression && bitdepth == 16 && bpc == 16) { -; 5742 : out = (stbi_uc*)stbi__malloc_mad3(8, w, h, 0); -; 5743 : ri->bits_per_channel = 16; -; 5744 : } -; 5745 : else -; 5746 : out = (stbi_uc*)stbi__malloc(4 * w * h); -; 5747 : -; 5748 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); -; 5749 : pixelCount = w * h; -; 5750 : -; 5751 : // Initialize the data to zero. -; 5752 : //memset( out, 0, pixelCount * 4 ); -; 5753 : -; 5754 : // Finally, the image data. -; 5755 : if (compression) { -; 5756 : // RLE as used by .PSD and .TIFF -; 5757 : // Loop until you get the number of unpacked bytes you are expecting: -; 5758 : // Read the next source byte into n. -; 5759 : // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. -; 5760 : // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. -; 5761 : // Else if n is 128, noop. -; 5762 : // Endloop -; 5763 : -; 5764 : // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, -; 5765 : // which we're going to just skip. -; 5766 : stbi__skip(s, h * channelCount * 2); -; 5767 : -; 5768 : // Read the RLE data by channel. -; 5769 : for (channel = 0; channel < 4; channel++) { -; 5770 : stbi_uc* p; -; 5771 : -; 5772 : p = out + channel; -; 5773 : if (channel >= channelCount) { -; 5774 : // Fill this channel with default data. -; 5775 : for (i = 0; i < pixelCount; i++, p += 4) -; 5776 : *p = (channel == 3 ? 255 : 0); -; 5777 : } -; 5778 : else { -; 5779 : // Read the RLE data. -; 5780 : if (!stbi__psd_decode_rle(s, p, pixelCount)) { -; 5781 : STBI_FREE(out); -; 5782 : return stbi__errpuc("corrupt", "bad RLE data"); -; 5783 : } -; 5784 : } -; 5785 : } -; 5786 : } -; 5787 : else { -; 5788 : // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) -; 5789 : // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. -; 5790 : -; 5791 : // Read the data by channel. -; 5792 : for (channel = 0; channel < 4; channel++) { -; 5793 : if (channel >= channelCount) { -; 5794 : // Fill this channel with default data. -; 5795 : if (bitdepth == 16 && bpc == 16) { -; 5796 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5797 : stbi__uint16 val = channel == 3 ? 65535 : 0; -; 5798 : for (i = 0; i < pixelCount; i++, q += 4) -; 5799 : *q = val; -; 5800 : } -; 5801 : else { -; 5802 : stbi_uc* p = out + channel; -; 5803 : stbi_uc val = channel == 3 ? 255 : 0; -; 5804 : for (i = 0; i < pixelCount; i++, p += 4) -; 5805 : *p = val; -; 5806 : } -; 5807 : } -; 5808 : else { -; 5809 : if (ri->bits_per_channel == 16) { // output bpc -; 5810 : stbi__uint16* q = ((stbi__uint16*)out) + channel; -; 5811 : for (i = 0; i < pixelCount; i++, q += 4) -; 5812 : *q = (stbi__uint16)stbi__get16be(s); -; 5813 : } -; 5814 : else { -; 5815 : stbi_uc* p = out + channel; -; 5816 : if (bitdepth == 16) { // input bpc -; 5817 : for (i = 0; i < pixelCount; i++, p += 4) -; 5818 : *p = (stbi_uc)(stbi__get16be(s) >> 8); -; 5819 : } -; 5820 : else { -; 5821 : for (i = 0; i < pixelCount; i++, p += 4) -; 5822 : *p = stbi__get8(s); -; 5823 : } -; 5824 : } -; 5825 : } -; 5826 : } -; 5827 : } -; 5828 : -; 5829 : // remove weird white matte from PSD -; 5830 : if (channelCount >= 4) { -; 5831 : if (ri->bits_per_channel == 16) { -; 5832 : for (i = 0; i < w * h; ++i) { -; 5833 : stbi__uint16* pixel = (stbi__uint16*)out + 4 * i; -; 5834 : if (pixel[3] != 0 && pixel[3] != 65535) { -; 5835 : float a = pixel[3] / 65535.0f; -; 5836 : float ra = 1.0f / a; -; 5837 : float inv_a = 65535.0f * (1 - ra); -; 5838 : pixel[0] = (stbi__uint16)(pixel[0] * ra + inv_a); -; 5839 : pixel[1] = (stbi__uint16)(pixel[1] * ra + inv_a); -; 5840 : pixel[2] = (stbi__uint16)(pixel[2] * ra + inv_a); -; 5841 : } -; 5842 : } -; 5843 : } -; 5844 : else { -; 5845 : for (i = 0; i < w * h; ++i) { -; 5846 : unsigned char* pixel = out + 4 * i; -; 5847 : if (pixel[3] != 0 && pixel[3] != 255) { -; 5848 : float a = pixel[3] / 255.0f; -; 5849 : float ra = 1.0f / a; -; 5850 : float inv_a = 255.0f * (1 - ra); -; 5851 : pixel[0] = (unsigned char)(pixel[0] * ra + inv_a); -; 5852 : pixel[1] = (unsigned char)(pixel[1] * ra + inv_a); -; 5853 : pixel[2] = (unsigned char)(pixel[2] * ra + inv_a); -; 5854 : } -; 5855 : } -; 5856 : } -; 5857 : } -; 5858 : -; 5859 : // convert to desired output format -; 5860 : if (req_comp && req_comp != 4) { -; 5861 : if (ri->bits_per_channel == 16) -; 5862 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, 4, req_comp, w, h); -; 5863 : else -; 5864 : out = stbi__convert_format(out, 4, req_comp, w, h); -; 5865 : if (out == NULL) return out; // stbi__convert_format frees input on failure -; 5866 : } -; 5867 : -; 5868 : if (comp) *comp = 4; -; 5869 : *y = h; -; 5870 : *x = w; -; 5871 : -; 5872 : return out; -; 5873 : } -; 5874 : #endif -; 5875 : -; 5876 : // ************************************************************************************************* -; 5877 : // Softimage PIC loader -; 5878 : // by Tom Seddon -; 5879 : // -; 5880 : // See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -; 5881 : // See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ -; 5882 : -; 5883 : #ifndef STBI_NO_PIC -; 5884 : static int stbi__pic_is4(stbi__context* s, const char* str) -; 5885 : { -; 5886 : int i; -; 5887 : for (i = 0; i < 4; ++i) -; 5888 : if (stbi__get8(s) != (stbi_uc)str[i]) -; 5889 : return 0; -; 5890 : -; 5891 : return 1; -; 5892 : } -; 5893 : -; 5894 : static int stbi__pic_test_core(stbi__context* s) -; 5895 : { -; 5896 : int i; -; 5897 : -; 5898 : if (!stbi__pic_is4(s, "\x53\x80\xF6\x34")) -; 5899 : return 0; -; 5900 : -; 5901 : for (i = 0; i < 84; ++i) -; 5902 : stbi__get8(s); -; 5903 : -; 5904 : if (!stbi__pic_is4(s, "PICT")) -; 5905 : return 0; -; 5906 : -; 5907 : return 1; -; 5908 : } -; 5909 : -; 5910 : typedef struct -; 5911 : { -; 5912 : stbi_uc size, type, channel; -; 5913 : } stbi__pic_packet; -; 5914 : -; 5915 : static stbi_uc* stbi__readval(stbi__context* s, int channel, stbi_uc* dest) -; 5916 : { -; 5917 : int mask = 0x80, i; -; 5918 : -; 5919 : for (i = 0; i < 4; ++i, mask >>= 1) { -; 5920 : if (channel & mask) { -; 5921 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "PIC file too short"); -; 5922 : dest[i] = stbi__get8(s); -; 5923 : } -; 5924 : } -; 5925 : -; 5926 : return dest; -; 5927 : } -; 5928 : -; 5929 : static void stbi__copyval(int channel, stbi_uc* dest, const stbi_uc* src) -; 5930 : { -; 5931 : int mask = 0x80, i; -; 5932 : -; 5933 : for (i = 0; i < 4; ++i, mask >>= 1) -; 5934 : if (channel & mask) -; 5935 : dest[i] = src[i]; -; 5936 : } -; 5937 : -; 5938 : static stbi_uc* stbi__pic_load_core(stbi__context* s, int width, int height, int* comp, stbi_uc* result) -; 5939 : { -; 5940 : int act_comp = 0, num_packets = 0, y, chained; -; 5941 : stbi__pic_packet packets[10]; -; 5942 : -; 5943 : // this will (should...) cater for even some bizarre stuff like having data -; 5944 : // for the same channel in multiple packets. -; 5945 : do { -; 5946 : stbi__pic_packet* packet; -; 5947 : -; 5948 : if (num_packets == sizeof(packets) / sizeof(packets[0])) -; 5949 : return stbi__errpuc("bad format", "too many packets"); -; 5950 : -; 5951 : packet = &packets[num_packets++]; -; 5952 : -; 5953 : chained = stbi__get8(s); -; 5954 : packet->size = stbi__get8(s); -; 5955 : packet->type = stbi__get8(s); -; 5956 : packet->channel = stbi__get8(s); -; 5957 : -; 5958 : act_comp |= packet->channel; -; 5959 : -; 5960 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (reading packets)"); -; 5961 : if (packet->size != 8) return stbi__errpuc("bad format", "packet isn't 8bpp"); -; 5962 : } while (chained); -; 5963 : -; 5964 : *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel? -; 5965 : -; 5966 : for (y = 0; y < height; ++y) { -; 5967 : int packet_idx; -; 5968 : -; 5969 : for (packet_idx = 0; packet_idx < num_packets; ++packet_idx) { -; 5970 : stbi__pic_packet* packet = &packets[packet_idx]; -; 5971 : stbi_uc* dest = result + y * width * 4; -; 5972 : -; 5973 : switch (packet->type) { -; 5974 : default: -; 5975 : return stbi__errpuc("bad format", "packet has bad compression type"); -; 5976 : -; 5977 : case 0: {//uncompressed -; 5978 : int x; -; 5979 : -; 5980 : for (x = 0; x < width; ++x, dest += 4) -; 5981 : if (!stbi__readval(s, packet->channel, dest)) -; 5982 : return 0; -; 5983 : break; -; 5984 : } -; 5985 : -; 5986 : case 1://Pure RLE -; 5987 : { -; 5988 : int left = width, i; -; 5989 : -; 5990 : while (left > 0) { -; 5991 : stbi_uc count, value[4]; -; 5992 : -; 5993 : count = stbi__get8(s); -; 5994 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (pure read count)"); -; 5995 : -; 5996 : if (count > left) -; 5997 : count = (stbi_uc)left; -; 5998 : -; 5999 : if (!stbi__readval(s, packet->channel, value)) return 0; -; 6000 : -; 6001 : for (i = 0; i < count; ++i, dest += 4) -; 6002 : stbi__copyval(packet->channel, dest, value); -; 6003 : left -= count; -; 6004 : } -; 6005 : } -; 6006 : break; -; 6007 : -; 6008 : case 2: {//Mixed RLE -; 6009 : int left = width; -; 6010 : while (left > 0) { -; 6011 : int count = stbi__get8(s), i; -; 6012 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (mixed read count)"); -; 6013 : -; 6014 : if (count >= 128) { // Repeated -; 6015 : stbi_uc value[4]; -; 6016 : -; 6017 : if (count == 128) -; 6018 : count = stbi__get16be(s); -; 6019 : else -; 6020 : count -= 127; -; 6021 : if (count > left) -; 6022 : return stbi__errpuc("bad file", "scanline overrun"); -; 6023 : -; 6024 : if (!stbi__readval(s, packet->channel, value)) -; 6025 : return 0; -; 6026 : -; 6027 : for (i = 0; i < count; ++i, dest += 4) -; 6028 : stbi__copyval(packet->channel, dest, value); -; 6029 : } -; 6030 : else { // Raw -; 6031 : ++count; -; 6032 : if (count > left) return stbi__errpuc("bad file", "scanline overrun"); -; 6033 : -; 6034 : for (i = 0; i < count; ++i, dest += 4) -; 6035 : if (!stbi__readval(s, packet->channel, dest)) -; 6036 : return 0; -; 6037 : } -; 6038 : left -= count; -; 6039 : } -; 6040 : break; -; 6041 : } -; 6042 : } -; 6043 : } -; 6044 : } -; 6045 : -; 6046 : return result; -; 6047 : } -; 6048 : -; 6049 : static void* stbi__pic_load(stbi__context* s, int* px, int* py, int* comp, int req_comp, stbi__result_info* ri) -; 6050 : { -; 6051 : stbi_uc* result; -; 6052 : int i, x, y, internal_comp; -; 6053 : STBI_NOTUSED(ri); -; 6054 : -; 6055 : if (!comp) comp = &internal_comp; -; 6056 : -; 6057 : for (i = 0; i < 92; ++i) -; 6058 : stbi__get8(s); -; 6059 : -; 6060 : x = stbi__get16be(s); -; 6061 : y = stbi__get16be(s); -; 6062 : -; 6063 : if (y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 6064 : if (x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); -; 6065 : -; 6066 : if (stbi__at_eof(s)) return stbi__errpuc("bad file", "file too short (pic header)"); -; 6067 : if (!stbi__mad3sizes_valid(x, y, 4, 0)) return stbi__errpuc("too large", "PIC image too large to decode"); -; 6068 : -; 6069 : stbi__get32be(s); //skip `ratio' -; 6070 : stbi__get16be(s); //skip `fields' -; 6071 : stbi__get16be(s); //skip `pad' -; 6072 : -; 6073 : // intermediate buffer is RGBA -; 6074 : result = (stbi_uc*)stbi__malloc_mad3(x, y, 4, 0); -; 6075 : if (!result) return stbi__errpuc("outofmem", "Out of memory"); -; 6076 : memset(result, 0xff, x * y * 4); -; 6077 : -; 6078 : if (!stbi__pic_load_core(s, x, y, comp, result)) { -; 6079 : STBI_FREE(result); -; 6080 : result = 0; -; 6081 : } -; 6082 : *px = x; -; 6083 : *py = y; -; 6084 : if (req_comp == 0) req_comp = *comp; -; 6085 : result = stbi__convert_format(result, 4, req_comp, x, y); -; 6086 : -; 6087 : return result; -; 6088 : } -; 6089 : -; 6090 : static int stbi__pic_test(stbi__context* s) -; 6091 : { -; 6092 : int r = stbi__pic_test_core(s); -; 6093 : stbi__rewind(s); -; 6094 : return r; -; 6095 : } -; 6096 : #endif -; 6097 : -; 6098 : // ************************************************************************************************* -; 6099 : // GIF loader -- public domain by Jean-Marc Lienher -- simplified/shrunk by stb -; 6100 : -; 6101 : #ifndef STBI_NO_GIF -; 6102 : typedef struct -; 6103 : { -; 6104 : stbi__int16 prefix; -; 6105 : stbi_uc first; -; 6106 : stbi_uc suffix; -; 6107 : } stbi__gif_lzw; -; 6108 : -; 6109 : typedef struct -; 6110 : { -; 6111 : int w, h; -; 6112 : stbi_uc* out; // output buffer (always 4 components) -; 6113 : stbi_uc* background; // The current "background" as far as a gif is concerned -; 6114 : stbi_uc* history; -; 6115 : int flags, bgindex, ratio, transparent, eflags; -; 6116 : stbi_uc pal[256][4]; -; 6117 : stbi_uc lpal[256][4]; -; 6118 : stbi__gif_lzw codes[8192]; -; 6119 : stbi_uc* color_table; -; 6120 : int parse, step; -; 6121 : int lflags; -; 6122 : int start_x, start_y; -; 6123 : int max_x, max_y; -; 6124 : int cur_x, cur_y; -; 6125 : int line_size; -; 6126 : int delay; -; 6127 : } stbi__gif; -; 6128 : -; 6129 : static int stbi__gif_test_raw(stbi__context* s) -; 6130 : { -; 6131 : int sz; -; 6132 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0; -; 6133 : sz = stbi__get8(s); -; 6134 : if (sz != '9' && sz != '7') return 0; -; 6135 : if (stbi__get8(s) != 'a') return 0; -; 6136 : return 1; -; 6137 : } -; 6138 : -; 6139 : static int stbi__gif_test(stbi__context* s) -; 6140 : { -; 6141 : int r = stbi__gif_test_raw(s); -; 6142 : stbi__rewind(s); -; 6143 : return r; -; 6144 : } -; 6145 : -; 6146 : static void stbi__gif_parse_colortable(stbi__context* s, stbi_uc pal[256][4], int num_entries, int transp) -; 6147 : { -; 6148 : int i; -; 6149 : for (i = 0; i < num_entries; ++i) { -; 6150 : pal[i][2] = stbi__get8(s); -; 6151 : pal[i][1] = stbi__get8(s); -; 6152 : pal[i][0] = stbi__get8(s); -; 6153 : pal[i][3] = transp == i ? 0 : 255; -; 6154 : } -; 6155 : } -; 6156 : -; 6157 : static int stbi__gif_header(stbi__context* s, stbi__gif* g, int* comp, int is_info) -; 6158 : { -; 6159 : stbi_uc version; -; 6160 : if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') -; 6161 : return stbi__err("not GIF", "Corrupt GIF"); -; 6162 : -; 6163 : version = stbi__get8(s); -; 6164 : if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF"); -; 6165 : if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF"); -; 6166 : -; 6167 : stbi__g_failure_reason = ""; -; 6168 : g->w = stbi__get16le(s); -; 6169 : g->h = stbi__get16le(s); -; 6170 : g->flags = stbi__get8(s); -; 6171 : g->bgindex = stbi__get8(s); -; 6172 : g->ratio = stbi__get8(s); -; 6173 : g->transparent = -1; -; 6174 : -; 6175 : if (g->w > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 6176 : if (g->h > STBI_MAX_DIMENSIONS) return stbi__err("too large", "Very large image (corrupt?)"); -; 6177 : -; 6178 : if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments -; 6179 : -; 6180 : if (is_info) return 1; -; 6181 : -; 6182 : if (g->flags & 0x80) -; 6183 : stbi__gif_parse_colortable(s, g->pal, 2 << (g->flags & 7), -1); -; 6184 : -; 6185 : return 1; -; 6186 : } -; 6187 : -; 6188 : static int stbi__gif_info_raw(stbi__context* s, int* x, int* y, int* comp) -; 6189 : { -; 6190 : stbi__gif* g = (stbi__gif*)stbi__malloc(sizeof(stbi__gif)); -; 6191 : if (!g) return stbi__err("outofmem", "Out of memory"); -; 6192 : if (!stbi__gif_header(s, g, comp, 1)) { -; 6193 : STBI_FREE(g); -; 6194 : stbi__rewind(s); -; 6195 : return 0; -; 6196 : } -; 6197 : if (x) *x = g->w; -; 6198 : if (y) *y = g->h; -; 6199 : STBI_FREE(g); -; 6200 : return 1; -; 6201 : } -; 6202 : -; 6203 : static void stbi__out_gif_code(stbi__gif* g, stbi__uint16 code) -; 6204 : { -; 6205 : stbi_uc* p, * c; -; 6206 : int idx; -; 6207 : -; 6208 : // recurse to decode the prefixes, since the linked-list is backwards, -; 6209 : // and working backwards through an interleaved image would be nasty -; 6210 : if (g->codes[code].prefix >= 0) -; 6211 : stbi__out_gif_code(g, g->codes[code].prefix); -; 6212 : -; 6213 : if (g->cur_y >= g->max_y) return; -; 6214 : -; 6215 : idx = g->cur_x + g->cur_y; -; 6216 : p = &g->out[idx]; -; 6217 : g->history[idx / 4] = 1; -; 6218 : -; 6219 : c = &g->color_table[g->codes[code].suffix * 4]; -; 6220 : if (c[3] > 128) { // don't render transparent pixels; -; 6221 : p[0] = c[2]; -; 6222 : p[1] = c[1]; -; 6223 : p[2] = c[0]; -; 6224 : p[3] = c[3]; -; 6225 : } -; 6226 : g->cur_x += 4; -; 6227 : -; 6228 : if (g->cur_x >= g->max_x) { -; 6229 : g->cur_x = g->start_x; -; 6230 : g->cur_y += g->step; -; 6231 : -; 6232 : while (g->cur_y >= g->max_y && g->parse > 0) { -; 6233 : g->step = (1 << g->parse) * g->line_size; -; 6234 : g->cur_y = g->start_y + (g->step >> 1); -; 6235 : --g->parse; -; 6236 : } -; 6237 : } -; 6238 : } -; 6239 : -; 6240 : static stbi_uc* stbi__process_gif_raster(stbi__context* s, stbi__gif* g) -; 6241 : { -; 6242 : stbi_uc lzw_cs; -; 6243 : stbi__int32 len, init_code; -; 6244 : stbi__uint32 first; -; 6245 : stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear; -; 6246 : stbi__gif_lzw* p; -; 6247 : -; 6248 : lzw_cs = stbi__get8(s); -; 6249 : if (lzw_cs > 12) return NULL; -; 6250 : clear = 1 << lzw_cs; -; 6251 : first = 1; -; 6252 : codesize = lzw_cs + 1; -; 6253 : codemask = (1 << codesize) - 1; -; 6254 : bits = 0; -; 6255 : valid_bits = 0; -; 6256 : for (init_code = 0; init_code < clear; init_code++) { -; 6257 : g->codes[init_code].prefix = -1; -; 6258 : g->codes[init_code].first = (stbi_uc)init_code; -; 6259 : g->codes[init_code].suffix = (stbi_uc)init_code; -; 6260 : } -; 6261 : -; 6262 : // support no starting clear code -; 6263 : avail = clear + 2; -; 6264 : oldcode = -1; -; 6265 : -; 6266 : len = 0; -; 6267 : for (;;) { -; 6268 : if (valid_bits < codesize) { -; 6269 : if (len == 0) { -; 6270 : len = stbi__get8(s); // start new block -; 6271 : if (len == 0) -; 6272 : return g->out; -; 6273 : } -; 6274 : --len; -; 6275 : bits |= (stbi__int32)stbi__get8(s) << valid_bits; -; 6276 : valid_bits += 8; -; 6277 : } -; 6278 : else { -; 6279 : stbi__int32 code = bits & codemask; -; 6280 : bits >>= codesize; -; 6281 : valid_bits -= codesize; -; 6282 : // @OPTIMIZE: is there some way we can accelerate the non-clear path? -; 6283 : if (code == clear) { // clear code -; 6284 : codesize = lzw_cs + 1; -; 6285 : codemask = (1 << codesize) - 1; -; 6286 : avail = clear + 2; -; 6287 : oldcode = -1; -; 6288 : first = 0; -; 6289 : } -; 6290 : else if (code == clear + 1) { // end of stream code -; 6291 : stbi__skip(s, len); -; 6292 : while ((len = stbi__get8(s)) > 0) -; 6293 : stbi__skip(s, len); -; 6294 : return g->out; -; 6295 : } -; 6296 : else if (code <= avail) { -; 6297 : if (first) { -; 6298 : return stbi__errpuc("no clear code", "Corrupt GIF"); -; 6299 : } -; 6300 : -; 6301 : if (oldcode >= 0) { -; 6302 : p = &g->codes[avail++]; -; 6303 : if (avail > 8192) { -; 6304 : return stbi__errpuc("too many codes", "Corrupt GIF"); -; 6305 : } -; 6306 : -; 6307 : p->prefix = (stbi__int16)oldcode; -; 6308 : p->first = g->codes[oldcode].first; -; 6309 : p->suffix = (code == avail) ? p->first : g->codes[code].first; -; 6310 : } -; 6311 : else if (code == avail) -; 6312 : return stbi__errpuc("illegal code in raster", "Corrupt GIF"); -; 6313 : -; 6314 : stbi__out_gif_code(g, (stbi__uint16)code); -; 6315 : -; 6316 : if ((avail & codemask) == 0 && avail <= 0x0FFF) { -; 6317 : codesize++; -; 6318 : codemask = (1 << codesize) - 1; -; 6319 : } -; 6320 : -; 6321 : oldcode = code; -; 6322 : } -; 6323 : else { -; 6324 : return stbi__errpuc("illegal code in raster", "Corrupt GIF"); -; 6325 : } -; 6326 : } -; 6327 : } -; 6328 : } -; 6329 : -; 6330 : // this function is designed to support animated gifs, although stb_image doesn't support it -; 6331 : // two back is the image from two frames ago, used for a very specific disposal format -; 6332 : static stbi_uc* stbi__gif_load_next(stbi__context* s, stbi__gif* g, int* comp, int req_comp, stbi_uc* two_back) -; 6333 : { -; 6334 : int dispose; -; 6335 : int first_frame; -; 6336 : int pi; -; 6337 : int pcount; -; 6338 : STBI_NOTUSED(req_comp); -; 6339 : -; 6340 : // on first frame, any non-written pixels get the background colour (non-transparent) -; 6341 : first_frame = 0; -; 6342 : if (g->out == 0) { -; 6343 : if (!stbi__gif_header(s, g, comp, 0)) return 0; // stbi__g_failure_reason set by stbi__gif_header -; 6344 : if (!stbi__mad3sizes_valid(4, g->w, g->h, 0)) -; 6345 : return stbi__errpuc("too large", "GIF image is too large"); -; 6346 : pcount = g->w * g->h; -; 6347 : g->out = (stbi_uc*)stbi__malloc(4 * pcount); -; 6348 : g->background = (stbi_uc*)stbi__malloc(4 * pcount); -; 6349 : g->history = (stbi_uc*)stbi__malloc(pcount); -; 6350 : if (!g->out || !g->background || !g->history) -; 6351 : return stbi__errpuc("outofmem", "Out of memory"); -; 6352 : -; 6353 : // image is treated as "transparent" at the start - ie, nothing overwrites the current background; -; 6354 : // background colour is only used for pixels that are not rendered first frame, after that "background" -; 6355 : // color refers to the color that was there the previous frame. -; 6356 : memset(g->out, 0x00, 4 * pcount); -; 6357 : memset(g->background, 0x00, 4 * pcount); // state of the background (starts transparent) -; 6358 : memset(g->history, 0x00, pcount); // pixels that were affected previous frame -; 6359 : first_frame = 1; -; 6360 : } -; 6361 : else { -; 6362 : // second frame - how do we dispose of the previous one? -; 6363 : dispose = (g->eflags & 0x1C) >> 2; -; 6364 : pcount = g->w * g->h; -; 6365 : -; 6366 : if ((dispose == 3) && (two_back == 0)) { -; 6367 : dispose = 2; // if I don't have an image to revert back to, default to the old background -; 6368 : } -; 6369 : -; 6370 : if (dispose == 3) { // use previous graphic -; 6371 : for (pi = 0; pi < pcount; ++pi) { -; 6372 : if (g->history[pi]) { -; 6373 : memcpy(&g->out[pi * 4], &two_back[pi * 4], 4); -; 6374 : } -; 6375 : } -; 6376 : } -; 6377 : else if (dispose == 2) { -; 6378 : // restore what was changed last frame to background before that frame; -; 6379 : for (pi = 0; pi < pcount; ++pi) { -; 6380 : if (g->history[pi]) { -; 6381 : memcpy(&g->out[pi * 4], &g->background[pi * 4], 4); -; 6382 : } -; 6383 : } -; 6384 : } -; 6385 : else { -; 6386 : // This is a non-disposal case eithe way, so just -; 6387 : // leave the pixels as is, and they will become the new background -; 6388 : // 1: do not dispose -; 6389 : // 0: not specified. -; 6390 : } -; 6391 : -; 6392 : // background is what out is after the undoing of the previou frame; -; 6393 : memcpy(g->background, g->out, 4 * g->w * g->h); -; 6394 : } -; 6395 : -; 6396 : // clear my history; -; 6397 : memset(g->history, 0x00, g->w * g->h); // pixels that were affected previous frame -; 6398 : -; 6399 : for (;;) { -; 6400 : int tag = stbi__get8(s); -; 6401 : switch (tag) { -; 6402 : case 0x2C: /* Image Descriptor */ -; 6403 : { -; 6404 : stbi__int32 x, y, w, h; -; 6405 : stbi_uc* o; -; 6406 : -; 6407 : x = stbi__get16le(s); -; 6408 : y = stbi__get16le(s); -; 6409 : w = stbi__get16le(s); -; 6410 : h = stbi__get16le(s); -; 6411 : if (((x + w) > (g->w)) || ((y + h) > (g->h))) -; 6412 : return stbi__errpuc("bad Image Descriptor", "Corrupt GIF"); -; 6413 : -; 6414 : g->line_size = g->w * 4; -; 6415 : g->start_x = x * 4; -; 6416 : g->start_y = y * g->line_size; -; 6417 : g->max_x = g->start_x + w * 4; -; 6418 : g->max_y = g->start_y + h * g->line_size; -; 6419 : g->cur_x = g->start_x; -; 6420 : g->cur_y = g->start_y; -; 6421 : -; 6422 : // if the width of the specified rectangle is 0, that means -; 6423 : // we may not see *any* pixels or the image is malformed; -; 6424 : // to make sure this is caught, move the current y down to -; 6425 : // max_y (which is what out_gif_code checks). -; 6426 : if (w == 0) -; 6427 : g->cur_y = g->max_y; -; 6428 : -; 6429 : g->lflags = stbi__get8(s); -; 6430 : -; 6431 : if (g->lflags & 0x40) { -; 6432 : g->step = 8 * g->line_size; // first interlaced spacing -; 6433 : g->parse = 3; -; 6434 : } -; 6435 : else { -; 6436 : g->step = g->line_size; -; 6437 : g->parse = 0; -; 6438 : } -; 6439 : -; 6440 : if (g->lflags & 0x80) { -; 6441 : stbi__gif_parse_colortable(s, g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1); -; 6442 : g->color_table = (stbi_uc*)g->lpal; -; 6443 : } -; 6444 : else if (g->flags & 0x80) { -; 6445 : g->color_table = (stbi_uc*)g->pal; -; 6446 : } -; 6447 : else -; 6448 : return stbi__errpuc("missing color table", "Corrupt GIF"); -; 6449 : -; 6450 : o = stbi__process_gif_raster(s, g); -; 6451 : if (!o) return NULL; -; 6452 : -; 6453 : // if this was the first frame, -; 6454 : pcount = g->w * g->h; -; 6455 : if (first_frame && (g->bgindex > 0)) { -; 6456 : // if first frame, any pixel not drawn to gets the background color -; 6457 : for (pi = 0; pi < pcount; ++pi) { -; 6458 : if (g->history[pi] == 0) { -; 6459 : g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; -; 6460 : memcpy(&g->out[pi * 4], &g->pal[g->bgindex], 4); -; 6461 : } -; 6462 : } -; 6463 : } -; 6464 : -; 6465 : return o; -; 6466 : } -; 6467 : -; 6468 : case 0x21: // Comment Extension. -; 6469 : { -; 6470 : int len; -; 6471 : int ext = stbi__get8(s); -; 6472 : if (ext == 0xF9) { // Graphic Control Extension. -; 6473 : len = stbi__get8(s); -; 6474 : if (len == 4) { -; 6475 : g->eflags = stbi__get8(s); -; 6476 : g->delay = 10 * stbi__get16le(s); // delay - 1/100th of a second, saving as 1/1000ths. -; 6477 : -; 6478 : // unset old transparent -; 6479 : if (g->transparent >= 0) { -; 6480 : g->pal[g->transparent][3] = 255; -; 6481 : } -; 6482 : if (g->eflags & 0x01) { -; 6483 : g->transparent = stbi__get8(s); -; 6484 : if (g->transparent >= 0) { -; 6485 : g->pal[g->transparent][3] = 0; -; 6486 : } -; 6487 : } -; 6488 : else { -; 6489 : // don't need transparent -; 6490 : stbi__skip(s, 1); -; 6491 : g->transparent = -1; -; 6492 : } -; 6493 : } -; 6494 : else { -; 6495 : stbi__skip(s, len); -; 6496 : break; -; 6497 : } -; 6498 : } -; 6499 : while ((len = stbi__get8(s)) != 0) { -; 6500 : stbi__skip(s, len); -; 6501 : } -; 6502 : break; -; 6503 : } -; 6504 : -; 6505 : case 0x3B: // gif stream termination code -; 6506 : return (stbi_uc*)s; // using '1' causes warning on some compilers -; 6507 : -; 6508 : default: -; 6509 : return stbi__errpuc("unknown code", "Corrupt GIF"); -; 6510 : } -; 6511 : } -; 6512 : } -; 6513 : -; 6514 : static void* stbi__load_gif_main_outofmem(stbi__gif* g, stbi_uc* out, int** delays) -; 6515 : { -; 6516 : STBI_FREE(g->out); -; 6517 : STBI_FREE(g->history); -; 6518 : STBI_FREE(g->background); -; 6519 : -; 6520 : if (out) STBI_FREE(out); -; 6521 : if (delays && *delays) STBI_FREE(*delays); -; 6522 : return stbi__errpuc("outofmem", "Out of memory"); -; 6523 : } -; 6524 : -; 6525 : static void* stbi__load_gif_main(stbi__context* s, int** delays, int* x, int* y, int* z, int* comp, int req_comp) -; 6526 : { -; 6527 : if (stbi__gif_test(s)) { -; 6528 : int layers = 0; -; 6529 : stbi_uc* u = 0; -; 6530 : stbi_uc* out = 0; -; 6531 : stbi_uc* two_back = 0; -; 6532 : stbi__gif g; -; 6533 : int stride; -; 6534 : int out_size = 0; -; 6535 : int delays_size = 0; -; 6536 : -; 6537 : STBI_NOTUSED(out_size); -; 6538 : STBI_NOTUSED(delays_size); -; 6539 : -; 6540 : memset(&g, 0, sizeof(g)); -; 6541 : if (delays) { -; 6542 : *delays = 0; -; 6543 : } -; 6544 : -; 6545 : do { -; 6546 : u = stbi__gif_load_next(s, &g, comp, req_comp, two_back); -; 6547 : if (u == (stbi_uc*)s) u = 0; // end of animated gif marker -; 6548 : -; 6549 : if (u) { -; 6550 : *x = g.w; -; 6551 : *y = g.h; -; 6552 : ++layers; -; 6553 : stride = g.w * g.h * 4; -; 6554 : -; 6555 : if (out) { -; 6556 : void* tmp = (stbi_uc*)STBI_REALLOC_SIZED(out, out_size, layers * stride); -; 6557 : if (!tmp) -; 6558 : return stbi__load_gif_main_outofmem(&g, out, delays); -; 6559 : else { -; 6560 : out = (stbi_uc*)tmp; -; 6561 : out_size = layers * stride; -; 6562 : } -; 6563 : -; 6564 : if (delays) { -; 6565 : int* new_delays = (int*)STBI_REALLOC_SIZED(*delays, delays_size, sizeof(int) * layers); -; 6566 : if (!new_delays) -; 6567 : return stbi__load_gif_main_outofmem(&g, out, delays); -; 6568 : *delays = new_delays; -; 6569 : delays_size = layers * sizeof(int); -; 6570 : } -; 6571 : } -; 6572 : else { -; 6573 : out = (stbi_uc*)stbi__malloc(layers * stride); -; 6574 : if (!out) -; 6575 : return stbi__load_gif_main_outofmem(&g, out, delays); -; 6576 : out_size = layers * stride; -; 6577 : if (delays) { -; 6578 : *delays = (int*)stbi__malloc(layers * sizeof(int)); -; 6579 : if (!*delays) -; 6580 : return stbi__load_gif_main_outofmem(&g, out, delays); -; 6581 : delays_size = layers * sizeof(int); -; 6582 : } -; 6583 : } -; 6584 : memcpy(out + ((layers - 1) * stride), u, stride); -; 6585 : if (layers >= 2) { -; 6586 : two_back = out - 2 * stride; -; 6587 : } -; 6588 : -; 6589 : if (delays) { -; 6590 : (*delays)[layers - 1U] = g.delay; -; 6591 : } -; 6592 : } -; 6593 : } while (u != 0); -; 6594 : -; 6595 : // free temp buffer; -; 6596 : STBI_FREE(g.out); -; 6597 : STBI_FREE(g.history); -; 6598 : STBI_FREE(g.background); -; 6599 : -; 6600 : // do the final conversion after loading everything; -; 6601 : if (req_comp && req_comp != 4) -; 6602 : out = stbi__convert_format(out, 4, req_comp, layers * g.w, g.h); -; 6603 : -; 6604 : *z = layers; -; 6605 : return out; -; 6606 : } -; 6607 : else { -; 6608 : return stbi__errpuc("not GIF", "Image was not as a gif type."); -; 6609 : } -; 6610 : } -; 6611 : -; 6612 : static void* stbi__gif_load(stbi__context* s, int* x, int* y, int* comp, int req_comp, stbi__result_info* ri) -; 6613 : { -; 6614 : stbi_uc* u = 0; -; 6615 : stbi__gif g; -; 6616 : memset(&g, 0, sizeof(g)); -; 6617 : STBI_NOTUSED(ri); -; 6618 : -; 6619 : u = stbi__gif_load_next(s, &g, comp, req_comp, 0); -; 6620 : if (u == (stbi_uc*)s) u = 0; // end of animated gif marker -; 6621 : if (u) { -; 6622 : *x = g.w; -; 6623 : *y = g.h; -; 6624 : -; 6625 : // moved conversion to after successful load so that the same -; 6626 : // can be done for multiple frames. -; 6627 : if (req_comp && req_comp != 4) -; 6628 : u = stbi__convert_format(u, 4, req_comp, g.w, g.h); -; 6629 : } -; 6630 : else if (g.out) { -; 6631 : // if there was an error and we allocated an image buffer, free it! -; 6632 : STBI_FREE(g.out); -; 6633 : } -; 6634 : -; 6635 : // free buffers needed for multiple frame loading; -; 6636 : STBI_FREE(g.history); -; 6637 : STBI_FREE(g.background); -; 6638 : -; 6639 : return u; -; 6640 : } -; 6641 : -; 6642 : static int stbi__gif_info(stbi__context* s, int* x, int* y, int* comp) -; 6643 : { -; 6644 : return stbi__gif_info_raw(s, x, y, comp); -; 6645 : } -; 6646 : #endif -; 6647 : -; 6648 : // ************************************************************************************************* -; 6649 : // Radiance RGBE HDR loader -; 6650 : // originally by Nicolas Schulz -; 6651 : #ifndef STBI_NO_HDR -; 6652 : static int stbi__hdr_test_core(stbi__context* s, const char* signature) -; 6653 : { -; 6654 : int i; -; 6655 : for (i = 0; signature[i]; ++i) - +; Line 6655 000dc 48 ff c6 inc rsi 000df 80 3e 00 cmp BYTE PTR [rsi], 0 000e2 75 bc jne SHORT $LL21@stbi__hdr_ - -; 6658 : stbi__rewind(s); -; 6659 : return 1; - +; Line 6659 000e4 b8 01 00 00 00 mov eax, 1 000e9 eb 02 jmp SHORT $LN18@stbi__hdr_ $LN35@stbi__hdr_: - -; 6657 : return 0; - +; Line 6657 000eb 33 c0 xor eax, eax $LN18@stbi__hdr_: - -; 6664 : int r = stbi__hdr_test_core(s, "#?RADIANCE\n"); -; 6665 : stbi__rewind(s); -; 6666 : if (!r) { -; 6667 : r = stbi__hdr_test_core(s, "#?RGBE\n"); -; 6668 : stbi__rewind(s); -; 6669 : } -; 6670 : return r; - +; Line 6670 000ed 48 8b 97 d0 00 00 00 mov rdx, QWORD PTR [rdi+208] 000f4 48 8b 8f d8 00 @@ -104570,9 +35591,7 @@ $LN18@stbi__hdr_: 000fb 48 89 13 mov QWORD PTR [rbx], rdx 000fe 48 89 8f c8 00 00 00 mov QWORD PTR [rdi+200], rcx - -; 6671 : } - +; Line 6671 00105 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 0010a 48 8b 74 24 38 mov rsi, QWORD PTR [rsp+56] 0010f 48 8b 7c 24 40 mov rdi, QWORD PTR [rsp+64] @@ -104582,15 +35601,13 @@ $LN18@stbi__hdr_: stbi__hdr_test ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__hdr_gettoken _TEXT SEGMENT z$ = 64 buffer$ = 72 stbi__hdr_gettoken PROC ; COMDAT - -; 6675 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6675 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi @@ -104598,44 +35615,30 @@ stbi__hdr_gettoken PROC ; COMDAT 00010 41 56 push r14 00012 41 57 push r15 00014 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00018 48 8b 81 c0 00 00 00 mov rax, QWORD PTR [rcx+192] - -; 6676 : int len = 0; - +; Line 6676 0001f 45 33 f6 xor r14d, r14d 00022 4c 8b fa mov r15, rdx 00025 48 8b d9 mov rbx, rcx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00028 48 3b 81 c8 00 00 00 cmp rax, QWORD PTR [rcx+200] 0002f 73 0f jae SHORT $LN9@stbi__hdr_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00031 0f b6 38 movzx edi, BYTE PTR [rax] 00034 48 ff c0 inc rax 00037 48 89 81 c0 00 00 00 mov QWORD PTR [rcx+192], rax 0003e eb 27 jmp SHORT $LN62@stbi__hdr_ $LN9@stbi__hdr_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00040 44 39 71 30 cmp DWORD PTR [rcx+48], r14d 00044 74 1e je SHORT $LN10@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00046 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0004b 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00052 48 8b cb mov rcx, rbx @@ -104645,46 +35648,28 @@ $LN9@stbi__hdr_: 00 00 mov QWORD PTR [rbx+192], rax 00062 eb 03 jmp SHORT $LN62@stbi__hdr_ $LN10@stbi__hdr_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00064 40 32 ff xor dil, dil $LN62@stbi__hdr_: - -; 6677 : char c = '\0'; -; 6678 : -; 6679 : c = (char)stbi__get8(z); - +; Line 6679 00067 b8 30 00 00 00 mov eax, 48 ; 00000030H 0006c 49 8b f6 mov rsi, r14 0006f 48 8d 2c 08 lea rbp, QWORD PTR [rax+rcx] $LL2@stbi__hdr_: - -; 1091 : if (s->io.read) { - +; Line 1091 00073 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 00078 74 15 je SHORT $LN42@stbi__hdr_ - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 0007a 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 0007e ff 53 20 call QWORD PTR [rbx+32] 00081 85 c0 test eax, eax 00083 74 1e je SHORT $LN45@stbi__hdr_ - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 00085 83 7d 00 00 cmp DWORD PTR [rbp], 0 00089 0f 84 e6 00 00 00 je $LN49@stbi__hdr_ $LN42@stbi__hdr_: - -; 6680 : -; 6681 : while (!stbi__at_eof(z) && c != '\n') { - +; Line 6681 0008f 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] 00096 48 39 83 c0 00 @@ -104695,48 +35680,34 @@ $LN45@stbi__hdr_: 000a3 40 80 ff 0a cmp dil, 10 000a7 0f 84 c8 00 00 00 je $LN49@stbi__hdr_ - -; 6682 : buffer[len++] = c; - +; Line 6682 000ad 42 88 3c 3e mov BYTE PTR [rsi+r15], dil 000b1 41 ff c6 inc r14d 000b4 48 ff c6 inc rsi - -; 6683 : if (len == STBI__HDR_BUFLEN - 1) { - +; Line 6683 000b7 48 81 fe ff 03 00 00 cmp rsi, 1023 ; 000003ffH 000be 74 4e je SHORT $LN41@stbi__hdr_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 000c0 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000c7 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 000ce 73 0f jae SHORT $LN27@stbi__hdr_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 000d0 0f b6 38 movzx edi, BYTE PTR [rax] 000d3 48 ff c0 inc rax 000d6 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 000dd eb 94 jmp SHORT $LL2@stbi__hdr_ $LN27@stbi__hdr_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000df 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 000e3 74 21 je SHORT $LN28@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000e5 48 8b cb mov rcx, rbx 000e8 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000ed 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000f4 0f b6 38 movzx edi, BYTE PTR [rax] @@ -104745,86 +35716,53 @@ $LN27@stbi__hdr_: 00 00 mov QWORD PTR [rbx+192], rax 00101 e9 6d ff ff ff jmp $LL2@stbi__hdr_ $LN28@stbi__hdr_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00106 40 32 ff xor dil, dil - -; 6686 : ; -; 6687 : break; -; 6688 : } -; 6689 : c = (char)stbi__get8(z); -; 6690 : } - +; Line 6690 00109 e9 65 ff ff ff jmp $LL2@stbi__hdr_ $LN41@stbi__hdr_: 0010e 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] $LL4@stbi__hdr_: - -; 1091 : if (s->io.read) { - +; Line 1091 00112 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 00117 74 10 je SHORT $LN43@stbi__hdr_ - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 00119 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 0011d ff 53 20 call QWORD PTR [rbx+32] 00120 85 c0 test eax, eax 00122 74 15 je SHORT $LN44@stbi__hdr_ - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 00124 83 3f 00 cmp DWORD PTR [rdi], 0 00127 74 4c je SHORT $LN49@stbi__hdr_ $LN43@stbi__hdr_: - -; 6684 : // flush to end of line -; 6685 : while (!stbi__at_eof(z) && stbi__get8(z) != '\n') - +; Line 6685 00129 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] 00130 48 39 83 c0 00 00 00 cmp QWORD PTR [rbx+192], rax 00137 73 3c jae SHORT $LN49@stbi__hdr_ $LN44@stbi__hdr_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00139 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00140 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00147 73 06 jae SHORT $LN23@stbi__hdr_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00149 48 8d 7b 30 lea rdi, QWORD PTR [rbx+48] 0014d eb 14 jmp SHORT $LN63@stbi__hdr_ $LN23@stbi__hdr_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0014f 83 3f 00 cmp DWORD PTR [rdi], 0 00152 74 be je SHORT $LL4@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00154 48 8b cb mov rcx, rbx 00157 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0015c 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] $LN63@stbi__hdr_: - -; 6684 : // flush to end of line -; 6685 : while (!stbi__at_eof(z) && stbi__get8(z) != '\n') - +; Line 6685 00163 0f b6 08 movzx ecx, BYTE PTR [rax] 00166 48 ff c0 inc rax 00169 48 89 83 c0 00 @@ -104832,12 +35770,7 @@ $LN63@stbi__hdr_: 00170 80 f9 0a cmp cl, 10 00173 75 9d jne SHORT $LL4@stbi__hdr_ $LN49@stbi__hdr_: - -; 6691 : -; 6692 : buffer[len] = 0; -; 6693 : return buffer; -; 6694 : } - +; Line 6694 00175 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] 0017a 48 8b 6c 24 48 mov rbp, QWORD PTR [rsp+72] 0017f 48 8b 74 24 50 mov rsi, QWORD PTR [rsp+80] @@ -104852,23 +35785,19 @@ $LN49@stbi__hdr_: stbi__hdr_gettoken ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__hdr_convert _TEXT SEGMENT output$ = 48 input$ = 56 req_comp$ = 64 stbi__hdr_convert PROC ; COMDAT - -; 6697 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6697 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 74 24 10 mov QWORD PTR [rsp+16], rsi 0000a 57 push rdi 0000b 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 6698 : if (input[3] != 0) { - +; Line 6698 0000f 0f b6 42 03 movzx eax, BYTE PTR [rdx+3] 00013 41 8b d8 mov ebx, r8d 00016 48 8b f2 mov rsi, rdx @@ -104876,11 +35805,7 @@ stbi__hdr_convert PROC ; COMDAT 0001c 84 c0 test al, al 0001e 0f 84 bc 00 00 00 je $LN4@stbi__hdr_ - -; 6699 : float f1; -; 6700 : // Exponent -; 6701 : f1 = (float)ldexp(1.0f, input[3] - (int)(128 + 8)); - +; Line 6701 00024 f2 0f 10 05 00 00 00 00 movsd xmm0, QWORD PTR __real@3ff0000000000000 0002c 8d 90 78 ff ff @@ -104889,14 +35814,10 @@ stbi__hdr_convert PROC ; COMDAT 00 call QWORD PTR __imp_ldexp 00038 0f 57 d2 xorps xmm2, xmm2 0003b f2 0f 5a d0 cvtsd2ss xmm2, xmm0 - -; 6702 : if (req_comp <= 2) - +; Line 6702 0003f 83 fb 02 cmp ebx, 2 00042 7f 46 jg SHORT $LN6@stbi__hdr_ - -; 6703 : output[0] = (input[0] + input[1] + input[2]) * f1 / 3; - +; Line 6703 00044 0f b6 46 01 movzx eax, BYTE PTR [rsi+1] 00048 0f b6 4e 02 movzx ecx, BYTE PTR [rsi+2] 0004c 03 c8 add ecx, eax @@ -104908,76 +35829,50 @@ stbi__hdr_convert PROC ; COMDAT 0005e f3 0f 5e 05 00 00 00 00 divss xmm0, DWORD PTR __real@40400000 00066 f3 0f 11 07 movss DWORD PTR [rdi], xmm0 - -; 6708 : } -; 6709 : if (req_comp == 2) output[1] = 1; - +; Line 6709 0006a 83 fb 02 cmp ebx, 2 0006d 0f 85 ab 00 00 00 jne $LN2@stbi__hdr_ 00073 c7 47 04 00 00 80 3f mov DWORD PTR [rdi+4], 1065353216 ; 3f800000H - -; 6719 : break; -; 6720 : } -; 6721 : } -; 6722 : } - +; Line 6722 0007a 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 0007f 48 8b 74 24 38 mov rsi, QWORD PTR [rsp+56] 00084 48 83 c4 20 add rsp, 32 ; 00000020H 00088 5f pop rdi 00089 c3 ret 0 $LN6@stbi__hdr_: - -; 6704 : else { -; 6705 : output[0] = input[0] * f1; - +; Line 6705 0008a 0f b6 06 movzx eax, BYTE PTR [rsi] 0008d 66 0f 6e c0 movd xmm0, eax 00091 0f 5b c0 cvtdq2ps xmm0, xmm0 00094 f3 0f 59 c2 mulss xmm0, xmm2 00098 f3 0f 11 07 movss DWORD PTR [rdi], xmm0 - -; 6706 : output[1] = input[1] * f1; - +; Line 6706 0009c 0f b6 46 01 movzx eax, BYTE PTR [rsi+1] 000a0 66 0f 6e c8 movd xmm1, eax 000a4 0f 5b c9 cvtdq2ps xmm1, xmm1 000a7 f3 0f 59 ca mulss xmm1, xmm2 000ab f3 0f 11 4f 04 movss DWORD PTR [rdi+4], xmm1 - -; 6707 : output[2] = input[2] * f1; - +; Line 6707 000b0 0f b6 46 02 movzx eax, BYTE PTR [rsi+2] 000b4 66 0f 6e c0 movd xmm0, eax 000b8 0f 5b c0 cvtdq2ps xmm0, xmm0 000bb f3 0f 59 c2 mulss xmm0, xmm2 000bf f3 0f 11 47 08 movss DWORD PTR [rdi+8], xmm0 - -; 6710 : if (req_comp == 4) output[3] = 1; - +; Line 6710 000c4 83 fb 04 cmp ebx, 4 000c7 75 55 jne SHORT $LN2@stbi__hdr_ 000c9 c7 47 0c 00 00 80 3f mov DWORD PTR [rdi+12], 1065353216 ; 3f800000H - -; 6719 : break; -; 6720 : } -; 6721 : } -; 6722 : } - +; Line 6722 000d0 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 000d5 48 8b 74 24 38 mov rsi, QWORD PTR [rsp+56] 000da 48 83 c4 20 add rsp, 32 ; 00000020H 000de 5f pop rdi 000df c3 ret 0 $LN4@stbi__hdr_: - -; 6711 : } -; 6712 : else { -; 6713 : switch (req_comp) { - +; Line 6713 000e0 83 eb 01 sub ebx, 1 000e3 74 35 je SHORT $LN13@stbi__hdr_ 000e5 83 eb 01 sub ebx, 1 @@ -104986,23 +35881,14 @@ $LN4@stbi__hdr_: 000ed 74 0c je SHORT $LN11@stbi__hdr_ 000ef 83 fb 01 cmp ebx, 1 000f2 75 2a jne SHORT $LN2@stbi__hdr_ - -; 6714 : case 4: output[3] = 1; /* fallthrough */ - +; Line 6714 000f4 c7 41 0c 00 00 80 3f mov DWORD PTR [rcx+12], 1065353216 ; 3f800000H $LN11@stbi__hdr_: - -; 6715 : case 3: output[0] = output[1] = output[2] = 0; - +; Line 6715 000fb 33 c0 xor eax, eax 000fd 48 89 41 04 mov QWORD PTR [rcx+4], rax - -; 6719 : break; -; 6720 : } -; 6721 : } -; 6722 : } - +; Line 6722 00101 89 01 mov DWORD PTR [rcx], eax 00103 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 00108 48 8b 74 24 38 mov rsi, QWORD PTR [rsp+56] @@ -105010,23 +35896,13 @@ $LN11@stbi__hdr_: 00111 5f pop rdi 00112 c3 ret 0 $LN12@stbi__hdr_: - -; 6716 : break; -; 6717 : case 2: output[1] = 1; /* fallthrough */ - +; Line 6717 00113 c7 41 04 00 00 80 3f mov DWORD PTR [rcx+4], 1065353216 ; 3f800000H $LN13@stbi__hdr_: - -; 6718 : case 1: output[0] = 0; - +; Line 6718 0011a 33 c0 xor eax, eax - -; 6719 : break; -; 6720 : } -; 6721 : } -; 6722 : } - +; Line 6722 0011c 89 01 mov DWORD PTR [rcx], eax $LN2@stbi__hdr_: 0011e 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] @@ -105037,1364 +35913,917 @@ $LN2@stbi__hdr_: stbi__hdr_convert ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__hdr_load _TEXT SEGMENT -scanline$1$ = 32 +tv1575 = 32 +rgbe$1 = 32 hdr_data$1$ = 40 -width$1$ = 48 -j$1$ = 52 -tv1712 = 56 -height$1$ = 60 -tv1792 = 64 -token$ = 72 -tv1713 = 80 -rgbe$17 = 80 -rgbe$18 = 80 -buffer$ = 96 -__$ArrayPad$ = 1120 -s$ = 1216 -x$ = 1224 -y$ = 1232 -comp$ = 1240 -req_comp$ = 1248 -ri$dead$ = 1256 +j$1$ = 48 +height$1$ = 52 +tv1645 = 56 +token$ = 64 +tv1574 = 72 +rgbe$2 = 72 +buffer$ = 80 +__$ArrayPad$ = 1104 +s$ = 1200 +x$ = 1208 +y$ = 1216 +comp$ = 1224 +req_comp$ = 1232 +ri$dead$ = 1240 stbi__hdr_load PROC ; COMDAT - -; 6725 : { - - 00000 40 55 push rbp - 00002 53 push rbx +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 6725 + 00000 40 53 push rbx + 00002 55 push rbp 00003 56 push rsi 00004 57 push rdi 00005 41 54 push r12 - 00007 41 55 push r13 - 00009 41 56 push r14 - 0000b 41 57 push r15 - 0000d 48 8d ac 24 88 - fc ff ff lea rbp, QWORD PTR [rsp-888] - 00015 48 81 ec 78 04 - 00 00 sub rsp, 1144 ; 00000478H - 0001c 48 8b 05 00 00 + 00007 41 56 push r14 + 00009 41 57 push r15 + 0000b 48 81 ec 70 04 + 00 00 sub rsp, 1136 ; 00000470H + 00012 48 8b 05 00 00 00 00 mov rax, QWORD PTR __security_cookie - 00023 48 33 c4 xor rax, rsp - 00026 48 89 85 60 03 - 00 00 mov QWORD PTR __$ArrayPad$[rbp-256], rax - 0002d 44 8b bd e0 03 - 00 00 mov r15d, DWORD PTR req_comp$[rbp-256] - 00034 4c 8b e2 mov r12, rdx - -; 6726 : char buffer[STBI__HDR_BUFLEN]; -; 6727 : char* token; -; 6728 : int valid = 0; -; 6729 : int width, height; -; 6730 : stbi_uc* scanline; -; 6731 : float* hdr_data; -; 6732 : int len; -; 6733 : unsigned char count, value; -; 6734 : int i, j, k, c1, c2, z; -; 6735 : const char* headerToken; -; 6736 : STBI_NOTUSED(ri); -; 6737 : -; 6738 : // Check identifier -; 6739 : headerToken = stbi__hdr_gettoken(s, buffer); - - 00037 48 8d 54 24 60 lea rdx, QWORD PTR buffer$[rsp] - 0003c 4d 8b f1 mov r14, r9 - 0003f 4d 8b e8 mov r13, r8 - 00042 48 8b d9 mov rbx, rcx - 00045 33 ff xor edi, edi - 00047 e8 00 00 00 00 call stbi__hdr_gettoken - -; 6740 : if (strcmp(headerToken, "#?RADIANCE") != 0 && strcmp(headerToken, "#?RGBE") != 0) - - 0004c 48 8d 15 00 00 + 00019 48 33 c4 xor rax, rsp + 0001c 48 89 84 24 50 + 04 00 00 mov QWORD PTR __$ArrayPad$[rsp], rax + 00024 8b ac 24 d0 04 + 00 00 mov ebp, DWORD PTR req_comp$[rsp] + 0002b 4c 8b fa mov r15, rdx +; Line 6739 + 0002e 48 8d 54 24 50 lea rdx, QWORD PTR buffer$[rsp] + 00033 4d 8b f1 mov r14, r9 + 00036 4d 8b e0 mov r12, r8 + 00039 48 8b d9 mov rbx, rcx + 0003c 33 ff xor edi, edi + 0003e e8 00 00 00 00 call stbi__hdr_gettoken +; Line 6740 + 00043 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0L@NCPEAJBD@?$CD?$DPRADIANCE@ - 00053 48 8b c8 mov rcx, rax - 00056 48 8b f0 mov rsi, rax - 00059 e8 00 00 00 00 call strcmp - 0005e 85 c0 test eax, eax - 00060 74 25 je SHORT $LN30@stbi__hdr_ - 00062 33 c9 xor ecx, ecx - 00064 48 8d 15 00 00 + 0004a 48 8b c8 mov rcx, rax + 0004d 48 8b f0 mov rsi, rax + 00050 e8 00 00 00 00 call strcmp + 00055 85 c0 test eax, eax + 00057 74 20 je SHORT $LN30@stbi__hdr_ + 00059 33 c9 xor ecx, ecx + 0005b 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_06NDOKKIDJ@?$CD?$DPRGBE@ - 0006b 0f 1f 44 00 00 npad 5 -$LL248@stbi__hdr_: - 00070 0f b6 04 0e movzx eax, BYTE PTR [rsi+rcx] - 00074 48 ff c1 inc rcx - 00077 3a 44 0a ff cmp al, BYTE PTR [rdx+rcx-1] - 0007b 0f 85 af 00 00 - 00 jne $LN249@stbi__hdr_ - 00081 48 83 f9 07 cmp rcx, 7 - 00085 75 e9 jne SHORT $LL248@stbi__hdr_ +$LL241@stbi__hdr_: + 00062 0f b6 04 0e movzx eax, BYTE PTR [rsi+rcx] + 00066 48 ff c1 inc rcx + 00069 3a 44 0a ff cmp al, BYTE PTR [rdx+rcx-1] + 0006d 0f 85 b8 00 00 + 00 jne $LN242@stbi__hdr_ + 00073 48 83 f9 07 cmp rcx, 7 + 00077 75 e9 jne SHORT $LL241@stbi__hdr_ $LN30@stbi__hdr_: - -; 6742 : -; 6743 : // Parse header -; 6744 : for (;;) { -; 6745 : token = stbi__hdr_gettoken(s, buffer); - - 00087 48 8d 54 24 60 lea rdx, QWORD PTR buffer$[rsp] - 0008c 48 8b cb mov rcx, rbx - 0008f e8 00 00 00 00 call stbi__hdr_gettoken - 00094 48 89 44 24 48 mov QWORD PTR token$[rsp], rax - -; 6746 : if (token[0] == 0) break; - - 00099 40 38 38 cmp BYTE PTR [rax], dil - 0009c 0f 84 b4 07 00 - 00 je $LN224@stbi__hdr_ - 000a2 be 01 00 00 00 mov esi, 1 - 000a7 66 0f 1f 84 00 - 00 00 00 00 npad 9 +; Line 6745 + 00079 48 8d 54 24 50 lea rdx, QWORD PTR buffer$[rsp] + 0007e 48 8b cb mov rcx, rbx + 00081 e8 00 00 00 00 call stbi__hdr_gettoken + 00086 48 89 44 24 40 mov QWORD PTR token$[rsp], rax +; Line 6746 + 0008b 40 38 38 cmp BYTE PTR [rax], dil + 0008e 0f 84 73 07 00 + 00 je $LN218@stbi__hdr_ + 00094 be 01 00 00 00 mov esi, 1 + 00099 0f 1f 80 00 00 + 00 00 npad 7 $LL2@stbi__hdr_: - -; 6747 : if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; - - 000b0 48 8d 15 00 00 +; Line 6747 + 000a0 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BH@JFGBLLKC@FORMAT?$DN32?9bit_rle_rgbe@ - 000b7 48 8b c8 mov rcx, rax - 000ba e8 00 00 00 00 call strcmp - 000bf 85 c0 test eax, eax - 000c1 48 8d 54 24 60 lea rdx, QWORD PTR buffer$[rsp] - 000c6 48 8b cb mov rcx, rbx - 000c9 0f 44 fe cmove edi, esi - 000cc e8 00 00 00 00 call stbi__hdr_gettoken - 000d1 48 89 44 24 48 mov QWORD PTR token$[rsp], rax - 000d6 80 38 00 cmp BYTE PTR [rax], 0 - 000d9 75 d5 jne SHORT $LL2@stbi__hdr_ - -; 6748 : } -; 6749 : -; 6750 : if (!valid) return stbi__errpf("unsupported format", "Unsupported HDR format"); - - 000db 85 ff test edi, edi - 000dd 0f 84 73 07 00 - 00 je $LN224@stbi__hdr_ - -; 6751 : -; 6752 : // Parse width and height -; 6753 : // can't use sscanf() if we're not using stdio! -; 6754 : token = stbi__hdr_gettoken(s, buffer); - - 000e3 48 8d 54 24 60 lea rdx, QWORD PTR buffer$[rsp] - 000e8 48 8b cb mov rcx, rbx - 000eb e8 00 00 00 00 call stbi__hdr_gettoken - -; 6755 : if (strncmp(token, "-Y ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); - - 000f0 bf 03 00 00 00 mov edi, 3 - 000f5 48 89 44 24 48 mov QWORD PTR token$[rsp], rax - 000fa 44 8b c7 mov r8d, edi - 000fd 48 8d 15 00 00 + 000a7 48 8b c8 mov rcx, rax + 000aa e8 00 00 00 00 call strcmp + 000af 85 c0 test eax, eax + 000b1 48 8d 54 24 50 lea rdx, QWORD PTR buffer$[rsp] + 000b6 48 8b cb mov rcx, rbx + 000b9 0f 44 fe cmove edi, esi + 000bc e8 00 00 00 00 call stbi__hdr_gettoken + 000c1 48 89 44 24 40 mov QWORD PTR token$[rsp], rax + 000c6 80 38 00 cmp BYTE PTR [rax], 0 + 000c9 75 d5 jne SHORT $LL2@stbi__hdr_ +; Line 6750 + 000cb 85 ff test edi, edi + 000cd 0f 84 34 07 00 + 00 je $LN218@stbi__hdr_ +; Line 6754 + 000d3 48 8d 54 24 50 lea rdx, QWORD PTR buffer$[rsp] + 000d8 48 8b cb mov rcx, rbx + 000db e8 00 00 00 00 call stbi__hdr_gettoken +; Line 6755 + 000e0 bf 03 00 00 00 mov edi, 3 + 000e5 48 89 44 24 40 mov QWORD PTR token$[rsp], rax + 000ea 44 8b c7 mov r8d, edi + 000ed 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_03HKAKGGJN@?9Y?5@ - 00104 48 8b c8 mov rcx, rax - 00107 ff 15 00 00 00 + 000f4 48 8b c8 mov rcx, rax + 000f7 ff 15 00 00 00 00 call QWORD PTR __imp_strncmp - 0010d 85 c0 test eax, eax - 0010f 74 3e je SHORT $LN34@stbi__hdr_ -$LN332@stbi__hdr_: - -; 6855 : } - - 00111 8b 15 00 00 00 + 000fd 85 c0 test eax, eax + 000ff 74 54 je SHORT $LN34@stbi__hdr_ +$LN319@stbi__hdr_: +; Line 6855 + 00101 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00117 65 48 8b 04 25 + 00107 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00120 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00124 48 8d 15 00 00 + 00110 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00115 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00119 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BI@DCNDPIOH@unsupported?5data?5layout@ - 0012b e9 40 07 00 00 jmp $LN327@stbi__hdr_ -$LN249@stbi__hdr_: - -; 431 : stbi__g_failure_reason = str; - - 00130 8b 15 00 00 00 + 00120 48 89 14 01 mov QWORD PTR [rcx+rax], rdx + 00124 33 c0 xor eax, eax + 00126 e9 59 05 00 00 jmp $LN1@stbi__hdr_ +$LN242@stbi__hdr_: +; Line 431 + 0012b 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00136 65 48 8b 04 25 + 00131 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 + 0013a b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason 0013f 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] 00143 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_07NCIOKENI@not?5HDR@ - -; 6741 : return stbi__errpf("not HDR", "Corrupt HDR image"); - - 0014a e9 21 07 00 00 jmp $LN327@stbi__hdr_ + 0014a 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 6741 + 0014e 33 c0 xor eax, eax + 00150 e9 2f 05 00 00 jmp $LN1@stbi__hdr_ $LN34@stbi__hdr_: - -; 6756 : token += 3; - - 0014f 48 8b 4c 24 48 mov rcx, QWORD PTR token$[rsp] - -; 6757 : height = (int)strtol(token, &token, 10); - - 00154 48 8d 54 24 48 lea rdx, QWORD PTR token$[rsp] - 00159 48 03 cf add rcx, rdi - 0015c 41 b8 0a 00 00 +; Line 6756 + 00155 48 8b 4c 24 40 mov rcx, QWORD PTR token$[rsp] +; Line 6757 + 0015a 48 8d 54 24 40 lea rdx, QWORD PTR token$[rsp] + 0015f 48 03 cf add rcx, rdi + 00162 41 b8 0a 00 00 00 mov r8d, 10 - 00162 48 89 4c 24 48 mov QWORD PTR token$[rsp], rcx - 00167 ff 15 00 00 00 + 00168 48 89 4c 24 40 mov QWORD PTR token$[rsp], rcx + 0016d ff 15 00 00 00 00 call QWORD PTR __imp_strtol - -; 6758 : while (*token == ' ') ++token; - - 0016d 48 8b 4c 24 48 mov rcx, QWORD PTR token$[rsp] - 00172 8b f0 mov esi, eax - 00174 89 44 24 3c mov DWORD PTR height$1$[rsp], eax - 00178 80 39 20 cmp BYTE PTR [rcx], 32 ; 00000020H - 0017b 75 10 jne SHORT $LN6@stbi__hdr_ - 0017d 0f 1f 00 npad 3 +; Line 6758 + 00173 48 8b 4c 24 40 mov rcx, QWORD PTR token$[rsp] + 00178 8b f0 mov esi, eax + 0017a 89 44 24 34 mov DWORD PTR height$1$[rsp], eax + 0017e 80 39 20 cmp BYTE PTR [rcx], 32 ; 00000020H + 00181 75 0d jne SHORT $LN6@stbi__hdr_ $LL5@stbi__hdr_: - 00180 48 ff c1 inc rcx - 00183 48 89 4c 24 48 mov QWORD PTR token$[rsp], rcx - 00188 80 39 20 cmp BYTE PTR [rcx], 32 ; 00000020H - 0018b 74 f3 je SHORT $LL5@stbi__hdr_ + 00183 48 ff c1 inc rcx + 00186 48 89 4c 24 40 mov QWORD PTR token$[rsp], rcx + 0018b 80 39 20 cmp BYTE PTR [rcx], 32 ; 00000020H + 0018e 74 f3 je SHORT $LL5@stbi__hdr_ $LN6@stbi__hdr_: - -; 6759 : if (strncmp(token, "+X ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); - - 0018d 4c 8b c7 mov r8, rdi - 00190 48 8d 15 00 00 +; Line 6759 + 00190 4c 8b c7 mov r8, rdi + 00193 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_03FOKDFDHG@?$CLX?5@ - 00197 ff 15 00 00 00 + 0019a ff 15 00 00 00 00 call QWORD PTR __imp_strncmp - 0019d 85 c0 test eax, eax - 0019f 0f 85 6c ff ff - ff jne $LN332@stbi__hdr_ - -; 6760 : token += 3; - - 001a5 48 8b 4c 24 48 mov rcx, QWORD PTR token$[rsp] - -; 6761 : width = (int)strtol(token, NULL, 10); - - 001aa 44 8d 40 0a lea r8d, QWORD PTR [rax+10] - 001ae 48 03 cf add rcx, rdi - 001b1 33 d2 xor edx, edx - 001b3 48 89 4c 24 48 mov QWORD PTR token$[rsp], rcx - 001b8 ff 15 00 00 00 + 001a0 85 c0 test eax, eax + 001a2 0f 85 59 ff ff + ff jne $LN319@stbi__hdr_ +; Line 6760 + 001a8 48 8b 4c 24 40 mov rcx, QWORD PTR token$[rsp] +; Line 6761 + 001ad 44 8d 40 0a lea r8d, QWORD PTR [rax+10] + 001b1 48 03 cf add rcx, rdi + 001b4 4c 89 ac 24 68 + 04 00 00 mov QWORD PTR [rsp+1128], r13 + 001bc 33 d2 xor edx, edx + 001be 48 89 4c 24 40 mov QWORD PTR token$[rsp], rcx + 001c3 ff 15 00 00 00 00 call QWORD PTR __imp_strtol - 001be 89 44 24 30 mov DWORD PTR width$1$[rsp], eax - -; 6762 : -; 6763 : if (height > STBI_MAX_DIMENSIONS) return stbi__errpf("too large", "Very large image (corrupt?)"); - - 001c2 81 fe 00 00 00 + 001c9 44 8b e8 mov r13d, eax +; Line 6763 + 001cc 81 fe 00 00 00 01 cmp esi, 16777216 ; 01000000H - 001c8 7e 1f jle SHORT $LN36@stbi__hdr_ -$LN333@stbi__hdr_: - -; 6855 : } - - 001ca 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 001d0 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 001d9 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 001dd 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ - 001e4 e9 87 06 00 00 jmp $LN327@stbi__hdr_ -$LN36@stbi__hdr_: - -; 6764 : if (width > STBI_MAX_DIMENSIONS) return stbi__errpf("too large", "Very large image (corrupt?)"); - - 001e9 3d 00 00 00 01 cmp eax, 16777216 ; 01000000H - 001ee 7f da jg SHORT $LN333@stbi__hdr_ - -; 6765 : -; 6766 : *x = width; - - 001f0 41 89 04 24 mov DWORD PTR [r12], eax - -; 6767 : *y = height; - - 001f4 41 89 75 00 mov DWORD PTR [r13], esi - -; 6768 : -; 6769 : if (comp) *comp = 3; - - 001f8 4d 85 f6 test r14, r14 - 001fb 74 03 je SHORT $LN38@stbi__hdr_ - 001fd 41 89 3e mov DWORD PTR [r14], edi + 001d2 0f 8f 0b 06 00 + 00 jg $LN226@stbi__hdr_ +; Line 6764 + 001d8 41 81 fd 00 00 + 00 01 cmp r13d, 16777216 ; 01000000H + 001df 0f 8f fe 05 00 + 00 jg $LN226@stbi__hdr_ +; Line 6766 + 001e5 45 89 2f mov DWORD PTR [r15], r13d +; Line 6769 + 001e8 4c 8b ff mov r15, rdi + 001eb 41 89 34 24 mov DWORD PTR [r12], esi + 001ef 4d 85 f6 test r14, r14 + 001f2 74 03 je SHORT $LN38@stbi__hdr_ + 001f4 45 89 3e mov DWORD PTR [r14], r15d $LN38@stbi__hdr_: - -; 467 : if (a < 0 || b < 0) return 0; - - 00200 45 85 ff test r15d, r15d - 00203 44 8b e8 mov r13d, eax - 00206 41 0f 45 ff cmovne edi, r15d - 0020a 48 89 7c 24 40 mov QWORD PTR tv1792[rsp], rdi - 0020f 85 c0 test eax, eax - 00211 78 b7 js SHORT $LN333@stbi__hdr_ - 00213 85 f6 test esi, esi - 00215 78 b3 js SHORT $LN333@stbi__hdr_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 00217 74 0d je SHORT $LN235@stbi__hdr_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 00219 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 0021e 99 cdq - 0021f f7 fe idiv esi - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00221 44 3b e8 cmp r13d, eax - 00224 7f a4 jg SHORT $LN333@stbi__hdr_ -$LN235@stbi__hdr_: +; Line 467 + 001f7 85 ed test ebp, ebp + 001f9 44 0f 45 fd cmovne r15d, ebp + 001fd 4c 89 7c 24 38 mov QWORD PTR tv1645[rsp], r15 + 00202 45 85 ed test r13d, r13d + 00205 0f 88 d8 05 00 + 00 js $LN226@stbi__hdr_ + 0020b 85 f6 test esi, esi + 0020d 0f 88 d0 05 00 + 00 js $LN226@stbi__hdr_ +; Line 468 + 00213 74 11 je SHORT $LN228@stbi__hdr_ +; Line 470 + 00215 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 0021a 99 cdq + 0021b f7 fe idiv esi +; Line 492 + 0021d 44 3b e8 cmp r13d, eax + 00220 0f 8f bd 05 00 + 00 jg $LN226@stbi__hdr_ +$LN228@stbi__hdr_: 00226 41 8b cd mov ecx, r13d 00229 0f af ce imul ecx, esi - -; 467 : if (a < 0 || b < 0) return 0; - +; Line 467 0022c 85 c9 test ecx, ecx - 0022e 78 9a js SHORT $LN333@stbi__hdr_ - 00230 85 ff test edi, edi - 00232 78 96 js SHORT $LN333@stbi__hdr_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 00234 74 0c je SHORT $LN234@stbi__hdr_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 00236 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 0023b 99 cdq - 0023c f7 ff idiv edi - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 0023e 3b c8 cmp ecx, eax - 00240 7f 88 jg SHORT $LN333@stbi__hdr_ -$LN234@stbi__hdr_: - 00242 8b c7 mov eax, edi - 00244 41 0f af c5 imul eax, r13d - 00248 0f af c6 imul eax, esi - -; 467 : if (a < 0 || b < 0) return 0; - - 0024b 85 c0 test eax, eax - 0024d 0f 88 77 ff ff - ff js $LN333@stbi__hdr_ - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00253 3d ff ff ff 1f cmp eax, 536870911 ; 1fffffffH - 00258 0f 8f 6c ff ff - ff jg $LN333@stbi__hdr_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 0025e 85 f6 test esi, esi - 00260 74 11 je SHORT $LN328@stbi__hdr_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 00262 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00267 99 cdq - 00268 f7 fe idiv esi - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 0026a 44 3b e8 cmp r13d, eax - 0026d 0f 8f 00 04 00 - 00 jg $LN225@stbi__hdr_ -$LN328@stbi__hdr_: - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 00273 41 8b cd mov ecx, r13d - 00276 0f af ce imul ecx, esi - 00279 85 ff test edi, edi - 0027b 75 08 jne SHORT $LN115@stbi__hdr_ - 0027d 41 8b c5 mov eax, r13d - 00280 0f af c7 imul eax, edi - 00283 eb 16 jmp SHORT $LN329@stbi__hdr_ -$LN115@stbi__hdr_: - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 00285 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 0028a 99 cdq - 0028b f7 ff idiv edi - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 0028d 3b c8 cmp ecx, eax - 0028f 0f 8f de 03 00 - 00 jg $LN225@stbi__hdr_ - 00295 8b c7 mov eax, edi - 00297 41 0f af c5 imul eax, r13d -$LN329@stbi__hdr_: - -; 516 : return stbi__malloc(a * b * c * d + add); - - 0029b 89 44 24 38 mov DWORD PTR tv1712[rsp], eax - 0029f 0f af c6 imul eax, esi - 002a2 c1 e0 02 shl eax, 2 - 002a5 48 63 c8 movsxd rcx, eax - -; 438 : return STBI_MALLOC(size); - - 002a8 ff 15 00 00 00 + 0022e 0f 88 af 05 00 + 00 js $LN226@stbi__hdr_ + 00234 45 85 ff test r15d, r15d + 00237 0f 88 a6 05 00 + 00 js $LN226@stbi__hdr_ +; Line 468 + 0023d 74 11 je SHORT $LN227@stbi__hdr_ +; Line 470 + 0023f b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 00244 99 cdq + 00245 41 f7 ff idiv r15d +; Line 492 + 00248 3b c8 cmp ecx, eax + 0024a 0f 8f 93 05 00 + 00 jg $LN226@stbi__hdr_ +$LN227@stbi__hdr_: + 00250 41 8b c7 mov eax, r15d + 00253 41 0f af c5 imul eax, r13d + 00257 0f af c6 imul eax, esi +; Line 467 + 0025a 85 c0 test eax, eax + 0025c 0f 88 81 05 00 + 00 js $LN226@stbi__hdr_ +; Line 492 + 00262 3d ff ff ff 1f cmp eax, 536870911 ; 1fffffffH + 00267 0f 8f 76 05 00 + 00 jg $LN226@stbi__hdr_ +; Line 468 + 0026d 85 f6 test esi, esi + 0026f 75 08 jne SHORT $LN104@stbi__hdr_ + 00271 8b ce mov ecx, esi + 00273 41 0f af cd imul ecx, r13d + 00277 eb 17 jmp SHORT $LN232@stbi__hdr_ +$LN104@stbi__hdr_: +; Line 470 + 00279 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 0027e 99 cdq + 0027f f7 fe idiv esi +; Line 492 + 00281 44 3b e8 cmp r13d, eax + 00284 0f 8f cd 03 00 + 00 jg $LN219@stbi__hdr_ + 0028a 41 8b cd mov ecx, r13d + 0028d 0f af ce imul ecx, esi +$LN232@stbi__hdr_: +; Line 468 + 00290 45 85 ff test r15d, r15d + 00293 75 09 jne SHORT $LN109@stbi__hdr_ + 00295 41 8b c5 mov eax, r13d + 00298 41 0f af c7 imul eax, r15d + 0029c eb 18 jmp SHORT $LN315@stbi__hdr_ +$LN109@stbi__hdr_: +; Line 470 + 0029e b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH + 002a3 99 cdq + 002a4 41 f7 ff idiv r15d +; Line 492 + 002a7 3b c8 cmp ecx, eax + 002a9 0f 8f a8 03 00 + 00 jg $LN219@stbi__hdr_ + 002af 41 8b c7 mov eax, r15d + 002b2 41 0f af c5 imul eax, r13d +$LN315@stbi__hdr_: +; Line 516 + 002b6 89 44 24 48 mov DWORD PTR tv1574[rsp], eax + 002ba 0f af c6 imul eax, esi + 002bd c1 e0 02 shl eax, 2 + 002c0 48 63 c8 movsxd rcx, eax +; Line 438 + 002c3 ff 15 00 00 00 00 call QWORD PTR __imp_malloc - 002ae 48 89 44 24 28 mov QWORD PTR hdr_data$1$[rsp], rax - 002b3 4c 8b e0 mov r12, rax - -; 6770 : if (req_comp == 0) req_comp = 3; -; 6771 : -; 6772 : if (!stbi__mad4sizes_valid(width, height, req_comp, sizeof(float), 0)) -; 6773 : return stbi__errpf("too large", "HDR image is too large"); -; 6774 : -; 6775 : // Read data -; 6776 : hdr_data = (float*)stbi__malloc_mad4(width, height, req_comp, sizeof(float), 0); -; 6777 : if (!hdr_data) - - 002b6 48 85 c0 test rax, rax - 002b9 0f 84 b4 03 00 - 00 je $LN225@stbi__hdr_ - -; 6778 : return stbi__errpf("outofmem", "Out of memory"); -; 6779 : -; 6780 : // Load image data -; 6781 : // image data is stored as some number of sca -; 6782 : if (width < 8 || width >= 32768) { - - 002bf 41 8d 4d f8 lea ecx, DWORD PTR [r13-8] - 002c3 81 f9 f7 7f 00 + 002c9 48 89 44 24 28 mov QWORD PTR hdr_data$1$[rsp], rax +; Line 6777 + 002ce 48 85 c0 test rax, rax + 002d1 0f 84 80 03 00 + 00 je $LN219@stbi__hdr_ +; Line 6782 + 002d7 41 8d 4d f8 lea ecx, DWORD PTR [r13-8] + 002db 81 f9 f7 7f 00 00 cmp ecx, 32759 ; 00007ff7H - 002c9 0f 87 a4 04 00 + 002e1 0f 87 9e 04 00 00 ja $LN44@stbi__hdr_ - -; 6790 : } -; 6791 : } -; 6792 : } -; 6793 : else { -; 6794 : // Read RLE-encoded data -; 6795 : scanline = NULL; - - 002cf 33 c0 xor eax, eax - 002d1 48 89 44 24 20 mov QWORD PTR scanline$1$[rsp], rax - -; 6796 : -; 6797 : for (j = 0; j < height; ++j) { - - 002d6 89 44 24 34 mov DWORD PTR j$1$[rsp], eax - 002da 85 f6 test esi, esi - 002dc 0f 8e 6f 05 00 - 00 jle $LN8@stbi__hdr_ - 002e2 89 44 24 50 mov DWORD PTR tv1713[rsp], eax - 002e6 66 66 0f 1f 84 - 00 00 00 00 00 npad 10 +; Line 6795 + 002e7 45 33 e4 xor r12d, r12d +; Line 6797 + 002ea 44 89 64 24 30 mov DWORD PTR j$1$[rsp], r12d + 002ef 85 f6 test esi, esi + 002f1 0f 8e 4e 03 00 + 00 jle $LN247@stbi__hdr_ + 002f7 44 89 64 24 20 mov DWORD PTR tv1575[rsp], r12d + 002fc 0f 1f 40 00 npad 4 $LL15@stbi__hdr_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 002f0 48 8b 83 c0 00 +; Line 1077 + 00300 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 002f7 48 3b 83 c8 00 + 00307 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 002fe 73 10 jae SHORT $LN136@stbi__hdr_ - -; 1078 : return *s->img_buffer++; - - 00300 44 0f b6 38 movzx r15d, BYTE PTR [rax] - 00304 48 ff c0 inc rax - 00307 48 89 83 c0 00 + 0030e 73 10 jae SHORT $LN130@stbi__hdr_ +; Line 1078 + 00310 44 0f b6 30 movzx r14d, BYTE PTR [rax] + 00314 48 ff c0 inc rax + 00317 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 0030e eb 28 jmp SHORT $LN330@stbi__hdr_ -$LN136@stbi__hdr_: - -; 1079 : if (s->read_from_callbacks) { - - 00310 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 - 00314 74 1f je SHORT $LN137@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - - 00316 48 8b cb mov rcx, rbx - 00319 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 0031e 48 8b 83 c0 00 + 0031e eb 28 jmp SHORT $LN316@stbi__hdr_ +$LN130@stbi__hdr_: +; Line 1079 + 00320 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 + 00324 74 1f je SHORT $LN131@stbi__hdr_ +; Line 1080 + 00326 48 8b cb mov rcx, rbx + 00329 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 0032e 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00325 44 0f b6 38 movzx r15d, BYTE PTR [rax] - 00329 48 ff c0 inc rax - 0032c 48 89 83 c0 00 + 00335 44 0f b6 30 movzx r14d, BYTE PTR [rax] + 00339 48 ff c0 inc rax + 0033c 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 00333 eb 03 jmp SHORT $LN330@stbi__hdr_ -$LN137@stbi__hdr_: - -; 1082 : } -; 1083 : return 0; - - 00335 45 32 ff xor r15b, r15b -$LN330@stbi__hdr_: - -; 6798 : c1 = stbi__get8(s); - - 00338 ba 30 00 00 00 mov edx, 48 ; 00000030H - 0033d 48 8b cb mov rcx, rbx - 00340 4c 8d 34 1a lea r14, QWORD PTR [rdx+rbx] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00344 48 3b 83 c8 00 - 00 00 cmp rax, QWORD PTR [rbx+200] - 0034b 73 0f jae SHORT $LN140@stbi__hdr_ - -; 1078 : return *s->img_buffer++; - - 0034d 0f b6 30 movzx esi, BYTE PTR [rax] - 00350 48 ff c0 inc rax - 00353 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 0035a eb 27 jmp SHORT $LN139@stbi__hdr_ -$LN140@stbi__hdr_: - -; 1079 : if (s->read_from_callbacks) { - - 0035c 41 83 3e 00 cmp DWORD PTR [r14], 0 - 00360 74 1e je SHORT $LN141@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - - 00362 48 8b cb mov rcx, rbx - 00365 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 0036a 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] - 00371 0f b6 30 movzx esi, BYTE PTR [rax] - 00374 48 ff c0 inc rax - 00377 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 0037e eb 03 jmp SHORT $LN139@stbi__hdr_ -$LN141@stbi__hdr_: - -; 1082 : } -; 1083 : return 0; - - 00380 40 32 f6 xor sil, sil -$LN139@stbi__hdr_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00383 48 3b 83 c8 00 - 00 00 cmp rax, QWORD PTR [rbx+200] - 0038a 73 0f jae SHORT $LN132@stbi__hdr_ - -; 1078 : return *s->img_buffer++; - - 0038c 0f b6 08 movzx ecx, BYTE PTR [rax] - 0038f 48 ff c0 inc rax - 00392 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 00399 eb 26 jmp SHORT $LN131@stbi__hdr_ -$LN132@stbi__hdr_: - -; 1079 : if (s->read_from_callbacks) { - - 0039b 41 83 3e 00 cmp DWORD PTR [r14], 0 - 0039f 74 1e je SHORT $LN133@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - - 003a1 48 8b cb mov rcx, rbx - 003a4 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 003a9 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] - 003b0 0f b6 08 movzx ecx, BYTE PTR [rax] - 003b3 48 ff c0 inc rax - 003b6 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 003bd eb 02 jmp SHORT $LN131@stbi__hdr_ -$LN133@stbi__hdr_: - -; 1082 : } -; 1083 : return 0; - - 003bf 32 c9 xor cl, cl + 00343 eb 03 jmp SHORT $LN316@stbi__hdr_ $LN131@stbi__hdr_: - -; 6799 : c2 = stbi__get8(s); -; 6800 : len = stbi__get8(s); - - 003c1 0f b6 f9 movzx edi, cl - -; 6801 : if (c1 != 2 || c2 != 2 || (len & 0x80)) { - - 003c4 41 80 ff 02 cmp r15b, 2 - 003c8 0f 85 2c 03 00 - 00 jne $LN46@stbi__hdr_ - 003ce 41 3a f7 cmp sil, r15b - 003d1 0f 85 23 03 00 - 00 jne $LN46@stbi__hdr_ - 003d7 40 84 ff test dil, dil - 003da 0f 88 1a 03 00 - 00 js $LN46@stbi__hdr_ - -; 6814 : } -; 6815 : len <<= 8; - - 003e0 c1 e7 08 shl edi, 8 - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 003e3 48 3b 83 c8 00 +; Line 1083 + 00345 45 32 f6 xor r14b, r14b +$LN316@stbi__hdr_: +; Line 6798 + 00348 ba 30 00 00 00 mov edx, 48 ; 00000030H + 0034d 48 8b cb mov rcx, rbx + 00350 48 8d 2c 1a lea rbp, QWORD PTR [rdx+rbx] +; Line 1077 + 00354 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 003ea 73 0f jae SHORT $LN162@stbi__hdr_ - -; 1078 : return *s->img_buffer++; - - 003ec 0f b6 08 movzx ecx, BYTE PTR [rax] - 003ef 48 ff c0 inc rax - 003f2 48 89 83 c0 00 + 0035b 73 0f jae SHORT $LN134@stbi__hdr_ +; Line 1078 + 0035d 0f b6 30 movzx esi, BYTE PTR [rax] + 00360 48 ff c0 inc rax + 00363 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 003f9 eb 26 jmp SHORT $LN161@stbi__hdr_ -$LN162@stbi__hdr_: - -; 1079 : if (s->read_from_callbacks) { - - 003fb 41 83 3e 00 cmp DWORD PTR [r14], 0 - 003ff 74 1e je SHORT $LN163@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - - 00401 48 8b cb mov rcx, rbx - 00404 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 00409 48 8b 83 c0 00 + 0036a eb 27 jmp SHORT $LN133@stbi__hdr_ +$LN134@stbi__hdr_: +; Line 1079 + 0036c 83 7d 00 00 cmp DWORD PTR [rbp], 0 + 00370 74 1e je SHORT $LN135@stbi__hdr_ +; Line 1080 + 00372 48 8b cb mov rcx, rbx + 00375 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 0037a 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - 00410 0f b6 08 movzx ecx, BYTE PTR [rax] - 00413 48 ff c0 inc rax - 00416 48 89 83 c0 00 + 00381 0f b6 30 movzx esi, BYTE PTR [rax] + 00384 48 ff c0 inc rax + 00387 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 0041d eb 02 jmp SHORT $LN161@stbi__hdr_ -$LN163@stbi__hdr_: - -; 1082 : } -; 1083 : return 0; - - 0041f 32 c9 xor cl, cl -$LN161@stbi__hdr_: - -; 6816 : len |= stbi__get8(s); - - 00421 0f b6 c1 movzx eax, cl - 00424 0b c7 or eax, edi - -; 6817 : if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); } - - 00426 41 3b c5 cmp eax, r13d - 00429 0f 85 98 02 00 - 00 jne $LN199@stbi__hdr_ - -; 6818 : if (scanline == NULL) { - - 0042f 4c 8b 4c 24 20 mov r9, QWORD PTR scanline$1$[rsp] - 00434 4d 85 c9 test r9, r9 - 00437 75 22 jne SHORT $LN49@stbi__hdr_ - -; 502 : return stbi__malloc(a * b + add); - - 00439 42 8d 04 ad 00 + 0038e eb 03 jmp SHORT $LN133@stbi__hdr_ +$LN135@stbi__hdr_: +; Line 1083 + 00390 40 32 f6 xor sil, sil +$LN133@stbi__hdr_: +; Line 1077 + 00393 48 3b 83 c8 00 + 00 00 cmp rax, QWORD PTR [rbx+200] + 0039a 73 0f jae SHORT $LN126@stbi__hdr_ +; Line 1078 + 0039c 0f b6 08 movzx ecx, BYTE PTR [rax] + 0039f 48 ff c0 inc rax + 003a2 48 89 83 c0 00 + 00 00 mov QWORD PTR [rbx+192], rax + 003a9 eb 26 jmp SHORT $LN125@stbi__hdr_ +$LN126@stbi__hdr_: +; Line 1079 + 003ab 83 7d 00 00 cmp DWORD PTR [rbp], 0 + 003af 74 1e je SHORT $LN127@stbi__hdr_ +; Line 1080 + 003b1 48 8b cb mov rcx, rbx + 003b4 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 003b9 48 8b 83 c0 00 + 00 00 mov rax, QWORD PTR [rbx+192] + 003c0 0f b6 08 movzx ecx, BYTE PTR [rax] + 003c3 48 ff c0 inc rax + 003c6 48 89 83 c0 00 + 00 00 mov QWORD PTR [rbx+192], rax + 003cd eb 02 jmp SHORT $LN125@stbi__hdr_ +$LN127@stbi__hdr_: +; Line 1083 + 003cf 32 c9 xor cl, cl +$LN125@stbi__hdr_: +; Line 6800 + 003d1 0f b6 f9 movzx edi, cl +; Line 6801 + 003d4 41 80 fe 02 cmp r14b, 2 + 003d8 0f 85 35 03 00 + 00 jne $LN46@stbi__hdr_ + 003de 41 3a f6 cmp sil, r14b + 003e1 0f 85 2c 03 00 + 00 jne $LN46@stbi__hdr_ + 003e7 40 84 ff test dil, dil + 003ea 0f 88 23 03 00 + 00 js $LN46@stbi__hdr_ +; Line 6815 + 003f0 c1 e7 08 shl edi, 8 +; Line 1077 + 003f3 48 3b 83 c8 00 + 00 00 cmp rax, QWORD PTR [rbx+200] + 003fa 73 0f jae SHORT $LN156@stbi__hdr_ +; Line 1078 + 003fc 0f b6 08 movzx ecx, BYTE PTR [rax] + 003ff 48 ff c0 inc rax + 00402 48 89 83 c0 00 + 00 00 mov QWORD PTR [rbx+192], rax + 00409 eb 26 jmp SHORT $LN155@stbi__hdr_ +$LN156@stbi__hdr_: +; Line 1079 + 0040b 83 7d 00 00 cmp DWORD PTR [rbp], 0 + 0040f 74 1e je SHORT $LN157@stbi__hdr_ +; Line 1080 + 00411 48 8b cb mov rcx, rbx + 00414 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00419 48 8b 83 c0 00 + 00 00 mov rax, QWORD PTR [rbx+192] + 00420 0f b6 08 movzx ecx, BYTE PTR [rax] + 00423 48 ff c0 inc rax + 00426 48 89 83 c0 00 + 00 00 mov QWORD PTR [rbx+192], rax + 0042d eb 02 jmp SHORT $LN155@stbi__hdr_ +$LN157@stbi__hdr_: +; Line 1083 + 0042f 32 c9 xor cl, cl +$LN155@stbi__hdr_: +; Line 6816 + 00431 0f b6 c1 movzx eax, cl + 00434 0b c7 or eax, edi +; Line 6817 + 00436 41 3b c5 cmp eax, r13d + 00439 0f 85 9c 02 00 + 00 jne $LN193@stbi__hdr_ +; Line 6818 + 0043f 4d 85 e4 test r12, r12 + 00442 75 1d jne SHORT $LN49@stbi__hdr_ +; Line 502 + 00444 42 8d 04 ad 00 00 00 00 lea eax, DWORD PTR [r13*4] - 00441 48 63 c8 movsxd rcx, eax - -; 438 : return STBI_MALLOC(size); - - 00444 ff 15 00 00 00 + 0044c 48 63 c8 movsxd rcx, eax +; Line 438 + 0044f ff 15 00 00 00 00 call QWORD PTR __imp_malloc - 0044a 48 89 44 24 20 mov QWORD PTR scanline$1$[rsp], rax - 0044f 4c 8b c8 mov r9, rax - -; 6819 : scanline = (stbi_uc*)stbi__malloc_mad2(width, 4, 0); -; 6820 : if (!scanline) { - - 00452 48 85 c0 test rax, rax - 00455 0f 84 0f 02 00 - 00 je $LN200@stbi__hdr_ + 00455 4c 8b e0 mov r12, rax +; Line 6820 + 00458 48 85 c0 test rax, rax + 0045b 0f 84 eb 01 00 + 00 je $LN194@stbi__hdr_ $LN49@stbi__hdr_: - -; 6822 : return stbi__errpf("outofmem", "Out of memory"); -; 6823 : } -; 6824 : } -; 6825 : -; 6826 : for (k = 0; k < 4; ++k) { - - 0045b 45 33 e4 xor r12d, r12d - 0045e 66 90 npad 2 +; Line 6826 + 00461 45 33 ff xor r15d, r15d $LL18@stbi__hdr_: - -; 6827 : int nleft; -; 6828 : i = 0; - - 00460 45 33 f6 xor r14d, r14d - 00463 45 33 ff xor r15d, r15d - -; 6829 : while ((nleft = width - i) > 0) { - - 00466 41 8b f5 mov esi, r13d - 00469 45 85 ed test r13d, r13d - 0046c 0f 8e 62 01 00 +; Line 6828 + 00464 33 ed xor ebp, ebp + 00466 45 33 f6 xor r14d, r14d +; Line 6829 + 00469 41 8b f5 mov esi, r13d + 0046c 45 85 ed test r13d, r13d + 0046f 0f 8e 59 01 00 00 jle $LN16@stbi__hdr_ - 00472 0f 1f 40 00 66 - 66 0f 1f 84 00 - 00 00 00 00 npad 14 + 00475 66 66 66 0f 1f + 84 00 00 00 00 + 00 npad 11 $LL19@stbi__hdr_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00480 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00487 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 0048e 72 19 jb SHORT $LN331@stbi__hdr_ - -; 1079 : if (s->read_from_callbacks) { - + 0048e 72 19 jb SHORT $LN317@stbi__hdr_ +; Line 1079 00490 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 - 00494 0f 84 f8 01 00 - 00 je $LN196@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - + 00494 0f 84 0c 02 00 + 00 je $LN191@stbi__hdr_ +; Line 1080 0049a 48 8b cb mov rcx, rbx 0049d e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 004a2 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] -$LN331@stbi__hdr_: - -; 6830 : count = stbi__get8(s); -; 6831 : if (count > 128) { - +$LN317@stbi__hdr_: +; Line 6831 004a9 0f b6 38 movzx edi, BYTE PTR [rax] 004ac 48 ff c0 inc rax 004af 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 004b6 40 80 ff 80 cmp dil, 128 ; 00000080H - 004ba 0f 86 84 00 00 + 004ba 0f 86 81 00 00 00 jbe $LN50@stbi__hdr_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 004c0 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 004c7 73 0f jae SHORT $LN154@stbi__hdr_ - -; 1078 : return *s->img_buffer++; - + 004c7 73 0f jae SHORT $LN148@stbi__hdr_ +; Line 1078 004c9 0f b6 10 movzx edx, BYTE PTR [rax] 004cc 48 ff c0 inc rax 004cf 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 004d6 eb 26 jmp SHORT $LN153@stbi__hdr_ -$LN154@stbi__hdr_: - -; 1079 : if (s->read_from_callbacks) { - + 004d6 eb 26 jmp SHORT $LN147@stbi__hdr_ +$LN148@stbi__hdr_: +; Line 1079 004d8 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 - 004dc 74 1e je SHORT $LN155@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - + 004dc 74 1e je SHORT $LN149@stbi__hdr_ +; Line 1080 004de 48 8b cb mov rcx, rbx 004e1 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 004e6 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 004ed 0f b6 10 movzx edx, BYTE PTR [rax] 004f0 48 ff c0 inc rax 004f3 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 004fa eb 02 jmp SHORT $LN153@stbi__hdr_ -$LN155@stbi__hdr_: - -; 1082 : } -; 1083 : return 0; - + 004fa eb 02 jmp SHORT $LN147@stbi__hdr_ +$LN149@stbi__hdr_: +; Line 1083 004fc 32 d2 xor dl, dl -$LN153@stbi__hdr_: - -; 6832 : // Run -; 6833 : value = stbi__get8(s); -; 6834 : count -= 128; - +$LN147@stbi__hdr_: +; Line 6834 004fe 40 80 c7 80 add dil, 128 ; 00000080H - -; 6835 : if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } - - 00502 0f 84 8a 01 00 - 00 je $LN196@stbi__hdr_ +; Line 6835 + 00502 0f 84 9e 01 00 + 00 je $LN191@stbi__hdr_ 00508 44 0f b6 c7 movzx r8d, dil 0050c 44 3b c6 cmp r8d, esi - 0050f 0f 87 7d 01 00 - 00 ja $LN196@stbi__hdr_ - -; 6836 : for (z = 0; z < count; ++z) - - 00515 4c 8b 4c 24 20 mov r9, QWORD PTR scanline$1$[rsp] - 0051a 40 84 ff test dil, dil - 0051d 0f 84 a3 00 00 + 0050f 0f 87 91 01 00 + 00 ja $LN191@stbi__hdr_ +; Line 6836 + 00515 40 84 ff test dil, dil + 00518 0f 84 a3 00 00 00 je $LN25@stbi__hdr_ - 00523 4b 8d 04 bc lea rax, QWORD PTR [r12+r15*4] - 00527 45 03 f0 add r14d, r8d - 0052a 49 03 c1 add rax, r9 - 0052d 41 8b c8 mov ecx, r8d - 00530 4d 03 f8 add r15, r8 + 0051e 4b 8d 04 b7 lea rax, QWORD PTR [r15+r14*4] + 00522 41 03 e8 add ebp, r8d + 00525 49 03 c4 add rax, r12 + 00528 41 8b c8 mov ecx, r8d + 0052b 4d 03 f0 add r14, r8 + 0052e 66 90 npad 2 $LL23@stbi__hdr_: - -; 6837 : scanline[i++ * 4 + k] = value; - - 00533 88 10 mov BYTE PTR [rax], dl - 00535 48 8d 40 04 lea rax, QWORD PTR [rax+4] - 00539 48 83 e9 01 sub rcx, 1 - 0053d 75 f4 jne SHORT $LL23@stbi__hdr_ - -; 6838 : } - - 0053f e9 82 00 00 00 jmp $LN25@stbi__hdr_ +; Line 6837 + 00530 88 10 mov BYTE PTR [rax], dl + 00532 48 8d 40 04 lea rax, QWORD PTR [rax+4] + 00536 48 83 e9 01 sub rcx, 1 + 0053a 75 f4 jne SHORT $LL23@stbi__hdr_ +; Line 6838 + 0053c e9 80 00 00 00 jmp $LN25@stbi__hdr_ $LN50@stbi__hdr_: - -; 6839 : else { -; 6840 : // Dump -; 6841 : if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } - - 00544 40 84 ff test dil, dil - 00547 0f 84 45 01 00 - 00 je $LN196@stbi__hdr_ - 0054d 40 0f b6 c7 movzx eax, dil - 00551 3b c6 cmp eax, esi - 00553 0f 87 39 01 00 - 00 ja $LN196@stbi__hdr_ - -; 6842 : for (z = 0; z < count; ++z) - - 00559 40 84 ff test dil, dil - 0055c 74 63 je SHORT $LN256@stbi__hdr_ - 0055e 4b 8d 3c bc lea rdi, QWORD PTR [r12+r15*4] - 00562 44 03 f0 add r14d, eax - 00565 48 03 7c 24 20 add rdi, QWORD PTR scanline$1$[rsp] - 0056a 8b f0 mov esi, eax - 0056c 4c 03 f8 add r15, rax - 0056f 90 npad 1 +; Line 6841 + 00541 40 84 ff test dil, dil + 00544 0f 84 5c 01 00 + 00 je $LN191@stbi__hdr_ + 0054a 40 0f b6 c7 movzx eax, dil + 0054e 3b c6 cmp eax, esi + 00550 0f 87 50 01 00 + 00 ja $LN191@stbi__hdr_ +; Line 6842 + 00556 40 84 ff test dil, dil + 00559 74 66 je SHORT $LN25@stbi__hdr_ + 0055b 4b 8d 3c b7 lea rdi, QWORD PTR [r15+r14*4] + 0055f 03 e8 add ebp, eax + 00561 49 03 fc add rdi, r12 + 00564 8b f0 mov esi, eax + 00566 4c 03 f0 add r14, rax + 00569 0f 1f 80 00 00 + 00 00 npad 7 $LL26@stbi__hdr_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00570 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00577 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] - 0057e 73 0f jae SHORT $LN150@stbi__hdr_ - -; 1078 : return *s->img_buffer++; - + 0057e 73 0f jae SHORT $LN144@stbi__hdr_ +; Line 1078 00580 0f b6 08 movzx ecx, BYTE PTR [rax] 00583 48 ff c0 inc rax 00586 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 0058d eb 26 jmp SHORT $LN149@stbi__hdr_ -$LN150@stbi__hdr_: - -; 1079 : if (s->read_from_callbacks) { - + 0058d eb 26 jmp SHORT $LN143@stbi__hdr_ +$LN144@stbi__hdr_: +; Line 1079 0058f 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 - 00593 74 1e je SHORT $LN151@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - + 00593 74 1e je SHORT $LN145@stbi__hdr_ +; Line 1080 00595 48 8b cb mov rcx, rbx 00598 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0059d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 005a4 0f b6 08 movzx ecx, BYTE PTR [rax] 005a7 48 ff c0 inc rax 005aa 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - 005b1 eb 02 jmp SHORT $LN149@stbi__hdr_ -$LN151@stbi__hdr_: - -; 1082 : } -; 1083 : return 0; - + 005b1 eb 02 jmp SHORT $LN143@stbi__hdr_ +$LN145@stbi__hdr_: +; Line 1083 005b3 32 c9 xor cl, cl -$LN149@stbi__hdr_: - -; 6843 : scanline[i++ * 4 + k] = stbi__get8(s); - +$LN143@stbi__hdr_: +; Line 6843 005b5 88 0f mov BYTE PTR [rdi], cl 005b7 48 83 c7 04 add rdi, 4 005bb 48 83 ee 01 sub rsi, 1 005bf 75 af jne SHORT $LL26@stbi__hdr_ -$LN256@stbi__hdr_: - -; 6829 : while ((nleft = width - i) > 0) { - - 005c1 4c 8b 4c 24 20 mov r9, QWORD PTR scanline$1$[rsp] $LN25@stbi__hdr_: - 005c6 41 8b f5 mov esi, r13d - 005c9 41 2b f6 sub esi, r14d - 005cc 85 f6 test esi, esi - 005ce 0f 8f ac fe ff +; Line 6829 + 005c1 41 8b f5 mov esi, r13d + 005c4 2b f5 sub esi, ebp + 005c6 85 f6 test esi, esi + 005c8 0f 8f b2 fe ff ff jg $LL19@stbi__hdr_ $LN16@stbi__hdr_: - -; 6822 : return stbi__errpf("outofmem", "Out of memory"); -; 6823 : } -; 6824 : } -; 6825 : -; 6826 : for (k = 0; k < 4; ++k) { - - 005d4 49 ff c4 inc r12 - 005d7 49 83 fc 04 cmp r12, 4 - 005db 0f 8c 7f fe ff +; Line 6826 + 005ce 49 ff c7 inc r15 + 005d1 49 83 ff 04 cmp r15, 4 + 005d5 0f 8c 89 fe ff ff jl $LL18@stbi__hdr_ - -; 6844 : } -; 6845 : } -; 6846 : } -; 6847 : for (i = 0; i < width; ++i) - - 005e1 4c 8b 64 24 28 mov r12, QWORD PTR hdr_data$1$[rsp] - 005e6 45 85 ed test r13d, r13d - 005e9 7e 45 jle SHORT $LN13@stbi__hdr_ - 005eb 48 63 44 24 50 movsxd rax, DWORD PTR tv1713[rsp] - 005f0 49 8b f9 mov rdi, r9 - 005f3 4c 63 7c 24 40 movsxd r15, DWORD PTR tv1792[rsp] - 005f8 45 8b f5 mov r14d, r13d - 005fb 4c 8b 6c 24 40 mov r13, QWORD PTR tv1792[rsp] - 00600 49 8d 34 84 lea rsi, QWORD PTR [r12+rax*4] - 00604 49 c1 e7 02 shl r15, 2 - 00608 0f 1f 84 00 00 - 00 00 00 npad 8 +; Line 6847 + 005db 4c 8b 7c 24 38 mov r15, QWORD PTR tv1645[rsp] + 005e0 45 85 ed test r13d, r13d + 005e3 7e 36 jle SHORT $LN13@stbi__hdr_ + 005e5 48 63 44 24 20 movsxd rax, DWORD PTR tv1575[rsp] + 005ea 49 8b fc mov rdi, r12 + 005ed 48 8b 4c 24 28 mov rcx, QWORD PTR hdr_data$1$[rsp] + 005f2 49 8b ed mov rbp, r13 + 005f5 4d 63 f7 movsxd r14, r15d + 005f8 49 c1 e6 02 shl r14, 2 + 005fc 48 8d 34 81 lea rsi, QWORD PTR [rcx+rax*4] $LL29@stbi__hdr_: - -; 6848 : stbi__hdr_convert(hdr_data + (j * width + i) * req_comp, scanline + i * 4, req_comp); - - 00610 45 8b c5 mov r8d, r13d - 00613 48 8b d7 mov rdx, rdi - 00616 48 8b ce mov rcx, rsi - 00619 e8 00 00 00 00 call stbi__hdr_convert - 0061e 49 03 f7 add rsi, r15 - 00621 48 83 c7 04 add rdi, 4 - 00625 49 83 ee 01 sub r14, 1 - 00629 75 e5 jne SHORT $LL29@stbi__hdr_ - 0062b 44 8b 6c 24 30 mov r13d, DWORD PTR width$1$[rsp] +; Line 6848 + 00600 45 8b c7 mov r8d, r15d + 00603 48 8b d7 mov rdx, rdi + 00606 48 8b ce mov rcx, rsi + 00609 e8 00 00 00 00 call stbi__hdr_convert + 0060e 49 03 f6 add rsi, r14 + 00611 48 83 c7 04 add rdi, 4 + 00615 48 83 ed 01 sub rbp, 1 + 00619 75 e5 jne SHORT $LL29@stbi__hdr_ $LN13@stbi__hdr_: - -; 6796 : -; 6797 : for (j = 0; j < height; ++j) { - - 00630 8b 4c 24 34 mov ecx, DWORD PTR j$1$[rsp] - 00634 44 8b 74 24 38 mov r14d, DWORD PTR tv1712[rsp] - 00639 ff c1 inc ecx - 0063b 44 01 74 24 50 add DWORD PTR tv1713[rsp], r14d - 00640 89 4c 24 34 mov DWORD PTR j$1$[rsp], ecx - 00644 3b 4c 24 3c cmp ecx, DWORD PTR height$1$[rsp] - 00648 0f 8c a2 fc ff +; Line 6797 + 0061b 8b 4c 24 30 mov ecx, DWORD PTR j$1$[rsp] + 0061f 8b 7c 24 48 mov edi, DWORD PTR tv1574[rsp] + 00623 ff c1 inc ecx + 00625 01 7c 24 20 add DWORD PTR tv1575[rsp], edi + 00629 89 4c 24 30 mov DWORD PTR j$1$[rsp], ecx + 0062d 3b 4c 24 34 cmp ecx, DWORD PTR height$1$[rsp] + 00631 0f 8c c9 fc ff ff jl $LL15@stbi__hdr_ - -; 6849 : } -; 6850 : if (scanline) - - 0064e 48 8b 4c 24 20 mov rcx, QWORD PTR scanline$1$[rsp] - 00653 48 85 c9 test rcx, rcx - 00656 0f 84 f5 01 00 - 00 je $LN8@stbi__hdr_ - -; 6851 : STBI_FREE(scanline); - - 0065c ff 15 00 00 00 +; Line 6850 + 00637 4d 85 e4 test r12, r12 + 0063a 74 09 je SHORT $LN247@stbi__hdr_ +; Line 6851 + 0063c 49 8b cc mov rcx, r12 + 0063f ff 15 00 00 00 00 call QWORD PTR __imp_free - -; 6852 : } -; 6853 : -; 6854 : return hdr_data; - - 00662 49 8b c4 mov rax, r12 - 00665 e9 11 02 00 00 jmp $LN1@stbi__hdr_ -$LN200@stbi__hdr_: - -; 6821 : STBI_FREE(hdr_data); - - 0066a 49 8b cc mov rcx, r12 - 0066d ff 15 00 00 00 +$LN247@stbi__hdr_: +; Line 6854 + 00645 48 8b 44 24 28 mov rax, QWORD PTR hdr_data$1$[rsp] + 0064a eb 30 jmp SHORT $LN314@stbi__hdr_ +$LN194@stbi__hdr_: +; Line 6821 + 0064c 48 8b 4c 24 28 mov rcx, QWORD PTR hdr_data$1$[rsp] + 00651 ff 15 00 00 00 00 call QWORD PTR __imp_free -$LN225@stbi__hdr_: - -; 6855 : } - - 00673 8b 15 00 00 00 +$LN219@stbi__hdr_: +; Line 431 + 00657 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 00679 65 48 8b 04 25 + 0065d 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 00682 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00686 48 8d 15 00 00 + 00666 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 0066b 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 0066f 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - 0068d e9 de 01 00 00 jmp $LN327@stbi__hdr_ -$LN196@stbi__hdr_: - 00692 48 8b 4c 24 28 mov rcx, QWORD PTR hdr_data$1$[rsp] - 00697 ff 15 00 00 00 - 00 call QWORD PTR __imp_free - 0069d 48 8b 4c 24 20 mov rcx, QWORD PTR scanline$1$[rsp] - 006a2 ff 15 00 00 00 - 00 call QWORD PTR __imp_free - 006a8 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 006ae 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 006b7 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 006bb 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_07DPPMCAKL@corrupt@ - 006c2 e9 a9 01 00 00 jmp $LN327@stbi__hdr_ -$LN199@stbi__hdr_: - -; 6817 : if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); } - - 006c7 49 8b cc mov rcx, r12 - 006ca ff 15 00 00 00 - 00 call QWORD PTR __imp_free - 006d0 48 8b 4c 24 20 mov rcx, QWORD PTR scanline$1$[rsp] - 006d5 ff 15 00 00 00 - 00 call QWORD PTR __imp_free - -; 431 : stbi__g_failure_reason = str; - - 006db 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 006e1 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 006ea 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 006ee 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0CA@JBEOCDFN@invalid?5decoded?5scanline?5length@ - -; 6817 : if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); } - - 006f5 e9 76 01 00 00 jmp $LN327@stbi__hdr_ -$LN46@stbi__hdr_: - -; 6802 : // not run-length encoded, so we have to actually use THIS data as a decoded -; 6803 : // pixel (note this can't be a valid pixel--one of RGB must be >= 128) -; 6804 : stbi_uc rgbe[4]; -; 6805 : rgbe[0] = (stbi_uc)c1; - - 006fa 44 88 7c 24 50 mov BYTE PTR rgbe$17[rsp], r15b - -; 6806 : rgbe[1] = (stbi_uc)c2; - - 006ff 40 88 74 24 51 mov BYTE PTR rgbe$17[rsp+1], sil - -; 6807 : rgbe[2] = (stbi_uc)len; - - 00704 88 4c 24 52 mov BYTE PTR rgbe$17[rsp+2], cl - -; 1077 : if (s->img_buffer < s->img_buffer_end) - - 00708 48 3b 83 c8 00 - 00 00 cmp rax, QWORD PTR [rbx+200] - 0070f 73 0f jae SHORT $LN144@stbi__hdr_ - -; 1078 : return *s->img_buffer++; - - 00711 0f b6 08 movzx ecx, BYTE PTR [rax] - 00714 48 ff c0 inc rax - 00717 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 0071e eb 26 jmp SHORT $LN143@stbi__hdr_ -$LN144@stbi__hdr_: - -; 1079 : if (s->read_from_callbacks) { - - 00720 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 - 00724 74 1e je SHORT $LN145@stbi__hdr_ - -; 1080 : stbi__refill_buffer(s); - - 00726 48 8b cb mov rcx, rbx - 00729 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - - 0072e 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] - 00735 0f b6 08 movzx ecx, BYTE PTR [rax] - 00738 48 ff c0 inc rax - 0073b 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 00742 eb 02 jmp SHORT $LN143@stbi__hdr_ -$LN145@stbi__hdr_: - -; 1082 : } -; 1083 : return 0; - - 00744 32 c9 xor cl, cl -$LN143@stbi__hdr_: - -; 6808 : rgbe[3] = (stbi_uc)stbi__get8(s); -; 6809 : stbi__hdr_convert(hdr_data, rgbe, req_comp); - - 00746 48 8b 7c 24 40 mov rdi, QWORD PTR tv1792[rsp] - 0074b 48 8d 54 24 50 lea rdx, QWORD PTR rgbe$17[rsp] - 00750 88 4c 24 53 mov BYTE PTR rgbe$17[rsp+3], cl - 00754 44 8b c7 mov r8d, edi - 00757 49 8b cc mov rcx, r12 - 0075a e8 00 00 00 00 call stbi__hdr_convert - -; 6810 : i = 1; -; 6811 : j = 0; -; 6812 : STBI_FREE(scanline); - - 0075f 48 8b 4c 24 20 mov rcx, QWORD PTR scanline$1$[rsp] - 00764 45 33 ff xor r15d, r15d - 00767 ff 15 00 00 00 - 00 call QWORD PTR __imp_free - -; 6813 : goto main_decode_loop; // yes, this makes no sense - - 0076d 45 8d 67 01 lea r12d, QWORD PTR [r15+1] - 00771 eb 18 jmp SHORT $main_decode_loop$335 -$LN44@stbi__hdr_: - -; 6783 : // Read flat data -; 6784 : for (j = 0; j < height; ++j) { - - 00773 45 33 ff xor r15d, r15d -$LN9@stbi__hdr_: - 00776 44 3b fe cmp r15d, esi - 00779 0f 8d cd 00 00 - 00 jge $LN254@stbi__hdr_ - -; 6785 : for (i = 0; i < width; ++i) { - - 0077f 45 33 e4 xor r12d, r12d -$LN12@stbi__hdr_: - 00782 45 3b e5 cmp r12d, r13d - 00785 0f 8d b5 00 00 - 00 jge $LN7@stbi__hdr_ -$main_decode_loop$335: - -; 1129 : if (s->io.read) { - - 0078b 4c 8b 73 10 mov r14, QWORD PTR [rbx+16] - 0078f 4d 85 f6 test r14, r14 - 00792 74 55 je SHORT $LN228@stbi__hdr_ - -; 1130 : int blen = (int)(s->img_buffer_end - s->img_buffer); - - 00794 8b b3 c8 00 00 - 00 mov esi, DWORD PTR [rbx+200] - 0079a 2b b3 c0 00 00 - 00 sub esi, DWORD PTR [rbx+192] - -; 1131 : if (blen < n) { - - 007a0 83 fe 04 cmp esi, 4 - 007a3 7d 44 jge SHORT $LN228@stbi__hdr_ - -; 1132 : int res, count; -; 1133 : -; 1134 : memcpy(buffer, s->img_buffer, blen); - - 007a5 48 8b 93 c0 00 - 00 00 mov rdx, QWORD PTR [rbx+192] - 007ac 48 8d 4c 24 50 lea rcx, QWORD PTR rgbe$18[rsp] - 007b1 48 63 fe movsxd rdi, esi - 007b4 4c 8b c7 mov r8, rdi - 007b7 e8 00 00 00 00 call memcpy - -; 1135 : -; 1136 : count = (s->io.read)(s->io_user_data, (char*)buffer + blen, n - blen); - - 007bc 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] - 007c0 48 8d 54 24 50 lea rdx, QWORD PTR rgbe$18[rsp] - 007c5 41 b8 04 00 00 - 00 mov r8d, 4 - 007cb 48 03 d7 add rdx, rdi - 007ce 44 2b c6 sub r8d, esi - 007d1 41 ff d6 call r14 - -; 1137 : res = (count == (n - blen)); -; 1138 : s->img_buffer = s->img_buffer_end; - - 007d4 48 8b 83 c8 00 - 00 00 mov rax, QWORD PTR [rbx+200] - -; 1139 : return res; - - 007db 48 8b 7c 24 40 mov rdi, QWORD PTR tv1792[rsp] - 007e0 48 89 83 c0 00 - 00 00 mov QWORD PTR [rbx+192], rax - 007e7 eb 21 jmp SHORT $LN65@stbi__hdr_ -$LN228@stbi__hdr_: - -; 1140 : } -; 1141 : } -; 1142 : -; 1143 : if (s->img_buffer + n <= s->img_buffer_end) { - - 007e9 48 8b 83 c0 00 - 00 00 mov rax, QWORD PTR [rbx+192] - 007f0 48 8d 48 04 lea rcx, QWORD PTR [rax+4] - 007f4 48 3b 8b c8 00 - 00 00 cmp rcx, QWORD PTR [rbx+200] - 007fb 77 0d ja SHORT $LN65@stbi__hdr_ - -; 1144 : memcpy(buffer, s->img_buffer, n); - - 007fd 8b 00 mov eax, DWORD PTR [rax] - 007ff 89 44 24 50 mov DWORD PTR rgbe$18[rsp], eax - -; 1145 : s->img_buffer += n; - - 00803 48 89 8b c0 00 - 00 00 mov QWORD PTR [rbx+192], rcx -$LN65@stbi__hdr_: - -; 6786 : stbi_uc rgbe[4]; -; 6787 : main_decode_loop: -; 6788 : stbi__getn(s, rgbe, 4); -; 6789 : stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp); - - 0080a 8b c7 mov eax, edi - 0080c 48 8d 54 24 50 lea rdx, QWORD PTR rgbe$18[rsp] - 00811 41 0f af c7 imul eax, r15d - 00815 44 8b c7 mov r8d, edi - 00818 41 0f af c5 imul eax, r13d - 0081c 48 63 c8 movsxd rcx, eax - 0081f 8b c7 mov eax, edi - 00821 41 0f af c4 imul eax, r12d - 00825 48 98 cdqe - 00827 48 03 c8 add rcx, rax - 0082a 48 8b 44 24 28 mov rax, QWORD PTR hdr_data$1$[rsp] - 0082f 48 8d 0c 88 lea rcx, QWORD PTR [rax+rcx*4] - 00833 e8 00 00 00 00 call stbi__hdr_convert - 00838 41 ff c4 inc r12d - 0083b e9 42 ff ff ff jmp $LN12@stbi__hdr_ -$LN7@stbi__hdr_: - -; 6783 : // Read flat data -; 6784 : for (j = 0; j < height; ++j) { - - 00840 8b 74 24 3c mov esi, DWORD PTR height$1$[rsp] - 00844 41 ff c7 inc r15d - 00847 e9 2a ff ff ff jmp $LN9@stbi__hdr_ -$LN254@stbi__hdr_: - 0084c 4c 8b 64 24 28 mov r12, QWORD PTR hdr_data$1$[rsp] -$LN8@stbi__hdr_: - -; 6852 : } -; 6853 : -; 6854 : return hdr_data; - - 00851 49 8b c4 mov rax, r12 - 00854 eb 25 jmp SHORT $LN1@stbi__hdr_ -$LN224@stbi__hdr_: - -; 431 : stbi__g_failure_reason = str; - - 00856 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 0085c 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 00865 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00869 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_0BD@NKJFFLKL@unsupported?5format@ -$LN327@stbi__hdr_: - -; 6855 : } - - 00870 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 00875 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - 00879 33 c0 xor eax, eax +$LN318@stbi__hdr_: + 00676 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 6817 + 0067a 33 c0 xor eax, eax +$LN314@stbi__hdr_: + 0067c 4c 8b ac 24 68 + 04 00 00 mov r13, QWORD PTR [rsp+1128] $LN1@stbi__hdr_: - 0087b 48 8b 8d 60 03 - 00 00 mov rcx, QWORD PTR __$ArrayPad$[rbp-256] - 00882 48 33 cc xor rcx, rsp - 00885 e8 00 00 00 00 call __security_check_cookie - 0088a 48 81 c4 78 04 - 00 00 add rsp, 1144 ; 00000478H - 00891 41 5f pop r15 - 00893 41 5e pop r14 - 00895 41 5d pop r13 - 00897 41 5c pop r12 - 00899 5f pop rdi - 0089a 5e pop rsi - 0089b 5b pop rbx - 0089c 5d pop rbp - 0089d c3 ret 0 +; Line 6855 + 00684 48 8b 8c 24 50 + 04 00 00 mov rcx, QWORD PTR __$ArrayPad$[rsp] + 0068c 48 33 cc xor rcx, rsp + 0068f e8 00 00 00 00 call __security_check_cookie + 00694 48 81 c4 70 04 + 00 00 add rsp, 1136 ; 00000470H + 0069b 41 5f pop r15 + 0069d 41 5e pop r14 + 0069f 41 5c pop r12 + 006a1 5f pop rdi + 006a2 5e pop rsi + 006a3 5d pop rbp + 006a4 5b pop rbx + 006a5 c3 ret 0 +$LN191@stbi__hdr_: +; Line 6841 + 006a6 48 8b 4c 24 28 mov rcx, QWORD PTR hdr_data$1$[rsp] + 006ab ff 15 00 00 00 + 00 call QWORD PTR __imp_free + 006b1 49 8b cc mov rcx, r12 + 006b4 ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 431 + 006ba 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 006c0 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 006c9 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 006ce 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 006d2 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_07DPPMCAKL@corrupt@ +; Line 6841 + 006d9 eb 9b jmp SHORT $LN318@stbi__hdr_ +$LN193@stbi__hdr_: +; Line 6817 + 006db 48 8b 4c 24 28 mov rcx, QWORD PTR hdr_data$1$[rsp] + 006e0 ff 15 00 00 00 + 00 call QWORD PTR __imp_free + 006e6 49 8b cc mov rcx, r12 + 006e9 ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 431 + 006ef 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 006f5 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 006fe b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00703 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00707 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0CA@JBEOCDFN@invalid?5decoded?5scanline?5length@ +; Line 6817 + 0070e e9 63 ff ff ff jmp $LN318@stbi__hdr_ +$LN46@stbi__hdr_: +; Line 6805 + 00713 44 88 74 24 20 mov BYTE PTR rgbe$1[rsp], r14b +; Line 6806 + 00718 40 88 74 24 21 mov BYTE PTR rgbe$1[rsp+1], sil +; Line 6807 + 0071d 88 4c 24 22 mov BYTE PTR rgbe$1[rsp+2], cl +; Line 1077 + 00721 48 3b 83 c8 00 + 00 00 cmp rax, QWORD PTR [rbx+200] + 00728 73 0f jae SHORT $LN138@stbi__hdr_ +; Line 1078 + 0072a 0f b6 08 movzx ecx, BYTE PTR [rax] + 0072d 48 ff c0 inc rax + 00730 48 89 83 c0 00 + 00 00 mov QWORD PTR [rbx+192], rax + 00737 eb 26 jmp SHORT $LN137@stbi__hdr_ +$LN138@stbi__hdr_: +; Line 1079 + 00739 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 + 0073d 74 1e je SHORT $LN139@stbi__hdr_ +; Line 1080 + 0073f 48 8b cb mov rcx, rbx + 00742 e8 00 00 00 00 call stbi__refill_buffer +; Line 1081 + 00747 48 8b 83 c0 00 + 00 00 mov rax, QWORD PTR [rbx+192] + 0074e 0f b6 08 movzx ecx, BYTE PTR [rax] + 00751 48 ff c0 inc rax + 00754 48 89 83 c0 00 + 00 00 mov QWORD PTR [rbx+192], rax + 0075b eb 02 jmp SHORT $LN137@stbi__hdr_ +$LN139@stbi__hdr_: +; Line 1083 + 0075d 32 c9 xor cl, cl +$LN137@stbi__hdr_: +; Line 6808 + 0075f 88 4c 24 23 mov BYTE PTR rgbe$1[rsp+3], cl +; Line 6809 + 00763 48 8d 54 24 20 lea rdx, QWORD PTR rgbe$1[rsp] + 00768 48 8b 4c 24 28 mov rcx, QWORD PTR hdr_data$1$[rsp] + 0076d 45 8b c7 mov r8d, r15d + 00770 e8 00 00 00 00 call stbi__hdr_convert +; Line 6812 + 00775 49 8b cc mov rcx, r12 + 00778 33 ff xor edi, edi + 0077a ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 6813 + 00780 8d 77 01 lea esi, QWORD PTR [rdi+1] + 00783 eb 11 jmp SHORT $main_decode_loop$321 +$LN44@stbi__hdr_: +; Line 6784 + 00785 33 ff xor edi, edi +$LN9@stbi__hdr_: + 00787 3b fe cmp edi, esi + 00789 0f 8d b6 fe ff + ff jge $LN247@stbi__hdr_ +; Line 6785 + 0078f 33 f6 xor esi, esi +$LN12@stbi__hdr_: + 00791 41 3b f5 cmp esi, r13d + 00794 7d 45 jge SHORT $LN7@stbi__hdr_ +$main_decode_loop$321: +; Line 6788 + 00796 41 b8 04 00 00 + 00 mov r8d, 4 + 0079c 48 8d 54 24 48 lea rdx, QWORD PTR rgbe$2[rsp] + 007a1 48 8b cb mov rcx, rbx + 007a4 e8 00 00 00 00 call stbi__getn +; Line 6789 + 007a9 41 8b c7 mov eax, r15d + 007ac 48 8d 54 24 48 lea rdx, QWORD PTR rgbe$2[rsp] + 007b1 0f af c7 imul eax, edi + 007b4 45 8b c7 mov r8d, r15d + 007b7 41 0f af c5 imul eax, r13d + 007bb 48 63 c8 movsxd rcx, eax + 007be 41 8b c7 mov eax, r15d + 007c1 0f af c6 imul eax, esi + 007c4 48 98 cdqe + 007c6 48 03 c8 add rcx, rax + 007c9 48 8b 44 24 28 mov rax, QWORD PTR hdr_data$1$[rsp] + 007ce 48 8d 0c 88 lea rcx, QWORD PTR [rax+rcx*4] + 007d2 e8 00 00 00 00 call stbi__hdr_convert + 007d7 ff c6 inc esi + 007d9 eb b6 jmp SHORT $LN12@stbi__hdr_ +$LN7@stbi__hdr_: +; Line 6784 + 007db 8b 74 24 34 mov esi, DWORD PTR height$1$[rsp] + 007df ff c7 inc edi + 007e1 eb a4 jmp SHORT $LN9@stbi__hdr_ +$LN226@stbi__hdr_: +; Line 431 + 007e3 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 007e9 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 007f2 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 007f7 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 007fb 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ +; Line 6773 + 00802 e9 6f fe ff ff jmp $LN318@stbi__hdr_ +$LN218@stbi__hdr_: +; Line 431 + 00807 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 0080d 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00816 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 0081b 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 0081f 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_0BD@NKJFFLKL@unsupported?5format@ + 00826 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +; Line 6750 + 0082a 33 c0 xor eax, eax + 0082c e9 53 fe ff ff jmp $LN1@stbi__hdr_ stbi__hdr_load ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__pnm_test _TEXT SEGMENT s$ = 48 stbi__pnm_test PROC ; COMDAT - -; 7063 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 7063 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 57 push rdi 00006 48 83 ec 20 sub rsp, 32 ; 00000020H - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0000a 48 8b 81 c0 00 00 00 mov rax, QWORD PTR [rcx+192] - -; 7063 : { - +; Line 7063 00011 48 8b d9 mov rbx, rcx - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00014 48 3b 81 c8 00 00 00 cmp rax, QWORD PTR [rcx+200] 0001b 73 0f jae SHORT $LN6@stbi__pnm_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 0001d 0f b6 38 movzx edi, BYTE PTR [rax] 00020 48 ff c0 inc rax 00023 48 89 81 c0 00 00 00 mov QWORD PTR [rcx+192], rax 0002a eb 24 jmp SHORT $LN22@stbi__pnm_ $LN6@stbi__pnm_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0002c 83 79 30 00 cmp DWORD PTR [rcx+48], 0 00030 74 1b je SHORT $LN7@stbi__pnm_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00032 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00037 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 0003e 0f b6 38 movzx edi, BYTE PTR [rax] @@ -106403,43 +36832,30 @@ $LN6@stbi__pnm_: 00 00 mov QWORD PTR [rbx+192], rax 0004b eb 03 jmp SHORT $LN22@stbi__pnm_ $LN7@stbi__pnm_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 0004d 40 32 ff xor dil, dil $LN22@stbi__pnm_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00050 b9 30 00 00 00 mov ecx, 48 ; 00000030H 00055 48 8b d3 mov rdx, rbx 00058 4c 8d 04 19 lea r8, QWORD PTR [rcx+rbx] 0005c 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 00063 73 0f jae SHORT $LN10@stbi__pnm_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00065 0f b6 08 movzx ecx, BYTE PTR [rax] 00068 48 ff c0 inc rax 0006b 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 00072 eb 26 jmp SHORT $LN9@stbi__pnm_ $LN10@stbi__pnm_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00074 41 83 38 00 cmp DWORD PTR [r8], 0 00078 74 1e je SHORT $LN11@stbi__pnm_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 0007a 48 8b cb mov rcx, rbx 0007d e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00082 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00089 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -106448,58 +36864,36 @@ $LN10@stbi__pnm_: 00 00 mov QWORD PTR [rbx+192], rax 00096 eb 02 jmp SHORT $LN9@stbi__pnm_ $LN11@stbi__pnm_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00098 32 c9 xor cl, cl $LN9@stbi__pnm_: - -; 7064 : char p, t; -; 7065 : p = (char)stbi__get8(s); -; 7066 : t = (char)stbi__get8(s); -; 7067 : if (p != 'P' || (t != '5' && t != '6')) { - +; Line 7067 0009a 40 80 ff 50 cmp dil, 80 ; 00000050H 0009e 75 18 jne SHORT $LN3@stbi__pnm_ 000a0 80 e9 35 sub cl, 53 ; 00000035H 000a3 80 f9 01 cmp cl, 1 000a6 77 10 ja SHORT $LN3@stbi__pnm_ - -; 7070 : } -; 7071 : return 1; - +; Line 7071 000a8 b8 01 00 00 00 mov eax, 1 - -; 7072 : } - +; Line 7072 000ad 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 000b2 48 83 c4 20 add rsp, 32 ; 00000020H 000b6 5f pop rdi 000b7 c3 ret 0 $LN3@stbi__pnm_: - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 000b8 48 8b 83 d0 00 00 00 mov rax, QWORD PTR [rbx+208] 000bf 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 000c6 48 8b 83 d8 00 00 00 mov rax, QWORD PTR [rbx+216] 000cd 48 89 83 c8 00 00 00 mov QWORD PTR [rbx+200], rax - -; 7068 : stbi__rewind(s); -; 7069 : return 0; - +; Line 7069 000d4 33 c0 xor eax, eax - -; 7072 : } - +; Line 7072 000d6 48 8b 5c 24 30 mov rbx, QWORD PTR [rsp+48] 000db 48 83 c4 20 add rsp, 32 ; 00000020H 000df 5f pop rdi @@ -106507,7 +36901,6 @@ $LN3@stbi__pnm_: stbi__pnm_test ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__pnm_load _TEXT SEGMENT s$ = 80 @@ -106517,9 +36910,8 @@ comp$ = 104 req_comp$ = 112 ri$ = 120 stbi__pnm_load PROC ; COMDAT - -; 7075 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 7075 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi @@ -106529,421 +36921,192 @@ stbi__pnm_load PROC ; COMDAT 00018 41 57 push r15 0001a 48 83 ec 30 sub rsp, 48 ; 00000030H 0001e 49 8b d9 mov rbx, r9 - 00021 4d 8b f8 mov r15, r8 - 00024 48 8b ea mov rbp, rdx - -; 7076 : stbi_uc* out; -; 7077 : STBI_NOTUSED(ri); -; 7078 : -; 7079 : ri->bits_per_channel = stbi__pnm_info(s, (int*)&s->img_x, (int*)&s->img_y, (int*)&s->img_n); - + 00021 49 8b e8 mov rbp, r8 + 00024 4c 8b e2 mov r12, rdx +; Line 7079 00027 4c 8d 49 08 lea r9, QWORD PTR [rcx+8] 0002b 4c 8d 41 04 lea r8, QWORD PTR [rcx+4] 0002f 48 8b d1 mov rdx, rcx 00032 48 8b f9 mov rdi, rcx 00035 e8 00 00 00 00 call stbi__pnm_info - 0003a 4c 8b 64 24 78 mov r12, QWORD PTR ri$[rsp] + 0003a 4c 8b 7c 24 78 mov r15, QWORD PTR ri$[rsp] 0003f 8b c8 mov ecx, eax - 00041 41 89 04 24 mov DWORD PTR [r12], eax - -; 7080 : if (ri->bits_per_channel == 0) - - 00045 85 c0 test eax, eax - 00047 0f 84 12 02 00 - 00 je $LN88@stbi__pnm_ - -; 7081 : return 0; -; 7082 : -; 7083 : if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - - 0004d 81 7f 04 00 00 + 00041 41 89 07 mov DWORD PTR [r15], eax +; Line 7080 + 00044 85 c0 test eax, eax + 00046 74 2c je SHORT $LN24@stbi__pnm_ +; Line 7083 + 00048 81 7f 04 00 00 00 01 cmp DWORD PTR [rdi+4], 16777216 ; 01000000H - 00054 0f 87 e2 01 00 - 00 ja $LN78@stbi__pnm_ - -; 7084 : if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large", "Very large image (corrupt?)"); - - 0005a 8b 07 mov eax, DWORD PTR [rdi] - 0005c 3d 00 00 00 01 cmp eax, 16777216 ; 01000000H - 00061 0f 87 d5 01 00 - 00 ja $LN78@stbi__pnm_ - -; 7085 : -; 7086 : *x = s->img_x; - - 00067 89 45 00 mov DWORD PTR [rbp], eax - -; 7087 : *y = s->img_y; - - 0006a 8b 47 04 mov eax, DWORD PTR [rdi+4] - 0006d 41 89 07 mov DWORD PTR [r15], eax - -; 7088 : if (comp) *comp = s->img_n; - - 00070 48 85 db test rbx, rbx - 00073 74 05 je SHORT $LN5@stbi__pnm_ - 00075 8b 47 08 mov eax, DWORD PTR [rdi+8] - 00078 89 03 mov DWORD PTR [rbx], eax -$LN5@stbi__pnm_: - -; 7089 : -; 7090 : if (!stbi__mad4sizes_valid(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0)) - - 0007a 44 8b 47 08 mov r8d, DWORD PTR [rdi+8] - 0007e 8b c1 mov eax, ecx - 00080 44 8b 57 04 mov r10d, DWORD PTR [rdi+4] - 00084 99 cdq - 00085 44 8b 0f mov r9d, DWORD PTR [rdi] - 00088 83 e2 07 and edx, 7 - 0008b 8d 0c 02 lea ecx, DWORD PTR [rdx+rax] - 0008e c1 f9 03 sar ecx, 3 - -; 467 : if (a < 0 || b < 0) return 0; - - 00091 45 85 c0 test r8d, r8d - 00094 0f 88 a2 01 00 - 00 js $LN78@stbi__pnm_ - 0009a 45 85 c9 test r9d, r9d - 0009d 0f 88 99 01 00 - 00 js $LN78@stbi__pnm_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 000a3 74 12 je SHORT $LN81@stbi__pnm_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 000a5 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 000aa 99 cdq - 000ab 41 f7 f9 idiv r9d - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 000ae 44 3b c0 cmp r8d, eax - 000b1 0f 8f 85 01 00 - 00 jg $LN78@stbi__pnm_ -$LN81@stbi__pnm_: - 000b7 45 8b d8 mov r11d, r8d - 000ba 45 0f af d9 imul r11d, r9d - -; 467 : if (a < 0 || b < 0) return 0; - - 000be 45 85 db test r11d, r11d - 000c1 0f 88 75 01 00 - 00 js $LN78@stbi__pnm_ - 000c7 45 85 d2 test r10d, r10d - 000ca 0f 88 6c 01 00 - 00 js $LN78@stbi__pnm_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 000d0 74 12 je SHORT $LN80@stbi__pnm_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 000d2 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 000d7 99 cdq - 000d8 41 f7 fa idiv r10d - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 000db 44 3b d8 cmp r11d, eax - 000de 0f 8f 58 01 00 - 00 jg $LN78@stbi__pnm_ -$LN80@stbi__pnm_: - 000e4 45 0f af da imul r11d, r10d - -; 467 : if (a < 0 || b < 0) return 0; - - 000e8 45 85 db test r11d, r11d - 000eb 0f 88 4b 01 00 - 00 js $LN78@stbi__pnm_ - 000f1 85 c9 test ecx, ecx - 000f3 0f 88 43 01 00 - 00 js $LN78@stbi__pnm_ - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 000f9 74 11 je SHORT $LN79@stbi__pnm_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 000fb b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00100 99 cdq - 00101 f7 f9 idiv ecx - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00103 44 3b d8 cmp r11d, eax - 00106 0f 8f 30 01 00 - 00 jg $LN78@stbi__pnm_ -$LN79@stbi__pnm_: - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 0010c 45 85 c9 test r9d, r9d - 0010f 75 09 jne SHORT $LN52@stbi__pnm_ - 00111 45 0f af c1 imul r8d, r9d - 00115 45 8b d8 mov r11d, r8d - 00118 eb 1c jmp SHORT $LN83@stbi__pnm_ -$LN52@stbi__pnm_: - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 0011a b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 0011f 99 cdq - 00120 41 f7 f9 idiv r9d - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00123 44 3b c0 cmp r8d, eax - 00126 0f 8f f4 00 00 - 00 jg $LN73@stbi__pnm_ - 0012c 45 0f af c8 imul r9d, r8d - 00130 45 8b c1 mov r8d, r9d - 00133 45 8b d9 mov r11d, r9d -$LN83@stbi__pnm_: - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 00136 45 85 d2 test r10d, r10d - 00139 75 09 jne SHORT $LN57@stbi__pnm_ - 0013b 45 8b ca mov r9d, r10d - 0013e 45 0f af cb imul r9d, r11d - 00142 eb 19 jmp SHORT $LN82@stbi__pnm_ -$LN57@stbi__pnm_: - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 00144 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00149 99 cdq - 0014a 41 f7 fa idiv r10d - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 0014d 44 3b d8 cmp r11d, eax - 00150 0f 8f ca 00 00 - 00 jg $LN73@stbi__pnm_ - 00156 45 8b c8 mov r9d, r8d - 00159 45 0f af ca imul r9d, r10d -$LN82@stbi__pnm_: - -; 468 : if (b == 0) return 1; // mul-by-0 is always safe - - 0015d 85 c9 test ecx, ecx - 0015f 74 11 je SHORT $LN43@stbi__pnm_ - -; 469 : // portable way to check for no overflows in a*b -; 470 : return a <= INT_MAX / b; - - 00161 b8 ff ff ff 7f mov eax, 2147483647 ; 7fffffffH - 00166 99 cdq - 00167 f7 f9 idiv ecx - -; 492 : return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) && - - 00169 44 3b c8 cmp r9d, eax - 0016c 0f 8f ae 00 00 - 00 jg $LN73@stbi__pnm_ -$LN43@stbi__pnm_: - -; 516 : return stbi__malloc(a * b * c * d + add); - - 00172 41 0f af ca imul ecx, r10d - 00176 41 0f af c8 imul ecx, r8d - 0017a 48 63 c9 movsxd rcx, ecx - -; 438 : return STBI_MALLOC(size); - - 0017d ff 15 00 00 00 - 00 call QWORD PTR __imp_malloc - 00183 48 8b d8 mov rbx, rax - -; 7091 : return stbi__errpuc("too large", "PNM too large"); -; 7092 : -; 7093 : out = (stbi_uc*)stbi__malloc_mad4(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0); -; 7094 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); - - 00186 48 85 c0 test rax, rax - 00189 0f 84 91 00 00 - 00 je $LN73@stbi__pnm_ - -; 7095 : if (!stbi__getn(s, out, s->img_n * s->img_x * s->img_y * (ri->bits_per_channel / 8))) { - - 0018f 41 8b 04 24 mov eax, DWORD PTR [r12] - 00193 48 8b cf mov rcx, rdi - 00196 99 cdq - 00197 83 e2 07 and edx, 7 - 0019a 44 8d 04 02 lea r8d, DWORD PTR [rdx+rax] - 0019e 48 8b d3 mov rdx, rbx - 001a1 41 c1 f8 03 sar r8d, 3 - 001a5 44 0f af 47 08 imul r8d, DWORD PTR [rdi+8] - 001aa 44 0f af 07 imul r8d, DWORD PTR [rdi] - 001ae 44 0f af 47 04 imul r8d, DWORD PTR [rdi+4] - 001b3 e8 00 00 00 00 call stbi__getn - 001b8 85 c0 test eax, eax - 001ba 75 25 jne SHORT $LN8@stbi__pnm_ - -; 7096 : STBI_FREE(out); - - 001bc 48 8b cb mov rcx, rbx - 001bf ff 15 00 00 00 - 00 call QWORD PTR __imp_free - -; 431 : stbi__g_failure_reason = str; - - 001c5 8b 15 00 00 00 + 0004f 76 44 jbe SHORT $LN3@stbi__pnm_ +$LN37@stbi__pnm_: +; Line 7110 + 00051 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index - 001cb 65 48 8b 04 25 + 00057 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 - 001d4 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 001d8 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_07IDKIDMGJ@bad?5PNM@ - -; 7097 : return stbi__errpuc("bad PNM", "PNM file truncated"); - - 001df eb 75 jmp SHORT $LN115@stbi__pnm_ -$LN8@stbi__pnm_: - -; 7098 : } -; 7099 : -; 7100 : if (req_comp && req_comp != s->img_n) { - - 001e1 44 8b 44 24 70 mov r8d, DWORD PTR req_comp$[rsp] - 001e6 45 85 c0 test r8d, r8d - 001e9 74 30 je SHORT $LN12@stbi__pnm_ - 001eb 8b 57 08 mov edx, DWORD PTR [rdi+8] - 001ee 44 3b c2 cmp r8d, edx - 001f1 74 28 je SHORT $LN12@stbi__pnm_ - -; 7101 : if (ri->bits_per_channel == 16) { - - 001f3 41 83 3c 24 10 cmp DWORD PTR [r12], 16 - 001f8 48 8b cb mov rcx, rbx - 001fb 8b 47 04 mov eax, DWORD PTR [rdi+4] - 001fe 44 8b 0f mov r9d, DWORD PTR [rdi] - 00201 89 44 24 20 mov DWORD PTR [rsp+32], eax - 00205 75 07 jne SHORT $LN10@stbi__pnm_ - -; 7102 : out = (stbi_uc*)stbi__convert_format16((stbi__uint16*)out, s->img_n, req_comp, s->img_x, s->img_y); - - 00207 e8 00 00 00 00 call stbi__convert_format16 - -; 7103 : } - - 0020c eb 05 jmp SHORT $LN113@stbi__pnm_ -$LN10@stbi__pnm_: - -; 7104 : else { -; 7105 : out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y); - - 0020e e8 00 00 00 00 call stbi__convert_format -$LN113@stbi__pnm_: - -; 7106 : } -; 7107 : if (out == NULL) return out; // stbi__convert_format frees input on failure - - 00213 48 8b d8 mov rbx, rax - 00216 48 85 c0 test rax, rax - 00219 74 44 je SHORT $LN88@stbi__pnm_ -$LN12@stbi__pnm_: - -; 7108 : } -; 7109 : return out; - - 0021b 48 8b c3 mov rax, rbx - 0021e eb 41 jmp SHORT $LN1@stbi__pnm_ -$LN73@stbi__pnm_: - -; 431 : stbi__g_failure_reason = str; - - 00220 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00226 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 0022f 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 00233 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ - -; 7091 : return stbi__errpuc("too large", "PNM too large"); -; 7092 : -; 7093 : out = (stbi_uc*)stbi__malloc_mad4(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0); -; 7094 : if (!out) return stbi__errpuc("outofmem", "Out of memory"); - - 0023a eb 1a jmp SHORT $LN115@stbi__pnm_ -$LN78@stbi__pnm_: - -; 7110 : } - - 0023c 8b 15 00 00 00 - 00 mov edx, DWORD PTR _tls_index - 00242 65 48 8b 04 25 - 58 00 00 00 mov rax, QWORD PTR gs:88 - 0024b 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] - 0024f 48 8d 15 00 00 + 00060 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00065 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00069 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_09OJDLMMBJ@too?5large@ -$LN115@stbi__pnm_: - 00256 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason - 0025b 48 89 14 01 mov QWORD PTR [rcx+rax], rdx -$LN88@stbi__pnm_: - 0025f 33 c0 xor eax, eax +$LN38@stbi__pnm_: + 00070 48 89 14 01 mov QWORD PTR [rcx+rax], rdx +$LN24@stbi__pnm_: + 00074 33 c0 xor eax, eax $LN1@stbi__pnm_: - 00261 48 8b 5c 24 50 mov rbx, QWORD PTR [rsp+80] - 00266 48 8b 6c 24 58 mov rbp, QWORD PTR [rsp+88] - 0026b 48 8b 74 24 60 mov rsi, QWORD PTR [rsp+96] - 00270 48 8b 7c 24 68 mov rdi, QWORD PTR [rsp+104] - 00275 48 83 c4 30 add rsp, 48 ; 00000030H - 00279 41 5f pop r15 - 0027b 41 5e pop r14 - 0027d 41 5c pop r12 - 0027f c3 ret 0 + 00076 48 8b 5c 24 50 mov rbx, QWORD PTR [rsp+80] + 0007b 48 8b 6c 24 58 mov rbp, QWORD PTR [rsp+88] + 00080 48 8b 74 24 60 mov rsi, QWORD PTR [rsp+96] + 00085 48 8b 7c 24 68 mov rdi, QWORD PTR [rsp+104] + 0008a 48 83 c4 30 add rsp, 48 ; 00000030H + 0008e 41 5f pop r15 + 00090 41 5e pop r14 + 00092 41 5c pop r12 + 00094 c3 ret 0 +$LN3@stbi__pnm_: +; Line 7084 + 00095 8b 07 mov eax, DWORD PTR [rdi] + 00097 3d 00 00 00 01 cmp eax, 16777216 ; 01000000H + 0009c 77 b3 ja SHORT $LN37@stbi__pnm_ +; Line 7086 + 0009e 41 89 04 24 mov DWORD PTR [r12], eax +; Line 7087 + 000a2 8b 47 04 mov eax, DWORD PTR [rdi+4] + 000a5 89 45 00 mov DWORD PTR [rbp], eax +; Line 7088 + 000a8 48 85 db test rbx, rbx + 000ab 74 05 je SHORT $LN5@stbi__pnm_ + 000ad 8b 47 08 mov eax, DWORD PTR [rdi+8] + 000b0 89 03 mov DWORD PTR [rbx], eax +$LN5@stbi__pnm_: +; Line 7090 + 000b2 44 8b 1f mov r11d, DWORD PTR [rdi] + 000b5 8b c1 mov eax, ecx + 000b7 8b 5f 08 mov ebx, DWORD PTR [rdi+8] + 000ba 99 cdq + 000bb 44 8b 47 04 mov r8d, DWORD PTR [rdi+4] + 000bf 83 e2 07 and edx, 7 + 000c2 8b cb mov ecx, ebx + 000c4 44 8d 0c 02 lea r9d, DWORD PTR [rdx+rax] + 000c8 41 8b d3 mov edx, r11d + 000cb 41 c1 f9 03 sar r9d, 3 + 000cf e8 00 00 00 00 call stbi__mad4sizes_valid + 000d4 85 c0 test eax, eax + 000d6 0f 84 75 ff ff + ff je $LN37@stbi__pnm_ +; Line 7093 + 000dc 41 8b d3 mov edx, r11d + 000df 8b cb mov ecx, ebx + 000e1 e8 00 00 00 00 call stbi__malloc_mad4 + 000e6 48 8b d8 mov rbx, rax +; Line 7094 + 000e9 48 85 c0 test rax, rax + 000ec 75 24 jne SHORT $LN7@stbi__pnm_ +; Line 431 + 000ee 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 000f4 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 000fd b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 00102 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 00106 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_08NOGIMCHF@outofmem@ +; Line 7094 + 0010d e9 5e ff ff ff jmp $LN38@stbi__pnm_ +$LN7@stbi__pnm_: +; Line 7095 + 00112 41 8b 07 mov eax, DWORD PTR [r15] + 00115 48 8b cf mov rcx, rdi + 00118 99 cdq + 00119 83 e2 07 and edx, 7 + 0011c 44 8d 04 02 lea r8d, DWORD PTR [rdx+rax] + 00120 48 8b d3 mov rdx, rbx + 00123 41 c1 f8 03 sar r8d, 3 + 00127 44 0f af 07 imul r8d, DWORD PTR [rdi] + 0012b 44 0f af 47 08 imul r8d, DWORD PTR [rdi+8] + 00130 44 0f af 47 04 imul r8d, DWORD PTR [rdi+4] + 00135 e8 00 00 00 00 call stbi__getn + 0013a 85 c0 test eax, eax + 0013c 75 2d jne SHORT $LN8@stbi__pnm_ +; Line 7096 + 0013e 48 8b cb mov rcx, rbx + 00141 ff 15 00 00 00 + 00 call QWORD PTR __imp_free +; Line 431 + 00147 8b 15 00 00 00 + 00 mov edx, DWORD PTR _tls_index + 0014d 65 48 8b 04 25 + 58 00 00 00 mov rax, QWORD PTR gs:88 + 00156 b9 00 00 00 00 mov ecx, OFFSET FLAT:stbi__g_failure_reason + 0015b 48 8b 04 d0 mov rax, QWORD PTR [rax+rdx*8] + 0015f 48 8d 15 00 00 + 00 00 lea rdx, OFFSET FLAT:??_C@_07IDKIDMGJ@bad?5PNM@ +; Line 7097 + 00166 e9 05 ff ff ff jmp $LN38@stbi__pnm_ +$LN8@stbi__pnm_: +; Line 7100 + 0016b 44 8b 44 24 70 mov r8d, DWORD PTR req_comp$[rsp] + 00170 45 85 c0 test r8d, r8d + 00173 74 33 je SHORT $LN12@stbi__pnm_ + 00175 8b 57 08 mov edx, DWORD PTR [rdi+8] + 00178 44 3b c2 cmp r8d, edx + 0017b 74 2b je SHORT $LN12@stbi__pnm_ +; Line 7101 + 0017d 41 83 3f 10 cmp DWORD PTR [r15], 16 + 00181 48 8b cb mov rcx, rbx + 00184 8b 47 04 mov eax, DWORD PTR [rdi+4] + 00187 44 8b 0f mov r9d, DWORD PTR [rdi] + 0018a 89 44 24 20 mov DWORD PTR [rsp+32], eax + 0018e 75 07 jne SHORT $LN10@stbi__pnm_ +; Line 7102 + 00190 e8 00 00 00 00 call stbi__convert_format16 +; Line 7103 + 00195 eb 05 jmp SHORT $LN36@stbi__pnm_ +$LN10@stbi__pnm_: +; Line 7105 + 00197 e8 00 00 00 00 call stbi__convert_format +$LN36@stbi__pnm_: +; Line 7107 + 0019c 48 8b d8 mov rbx, rax + 0019f 48 85 c0 test rax, rax + 001a2 0f 84 cc fe ff + ff je $LN24@stbi__pnm_ +$LN12@stbi__pnm_: +; Line 7109 + 001a8 48 8b c3 mov rax, rbx + 001ab e9 c6 fe ff ff jmp $LN1@stbi__pnm_ stbi__pnm_load ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__pnm_isspace _TEXT SEGMENT c$ = 8 stbi__pnm_isspace PROC ; COMDAT - -; 7114 : return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 7114 00000 80 f9 20 cmp cl, 32 ; 00000020H 00003 74 0b je SHORT $LN3@stbi__pnm_ 00005 80 e9 09 sub cl, 9 00008 80 f9 04 cmp cl, 4 0000b 76 03 jbe SHORT $LN3@stbi__pnm_ 0000d 33 c0 xor eax, eax - -; 7115 : } - +; Line 7115 0000f c3 ret 0 $LN3@stbi__pnm_: - -; 7114 : return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'; - +; Line 7114 00010 b8 01 00 00 00 mov eax, 1 - -; 7115 : } - +; Line 7115 00015 c3 ret 0 stbi__pnm_isspace ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__pnm_skip_whitespace _TEXT SEGMENT s$ = 64 c$ = 72 stbi__pnm_skip_whitespace PROC ; COMDAT - -; 7118 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 7118 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi @@ -106960,32 +37123,21 @@ stbi__pnm_skip_whitespace PROC ; COMDAT $LL2@stbi__pnm_: 00030 48 8d 6b 30 lea rbp, QWORD PTR [rbx+48] $LL5@stbi__pnm_: - -; 1091 : if (s->io.read) { - +; Line 1091 00034 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 00039 48 8d 7b 28 lea rdi, QWORD PTR [rbx+40] 0003d 74 13 je SHORT $LN53@stbi__pnm_ - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 0003f 48 8b 0f mov rcx, QWORD PTR [rdi] 00042 ff 16 call QWORD PTR [rsi] 00044 85 c0 test eax, eax 00046 74 1a je SHORT $LN60@stbi__pnm_ - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 00048 83 7d 00 00 cmp DWORD PTR [rbp], 0 0004c 0f 84 83 00 00 00 je $LN6@stbi__pnm_ $LN53@stbi__pnm_: - -; 7119 : for (;;) { -; 7120 : while (!stbi__at_eof(s) && stbi__pnm_isspace(*c)) - +; Line 7120 00052 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] 00059 48 39 83 c0 00 @@ -106993,45 +37145,33 @@ $LN53@stbi__pnm_: 00060 73 73 jae SHORT $LN6@stbi__pnm_ $LN60@stbi__pnm_: 00062 41 0f b6 07 movzx eax, BYTE PTR [r15] - -; 7114 : return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'; - +; Line 7114 00066 3c 20 cmp al, 32 ; 00000020H 00068 74 06 je SHORT $LN59@stbi__pnm_ 0006a 2c 09 sub al, 9 0006c 3c 04 cmp al, 4 0006e 77 5d ja SHORT $LN62@stbi__pnm_ $LN59@stbi__pnm_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00070 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00077 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0007e 73 0f jae SHORT $LN22@stbi__pnm_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00080 0f b6 08 movzx ecx, BYTE PTR [rax] 00083 48 ff c0 inc rax 00086 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0008d eb 26 jmp SHORT $LN81@stbi__pnm_ $LN22@stbi__pnm_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0008f 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00093 74 1e je SHORT $LN23@stbi__pnm_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00095 48 8b cb mov rcx, rbx 00098 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0009d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000a4 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -107040,15 +37180,10 @@ $LN22@stbi__pnm_: 00 00 mov QWORD PTR [rbx+192], rax 000b1 eb 02 jmp SHORT $LN81@stbi__pnm_ $LN23@stbi__pnm_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000b3 32 c9 xor cl, cl $LN81@stbi__pnm_: - -; 7121 : *c = (char)stbi__get8(s); - +; Line 7121 000b5 ba 30 00 00 00 mov edx, 48 ; 00000030H 000ba 41 88 0f mov BYTE PTR [r15], cl 000bd 48 8b c3 mov rax, rbx @@ -107059,31 +37194,20 @@ $LN62@stbi__pnm_: 000cd 48 8d 73 20 lea rsi, QWORD PTR [rbx+32] 000d1 48 8d 7b 28 lea rdi, QWORD PTR [rbx+40] $LN6@stbi__pnm_: - -; 1091 : if (s->io.read) { - +; Line 1091 000d5 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 000da 74 13 je SHORT $LN55@stbi__pnm_ - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 000dc 48 8b 0f mov rcx, QWORD PTR [rdi] 000df ff 16 call QWORD PTR [rsi] 000e1 85 c0 test eax, eax 000e3 74 1e je SHORT $LN58@stbi__pnm_ - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 000e5 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 000e9 0f 84 d7 00 00 00 je $LN64@stbi__pnm_ $LN55@stbi__pnm_: - -; 7122 : -; 7123 : if (stbi__at_eof(s) || *c != '#') - +; Line 7123 000ef 48 8b 83 c8 00 00 00 mov rax, QWORD PTR [rbx+200] 000f6 48 39 83 c0 00 @@ -107100,46 +37224,28 @@ $LN58@stbi__pnm_: 00118 0f 1f 84 00 00 00 00 00 npad 8 $LL7@stbi__pnm_: - -; 1091 : if (s->io.read) { - +; Line 1091 00120 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 00125 4c 8b f7 mov r14, rdi 00128 74 1f je SHORT $LN50@stbi__pnm_ - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 0012a 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 0012e 48 8d 73 20 lea rsi, QWORD PTR [rbx+32] 00132 ff 16 call QWORD PTR [rsi] 00134 85 c0 test eax, eax 00136 74 25 je SHORT $LN57@stbi__pnm_ - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 00138 83 7d 00 00 cmp DWORD PTR [rbp], 0 0013c 0f 84 ee fe ff ff je $LL2@stbi__pnm_ 00142 48 8d bb c8 00 00 00 lea rdi, QWORD PTR [rbx+200] $LN50@stbi__pnm_: - -; 7124 : break; -; 7125 : -; 7126 : while (!stbi__at_eof(s) && *c != '\n' && *c != '\r') - +; Line 7126 00149 49 8b 06 mov rax, QWORD PTR [r14] - -; 1098 : return s->img_buffer >= s->img_buffer_end; - +; Line 1098 0014c 48 8d 73 20 lea rsi, QWORD PTR [rbx+32] - -; 7124 : break; -; 7125 : -; 7126 : while (!stbi__at_eof(s) && *c != '\n' && *c != '\r') - +; Line 7126 00150 48 39 83 c0 00 00 00 cmp QWORD PTR [rbx+192], rax 00157 0f 83 d3 fe ff @@ -107152,35 +37258,25 @@ $LN57@stbi__pnm_: 00169 3c 0d cmp al, 13 0016b 0f 84 bf fe ff ff je $LL2@stbi__pnm_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 00171 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00178 48 3b 07 cmp rax, QWORD PTR [rdi] 0017b 73 0f jae SHORT $LN36@stbi__pnm_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 0017d 0f b6 08 movzx ecx, BYTE PTR [rax] 00180 48 ff c0 inc rax 00183 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0018a eb 26 jmp SHORT $LN82@stbi__pnm_ $LN36@stbi__pnm_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0018c 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00190 74 1e je SHORT $LN37@stbi__pnm_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00192 48 8b cb mov rcx, rbx 00195 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 0019a 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 001a1 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -107189,25 +37285,17 @@ $LN36@stbi__pnm_: 00 00 mov QWORD PTR [rbx+192], rax 001ae eb 02 jmp SHORT $LN82@stbi__pnm_ $LN37@stbi__pnm_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 001b0 32 c9 xor cl, cl $LN82@stbi__pnm_: - -; 7127 : *c = (char)stbi__get8(s); - +; Line 7127 001b2 ba 30 00 00 00 mov edx, 48 ; 00000030H 001b7 41 88 0f mov BYTE PTR [r15], cl 001ba 48 8b c3 mov rax, rbx 001bd 48 8d 2c 1a lea rbp, QWORD PTR [rdx+rbx] 001c1 e9 5a ff ff ff jmp $LL7@stbi__pnm_ $LN64@stbi__pnm_: - -; 7128 : } -; 7129 : } - +; Line 7129 001c6 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] 001cb 48 8b 6c 24 48 mov rbp, QWORD PTR [rsp+72] 001d0 48 8b 74 24 50 mov rsi, QWORD PTR [rsp+80] @@ -107220,34 +37308,28 @@ $LN64@stbi__pnm_: stbi__pnm_skip_whitespace ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__pnm_isdigit _TEXT SEGMENT c$ = 8 stbi__pnm_isdigit PROC ; COMDAT - -; 7133 : return c >= '0' && c <= '9'; - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 7133 00000 33 c0 xor eax, eax 00002 80 e9 30 sub cl, 48 ; 00000030H 00005 80 f9 09 cmp cl, 9 00008 0f 96 c0 setbe al - -; 7134 : } - +; Line 7134 0000b c3 ret 0 stbi__pnm_isdigit ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__pnm_getinteger _TEXT SEGMENT s$ = 64 c$ = 72 stbi__pnm_getinteger PROC ; COMDAT - -; 7137 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 7137 00000 48 89 5c 24 08 mov QWORD PTR [rsp+8], rbx 00005 48 89 6c 24 10 mov QWORD PTR [rsp+16], rbp 0000a 48 89 74 24 18 mov QWORD PTR [rsp+24], rsi @@ -107257,9 +37339,7 @@ stbi__pnm_getinteger PROC ; COMDAT 00018 41 57 push r15 0001a 48 83 ec 20 sub rsp, 32 ; 00000020H 0001e 4c 8b e2 mov r12, rdx - -; 7138 : int value = 0; - +; Line 7138 00021 4c 8d b1 c8 00 00 00 lea r14, QWORD PTR [rcx+200] 00028 48 8b d9 mov rbx, rcx @@ -107267,23 +37347,15 @@ stbi__pnm_getinteger PROC ; COMDAT 00 00 lea rbp, QWORD PTR [rcx+192] 00032 33 ff xor edi, edi $LL2@stbi__pnm_: - -; 1091 : if (s->io.read) { - +; Line 1091 00034 48 83 7b 10 00 cmp QWORD PTR [rbx+16], 0 00039 74 23 je SHORT $LN27@stbi__pnm_ - -; 1092 : if (!(s->io.eof)(s->io_user_data)) return 0; - +; Line 1092 0003b 48 8b 4b 28 mov rcx, QWORD PTR [rbx+40] 0003f ff 53 20 call QWORD PTR [rbx+32] 00042 85 c0 test eax, eax 00044 74 25 je SHORT $LN29@stbi__pnm_ - -; 1093 : // if feof() is true, check if buffer = end -; 1094 : // special case: we've only got the special 0 character at the end -; 1095 : if (s->read_from_callbacks == 0) return 1; - +; Line 1095 00046 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 0004a 4c 8d b3 c8 00 00 00 lea r14, QWORD PTR [rbx+200] @@ -107292,37 +37364,26 @@ $LL2@stbi__pnm_: 00058 0f 84 bb 00 00 00 je $LN3@stbi__pnm_ $LN27@stbi__pnm_: - -; 7139 : -; 7140 : while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { - +; Line 7140 0005e 49 8b 06 mov rax, QWORD PTR [r14] 00061 48 39 45 00 cmp QWORD PTR [rbp], rax 00065 0f 83 ae 00 00 00 jae $LN3@stbi__pnm_ $LN29@stbi__pnm_: 0006b 41 0f be 14 24 movsx edx, BYTE PTR [r12] - -; 7133 : return c >= '0' && c <= '9'; - +; Line 7133 00070 8d 42 d0 lea eax, DWORD PTR [rdx-48] 00073 3c 09 cmp al, 9 00075 0f 87 9e 00 00 00 ja $LN3@stbi__pnm_ - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0007b 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] - -; 7141 : value = value * 10 + (*c - '0'); - +; Line 7141 00082 8d 3c bf lea edi, DWORD PTR [rdi+rdi*4] 00085 8d 7f e8 lea edi, DWORD PTR [rdi-24] 00088 8d 3c 7a lea edi, DWORD PTR [rdx+rdi*2] - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0008b 4c 8d b3 c8 00 00 00 lea r14, QWORD PTR [rbx+200] 00092 48 8d ab c0 00 @@ -107330,28 +37391,20 @@ $LN29@stbi__pnm_: 00099 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 000a0 73 0f jae SHORT $LN17@stbi__pnm_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 000a2 0f b6 08 movzx ecx, BYTE PTR [rax] 000a5 48 ff c0 inc rax 000a8 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 000af eb 26 jmp SHORT $LN16@stbi__pnm_ $LN17@stbi__pnm_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000b1 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 000b5 74 1e je SHORT $LN18@stbi__pnm_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000b7 48 8b cb mov rcx, rbx 000ba e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000bf 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000c6 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -107360,19 +37413,12 @@ $LN17@stbi__pnm_: 00 00 mov QWORD PTR [rbx+192], rax 000d3 eb 02 jmp SHORT $LN16@stbi__pnm_ $LN18@stbi__pnm_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000d5 32 c9 xor cl, cl $LN16@stbi__pnm_: - -; 7142 : *c = (char)stbi__get8(s); - +; Line 7142 000d7 41 88 0c 24 mov BYTE PTR [r12], cl - -; 7143 : if ((value > 214748364) || (value == 214748364 && *c > '7')) - +; Line 7143 000db 81 ff cc cc cc 0c cmp edi, 214748364 ; 0cccccccH 000e1 7f 0f jg SHORT $LN23@stbi__pnm_ @@ -107382,9 +37428,7 @@ $LN16@stbi__pnm_: 000ec 0f 8e 42 ff ff ff jle $LL2@stbi__pnm_ $LN23@stbi__pnm_: - -; 431 : stbi__g_failure_reason = str; - +; Line 431 000f2 65 48 8b 04 25 58 00 00 00 mov rax, QWORD PTR gs:88 000fb 8b 0d 00 00 00 @@ -107394,22 +37438,14 @@ $LN23@stbi__pnm_: 0010a 48 8d 05 00 00 00 00 lea rax, OFFSET FLAT:??_C@_0BH@OBINMOBC@integer?5parse?5overflow@ 00111 48 89 04 0a mov QWORD PTR [rdx+rcx], rax - -; 7144 : return stbi__err("integer parse overflow", "Parsing an integer in the PPM header overflowed a 32-bit int"); - +; Line 7144 00115 33 c0 xor eax, eax 00117 eb 02 jmp SHORT $LN1@stbi__pnm_ $LN3@stbi__pnm_: - -; 7145 : } -; 7146 : -; 7147 : return value; - +; Line 7147 00119 8b c7 mov eax, edi $LN1@stbi__pnm_: - -; 7148 : } - +; Line 7148 0011b 48 8b 5c 24 40 mov rbx, QWORD PTR [rsp+64] 00120 48 8b 6c 24 48 mov rbp, QWORD PTR [rsp+72] 00125 48 8b 74 24 50 mov rsi, QWORD PTR [rsp+80] @@ -107422,7 +37458,6 @@ $LN1@stbi__pnm_: stbi__pnm_getinteger ENDP _TEXT ENDS ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c ; COMDAT stbi__pnm_info _TEXT SEGMENT c$ = 32 @@ -107433,9 +37468,8 @@ x$ = 120 y$ = 128 comp$ = 136 stbi__pnm_info PROC ; COMDAT - -; 7151 : { - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\stb_image.c +; Line 7151 00000 40 53 push rbx 00002 55 push rbp 00003 56 push rsi @@ -107447,86 +37481,50 @@ stbi__pnm_info PROC ; COMDAT 00 00 mov rax, QWORD PTR __security_cookie 00014 48 33 c4 xor rax, rsp 00017 48 89 44 24 28 mov QWORD PTR __$ArrayPad$[rsp], rax - -; 7152 : int maxv, dummy; -; 7153 : char c, p, t; -; 7154 : -; 7155 : if (!x) x = &dummy; -; 7156 : if (!y) y = &dummy; - +; Line 7156 0001c 48 85 d2 test rdx, rdx 0001f 48 8d 6c 24 24 lea rbp, QWORD PTR dummy$[rsp] 00024 48 8b d9 mov rbx, rcx - -; 7157 : if (!comp) comp = &dummy; - +; Line 7157 00027 4c 8d 7c 24 24 lea r15, QWORD PTR dummy$[rsp] - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 0002c 48 8b 89 d0 00 00 00 mov rcx, QWORD PTR [rcx+208] 00033 4c 8d 74 24 24 lea r14, QWORD PTR dummy$[rsp] - -; 7152 : int maxv, dummy; -; 7153 : char c, p, t; -; 7154 : -; 7155 : if (!x) x = &dummy; -; 7156 : if (!y) y = &dummy; - +; Line 7156 00038 48 0f 45 ea cmovne rbp, rdx - -; 7157 : if (!comp) comp = &dummy; - +; Line 7157 0003c 4d 85 c0 test r8, r8 - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 0003f 48 8b 83 d8 00 00 00 mov rax, QWORD PTR [rbx+216] - -; 7157 : if (!comp) comp = &dummy; - +; Line 7157 00046 4d 0f 45 f8 cmovne r15, r8 - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 0004a 4d 85 c9 test r9, r9 0004d 48 89 8b c0 00 00 00 mov QWORD PTR [rbx+192], rcx - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 00054 48 89 83 c8 00 00 00 mov QWORD PTR [rbx+200], rax 0005b 4d 0f 45 f1 cmovne r14, r9 - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0005f 48 3b c8 cmp rcx, rax 00062 73 0f jae SHORT $LN17@stbi__pnm_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 00064 0f b6 39 movzx edi, BYTE PTR [rcx] 00067 48 ff c1 inc rcx 0006a 48 89 8b c0 00 00 00 mov QWORD PTR [rbx+192], rcx 00071 eb 28 jmp SHORT $LN48@stbi__pnm_ $LN17@stbi__pnm_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 00073 83 7b 30 00 cmp DWORD PTR [rbx+48], 0 00077 74 1f je SHORT $LN18@stbi__pnm_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00079 48 8b cb mov rcx, rbx 0007c e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00081 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00088 0f b6 38 movzx edi, BYTE PTR [rax] @@ -107535,43 +37533,30 @@ $LN17@stbi__pnm_: 00 00 mov QWORD PTR [rbx+192], rcx 00096 eb 03 jmp SHORT $LN48@stbi__pnm_ $LN18@stbi__pnm_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 00098 40 32 ff xor dil, dil $LN48@stbi__pnm_: - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0009b b8 30 00 00 00 mov eax, 48 ; 00000030H 000a0 48 8b d3 mov rdx, rbx 000a3 48 8d 34 03 lea rsi, QWORD PTR [rbx+rax] 000a7 48 3b 8b c8 00 00 00 cmp rcx, QWORD PTR [rbx+200] 000ae 73 10 jae SHORT $LN21@stbi__pnm_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 000b0 0f b6 11 movzx edx, BYTE PTR [rcx] 000b3 48 8d 41 01 lea rax, QWORD PTR [rcx+1] 000b7 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 000be eb 25 jmp SHORT $LN20@stbi__pnm_ $LN21@stbi__pnm_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 000c0 83 3e 00 cmp DWORD PTR [rsi], 0 000c3 74 1e je SHORT $LN22@stbi__pnm_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 000c5 48 8b cb mov rcx, rbx 000c8 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 000cd 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 000d4 0f b6 10 movzx edx, BYTE PTR [rax] @@ -107580,21 +37565,10 @@ $LN21@stbi__pnm_: 00 00 mov QWORD PTR [rbx+192], rax 000e1 eb 02 jmp SHORT $LN20@stbi__pnm_ $LN22@stbi__pnm_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 000e3 32 d2 xor dl, dl $LN20@stbi__pnm_: - -; 7158 : -; 7159 : stbi__rewind(s); -; 7160 : -; 7161 : // Get identifier -; 7162 : p = (char)stbi__get8(s); -; 7163 : t = (char)stbi__get8(s); -; 7164 : if (p != 'P' || (t != '5' && t != '6')) { - +; Line 7164 000e5 40 80 ff 50 cmp dil, 80 ; 00000050H 000e9 0f 85 2d 01 00 00 jne $LN6@stbi__pnm_ @@ -107602,48 +37576,32 @@ $LN20@stbi__pnm_: 000f2 3c 01 cmp al, 1 000f4 0f 87 22 01 00 00 ja $LN6@stbi__pnm_ - -; 7165 : stbi__rewind(s); -; 7166 : return 0; -; 7167 : } -; 7168 : -; 7169 : *comp = (t == '6') ? 3 : 1; // '5' is 1-component .pgm; '6' is 3-component .ppm - +; Line 7169 000fa 80 fa 36 cmp dl, 54 ; 00000036H 000fd b8 01 00 00 00 mov eax, 1 00102 b9 03 00 00 00 mov ecx, 3 00107 0f 44 c1 cmove eax, ecx 0010a 41 89 06 mov DWORD PTR [r14], eax - -; 1077 : if (s->img_buffer < s->img_buffer_end) - +; Line 1077 0010d 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00114 48 3b 83 c8 00 00 00 cmp rax, QWORD PTR [rbx+200] 0011b 73 0f jae SHORT $LN27@stbi__pnm_ - -; 1078 : return *s->img_buffer++; - +; Line 1078 0011d 0f b6 08 movzx ecx, BYTE PTR [rax] 00120 48 ff c0 inc rax 00123 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax 0012a eb 25 jmp SHORT $LN26@stbi__pnm_ $LN27@stbi__pnm_: - -; 1079 : if (s->read_from_callbacks) { - +; Line 1079 0012c 83 3e 00 cmp DWORD PTR [rsi], 0 0012f 74 1e je SHORT $LN28@stbi__pnm_ - -; 1080 : stbi__refill_buffer(s); - +; Line 1080 00131 48 8b cb mov rcx, rbx 00134 e8 00 00 00 00 call stbi__refill_buffer - -; 1081 : return *s->img_buffer++; - +; Line 1081 00139 48 8b 83 c0 00 00 00 mov rax, QWORD PTR [rbx+192] 00140 0f b6 08 movzx ecx, BYTE PTR [rax] @@ -107652,43 +37610,25 @@ $LN27@stbi__pnm_: 00 00 mov QWORD PTR [rbx+192], rax 0014d eb 02 jmp SHORT $LN26@stbi__pnm_ $LN28@stbi__pnm_: - -; 1082 : } -; 1083 : return 0; - +; Line 1083 0014f 32 c9 xor cl, cl $LN26@stbi__pnm_: - -; 7170 : -; 7171 : c = (char)stbi__get8(s); - +; Line 7171 00151 88 4c 24 20 mov BYTE PTR c$[rsp], cl - -; 7172 : stbi__pnm_skip_whitespace(s, &c); - +; Line 7172 00155 48 8d 54 24 20 lea rdx, QWORD PTR c$[rsp] 0015a 48 8b cb mov rcx, rbx 0015d e8 00 00 00 00 call stbi__pnm_skip_whitespace - -; 7173 : -; 7174 : *x = stbi__pnm_getinteger(s, &c); // read width - +; Line 7174 00162 48 8d 54 24 20 lea rdx, QWORD PTR c$[rsp] 00167 48 8b cb mov rcx, rbx 0016a e8 00 00 00 00 call stbi__pnm_getinteger 0016f 89 45 00 mov DWORD PTR [rbp], eax - -; 7175 : if (*x == 0) - +; Line 7175 00172 85 c0 test eax, eax 00174 75 28 jne SHORT $LN7@stbi__pnm_ $LN50@stbi__pnm_: - -; 7188 : return 16; -; 7189 : else -; 7190 : return 8; -; 7191 : } - +; Line 7191 00176 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 0017c 65 48 8b 04 25 @@ -107700,49 +37640,31 @@ $LN50@stbi__pnm_: 00195 48 89 14 01 mov QWORD PTR [rcx+rax], rdx 00199 e9 9a 00 00 00 jmp $LN49@stbi__pnm_ $LN7@stbi__pnm_: - -; 7176 : return stbi__err("invalid width", "PPM image header had zero or overflowing width"); -; 7177 : stbi__pnm_skip_whitespace(s, &c); - +; Line 7177 0019e 48 8d 54 24 20 lea rdx, QWORD PTR c$[rsp] 001a3 48 8b cb mov rcx, rbx 001a6 e8 00 00 00 00 call stbi__pnm_skip_whitespace - -; 7178 : -; 7179 : *y = stbi__pnm_getinteger(s, &c); // read height - +; Line 7179 001ab 48 8d 54 24 20 lea rdx, QWORD PTR c$[rsp] 001b0 48 8b cb mov rcx, rbx 001b3 e8 00 00 00 00 call stbi__pnm_getinteger 001b8 41 89 07 mov DWORD PTR [r15], eax - -; 7180 : if (*y == 0) - +; Line 7180 001bb 85 c0 test eax, eax 001bd 74 b7 je SHORT $LN50@stbi__pnm_ - -; 7181 : return stbi__err("invalid width", "PPM image header had zero or overflowing width"); -; 7182 : stbi__pnm_skip_whitespace(s, &c); - +; Line 7182 001bf 48 8d 54 24 20 lea rdx, QWORD PTR c$[rsp] 001c4 48 8b cb mov rcx, rbx 001c7 e8 00 00 00 00 call stbi__pnm_skip_whitespace - -; 7183 : -; 7184 : maxv = stbi__pnm_getinteger(s, &c); // read max value - +; Line 7184 001cc 48 8d 54 24 20 lea rdx, QWORD PTR c$[rsp] 001d1 48 8b cb mov rcx, rbx 001d4 e8 00 00 00 00 call stbi__pnm_getinteger 001d9 8b c8 mov ecx, eax - -; 7185 : if (maxv > 65535) - +; Line 7185 001db 3d ff ff 00 00 cmp eax, 65535 ; 0000ffffH 001e0 7e 25 jle SHORT $LN9@stbi__pnm_ - -; 431 : stbi__g_failure_reason = str; - +; Line 431 001e2 8b 15 00 00 00 00 mov edx, DWORD PTR _tls_index 001e8 65 48 8b 04 25 @@ -107752,14 +37674,10 @@ $LN7@stbi__pnm_: 001fa 48 8d 15 00 00 00 00 lea rdx, OFFSET FLAT:??_C@_0BC@CNFMOKHC@max?5value?5?$DO?565535@ 00201 48 89 14 01 mov QWORD PTR [rcx+rax], rdx - -; 7186 : return stbi__err("max value > 65535", "PPM image supports only 8-bit and 16-bit images"); - +; Line 7186 00205 eb 31 jmp SHORT $LN49@stbi__pnm_ $LN9@stbi__pnm_: - -; 7187 : else if (maxv > 255) - +; Line 7187 00207 81 f9 ff 00 00 00 cmp ecx, 255 ; 000000ffH 0020d b8 08 00 00 00 mov eax, 8 @@ -107767,27 +37685,18 @@ $LN9@stbi__pnm_: 00217 0f 4f c2 cmovg eax, edx 0021a eb 1e jmp SHORT $LN12@stbi__pnm_ $LN6@stbi__pnm_: - -; 342 : s->img_buffer = s->img_buffer_original; - +; Line 342 0021c 48 8b 83 d0 00 00 00 mov rax, QWORD PTR [rbx+208] 00223 48 89 83 c0 00 00 00 mov QWORD PTR [rbx+192], rax - -; 343 : s->img_buffer_end = s->img_buffer_original_end; - +; Line 343 0022a 48 8b 83 d8 00 00 00 mov rax, QWORD PTR [rbx+216] 00231 48 89 83 c8 00 00 00 mov QWORD PTR [rbx+200], rax $LN49@stbi__pnm_: - -; 7188 : return 16; -; 7189 : else -; 7190 : return 8; -; 7191 : } - +; Line 7191 00238 33 c0 xor eax, eax $LN12@stbi__pnm_: 0023a 48 8b 4c 24 28 mov rcx, QWORD PTR __$ArrayPad$[rsp] diff --git a/源代码/StgSharpC/x64/Release/stb_image.obj b/源代码/StgSharpC/x64/Release/stb_image.obj index 2b6fd2ba..2151cde6 100644 Binary files a/源代码/StgSharpC/x64/Release/stb_image.obj and b/源代码/StgSharpC/x64/Release/stb_image.obj differ diff --git a/源代码/StgSharpC/x64/Release/vc143.pdb b/源代码/StgSharpC/x64/Release/vc143.pdb index 315e840b..5a2be5d2 100644 Binary files a/源代码/StgSharpC/x64/Release/vc143.pdb and b/源代码/StgSharpC/x64/Release/vc143.pdb differ diff --git a/源代码/StgSharpC/x64/Release/vector.cod b/源代码/StgSharpC/x64/Release/vector.cod index 7613b98b..d533c9c7 100644 --- a/源代码/StgSharpC/x64/Release/vector.cod +++ b/源代码/StgSharpC/x64/Release/vector.cod @@ -6,102 +6,61 @@ INCLUDELIB OLDNAMES PUBLIC normalize ; Function compile flags: /Ogtpy -; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\vector.c ; COMDAT normalize _TEXT SEGMENT source$ = 8 target$ = 16 normalize PROC ; COMDAT - -; 6 : // ¼ÆËãsourceµij¤¶ȵÄƽ·½ -; 7 : __m128 a_length_sq = _mm_mul_ps(*source, *source); // ÏòÁ¿µã³Ë×ÔÉí - +; File D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\Դ´úÂë\StgSharpC\vector.c +; Line 7 00000 0f 10 11 movups xmm2, XMMWORD PTR [rcx] 00003 0f 28 ca movaps xmm1, xmm2 00006 0f 59 ca mulps xmm1, xmm2 - -; 8 : a_length_sq = _mm_add_ps(a_length_sq, _mm_shuffle_ps(a_length_sq, a_length_sq, _MM_SHUFFLE(2, 3, 0, 1))); - +; Line 8 00009 0f 28 c1 movaps xmm0, xmm1 0000c 0f c6 c1 b1 shufps xmm0, xmm1, 177 ; 000000b1H 00010 0f 58 c8 addps xmm1, xmm0 - -; 9 : a_length_sq = _mm_add_ss(a_length_sq, _mm_shuffle_ps(a_length_sq, a_length_sq, _MM_SHUFFLE(0, 0, 3, 2))); - +; Line 9 00013 0f 28 c1 movaps xmm0, xmm1 00016 0f c6 c1 0e shufps xmm0, xmm1, 14 0001a f3 0f 58 c8 addss xmm1, xmm0 - -; 10 : -; 11 : // ¹éһ»¯ÏòÁ¿source -; 12 : __m128 a_inv_length = _mm_rsqrt_ps(a_length_sq); // ¼ÆËãsource³¤¶ȵĵ¹Êýƽ·½¸ù - +; Line 12 0001e 0f 52 d9 rsqrtps xmm3, xmm1 - -; 13 : *source = _mm_mul_ps(*source, a_inv_length); // ÓÃsource³ËÒÔÆ䳤¶ȵĵ¹Êýƽ·½¸ùµõ½µ¥λÏòÁ¿ - +; Line 13 00021 0f 59 da mulps xmm3, xmm2 00024 0f 11 19 movups XMMWORD PTR [rcx], xmm3 - -; 14 : -; 15 : // ¼ÆËãtargetÓësourceµĵã»ý -; 16 : __m128 dot_product = _mm_mul_ps(*target, *source); - +; Line 16 00027 0f 28 cb movaps xmm1, xmm3 0002a 0f 10 12 movups xmm2, XMMWORD PTR [rdx] 0002d 0f 59 ca mulps xmm1, xmm2 - -; 17 : dot_product = _mm_add_ps(dot_product, _mm_shuffle_ps(dot_product, dot_product, _MM_SHUFFLE(2, 3, 0, 1))); - +; Line 17 00030 0f 28 c1 movaps xmm0, xmm1 00033 0f c6 c1 b1 shufps xmm0, xmm1, 177 ; 000000b1H 00037 0f 58 c8 addps xmm1, xmm0 - -; 18 : dot_product = _mm_add_ss(dot_product, _mm_shuffle_ps(dot_product, dot_product, _MM_SHUFFLE(0, 0, 3, 2))); - +; Line 18 0003a 0f 28 c1 movaps xmm0, xmm1 0003d 0f c6 c1 0e shufps xmm0, xmm1, 14 00041 f3 0f 58 c8 addss xmm1, xmm0 - -; 19 : -; 20 : // ´ÓtargetÖмõȥsourceµķ½Ïò·ÖÁ¿£¬ʹÆ䴹ֱÓÚsource -; 21 : __m128 b_orthogonal = _mm_sub_ps(*target, _mm_mul_ps(*source, dot_product)); - +; Line 21 00045 0f 59 cb mulps xmm1, xmm3 00048 0f 5c d1 subps xmm2, xmm1 - -; 22 : -; 23 : // ¹éһ»¯ÏòÁ¿b_orthogonal -; 24 : __m128 b_length_sq = _mm_mul_ps(b_orthogonal, b_orthogonal); - +; Line 24 0004b 0f 28 ca movaps xmm1, xmm2 0004e 0f 59 ca mulps xmm1, xmm2 - -; 25 : b_length_sq = _mm_add_ps(b_length_sq, _mm_shuffle_ps(b_length_sq, b_length_sq, _MM_SHUFFLE(2, 3, 0, 1))); - +; Line 25 00051 0f 28 c1 movaps xmm0, xmm1 00054 0f c6 c1 b1 shufps xmm0, xmm1, 177 ; 000000b1H 00058 0f 58 c8 addps xmm1, xmm0 - -; 26 : b_length_sq = _mm_add_ss(b_length_sq, _mm_shuffle_ps(b_length_sq, b_length_sq, _MM_SHUFFLE(0, 0, 3, 2))); - +; Line 26 0005b 0f 28 c1 movaps xmm0, xmm1 0005e 0f c6 c1 0e shufps xmm0, xmm1, 14 00062 f3 0f 58 c8 addss xmm1, xmm0 - -; 27 : -; 28 : __m128 b_inv_length = _mm_rsqrt_ps(b_length_sq); - +; Line 28 00066 0f 52 c9 rsqrtps xmm1, xmm1 - -; 29 : *target = _mm_mul_ps(b_orthogonal, b_inv_length); - +; Line 29 00069 0f 59 ca mulps xmm1, xmm2 0006c 0f 11 0a movups XMMWORD PTR [rdx], xmm1 - -; 30 : -; 31 : } - +; Line 31 0006f c3 ret 0 normalize ENDP _TEXT ENDS diff --git a/源代码/StgSharpC/x64/Release/vector.obj b/源代码/StgSharpC/x64/Release/vector.obj index 7d4bd389..f10044da 100644 Binary files a/源代码/StgSharpC/x64/Release/vector.obj and b/源代码/StgSharpC/x64/Release/vector.obj differ diff --git a/源代码/StgSharpDebug/Controlling/Controls/BattleField.cs b/源代码/StgSharpDebug/Controlling/Controls/BattleField.cs index ff413cbc..02f53d54 100644 --- a/源代码/StgSharpDebug/Controlling/Controls/BattleField.cs +++ b/源代码/StgSharpDebug/Controlling/Controls/BattleField.cs @@ -30,7 +30,7 @@ //----------------------------------------------------------------------- using StgSharp.Geometries; using StgSharp.Graphics; -using StgSharp.Logic; + using StgSharp.Math; using System; @@ -43,14 +43,19 @@ namespace StgSharp.Controls { public class BattleField : ControllingItem { - public override vec4d[] TextureBox - { - get ; - } - public override IEnumerator GetEnumerator() + public bool IsEntity => true; + public ReadOnlySpan TextureBox + { + get => throw new NotImplementedException(); + } + public Rectangle BoundingBox { get; set; } + public vec2d Position { get; set; } + + public IEnumerator GetEnumerator() { throw new NotImplementedException(); } + } } diff --git a/源代码/StgSharpDebug/Controlling/Controls/ButtonGroup.cs b/源代码/StgSharpDebug/Controlling/Controls/ButtonGroup.cs index 7342c1fc..9f065f1a 100644 --- a/源代码/StgSharpDebug/Controlling/Controls/ButtonGroup.cs +++ b/源代码/StgSharpDebug/Controlling/Controls/ButtonGroup.cs @@ -1,4 +1,34 @@ -using StgSharp.Geometries; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ButtonGroup.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Geometries; using StgSharp.Graphics; using StgSharp.Math; @@ -6,19 +36,42 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; +using System.Security.Cryptography.X509Certificates; using System.Text; +using System.Transactions; namespace StgSharp.Controls { - public class KeyboardButtonGroup : ControllingItem + public abstract class KeyboardButtonGroup : ControllingItem { - private List buttonList; + private List buttonList; private TriggerButton current; public KeyboardButtonGroup() { - buttonList = new List(); + buttonList = new List(); + } + + public bool IsEntity { get => false; } + + public ReadOnlySpan TextureBox + { + get => throw new NotSupportedException(); + } + + public Rectangle BoundingBox { get; set; } + + public TriggerButton CurrentButton + { + get => current; + } + + public vec2d Position { get; set; } + + protected List AllButton + { + get => buttonList; } public void AddButton(TriggerButton button) @@ -26,46 +79,79 @@ namespace StgSharp.Controls buttonList.Add(button); } - public TriggerButton CurrentButton + public abstract void Confirm(); + + public IEnumerator GetEnumerator() { - get => current; - } - public override vec4d[] TextureBox - { - get => throw new NotSupportedException(); - } - - public void MoveLeft() - { - - } - - public void MoveRight() - { - - } - - public void MoveUp() - { - - } - - public void MoveDown() - { - - } - - public void Confirm() - { - - } - - public override IEnumerator GetEnumerator() - { - foreach (var item in buttonList) + foreach (TriggerButton item in buttonList) { yield return item.Single(); } } + + public void MoveDown() + { + TriggerButton button = current; + while ((button.Down != null) && button.Down.IsDisabled) + { + button = button.Right; + } + if (current == button) + { + return; + } + current.DeHighlight(); + button.Enable(); + current = button; + } + + public void MoveLeft() + { + TriggerButton button = current; + while ((button.Left != null) && button.Left.IsDisabled) + { + button = button.Left; + } + if (current == button) + { + return; + } + current.DeHighlight(); + button.Enable(); + current = button; + } + + public void MoveRight() + { + TriggerButton button = current; + while ((button.Right != null) && button.Right.IsDisabled) + { + button = button.Right; + } + if (current == button) + { + return; + } + current.DeHighlight(); + button.Enable(); + current = button; + } + + public void MoveUp() + { + TriggerButton button = current; + while ((button.Up != null) && button.Up.IsDisabled) + { + button = button.Right; + } + if (current == button) + { + return; + } + current.DeHighlight(); + button.Enable(); + current = button; + } + } } diff --git a/源代码/StgSharpDebug/Controlling/Controls/CharacterIndexImage.cs b/源代码/StgSharpDebug/Controlling/Controls/CharacterIndexImage.cs index 35f1081b..3757b516 100644 --- a/源代码/StgSharpDebug/Controlling/Controls/CharacterIndexImage.cs +++ b/源代码/StgSharpDebug/Controlling/Controls/CharacterIndexImage.cs @@ -1,4 +1,34 @@ -using StgSharp.Geometries; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="CharacterIndexImage.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Geometries; using StgSharp.Graphics; using StgSharp.Math; @@ -13,41 +43,14 @@ namespace StgSharp.Controls { public class CharacterLineIndexImage : ControllingItem { - private int length; + private char[] displayIndex; private char defaultChar; Dictionary texIndex; + private int length; PlainGeometryMesh _tittleMesh; - public override vec4d[] TextureBox - { - get => throw new NotSupportedException(); - } - - public void Display(string message) - { - if (string.IsNullOrEmpty(message)) - { - message = string.Empty; - } - - string result = message.Length >= length ? - message.Substring(message.Length - displayIndex.Length) : - message.PadLeft(length,defaultChar); - - displayIndex = result.ToCharArray(); - } - - public override IEnumerator GetEnumerator() - { - yield return _tittleMesh; - foreach (char item in displayIndex) - { - yield return texIndex[item]; - } - } - public CharacterLineIndexImage( int length, char defaultChar, PlainGeometryMesh tittleMesh, IEnumerable<(char, PlainGeometryMesh)> indexEnumeration) @@ -58,5 +61,40 @@ namespace StgSharp.Controls texIndex = indexEnumeration.ToDictionary(item => item.Item1, item => item.Item2); } + public bool IsEntity + { + get => true; + } + + public ReadOnlySpan TextureBox + { + get => throw new NotSupportedException(); + } + public Rectangle BoundingBox { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + public vec2d Position { get => throw new NotImplementedException(); set => throw new NotImplementedException(); } + + public void Display(string message) + { + if (string.IsNullOrEmpty(message)) + { + message = string.Empty; + } + + string result = (message.Length >= length) ? + message.Substring(message.Length - displayIndex.Length) : + message.PadLeft(length, defaultChar); + + displayIndex = result.ToCharArray(); + } + + public IEnumerator GetEnumerator() + { + yield return _tittleMesh; + foreach (char item in displayIndex) + { + yield return texIndex[item]; + } + } + } } diff --git a/源代码/StgSharpDebug/Controlling/Controls/ControllingIntem.cs b/源代码/StgSharpDebug/Controlling/Controls/ControllingIntem.cs index 66945e17..54f77d8f 100644 --- a/源代码/StgSharpDebug/Controlling/Controls/ControllingIntem.cs +++ b/源代码/StgSharpDebug/Controlling/Controls/ControllingIntem.cs @@ -1,4 +1,34 @@ -using StgSharp.Geometries; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ControllingIntem.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Geometries; using StgSharp.Graphics; using StgSharp.Math; @@ -9,19 +39,20 @@ using System.Text; namespace StgSharp.Controls { - public abstract partial class ControllingItem: IEnumerable + public interface ControllingItem : IEnumerable { - public vec2d Position { get; set; } - public Rectangle BoundingBox { get; set; } - public abstract vec4d[] TextureBox { get; } + public abstract bool IsEntity { get; } + public abstract ReadOnlySpan TextureBox { get; } + public abstract Rectangle BoundingBox { get; set; } + public abstract vec2d Position { get; set; } - public abstract IEnumerator GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } + } } diff --git a/源代码/StgSharpDebug/Controlling/Controls/DecorationBox.cs b/源代码/StgSharpDebug/Controlling/Controls/DecorationBox.cs index bce85ff0..bb0807a1 100644 --- a/源代码/StgSharpDebug/Controlling/Controls/DecorationBox.cs +++ b/源代码/StgSharpDebug/Controlling/Controls/DecorationBox.cs @@ -1,4 +1,34 @@ -using StgSharp.Controls; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="DecorationBox.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Controls; using StgSharp.Geometries; using StgSharp.Graphics; using StgSharp.Math; @@ -11,21 +41,28 @@ namespace StgSharp.Controls { public class DecorationBox : ControllingItem { + private PlainGeometryMesh renderMesh; - public override vec4d[] TextureBox + public DecorationBox(Rectangle bound, Image texture, vec2d[] texCoord) + { + renderMesh = new PlainGeometryMesh(BoundingBox, new TextureProvider(texture, texCoord)); + } + + public bool IsEntity => true; + + public ReadOnlySpan TextureBox { get => renderMesh.TextureCoord; } + public Rectangle BoundingBox { get; set; } - public override IEnumerator GetEnumerator() + public vec2d Position { get; set; } + + public IEnumerator GetEnumerator() { yield return renderMesh; } - public DecorationBox(Rectangle bound, Image texture, vec4d[] texCoord) - { - renderMesh = new PlainGeometryMesh(BoundingBox, texture, texCoord); - } } } diff --git a/源代码/StgSharpDebug/Controlling/Controls/MarkingLable.cs b/源代码/StgSharpDebug/Controlling/Controls/MarkingLable.cs index 58a9a248..43d00e30 100644 --- a/源代码/StgSharpDebug/Controlling/Controls/MarkingLable.cs +++ b/源代码/StgSharpDebug/Controlling/Controls/MarkingLable.cs @@ -1,7 +1,38 @@ -using StgSharp.Controls; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="MarkingLable.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Controls; using StgSharp.Geometries; using StgSharp.Graphics; using StgSharp.Math; +using StgSharp.Timing; using System; using System.Collections.Generic; @@ -12,28 +43,12 @@ namespace StgSharp.Controls { public class MarkingLabel : ControllingItem { - public override vec4d[] TextureBox - { - get => marker.TextureCoord; - } - private vec2d _currentPosition, _movementVec; - - private TimeFunction _movement; private PlainGeometryMesh marker; - public void MoveTo(vec2d target) - { - Move(target - Position); - } + private TimeFunction _movement; - public void Move(vec2d movement) - { - if (!_movement.IsComplete) - { - Position = _currentPosition + _movement.Calculate() * _movementVec; - } - } + private vec2d _currentPosition, _movementVec; public MarkingLabel(PlainGeometryMesh marker, TimeFunction movement) { @@ -41,10 +56,32 @@ namespace StgSharp.Controls _movement = movement; } - public override IEnumerator GetEnumerator() + public bool IsEntity => true; + public ReadOnlySpan TextureBox + { + get => marker.TextureCoord; + } + public Rectangle BoundingBox { get; set; } + public vec2d Position { get; set; } + + public IEnumerator GetEnumerator() { yield return marker; } + + public void Move(vec2d movement) + { + if (!_movement.IsComplete) + { + Position = _currentPosition + (_movement.Calculate() * _movementVec); + } + } + + public void MoveTo(vec2d target) + { + Move(target - Position); + } + } } diff --git a/源代码/StgSharpDebug/Controlling/Controls/TriggerButton.cs b/源代码/StgSharpDebug/Controlling/Controls/TriggerButton.cs index 876fbce9..61c09e1a 100644 --- a/源代码/StgSharpDebug/Controlling/Controls/TriggerButton.cs +++ b/源代码/StgSharpDebug/Controlling/Controls/TriggerButton.cs @@ -35,81 +35,183 @@ using StgSharp.Math; using System; using System.Collections.Generic; +using System.Runtime.InteropServices; using System.Text; namespace StgSharp.Controls { + + public delegate void RenderButtonTextureCallback(ButtonStatus status, float beginTime, in TextureProvider texture); + + public enum ButtonStatus + { + Error = 0b0, + Disable = 0b1, + Enable = 0b10, + Highlight = 0b100, + Confirm = 0b1000, + + DisableToEnable = Disable | Enable, + EnableToDisable = -(Enable | DisableToEnable), + + EnableToHighlight = Enable | Highlight, + HighlightToEnable = -(Enable | Highlight), + + HighlightToDisable = -(Highlight | Disable), + } + public class TriggerButton : ControllingItem { - private AnimationBuilder switchAnimationBuilder; + + private Action? confirmCallback; + private Action? disableCallback; #nullable enable - private Action? enableAction; - private Action? disableAction; - private Action? confirmAction; + private Action? enableCallback; + private float _statusBeginTime; + + private RenderButtonTextureCallback _renderButton; + private TextureProvider _texture; + #nullable restore - public override vec4d[] TextureBox + public TriggerButton() { - get { return switchAnimationBuilder.TextureFrame.VertexStream; } - } - - public bool IsHighLighted { get; internal set; } - public bool IsDisabled { get; internal set; } - - public event Action EnableEvent - { - add { enableAction += value; } - remove { enableAction -= value; } - } - - public event Action DisableEvent - { - add { disableAction += value; } - remove { disableAction -= value; } + CurrentStatus = ButtonStatus.Disable; } public event Action ConfirmEvent { - add { confirmAction += value; } - remove { confirmAction -= value; } + add { confirmCallback += value; } + remove { confirmCallback -= value; } } - public void Enable(AnimationBuilder animation) + public event Action DisableEvent { - if (!IsDisabled) + add { disableCallback += value; } + remove { disableCallback -= value; } + } + + public event Action EnableEvent + { + add { enableCallback += value; } + remove { enableCallback -= value; } + } + + public event RenderButtonTextureCallback RenderButtonTexture + { + add + { + if (_renderButton == null) + { + _renderButton = value; + } + else + { + _renderButton += value; + } + } + remove + { + if (_renderButton != null) + { + _renderButton -= value; + } + } + } + + public bool IsHighLighted { get; internal set; } + + public bool IsDisabled { get; internal set; } + + public bool IsEntity => true; + + public ReadOnlySpan TextureBox + { + get => MemoryMarshal.Cast(_texture.TextureCoordinate); + } + public Rectangle BoundingBox { get; set; } + + public TriggerButton Left { get; internal set; } + public TriggerButton Right { get; internal set; } + public TriggerButton Up { get; internal set; } + public TriggerButton Down { get; internal set; } + public vec2d Position { get; set; } + + internal TextureProvider Texture + { + get => _texture; + set => _texture = value; + } + + protected ButtonStatus CurrentStatus { get; set; } + + public void DeHighlight() + { + if (CurrentStatus == ButtonStatus.Highlight) + { + CurrentStatus = ButtonStatus.HighlightToEnable; + } + } + + public void Disable() + { + CurrentStatus = CurrentStatus switch + { + ButtonStatus.Enable => ButtonStatus.EnableToDisable, + ButtonStatus.Highlight => ButtonStatus.HighlightToDisable, + _ => CurrentStatus, + }; + if (disableCallback != null) + { + disableCallback(); + } + } + + public void Enable() + { + if (CurrentStatus == ButtonStatus.Disable) + { + CurrentStatus = ButtonStatus.DisableToEnable; + } + else { return; } - if (switchAnimationBuilder == null || switchAnimationBuilder.IsComplete) + if (enableCallback != null) { - switchAnimationBuilder = animation; + enableCallback(); } - if( enableAction != null)enableAction(); } - public void Disable(AnimationBuilder animation) + public IEnumerator GetEnumerator() { - if (switchAnimationBuilder == null || switchAnimationBuilder.IsComplete) - { - switchAnimationBuilder = animation; - } - if (disableAction != null) disableAction(); + _renderButton(CurrentStatus, _statusBeginTime, in _texture); + yield return new PlainGeometryMesh(this.BoundingBox, _texture); } - public void Highlight(AnimationBuilder animation) + public void Highlight() { - if (switchAnimationBuilder == null || switchAnimationBuilder.IsComplete) + if (CurrentStatus == ButtonStatus.Enable) { - switchAnimationBuilder = animation; + CurrentStatus |= ButtonStatus.EnableToHighlight; + } + else + { + return; + } + if (confirmCallback != null) + { + confirmCallback(); } - if (confirmAction != null) confirmAction(); } - public override IEnumerator GetEnumerator() + internal void Init(ButtonStatus status) { - yield return new PlainGeometryMesh(this.BoundingBox, switchAnimationBuilder.GetAnimationFrame(), - this.TextureBox); + if (CurrentStatus == ButtonStatus.Error) + { + CurrentStatus = status; + } } }//----------------------------------- End of class -------------------------------------------- diff --git a/源代码/StgSharpDebug/Controlling/Designer.cs b/源代码/StgSharpDebug/Controlling/Designer.cs deleted file mode 100644 index 3d05953e..00000000 --- a/源代码/StgSharpDebug/Controlling/Designer.cs +++ /dev/null @@ -1,72 +0,0 @@ -using StgSharp.Geometries; -using StgSharp.Graphics; -using StgSharp.Controls; -using StgSharp.Controlling.UsrActivity; -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Net; -using System.Text; - -namespace StgSharp.Graphics -{ - public class ViewPortDesigner - { - private KeyboardButtonGroup currentButtonGroup; - - private List _controlList; - - public ViewPortDesigner() - { - _controlList = new List(); - } - - public KeyboardButtonGroup CreateKeyboardButtonGroup( - ITrigger leftBidning, - ITrigger rightBinding, - ITrigger upBinding, - ITrigger downBinding, - ITrigger confirmBinding - ) - { - var ret = new KeyboardButtonGroup(); - _controlList.Add(ret); - currentButtonGroup = ret; - return ret; - } - - public TriggerButton CreateKeyboardButton( - Rectangle bonding, AnimationBuilder defaultAnimation, bool isEnable - ) - { - var ret = new TriggerButton(); - ret.BoundingBox = bonding; - if (isEnable) - { - ret.IsDisabled = false; - ret.Enable(defaultAnimation); - } - else - { - ret.IsDisabled = true; - ret.Disable(defaultAnimation); - } - currentButtonGroup.AddButton(ret); - return ret; - } - - - - public CharacterLineIndexImage CreateCharacterLine( - int length, char blankFilling, PlainGeometryMesh tittle, IEnumerable<(char,PlainGeometryMesh)> charList - ) - { - var ret = new CharacterLineIndexImage(length, blankFilling,tittle,charList); - _controlList.Add(ret); - return ret; - } - - }//---------------------------------- End of Class ----------------------------------------- - -} diff --git a/源代码/StgSharpDebug/Controlling/IO/GLIO.cs b/源代码/StgSharpDebug/Controlling/IO/GLIO.cs index ecb885a6..5ee914fa 100644 --- a/源代码/StgSharpDebug/Controlling/IO/GLIO.cs +++ b/源代码/StgSharpDebug/Controlling/IO/GLIO.cs @@ -52,7 +52,7 @@ namespace StgSharp [DllImport(SSC_libName, EntryPoint = "linkShaderProgram", CallingConvention = CallingConvention.Cdecl)] - internal static extern unsafe uint InternalLinkShaderProgram(GLcontext* context, uint shaderProgram); + internal static extern unsafe uint InternalLinkShaderProgram(OpenglContext* context, uint shaderProgram); [DllImport(SSC_libName, EntryPoint = "readLog", CallingConvention = CallingConvention.Cdecl)] @@ -76,8 +76,32 @@ namespace StgSharp.Graphics public delegate IntPtr ImageLoader(string name, ref int width, ref int height, ref int definedChannel, int desiredChannel); [StructLayout(LayoutKind.Sequential)] - public struct GLcontext + public struct OpenglContext { + + public override bool Equals(object obj) + { + return false; + } + + public override unsafe int GetHashCode() + { + fixed (OpenglContext* sptr = &this) + { + return sptr->GetHashCode(); + } + } + + public static bool operator !=(OpenglContext left, OpenglContext right) + { + return !(left == right); + } + + public static bool operator ==(OpenglContext left, OpenglContext right) + { + return left.Equals(right); + } + #region glapi internal unsafe delegate* glAccumxOES; @@ -2615,27 +2639,6 @@ namespace StgSharp.Graphics #endregion glapi - public override bool Equals(object obj) - { - return false; - } - public unsafe override int GetHashCode() - { - fixed (GLcontext* sptr = &this) - { - return sptr->GetHashCode(); - } - } - - public static bool operator ==(GLcontext left, GLcontext right) - { - return left.Equals(right); - } - - public static bool operator !=(GLcontext left, GLcontext right) - { - return !(left == right); - } } } \ No newline at end of file diff --git a/源代码/StgSharpDebug/Controlling/IO/InternalIO.cs b/源代码/StgSharpDebug/Controlling/IO/InternalIO.cs index b3a37e34..57ba53bd 100644 --- a/源代码/StgSharpDebug/Controlling/IO/InternalIO.cs +++ b/源代码/StgSharpDebug/Controlling/IO/InternalIO.cs @@ -30,7 +30,7 @@ //----------------------------------------------------------------------- using StgSharp.Geometries; using StgSharp.Graphics; -using StgSharp.Graphics.GL; +using StgSharp.Graphics.OpenGL; using System; using System.Collections.Generic; @@ -53,9 +53,10 @@ namespace StgSharp InfoError, InfoWarning, } - + internal static unsafe partial class InternalIO { + internal const string SS_errorLog = "SS_errorlog.log"; @@ -65,13 +66,13 @@ namespace StgSharp internal static Dictionary GLtype = new Dictionary(); - internal static SemaphoreSlim logSyncSemaphore = new SemaphoreSlim(1, 1); - internal static readonly GCHandle ssc_logHandle = GCHandle.Alloc(new byte[512], GCHandleType.Pinned); internal static IntPtr SSClibPtr = IntPtr.Zero; + internal static SemaphoreSlim logSyncSemaphore = new SemaphoreSlim(1, 1); + static InternalIO() { GLtype.Add(TypeCode.Single, GLconst.FLOAT); @@ -103,10 +104,12 @@ namespace StgSharp try { IntPtr procPtr = -#if Windows +#if WINDOWS IntPtr.Zero; -#elif Linux +#elif LINUX +#else + IntPtr.Zero; #endif return procPtr; } diff --git a/源代码/StgSharpDebug/Controlling/KeyEventAttribute.cs b/源代码/StgSharpDebug/Controlling/KeyEventAttribute.cs index 2579998f..f2546dff 100644 --- a/源代码/StgSharpDebug/Controlling/KeyEventAttribute.cs +++ b/源代码/StgSharpDebug/Controlling/KeyEventAttribute.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="KeyEventAttribute.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,14 +36,15 @@ using System.Threading.Tasks; namespace StgSharp { - [AttributeUsage( AttributeTargets.Method)] - public class KeyEventAttribute:Attribute + [AttributeUsage(AttributeTargets.Method)] + public class KeyEventAttribute : Attribute { - internal int _keyTarget; + internal int _equipment; internal int _keyStat; + internal int _keyTarget; - public KeyEventAttribute(KeyboardKey key ,KeyStatus status) + public KeyEventAttribute(KeyboardKey key, KeyStatus status) { _equipment = (int)InputEquipment.Keyboard; _keyTarget = (int)key; diff --git a/源代码/StgSharpDebug/Controlling/UsrActivity/ITrigger.cs b/源代码/StgSharpDebug/Controlling/UsrActivity/ITrigger.cs index 1b9b7aa8..d1944667 100644 --- a/源代码/StgSharpDebug/Controlling/UsrActivity/ITrigger.cs +++ b/源代码/StgSharpDebug/Controlling/UsrActivity/ITrigger.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ITrigger.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Text; @@ -6,7 +36,9 @@ namespace StgSharp.Controlling.UsrActivity { public interface ITrigger { + public int TargetKeyOrButtonID { get; } public KeyStatus TriggeredStatus { get; } + } } diff --git a/源代码/StgSharpDebug/Controlling/UsrActivity/JoystickTrigger.cs b/源代码/StgSharpDebug/Controlling/UsrActivity/JoystickTrigger.cs index fd591bae..621a20a0 100644 --- a/源代码/StgSharpDebug/Controlling/UsrActivity/JoystickTrigger.cs +++ b/源代码/StgSharpDebug/Controlling/UsrActivity/JoystickTrigger.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="JoystickTrigger.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Text; @@ -6,28 +36,18 @@ namespace StgSharp.Controlling.UsrActivity { public struct JoystickTrigger : ITrigger, IEquatable { - public Joystick Stick; private KeyStatus _triggeredStat; - - public int TargetKeyOrButtonID => (int)Stick; - - public KeyStatus TriggeredStatus => _triggeredStat; + public Joystick Stick; public JoystickTrigger(Joystick targetKey) { this.Stick = targetKey; } - public static bool operator ==(JoystickTrigger left, JoystickTrigger right) - { - return left._triggeredStat == right._triggeredStat && left.Stick == right.Stick; - } + public int TargetKeyOrButtonID => (int)Stick; - public static bool operator !=(JoystickTrigger left, JoystickTrigger right) - { - return !(left == right); - } + public KeyStatus TriggeredStatus => _triggeredStat; public override bool Equals(object obj) { @@ -36,7 +56,7 @@ namespace StgSharp.Controlling.UsrActivity public override int GetHashCode() { - return (int)Stick + 17 * (int)_triggeredStat; + return ((int)Stick) + (17 * ((int)_triggeredStat)); } public override string ToString() @@ -44,9 +64,20 @@ namespace StgSharp.Controlling.UsrActivity return $"Key {Stick} triggered when {_triggeredStat}"; } + public static bool operator !=(JoystickTrigger left, JoystickTrigger right) + { + return !(left == right); + } + + public static bool operator ==(JoystickTrigger left, JoystickTrigger right) + { + return (left._triggeredStat == right._triggeredStat) && (left.Stick == right.Stick); + } + bool IEquatable.Equals(JoystickTrigger other) { return other == this; } + } } diff --git a/源代码/StgSharpDebug/Controlling/UsrActivity/KeyTrigger.cs b/源代码/StgSharpDebug/Controlling/UsrActivity/KeyTrigger.cs index 99a1b244..ddf5b257 100644 --- a/源代码/StgSharpDebug/Controlling/UsrActivity/KeyTrigger.cs +++ b/源代码/StgSharpDebug/Controlling/UsrActivity/KeyTrigger.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="KeyTrigger.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Data.Common; using System.Text; @@ -6,29 +36,21 @@ using System.Text; namespace StgSharp.Controlling.UsrActivity { - public struct KeyTrigger: ITrigger,IEquatable + public struct KeyTrigger : ITrigger, IEquatable { - public KeyboardKey TargetKey; + + private KeyboardKey _targetKey; private KeyStatus _triggerStat; - int ITrigger.TargetKeyOrButtonID => (int)TargetKey; - - KeyStatus ITrigger.TriggeredStatus => _triggerStat; - - public KeyTrigger(KeyboardKey targetKey) + public KeyTrigger(KeyboardKey targetKey, KeyStatus targetStat) { - this.TargetKey = targetKey; + this._targetKey = targetKey; + this._triggerStat = targetStat; } - public static bool operator ==(KeyTrigger left, KeyTrigger right) - { - return left._triggerStat == right._triggerStat && left.TargetKey == right.TargetKey; - } + public int TargetKeyOrButtonID => (int)_targetKey; - public static bool operator !=(KeyTrigger left, KeyTrigger right) - { - return !(left == right); - } + public KeyStatus TriggeredStatus => _triggerStat; public override bool Equals(object obj) { @@ -37,17 +59,28 @@ namespace StgSharp.Controlling.UsrActivity public override int GetHashCode() { - return (int)TargetKey + 17 * (int)_triggerStat; + return ((int)_targetKey) + (17 * ((int)_triggerStat)); } public override string ToString() { - return $"Key {TargetKey} triggered when {_triggerStat}"; + return $"Key {_targetKey} triggered when {_triggerStat}"; + } + + public static bool operator !=(KeyTrigger left, KeyTrigger right) + { + return !(left == right); + } + + public static bool operator ==(KeyTrigger left, KeyTrigger right) + { + return (left._triggerStat == right._triggerStat) && (left._targetKey == right._targetKey); } bool IEquatable.Equals(KeyTrigger other) { return other == this; } + } } diff --git a/源代码/StgSharpDebug/Data/GlobalData/root.cs b/源代码/StgSharpDebug/Data/GlobalData/root.cs index 3e78efc6..641997c0 100644 --- a/源代码/StgSharpDebug/Data/GlobalData/root.cs +++ b/源代码/StgSharpDebug/Data/GlobalData/root.cs @@ -1,4 +1,34 @@ -using StgSharp.Data; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="root.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Data; using System; using System.Collections.Generic; @@ -10,10 +40,10 @@ namespace StgSharp { public static unsafe partial class StgSharp { - private static SSD defaultIdProvider = new SSD(); - private static List root = new List(); private static byte leastUnusedArea; + private static List root = new List(); + private static SSD defaultIdProvider = new SSD(); public static byte NewArea() { diff --git a/源代码/StgSharpDebug/Data/InternalData.cs b/源代码/StgSharpDebug/Data/InternalData.cs index cfc94781..d75f956a 100644 --- a/源代码/StgSharpDebug/Data/InternalData.cs +++ b/源代码/StgSharpDebug/Data/InternalData.cs @@ -1,4 +1,34 @@ -using StgSharp; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="InternalData.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp; using System; using System.Collections.Generic; @@ -8,7 +38,66 @@ namespace StgSharp { internal partial class InternalIO { - internal const string CollisionTextureVertexShader ="#version 430 core\r\n\r\nlayout(location = 0) in vec2 localCollisionCoord;\r\nlayout(location = 1) in vec2 spaceCoord;\r\nlayout(location = 2) in float rotation;\r\nlayout(location = 3) in float scaling;\r\n\r\nuniform vec2 target;\r\nuniform mat2 projection;\r\n\r\nvoid main()\r\n{\r\n mat2 scaling = mat2(\r\n scaling,0,\r\n 0,scaling\r\n );\r\n mat2 rotation = mat2(\r\n cos(rotation),-sin(rotation),\r\n sin(rotation),cos(rotation) \r\n );\r\n vec2 realCoord = (rotation * scaling * localCollisionCoord) + spaceCoord - target;\r\n realCoord = projection * realCoord;\r\n\r\n float dist = distance(realCoord, vec2(0,0));\r\n float angle = atan(realCoord.y, realCoord.x);\r\n \r\n gl_Position = vec4(angle, realCoord.y, dist, 1);\r\n}"; - internal const string CollisionTextureFragmentShader = "#version 430 core\r\n\r\nout vec4 Color;\r\n\r\nuniform float range;\r\n\r\nvoid main()\r\n{\r\n float dist = gl_FragCoord.z;\r\n\r\n if(dist > range)\r\n {\r\n discard;\r\n }\r\n dist /= range;\r\n gl_FragDepth = min(dist, gl_FragDepth);\r\n\r\n Color = vec4(dist,0,0,1);\r\n}"; + + #region ControllingItemRender + + internal const string ControlItemRenderVertexShader = """ + + + + """; + + #endregion + + #region CollisionTexture + + internal const string CollisionTextureVertexShader = """ + #version 430 core + layout(location = 0) in vec2 localCollisionCoord; + layout(location = 1) in vec2 spaceCoord; + layout(location = 2) in float rotation; + layout(location = 3) in float scaling; + + uniform vec2 target; + uniform mat2 projection; + + void main() + { + mat2 scaling = mat2( + scaling,0, + 0,scaling ); + + mat2 rotation = mat2( + cos(rotation),-sin(rotation), + sin(rotation),cos(rotation) ); + + vec2 realCoord = (rotation * scaling * localCollisionCoord) + spaceCoord - target; + realCoord = projection * realCoord; + float dist = distance(realCoord, vec2(0,0)); + float angle = atan(realCoord.y, realCoord.x); + gl_Position = vec4(angle, realCoord.y, dist, 1); + } + """; + internal const string CollisionTextureFragmentShader = """ + #version 430 core + out vec4 Color; + + uniform float range; + void main() + { + float dist = gl_FragCoord.z; + if(dist > range) + { + discard; + } + dist /= range; + gl_FragDepth = min(dist, gl_FragDepth); + Color = vec4(dist,0,0,1); + } + """; + + #endregion + + } } diff --git a/源代码/StgSharpDebug/Data/M128.cs b/源代码/StgSharpDebug/Data/M128.cs index 9a720c97..3fdcbeb8 100644 --- a/源代码/StgSharpDebug/Data/M128.cs +++ b/源代码/StgSharpDebug/Data/M128.cs @@ -32,6 +32,7 @@ using StgSharp.Math; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -43,8 +44,9 @@ using System.Text; namespace StgSharp.Data { [StructLayout(LayoutKind.Explicit, Pack = 16)] - public unsafe struct M128:IMemoryType + public unsafe struct M128 : IMemoryType { + [FieldOffset(0)] internal Vector4 vec; internal M128(Vector4 v) @@ -52,6 +54,20 @@ namespace StgSharp.Data vec = v; } + public override bool Equals([NotNullWhen(true)] object obj) + { + if (obj is not M128 other) + { + return false; + } + return this == other; + } + + public override int GetHashCode() + { + return vec.GetHashCode(); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public T Read(int index) where T : struct #if NET8_0_OR_GREATER @@ -89,7 +105,7 @@ namespace StgSharp.Data #if NET8_0_OR_GREATER , INumber #else - ,IConvertible + , IConvertible #endif { fixed (Vector4* p = &vec) @@ -100,7 +116,17 @@ namespace StgSharp.Data } } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(M128 left, M128 right) + { + return left.vec == right.vec; + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(M128 left, M128 right) + { + return left.vec != right.vec; + } #if NET5_0_OR_GREATER @@ -165,5 +191,6 @@ namespace StgSharp.Data } #endif + } } diff --git a/源代码/StgSharpDebug/Data/M256.cs b/源代码/StgSharpDebug/Data/M256.cs index af2d8fb9..f92974f6 100644 --- a/源代码/StgSharpDebug/Data/M256.cs +++ b/源代码/StgSharpDebug/Data/M256.cs @@ -1,4 +1,34 @@ -using StgSharp.Data; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="M256.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Data; using System; using System.Collections.Generic; @@ -12,8 +42,9 @@ namespace StgSharp.Math.HighPrecession { [StructLayout(LayoutKind.Sequential)] - public unsafe struct M256:IMemoryType + public unsafe struct M256 : IMemoryType { + private M128 v0; private M128 v1; @@ -33,5 +64,6 @@ namespace StgSharp.Math.HighPrecession *(((T*)mptr) + index) = value; } } + } } diff --git a/源代码/StgSharpDebug/Data/RandomGenerator.cs b/源代码/StgSharpDebug/Data/RandomGenerator.cs index e1d9acc1..c5e0203f 100644 --- a/源代码/StgSharpDebug/Data/RandomGenerator.cs +++ b/源代码/StgSharpDebug/Data/RandomGenerator.cs @@ -1,4 +1,34 @@ -using StgSharp.Data; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="RandomGenerator.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Data; using System; using System.IO; @@ -14,15 +44,16 @@ namespace StgSharp.Data public class RandomGenerator { + private byte[] currentKey; + private readonly byte[] originKey; - private byte[] currentKey; private int cycleCount; private SHA512 hash; - public RandomGenerator():this(DateTime.UtcNow.ToBinary()) + public RandomGenerator() : this(DateTime.UtcNow.ToBinary()) { - + } public RandomGenerator(object source) @@ -77,28 +108,38 @@ namespace StgSharp.Data return source.Read(cycleCount % 4); } + public byte GenRandomInt8() + { + cycleCount++; + if (cycleCount % 64 == 0) + { + PrivateRand(); + } + return currentKey[cycleCount % 64]; + } + public float GenRandomSingle() { cycleCount++; - + while (true) { M128 source = PrivateRand(); - + uint temp0 = source.Read(0), temp1 = source.Read(2); if (temp0 * temp1 != 0) { - float ret = (temp0 % temp1) * 1.0f / temp1; + float ret = ((temp0 % temp1) * 1.0f) / temp1; if (ret < 0.335f) { - ret = ret * (ret * -0.7811934f + 1.4489113f); + ret = ret * ((ret * (-0.7811934f)) + 1.4489113f); } - else + else { - ret = ret * (ret * -0.1158368f + 1.0580600f) + 0.0590584f; + ret = (ret * ((ret * (-0.1158368f)) + 1.0580600f)) + 0.0590584f; } if (ret > 1) { @@ -111,14 +152,11 @@ namespace StgSharp.Data } - public byte GenRandomInt8() + + public void Reset() { - cycleCount++; - if (cycleCount % 64 == 0) - { - PrivateRand(); - } - return (byte)(currentKey[ cycleCount % 64 ]); + currentKey = originKey; + cycleCount = 0; } private unsafe M128 PrivateRand() @@ -127,16 +165,16 @@ namespace StgSharp.Data M128 ret; fixed (byte* bptr = currentKey) { - switch ((cycleCount % 16) / 4) + switch ((cycleCount % 16) / 4) { case 0: - ret= *((M128*)bptr + 0);break; + ret = *(((M128*)bptr) + 0); break; case 1: - ret= *((M128*)bptr + 1);break; + ret = *(((M128*)bptr) + 1); break; case 2: - ret= *((M128*)bptr + 2);break; + ret = *(((M128*)bptr) + 2); break; case 3: - ret= *((M128*)bptr + 3);break; + ret = *(((M128*)bptr) + 3); break; default: throw new InvalidOperationException(); } @@ -145,12 +183,5 @@ namespace StgSharp.Data return ret; } - - public void Reset() - { - currentKey = originKey; - cycleCount = 0; - } - } } diff --git a/源代码/StgSharpDebug/Data/SSD/Area.cs b/源代码/StgSharpDebug/Data/SSD/Area.cs index eb5b8c5b..ae52916e 100644 --- a/源代码/StgSharpDebug/Data/SSD/Area.cs +++ b/源代码/StgSharpDebug/Data/SSD/Area.cs @@ -1,4 +1,34 @@ -using StgSharp.Data.FileIO; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Area.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Data.FileIO; using System; using System.Collections.Generic; @@ -15,6 +45,6 @@ namespace StgSharp.Data /// public partial class Area { - + } } diff --git a/源代码/StgSharpDebug/Data/SSD/DataHead.cs b/源代码/StgSharpDebug/Data/SSD/DataHead.cs index 0b131bbf..1e839b60 100644 --- a/源代码/StgSharpDebug/Data/SSD/DataHead.cs +++ b/源代码/StgSharpDebug/Data/SSD/DataHead.cs @@ -43,19 +43,19 @@ namespace StgSharp.Data public struct SSDSegmentHead { + + [FieldOffset(12)] internal byte size; + [FieldOffset(0)] internal M128 data; + [FieldOffset(13)] public byte selfDefine_1; + [FieldOffset(14)] public byte selfDefine_2; + [FieldOffset(15)] public byte selfDefine_3; [FieldOffset(0)] public int globalID; [FieldOffset(4)] public int nextID; [FieldOffset(8)] public int previousHash; - [FieldOffset(12)] internal byte size; - [FieldOffset(13)] public byte selfDefine_1; - [FieldOffset(14)] public byte selfDefine_2; - [FieldOffset(15)] public byte selfDefine_3; - - public int Size { get => ((int)size) + 1; diff --git a/源代码/StgSharpDebug/Data/SSD/DataSegment.cs b/源代码/StgSharpDebug/Data/SSD/DataSegment.cs index 649b7ac5..ffa9de1e 100644 --- a/源代码/StgSharpDebug/Data/SSD/DataSegment.cs +++ b/源代码/StgSharpDebug/Data/SSD/DataSegment.cs @@ -54,24 +54,6 @@ namespace StgSharp.Data this.PreviousHash = previousHash; } - public static SSDSegment FromStream(byte[] stream) - { - if (stream.Length != 16 * StgSharp.ssdSegmentLength) - { - throw new ArgumentException(); - } - SSDSegment ret = new SSDSegment(); - fixed (byte* bptr = stream) - { - ret.Head.data = *(M128*)bptr; - for (int i = 1; i < StgSharp.ssdSegmentLength; i++) - { - ret.WriteData(i - 1, *(M128*)(bptr + 16 * i)); - } - } - return ret; - } - public byte this[int index] { get @@ -113,6 +95,24 @@ namespace StgSharp.Data } } + public static SSDSegment FromStream(byte[] stream) + { + if (stream.Length != 16 * StgSharp.ssdSegmentLength) + { + throw new ArgumentException(); + } + SSDSegment ret = new SSDSegment(); + fixed (byte* bptr = stream) + { + ret.Head.data = *(M128*)bptr; + for (int i = 1; i < StgSharp.ssdSegmentLength; i++) + { + ret.WriteData(i - 1, *(M128*)(bptr + (16 * i))); + } + } + return ret; + } + public byte[] GetBytes() { byte[] ret = new byte[16 * StgSharp.ssdSegmentLength]; diff --git a/源代码/StgSharpDebug/Data/SSD/SSD.cs b/源代码/StgSharpDebug/Data/SSD/SSD.cs index f19147c2..b5cc1805 100644 --- a/源代码/StgSharpDebug/Data/SSD/SSD.cs +++ b/源代码/StgSharpDebug/Data/SSD/SSD.cs @@ -39,11 +39,11 @@ namespace StgSharp.Data { public partial class SSD { - private SSDrawHead head; private Dictionary fileList; - + private FileStream file; + private SSDrawHead head; public SSD() { diff --git a/源代码/StgSharpDebug/Data/SSD/SSDVirtualFolder.cs b/源代码/StgSharpDebug/Data/SSD/SSDVirtualFolder.cs index 578ed0bb..24afdc03 100644 --- a/源代码/StgSharpDebug/Data/SSD/SSDVirtualFolder.cs +++ b/源代码/StgSharpDebug/Data/SSD/SSDVirtualFolder.cs @@ -39,9 +39,10 @@ namespace StgSharp.Data { public class SSDFolder : ISSDSerializable { + + internal Dictionary folders; internal int _folderID; internal string _name; - internal Dictionary folders; internal SSDFolder() { @@ -68,6 +69,11 @@ namespace StgSharp.Data public SerializableTypeCode SSDTypeCode => SerializableTypeCode.VirtualFolder; + public void FromBytes(byte[] stream) + { + throw new NotImplementedException(); + } + //TODO 虚拟文件夹的GetBytes好难写 public byte[] GetBytes() @@ -75,10 +81,5 @@ namespace StgSharp.Data throw new NotImplementedException(); } - public void FromBytes(byte[] stream) - { - throw new NotImplementedException(); - } - } } diff --git a/源代码/StgSharpDebug/Data/SSD/SSDraw.cs b/源代码/StgSharpDebug/Data/SSD/SSDraw.cs index 279e14f0..44c6f23c 100644 --- a/源代码/StgSharpDebug/Data/SSD/SSDraw.cs +++ b/源代码/StgSharpDebug/Data/SSD/SSDraw.cs @@ -47,6 +47,7 @@ namespace StgSharp.Data.FileIO { public class SSDraw { + private byte[] data; public SSDraw(string name, Stream streamSource) @@ -62,13 +63,14 @@ namespace StgSharp.Data.FileIO public SSDrawHead Head { get; set; } public string Name { get; set; } + } [StructLayout(LayoutKind.Explicit, Size = 32 * 16)] public unsafe struct SSDrawHead { - + } diff --git a/源代码/StgSharpDebug/Data/Serialize/ISSDSerializable.cs b/源代码/StgSharpDebug/Data/Serialize/ISSDSerializable.cs index d75367a4..70b64c54 100644 --- a/源代码/StgSharpDebug/Data/Serialize/ISSDSerializable.cs +++ b/源代码/StgSharpDebug/Data/Serialize/ISSDSerializable.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ISSDSerializable.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -9,11 +39,13 @@ namespace StgSharp.Data public interface ISSDSerializable { + public SerializableTypeCode SSDTypeCode { get; } public byte[] GetBytes(); internal void FromBytes(byte[] stream); + } public enum SerializableTypeCode @@ -31,14 +63,10 @@ namespace StgSharp.Data public static partial class Serializer { - public static byte[] Serialize(ISSDSerializable serializableObject) - { - return serializableObject.GetBytes(); - } - public static T Deserialize(byte[] stream)where T : ISSDSerializable + public static T Deserialize(byte[] stream) where T : ISSDSerializable { - T serializableObject = (T)Activator.CreateInstance(); + T serializableObject = Activator.CreateInstance(); serializableObject.FromBytes(stream); return serializableObject; } @@ -67,5 +95,10 @@ namespace StgSharp.Data throw new ArgumentException("Unknown file type"); } } + public static byte[] Serialize(ISSDSerializable serializableObject) + { + return serializableObject.GetBytes(); + } + } } \ No newline at end of file diff --git a/源代码/StgSharpDebug/Demo/Program.cs b/源代码/StgSharpDebug/Demo/Program.cs index 0aa17e4e..25a45de4 100644 --- a/源代码/StgSharpDebug/Demo/Program.cs +++ b/源代码/StgSharpDebug/Demo/Program.cs @@ -1,13 +1,41 @@ -//using StgSharp.Environment.Win32; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Program.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +//using StgSharp.Environment.Win32; using StgSharp.Controlling.UsrActivity; using StgSharp.Geometries; using StgSharp.Graphics; -using StgSharp.Logic; + using StgSharp.Math; using StgSharp.MVVM; -using StgSharpDebug.Logic; - using System; using System.Runtime.CompilerServices; using System.Xml.XPath; @@ -17,6 +45,7 @@ namespace StgSharp internal static class Program { + internal static unsafe void Main(string[] args) { try @@ -42,10 +71,11 @@ namespace StgSharp catch (Exception ex) { InternalIO.InternalWriteLog( - ex.Message + "\n" + ex.StackTrace, + $"{ex.Message}\n{ex.StackTrace}", LogType.Error); - Environment.FailFast(ex.Message + "\n" + ex.StackTrace); + Environment.FailFast($"{ex.Message}\n{ex.StackTrace}"); } } + } } \ No newline at end of file diff --git a/源代码/StgSharpDebug/Demo/RenderStream/Partical.cs b/源代码/StgSharpDebug/Demo/RenderStream/Partical.cs index 31f04597..3046773c 100644 --- a/源代码/StgSharpDebug/Demo/RenderStream/Partical.cs +++ b/源代码/StgSharpDebug/Demo/RenderStream/Partical.cs @@ -32,8 +32,9 @@ using StgSharp.Controls; using StgSharp.Geometries; using StgSharp.Graphics; using StgSharp.Graphics.OpenGL; -using StgSharp.Logic; + using StgSharp.Math; +using StgSharp.Timing; using System; using System.Collections.Generic; @@ -46,215 +47,207 @@ namespace StgSharp public class ParticleRenderStream : glRenderStream { - ElementBuffer ebo; - ElementBuffer f_ebo; - FrameBuffer fbo; - Image i; - PlainInstancingBuffer buffer; - RenderBuffer rbo; - ShaderProgram frameMainShader; - ShaderProgram s; - TextureGL t; - Uniform texUniform; - Uniform time; - VertexArray f_vao; - VertexArray vao; + private ElementBuffer ebo; + private ElementBuffer f_ebo; + private FrameBuffer fbo; + private Image i; + private PlainInstancingBuffer buffer; + private RenderBuffer rbo; + private ShaderProgram frameMainShader; + private ShaderProgram s; - VertexBuffer f_vbo; - VertexBuffer vbo; + private AutoTextureGL autoT; + private TextureGL f_t; + private TextureGL t; + private Uniform texUniform; + private Uniform time; + private VertexArray f_vao; + private VertexArray vao; - public ParticleRenderStream() - { + private VertexBuffer f_vbo; + private VertexBuffer vbo; - } + public ParticleRenderStream() { } public override bool IsContextSharable => true; - public Rectangle ButtonBounding - { - get; - private set; - } + public Rectangle ButtonBounding { get; private set; } public TextureProvider ButtonTextureProvider { get; private set; } + int temp = 0; + //render a controlling item - public void AnotherMain(IEnumerable items) + public void OtherMain( IEnumerable items ) { //Console.WriteLine("Render Button Itself"); - GL.BindFrameBuffer(FrameBufferTarget.All, GlHandle.Zero); //GL.Assert(true); - GL.ClearColor(0.4f, TimePassed % 1.0f, 0f, 1.0f); //GL.Assert(true); - GL.Clear(MaskBufferBit.COLOR /**/| MaskBufferBit.DEPTH/**/); //GL.Assert(true); + GL.BindFrameBuffer( FrameBufferTarget.All, GlHandle.Zero ); //_gl.Assert(true); + GL.ClearColor( 0.4f, TimePassed % 1.0f, 0f, 1.0f ); //_gl.Assert(true); + GL.Clear( MaskBufferBit.COLOR /**/ | MaskBufferBit.DEPTH/**/ ); //_gl.Assert(true); - f_vao.Bind(0); //GL.Assert(true); + f_vao.Bind( 0 ); //_gl.Assert(true); - foreach (PlainGeometryMesh mesh in items) + foreach( PlainGeometryMesh mesh in items ) { - f_t.LoadTexture(0, mesh.TextureImage); + autoT.SelectTextureAndBind(mesh.TextureImage); + //f_t.LoadTexture( 0, mesh.TextureImage ); + //_gl.Assert(true); + + frameMainShader.Use(); //_gl.Assert(true); + + GL.DrawElements(GeometryType.TRIANGLES, 6, TypeCode.UInt32, IntPtr.Zero); + } - //GL.Assert(true); - frameMainShader.Use(); //GL.Assert(true); + //_gl.Assert(true); - GL.DrawElements(GeometryType.TRIANGLES, 6, TypeCode.UInt32, IntPtr.Zero); - //GL.Assert(true); - - //GL.DrawElements(GeometryType.LINES, 6, TypeCode.UInt32, IntPtr.Zero); + //_gl.DrawElements(GeometryType.LINES, 6, TypeCode.UInt32, IntPtr.Zero); //BlueprintPipeline.SkipAll(output); SwapBuffers(); } - public void RenderButton(ButtonStatus status, float statusBegin, in TextureProvider provider) - { - provider.UpdateFromImage(i); - } + public void RenderButton( + ButtonStatus status, + float statusBegin, + in TextureProvider provider ) + { provider.UpdateFromImage( i ); } - internal static vec3d DefaultRotation(TimeSpanProvider provider, out float rotation) + internal static vec3d DefaultRotation( TimeSpanProvider provider, out float rotation ) { rotation = provider.SpanLengthLowPrecession; float angle = provider.CurrentSecond * 2; - return (new vec3d( - Scaler.Cos(angle), - Scaler.Sin(angle), - 0 - )) * provider.SpanLengthLowPrecession; + return ( new vec3d( Scaler.Cos( angle ), Scaler.Sin( angle ), 0 ) ) * + provider.SpanLengthLowPrecession; } - protected override void CustomizeDeinit() - { - - } + protected override void CustomizeDeinit() { } protected override void CustomizeInit() { - //GL.ClearError(); - //GL.Assert(true); + //_gl.ClearError(); + //_gl.Assert(true); + buffer = new PlainInstancingBuffer(); - for (int i = 0; i < 10; i++) + for( int i = 0; i < 10; i++ ) { - float ai = Scaler.Abs(i - 5.0f); - for (int t = 0; t < 10; t++) + float ai = Scaler.Abs( i - 5.0f ); + for( int t = 0; t < 10; t++ ) { - float at = Scaler.Abs(t - 5.0f); + float at = Scaler.Abs( t - 5.0f ); - ParticleOnPlain p = new ParticleOnPlain(buffer); - ((IInstancing)p).Coord = new vec3d( - (((-5) + i) * 0.2f) + 0.1f, (((-5) + t) * 0.2f) + 0.1f, 0); - ((IInstancing)p).Scale = - Scaler.MinOf(i, t) * 0.15f; - ((IInstancing)p).Motion = new GeometryMotion( - true, this._timeProvider, - DefaultRotation) - ; + ParticleOnPlain p = new ParticleOnPlain( buffer ); + ( ( IInstancing )p ).Coord = new vec3d( + ( ( ( -5 ) + i ) * 0.2f ) + 0.1f, ( ( ( -5 ) + t ) * 0.2f ) + 0.1f, 0 ); + ( ( IInstancing )p ).Scale = + Scaler.MinOf( i, t ) * 0.15f; + ( ( IInstancing )p ).Motion = new GeometryMotion( + true, this._timeProvider, DefaultRotation ); } } - //GL.Assert(true); + //_gl.Assert(true); //SetSizeLimit(800, 800, 800, 800); s = CreateShaderProgram(); frameMainShader = CreateShaderProgram(); - Shader pvs = CreateShaderSegment(ShaderType.Vertex, 2); - Shader pfs = CreateShaderSegment(ShaderType.Fragment, 2); + Shader pvs = CreateShaderSegment( ShaderType.Vertex, 2 ); + Shader pfs = CreateShaderSegment( ShaderType.Fragment, 2 ); - //GL.Assert(true); - pvs.Compile(0, Shader.FromCodeFile("Shader\\particle.vert")); - //GL.Assert(true); - pvs.AttachTo(0, s); - //GL.Assert(true); - pfs.Compile(0, Shader.FromCodeFile("Shader\\particle.frag")); - pfs.AttachTo(0, s); + //_gl.Assert(true); + pvs.Compile( 0, Shader.FromCodeFile( "Shader\\particle.vert" ) ); + + //_gl.Assert(true); + pvs.AttachTo( 0, s ); + + //_gl.Assert(true); + pfs.Compile( 0, Shader.FromCodeFile( "Shader\\particle.frag" ) ); + pfs.AttachTo( 0, s ); s.Link(); - //GL.Assert(true); - pvs.Compile(1, Shader.FromCodeFile("Shader\\fbo.vert")); - pvs.AttachTo(1, frameMainShader); - pfs.Compile(1, Shader.FromCodeFile("Shader\\fbo.frag")); - pfs.AttachTo(1, frameMainShader); + //_gl.Assert(true); + + pvs.Compile( 1, Shader.FromCodeFile( "Shader\\fbo.vert" ) ); + pvs.AttachTo( 1, frameMainShader ); + pfs.Compile( 1, Shader.FromCodeFile( "Shader\\fbo.frag" ) ); + pfs.AttachTo( 1, frameMainShader ); frameMainShader.Link(); - //GL.Assert(true); - vbo = CreateVertexBuffer(3); - vao = CreateVertexArray(1); - ebo = CreateElementBuffer(1); - vbo.Bind(0); + //_gl.Assert(true); + vbo = CreateVertexBuffer( 3 ); + vao = CreateVertexArray( 1 ); + ebo = CreateElementBuffer( 1 ); + vbo.Bind( 0 ); - Rectangle rec = new Rectangle - ( - 0.05f, 0.05f, - 0.05f, -0.05f, - -0.05f, -0.05f, - -0.05f, 0.05f - ); + Rectangle rec = new Rectangle( + 0.05f, 0.05f, 0.05f, -0.05f, -0.05f, -0.05f, -0.05f, 0.05f ); - //GL.Assert(true); - vao.Bind(0); - vbo.WriteVectorData(0, rec.VertexStream, BufferUsage.StaticDraw); - ebo.SetValue(0, rec.VertexIndices, BufferUsage.StaticDraw); - vao.SetVertexAttribute(0, 3, TypeCode.Single, false, 4 * sizeof(float), 0); + //_gl.Assert(true); + vao.Bind( 0 ); + vbo.WriteVectorData( 0, rec.VertexStream, BufferUsage.StaticDraw ); + ebo.SetValue( 0, rec.VertexIndices, BufferUsage.StaticDraw ); + vao.SetVertexAttribute( 0, 3, TypeCode.Single, false, 4 * sizeof( float ), 0 ); - vbo.WriteVectorData(1, buffer.CoordAndRotationSpan, BufferUsage.StreamDraw); - vao.SetVertexAttribute(1, 3, TypeCode.Single, false, 4 * sizeof(float), 0); - vao.SetVertexAttribute(2, 1, TypeCode.Single, false, 4 * sizeof(float), 3 * sizeof(float)); + vbo.WriteVectorData( 1, buffer.CoordAndRotationSpan, BufferUsage.StreamDraw ); + vao.SetVertexAttribute( 1, 3, TypeCode.Single, false, 4 * sizeof( float ), 0 ); + vao.SetVertexAttribute( + 2, 1, TypeCode.Single, false, 4 * sizeof( float ), 3 * sizeof( float ) ); - GL.VertexAttributeDivisor(1, 1); - GL.VertexAttributeDivisor(2, 1); + GL.VertexAttributeDivisor( 1, 1 ); + GL.VertexAttributeDivisor( 2, 1 ); - vbo.WriteScalerData(2, buffer.ScalingSpan, BufferUsage.StaticDraw); - vao.SetVertexAttribute(3, 1, TypeCode.Single, false, sizeof(float), 0); + vbo.WriteScalerData( 2, buffer.ScalingSpan, BufferUsage.StaticDraw ); + vao.SetVertexAttribute( 3, 1, TypeCode.Single, false, sizeof( float ), 0 ); - GL.VertexAttributeDivisor(3, 1); + GL.VertexAttributeDivisor( 3, 1 ); vbo.Unbind(); - GL.BindVertexArray(GlHandle.Zero); + GL.BindVertexArray( GlHandle.Zero ); - NativeCameraViewTarget - ( - (0, 0, -100), - (0, 0, 0), - (0, 1, 0) - ); - NativeCameraViewRange(new Degree(1.5f), Vec2d.Zero, (50, 50)); - NativeCameraUniform(s, "Camera"); + NativeCameraViewTarget( (0, 0, -100), (0, 0, 0), (0, 1, 0) ); + NativeCameraViewRange( new Degree( 1.5f ), Vec2d.Zero, (50, 50) ); + NativeCameraUniform( s, "Camera" ); s.Use(); - fbo = CreateFrameBuffer(1); - rbo = CreateRenderBuffer(1); + fbo = CreateFrameBuffer( 1 ); + rbo = CreateRenderBuffer( 1 ); - fbo.Bind(0); - rbo.Bind(0); - GL.SetRenderBufferStorage( - RenderBufferInternalFormat.Depth24_Stencil8, this.Size); + fbo.Bind( 0 ); + rbo.Bind( 0 ); + GL.SetRenderBufferStorage( RenderBufferInternalFormat.Depth24_Stencil8, this.Size ); - //GL.Assert(true); - t = CreateTexture(1); - t.Bind2D(0); - GL.TextureImage2d(Texture2DTarget.Texture2D, 0, (int)ImageChannel.WithAlphaChannel, - (uint)Width, (uint)Height, (int)ImageChannel.WithAlphaChannel, PixelChannelLayout.Byte, null); - t.Set2dWrapProperty(Wrap.Repeat, Wrap.Repeat); - t.Set2dFilterProperty(Filter.Nearest, Filter.Nearest); + //_gl.Assert(true); + t = CreateTexture( 1 ); + t.Bind2D( 0 ); + GL.TextureImage2d( + Texture2DTarget.Texture2D, 0, ( int )ImageChannel.WithAlphaChannel, ( uint )Width, + ( uint )Height, ( int )ImageChannel.WithAlphaChannel, PixelChannelLayout.Byte, + null ); + t.Set2dWrapProperty( 0, TextureWrap.Repeat, TextureWrap.Repeat ); + t.Set2dFilterProperty( 0, TextureFilter.Nearest, TextureFilter.Nearest ); - //GL.Assert(true); - GL.FrameBufferTexture2d(FrameBufferTarget.All, glAttachment.Color(0), - Texture2DTarget.Texture2D, t[0], 0); + //_gl.Assert(true); + GL.FrameBufferTexture2d( + FrameBufferTarget.All, glAttachment.Color( 0 ), Texture2DTarget.Texture2D, t[ 0 ], + 0 ); - //GL.Assert(true); - GL.CombineFrameBufferRenderBuffer(FrameBufferAttachment.Stencil|FrameBufferAttachment.Depth, rbo[0]); + //_gl.Assert(true); + GL.CombineFrameBufferRenderBuffer( + FrameBufferAttachment.Stencil | FrameBufferAttachment.Depth, rbo[ 0 ] ); - Console.WriteLine(GL.CheckFrameBufferStatus(FrameBufferTarget.All)); + Console.WriteLine( GL.CheckFrameBufferStatus( FrameBufferTarget.All ) ); FrameBuffer.BindNull(); - //GL.Assert(true); + //_gl.Assert(true); int streamLength = this.Width * this.Height * 4; byte[] imageStream = new byte[streamLength]; - i = Image.FromMemory(this.Size, ImageChannel.WithAlphaChannel, imageStream); + i = Image.FromMemory( this.Size, ImageChannel.WithAlphaChannel, imageStream ); - time = s.GetUniform("time"); + time = s.GetUniform( "time" ); vec2d[] buttonTextureCoordArray = { (0f, 1f), @@ -262,117 +255,124 @@ namespace StgSharp (1f, 0f), (0f, 0f) }; - ButtonBounding = new Rectangle( - -0.9f, 0.9f, - 0.9f, 0.9f, - 0.9f, -0.9f, - -0.9f, -0.9f + ButtonBounding = new Rectangle( -0.9f, 0.9f, 0.9f, 0.9f, 0.9f, -0.9f, -0.9f, -0.9f ); + + //_gl.Assert(true); + ButtonTextureProvider = new TextureProvider( i, buttonTextureCoordArray ); + + f_vao = CreateVertexArray( 1 ); + f_vbo = CreateVertexBuffer( 2 ); + f_ebo = CreateElementBuffer( 1 ); + + //_gl.Assert(true); + f_vao.Bind( 0 ); + + f_ebo.Bind( 0 ); + f_ebo.SetValue( 0, ButtonBounding.VertexIndices, BufferUsage.StaticDraw ); + + //_gl.Assert(true); + f_vbo.Bind( 0 ); + f_vbo.WriteVectorData( 0, ButtonBounding.VertexStream, BufferUsage.StaticDraw ); + f_vao.SetVertexAttribute( 0, 3, TypeCode.Single, false, 4 * sizeof( float ), 0 ); + + //_gl.Assert(true); + f_vbo.Bind( 1 ); + f_vbo.WriteVectorData( 1, buttonTextureCoordArray, BufferUsage.StaticDraw ); + f_vao.SetVertexAttribute( 1, 3, TypeCode.Single, false, 4 * sizeof( float ), 0 ); + + //_gl.Assert(true); + + autoT = CreateAutoTexture(4); + autoT.DefaultTextureProperty = new TextureProperty( + TextureFilter.Nearest, TextureFilter.Nearest, + TextureWrap.Repeat, TextureWrap.Repeat ); - //GL.Assert(true); - ButtonTextureProvider = new TextureProvider(i, buttonTextureCoordArray); + f_t = CreateTexture( 1 ); + f_t.Bind2D( 0 ); + f_t.Set2dWrapProperty( 0, TextureWrap.Repeat, TextureWrap.Repeat ); + f_t.Set2dFilterProperty( 0, TextureFilter.Nearest, TextureFilter.Nearest ); - f_vao = CreateVertexArray(1); - f_vbo = CreateVertexBuffer(2); - f_ebo = CreateElementBuffer(1); + //_gl.Assert(true); + f_t.ActivateAs( TextureUnit.Unit1 ); - //GL.Assert(true); - f_vao.Bind(0); - - f_ebo.Bind(0); - f_ebo.SetValue(0, ButtonBounding.VertexIndices, BufferUsage.StaticDraw); - - //GL.Assert(true); - f_vbo.Bind(0); - f_vbo.WriteVectorData(0, ButtonBounding.VertexStream, BufferUsage.StaticDraw); - f_vao.SetVertexAttribute(0, 3, TypeCode.Single, false, 4 * sizeof(float), 0); - - //GL.Assert(true); - f_vbo.Bind(1); - f_vbo.WriteVectorData(1, buttonTextureCoordArray, BufferUsage.StaticDraw); - f_vao.SetVertexAttribute(1, 3, TypeCode.Single, false, 4 * sizeof(float), 0); - - //GL.Assert(true); - f_t = CreateTexture(1); - f_t.Bind2D(0); - f_t.Set2dWrapProperty(Wrap.Repeat, Wrap.Repeat); - f_t.Set2dFilterProperty(Filter.Nearest, Filter.Nearest); - - //GL.Assert(true); - f_t.ActivateAs(TextureUnit.Unit1); - - //GL.Assert(true); + //_gl.Assert(true); frameMainShader.Use(); - texUniform = frameMainShader.GetUniform("tex"); - //GL.Assert(true); - GL.SetUniformValue(texUniform, 1); - //GL.Assert(true); + texUniform = frameMainShader.GetUniform( "tex" ); + //_gl.Assert(true); + GL.SetUniformValue( texUniform, 1 ); + + //_gl.Assert(true); } - TextureGL f_t; - protected override void Main() { - //GL.ClearError(); + temp++; + //_gl.ClearError(); //Console.Clear(); buffer.UpdateAllParticles(); - //Console.WriteLine(GL.CheckFrameBufferStatus(FrameBufferTarget.All)); + //Console.WriteLine(_gl.CheckFrameBufferStatus(FrameBufferTarget.All)); - fbo.Bind(0); //GL.Assert(true); - vao.Bind(0); //GL.Assert(true); - t.Bind2D(0); //GL.Assert(true); + fbo.Bind( 0 ); //_gl.Assert(true); + vao.Bind( 0 ); //_gl.Assert(true); + t.Bind2D( 0 ); //_gl.Assert(true); /**/ - GL.TextureImage2d(Texture2DTarget.Texture2D, 0, (int)ImageChannel.WithAlphaChannel, - (uint)Width, (uint)Height, (int)ImageChannel.WithAlphaChannel, PixelChannelLayout.Byte, new byte[1]); + GL.TextureImage2d( + Texture2DTarget.Texture2D, 0, ( int )ImageChannel.WithAlphaChannel, ( uint )Width, + ( uint )Height, ( int )ImageChannel.WithAlphaChannel, PixelChannelLayout.Byte, + new byte[1] ); /**/ - //GL.Assert(true); + //_gl.Assert(true); - GL.ClearColor((0.6f + TimePassed) % 1.0f, 0.1f, 0.3f, 1); - GL.Clear(MaskBufferBit.COLOR | MaskBufferBit.DEPTH); + GL.ClearColor( ( 0.6f + TimePassed ) % 1.0f, 0.1f, 0.3f, 1 ); + GL.Clear( MaskBufferBit.COLOR | MaskBufferBit.DEPTH ); - //GL.Assert(true); + //_gl.Assert(true); - vbo.Bind(1); - vbo.WriteVectorData(1, buffer.CoordAndRotationSpan, BufferUsage.StreamDraw); + vbo.Bind( 1 ); + vbo.WriteVectorData( 1, buffer.CoordAndRotationSpan, BufferUsage.StreamDraw ); s.Use(); NativeCamera.SetAllUniforms(); - GL.SetUniformValue(time, TimePassed); + GL.SetUniformValue( time, TimePassed ); + + GL.DrawElementsInstanced( GeometryType.TRIANGLES, 6, TypeCode.UInt32, IntPtr.Zero, + 100 ); - GL.DrawElementsInstanced( - GeometryType.TRIANGLES, 6, TypeCode.UInt32, IntPtr.Zero, 100 - ); //Console.WriteLine(TimePassed); - //GL.Assert(true); + //_gl.Assert(true); GL.WaitAccomplishment(); - GL.BindVertexArray(GlHandle.Zero); + GL.BindVertexArray( GlHandle.Zero ); /**/ - //GL.Assert(true); - ImageHelper.Resize(i, Width, Height, ImageMovement.Discard); + //_gl.Assert(true); - //GL.ClearError(); + ImageHelper.Resize( i, Width, Height, ImageMovement.Discard ); - GL.GetTextureImage(Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel, - PixelChannelLayout.Byte, i.PixelBuffer); + //_gl.ClearError(); + + GL.GetTextureImage( + Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel, + PixelChannelLayout.Byte, i.PixelBuffer ); /* for (int num = 0; num < i.PixelBuffer.Length; num+=10000) { Console.Write($"{i.PixelBuffer[num]}\t"); } /**/ - //GL.Assert(true); + + //_gl.Assert(true); //Array.Fill(i.PixelBuffer, 24); - GL.BindFrameBuffer(FrameBufferTarget.All, GlHandle.Zero); + GL.BindFrameBuffer( FrameBufferTarget.All, GlHandle.Zero ); - //GL.Assert(true); + //_gl.Assert(true); /**/ /* diff --git a/源代码/StgSharpDebug/Demo/View/Control.cs b/源代码/StgSharpDebug/Demo/View/Control.cs index e93ecdef..87708798 100644 --- a/源代码/StgSharpDebug/Demo/View/Control.cs +++ b/源代码/StgSharpDebug/Demo/View/Control.cs @@ -1,5 +1,35 @@ -using StgSharp.MVVM.View; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Control.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- using StgSharp.Controlling.UsrActivity; +using StgSharp.MVVM.View; using System; using System.Collections.Generic; @@ -8,25 +38,27 @@ using System.Text; using System.Threading.Tasks; namespace StgSharp -{ +{ public partial class ViewMain { protected class Control : ViewResponder { - public Control(ViewMain view):base(view) + + public Control(ViewMain view) : base(view) { - + } public override void CustomizedInitialize(Func keyRegister) { - + } public override bool ValidateInitializing() { return true; } + } } } diff --git a/源代码/StgSharpDebug/Demo/View/Design.cs b/源代码/StgSharpDebug/Demo/View/Design.cs index d5427897..d4605caa 100644 --- a/源代码/StgSharpDebug/Demo/View/Design.cs +++ b/源代码/StgSharpDebug/Demo/View/Design.cs @@ -1,35 +1,68 @@ -using StgSharp.Graphics; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Design.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- using StgSharp.Controlling; using StgSharp.Controlling.UsrActivity; +using StgSharp.Controls; + +using StgSharp.Geometries; +using StgSharp.Graphics; using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; -using StgSharp.Controls; -using System.Text.RegularExpressions; using System.Runtime.CompilerServices; -using StgSharp.Geometries; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; namespace StgSharp { public partial class ViewMain { + internal DemoButtonGroup Group { get; set; } internal TriggerButton OnlyButton { get; set; } internal class Design : ViewDesigner { - public Design(ViewMain view):base(view) + + public Design(ViewMain view) : base(view) { - + } public override sealed void CustomizedInitialize() { Binding.Group = CreateKeyboardButtonGroup( - new KeyTrigger(KeyboardKey.LEFT,KeyStatus.PRESS), + new KeyTrigger(KeyboardKey.LEFT, KeyStatus.PRESS), new KeyTrigger(KeyboardKey.RIGHT, KeyStatus.PRESS), new KeyTrigger(KeyboardKey.UP, KeyStatus.PRESS), new KeyTrigger(KeyboardKey.DOWN, KeyStatus.PRESS), @@ -47,14 +80,18 @@ namespace StgSharp { return true; } + } + } public class DemoButtonGroup : KeyboardButtonGroup { + public override sealed void Confirm() { return; } + } } diff --git a/源代码/StgSharpDebug/Demo/View/NewRender.cs b/源代码/StgSharpDebug/Demo/View/NewRender.cs index f3ea8216..6b51e433 100644 --- a/源代码/StgSharpDebug/Demo/View/NewRender.cs +++ b/源代码/StgSharpDebug/Demo/View/NewRender.cs @@ -1,4 +1,34 @@ -using StgSharp.Graphics; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="NewRender.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics; using System; using System.Collections.Generic; @@ -10,25 +40,29 @@ namespace StgSharp { public partial class ViewMain { + public ParticleRenderStream Stream { get; set; } private class NewRender : ViewRender { - public NewRender(ViewMain view):base(view) + + public NewRender(ViewMain view) : base(view) { - + } public override void CustomizedInitialize() { - Binding.Stream = CreateRenderStream((1,1,1)); + Binding.Stream = CreateRenderStream((1, 1, 1)); } public override bool ValidateInitializing() { return Binding.Stream != null; } + } + } } diff --git a/源代码/StgSharpDebug/Demo/View/Render.cs b/源代码/StgSharpDebug/Demo/View/Render.cs deleted file mode 100644 index 4e160eb4..00000000 --- a/源代码/StgSharpDebug/Demo/View/Render.cs +++ /dev/null @@ -1,24 +0,0 @@ -using StgSharp.Graphics; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp -{ - public class Render : ViewRender - { - - public override void CustomizedInitialize() - { - - } - - public override bool ValidateInitializing() - { - - } - } -} diff --git a/源代码/StgSharpDebug/Demo/View/ViewMain.cs b/源代码/StgSharpDebug/Demo/View/ViewMain.cs index 67103445..0995e54d 100644 --- a/源代码/StgSharpDebug/Demo/View/ViewMain.cs +++ b/源代码/StgSharpDebug/Demo/View/ViewMain.cs @@ -1,5 +1,34 @@ -using StgSharp.Graphics; -using StgSharp.Logic; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ViewMain.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics; using StgSharp.MVVM; using StgSharp.MVVM.View; using StgSharp.MVVM.ViewModel; @@ -14,13 +43,14 @@ namespace StgSharp { public partial class ViewMain : ViewBase { + + Dictionary _databindingIndexMap; + public ViewMain() { _databindingIndexMap = new Dictionary(); } - Dictionary _databindingIndexMap; - public override void CustomizedInitialize(ViewModelBase viewModelBinding) { Designer = new Design(this); @@ -34,7 +64,7 @@ namespace StgSharp public override bool TryGetObjectReference(string name, out DataBindingEntry entry) { - if (_databindingIndexMap.TryGetValue(name,out entry)) + if (_databindingIndexMap.TryGetValue(name, out entry)) { return true; } @@ -56,7 +86,8 @@ namespace StgSharp protected internal override void Show() { Stream.Draw(); - Stream.AnotherMain(OnlyButton); + Stream.OtherMain(OnlyButton); } + } } diff --git a/源代码/StgSharpDebug/Demo/ViewModelMain.cs b/源代码/StgSharpDebug/Demo/ViewModelMain.cs index 7e88f4d0..455ca067 100644 --- a/源代码/StgSharpDebug/Demo/ViewModelMain.cs +++ b/源代码/StgSharpDebug/Demo/ViewModelMain.cs @@ -1,9 +1,37 @@ -using StgSharp.Graphics; -using StgSharp.Logic; -using StgSharp.MVVM.ViewModel; -using StgSharp.MVVM; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ViewModelMain.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics; -using StgSharpDebug.Logic; +using StgSharp.MVVM; +using StgSharp.MVVM.ViewModel; using System; using System.Collections.Generic; @@ -15,12 +43,18 @@ namespace StgSharp { public class ViewModelMain : ViewModelBase { - public ViewModelMain(ViewPort vp):base(vp,60) + + Dictionary dataBindingEntryIndexmap; + + public ViewModelMain(ViewPort vp) : base(vp, 60) { dataBindingEntryIndexmap = new Dictionary(); } - Dictionary dataBindingEntryIndexmap; + public override void CustomizeInitialize() + { + + } public override bool TryGetObjectReference(string name, out DataBindingEntry entry) { @@ -42,9 +76,5 @@ namespace StgSharp return true; } - public override void CustomizeInitialize() - { - - } }//------------------------------------- End of Class ------------------------------------------ } diff --git a/源代码/StgSharpDebug/Entities/EliteEnemy.cs b/源代码/StgSharpDebug/Entities/EliteEnemy.cs index fd0988bc..e2c80638 100644 --- a/源代码/StgSharpDebug/Entities/EliteEnemy.cs +++ b/源代码/StgSharpDebug/Entities/EliteEnemy.cs @@ -39,13 +39,13 @@ namespace StgSharp.Entities { internal Launcher _awardLauncher; - internal LinkedList> _commonBulletLauncher; internal Launcher _dieBulletLauncher; + internal LinkedList> _commonBulletLauncher; public bool _selectalbe; public Launcher AwardLauncher { get; set; } - public LinkedList> CommonBulletLauncher { get; set; } public Launcher DieBulletLauncher { get; set; } + public LinkedList> CommonBulletLauncher { get; set; } public virtual void OnRender() { diff --git a/源代码/StgSharpDebug/Entities/IEntity.cs b/源代码/StgSharpDebug/Entities/IEntity.cs index 651c8067..925e9980 100644 --- a/源代码/StgSharpDebug/Entities/IEntity.cs +++ b/源代码/StgSharpDebug/Entities/IEntity.cs @@ -40,14 +40,24 @@ namespace StgSharp { protected uint _bornTick; - internal Point _basePoint; + internal Func _movHandler; internal LinkedList _collisionBox; - internal Sensor _collisionSensor; - internal Func _movHandler; + internal Point _basePoint; internal Point _pos; internal Point _position; + internal Sensor _collisionSensor; internal string _texture; + /// + /// X position of an enenmy entity + /// + public float X { get; set; } + + /// + /// Y position of an enemy entity + /// + public float Y { get; set; } + public LinkedList CollisionBox { get => _collisionBox; @@ -63,23 +73,13 @@ namespace StgSharp set => _collisionSensor = value; } + public string TextureGL { get; set; } + /// /// A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y /// public vec2d Location { get; } - public string TextureGL { get; set; } - - /// - /// X position of an enenmy entity - /// - public float X { get; set; } - - /// - /// Y position of an enemy entity - /// - public float Y { get; set; } - public abstract void OnRenderFrame(); public void SetLocation(Point p) diff --git a/源代码/StgSharpDebug/Entities/Launcher.cs b/源代码/StgSharpDebug/Entities/Launcher.cs index e2e9f958..49ba47fe 100644 --- a/源代码/StgSharpDebug/Entities/Launcher.cs +++ b/源代码/StgSharpDebug/Entities/Launcher.cs @@ -36,14 +36,15 @@ namespace StgSharp public class Launcher where T : IEntity { + internal uint[] launchtick; //发射子弹的内部计时 + internal Counter _internalParameter; //发射器的内部计时器 + internal EntityPartical _bulletSample; //发射的子弹类型 /* *用于发射其他的实体,主要是子弹 和 掉落物 */ internal vec2d _center; //发射器的参考位置,运动轨迹的方程应当基于这个参考点构建 - internal Counter _internalParameter; //发射器的内部计时器 - internal uint[] launchtick; //发射子弹的内部计时 public EntityPartical Bullet { diff --git a/源代码/StgSharpDebug/Environment/ErrorDefine.cs b/源代码/StgSharpDebug/Environment/ErrorDefine.cs index 2523eeb1..92c5704c 100644 --- a/源代码/StgSharpDebug/Environment/ErrorDefine.cs +++ b/源代码/StgSharpDebug/Environment/ErrorDefine.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ErrorDefine.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,10 +38,12 @@ namespace StgSharp { public class UniformEmptyReferenceException : Exception { - public UniformEmptyReferenceException(string program, string name): + + public UniformEmptyReferenceException(string program, string name) : base($"Location -1 returned when trying to find uniform {name} in shader program {program}") { - + } + } } diff --git a/源代码/StgSharpDebug/Environment/GlobalSetting.cs b/源代码/StgSharpDebug/Environment/GlobalSetting.cs index 1fc69aa6..312c1c7d 100644 --- a/源代码/StgSharpDebug/Environment/GlobalSetting.cs +++ b/源代码/StgSharpDebug/Environment/GlobalSetting.cs @@ -42,10 +42,12 @@ namespace StgSharp public static unsafe partial class StgSharp { + internal const int ssdSegmentLength = 16; + static byte[] _currentHash; private static bool _inited; - internal const int ssdSegmentLength = 16; + private static int _mainThreadID = -1; public static byte[] CurrentAssemblyHash { @@ -65,8 +67,15 @@ namespace StgSharp } } + public static int MainThreadID + { + get => (_mainThreadID == -1) ? + throw new InvalidOperationException("StgSharp environment is not inited. " + + "Main thread id is not available") : _mainThreadID; + } + /// - /// Init an instance of OpenGL program, + /// CustomizeInit an instance of OpenGL program, /// This method should be called before any other StgSharp api. /// public static void InitGL(int majorVersion, int minorVersion) @@ -99,5 +108,5 @@ namespace StgSharp } - }//------------------------end of class------------------------// + }//-------------------------------------- End of Class ---------------------------------------// } \ No newline at end of file diff --git a/源代码/StgSharpDebug/Environment/Monitors.cs b/源代码/StgSharpDebug/Environment/Monitors.cs index 32eb723e..f6f8fe3d 100644 --- a/源代码/StgSharpDebug/Environment/Monitors.cs +++ b/源代码/StgSharpDebug/Environment/Monitors.cs @@ -1,4 +1,34 @@ -using StgSharp.Graphics; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Monitors.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics; using System; using System.Collections.Generic; @@ -11,18 +41,19 @@ namespace StgSharp { public static partial class StgSharp { - private unsafe static IntPtr[] monitorsArray; + + private static unsafe IntPtr[] monitorsArray; public static unsafe IntPtr[] MonitorsHandleArray { - get + get { if (monitorsArray == null) { int count = 0; IntPtr* arrayhandle = InternalIO.glfwGetMonitors(&count); monitorsArray = new IntPtr[count]; - Marshal.Copy((IntPtr)arrayhandle,monitorsArray,0,count); + Marshal.Copy((IntPtr)arrayhandle, monitorsArray, 0, count); Marshal.FreeHGlobal((IntPtr)arrayhandle); } return monitorsArray; @@ -31,11 +62,9 @@ namespace StgSharp public static IntPtr DefaultMonitor { - get - { - return MonitorsHandleArray[0]; - } + get { return MonitorsHandleArray[0]; } } + } diff --git a/源代码/StgSharpDebug/Environment/Platform.cs b/源代码/StgSharpDebug/Environment/Platform.cs index c575b062..9334ce4e 100644 --- a/源代码/StgSharpDebug/Environment/Platform.cs +++ b/源代码/StgSharpDebug/Environment/Platform.cs @@ -42,6 +42,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; +using System.Threading; using System.Threading.Tasks; #if Windows @@ -64,8 +65,6 @@ namespace StgSharp VK } - - public static partial class StgSharp { @@ -76,8 +75,9 @@ namespace StgSharp /// public const long version = 430; - private static uint markCount = 0; private static bool vsyncActivated; + + private static uint markCount = 0; internal static GraphicAPI API = default; public static void Init() @@ -89,6 +89,7 @@ namespace StgSharp InternalIO.InternalWriteLog( $"Program {Assembly.GetEntryAssembly()!.FullName} Started.", LogType.Info); + _mainThreadID = Environment.CurrentManagedThreadId; } public static void LogError(Exception ex) @@ -96,6 +97,11 @@ namespace StgSharp InternalIO.InternalWriteLog(ex.Message, LogType.Error); } + public static void LogInfo(string log) + { + InternalIO.InternalWriteLog(log, LogType.Info); + } + public static void LogWarning(string log) { InternalIO.InternalWriteLog(log, LogType.Warning); @@ -105,11 +111,6 @@ namespace StgSharp InternalIO.InternalWriteLog(notVerySeriesException.Message, LogType.Warning); } - public static void LogInfo(string log) - { - InternalIO.InternalWriteLog(log, LogType.Info); - } - public static void Mark(bool needConsole) { markCount++; @@ -121,7 +122,7 @@ namespace StgSharp public static void Terminate() { - MainTimeProvider.Terminate(); + MainTimeProvider.StopProvidingTime(); InternalIO.glfwTerminate(); } diff --git a/源代码/StgSharpDebug/Environment/TimeProvider.cs b/源代码/StgSharpDebug/Environment/TimeProvider.cs index 4c116c12..9fb4c31e 100644 --- a/源代码/StgSharpDebug/Environment/TimeProvider.cs +++ b/源代码/StgSharpDebug/Environment/TimeProvider.cs @@ -28,7 +28,9 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Logic; + + +using StgSharp.Timing; using System; using System.Collections.Generic; @@ -39,29 +41,28 @@ using System.Threading; namespace StgSharp { - public partial class StgSharp + public static partial class StgSharp { + internal static StgSharpTime mainTimeProvider = new StgSharpTime(); - internal static StgSharpTime mainTimeProvider; - - internal static StgSharpTime MainTimeProvider => mainTimeProvider; + internal static TimeSourceProviderBase MainTimeProvider => mainTimeProvider; } public sealed class StgSharpTime : TimeSourceProviderBase { + private static List subscriberList = new List(); private static long accuracy; private static Stopwatch mainProvider = new Stopwatch(); - private static List subscriberList = new List(); private static Thread timeProvideThread; internal StgSharpTime() { } - public static StgSharpTime OnlyInstance => StgSharp.MainTimeProvider; + public static TimeSourceProviderBase OnlyInstance => StgSharp.MainTimeProvider; public override sealed void StartProvidingTime() { @@ -92,6 +93,14 @@ namespace StgSharp timeProvideThread.Start(); } + public override void StopProvidingTime() + { + lock (mainProvider) + { + mainProvider.Stop(); + } + } + public void Terminate() { lock (mainProvider) diff --git a/源代码/StgSharpDebug/Environment/globalKeyStat.cs b/源代码/StgSharpDebug/Environment/globalKeyStat.cs index e7318c70..9ed4c49c 100644 --- a/源代码/StgSharpDebug/Environment/globalKeyStat.cs +++ b/源代码/StgSharpDebug/Environment/globalKeyStat.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="globalKeyStat.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; @@ -10,7 +40,8 @@ namespace StgSharp public static partial class StgSharp { - private static ConcurrentDictionary keyListener + + private static ConcurrentDictionary keyListener = new ConcurrentDictionary(); public static KeyStatus CheckKey(KeyboardKey key) diff --git a/源代码/StgSharpDebug/Geometries/Coordination/CoordinationBase.cs b/源代码/StgSharpDebug/Geometries/Coordination/CoordinationBase.cs index 8dd7fd80..bec389d7 100644 --- a/源代码/StgSharpDebug/Geometries/Coordination/CoordinationBase.cs +++ b/源代码/StgSharpDebug/Geometries/Coordination/CoordinationBase.cs @@ -1,4 +1,34 @@ -using StgSharp.Math; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="CoordinationBase.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Math; using System; using System.Collections.Generic; @@ -10,9 +40,10 @@ namespace StgSharp.Geometries { public abstract class CoordinationBase { + + private bool globalCoordAvailable; private CoordinationBase localCoordination; private Matrix44 coordMat; - private bool globalCoordAvailable; public CoordinationBase( @@ -24,7 +55,7 @@ namespace StgSharp.Geometries public virtual Point LocalOrigin { - get => new Point( coordMat.colum3.XYZ); + get => new Point(coordMat.colum3.XYZ); internal set => coordMat.colum3.XYZ = value.Coord; } @@ -46,7 +77,7 @@ namespace StgSharp.Geometries set => coordMat.colum2.XYZ = value; } - protected ref Matrix44 CoordMat + protected ref Matrix44 CoordMat { get => ref coordMat; } diff --git a/源代码/StgSharpDebug/Geometries/Coordination/PlainCoordinate.cs b/源代码/StgSharpDebug/Geometries/Coordination/PlainCoordinate.cs index 6fd6cba5..1535bdf6 100644 --- a/源代码/StgSharpDebug/Geometries/Coordination/PlainCoordinate.cs +++ b/源代码/StgSharpDebug/Geometries/Coordination/PlainCoordinate.cs @@ -39,6 +39,13 @@ namespace StgSharp.Geometries { public class PlainCoordinate : CoordinationBase { + + private static PlainCoordinate statndardPlainCoordination = new PlainCoordinate( + null, new Point(0, 0, 0), + new vec3d(1, 0, 0), + new vec3d(0, 1, 0) + ); + public PlainCoordinate( CoordinationBase local, Point origin, @@ -55,12 +62,7 @@ namespace StgSharp.Geometries LocalOrigin = origin; } - private static PlainCoordinate statndardPlainCoordination = new PlainCoordinate( - null, new Point(0,0,0), - new vec3d(1,0,0), - new vec3d(0, 1, 0) - ); - public static PlainCoordinate StandardPlainCoordination => statndardPlainCoordination; + } } diff --git a/源代码/StgSharpDebug/Geometries/Coordination/SpaceCoordinate.cs b/源代码/StgSharpDebug/Geometries/Coordination/SpaceCoordinate.cs index 5f3940f2..f6797ffe 100644 --- a/源代码/StgSharpDebug/Geometries/Coordination/SpaceCoordinate.cs +++ b/源代码/StgSharpDebug/Geometries/Coordination/SpaceCoordinate.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="Class1.cs" +// file="SpaceCoordinate.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -38,11 +38,13 @@ namespace StgSharp.Geometries { public class SpaceCoordinate : CoordinationBase { + public SpaceCoordinate( CoordinationBase localCoordination, Point origin, vec3d xAxis, vec3d yAxis, vec3d zAxis ) : base(localCoordination) { } + } } diff --git a/源代码/StgSharpDebug/Geometries/Coordination/StreamLocalCoordinate.cs b/源代码/StgSharpDebug/Geometries/Coordination/StreamLocalCoordinate.cs index e813320e..2f311de4 100644 --- a/源代码/StgSharpDebug/Geometries/Coordination/StreamLocalCoordinate.cs +++ b/源代码/StgSharpDebug/Geometries/Coordination/StreamLocalCoordinate.cs @@ -1,4 +1,34 @@ -using StgSharp.Math; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="StreamLocalCoordinate.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Math; using System; using System.Collections.Generic; diff --git a/源代码/StgSharpDebug/Geometries/GeometryOperation/GeometryOperation.cs b/源代码/StgSharpDebug/Geometries/GeometryOperation/GeometryOperation.cs index 469a9b19..fc75902d 100644 --- a/源代码/StgSharpDebug/Geometries/GeometryOperation/GeometryOperation.cs +++ b/源代码/StgSharpDebug/Geometries/GeometryOperation/GeometryOperation.cs @@ -1,4 +1,35 @@ -using StgSharp.Math; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="GeometryOperation.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Math; +using StgSharp.Timing; using System; using System.Collections.Generic; @@ -8,34 +39,17 @@ using System.Text; namespace StgSharp.Geometries { + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate vec3d GeometryMotionDelegate(TimeSpanProvider timeSource, out float rotation); public class GeometryMotion { + private bool isIncrementMode; private bool sourceIsStatic; - private TimeSpanProvider time; private GeometryMotionDelegate movement; private IntPtr handle; - - public static GeometryMotion DefaultMotion - { - get - { - return new GeometryMotion - ( - true, - null, - null - ); - } - } - - private static vec3d defaultMotion(TimeSpanProvider provider, out float rotation) - { - rotation = 0; - return Vec3d.Zero; - } + private TimeSpanProvider time; public unsafe GeometryMotion( bool isIncreament, @@ -53,35 +67,40 @@ namespace StgSharp.Geometries else if (motionDelegate.Method.IsStatic) { sourceIsStatic = true; - handle = Marshal.GetFunctionPointerForDelegate(motionDelegate); + handle = Marshal.GetFunctionPointerForDelegate(motionDelegate); movement = motionDelegate; } else { movement = motionDelegate; } - sourceIsStatic = false; + //sourceIsStatic = false; } public bool IsIncrement { - get => isIncrementMode; + get => isIncrementMode; } + public static GeometryMotion DefaultMotion + { + get => new GeometryMotion(true, null, null); + } + public unsafe void RunMotion(ref vec3d coord, ref float rotation) { - float rot = 0; + float rot; vec3d vec; - if (sourceIsStatic) + if (sourceIsStatic) { - vec = ((delegate*)handle)(time, out rot); + vec = ((delegate* unmanaged[Cdecl])handle)(time, out rot); } else { vec = movement(time, out rot); } - + if (isIncrementMode) { coord += vec; @@ -89,9 +108,16 @@ namespace StgSharp.Geometries } else { - coord = vec.XYZ; + coord = vec; rotation = rot; } } + + private static vec3d defaultMotion(TimeSpanProvider provider, out float rotation) + { + rotation = 0; + return Vec3d.Zero; + } + }//------------------------------- End of Class ------------------------------- } diff --git a/源代码/StgSharpDebug/Geometries/GeometryScaler/Angle.cs b/源代码/StgSharpDebug/Geometries/GeometryScaler/Angle.cs index 1a5d94fc..a1b3ee58 100644 --- a/源代码/StgSharpDebug/Geometries/GeometryScaler/Angle.cs +++ b/源代码/StgSharpDebug/Geometries/GeometryScaler/Angle.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Angle.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; @@ -9,12 +39,19 @@ namespace StgSharp.Math { public static partial class GeometryScaler { + internal const float DegToRad = 180 / Scaler.Pi; [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Degree ToDegree(float value) + public static float Cos(Radius r) { - return new Degree(value); + return MathF.Cos(r._radius); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Cos(Degree r) + { + return MathF.Cos(r._degree / DegToRad); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -23,24 +60,18 @@ namespace StgSharp.Math return MathF.Sin(r._radius); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Sin(Degree r) + { + return MathF.Sin(r._degree / DegToRad); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Tan(Radius r) { return MathF.Tan(r._radius); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float Cos(Radius r) - { - return MathF.Cos(r._radius); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float Sin(Degree r) - { - return MathF.Sin(r._degree/DegToRad); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Tan(Degree r) { @@ -48,18 +79,19 @@ namespace StgSharp.Math } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float Cos(Degree r) + public static Degree ToDegree(float value) { - return MathF.Cos(r._degree / DegToRad); + return new Degree(value); } } public struct Degree { + internal float _degree; - internal Degree(float dgree) + internal Degree(float dgree) { _degree = dgree; } @@ -68,28 +100,25 @@ namespace StgSharp.Math { return new Radius(d._degree / GeometryScaler.DegToRad); } + } public struct Radius { + internal float _radius; + [Obsolete("Unsafe, you may forget this is radius.", true)] + public Radius() { } + + public Radius(float radius) + { + _radius = radius; + } + public static Radius Zero { - get =>new Radius(0); - } - - public Radius(float radius) - { - _radius = radius; - } - - [Obsolete("Unsafe, you may forget this is radius.",true)] - public Radius() { } - - public static implicit operator Degree(Radius r) - { - return new Degree(r._radius * 180 / Scaler.Pi); + get => new Radius(0); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -105,9 +134,9 @@ namespace StgSharp.Math } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Radius operator +(Radius left, Radius Right) + public static bool operator !=(Radius left, Radius right) { - return new Radius(left._radius + Right._radius); + return left._radius != right._radius; } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -128,16 +157,21 @@ namespace StgSharp.Math return left._radius / right._radius; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static Radius operator +(Radius left, Radius Right) + { + return new Radius(left._radius + Right._radius); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool operator ==(Radius left, Radius right) { return left._radius == right._radius; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool operator !=(Radius left, Radius right) + public static implicit operator Degree(Radius r) { - return left._radius != right._radius; + return new Degree((r._radius * 180) / Scaler.Pi); } } diff --git a/源代码/StgSharpDebug/Geometries/IGeometry.cs b/源代码/StgSharpDebug/Geometries/IGeometry.cs index 89722d85..5934dc97 100644 --- a/源代码/StgSharpDebug/Geometries/IGeometry.cs +++ b/源代码/StgSharpDebug/Geometries/IGeometry.cs @@ -41,7 +41,6 @@ namespace StgSharp.Geometries { public interface IGeometry { - public CoordinationBase Coordination { get; } public Point this[int index] { @@ -49,19 +48,20 @@ namespace StgSharp.Geometries set; } - public int VertexCount - { - get; - } - #pragma warning disable CA1819 public vec4d[] VertexStream #pragma warning restore CA1819 { get; } + public CoordinationBase Coordination { get; } - public ReadOnlySpan VertexIndices + public int VertexCount + { + get; + } + + public ReadOnlySpan VertexIndices { get; } diff --git a/源代码/StgSharp/Logic/Exception.cs b/源代码/StgSharpDebug/Geometries/IGeomtryBuffer.cs similarity index 93% rename from 源代码/StgSharp/Logic/Exception.cs rename to 源代码/StgSharpDebug/Geometries/IGeomtryBuffer.cs index db94d36d..f43cc279 100644 --- a/源代码/StgSharp/Logic/Exception.cs +++ b/源代码/StgSharpDebug/Geometries/IGeomtryBuffer.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="Exception.cs" +// file="IGeomtryBuffer.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,14 +28,17 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Graphics; - using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace StgSharp.Logic +namespace StgSharp.Geometries { -} \ No newline at end of file + public interface IGeomtryBuffer + { + + + } +} diff --git a/源代码/StgSharpDebug/Geometries/IInstancing.cs b/源代码/StgSharpDebug/Geometries/IInstancing.cs index 9ee9fc76..efb9083c 100644 --- a/源代码/StgSharpDebug/Geometries/IInstancing.cs +++ b/源代码/StgSharpDebug/Geometries/IInstancing.cs @@ -43,30 +43,6 @@ namespace StgSharp.Geometries public interface IInstancing { - public int BufferId - { - get; - internal set; - } - - public vec3d CenterPositionGlobal - { - get; - internal set; - } - - public vec3d Coord - { - get { return GlobalBuffer.CoordAndRotationList[BufferId].XYZ; } - set { GlobalBuffer.CoordAndRotationList[BufferId] = new vec4d(value.vec); } - } - - public IInstancingBuffer GlobalBuffer - { - get; - internal set; - } - public float Rotation { get { return GlobalBuffer.CoordAndRotationList[BufferId].W; } @@ -89,6 +65,30 @@ namespace StgSharp.Geometries get; set; } + public IInstancingBuffer GlobalBuffer + { + get; + internal set; + } + + public int BufferId + { + get; + internal set; + } + + public vec3d CenterPositionGlobal + { + get; + internal set; + } + + public vec3d Coord + { + get { return GlobalBuffer.CoordAndRotationList[BufferId].XYZ; } + set { GlobalBuffer.CoordAndRotationList[BufferId] = new vec4d(value.vec); } + } + public void Move() { (vec3d coord, float rotation) = (Coord, Rotation); diff --git a/源代码/StgSharpDebug/Geometries/IInstancingBuffer.cs b/源代码/StgSharpDebug/Geometries/IInstancingBuffer.cs index 4959a050..23705fc0 100644 --- a/源代码/StgSharpDebug/Geometries/IInstancingBuffer.cs +++ b/源代码/StgSharpDebug/Geometries/IInstancingBuffer.cs @@ -1,4 +1,34 @@ -using StgSharp.Math; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="IInstancingBuffer.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Math; using System; using System.Collections.Generic; @@ -9,6 +39,10 @@ namespace StgSharp.Geometries public interface IInstancingBuffer { + public Span CoordAndRotationSpan { get; } + + public Span ScalingSpan { get; } + internal IGeometry TypicalShape { get; } internal List InstanceList { get; } @@ -17,11 +51,7 @@ namespace StgSharp.Geometries internal List ScalingList { get; } - public Span CoordAndRotationSpan { get; } - public Span ScalingSpan { get; } - - } } diff --git a/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/GeometryOperation.cs b/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/GeometryOperation.cs index be3cb33a..cae7f18c 100644 --- a/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/GeometryOperation.cs +++ b/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/GeometryOperation.cs @@ -37,6 +37,7 @@ namespace StgSharp.Geometries public static unsafe class GeometryOperation { + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static vec3d DefaultMotion(int tick) { diff --git a/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/IPlainEntity.cs b/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/IPlainEntity.cs index 176bd2b7..b79f2ee8 100644 --- a/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/IPlainEntity.cs +++ b/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/IPlainEntity.cs @@ -1,4 +1,34 @@ -using StgSharp.Math; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="IPlainEntity.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Math; using System; using System.Collections.Generic; @@ -11,22 +41,19 @@ namespace StgSharp.Geometries public interface IPlainEntity { + public vec2d CenterPosition { get; set; } public bool CollideWith(IPlainEntity entity); + } - public class PlainEntity:IPlainEntity + public class PlainEntity : IPlainEntity { - private PlainGeometry _shape; - vec2d IPlainEntity.CenterPosition - { - get => _shape.Coordination.LocalOrigin.Coord.XY; - set => throw new InvalidOperationException(); - } + private PlainGeometry _shape; public PlainEntity(PlainGeometry shape) { @@ -37,6 +64,13 @@ namespace StgSharp.Geometries { throw new NotImplementedException(); } + + vec2d IPlainEntity.CenterPosition + { + get => _shape.Coordination.LocalOrigin.Coord.XY; + set => throw new InvalidOperationException(); + } + } } diff --git a/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/ParticleOnPlain.cs b/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/ParticleOnPlain.cs index ab52aa15..44f3a1f6 100644 --- a/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/ParticleOnPlain.cs +++ b/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/ParticleOnPlain.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="IInstancing.cs" +// file="ParticleOnPlain.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -54,7 +54,7 @@ namespace StgSharp.Geometries ((IInstancingBuffer)buffer).InstanceList.Add(this); } - public int BufferId + public GeometryMotion Motion { get; set; @@ -65,9 +65,10 @@ namespace StgSharp.Geometries get; set; } - public GeometryMotion Motion - { - get; + + public int BufferId + { + get; set; } @@ -77,16 +78,17 @@ namespace StgSharp.Geometries set; } - vec2d IPlainEntity.CenterPosition - { - get => GlobalBuffer.CoordAndRotationList[BufferId].XY; - set => throw new NotImplementedException(); - } - bool IPlainEntity.CollideWith(IPlainEntity entity) { throw new NotImplementedException(); } + + vec2d IPlainEntity.CenterPosition + { + get => GlobalBuffer.CoordAndRotationList[BufferId].XY; + set => throw new NotImplementedException(); + } + } } diff --git a/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/PlainGeometry.cs b/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/PlainGeometry.cs index 2db38c65..3b1f7ac7 100644 --- a/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/PlainGeometry.cs +++ b/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/PlainGeometry.cs @@ -41,9 +41,11 @@ namespace StgSharp.Geometries /// public abstract class PlainGeometry : IGeometry { + protected vec4d[] vertexMat; internal CoordinationBase coordinate; + internal PlainGeometry(CoordinationBase coordination) { coordinate = coordination; diff --git a/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs b/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs index c1e4871a..7359fe27 100644 --- a/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs +++ b/源代码/StgSharpDebug/Geometries/PlainGeometry/Define/PlainInstancingBuffer.cs @@ -44,30 +44,24 @@ using System.Threading.Tasks; namespace StgSharp.Geometries { - public class PlainInstancingBuffer : - IDisposable,IEnumerable, IInstancingBuffer - where T : + public class PlainInstancingBuffer : + IDisposable, IEnumerable, IInstancingBuffer + where T : IInstancing { + private bool disposedValue; + private CoordinatePlain globalCorrdinnate; private List coordList; private List instanceList; private List scalingList; private Mutex mutex; - private bool disposedValue; - - #region field of mem opt - - vec4d[] coordArray; - float[] scaleArray; - - #endregion public PlainInstancingBuffer() { coordList = new List(capacity: 100); - instanceList = new List(capacity:100); + instanceList = new List(capacity: 100); scalingList = new List(capacity: 100); coordArray = Array.Empty(); scaleArray = Array.Empty(); @@ -133,8 +127,6 @@ namespace StgSharp.Geometries } } - IGeometry IInstancingBuffer.TypicalShape => throw new NotImplementedException(); - public int CreateInstanceID() { mutex.WaitOne(); @@ -145,13 +137,32 @@ namespace StgSharp.Geometries return ret; } + // ~PlainInstancingBuffer() + // { + // Dispose(disposing: false); + // } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + + public IEnumerator GetEnumerator() + { + foreach (IInstancing item in instanceList) + { + yield return (T)item; + } + } + public void Remove(T instance) { mutex.WaitOne(); if (instance.GlobalBuffer != this) { throw new ArgumentException( - message:"instance does not belong to current Particle Buffer", + message: "instance does not belong to current Particle Buffer", paramName: nameof(instance)); } int index = instance.BufferId; @@ -170,7 +181,7 @@ namespace StgSharp.Geometries public void UpdateAllParticles() { - foreach (var particle in instanceList) + foreach (IInstancing particle in instanceList) { particle.Move(); } @@ -192,31 +203,23 @@ namespace StgSharp.Geometries } } - // ~PlainInstancingBuffer() - // { - // Dispose(disposing: false); - // } - - public void Dispose() - { - Dispose(disposing: true); - GC.SuppressFinalize(this); - } - - public IEnumerator GetEnumerator() - { - foreach (var item in instanceList) - { - yield return (T)item; - } - } - IEnumerator IEnumerable.GetEnumerator() { - foreach (var item in instanceList) + foreach (IInstancing item in instanceList) { yield return (T)item; } } + + IGeometry IInstancingBuffer.TypicalShape => throw new NotImplementedException(); + + #region field of mem opt + + vec4d[] coordArray; + float[] scaleArray; + + #endregion + + } } diff --git a/源代码/StgSharpDebug/Geometries/PlainGeometry/Polygon4.cs b/源代码/StgSharpDebug/Geometries/PlainGeometry/Polygon4.cs index a6fe9b11..a95ab543 100644 --- a/源代码/StgSharpDebug/Geometries/PlainGeometry/Polygon4.cs +++ b/源代码/StgSharpDebug/Geometries/PlainGeometry/Polygon4.cs @@ -38,14 +38,15 @@ namespace StgSharp.Geometries { public class Polygon4 : PlainGeometry { + protected static int[] Indices = [0, 1, 2, 0, 2, 3]; - internal Polygon4():base(PlainCoordinate.StandardPlainCoordination) + internal Polygon4() : base(PlainCoordinate.StandardPlainCoordination) { vertexMat = new vec4d[4]; } - internal Polygon4(vec4d[] rawCoord): + internal Polygon4(vec4d[] rawCoord) : base(PlainCoordinate.StandardPlainCoordination) { if (rawCoord.Length != 4) @@ -60,7 +61,7 @@ namespace StgSharp.Geometries Point topRight, Point bottomRight, Point bottomLeft - ):base(PlainCoordinate.StandardPlainCoordination) + ) : base(PlainCoordinate.StandardPlainCoordination) { this[0] = topLeft; this[1] = topRight; @@ -69,21 +70,6 @@ namespace StgSharp.Geometries } - public Polygon4( - float v0x, float v0y, - float v1x, float v1y, - float v2x, float v2y, - float v3x, float v3y - ):base(PlainCoordinate.StandardPlainCoordination) - { - vertexMat = new vec4d[4]; - - this[0] = new Point(v0x, v0y, 0); - this[1] = new Point(v1x, v1y, 0); - this[2] = new Point(v2x, v2y, 0); - this[3] = new Point(v3x, v3y, 0); - } - public Polygon4(CoordinationBase coordinate, PlainCoordinate coordination, @@ -100,6 +86,21 @@ namespace StgSharp.Geometries } + public Polygon4( + float v0x, float v0y, + float v1x, float v1y, + float v2x, float v2y, + float v3x, float v3y + ) : base(PlainCoordinate.StandardPlainCoordination) + { + vertexMat = new vec4d[4]; + + this[0] = new Point(v0x, v0y, 0); + this[1] = new Point(v1x, v1y, 0); + this[2] = new Point(v2x, v2y, 0); + this[3] = new Point(v3x, v3y, 0); + } + public Polygon4( PlainCoordinate coordination, float v0x, float v0y, diff --git a/源代码/StgSharpDebug/Geometries/PlainGeometry/Polygon5.cs b/源代码/StgSharpDebug/Geometries/PlainGeometry/Polygon5.cs index 4bc1aa0a..87034d28 100644 --- a/源代码/StgSharpDebug/Geometries/PlainGeometry/Polygon5.cs +++ b/源代码/StgSharpDebug/Geometries/PlainGeometry/Polygon5.cs @@ -39,7 +39,9 @@ namespace StgSharp.Geometries public unsafe class Polygon5 : PlainGeometry { - public unsafe Polygon5():base(PlainCoordinate.StandardPlainCoordination) + internal static int[] Indices = [0, 1, 2, 0, 2, 3, 0, 3, 4]; + + public unsafe Polygon5() : base(PlainCoordinate.StandardPlainCoordination) { vertexMat = new vec4d[5]; } @@ -50,7 +52,7 @@ namespace StgSharp.Geometries float v2x, float v2y, float v3x, float v3y, float v4x, float v4y - ):base(PlainCoordinate.StandardPlainCoordination) + ) : base(PlainCoordinate.StandardPlainCoordination) { vertexMat = new vec4d[5]; this[0] = new Point(v0x, v0y, 0); @@ -67,7 +69,7 @@ namespace StgSharp.Geometries float v2x, float v2y, float v3x, float v3y, float v4x, float v4y - ):base(coordination) + ) : base(coordination) { vertexMat = new vec4d[5]; this[0] = new Point(v0x, v0y, 0); @@ -77,8 +79,7 @@ namespace StgSharp.Geometries this[4] = new Point(v4x, v4y, 0); } - internal static int[] Indices = [ 0, 1, 2, 0, 2, 3, 0, 3, 4 ]; - public override ReadOnlySpan VertexIndices => Indices; + } } diff --git a/源代码/StgSharpDebug/Geometries/PlainGeometry/Polygon6.cs b/源代码/StgSharpDebug/Geometries/PlainGeometry/Polygon6.cs index 0c388d03..e6c42dad 100644 --- a/源代码/StgSharpDebug/Geometries/PlainGeometry/Polygon6.cs +++ b/源代码/StgSharpDebug/Geometries/PlainGeometry/Polygon6.cs @@ -38,7 +38,10 @@ namespace StgSharp.Geometries { public class Polygon6 : PlainGeometry { - public Polygon6():base(PlainCoordinate.StandardPlainCoordination) + + internal static int[] Indices = [0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 5]; + + public Polygon6() : base(PlainCoordinate.StandardPlainCoordination) { vertexMat = new vec4d[6]; } @@ -64,8 +67,7 @@ namespace StgSharp.Geometries vertexMat[6].vec = vert6.vec; } - internal static int[] Indices = [ 0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 5 ]; - public override ReadOnlySpan VertexIndices => Indices; + } } \ No newline at end of file diff --git a/源代码/StgSharpDebug/Geometries/PlainGeometry/Rectangle.cs b/源代码/StgSharpDebug/Geometries/PlainGeometry/Rectangle.cs index f60c139a..e3cecb75 100644 --- a/源代码/StgSharpDebug/Geometries/PlainGeometry/Rectangle.cs +++ b/源代码/StgSharpDebug/Geometries/PlainGeometry/Rectangle.cs @@ -86,14 +86,12 @@ namespace StgSharp.Geometries /// /// Calculate movement to center /// - /// Current time tick + /// CurrentBlueprint time tick /// public virtual vec3d MovCenter(uint tick) { return default(vec3d); } - - } } diff --git a/源代码/StgSharpDebug/Geometries/PlainGeometry/Triangle.cs b/源代码/StgSharpDebug/Geometries/PlainGeometry/Triangle.cs index 0c97f57f..60d53318 100644 --- a/源代码/StgSharpDebug/Geometries/PlainGeometry/Triangle.cs +++ b/源代码/StgSharpDebug/Geometries/PlainGeometry/Triangle.cs @@ -42,7 +42,9 @@ namespace StgSharp.Geometries public unsafe class Triangle : PlainGeometry { - public Triangle():base(PlainCoordinate.StandardPlainCoordination) + internal static int[] Indices = [0, 1, 2]; + + public Triangle() : base(PlainCoordinate.StandardPlainCoordination) { vertexMat = new vec4d[3]; } @@ -58,6 +60,17 @@ namespace StgSharp.Geometries this[2] = vertex03; } + public Triangle(PlainCoordinate coordination, + Point vertex01, + Point vertex02, + Point vertex03 + ) : base(coordination) + { + this[0] = vertex01; + this[1] = vertex02; + this[2] = vertex03; + } + public Triangle( float v0x, float v0y, float v1x, float v1y, @@ -69,17 +82,6 @@ namespace StgSharp.Geometries this[2] = new Point(v2x, v2y, 0); } - public Triangle(PlainCoordinate coordination, - Point vertex01, - Point vertex02, - Point vertex03 - ) : base(coordination) - { - this[0] = vertex01; - this[1] = vertex02; - this[2] = vertex03; - } - public Triangle(PlainCoordinate coordination, float v0x, float v0y, float v1x, float v1y, @@ -90,7 +92,6 @@ namespace StgSharp.Geometries this[1] = new Point(v1x, v1y, 0); this[2] = new Point(v2x, v2y, 0); } - internal static int[] Indices = [ 0, 1, 2 ]; public override ReadOnlySpan VertexIndices => Indices; diff --git a/源代码/StgSharpDebug/Geometries/Point.cs b/源代码/StgSharpDebug/Geometries/Point.cs index f5ca51ac..0f0f9496 100644 --- a/源代码/StgSharpDebug/Geometries/Point.cs +++ b/源代码/StgSharpDebug/Geometries/Point.cs @@ -1,4 +1,34 @@ -using StgSharp.Math; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Point.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Math; using System; using System.Collections.Generic; @@ -11,12 +41,14 @@ namespace StgSharp.Geometries [StructLayout(LayoutKind.Explicit, Size = 16)] public struct Point { + [FieldOffset(0)] private vec3d coord; [FieldOffset(0)] internal Vector4 coordVec; - public Point(float x, float y, float z) + internal Point(vec4d vector) { - coordVec = new Vector4(x,y,z,1); + coordVec = vector.vec; + coordVec.W = 1; } public Point(vec3d coord) @@ -25,10 +57,9 @@ namespace StgSharp.Geometries coordVec.W = 1; } - internal Point(vec4d vector) + public Point(float x, float y, float z) { - coordVec = vector.vec; - coordVec.W = 1; + coordVec = new Vector4(x, y, z, 1); } public vec3d Coord diff --git a/源代码/StgSharpDebug/Graphics/CPUanimation/IImageProvider.cs b/源代码/StgSharpDebug/Graphics/CPUanimation/IImageProvider.cs index 88bd1420..b86e8674 100644 --- a/源代码/StgSharpDebug/Graphics/CPUanimation/IImageProvider.cs +++ b/源代码/StgSharpDebug/Graphics/CPUanimation/IImageProvider.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="IImageProvider.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Text; @@ -7,6 +37,5 @@ namespace StgSharp.Graphics public interface IImageProvider { Image ProvideImage(); - } } diff --git a/源代码/StgSharpDebug/Graphics/View/FormThreading.cs b/源代码/StgSharpDebug/Graphics/CPUanimation/ImageHelper.cs similarity index 60% rename from 源代码/StgSharpDebug/Graphics/View/FormThreading.cs rename to 源代码/StgSharpDebug/Graphics/CPUanimation/ImageHelper.cs index be244df9..e7f3fe2d 100644 --- a/源代码/StgSharpDebug/Graphics/View/FormThreading.cs +++ b/源代码/StgSharpDebug/Graphics/CPUanimation/ImageHelper.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="FormThreading.cs" +// file="ImageHelper.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,47 +28,49 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Math; -using StgSharp.Logic; - using System; using System.Collections.Generic; -using System.Linq; -using System.Reflection; using System.Text; -using System.Threading; -using System.Threading.Tasks; namespace StgSharp.Graphics { - public partial class View + public static class ImageHelper { - internal Blueprint localLogic; - - /* - private void GatherSingleFrameAsyncThread(MethodInfo[] methods) + public static void Resize(Image i, int width, int height, ImageMovement move) { - if (methods.Length == 0) + if (i == null) { - return; + throw new ArgumentNullException(nameof(i)); } - foreach (MethodInfo m in methods) //find all methods decorated by RenderActivityAttribute + Array.Resize(ref i.Data, width * height * i.PixelSize); + i.Height = height; + i.Width = width; + switch (move) { - RenderActivityAttribute attr = m.GetCustomAttribute(false); - if (attr == null) - { - continue; - } - if (!m.IsStatic && (m.GetParameters().Length != 0) && (m.ReturnType != typeof(void))) - { - throw new NotSupportedException("A render activity cannot have parameters, returning value or be static."); - } - ThreadStart s = (ThreadStart)Delegate.CreateDelegate(typeof(ThreadStart), this, m); - FrameAsyncThread thread = new(s, attr._priority); - //singleFrameAsyncThreadList.Add(thread); + case ImageMovement.Discard: + break; + case ImageMovement.Top: + break; + default: + throw new NotImplementedException(); } + i.PixelUpdateCount++; } - /**/ + } + [Flags] + public enum ImageMovement + { +#pragma warning disable CA1008 + Discard = 0, +#pragma warning restore CA1008 + Top = 1, + Bottom = 2, + Left = 4, + Right = 8, + TopLeft = Top | Left, + BottomLeft = Bottom | Left, + TopRight = Top | Right, + BottomRight = Bottom | Right, } } diff --git a/源代码/StgSharpDebug/Graphics/GL/Buffer/BufferObjectBase.cs b/源代码/StgSharpDebug/Graphics/Define/BufferObjectBase.cs similarity index 92% rename from 源代码/StgSharpDebug/Graphics/GL/Buffer/BufferObjectBase.cs rename to 源代码/StgSharpDebug/Graphics/Define/BufferObjectBase.cs index ecbc4ca4..cd0d5847 100644 --- a/源代码/StgSharpDebug/Graphics/GL/Buffer/BufferObjectBase.cs +++ b/源代码/StgSharpDebug/Graphics/Define/BufferObjectBase.cs @@ -28,28 +28,31 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- +using StgSharp.Graphics.OpenGL; + using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace StgSharp.Graphics.GL +namespace StgSharp.Graphics { /// /// Interface of all kinds OpenGL buffer objects /// public abstract class BufferObjectBase : IDisposable { + + protected GlHandle[] _bufferHandle; protected RenderStream binding; - protected glHandleSet _bufferHandle; /// /// Get the only handle to one of the Object instance /// /// /// - public glHandle this[int index] => _bufferHandle[index]; + public GlHandle this[int index] => _bufferHandle[index]; /// /// Bind a buffer instance to OpenGL @@ -66,7 +69,7 @@ namespace StgSharp.Graphics.GL /// public override string ToString() { - return $"This is a {GetType().FullName}, containing {_bufferHandle.length} buffer handles: {_bufferHandle.ToString()}."; + return $"This is a {GetType().FullName}, containing {_bufferHandle.Length} buffer handles: {_bufferHandle.ToString()}."; } protected abstract void Dispose(bool disposing); diff --git a/源代码/StgSharpDebug/Graphics/Define/StructDefine.cs b/源代码/StgSharpDebug/Graphics/Define/StructDefine.cs index 11ef25cc..99506f23 100644 --- a/源代码/StgSharpDebug/Graphics/Define/StructDefine.cs +++ b/源代码/StgSharpDebug/Graphics/Define/StructDefine.cs @@ -28,7 +28,7 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Graphics.GL; +using StgSharp.Graphics.OpenGL; using System; using System.Runtime.InteropServices; @@ -49,22 +49,9 @@ namespace StgSharp.Graphics public unsafe struct GLFWcontext { - private int client; - private IntPtr destroy; private delegate* extensionSupported; - private GLFWbool forward, debug, noerror; - - //PFNGLGETINTEGERVPROC GetIntegerv; - private IntPtr GetIntegerv; private delegate*, void> getProcAddress; - //PFNGLGETSTRINGPROC GetString; - private IntPtr GetString; - - //PFNGLGETSTRINGIPROC GetStringi; - private IntPtr GetStringi; - private int major, minor, revision; - /* void (* makeCurrent) (glfwWindow*); void (* swapBuffers) (glfwWindow*); @@ -75,12 +62,26 @@ namespace StgSharp.Graphics */ private delegate* makeCurrent; + private delegate* swapBuffer; + private delegate* swapInterval; + private GLFWbool forward, debug, noerror; + + private int client; + private int major, minor, revision; private int profile; private int release; private int robustness; private int source; - private delegate* swapBuffer; - private delegate* swapInterval; + private IntPtr destroy; + + //PFNGLGETINTEGERVPROC GetIntegerv; + private IntPtr GetIntegerv; + + //PFNGLGETSTRINGPROC GetString; + private IntPtr GetString; + + //PFNGLGETSTRINGIPROC GetStringi; + private IntPtr GetStringi; internal struct egl { @@ -165,15 +166,16 @@ namespace StgSharp.Graphics public unsafe struct GLFWimage { + /*! The pixel _data of this image, arranged left-to-right, top-to-bottom. + */ + private byte* pixels; + /*! The height, in pixels, of this image. */ private int height; /*! The width, in pixels, of this image. */ private int width; - /*! The pixel data of this image, arranged left-to-right, top-to-bottom. - */ - private byte* pixels; } @@ -182,22 +184,24 @@ namespace StgSharp.Graphics public unsafe struct GLFWgamepadstate { - /*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0 - * to 1.0 inclusive. - */ - public fixed float axes[6]; - /*! The states of each [gamepad button](@ref gamepad_buttons), `GLFW_PRESS` * or `GLFW_RELEASE`. */ public fixed byte buttons[15]; + /*! The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0 + * to 1.0 inclusive. + */ + public fixed float axes[6]; + } [StructLayout(LayoutKind.Sequential)] public unsafe struct GLFWallocator { + private void* user; + //GLFWallocatefun allocate; private IntPtr allocate; @@ -207,34 +211,32 @@ namespace StgSharp.Graphics //GLFWreallocatefun reallocate; private IntPtr reallocate; - private void* user; - } [StructLayout(LayoutKind.Sequential)] public unsafe struct glfwMonitor { - private fixed byte name[128]; - private IntPtr userPointer; - - private int width, height; + private glfwVideomode* modes; private glfwWindow* window; - private glfwVideomode* modes; - private int modeCount; - private glfwVideomode currentMode; + private fixed byte name[128]; + private glfwGammaramp currentRamp; private glfwGammaramp originalRamp; - private glfwGammaramp currentRamp; + private glfwVideomode currentMode; + private int modeCount; + + private int width, height; + private IntPtr userPointer; public glfwMonitor() { } public unsafe string Name { - get + get { fixed (byte* cptr = name) { @@ -242,69 +244,73 @@ namespace StgSharp.Graphics } } } + } [StructLayout(LayoutKind.Sequential)] unsafe struct glfwWindow { + glfwWindow* next; - - // Window settings and state - int resizable; - int decorated; - int autoIconify; - int floating; - int focusOnShow; - int mousePassthrough; - int shouldClose; void* userPointer; - int doublebuffer; - // glfwVideomode videoMode; // 根据GLFWvidmode的定义转换 - IntPtr monitor; // _GLFWmonitor* monitor; - IntPtr cursor; // _GLFWcursor* cursor; - - int minwidth, minheight; - int maxwidth, maxheight; - int numer, denom; - - int stickyKeys; - int stickyMouseButtons; - int lockKeyMods; - int cursorMode; - public fixed byte mouseButtons[GLconst.GLFW_MOUSE_BUTTON_LAST + 1]; - public fixed byte keys[GLconst.GLFW_KEY_LAST + 1]; + bool rawMouseMotion; + Callbacks callbacks; // Virtual cursor position when cursor is disabled double virtualCursorPosX, virtualCursorPosY; - bool rawMouseMotion; + int autoIconify; + int cursorMode; + int decorated; + int doublebuffer; + int floating; + int focusOnShow; + int lockKeyMods; + int maxwidth, maxheight; - // _GLFWcontext context; // 根据_GLFWcontext的定义转换 + int minwidth, minheight; + int mousePassthrough; + int numer, denom; + + // Window settings and state + int resizable; + int shouldClose; + + int stickyKeys; + int stickyMouseButtons; + IntPtr cursor; // _GLFWcursor* cursor; + // glfwVideomode videoMode; // 根据GLFWvidmode的定义转换 + IntPtr monitor; // _GLFWmonitor* monitor; + public fixed byte keys[GLconst.GLFW_KEY_LAST + 1]; + public fixed byte mouseButtons[GLconst.GLFW_MOUSE_BUTTON_LAST + 1]; + + // _GLFWcontext viewPortDisplay; // 根据_GLFWcontext的定义转换 // Callbacks are represented as IntPtr since we don't need the actual function pointers in C# internal struct Callbacks { - internal IntPtr pos; - internal IntPtr size; - internal IntPtr close; - internal IntPtr refresh; - internal IntPtr focus; - internal IntPtr iconify; - internal IntPtr maximize; - internal IntPtr fbsize; - internal IntPtr scale; - internal IntPtr mouseButton; - internal IntPtr cursorPos; - internal IntPtr cursorEnter; - internal IntPtr scroll; - internal IntPtr key; + internal IntPtr character; internal IntPtr charmods; + internal IntPtr close; + internal IntPtr cursorEnter; + internal IntPtr cursorPos; internal IntPtr drop; - } - Callbacks callbacks; + internal IntPtr fbsize; + internal IntPtr focus; + internal IntPtr iconify; + internal IntPtr key; + internal IntPtr maximize; + internal IntPtr mouseButton; + internal IntPtr pos; + internal IntPtr refresh; + internal IntPtr scale; + internal IntPtr scroll; + internal IntPtr size; - // GLFW_PLATFORM_WINDOW_STATE platformWindowState; -} + } + + // GLFW_PLATFORM_WINDOW_STATE platformWindowState; + } [StructLayout(LayoutKind.Sequential)] @@ -345,9 +351,9 @@ namespace StgSharp.Graphics public unsafe struct GLFWinitconfig { - private int angleType; - private GLFWbool hatButtons; + + private int angleType; private int platformID; //PFN_vkGetInstanceProcAddr vulkanLoader; @@ -359,19 +365,20 @@ namespace StgSharp.Graphics public unsafe struct GLFWwndconfig { + private byte* title; + private GLFWbool autoIconify; private GLFWbool centerCursor; private GLFWbool decorated; private GLFWbool floating; private GLFWbool focused; private GLFWbool focusOnShow; - private int height; private GLFWbool maximized; private GLFWbool mousePassthrough; private GLFWbool resizable; private GLFWbool scaleToMonitor; - private byte* title; private GLFWbool visible; + private int height; private int width; private int xpos; @@ -437,19 +444,20 @@ namespace StgSharp.Graphics public unsafe struct GLFWctxconfig { - private int client; private GLFWbool debug; private GLFWbool forward; + private GLFWbool noerror; + + private int client; private int major; private int minor; - private GLFWbool noerror; private int profile; private int release; private int robustness; + private int source; //glfwWindow* share; private IntPtr share; - private int source; internal Nsgl nsgl = new Nsgl(); @@ -470,6 +478,11 @@ namespace StgSharp.Graphics public unsafe struct GLFWfbconfig { + private GLFWbool doublebuffer; + private GLFWbool sRGB; + private GLFWbool stereo; + private GLFWbool transparent; + private int accumAlphaBits; private int accumBlueBits; private int accumGreenBits; @@ -478,16 +491,12 @@ namespace StgSharp.Graphics private int auxBuffers; private int blueBits; private int depthBits; - private GLFWbool doublebuffer; private int greenBits; - private uintptr_t handle; private int redBits; private int samples; - private GLFWbool sRGB; private int stencilBits; - private GLFWbool stereo; - private GLFWbool transparent; + private uintptr_t handle; } @@ -495,37 +504,37 @@ namespace StgSharp.Graphics internal unsafe struct GLFWlibrary { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = GLconst.GLFW_JOYSTICK_LAST + 1)] + private GLFWjoystick[] joysticks = new GLFWjoystick[GLconst.GLFW_JOYSTICK_LAST + 1]; + private GLFWallocator allocator; + + private GLFWbool initialized; + + private GLFWbool joysticksInitialized; private GLFWls contextSlot; + private GLFWls errorSlot; + private GLFWmutex errorLock; + + private GLFWplatform platform; + + private int mappingCount; + + private int monitorCount; + //GLFWcursor* cursorListHead; private IntPtr cursorListHead; //GLFWerror* errorListHead; private IntPtr errorListHead; - private GLFWmutex errorLock; - - private GLFWls errorSlot; - - private GLFWbool initialized; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = GLconst.GLFW_JOYSTICK_LAST + 1)] - private GLFWjoystick[] joysticks = new GLFWjoystick[GLconst.GLFW_JOYSTICK_LAST + 1]; - - private GLFWbool joysticksInitialized; - - private int mappingCount; //GLFWmapping* mappings; private IntPtr mappings; - private int monitorCount; - //GLFWmonitor** monitors; private IntPtr monitors; - private GLFWplatform platform; - //glfwWindow* windowListHead; private IntPtr windowListHead; @@ -548,8 +557,8 @@ namespace StgSharp.Graphics private GLFWfbconfig framebuffer; private GLFWinitconfig init; - private int refreshRate; private GLFWwndconfig window; + private int refreshRate; } @@ -566,23 +575,36 @@ namespace StgSharp.Graphics internal unsafe struct Egl { + internal void* display; + + internal void* handle; + internal bool ANGLE_platform_angle; internal bool ANGLE_platform_angle_d3d; internal bool ANGLE_platform_angle_metal; internal bool ANGLE_platform_angle_opengl; internal bool ANGLE_platform_angle_vulkan; + internal bool EXT_client_extensions; + internal bool EXT_platform_base; + internal bool EXT_platform_wayland; + internal bool EXT_platform_x11; + internal bool EXT_present_opaque; + internal bool KHR_colorSpace; + internal bool KHR_context_flush_control; + + internal bool KHR_create_context; + internal bool KHR_create_context_no_error; + internal bool KHR_get_all_proc_addresses; + internal bool prefix; + internal int major, minor; + + internal int platform; internal IntPtr BindAPI; internal IntPtr CreateContext; internal IntPtr CreatePlatformWindowSurfaceEXT; internal IntPtr CreateWindowSurface; internal IntPtr DestroyContext; internal IntPtr DestroySurface; - internal void* display; - internal bool EXT_client_extensions; - internal bool EXT_platform_base; - internal bool EXT_platform_wayland; - internal bool EXT_platform_x11; - internal bool EXT_present_opaque; internal IntPtr GetConfigAttrib; internal IntPtr GetConfigs; @@ -591,20 +613,8 @@ namespace StgSharp.Graphics internal IntPtr GetPlatformDisplayEXT; internal IntPtr GetProcAddress; - - internal void* handle; internal IntPtr Initialize; - internal bool KHR_colorSpace; - internal bool KHR_context_flush_control; - - internal bool KHR_create_context; - internal bool KHR_create_context_no_error; - internal bool KHR_get_all_proc_addresses; - internal int major, minor; internal IntPtr MakeCurrent; - - internal int platform; - internal bool prefix; internal IntPtr QueryString; internal IntPtr SwapBuffers; internal IntPtr SwapInterval; @@ -615,6 +625,8 @@ namespace StgSharp.Graphics internal unsafe struct Osmesa { + private void* handle; + private IntPtr CreateContextAttribs; private IntPtr CreateContextExt; @@ -622,8 +634,6 @@ namespace StgSharp.Graphics private IntPtr GetColorBuffer; private IntPtr GetDepthBuffer; private IntPtr GetProcAddress; - - private void* handle; private IntPtr MakeCurrent; } @@ -631,17 +641,18 @@ namespace StgSharp.Graphics internal unsafe struct vk { + private void* handle; + private GLFWbool available; private GLFWbool EXT_metal_surface; - private fixed ulong extensions[2]; - private IntPtr GetInstanceProcAddr; - private void* handle; private GLFWbool KHR_surface; private GLFWbool KHR_wayland_surface; private GLFWbool KHR_win32_surface; private GLFWbool KHR_xcb_surface; private GLFWbool KHR_xlib_surface; private GLFWbool MVK_macos_surface; + private IntPtr GetInstanceProcAddr; + private fixed ulong extensions[2]; public vk() { @@ -664,12 +675,13 @@ namespace StgSharp.Graphics public unsafe struct GLFWmapelement { - private sbyte axisOffset; - private sbyte axisScale; private byte index; private byte type; + private sbyte axisOffset; + private sbyte axisScale; + } [StructLayout(LayoutKind.Sequential)] @@ -694,20 +706,21 @@ namespace StgSharp.Graphics public unsafe struct GLFWjoystick { - private GLFWbool allocated; private float* axes; + private byte* buttons; + private byte* hats; + private void* userPointer; + private fixed byte guid[33]; + private fixed byte name[128]; + + private GLFWbool allocated; + private GLFWbool connected; private int axisCount; private int buttonCount; - private byte* buttons; - private GLFWbool connected; - private fixed byte guid[33]; private int hatCount; - private byte* hats; //GLFWmapping* mapping; private IntPtr mapping; - private fixed byte name[128]; - private void* userPointer; // This is defined in platform.h // not completed in transforming @@ -730,12 +743,12 @@ namespace StgSharp.Graphics public unsafe struct GLFWplatform { + private int platformID; + // init //GLFWbool(*init)(void); private IntPtr init; - private int platformID; - //void (* terminate) (void); private IntPtr terminate; internal IntPtr createCursor; @@ -953,6 +966,9 @@ namespace StgSharp.Graphics [StructLayout(LayoutKind.Sequential)] internal struct GLsync { + + public IntPtr Handle; + } #endregion glad struct diff --git a/源代码/StgSharpDebug/Graphics/Define/glApiDefine.cs b/源代码/StgSharpDebug/Graphics/Define/glApiDefine.cs index 42b7b163..c71f8202 100644 --- a/源代码/StgSharpDebug/Graphics/Define/glApiDefine.cs +++ b/源代码/StgSharpDebug/Graphics/Define/glApiDefine.cs @@ -28,14 +28,6 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -/* - * This file is created to link functions in OpenGL to version in C# - * The name of delegates and organization to init all these delegates - * are refferd from GLAD1 in agreement of MIT license generated from - * https://glad.dav1d.de/ - */ - - using StgSharp.Math; using System; @@ -44,19 +36,22 @@ using System.Runtime.InteropServices; namespace StgSharp.Graphics { - #region StgSharpDele - - public unsafe delegate void FrameBufferSizeHandler(IntPtr window, uint width, uint height); - - #endregion - /// /// Function handler to load an opengl function by searching its name. /// /// the name of the Opengl function - /// An intptr value representing the pointer to the function + /// An Intptr value representing the pointer to the function public delegate IntPtr glLoader(string name); + #region StgSharpDele + + public unsafe delegate void FrameBufferSizeHandler(IntPtr window, uint width, uint height); + + public unsafe delegate void FramePositionHandler(IntPtr window, float width, float height); + + #endregion + + #region glDEBUG internal unsafe delegate void GLDEBUGPROC(int source, int type, uint id, int severity, int length, sbyte* message, void* userParam); diff --git a/源代码/StgSharpDebug/Graphics/Define/glConst.cs b/源代码/StgSharpDebug/Graphics/Define/glConst.cs index af825ad9..0e3c6f3b 100644 --- a/源代码/StgSharpDebug/Graphics/Define/glConst.cs +++ b/源代码/StgSharpDebug/Graphics/Define/glConst.cs @@ -31,7 +31,7 @@ using System; using System.Drawing; -namespace StgSharp.Graphics.GL +namespace StgSharp.Graphics.OpenGL { //rename types in style of GLconst @@ -4849,13 +4849,18 @@ namespace StgSharp.Graphics.GL public static class glAttachment { + + public const uint Depth = GLconst.DEPTH_ATTACHMENT; + public const uint DepthAndStencil = GLconst.DEPTH_STENCIL_ATTACHMENT; + public const uint Stencil = GLconst.STENCIL_ATTACHMENT; + private static int colorRange = - glFunc.GetMaskInteger((uint)GLconst.MAX_COLOR_ATTACHMENTS); + OpenGLFunction.CurrentGL.GetMaskInteger((uint)GLconst.MAX_COLOR_ATTACHMENTS); public static uint Color(int i) { #if DEBUG - if (i>colorRange||i<0) + if ((i > colorRange) || (i < 0)) { throw new ArgumentOutOfRangeException(); } @@ -4863,8 +4868,5 @@ namespace StgSharp.Graphics.GL return (uint)(GLconst.COLOR_ATTACHMENT0 + i); } - public const uint Depth = GLconst.DEPTH_ATTACHMENT; - public const uint Stencil = GLconst.STENCIL_ATTACHMENT; - public const uint DepthAndStencil = GLconst.DEPTH_STENCIL_ATTACHMENT; } } diff --git a/源代码/StgSharpDebug/Graphics/Define/glEnum.cs b/源代码/StgSharpDebug/Graphics/Define/glEnum.cs index f4005866..64f7c00d 100644 --- a/源代码/StgSharpDebug/Graphics/Define/glEnum.cs +++ b/源代码/StgSharpDebug/Graphics/Define/glEnum.cs @@ -30,9 +30,11 @@ //----------------------------------------------------------------------- -namespace StgSharp.Graphics.GL +using System.Runtime.CompilerServices; + +namespace StgSharp.Graphics.OpenGL { - public enum ImageChannelLayout + public enum PixelChannelLayout { UByte = GLconst.UNSIGNED_BYTE, Byte = GLconst.BYTE, @@ -41,20 +43,31 @@ namespace StgSharp.Graphics.GL UInt = GLconst.UNSIGNED_INT, Int = GLconst.INT, Float = GLconst.FLOAT, - UByte332 = 0x8032, // GL_UNSIGNED_BYTE_3_3_2 - UByte233Rev = 0x8362, // GL_UNSIGNED_BYTE_2_3_3_REV - UShort565 = 0x8363, // GL_UNSIGNED_SHORT_5_6_5 - UShort565Rev = 0x8364, // GL_UNSIGNED_SHORT_5_6_5_REV - UShort4444 = 0x8033, // GL_UNSIGNED_SHORT_4_4_4_4 - UShort4444Rev = 0x8034, // GL_UNSIGNED_SHORT_4_4_4_4_REV - UShort5551 = 0x8035, // GL_UNSIGNED_SHORT_5_5_5_1 - UShort1555Rev = 0x8366, // GL_UNSIGNED_SHORT_1_5_5_5_REV - UInt8888 = 0x8035, // GL_UNSIGNED_INT_8_8_8_8 - UInt8888Rev = 0x8367, // GL_UNSIGNED_INT_8_8_8_8_REV - UInt1010102 = 0x8036, // GL_UNSIGNED_INT_10_10_10_2 - UInt2101010Rev = 0x8368 // GL_UNSIGNED_INT_2_10_10_10_REV + UByte332 = GLconst.UNSIGNED_BYTE_3_3_2, + UByte233Rev = GLconst.UNSIGNED_BYTE_2_3_3_REV, + UShort565 = GLconst.UNSIGNED_SHORT_5_6_5, + UShort565Rev = GLconst.UNSIGNED_SHORT_5_6_5_REV, + UShort4444 = GLconst.UNSIGNED_SHORT_4_4_4_4, + UShort4444Rev = GLconst.UNSIGNED_SHORT_4_4_4_4_REV, + UShort5551 = GLconst.UNSIGNED_SHORT_5_5_5_1, + UShort1555Rev = GLconst.UNSIGNED_SHORT_1_5_5_5_REV, + UInt8888 = GLconst.UNSIGNED_INT_8_8_8_8, + UInt8888Rev = GLconst.UNSIGNED_INT_8_8_8_8_REV, + UInt1010102 = GLconst.UNSIGNED_INT_10_10_10_2, + UInt2101010Rev = GLconst.UNSIGNED_INT_2_10_10_10_REV } + public enum FrameBufferStatus + { + Complete = GLconst.FRAMEBUFFER_COMPLETE, // GL_FRAMEBUFFER_COMPLETE + IncompleteAttachment = GLconst.FRAMEBUFFER_INCOMPLETE_ATTACHMENT, // GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT + IncompleteMissingAttachment = GLconst.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT, // GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT + IncompleteDrawBuffer = GLconst.FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER, // GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER + IncompleteReadBuffer = GLconst.FRAMEBUFFER_INCOMPLETE_READ_BUFFER, // GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER + Unsupported = GLconst.FRAMEBUFFER_UNSUPPORTED, // GL_FRAMEBUFFER_UNSUPPORTED + IncompleteMultisample = GLconst.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE, // GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE + IncompleteLayerTargets = GLconst.FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS // GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS + } internal enum VkStructureType : uint { @@ -81,6 +94,12 @@ namespace StgSharp.Graphics.GL BGRA = GLconst.BGRA } + public enum FrameBufferAttachment + { + Color = GLconst.COLOR_ATTACHMENT0, + Depth = GLconst.DEPTH_ATTACHMENT, + Stencil = GLconst.STENCIL_ATTACHMENT, + } public enum Texture2DTarget { diff --git a/源代码/StgSharpDebug/Graphics/Define/glType.cs b/源代码/StgSharpDebug/Graphics/Define/glType.cs index 1b8f5e21..b8a101ca 100644 --- a/源代码/StgSharpDebug/Graphics/Define/glType.cs +++ b/源代码/StgSharpDebug/Graphics/Define/glType.cs @@ -103,7 +103,6 @@ namespace StgSharp.Graphics internal unsafe delegate void GLFWkeyfun(glfwWindow* window, int key, int scancode, int action, int mods); internal unsafe delegate void GLFWjoystickfun(int jid, int keyevent); public unsafe delegate void GLFWglproc(); - internal unsafe delegate void FramebuffersizeHandler(IntPtr window, int width, int height); //window is the pointer to a glfwWindow instance internal unsafe delegate void GLFWerrorfun(int error_code, sbyte* description); internal unsafe delegate void GLFWdropfun(glfwWindow* window, int path_count, sbyte*[] paths); internal unsafe delegate void GLFWcursorposfun(glfwWindow* window, double xpos, double ypos); diff --git a/源代码/StgSharpDebug/Graphics/GL/Buffer/FBO.cs b/源代码/StgSharpDebug/Graphics/GL/Buffer/FBO.cs deleted file mode 100644 index 3e5cd70f..00000000 --- a/源代码/StgSharpDebug/Graphics/GL/Buffer/FBO.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Graphics.GL -{ -#pragma warning disable CA1008 -#pragma warning disable CA1028 - public enum FrameBufferTarget:uint -#pragma warning restore CA1028 -#pragma warning restore CA1008 - { - Read = GLconst.READ_FRAMEBUFFER, - All = GLconst.FRAMEBUFFER, - Draw = GLconst.DRAW_FRAMEBUFFER, - } - - public class FrameBuffer : BufferObjectBase - { - internal unsafe FrameBuffer(int count, glRenderStream contextBinding) - { - binding = contextBinding; - _bufferHandle = new glHandleSet(count); - ((GLcontext*)binding.ContextHandle)->glGenFramebuffers((uint)count,_bufferHandle.handle); - } - - /// - /// Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. - /// will be set as default target. - /// - /// Index of object to be binded in handle set - public unsafe override void Bind(int index) - { - glFunc.BindFrameBuffer(FrameBufferTarget.All,_bufferHandle[index]); - } - - public static void BindNull() - { - glFunc.BindFrameBuffer(FrameBufferTarget.All,glHandle.Zero); - } - - /// - /// Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. - /// Target of this frame buffer should be set manually. - /// - /// The frame buffer target of the binding operation. - /// Index of object to be binded in handle set - public unsafe void Bind(FrameBufferTarget target, int index) - { - ((GLcontext*)binding.ContextHandle)->glBindFramebuffer((uint)target, _bufferHandle[index].Value); - } - - protected override void Dispose(bool disposing) - { - throw new NotImplementedException(); - } - } -} diff --git a/源代码/StgSharpDebug/Graphics/GL/Buffer/RBO.cs b/源代码/StgSharpDebug/Graphics/GL/Buffer/RBO.cs deleted file mode 100644 index 07604119..00000000 --- a/源代码/StgSharpDebug/Graphics/GL/Buffer/RBO.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Security.Principal; -using System.Text; - - -namespace StgSharp.Graphics.GL -{ - - - - public class RenderBuffer : BufferObjectBase - { - public RenderBuffer(int count, glRenderStream binding) - { - this.binding = binding; - _bufferHandle = glFunc.GenRenderBuffer(count); - } - - public override void Bind(int index) - { - glFunc.BindRenderBuffer(this[index]); - } - - protected override void Dispose(bool disposing) - { - throw new NotImplementedException(); - } - - public void Store(RenderBufferInternalFormat format, (int width,int height) size) - { - if (size.width > binding.Width || size.height>binding.Height) - { - StgSharp.LogWarning("FrameBuffer is larger than current canvas binding"); - } - } - } -} diff --git a/源代码/StgSharpDebug/Graphics/GL/Buffer/TextureGL.cs b/源代码/StgSharpDebug/Graphics/GL/Buffer/TextureGL.cs deleted file mode 100644 index 680d99d8..00000000 --- a/源代码/StgSharpDebug/Graphics/GL/Buffer/TextureGL.cs +++ /dev/null @@ -1,155 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="texture.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Graphics.GL -{ - public unsafe class TextureGL - { - - internal static bool[] unitActivated = new bool[16]; - private IntPtr binding; - internal glHandleSet _textureHandle; - internal Image[] sourceList; - - public glHandle this[int index] - { - get => _textureHandle[index]; - } - - internal TextureGL(int n, glRenderStream binding) - { - sourceList = new Image[n]; - this.binding = binding.ContextHandle; - _textureHandle = glFunc.GenTextures(n); - } - - public static void Activate(TextureUnit unit) - { - glFunc.ActiveTexture((uint)unit); - } - - public void Bind2D(int index) - { - glFunc.BindTexture(GLconst.TEXTURE_2D, _textureHandle[index]); - } - - /// - /// - /// - /// - public unsafe void LoadTexture(int index, Image i) - { - sourceList[index] = i; - glArrayHandle handle = sourceList[index].GetArrayHandle(); - glFunc.TextureImage2d( - Texture2DTarget.Texture2D, 0, (uint)i.Channel, - (uint)sourceList[index].Width, (uint)sourceList[index].Height, - (uint)i.Channel, ImageChannelLayout.Byte, - pixelArrayHandle: handle - ); - handle.Release(); - } - - - #region texture setting - - public void Set2dFilterProperty( - Filter onMinify, Filter onMagnify) - { - glFunc.TextureParameter(GLconst.TEXTURE_2D, GLconst.TEXTURE_MIN_FILTER, (int)onMinify); - glFunc.TextureParameter(GLconst.TEXTURE_2D, GLconst.TEXTURE_MAG_FILTER, (int)onMagnify); - } - - public void Set2dWrapProperty( - Wrap onHorizontial, Wrap onVertical) - { - glFunc.TextureParameter(GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_S, (int)onHorizontial); - glFunc.TextureParameter(GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_T, (int)onVertical); - } - - #endregion texture setting - - - } - -#pragma warning disable CA1008 - public enum Filter -#pragma warning restore CA1008 - { - Nearest = GLconst.NEAREST, - Linear = GLconst.LINEAR, - NearestLinearMipmap = GLconst.NEAREST_MIPMAP_LINEAR, - LinearLinearMipmap = GLconst.LINEAR_MIPMAP_LINEAR, - NearestNearestMipmap = GLconst.NEAREST_MIPMAP_NEAREST, - LinearNearestMipmap = GLconst.LINEAR_MIPMAP_NEAREST, - } - -#pragma warning disable CA1008 - public enum TextureUnit -#pragma warning restore CA1008 - { - Unit0 = GLconst.TEXTURE0, - Unit1 = GLconst.TEXTURE1, - Unit2 = GLconst.TEXTURE2, - Unit3 = GLconst.TEXTURE3, - Unit4 = GLconst.TEXTURE4, - Unit5 = GLconst.TEXTURE5, - Unit6 = GLconst.TEXTURE6, - Unit7 = GLconst.TEXTURE7, - Unit8 = GLconst.TEXTURE8, - Unit9 = GLconst.TEXTURE9, - Unit10 = GLconst.TEXTURE10, - Unit11 = GLconst.TEXTURE11, - Unit12 = GLconst.TEXTURE12, - Unit13 = GLconst.TEXTURE13, - Unit14 = GLconst.TEXTURE14, - Unit15 = GLconst.TEXTURE15, - } - -#pragma warning disable CA1008 - public enum Wrap -#pragma warning restore CA1008 - { - Repeat = GLconst.REPEAT, - MirroredRepeat = GLconst.MIRRORED_REPEAT, - ClampToEdge = GLconst.CLAMP_TO_EDGE, - ClampToBorder = GLconst.CLAMP_TO_BORDER, - } -} \ No newline at end of file diff --git a/源代码/StgSharpDebug/Graphics/GL/Buffer/VBO.cs b/源代码/StgSharpDebug/Graphics/GL/Buffer/VBO.cs deleted file mode 100644 index 27c3d774..00000000 --- a/源代码/StgSharpDebug/Graphics/GL/Buffer/VBO.cs +++ /dev/null @@ -1,155 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="VBO.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Graphics.GL; -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Net.Security; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; - -namespace StgSharp.Graphics.GL -{ - public unsafe class VertexBuffer : BufferObjectBase - { - - internal VertexBuffer(int n, glRenderStream binding) - { - this.binding = binding; - _bufferHandle = glFunc.GenBuffers(n); - } - - public override sealed void Bind(int index) - { - glFunc.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); - } - - /// - /// Set data to current vertex buffer object - /// - /// Type of bufferData - /// Index to find certain VBO in this instance - /// Data to write in - /// How OpenGL use these data, defined by - public void WriteMatrixData(int index, T bufferData, BufferUsage usage) - where T : struct, IMat - { - glFunc.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferData(BufferType.ArrayBuffer, bufferData, usage); - } - - /// - /// Set data to current vertex buffer object - /// - /// Type of bufferData - /// Index to find certain VBO in this instance - /// Data to write in - /// How OpenGL use these data, defined by - public void WriteScalerData(int index, T[] bufferArray, BufferUsage usage) - where T : struct, -#if NET8_0_OR_GREATER - INumber -#else - IConvertible -#endif - { - glFunc.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferData(BufferType.ArrayBuffer, bufferArray, usage); - } - - /// - /// Set data to current vertex buffer object - /// - /// Type of bufferData - /// Index to find certain VBO in this instance - /// A of data to write in - /// How OpenGL use these data, defined by - public void WriteScalerData(int index, ReadOnlySpan scalerSpan, BufferUsage usage) - where T : struct, -#if NET8_0_OR_GREATER - INumber -#else - IConvertible -#endif - { - glFunc.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferData(BufferType.ArrayBuffer, scalerSpan, usage); - } - - /// - /// Set data to current vertex buffer object - /// - /// Type of bufferData - /// Index to find certain VBO in this instance - /// A of data to write in - /// How OpenGL use these data, defined by - public void WriteVectorData(int index, ReadOnlySpan vectorSpan, BufferUsage usage) where T : struct, IVector - { - glFunc.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferVectorData(BufferType.ArrayBuffer, vectorSpan, usage); - } - - /// - /// Set data to current vertex buffer object - /// - /// Type of bufferData - /// Index to find certain VBO in this instance - /// A array of data to write in - /// How OpenGL use these data, defined by - public void WriteVectorData(int index, T[] vectorArray, BufferUsage usage) where T : struct, IVector - { - glFunc.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferVectorData(BufferType.ArrayBuffer, vectorArray, usage); - } - - /// - /// - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Unbind() - { - glFunc.BindBuffer(BufferType.ArrayBuffer, glHandle.Zero); - } - - protected override sealed void Dispose(bool disposing) - { - if (disposing) - { - glFunc.DeleteBuffers(_bufferHandle); - _bufferHandle.Release(); - } - } - - } -} \ No newline at end of file diff --git a/源代码/StgSharpDebug/Graphics/GL/GLhandle.cs b/源代码/StgSharpDebug/Graphics/GL/GLhandle.cs deleted file mode 100644 index 449ac9f7..00000000 --- a/源代码/StgSharpDebug/Graphics/GL/GLhandle.cs +++ /dev/null @@ -1,362 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="GLhandle.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Data.Common; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Versioning; -using System.Security.AccessControl; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Graphics -{ - /// - /// A handle to an OpenGL object, - /// must be indexed from a . - /// Direct call will cause - /// - public unsafe class glHandle: IDisposable - { - private static uint* zeroHandle = (uint*)Marshal.AllocHGlobal(Marshal.SizeOf()); - - internal uint* source; - internal uint* valuePtr; - - private glHandle(IntPtr handle) - { - this.valuePtr = (uint*)handle; - source = (uint*)0; - } - - private glHandle(uint value) - { - source = (uint*)0; - valuePtr = (uint*)Marshal.AllocHGlobal(sizeof(uint)); - *valuePtr = value; - } - - internal glHandle(uint* val, glHandleSet set) - { - source = set!=null ? set!.handle:(uint*)0; - valuePtr = val; - } - - [Obsolete("Cannot init instance of this type", true)] - public glHandle() - { - } - - public IntPtr Handle - { - get=> (IntPtr)valuePtr; - } - - public bool IsIsolated - { - get => source == (uint*)0; - } - - public uint Value - { - get => *valuePtr; - set => *valuePtr = value; - } - - public static glHandle ZeroHandle => FromPtr(IntPtr.Zero); - - public static glHandle Zero => Alloc(0); - - public static glHandle Alloc(uint value) - { - return new glHandle(value); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static glHandle FromPtr(IntPtr p) - { - return new glHandle(p); - } - - ~glHandle() - { - if (valuePtr != zeroHandle && IsIsolated) - { - Marshal.FreeHGlobal((IntPtr)valuePtr); - } - } - - protected virtual void Dispose(bool disposing) - { - if (IsIsolated) - { - GCHandle.FromIntPtr((IntPtr)valuePtr).Free(); - if (disposing) - { - } - - } - } - - // - // ~glHandle() - // { - // Dispose(disposing: false); - // } - - public void Dispose() - { - Dispose(disposing: true); - GC.SuppressFinalize(this); - } - } - - public unsafe class glSHandle - { - private static int* zeroHandle = (int*)Marshal.AllocHGlobal(Marshal.SizeOf()); - - internal int* source; - internal int* valuePtr; - - private glSHandle(IntPtr handle) - { - this.valuePtr = (int*)handle; - source = (int*)0; - } - - private glSHandle(int value) - { - source = (int*)0; - valuePtr = (int*)Marshal.AllocHGlobal(sizeof(int)); - *valuePtr = value; - } - - internal glSHandle(int* val, glHandleSet set) - { - source = set != null ? (int*)set!.handle : (int*)0; - valuePtr = val; - } - - - [Obsolete("Cannot init instance of this type", true)] - public glSHandle() - { - } - - public IntPtr Handle - { - get => (IntPtr)valuePtr; - } - - public bool IsIsolated - { - get => source == (uint*)0; - } - - public int Value - { - get => *valuePtr; - set => *valuePtr = value; - } - - public static glSHandle Zero => Alloc(0); - - public static glSHandle Alloc(int value) - { - return new glSHandle(value); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static glSHandle FromPtr(IntPtr p) - { - return new glSHandle(p); - } - - ~glSHandle() - { - if (valuePtr != zeroHandle && IsIsolated) - { - Marshal.FreeHGlobal((IntPtr)valuePtr); - } - } - - } - - public unsafe class glArrayHandle - { - internal readonly Array a; - internal GCHandle handle; - private bool disposedValue; - - internal glArrayHandle(Array array) - { - this.a = array; - handle = GCHandle.Alloc(array, GCHandleType.Pinned); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public IntPtr AddressOfArray() - { - if (handle != default) - { - return handle.AddrOfPinnedObject(); - } - else - { - throw new InvalidOperationException(); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static glArrayHandle Alloc(T[] array) where T : struct - { - return new glArrayHandle(array); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static glArrayHandle CopyAlloc(T[] array) where T : struct - { - Array copy = new T[array.Length]; - array.CopyTo(copy, 0); - return new glArrayHandle(copy); - } - - public void Release() - { - handle.Free(); - handle = default; - } - } - - /// - /// A handle to an OpenGL object. - /// - public unsafe class glHandleSet - { - - private readonly uint[] _value; - internal uint* handle; - internal int length; - - public glHandleSet(int count) - { - _value = new uint[count]; - length = count; - handle = (uint*)GCHandle.Alloc(_value, GCHandleType.Pinned).AddrOfPinnedObject(); - } - - public IntPtr Handle - { - get => (IntPtr)handle; - } - - public glHandle this[int index] - { - get - { - if (index > length) - { - throw new IndexOutOfRangeException(); - } - return new glHandle(handle + index, this); - } - } - - public glSHandle this[uint index] - { - get - { - if (index > length) - { - throw new IndexOutOfRangeException(); - } - return new glSHandle(((int*)handle) + index, this); - } - } - - public static void Copy(in glHandleSet source, glHandleSet target) - { - if ((source == null) || (target == null)) - { - throw new NullReferenceException(); - } - if (source.length != target.length) - { - throw new Exception($"Lengths of {nameof(source)} and {nameof(target)} are not equal."); - } - for (int i = 0; i < source.length; i++) - { - target._value[i] = source._value[i]; - } - } - - public void Pin() - { - if (_value == null) - { - return; - } - handle = (uint*)GCHandle.Alloc(_value, GCHandleType.Pinned).AddrOfPinnedObject(); - } - - /// - /// Release all resource in this handle. - /// This will release all resource in this . - /// This will be not usable. - /// - public void Release() - { - if (_value == null) - { - return; - } - else - { - GCHandle.FromIntPtr((IntPtr)handle).Free(); - handle = (uint*)IntPtr.Zero; - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void SetValue(int index, uint value) - { - _value[index] = value; - } - - ~glHandleSet() - { - - } - } -} \ No newline at end of file diff --git a/源代码/StgSharpDebug/Graphics/GL/ShaderEdit/IglConvertable.cs b/源代码/StgSharpDebug/Graphics/GL/ShaderEdit/IglConvertable.cs deleted file mode 100644 index 55c678dc..00000000 --- a/源代码/StgSharpDebug/Graphics/GL/ShaderEdit/IglConvertable.cs +++ /dev/null @@ -1,35 +0,0 @@ -using StgSharp.Graphics.GL; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Graphics.ShaderEdit -{ - public interface IglConvertable - { - /// - /// - /// - public void SetAllUniforms(); - - /// - /// - /// - public void GainAllUniforms(ShaderProgram source, params string[] uniformName); - - /// - /// - /// - public void DisplayGLtypeDefinition(); - - /// - /// - /// - /// - public ShaderStruct GetConvertedGLtype(); - - } -} diff --git a/源代码/StgSharpDebug/Graphics/GL/ShaderEdit/Shader.cs b/源代码/StgSharpDebug/Graphics/GL/ShaderEdit/Shader.cs deleted file mode 100644 index 39b6a020..00000000 --- a/源代码/StgSharpDebug/Graphics/GL/ShaderEdit/Shader.cs +++ /dev/null @@ -1,264 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="Shader.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp; -using StgSharp.Data; - -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; -using System.Xml.Linq; - -namespace StgSharp.Graphics.GL -{ - public abstract partial class glRenderStream : RenderStream - { - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected sealed override Shader CreateShaderSegment(ShaderType type, int count) - { - return new Shader( glFunc.CreateShaderSet(count, type), type); - } - /// - /// Create an instance of program - /// - /// New instance of instance. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected sealed override ShaderProgram CreateShaderProgram() - { - return new ShaderProgram(this); - } - } - - public class Shader : ISSDSerializable - { - - private readonly IntPtr context; - internal readonly glHandleSet handle; - public readonly ShaderType type; - - public SerializableTypeCode SSDTypeCode => SerializableTypeCode.Shader; - - internal unsafe Shader(glHandleSet handle, ShaderType usage) - { - this.handle = handle; - context = glFunc.CurrentContextHandle; - type = usage; - } - - /// - /// Attach one shader code to a shader program. - /// - /// Shader program to attach - /// Index of shader code in current shader code set. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void AttachTo(int index, ShaderProgram target) - { - glFunc.AttachShader(target.handle, handle[index]); - } - - public static byte[] FromCodeFile(string fileRoute) - { - string str = File.ReadAllText(fileRoute); - if (string.IsNullOrEmpty(str)) - { - throw new InvalidOperationException($"Cannot load and GLSL code from {fileRoute}"); - } - return Encoding.UTF8.GetBytes(str); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe void Compile(int index, byte[] codeStream) - { - if (codeStream == null) - { - throw new ArgumentNullException(nameof(codeStream)); - } - glFunc.LoadShaderSource(handle[index], codeStream); - glFunc.CompileShader(handle[index]); - CheckStatus(index,ShaderStatus.CompileStatus); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe void Compile(int index, string codeStream) - { - if (codeStream == null) - { - throw new ArgumentNullException(nameof(codeStream)); - } - glFunc.LoadShaderSource(handle[index],Encoding.ASCII.GetBytes( codeStream)); - glFunc.CompileShader(handle[index]); - CheckStatus(index, ShaderStatus.CompileStatus); - } - - public override string ToString() - { - return $"This is a {type} shader, its shader handles are {handle.ToString()}."; - } - - public byte[] GetBytes() - { - return Array.Empty(); - } - - public void CheckStatus(int index, ShaderStatus status) - { - string log = glFunc.GetShaderStatus(this,index, (int)status); - if (!string.IsNullOrEmpty(log)) - { - throw new Exception($"Shader Error \t{status}\n" + log); - } - } - - public byte[] GetBytes(out int length) - { - throw new NotImplementedException(); - } - - public void FromBytes(byte[] stream) - { - throw new NotImplementedException(); - } - } - - public enum ShaderStatus : int - { - CompileStatus = GLconst.COMPILE_STATUS, - } - - public class ShaderProgram - { - private readonly IntPtr binding; - internal readonly glHandle handle; - - /// - /// Init a program with no shader attached. - /// - internal unsafe ShaderProgram(glRenderStream binding) - { - this.binding = binding.ContextHandle; - handle = glFunc.CreateProgram(); - } - - /// - /// Get a uniform form current shader, - /// the value type of the uniform should be provided. - /// - /// ContextName of the Uniform in shader code - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe Uniform GetUniform(string name) where T : struct - { - return new Uniform(this, name, binding); - } - - /// - /// Get a uniform form current shader, - /// the value type of the uniform should be provided. - /// - /// ContextName of the Uniform in shader code - /// - public unsafe Uniform GetUniform(string name) - where T : struct - where U : struct - { - return new Uniform(this, name, binding); - } - - /// - /// Get a uniform form current shader, - /// the value type of the uniform should be provided. - /// - /// ContextName of the Uniform in shader code - /// - public unsafe Uniform GetUniform(string name) - where T : struct - where U : struct - where V : struct - { - return new Uniform(this, name); - } - /// - /// Get a uniform form current shader, - /// the value type of the uniform should be provided. - /// - /// ContextName of the Uniform in shader code - /// - public unsafe Uniform GetUniform(string name) - where T : struct - where U : struct - where V : struct - where W : struct - { - return new Uniform(this, name); - } - - /// - /// Link the shader to current context. - /// - public unsafe void Link() - { - if (InternalIO.InternalLinkShaderProgram((GLcontext*)this.binding, handle.Value) == 0) - { - IntPtr logPtr = InternalIO.InternalReadSSCLog(); - try - { - byte[] logByte = new byte[512]; - Marshal.Copy(logPtr, logByte, 0, 512); - string log = Encoding.UTF8.GetString(logByte); - log = log.Replace("\0", string.Empty); - InternalIO.InternalWriteLog(log, LogType.Error); - } - catch (Exception ex) - { - InternalIO.InternalWriteLog(ex.Message, LogType.Error); - } - } - } - - /// - /// Let the current context use this shader. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe void Use() - { - glFunc.UseProgram(handle); - } - - ~ShaderProgram() - { - //handle.Dispose(); - } - - } -} \ No newline at end of file diff --git a/源代码/StgSharpDebug/Graphics/GL/ShaderEdit/Uniform.cs b/源代码/StgSharpDebug/Graphics/GL/ShaderEdit/Uniform.cs deleted file mode 100644 index 84ae1faa..00000000 --- a/源代码/StgSharpDebug/Graphics/GL/ShaderEdit/Uniform.cs +++ /dev/null @@ -1,257 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="Uniform.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Graphics; -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; - -namespace StgSharp.Graphics.GL -{ - public class Uniform - { - protected IntPtr binding; - internal glSHandle id; - - - public glSHandle Handle - { - get => id; - } - } - - public sealed class Uniform : Uniform - where T : struct - { - - internal unsafe Uniform(glSHandle id) - { - this.id = id; - } - - internal unsafe Uniform( - ShaderProgram program, string name, glRenderStream binding) - { - this.binding = binding.ContextHandle; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal unsafe Uniform( - ShaderProgram program, string name, IntPtr binding) - { - this.binding = binding; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal Uniform() - { - - } - - internal static Uniform FromHandle(glSHandle handle) - { - return new Uniform() { id = handle }; - } - - } - - public sealed class Uniform: Uniform - where T : struct - where U : struct - { - - internal unsafe Uniform(glSHandle id) - { - this.id = id; - } - - internal unsafe Uniform( - ShaderProgram program, string name, glRenderStream binding) - { - this.binding = binding.ContextHandle; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal unsafe Uniform( - ShaderProgram program, string name, IntPtr binding) - { - this.binding = binding; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal Uniform() - { - - } - - internal static Uniform FromHandle(glSHandle handle) - { - return new Uniform() { id = handle }; - } - - } - - public sealed class Uniform:Uniform - where T : struct - where U : struct - where V : struct - { - - internal unsafe Uniform(glSHandle id) - { - this.id = id; - } - - internal unsafe Uniform( - ShaderProgram program, string name) - { - this.binding = glFunc.CurrentContextHandle; - id = glFunc.GetUniformLocation(program.handle, name); - } - - public unsafe Uniform(ShaderProgram program, string name, glRenderStream binding) - { - this.binding = binding.ContextHandle; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal Uniform() - { - - } - - internal static Uniform FromHandle(glSHandle handle) - { - return new Uniform() { id = handle }; - } - - } - - public sealed class Uniform:Uniform - where T : struct - where U : struct - where V : struct - where W : struct - { - - - internal unsafe Uniform(glSHandle id) - { - this.id = id; - } - - internal unsafe Uniform(ShaderProgram program, string name, glRenderStream binding) - { - this.binding = binding.ContextHandle; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal unsafe Uniform( - ShaderProgram program, string name) - { - this.binding = glFunc.CurrentContextHandle; - id = glFunc.GetUniformLocation(program.handle, name); - } - - internal Uniform() - { - - } - - internal static Uniform FromHandle(glSHandle handle) - { - return new Uniform() { id = handle }; - } - - } - - internal static partial class glFunc - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe static void SetUniformValue - (Uniform uniform, Matrix44 mat) - { - Matrix44 temp = mat; - Context.glUniformMatrix4fv(uniform.id.Value, 1, false, (float*)&temp); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe static void SetUniformValue(Uniform uniform, vec4d vec) - { - vec4d temp = vec; - Context.glUniform1fv(uniform.id.Value , 4, &temp); - } - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe static void SetUniformValue(Uniform uniform, vec4d vec) - { - vec4d temp = vec; - Context.glUniform1fv(uniform.id.Value , 4, &temp); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetUniformValue(Uniform uniform, float v0) - { - Context.glUniform1f(uniform.id.Value , v0); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetUniformValue(Uniform uniform, int i0) - { - Context.glUniform1i(uniform.id.Value , i0); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetUniformValue(Uniform uniform, float v0, float v1) - { - Context.glUniform2f(uniform.id.Value , v0, v1); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetUniformValue(Uniform uniform, float v0, float v1, float v2) - { - Context.glUniform3f(uniform.id.Value , v0, v1, v2); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetUniformValue(Uniform uniform, float v0, float v1, float v2, float v3) - { - Context.glUniform4f(uniform.id.Value , v0, v1, v2, v3); - } - - } - -} \ No newline at end of file diff --git a/源代码/StgSharpDebug/Graphics/GL/glApiManager.cs b/源代码/StgSharpDebug/Graphics/GL/glApiManager.cs deleted file mode 100644 index 041968dd..00000000 --- a/源代码/StgSharpDebug/Graphics/GL/glApiManager.cs +++ /dev/null @@ -1,1967 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="glApiManager.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; - -namespace StgSharp.Graphics.GL -{ - public static partial class glManager - { - - private const int glExtension = 0x1f03; - private const int glVersion = 0x1f02; - - private static readonly string[] glBranch = - new string[] { - "OpenGL ES-CM ", - "OpenGL ES-CL ", - "OpenGL ES ", - "OpenGL SC " - }; - - private static string glExtensionList; - - /// - /// Load all supported OpenGL APIs and bind them to given context. - /// - /// The used as current OpenGL context - public static unsafe void LoadGLapi(this ViewPort vp) - { - GLcontext* context = (GLcontext*)vp.GraphicHandle; - delegate* loader = &InternalIO.glfwGetProcAddress; -#pragma warning disable CS8909 - if (context->glGetString != (delegate*)IntPtr.Zero) -#pragma warning restore CS8909 - { - return; - } - IntPtr proc = loader("glGetString"); - if (proc == IntPtr.Zero) - { -#if DEBUG - Console.WriteLine("Cannot load glFunc."); -#endif - throw new Exception("Cannot load gl"); - } - context->glGetString = (delegate*)proc; - - string coreVersion; - if (context->glGetString(glVersion) == IntPtr.Zero) - { - InternalIO.InternalWriteLog("Failed to call glGetString", LogType.Error); - } - coreVersion = Marshal.PtrToStringAnsi(context->glGetString(glVersion)); - - foreach (string branch in glBranch) - { - if (coreVersion.Contains(branch)) - { - coreVersion.Replace(branch, string.Empty); - } - } - string[] versionSep = coreVersion!.Split('.'); - int majorVersion = int.Parse(versionSep[0]); - int minorVersion = int.Parse(versionSep[1]); - CheckCoreVersion(majorVersion, minorVersion); - - try - { - #region load_core_gl - - LoadGLcore10(context, loader); - LoadGLcore11(context, loader); - LoadGLcore12(context, loader); - LoadGLcore13(context, loader); - LoadGLcore14(context, loader); - LoadGLcore15(context, loader); - LoadGLcore20(context, loader); - LoadGLcore21(context, loader); - LoadGLcore30(context, loader); - LoadGLcore31(context, loader); - LoadGLcore32(context, loader); - LoadGLcore33(context, loader); - LoadGLcore40(context, loader); - LoadGLcore41(context, loader); - LoadGLcore42(context, loader); - LoadGLcore43(context, loader); - LoadGLcore44(context, loader); - LoadGLcore45(context, loader); - LoadGLcore46(context, loader); - - #endregion load_core_gl - } - catch (Exception ex) - { - if (ex.Message != "Final Version") - { - throw; - } - } - - IntPtr strPtr = context->glGetString(glExtension); - string extension; - if (strPtr == IntPtr.Zero) - { - InternalIO.InternalWriteLog("No supported OpenGL extensions are found.", LogType.Info); - return; - } - else - { - extension = Marshal.PtrToStringAnsi(strPtr); - } - - List extensions = - extension.Split(" ").ToList(); - - #region checkGLextensions - - if (extensions.Contains("gl_4DFX_multisample")) { _4DFX_multisample = true; extensions.Remove("gl_4DFX_multisample"); } - if (extensions.Contains("gl_3DFX_tbuffer")) { _3DFX_tbuffer = true; extensions.Remove("gl_3DFX_tbuffer"); } - if (extensions.Contains("gl_3DFX_texture_compression_FXT1")) { _3DFX_texture_compression_FXT1 = true; extensions.Remove("gl_3DFX_texture_compression_FXT1"); } - if (extensions.Contains("gl_AMD_blend_minmax_factor")) { AMD_blend_minmax_factor = true; extensions.Remove("glAMD_blend_minmax_factor"); } - if (extensions.Contains("gl_AMD_conservative_depth")) { AMD_conservative_depth = true; extensions.Remove("glAMD_conservative_depth"); } - if (extensions.Contains("gl_AMD_debug_output")) { AMD_debug_output = true; extensions.Remove("glAMD_debug_output"); } - if (extensions.Contains("gl_AMD_depth_clamp_separate")) { AMD_depth_clamp_separate = true; extensions.Remove("glAMD_depth_clamp_separate"); } - if (extensions.Contains("gl_AMD_draw_buffers_blend")) { AMD_draw_buffers_blend = true; extensions.Remove("glAMD_draw_buffers_blend"); } - if (extensions.Contains("gl_AMD_framebuffer_multisample_advanced")) { AMD_framebuffer_multisample_advanced = true; extensions.Remove("glAMD_framebuffer_multisample_advanced"); } - if (extensions.Contains("gl_AMD_framebuffer_sample_positions")) { AMD_framebuffer_sample_positions = true; extensions.Remove("glAMD_framebuffer_sample_positions"); } - if (extensions.Contains("gl_AMD_gcn_shader")) { AMD_gcn_shader = true; extensions.Remove("glAMD_gcn_shader"); } - if (extensions.Contains("gl_AMD_gpu_shader_half_float")) { AMD_gpu_shader_half_float = true; extensions.Remove("glAMD_gpu_shader_half_float"); } - if (extensions.Contains("gl_AMD_gpu_shader_int16")) { AMD_gpu_shader_int16 = true; extensions.Remove("glAMD_gpu_shader_int16"); } - if (extensions.Contains("gl_AMD_gpu_shader_int64")) { AMD_gpu_shader_int64 = true; extensions.Remove("glAMD_gpu_shader_int64"); } - if (extensions.Contains("gl_AMD_interleaved_elements")) { AMD_interleaved_elements = true; extensions.Remove("glAMD_interleaved_elements"); } - if (extensions.Contains("gl_AMD_multi_draw_indirect")) { AMD_multi_draw_indirect = true; extensions.Remove("glAMD_multi_draw_indirect"); } - if (extensions.Contains("gl_AMD_name_gen_delete")) { AMD_name_gen_delete = true; extensions.Remove("glAMD_name_gen_delete"); } - if (extensions.Contains("gl_AMD_occlusion_query_event")) { AMD_occlusion_query_event = true; extensions.Remove("glAMD_occlusion_query_event"); } - if (extensions.Contains("gl_AMD_performance_monitor")) { AMD_performance_monitor = true; extensions.Remove("glAMD_performance_monitor"); } - if (extensions.Contains("gl_AMD_pinned_memory")) { AMD_pinned_memory = true; extensions.Remove("glAMD_pinned_memory"); } - if (extensions.Contains("gl_AMD_query_buffer_object")) { AMD_query_buffer_object = true; extensions.Remove("glAMD_query_buffer_object"); } - if (extensions.Contains("gl_AMD_sample_positions")) { AMD_sample_positions = true; extensions.Remove("glAMD_sample_positions"); } - if (extensions.Contains("gl_AMD_seamless_cubemap_per_texture")) { AMD_seamless_cubemap_per_texture = true; extensions.Remove("glAMD_seamless_cubemap_per_texture"); } - if (extensions.Contains("gl_AMD_shader_atomic_counter_ops")) { AMD_shader_atomic_counter_ops = true; extensions.Remove("glAMD_shader_atomic_counter_ops"); } - if (extensions.Contains("gl_AMD_shader_ballot")) { AMD_shader_ballot = true; extensions.Remove("glAMD_shader_ballot"); } - if (extensions.Contains("gl_AMD_shader_explicit_vertex_parameter")) { AMD_shader_explicit_vertex_parameter = true; extensions.Remove("glAMD_shader_explicit_vertex_parameter"); } - if (extensions.Contains("gl_AMD_shader_gpu_shader_half_float_fetch")) { AMD_shader_gpu_shader_half_float_fetch = true; extensions.Remove("glAMD_shader_gpu_shader_half_float_fetch"); } - if (extensions.Contains("gl_AMD_shader_image_load_store_lod")) { AMD_shader_image_load_store_lod = true; extensions.Remove("glAMD_shader_image_load_store_lod"); } - if (extensions.Contains("gl_AMD_shader_stencil_export")) { AMD_shader_stencil_export = true; extensions.Remove("glAMD_shader_stencil_export"); } - if (extensions.Contains("gl_AMD_shader_trinary_minmax")) { AMD_shader_trinary_minmax = true; extensions.Remove("glAMD_shader_trinary_minmax"); } - if (extensions.Contains("gl_AMD_sparse_texture")) { AMD_sparse_texture = true; extensions.Remove("glAMD_sparse_texture"); } - if (extensions.Contains("gl_AMD_stencil_operation_extended")) { AMD_stencil_operation_extended = true; extensions.Remove("glAMD_stencil_operation_extended"); } - if (extensions.Contains("gl_AMD_texture_gather_bias_lod")) { AMD_texture_gather_bias_lod = true; extensions.Remove("glAMD_texture_gather_bias_lod"); } - if (extensions.Contains("gl_AMD_texture_texture4")) { AMD_texture_texture4 = true; extensions.Remove("glAMD_texture_texture4"); } - if (extensions.Contains("gl_AMD_transform_feedback3_lines_triangles")) { AMD_transform_feedback3_lines_triangles = true; extensions.Remove("glAMD_transform_feedback3_lines_triangles"); } - if (extensions.Contains("gl_AMD_transform_feedback4")) { AMD_transform_feedback4 = true; extensions.Remove("glAMD_transform_feedback4"); } - if (extensions.Contains("gl_AMD_vertex_shader_layer")) { AMD_vertex_shader_layer = true; extensions.Remove("glAMD_vertex_shader_layer"); } - if (extensions.Contains("gl_AMD_vertex_shader_tessellator")) { AMD_vertex_shader_tessellator = true; extensions.Remove("glAMD_vertex_shader_tessellator"); } - if (extensions.Contains("gl_AMD_vertex_shader_viewport_index")) { AMD_vertex_shader_viewport_index = true; extensions.Remove("glAMD_vertex_shader_viewport_index"); } - if (extensions.Contains("gl_APPLE_aux_depth_stencil")) { APPLE_aux_depth_stencil = true; extensions.Remove("glAPPLE_aux_depth_stencil"); } - if (extensions.Contains("gl_APPLE_client_storage")) { APPLE_client_storage = true; extensions.Remove("glAPPLE_client_storage"); } - if (extensions.Contains("gl_APPLE_element_array")) { APPLE_element_array = true; extensions.Remove("glAPPLE_element_array"); } - if (extensions.Contains("gl_APPLE_fence")) { APPLE_fence = true; extensions.Remove("glAPPLE_fence"); } - if (extensions.Contains("gl_APPLE_float_pixels")) { APPLE_float_pixels = true; extensions.Remove("glAPPLE_float_pixels"); } - if (extensions.Contains("gl_APPLE_flush_buffer_range")) { APPLE_flush_buffer_range = true; extensions.Remove("glAPPLE_flush_buffer_range"); } - if (extensions.Contains("gl_APPLE_object_purgeable")) { APPLE_object_purgeable = true; extensions.Remove("glAPPLE_object_purgeable"); } - if (extensions.Contains("gl_APPLE_rgb_422")) { APPLE_rgb_422 = true; extensions.Remove("glAPPLE_rgb_422"); } - if (extensions.Contains("gl_APPLE_row_bytes")) { APPLE_row_bytes = true; extensions.Remove("glAPPLE_row_bytes"); } - if (extensions.Contains("gl_APPLE_specular_vector")) { APPLE_specular_vector = true; extensions.Remove("glAPPLE_specular_vector"); } - if (extensions.Contains("gl_APPLE_texture_range")) { APPLE_texture_range = true; extensions.Remove("glAPPLE_texture_range"); } - if (extensions.Contains("gl_APPLE_transform_hint")) { APPLE_transform_hint = true; extensions.Remove("glAPPLE_transform_hint"); } - if (extensions.Contains("gl_APPLE_vertex_array_object")) { APPLE_vertex_array_object = true; extensions.Remove("glAPPLE_vertex_array_object"); } - if (extensions.Contains("gl_APPLE_vertex_array_range")) { APPLE_vertex_array_range = true; extensions.Remove("glAPPLE_vertex_array_range"); } - if (extensions.Contains("gl_APPLE_vertex_program_evaluators")) { APPLE_vertex_program_evaluators = true; extensions.Remove("glAPPLE_vertex_program_evaluators"); } - if (extensions.Contains("gl_APPLE_ycbcr_422")) { APPLE_ycbcr_422 = true; extensions.Remove("glAPPLE_ycbcr_422"); } - if (extensions.Contains("gl_ARB_ES2_compatibility")) { ARB_ES2_compatibility = true; extensions.Remove("glARB_ES2_compatibility"); } - if (extensions.Contains("gl_ARB_ES3_1_compatibility")) { ARB_ES3_1_compatibility = true; extensions.Remove("glARB_ES3_1_compatibility"); } - if (extensions.Contains("gl_ARB_ES3_2_compatibility")) { ARB_ES3_2_compatibility = true; extensions.Remove("glARB_ES3_2_compatibility"); } - if (extensions.Contains("gl_ARB_ES3_compatibility")) { ARB_ES3_compatibility = true; extensions.Remove("glARB_ES3_compatibility"); } - if (extensions.Contains("gl_ARB_arrays_of_arrays")) { ARB_arrays_of_arrays = true; extensions.Remove("glARB_arrays_of_arrays"); } - if (extensions.Contains("gl_ARB_base_instance")) { ARB_base_instance = true; extensions.Remove("glARB_base_instance"); } - if (extensions.Contains("gl_ARB_bindless_texture")) { ARB_bindless_texture = true; extensions.Remove("glARB_bindless_texture"); } - if (extensions.Contains("gl_ARB_blend_func_extended")) { ARB_blend_func_extended = true; extensions.Remove("glARB_blend_func_extended"); } - if (extensions.Contains("gl_ARB_buffer_storage")) { ARB_buffer_storage = true; extensions.Remove("glARB_buffer_storage"); } - if (extensions.Contains("gl_ARB_cl_event")) { ARB_cl_event = true; extensions.Remove("glARB_cl_event"); } - if (extensions.Contains("gl_ARB_clear_buffer_object")) { ARB_clear_buffer_object = true; extensions.Remove("glARB_clear_buffer_object"); } - if (extensions.Contains("gl_ARB_clear_texture")) { ARB_clear_texture = true; extensions.Remove("glARB_clear_texture"); } - if (extensions.Contains("gl_ARB_clip_control")) { ARB_clip_control = true; extensions.Remove("glARB_clip_control"); } - if (extensions.Contains("gl_ARB_color_buffer_float")) { ARB_color_buffer_float = true; extensions.Remove("glARB_color_buffer_float"); } - if (extensions.Contains("gl_ARB_compatibility")) { ARB_compatibility = true; extensions.Remove("glARB_compatibility"); } - if (extensions.Contains("gl_ARB_compressed_texture_pixel_storage")) { ARB_compressed_texture_pixel_storage = true; extensions.Remove("glARB_compressed_texture_pixel_storage"); } - if (extensions.Contains("gl_ARB_compute_shader")) { ARB_compute_shader = true; extensions.Remove("glARB_compute_shader"); } - if (extensions.Contains("gl_ARB_compute_variable_group_size")) { ARB_compute_variable_group_size = true; extensions.Remove("glARB_compute_variable_group_size"); } - if (extensions.Contains("gl_ARB_conditional_render_inverted")) { ARB_conditional_render_inverted = true; extensions.Remove("glARB_conditional_render_inverted"); } - if (extensions.Contains("gl_ARB_conservative_depth")) { ARB_conservative_depth = true; extensions.Remove("glARB_conservative_depth"); } - if (extensions.Contains("gl_ARB_copy_buffer")) { ARB_copy_buffer = true; extensions.Remove("glARB_copy_buffer"); } - if (extensions.Contains("gl_ARB_copy_image")) { ARB_copy_image = true; extensions.Remove("glARB_copy_image"); } - if (extensions.Contains("gl_ARB_cull_distance")) { ARB_cull_distance = true; extensions.Remove("glARB_cull_distance"); } - if (extensions.Contains("gl_ARB_debug_output")) { ARB_debug_output = true; extensions.Remove("glARB_debug_output"); } - if (extensions.Contains("gl_ARB_depth_buffer_float")) { ARB_depth_buffer_float = true; extensions.Remove("glARB_depth_buffer_float"); } - if (extensions.Contains("gl_ARB_depth_clamp")) { ARB_depth_clamp = true; extensions.Remove("glARB_depth_clamp"); } - if (extensions.Contains("gl_ARB_depth_texture")) { ARB_depth_texture = true; extensions.Remove("glARB_depth_texture"); } - if (extensions.Contains("gl_ARB_derivative_control")) { ARB_derivative_control = true; extensions.Remove("glARB_derivative_control"); } - if (extensions.Contains("gl_ARB_direct_state_access")) { ARB_direct_state_access = true; extensions.Remove("glARB_direct_state_access"); } - if (extensions.Contains("gl_ARB_draw_buffers")) { ARB_draw_buffers = true; extensions.Remove("glARB_draw_buffers"); } - if (extensions.Contains("gl_ARB_draw_buffers_blend")) { ARB_draw_buffers_blend = true; extensions.Remove("glARB_draw_buffers_blend"); } - if (extensions.Contains("gl_ARB_draw_elements_base_vertex")) { ARB_draw_elements_base_vertex = true; extensions.Remove("glARB_draw_elements_base_vertex"); } - if (extensions.Contains("gl_ARB_draw_indirect")) { ARB_draw_indirect = true; extensions.Remove("glARB_draw_indirect"); } - if (extensions.Contains("gl_ARB_draw_instanced")) { ARB_draw_instanced = true; extensions.Remove("glARB_draw_instanced"); } - if (extensions.Contains("gl_ARB_enhanced_layouts")) { ARB_enhanced_layouts = true; extensions.Remove("glARB_enhanced_layouts"); } - if (extensions.Contains("gl_ARB_explicit_attrib_location")) { ARB_explicit_attrib_location = true; extensions.Remove("glARB_explicit_attrib_location"); } - if (extensions.Contains("gl_ARB_explicit_uniform_location")) { ARB_explicit_uniform_location = true; extensions.Remove("glARB_explicit_uniform_location"); } - if (extensions.Contains("gl_ARB_fragment_coord_conventions")) { ARB_fragment_coord_conventions = true; extensions.Remove("glARB_fragment_coord_conventions"); } - if (extensions.Contains("gl_ARB_fragment_layer_viewport")) { ARB_fragment_layer_viewport = true; extensions.Remove("glARB_fragment_layer_viewport"); } - if (extensions.Contains("gl_ARB_fragment_program")) { ARB_fragment_program = true; extensions.Remove("glARB_fragment_program"); } - if (extensions.Contains("gl_ARB_fragment_program_shadow")) { ARB_fragment_program_shadow = true; extensions.Remove("glARB_fragment_program_shadow"); } - if (extensions.Contains("gl_ARB_fragment_shader")) { ARB_fragment_shader = true; extensions.Remove("glARB_fragment_shader"); } - if (extensions.Contains("gl_ARB_fragment_shader_interlock")) { ARB_fragment_shader_interlock = true; extensions.Remove("glARB_fragment_shader_interlock"); } - if (extensions.Contains("gl_ARB_framebuffer_no_attachments")) { ARB_framebuffer_no_attachments = true; extensions.Remove("glARB_framebuffer_no_attachments"); } - if (extensions.Contains("gl_ARB_framebuffer_object")) { ARB_framebuffer_object = true; extensions.Remove("glARB_framebuffer_object"); } - if (extensions.Contains("gl_ARB_framebuffer_sRGB")) { ARB_framebuffer_sRGB = true; extensions.Remove("glARB_framebuffer_sRGB"); } - if (extensions.Contains("gl_ARB_geometry_shader4")) { ARB_geometry_shader4 = true; extensions.Remove("glARB_geometry_shader4"); } - if (extensions.Contains("gl_ARB_get_program_binary")) { ARB_get_program_binary = true; extensions.Remove("glARB_get_program_binary"); } - if (extensions.Contains("gl_ARB_get_texture_sub_image")) { ARB_get_texture_sub_image = true; extensions.Remove("glARB_get_texture_sub_image"); } - if (extensions.Contains("gl_ARB_gl_spirv")) { ARB_gl_spirv = true; extensions.Remove("glARB_gl_spirv"); } - if (extensions.Contains("gl_ARB_gpu_shader5")) { ARB_gpu_shader5 = true; extensions.Remove("glARB_gpu_shader5"); } - if (extensions.Contains("gl_ARB_gpu_shader_fp64")) { ARB_gpu_shader_fp64 = true; extensions.Remove("glARB_gpu_shader_fp64"); } - if (extensions.Contains("gl_ARB_gpu_shader_int64")) { ARB_gpu_shader_int64 = true; extensions.Remove("glARB_gpu_shader_int64"); } - if (extensions.Contains("gl_ARB_half_float_pixel")) { ARB_half_float_pixel = true; extensions.Remove("glARB_half_float_pixel"); } - if (extensions.Contains("gl_ARB_half_float_vertex")) { ARB_half_float_vertex = true; extensions.Remove("glARB_half_float_vertex"); } - if (extensions.Contains("gl_ARB_imaging")) { ARB_imaging = true; extensions.Remove("glARB_imaging"); } - if (extensions.Contains("gl_ARB_indirect_parameters")) { ARB_indirect_parameters = true; extensions.Remove("glARB_indirect_parameters"); } - if (extensions.Contains("gl_ARB_instanced_arrays")) { ARB_instanced_arrays = true; extensions.Remove("glARB_instanced_arrays"); } - if (extensions.Contains("gl_ARB_internalformat_query")) { ARB_internalformat_query = true; extensions.Remove("glARB_internalformat_query"); } - if (extensions.Contains("gl_ARB_internalformat_query2")) { ARB_internalformat_query2 = true; extensions.Remove("glARB_internalformat_query2"); } - if (extensions.Contains("gl_ARB_invalidate_subdata")) { ARB_invalidate_subdata = true; extensions.Remove("glARB_invalidate_subdata"); } - if (extensions.Contains("gl_ARB_map_buffer_alignment")) { ARB_map_buffer_alignment = true; extensions.Remove("glARB_map_buffer_alignment"); } - if (extensions.Contains("gl_ARB_map_buffer_range")) { ARB_map_buffer_range = true; extensions.Remove("glARB_map_buffer_range"); } - if (extensions.Contains("gl_ARB_matrix_palette")) { ARB_matrix_palette = true; extensions.Remove("glARB_matrix_palette"); } - if (extensions.Contains("gl_ARB_multi_bind")) { ARB_multi_bind = true; extensions.Remove("glARB_multi_bind"); } - if (extensions.Contains("gl_ARB_multi_draw_indirect")) { ARB_multi_draw_indirect = true; extensions.Remove("glARB_multi_draw_indirect"); } - if (extensions.Contains("gl_ARB_multisample")) { ARB_multisample = true; extensions.Remove("glARB_multisample"); } - if (extensions.Contains("gl_ARB_multitexture")) { ARB_multitexture = true; extensions.Remove("glARB_multitexture"); } - if (extensions.Contains("gl_ARB_occlusion_query")) { ARB_occlusion_query = true; extensions.Remove("glARB_occlusion_query"); } - if (extensions.Contains("gl_ARB_occlusion_query2")) { ARB_occlusion_query2 = true; extensions.Remove("glARB_occlusion_query2"); } - if (extensions.Contains("gl_ARB_parallel_shader_compile")) { ARB_parallel_shader_compile = true; extensions.Remove("glARB_parallel_shader_compile"); } - if (extensions.Contains("gl_ARB_pipeline_statistics_query")) { ARB_pipeline_statistics_query = true; extensions.Remove("glARB_pipeline_statistics_query"); } - if (extensions.Contains("gl_ARB_pixel_buffer_object")) { ARB_pixel_buffer_object = true; extensions.Remove("glARB_pixel_buffer_object"); } - if (extensions.Contains("gl_ARB_point_parameters")) { ARB_point_parameters = true; extensions.Remove("glARB_point_parameters"); } - if (extensions.Contains("gl_ARB_point_sprite")) { ARB_point_sprite = true; extensions.Remove("glARB_point_sprite"); } - if (extensions.Contains("gl_ARB_polygon_offset_clamp")) { ARB_polygon_offset_clamp = true; extensions.Remove("glARB_polygon_offset_clamp"); } - if (extensions.Contains("gl_ARB_post_depth_coverage")) { ARB_post_depth_coverage = true; extensions.Remove("glARB_post_depth_coverage"); } - if (extensions.Contains("gl_ARB_program_interface_query")) { ARB_program_interface_query = true; extensions.Remove("glARB_program_interface_query"); } - if (extensions.Contains("gl_ARB_provoking_vertex")) { ARB_provoking_vertex = true; extensions.Remove("glARB_provoking_vertex"); } - if (extensions.Contains("gl_ARB_query_buffer_object")) { ARB_query_buffer_object = true; extensions.Remove("glARB_query_buffer_object"); } - if (extensions.Contains("gl_ARB_robust_buffer_access_behavior")) { ARB_robust_buffer_access_behavior = true; extensions.Remove("glARB_robust_buffer_access_behavior"); } - if (extensions.Contains("gl_ARB_robustness")) { ARB_robustness = true; extensions.Remove("glARB_robustness"); } - if (extensions.Contains("gl_ARB_robustness_isolation")) { ARB_robustness_isolation = true; extensions.Remove("glARB_robustness_isolation"); } - if (extensions.Contains("gl_ARB_sample_locations")) { ARB_sample_locations = true; extensions.Remove("glARB_sample_locations"); } - if (extensions.Contains("gl_ARB_sample_shading")) { ARB_sample_shading = true; extensions.Remove("glARB_sample_shading"); } - if (extensions.Contains("gl_ARB_sampler_objects")) { ARB_sampler_objects = true; extensions.Remove("glARB_sampler_objects"); } - if (extensions.Contains("gl_ARB_seamless_cube_map")) { ARB_seamless_cube_map = true; extensions.Remove("glARB_seamless_cube_map"); } - if (extensions.Contains("gl_ARB_seamless_cubemap_per_texture")) { ARB_seamless_cubemap_per_texture = true; extensions.Remove("glARB_seamless_cubemap_per_texture"); } - if (extensions.Contains("gl_ARB_separate_shader_objects")) { ARB_separate_shader_objects = true; extensions.Remove("glARB_separate_shader_objects"); } - if (extensions.Contains("gl_ARB_shader_atomic_counter_ops")) { ARB_shader_atomic_counter_ops = true; extensions.Remove("glARB_shader_atomic_counter_ops"); } - if (extensions.Contains("gl_ARB_shader_atomic_counters")) { ARB_shader_atomic_counters = true; extensions.Remove("glARB_shader_atomic_counters"); } - if (extensions.Contains("gl_ARB_shader_ballot")) { ARB_shader_ballot = true; extensions.Remove("glARB_shader_ballot"); } - if (extensions.Contains("gl_ARB_shader_bit_encoding")) { ARB_shader_bit_encoding = true; extensions.Remove("glARB_shader_bit_encoding"); } - if (extensions.Contains("gl_ARB_shader_clock")) { ARB_shader_clock = true; extensions.Remove("glARB_shader_clock"); } - if (extensions.Contains("gl_ARB_shader_draw_parameters")) { ARB_shader_draw_parameters = true; extensions.Remove("glARB_shader_draw_parameters"); } - if (extensions.Contains("gl_ARB_shader_group_vote")) { ARB_shader_group_vote = true; extensions.Remove("glARB_shader_group_vote"); } - if (extensions.Contains("gl_ARB_shader_image_load_store")) { ARB_shader_image_load_store = true; extensions.Remove("glARB_shader_image_load_store"); } - if (extensions.Contains("gl_ARB_shader_image_size")) { ARB_shader_image_size = true; extensions.Remove("glARB_shader_image_size"); } - if (extensions.Contains("gl_ARB_shader_objects")) { ARB_shader_objects = true; extensions.Remove("glARB_shader_objects"); } - if (extensions.Contains("gl_ARB_shader_precision")) { ARB_shader_precision = true; extensions.Remove("glARB_shader_precision"); } - if (extensions.Contains("gl_ARB_shader_stencil_export")) { ARB_shader_stencil_export = true; extensions.Remove("glARB_shader_stencil_export"); } - if (extensions.Contains("gl_ARB_shader_storage_buffer_object")) { ARB_shader_storage_buffer_object = true; extensions.Remove("glARB_shader_storage_buffer_object"); } - if (extensions.Contains("gl_ARB_shader_subroutine")) { ARB_shader_subroutine = true; extensions.Remove("glARB_shader_subroutine"); } - if (extensions.Contains("gl_ARB_shader_texture_image_samples")) { ARB_shader_texture_image_samples = true; extensions.Remove("glARB_shader_texture_image_samples"); } - if (extensions.Contains("gl_ARB_shader_texture_lod")) { ARB_shader_texture_lod = true; extensions.Remove("glARB_shader_texture_lod"); } - if (extensions.Contains("gl_ARB_shader_viewport_layer_array")) { ARB_shader_viewport_layer_array = true; extensions.Remove("glARB_shader_viewport_layer_array"); } - if (extensions.Contains("gl_ARB_shading_language_100")) { ARB_shading_language_100 = true; extensions.Remove("glARB_shading_language_100"); } - if (extensions.Contains("gl_ARB_shading_language_420pack")) { ARB_shading_language_420pack = true; extensions.Remove("glARB_shading_language_420pack"); } - if (extensions.Contains("gl_ARB_shading_language_include")) { ARB_shading_language_include = true; extensions.Remove("glARB_shading_language_include"); } - if (extensions.Contains("gl_ARB_shading_language_packing")) { ARB_shading_language_packing = true; extensions.Remove("glARB_shading_language_packing"); } - if (extensions.Contains("gl_ARB_shadow")) { ARB_shadow = true; extensions.Remove("glARB_shadow"); } - if (extensions.Contains("gl_ARB_shadow_ambient")) { ARB_shadow_ambient = true; extensions.Remove("glARB_shadow_ambient"); } - if (extensions.Contains("gl_ARB_sparse_buffer")) { ARB_sparse_buffer = true; extensions.Remove("glARB_sparse_buffer"); } - if (extensions.Contains("gl_ARB_sparse_texture")) { ARB_sparse_texture = true; extensions.Remove("glARB_sparse_texture"); } - if (extensions.Contains("gl_ARB_sparse_texture2")) { ARB_sparse_texture2 = true; extensions.Remove("glARB_sparse_texture2"); } - if (extensions.Contains("gl_ARB_sparse_texture_clamp")) { ARB_sparse_texture_clamp = true; extensions.Remove("glARB_sparse_texture_clamp"); } - if (extensions.Contains("gl_ARB_spirv_extensions")) { ARB_spirv_extensions = true; extensions.Remove("glARB_spirv_extensions"); } - if (extensions.Contains("gl_ARB_stencil_texturing")) { ARB_stencil_texturing = true; extensions.Remove("glARB_stencil_texturing"); } - if (extensions.Contains("gl_ARB_sync")) { ARB_sync = true; extensions.Remove("glARB_sync"); } - if (extensions.Contains("gl_ARB_tessellation_shader")) { ARB_tessellation_shader = true; extensions.Remove("glARB_tessellation_shader"); } - if (extensions.Contains("gl_ARB_texture_barrier")) { ARB_texture_barrier = true; extensions.Remove("glARB_texture_barrier"); } - if (extensions.Contains("gl_ARB_texture_border_clamp")) { ARB_texture_border_clamp = true; extensions.Remove("glARB_texture_border_clamp"); } - if (extensions.Contains("gl_ARB_texture_buffer_object")) { ARB_texture_buffer_object = true; extensions.Remove("glARB_texture_buffer_object"); } - if (extensions.Contains("gl_ARB_texture_buffer_object_rgb32")) { ARB_texture_buffer_object_rgb32 = true; extensions.Remove("glARB_texture_buffer_object_rgb32"); } - if (extensions.Contains("gl_ARB_texture_buffer_range")) { ARB_texture_buffer_range = true; extensions.Remove("glARB_texture_buffer_range"); } - if (extensions.Contains("gl_ARB_texture_compression")) { ARB_texture_compression = true; extensions.Remove("glARB_texture_compression"); } - if (extensions.Contains("gl_ARB_texture_compression_bptc")) { ARB_texture_compression_bptc = true; extensions.Remove("glARB_texture_compression_bptc"); } - if (extensions.Contains("gl_ARB_texture_compression_rgtc")) { ARB_texture_compression_rgtc = true; extensions.Remove("glARB_texture_compression_rgtc"); } - if (extensions.Contains("gl_ARB_texture_cube_map")) { ARB_texture_cube_map = true; extensions.Remove("glARB_texture_cube_map"); } - if (extensions.Contains("gl_ARB_texture_cube_map_array")) { ARB_texture_cube_map_array = true; extensions.Remove("glARB_texture_cube_map_array"); } - if (extensions.Contains("gl_ARB_texture_env_add")) { ARB_texture_env_add = true; extensions.Remove("glARB_texture_env_add"); } - if (extensions.Contains("gl_ARB_texture_env_combine")) { ARB_texture_env_combine = true; extensions.Remove("glARB_texture_env_combine"); } - if (extensions.Contains("gl_ARB_texture_env_crossbar")) { ARB_texture_env_crossbar = true; extensions.Remove("glARB_texture_env_crossbar"); } - if (extensions.Contains("gl_ARB_texture_env_dot3")) { ARB_texture_env_dot3 = true; extensions.Remove("glARB_texture_env_dot3"); } - if (extensions.Contains("gl_ARB_texture_filter_anisotropic")) { ARB_texture_filter_anisotropic = true; extensions.Remove("glARB_texture_filter_anisotropic"); } - if (extensions.Contains("gl_ARB_texture_filter_minmax")) { ARB_texture_filter_minmax = true; extensions.Remove("glARB_texture_filter_minmax"); } - if (extensions.Contains("gl_ARB_texture_float")) { ARB_texture_float = true; extensions.Remove("glARB_texture_float"); } - if (extensions.Contains("gl_ARB_texture_gather")) { ARB_texture_gather = true; extensions.Remove("glARB_texture_gather"); } - if (extensions.Contains("gl_ARB_texture_mirror_clamp_to_edge")) { ARB_texture_mirror_clamp_to_edge = true; extensions.Remove("glARB_texture_mirror_clamp_to_edge"); } - if (extensions.Contains("gl_ARB_texture_mirrored_repeat")) { ARB_texture_mirrored_repeat = true; extensions.Remove("glARB_texture_mirrored_repeat"); } - if (extensions.Contains("gl_ARB_texture_multisample")) { ARB_texture_multisample = true; extensions.Remove("glARB_texture_multisample"); } - if (extensions.Contains("gl_ARB_texture_non_power_of_two")) { ARB_texture_non_power_of_two = true; extensions.Remove("glARB_texture_non_power_of_two"); } - if (extensions.Contains("gl_ARB_texture_query_levels")) { ARB_texture_query_levels = true; extensions.Remove("glARB_texture_query_levels"); } - if (extensions.Contains("gl_ARB_texture_query_lod")) { ARB_texture_query_lod = true; extensions.Remove("glARB_texture_query_lod"); } - if (extensions.Contains("gl_ARB_texture_rectangle")) { ARB_texture_rectangle = true; extensions.Remove("glARB_texture_rectangle"); } - if (extensions.Contains("gl_ARB_texture_rg")) { ARB_texture_rg = true; extensions.Remove("glARB_texture_rg"); } - if (extensions.Contains("gl_ARB_texture_rgb10_a2ui")) { ARB_texture_rgb10_a2ui = true; extensions.Remove("glARB_texture_rgb10_a2ui"); } - if (extensions.Contains("gl_ARB_texture_stencil8")) { ARB_texture_stencil8 = true; extensions.Remove("glARB_texture_stencil8"); } - if (extensions.Contains("gl_ARB_texture_storage")) { ARB_texture_storage = true; extensions.Remove("glARB_texture_storage"); } - if (extensions.Contains("gl_ARB_texture_storage_multisample")) { ARB_texture_storage_multisample = true; extensions.Remove("glARB_texture_storage_multisample"); } - if (extensions.Contains("gl_ARB_texture_swizzle")) { ARB_texture_swizzle = true; extensions.Remove("glARB_texture_swizzle"); } - if (extensions.Contains("gl_ARB_texture_view")) { ARB_texture_view = true; extensions.Remove("glARB_texture_view"); } - if (extensions.Contains("gl_ARB_timer_query")) { ARB_timer_query = true; extensions.Remove("glARB_timer_query"); } - if (extensions.Contains("gl_ARB_transform_feedback2")) { ARB_transform_feedback2 = true; extensions.Remove("glARB_transform_feedback2"); } - if (extensions.Contains("gl_ARB_transform_feedback3")) { ARB_transform_feedback3 = true; extensions.Remove("glARB_transform_feedback3"); } - if (extensions.Contains("gl_ARB_transform_feedback_instanced")) { ARB_transform_feedback_instanced = true; extensions.Remove("glARB_transform_feedback_instanced"); } - if (extensions.Contains("gl_ARB_transform_feedback_overflow_query")) { ARB_transform_feedback_overflow_query = true; extensions.Remove("glARB_transform_feedback_overflow_query"); } - if (extensions.Contains("gl_ARB_transpose_matrix")) { ARB_transpose_matrix = true; extensions.Remove("glARB_transpose_matrix"); } - if (extensions.Contains("gl_ARB_uniform_buffer_object")) { ARB_uniform_buffer_object = true; extensions.Remove("glARB_uniform_buffer_object"); } - if (extensions.Contains("gl_ARB_vertex_array_bgra")) { ARB_vertex_array_bgra = true; extensions.Remove("glARB_vertex_array_bgra"); } - if (extensions.Contains("gl_ARB_vertex_array_object")) { ARB_vertex_array_object = true; extensions.Remove("glARB_vertex_array_object"); } - if (extensions.Contains("gl_ARB_vertex_attrib_64bit")) { ARB_vertex_attrib_64bit = true; extensions.Remove("glARB_vertex_attrib_64bit"); } - if (extensions.Contains("gl_ARB_vertex_attrib_binding")) { ARB_vertex_attrib_binding = true; extensions.Remove("glARB_vertex_attrib_binding"); } - if (extensions.Contains("gl_ARB_vertex_blend")) { ARB_vertex_blend = true; extensions.Remove("glARB_vertex_blend"); } - if (extensions.Contains("gl_ARB_vertex_buffer_object")) { ARB_vertex_buffer_object = true; extensions.Remove("glARB_vertex_buffer_object"); } - if (extensions.Contains("gl_ARB_vertex_program")) { ARB_vertex_program = true; extensions.Remove("glARB_vertex_program"); } - if (extensions.Contains("gl_ARB_vertex_shader")) { ARB_vertex_shader = true; extensions.Remove("glARB_vertex_shader"); } - if (extensions.Contains("gl_ARB_vertex_type_10f_11f_11f_rev")) { ARB_vertex_type_10f_11f_11f_rev = true; extensions.Remove("glARB_vertex_type_10f_11f_11f_rev"); } - if (extensions.Contains("gl_ARB_vertex_type_2_10_10_10_rev")) { ARB_vertex_type_2_10_10_10_rev = true; extensions.Remove("glARB_vertex_type_2_10_10_10_rev"); } - if (extensions.Contains("gl_ARB_viewport_array")) { ARB_viewport_array = true; extensions.Remove("glARB_viewport_array"); } - if (extensions.Contains("gl_ARB_window_pos")) { ARB_window_pos = true; extensions.Remove("glARB_window_pos"); } - if (extensions.Contains("gl_ATI_draw_buffers")) { ATI_draw_buffers = true; extensions.Remove("glATI_draw_buffers"); } - if (extensions.Contains("gl_ATI_element_array")) { ATI_element_array = true; extensions.Remove("glATI_element_array"); } - if (extensions.Contains("gl_ATI_envmap_bumpmap")) { ATI_envmap_bumpmap = true; extensions.Remove("glATI_envmap_bumpmap"); } - if (extensions.Contains("gl_ATI_fragment_shader")) { ATI_fragment_shader = true; extensions.Remove("glATI_fragment_shader"); } - if (extensions.Contains("gl_ATI_map_object_buffer")) { ATI_map_object_buffer = true; extensions.Remove("glATI_map_object_buffer"); } - if (extensions.Contains("gl_ATI_meminfo")) { ATI_meminfo = true; extensions.Remove("glATI_meminfo"); } - if (extensions.Contains("gl_ATI_pixel_format_float")) { ATI_pixel_format_float = true; extensions.Remove("glATI_pixel_format_float"); } - if (extensions.Contains("gl_ATI_pn_triangles")) { ATI_pn_triangles = true; extensions.Remove("glATI_pn_triangles"); } - if (extensions.Contains("gl_ATI_separate_stencil")) { ATI_separate_stencil = true; extensions.Remove("glATI_separate_stencil"); } - if (extensions.Contains("gl_ATI_text_fragment_shader")) { ATI_text_fragment_shader = true; extensions.Remove("glATI_text_fragment_shader"); } - if (extensions.Contains("gl_ATI_texture_env_combine3")) { ATI_texture_env_combine3 = true; extensions.Remove("glATI_texture_env_combine3"); } - if (extensions.Contains("gl_ATI_texture_float")) { ATI_texture_float = true; extensions.Remove("glATI_texture_float"); } - if (extensions.Contains("gl_ATI_texture_mirror_once")) { ATI_texture_mirror_once = true; extensions.Remove("glATI_texture_mirror_once"); } - if (extensions.Contains("gl_ATI_vertex_array_object")) { ATI_vertex_array_object = true; extensions.Remove("glATI_vertex_array_object"); } - if (extensions.Contains("gl_ATI_vertex_attrib_array_object")) { ATI_vertex_attrib_array_object = true; extensions.Remove("glATI_vertex_attrib_array_object"); } - if (extensions.Contains("gl_ATI_vertex_streams")) { ATI_vertex_streams = true; extensions.Remove("glATI_vertex_streams"); } - if (extensions.Contains("gl_EXT_422_pixels")) { EXT_422_pixels = true; extensions.Remove("glEXT_422_pixels"); } - if (extensions.Contains("gl_EXT_EGL_image_storage")) { EXT_EGL_image_storage = true; extensions.Remove("glEXT_EGL_image_storage"); } - if (extensions.Contains("gl_EXT_EGL_sync")) { EXT_EGL_sync = true; extensions.Remove("glEXT_EGL_sync"); } - if (extensions.Contains("gl_EXT_abgr")) { EXT_abgr = true; extensions.Remove("glEXT_abgr"); } - if (extensions.Contains("gl_EXT_bgra")) { EXT_bgra = true; extensions.Remove("glEXT_bgra"); } - if (extensions.Contains("gl_EXT_bindable_uniform")) { EXT_bindable_uniform = true; extensions.Remove("glEXT_bindable_uniform"); } - if (extensions.Contains("gl_EXT_blend_color")) { EXT_blend_color = true; extensions.Remove("glEXT_blend_color"); } - if (extensions.Contains("gl_EXT_blend_equation_separate")) { EXT_blend_equation_separate = true; extensions.Remove("glEXT_blend_equation_separate"); } - if (extensions.Contains("gl_EXT_blend_func_separate")) { EXT_blend_func_separate = true; extensions.Remove("glEXT_blend_func_separate"); } - if (extensions.Contains("gl_EXT_blend_logic_op")) { EXT_blend_logic_op = true; extensions.Remove("glEXT_blend_logic_op"); } - if (extensions.Contains("gl_EXT_blend_minmax")) { EXT_blend_minmax = true; extensions.Remove("glEXT_blend_minmax"); } - if (extensions.Contains("gl_EXT_blend_subtract")) { EXT_blend_subtract = true; extensions.Remove("glEXT_blend_subtract"); } - if (extensions.Contains("gl_EXT_clip_volume_hint")) { EXT_clip_volume_hint = true; extensions.Remove("glEXT_clip_volume_hint"); } - if (extensions.Contains("gl_EXT_cmyka")) { EXT_cmyka = true; extensions.Remove("glEXT_cmyka"); } - if (extensions.Contains("gl_EXT_color_subtable")) { EXT_color_subtable = true; extensions.Remove("glEXT_color_subtable"); } - if (extensions.Contains("gl_EXT_compiled_vertex_array")) { EXT_compiled_vertex_array = true; extensions.Remove("glEXT_compiled_vertex_array"); } - if (extensions.Contains("gl_EXT_convolution")) { EXT_convolution = true; extensions.Remove("glEXT_convolution"); } - if (extensions.Contains("gl_EXT_coordinate_frame")) { EXT_coordinate_frame = true; extensions.Remove("glEXT_coordinate_frame"); } - if (extensions.Contains("gl_EXT_copy_texture")) { EXT_copy_texture = true; extensions.Remove("glEXT_copy_texture"); } - if (extensions.Contains("gl_EXT_cull_vertex")) { EXT_cull_vertex = true; extensions.Remove("glEXT_cull_vertex"); } - if (extensions.Contains("gl_EXT_debug_label")) { EXT_debug_label = true; extensions.Remove("glEXT_debug_label"); } - if (extensions.Contains("gl_EXT_debug_marker")) { EXT_debug_marker = true; extensions.Remove("glEXT_debug_marker"); } - if (extensions.Contains("gl_EXT_depth_bounds_test")) { EXT_depth_bounds_test = true; extensions.Remove("glEXT_depth_bounds_test"); } - if (extensions.Contains("gl_EXT_direct_state_access")) { EXT_direct_state_access = true; extensions.Remove("glEXT_direct_state_access"); } - if (extensions.Contains("gl_EXT_draw_buffers2")) { EXT_draw_buffers2 = true; extensions.Remove("glEXT_draw_buffers2"); } - if (extensions.Contains("gl_EXT_draw_instanced")) { EXT_draw_instanced = true; extensions.Remove("glEXT_draw_instanced"); } - if (extensions.Contains("gl_EXT_draw_range_elements")) { EXT_draw_range_elements = true; extensions.Remove("glEXT_draw_range_elements"); } - if (extensions.Contains("gl_EXT_external_buffer")) { EXT_external_buffer = true; extensions.Remove("glEXT_external_buffer"); } - if (extensions.Contains("gl_EXT_fog_coord")) { EXT_fog_coord = true; extensions.Remove("glEXT_fog_coord"); } - if (extensions.Contains("gl_EXT_framebuffer_blit")) { EXT_framebuffer_blit = true; extensions.Remove("glEXT_framebuffer_blit"); } - if (extensions.Contains("gl_EXT_framebuffer_blit_layers")) { EXT_framebuffer_blit_layers = true; extensions.Remove("glEXT_framebuffer_blit_layers"); } - if (extensions.Contains("gl_EXT_framebuffer_multisample")) { EXT_framebuffer_multisample = true; extensions.Remove("glEXT_framebuffer_multisample"); } - if (extensions.Contains("gl_EXT_framebuffer_multisample_blit_scaled")) { EXT_framebuffer_multisample_blit_scaled = true; extensions.Remove("glEXT_framebuffer_multisample_blit_scaled"); } - if (extensions.Contains("gl_EXT_framebuffer_object")) { EXT_framebuffer_object = true; extensions.Remove("glEXT_framebuffer_object"); } - if (extensions.Contains("gl_EXT_framebuffer_sRGB")) { EXT_framebuffer_sRGB = true; extensions.Remove("glEXT_framebuffer_sRGB"); } - if (extensions.Contains("gl_EXT_geometry_shader4")) { EXT_geometry_shader4 = true; extensions.Remove("glEXT_geometry_shader4"); } - if (extensions.Contains("gl_EXT_gpu_program_parameters")) { EXT_gpu_program_parameters = true; extensions.Remove("glEXT_gpu_program_parameters"); } - if (extensions.Contains("gl_EXT_gpu_shader4")) { EXT_gpu_shader4 = true; extensions.Remove("glEXT_gpu_shader4"); } - if (extensions.Contains("gl_EXT_histogram")) { EXT_histogram = true; extensions.Remove("glEXT_histogram"); } - if (extensions.Contains("gl_EXT_index_array_formats")) { EXT_index_array_formats = true; extensions.Remove("glEXT_index_array_formats"); } - if (extensions.Contains("gl_EXT_index_func")) { EXT_index_func = true; extensions.Remove("glEXT_index_func"); } - if (extensions.Contains("gl_EXT_index_material")) { EXT_index_material = true; extensions.Remove("glEXT_index_material"); } - if (extensions.Contains("gl_EXT_index_texture")) { EXT_index_texture = true; extensions.Remove("glEXT_index_texture"); } - if (extensions.Contains("gl_EXT_light_texture")) { EXT_light_texture = true; extensions.Remove("glEXT_light_texture"); } - if (extensions.Contains("gl_EXT_memory_object")) { EXT_memory_object = true; extensions.Remove("glEXT_memory_object"); } - if (extensions.Contains("gl_EXT_memory_object_fd")) { EXT_memory_object_fd = true; extensions.Remove("glEXT_memory_object_fd"); } - if (extensions.Contains("gl_EXT_memory_object_win32")) { EXT_memory_object_win32 = true; extensions.Remove("glEXT_memory_object_win32"); } - if (extensions.Contains("gl_EXT_misc_attribute")) { EXT_misc_attribute = true; extensions.Remove("glEXT_misc_attribute"); } - if (extensions.Contains("gl_EXT_multi_draw_arrays")) { EXT_multi_draw_arrays = true; extensions.Remove("glEXT_multi_draw_arrays"); } - if (extensions.Contains("gl_EXT_multisample")) { EXT_multisample = true; extensions.Remove("glEXT_multisample"); } - if (extensions.Contains("gl_EXT_multiview_tessellation_geometry_shader")) { EXT_multiview_tessellation_geometry_shader = true; extensions.Remove("glEXT_multiview_tessellation_geometry_shader"); } - if (extensions.Contains("gl_EXT_multiview_texture_multisample")) { EXT_multiview_texture_multisample = true; extensions.Remove("glEXT_multiview_texture_multisample"); } - if (extensions.Contains("gl_EXT_multiview_timer_query")) { EXT_multiview_timer_query = true; extensions.Remove("glEXT_multiview_timer_query"); } - if (extensions.Contains("gl_EXT_packed_depth_stencil")) { EXT_packed_depth_stencil = true; extensions.Remove("glEXT_packed_depth_stencil"); } - if (extensions.Contains("gl_EXT_packed_float")) { EXT_packed_float = true; extensions.Remove("glEXT_packed_float"); } - if (extensions.Contains("gl_EXT_packed_pixels")) { EXT_packed_pixels = true; extensions.Remove("glEXT_packed_pixels"); } - if (extensions.Contains("gl_EXT_paletted_texture")) { EXT_paletted_texture = true; extensions.Remove("glEXT_paletted_texture"); } - if (extensions.Contains("gl_EXT_pixel_buffer_object")) { EXT_pixel_buffer_object = true; extensions.Remove("glEXT_pixel_buffer_object"); } - if (extensions.Contains("gl_EXT_pixel_transform")) { EXT_pixel_transform = true; extensions.Remove("glEXT_pixel_transform"); } - if (extensions.Contains("gl_EXT_pixel_transform_color_table")) { EXT_pixel_transform_color_table = true; extensions.Remove("glEXT_pixel_transform_color_table"); } - if (extensions.Contains("gl_EXT_point_parameters")) { EXT_point_parameters = true; extensions.Remove("glEXT_point_parameters"); } - if (extensions.Contains("gl_EXT_polygon_offset")) { EXT_polygon_offset = true; extensions.Remove("glEXT_polygon_offset"); } - if (extensions.Contains("gl_EXT_polygon_offset_clamp")) { EXT_polygon_offset_clamp = true; extensions.Remove("glEXT_polygon_offset_clamp"); } - if (extensions.Contains("gl_EXT_post_depth_coverage")) { EXT_post_depth_coverage = true; extensions.Remove("glEXT_post_depth_coverage"); } - if (extensions.Contains("gl_EXT_provoking_vertex")) { EXT_provoking_vertex = true; extensions.Remove("glEXT_provoking_vertex"); } - if (extensions.Contains("gl_EXT_raster_multisample")) { EXT_raster_multisample = true; extensions.Remove("glEXT_raster_multisample"); } - if (extensions.Contains("gl_EXT_rescale_normal")) { EXT_rescale_normal = true; extensions.Remove("glEXT_rescale_normal"); } - if (extensions.Contains("gl_EXT_secondary_color")) { EXT_secondary_color = true; extensions.Remove("glEXT_secondary_color"); } - if (extensions.Contains("gl_EXT_semaphore")) { EXT_semaphore = true; extensions.Remove("glEXT_semaphore"); } - if (extensions.Contains("gl_EXT_semaphore_fd")) { EXT_semaphore_fd = true; extensions.Remove("glEXT_semaphore_fd"); } - if (extensions.Contains("gl_EXT_semaphore_win32")) { EXT_semaphore_win32 = true; extensions.Remove("glEXT_semaphore_win32"); } - if (extensions.Contains("gl_EXT_separate_shader_objects")) { EXT_separate_shader_objects = true; extensions.Remove("glEXT_separate_shader_objects"); } - if (extensions.Contains("gl_EXT_separate_specular_color")) { EXT_separate_specular_color = true; extensions.Remove("glEXT_separate_specular_color"); } - if (extensions.Contains("gl_EXT_shader_framebuffer_fetch")) { EXT_shader_framebuffer_fetch = true; extensions.Remove("glEXT_shader_framebuffer_fetch"); } - if (extensions.Contains("gl_EXT_shader_framebuffer_fetch_non_coherent")) { EXT_shader_framebuffer_fetch_non_coherent = true; extensions.Remove("glEXT_shader_framebuffer_fetch_non_coherent"); } - if (extensions.Contains("gl_EXT_shader_image_load_formatted")) { EXT_shader_image_load_formatted = true; extensions.Remove("glEXT_shader_image_load_formatted"); } - if (extensions.Contains("gl_EXT_shader_image_load_store")) { EXT_shader_image_load_store = true; extensions.Remove("glEXT_shader_image_load_store"); } - if (extensions.Contains("gl_EXT_shader_integer_mix")) { EXT_shader_integer_mix = true; extensions.Remove("glEXT_shader_integer_mix"); } - if (extensions.Contains("gl_EXT_shader_samples_identical")) { EXT_shader_samples_identical = true; extensions.Remove("glEXT_shader_samples_identical"); } - if (extensions.Contains("gl_EXT_shadow_funcs")) { EXT_shadow_funcs = true; extensions.Remove("glEXT_shadow_funcs"); } - if (extensions.Contains("gl_EXT_shared_texture_palette")) { EXT_shared_texture_palette = true; extensions.Remove("glEXT_shared_texture_palette"); } - if (extensions.Contains("gl_EXT_sparse_texture2")) { EXT_sparse_texture2 = true; extensions.Remove("glEXT_sparse_texture2"); } - if (extensions.Contains("gl_EXT_stencil_clear_tag")) { EXT_stencil_clear_tag = true; extensions.Remove("glEXT_stencil_clear_tag"); } - if (extensions.Contains("gl_EXT_stencil_two_side")) { EXT_stencil_two_side = true; extensions.Remove("glEXT_stencil_two_side"); } - if (extensions.Contains("gl_EXT_stencil_wrap")) { EXT_stencil_wrap = true; extensions.Remove("glEXT_stencil_wrap"); } - if (extensions.Contains("gl_EXT_subtexture")) { EXT_subtexture = true; extensions.Remove("glEXT_subtexture"); } - if (extensions.Contains("gl_EXT_texture")) { EXT_texture = true; extensions.Remove("glEXT_texture"); } - if (extensions.Contains("gl_EXT_texture3D")) { EXT_texture3D = true; extensions.Remove("glEXT_texture3D"); } - if (extensions.Contains("gl_EXT_texture_array")) { EXT_texture_array = true; extensions.Remove("glEXT_texture_array"); } - if (extensions.Contains("gl_EXT_texture_buffer_object")) { EXT_texture_buffer_object = true; extensions.Remove("glEXT_texture_buffer_object"); } - if (extensions.Contains("gl_EXT_texture_compression_latc")) { EXT_texture_compression_latc = true; extensions.Remove("glEXT_texture_compression_latc"); } - if (extensions.Contains("gl_EXT_texture_compression_rgtc")) { EXT_texture_compression_rgtc = true; extensions.Remove("glEXT_texture_compression_rgtc"); } - if (extensions.Contains("gl_EXT_texture_compression_s3tc")) { EXT_texture_compression_s3tc = true; extensions.Remove("glEXT_texture_compression_s3tc"); } - if (extensions.Contains("gl_EXT_texture_cube_map")) { EXT_texture_cube_map = true; extensions.Remove("glEXT_texture_cube_map"); } - if (extensions.Contains("gl_EXT_texture_env_add")) { EXT_texture_env_add = true; extensions.Remove("glEXT_texture_env_add"); } - if (extensions.Contains("gl_EXT_texture_env_combine")) { EXT_texture_env_combine = true; extensions.Remove("glEXT_texture_env_combine"); } - if (extensions.Contains("gl_EXT_texture_env_dot3")) { EXT_texture_env_dot3 = true; extensions.Remove("glEXT_texture_env_dot3"); } - if (extensions.Contains("gl_EXT_texture_filter_anisotropic")) { EXT_texture_filter_anisotropic = true; extensions.Remove("glEXT_texture_filter_anisotropic"); } - if (extensions.Contains("gl_EXT_texture_filter_minmax")) { EXT_texture_filter_minmax = true; extensions.Remove("glEXT_texture_filter_minmax"); } - if (extensions.Contains("gl_EXT_texture_integer")) { EXT_texture_integer = true; extensions.Remove("glEXT_texture_integer"); } - if (extensions.Contains("gl_EXT_texture_lod_bias")) { EXT_texture_lod_bias = true; extensions.Remove("glEXT_texture_lod_bias"); } - if (extensions.Contains("gl_EXT_texture_mirror_clamp")) { EXT_texture_mirror_clamp = true; extensions.Remove("glEXT_texture_mirror_clamp"); } - if (extensions.Contains("gl_EXT_texture_object")) { EXT_texture_object = true; extensions.Remove("glEXT_texture_object"); } - if (extensions.Contains("gl_EXT_texture_perturb_normal")) { EXT_texture_perturb_normal = true; extensions.Remove("glEXT_texture_perturb_normal"); } - if (extensions.Contains("gl_EXT_texture_sRGB")) { EXT_texture_sRGB = true; extensions.Remove("glEXT_texture_sRGB"); } - if (extensions.Contains("gl_EXT_texture_sRGB_R8")) { EXT_texture_sRGB_R8 = true; extensions.Remove("glEXT_texture_sRGB_R8"); } - if (extensions.Contains("gl_EXT_texture_sRGB_RG8")) { EXT_texture_sRGB_RG8 = true; extensions.Remove("glEXT_texture_sRGB_RG8"); } - if (extensions.Contains("gl_EXT_texture_sRGB_decode")) { EXT_texture_sRGB_decode = true; extensions.Remove("glEXT_texture_sRGB_decode"); } - if (extensions.Contains("gl_EXT_texture_shadow_lod")) { EXT_texture_shadow_lod = true; extensions.Remove("glEXT_texture_shadow_lod"); } - if (extensions.Contains("gl_EXT_texture_shared_exponent")) { EXT_texture_shared_exponent = true; extensions.Remove("glEXT_texture_shared_exponent"); } - if (extensions.Contains("gl_EXT_texture_snorm")) { EXT_texture_snorm = true; extensions.Remove("glEXT_texture_snorm"); } - if (extensions.Contains("gl_EXT_texture_storage")) { EXT_texture_storage = true; extensions.Remove("glEXT_texture_storage"); } - if (extensions.Contains("gl_EXT_texture_swizzle")) { EXT_texture_swizzle = true; extensions.Remove("glEXT_texture_swizzle"); } - if (extensions.Contains("gl_EXT_timer_query")) { EXT_timer_query = true; extensions.Remove("glEXT_timer_query"); } - if (extensions.Contains("gl_EXT_transform_feedback")) { EXT_transform_feedback = true; extensions.Remove("glEXT_transform_feedback"); } - if (extensions.Contains("gl_EXT_vertex_array")) { EXT_vertex_array = true; extensions.Remove("glEXT_vertex_array"); } - if (extensions.Contains("gl_EXT_vertex_array_bgra")) { EXT_vertex_array_bgra = true; extensions.Remove("glEXT_vertex_array_bgra"); } - if (extensions.Contains("gl_EXT_vertex_attrib_64bit")) { EXT_vertex_attrib_64bit = true; extensions.Remove("glEXT_vertex_attrib_64bit"); } - if (extensions.Contains("gl_EXT_vertex_shader")) { EXT_vertex_shader = true; extensions.Remove("glEXT_vertex_shader"); } - if (extensions.Contains("gl_EXT_vertex_weighting")) { EXT_vertex_weighting = true; extensions.Remove("glEXT_vertex_weighting"); } - if (extensions.Contains("gl_EXT_win32_keyed_mutex")) { EXT_win32_keyed_mutex = true; extensions.Remove("glEXT_win32_keyed_mutex"); } - if (extensions.Contains("gl_EXT_window_rectangles")) { EXT_window_rectangles = true; extensions.Remove("glEXT_window_rectangles"); } - if (extensions.Contains("gl_EXT_x11_sync_object")) { EXT_x11_sync_object = true; extensions.Remove("glEXT_x11_sync_object"); } - if (extensions.Contains("gl_GREMEDY_frame_terminator")) { GREMEDY_frame_terminator = true; extensions.Remove("glGREMEDY_frame_terminator"); } - if (extensions.Contains("gl_GREMEDY_string_marker")) { GREMEDY_string_marker = true; extensions.Remove("glGREMEDY_string_marker"); } - if (extensions.Contains("gl_HP_convolution_border_modes")) { HP_convolution_border_modes = true; extensions.Remove("glHP_convolution_border_modes"); } - if (extensions.Contains("gl_HP_image_transform")) { HP_image_transform = true; extensions.Remove("glHP_image_transform"); } - if (extensions.Contains("gl_HP_occlusion_test")) { HP_occlusion_test = true; extensions.Remove("glHP_occlusion_test"); } - if (extensions.Contains("gl_HP_texture_lighting")) { HP_texture_lighting = true; extensions.Remove("glHP_texture_lighting"); } - if (extensions.Contains("gl_IBM_cull_vertex")) { IBM_cull_vertex = true; extensions.Remove("glIBM_cull_vertex"); } - if (extensions.Contains("gl_IBM_multimode_draw_arrays")) { IBM_multimode_draw_arrays = true; extensions.Remove("glIBM_multimode_draw_arrays"); } - if (extensions.Contains("gl_IBM_rasterpos_clip")) { IBM_rasterpos_clip = true; extensions.Remove("glIBM_rasterpos_clip"); } - if (extensions.Contains("gl_IBM_static_data")) { IBM_static_data = true; extensions.Remove("glIBM_static_data"); } - if (extensions.Contains("gl_IBM_texture_mirrored_repeat")) { IBM_texture_mirrored_repeat = true; extensions.Remove("glIBM_texture_mirrored_repeat"); } - if (extensions.Contains("gl_IBM_vertex_array_lists")) { IBM_vertex_array_lists = true; extensions.Remove("glIBM_vertex_array_lists"); } - if (extensions.Contains("gl_INGR_blend_func_separate")) { INGR_blend_func_separate = true; extensions.Remove("glINGR_blend_func_separate"); } - if (extensions.Contains("gl_INGR_color_clamp")) { INGR_color_clamp = true; extensions.Remove("glINGR_color_clamp"); } - if (extensions.Contains("gl_INGR_interlace_read")) { INGR_interlace_read = true; extensions.Remove("glINGR_interlace_read"); } - if (extensions.Contains("gl_INTEL_blackhole_render")) { INTEL_blackhole_render = true; extensions.Remove("glINTEL_blackhole_render"); } - if (extensions.Contains("gl_INTEL_conservative_rasterization")) { INTEL_conservative_rasterization = true; extensions.Remove("glINTEL_conservative_rasterization"); } - if (extensions.Contains("gl_INTEL_fragment_shader_ordering")) { INTEL_fragment_shader_ordering = true; extensions.Remove("glINTEL_fragment_shader_ordering"); } - if (extensions.Contains("gl_INTEL_framebuffer_CMAA")) { INTEL_framebuffer_CMAA = true; extensions.Remove("glINTEL_framebuffer_CMAA"); } - if (extensions.Contains("gl_INTEL_map_texture")) { INTEL_map_texture = true; extensions.Remove("glINTEL_map_texture"); } - if (extensions.Contains("gl_INTEL_parallel_arrays")) { INTEL_parallel_arrays = true; extensions.Remove("glINTEL_parallel_arrays"); } - if (extensions.Contains("gl_INTEL_performance_query")) { INTEL_performance_query = true; extensions.Remove("glINTEL_performance_query"); } - if (extensions.Contains("gl_KHR_blend_equation_advanced")) { KHR_blend_equation_advanced = true; extensions.Remove("glKHR_blend_equation_advanced"); } - if (extensions.Contains("gl_KHR_blend_equation_advanced_coherent")) { KHR_blend_equation_advanced_coherent = true; extensions.Remove("glKHR_blend_equation_advanced_coherent"); } - if (extensions.Contains("gl_KHR_context_flush_control")) { KHR_context_flush_control = true; extensions.Remove("glKHR_context_flush_control"); } - if (extensions.Contains("gl_KHR_debug")) { KHR_debug = true; extensions.Remove("glKHR_debug"); } - if (extensions.Contains("gl_KHR_no_error")) { KHR_no_error = true; extensions.Remove("glKHR_no_error"); } - if (extensions.Contains("gl_KHR_parallel_shader_compile")) { KHR_parallel_shader_compile = true; extensions.Remove("glKHR_parallel_shader_compile"); } - if (extensions.Contains("gl_KHR_robust_buffer_access_behavior")) { KHR_robust_buffer_access_behavior = true; extensions.Remove("glKHR_robust_buffer_access_behavior"); } - if (extensions.Contains("gl_KHR_robustness")) { KHR_robustness = true; extensions.Remove("glKHR_robustness"); } - if (extensions.Contains("gl_KHR_shader_subgroup")) { KHR_shader_subgroup = true; extensions.Remove("glKHR_shader_subgroup"); } - if (extensions.Contains("gl_KHR_texture_compression_astc_hdr")) { KHR_texture_compression_astc_hdr = true; extensions.Remove("glKHR_texture_compression_astc_hdr"); } - if (extensions.Contains("gl_KHR_texture_compression_astc_ldr")) { KHR_texture_compression_astc_ldr = true; extensions.Remove("glKHR_texture_compression_astc_ldr"); } - if (extensions.Contains("gl_KHR_texture_compression_astc_sliced_3d")) { KHR_texture_compression_astc_sliced_3d = true; extensions.Remove("glKHR_texture_compression_astc_sliced_3d"); } - if (extensions.Contains("gl_MESAX_texture_stack")) { MESAX_texture_stack = true; extensions.Remove("glMESAX_texture_stack"); } - if (extensions.Contains("gl_MESA_framebuffer_flip_x")) { MESA_framebuffer_flip_x = true; extensions.Remove("glMESA_framebuffer_flip_x"); } - if (extensions.Contains("gl_MESA_framebuffer_flip_y")) { MESA_framebuffer_flip_y = true; extensions.Remove("glMESA_framebuffer_flip_y"); } - if (extensions.Contains("gl_MESA_framebuffer_swap_xy")) { MESA_framebuffer_swap_xy = true; extensions.Remove("glMESA_framebuffer_swap_xy"); } - if (extensions.Contains("gl_MESA_pack_invert")) { MESA_pack_invert = true; extensions.Remove("glMESA_pack_invert"); } - if (extensions.Contains("gl_MESA_program_binary_formats")) { MESA_program_binary_formats = true; extensions.Remove("glMESA_program_binary_formats"); } - if (extensions.Contains("gl_MESA_resize_buffers")) { MESA_resize_buffers = true; extensions.Remove("glMESA_resize_buffers"); } - if (extensions.Contains("gl_MESA_shader_integer_functions")) { MESA_shader_integer_functions = true; extensions.Remove("glMESA_shader_integer_functions"); } - if (extensions.Contains("gl_MESA_tile_raster_order")) { MESA_tile_raster_order = true; extensions.Remove("glMESA_tile_raster_order"); } - if (extensions.Contains("gl_MESA_window_pos")) { MESA_window_pos = true; extensions.Remove("glMESA_window_pos"); } - if (extensions.Contains("gl_MESA_ycbcr_texture")) { MESA_ycbcr_texture = true; extensions.Remove("glMESA_ycbcr_texture"); } - if (extensions.Contains("gl_NVX_blend_equation_advanced_multi_draw_buffers")) { NVX_blend_equation_advanced_multi_draw_buffers = true; extensions.Remove("glNVX_blend_equation_advanced_multi_draw_buffers"); } - if (extensions.Contains("gl_NVX_conditional_render")) { NVX_conditional_render = true; extensions.Remove("glNVX_conditional_render"); } - if (extensions.Contains("gl_NVX_gpu_memory_info")) { NVX_gpu_memory_info = true; extensions.Remove("glNVX_gpu_memory_info"); } - if (extensions.Contains("gl_NVX_gpu_multicast2")) { NVX_gpu_multicast2 = true; extensions.Remove("glNVX_gpu_multicast2"); } - if (extensions.Contains("gl_NVX_linked_gpu_multicast")) { NVX_linked_gpu_multicast = true; extensions.Remove("glNVX_linked_gpu_multicast"); } - if (extensions.Contains("gl_NVX_progress_fence")) { NVX_progress_fence = true; extensions.Remove("glNVX_progress_fence"); } - if (extensions.Contains("gl_NV_alpha_to_coverage_dither_control")) { NV_alpha_to_coverage_dither_control = true; extensions.Remove("glNV_alpha_to_coverage_dither_control"); } - if (extensions.Contains("gl_NV_bindless_multi_draw_indirect")) { NV_bindless_multi_draw_indirect = true; extensions.Remove("glNV_bindless_multi_draw_indirect"); } - if (extensions.Contains("gl_NV_bindless_multi_draw_indirect_count")) { NV_bindless_multi_draw_indirect_count = true; extensions.Remove("glNV_bindless_multi_draw_indirect_count"); } - if (extensions.Contains("gl_NV_bindless_texture")) { NV_bindless_texture = true; extensions.Remove("glNV_bindless_texture"); } - if (extensions.Contains("gl_NV_blend_equation_advanced")) { NV_blend_equation_advanced = true; extensions.Remove("glNV_blend_equation_advanced"); } - if (extensions.Contains("gl_NV_blend_equation_advanced_coherent")) { NV_blend_equation_advanced_coherent = true; extensions.Remove("glNV_blend_equation_advanced_coherent"); } - if (extensions.Contains("gl_NV_blend_minmax_factor")) { NV_blend_minmax_factor = true; extensions.Remove("glNV_blend_minmax_factor"); } - if (extensions.Contains("gl_NV_blend_square")) { NV_blend_square = true; extensions.Remove("glNV_blend_square"); } - if (extensions.Contains("gl_NV_clip_space_w_scaling")) { NV_clip_space_w_scaling = true; extensions.Remove("glNV_clip_space_w_scaling"); } - if (extensions.Contains("gl_NV_command_list")) { NV_command_list = true; extensions.Remove("glNV_command_list"); } - if (extensions.Contains("gl_NV_compute_program5")) { NV_compute_program5 = true; extensions.Remove("glNV_compute_program5"); } - if (extensions.Contains("gl_NV_compute_shader_derivatives")) { NV_compute_shader_derivatives = true; extensions.Remove("glNV_compute_shader_derivatives"); } - if (extensions.Contains("gl_NV_conditional_render")) { NV_conditional_render = true; extensions.Remove("glNV_conditional_render"); } - if (extensions.Contains("gl_NV_conservative_raster")) { NV_conservative_raster = true; extensions.Remove("glNV_conservative_raster"); } - if (extensions.Contains("gl_NV_conservative_raster_dilate")) { NV_conservative_raster_dilate = true; extensions.Remove("glNV_conservative_raster_dilate"); } - if (extensions.Contains("gl_NV_conservative_raster_pre_snap")) { NV_conservative_raster_pre_snap = true; extensions.Remove("glNV_conservative_raster_pre_snap"); } - if (extensions.Contains("gl_NV_conservative_raster_pre_snap_triangles")) { NV_conservative_raster_pre_snap_triangles = true; extensions.Remove("glNV_conservative_raster_pre_snap_triangles"); } - if (extensions.Contains("gl_NV_conservative_raster_underestimation")) { NV_conservative_raster_underestimation = true; extensions.Remove("glNV_conservative_raster_underestimation"); } - if (extensions.Contains("gl_NV_copy_depth_to_color")) { NV_copy_depth_to_color = true; extensions.Remove("glNV_copy_depth_to_color"); } - if (extensions.Contains("gl_NV_copy_image")) { NV_copy_image = true; extensions.Remove("glNV_copy_image"); } - if (extensions.Contains("gl_NV_deep_texture3D")) { NV_deep_texture3D = true; extensions.Remove("glNV_deep_texture3D"); } - if (extensions.Contains("gl_NV_depth_buffer_float")) { NV_depth_buffer_float = true; extensions.Remove("glNV_depth_buffer_float"); } - if (extensions.Contains("gl_NV_depth_clamp")) { NV_depth_clamp = true; extensions.Remove("glNV_depth_clamp"); } - if (extensions.Contains("gl_NV_draw_texture")) { NV_draw_texture = true; extensions.Remove("glNV_draw_texture"); } - if (extensions.Contains("gl_NV_draw_vulkan_image")) { NV_draw_vulkan_image = true; extensions.Remove("glNV_draw_vulkan_image"); } - if (extensions.Contains("gl_NV_evaluators")) { NV_evaluators = true; extensions.Remove("glNV_evaluators"); } - if (extensions.Contains("gl_NV_explicit_multisample")) { NV_explicit_multisample = true; extensions.Remove("glNV_explicit_multisample"); } - if (extensions.Contains("gl_NV_fence")) { NV_fence = true; extensions.Remove("glNV_fence"); } - if (extensions.Contains("gl_NV_fill_rectangle")) { NV_fill_rectangle = true; extensions.Remove("glNV_fill_rectangle"); } - if (extensions.Contains("gl_NV_float_buffer")) { NV_float_buffer = true; extensions.Remove("glNV_float_buffer"); } - if (extensions.Contains("gl_NV_fog_distance")) { NV_fog_distance = true; extensions.Remove("glNV_fog_distance"); } - if (extensions.Contains("gl_NV_fragment_coverage_to_color")) { NV_fragment_coverage_to_color = true; extensions.Remove("glNV_fragment_coverage_to_color"); } - if (extensions.Contains("gl_NV_fragment_program")) { NV_fragment_program = true; extensions.Remove("glNV_fragment_program"); } - if (extensions.Contains("gl_NV_fragment_program2")) { NV_fragment_program2 = true; extensions.Remove("glNV_fragment_program2"); } - if (extensions.Contains("gl_NV_fragment_program4")) { NV_fragment_program4 = true; extensions.Remove("glNV_fragment_program4"); } - if (extensions.Contains("gl_NV_fragment_program_option")) { NV_fragment_program_option = true; extensions.Remove("glNV_fragment_program_option"); } - if (extensions.Contains("gl_NV_fragment_shader_barycentric")) { NV_fragment_shader_barycentric = true; extensions.Remove("glNV_fragment_shader_barycentric"); } - if (extensions.Contains("gl_NV_fragment_shader_interlock")) { NV_fragment_shader_interlock = true; extensions.Remove("glNV_fragment_shader_interlock"); } - if (extensions.Contains("gl_NV_framebuffer_mixed_samples")) { NV_framebuffer_mixed_samples = true; extensions.Remove("glNV_framebuffer_mixed_samples"); } - if (extensions.Contains("gl_NV_framebuffer_multisample_coverage")) { NV_framebuffer_multisample_coverage = true; extensions.Remove("glNV_framebuffer_multisample_coverage"); } - if (extensions.Contains("gl_NV_geometry_program4")) { NV_geometry_program4 = true; extensions.Remove("glNV_geometry_program4"); } - if (extensions.Contains("gl_NV_geometry_shader4")) { NV_geometry_shader4 = true; extensions.Remove("glNV_geometry_shader4"); } - if (extensions.Contains("gl_NV_geometry_shader_passthrough")) { NV_geometry_shader_passthrough = true; extensions.Remove("glNV_geometry_shader_passthrough"); } - if (extensions.Contains("gl_NV_gpu_multicast")) { NV_gpu_multicast = true; extensions.Remove("glNV_gpu_multicast"); } - if (extensions.Contains("gl_NV_gpu_program4")) { NV_gpu_program4 = true; extensions.Remove("glNV_gpu_program4"); } - if (extensions.Contains("gl_NV_gpu_program5")) { NV_gpu_program5 = true; extensions.Remove("glNV_gpu_program5"); } - if (extensions.Contains("gl_NV_gpu_program5_mem_extended")) { NV_gpu_program5_mem_extended = true; extensions.Remove("glNV_gpu_program5_mem_extended"); } - if (extensions.Contains("gl_NV_gpu_shader5")) { NV_gpu_shader5 = true; extensions.Remove("glNV_gpu_shader5"); } - if (extensions.Contains("gl_NV_half_float")) { NV_half_float = true; extensions.Remove("glNV_half_float"); } - if (extensions.Contains("gl_NV_internalformat_sample_query")) { NV_internalformat_sample_query = true; extensions.Remove("glNV_internalformat_sample_query"); } - if (extensions.Contains("gl_NV_light_max_exponent")) { NV_light_max_exponent = true; extensions.Remove("glNV_light_max_exponent"); } - if (extensions.Contains("gl_NV_memory_attachment")) { NV_memory_attachment = true; extensions.Remove("glNV_memory_attachment"); } - if (extensions.Contains("gl_NV_memory_object_sparse")) { NV_memory_object_sparse = true; extensions.Remove("glNV_memory_object_sparse"); } - if (extensions.Contains("gl_NV_mesh_shader")) { NV_mesh_shader = true; extensions.Remove("glNV_mesh_shader"); } - if (extensions.Contains("gl_NV_multisample_coverage")) { NV_multisample_coverage = true; extensions.Remove("glNV_multisample_coverage"); } - if (extensions.Contains("gl_NV_multisample_filter_hint")) { NV_multisample_filter_hint = true; extensions.Remove("glNV_multisample_filter_hint"); } - if (extensions.Contains("gl_NV_occlusion_query")) { NV_occlusion_query = true; extensions.Remove("glNV_occlusion_query"); } - if (extensions.Contains("gl_NV_packed_depth_stencil")) { NV_packed_depth_stencil = true; extensions.Remove("glNV_packed_depth_stencil"); } - if (extensions.Contains("gl_NV_parameter_buffer_object")) { NV_parameter_buffer_object = true; extensions.Remove("glNV_parameter_buffer_object"); } - if (extensions.Contains("gl_NV_parameter_buffer_object2")) { NV_parameter_buffer_object2 = true; extensions.Remove("glNV_parameter_buffer_object2"); } - if (extensions.Contains("gl_NV_path_rendering")) { NV_path_rendering = true; extensions.Remove("glNV_path_rendering"); } - if (extensions.Contains("gl_NV_path_rendering_shared_edge")) { NV_path_rendering_shared_edge = true; extensions.Remove("glNV_path_rendering_shared_edge"); } - if (extensions.Contains("gl_NV_pixel_data_range")) { NV_pixel_data_range = true; extensions.Remove("glNV_pixel_data_range"); } - if (extensions.Contains("gl_NV_point_sprite")) { NV_point_sprite = true; extensions.Remove("glNV_point_sprite"); } - if (extensions.Contains("gl_NV_present_video")) { NV_present_video = true; extensions.Remove("glNV_present_video"); } - if (extensions.Contains("gl_NV_primitive_restart")) { NV_primitive_restart = true; extensions.Remove("glNV_primitive_restart"); } - if (extensions.Contains("gl_NV_primitive_shading_rate")) { NV_primitive_shading_rate = true; extensions.Remove("glNV_primitive_shading_rate"); } - if (extensions.Contains("gl_NV_query_resource")) { NV_query_resource = true; extensions.Remove("glNV_query_resource"); } - if (extensions.Contains("gl_NV_query_resource_tag")) { NV_query_resource_tag = true; extensions.Remove("glNV_query_resource_tag"); } - if (extensions.Contains("gl_NV_register_combiners")) { NV_register_combiners = true; extensions.Remove("glNV_register_combiners"); } - if (extensions.Contains("gl_NV_register_combiners2")) { NV_register_combiners2 = true; extensions.Remove("glNV_register_combiners2"); } - if (extensions.Contains("gl_NV_representative_fragment_test")) { NV_representative_fragment_test = true; extensions.Remove("glNV_representative_fragment_test"); } - if (extensions.Contains("gl_NV_robustness_video_memory_purge")) { NV_robustness_video_memory_purge = true; extensions.Remove("glNV_robustness_video_memory_purge"); } - if (extensions.Contains("gl_NV_sample_locations")) { NV_sample_locations = true; extensions.Remove("glNV_sample_locations"); } - if (extensions.Contains("gl_NV_sample_mask_override_coverage")) { NV_sample_mask_override_coverage = true; extensions.Remove("glNV_sample_mask_override_coverage"); } - if (extensions.Contains("gl_NV_scissor_exclusive")) { NV_scissor_exclusive = true; extensions.Remove("glNV_scissor_exclusive"); } - if (extensions.Contains("gl_NV_shader_atomic_counters")) { NV_shader_atomic_counters = true; extensions.Remove("glNV_shader_atomic_counters"); } - if (extensions.Contains("gl_NV_shader_atomic_float")) { NV_shader_atomic_float = true; extensions.Remove("glNV_shader_atomic_float"); } - if (extensions.Contains("gl_NV_shader_atomic_float64")) { NV_shader_atomic_float64 = true; extensions.Remove("glNV_shader_atomic_float64"); } - if (extensions.Contains("gl_NV_shader_atomic_fp16_vector")) { NV_shader_atomic_fp16_vector = true; extensions.Remove("glNV_shader_atomic_fp16_vector"); } - if (extensions.Contains("gl_NV_shader_atomic_int64")) { NV_shader_atomic_int64 = true; extensions.Remove("glNV_shader_atomic_int64"); } - if (extensions.Contains("gl_NV_shader_buffer_load")) { NV_shader_buffer_load = true; extensions.Remove("glNV_shader_buffer_load"); } - if (extensions.Contains("gl_NV_shader_buffer_store")) { NV_shader_buffer_store = true; extensions.Remove("glNV_shader_buffer_store"); } - if (extensions.Contains("gl_NV_shader_storage_buffer_object")) { NV_shader_storage_buffer_object = true; extensions.Remove("glNV_shader_storage_buffer_object"); } - if (extensions.Contains("gl_NV_shader_subgroup_partitioned")) { NV_shader_subgroup_partitioned = true; extensions.Remove("glNV_shader_subgroup_partitioned"); } - if (extensions.Contains("gl_NV_shader_texture_footprint")) { NV_shader_texture_footprint = true; extensions.Remove("glNV_shader_texture_footprint"); } - if (extensions.Contains("gl_NV_shader_thread_group")) { NV_shader_thread_group = true; extensions.Remove("glNV_shader_thread_group"); } - if (extensions.Contains("gl_NV_shader_thread_shuffle")) { NV_shader_thread_shuffle = true; extensions.Remove("glNV_shader_thread_shuffle"); } - if (extensions.Contains("gl_NV_shading_rate_image")) { NV_shading_rate_image = true; extensions.Remove("glNV_shading_rate_image"); } - if (extensions.Contains("gl_NV_stereo_view_rendering")) { NV_stereo_view_rendering = true; extensions.Remove("glNV_stereo_view_rendering"); } - if (extensions.Contains("gl_NV_tessellation_program5")) { NV_tessellation_program5 = true; extensions.Remove("glNV_tessellation_program5"); } - if (extensions.Contains("gl_NV_texgen_emboss")) { NV_texgen_emboss = true; extensions.Remove("glNV_texgen_emboss"); } - if (extensions.Contains("gl_NV_texgen_reflection")) { NV_texgen_reflection = true; extensions.Remove("glNV_texgen_reflection"); } - if (extensions.Contains("gl_NV_texture_barrier")) { NV_texture_barrier = true; extensions.Remove("glNV_texture_barrier"); } - if (extensions.Contains("gl_NV_texture_compression_vtc")) { NV_texture_compression_vtc = true; extensions.Remove("glNV_texture_compression_vtc"); } - if (extensions.Contains("gl_NV_texture_env_combine4")) { NV_texture_env_combine4 = true; extensions.Remove("glNV_texture_env_combine4"); } - if (extensions.Contains("gl_NV_texture_expand_normal")) { NV_texture_expand_normal = true; extensions.Remove("glNV_texture_expand_normal"); } - if (extensions.Contains("gl_NV_texture_multisample")) { NV_texture_multisample = true; extensions.Remove("glNV_texture_multisample"); } - if (extensions.Contains("gl_NV_texture_rectangle")) { NV_texture_rectangle = true; extensions.Remove("glNV_texture_rectangle"); } - if (extensions.Contains("gl_NV_texture_rectangle_compressed")) { NV_texture_rectangle_compressed = true; extensions.Remove("glNV_texture_rectangle_compressed"); } - if (extensions.Contains("gl_NV_texture_shader")) { NV_texture_shader = true; extensions.Remove("glNV_texture_shader"); } - if (extensions.Contains("gl_NV_texture_shader2")) { NV_texture_shader2 = true; extensions.Remove("glNV_texture_shader2"); } - if (extensions.Contains("gl_NV_texture_shader3")) { NV_texture_shader3 = true; extensions.Remove("glNV_texture_shader3"); } - if (extensions.Contains("gl_NV_timeline_semaphore")) { NV_timeline_semaphore = true; extensions.Remove("glNV_timeline_semaphore"); } - if (extensions.Contains("gl_NV_transform_feedback")) { NV_transform_feedback = true; extensions.Remove("glNV_transform_feedback"); } - if (extensions.Contains("gl_NV_transform_feedback2")) { NV_transform_feedback2 = true; extensions.Remove("glNV_transform_feedback2"); } - if (extensions.Contains("gl_NV_uniform_buffer_std430_layout")) { NV_uniform_buffer_std430_layout = true; extensions.Remove("glNV_uniform_buffer_std430_layout"); } - if (extensions.Contains("gl_NV_uniform_buffer_unified_memory")) { NV_uniform_buffer_unified_memory = true; extensions.Remove("glNV_uniform_buffer_unified_memory"); } - if (extensions.Contains("gl_NV_vdpau_interop")) { NV_vdpau_interop = true; extensions.Remove("glNV_vdpau_interop"); } - if (extensions.Contains("gl_NV_vdpau_interop2")) { NV_vdpau_interop2 = true; extensions.Remove("glNV_vdpau_interop2"); } - if (extensions.Contains("gl_NV_vertex_array_range")) { NV_vertex_array_range = true; extensions.Remove("glNV_vertex_array_range"); } - if (extensions.Contains("gl_NV_vertex_array_range2")) { NV_vertex_array_range2 = true; extensions.Remove("glNV_vertex_array_range2"); } - if (extensions.Contains("gl_NV_vertex_attrib_integer_64bit")) { NV_vertex_attrib_integer_64bit = true; extensions.Remove("glNV_vertex_attrib_integer_64bit"); } - if (extensions.Contains("gl_NV_vertex_buffer_unified_memory")) { NV_vertex_buffer_unified_memory = true; extensions.Remove("glNV_vertex_buffer_unified_memory"); } - if (extensions.Contains("gl_NV_vertex_program")) { NV_vertex_program = true; extensions.Remove("glNV_vertex_program"); } - if (extensions.Contains("gl_NV_vertex_program1_1")) { NV_vertex_program1_1 = true; extensions.Remove("glNV_vertex_program1_1"); } - if (extensions.Contains("gl_NV_vertex_program2")) { NV_vertex_program2 = true; extensions.Remove("glNV_vertex_program2"); } - if (extensions.Contains("gl_NV_vertex_program2_option")) { NV_vertex_program2_option = true; extensions.Remove("glNV_vertex_program2_option"); } - if (extensions.Contains("gl_NV_vertex_program3")) { NV_vertex_program3 = true; extensions.Remove("glNV_vertex_program3"); } - if (extensions.Contains("gl_NV_vertex_program4")) { NV_vertex_program4 = true; extensions.Remove("glNV_vertex_program4"); } - if (extensions.Contains("gl_NV_video_capture")) { NV_video_capture = true; extensions.Remove("glNV_video_capture"); } - if (extensions.Contains("gl_NV_viewport_array2")) { NV_viewport_array2 = true; extensions.Remove("glNV_viewport_array2"); } - if (extensions.Contains("gl_NV_viewport_swizzle")) { NV_viewport_swizzle = true; extensions.Remove("glNV_viewport_swizzle"); } - if (extensions.Contains("gl_OES_byte_coordinates")) { OES_byte_coordinates = true; extensions.Remove("glOES_byte_coordinates"); } - if (extensions.Contains("gl_OES_compressed_paletted_texture")) { OES_compressed_paletted_texture = true; extensions.Remove("glOES_compressed_paletted_texture"); } - if (extensions.Contains("gl_OES_fixed_point")) { OES_fixed_point = true; extensions.Remove("glOES_fixed_point"); } - if (extensions.Contains("gl_OES_query_matrix")) { OES_query_matrix = true; extensions.Remove("glOES_query_matrix"); } - if (extensions.Contains("gl_OES_read_format")) { OES_read_format = true; extensions.Remove("glOES_read_format"); } - if (extensions.Contains("gl_OES_single_precision")) { OES_single_precision = true; extensions.Remove("glOES_single_precision"); } - if (extensions.Contains("gl_OML_interlace")) { OML_interlace = true; extensions.Remove("glOML_interlace"); } - if (extensions.Contains("gl_OML_resample")) { OML_resample = true; extensions.Remove("glOML_resample"); } - if (extensions.Contains("gl_OML_subsample")) { OML_subsample = true; extensions.Remove("glOML_subsample"); } - if (extensions.Contains("gl_OVR_multiview")) { OVR_multiview = true; extensions.Remove("glOVR_multiview"); } - if (extensions.Contains("gl_OVR_multiview2")) { OVR_multiview2 = true; extensions.Remove("glOVR_multiview2"); } - if (extensions.Contains("gl_PGI_misc_hints")) { PGI_misc_hints = true; extensions.Remove("glPGI_misc_hints"); } - if (extensions.Contains("gl_PGI_vertex_hints")) { PGI_vertex_hints = true; extensions.Remove("glPGI_vertex_hints"); } - if (extensions.Contains("gl_REND_screen_coordinates")) { REND_screen_coordinates = true; extensions.Remove("glREND_screen_coordinates"); } - if (extensions.Contains("gl_S3_s3tc")) { S3_s3tc = true; extensions.Remove("glS3_s3tc"); } - if (extensions.Contains("gl_SGIS_detail_texture")) { SGIS_detail_texture = true; extensions.Remove("glSGIS_detail_texture"); } - if (extensions.Contains("gl_SGIS_fog_function")) { SGIS_fog_function = true; extensions.Remove("glSGIS_fog_function"); } - if (extensions.Contains("gl_SGIS_generate_mipmap")) { SGIS_generate_mipmap = true; extensions.Remove("glSGIS_generate_mipmap"); } - if (extensions.Contains("gl_SGIS_multisample")) { SGIS_multisample = true; extensions.Remove("glSGIS_multisample"); } - if (extensions.Contains("gl_SGIS_pixel_texture")) { SGIS_pixel_texture = true; extensions.Remove("glSGIS_pixel_texture"); } - if (extensions.Contains("gl_SGIS_point_line_texgen")) { SGIS_point_line_texgen = true; extensions.Remove("glSGIS_point_line_texgen"); } - if (extensions.Contains("gl_SGIS_point_parameters")) { SGIS_point_parameters = true; extensions.Remove("glSGIS_point_parameters"); } - if (extensions.Contains("gl_SGIS_sharpen_texture")) { SGIS_sharpen_texture = true; extensions.Remove("glSGIS_sharpen_texture"); } - if (extensions.Contains("gl_SGIS_texture4D")) { SGIS_texture4D = true; extensions.Remove("glSGIS_texture4D"); } - if (extensions.Contains("gl_SGIS_texture_border_clamp")) { SGIS_texture_border_clamp = true; extensions.Remove("glSGIS_texture_border_clamp"); } - if (extensions.Contains("gl_SGIS_texture_color_mask")) { SGIS_texture_color_mask = true; extensions.Remove("glSGIS_texture_color_mask"); } - if (extensions.Contains("gl_SGIS_texture_edge_clamp")) { SGIS_texture_edge_clamp = true; extensions.Remove("glSGIS_texture_edge_clamp"); } - if (extensions.Contains("gl_SGIS_texture_filter4")) { SGIS_texture_filter4 = true; extensions.Remove("glSGIS_texture_filter4"); } - if (extensions.Contains("gl_SGIS_texture_lod")) { SGIS_texture_lod = true; extensions.Remove("glSGIS_texture_lod"); } - if (extensions.Contains("gl_SGIS_texture_select")) { SGIS_texture_select = true; extensions.Remove("glSGIS_texture_select"); } - if (extensions.Contains("gl_SGIX_async")) { SGIX_async = true; extensions.Remove("glSGIX_async"); } - if (extensions.Contains("gl_SGIX_async_histogram")) { SGIX_async_histogram = true; extensions.Remove("glSGIX_async_histogram"); } - if (extensions.Contains("gl_SGIX_async_pixel")) { SGIX_async_pixel = true; extensions.Remove("glSGIX_async_pixel"); } - if (extensions.Contains("gl_SGIX_blend_alpha_minmax")) { SGIX_blend_alpha_minmax = true; extensions.Remove("glSGIX_blend_alpha_minmax"); } - if (extensions.Contains("gl_SGIX_calligraphic_fragment")) { SGIX_calligraphic_fragment = true; extensions.Remove("glSGIX_calligraphic_fragment"); } - if (extensions.Contains("gl_SGIX_clipmap")) { SGIX_clipmap = true; extensions.Remove("glSGIX_clipmap"); } - if (extensions.Contains("gl_SGIX_convolution_accuracy")) { SGIX_convolution_accuracy = true; extensions.Remove("glSGIX_convolution_accuracy"); } - if (extensions.Contains("gl_SGIX_depth_pass_instrument")) { SGIX_depth_pass_instrument = true; extensions.Remove("glSGIX_depth_pass_instrument"); } - if (extensions.Contains("gl_SGIX_depth_texture")) { SGIX_depth_texture = true; extensions.Remove("glSGIX_depth_texture"); } - if (extensions.Contains("gl_SGIX_flush_raster")) { SGIX_flush_raster = true; extensions.Remove("glSGIX_flush_raster"); } - if (extensions.Contains("gl_SGIX_fog_offset")) { SGIX_fog_offset = true; extensions.Remove("glSGIX_fog_offset"); } - if (extensions.Contains("gl_SGIX_fragment_lighting")) { SGIX_fragment_lighting = true; extensions.Remove("glSGIX_fragment_lighting"); } - if (extensions.Contains("gl_SGIX_framezoom")) { SGIX_framezoom = true; extensions.Remove("glSGIX_framezoom"); } - if (extensions.Contains("gl_SGIX_igloo_interface")) { SGIX_igloo_interface = true; extensions.Remove("glSGIX_igloo_interface"); } - if (extensions.Contains("gl_SGIX_instruments")) { SGIX_instruments = true; extensions.Remove("glSGIX_instruments"); } - if (extensions.Contains("gl_SGIX_interlace")) { SGIX_interlace = true; extensions.Remove("glSGIX_interlace"); } - if (extensions.Contains("gl_SGIX_ir_instrument1")) { SGIX_ir_instrument1 = true; extensions.Remove("glSGIX_ir_instrument1"); } - if (extensions.Contains("gl_SGIX_list_priority")) { SGIX_list_priority = true; extensions.Remove("glSGIX_list_priority"); } - if (extensions.Contains("gl_SGIX_pixel_texture")) { SGIX_pixel_texture = true; extensions.Remove("glSGIX_pixel_texture"); } - if (extensions.Contains("gl_SGIX_pixel_tiles")) { SGIX_pixel_tiles = true; extensions.Remove("glSGIX_pixel_tiles"); } - if (extensions.Contains("gl_SGIX_polynomial_ffd")) { SGIX_polynomial_ffd = true; extensions.Remove("glSGIX_polynomial_ffd"); } - if (extensions.Contains("gl_SGIX_reference_plane")) { SGIX_reference_plane = true; extensions.Remove("glSGIX_reference_plane"); } - if (extensions.Contains("gl_SGIX_resample")) { SGIX_resample = true; extensions.Remove("glSGIX_resample"); } - if (extensions.Contains("gl_SGIX_scalebias_hint")) { SGIX_scalebias_hint = true; extensions.Remove("glSGIX_scalebias_hint"); } - if (extensions.Contains("gl_SGIX_shadow")) { SGIX_shadow = true; extensions.Remove("glSGIX_shadow"); } - if (extensions.Contains("gl_SGIX_shadow_ambient")) { SGIX_shadow_ambient = true; extensions.Remove("glSGIX_shadow_ambient"); } - if (extensions.Contains("gl_SGIX_sprite")) { SGIX_sprite = true; extensions.Remove("glSGIX_sprite"); } - if (extensions.Contains("gl_SGIX_subsample")) { SGIX_subsample = true; extensions.Remove("glSGIX_subsample"); } - if (extensions.Contains("gl_SGIX_tag_sample_buffer")) { SGIX_tag_sample_buffer = true; extensions.Remove("glSGIX_tag_sample_buffer"); } - if (extensions.Contains("gl_SGIX_texture_add_env")) { SGIX_texture_add_env = true; extensions.Remove("glSGIX_texture_add_env"); } - if (extensions.Contains("gl_SGIX_texture_coordinate_clamp")) { SGIX_texture_coordinate_clamp = true; extensions.Remove("glSGIX_texture_coordinate_clamp"); } - if (extensions.Contains("gl_SGIX_texture_lod_bias")) { SGIX_texture_lod_bias = true; extensions.Remove("glSGIX_texture_lod_bias"); } - if (extensions.Contains("gl_SGIX_texture_multi_buffer")) { SGIX_texture_multi_buffer = true; extensions.Remove("glSGIX_texture_multi_buffer"); } - if (extensions.Contains("gl_SGIX_texture_scale_bias")) { SGIX_texture_scale_bias = true; extensions.Remove("glSGIX_texture_scale_bias"); } - if (extensions.Contains("gl_SGIX_vertex_preclip")) { SGIX_vertex_preclip = true; extensions.Remove("glSGIX_vertex_preclip"); } - if (extensions.Contains("gl_SGIX_ycrcb")) { SGIX_ycrcb = true; extensions.Remove("glSGIX_ycrcb"); } - if (extensions.Contains("gl_SGIX_ycrcb_subsample")) { SGIX_ycrcb_subsample = true; extensions.Remove("glSGIX_ycrcb_subsample"); } - if (extensions.Contains("gl_SGIX_ycrcba")) { SGIX_ycrcba = true; extensions.Remove("glSGIX_ycrcba"); } - if (extensions.Contains("gl_SGI_color_matrix")) { SGI_color_matrix = true; extensions.Remove("glSGI_color_matrix"); } - if (extensions.Contains("gl_SGI_color_table")) { SGI_color_table = true; extensions.Remove("glSGI_color_table"); } - if (extensions.Contains("gl_SGI_texture_color_table")) { SGI_texture_color_table = true; extensions.Remove("glSGI_texture_color_table"); } - if (extensions.Contains("gl_SUNX_constant_data")) { SUNX_constant_data = true; extensions.Remove("glSUNX_constant_data"); } - if (extensions.Contains("gl_SUN_convolution_border_modes")) { SUN_convolution_border_modes = true; extensions.Remove("glSUN_convolution_border_modes"); } - if (extensions.Contains("gl_SUN_global_alpha")) { SUN_global_alpha = true; extensions.Remove("glSUN_global_alpha"); } - if (extensions.Contains("gl_SUN_mesh_array")) { SUN_mesh_array = true; extensions.Remove("glSUN_mesh_array"); } - if (extensions.Contains("gl_SUN_slice_accum")) { SUN_slice_accum = true; extensions.Remove("glSUN_slice_accum"); } - if (extensions.Contains("gl_SUN_triangle_list")) { SUN_triangle_list = true; extensions.Remove("glSUN_triangle_list"); } - if (extensions.Contains("gl_SUN_vertex")) { SUN_vertex = true; extensions.Remove("glSUN_vertex"); } - if (extensions.Contains("gl_WIN_phong_shading")) { WIN_phong_shading = true; extensions.Remove("glWIN_phong_shading"); } - if (extensions.Contains("gl_WIN_specular_fog")) { WIN_specular_fog = true; extensions.Remove("glWIN_specular_fog"); } - - #endregion checkGLextensions - - InternalIO.InternalWriteLog("Find OpenGL extensions.", LogType.Info); - } - - /// - /// Get the function pointer of given OpenGL api name - /// - /// ContextName of the OpenGL api - /// The funtion pointer of the api in stream of - public static IntPtr LoadGLfunc(string name) - { - IntPtr ret = InternalIO.glfwGetProcAddress(name); - if (ret == default) - { - InternalIO.InternalAppendLog( - $"Cannot load OpenGL api called {name}, this api may not exist or supported."); - return ret; - } - return ret; - } - - internal static void CheckCoreVersion(int majorVersion, int minorVersion) - { - if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 0))) - { - core10 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 1))) - { - core11 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 2))) - { - core12 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 3))) - { - core13 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 4))) - { - core14 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 5))) - { - core15 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 2) || ((majorVersion == 2) && (minorVersion == 0))) - { - core20 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 2) || ((majorVersion == 2) && (minorVersion == 1))) - { - core21 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 3) || ((majorVersion == 3) && (minorVersion == 0))) - { - core30 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 3) || ((majorVersion == 3) && (minorVersion == 1))) - { - core31 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 3) || ((majorVersion == 3) && (minorVersion == 2))) - { - core32 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 3) || ((majorVersion == 3) && (minorVersion == 3))) - { - core33 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 0))) - { - core40 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 1))) - { - core41 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 2))) - { - core42 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 3))) - { - core43 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 4))) - { - core44 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 5))) - { - core45 = true; - } - else - { - goto log; - } - - if ((majorVersion >= 4) || ((majorVersion == 4) && (minorVersion == 6))) - { - core46 = true; - } - else - { - goto log; - } - - log: - { - InternalIO.InternalWriteLog("Find core OpenGL version.", LogType.Info); - return; - } - } - - internal static unsafe string GetExtensions(this GLcontext context) - { - if (context.glGetString == null) - { - return string.Empty; - } - return Marshal.PtrToStringAnsi( - context.glGetString(glExtension)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static T internalLoadAPI(IntPtr ptr) where T : Delegate - { - try - { - if (ptr == IntPtr.Zero) { return null; } - T func = Marshal.GetDelegateForFunctionPointer(ptr); - return func; - } - catch (Exception ex) - { - InternalIO.InternalWriteLog( - $"{$"Failed to convert the api {typeof(T).Name}.\n"}{ex.Message}", LogType.Warning); - return default; - } - } - - internal static unsafe void LoadGLcore10(GLcontext* contextPtr, delegate* load) - { - if (!core10) - { - InternalIO.InternalAppendLog("The core version 1.0 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glBlendFunc = (delegate*)load("glBlendFunc"); - contextPtr->glClear = (delegate*)load("glClear"); - contextPtr->glClearColor = (delegate*)load("glClearColor"); - contextPtr->glClearDepth = (delegate*)load("glClearDepth"); - contextPtr->glClearStencil = (delegate*)load("glClearStencil"); - contextPtr->glColorMask = (delegate*)load("glColorMask"); - contextPtr->glCullFace = (delegate*)load("glCullFace"); - contextPtr->glDepthFunc = (delegate*)load("glDepthFunc"); - contextPtr->glDepthMask = (delegate*)load("glDepthMask"); - contextPtr->glDepthRange = (delegate*)load("glDepthRange"); - contextPtr->glDisable = (delegate*)load("glDisable"); - contextPtr->glDrawBuffer = (delegate*)load("glDrawBuffer"); - contextPtr->glEnable = (delegate*)load("glEnable"); - contextPtr->glFinish = (delegate*)load("glFinish"); - contextPtr->glFlush = (delegate*)load("glFlush"); - contextPtr->glFrontFace = (delegate*)load("glFrontFace"); - contextPtr->glGetBooleanv = (delegate*)load("glGetBooleanv"); - contextPtr->glGetDoublev = (delegate*)load("glGetDoublev"); - contextPtr->glGetError = (delegate*)load("glGetError"); - contextPtr->glGetFloatv = (delegate*)load("glGetFloatv"); - contextPtr->glGetIntegerv = (delegate*)load("glGetIntegerv"); - contextPtr->glGetString = (delegate*)load("glGetString"); - contextPtr->glGetTexImage = (delegate*)load("glGetTexImage"); - contextPtr->glGetTexLevelParameterfv = (delegate*)load("glGetTexLevelParameterfv"); - contextPtr->glGetTexLevelParameteriv = (delegate*)load("glGetTexLevelParameteriv"); - contextPtr->glGetTexParameterfv = (delegate*)load("glGetTexParameterfv"); - contextPtr->glGetTexParameteriv = (delegate*)load("glGetTexParameteriv"); - contextPtr->glHint = (delegate*)load("glHint"); - contextPtr->glIsEnabled = (delegate*)load("glIsEnabled"); - contextPtr->glLineWidth = (delegate*)load("glLineWidth"); - contextPtr->glLogicOp = (delegate*)load("glLogicOp"); - contextPtr->glPixelStoref = (delegate*)load("glPixelStoref"); - contextPtr->glPixelStorei = (delegate*)load("glPixelStorei"); - contextPtr->glPointSize = (delegate*)load("glPointSize"); - contextPtr->glPolygonMode = (delegate*)load("glPolygonMode"); - contextPtr->glReadBuffer = (delegate*)load("glReadBuffer"); - contextPtr->glReadPixels = (delegate*)load("glReadPixels"); - contextPtr->glScissor = (delegate*)load("glScissor"); - contextPtr->glStencilFunc = (delegate*)load("glStencilFunc"); - contextPtr->glStencilMask = (delegate*)load("glStencilMask"); - contextPtr->glStencilOp = (delegate*)load("glStencilOp"); - contextPtr->glTexImage1D = (delegate*)load("glTexImage1D"); - contextPtr->glTexImage2D = (delegate*)load("glTexImage2D"); - contextPtr->glTexParameterf = (delegate*)load("glTexParameterf"); - contextPtr->glTexParameterfv = (delegate*)load("glTexParameterfv"); - contextPtr->glTexParameteri = (delegate*)load("glTexParameteri"); - contextPtr->glTexParameteriv = (delegate*)load("glTexParameteriv"); - contextPtr->glViewport = (delegate*)load("glViewport"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 1.0 APIs"); - } - - internal static unsafe void LoadGLcore11(GLcontext* contextPtr, delegate* load) - { - if (!core11) - { - InternalIO.InternalAppendLog("The core version 1.1 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glBindTexture = (delegate*)load("glBindTexture"); - contextPtr->glCopyTexImage1D = (delegate*)load("glCopyTexImage1D"); - contextPtr->glCopyTexImage2D = (delegate*)load("glCopyTexImage2D"); - contextPtr->glCopyTexSubImage1D = (delegate*)load("glCopyTexSubImage1D"); - contextPtr->glCopyTexSubImage2D = (delegate*)load("glCopyTexSubImage2D"); - contextPtr->glDeleteTextures = (delegate*)load("glDeleteTextures"); - contextPtr->glDrawArrays = (delegate*)load("glDrawArrays"); - contextPtr->glDrawElements = (delegate*)load("glDrawElements"); - contextPtr->glGenTextures = (delegate*)load("glGenTextures"); - contextPtr->glGetPointerv = (delegate*)load("glGetPointerv"); - contextPtr->glIsTexture = (delegate*)load("glIsTexture"); - contextPtr->glPolygonOffset = (delegate*)load("glPolygonOffset"); - contextPtr->glTexSubImage1D = (delegate*)load("glTexSubImage1D"); - contextPtr->glTexSubImage2D = (delegate*)load("glTexSubImage2D"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 1.1 APIs"); - } - - internal static unsafe void LoadGLcore12(GLcontext* contextPtr, delegate* load) - { - if (!core12) - { - InternalIO.InternalAppendLog("The core version 1.2 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glCopyTexSubImage3D = (delegate*)load("glCopyTexSubImage3D"); - contextPtr->glDrawRangeElements = (delegate*)load("glDrawRangeElements"); - contextPtr->glTexImage3D = (delegate*)load("glTexImage3D"); - contextPtr->glTexSubImage3D = (delegate*)load("glTexSubImage3D"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 1.2 APIs"); - } - - internal static unsafe void LoadGLcore13(GLcontext* contextPtr, delegate* load) - { - if (!core13) - { - InternalIO.InternalAppendLog("The core version 1.3 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glActiveTexture = (delegate*)load("glActiveTexture"); - contextPtr->glCompressedTexImage1D = (delegate*)load("glCompressedTexImage1D"); - contextPtr->glCompressedTexImage2D = (delegate*)load("glCompressedTexImage2D"); - contextPtr->glCompressedTexImage3D = (delegate*)load("glCompressedTexImage3D"); - contextPtr->glCompressedTexSubImage1D = (delegate*)load("glCompressedTexSubImage1D"); - contextPtr->glCompressedTexSubImage2D = (delegate*)load("glCompressedTexSubImage2D"); - contextPtr->glCompressedTexSubImage3D = (delegate*)load("glCompressedTexSubImage3D"); - contextPtr->glGetCompressedTexImage = (delegate*)load("glGetCompressedTexImage"); - contextPtr->glSampleCoverage = (delegate*)load("glSampleCoverage"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 1.3 APIs"); - } - - internal static unsafe void LoadGLcore14(GLcontext* contextPtr, delegate* load) - { - if (!core14) - { - InternalIO.InternalAppendLog("The core version 1.4 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glBlendColor = (delegate*)load("glBlendColor"); - contextPtr->glBlendEquation = (delegate*)load("glBlendEquation"); - contextPtr->glBlendFuncSeparate = (delegate*)load("glBlendFuncSeparate"); - contextPtr->glMultiDrawArrays = (delegate*)load("glMultiDrawArrays"); - contextPtr->glMultiDrawElements = (delegate*)load("glMultiDrawElements"); - contextPtr->glPointParameterf = (delegate*)load("glPointParameterf"); - contextPtr->glPointParameterfv = (delegate*)load("glPointParameterfv"); - contextPtr->glPointParameteri = (delegate*)load("glPointParameteri"); - contextPtr->glPointParameteriv = (delegate*)load("glPointParameteriv"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 1.4 APIs"); - } - - internal static unsafe void LoadGLcore15(GLcontext* contextPtr, delegate* load) - { - if (!core15) - { - InternalIO.InternalAppendLog("The core version 1.5 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glBeginQuery = (delegate*)load("glBeginQuery"); - contextPtr->glBindBuffer = (delegate*)load("glBindBuffer"); - contextPtr->glBufferData = (delegate*)load("glBufferData"); - contextPtr->glBufferSubData = (delegate*)load("glBufferSubData"); - contextPtr->glDeleteBuffers = (delegate*)load("glDeleteBuffers"); - contextPtr->glDeleteQueries = (delegate*)load("glDeleteQueries"); - contextPtr->glEndQuery = (delegate*)load("glEndQuery"); - contextPtr->glGenBuffers = (delegate*)load("glGenBuffers"); - contextPtr->glGenQueries = (delegate*)load("glGenQueries"); - contextPtr->glGetBufferParameteriv = (delegate*)load("glGetBufferParameteriv"); - contextPtr->glGetBufferPointerv = (delegate*)load("glGetBufferPointerv"); - contextPtr->glGetBufferSubData = (delegate*)load("glGetBufferSubData"); - contextPtr->glGetQueryObjectiv = (delegate*)load("glGetQueryObjectiv"); - contextPtr->glGetQueryObjectuiv = (delegate*)load("glGetQueryObjectuiv"); - contextPtr->glGetQueryiv = (delegate*)load("glGetQueryiv"); - contextPtr->glIsBuffer = (delegate*)load("glIsBuffer"); - contextPtr->glIsQuery = (delegate*)load("glIsQuery"); - contextPtr->glMapBuffer = (delegate*)load("glMapBuffer"); - contextPtr->glUnmapBuffer = (delegate*)load("glUnmapBuffer"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 1.5 APIs"); - } - - internal static unsafe void LoadGLcore20(GLcontext* contextPtr, delegate* load) - { - if (!core20) - { - InternalIO.InternalAppendLog("The core version 2.0 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glAttachShader = (delegate*)load("glAttachShader"); - contextPtr->glBindAttribLocation = (delegate*)load("glBindAttribLocation"); - contextPtr->glBlendEquationSeparate = (delegate*)load("glBlendEquationSeparate"); - contextPtr->glCompileShader = (delegate*)load("glCompileShader"); - contextPtr->glCreateProgram = (delegate*)load("glCreateProgram"); - contextPtr->glCreateShader = (delegate*)load("glCreateShader"); - contextPtr->glDeleteProgram = (delegate*)load("glDeleteProgram"); - contextPtr->glDeleteShader = (delegate*)load("glDeleteShader"); - contextPtr->glDetachShader = (delegate*)load("glDetachShader"); - contextPtr->glDisableVertexAttribArray = (delegate*)load("glDisableVertexAttribArray"); - contextPtr->glDrawBuffers = (delegate*)load("glDrawBuffers"); - contextPtr->glEnableVertexAttribArray = (delegate*)load("glEnableVertexAttribArray"); - contextPtr->glGetActiveAttrib = (delegate*)load("glGetActiveAttrib"); - contextPtr->glGetActiveUniform = (delegate*)load("glGetActiveUniform"); - contextPtr->glGetAttachedShaders = (delegate*)load("glGetAttachedShaders"); - contextPtr->glGetAttribLocation = (delegate*)load("glGetAttribLocation"); - contextPtr->glGetProgramInfoLog = (delegate*)load("glGetProgramInfoLog"); - contextPtr->glGetProgramiv = (delegate*)load("glGetProgramiv"); - contextPtr->glGetShaderInfoLog = (delegate*)load("glGetShaderInfoLog"); - contextPtr->glGetShaderSource = (delegate*)load("glGetShaderSource"); - contextPtr->glGetShaderiv = (delegate*)load("glGetShaderiv"); - contextPtr->glGetUniformLocation = (delegate*)load("glGetUniformLocation"); - contextPtr->glGetUniformfv = (delegate*)load("glGetUniformfv"); - contextPtr->glGetUniformiv = (delegate*)load("glGetUniformiv"); - contextPtr->glGetVertexAttribPointerv = (delegate*)load("glGetVertexAttribPointerv"); - contextPtr->glGetVertexAttribdv = (delegate*)load("glGetVertexAttribdv"); - contextPtr->glGetVertexAttribfv = (delegate*)load("glGetVertexAttribfv"); - contextPtr->glGetVertexAttribiv = (delegate*)load("glGetVertexAttribiv"); - contextPtr->glIsProgram = (delegate*)load("glIsProgram"); - contextPtr->glIsShader = (delegate*)load("glIsShader"); - contextPtr->glLinkProgram = (delegate*)load("glLinkProgram"); - contextPtr->glShaderSource = (delegate* unmanaged[Stdcall])load("glShaderSource"); - contextPtr->glStencilFuncSeparate = (delegate*)load("glStencilFuncSeparate"); - contextPtr->glStencilMaskSeparate = (delegate*)load("glStencilMaskSeparate"); - contextPtr->glStencilOpSeparate = (delegate*)load("glStencilOpSeparate"); - contextPtr->glUniform1f = (delegate*)load("glUniform1f"); - contextPtr->glUniform1fv = (delegate*)load("glUniform1fv"); - contextPtr->glUniform1i = (delegate*)load("glUniform1i"); - contextPtr->glUniform1iv = (delegate*)load("glUniform1iv"); - contextPtr->glUniform2f = (delegate*)load("glUniform2f"); - contextPtr->glUniform2fv = (delegate*)load("glUniform2fv"); - contextPtr->glUniform2i = (delegate*)load("glUniform2i"); - contextPtr->glUniform2iv = (delegate*)load("glUniform2iv"); - contextPtr->glUniform3f = (delegate*)load("glUniform3f"); - contextPtr->glUniform3fv = (delegate*)load("glUniform3fv"); - contextPtr->glUniform3i = (delegate*)load("glUniform3i"); - contextPtr->glUniform3iv = (delegate*)load("glUniform3iv"); - contextPtr->glUniform4f = (delegate*)load("glUniform4f"); - contextPtr->glUniform4fv = (delegate*)load("glUniform4fv"); - contextPtr->glUniform4i = (delegate*)load("glUniform4i"); - contextPtr->glUniform4iv = (delegate*)load("glUniform4iv"); - contextPtr->glUniformMatrix2fv = (delegate*)load("glUniformMatrix2fv"); - contextPtr->glUniformMatrix3fv = (delegate*)load("glUniformMatrix3fv"); - contextPtr->glUniformMatrix4fv = (delegate*)load("glUniformMatrix4fv"); - contextPtr->glUseProgram = (delegate*)load("glUseProgram"); - contextPtr->glValidateProgram = (delegate*)load("glValidateProgram"); - contextPtr->glVertexAttrib1d = (delegate*)load("glVertexAttrib1d"); - contextPtr->glVertexAttrib1dv = (delegate*)load("glVertexAttrib1dv"); - contextPtr->glVertexAttrib1f = (delegate*)load("glVertexAttrib1f"); - contextPtr->glVertexAttrib1fv = (delegate*)load("glVertexAttrib1fv"); - contextPtr->glVertexAttrib1s = (delegate*)load("glVertexAttrib1s"); - contextPtr->glVertexAttrib1sv = (delegate*)load("glVertexAttrib1sv"); - contextPtr->glVertexAttrib2d = (delegate*)load("glVertexAttrib2d"); - contextPtr->glVertexAttrib2dv = (delegate*)load("glVertexAttrib2dv"); - contextPtr->glVertexAttrib2f = (delegate*)load("glVertexAttrib2f"); - contextPtr->glVertexAttrib2fv = (delegate*)load("glVertexAttrib2fv"); - contextPtr->glVertexAttrib2s = (delegate*)load("glVertexAttrib2s"); - contextPtr->glVertexAttrib2sv = (delegate*)load("glVertexAttrib2sv"); - contextPtr->glVertexAttrib3d = (delegate*)load("glVertexAttrib3d"); - contextPtr->glVertexAttrib3dv = (delegate*)load("glVertexAttrib3dv"); - contextPtr->glVertexAttrib3f = (delegate*)load("glVertexAttrib3f"); - contextPtr->glVertexAttrib3fv = (delegate*)load("glVertexAttrib3fv"); - contextPtr->glVertexAttrib3s = (delegate*)load("glVertexAttrib3s"); - contextPtr->glVertexAttrib3sv = (delegate*)load("glVertexAttrib3sv"); - contextPtr->glVertexAttrib4Nbv = (delegate*)load("glVertexAttrib4Nbv"); - contextPtr->glVertexAttrib4Niv = (delegate*)load("glVertexAttrib4Niv"); - contextPtr->glVertexAttrib4Nsv = (delegate*)load("glVertexAttrib4Nsv"); - contextPtr->glVertexAttrib4Nub = (delegate*)load("glVertexAttrib4Nub"); - contextPtr->glVertexAttrib4Nubv = (delegate*)load("glVertexAttrib4Nubv"); - contextPtr->glVertexAttrib4Nuiv = (delegate*)load("glVertexAttrib4Nuiv"); - contextPtr->glVertexAttrib4Nusv = (delegate*)load("glVertexAttrib4Nusv"); - contextPtr->glVertexAttrib4bv = (delegate*)load("glVertexAttrib4bv"); - contextPtr->glVertexAttrib4d = (delegate*)load("glVertexAttrib4d"); - contextPtr->glVertexAttrib4dv = (delegate*)load("glVertexAttrib4dv"); - contextPtr->glVertexAttrib4f = (delegate*)load("glVertexAttrib4f"); - contextPtr->glVertexAttrib4fv = (delegate*)load("glVertexAttrib4fv"); - contextPtr->glVertexAttrib4iv = (delegate*)load("glVertexAttrib4iv"); - contextPtr->glVertexAttrib4s = (delegate*)load("glVertexAttrib4s"); - contextPtr->glVertexAttrib4sv = (delegate*)load("glVertexAttrib4sv"); - contextPtr->glVertexAttrib4ubv = (delegate*)load("glVertexAttrib4ubv"); - contextPtr->glVertexAttrib4uiv = (delegate*)load("glVertexAttrib4uiv"); - contextPtr->glVertexAttrib4usv = (delegate*)load("glVertexAttrib4usv"); - contextPtr->glVertexAttribPointer = (delegate*)load("glVertexAttribPointer"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 2.0 APIs"); - } - - internal static unsafe void LoadGLcore21(GLcontext* contextPtr, delegate* load) - { - if (!core21) - { - InternalIO.InternalAppendLog("The core version 2.1 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glUniformMatrix2x3fv = (delegate*)load("glUniformMatrix2x3fv"); - contextPtr->glUniformMatrix2x4fv = (delegate*)load("glUniformMatrix2x4fv"); - contextPtr->glUniformMatrix3x2fv = (delegate*)load("glUniformMatrix3x2fv"); - contextPtr->glUniformMatrix3x4fv = (delegate*)load("glUniformMatrix3x4fv"); - contextPtr->glUniformMatrix4x2fv = (delegate*)load("glUniformMatrix4x2fv"); - contextPtr->glUniformMatrix4x3fv = (delegate*)load("glUniformMatrix4x3fv"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 2.1 APIs"); - } - - internal static unsafe void LoadGLcore30(GLcontext* contextPtr, delegate* load) - { - if (!core30) - { - InternalIO.InternalAppendLog("The core version 3.0 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glBeginConditionalRender = (delegate*)load("glBeginConditionalRender"); - contextPtr->glBeginTransformFeedback = (delegate*)load("glBeginTransformFeedback"); - contextPtr->glBindBufferBase = (delegate*)load("glBindBufferBase"); - contextPtr->glBindBufferRange = (delegate*)load("glBindBufferRange"); - contextPtr->glBindFragDataLocation = (delegate*)load("glBindFragDataLocation"); - contextPtr->glBindFramebuffer = (delegate*)load("glBindFramebuffer"); - contextPtr->glBindRenderbuffer = (delegate*)load("glBindRenderbuffer"); - contextPtr->glBindVertexArray = (delegate*)load("glBindVertexArray"); - contextPtr->glBlitFramebuffer = (delegate*)load("glBlitFramebuffer"); - contextPtr->glCheckFramebufferStatus = (delegate*)load("glCheckFramebufferStatus"); - contextPtr->glClampColor = (delegate*)load("glClampColor"); - contextPtr->glClearBufferfi = (delegate*)load("glClearBufferfi"); - contextPtr->glClearBufferfv = (delegate*)load("glClearBufferfv"); - contextPtr->glClearBufferiv = (delegate*)load("glClearBufferiv"); - contextPtr->glClearBufferuiv = (delegate*)load("glClearBufferuiv"); - contextPtr->glColorMaski = (delegate*)load("glColorMaski"); - contextPtr->glDeleteFramebuffers = (delegate*)load("glDeleteFramebuffers"); - contextPtr->glDeleteRenderbuffers = (delegate*)load("glDeleteRenderbuffers"); - contextPtr->glDeleteVertexArrays = (delegate*)load("glDeleteVertexArrays"); - contextPtr->glDisablei = (delegate*)load("glDisablei"); - contextPtr->glEnablei = (delegate*)load("glEnablei"); - contextPtr->glEndConditionalRender = (delegate*)load("glEndConditionalRender"); - contextPtr->glEndTransformFeedback = (delegate*)load("glEndTransformFeedback"); - contextPtr->glFlushMappedBufferRange = (delegate*)load("glFlushMappedBufferRange"); - contextPtr->glFramebufferRenderbuffer = (delegate*)load("glFramebufferRenderbuffer"); - contextPtr->glFramebufferTexture1D = (delegate*)load("glFramebufferTexture1D"); - contextPtr->glFramebufferTexture2D = (delegate*)load("glFramebufferTexture2D"); - contextPtr->glFramebufferTexture3D = (delegate*)load("glFramebufferTexture3D"); - contextPtr->glFramebufferTextureLayer = (delegate*)load("glFramebufferTextureLayer"); - contextPtr->glGenFramebuffers = (delegate*)load("glGenFramebuffers"); - contextPtr->glGenRenderbuffers = (delegate*)load("glGenRenderbuffers"); - contextPtr->glGenVertexArrays = (delegate*)load("glGenVertexArrays"); - contextPtr->glGenerateMipmap = (delegate*)load("glGenerateMipmap"); - contextPtr->glGetBooleani_v = (delegate*)load("glGetBooleani_v"); - contextPtr->glGetFragDataLocation = (delegate*)load("glGetFragDataLocation"); - contextPtr->glGetFramebufferAttachmentParameteriv = (delegate*)load("glGetFramebufferAttachmentParameteriv"); - contextPtr->glGetIntegeri_v = (delegate*)load("glGetIntegeri_v"); - contextPtr->glGetRenderbufferParameteriv = (delegate*)load("glGetRenderbufferParameteriv"); - contextPtr->glGetStringi = (delegate*)load("glGetStringi"); - contextPtr->glGetTexParameterIiv = (delegate*)load("glGetTexParameterIiv"); - contextPtr->glGetTexParameterIuiv = (delegate*)load("glGetTexParameterIuiv"); - contextPtr->glGetTransformFeedbackVarying = (delegate*)load("glGetTransformFeedbackVarying"); - contextPtr->glGetUniformuiv = (delegate*)load("glGetUniformuiv"); - contextPtr->glGetVertexAttribIiv = (delegate*)load("glGetVertexAttribIiv"); - contextPtr->glGetVertexAttribIuiv = (delegate*)load("glGetVertexAttribIuiv"); - contextPtr->glIsEnabledi = (delegate*)load("glIsEnabledi"); - contextPtr->glIsFramebuffer = (delegate*)load("glIsFramebuffer"); - contextPtr->glIsRenderbuffer = (delegate*)load("glIsRenderbuffer"); - contextPtr->glIsVertexArray = (delegate*)load("glIsVertexArray"); - contextPtr->glMapBufferRange = (delegate*)load("glMapBufferRange"); - contextPtr->glRenderbufferStorage = (delegate*)load("glRenderbufferStorage"); - contextPtr->glRenderbufferStorageMultisample = (delegate*)load("glRenderbufferStorageMultisample"); - contextPtr->glTexParameterIiv = (delegate*)load("glTexParameterIiv"); - contextPtr->glTexParameterIuiv = (delegate*)load("glTexParameterIuiv"); - contextPtr->glTransformFeedbackVaryings = (delegate*)load("glTransformFeedbackVaryings"); - contextPtr->glUniform1ui = (delegate*)load("glUniform1ui"); - contextPtr->glUniform1uiv = (delegate*)load("glUniform1uiv"); - contextPtr->glUniform2ui = (delegate*)load("glUniform2ui"); - contextPtr->glUniform2uiv = (delegate*)load("glUniform2uiv"); - contextPtr->glUniform3ui = (delegate*)load("glUniform3ui"); - contextPtr->glUniform3uiv = (delegate*)load("glUniform3uiv"); - contextPtr->glUniform4ui = (delegate*)load("glUniform4ui"); - contextPtr->glUniform4uiv = (delegate*)load("glUniform4uiv"); - contextPtr->glVertexAttribI1i = (delegate*)load("glVertexAttribI1i"); - contextPtr->glVertexAttribI1iv = (delegate*)load("glVertexAttribI1iv"); - contextPtr->glVertexAttribI1ui = (delegate*)load("glVertexAttribI1ui"); - contextPtr->glVertexAttribI1uiv = (delegate*)load("glVertexAttribI1uiv"); - contextPtr->glVertexAttribI2i = (delegate*)load("glVertexAttribI2i"); - contextPtr->glVertexAttribI2iv = (delegate*)load("glVertexAttribI2iv"); - contextPtr->glVertexAttribI2ui = (delegate*)load("glVertexAttribI2ui"); - contextPtr->glVertexAttribI2uiv = (delegate*)load("glVertexAttribI2uiv"); - contextPtr->glVertexAttribI3i = (delegate*)load("glVertexAttribI3i"); - contextPtr->glVertexAttribI3iv = (delegate*)load("glVertexAttribI3iv"); - contextPtr->glVertexAttribI3ui = (delegate*)load("glVertexAttribI3ui"); - contextPtr->glVertexAttribI3uiv = (delegate*)load("glVertexAttribI3uiv"); - contextPtr->glVertexAttribI4bv = (delegate*)load("glVertexAttribI4bv"); - contextPtr->glVertexAttribI4i = (delegate*)load("glVertexAttribI4i"); - contextPtr->glVertexAttribI4iv = (delegate*)load("glVertexAttribI4iv"); - contextPtr->glVertexAttribI4sv = (delegate*)load("glVertexAttribI4sv"); - contextPtr->glVertexAttribI4ubv = (delegate*)load("glVertexAttribI4ubv"); - contextPtr->glVertexAttribI4ui = (delegate*)load("glVertexAttribI4ui"); - contextPtr->glVertexAttribI4uiv = (delegate*)load("glVertexAttribI4uiv"); - contextPtr->glVertexAttribI4usv = (delegate*)load("glVertexAttribI4usv"); - contextPtr->glVertexAttribIPointer = (delegate*)load("glVertexAttribIPointer"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 3.0 APIs"); - } - - internal static unsafe void LoadGLcore31(GLcontext* contextPtr, delegate* load) - { - if (!core31) - { - InternalIO.InternalAppendLog("The core version 3.1 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glBindBufferBase = (delegate*)load("glBindBufferBase"); - contextPtr->glBindBufferRange = (delegate*)load("glBindBufferRange"); - contextPtr->glCopyBufferSubData = (delegate*)load("glCopyBufferSubData"); - contextPtr->glDrawArraysInstanced = (delegate*)load("glDrawArraysInstanced"); - contextPtr->glDrawElementsInstanced = (delegate*)load("glDrawElementsInstanced"); - contextPtr->glGetActiveUniformBlockName = (delegate*)load("glGetActiveUniformBlockName"); - contextPtr->glGetActiveUniformBlockiv = (delegate*)load("glGetActiveUniformBlockiv"); - contextPtr->glGetActiveUniformName = (delegate*)load("glGetActiveUniformName"); - contextPtr->glGetActiveUniformsiv = (delegate*)load("glGetActiveUniformsiv"); - contextPtr->glGetIntegeri_v = (delegate*)load("glGetIntegeri_v"); - contextPtr->glGetUniformBlockIndex = (delegate*)load("glGetUniformBlockIndex"); - contextPtr->glGetUniformIndices = (delegate*)load("glGetUniformIndices"); - contextPtr->glPrimitiveRestartIndex = (delegate*)load("glPrimitiveRestartIndex"); - contextPtr->glTexBuffer = (delegate*)load("glTexBuffer"); - contextPtr->glUniformBlockBinding = (delegate*)load("glUniformBlockBinding"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 3.1 APIs"); - } - - internal static unsafe void LoadGLcore32(GLcontext* contextPtr, delegate* load) - { - if (!core32) - { - InternalIO.InternalAppendLog("The core version 3.2 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glClientWaitSync = (delegate*)load("glClientWaitSync"); - contextPtr->glDeleteSync = (delegate*)load("glDeleteSync"); - contextPtr->glDrawElementsBaseVertex = (delegate*)load("glDrawElementsBaseVertex"); - contextPtr->glDrawElementsInstancedBaseVertex = (delegate*)load("glDrawElementsInstancedBaseVertex"); - contextPtr->glDrawRangeElementsBaseVertex = (delegate*)load("glDrawRangeElementsBaseVertex"); - contextPtr->glFenceSync = (delegate*)load("glFenceSync"); - contextPtr->glFramebufferTexture = (delegate*)load("glFramebufferTexture"); - contextPtr->glGetBufferParameteri64v = (delegate*)load("glGetBufferParameteri64v"); - contextPtr->glGetInteger64i_v = (delegate*)load("glGetInteger64i_v"); - contextPtr->glGetInteger64v = (delegate*)load("glGetInteger64v"); - contextPtr->glGetMultisamplefv = (delegate*)load("glGetMultisamplefv"); - contextPtr->glGetSynciv = (delegate*)load("glGetSynciv"); - contextPtr->glIsSync = (delegate*)load("glIsSync"); - contextPtr->glMultiDrawElementsBaseVertex = (delegate*)load("glMultiDrawElementsBaseVertex"); - contextPtr->glProvokingVertex = (delegate*)load("glProvokingVertex"); - contextPtr->glSampleMaski = (delegate*)load("glSampleMaski"); - contextPtr->glTexImage2DMultisample = (delegate*)load("glTexImage2DMultisample"); - contextPtr->glTexImage3DMultisample = (delegate*)load("glTexImage3DMultisample"); - contextPtr->glWaitSync = (delegate*)load("glWaitSync"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 3.2 APIs"); - } - - internal static unsafe void LoadGLcore33(GLcontext* contextPtr, delegate* load) - { - if (!core33) - { - InternalIO.InternalAppendLog("The core version 3.3 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glBindFragDataLocationIndexed = (delegate*)load("glBindFragDataLocationIndexed"); - contextPtr->glBindSampler = (delegate*)load("glBindSampler"); - contextPtr->glDeleteSamplers = (delegate*)load("glDeleteSamplers"); - contextPtr->glGenSamplers = (delegate*)load("glGenSamplers"); - contextPtr->glGetFragDataIndex = (delegate*)load("glGetFragDataIndex"); - contextPtr->glGetQueryObjecti64v = (delegate*)load("glGetQueryObjecti64v"); - contextPtr->glGetQueryObjectui64v = (delegate*)load("glGetQueryObjectui64v"); - contextPtr->glGetSamplerParameterIiv = (delegate*)load("glGetSamplerParameterIiv"); - contextPtr->glGetSamplerParameterIuiv = (delegate*)load("glGetSamplerParameterIuiv"); - contextPtr->glGetSamplerParameterfv = (delegate*)load("glGetSamplerParameterfv"); - contextPtr->glGetSamplerParameteriv = (delegate*)load("glGetSamplerParameteriv"); - contextPtr->glIsSampler = (delegate*)load("glIsSampler"); - contextPtr->glQueryCounter = (delegate*)load("glQueryCounter"); - contextPtr->glSamplerParameterIiv = (delegate*)load("glSamplerParameterIiv"); - contextPtr->glSamplerParameterIuiv = (delegate*)load("glSamplerParameterIuiv"); - contextPtr->glSamplerParameterf = (delegate*)load("glSamplerParameterf"); - contextPtr->glSamplerParameterfv = (delegate*)load("glSamplerParameterfv"); - contextPtr->glSamplerParameteri = (delegate*)load("glSamplerParameteri"); - contextPtr->glSamplerParameteriv = (delegate*)load("glSamplerParameteriv"); - contextPtr->glVertexAttribDivisor = (delegate*)load("glVertexAttribDivisor"); - contextPtr->glVertexAttribP1ui = (delegate*)load("glVertexAttribP1ui"); - contextPtr->glVertexAttribP1uiv = (delegate*)load("glVertexAttribP1uiv"); - contextPtr->glVertexAttribP2ui = (delegate*)load("glVertexAttribP2ui"); - contextPtr->glVertexAttribP2uiv = (delegate*)load("glVertexAttribP2uiv"); - contextPtr->glVertexAttribP3ui = (delegate*)load("glVertexAttribP3ui"); - contextPtr->glVertexAttribP3uiv = (delegate*)load("glVertexAttribP3uiv"); - contextPtr->glVertexAttribP4ui = (delegate*)load("glVertexAttribP4ui"); - contextPtr->glVertexAttribP4uiv = (delegate*)load("glVertexAttribP4uiv"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 3.3 APIs"); - } - - internal static unsafe void LoadGLcore40(GLcontext* contextPtr, delegate* load) - { - if (!core40) - { - InternalIO.InternalAppendLog("The core version 4.0 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glBeginQueryIndexed = (delegate*)load("glBeginQueryIndexed"); - contextPtr->glBindTransformFeedback = (delegate*)load("glBindTransformFeedback"); - contextPtr->glBlendEquationSeparatei = (delegate*)load("glBlendEquationSeparatei"); - contextPtr->glBlendEquationi = (delegate*)load("glBlendEquationi"); - contextPtr->glBlendFuncSeparatei = (delegate*)load("glBlendFuncSeparatei"); - contextPtr->glBlendFunci = (delegate*)load("glBlendFunci"); - contextPtr->glDeleteTransformFeedbacks = (delegate*)load("glDeleteTransformFeedbacks"); - contextPtr->glDrawArraysIndirect = (delegate*)load("glDrawArraysIndirect"); - contextPtr->glDrawElementsIndirect = (delegate*)load("glDrawElementsIndirect"); - contextPtr->glDrawTransformFeedback = (delegate*)load("glDrawTransformFeedback"); - contextPtr->glDrawTransformFeedbackStream = (delegate*)load("glDrawTransformFeedbackStream"); - contextPtr->glEndQueryIndexed = (delegate*)load("glEndQueryIndexed"); - contextPtr->glGenTransformFeedbacks = (delegate*)load("glGenTransformFeedbacks"); - contextPtr->glGetActiveSubroutineName = (delegate*)load("glGetActiveSubroutineName"); - contextPtr->glGetActiveSubroutineUniformName = (delegate*)load("glGetActiveSubroutineUniformName"); - contextPtr->glGetActiveSubroutineUniformiv = (delegate*)load("glGetActiveSubroutineUniformiv"); - contextPtr->glGetProgramStageiv = (delegate*)load("glGetProgramStageiv"); - contextPtr->glGetQueryIndexediv = (delegate*)load("glGetQueryIndexediv"); - contextPtr->glGetSubroutineIndex = (delegate*)load("glGetSubroutineIndex"); - contextPtr->glGetSubroutineUniformLocation = (delegate*)load("glGetSubroutineUniformLocation"); - contextPtr->glGetUniformSubroutineuiv = (delegate*)load("glGetUniformSubroutineuiv"); - contextPtr->glGetUniformdv = (delegate*)load("glGetUniformdv"); - contextPtr->glIsTransformFeedback = (delegate*)load("glIsTransformFeedback"); - contextPtr->glMinSampleShading = (delegate*)load("glMinSampleShading"); - contextPtr->glPatchParameterfv = (delegate*)load("glPatchParameterfv"); - contextPtr->glPatchParameteri = (delegate*)load("glPatchParameteri"); - contextPtr->glPauseTransformFeedback = (delegate*)load("glPauseTransformFeedback"); - contextPtr->glResumeTransformFeedback = (delegate*)load("glResumeTransformFeedback"); - contextPtr->glUniform1d = (delegate*)load("glUniform1d"); - contextPtr->glUniform1dv = (delegate*)load("glUniform1dv"); - contextPtr->glUniform2d = (delegate*)load("glUniform2d"); - contextPtr->glUniform2dv = (delegate*)load("glUniform2dv"); - contextPtr->glUniform3d = (delegate*)load("glUniform3d"); - contextPtr->glUniform3dv = (delegate*)load("glUniform3dv"); - contextPtr->glUniform4d = (delegate*)load("glUniform4d"); - contextPtr->glUniform4dv = (delegate*)load("glUniform4dv"); - contextPtr->glUniformMatrix2dv = (delegate*)load("glUniformMatrix2dv"); - contextPtr->glUniformMatrix2x3dv = (delegate*)load("glUniformMatrix2x3dv"); - contextPtr->glUniformMatrix2x4dv = (delegate*)load("glUniformMatrix2x4dv"); - contextPtr->glUniformMatrix3dv = (delegate*)load("glUniformMatrix3dv"); - contextPtr->glUniformMatrix3x2dv = (delegate*)load("glUniformMatrix3x2dv"); - contextPtr->glUniformMatrix3x4dv = (delegate*)load("glUniformMatrix3x4dv"); - contextPtr->glUniformMatrix4dv = (delegate*)load("glUniformMatrix4dv"); - contextPtr->glUniformMatrix4x2dv = (delegate*)load("glUniformMatrix4x2dv"); - contextPtr->glUniformMatrix4x3dv = (delegate*)load("glUniformMatrix4x3dv"); - contextPtr->glUniformSubroutinesuiv = (delegate*)load("glUniformSubroutinesuiv"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 4.0 APIs"); - } - - internal static unsafe void LoadGLcore41(GLcontext* contextPtr, delegate* load) - { - if (!core41) - { - InternalIO.InternalAppendLog("The core version 4.1 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glActiveShaderProgram = (delegate*)load("glActiveShaderProgram"); - contextPtr->glBindProgramPipeline = (delegate*)load("glBindProgramPipeline"); - contextPtr->glClearDepthf = (delegate*)load("glClearDepthf"); - contextPtr->glCreateShaderProgramv = (delegate*)load("glCreateShaderProgramv"); - contextPtr->glDeleteProgramPipelines = (delegate*)load("glDeleteProgramPipelines"); - contextPtr->glDepthRangeArrayv = (delegate*)load("glDepthRangeArrayv"); - contextPtr->glDepthRangeIndexed = (delegate*)load("glDepthRangeIndexed"); - contextPtr->glDepthRangef = (delegate*)load("glDepthRangef"); - contextPtr->glGenProgramPipelines = (delegate*)load("glGenProgramPipelines"); - contextPtr->glGetDoublei_v = (delegate*)load("glGetDoublei_v"); - contextPtr->glGetFloati_v = (delegate*)load("glGetFloati_v"); - contextPtr->glGetProgramBinary = (delegate*)load("glGetProgramBinary"); - contextPtr->glGetProgramPipelineInfoLog = (delegate*)load("glGetProgramPipelineInfoLog"); - contextPtr->glGetProgramPipelineiv = (delegate*)load("glGetProgramPipelineiv"); - contextPtr->glGetShaderPrecisionFormat = (delegate*)load("glGetShaderPrecisionFormat"); - contextPtr->glGetVertexAttribLdv = (delegate*)load("glGetVertexAttribLdv"); - contextPtr->glIsProgramPipeline = (delegate*)load("glIsProgramPipeline"); - contextPtr->glProgramBinary = (delegate*)load("glProgramBinary"); - contextPtr->glProgramParameteri = (delegate*)load("glProgramParameteri"); - contextPtr->glProgramUniform1d = (delegate*)load("glProgramUniform1d"); - contextPtr->glProgramUniform1dv = (delegate*)load("glProgramUniform1dv"); - contextPtr->glProgramUniform1f = (delegate*)load("glProgramUniform1f"); - contextPtr->glProgramUniform1fv = (delegate*)load("glProgramUniform1fv"); - contextPtr->glProgramUniform1i = (delegate*)load("glProgramUniform1i"); - contextPtr->glProgramUniform1iv = (delegate*)load("glProgramUniform1iv"); - contextPtr->glProgramUniform1ui = (delegate*)load("glProgramUniform1ui"); - contextPtr->glProgramUniform1uiv = (delegate*)load("glProgramUniform1uiv"); - contextPtr->glProgramUniform2d = (delegate*)load("glProgramUniform2d"); - contextPtr->glProgramUniform2dv = (delegate*)load("glProgramUniform2dv"); - contextPtr->glProgramUniform2f = (delegate*)load("glProgramUniform2f"); - contextPtr->glProgramUniform2fv = (delegate*)load("glProgramUniform2fv"); - contextPtr->glProgramUniform2i = (delegate*)load("glProgramUniform2i"); - contextPtr->glProgramUniform2iv = (delegate*)load("glProgramUniform2iv"); - contextPtr->glProgramUniform2ui = (delegate*)load("glProgramUniform2ui"); - contextPtr->glProgramUniform2uiv = (delegate*)load("glProgramUniform2uiv"); - contextPtr->glProgramUniform3d = (delegate*)load("glProgramUniform3d"); - contextPtr->glProgramUniform3dv = (delegate*)load("glProgramUniform3dv"); - contextPtr->glProgramUniform3f = (delegate*)load("glProgramUniform3f"); - contextPtr->glProgramUniform3fv = (delegate*)load("glProgramUniform3fv"); - contextPtr->glProgramUniform3i = (delegate*)load("glProgramUniform3i"); - contextPtr->glProgramUniform3iv = (delegate*)load("glProgramUniform3iv"); - contextPtr->glProgramUniform3ui = (delegate*)load("glProgramUniform3ui"); - contextPtr->glProgramUniform3uiv = (delegate*)load("glProgramUniform3uiv"); - contextPtr->glProgramUniform4d = (delegate*)load("glProgramUniform4d"); - contextPtr->glProgramUniform4dv = (delegate*)load("glProgramUniform4dv"); - contextPtr->glProgramUniform4f = (delegate*)load("glProgramUniform4f"); - contextPtr->glProgramUniform4fv = (delegate*)load("glProgramUniform4fv"); - contextPtr->glProgramUniform4i = (delegate*)load("glProgramUniform4i"); - contextPtr->glProgramUniform4iv = (delegate*)load("glProgramUniform4iv"); - contextPtr->glProgramUniform4ui = (delegate*)load("glProgramUniform4ui"); - contextPtr->glProgramUniform4uiv = (delegate*)load("glProgramUniform4uiv"); - contextPtr->glProgramUniformMatrix2dv = (delegate*)load("glProgramUniformMatrix2dv"); - contextPtr->glProgramUniformMatrix2fv = (delegate*)load("glProgramUniformMatrix2fv"); - contextPtr->glProgramUniformMatrix2x3dv = (delegate*)load("glProgramUniformMatrix2x3dv"); - contextPtr->glProgramUniformMatrix2x3fv = (delegate*)load("glProgramUniformMatrix2x3fv"); - contextPtr->glProgramUniformMatrix2x4dv = (delegate*)load("glProgramUniformMatrix2x4dv"); - contextPtr->glProgramUniformMatrix2x4fv = (delegate*)load("glProgramUniformMatrix2x4fv"); - contextPtr->glProgramUniformMatrix3dv = (delegate*)load("glProgramUniformMatrix3dv"); - contextPtr->glProgramUniformMatrix3fv = (delegate*)load("glProgramUniformMatrix3fv"); - contextPtr->glProgramUniformMatrix3x2dv = (delegate*)load("glProgramUniformMatrix3x2dv"); - contextPtr->glProgramUniformMatrix3x2fv = (delegate*)load("glProgramUniformMatrix3x2fv"); - contextPtr->glProgramUniformMatrix3x4dv = (delegate*)load("glProgramUniformMatrix3x4dv"); - contextPtr->glProgramUniformMatrix3x4fv = (delegate*)load("glProgramUniformMatrix3x4fv"); - contextPtr->glProgramUniformMatrix4dv = (delegate*)load("glProgramUniformMatrix4dv"); - contextPtr->glProgramUniformMatrix4fv = (delegate*)load("glProgramUniformMatrix4fv"); - contextPtr->glProgramUniformMatrix4x2dv = (delegate*)load("glProgramUniformMatrix4x2dv"); - contextPtr->glProgramUniformMatrix4x2fv = (delegate*)load("glProgramUniformMatrix4x2fv"); - contextPtr->glProgramUniformMatrix4x3dv = (delegate*)load("glProgramUniformMatrix4x3dv"); - contextPtr->glProgramUniformMatrix4x3fv = (delegate*)load("glProgramUniformMatrix4x3fv"); - contextPtr->glReleaseShaderCompiler = (delegate*)load("glReleaseShaderCompiler"); - contextPtr->glScissorArrayv = (delegate*)load("glScissorArrayv"); - contextPtr->glScissorIndexed = (delegate*)load("glScissorIndexed"); - contextPtr->glScissorIndexedv = (delegate*)load("glScissorIndexedv"); - contextPtr->glShaderBinary = (delegate*)load("glShaderBinary"); - contextPtr->glUseProgramStages = (delegate*)load("glUseProgramStages"); - contextPtr->glValidateProgramPipeline = (delegate*)load("glValidateProgramPipeline"); - contextPtr->glVertexAttribL1d = (delegate*)load("glVertexAttribL1d"); - contextPtr->glVertexAttribL1dv = (delegate*)load("glVertexAttribL1dv"); - contextPtr->glVertexAttribL2d = (delegate*)load("glVertexAttribL2d"); - contextPtr->glVertexAttribL2dv = (delegate*)load("glVertexAttribL2dv"); - contextPtr->glVertexAttribL3d = (delegate*)load("glVertexAttribL3d"); - contextPtr->glVertexAttribL3dv = (delegate*)load("glVertexAttribL3dv"); - contextPtr->glVertexAttribL4d = (delegate*)load("glVertexAttribL4d"); - contextPtr->glVertexAttribL4dv = (delegate*)load("glVertexAttribL4dv"); - contextPtr->glVertexAttribLPointer = (delegate*)load("glVertexAttribLPointer"); - contextPtr->glViewportArrayv = (delegate*)load("glViewportArrayv"); - contextPtr->glViewportIndexedf = (delegate*)load("glViewportIndexedf"); - contextPtr->glViewportIndexedfv = (delegate*)load("glViewportIndexedfv"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 4.1 APIs"); - } - - internal static unsafe void LoadGLcore42(GLcontext* contextPtr, delegate* load) - { - if (!core42) - { - InternalIO.InternalAppendLog("The core version 4.2 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glBindImageTexture = (delegate*)load("glBindImageTexture"); - contextPtr->glDrawArraysInstancedBaseInstance = (delegate*)load("glDrawArraysInstancedBaseInstance"); - contextPtr->glDrawElementsInstancedBaseInstance = (delegate*)load("glDrawElementsInstancedBaseInstance"); - contextPtr->glDrawElementsInstancedBaseVertexBaseInstance = (delegate*)load("glDrawElementsInstancedBaseVertexBaseInstance"); - contextPtr->glDrawTransformFeedbackInstanced = (delegate*)load("glDrawTransformFeedbackInstanced"); - contextPtr->glDrawTransformFeedbackStreamInstanced = (delegate*)load("glDrawTransformFeedbackStreamInstanced"); - contextPtr->glGetActiveAtomicCounterBufferiv = (delegate*)load("glGetActiveAtomicCounterBufferiv"); - contextPtr->glGetInternalformativ = (delegate*)load("glGetInternalformativ"); - contextPtr->glMemoryBarrier = (delegate*)load("glMemoryBarrier"); - contextPtr->glTexStorage1D = (delegate*)load("glTexStorage1D"); - contextPtr->glTexStorage2D = (delegate*)load("glTexStorage2D"); - contextPtr->glTexStorage3D = (delegate*)load("glTexStorage3D"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 4.2 APIs"); - } - - internal static unsafe void LoadGLcore43(GLcontext* contextPtr, delegate* load) - { - if (!core43) - { - InternalIO.InternalAppendLog("The core version 4.3 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glBindVertexBuffer = (delegate*)load("glBindVertexBuffer"); - contextPtr->glClearBufferData = (delegate*)load("glClearBufferData"); - contextPtr->glClearBufferSubData = (delegate*)load("glClearBufferSubData"); - contextPtr->glCopyImageSubData = (delegate*)load("glCopyImageSubData"); - contextPtr->glDebugMessageCallback = (delegate*)load("glDebugMessageCallback"); - contextPtr->glDebugMessageControl = (delegate*)load("glDebugMessageControl"); - contextPtr->glDebugMessageInsert = (delegate*)load("glDebugMessageInsert"); - contextPtr->glDispatchCompute = (delegate*)load("glDispatchCompute"); - contextPtr->glDispatchComputeIndirect = (delegate*)load("glDispatchComputeIndirect"); - contextPtr->glFramebufferParameteri = (delegate*)load("glFramebufferParameteri"); - contextPtr->glGetDebugMessageLog = (delegate*)load("glGetDebugMessageLog"); - contextPtr->glGetFramebufferParameteriv = (delegate*)load("glGetFramebufferParameteriv"); - contextPtr->glGetInternalformati64v = (delegate*)load("glGetInternalformati64v"); - contextPtr->glGetObjectLabel = (delegate*)load("glGetObjectLabel"); - contextPtr->glGetObjectPtrLabel = (delegate*)load("glGetObjectPtrLabel"); - contextPtr->glGetPointerv = (delegate*)load("glGetPointerv"); - contextPtr->glGetProgramInterfaceiv = (delegate*)load("glGetProgramInterfaceiv"); - contextPtr->glGetProgramResourceIndex = (delegate*)load("glGetProgramResourceIndex"); - contextPtr->glGetProgramResourceLocation = (delegate*)load("glGetProgramResourceLocation"); - contextPtr->glGetProgramResourceLocationIndex = (delegate*)load("glGetProgramResourceLocationIndex"); - contextPtr->glGetProgramResourceName = (delegate*)load("glGetProgramResourceName"); - contextPtr->glGetProgramResourceiv = (delegate*)load("glGetProgramResourceiv"); - contextPtr->glInvalidateBufferData = (delegate*)load("glInvalidateBufferData"); - contextPtr->glInvalidateBufferSubData = (delegate*)load("glInvalidateBufferSubData"); - contextPtr->glInvalidateFramebuffer = (delegate*)load("glInvalidateFramebuffer"); - contextPtr->glInvalidateSubFramebuffer = (delegate*)load("glInvalidateSubFramebuffer"); - contextPtr->glInvalidateTexImage = (delegate*)load("glInvalidateTexImage"); - contextPtr->glInvalidateTexSubImage = (delegate*)load("glInvalidateTexSubImage"); - contextPtr->glMultiDrawArraysIndirect = (delegate*)load("glMultiDrawArraysIndirect"); - contextPtr->glMultiDrawElementsIndirect = (delegate*)load("glMultiDrawElementsIndirect"); - contextPtr->glObjectLabel = (delegate*)load("glObjectLabel"); - contextPtr->glObjectPtrLabel = (delegate*)load("glObjectPtrLabel"); - contextPtr->glPopDebugGroup = (delegate*)load("glPopDebugGroup"); - contextPtr->glPushDebugGroup = (delegate*)load("glPushDebugGroup"); - contextPtr->glShaderStorageBlockBinding = (delegate*)load("glShaderStorageBlockBinding"); - contextPtr->glTexBufferRange = (delegate*)load("glTexBufferRange"); - contextPtr->glTexStorage2DMultisample = (delegate*)load("glTexStorage2DMultisample"); - contextPtr->glTexStorage3DMultisample = (delegate*)load("glTexStorage3DMultisample"); - contextPtr->glTextureView = (delegate*)load("glTextureView"); - contextPtr->glVertexAttribBinding = (delegate*)load("glVertexAttribBinding"); - contextPtr->glVertexAttribFormat = (delegate*)load("glVertexAttribFormat"); - contextPtr->glVertexAttribIFormat = (delegate*)load("glVertexAttribIFormat"); - contextPtr->glClearBufferData = (delegate*)load("glClearBufferData"); - contextPtr->glVertexBindingDivisor = (delegate*)load("glVertexBindingDivisor"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 4.3 APIs"); - } - - internal static unsafe void LoadGLcore44(GLcontext* contextPtr, delegate* load) - { - if (!core44) - { - InternalIO.InternalAppendLog("The core version 4.4 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glBindBuffersBase = (delegate*)load("glBindBuffersBase"); - contextPtr->glBindBuffersRange = (delegate*)load("glBindBuffersRange"); - contextPtr->glBindImageTextures = (delegate*)load("glBindImageTextures"); - contextPtr->glBindSamplers = (delegate*)load("glBindSamplers"); - contextPtr->glBindTextures = (delegate*)load("glBindTextures"); - contextPtr->glBindVertexBuffers = (delegate*)load("glBindVertexBuffers"); - contextPtr->glBufferStorage = (delegate*)load("glBufferStorage"); - contextPtr->glClearTexImage = (delegate*)load("glClearTexImage"); - contextPtr->glClearTexSubImage = (delegate*)load("glClearTexSubImage"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 4.4 APIs"); - } - - internal static unsafe void LoadGLcore45(GLcontext* contextPtr, delegate* load) - { - if (!core45) - { - InternalIO.InternalAppendLog("The core version 4.5 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glBindTextureUnit = (delegate*)load("glBindTextureUnit"); - contextPtr->glBlitNamedFramebuffer = (delegate*)load("glBlitNamedFramebuffer"); - contextPtr->glCheckNamedFramebufferStatus = (delegate*)load("glCheckNamedFramebufferStatus"); - contextPtr->glClearNamedBufferData = (delegate*)load("glClearNamedBufferData"); - contextPtr->glClearNamedBufferSubData = (delegate*)load("glClearNamedBufferSubData"); - contextPtr->glClearNamedFramebufferfi = (delegate*)load("glClearNamedFramebufferfi"); - contextPtr->glClearNamedFramebufferfv = (delegate*)load("glClearNamedFramebufferfv"); - contextPtr->glClearNamedFramebufferiv = (delegate*)load("glClearNamedFramebufferiv"); - contextPtr->glClearNamedFramebufferuiv = (delegate*)load("glClearNamedFramebufferuiv"); - contextPtr->glClipControl = (delegate*)load("glClipControl"); - contextPtr->glCompressedTextureSubImage1D = (delegate*)load("glCompressedTextureSubImage1D"); - contextPtr->glCompressedTextureSubImage2D = (delegate*)load("glCompressedTextureSubImage2D"); - contextPtr->glCompressedTextureSubImage3D = (delegate*)load("glCompressedTextureSubImage3D"); - contextPtr->glCopyNamedBufferSubData = (delegate*)load("glCopyNamedBufferSubData"); - contextPtr->glCopyTextureSubImage1D = (delegate*)load("glCopyTextureSubImage1D"); - contextPtr->glCopyTextureSubImage2D = (delegate*)load("glCopyTextureSubImage2D"); - contextPtr->glCopyTextureSubImage3D = (delegate*)load("glCopyTextureSubImage3D"); - contextPtr->glCreateBuffers = (delegate*)load("glCreateBuffers"); - contextPtr->glCreateFramebuffers = (delegate*)load("glCreateFramebuffers"); - contextPtr->glCreateProgramPipelines = (delegate*)load("glCreateProgramPipelines"); - contextPtr->glCreateQueries = (delegate*)load("glCreateQueries"); - contextPtr->glCreateRenderbuffers = (delegate*)load("glCreateRenderbuffers"); - contextPtr->glCreateSamplers = (delegate*)load("glCreateSamplers"); - contextPtr->glCreateTextures = (delegate*)load("glCreateTextures"); - contextPtr->glCreateTransformFeedbacks = (delegate*)load("glCreateTransformFeedbacks"); - contextPtr->glCreateVertexArrays = (delegate*)load("glCreateVertexArrays"); - contextPtr->glDisableVertexArrayAttrib = (delegate*)load("glDisableVertexArrayAttrib"); - contextPtr->glEnableVertexArrayAttrib = (delegate*)load("glEnableVertexArrayAttrib"); - contextPtr->glFlushMappedNamedBufferRange = (delegate*)load("glFlushMappedNamedBufferRange"); - contextPtr->glGenerateTextureMipmap = (delegate*)load("glGenerateTextureMipmap"); - contextPtr->glGetCompressedTextureImage = (delegate*)load("glGetCompressedTextureImage"); - contextPtr->glGetCompressedTextureSubImage = (delegate*)load("glGetCompressedTextureSubImage"); - contextPtr->glGetGraphicsResetStatus = (delegate*)load("glGetGraphicsResetStatus"); - contextPtr->glGetNamedBufferParameteri64v = (delegate*)load("glGetNamedBufferParameteri64v"); - contextPtr->glGetNamedBufferParameteriv = (delegate*)load("glGetNamedBufferParameteriv"); - contextPtr->glGetNamedBufferPointerv = (delegate*)load("glGetNamedBufferPointerv"); - contextPtr->glGetNamedBufferSubData = (delegate*)load("glGetNamedBufferSubData"); - contextPtr->glGetNamedFramebufferAttachmentParameteriv = (delegate*)load("glGetNamedFramebufferAttachmentParameteriv"); - contextPtr->glGetNamedFramebufferParameteriv = (delegate*)load("glGetNamedFramebufferParameteriv"); - contextPtr->glGetNamedRenderbufferParameteriv = (delegate*)load("glGetNamedRenderbufferParameteriv"); - contextPtr->glGetQueryBufferObjecti64v = (delegate*)load("glGetQueryBufferObjecti64v"); - contextPtr->glGetQueryBufferObjectiv = (delegate*)load("glGetQueryBufferObjectiv"); - contextPtr->glGetQueryBufferObjectui64v = (delegate*)load("glGetQueryBufferObjectui64v"); - contextPtr->glGetQueryBufferObjectuiv = (delegate*)load("glGetQueryBufferObjectuiv"); - contextPtr->glGetTextureImage = (delegate*)load("glGetTextureImage"); - contextPtr->glGetTextureLevelParameterfv = (delegate*)load("glGetTextureLevelParameterfv"); - contextPtr->glGetTextureLevelParameteriv = (delegate*)load("glGetTextureLevelParameteriv"); - contextPtr->glGetTextureParameterIiv = (delegate*)load("glGetTextureParameterIiv"); - contextPtr->glGetTextureParameterIuiv = (delegate*)load("glGetTextureParameterIuiv"); - contextPtr->glGetTextureParameterfv = (delegate*)load("glGetTextureParameterfv"); - contextPtr->glGetTextureParameteriv = (delegate*)load("glGetTextureParameteriv"); - contextPtr->glGetTextureSubImage = (delegate*)load("glGetTextureSubImage"); - contextPtr->glGetTransformFeedbacki64_v = (delegate*)load("glGetTransformFeedbacki64_v"); - contextPtr->glGetTransformFeedbacki_v = (delegate*)load("glGetTransformFeedbacki_v"); - contextPtr->glGetTransformFeedbackiv = (delegate*)load("glGetTransformFeedbackiv"); - contextPtr->glGetVertexArrayIndexed64iv = (delegate*)load("glGetVertexArrayIndexed64iv"); - contextPtr->glGetVertexArrayIndexediv = (delegate*)load("glGetVertexArrayIndexediv"); - contextPtr->glGetVertexArrayiv = (delegate*)load("glGetVertexArrayiv"); - contextPtr->glGetnCompressedTexImage = (delegate*)load("glGetnCompressedTexImage"); - contextPtr->glGetnTexImage = (delegate*)load("glGetnTexImage"); - contextPtr->glGetnUniformdv = (delegate*)load("glGetnUniformdv"); - contextPtr->glGetnUniformfv = (delegate*)load("glGetnUniformfv"); - contextPtr->glGetnUniformiv = (delegate*)load("glGetnUniformiv"); - contextPtr->glGetnUniformuiv = (delegate*)load("glGetnUniformuiv"); - contextPtr->glInvalidateNamedFramebufferData = (delegate*)load("glInvalidateNamedFramebufferData"); - contextPtr->glInvalidateNamedFramebufferSubData = (delegate*)load("glInvalidateNamedFramebufferSubData"); - contextPtr->glMapNamedBuffer = (delegate*)load("glMapNamedBuffer"); - contextPtr->glMapNamedBufferRange = (delegate*)load("glMapNamedBufferRange"); - contextPtr->glMemoryBarrierByRegion = (delegate*)load("glMemoryBarrierByRegion"); - contextPtr->glNamedBufferData = (delegate*)load("glNamedBufferData"); - contextPtr->glNamedBufferStorage = (delegate*)load("glNamedBufferStorage"); - contextPtr->glNamedBufferSubData = (delegate*)load("glNamedBufferSubData"); - contextPtr->glNamedFramebufferDrawBuffer = (delegate*)load("glNamedFramebufferDrawBuffer"); - contextPtr->glNamedFramebufferDrawBuffers = (delegate*)load("glNamedFramebufferDrawBuffers"); - contextPtr->glNamedFramebufferParameteri = (delegate*)load("glNamedFramebufferParameteri"); - contextPtr->glNamedFramebufferReadBuffer = (delegate*)load("glNamedFramebufferReadBuffer"); - contextPtr->glNamedFramebufferRenderbuffer = (delegate*)load("glNamedFramebufferRenderbuffer"); - contextPtr->glNamedFramebufferTexture = (delegate*)load("glNamedFramebufferTexture"); - contextPtr->glNamedFramebufferTextureLayer = (delegate*)load("glNamedFramebufferTextureLayer"); - contextPtr->glNamedRenderbufferStorage = (delegate*)load("glNamedRenderbufferStorage"); - contextPtr->glNamedRenderbufferStorageMultisample = (delegate*)load("glNamedRenderbufferStorageMultisample"); - contextPtr->glReadnPixels = (delegate*)load("glReadnPixels"); - contextPtr->glTextureBarrier = (delegate*)load("glTextureBarrier"); - contextPtr->glTextureBuffer = (delegate*)load("glTextureBuffer"); - contextPtr->glTextureBufferRange = (delegate*)load("glTextureBufferRange"); - contextPtr->glTextureParameterIiv = (delegate*)load("glTextureParameterIiv"); - contextPtr->glTextureParameterIuiv = (delegate*)load("glTextureParameterIuiv"); - contextPtr->glTextureParameterf = (delegate*)load("glTextureParameterf"); - contextPtr->glTextureParameterfv = (delegate*)load("glTextureParameterfv"); - contextPtr->glTextureParameteri = (delegate*)load("glTextureParameteri"); - contextPtr->glTextureParameteriv = (delegate*)load("glTextureParameteriv"); - contextPtr->glTextureStorage1D = (delegate*)load("glTextureStorage1D"); - contextPtr->glTextureStorage2D = (delegate*)load("glTextureStorage2D"); - contextPtr->glTextureStorage2DMultisample = (delegate*)load("glTextureStorage2DMultisample"); - contextPtr->glTextureStorage3D = (delegate*)load("glTextureStorage3D"); - contextPtr->glTextureStorage3DMultisample = (delegate*)load("glTextureStorage3DMultisample"); - contextPtr->glTextureSubImage1D = (delegate*)load("glTextureSubImage1D"); - contextPtr->glTextureSubImage2D = (delegate*)load("glTextureSubImage2D"); - contextPtr->glTextureSubImage3D = (delegate*)load("glTextureSubImage3D"); - contextPtr->glTransformFeedbackBufferBase = (delegate*)load("glTransformFeedbackBufferBase"); - contextPtr->glTransformFeedbackBufferRange = (delegate*)load("glTransformFeedbackBufferRange"); - contextPtr->glUnmapNamedBuffer = (delegate*)load("glUnmapNamedBuffer"); - contextPtr->glVertexArrayAttribBinding = (delegate*)load("glVertexArrayAttribBinding"); - contextPtr->glVertexArrayAttribFormat = (delegate*)load("glVertexArrayAttribFormat"); - contextPtr->glVertexArrayAttribIFormat = (delegate*)load("glVertexArrayAttribIFormat"); - contextPtr->glVertexArrayAttribLFormat = (delegate*)load("glVertexArrayAttribLFormat"); - contextPtr->glVertexArrayBindingDivisor = (delegate*)load("glVertexArrayBindingDivisor"); - contextPtr->glVertexArrayElementBuffer = (delegate*)load("glVertexArrayElementBuffer"); - contextPtr->glVertexArrayVertexBuffer = (delegate*)load("glVertexArrayVertexBuffer"); - contextPtr->glVertexArrayVertexBuffers = (delegate*)load("glVertexArrayVertexBuffers"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 4.5 APIs"); - } - - internal static unsafe void LoadGLcore46(GLcontext* contextPtr, delegate* load) - { - if (!core46) - { - InternalIO.InternalAppendLog("The core version 4.6 is not supported."); - throw new Exception("Final Version"); - } - - #region load - - contextPtr->glMultiDrawArraysIndirectCount = (delegate*)load("glMultiDrawArraysIndirectCount"); - contextPtr->glMultiDrawElementsIndirectCount = (delegate*)load("glMultiDrawElementsIndirectCount"); - contextPtr->glPolygonOffsetClamp = (delegate*)load("glPolygonOffsetClamp"); - contextPtr->glSpecializeShader = (delegate*)load("glSpecializeShader"); - - #endregion load - - InternalIO.InternalAppendLog("Successfully load all OpenGL 4.6 APIs"); - } - - } -} \ No newline at end of file diff --git a/源代码/StgSharpDebug/Graphics/GL/glApiManagerConst.cs b/源代码/StgSharpDebug/Graphics/GL/glApiManagerConst.cs deleted file mode 100644 index 6000633a..00000000 --- a/源代码/StgSharpDebug/Graphics/GL/glApiManagerConst.cs +++ /dev/null @@ -1,689 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="glApiManagerConst.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Graphics.GL -{ - public static partial class glManager - { - #region coreVersion - - private static bool core10 = false; - private static bool core11 = false; - private static bool core12 = false; - private static bool core13 = false; - private static bool core14 = false; - private static bool core15 = false; - private static bool core20 = false; - private static bool core21 = false; - private static bool core30 = false; - private static bool core31 = false; - private static bool core32 = false; - private static bool core33 = false; - private static bool core40 = false; - private static bool core41 = false; - private static bool core42 = false; - private static bool core43 = false; - private static bool core44 = false; - private static bool core45 = false; - private static bool core46 = false; - - #endregion - - #region extension - - private static bool _3DFX_tbuffer; - private static bool _3DFX_texture_compression_FXT1; - private static bool _4DFX_multisample; - private static bool AMD_blend_minmax_factor; - private static bool AMD_conservative_depth; - private static bool AMD_debug_output; - private static bool AMD_depth_clamp_separate; - private static bool AMD_draw_buffers_blend; - private static bool AMD_framebuffer_multisample_advanced; - private static bool AMD_framebuffer_sample_positions; - private static bool AMD_gcn_shader; - private static bool AMD_gpu_shader_half_float; - private static bool AMD_gpu_shader_int16; - private static bool AMD_gpu_shader_int64; - private static bool AMD_interleaved_elements; - private static bool AMD_multi_draw_indirect; - private static bool AMD_name_gen_delete; - private static bool AMD_occlusion_query_event; - private static bool AMD_performance_monitor; - private static bool AMD_pinned_memory; - private static bool AMD_query_buffer_object; - private static bool AMD_sample_positions; - private static bool AMD_seamless_cubemap_per_texture; - private static bool AMD_shader_atomic_counter_ops; - private static bool AMD_shader_ballot; - private static bool AMD_shader_explicit_vertex_parameter; - private static bool AMD_shader_gpu_shader_half_float_fetch; - private static bool AMD_shader_image_load_store_lod; - private static bool AMD_shader_stencil_export; - private static bool AMD_shader_trinary_minmax; - private static bool AMD_sparse_texture; - private static bool AMD_stencil_operation_extended; - private static bool AMD_texture_gather_bias_lod; - private static bool AMD_texture_texture4; - private static bool AMD_transform_feedback3_lines_triangles; - private static bool AMD_transform_feedback4; - private static bool AMD_vertex_shader_layer; - private static bool AMD_vertex_shader_tessellator; - private static bool AMD_vertex_shader_viewport_index; - private static bool APPLE_aux_depth_stencil; - private static bool APPLE_client_storage; - private static bool APPLE_element_array; - private static bool APPLE_fence; - private static bool APPLE_float_pixels; - private static bool APPLE_flush_buffer_range; - private static bool APPLE_object_purgeable; - private static bool APPLE_rgb_422; - private static bool APPLE_row_bytes; - private static bool APPLE_specular_vector; - private static bool APPLE_texture_range; - private static bool APPLE_transform_hint; - private static bool APPLE_vertex_array_object; - private static bool APPLE_vertex_array_range; - private static bool APPLE_vertex_program_evaluators; - private static bool APPLE_ycbcr_422; - private static bool ARB_arrays_of_arrays; - private static bool ARB_base_instance; - private static bool ARB_bindless_texture; - private static bool ARB_blend_func_extended; - private static bool ARB_buffer_storage; - private static bool ARB_cl_event; - private static bool ARB_clear_buffer_object; - private static bool ARB_clear_texture; - private static bool ARB_clip_control; - private static bool ARB_color_buffer_float; - private static bool ARB_compatibility; - private static bool ARB_compressed_texture_pixel_storage; - private static bool ARB_compute_shader; - private static bool ARB_compute_variable_group_size; - private static bool ARB_conditional_render_inverted; - private static bool ARB_conservative_depth; - private static bool ARB_copy_buffer; - private static bool ARB_copy_image; - private static bool ARB_cull_distance; - private static bool ARB_debug_output; - private static bool ARB_depth_buffer_float; - private static bool ARB_depth_clamp; - private static bool ARB_depth_texture; - private static bool ARB_derivative_control; - private static bool ARB_direct_state_access; - private static bool ARB_draw_buffers; - private static bool ARB_draw_buffers_blend; - private static bool ARB_draw_elements_base_vertex; - private static bool ARB_draw_indirect; - private static bool ARB_draw_instanced; - private static bool ARB_enhanced_layouts; - private static bool ARB_ES2_compatibility; - private static bool ARB_ES3_1_compatibility; - private static bool ARB_ES3_2_compatibility; - private static bool ARB_ES3_compatibility; - private static bool ARB_explicit_attrib_location; - private static bool ARB_explicit_uniform_location; - private static bool ARB_fragment_coord_conventions; - private static bool ARB_fragment_layer_viewport; - private static bool ARB_fragment_program; - private static bool ARB_fragment_program_shadow; - private static bool ARB_fragment_shader; - private static bool ARB_fragment_shader_interlock; - private static bool ARB_framebuffer_no_attachments; - private static bool ARB_framebuffer_object; - private static bool ARB_framebuffer_sRGB; - private static bool ARB_geometry_shader4; - private static bool ARB_get_program_binary; - private static bool ARB_get_texture_sub_image; - private static bool ARB_gl_spirv; - private static bool ARB_gpu_shader_fp64; - private static bool ARB_gpu_shader_int64; - private static bool ARB_gpu_shader5; - private static bool ARB_half_float_pixel; - private static bool ARB_half_float_vertex; - private static bool ARB_imaging; - private static bool ARB_indirect_parameters; - private static bool ARB_instanced_arrays; - private static bool ARB_internalformat_query; - private static bool ARB_internalformat_query2; - private static bool ARB_invalidate_subdata; - private static bool ARB_map_buffer_alignment; - private static bool ARB_map_buffer_range; - private static bool ARB_matrix_palette; - private static bool ARB_multi_bind; - private static bool ARB_multi_draw_indirect; - private static bool ARB_multisample; - private static bool ARB_multitexture; - private static bool ARB_occlusion_query; - private static bool ARB_occlusion_query2; - private static bool ARB_parallel_shader_compile; - private static bool ARB_pipeline_statistics_query; - private static bool ARB_pixel_buffer_object; - private static bool ARB_point_parameters; - private static bool ARB_point_sprite; - private static bool ARB_polygon_offset_clamp; - private static bool ARB_post_depth_coverage; - private static bool ARB_program_interface_query; - private static bool ARB_provoking_vertex; - private static bool ARB_query_buffer_object; - private static bool ARB_robust_buffer_access_behavior; - private static bool ARB_robustness; - private static bool ARB_robustness_isolation; - private static bool ARB_sample_locations; - private static bool ARB_sample_shading; - private static bool ARB_sampler_objects; - private static bool ARB_seamless_cube_map; - private static bool ARB_seamless_cubemap_per_texture; - private static bool ARB_separate_shader_objects; - private static bool ARB_shader_atomic_counter_ops; - private static bool ARB_shader_atomic_counters; - private static bool ARB_shader_ballot; - private static bool ARB_shader_bit_encoding; - private static bool ARB_shader_clock; - private static bool ARB_shader_draw_parameters; - private static bool ARB_shader_group_vote; - private static bool ARB_shader_image_load_store; - private static bool ARB_shader_image_size; - private static bool ARB_shader_objects; - private static bool ARB_shader_precision; - private static bool ARB_shader_stencil_export; - private static bool ARB_shader_storage_buffer_object; - private static bool ARB_shader_subroutine; - private static bool ARB_shader_texture_image_samples; - private static bool ARB_shader_texture_lod; - private static bool ARB_shader_viewport_layer_array; - private static bool ARB_shading_language_100; - private static bool ARB_shading_language_420pack; - private static bool ARB_shading_language_include; - private static bool ARB_shading_language_packing; - private static bool ARB_shadow; - private static bool ARB_shadow_ambient; - private static bool ARB_sparse_buffer; - private static bool ARB_sparse_texture; - private static bool ARB_sparse_texture_clamp; - private static bool ARB_sparse_texture2; - private static bool ARB_spirv_extensions; - private static bool ARB_stencil_texturing; - private static bool ARB_sync; - private static bool ARB_tessellation_shader; - private static bool ARB_texture_barrier; - private static bool ARB_texture_border_clamp; - private static bool ARB_texture_buffer_object; - private static bool ARB_texture_buffer_object_rgb32; - private static bool ARB_texture_buffer_range; - private static bool ARB_texture_compression; - private static bool ARB_texture_compression_bptc; - private static bool ARB_texture_compression_rgtc; - private static bool ARB_texture_cube_map; - private static bool ARB_texture_cube_map_array; - private static bool ARB_texture_env_add; - private static bool ARB_texture_env_combine; - private static bool ARB_texture_env_crossbar; - private static bool ARB_texture_env_dot3; - private static bool ARB_texture_filter_anisotropic; - private static bool ARB_texture_filter_minmax; - private static bool ARB_texture_float; - private static bool ARB_texture_gather; - private static bool ARB_texture_mirror_clamp_to_edge; - private static bool ARB_texture_mirrored_repeat; - private static bool ARB_texture_multisample; - private static bool ARB_texture_non_power_of_two; - private static bool ARB_texture_query_levels; - private static bool ARB_texture_query_lod; - private static bool ARB_texture_rectangle; - private static bool ARB_texture_rg; - private static bool ARB_texture_rgb10_a2ui; - private static bool ARB_texture_stencil8; - private static bool ARB_texture_storage; - private static bool ARB_texture_storage_multisample; - private static bool ARB_texture_swizzle; - private static bool ARB_texture_view; - private static bool ARB_timer_query; - private static bool ARB_transform_feedback_instanced; - private static bool ARB_transform_feedback_overflow_query; - private static bool ARB_transform_feedback2; - private static bool ARB_transform_feedback3; - private static bool ARB_transpose_matrix; - private static bool ARB_uniform_buffer_object; - private static bool ARB_vertex_array_bgra; - private static bool ARB_vertex_array_object; - private static bool ARB_vertex_attrib_64bit; - private static bool ARB_vertex_attrib_binding; - private static bool ARB_vertex_blend; - private static bool ARB_vertex_buffer_object; - private static bool ARB_vertex_program; - private static bool ARB_vertex_shader; - private static bool ARB_vertex_type_10f_11f_11f_rev; - private static bool ARB_vertex_type_2_10_10_10_rev; - private static bool ARB_viewport_array; - private static bool ARB_window_pos; - private static bool ATI_draw_buffers; - private static bool ATI_element_array; - private static bool ATI_envmap_bumpmap; - private static bool ATI_fragment_shader; - private static bool ATI_map_object_buffer; - private static bool ATI_meminfo; - private static bool ATI_pixel_format_float; - private static bool ATI_pn_triangles; - private static bool ATI_separate_stencil; - private static bool ATI_text_fragment_shader; - private static bool ATI_texture_env_combine3; - private static bool ATI_texture_float; - private static bool ATI_texture_mirror_once; - private static bool ATI_vertex_array_object; - private static bool ATI_vertex_attrib_array_object; - private static bool ATI_vertex_streams; - private static bool EXT_422_pixels; - private static bool EXT_abgr; - private static bool EXT_bgra; - private static bool EXT_bindable_uniform; - private static bool EXT_blend_color; - private static bool EXT_blend_equation_separate; - private static bool EXT_blend_func_separate; - private static bool EXT_blend_logic_op; - private static bool EXT_blend_minmax; - private static bool EXT_blend_subtract; - private static bool EXT_clip_volume_hint; - private static bool EXT_cmyka; - private static bool EXT_color_subtable; - private static bool EXT_compiled_vertex_array; - private static bool EXT_convolution; - private static bool EXT_coordinate_frame; - private static bool EXT_copy_texture; - private static bool EXT_cull_vertex; - private static bool EXT_debug_label; - private static bool EXT_debug_marker; - private static bool EXT_depth_bounds_test; - private static bool EXT_direct_state_access; - private static bool EXT_draw_buffers2; - private static bool EXT_draw_instanced; - private static bool EXT_draw_range_elements; - private static bool EXT_EGL_image_storage; - private static bool EXT_EGL_sync; - private static bool EXT_external_buffer; - private static bool EXT_fog_coord; - private static bool EXT_framebuffer_blit; - private static bool EXT_framebuffer_blit_layers; - private static bool EXT_framebuffer_multisample; - private static bool EXT_framebuffer_multisample_blit_scaled; - private static bool EXT_framebuffer_object; - private static bool EXT_framebuffer_sRGB; - private static bool EXT_geometry_shader4; - private static bool EXT_gpu_program_parameters; - private static bool EXT_gpu_shader4; - private static bool EXT_histogram; - private static bool EXT_index_array_formats; - private static bool EXT_index_func; - private static bool EXT_index_material; - private static bool EXT_index_texture; - private static bool EXT_light_texture; - private static bool EXT_memory_object; - private static bool EXT_memory_object_fd; - private static bool EXT_memory_object_win32; - private static bool EXT_misc_attribute; - private static bool EXT_multi_draw_arrays; - private static bool EXT_multisample; - private static bool EXT_multiview_tessellation_geometry_shader; - private static bool EXT_multiview_texture_multisample; - private static bool EXT_multiview_timer_query; - private static bool EXT_packed_depth_stencil; - private static bool EXT_packed_float; - private static bool EXT_packed_pixels; - private static bool EXT_paletted_texture; - private static bool EXT_pixel_buffer_object; - private static bool EXT_pixel_transform; - private static bool EXT_pixel_transform_color_table; - private static bool EXT_point_parameters; - private static bool EXT_polygon_offset; - private static bool EXT_polygon_offset_clamp; - private static bool EXT_post_depth_coverage; - private static bool EXT_provoking_vertex; - private static bool EXT_raster_multisample; - private static bool EXT_rescale_normal; - private static bool EXT_secondary_color; - private static bool EXT_semaphore; - private static bool EXT_semaphore_fd; - private static bool EXT_semaphore_win32; - private static bool EXT_separate_shader_objects; - private static bool EXT_separate_specular_color; - private static bool EXT_shader_framebuffer_fetch; - private static bool EXT_shader_framebuffer_fetch_non_coherent; - private static bool EXT_shader_image_load_formatted; - private static bool EXT_shader_image_load_store; - private static bool EXT_shader_integer_mix; - private static bool EXT_shader_samples_identical; - private static bool EXT_shadow_funcs; - private static bool EXT_shared_texture_palette; - private static bool EXT_sparse_texture2; - private static bool EXT_stencil_clear_tag; - private static bool EXT_stencil_two_side; - private static bool EXT_stencil_wrap; - private static bool EXT_subtexture; - private static bool EXT_texture; - private static bool EXT_texture_array; - private static bool EXT_texture_buffer_object; - private static bool EXT_texture_compression_latc; - private static bool EXT_texture_compression_rgtc; - private static bool EXT_texture_compression_s3tc; - private static bool EXT_texture_cube_map; - private static bool EXT_texture_env_add; - private static bool EXT_texture_env_combine; - private static bool EXT_texture_env_dot3; - private static bool EXT_texture_filter_anisotropic; - private static bool EXT_texture_filter_minmax; - private static bool EXT_texture_integer; - private static bool EXT_texture_lod_bias; - private static bool EXT_texture_mirror_clamp; - private static bool EXT_texture_object; - private static bool EXT_texture_perturb_normal; - private static bool EXT_texture_shadow_lod; - private static bool EXT_texture_shared_exponent; - private static bool EXT_texture_snorm; - private static bool EXT_texture_sRGB; - private static bool EXT_texture_sRGB_decode; - private static bool EXT_texture_sRGB_R8; - private static bool EXT_texture_sRGB_RG8; - private static bool EXT_texture_storage; - private static bool EXT_texture_swizzle; - private static bool EXT_texture3D; - private static bool EXT_timer_query; - private static bool EXT_transform_feedback; - private static bool EXT_vertex_array; - private static bool EXT_vertex_array_bgra; - private static bool EXT_vertex_attrib_64bit; - private static bool EXT_vertex_shader; - private static bool EXT_vertex_weighting; - private static bool EXT_win32_keyed_mutex; - private static bool EXT_window_rectangles; - private static bool EXT_x11_sync_object; - private static bool GREMEDY_frame_terminator; - private static bool GREMEDY_string_marker; - private static bool HP_convolution_border_modes; - private static bool HP_image_transform; - private static bool HP_occlusion_test; - private static bool HP_texture_lighting; - private static bool IBM_cull_vertex; - private static bool IBM_multimode_draw_arrays; - private static bool IBM_rasterpos_clip; - private static bool IBM_static_data; - private static bool IBM_texture_mirrored_repeat; - private static bool IBM_vertex_array_lists; - private static bool INGR_blend_func_separate; - private static bool INGR_color_clamp; - private static bool INGR_interlace_read; - private static bool INTEL_blackhole_render; - private static bool INTEL_conservative_rasterization; - private static bool INTEL_fragment_shader_ordering; - private static bool INTEL_framebuffer_CMAA; - private static bool INTEL_map_texture; - private static bool INTEL_parallel_arrays; - private static bool INTEL_performance_query; - private static bool KHR_blend_equation_advanced; - private static bool KHR_blend_equation_advanced_coherent; - private static bool KHR_context_flush_control; - private static bool KHR_debug; - private static bool KHR_no_error; - private static bool KHR_parallel_shader_compile; - private static bool KHR_robust_buffer_access_behavior; - private static bool KHR_robustness; - private static bool KHR_shader_subgroup; - private static bool KHR_texture_compression_astc_hdr; - private static bool KHR_texture_compression_astc_ldr; - private static bool KHR_texture_compression_astc_sliced_3d; - private static bool MESA_framebuffer_flip_x; - private static bool MESA_framebuffer_flip_y; - private static bool MESA_framebuffer_swap_xy; - private static bool MESA_pack_invert; - private static bool MESA_program_binary_formats; - private static bool MESA_resize_buffers; - private static bool MESA_shader_integer_functions; - private static bool MESA_tile_raster_order; - private static bool MESA_window_pos; - private static bool MESA_ycbcr_texture; - private static bool MESAX_texture_stack; - private static bool NV_alpha_to_coverage_dither_control; - private static bool NV_bindless_multi_draw_indirect; - private static bool NV_bindless_multi_draw_indirect_count; - private static bool NV_bindless_texture; - private static bool NV_blend_equation_advanced; - private static bool NV_blend_equation_advanced_coherent; - private static bool NV_blend_minmax_factor; - private static bool NV_blend_square; - private static bool NV_clip_space_w_scaling; - private static bool NV_command_list; - private static bool NV_compute_program5; - private static bool NV_compute_shader_derivatives; - private static bool NV_conditional_render; - private static bool NV_conservative_raster; - private static bool NV_conservative_raster_dilate; - private static bool NV_conservative_raster_pre_snap; - private static bool NV_conservative_raster_pre_snap_triangles; - private static bool NV_conservative_raster_underestimation; - private static bool NV_copy_depth_to_color; - private static bool NV_copy_image; - private static bool NV_deep_texture3D; - private static bool NV_depth_buffer_float; - private static bool NV_depth_clamp; - private static bool NV_draw_texture; - private static bool NV_draw_vulkan_image; - private static bool NV_evaluators; - private static bool NV_explicit_multisample; - private static bool NV_fence; - private static bool NV_fill_rectangle; - private static bool NV_float_buffer; - private static bool NV_fog_distance; - private static bool NV_fragment_coverage_to_color; - private static bool NV_fragment_program; - private static bool NV_fragment_program_option; - private static bool NV_fragment_program2; - private static bool NV_fragment_program4; - private static bool NV_fragment_shader_barycentric; - private static bool NV_fragment_shader_interlock; - private static bool NV_framebuffer_mixed_samples; - private static bool NV_framebuffer_multisample_coverage; - private static bool NV_geometry_program4; - private static bool NV_geometry_shader_passthrough; - private static bool NV_geometry_shader4; - private static bool NV_gpu_multicast; - private static bool NV_gpu_program4; - private static bool NV_gpu_program5; - private static bool NV_gpu_program5_mem_extended; - private static bool NV_gpu_shader5; - private static bool NV_half_float; - private static bool NV_internalformat_sample_query; - private static bool NV_light_max_exponent; - private static bool NV_memory_attachment; - private static bool NV_memory_object_sparse; - private static bool NV_mesh_shader; - private static bool NV_multisample_coverage; - private static bool NV_multisample_filter_hint; - private static bool NV_occlusion_query; - private static bool NV_packed_depth_stencil; - private static bool NV_parameter_buffer_object; - private static bool NV_parameter_buffer_object2; - private static bool NV_path_rendering; - private static bool NV_path_rendering_shared_edge; - private static bool NV_pixel_data_range; - private static bool NV_point_sprite; - private static bool NV_present_video; - private static bool NV_primitive_restart; - private static bool NV_primitive_shading_rate; - private static bool NV_query_resource; - private static bool NV_query_resource_tag; - private static bool NV_register_combiners; - private static bool NV_register_combiners2; - private static bool NV_representative_fragment_test; - private static bool NV_robustness_video_memory_purge; - private static bool NV_sample_locations; - private static bool NV_sample_mask_override_coverage; - private static bool NV_scissor_exclusive; - private static bool NV_shader_atomic_counters; - private static bool NV_shader_atomic_float; - private static bool NV_shader_atomic_float64; - private static bool NV_shader_atomic_fp16_vector; - private static bool NV_shader_atomic_int64; - private static bool NV_shader_buffer_load; - private static bool NV_shader_buffer_store; - private static bool NV_shader_storage_buffer_object; - private static bool NV_shader_subgroup_partitioned; - private static bool NV_shader_texture_footprint; - private static bool NV_shader_thread_group; - private static bool NV_shader_thread_shuffle; - private static bool NV_shading_rate_image; - private static bool NV_stereo_view_rendering; - private static bool NV_tessellation_program5; - private static bool NV_texgen_emboss; - private static bool NV_texgen_reflection; - private static bool NV_texture_barrier; - private static bool NV_texture_compression_vtc; - private static bool NV_texture_env_combine4; - private static bool NV_texture_expand_normal; - private static bool NV_texture_multisample; - private static bool NV_texture_rectangle; - private static bool NV_texture_rectangle_compressed; - private static bool NV_texture_shader; - private static bool NV_texture_shader2; - private static bool NV_texture_shader3; - private static bool NV_timeline_semaphore; - private static bool NV_transform_feedback; - private static bool NV_transform_feedback2; - private static bool NV_uniform_buffer_std430_layout; - private static bool NV_uniform_buffer_unified_memory; - private static bool NV_vdpau_interop; - private static bool NV_vdpau_interop2; - private static bool NV_vertex_array_range; - private static bool NV_vertex_array_range2; - private static bool NV_vertex_attrib_integer_64bit; - private static bool NV_vertex_buffer_unified_memory; - private static bool NV_vertex_program; - private static bool NV_vertex_program1_1; - private static bool NV_vertex_program2; - private static bool NV_vertex_program2_option; - private static bool NV_vertex_program3; - private static bool NV_vertex_program4; - private static bool NV_video_capture; - private static bool NV_viewport_array2; - private static bool NV_viewport_swizzle; - private static bool NVX_blend_equation_advanced_multi_draw_buffers; - private static bool NVX_conditional_render; - private static bool NVX_gpu_memory_info; - private static bool NVX_gpu_multicast2; - private static bool NVX_linked_gpu_multicast; - private static bool NVX_progress_fence; - private static bool OES_byte_coordinates; - private static bool OES_compressed_paletted_texture; - private static bool OES_fixed_point; - private static bool OES_query_matrix; - private static bool OES_read_format; - private static bool OES_single_precision; - private static bool OML_interlace; - private static bool OML_resample; - private static bool OML_subsample; - private static bool OVR_multiview; - private static bool OVR_multiview2; - private static bool PGI_misc_hints; - private static bool PGI_vertex_hints; - private static bool REND_screen_coordinates; - private static bool S3_s3tc; - private static bool SGI_color_matrix; - private static bool SGI_color_table; - private static bool SGI_texture_color_table; - private static bool SGIS_detail_texture; - private static bool SGIS_fog_function; - private static bool SGIS_generate_mipmap; - private static bool SGIS_multisample; - private static bool SGIS_pixel_texture; - private static bool SGIS_point_line_texgen; - private static bool SGIS_point_parameters; - private static bool SGIS_sharpen_texture; - private static bool SGIS_texture_border_clamp; - private static bool SGIS_texture_color_mask; - private static bool SGIS_texture_edge_clamp; - private static bool SGIS_texture_filter4; - private static bool SGIS_texture_lod; - private static bool SGIS_texture_select; - private static bool SGIS_texture4D; - private static bool SGIX_async; - private static bool SGIX_async_histogram; - private static bool SGIX_async_pixel; - private static bool SGIX_blend_alpha_minmax; - private static bool SGIX_calligraphic_fragment; - private static bool SGIX_clipmap; - private static bool SGIX_convolution_accuracy; - private static bool SGIX_depth_pass_instrument; - private static bool SGIX_depth_texture; - private static bool SGIX_flush_raster; - private static bool SGIX_fog_offset; - private static bool SGIX_fragment_lighting; - private static bool SGIX_framezoom; - private static bool SGIX_igloo_interface; - private static bool SGIX_instruments; - private static bool SGIX_interlace; - private static bool SGIX_ir_instrument1; - private static bool SGIX_list_priority; - private static bool SGIX_pixel_texture; - private static bool SGIX_pixel_tiles; - private static bool SGIX_polynomial_ffd; - private static bool SGIX_reference_plane; - private static bool SGIX_resample; - private static bool SGIX_scalebias_hint; - private static bool SGIX_shadow; - private static bool SGIX_shadow_ambient; - private static bool SGIX_sprite; - private static bool SGIX_subsample; - private static bool SGIX_tag_sample_buffer; - private static bool SGIX_texture_add_env; - private static bool SGIX_texture_coordinate_clamp; - private static bool SGIX_texture_lod_bias; - private static bool SGIX_texture_multi_buffer; - private static bool SGIX_texture_scale_bias; - private static bool SGIX_vertex_preclip; - private static bool SGIX_ycrcb; - private static bool SGIX_ycrcb_subsample; - private static bool SGIX_ycrcba; - private static bool SUN_convolution_border_modes; - private static bool SUN_global_alpha; - private static bool SUN_mesh_array; - private static bool SUN_slice_accum; - private static bool SUN_triangle_list; - private static bool SUN_vertex; - private static bool SUNX_constant_data; - private static bool WIN_phong_shading; - private static bool WIN_specular_fog; - - - #endregion - - } -} diff --git a/源代码/StgSharpDebug/Graphics/GL/glRenderStream.cs b/源代码/StgSharpDebug/Graphics/GL/glRenderStream.cs deleted file mode 100644 index dac84161..00000000 --- a/源代码/StgSharpDebug/Graphics/GL/glRenderStream.cs +++ /dev/null @@ -1,155 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="glRenderStream.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Logic; -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Graphics.GL -{ - - public abstract partial class glRenderStream : RenderStream - { - - protected glRenderStream(ViewPort v, (int,int,int) cube) : base(v,cube) - { - } - - - protected IntPtr glContextHandle - { - get { return ContextHandle; } - } - - /// - /// Init an OpenGl context if current form has not been binded to any context. and set the context binded to - /// current form as current OpenGL context. - /// - /// - /// Something goes wrong and StgSharp fails in creating a new OpenGL context. - /// - public unsafe void MakeAsCurrentContext() - { - if (ContextHandle == default) - { - ContextHandle = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(GLcontext))); - GLcontext* contextID = (GLcontext*)ContextHandle; - contextID->glGetString = (delegate*)IntPtr.Zero; - } - if (glFunc.CurrentContextHandle != ContextHandle) - { - glFunc.CurrentContextHandle = ContextHandle; - //Console.WriteLine($"context set as {(ulong)glFunc.CurrentContextHandle}"); - InternalIO.glfwMakeContextCurrent(CanvasHandle); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override void SetSizeLimit(int minWidth, int minHeight, int maxWidth, int maxHeight) - { - InternalIO.glfwSetWindowSizeLimits(this.CanvasHandle, minWidth, minHeight, maxWidth, maxHeight); - } - - internal override sealed void InternalDraw( - in Dictionary input, - in Dictionary output) - { - MakeAsCurrentContext(); - ProcessInput(); - Main(in input, in output); - } - - internal override sealed void InternalInit() - { - MakeAsCurrentContext(); - this.Port.LoadGLapi(); - Init(); - } - - internal override sealed void InternalTerminate() - { - Deinit(); - } - - protected override sealed Uniform NativeCameraUniform(ShaderProgram source, string name) - { - NativeCamera.GainAllUniforms(source, name); - return NativeCamera.convertedUniform; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected override sealed void NativeCameraViewRange(Radius fieldOfRange, vec2d offset, (float frontDepth, float backDepth) viewDepth) - { - NativeCamera.SetViewRange(fieldOfRange, this.Size, offset, viewDepth); - } - - protected override sealed void NativeCameraViewTarget(vec3d position, vec3d direction, vec3d up) - { - NativeCamera.SetViewDirection(position, direction, up); - } - - protected static void PollEvents() - { - InternalIO.glfwPollEvents(); - } - - protected void SwapBuffers() - { - InternalIO.glfwSwapBuffers(CanvasHandle); - } - - #region Key Control - - protected KeyStatus CheckKey(KeyboardKey key) - { - return InternalIO.glfwGetKey(this.CanvasHandle, (int)key); - } - - protected KeyStatus CheckKey(Mouse key) - { - return InternalIO.glfwGetKey(this.CanvasHandle, (int)key); - } - - protected KeyStatus CheckKey(Joystick key) - { - return InternalIO.glfwGetKey(this.CanvasHandle, (int)key); - } - - #endregion - - } -} diff --git a/源代码/StgSharp/Controlling/Get.cs b/源代码/StgSharpDebug/Graphics/IGraphicAPIs.cs similarity index 76% rename from 源代码/StgSharp/Controlling/Get.cs rename to 源代码/StgSharpDebug/Graphics/IGraphicAPIs.cs index 3c11f5c9..b97068a4 100644 --- a/源代码/StgSharp/Controlling/Get.cs +++ b/源代码/StgSharpDebug/Graphics/IGraphicAPIs.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="Get.cs" +// file="IGraphicAPIs.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,26 +28,17 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- - -using StgSharp.Graphics; -using StgSharp.Logic; -using StgSharp.Math; +using System; +using System.Collections.Generic; +using System.Text; namespace StgSharp.Graphics { - public partial class View + public interface IGraphicAPIs { - /// - /// Get the status of a certain key on the keyboard. - /// - /// - /// - /// - public static KeyStatus GetKeyStatus(ViewModelBase form, KeyboardKey key) - { - return InternalIO.glfwGetKey(form.WindowID, (int)key); - } + public IntPtr GraphicApiPackageHandle { get; } } + } diff --git a/源代码/StgSharpDebug/Graphics/Image.cs b/源代码/StgSharpDebug/Graphics/Image.cs index bbcba961..dc8ffd7e 100644 --- a/源代码/StgSharpDebug/Graphics/Image.cs +++ b/源代码/StgSharpDebug/Graphics/Image.cs @@ -29,11 +29,12 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- using StgSharp.Data; -using StgSharp.Graphics.GL; +using StgSharp.Graphics.OpenGL; using StgSharp.Math; using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; @@ -45,37 +46,82 @@ namespace StgSharp.Graphics { public class Image : ISSDSerializable, IImageProvider { - internal byte[] data; - internal ImageInfo info; + private byte[] _data; + private ImageInfo info; + private int _pixelUpdateCount = 0; - internal Image(ImageInfo information) - { - info = information; - data = Array.Empty(); - //int length = info.width * info.height * info.channel; - } - - public ref byte[] DataStream - { - get => ref data; - } - - public unsafe Image() + internal unsafe Image() { info = new ImageInfo(); } - public ImageChannel Channel => info.Channel; - public int ChannelCount => info.ChannelCount; - public int Height => info.Height; + internal Image(ImageInfo information) + { + info = information; + _data = Array.Empty(); + //int length = info.width * info.height * info.channel; + } + + internal ref byte[] Data + { + get => ref _data; + } public (int width, int height) Size { get => (info.Width, info.Height); } + /// + /// Hash code of time pixels updated last time. + /// + public int PixelUpdateCount + { + get => _pixelUpdateCount; + internal set => _pixelUpdateCount = value; + } + + public byte[] PixelBuffer + { + get + { + if ((_data.Length == 0) || (_data == null)) + { + GetBytes(); + return _data!; + } + return _data; + } + } + + public ImageChannel Channel => info.Channel; + public int ChannelCount => info.ChannelCount; + public int Height + { + get => info.Height; + internal set => info.Height = value; + } + + public int Width + { + get => info.Width; + internal set => info.Width = value; + } + + public int PixelSize => GlHelper.GetPixelSize(info.pixelLayout, info.Channel); + + public PixelChannelLayout PixelLayout + { + get => info.pixelLayout; + private set => info.pixelLayout = value; + } + public SerializableTypeCode SSDTypeCode => SerializableTypeCode.PixelImage; - public int Width => info.Width; + + public void FromBytes(byte[] stream) + { + + } public static unsafe Image FromFile(string route, ImageLoader loader) { @@ -87,76 +133,57 @@ namespace StgSharp.Graphics return ret; } - public static Image FromMemory((int width, int height) size, int channelCount, byte[] stream) + public static Image FromMemory((int width, int height) size, ImageChannel channel, byte[] stream) { ImageInfo _info = new ImageInfo { Height = size.height, Width = size.width, - ChannelCount = channelCount, + Channel = channel, StreamPtr = IntPtr.Zero }; Image ret = new Image(_info); - ret.data = stream; + ret.PixelLayout = PixelChannelLayout.Byte; + ret._data = stream; return ret; } - public glArrayHandle GetArrayHandle() + public static Image FromMemory((int width, int height) size, ImageChannel channel, PixelChannelLayout layout, byte[] stream) { - if ((data == Array.Empty()) || (data == null)) + ImageInfo _info = new ImageInfo { - this.GetBytes(); - return new glArrayHandle(data); - } - return new glArrayHandle(data); + Height = size.height, + Width = size.width, + Channel = channel, + StreamPtr = IntPtr.Zero + }; + Image ret = new Image(_info); + ret.PixelLayout = layout; + ret._data = stream; + return ret; } public unsafe byte[] GetBytes() { - if (data == null) + if (_data.Length == 0) { - int size = Width * Height * ChannelCount; - data = new byte[size]; - int i = 0; - fixed (byte* bptr = data) - { - byte* pptr = bptr; - for (; i < size; i += 16) - { - *(M128*)(pptr + i) = *(M128*)(info.StreamPtr + i); - } - for (; i < size; i++) - { - *(pptr + i) = *(byte*)(info.StreamPtr + i); - } - } + int size = Width * Height * GlHelper.GetPixelSize(PixelLayout, Channel); + _data = new Span((byte*)info.StreamPtr, size).ToArray(); fixed (ImageInfo* pptr = &info) { InternalIO.InternalUnloadImage(pptr); } info.StreamPtr = IntPtr.Zero; } - return data; + return _data; } + public Image ProvideImage() => this; - public void FromBytes(byte[] stream) - { - - } - - public Image ProvideImage() + byte[] ISSDSerializable.GetBytes() { throw new NotImplementedException(); } - ~Image() - { - if (info.StreamPtr != IntPtr.Zero) - { - // Marshal.FreeHGlobal(info.StreamPtr); - } - } - } [StructLayout(LayoutKind.Sequential)] @@ -164,53 +191,20 @@ namespace StgSharp.Graphics { private ImageChannel channel; - private int channelCount; private int height; private int width; private IntPtr pixelPtr; + internal PixelChannelLayout pixelLayout; public ImageChannel Channel { get => channel; - set - { - channel = value; - switch (channel) - { - case ImageChannel.SingleColor: - channelCount = 1; break; - case ImageChannel.DoubleColor: - channelCount = 2; break; - case ImageChannel.FullColor: - channelCount = 3; break; - case ImageChannel.WithAlphaChannel: - channelCount = 4; break; - default: - throw new InvalidCastException("Unknown color channel decoding setting."); - } - } + set { channel = value; } } public int ChannelCount { - get => channelCount; - set - { - channelCount = value; - switch (channelCount) - { - case 1: - channel = ImageChannel.SingleColor; break; - case 2: - channel = ImageChannel.DoubleColor; break; - case 3: - channel = ImageChannel.FullColor; break; - case 4: - channel = ImageChannel.WithAlphaChannel; break; - default: - throw new InvalidCastException("Unknown color channel decoding setting."); - } - } + get => GlHelper.GetChannelCount(channel); } public int Height @@ -219,15 +213,9 @@ namespace StgSharp.Graphics set => height = value; } - public IntPtr StreamPtr - { - get => pixelPtr; - internal set => pixelPtr = value; - } - public int StreamSize { - get => width * height * channelCount; + get => width * height * GlHelper.GetPixelSize(pixelLayout, channel); } public int Width @@ -236,20 +224,79 @@ namespace StgSharp.Graphics set => width = value; } + public IntPtr StreamPtr + { + get => pixelPtr; + internal set => pixelPtr = value; + } + public override string ToString() { return $"{channel}\t{width}\t{height}\t{(ulong)StreamPtr}"; } + public override int GetHashCode() + { + int hash = 17; + hash = hash * 17 + width; + hash = hash * 17 + height; + hash = hash * 17 + (int)channel; + return hash; + } } public enum ImageChannel : uint { SingleColor = GLconst.RED, DoubleColor = GLconst.RG, - FullColor = GLconst.RGB, + TripleColor = GLconst.RGB, WithAlphaChannel = GLconst.RGBA, } +} +namespace StgSharp.Graphics.OpenGL +{ + public static partial class GlHelper + { + internal static int GetChannelCount(ImageChannel channel) + { + return channel switch + { + ImageChannel.SingleColor => 1, + ImageChannel.DoubleColor => 2, + ImageChannel.TripleColor => 3, + ImageChannel.WithAlphaChannel => 4, + _ => throw new InvalidCastException("Unknown color channel decoding setting.") + }; + } + + internal static int GetPixelSize(PixelChannelLayout layout, ImageChannel cahnnel) + { + return layout switch + { + PixelChannelLayout.UByte => sizeof(byte) * GetChannelCount(cahnnel), + PixelChannelLayout.Byte => sizeof(byte) * GetChannelCount(cahnnel), + PixelChannelLayout.UShort => sizeof(short) * GetChannelCount(cahnnel), + PixelChannelLayout.Short => sizeof(short) * GetChannelCount(cahnnel), + PixelChannelLayout.UInt => sizeof(int) * GetChannelCount(cahnnel), + PixelChannelLayout.Int => sizeof(int) * GetChannelCount(cahnnel), + PixelChannelLayout.Float => sizeof(float) * GetChannelCount(cahnnel), + PixelChannelLayout.UByte332 => sizeof(byte), + PixelChannelLayout.UByte233Rev => sizeof(byte), + PixelChannelLayout.UShort565 => sizeof(short), + PixelChannelLayout.UShort565Rev => sizeof(short), + PixelChannelLayout.UShort4444 => sizeof(short), + PixelChannelLayout.UShort4444Rev => sizeof(short), + PixelChannelLayout.UShort5551 => sizeof(short), + PixelChannelLayout.UShort1555Rev => sizeof(short), + PixelChannelLayout.UInt8888 => sizeof(int), + PixelChannelLayout.UInt8888Rev => sizeof(int), + PixelChannelLayout.UInt1010102 => sizeof(int), + PixelChannelLayout.UInt2101010Rev => sizeof(int), + _ => throw new ArgumentException("Unknown layout type"), + }; + } + + } } \ No newline at end of file diff --git a/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/AutoTexture.cs b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/AutoTexture.cs new file mode 100644 index 00000000..b6656f90 --- /dev/null +++ b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/AutoTexture.cs @@ -0,0 +1,161 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="AutoTexture.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +using StgSharp.Collections; + +namespace StgSharp.Graphics.OpenGL +{ + public sealed class AutoTextureGL + { + private BidirectionalDictionary imageIndexMap = new BidirectionalDictionary(); + private Dictionary imageUpdateIndex = new Dictionary(); + + private int _size, _currentIndex; + private LinkedList usedTextureIndex; + private Queue unusedTextureUnitIndex; + private TextureProperty[] propertyCache; + private TextureGL texturePackage; + + private TextureProperty _textureProperty; + + private OpenGLFunction GL + { + get => texturePackage.GL; + } + + private AutoTextureGL(TextureGL texture) + { + texturePackage = texture; + _size = texture.Count; + imageIndexMap = new BidirectionalDictionary(); + unusedTextureUnitIndex = new Queue( + Enumerable.Range(0, _size)); + usedTextureIndex = new LinkedList(); + propertyCache = new TextureProperty[_size]; + } + + public AutoTextureGL(int textureObjectSize, [NotNull]glRenderStream binding) + { + this._size = textureObjectSize; + imageIndexMap = new BidirectionalDictionary(); + texturePackage = new TextureGL(textureObjectSize, binding); + unusedTextureUnitIndex = new Queue( + Enumerable.Range(0, _size)); + usedTextureIndex = new LinkedList(); + propertyCache = new TextureProperty[_size]; + } + + public TextureProperty DefaultTextureProperty + { + get => _textureProperty; + set => _textureProperty = value; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SelectTextureAndBind(Image i) + { + TextureProperty property = _textureProperty; + + SelectTextureAndBind(i, property); + } + + public void SelectTextureAndBind([NotNull]Image i, TextureProperty property) + { + //usable texture with image match + if (imageIndexMap.TryGetValue(i, out int index)) + { + //prop setting match + if (propertyCache[index] == property) + { + _currentIndex = index; //GL.Assert(true); + texturePackage.Bind2D(index); //GL.Assert(true); + if (i.PixelUpdateCount != imageUpdateIndex[i]) + { + texturePackage.LoadTexture(index, i); //GL.Assert(true); + } + } + else + { + _currentIndex = index; //GL.Assert(true); + texturePackage.Bind2D(index); //GL.Assert(true); + texturePackage.Set2dProperty(index, property); //GL.Assert(true); + if (i.PixelUpdateCount != imageUpdateIndex[i]) + { + texturePackage.LoadTexture(index, i); //GL.Assert(true); + } + } + } + else + { + if (unusedTextureUnitIndex.TryDequeue(out int newIndex)) + { + //has extra unused texture object + imageIndexMap.Add(i, index); + texturePackage.Bind2D(index); + texturePackage.Set2dProperty(index, property); + texturePackage.LoadTexture(index, i); + usedTextureIndex.AddLast(newIndex); + propertyCache[newIndex] = property; + imageUpdateIndex[i] = i.PixelUpdateCount; + } + else + { + //recycle from current + int reusedIndex = usedTextureIndex.First!.Value; + usedTextureIndex.RemoveFirst(); + usedTextureIndex.AddLast(reusedIndex); + imageIndexMap[i] = reusedIndex; + propertyCache[newIndex] = property; + imageUpdateIndex[i] = i.PixelUpdateCount; + } + } + } + + public static AutoTextureGL ToAuto([NotNull]TextureGL texture) + { + if (texture.IndexOfCurrentTexture != -1) + { + throw new InvalidOperationException("Texture to be converted has been editted."); + } + return new AutoTextureGL(texture); + } + + } + +} diff --git a/源代码/StgSharpDebug/Graphics/GL/Buffer/EBO.cs b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/EBO.cs similarity index 77% rename from 源代码/StgSharpDebug/Graphics/GL/Buffer/EBO.cs rename to 源代码/StgSharpDebug/Graphics/OpenGL/Buffer/EBO.cs index 0ba15f64..db6c2af4 100644 --- a/源代码/StgSharpDebug/Graphics/GL/Buffer/EBO.cs +++ b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/EBO.cs @@ -28,6 +28,8 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- +using StgSharp.Graphics; +using StgSharp.Graphics.OpenGL; using StgSharp.Math; using System; @@ -36,47 +38,45 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; -namespace StgSharp.Graphics.GL +namespace StgSharp.Graphics.OpenGL { /// /// A collection of handle to Element Buffer Object in OpenglFunc. /// Each value indexed from instance of this class this /// is the only handle to one Element Buffer Object. /// - public unsafe class ElementBuffer : BufferObjectBase + public sealed unsafe class ElementBuffer : GlBufferObjectBase { - internal ElementBuffer(int n, glRenderStream binding) + internal ElementBuffer(int n, glRenderStream binding) : base(binding) { - this.binding = binding; - _bufferHandle = glFunc.GenBuffers(n); + _bufferHandle = GL.GenBuffers(n); } public override sealed void Bind(int index) { - glFunc.BindBuffer(BufferType.ElementArrayBuffer, _bufferHandle[index]); + GL.BindBuffer(BufferType.ElementArrayBuffer, _bufferHandle[index]); } public void SetValue(int index, T[] bufferArray, BufferUsage usage) where T : struct, IConvertible { - glFunc.BindBuffer(BufferType.ElementArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferData(BufferType.ElementArrayBuffer, bufferArray, usage); + GL.BindBuffer(BufferType.ElementArrayBuffer, _bufferHandle[index]); + GL.SetBufferData(BufferType.ElementArrayBuffer, bufferArray, usage); } public void SetValue(int index, ReadOnlySpan bufferSpan, BufferUsage usage) where T : struct, IConvertible { - glFunc.BindBuffer(BufferType.ElementArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferData(BufferType.ElementArrayBuffer, bufferSpan, usage); + GL.BindBuffer(BufferType.ElementArrayBuffer, _bufferHandle[index]); + GL.SetBufferData(BufferType.ElementArrayBuffer, bufferSpan, usage); } protected override sealed void Dispose(bool disposing) { if (disposing) { - glFunc.DeleteBuffers(_bufferHandle); - _bufferHandle.Release(); + GL.DeleteBuffers(_bufferHandle); } } diff --git a/源代码/StgSharp/Graphics/GL/GLresourceGenrator.cs b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/FBO.cs similarity index 55% rename from 源代码/StgSharp/Graphics/GL/GLresourceGenrator.cs rename to 源代码/StgSharpDebug/Graphics/OpenGL/Buffer/FBO.cs index 9eab57dd..e0256dcb 100644 --- a/源代码/StgSharp/Graphics/GL/GLresourceGenrator.cs +++ b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/FBO.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="GLresourceGenrator.cs" +// file="FBO.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,75 +28,70 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- +using StgSharp.Graphics.OpenGL; + using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; -namespace StgSharp.Graphics.GL +namespace StgSharp.Graphics.OpenGL { - public partial class glRenderStream +#pragma warning disable CA1008 +#pragma warning disable CA1028 + public enum FrameBufferTarget : uint +#pragma warning restore CA1028 +#pragma warning restore CA1008 + { + Read = GLconst.READ_FRAMEBUFFER, + All = GLconst.FRAMEBUFFER, + Draw = GLconst.DRAW_FRAMEBUFFER, + } + + public sealed class FrameBuffer : GlBufferObjectBase { - /// - /// Create a set of . - /// - /// Amount of EBO to be created. - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected ElementBuffer CreateElementBuffer(int count) + internal unsafe FrameBuffer(int count, glRenderStream binding) : base(binding) { - return new ElementBuffer(count, this); - } - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected RenderBuffer CreateRenderBuffer(int count) - { - return new RenderBuffer(count, this); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected FrameBuffer CreateFrameBuffer(int count) - { - return new FrameBuffer(count, this); + _bufferHandle = GL.GenFrameBuffers(count); } /// - /// Create a sets of + /// Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. + /// will be set as default target. /// - /// Amount of textures to be created. - /// + /// Index of object to be binded in handle set [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected TextureGL CreateTexture(int count) + public override unsafe void Bind(int index) { - return new TextureGL(count, this); + GL.BindFrameBuffer(FrameBufferTarget.All, _bufferHandle[index]); } /// - /// Create a set of . + /// Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. + /// Target of this frame buffer should be set manually. /// - /// Amount of VAO to be created. - /// + /// The frame buffer target of the binding operation. + /// Index of object to be binded in handle set [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected VertexArray CreateVertexArray(int count) + public unsafe void Bind(FrameBufferTarget target, int index) { - return new VertexArray(count, this); + GL.BindFrameBuffer(target, _bufferHandle[index]); } - /// - /// Create a set of . - /// - /// Amount of Object to be created. - /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected VertexBuffer CreateVertexBuffer(int count) + public static void BindNull() { - return new VertexBuffer(count, this); + OpenGLFunction.CurrentGL.BindFrameBuffer(FrameBufferTarget.All, GlHandle.Zero); + } + + protected override void Dispose(bool disposing) + { + throw new NotImplementedException(); } - } -} \ No newline at end of file +} diff --git a/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/GLBufferObjectBase.cs b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/GLBufferObjectBase.cs new file mode 100644 index 00000000..7996b041 --- /dev/null +++ b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/GLBufferObjectBase.cs @@ -0,0 +1,53 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="GLBufferObjectBase.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics.OpenGL; + +using System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Graphics.OpenGL +{ + public abstract class GlBufferObjectBase : BufferObjectBase + { + + private readonly glRenderStream _contextBinding; + + protected GlBufferObjectBase(glRenderStream contextBinding) + { + binding = contextBinding; + _contextBinding = contextBinding; + } + + protected OpenGLFunction GL => _contextBinding.GL; + + } +} diff --git a/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/RBO.cs b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/RBO.cs new file mode 100644 index 00000000..7e616ab3 --- /dev/null +++ b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/RBO.cs @@ -0,0 +1,71 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="RBO.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics.OpenGL; + +using System; +using System.Collections.Generic; +using System.Security.Principal; +using System.Text; + + +namespace StgSharp.Graphics.OpenGL +{ + + + + public sealed class RenderBuffer : GlBufferObjectBase + { + + public RenderBuffer(int count, glRenderStream binding) : base(binding) + { + _bufferHandle = GL.GenRenderBuffer(count); + } + + public override void Bind(int index) + { + GL.BindRenderBuffer(this[index]); + } + + public void Store(RenderBufferInternalFormat format, (int width, int height) size) + { + if ((size.width > binding.Width) || (size.height > binding.Height)) + { + StgSharp.LogWarning("FrameBuffer is larger than current canvas binding"); + } + } + + protected override void Dispose(bool disposing) + { + throw new NotImplementedException(); + } + + } +} diff --git a/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/TextureGL.cs b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/TextureGL.cs new file mode 100644 index 00000000..d5c39eee --- /dev/null +++ b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/TextureGL.cs @@ -0,0 +1,285 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="TextureGL.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Data; +using StgSharp.Math; + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Drawing; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Graphics.OpenGL +{ + public sealed unsafe class TextureGL + { + + private int currentEditingTextureIndex; + + private OpenGLFunction _gl; + internal GlHandle[] _textureHandle; + + internal TextureGL( int count, glRenderStream binding ) + { + //sourceList = new Image[count]; + this._gl = binding.GL; + _textureHandle = _gl.GenTextures( count ); + } + + internal OpenGLFunction GL => _gl; + + public GlHandle this[ int index ] + { + get => _textureHandle[ index ]; + } + + public int Count + { + get => _textureHandle.Length; + } + + //internal Image[] sourceList; + + public int IndexOfCurrentTexture + { + get => currentEditingTextureIndex; + } + + public void ActivateAs( TextureUnit unit ) { _gl.ActiveTextureUnit( ( uint )unit ); } + + public void Bind2D( int index ) + { + currentEditingTextureIndex = index; + _gl.BindTexture( GLconst.TEXTURE_2D, _textureHandle[ index ] ); + } + + /// + /// Load an to certain texture. + /// + /// + /// + public unsafe void LoadTexture( int index, Image i ) + { + byte[] handle = i.PixelBuffer; + _gl.TextureImage2d( + Texture2DTarget.Texture2D, 0, ( uint )i.Channel, ( uint )i.Width, ( uint )i.Height, + ( uint )i.Channel, i.PixelLayout, pixels: handle ); + _gl.GenerateMipmap( Texture2DTarget.Texture2D ); + } + + #region texture setting + + [MethodImpl( MethodImplOptions.AggressiveInlining )] + public void Set2dFilterProperty( + int index, + TextureFilter onMinify, + TextureFilter onMagnify ) + { + #if DEBUG + if( index != currentEditingTextureIndex ) + { + throw new InvalidOperationException( + "Texture to be editted is not the one being activated." ); + } + #endif + _gl.TextureParameter( GLconst.TEXTURE_2D, GLconst.TEXTURE_MIN_FILTER, ( int )onMinify ); + _gl.TextureParameter( GLconst.TEXTURE_2D, GLconst.TEXTURE_MAG_FILTER, ( int )onMagnify ); + } + + [MethodImpl( MethodImplOptions.AggressiveInlining )] + public void Set2dWrapProperty( + int index, + TextureWrap onHorizontial, + TextureWrap onVertical ) + { + #if DEBUG + if( index != currentEditingTextureIndex ) + { + throw new InvalidOperationException( + "Texture to be editted is not the one being activated." ); + } + #endif + _gl.TextureParameter( GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_S, ( int )onHorizontial ); + _gl.TextureParameter( GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_T, ( int )onVertical ); + } + + [MethodImpl( MethodImplOptions.AggressiveInlining )] + public void Set2dProperty( int index, TextureProperty property ) + { + Set2dFilterProperty( index, property.FilterOnMinify, property.FilterOnMagnify ); + Set2dWrapProperty( index, property.WrapOnHorizontial, property.WrapOnVertical ); + } + + #endregion texture setting + } + + [StructLayout( LayoutKind.Explicit )] + public struct TextureProperty + { + + [FieldOffset( 0 )] private M128 mask; + [FieldOffset( 0 )] private TextureFilter mag; + [FieldOffset( 4 )] private TextureFilter min; + + [FieldOffset( 8 )] private TextureWrap hori; + [FieldOffset( 12 )] private TextureWrap vert; + + public TextureProperty( + TextureFilter onMagnify, + TextureFilter onMinify, + TextureWrap onHorizontial, + TextureWrap onVertical ) + { + FilterOnMagnify = onMagnify; + FilterOnMinify = onMinify; + WrapOnHorizontial = onHorizontial; + WrapOnVertical = onVertical; + } + + public TextureFilter FilterOnMagnify + { + get => mag; + set => mag = value; + } + + public TextureFilter FilterOnMinify + { + get => min; + set => min = value; + } + + public TextureWrap WrapOnHorizontial + { + get => hori; + set => hori = value; + } + + public TextureWrap WrapOnVertical + { + get => vert; + set => vert = value; + } + + public override int GetHashCode() + { + return HashCode.Combine( + FilterOnMagnify, FilterOnMagnify, WrapOnHorizontial, WrapOnVertical ); + } + + public override bool Equals([NotNullWhen(true)] object obj) + { + return base.Equals(obj); + } + + public override string ToString() + { + return $"FilterOnMagnify:{FilterOnMagnify}, " + + $"FilterOnMagnify:{FilterOnMagnify}, " + + $"WrapOnHorizontial:{WrapOnHorizontial}, " + + $"WrapOnVertical:{WrapOnVertical}"; + } + + public static implicit operator TextureProperty( + ( + TextureFilter onMagnify, TextureFilter onMinify, + TextureWrap onHorizontial, TextureWrap onVertical + ) propertyValueTuple ) + { + return new TextureProperty( + propertyValueTuple.onMagnify, propertyValueTuple.onMinify, + propertyValueTuple.onHorizontial, propertyValueTuple.onVertical ); + } + + public static bool operator ==(TextureProperty left, TextureProperty right) + { + return left.mask == right.mask; + } + + public static bool operator !=(TextureProperty left, TextureProperty right) + { + return left.mask != right.mask; + } + } + + #pragma warning disable CA1008 + public enum TextureFilter + #pragma warning restore CA1008 + { + + Nearest = GLconst.NEAREST, + Linear = GLconst.LINEAR, + NearestLinearMipmap = GLconst.NEAREST_MIPMAP_LINEAR, + LinearLinearMipmap = GLconst.LINEAR_MIPMAP_LINEAR, + NearestNearestMipmap = GLconst.NEAREST_MIPMAP_NEAREST, + LinearNearestMipmap = GLconst.LINEAR_MIPMAP_NEAREST, + + } + + #pragma warning disable CA1008 + public enum TextureUnit + #pragma warning restore CA1008 + { + + Unit0 = GLconst.TEXTURE0, + Unit1 = GLconst.TEXTURE1, + Unit2 = GLconst.TEXTURE2, + Unit3 = GLconst.TEXTURE3, + Unit4 = GLconst.TEXTURE4, + Unit5 = GLconst.TEXTURE5, + Unit6 = GLconst.TEXTURE6, + Unit7 = GLconst.TEXTURE7, + Unit8 = GLconst.TEXTURE8, + Unit9 = GLconst.TEXTURE9, + Unit10 = GLconst.TEXTURE10, + Unit11 = GLconst.TEXTURE11, + Unit12 = GLconst.TEXTURE12, + Unit13 = GLconst.TEXTURE13, + Unit14 = GLconst.TEXTURE14, + Unit15 = GLconst.TEXTURE15, + + } + + #pragma warning disable CA1008 + public enum TextureWrap + #pragma warning restore CA1008 + { + + Repeat = GLconst.REPEAT, + MirroredRepeat = GLconst.MIRRORED_REPEAT, + ClampToEdge = GLconst.CLAMP_TO_EDGE, + ClampToBorder = GLconst.CLAMP_TO_BORDER, + + } +} \ No newline at end of file diff --git a/源代码/StgSharp/Graphics/GL/Buffer/VAO.cs b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/VAO.cs similarity index 79% rename from 源代码/StgSharp/Graphics/GL/Buffer/VAO.cs rename to 源代码/StgSharpDebug/Graphics/OpenGL/Buffer/VAO.cs index 6af1862f..8a43e10c 100644 --- a/源代码/StgSharp/Graphics/GL/Buffer/VAO.cs +++ b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/VAO.cs @@ -35,33 +35,32 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Text; -namespace StgSharp.Graphics.GL +namespace StgSharp.Graphics.OpenGL { - public unsafe class VertexArray : BufferObjectBase + public sealed unsafe class VertexArray : GlBufferObjectBase { - internal VertexArray(int n, glRenderStream binding) + internal VertexArray(int n, glRenderStream binding) : base(binding) { - this.binding = binding; - _bufferHandle = glFunc.GenVertexArrays(n); + _bufferHandle = GL.GenVertexArrays(n); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public override sealed void Bind(int index) { - glFunc.BindVertexArray(_bufferHandle[index]); + GL.BindVertexArray(_bufferHandle[index]); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BindNull() { - glFunc.BindVertexArray(glHandle.Zero); + OpenGLFunction.CurrentGL.BindVertexArray(GlHandle.Zero); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void SetVertexAttribute(uint index, int vertexLength, TypeCode dataType, bool isNomalized, uint stride, int pointer) + public void SetVertexAttribute(uint index, int vertexLength, TypeCode dataType, bool isNomalized, uint stride, int pointer) { - glFunc.SetVertexAttribute( + GL.SetVertexAttribute( index, vertexLength, dataType, isNomalized, stride, pointer); @@ -71,8 +70,7 @@ namespace StgSharp.Graphics.GL { if (disposing) { - glFunc.DeleteVertexArrays(_bufferHandle); - _bufferHandle.Release(); + GL.DeleteVertexArrays(_bufferHandle); } } diff --git a/源代码/StgSharp/Graphics/GL/Buffer/VBO.cs b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/VBO.cs similarity index 66% rename from 源代码/StgSharp/Graphics/GL/Buffer/VBO.cs rename to 源代码/StgSharpDebug/Graphics/OpenGL/Buffer/VBO.cs index 27c3d774..d3dcb743 100644 --- a/源代码/StgSharp/Graphics/GL/Buffer/VBO.cs +++ b/源代码/StgSharpDebug/Graphics/OpenGL/Buffer/VBO.cs @@ -28,7 +28,6 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Graphics.GL; using StgSharp.Math; using System; @@ -39,98 +38,19 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; -namespace StgSharp.Graphics.GL +namespace StgSharp.Graphics.OpenGL { - public unsafe class VertexBuffer : BufferObjectBase + public sealed unsafe class VertexBuffer : GlBufferObjectBase { - internal VertexBuffer(int n, glRenderStream binding) + internal VertexBuffer(int n, glRenderStream binding) : base(binding) { - this.binding = binding; - _bufferHandle = glFunc.GenBuffers(n); + _bufferHandle = GL.GenBuffers(n); } public override sealed void Bind(int index) { - glFunc.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); - } - - /// - /// Set data to current vertex buffer object - /// - /// Type of bufferData - /// Index to find certain VBO in this instance - /// Data to write in - /// How OpenGL use these data, defined by - public void WriteMatrixData(int index, T bufferData, BufferUsage usage) - where T : struct, IMat - { - glFunc.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferData(BufferType.ArrayBuffer, bufferData, usage); - } - - /// - /// Set data to current vertex buffer object - /// - /// Type of bufferData - /// Index to find certain VBO in this instance - /// Data to write in - /// How OpenGL use these data, defined by - public void WriteScalerData(int index, T[] bufferArray, BufferUsage usage) - where T : struct, -#if NET8_0_OR_GREATER - INumber -#else - IConvertible -#endif - { - glFunc.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferData(BufferType.ArrayBuffer, bufferArray, usage); - } - - /// - /// Set data to current vertex buffer object - /// - /// Type of bufferData - /// Index to find certain VBO in this instance - /// A of data to write in - /// How OpenGL use these data, defined by - public void WriteScalerData(int index, ReadOnlySpan scalerSpan, BufferUsage usage) - where T : struct, -#if NET8_0_OR_GREATER - INumber -#else - IConvertible -#endif - { - glFunc.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferData(BufferType.ArrayBuffer, scalerSpan, usage); - } - - /// - /// Set data to current vertex buffer object - /// - /// Type of bufferData - /// Index to find certain VBO in this instance - /// A of data to write in - /// How OpenGL use these data, defined by - public void WriteVectorData(int index, ReadOnlySpan vectorSpan, BufferUsage usage) where T : struct, IVector - { - glFunc.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferVectorData(BufferType.ArrayBuffer, vectorSpan, usage); - } - - /// - /// Set data to current vertex buffer object - /// - /// Type of bufferData - /// Index to find certain VBO in this instance - /// A array of data to write in - /// How OpenGL use these data, defined by - public void WriteVectorData(int index, T[] vectorArray, BufferUsage usage) where T : struct, IVector - { - glFunc.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); - glFunc.SetBufferVectorData(BufferType.ArrayBuffer, vectorArray, usage); + GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); } /// @@ -139,15 +59,92 @@ namespace StgSharp.Graphics.GL [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Unbind() { - glFunc.BindBuffer(BufferType.ArrayBuffer, glHandle.Zero); + GL.BindBuffer(BufferType.ArrayBuffer, GlHandle.Zero); + } + + /// + /// Set _data to current vertex buffer object + /// + /// Type of bufferData + /// Index to find certain VBO in this instance + /// Data to write in + /// How OpenGL use these _data, defined by + public void WriteMatrixData(int index, T bufferData, BufferUsage usage) + where T : struct, IMat + { + GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); + GL.SetBufferData(BufferType.ArrayBuffer, bufferData, usage); + } + + /// + /// Set _data to current vertex buffer object + /// + /// Type of bufferData + /// Index to find certain VBO in this instance + /// Data to write in + /// How OpenGL use these _data, defined by + public void WriteScalerData(int index, T[] bufferArray, BufferUsage usage) + where T : struct, +#if NET8_0_OR_GREATER + INumber +#else + IConvertible +#endif + { + GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); + GL.SetBufferData(BufferType.ArrayBuffer, bufferArray, usage); + } + + /// + /// Set _data to current vertex buffer object + /// + /// Type of bufferData + /// Index to find certain VBO in this instance + /// A of _data to write in + /// How OpenGL use these _data, defined by + public void WriteScalerData(int index, ReadOnlySpan scalerSpan, BufferUsage usage) + where T : struct, +#if NET8_0_OR_GREATER + INumber +#else + IConvertible +#endif + { + GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); + GL.SetBufferData(BufferType.ArrayBuffer, scalerSpan, usage); + } + + /// + /// Set _data to current vertex buffer object + /// + /// Type of bufferData + /// Index to find certain VBO in this instance + /// A of _data to write in + /// How OpenGL use these _data, defined by + public void WriteVectorData(int index, ReadOnlySpan vectorSpan, BufferUsage usage) where T : struct, IVector + { + GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); + GL.SetBufferVectorData(BufferType.ArrayBuffer, vectorSpan, usage); + } + + /// + /// Set _data to current vertex buffer object + /// + /// Type of bufferData + /// Index to find certain VBO in this instance + /// A array of _data to write in + /// How OpenGL use these _data, defined by + public void WriteVectorData(int index, T[] vectorArray, BufferUsage usage) where T : struct, IVector + { + GL.BindBuffer(BufferType.ArrayBuffer, _bufferHandle[index]); + GL.SetBufferVectorData(BufferType.ArrayBuffer, vectorArray, usage); } protected override sealed void Dispose(bool disposing) { if (disposing) { - glFunc.DeleteBuffers(_bufferHandle); - _bufferHandle.Release(); + GL.DeleteBuffers(_bufferHandle); } } diff --git a/源代码/StgSharpDebug/Graphics/GL/Buffer/VAO.cs b/源代码/StgSharpDebug/Graphics/OpenGL/GlHandle.cs similarity index 64% rename from 源代码/StgSharpDebug/Graphics/GL/Buffer/VAO.cs rename to 源代码/StgSharpDebug/Graphics/OpenGL/GlHandle.cs index 6af1862f..78583510 100644 --- a/源代码/StgSharpDebug/Graphics/GL/Buffer/VAO.cs +++ b/源代码/StgSharpDebug/Graphics/OpenGL/GlHandle.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="VAO.cs" +// file="GlHandle.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,53 +28,48 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- - +#if Windows +using Microsoft.Win32.SafeHandles; +#endif using System; using System.Collections.Generic; +using System.Data.Common; +using System.Linq; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using System.Security.AccessControl; +using System.Security.Cryptography; using System.Text; +using System.Threading.Tasks; -namespace StgSharp.Graphics.GL +namespace StgSharp.Graphics.OpenGL { - public unsafe class VertexArray : BufferObjectBase + [StructLayout(LayoutKind.Explicit, Size = 4)] + public struct GlHandle { - internal VertexArray(int n, glRenderStream binding) + [FieldOffset(0)] public int SignedValue; + [FieldOffset(0)] public uint Value; + + public static GlHandle Zero { - this.binding = binding; - _bufferHandle = glFunc.GenVertexArrays(n); + get => new GlHandle { Value = 0 }; } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public override sealed void Bind(int index) + public static GlHandle Alloc(uint value) { - glFunc.BindVertexArray(_bufferHandle[index]); + return new GlHandle { Value = value }; } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void BindNull() + public static GlHandle SignedAlloc(int value) { - glFunc.BindVertexArray(glHandle.Zero); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void SetVertexAttribute(uint index, int vertexLength, TypeCode dataType, bool isNomalized, uint stride, int pointer) - { - glFunc.SetVertexAttribute( - index, vertexLength, dataType, - isNomalized, - stride, pointer); - } - - protected override sealed void Dispose(bool disposing) - { - if (disposing) - { - glFunc.DeleteVertexArrays(_bufferHandle); - _bufferHandle.Release(); - } + return new GlHandle { SignedValue = value }; } } + } \ No newline at end of file diff --git a/源代码/StgSharpDebug/Graphics/OpenGL/ShaderEdit/IglConvertable.cs b/源代码/StgSharpDebug/Graphics/OpenGL/ShaderEdit/IglConvertable.cs new file mode 100644 index 00000000..b8c7f3e3 --- /dev/null +++ b/源代码/StgSharpDebug/Graphics/OpenGL/ShaderEdit/IglConvertable.cs @@ -0,0 +1,65 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="IglConvertable.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics.OpenGL; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Graphics.ShaderEdit +{ + public interface IglConvertable + { + + /// + /// + /// + public void DisplayGLtypeDefinition(); + + /// + /// + /// + public void GainAllUniforms(ShaderProgram source, params string[] uniformName); + + /// + /// + /// + /// + public ShaderStruct GetConvertedGLtype(); + /// + /// + /// + public void SetAllUniforms(); + + } +} diff --git a/源代码/StgSharp/Graphics/GL/ShaderEdit/Shader.cs b/源代码/StgSharpDebug/Graphics/OpenGL/ShaderEdit/Shader.cs similarity index 82% rename from 源代码/StgSharp/Graphics/GL/ShaderEdit/Shader.cs rename to 源代码/StgSharpDebug/Graphics/OpenGL/ShaderEdit/Shader.cs index 12d7622f..12be5420 100644 --- a/源代码/StgSharp/Graphics/GL/ShaderEdit/Shader.cs +++ b/源代码/StgSharpDebug/Graphics/OpenGL/ShaderEdit/Shader.cs @@ -39,43 +39,45 @@ using System.Runtime.InteropServices; using System.Text; using System.Xml.Linq; -namespace StgSharp.Graphics.GL +namespace StgSharp.Graphics.OpenGL { public abstract partial class glRenderStream : RenderStream { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected sealed override Shader CreateShaderSegment(ShaderType type, int count) - { - return new Shader( glFunc.CreateShaderSet(count, type), type); - } /// /// Create an instance of program /// /// New instance of instance. [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected sealed override ShaderProgram CreateShaderProgram() + protected override sealed ShaderProgram CreateShaderProgram() { return new ShaderProgram(this); } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + protected override sealed Shader CreateShaderSegment(ShaderType type, int count) + { + return new Shader(GL.CreateShaderSet(count, type), type, this); + } + } public class Shader : ISSDSerializable { - private readonly IntPtr context; - internal readonly glHandleSet handle; + private readonly OpenGLFunction GL; + internal readonly GlHandle[] handle; public readonly ShaderType type; - public SerializableTypeCode SSDTypeCode => SerializableTypeCode.Shader; - - internal unsafe Shader(glHandleSet handle, ShaderType usage) + internal unsafe Shader(GlHandle[] handle, ShaderType usage, glRenderStream stream) { this.handle = handle; - context = glFunc.CurrentContextHandle; + GL = stream.GL; type = usage; } + public SerializableTypeCode SSDTypeCode => SerializableTypeCode.Shader; + /// /// Attach one shader code to a shader program. /// @@ -84,7 +86,45 @@ namespace StgSharp.Graphics.GL [MethodImpl(MethodImplOptions.AggressiveInlining)] public void AttachTo(int index, ShaderProgram target) { - glFunc.AttachShader(target.handle, handle[index]); + GL.AttachShader(target.handle, handle[index]); + } + + public void CheckStatus(int index, ShaderStatus status) + { + string log = GL.GetShaderStatus(this, index, (int)status); + if (!string.IsNullOrEmpty(log)) + { + throw new Exception($"{$"Shader Error \t{status}\n"}{log}"); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Compile(int index, byte[] codeStream) + { + if (codeStream == null) + { + throw new ArgumentNullException(nameof(codeStream)); + } + GL.LoadShaderSource(handle[index], codeStream); + GL.CompileShader(handle[index]); + CheckStatus(index, ShaderStatus.CompileStatus); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void Compile(int index, string codeStream) + { + if (codeStream == null) + { + throw new ArgumentNullException(nameof(codeStream)); + } + GL.LoadShaderSource(handle[index], Encoding.ASCII.GetBytes(codeStream)); + GL.CompileShader(handle[index]); + CheckStatus(index, ShaderStatus.CompileStatus); + } + + public void FromBytes(byte[] stream) + { + throw new NotImplementedException(); } public static byte[] FromCodeFile(string fileRoute) @@ -97,58 +137,21 @@ namespace StgSharp.Graphics.GL return Encoding.UTF8.GetBytes(str); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe void Compile(int index, byte[] codeStream) - { - if (codeStream == null) - { - throw new ArgumentNullException(nameof(codeStream)); - } - glFunc.LoadShaderSource(handle[index], codeStream); - glFunc.CompileShader(handle[index]); - CheckStatus(index,ShaderStatus.CompileStatus); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe void Compile(int index, string codeStream) - { - if (codeStream == null) - { - throw new ArgumentNullException(nameof(codeStream)); - } - glFunc.LoadShaderSource(handle[index],Encoding.ASCII.GetBytes( codeStream)); - glFunc.CompileShader(handle[index]); - CheckStatus(index, ShaderStatus.CompileStatus); - } - - public override string ToString() - { - return $"This is a {type} shader, its shader handles are {handle.ToString()}."; - } - public byte[] GetBytes() { return Array.Empty(); } - public void CheckStatus(int index, ShaderStatus status) - { - string log = glFunc.GetShaderStatus(this,index, (int)status); - if (!string.IsNullOrEmpty(log)) - { - throw new Exception($"Shader Error \t{status}\n" + log); - } - } - public byte[] GetBytes(out int length) { throw new NotImplementedException(); } - public void FromBytes(byte[] stream) + public override string ToString() { - throw new NotImplementedException(); + return $"This is a {type} shader, its shader handles are {handle.ToString()}."; } + } public enum ShaderStatus : int @@ -158,16 +161,17 @@ namespace StgSharp.Graphics.GL public class ShaderProgram { - private readonly IntPtr binding; - internal readonly glHandle handle; + + private readonly OpenGLFunction GL; + internal readonly GlHandle handle; /// - /// Init a program with no shader attached. + /// CustomizeInit a program with no shader attached. /// internal unsafe ShaderProgram(glRenderStream binding) { - this.binding = binding.ContextHandle; - handle = glFunc.CreateProgram(); + GL = binding.GL; + handle = GL.CreateProgram(); } /// @@ -179,7 +183,7 @@ namespace StgSharp.Graphics.GL [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe Uniform GetUniform(string name) where T : struct { - return new Uniform(this, name, binding); + return new Uniform(GL.GetUniformLocation(this.handle, name)); } /// @@ -192,7 +196,7 @@ namespace StgSharp.Graphics.GL where T : struct where U : struct { - return new Uniform(this, name, binding); + return new Uniform(GL.GetUniformLocation(this.handle, name)); } /// @@ -206,8 +210,9 @@ namespace StgSharp.Graphics.GL where U : struct where V : struct { - return new Uniform(this, name); + return new Uniform(GL.GetUniformLocation(this.handle, name)); } + /// /// Get a uniform form current shader, /// the value type of the uniform should be provided. @@ -220,7 +225,7 @@ namespace StgSharp.Graphics.GL where V : struct where W : struct { - return new Uniform(this, name); + return new Uniform(GL.GetUniformLocation(this.handle, name)); } /// @@ -228,7 +233,7 @@ namespace StgSharp.Graphics.GL /// public unsafe void Link() { - if (InternalIO.InternalLinkShaderProgram((GLcontext*)this.binding, handle.Value) == 0) + if (InternalIO.InternalLinkShaderProgram((OpenglContext*)this.GL.ContextHandle, handle.Value) == 0) { IntPtr logPtr = InternalIO.InternalReadSSCLog(); try @@ -252,7 +257,7 @@ namespace StgSharp.Graphics.GL [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void Use() { - glFunc.UseProgram(handle); + GL.UseProgram(handle); } ~ShaderProgram() diff --git a/源代码/StgSharpDebug/Graphics/OpenGL/ShaderEdit/Uniform.cs b/源代码/StgSharpDebug/Graphics/OpenGL/ShaderEdit/Uniform.cs new file mode 100644 index 00000000..f155b62e --- /dev/null +++ b/源代码/StgSharpDebug/Graphics/OpenGL/ShaderEdit/Uniform.cs @@ -0,0 +1,206 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Uniform.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics; +using StgSharp.Math; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; + +namespace StgSharp.Graphics.OpenGL +{ + public class Uniform + { + + internal GlHandle id; + + public GlHandle Handle + { + get => id; + } + + } + + public sealed class Uniform : Uniform + where T : struct + { + + internal Uniform() + { + + } + + internal unsafe Uniform(GlHandle id) + { + this.id = id; + } + + internal static Uniform FromHandle(GlHandle handle) + { + return new Uniform { id = handle }; + } + + } + + public sealed class Uniform : Uniform + where T : struct + where U : struct + { + + + + internal Uniform() + { + + } + + internal unsafe Uniform(GlHandle id) + { + this.id = id; + } + + internal static Uniform FromHandle(GlHandle handle) + { + return new Uniform { id = handle }; + } + + } + + public sealed class Uniform : Uniform + where T : struct + where U : struct + where V : struct + { + + internal Uniform() + { + + } + + internal unsafe Uniform(GlHandle id) + { + this.id = id; + } + + internal static Uniform FromHandle(GlHandle handle) + { + return new Uniform { id = handle }; + } + + } + + public sealed class Uniform : Uniform + where T : struct + where U : struct + where V : struct + where W : struct + { + + internal Uniform() + { + + } + + + internal unsafe Uniform(GlHandle id) + { + this.id = id; + } + + internal static Uniform FromHandle(GlHandle handle) + { + return new Uniform { id = handle }; + } + + } + + public unsafe partial class OpenGLFunction + { + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetUniformValue + (Uniform uniform, Matrix44 mat) + { + Matrix44 temp = mat; + Context.glUniformMatrix4fv(uniform.id.SignedValue, 1, false, (float*)&temp); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetUniformValue(Uniform uniform, vec4d vec) + { + vec4d temp = vec; + Context.glUniform1fv(uniform.id.SignedValue, 4, &temp); + } + + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetUniformValue(Uniform uniform, vec4d vec) + { + vec4d temp = vec; + Context.glUniform1fv(uniform.id.SignedValue, 4, &temp); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetUniformValue(Uniform uniform, float v0) + { + Context.glUniform1f(uniform.id.SignedValue, v0); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetUniformValue(Uniform uniform, int i0) + { + Context.glUniform1i(uniform.id.SignedValue, i0); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetUniformValue(Uniform uniform, float v0, float v1) + { + Context.glUniform2f(uniform.id.SignedValue, v0, v1); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetUniformValue(Uniform uniform, float v0, float v1, float v2) + { + Context.glUniform3f(uniform.id.SignedValue, v0, v1, v2); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetUniformValue(Uniform uniform, float v0, float v1, float v2, float v3) + { + Context.glUniform4f(uniform.id.SignedValue, v0, v1, v2, v3); + } + + } + +} \ No newline at end of file diff --git a/源代码/StgSharpDebug/Graphics/OpenGL/glAPICalling.cs b/源代码/StgSharpDebug/Graphics/OpenGL/glAPICalling.cs new file mode 100644 index 00000000..9677da98 --- /dev/null +++ b/源代码/StgSharpDebug/Graphics/OpenGL/glAPICalling.cs @@ -0,0 +1,47 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="glAPICalling.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.Graphics.OpenGL +{ + [AttributeUsage(AttributeTargets.Method)] + public sealed class OpenGLAPICallingAttribute : Attribute + { + + public OpenGLAPICallingAttribute() + { + + } + + } +} diff --git a/源代码/StgSharp/Graphics/GL/glApiManager.cs b/源代码/StgSharpDebug/Graphics/OpenGL/glApiManager.cs similarity index 97% rename from 源代码/StgSharp/Graphics/GL/glApiManager.cs rename to 源代码/StgSharpDebug/Graphics/OpenGL/glApiManager.cs index 75bb3737..415275e0 100644 --- a/源代码/StgSharp/Graphics/GL/glApiManager.cs +++ b/源代码/StgSharpDebug/Graphics/OpenGL/glApiManager.cs @@ -29,6 +29,9 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- using StgSharp.Math; +using StgSharp.MVVM; +using StgSharp.MVVM.View; + using System; using System.Collections.Generic; @@ -37,7 +40,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; -namespace StgSharp.Graphics.GL +namespace StgSharp.Graphics.OpenGL { public static partial class glManager { @@ -45,8 +48,7 @@ namespace StgSharp.Graphics.GL private const int glExtension = 0x1f03; private const int glVersion = 0x1f02; - private static readonly string[] glBranch = - new string[] { + private static readonly string[] glBranch = { "OpenGL ES-CM ", "OpenGL ES-CL ", "OpenGL ES ", @@ -55,17 +57,34 @@ namespace StgSharp.Graphics.GL private static string glExtensionList; + //-------------------------------------------------------------------------------- + /// - /// Load all supported OpenGL APIs and bind them to given viewPortDisplay. + /// Get the function pointer of given OpenGL api name /// - /// The used as current OpenGL viewPortDisplay - public static unsafe void LoadGLapi(this ViewPort vp) + /// ContextName of the OpenGL api + /// The funtion pointer of the api in stream of + public static IntPtr LoadGLfunc(string name) { - GLcontext* context = (GLcontext*)vp.GraphicHandle; - delegate* loader = &InternalIO.glfwGetProcAddress; -#pragma warning disable CS8909 - if (context->glGetString != (delegate*)IntPtr.Zero) -#pragma warning restore CS8909 + IntPtr ret = InternalIO.glfwGetProcAddress(name); + if (ret == default) + { + InternalIO.InternalAppendLog( + $"Cannot load OpenGL api called {name}, this api may not exist or supported."); + return ret; + } + return ret; + } + + /// + /// Load all supported OpenGL APIs and bind them to given . + /// + /// The handle to current OpenGL viewPortDisplay + public static unsafe void LoadOpenGLApiTo(IntPtr contextHandle) + { + OpenglContext* context = (OpenglContext*)contextHandle; + delegate* loader = &InternalIO.glfwGetProcAddress; + if ((IntPtr)context->glGetString != IntPtr.Zero) { return; } @@ -73,7 +92,7 @@ namespace StgSharp.Graphics.GL if (proc == IntPtr.Zero) { #if DEBUG - Console.WriteLine("Cannot load glFunc."); + Console.WriteLine("Cannot load GL."); #endif throw new Exception("Cannot load gl"); } @@ -84,7 +103,7 @@ namespace StgSharp.Graphics.GL { InternalIO.InternalWriteLog("Failed to call glGetString", LogType.Error); } - coreVersion = Marshal.PtrToStringAnsi(context->glGetString(glVersion)); + coreVersion = Marshal.PtrToStringAnsi(context->glGetString(glVersion)) ?? string.Empty; foreach (string branch in glBranch) { @@ -132,20 +151,31 @@ namespace StgSharp.Graphics.GL } } - IntPtr strPtr = context->glGetString(glExtension); - string extension; - if (strPtr == IntPtr.Zero) + uint code = context->glGetError(); + Console.WriteLine(code); + if (code != 0) + { + throw new GlExecutionException(code); + } + + int extensionCount; + context->glGetIntegerv(GLconst.NUM_EXTENSIONS, &extensionCount); + if (extensionCount == 0) { InternalIO.InternalWriteLog("No supported OpenGL extensions are found.", LogType.Info); return; } - else + + List extensions = new List(); + + for (uint i = 0; i < extensionCount; i++) { - extension = Marshal.PtrToStringAnsi(strPtr); + byte* strPtr = context->glGetStringi(GLconst.EXTENSIONS, i); + extensions.Add(Marshal.PtrToStringAnsi((IntPtr)strPtr)); } - List extensions = - extension.Split(" ").ToList(); + InternalIO.InternalWriteLog($"{$"Find OpenGL extensions:"}{Environment.NewLine}{($"{string.Join(';', extensions)}")}", + LogType.Info); #region checkGLextensions @@ -771,28 +801,16 @@ namespace StgSharp.Graphics.GL #endregion checkGLextensions - InternalIO.InternalWriteLog("Find OpenGL extensions.", LogType.Info); - } - /// - /// Get the function pointer of given OpenGL api name - /// - /// ContextName of the OpenGL api - /// The funtion pointer of the api in stream of - public static IntPtr LoadGLfunc(string name) - { - IntPtr ret = InternalIO.glfwGetProcAddress(name); - if (ret == default) - { - InternalIO.InternalAppendLog( - $"Cannot load OpenGL api called {name}, this api may not exist or supported."); - return ret; - } - return ret; } internal static void CheckCoreVersion(int majorVersion, int minorVersion) { + if (majorVersion < 3) + { + throw new InvalidOperationException("StgSharp does not support OpenGL immediate mode."); + } + if ((majorVersion >= 1) || ((majorVersion == 1) && (minorVersion == 0))) { core10 = true; @@ -971,7 +989,7 @@ namespace StgSharp.Graphics.GL } } - internal static unsafe string GetExtensions(this GLcontext context) + internal static unsafe string GetExtensions(this OpenglContext context) { if (context.glGetString == null) { @@ -998,7 +1016,7 @@ namespace StgSharp.Graphics.GL } } - internal static unsafe void LoadGLcore10(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore10(OpenglContext* contextPtr, delegate* load) { if (!core10) { @@ -1062,7 +1080,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 1.0 APIs"); } - internal static unsafe void LoadGLcore11(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore11(OpenglContext* contextPtr, delegate* load) { if (!core11) { @@ -1092,7 +1110,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 1.1 APIs"); } - internal static unsafe void LoadGLcore12(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore12(OpenglContext* contextPtr, delegate* load) { if (!core12) { @@ -1112,7 +1130,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 1.2 APIs"); } - internal static unsafe void LoadGLcore13(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore13(OpenglContext* contextPtr, delegate* load) { if (!core13) { @@ -1137,7 +1155,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 1.3 APIs"); } - internal static unsafe void LoadGLcore14(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore14(OpenglContext* contextPtr, delegate* load) { if (!core14) { @@ -1162,7 +1180,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 1.4 APIs"); } - internal static unsafe void LoadGLcore15(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore15(OpenglContext* contextPtr, delegate* load) { if (!core15) { @@ -1197,7 +1215,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 1.5 APIs"); } - internal static unsafe void LoadGLcore20(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore20(OpenglContext* contextPtr, delegate* load) { if (!core20) { @@ -1306,7 +1324,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 2.0 APIs"); } - internal static unsafe void LoadGLcore21(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore21(OpenglContext* contextPtr, delegate* load) { if (!core21) { @@ -1328,7 +1346,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 2.1 APIs"); } - internal static unsafe void LoadGLcore30(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore30(OpenglContext* contextPtr, delegate* load) { if (!core30) { @@ -1428,7 +1446,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 3.0 APIs"); } - internal static unsafe void LoadGLcore31(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore31(OpenglContext* contextPtr, delegate* load) { if (!core31) { @@ -1459,7 +1477,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 3.1 APIs"); } - internal static unsafe void LoadGLcore32(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore32(OpenglContext* contextPtr, delegate* load) { if (!core32) { @@ -1494,7 +1512,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 3.2 APIs"); } - internal static unsafe void LoadGLcore33(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore33(OpenglContext* contextPtr, delegate* load) { if (!core33) { @@ -1538,7 +1556,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 3.3 APIs"); } - internal static unsafe void LoadGLcore40(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore40(OpenglContext* contextPtr, delegate* load) { if (!core40) { @@ -1600,7 +1618,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 4.0 APIs"); } - internal static unsafe void LoadGLcore41(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore41(OpenglContext* contextPtr, delegate* load) { if (!core41) { @@ -1704,7 +1722,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 4.1 APIs"); } - internal static unsafe void LoadGLcore42(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore42(OpenglContext* contextPtr, delegate* load) { if (!core42) { @@ -1732,7 +1750,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 4.2 APIs"); } - internal static unsafe void LoadGLcore43(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore43(OpenglContext* contextPtr, delegate* load) { if (!core43) { @@ -1792,7 +1810,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 4.3 APIs"); } - internal static unsafe void LoadGLcore44(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore44(OpenglContext* contextPtr, delegate* load) { if (!core44) { @@ -1817,7 +1835,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 4.4 APIs"); } - internal static unsafe void LoadGLcore45(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore45(OpenglContext* contextPtr, delegate* load) { if (!core45) { @@ -1943,7 +1961,7 @@ namespace StgSharp.Graphics.GL InternalIO.InternalAppendLog("Successfully load all OpenGL 4.5 APIs"); } - internal static unsafe void LoadGLcore46(GLcontext* contextPtr, delegate* load) + internal static unsafe void LoadGLcore46(OpenglContext* contextPtr, delegate* load) { if (!core46) { diff --git a/源代码/StgSharp/Graphics/GL/glApiManagerConst.cs b/源代码/StgSharpDebug/Graphics/OpenGL/glApiManagerConst.cs similarity index 99% rename from 源代码/StgSharp/Graphics/GL/glApiManagerConst.cs rename to 源代码/StgSharpDebug/Graphics/OpenGL/glApiManagerConst.cs index 6000633a..40ca87ef 100644 --- a/源代码/StgSharp/Graphics/GL/glApiManagerConst.cs +++ b/源代码/StgSharpDebug/Graphics/OpenGL/glApiManagerConst.cs @@ -32,7 +32,7 @@ using System; using System.Collections.Generic; using System.Text; -namespace StgSharp.Graphics.GL +namespace StgSharp.Graphics.OpenGL { public static partial class glManager { diff --git a/源代码/StgSharpDebug/Graphics/OpenGL/glException.cs b/源代码/StgSharpDebug/Graphics/OpenGL/glException.cs new file mode 100644 index 00000000..04dff63b --- /dev/null +++ b/源代码/StgSharpDebug/Graphics/OpenGL/glException.cs @@ -0,0 +1,104 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="glException.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.CompilerServices; +using System.Runtime.Serialization; +using System.Text; + +namespace StgSharp.Graphics.OpenGL +{ + public sealed class GlExecutionException : Exception + { + + public GlExecutionException() + { + } + + public GlExecutionException(uint errorCode) : base($"Critical OpenGL error: {errorCode}") + { + } + + } + + public sealed class GlArrayFormatException : Exception + { + + internal GlArrayFormatException(string message) : base(message) + { + } + + internal GlArrayFormatException(SerializationInfo info, StreamingContext context) : base(info, context) + { + } + + internal GlArrayFormatException(string message, Exception innerException) : base(message, innerException) + { + } + public GlArrayFormatException(PixelChannelLayout layout, string arrayname) : + base($"{arrayname} cannot be used as layout of {layout}") + { + } + + } + + public static partial class GlHelper + { + + public static bool CheckArrayFormat(this Array array, PixelChannelLayout layout) + { + return layout switch + { + PixelChannelLayout.Byte or PixelChannelLayout.UByte332 or PixelChannelLayout.UByte233Rev + => (array is byte[]) || (array is sbyte[]), + PixelChannelLayout.Short => array is short[], + PixelChannelLayout.UShort => array is ushort[], + PixelChannelLayout.Int => array is int[], + PixelChannelLayout.Float => array is float[], + PixelChannelLayout.UShort4444 => (array is ushort[]) || (array is byte[]), + PixelChannelLayout.UByte => (array is byte[]) || (array is sbyte[]), + PixelChannelLayout.UInt => array is uint[], + PixelChannelLayout.UShort565 or + PixelChannelLayout.UShort565Rev or + PixelChannelLayout.UShort4444Rev or + PixelChannelLayout.UShort5551 or + PixelChannelLayout.UShort1555Rev => array is ushort[], + PixelChannelLayout.UInt8888Rev or + PixelChannelLayout.UInt1010102 or + PixelChannelLayout.UInt2101010Rev => array is int[], + PixelChannelLayout.UInt8888 => array is uint[] or byte[], + _ => false, + }; + } + + } +} diff --git a/源代码/StgSharpDebug/Graphics/GL/GLpack.cs b/源代码/StgSharpDebug/Graphics/OpenGL/glFunction.cs similarity index 55% rename from 源代码/StgSharpDebug/Graphics/GL/GLpack.cs rename to 源代码/StgSharpDebug/Graphics/OpenGL/glFunction.cs index 9aa985df..175b8a5b 100644 --- a/源代码/StgSharpDebug/Graphics/GL/GLpack.cs +++ b/源代码/StgSharpDebug/Graphics/OpenGL/glFunction.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="GLpack.cs" +// file="glFunction.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -29,13 +29,15 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- using StgSharp.Graphics; -using StgSharp.Logic; + using StgSharp.Math; using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.Diagnostics; using System.Runtime.CompilerServices; +using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; using System.Text; @@ -47,193 +49,174 @@ namespace StgSharp [DllImport(SSC_libName, EntryPoint = "glCheckShaderStat", CallingConvention = CallingConvention.Cdecl)] #pragma warning disable CA5392 - internal static extern int glCheckShaderStatus(ref GLcontext context, uint shaderHandle, int key, ref IntPtr logPtr); + internal static extern int glCheckShaderStatus(ref OpenglContext context, uint shaderHandle, int key, ref IntPtr logPtr); #pragma warning restore CA5392 } } -namespace StgSharp.Graphics.GL + +namespace StgSharp.Graphics.OpenGL { - internal static unsafe partial class glFunc + + + public unsafe partial class OpenGLFunction { - private static GLcontext* context; + private static Dictionary contextToGLMap = new Dictionary(); + private OpenglContext* _context; - public static IntPtr CurrentContextHandle + private OpenGLFunction() { - get { return (IntPtr)context; } - set { context = (GLcontext*)value; } + textureUnitCountGetter = new Lazy(() => GetMaskInteger(GLconst.MAX_TEXTURE_IMAGE_UNITS)); + unusedTextureImageUintInitilizing = new Lazy>(InitializeUnusedTextureImageUint); } - private static ref GLcontext Context + internal IntPtr ContextHandle => (IntPtr)_context; + + internal static OpenGLFunction CurrentGL { get; set; } + + protected ref OpenglContext Context { get { #if DEBUG - if ((IntPtr)context==IntPtr.Zero) + if ((IntPtr)_context == IntPtr.Zero) { throw new NullReferenceException(); } #endif - return ref (*context); + return ref (*_context); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void ActiveTexture(uint type) + public void ActiveTextureUnit(uint type) { Context.glActiveTexture(type); } + [Conditional("DEBUG")] + public void Assert(bool shouldReportWhenNormal) + { + try + { + uint code = Context.glGetError(); + if (code != GLconst.NO_ERROR) + { + throw new GlExecutionException(code); + } + if (shouldReportWhenNormal) + { + Console.WriteLine("OpenGL runs normally"); + } + } + catch (GlExecutionException ex) + { + throw ex; + } + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void AttachShader(glHandle program, glHandle shader) + public void AttachShader(GlHandle program, GlHandle shader) { Context.glAttachShader(program.Value, shader.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void BindBuffer(BufferType bufferType, glHandle handle) + public void BindBuffer(BufferType bufferType, GlHandle handle) { Context.glBindBuffer((uint)bufferType, handle.Value); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void GetTextureImage(Texture2DTarget target, int level, ImageChannel channel, ImageChannelLayout channelLayout, ref T[] dataStream)where T: struct, -#if NET8_0_OR_GREATER - INumber -#else - IConvertible -#endif - - { -#pragma warning disable CS8500 - fixed (T* tptr = dataStream) - { - Context.glGetTexImage((uint)target, level, (uint)channel, (uint)channelLayout, tptr); - } -#pragma warning restore CS8500 - } - /// /// Bind a frame buffer to a frame buffer target - /// Same function as glBindFramebuffer. + /// Same function as glBindFramebuffer. /// /// The frame buffer target of the binding operation. /// The handle of the frame buffer object to bind. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void BindFrameBuffer(FrameBufferTarget target, glHandle handle) + public void BindFrameBuffer(FrameBufferTarget target, GlHandle handle) { Context.glBindFramebuffer((uint)target, handle.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void BindRenderBuffer(glHandle handle) + public void BindRenderBuffer(GlHandle handle) { Context.glBindRenderbuffer(GLconst.RENDERBUFFER, handle.Value); } - - public static void WaitAccomplishment() - { - Context.glFinish(); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void BindTexture(uint type, glHandle texture) + public void BindTexture(uint type, GlHandle texture) { Context.glBindTexture(type, texture.Value); } - public static unsafe int GetMaskInteger(uint statusCode) - { - int ret = 0; - Context.glGetIntegerv(statusCode,&ret); - return ret; - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void BindVertexArray(glHandle handle) + public void BindVertexArray(GlHandle handle) { Context.glBindVertexArray(handle.Value); } - public static void RereadImage( - this Image i, (int X, int Y) beginPosition, FrameBufferChannel format, ImageChannelLayout dataType) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public FrameBufferStatus CheckFrameBufferStatus(FrameBufferTarget target) { - glArrayHandle handle = i.GetArrayHandle(); - Context.glReadPixels( - beginPosition.X, beginPosition.Y, i.Width, i.Height, (uint)format, (uint)dataType, (byte*)handle.AddressOfArray() - ); + return (FrameBufferStatus)Context.glCheckFramebufferStatus((uint)target); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void FrameBufferTexture2d(FrameBufferTarget target, uint attachment, Texture2DTarget texTarget,glHandle textureHandle ,int level) - { - Context.glFramebufferTexture2D( - (uint)target, attachment, (uint)texTarget,textureHandle.Value, level - ); - } - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void ReadPixels( - (int X, int Y) beginPosition, (int width, int height) size, FrameBufferChannel format, ImageChannelLayout dataType, ref byte[] stream - ) - { - fixed (byte* bptr = stream) - { - Context.glReadPixels( - beginPosition.X, beginPosition.Y, - size.width, size.height, (uint)format, (uint)dataType, bptr); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void Clear(MaskBufferBit mask) + public void Clear(MaskBufferBit mask) { Context.glClear((uint)mask); } - public static void CombineFrameBufferRenderBuffer(glHandle fboHandle, glHandle rboHandle) - { - Context.glFramebufferRenderbuffer(GLconst.FRAMEBUFFER,fboHandle.Value,GLconst.RENDERBUFFER, rboHandle.Value); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void ClearColor(float R, float G, float B, float A) + public unsafe void ClearColor(float R, float G, float B, float A) { Context.glClearColor(R, G, B, A); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void ClearGraphicError() + public void ClearError() { while (Context.glGetError() != 0) { } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void CompileShader(glHandle shaderhandle) + public unsafe void ClearGraphicError() + { + while (Context.glGetError() != 0) { } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void CombineFrameBufferRenderBuffer(FrameBufferAttachment attachment, GlHandle rboHandle) + { + Context.glFramebufferRenderbuffer(GLconst.FRAMEBUFFER, (uint)attachment, GLconst.RENDERBUFFER, rboHandle.Value); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void CompileShader(GlHandle shaderhandle) { Context.glCompileShader(shaderhandle.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe glHandle CreateGraphicProgram() + public unsafe GlHandle CreateGraphicProgram() { - return glHandle.Alloc(Context.glCreateProgram()); + return GlHandle.Alloc(Context.glCreateProgram()); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static glHandle CreateProgram() + public GlHandle CreateProgram() { - return glHandle.Alloc(Context.glCreateProgram()); + return GlHandle.Alloc(Context.glCreateProgram()); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe glHandleSet CreateProgram(int count) + public unsafe GlHandle[] CreateProgram(int count) { - glHandleSet h = new glHandleSet(count); + GlHandle[] h = new GlHandle[count]; for (int i = 0; i < count; i++) { h.SetValue(i, Context.glCreateProgram()); @@ -242,9 +225,9 @@ namespace StgSharp.Graphics.GL } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static glHandleSet CreateShaderSet(int count, ShaderType type) + public GlHandle[] CreateShaderSet(int count, ShaderType type) { - glHandleSet ret = new glHandleSet(count); + GlHandle[] ret = new GlHandle[count]; uint t = (uint)type; for (int i = 0; i < count; i++) { @@ -252,66 +235,66 @@ namespace StgSharp.Graphics.GL if (id == 0) { uint error = Context.glGetError(); - InternalIO.InternalWriteLog($"Failed in creating shader: {error}", LogType.Error); - throw new Exception(); + throw new InvalidOperationException($"Failed in creating shader: {error}"); } - ret.SetValue(i, id); + ret[i] = GlHandle.Alloc(id); } return ret; } - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void DeleteBuffer(glHandle handle) + public unsafe void DeleteBuffer(GlHandle handle) { - Context.glDeleteBuffers(1, (uint*)handle.Handle); + Context.glDeleteBuffers(1, (uint*)&handle); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void DeleteBuffers(glHandleSet handle) + public unsafe void DeleteBuffers(GlHandle[] handle) { - Context.glDeleteBuffers(handle.length, (uint*)handle.Handle); - handle.Release(); + if ((handle == null) || (handle.Length == 0)) + { + throw new ArgumentNullException(nameof(handle)); + } + fixed (GlHandle* hptr = handle) + { + uint* iptr = (uint*)hptr; + for (int i = 0; i < handle.Length; i++) + { + Context.glDeleteBuffers(1, iptr + i); + } + } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void DeleteVertexArrays(glHandleSet arrays) + public unsafe void DeleteVertexArrays(GlHandle[] arrays) { - Context.glDeleteVertexArrays(arrays.length, (uint*)arrays.Handle); - arrays.Release(); + fixed (GlHandle* hptr = arrays) + { + uint* iptr = (uint*)hptr; + for (int i = 0; i < arrays.Length; i++) + { + Context.glDeleteVertexArrays(1, iptr + i); + } + } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void DrawElements(GeometryType mode, uint count, TypeCode type, IntPtr ptr) + public unsafe void DrawElements(GeometryType mode, uint count, TypeCode type, IntPtr ptr) { uint a; - switch (type) + a = type switch { - case TypeCode.UInt32: - a = GLconst.UNSIGNED_INT; - break; - - case TypeCode.UInt16: - a = GLconst.UNSIGNED_SHORT; - break; - - case TypeCode.Byte: - a = GLconst.UNSIGNED_BYTE; - break; - - default: - InternalIO.InternalWriteLog( - $"{$"Parameter error in parameter {nameof(type)} method DrawElements. "}{$"Only {typeof(uint).Name},{typeof(ushort).Name},{typeof(byte).Name} types are supported."}", - LogType.Error); - return; - } + TypeCode.UInt32 => GLconst.UNSIGNED_INT, + TypeCode.UInt16 => GLconst.UNSIGNED_SHORT, + TypeCode.Byte => GLconst.UNSIGNED_BYTE, + _ => throw new ArgumentException( + $"{$"{$"Parameter error in parameter {nameof(type)} method DrawElements. "}"}{$"{$"Only {typeof(uint).Name},{typeof(ushort).Name},{typeof(byte).Name} types are supported."}"}") + }; Context.glDrawElements((uint)mode, count, a, (void*)ptr); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void DrawElementsInstanced( + public void DrawElementsInstanced( GeometryType mode, uint count, TypeCode type, IntPtr ptr, uint amount ) { @@ -340,53 +323,98 @@ namespace StgSharp.Graphics.GL } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void Enable(GLOperation operation) + public void Enable(GLOperation operation) { Context.glEnable((uint)operation); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe glHandleSet GenBuffers(int count) + public void FrameBufferTexture2d(FrameBufferTarget target, uint attachment, Texture2DTarget texTarget, GlHandle textureHandle, int level) { - glHandleSet h = new glHandleSet(count); - Context.glGenBuffers(count, (uint*)h.Handle); - return h; - } - - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe glHandleSet GenRenderBuffer(int count) - { - glHandleSet h = new glHandleSet(count); - Context.glGenRenderbuffers(count, (uint*)h.Handle); - return h; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe glHandleSet GenTextures(int count) - { - glHandleSet h = new glHandleSet(count); - Context.glGenTextures(count, (uint*)h.Handle); - return h; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetRenderBufferStorage(RenderBufferInternalFormat internalFormat ,(int width, int height) size) - { - Context.glRenderbufferStorage( - GLconst.RENDERBUFFER, (uint)internalFormat,size.width,size.height + Context.glFramebufferTexture2D( + (uint)target, attachment, (uint)texTarget, textureHandle.Value, level ); } - - public static unsafe glHandleSet GenVertexArrays(int count) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe GlHandle[] GenBuffers(int count) { - glHandleSet h = new glHandleSet(count); - Context.glGenVertexArrays(count, (uint*)h.Handle); + GlHandle[] h = new GlHandle[count]; + fixed (GlHandle* hptr = h) + { + for (int i = 0; i < count; i++) + { + Context.glGenBuffers(count, ((uint*)hptr) + i); + } + } return h; } - public static string GetShaderStatus(Shader s, int index, int key) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void GenerateMipmap(Texture2DTarget target) + { + Context.glGenerateMipmap((uint)target); + } + + public unsafe GlHandle[] GenFrameBuffers(int count) + { + GlHandle[] h = new GlHandle[count]; + fixed (GlHandle* hptr = h) + { + Context.glGenFramebuffers(1, (uint*)hptr); + } + return h; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe GlHandle[] GenRenderBuffer(int count) + { + GlHandle[] h = new GlHandle[count]; + fixed (GlHandle* hptr = h) + { + Context.glGenRenderbuffers(count, (uint*)hptr); + } + return h; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe GlHandle[] GenTextures(int count) + { + + GlHandle[] h = new GlHandle[count]; + fixed (GlHandle* hptr = h) + { + Context.glGenTextures(count, (uint*)hptr); + } + return h; + } + + + public unsafe GlHandle[] GenVertexArrays(int count) + { + + GlHandle[] h = new GlHandle[count]; + fixed (GlHandle* hptr = h) + { + Context.glGenVertexArrays(count, (uint*)hptr); + } + return h; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public uint GetError() + { + return Context.glGetError(); + } + + public unsafe int GetMaskInteger(uint statusCode) + { + int ret = 0; + Context.glGetIntegerv(statusCode, &ret); + return ret; + } + + public string GetShaderStatus(Shader s, int index, int key) { IntPtr sptr = IntPtr.Zero; if (InternalIO.glCheckShaderStatus(ref Context, s.handle[index].Value, key, ref sptr) == 0) @@ -396,31 +424,48 @@ namespace StgSharp.Graphics.GL return string.Empty; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void GetTextureImage(Texture2DTarget target, int level, ImageChannel channel, PixelChannelLayout channelLayout, T[] dataStream) + where T : struct, +#if NET8_0_OR_GREATER + INumber +#else + IConvertible +#endif + { +#pragma warning disable CS8500 + fixed (T* tptr = dataStream) + { + Context.glGetTexImage((uint)target, level, (uint)channel, (uint)channelLayout, tptr); + } +#pragma warning restore CS8500 + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe glSHandle GetUniformLocation(glHandle program, string name) + public unsafe GlHandle GetUniformLocation(GlHandle program, string name) { byte[] code = Encoding.UTF8.GetBytes(name); fixed (byte* ptr = code) { int ret = Context.glGetUniformLocation(program.Value, ptr); #if DEBUG - if (ret == (int)(GLconst.INVALID_OPERATION) || - ret == (int)(GLconst.INVALID_VALUE)) + if ((ret == GLconst.INVALID_OPERATION) || + (ret == GLconst.INVALID_VALUE)) { throw new InvalidOperationException(); } - if (ret == -1 ) + if (ret == -1) { throw new UniformEmptyReferenceException(nameof(program), name); } #endif - return glSHandle.Alloc(ret); + return GlHandle.SignedAlloc(ret); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void LoadShaderSource(glHandle shaderHandle, byte[] codeStream) + public unsafe void LoadShaderSource(GlHandle shaderHandle, byte[] codeStream) { fixed (byte* streamPtr = codeStream) { @@ -428,8 +473,38 @@ namespace StgSharp.Graphics.GL } } + [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetBufferData(BufferType bufferType, T bufferData, BufferUsage usage) + public void ReadPixels( + (int X, int Y) beginPosition, (int width, int height) size, FrameBufferChannel format, PixelChannelLayout dataType, ref byte[] stream + ) + { + fixed (byte* bptr = stream) + { + Context.glReadPixels( + beginPosition.X, beginPosition.Y, + size.width, size.height, (uint)format, (uint)dataType, bptr); + } + } + + public void RereadImage( + in Image i, (int X, int Y) beginPosition, FrameBufferChannel format, PixelChannelLayout dataType) + { + byte[] pixels = i.PixelBuffer; + if (!pixels.CheckArrayFormat(dataType)) + { + throw new GlArrayFormatException(dataType, "i.PixelArray"); + } + fixed (byte* bptr = pixels) + { + Context.glReadPixels( + beginPosition.X, beginPosition.Y, i.Width, i.Height, (uint)format, (uint)dataType, bptr); + } + i.PixelUpdateCount++; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public unsafe void SetBufferData(BufferType bufferType, T bufferData, BufferUsage usage) where T : struct { int size = Marshal.SizeOf(); @@ -444,7 +519,7 @@ namespace StgSharp.Graphics.GL } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetBufferData(BufferType bufferType, T[] bufferArray, BufferUsage usage) + public unsafe void SetBufferData(BufferType bufferType, T[] bufferArray, BufferUsage usage) where T : struct, #if NET8_0_OR_GREATER INumber @@ -471,7 +546,7 @@ namespace StgSharp.Graphics.GL [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetBufferData(BufferType bufferType, ReadOnlySpan bufferArray, BufferUsage usage) + public unsafe void SetBufferData(BufferType bufferType, ReadOnlySpan bufferArray, BufferUsage usage) where T : struct, #if NET8_0_OR_GREATER INumber @@ -498,7 +573,7 @@ namespace StgSharp.Graphics.GL [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetBufferData(BufferType bufferType, Span bufferArray, BufferUsage usage) + public unsafe void SetBufferData(BufferType bufferType, Span bufferArray, BufferUsage usage) where T : struct, #if NET8_0_OR_GREATER INumber @@ -526,7 +601,7 @@ namespace StgSharp.Graphics.GL [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetBufferVectorData(BufferType bufferType, ReadOnlySpan bufferArray, BufferUsage usage) + public unsafe void SetBufferVectorData(BufferType bufferType, ReadOnlySpan bufferArray, BufferUsage usage) where T : struct, IVector { int size = bufferArray.Length * Marshal.SizeOf(typeof(T)); @@ -547,7 +622,7 @@ namespace StgSharp.Graphics.GL } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static unsafe void SetBufferVectorData(BufferType bufferType, T[] bufferArray, BufferUsage usage) + public unsafe void SetBufferVectorData(BufferType bufferType, T[] bufferArray, BufferUsage usage) where T : struct, IVector { int size = bufferArray.Length * Marshal.SizeOf(typeof(T)); @@ -568,7 +643,15 @@ namespace StgSharp.Graphics.GL } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void SetVertexAttribute(uint index, int size, TypeCode t, bool normalized, uint stride, int pointer) + public unsafe void SetRenderBufferStorage(RenderBufferInternalFormat internalFormat, (int width, int height) size) + { + Context.glRenderbufferStorage( + GLconst.RENDERBUFFER, (uint)internalFormat, size.width, size.height + ); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void SetVertexAttribute(uint index, int size, TypeCode t, bool normalized, uint stride, int pointer) { uint type = InternalIO.GLtype[t]; Context.glVertexAttribPointer(index, size, type, normalized ? 1 : 0, stride, (void*)pointer); @@ -576,47 +659,93 @@ namespace StgSharp.Graphics.GL } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void TextureImage2d(Texture2DTarget target, int level, uint internalformat, uint width, uint height, - uint format, ImageChannelLayout type, glHandle pixels) + public void TextureImage2d(Texture2DTarget target, int level, uint internalformat, uint width, uint height, + uint format, PixelChannelLayout type, T[] pixels) where T : struct, +#if NET8_0_OR_GREATER + INumber +#else + IConvertible +#endif { - Context.glTexImage2D( - (uint)target, level, internalformat, width, height, 0, format, (uint)type, pixels.valuePtr - ); +#pragma warning disable CS8500 + fixed (T* tptr = ((pixels == null) || (pixels.Length == 0)) ? null : pixels) + { + Context.glTexImage2D( + (uint)target, level, internalformat, width, height, 0, format, (uint)type, tptr); + } +#pragma warning restore CS8500 } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void TextureImage2d(Texture2DTarget target, int level, uint internalformat, uint width, uint height, - uint format, ImageChannelLayout type, glArrayHandle pixelArrayHandle) + public void TextureImage2d(Texture2DTarget target, int level, uint internalformat, uint width, uint height, + uint format, PixelChannelLayout type, Span pixelSpan) where T : struct, +#if NET8_0_OR_GREATER + INumber +#else + IConvertible +#endif { - Context.glTexImage2D( - (uint)target, level, internalformat, width, height, 0, format, (uint)type, (void*)pixelArrayHandle.handle.AddrOfPinnedObject() - ); +#pragma warning disable CS8500 + fixed (T* tptr = pixelSpan) + { + Context.glTexImage2D( + (uint)target, level, internalformat, width, height, 0, format, (uint)type, tptr); + } +#pragma warning restore CS8500 } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void TextureParameter(int target, uint pname, int param) + public void TextureParameter(int target, uint pname, int param) { Context.glTexParameteri((uint)target, pname, param); } + public static bool TryGetFunctionPackage(IntPtr handle, out OpenGLFunction functionPackage) + { + return contextToGLMap.TryGetValue(handle, out functionPackage); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void UseProgram(glHandle program) + public void UseProgram(GlHandle program) { Context.glUseProgram(program.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void VertexAttributeDivisor(uint layoutIndex, uint divisor) + public void VertexAttributeDivisor(uint layoutIndex, uint divisor) { Context.glVertexAttribDivisor(layoutIndex, divisor); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void Viewport(int x, int y, uint width, uint height) + public void Viewport(int x, int y, uint width, uint height) { Context.glViewport(x, y, width, height); } + + public void WaitAccomplishment() + { + Context.glFinish(); + } + + internal static OpenGLFunction BuildGlFunctionPackage(IntPtr handle) + { + OpenGLFunction pack; + if (contextToGLMap.TryGetValue(handle, out pack)) + { + return pack; + } + pack = new OpenGLFunction { _context = (OpenglContext*)handle }; + contextToGLMap.Add(handle, pack); + return pack; + } + + ~OpenGLFunction() + { + contextToGLMap.Remove(ContextHandle); + } + } } diff --git a/源代码/StgSharp/Graphics/GL/glRenderStream.cs b/源代码/StgSharpDebug/Graphics/OpenGL/glRenderStream.cs similarity index 78% rename from 源代码/StgSharp/Graphics/GL/glRenderStream.cs rename to 源代码/StgSharpDebug/Graphics/OpenGL/glRenderStream.cs index e3a429e7..14c98afc 100644 --- a/源代码/StgSharp/Graphics/GL/glRenderStream.cs +++ b/源代码/StgSharpDebug/Graphics/OpenGL/glRenderStream.cs @@ -28,36 +28,34 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Logic; + using StgSharp.Math; using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; -namespace StgSharp.Graphics.GL +namespace StgSharp.Graphics.OpenGL { public abstract partial class glRenderStream : RenderStream { - protected glRenderStream(ViewPort v, (int,int,int) cube) : base(v,cube) - { - } + private OpenGLFunction _context; - - protected IntPtr glContextHandle + protected internal OpenGLFunction GL { - get { return ContextHandle; } + get { return _context; } } /// - /// Init an OpenGl viewPortDisplay if current form has not been binded to any viewPortDisplay. and set the viewPortDisplay binded to - /// current form as current OpenGL viewPortDisplay. + /// Initialize an OpenGl viewPortDisplay if current form has not been binded to any viewPortDisplay. + /// and set the viewPortDisplay binded to current form as current OpenGL viewPortDisplay. /// /// /// Something goes wrong and StgSharp fails in creating a new OpenGL viewPortDisplay. @@ -66,13 +64,17 @@ namespace StgSharp.Graphics.GL { if (ContextHandle == default) { - ContextHandle = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(GLcontext))); - GLcontext* contextID = (GLcontext*)ContextHandle; + ContextHandle = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(OpenglContext))); + OpenglContext* contextID = (OpenglContext*)ContextHandle; contextID->glGetString = (delegate*)IntPtr.Zero; } - if (glFunc.CurrentContextHandle != ContextHandle) + if (GL == null) { - glFunc.CurrentContextHandle = ContextHandle; + _context = OpenGLFunction.BuildGlFunctionPackage(ContextHandle); + } + if (OpenGLFunction.CurrentGL != GL) + { + OpenGLFunction.CurrentGL = GL; InternalIO.glfwMakeContextCurrent(CanvasHandle); } } @@ -83,24 +85,24 @@ namespace StgSharp.Graphics.GL InternalIO.glfwSetWindowSizeLimits(this.CanvasHandle, minWidth, minHeight, maxWidth, maxHeight); } - internal override sealed void InternalDraw( - in Dictionary input, - in Dictionary output) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal override sealed void Draw() { MakeAsCurrentContext(); - Main(in input, in output); + Main(); } - internal override sealed void InternalInit() + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal override sealed void PlatformSpecifiedInitialize() { MakeAsCurrentContext(); - this.Port.LoadGLapi(); - Init(); + glManager.LoadOpenGLApiTo(Port.GraphicHandle); } - internal override sealed void InternalTerminate() + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal override sealed void Terminate() { - Deinit(); + CustomizeDeinit(); } protected override sealed Uniform NativeCameraUniform(ShaderProgram source, string name) @@ -120,7 +122,6 @@ namespace StgSharp.Graphics.GL NativeCamera.SetViewDirection(position, direction, up); } - #region Key Control protected KeyStatus CheckKey(KeyboardKey key) @@ -140,5 +141,6 @@ namespace StgSharp.Graphics.GL #endregion + } } diff --git a/源代码/StgSharpDebug/Graphics/GL/GLresourceGenrator.cs b/源代码/StgSharpDebug/Graphics/OpenGL/glResourceGenrator.cs similarity index 93% rename from 源代码/StgSharpDebug/Graphics/GL/GLresourceGenrator.cs rename to 源代码/StgSharpDebug/Graphics/OpenGL/glResourceGenrator.cs index 9eab57dd..a2fb3f1b 100644 --- a/源代码/StgSharpDebug/Graphics/GL/GLresourceGenrator.cs +++ b/源代码/StgSharpDebug/Graphics/OpenGL/glResourceGenrator.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="GLresourceGenrator.cs" +// file="glResourceGenrator.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -35,7 +35,7 @@ using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; -namespace StgSharp.Graphics.GL +namespace StgSharp.Graphics.OpenGL { public partial class glRenderStream { @@ -51,6 +51,12 @@ namespace StgSharp.Graphics.GL return new ElementBuffer(count, this); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + protected FrameBuffer CreateFrameBuffer(int count) + { + return new FrameBuffer(count, this); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] protected RenderBuffer CreateRenderBuffer(int count) @@ -58,12 +64,6 @@ namespace StgSharp.Graphics.GL return new RenderBuffer(count, this); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - protected FrameBuffer CreateFrameBuffer(int count) - { - return new FrameBuffer(count, this); - } - /// /// Create a sets of /// @@ -75,6 +75,13 @@ namespace StgSharp.Graphics.GL return new TextureGL(count, this); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + protected AutoTextureGL CreateAutoTexture(int count) + { + return new AutoTextureGL(count, this); + } + + /// /// Create a set of . /// @@ -97,6 +104,6 @@ namespace StgSharp.Graphics.GL return new VertexBuffer(count, this); } - + } } \ No newline at end of file diff --git a/源代码/StgSharpDebug/Graphics/OpenGL/glResourceManager.cs b/源代码/StgSharpDebug/Graphics/OpenGL/glResourceManager.cs new file mode 100644 index 00000000..c3d8da75 --- /dev/null +++ b/源代码/StgSharpDebug/Graphics/OpenGL/glResourceManager.cs @@ -0,0 +1,99 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="glResourceManager.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the ¡°Software¡±), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED ¡°AS IS¡±, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- + +using StgSharp; + +using System; +using System.Collections.Concurrent; + +using System.Collections.Generic; + +namespace StgSharp.Graphics.OpenGL +{ + public partial class OpenGLFunction + { + + private Lazy textureUnitCountGetter; + private Lazy> unusedTextureImageUintInitilizing; + + public int TextureUnitCount + { + get => textureUnitCountGetter.Value; + } + + private ConcurrentQueue UnusedTextureImageUint + { + get => unusedTextureImageUintInitilizing.Value; + } + + internal void ReturnAvailableUnit(IEnumerable source) + { + int v = GLconst.TEXTURE0 + TextureUnitCount; + foreach (TextureUnit unit in source) + { + if ((int)unit > v) + { + throw new InvalidOperationException("Source contains texture unit beyond context support."); + } + } + } + + internal int TryGetAvailableTextureUnit(int count, out IEnumerable result) + { + result = new Queue(); + for (int i = 0; i < count; i++) + { + if (UnusedTextureImageUint.TryDequeue(out TextureUnit unit)) + { + (result as Queue)!.Enqueue(unit); + } + else + { + return i; + } + } + return count; + } + + private ConcurrentQueue InitializeUnusedTextureImageUint() + { + ConcurrentQueue result = new ConcurrentQueue(); + for (int index = 0; index < TextureUnitCount; index++) + { + result.Enqueue((TextureUnit)(GLconst.TEXTURE0 + index)); + } + return result; + } + + + + } +} \ No newline at end of file diff --git a/源代码/StgSharpDebug/Graphics/Pixels.cs b/源代码/StgSharpDebug/Graphics/Pixels.cs new file mode 100644 index 00000000..330a94bd --- /dev/null +++ b/源代码/StgSharpDebug/Graphics/Pixels.cs @@ -0,0 +1,63 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Pixels.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; + +namespace StgSharp.Graphics +{ + public interface IPixel + { + + public float Red { get; set; } + public float Green { get; set; } + public float Blue { get; set; } + public float Alpha { get; set; } + + internal int Size { get; } + + + } + + [StructLayout(LayoutKind.Explicit, Size = 32)] + public unsafe struct Pixel32 + { + + [FieldOffset(0)] private unsafe fixed byte data[4]; + + internal int Size => 4; + + } + + + +} diff --git a/源代码/StgSharpDebug/Graphics/PlainGeometryMesh.cs b/源代码/StgSharpDebug/Graphics/PlainGeometryMesh.cs index 3842e75c..a1f24ff5 100644 --- a/源代码/StgSharpDebug/Graphics/PlainGeometryMesh.cs +++ b/源代码/StgSharpDebug/Graphics/PlainGeometryMesh.cs @@ -1,24 +1,67 @@ -using StgSharp.Geometries; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="PlainGeometryMesh.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Geometries; using StgSharp.Math; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; +using System.Runtime.InteropServices; using System.Text; namespace StgSharp.Graphics { public class PlainGeometryMesh { + private PlainGeometry _shape; - private Image _texture; - private vec4d[] textureCoord; + private TextureProvider _texture; + + public PlainGeometryMesh([NotNull] PlainGeometry shape, [NotNull] TextureProvider texture) + { + if (shape.VertexCount > texture.TextureCoordinate.Length) + { + throw new ArgumentException(paramName: nameof(texture), message: "Amount of texture coordination is too less"); + } + _texture = texture; + _shape = shape; + } + //private Image _texture; public PlainGeometryMesh( - PlainGeometry shape, Image texture, vec4d[] texCoord + PlainGeometry shape, Image texture, vec2d[] texCoord ) { - if (shape==null) + if (shape == null) { throw new ArgumentNullException(nameof(shape)); } @@ -27,31 +70,29 @@ namespace StgSharp.Graphics throw new ArgumentNullException(nameof(texCoord)); } - _shape = shape; - _texture = texture; if (shape.VertexCount > texCoord.Length) { throw new ArgumentException(paramName: nameof(texCoord), message: "Amount of texture coordination is too less"); } - textureCoord = texCoord; - return; + _texture = new TextureProvider(texture, texCoord); } - public PlainGeometryMesh Resize(PlainGeometry newShape) + public vec4d[] VertexArray => _shape.VertexStream; + + public Image TextureImage { - return new PlainGeometryMesh(newShape, _texture, textureCoord); + get => _texture.ProvideImage(); + internal set => _texture.ReadImage(value); } public ReadOnlySpan MeshIndices => _shape.VertexIndices; - public vec4d[] VertexArray => _shape.VertexStream; + public ReadOnlySpan TextureCoord => MemoryMarshal.Cast(_texture.TextureCoordinate); - public Image TextureImage + public PlainGeometryMesh Resize(PlainGeometry newShape) { - get => _texture; - internal set => _texture = value; + return new PlainGeometryMesh(newShape, _texture); } - - public vec4d[] TextureCoord => textureCoord; + } } diff --git a/源代码/StgSharpDebug/Graphics/RenderStream.cs b/源代码/StgSharpDebug/Graphics/RenderStream.cs index 6ba1642e..df66fdfc 100644 --- a/源代码/StgSharpDebug/Graphics/RenderStream.cs +++ b/源代码/StgSharpDebug/Graphics/RenderStream.cs @@ -28,9 +28,12 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Graphics.GL; -using StgSharp.Logic; +using StgSharp.Graphics.OpenGL; +using StgSharp.Timing; + using StgSharp.Math; +using StgSharp.MVVM; +using StgSharp.MVVM.View; using System; using System.Collections.Generic; @@ -43,103 +46,13 @@ using System.Threading.Tasks; namespace StgSharp.Graphics { - public abstract class RenderStream : IConvertableToBlueprintNode + public abstract class RenderStream { - private ViewPort primeArgs; private protected (int x, int y, int z) _coordStretch; - + private protected ViewPort primeArgs; private Camera nativeCamera; - - public ViewPort Port => primeArgs; - - internal IntPtr CanvasHandle { get => primeArgs.ViewPortID; } - - - internal IntPtr ContextHandle - { - get => primeArgs.GraphicHandle; - private protected set => primeArgs.GraphicHandle = value; - } - - private IntPtr monitor; - private IntPtr sharedCanvas; - - internal TimeSpanProvider timeProvider; - /* - protected RenderStream(View v, bool isSharing) - { - if (v == null) - { - throw new ArgumentNullException(nameof(v)); - } - if (isSharing) - { - primeArgs = v; - } - else - { - View? newArgs = args.Clone() as View; - primeArgs = newArgs; - } - - monitor = args.Monitor; - _coordStretch = args.UnitCubeSize; - NativeCamera = new Camera(); - } - /**/ - - public RenderStream(ViewPort v, (int,int,int) unitCubeSize) - { - if (v == null) - { - throw new ArgumentNullException(nameof(v)); - } - primeArgs = v; - - monitor = v!.Monitor; - _coordStretch = unitCubeSize; - NativeCamera = new Camera(); - } - - - public FrameBufferSizeHandler FrameSizeCallback - { - set - { - IntPtr handlerPtr = Marshal.GetFunctionPointerForDelegate(value); - InternalIO.glfwSetFramebufferSizeCallback(CanvasHandle, handlerPtr); - } - } - - public vec2d GlobalCoordSize => ((Width * 1.0f) / _coordStretch.x, (Height * 1.0f) / _coordStretch.y); - - public int Height - { - get => primeArgs.Height; - internal set - { - primeArgs.Height = value; - InternalIO.glfwSetWindowSize(this.CanvasHandle, Width, Height); - } - } - - public IntPtr Monitor - { - get => monitor; - internal set => monitor = value; - } - - public string Name - { - get => primeArgs.Name; - } - - public IntPtr SharedCanvas - { - get => sharedCanvas; - internal set => sharedCanvas = value; - } + internal TimeSpanProvider _timeProvider; public (int width, int height) Size { @@ -152,14 +65,49 @@ namespace StgSharp.Graphics } } + public abstract bool IsContextSharable + { + get; + } + + public int Height + { + get => primeArgs.Height; + internal set { primeArgs.Height = value; } + } + public int Width { get => primeArgs.Width; - internal set - { - primeArgs.Width = value; - InternalIO.glfwSetWindowSize(this.CanvasHandle, Width, Height); - } + internal set { primeArgs.Width = value; } + } + + public IntPtr Monitor + { + get => primeArgs.Monitor; + internal set => primeArgs.Monitor = value; + } + + public string Name + { + get => primeArgs.Name; + } + + public vec2d GlobalCoordSize => ((Width * 1.0f) / _coordStretch.x, (Height * 1.0f) / _coordStretch.y); + + public ViewPort Port + { + get => primeArgs; + internal set => primeArgs = value; + } + + internal IntPtr CanvasHandle { get => primeArgs.ViewPortID; } + + + internal IntPtr ContextHandle + { + get => primeArgs.GraphicHandle; + private protected set => primeArgs.GraphicHandle = value; } protected internal Camera NativeCamera @@ -168,22 +116,24 @@ namespace StgSharp.Graphics internal set => nativeCamera = value; } - protected int Frames + protected float FramePassed { - get => timeProvider.CurrentSpan; + get => _timeProvider.CurrentSpan; } - protected abstract string[] InputPortsName { get; } - protected abstract string[] OutputPortsName { get; } + protected int PassedFrames + { + get => _timeProvider.CurrentSpan; + } protected float TimePassed { - get => timeProvider.CurrentSpan; + get => _timeProvider.CurrentSecond; } protected TimeSpanProvider TimeProvider { - get => timeProvider; + get => _timeProvider; } /// @@ -196,34 +146,31 @@ namespace StgSharp.Graphics [MethodImpl(MethodImplOptions.AggressiveInlining)] public abstract void SetSizeLimit(int minWidth, int minHeight, int maxWidth, int maxHeight); - public static TTarget ShareContextWith(TSource source) + public static TTarget ShareContextFrom(TSource source) where TSource : RenderStream - where TTarget : RenderStream + where TTarget : RenderStream, new() { - TTarget target = Activator.CreateInstance(typeof(TTarget), source.primeArgs, source._coordStretch) as TTarget; - if (target == null) - { - throw new InvalidOperationException( - $"Failed in creating a new {typeof(TTarget).Name} instance when calling ShareContextWith." - ); - } - target.timeProvider = source.timeProvider; - target.Init(); + TTarget target = new TTarget(); + target.Initialize(source.Port, source._coordStretch, source._timeProvider); return target; } + protected internal static void PollEvents() + { + InternalIO.glfwPollEvents(); + } - string[] IConvertableToBlueprintNode.InputInterfacesName => InputPortsName; - - BlueprintNodeAction IConvertableToBlueprintNode.MainExecution => InternalDraw; - - string[] IConvertableToBlueprintNode.OutputInterfacesName => OutputPortsName; + protected internal void SwapBuffers() + { + InternalIO.glfwSwapBuffers(CanvasHandle); + } #region native camera operation protected abstract void NativeCameraViewRange(Radius fieldOfRange, vec2d offset, (float frontDepth, float backDepth) viewDepth); protected abstract void NativeCameraViewTarget(vec3d position, vec3d direction, vec3d up); + /// - /// Get (T is ) uniform from a shader. + /// Get (TView is ) uniform from a shader. /// This uniform will be used as projection matrix of this camera. /// Additionally, for multi-shader rendering, each shader requires a uniform, /// so do not ignore return value of this method. @@ -231,27 +178,38 @@ namespace StgSharp.Graphics /// Shader using this camera /// ContextName of projection camera named in shader /// - /// (T is ) representing + /// (TView is ) representing /// projection matrix in shader program. /// protected abstract Uniform NativeCameraUniform(ShaderProgram source, string name); #endregion #region internal operation - internal abstract void InternalDraw( - in Dictionary input, - in Dictionary output); - internal abstract void InternalInit(); - internal abstract void InternalTerminate(); + internal abstract void Draw(); + + public void Initialize(ViewPort v, (int, int, int) unitCubeSize, TimeSpanProvider timeProvider) + { + if (v == null) + { + throw new ArgumentNullException(nameof(v)); + } + primeArgs = v; + this._timeProvider = timeProvider; + _coordStretch = unitCubeSize; + nativeCamera = new Camera(); + PlatformSpecifiedInitialize(); + CustomizeInit(); + } + + internal abstract void PlatformSpecifiedInitialize(); + + internal abstract void Terminate(); #endregion #region public operation - protected abstract void Deinit(); - protected abstract void Init(); - protected abstract void Main( - in Dictionary input, - in Dictionary output); - protected abstract void ProcessInput(); + protected abstract void CustomizeDeinit(); + protected abstract void CustomizeInit(); + protected abstract void Main(); #endregion @@ -260,8 +218,6 @@ namespace StgSharp.Graphics protected abstract Shader CreateShaderSegment(ShaderType type, int count); protected abstract ShaderProgram CreateShaderProgram(); - - #endregion diff --git a/源代码/StgSharpDebug/Graphics/ShaderEdit/ShaderGenerator.cs b/源代码/StgSharpDebug/Graphics/ShaderEdit/ShaderGenerator.cs index 9d0c3e59..ed7e7a97 100644 --- a/源代码/StgSharpDebug/Graphics/ShaderEdit/ShaderGenerator.cs +++ b/源代码/StgSharpDebug/Graphics/ShaderEdit/ShaderGenerator.cs @@ -29,7 +29,7 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- using StgSharp.Graphics; -using StgSharp.Graphics.GL; +using StgSharp.Graphics.OpenGL; using StgSharp.Math; using System; @@ -43,15 +43,16 @@ namespace StgSharp.Graphics.ShaderEdit { public class ShaderGenerator { - private Dictionary uniformDefine; + + private Dictionary uniformDefine; private List codeList; private List usedShaderFunctions; public Uniform DefineUniform(string name, int index) where T : struct { - ShaderParameter p = new ShaderParameter(name,ShaderParameter.TypeMarshal()); - uniformDefine.Add(index,p); - //return new Uniform(); + ShaderParameter p = new ShaderParameter(name, ShaderParameter.TypeMarshal()); + uniformDefine.Add(index, p); + //return new Uniform(); throw new NotImplementedException(); } @@ -59,10 +60,11 @@ namespace StgSharp.Graphics.ShaderEdit public class ShaderFunction { + private List codeList; private List inputList; - private string name; private ShaderParameter outPut; + private string name; public int ParameterCount => inputList.Count; @@ -104,10 +106,11 @@ namespace StgSharp.Graphics.ShaderEdit public class ShaderParameter { + public static readonly ShaderParameter Void = new ShaderParameter(string.Empty, InternalShaderType.Void); internal readonly bool isReadOnly; - internal readonly string name; internal readonly InternalShaderType type; + internal readonly string name; public ShaderParameter(string name, InternalShaderType type) { diff --git a/源代码/StgSharpDebug/Graphics/ShaderEdit/ShaderStruct.cs b/源代码/StgSharpDebug/Graphics/ShaderEdit/ShaderStruct.cs index 1f210006..cd64c87a 100644 --- a/源代码/StgSharpDebug/Graphics/ShaderEdit/ShaderStruct.cs +++ b/源代码/StgSharpDebug/Graphics/ShaderEdit/ShaderStruct.cs @@ -1,4 +1,34 @@ -using StgSharp.Graphics.GL; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ShaderStruct.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics.OpenGL; using System; using System.Collections.Generic; @@ -10,44 +40,49 @@ namespace StgSharp.Graphics.ShaderEdit { public class ShaderStructMember { + internal InternalShaderType type; internal object value; + } public class ShaderStruct { - internal Dictionary uniformPair; - public ShaderStruct(params (glSHandle, ShaderStructMember)[] uniformPairs) + internal Dictionary uniformPair; + + internal ShaderStruct() { } + + public ShaderStruct(params (GlHandle, ShaderStructMember)[] uniformPairs) { - uniformPair = new Dictionary(); + uniformPair = new Dictionary(); if (uniformPairs.Length == 0) { return; } - foreach (var item in uniformPairs) + foreach ((GlHandle, ShaderStructMember) item in uniformPairs) { - uniformPair.Add(item.Item1,item.Item2); + uniformPair.Add(item.Item1, item.Item2); } } - internal ShaderStruct() { } - public unsafe void SetAllUniforms() { - GLcontext* gl = (GLcontext*) glFunc.CurrentContextHandle; - foreach (var uniform in uniformPair) + OpenglContext* gl = (OpenglContext*)OpenGL.OpenGLFunction.CurrentGL.ContextHandle; + foreach (KeyValuePair uniform in uniformPair) { - int id = uniform.Key.Value; + int id = uniform.Key.SignedValue; ShaderStructMember s = uniform.Value; switch (s.type) { - case InternalShaderType.Struct: throw new ArgumentException( + case InternalShaderType.Struct: + throw new ArgumentException( "Incorrect type \"Struct\" defined in this self define type"); - case InternalShaderType.Void:throw new ArgumentException( + case InternalShaderType.Void: + throw new ArgumentException( "Incorrect type \"Void\" defined in this self define type"); case InternalShaderType.Float: gl->glUniform1f(id, (float)s.value); @@ -62,5 +97,6 @@ namespace StgSharp.Graphics.ShaderEdit } } }//------------------------------------ End of Class --------------------------------------- + } } diff --git a/源代码/StgSharpDebug/Graphics/TextureImage.cs b/源代码/StgSharpDebug/Graphics/TextureImage.cs deleted file mode 100644 index d5de83c7..00000000 --- a/源代码/StgSharpDebug/Graphics/TextureImage.cs +++ /dev/null @@ -1,32 +0,0 @@ -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Text; - -namespace StgSharp.Graphics -{ - public class TextureImage : IImageProvider - { - private Image _tex; - private vec2d[] _texCoord; - - Image IImageProvider.ProvideImage() - { - return _tex; - } - - public TextureImage(Image image, vec2d[] coord) - { - _tex = image; - _texCoord = coord; - } - - public ref vec2d this[int index] - { - get => ref _texCoord[index]; - } - - } -} diff --git a/源代码/StgSharpDebug/Graphics/TexturePipeline.cs b/源代码/StgSharpDebug/Graphics/TexturePipeline.cs index b192b887..a205733d 100644 --- a/源代码/StgSharpDebug/Graphics/TexturePipeline.cs +++ b/源代码/StgSharpDebug/Graphics/TexturePipeline.cs @@ -1,4 +1,36 @@ -using StgSharp.Logic; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="TexturePipeline.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- + + +using StgSharp.BluePrint; using System; using System.Collections.Generic; @@ -8,19 +40,21 @@ using System.Threading.Tasks; namespace StgSharp.Graphics { - public class TexturePipeline:BlueprintPipelineArgs + public class TexturePipeline : BlueprintPipelineArgs { + + private Image _value; + public TexturePipeline(Image i) { - value = i; + _value = i; } - private Image value; - - public Image Value + public new Image Value { - get => value; - set => value = value ?? throw new ArgumentNullException(nameof(value)); + get => _value; + set => _value = value ?? throw new ArgumentNullException(nameof(value)); } + } } diff --git a/源代码/StgSharp/Graphics/CPUanimation/AnimationBuilder.cs b/源代码/StgSharpDebug/Graphics/TextureProvider.cs similarity index 62% rename from 源代码/StgSharp/Graphics/CPUanimation/AnimationBuilder.cs rename to 源代码/StgSharpDebug/Graphics/TextureProvider.cs index c48bb089..47839799 100644 --- a/源代码/StgSharp/Graphics/CPUanimation/AnimationBuilder.cs +++ b/源代码/StgSharpDebug/Graphics/TextureProvider.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="AnimationBuilder.cs" +// file="TextureProvider.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,61 +28,63 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Geometries; +using StgSharp.Math; using System; using System.Collections.Generic; -using System.Net; +using System.Runtime.CompilerServices; using System.Text; namespace StgSharp.Graphics { - public delegate Image BuildAnimationDelegate(float time, out Polygon4 texutreFrame); - - public sealed class AnimationBuilder: IImageProvider + public class TextureProvider : IImageProvider { - private Image cache; - private Polygon4 textureFrame; - private TimeFunction time; + private vec2d[] _texCoord; + private Image _tex; - public AnimationBuilder( - BuildAnimationDelegate builderFunc, - TimeFunction timeline - ) + public TextureProvider(Image image, vec2d[] coord) { - textureFrame = new Polygon4(); - time = timeline; - BuilderFunc = builderFunc; - cache = BuilderFunc(time.Calculate(), out textureFrame); + _tex = image; + _texCoord = coord; } - public Polygon4 TextureFrame { get => textureFrame; } - - public BuildAnimationDelegate BuilderFunc { get; set; } - - public bool IsComplete + public ref vec2d this[int index] { - get => time.IsComplete; + get => ref _texCoord[index]; } - public Image GetAnimationFrame() + public Span TextureCoordinate { - if (!time.IsComplete) + get => new Span(_texCoord); + } + + public Image ProvideImage() + { + return _tex; + } + + public void ReadImage(IImageProvider provider) + { + _tex = provider.ProvideImage(); + } + + public void UpdateFromImage(Image i) + { + if (i == _tex) { - cache = BuilderFunc(time.Calculate(),out textureFrame); + return; } - return cache; + if (i.Size == _tex.Size) + { + _tex = i; + } + else + { + throw new ArgumentException($"Size of {nameof(i)} does not equals to current image."); + } + } - public void reset() - { - time.Reset(); - } - - Image IImageProvider.ProvideImage() - { - return GetAnimationFrame(); - } } } diff --git a/源代码/StgSharpDebug/Graphics/View/View.cs b/源代码/StgSharpDebug/Graphics/View/View.cs deleted file mode 100644 index 7346b9ae..00000000 --- a/源代码/StgSharpDebug/Graphics/View/View.cs +++ /dev/null @@ -1,137 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="View.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Numerics; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading; - -namespace StgSharp.Graphics -{ - /// - /// - /// - public unsafe partial class View - { - - private (int w, int h) sizeCache; - private (int x, int y, int z) unitCubeSize; - - private ViewPort context; - - private ViewPortDesigner design; - - public ViewPort Port - { - get => context; - } - - public View(ViewPort vp, ViewPortDesigner design) - { - context = vp; - sizeCache = (0, 0); - unitCubeSize = (1, 1, 1); - localLogic = new Logic.Blueprint(); - this.design = design; - SelfName = string.Empty; - } - - public View(ViewPort vp, ViewPortDesigner design, (int, int, int) cubeSize) - { - context = vp; - sizeCache = (0, 0); - unitCubeSize = cubeSize; - localLogic = new Logic.Blueprint(); - } - - public bool Activated { get; internal set; } - - public int Height - { - get - { - if (context.Height != sizeCache.h) - { - sizeCache.h = context.Height; - InternalIO.glfwSetWindowSize(ViewHandle, context.Height, context.Width); - } - return sizeCache.h; - } - internal set - { - sizeCache.h = value; - context.Height = value; - InternalIO.glfwSetWindowSize(ViewHandle, context.Height, context.Width); - } - } - - public IntPtr Monitor => context.Monitor; - - public IntPtr ViewHandle => context.ViewPortID; - - public string ContextName => context.Name; - - public string SelfName { get; set; } - - public (int x, int y, int z) UnitCubeSize - { - get => unitCubeSize; - } - - public int Width - { - get - { - if (context.Width != sizeCache.w) - { - sizeCache.w = context.Width; - InternalIO.glfwSetWindowSize(ViewHandle, context.Height, context.Width); - } - return sizeCache.h; - } - internal set - { - sizeCache.w = value; - context.Width = value; - InternalIO.glfwSetWindowSize(ViewHandle, context.Height, context.Width); - } - } - - } - -} \ No newline at end of file diff --git a/源代码/StgSharpDebug/Graphics/View/ViewPort.cs b/源代码/StgSharpDebug/Graphics/View/ViewPort.cs deleted file mode 100644 index 3730b44c..00000000 --- a/源代码/StgSharpDebug/Graphics/View/ViewPort.cs +++ /dev/null @@ -1,46 +0,0 @@ -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Text; -using System.Threading; - -namespace StgSharp.Graphics -{ - public class ViewPort - { - public int Width { get; set; } - public int Height { get; set; } - - public string Name { get; set; } - - public IntPtr Monitor { get; internal set; } - - public IntPtr ViewPortID { get; private set; } - public IntPtr GraphicHandle { get; internal set; } - - internal ViewPort() - { - Height = 800; - Width = 600; - Name = new StackFrame(1, false). - GetMethod()!.DeclaringType!.Name; - Monitor = IntPtr.Zero; - ViewPortID = InternalIO.glfwCreateWindow(Width,Height, - Encoding.UTF8.GetBytes(Name), Monitor, IntPtr.Zero - ); - } - - public ViewPort(vec2d size,string name, IntPtr monitor) - { - Height = (int) size.Y; - Width = (int) size.X; - Name = name; - Monitor = monitor; - ViewPortID = InternalIO.glfwCreateWindow(Width, Height, - Encoding.UTF8.GetBytes(Name), Monitor, IntPtr.Zero - ); - } - } -} diff --git a/源代码/StgSharpDebug/Graphics/framework.cs b/源代码/StgSharpDebug/Graphics/framework.cs index d8d0cc35..77b4217c 100644 --- a/源代码/StgSharpDebug/Graphics/framework.cs +++ b/源代码/StgSharpDebug/Graphics/framework.cs @@ -157,7 +157,7 @@ namespace StgSharp [DllImport(SSC_libName, EntryPoint = "glfwGetWindowUserPointer")] internal static extern unsafe void* glfwGetWindowUserPointer(IntPtr window); - [DllImport(SSC_libName, EntryPoint = "glfwSetWindowPosCallback")] internal static extern unsafe GLFWwindowposfun glfwSetWindowPosCallback(IntPtr window, GLFWwindowposfun callback); + [DllImport(SSC_libName, EntryPoint = "glfwSetWindowPosCallback")] internal static extern unsafe GLFWwindowposfun glfwSetWindowPosCallback(IntPtr window, IntPtr callback); [DllImport(SSC_libName, EntryPoint = "glfwSetWindowSizeCallback")] internal static extern unsafe GLFWwindowsizefun glfwSetWindowSizeCallback(IntPtr window, GLFWwindowsizefun callback); @@ -171,7 +171,7 @@ namespace StgSharp [DllImport(SSC_libName, EntryPoint = "glfwSetWindowMaximizeCallback")] internal static extern unsafe GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(IntPtr window, GLFWwindowmaximizefun callback); - [DllImport(SSC_libName, EntryPoint = "glfwSetFramebufferSizeCallback")] internal static extern unsafe FramebuffersizeHandler glfwSetFramebufferSizeCallback(IntPtr window, IntPtr callback); + [DllImport(SSC_libName, EntryPoint = "glfwSetFramebufferSizeCallback")] internal static extern unsafe FrameBufferSizeHandler glfwSetFramebufferSizeCallback(IntPtr window, IntPtr callback); [DllImport(SSC_libName, EntryPoint = "glfwSetWindowContentScaleCallback")] internal static extern unsafe GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(IntPtr window, GLFWwindowcontentscalefun callback); diff --git a/源代码/StgSharpDebug/Logic/Blueprint/Blueprint.cs b/源代码/StgSharpDebug/Logic/Blueprint/Blueprint.cs index c5f5ab78..2f763dce 100644 --- a/源代码/StgSharpDebug/Logic/Blueprint/Blueprint.cs +++ b/源代码/StgSharpDebug/Logic/Blueprint/Blueprint.cs @@ -29,7 +29,7 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- using StgSharp; -using StgSharp.Logic; + using System; using System.Collections.Generic; @@ -43,35 +43,72 @@ using System.Threading; using System.Threading.Tasks; using System.Xml.Serialization; -namespace StgSharp.Logic +namespace StgSharp.BluePrint { + /// + /// A sets of complex logic designed for running in multi threads environment. + /// Warning: do not run a instance in multi threads more than once. + /// + /// public partial class Blueprint : IConvertableToBlueprintNode { + private BeginningNode beginNode; private Dictionary allNode; private EndingNode endNode; - private Func terminate; - private int currentNodeIndex; - private List allThread; + private Func terminate; + private List globalNodeList; private List nativeNodeList; - private List nodeList; + + private SemaphoreSlim runningStat; + + internal int currentGlobalNodeIndex; + internal int currentNativeNodeIndex; public Blueprint() { allNode = new Dictionary(); - allThread = new List(); - nodeList = new List(); + globalNodeList = new List(); nativeNodeList = new List(); - terminate = () => true; - beginNode = new BeginningNode(); - endNode = new EndingNode(); + runningStat = new SemaphoreSlim(1, 1); + beginNode = new BeginningNode(this); + endNode = new EndingNode(this); } public BlueprintNode BeginLayer => beginNode; public BlueprintNode EndLayer => endNode; - public bool IsRunning => allThread.Any(t => t.Status == TaskStatus.Running); + public bool IsRunning + { + get => runningStat.CurrentCount == 0; + } + + /**/ + internal Func ShouldClose + { + get => terminate; + set => terminate = value; + } + + internal SemaphoreSlim RunningStat + { + get => runningStat; + } + /**/ + + public void AddNode(BlueprintNode node, bool isNative) + { + _ = node ?? throw new ArgumentNullException(nameof(node)); + node.IsNative = isNative; + allNode.Add(node.Name, node); + } + + public void ExecuteMain(in Dictionary input, + in Dictionary output) + { + BlueprintRunner.Run(this, () => true); + } [MethodImpl(MethodImplOptions.AggressiveInlining)] public (string name, BlueprintPipelineArgs arg)[] GetOutput() @@ -79,115 +116,21 @@ namespace StgSharp.Logic return endNode.OutputData; } - public void Init(int threadCount) + public void Init() { - if (threadCount > nodeList.Count) + foreach (KeyValuePair item in allNode) { - InternalIO.InternalWriteLog( - "Thread setting error: amount of threads of this blueprint is larger than amount of nodes.", LogType.Warning); - threadCount = nodeList.Count; - } - if (threadCount!=0) - { - foreach (var item in allNode) + if (item.Value.IsNative) { - if (item.Value.IsNative) - { - nativeNodeList.Add(item.Value); - } - else - { - nodeList.Add(item.Value); - } + nativeNodeList.Add(item.Value); } - nativeNodeList.Sort(); - PrepareTasks(threadCount); - } - else - { - foreach (var item in allNode) + else { - nodeList.Add(item.Value); + globalNodeList.Add(item.Value); } } - nodeList.Sort(); - } - - public void PrepareTasks(int count) - { - for (int i = 0; i < count; i++) - { - allThread.Add(new Task(IndividualTask)); - } - } - - private void IndividualTask() - { - do - { - BlueprintNode node; - while (RequestNextNode(out node)) - { - node.Run(); - } - } while (!terminate()); - } - - /// - /// Run all nodes repeatedly until it is instructed to terminate. - /// - /// Instructor to terminate all tasks. Returns if tasks should terminate - public void RunRepeatedly(Func terminateInstructor) - { - if (allThread.Count != 0) - { - MultiThreadRun(terminateInstructor); - return; - } - SingleThreadRun(terminateInstructor); - } - - private void MultiThreadRun(Func terminateInstructor) - { - if (terminate != terminateInstructor) - { - terminate = terminateInstructor; - if (allThread.Count != 0) - { - foreach (var t in allThread) - { - t.Start(); - } - } - } - beginNode.Run(); - foreach (var node in nativeNodeList) - { - node.Run(); - } - EndLayer.Run(); - } - - private void SingleThreadRun(Func terminateInstructor) - { - beginNode.Run(); - foreach (var item in nodeList) - { - item.Run(); - } - EndLayer.Run(); - } - - public void AddNativeNode(BlueprintNode node) - { - node.IsNative = true; - allNode.Add(node.Name, node); - } - - public void AddAsyncNode(BlueprintNode node) - { - node.IsNative = false; - allNode.Add(node.Name, node); + nativeNodeList.Sort(); + globalNodeList.Sort(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -196,59 +139,47 @@ namespace StgSharp.Logic beginNode.InputData = parameters; } - private bool RequestNextNode(out BlueprintNode node) + public void Terminate() { - if (currentNodeIndex < nodeList.Count) + Interlocked.Exchange(ref currentGlobalNodeIndex, int.MaxValue); + Interlocked.Exchange(ref currentNativeNodeIndex, int.MaxValue); + } + + internal bool RequestNexGlobalNode(out BlueprintNode node) + { + if (currentGlobalNodeIndex < globalNodeList.Count) { - BlueprintNode ret = nodeList[currentNodeIndex]; - Interlocked.Increment(ref currentNodeIndex); - node = ret; + node = globalNodeList[currentGlobalNodeIndex]; + Interlocked.Increment(ref currentGlobalNodeIndex); + return true; + } + node = default!; + return false; + } + + internal bool RequestNextNativeNode(out BlueprintNode node) + { + + if (currentNativeNodeIndex < nativeNodeList.Count) + { + node = nativeNodeList[currentNativeNodeIndex]; + Interlocked.Increment(ref currentNativeNodeIndex); return true; } - Interlocked.Exchange(ref currentNodeIndex, 0); node = default!; return false; } string[] IConvertableToBlueprintNode.InputInterfacesName { - get - { - return beginNode.OutputInterfaces.Select( - p => p.Key).ToArray(); - } - } - - BlueprintNodeAction IConvertableToBlueprintNode.MainExecution - { - get - { - return (in Dictionary input, - in Dictionary output) - => - { - beginNode.Run(); - foreach (var node in nativeNodeList) - { - node.Run(); - } - endNode.Run(); - }; - } + get { return beginNode.OutputInterfaces.Select(p => p.Key).ToArray(); } } string[] IConvertableToBlueprintNode.OutputInterfacesName { - get - { - return beginNode.OutputInterfaces.Select( - p => p.Key).ToArray(); - } + get { return beginNode.OutputInterfaces.Select(p => p.Key).ToArray(); } } - } - - internal class NodeClearException : Exception - { } + } diff --git a/源代码/StgSharpDebug/Logic/Blueprint/BlueprintActionNode.cs b/源代码/StgSharpDebug/Logic/Blueprint/BlueprintActionNode.cs new file mode 100644 index 00000000..e8004707 --- /dev/null +++ b/源代码/StgSharpDebug/Logic/Blueprint/BlueprintActionNode.cs @@ -0,0 +1,63 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="BlueprintActionNode.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.BluePrint +{ + public class BlueprintActionNode : IConvertableToBlueprintNode + { + + private string[] inPorts; + private string[] outPorts; + private Action, Dictionary> mainAction; + + internal BlueprintActionNode() + { + + } + + public string[] InputInterfacesName => inPorts; + + public string[] OutputInterfacesName => outPorts; + + public void ExecuteMain(in Dictionary input, in Dictionary output) + { + mainAction?.Invoke(input, output); + } + + } +} diff --git a/源代码/StgSharpDebug/Logic/Blueprint/BlueprintNode.cs b/源代码/StgSharpDebug/Logic/Blueprint/BlueprintNode.cs index 6f9c9415..aab06cbe 100644 --- a/源代码/StgSharpDebug/Logic/Blueprint/BlueprintNode.cs +++ b/源代码/StgSharpDebug/Logic/Blueprint/BlueprintNode.cs @@ -35,18 +35,15 @@ using StgSharp.Entities; using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Text; using System.Threading; using System.Threading.Tasks; -namespace StgSharp.Logic +namespace StgSharp.BluePrint { - public delegate void BlueprintNodeAction( - in Dictionary inpput, - in Dictionary output); - - /// /// @@ -59,83 +56,62 @@ namespace StgSharp.Logic public class BlueprintNode : IComparable #pragma warning restore CA1036 { - private BlueprintNodeAction mainOperation; private protected bool levelAvailable, nativeRequested; - private protected int _level; - private string name; - private protected Dictionary _inputInterfaces; private protected Dictionary _outputInterfaces; - + private protected int _level; + private IConvertableToBlueprintNode mainOperation; + private string name; internal BlueprintNode(string name, - BlueprintNodeAction operation, bool isNative, - string[] inputPorts, - string[] outputPorts) + IConvertableToBlueprintNode node, bool isNative) { this.levelAvailable = false; this.name = name; nativeRequested = isNative; - mainOperation = operation; + mainOperation = node; _inputInterfaces = new Dictionary(); _outputInterfaces = new Dictionary(); - if (inputPorts.Length == 0 ) + foreach (string portName in node.InputInterfacesName) { - throw new ArgumentNullException(nameof(inputPorts)); + _inputInterfaces.Add(portName, null!); } - if (outputPorts.Length == 0) + + foreach (string portName in node.OutputInterfacesName) { - throw new ArgumentNullException(nameof(outputPorts)); - } - foreach (var portName in inputPorts) - { - _inputInterfaces.Add(portName, null); - } - foreach (var portName in outputPorts) - { - _outputInterfaces.Add(portName, null); + _outputInterfaces.Add(portName, null!); } } - public BlueprintNode(string name, IConvertableToBlueprintNode convertable) - { - this.levelAvailable = false; - this.name = name; - _inputInterfaces = new Dictionary(); - _outputInterfaces = new Dictionary(); - mainOperation = convertable.MainExecution; - foreach (var soket in convertable.InputInterfacesName) - { - _inputInterfaces.Add(soket, null); - } - foreach (var soket in convertable.OutputInterfacesName) - { - _outputInterfaces.Add(soket, null); - } - } - - public BlueprintNode(string name, +#pragma warning disable CS8618 + internal BlueprintNode(string name, bool isNative, string[] inputPorts, string[] outputPorts ) +#pragma warning restore CS8618 { - this.levelAvailable = false; + if ((inputPorts == null) || (inputPorts.Length == 0)) + { + throw new ArgumentNullException(nameof(inputPorts)); + } + if ((outputPorts == null) || (outputPorts.Length == 0)) + { + throw new ArgumentNullException(nameof(outputPorts)); + } + levelAvailable = false; this.name = name; + IsNative = isNative; _inputInterfaces = new Dictionary(); _outputInterfaces = new Dictionary(); - if (inputPorts.Length * outputPorts.Length == 0) + foreach (string portName in inputPorts) { - throw new Exception(); + _inputInterfaces.Add(portName, null!); } - foreach (var portName in inputPorts) + foreach (string portName in outputPorts) { - _inputInterfaces.Add(portName, null); - } - foreach (var portName in outputPorts) - { - _outputInterfaces.Add(portName, null); + _outputInterfaces.Add(portName, null!); } } @@ -154,7 +130,7 @@ namespace StgSharp.Logic return _level; } _level = 0; - foreach (var item in _inputInterfaces) + foreach (KeyValuePair item in _inputInterfaces) { if (item.Value == null) { @@ -175,6 +151,11 @@ namespace StgSharp.Logic internal Dictionary InputInterfaces => _inputInterfaces; internal Dictionary OutputInterfaces => _outputInterfaces; + internal IConvertableToBlueprintNode Value + { + get => mainOperation; + } + public void AddAfter( BlueprintNode former, @@ -213,21 +194,6 @@ namespace StgSharp.Logic SetCertainOutputPort(thisOutputPortName, pipeline); } - - public void Run() - { - try - { - //Console.WriteLine(name); - BlueprintPipeline.WaitAll(_inputInterfaces); - mainOperation(in _inputInterfaces, in _outputInterfaces); - } - catch (Exception) - { - throw; - } - } - public int CompareTo(BlueprintNode other) { #pragma warning disable CA1062 @@ -235,12 +201,30 @@ namespace StgSharp.Logic #pragma warning restore CA1062 } + + public virtual void Run() + { + try + { + //Console.WriteLine(name); + BlueprintPipeline.WaitAll(_inputInterfaces); + if (mainOperation != null) + { + mainOperation.ExecuteMain(in _inputInterfaces, in _outputInterfaces); + } + } + catch (Exception) + { + throw; + } + } + #region port operation public BlueprintPipeline GetCertainInputPort(string name) { BlueprintPipeline ret; - if (!_inputInterfaces.TryGetValue(name,out ret)) + if (!_inputInterfaces.TryGetValue(name, out ret)) { throw new Exception($"Cannot find the interface named {name} in node {Name}."); } @@ -281,17 +265,15 @@ namespace StgSharp.Logic }//--------------------------------- end of class ----------------------------------- - public interface IConvertableToBlueprintNode - { - public string[] InputInterfacesName { get; } - public BlueprintNodeAction MainExecution { get; } - public string[] OutputInterfacesName { get; } - - } public class BlueprintNodeRunException : Exception { + + protected BlueprintNodeRunException(SerializationInfo info, StreamingContext context) : base(info, context) + { + } + public BlueprintNodeRunException() { } @@ -308,9 +290,6 @@ namespace StgSharp.Logic { } - protected BlueprintNodeRunException(SerializationInfo info, StreamingContext context) : base(info, context) - { - } } } diff --git a/源代码/StgSharpDebug/Logic/Blueprint/BlueprintRunner.cs b/源代码/StgSharpDebug/Logic/Blueprint/BlueprintRunner.cs new file mode 100644 index 00000000..9d26ca71 --- /dev/null +++ b/源代码/StgSharpDebug/Logic/Blueprint/BlueprintRunner.cs @@ -0,0 +1,234 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="BlueprintRunner.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Data; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +using StgSharp.Threading; + +namespace StgSharp.BluePrint +{ + public static class BlueprintRunner + { + + private static NodeRunner[] allAvailableTask = new NodeRunner[1]; + private static CancellationTokenSource cts = new CancellationTokenSource(); + private static ConcurrentStack blueprintInWaiting = new ConcurrentStack(); + private static int _callingThread; + private static SemaphoreSlim bpLock = new SemaphoreSlim(0, 1); + + internal static bool IsValidCalling + { + get + { + if ((NodeRunner.CurrentBlueprint == null) || //no bp running at all + ((blueprintInWaiting.Count == 0) && (NodeRunner.CurrentBlueprint.IsRunning == false))) // a bp is quiting + { + //in case no bp is running + return true; + } + int? id = Task.CurrentId; + if (id is null) + { + // in case calling from main thread and current running bp + //Console.WriteLine($"\t{_callingThread}"); + //Console.WriteLine($"\t{Thread.CurrentThread.ManagedThreadId}"); + return _callingThread == Thread.CurrentThread.ManagedThreadId; + } + foreach (NodeRunner item in allAvailableTask) + { + if (item.Id == id) + { + //if calling from any bp running task + return true; + } + } + return false; + } + } + + public static void Run(Blueprint blueprint, Func terminateInstructor) + { + //Console.WriteLine(); + if (blueprint == null) + { + return; + } + + if (terminateInstructor == null) + { + throw new ArgumentNullException(nameof(terminateInstructor)); + } + if (blueprint.IsRunning) + { + throw new InvalidOperationException("Attempt to run a blueprint instance twice."); + } + blueprint.ShouldClose = terminateInstructor; + if (IsValidCalling) + { + //Console.WriteLine("valid and run"); + if (InterruptAndRunNewBp(blueprint)) + { + do { } while (InterruptAndRunNewBp(NodeRunner.CurrentBlueprint)); + } + } + else + { + bpLock.Wait(); + if (InterruptAndRunNewBp(blueprint)) + { + do { } while (InterruptAndRunNewBp(NodeRunner.CurrentBlueprint)); + } + + bpLock.Release(); + } + Interlocked.Exchange(ref _callingThread, -1); + } + + + public static void SetMaxTaskCount(int size) + { + if (size < 1) + { + size = 1; + } + if (allAvailableTask.Length >= size) + { + for (int i = size; i < allAvailableTask.Length; i++) + { + if (allAvailableTask[i] != null) + { + allAvailableTask[i].Cancel(); + } + } + } + Array.Resize(ref allAvailableTask, size); + } + + public static void Terminate() + { + cts.Cancel(); + NodeRunner.CurrentBlueprint.Terminate(); + foreach (NodeRunner task in allAvailableTask) + { + task.Cts.Cancel(); + } + foreach (Blueprint bp in blueprintInWaiting) + { + bp.Terminate(); + } + blueprintInWaiting.Clear(); + } + + internal static bool InterruptAndRunNewBp(Blueprint newBp) + { + Debug.Assert(newBp != null); + if ((newBp != NodeRunner.CurrentBlueprint) && (NodeRunner.CurrentBlueprint != null)) + { + //if a running bp exists + blueprintInWaiting.Push(NodeRunner.CurrentBlueprint); + } + //load new bp to current bp + Interlocked.Exchange(ref NodeRunner.CurrentBlueprint!, newBp); + Interlocked.Exchange(ref _callingThread, Thread.CurrentThread.ManagedThreadId); + //run beginning node to init it first. + if (!NodeRunner.CurrentBlueprint.IsRunning) + { + (NodeRunner.CurrentBlueprint.BeginLayer as BeginningNode)!.Run(); + } + //refresh all tasks + for (int i = 0; i < allAvailableTask.Length; i++) + { + NodeRunner item = allAvailableTask[i]; + if ((item is null) || item.IsCompleted) + { + allAvailableTask[i] = NodeRunner.Run(); + } + } + BlueprintNode node; + while (!cts.Token.IsCancellationRequested + && NodeRunner.CurrentBlueprint.RequestNextNativeNode(out node)) + { + node.Run(); + if (!NodeRunner.CurrentBlueprint.IsRunning) + { + break; + } + } + (NodeRunner.CurrentBlueprint.EndLayer as EndingNode)!.Run(); + return blueprintInWaiting.TryPeek(out NodeRunner.CurrentBlueprint); + } + + } + + internal class NodeRunner : CancellableTask + { + + private static Blueprint _current; + + internal NodeRunner() : base() + { + _startup = InternalRun; + } + + internal static ref Blueprint CurrentBlueprint + { + get => ref _current; + } + + internal static NodeRunner Run() + { + NodeRunner ret = new NodeRunner { _startup = InternalRun }; + ret.taskInternal = Task.Run(ret.InternalAction); + return ret; + } + + private static void InternalRun(CancellationToken token) + { + //Console.WriteLine("Task Begin"); + BlueprintNode item; + while ((CurrentBlueprint != null) && CurrentBlueprint.IsRunning && !token.IsCancellationRequested + && CurrentBlueprint.RequestNexGlobalNode(out item)) + { + //Console.WriteLine($"Get node of {item.Name}, going to run."); + item.Run(); + } + //Console.WriteLine("Task Completed"); + } + + }//------------------------------------- End of Class ------------------------------------------ +} diff --git a/源代码/StgSharpDebug/Logic/Blueprint/BpNodeActionAttribute.cs b/源代码/StgSharpDebug/Logic/Blueprint/BpNodeActionAttribute.cs new file mode 100644 index 00000000..0f7bedcf --- /dev/null +++ b/源代码/StgSharpDebug/Logic/Blueprint/BpNodeActionAttribute.cs @@ -0,0 +1,72 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="BpNodeActionAttribute.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.BluePrint +{ + + [AttributeUsage(AttributeTargets.Method)] + public sealed class BpNodeActionAttribute : Attribute + { + + private string[] _input; + private string[] _output; + private int _operationSpan; + + public BpNodeActionAttribute(int operationSpan) + { + _input = Array.Empty(); + _output = Array.Empty(); + _operationSpan = operationSpan; + } + + public BpNodeActionAttribute(string[] inputPort, string[] outputPort) + { + _input = inputPort; + _output = outputPort; + this._operationSpan = 1; + } + + public BpNodeActionAttribute(string[] inputPort, string[] outputPort, int operationSpan) + { + _input = inputPort; + _output = outputPort; + this._operationSpan = operationSpan; + } + + public string[] InputPort => _input; + public string[] OutputPort => _output; + public int OperationSpan => _operationSpan; + + } +} diff --git a/源代码/StgSharpDebug/Logic/Blueprint/BpNodeBuilder.cs b/源代码/StgSharpDebug/Logic/Blueprint/BpNodeBuilder.cs new file mode 100644 index 00000000..488d7edb --- /dev/null +++ b/源代码/StgSharpDebug/Logic/Blueprint/BpNodeBuilder.cs @@ -0,0 +1,71 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="BpNodeBuilder.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; +using System.Collections.Generic; +using System.Text; + +namespace StgSharp.BluePrint +{ + public static class BpNodeConverter + { + + public static IConvertableToBlueprintNode AsBlueprintNodeMainExecution(this BlueprintNodeOperation startUp) + { + if (startUp == null) + { + throw new ArgumentNullException(nameof(startUp)); + } + object[] attributeArray = startUp.Method.GetCustomAttributes(typeof(BpNodeActionAttribute), false); + BpNodeActionAttribute attri = (BpNodeActionAttribute)attributeArray[0]; + if ((attributeArray.Length < 0) || (attri == null)) + { + throw new InvalidCastException($"Delegate {nameof(startUp)} is not marked by {typeof(BpNodeActionAttribute)}"); + } + return new DefaultConvertableToBlueprintNode(startUp, attri.InputPort, attri.OutputPort); + } + + public static IConvertableToBlueprintNode AsBlueprintNodeMainExecution(this Action startUp) + { + if (startUp == null) + { + throw new ArgumentNullException(nameof(startUp)); + } + object[] attributeArray = startUp.Method.GetCustomAttributes(typeof(BpNodeActionAttribute), false); + BpNodeActionAttribute attri = (BpNodeActionAttribute)attributeArray[0]; + if ((attributeArray.Length < 0) || (attri == null)) + { + throw new InvalidCastException($"Delegate {nameof(startUp)} is not marked by {typeof(BpNodeActionAttribute)}"); + } + return new CrossFrameOperation(startUp, attri.OperationSpan); + } + + } +} diff --git a/源代码/StgSharpDebug/Logic/Blueprint/CrossCycleProcess.cs b/源代码/StgSharpDebug/Logic/Blueprint/CrossCycleProcess.cs deleted file mode 100644 index 8b7725dc..00000000 --- a/源代码/StgSharpDebug/Logic/Blueprint/CrossCycleProcess.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp.Logic -{ - /* - public class CrossCycleProcess:BlueprintNode - { - - public CrossCycleProcess(string name, Action operation) - :base() - { - - } - - } - /**/ -} diff --git a/源代码/StgSharpDebug/Logic/Blueprint/CrossFrameBlueprintNode.cs b/源代码/StgSharpDebug/Logic/Blueprint/CrossFrameBlueprintNode.cs new file mode 100644 index 00000000..77c2085a --- /dev/null +++ b/源代码/StgSharpDebug/Logic/Blueprint/CrossFrameBlueprintNode.cs @@ -0,0 +1,83 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="CrossFrameBlueprintNode.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.BluePrint; + +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace StgSharp.BluePrint +{ + public class CrossFrameOperation : IConvertableToBlueprintNode + { + + private int currentCount; + + private readonly int cycleCount; + + public CrossFrameOperation(Action startup, int cycleCount) + { + MainExecution = startup; + this.cycleCount = (cycleCount > 1) ? cycleCount : throw new ArgumentException( + $"{$"The {typeof(CrossFrameOperation).Name} crosses only one cycle, "}{$"please use a {typeof(BlueprintNode).Name} instead."}"); + this.cycleCount = cycleCount; + currentCount = cycleCount; + } + + public Action MainExecution { get; private protected set; } + + public static string InputInterfacesName => "TaskIn"; + + public static string OutputInterfacesName => "TaskOut"; + + public void ExecuteMain(in Dictionary input, in Dictionary output) + { + if (currentCount < cycleCount) + { + Interlocked.Increment(ref currentCount); + } + else + { + Interlocked.Exchange(ref currentCount, 0); + Task.Run(MainExecution); + } + //Console.WriteLine(currentCount); + BlueprintPipeline.SkipAll(output); + } + + string[] IConvertableToBlueprintNode.InputInterfacesName => [InputInterfacesName]; + + string[] IConvertableToBlueprintNode.OutputInterfacesName => [OutputInterfacesName]; + + } +} diff --git a/源代码/StgSharpDebug/Graphics/CPUanimation/AnimationBuilder.cs b/源代码/StgSharpDebug/Logic/Blueprint/IConvertableToBlueprintNode.cs similarity index 53% rename from 源代码/StgSharpDebug/Graphics/CPUanimation/AnimationBuilder.cs rename to 源代码/StgSharpDebug/Logic/Blueprint/IConvertableToBlueprintNode.cs index c48bb089..0201d8a2 100644 --- a/源代码/StgSharpDebug/Graphics/CPUanimation/AnimationBuilder.cs +++ b/源代码/StgSharpDebug/Logic/Blueprint/IConvertableToBlueprintNode.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="AnimationBuilder.cs" +// file="IConvertableToBlueprintNode.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,61 +28,57 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Geometries; - using System; using System.Collections.Generic; -using System.Net; +using System.Runtime.CompilerServices; using System.Text; -namespace StgSharp.Graphics +namespace StgSharp.BluePrint { - public delegate Image BuildAnimationDelegate(float time, out Polygon4 texutreFrame); - public sealed class AnimationBuilder: IImageProvider + public delegate void BlueprintNodeOperation(in Dictionary input, in Dictionary output); + + public interface IConvertableToBlueprintNode { - private Image cache; - private Polygon4 textureFrame; - private TimeFunction time; +#pragma warning disable CA1819 + public string[] InputInterfacesName { get; } +#pragma warning restore CA1819 - public AnimationBuilder( - BuildAnimationDelegate builderFunc, - TimeFunction timeline - ) +#pragma warning disable CA1819 + public string[] OutputInterfacesName { get; } +#pragma warning restore CA1819 + + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void ExecuteMain( + in Dictionary input, + in Dictionary output); + + } + + internal class DefaultConvertableToBlueprintNode : IConvertableToBlueprintNode + { + + private string[] _input; + private string[] _output; + private BlueprintNodeOperation _execution; + + public DefaultConvertableToBlueprintNode(BlueprintNodeOperation execution, string[] input, string[] output) { - textureFrame = new Polygon4(); - time = timeline; - BuilderFunc = builderFunc; - cache = BuilderFunc(time.Calculate(), out textureFrame); + _input = input; + _output = output; + _execution = execution; } - public Polygon4 TextureFrame { get => textureFrame; } - - public BuildAnimationDelegate BuilderFunc { get; set; } - - public bool IsComplete + void IConvertableToBlueprintNode.ExecuteMain(in Dictionary input, in Dictionary output) { - get => time.IsComplete; + _execution(in input, in output); } - public Image GetAnimationFrame() - { - if (!time.IsComplete) - { - cache = BuilderFunc(time.Calculate(),out textureFrame); - } - return cache; - } + string[] IConvertableToBlueprintNode.InputInterfacesName => _input; - public void reset() - { - time.Reset(); - } + string[] IConvertableToBlueprintNode.OutputInterfacesName => _output; - Image IImageProvider.ProvideImage() - { - return GetAnimationFrame(); - } } } diff --git a/源代码/StgSharpDebug/Logic/Blueprint/PipeLine.cs b/源代码/StgSharpDebug/Logic/Blueprint/PipeLine.cs index 7f9aedd6..4f32c541 100644 --- a/源代码/StgSharpDebug/Logic/Blueprint/PipeLine.cs +++ b/源代码/StgSharpDebug/Logic/Blueprint/PipeLine.cs @@ -32,12 +32,13 @@ using System; using System.Collections.Generic; using System.Linq; using System.Numerics; +using System.Runtime.CompilerServices; using System.Security.Authentication.ExtendedProtection; using System.Text; using System.Threading; using System.Threading.Tasks; -namespace StgSharp.Logic +namespace StgSharp.BluePrint { public class BlueprintPipeline @@ -59,26 +60,13 @@ namespace StgSharp.Logic public BlueprintNode Former => former; - public int Level => former.Level; - public BlueprintPipelineArgs Args { get => args; set => args = value; } - public void CompleteAndSkip() - { - //Console.WriteLine($"Complete\t{former.ContextName}\t->\t{after.ContextName}"); - formerCompleteSemaphore.Release(); - } - - public void CompleteAndWriteData(BlueprintPipelineArgs args) - { - this.args = args; - //Console.WriteLine($"Complete\t{former.ContextName}\t->\t{after.ContextName}"); - formerCompleteSemaphore.Release(); - } + public int Level => former.Level; public static void SkipAll(Dictionary ports) { @@ -86,9 +74,9 @@ namespace StgSharp.Logic { throw new ArgumentNullException(nameof(ports)); } - foreach (var item in ports) + foreach (KeyValuePair item in ports) { - if (item.Value!=null) + if (item.Value != null) { item.Value.CompleteAndSkip(); } @@ -101,9 +89,9 @@ namespace StgSharp.Logic { throw new ArgumentNullException(nameof(ports)); } - foreach (var item in ports) + foreach (KeyValuePair item in ports) { - if (item.Value!=null) + if (item.Value != null) { item.Value.WaitForStart(); } @@ -116,10 +104,36 @@ namespace StgSharp.Logic formerCompleteSemaphore.Wait(); } + ~BlueprintPipeline() + { + formerCompleteSemaphore.Dispose(); + } + + #region pipline op + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void CompleteAndSkip() + { + //Console.WriteLine($"Complete\t{former.Name}\t->\t{after.Name}"); + formerCompleteSemaphore.Release(); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void CompleteAndWriteData(BlueprintPipelineArgs args) + { + this.args = args; + CompleteAndSkip(); + } + + #endregion + + + } public abstract class BlueprintPipelineArgs { + public object? Value { get; set; } } diff --git a/源代码/StgSharpDebug/Logic/Blueprint/RouteSwitch.cs b/源代码/StgSharpDebug/Logic/Blueprint/RouteSwitch.cs index 68bac730..88edae4e 100644 --- a/源代码/StgSharpDebug/Logic/Blueprint/RouteSwitch.cs +++ b/源代码/StgSharpDebug/Logic/Blueprint/RouteSwitch.cs @@ -35,14 +35,15 @@ using System.Reflection.Emit; using System.Security.Cryptography.X509Certificates; using System.Text; -namespace StgSharp.Logic +namespace StgSharp.BluePrint { public class RouteSwitch : BlueprintNode { + private protected Dictionary openingRule)> outputDictionary; - public RouteSwitch(string name, string inputPorts) : - base(name, [inputPorts], [string.Empty]) + public RouteSwitch(string name, bool isNative, string inputPorts) : + base(name, isNative, [inputPorts], [string.Empty]) { outputDictionary = new Dictionary openingRule)>(); } @@ -111,72 +112,4 @@ namespace StgSharp.Logic } - - public sealed class RouteHub : BlueprintNode - { - - private Dictionary controllingFunc)> inputDictionary; - - public RouteHub(string name, string[] inputPorts, string[] outputPorts) : base(name, inputPorts, outputPorts) - { - inputDictionary = new Dictionary controllingFunc)>(); - } - - - public new int Level - { - get - { - if (levelAvailable) - { - return _level; - } - _level = 0; - foreach (KeyValuePair item in _inputInterfaces) - { - if (item.Value == null) - { - continue; - } - if (_level <= item.Value.Level) - { - _level = item.Value.Level; - } - } - return _level; - } - } - - public void PrependNode(BlueprintNode node, string portName, Func usingRule) - { - if (node == null) - { - throw new ArgumentNullException(nameof(node)); - } - string indexName = $"{node.Name}.{portName}"; - BlueprintPipeline p = new BlueprintPipeline(this, node); - node.InputInterfaces[portName] = p; - inputDictionary.Add(indexName, (p, usingRule)); - } - - public new void Run() - { - try - { - foreach (KeyValuePair controllingFunc)> item in inputDictionary) - { - item.Value.pipeline.WaitForStart(); - if (item.Value.controllingFunc()) - { - _outputInterfaces.First().Value.CompleteAndWriteData(item.Value.pipeline.Args); - } - } - } - catch (Exception) - { - throw; - } - } - - } } diff --git a/源代码/StgSharpDebug/Logic/Blueprint/SideNode.cs b/源代码/StgSharpDebug/Logic/Blueprint/SideNode.cs index ee87e882..9e580b2c 100644 --- a/源代码/StgSharpDebug/Logic/Blueprint/SideNode.cs +++ b/源代码/StgSharpDebug/Logic/Blueprint/SideNode.cs @@ -1,20 +1,55 @@ -using StgSharp.Logic; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="SideNode.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- + using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; -namespace StgSharp.Logic +namespace StgSharp.BluePrint { internal sealed class BeginningNode : BlueprintNode { - public BeginningNode() : base(name: "BeginningNode", null, - true, ["default"], ["default"] + + private Blueprint _bp; + + public BeginningNode(Blueprint bp) : base(name: "BeginningNode", true, ["default"], ["default"] ) - { } + { + _bp = bp; + } internal (string name, BlueprintPipelineArgs arg)[] InputData { @@ -24,13 +59,19 @@ namespace StgSharp.Logic { return; } - foreach (var parameter in value) + foreach ((string name, BlueprintPipelineArgs arg) parameter in value) { OutputInterfaces[parameter.name].Args = parameter.arg; } } } + public override void Run() + { + _bp.RunningStat.Wait(); + BlueprintPipeline.SkipAll(_outputInterfaces); + } + public new void SetCertainOutputPort(string name, BlueprintPipeline pipeline) { if (_outputInterfaces.ContainsKey(name)) @@ -40,33 +81,30 @@ namespace StgSharp.Logic _outputInterfaces.Add(name, pipeline); } - public new void Run() - { - BlueprintPipeline.SkipAll(_outputInterfaces); - } } internal sealed class EndingNode : BlueprintNode { - public EndingNode() : base(name: "EndingNode", - operation: ( - in Dictionary input, - in Dictionary output - ) => - { - }, - true, ["default"], ["default"] + + private Blueprint _bp; + + public EndingNode(Blueprint bp) : base(name: "EndingNode", true, ["default"], ["default"] ) - { } + { + _bp = bp; + } internal (string name, BlueprintPipelineArgs arg)[] OutputData { - get - { - return InputInterfaces.Select( - key => (key.Key, key.Value.Args)). - ToArray(); - } + get { return InputInterfaces.Select(key => (key.Key, key.Value.Args)).ToArray(); } + } + + public override void Run() + { + BlueprintPipeline.WaitAll(_inputInterfaces); + Interlocked.Exchange(ref _bp.currentGlobalNodeIndex, 0); + Interlocked.Exchange(ref _bp.currentNativeNodeIndex, 0); + _bp.RunningStat.Release(); } public new void SetCertainInputPort(string name, BlueprintPipeline pipeline) @@ -78,9 +116,5 @@ namespace StgSharp.Logic _inputInterfaces.Add(name, pipeline); } - public new void Run() - { - BlueprintPipeline.WaitAll(_inputInterfaces); - } } } \ No newline at end of file diff --git a/源代码/StgSharpDebug/Logic/CancellableTask.cs b/源代码/StgSharpDebug/Logic/CancellableTask.cs new file mode 100644 index 00000000..3810711a --- /dev/null +++ b/源代码/StgSharpDebug/Logic/CancellableTask.cs @@ -0,0 +1,111 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="CancellableTask.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace StgSharp.Threading +{ + internal class CancellableTask + { + + private protected Action _startup; + private protected Task taskInternal; + private CancellationTokenSource cts; + + private protected CancellableTask() + { + cts = new CancellationTokenSource(); + } + + private protected CancellableTask(Action action) + { + taskInternal = new Task(InternalAction); + cts = new CancellationTokenSource(); + } + + public bool IsCompleted + { + get => taskInternal.IsCompleted; + } + + public CancellationTokenSource Cts + { + get => cts; + } + + public int Id + { + get => taskInternal.Id; + } + + public void Cancel() + { + Cts.Cancel(); + } + + public static CancellableTask Run(Action startup) + { + CancellableTask ret = new CancellableTask { _startup = startup }; + ret.taskInternal = Task.Run(ret.InternalAction); + return ret; + } + + public static void WaitAll(IEnumerable tasks) + { + IEnumerable convertedTasks = tasks.Select + (ct => ct.taskInternal); + Task.WaitAll(convertedTasks.ToArray()); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal void InternalAction() + { + //Console.WriteLine($"Task {Task.CurrentId} is running."); + _startup(Cts.Token); + } + + public static implicit operator Task(CancellableTask task) + { + return task.taskInternal; + } + + ~CancellableTask() + { + Cts.Dispose(); + } + + } +} diff --git a/源代码/StgSharpDebug/Logic/Collections/BidirectionalDictionary.cs b/源代码/StgSharpDebug/Logic/Collections/BidirectionalDictionary.cs new file mode 100644 index 00000000..98846ba6 --- /dev/null +++ b/源代码/StgSharpDebug/Logic/Collections/BidirectionalDictionary.cs @@ -0,0 +1,213 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="BidirectionalDictionary.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics.CodeAnalysis; +using System.Linq; + +namespace StgSharp.Collections +{ + public sealed class BidirectionalDictionary : IBidirectionalDictionary + { + + private readonly Dictionary _forward; + private readonly Dictionary _reverse; + + public BidirectionalDictionary() + { + _forward = new Dictionary(); + _reverse = new Dictionary(); + } + + public TFirst this[TSecond key] + { + get + { + if (_reverse.TryGetValue(key,out TFirst value)) + { + return value; + } + throw new ArgumentException($"Cannot find key {key!.ToString()} in dictionary."); + } + set + { + if (_reverse.TryGetValue(key,out TFirst origin)) + { + _reverse[key] = value; + _forward.Remove(origin); + } + else + { + _reverse.Add(key, value); + } + _forward.Add(value, key); + } + } + + public TSecond this[TFirst key] + { + get + { + if (_forward.TryGetValue(key, out TSecond value)) + { + return value; + } + throw new ArgumentException($"Cannot find key {key!.ToString()} in dictionary."); + } + set + { + if (_forward.TryGetValue(key, out TSecond origin)) + { + _forward[key] = value; + _reverse.Remove(origin); + } + else + { + _forward.Add(key, value); + } + _reverse.Add(value, key); + } + } + + public bool IsReadOnly => false; + + public ICollection FirstIndex => _forward.Keys; + + public ICollection SecondIndex => _reverse.Keys; + + public int Count => _forward.Count; + + public IReadOnlyDictionary Forward => new ReadOnlyDictionary(_forward); + + public IReadOnlyDictionary Reverse => new ReadOnlyDictionary(_reverse); + + public void Add( KeyValuePair item ) + { + if (_forward.ContainsKey(item.Key) || _reverse.ContainsKey(item.Value)) + { + throw new ArgumentException("Duplicate key or value."); + } + _forward.Add(item.Key,item.Value); + _reverse.Add(item.Value, item.Key); + } + + public void Add( TFirst key, TSecond value ) + { + if (_forward.ContainsKey(key) || _reverse.ContainsKey(value)) + { + throw new ArgumentException("Duplicate key or value."); + } + _forward.Add(key, value); + _reverse.Add(value, key); + } + + public void Clear() + { + _forward.Clear(); + _reverse.Clear(); + } + + public bool Contains( KeyValuePair item ) + { + return _forward.Contains(item) && _reverse.TryGetValue(item.Value, out TFirst var) && var!.Equals(item.Key) ; + } + + public bool Contains(TSecond key) + { + return _reverse.ContainsKey(key); + } + + public bool Contains(TFirst key) + { + return _forward.ContainsKey(key); + } + + public void CopyTo( KeyValuePair[] array, int arrayIndex ) + { + if (array == null) + { + throw new ArgumentNullException(nameof(array)); + } + if (arrayIndex < 0 || arrayIndex > array.Length) + { + throw new ArgumentOutOfRangeException(nameof(arrayIndex)); + } + if (array.Length - arrayIndex < _forward.Count) + { + throw new ArgumentException("The array is too small to copy the elements."); + } + + foreach (var pair in _forward) + { + array[arrayIndex ++] = pair; + } + } + + public IEnumerator> GetEnumerator() + { + foreach (var pair in _forward) + { + yield return pair; + } + } + + public bool Remove( TFirst key ) { throw new NotImplementedException(); } + + public bool Remove( KeyValuePair item ) + { + if (_forward.Remove(item.Key)) + { + return _reverse.Remove(item.Value); + } + return false; + + } + + public bool TryGetValue( TFirst key, out TSecond value ) + { + return _forward.TryGetValue(key, out value); + } + + public bool TryGetValue(TSecond key, out TFirst value) + { + return _reverse.TryGetValue(key, out value); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + } + +} \ No newline at end of file diff --git a/源代码/StgSharpDebug/Logic/Collections/IBidrirectionalDictionary.cs b/源代码/StgSharpDebug/Logic/Collections/IBidrirectionalDictionary.cs new file mode 100644 index 00000000..418497c0 --- /dev/null +++ b/源代码/StgSharpDebug/Logic/Collections/IBidrirectionalDictionary.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace StgSharp.Collections +{ + public interface IBidirectionalDictionary : + IDictionary + { +#pragma warning disable CA1033 + ICollection IDictionary.Keys => FirstIndex; + ICollection IDictionary.Values => SecondIndex; + bool IDictionary.ContainsKey(TFirst key) => Contains(key); +#pragma warning restore CA1033 + + public IReadOnlyDictionary Forward { get; } + public IReadOnlyDictionary Reverse { get; } + + public ICollection FirstIndex { get;} + + public ICollection SecondIndex { get; } + + public TFirst this[TSecond key] { get;set; } + + /// + /// Determines whether the contains the + /// specified key. + /// + /// The value to locate in the . + /// + /// true if the contains an element with the + /// specified key; otherwise, false. + /// + public bool Contains(TSecond key); + + /// + /// Determines whether the contains the + /// specified key. + /// + /// The value to locate in the . + /// + /// true if the contains an element with the + /// specified key; otherwise, false. + /// + public bool Contains(TFirst key); + + public bool TryGetValue(TSecond key, out TFirst value); + } +} \ No newline at end of file diff --git a/源代码/StgSharpDebug/Logic/Collections/SizeFixedList.cs b/源代码/StgSharpDebug/Logic/Collections/SizeFixedList.cs new file mode 100644 index 00000000..fd53c866 --- /dev/null +++ b/源代码/StgSharpDebug/Logic/Collections/SizeFixedList.cs @@ -0,0 +1,174 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="SizeFixedList.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using System.Text; + +namespace StgSharp.Collections +{ + internal class SizeFixedList : IList + { + + private T[] values; + private int capacity, _index; + + public SizeFixedList(int size) + { + values = new T[size]; + } + + public T this[int index] + { + get => (index < _index) ? values[index] : throw new ArgumentOutOfRangeException(nameof(index)); + set + { + if (index < _index) + { + values[index] = value; + } + else + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + } + } + + public bool IsReadOnly => false; + + public int Count => _index + 1; + + public void Add(T item) + { + if (_index < capacity - 1) + { + _index++; + this[_index] = item; + } + } + + public void Clear() + { + values = new T[capacity]; + _index = 0; + } + + public bool Contains(T item) + { + for (int i = 0; i <= _index; i++) + { + if (item.Equals(values[i])) + { + return true; + } + } + return false; + } + + public void CopyTo(T[] array, int arrayIndex) + { + throw new NotImplementedException(); + } + + public IEnumerator GetEnumerator() + { + for (int i = 0; i <= _index; i++) + { + yield return values[i]; + } + } + + public int IndexOf(T item) + { + for (int i = 0; i <= _index; i++) + { + if (values[i].Equals(item)) + { + return i; + } + } + return -1; + } + + void IList.Insert(int index, T item) + { + throw new NotSupportedException(); + } + + public bool Remove(T item) + { + + for (int i = 0; i <= _index; i++) + { + if (values[i].Equals(item)) + { + values[i] = values[_index]; + _index--; + return true; + } + } + return false; + } + + public void RemoveAll(Predicate predicate) + { + for (int i = _index; i > 0; i--) + { + if (predicate(values[i])) + { + values[i] = values[_index]; + _index--; + } + } + } + + public void RemoveAt(int index) + { + if (index <= _index) + { + values[index] = values[_index]; + _index--; + } + } + + public void Resize(int newSize) + { + Array.Resize(ref values, newSize); + } + + IEnumerator IEnumerable.GetEnumerator() + { + yield return GetEnumerator(); + } + + }//------------------------------------- End of Class ------------------------------------------ +} diff --git a/源代码/StgSharpDebug/Logic/Counter.cs b/源代码/StgSharpDebug/Logic/Counter.cs index eadd526b..a70d5731 100644 --- a/源代码/StgSharpDebug/Logic/Counter.cs +++ b/源代码/StgSharpDebug/Logic/Counter.cs @@ -35,17 +35,21 @@ namespace StgSharp { public class Counter where T : struct, IConvertible, IFormattable, IComparable +#if NET8_OR_GREATER + ,INumber +#endif + { + internal dynamic _value; + internal readonly T _defualtAddValue; internal readonly T _defualtSubValue; internal readonly T _defualtValue; - internal dynamic _value; - public Counter(T defualtValue, T defualtAddValue, T defualtSubValue) { - var type = Type.GetTypeCode(defualtValue.GetType()); + TypeCode type = Type.GetTypeCode(defualtValue.GetType()); switch (type) { case TypeCode.Byte: diff --git a/源代码/StgSharpDebug/Logic/Sensor.cs b/源代码/StgSharpDebug/Logic/Sensor.cs index 1bad6f77..e247f31f 100644 --- a/源代码/StgSharpDebug/Logic/Sensor.cs +++ b/源代码/StgSharpDebug/Logic/Sensor.cs @@ -39,24 +39,24 @@ namespace StgSharp { internal PlainGeometry _boarder; - internal SensorRuleHandler _rule; internal PlainGeometry _target; + internal SensorRuleHandler _rule; public PlainGeometry boarder => _boarder; - public SensorRuleHandler Rule - { - get => _rule; - set => _rule = value; - } - public PlainGeometry target { get => _target; set => _target = value; } + public SensorRuleHandler Rule + { + get => _rule; + set => _rule = value; + } + public static Sensor operator -(Sensor sensor, SensorRuleHandler rule) { sensor._rule -= rule; diff --git a/源代码/StgSharpDebug/Logic/TimeFunction.cs b/源代码/StgSharpDebug/Logic/Timing/TimeFunction.cs similarity index 95% rename from 源代码/StgSharpDebug/Logic/TimeFunction.cs rename to 源代码/StgSharpDebug/Logic/Timing/TimeFunction.cs index f1e9f195..d96fb40d 100644 --- a/源代码/StgSharpDebug/Logic/TimeFunction.cs +++ b/源代码/StgSharpDebug/Logic/Timing/TimeFunction.cs @@ -32,7 +32,7 @@ using System; using System.Collections.Generic; using System.Text; -namespace StgSharp +namespace StgSharp.Timing { public class TimeFunction { @@ -63,17 +63,17 @@ namespace StgSharp get => _timeProvider.CurrentSecond > _ending; } - public static TimeFunction One - { - get => new TimeFunctionOne(); - } - public Func TimeRelatedCalculation { get { return _timeRelatedCalculation; } set { _timeRelatedCalculation = value; } } + public static TimeFunction One + { + get => new TimeFunctionOne(); + } + public TimeSpanProvider TimeSpanProvider { get { return _timeProvider; } @@ -113,6 +113,12 @@ namespace StgSharp _ending = _beginning + range; } + public virtual TimeFunction Reverse() + { + float range = _ending - _beginning; + return new TimeFunction(_timeProvider, p => _timeRelatedCalculation(range - p), range); + } + } @@ -147,7 +153,7 @@ namespace StgSharp public new void Reset() #pragma warning restore CA1822 { - + } } diff --git a/源代码/StgSharpDebug/Logic/TimeSourceProvider.cs b/源代码/StgSharpDebug/Logic/Timing/TimeSourceProvider.cs similarity index 95% rename from 源代码/StgSharpDebug/Logic/TimeSourceProvider.cs rename to 源代码/StgSharpDebug/Logic/Timing/TimeSourceProvider.cs index ac1213fd..a8ba8b56 100644 --- a/源代码/StgSharpDebug/Logic/TimeSourceProvider.cs +++ b/源代码/StgSharpDebug/Logic/Timing/TimeSourceProvider.cs @@ -34,17 +34,17 @@ using System; using System.Linq; using System.Threading; -namespace StgSharp.Logic +namespace StgSharp.Timing { - - public abstract class TimeSourceProviderBase { private SemaphoreSlim _addSubscriberSemaphore = new SemaphoreSlim(1, 1); protected SemaphoreSlim CheckSubscriberSemaphore -=> _addSubscriberSemaphore; + { + get => _addSubscriberSemaphore; + } public void AddSubscriber(TimeSpanProvider subscriber) { @@ -81,6 +81,8 @@ namespace StgSharp.Logic } public abstract void StartProvidingTime(); + public abstract void StopProvidingTime(); + protected abstract void AddSubscriberUnsynced(TimeSpanProvider subscriber); protected abstract void RemoveSubscriberUnsynced(TimeSpanProvider subscriber); diff --git a/源代码/StgSharpDebug/Logic/TimeSpanProvider.cs b/源代码/StgSharpDebug/Logic/Timing/TimeSpanProvider.cs similarity index 93% rename from 源代码/StgSharpDebug/Logic/TimeSpanProvider.cs rename to 源代码/StgSharpDebug/Logic/Timing/TimeSpanProvider.cs index e59d8f19..96e57b9e 100644 --- a/源代码/StgSharpDebug/Logic/TimeSpanProvider.cs +++ b/源代码/StgSharpDebug/Logic/Timing/TimeSpanProvider.cs @@ -28,13 +28,13 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Logic; + using System; using System.Linq; using System.Threading; -namespace StgSharp +namespace StgSharp.Timing { /// @@ -53,7 +53,7 @@ namespace StgSharp private SemaphoreSlim _refreshSemaphore = new SemaphoreSlim(0, 1); private readonly TimeSourceProviderBase _timeSource; - + /// /// Create a new and define the length of time span. Length of a single time span is defined in microseconds. @@ -115,37 +115,6 @@ namespace StgSharp _subscribed = true; } - public int CurrentSpan - { - get => timeSpanCount.Value; - } - - public float CurrentSecond - { - get => timeSpanCount.Value * SpanLengthLowPrecession; - } - - /// - /// Time source provider provided in internal framework. - /// - public static TimeSourceProviderBase DefaultProvider => StgSharpTime.OnlyInstance; - - public Action FrameUpdateMissCallback - { - get => _frameUpdateMissCallback; - set => _frameUpdateMissCallback = value; - } - - public double SpanLength - { - get => (_spanLength * 1.0) / (1000L * 1000L); - } - - public float SpanLengthLowPrecession - { - get => (_spanLength * 1.0f) / (1000 * 1000); - } - /// /// The method this will call every time a new time span started. /// @@ -155,6 +124,31 @@ namespace StgSharp set => _refreshCallback = value; } + public double SpanLength + { + get => (_spanLength * 1.0) / (1000L * 1000L); + } + + public float CurrentSecond + { + get => timeSpanCount.Value * SpanLengthLowPrecession; + } + + public float SpanLengthLowPrecession + { + get => (_spanLength * 1.0f) / (1000 * 1000); + } + + public int CurrentSpan + { + get => timeSpanCount.Value; + } + + /// + /// Time source provider provided in internal framework. + /// + public static TimeSourceProviderBase DefaultProvider => StgSharpTime.OnlyInstance; + public void SubscribeToTimeSource(TimeSourceProviderBase serviceHandler) { if (serviceHandler == null) @@ -169,6 +163,11 @@ namespace StgSharp serviceHandler.AddSubscriber(this); } + public int ToInt32() + { + return timeSpanCount.Value; + } + public void WaitNextSpan() { _refreshSemaphore.Wait(); @@ -176,18 +175,20 @@ namespace StgSharp internal bool CheckTime(long microseconds) { + //Console.Write("1 "); if (microseconds - _spanBegin < _spanLength) { return true; } - + //Console.Write("2 "); _spanBegin = microseconds; timeSpanCount++; - + //Console.Write("3 "); if (_refreshCallback != null) { _refreshCallback(); } + //Console.Write("4 "); if (_refreshSemaphore.CurrentCount == 0) { _refreshSemaphore.Release(); @@ -199,16 +200,18 @@ namespace StgSharp _frameUpdateMissCallback(); } } - if (timeSpanCount > _maxSpanCount) - { - return false; - } - return true; + //Console.Write("5 "); + //Console.WriteLine( $"{timeSpanCount}\n" ); + return timeSpanCount < _maxSpanCount; } public static implicit operator int(TimeSpanProvider provider) { - return provider.timeSpanCount.Value; + if (provider == null) + { + return 0; + } + return provider.ToInt32(); } } diff --git a/源代码/StgSharpDebug/Logic/ViewModel/ShowViewPort.cs b/源代码/StgSharpDebug/Logic/ViewModel/ShowViewPort.cs deleted file mode 100644 index c7bc2c58..00000000 --- a/源代码/StgSharpDebug/Logic/ViewModel/ShowViewPort.cs +++ /dev/null @@ -1,54 +0,0 @@ -using StgSharp.Graphics; - -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; - -namespace StgSharp.Logic -{ - public abstract partial class ViewModelBase - { - public void ShowViewPort() - { - - } - - private Blueprint renderLogic; - - public Blueprint RenderLogic - { - get => renderLogic; - set => renderLogic = value; - } - - /// - /// Init this form and render it on screen, and respond with operation - /// - public unsafe void Show() - { - while(0 == InternalIO.glfwWindowShouldClose(this.context.ViewPortID)) - { - renderLogic.RunRepeatedly(() => ShouldClose); - frameTimeProvider.WaitNextSpan(); - Interlocked.Add(ref _frameCount, 1); - } - } - - public T BuildNewRenderStream(View arg, (int x, int y, int z) unitCubeSize) where T : RenderStream - { - if (arg.ContextName == this.Name) - { - - } - T? ret = Activator.CreateInstance(typeof(T), arg) as T; - if (ret == null) - { - throw new InvalidOperationException("Failed in building a new RenderStream when calling AsMainStreamOf"); - } - ret!.InternalInit(); - ret.timeProvider = this.frameTimeProvider; - return ret; - } - } -} diff --git a/源代码/StgSharpDebug/Logic/ViewModel/ViewManage.cs b/源代码/StgSharpDebug/Logic/ViewModel/ViewManage.cs deleted file mode 100644 index c919b727..00000000 --- a/源代码/StgSharpDebug/Logic/ViewModel/ViewManage.cs +++ /dev/null @@ -1,32 +0,0 @@ -using StgSharp.Graphics; -using StgSharp.Graphics.GL; - -using System; -using System.Collections.Generic; -using System.Text; - -namespace StgSharp.Logic -{ - public partial class ViewModelBase - { - private List allView; - - public View BuildNewView( - ViewPortDesigner designer, (int x, int y, int z) unitCubeSize - ) - { - View ret = new View(this.context, designer,unitCubeSize); - allView.Add(ret); - return ret; - } - - public T BuildRenderStream(View v, (int, int, int) cube) where T : RenderStream - { - T ret = Activator.CreateInstance(typeof(T), v.Port, cube) as T ?? - throw new InvalidOperationException("Cannot build new render stream."); - ret.timeProvider = this.frameTimeProvider; - ret.InternalInit(); - return ret; - } - } -} diff --git a/源代码/StgSharpDebug/Logic/ViewModel/ViewModel.cs b/源代码/StgSharpDebug/Logic/ViewModel/ViewModel.cs deleted file mode 100644 index 9f4c5d19..00000000 --- a/源代码/StgSharpDebug/Logic/ViewModel/ViewModel.cs +++ /dev/null @@ -1,249 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="ViewModel.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Graphics; -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Numerics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading; - -namespace StgSharp.Logic -{ - public abstract partial class ViewModelBase - { - - private int _frameCount; - private int _frameSpeed; - private ViewPort context; - - internal IntPtr monitor; - - internal TimeSpanProvider fpsCountProvider; - internal TimeSpanProvider frameTimeProvider; - internal Vector4 backgroundColor; - - protected ViewModelBase(int frameSpeed) - { - context = new ViewPort(); - allView = new List(); - fpsCountProvider = new TimeSpanProvider(1.0, TimeSpanProvider.DefaultProvider); - _frameSpeed = 0; - _frameCount = 0; - fpsCountProvider.SpanRefreshCallback = - () => - { - Interlocked.Exchange(ref _frameSpeed, _frameCount); - Interlocked.Exchange(ref _frameCount, 0); - }; - long frameLength = (FrameSpeed > 0) ? ((1000L * 1000L) / FrameSpeed) : 0; - frameTimeProvider = new TimeSpanProvider( - frameLength, TimeSpanProvider.DefaultProvider - ); - frameTimeProvider.SpanRefreshCallback = - () => - { - }; - } - - public ViewModelBase(ViewPort vbinding, int framespeed) - { - context = vbinding; - allView = new List(); - fpsCountProvider = new TimeSpanProvider(1.0, TimeSpanProvider.DefaultProvider); - _frameSpeed = 0; - _frameCount = 0; - fpsCountProvider.SpanRefreshCallback = - () => - { - Interlocked.Exchange(ref _frameSpeed, _frameCount); - Interlocked.Exchange(ref _frameCount, 0); - }; - long frameLength = (FrameSpeed > 0) ? ((1000L * 1000L) / FrameSpeed) : 0; - frameTimeProvider = new TimeSpanProvider( - frameLength, TimeSpanProvider.DefaultProvider - ); - frameTimeProvider.SpanRefreshCallback = - () => - { - }; - } - - public int CurrentFrameCount => frameTimeProvider.CurrentSpan; - - public int FrameSpeed => _frameSpeed; - - /// - /// Height of this form, represent in - /// - public int Height - { - get => context.Height; - set { context.Height = value; } - } - - public string Name - { - get => context.Name; - } - - public bool ShouldClose - { - get => InternalIO.glfwWindowShouldClose(context.ViewPortID) != 0; - set => InternalIO.glfwSetWindowShouldClose(context.ViewPortID, value ? 1 : 0); - } - - /// - /// Width of this form, represent in - /// - public vec2d Size - { - get => new vec2d(Width, Height); - set - { - Width = (int)value.X; - Height = (int)value.Y; - if (WindowID != IntPtr.Zero) - { - InternalIO.glfwSetWindowSize(context.ViewPortID, Width, Height); - } - } - } - - /// - /// Width of this form, represent in - /// - public int Width - { - get => context.Width; - set - { - context.Width = value; - if (WindowID != IntPtr.Zero) - { - InternalIO.glfwSetWindowSize(context.ViewPortID, Width, Height); - } - } - } - - public unsafe IntPtr WindowID - { - get => context.ViewPortID; - } - - -#pragma warning disable CA1044 - protected FrameBufferSizeHandler FrameSizeCallback - { - set - { - IntPtr handlerPtr = Marshal.GetFunctionPointerForDelegate(value); - InternalIO.glfwSetFramebufferSizeCallback(context.ViewPortID, handlerPtr); - } - } -#pragma warning restore CA1044 - - - /// - /// Resize the current form - /// - /// - /// A (width,height) representing the new size of current form - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void SetSize(vec2d size) - { - this.Size = size; - InternalIO.glfwSetWindowSize(this.context.ViewPortID, (int)size.X, (int)size.Y); - } - - - /// - /// Set the size limit of current form - /// - /// - /// Minimum size of current form. In form of a of (width,height) - /// - /// - /// Maximum size of current form. In form of a of (width,height) - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void SetSizeLimit(vec2d minSize, vec2d maxSize) - { - InternalIO.glfwSetWindowSizeLimits( - this.context.ViewPortID, - (int)minSize.X, - (int)minSize.Y, - (int)maxSize.X, - (int)maxSize.Y); - } - - /// - /// Set the size limit of current form - /// - /// Minimum width of current form - /// Minimum height of current form - /// Maximum width of current form - /// Maximum height of current form - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void SetSizeLimit(int minWidth, int minHeight, int maxWidth, int maxHeight) - { - //TODO 重做form的尺寸极限控制 - InternalIO.glfwSetWindowSizeLimits(this.context.ViewPortID, minWidth, minHeight, maxWidth, maxHeight); - } - - #region Key Control - - protected KeyStatus CheckKey(KeyboardKey key) - { - return InternalIO.glfwGetKey(this.WindowID, (int)key); - } - - protected KeyStatus CheckKey(Mouse key) - { - return InternalIO.glfwGetKey(this.WindowID, (int)key); - } - - protected KeyStatus CheckKey(Joystick key) - { - return InternalIO.glfwGetKey(this.WindowID, (int)key); - } - - #endregion - - - } - -} diff --git a/源代码/StgSharpDebug/MVVM/OpenGLControllingItemRenderStream.cs b/源代码/StgSharpDebug/MVVM/OpenGLControllingItemRenderStream.cs new file mode 100644 index 00000000..e59ba3e8 --- /dev/null +++ b/源代码/StgSharpDebug/MVVM/OpenGLControllingItemRenderStream.cs @@ -0,0 +1,62 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="OpenGLControllingItemRenderStream.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics.OpenGL; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.MVVM +{ + public class OpenGLControllingItemRenderStream : glRenderStream + { + + public override bool IsContextSharable => true; + + protected override void CustomizeDeinit() + { + throw new NotImplementedException(); + } + + protected override void CustomizeInit() + { + throw new NotImplementedException(); + } + + protected override void Main() + { + throw new NotImplementedException(); + } + + } +} diff --git a/源代码/StgSharp/Graphics/View/View.cs b/源代码/StgSharpDebug/MVVM/View/ViewBase.cs similarity index 78% rename from 源代码/StgSharp/Graphics/View/View.cs rename to 源代码/StgSharpDebug/MVVM/View/ViewBase.cs index 16f4ca7c..87adb3e3 100644 --- a/源代码/StgSharp/Graphics/View/View.cs +++ b/源代码/StgSharpDebug/MVVM/View/ViewBase.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="View.cs" +// file="ViewBase.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,10 +28,10 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- -using StgSharp.Logic; +using StgSharp.Graphics; +using StgSharp.Timing; using StgSharp.Math; - -using StgSharpDebug.Logic; +using StgSharp.MVVM.ViewModel; using System; using System.Collections.Generic; @@ -45,47 +45,31 @@ using System.Security.Cryptography; using System.Text; using System.Threading; -namespace StgSharp.Graphics +namespace StgSharp.MVVM.View { /// - /// View is the base type for all view types, providing context binding and control element binding. + /// ViewBase is the base type for all view types, providing context binding and control element binding. /// A complete view should contain one complete , , and , /// which provide layout descriptions of control elements, user responses, and rendering implementations in the view. /// Data between instances of , , and is shared through . /// - public abstract unsafe partial class View + public abstract unsafe partial class ViewBase { - private delegate bool GetDataBindingEntryDelegate(string name, out DataBindingEntry entry); private (int x, int y, int z) unitCubeSize; - private TimeSpanProvider time; private GetDataBindingEntryDelegate getDataBindingEntry; - private ViewPort context; - private ViewDesigner _design; - private ViewRender _render; - private ViewResponder _responder; + private int usedFrame = 0; + private IViewDesigner _design; + private IViewRender _render; + private IViewResponder _responder; + private TimeSpanProvider time; - public View() - { + private ViewPort context; - } - - public View(ViewPort vp) - { - context = vp; - unitCubeSize = (1, 1, 1); - SelfName = string.Empty; - } - - public View(ViewPort vp, (int, int, int) cubeSize) - { - context = vp; - unitCubeSize = cubeSize; - SelfName = string.Empty; - } + private delegate bool GetDataBindingEntryDelegate(string name, out DataBindingEntry entry); public DataBindingEntry this[string name] { @@ -126,33 +110,40 @@ namespace StgSharp.Graphics public IntPtr ViewHandle => context.ViewPortID; - public string ContextName => context.Name; - - public string SelfName { get; set; } - - public ViewDesigner Designer + public IViewDesigner Designer { get => _design; protected set => _design = value; } + public string ContextName => context.Name; + + public string SelfName { get; set; } + public ViewPort Port { get => context; } - public ViewRender Render + internal TimeSpanProvider TimeProvider { - get => _render; - protected set => _render = value; + get => time; } - public ViewResponder Responder + protected IViewRender Render + { + get => _render; + set => _render = value; + } + + protected IViewResponder Responder { get => _responder; - protected set => _responder = value; + set => _responder = value; } + public abstract void CustomizedInitialize(ViewModelBase viewModelBinding); + /// /// Get the status of a certain key on the keyboard. /// @@ -164,38 +155,39 @@ namespace StgSharp.Graphics return InternalIO.glfwGetKey(context.ViewPortID, (int)key); } - public abstract bool TryGetObjectReference(string name, out DataBindingEntry entry); + public void InternalInitialize(string name, (int, int, int) cubeSize, ViewModelBase viewModelBinding) + { + SelfName = name; + unitCubeSize = cubeSize; + getDataBindingEntry = viewModelBinding.TryGetObjectReference; + context = viewModelBinding.ViewPortBinding; + time = viewModelBinding.frameTimeProvider; - private int usedFrame = 0; + CustomizedInitialize(viewModelBinding); + } + + public abstract bool TryGetObjectReference(string name, out DataBindingEntry entry); public void Use() { if (usedFrame == 0) { - ValidateInitialization(); + if (!ValidateInitialization()) + { + throw new InvalidOperationException("This view is not correctly initialized before rendering."); + } } - } - - internal TimeSpanProvider TimeProvider - { - get => time; + Show(); } public bool ValidateInitialization() { - return _design != null && _render != null && getDataBindingEntry != null && _responder != null; + return (_design != null) && (_render != null) && (getDataBindingEntry != null) && (_responder != null) + && _design.ValidateInitializing() && _responder.ValidateInitializing() && _render.ValidateInitializing() + ; } - internal protected abstract void Show(); - - public void InternalInitialize(ViewModelBase viewModelBinding) - { - getDataBindingEntry = viewModelBinding.TryGetObjectReference; - context = viewModelBinding.ViewPortBinding; - time = viewModelBinding.frameTimeProvider; - } - - public abstract void CustomizedInitialize(ViewModelBase viewModelBinding); + protected internal abstract void Show(); } diff --git a/源代码/StgSharpDebug/MVVM/View/ViewDesigner.cs b/源代码/StgSharpDebug/MVVM/View/ViewDesigner.cs new file mode 100644 index 00000000..6e681253 --- /dev/null +++ b/源代码/StgSharpDebug/MVVM/View/ViewDesigner.cs @@ -0,0 +1,143 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ViewDesigner.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Controlling.UsrActivity; +using StgSharp.Controls; +using StgSharp.Geometries; +using StgSharp.Graphics; + +using StgSharp.Math; + +using System; +using System.Collections.Generic; +using System.Net; +using System.Text; + +namespace StgSharp.MVVM.View +{ + public abstract partial class ViewBase + { + public interface IViewDesigner where TView : ViewBase + { + + abstract void CustomizedInitialize(); + abstract void Initialize(); + + abstract bool ValidateInitializing(); + + } + + /// + /// ViewDesigner provides descriptions of various controls in the view, + /// binds the controls to specific user actions and behaviors, + /// and describes the layout and interactions of each control. + /// + public abstract class ViewDesigner : IViewDesigner where TView : ViewBase + { + + private KeyboardButtonGroup currentButtonGroup; + + private List _controlList; + protected TView _binding; + + public ViewDesigner(TView binding) + { + _binding = binding; + _controlList = new List(); + } + + protected TView Binding + { + get => _binding; + } + + public CharacterLineIndexImage CreateCharacterLine( + int length, char blankFilling, PlainGeometryMesh tittle, IEnumerable<(char, PlainGeometryMesh)> charList + ) + { + CharacterLineIndexImage ret = new CharacterLineIndexImage(length, blankFilling, tittle, charList); + _controlList.Add(ret); + return ret; + } + + public TriggerButton CreateKeyboardButton( + Rectangle bonding, TextureProvider defaultAnimation, bool isEnable + ) + { + TriggerButton ret = new TriggerButton(); + ret.BoundingBox = bonding; + ret.Texture = defaultAnimation; + if (isEnable) + { + ret.IsDisabled = false; + ret.Enable(); + } + else + { + ret.IsDisabled = true; + ret.Disable(); + } + currentButtonGroup.AddButton(ret); + return ret; + } + + public TButtonGroup CreateKeyboardButtonGroup( + ITrigger leftBidning, + ITrigger rightBinding, + ITrigger upBinding, + ITrigger downBinding, + ITrigger confirmBinding + ) + where TButtonGroup : KeyboardButtonGroup, new() + { + TButtonGroup ret = new TButtonGroup(); + _controlList.Add(ret); + currentButtonGroup = ret; + _binding.Responder[leftBidning] = ret.MoveLeft; + _binding.Responder[rightBinding] = ret.MoveRight; + _binding.Responder[upBinding] = ret.MoveUp; + _binding.Responder[downBinding] = ret.MoveDown; + _binding.Responder[confirmBinding] = ret.Confirm; + return ret; + } + + public abstract void CustomizedInitialize(); + + public void Initialize() + { + CustomizedInitialize(); + } + + public abstract bool ValidateInitializing(); + + }//---------------------------------- End of Class ----------------------------------------- + + } +} diff --git a/源代码/StgSharpDebug/MVVM/View/ViewRender.cs b/源代码/StgSharpDebug/MVVM/View/ViewRender.cs new file mode 100644 index 00000000..0e44093b --- /dev/null +++ b/源代码/StgSharpDebug/MVVM/View/ViewRender.cs @@ -0,0 +1,134 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ViewRender.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics; + + +using StgSharp.Math; +using StgSharp.MVVM.ViewModel; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Security.Cryptography; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace StgSharp.MVVM.View +{ + public abstract partial class ViewBase + { + protected interface IViewRender where TView : ViewBase + { + + RenderStream this[string renderName] { get; } + + void CustomizedInitialize(); + + void Initialize(); + + bool ValidateInitializing(); + + } + + protected abstract class ViewRender : IViewRender + where TView : ViewBase + { + + protected ViewRender(TView binding) + { + _binding = binding; + } + + public RenderStream this[string renderName] + { + get => _render.TryGetValue(renderName, out RenderStream stream) ? stream : (null!); + protected set + { + + if (_render.ContainsKey(renderName)) + { + _render[renderName] = value; + } + else + { + _render.Add(renderName, value); + } + } + } + + public TView Binding => _binding; + + protected ViewPort ContextBinding => _binding.context; + + protected ViewDesigner Design => (_binding.Designer as ViewDesigner)!; + + protected Dictionary Render + { + get => _render; + } + + protected ViewResponder Responder => (_binding.Responder as ViewResponder)!; + + public T CreateRenderStream((int x, int y, int z) unitCubeSize) where T : RenderStream, new() + { + T ret = new T(); + ret.Initialize(_binding.context, unitCubeSize, Binding.TimeProvider); + return ret; + } + + public T CreateRenderStream(ViewPort vp, (int x, int y, int z) unitCubeSize) where T : RenderStream, new() + { + T ret = new T(); + ret.Initialize(vp, unitCubeSize, Binding.TimeProvider); + return ret; + } + + public abstract void CustomizedInitialize(); + + public void Initialize() + { + CustomizedInitialize(); + } + + public abstract bool ValidateInitializing(); + +#pragma warning disable CS8618 + private Dictionary _render; + private TView _binding; +#pragma warning restore CS8618 + + + } + } +} diff --git a/源代码/StgSharpDebug/MVVM/View/ViewResponder.cs b/源代码/StgSharpDebug/MVVM/View/ViewResponder.cs new file mode 100644 index 00000000..19c1f0de --- /dev/null +++ b/源代码/StgSharpDebug/MVVM/View/ViewResponder.cs @@ -0,0 +1,129 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ViewResponder.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Controlling.UsrActivity; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.MVVM.View +{ + public partial class ViewBase + { + protected interface IViewResponder where TVIew : ViewBase + { + + Action? this[ITrigger trigger] { get; set; } + + void CustomizedInitialize(Func keyRegister); + + void Initialize(Func keyGetter); + + void ProcessUserInput(); + + bool ValidateInitializing(); + + } + + protected abstract class ViewResponder : IViewResponder where TView : ViewBase + { + + private bool _isInitialized; + private Dictionary keyCallbackIndex; + private Dictionary nameToCallbackMap; + private TView _binding; + + protected ViewResponder(TView binding) + { + keyCallbackIndex = new Dictionary(); + nameToCallbackMap = new Dictionary(); + _binding = binding; + } + + public Action? this[ITrigger trigger] + { + get => keyCallbackIndex.TryGetValue(trigger, out Action callback) ? callback : null; + set + { + if (keyCallbackIndex.TryGetValue(trigger, out Action callback)) + { + callback += value; + } + else + { + keyCallbackIndex.Add(trigger, value ?? throw new ArgumentNullException(nameof(value))); + } + } + } + + protected TView Binding => _binding; + + public abstract void CustomizedInitialize(Func keyRegister); + + public void Initialize(Func keyGetter) + { + if (_isInitialized) + { + return; + } + CustomizedInitialize( + (trigger, name) => + { + if (!nameToCallbackMap.TryGetValue(name, out Action ret)) + { + ret = keyGetter.Invoke(name) ?? + throw new InvalidOperationException($"Cannot find method named {name} in binded view model"); + } + this[trigger] = ret; + return ret; + } + ); + } + + public void ProcessUserInput() + { + foreach (KeyValuePair pair in keyCallbackIndex) + { + if (InternalIO.glfwGetKey(_binding.ViewHandle, pair.Key.TargetKeyOrButtonID) == pair.Key.TriggeredStatus) + { + pair.Value(); + } + } + } + + public abstract bool ValidateInitializing(); + + } + + } +} diff --git a/源代码/StgSharp/Graphics/GL/Buffer/BufferObjectBase.cs b/源代码/StgSharpDebug/MVVM/ViewModel/DataBinding.cs similarity index 56% rename from 源代码/StgSharp/Graphics/GL/Buffer/BufferObjectBase.cs rename to 源代码/StgSharpDebug/MVVM/ViewModel/DataBinding.cs index ecbc4ca4..32b1b56d 100644 --- a/源代码/StgSharp/Graphics/GL/Buffer/BufferObjectBase.cs +++ b/源代码/StgSharpDebug/MVVM/ViewModel/DataBinding.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="BufferObjectBase.cs" +// file="DataBinding.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -30,51 +30,55 @@ //----------------------------------------------------------------------- using System; using System.Collections.Generic; +using System.Data.Common; +using System.Diagnostics.CodeAnalysis; using System.Linq; +using System.Runtime.InteropServices; +using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading.Tasks; -namespace StgSharp.Graphics.GL +namespace StgSharp.MVVM.ViewModel { - /// - /// Interface of all kinds OpenGL buffer objects - /// - public abstract class BufferObjectBase : IDisposable +#nullable enable + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate ref object BindingDataGetter(); + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void BindingDataSetter(ref object value); + + public unsafe struct DataBindingEntry { - protected RenderStream binding; - protected glHandleSet _bufferHandle; - /// - /// Get the only handle to one of the Object instance - /// - /// - /// - public glHandle this[int index] => _bufferHandle[index]; + private IntPtr getterPtr, setterPtr; - /// - /// Bind a buffer instance to OpenGL - /// - /// Index of handle of the object in this instance to be bind - public abstract void Bind(int index); - - public void Dispose() + public DataBindingEntry( + [NotNull] BindingDataGetter gettingCallback, + [NotNull] BindingDataSetter settingCallback) { - Dispose(disposing: true); - GC.SuppressFinalize(this); + getterPtr = Marshal.GetFunctionPointerForDelegate(gettingCallback); + setterPtr = Marshal.GetFunctionPointerForDelegate(settingCallback); } - /// - public override string ToString() + public static DataBindingEntry NullBinding { - return $"This is a {GetType().FullName}, containing {_bufferHandle.length} buffer handles: {_bufferHandle.ToString()}."; + get => new DataBindingEntry(); } - protected abstract void Dispose(bool disposing); - - ~BufferObjectBase() + public bool ExactEqual(DataBindingEntry other) { - Dispose(disposing: false); + return (getterPtr == other.getterPtr) && (setterPtr == other.setterPtr); + } + + public ref object GetValue() + { + return ref ((delegate* unmanaged[Cdecl])getterPtr)(); + } + + public void SetData(ref object value) + { + ((delegate* unmanaged[Cdecl])setterPtr)(ref value); } } + +#nullable restore } diff --git a/源代码/StgSharpDebug/MVVM/ViewModel/ShowViewPort.cs b/源代码/StgSharpDebug/MVVM/ViewModel/ShowViewPort.cs new file mode 100644 index 00000000..a93d4cb7 --- /dev/null +++ b/源代码/StgSharpDebug/MVVM/ViewModel/ShowViewPort.cs @@ -0,0 +1,98 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ShowViewPort.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics; +using StgSharp.MVVM.View; + +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; + +namespace StgSharp.MVVM.ViewModel +{ + public abstract partial class ViewModelBase + { + + private ViewBase _nextView, _currentView; + + protected ViewBase CurrentView + { + get => _currentView; + set => _nextView = value; + } + + /// + /// CustomizeInit this form and render it on screen, and respond with operation + /// + public unsafe void UseViewModel(string viewEntryName) + { + CustomizeInitialize(); + //BuildGlobalKeyControl(); + UseViewInNextFrame(viewEntryName); + while (0 == InternalIO.glfwWindowShouldClose(this.viewPortDisplay.ViewPortID)) + { + ShowFrameOnce(); + } + } + + protected void UseViewInNextFrame(string name) + { + if (!allView.TryGetValue(name, out ViewBase v)) + { + throw new KeyNotFoundException($"{$"Cannot find View named {name} "}{$"in current View Model of {GetType().FullName}"}"); + } + CurrentView = v; + } + + private unsafe void PrivateShow() + { + if (0 == InternalIO.glfwWindowShouldClose(this.viewPortDisplay.ViewPortID)) + { + CurrentView.Use(); + RenderStream.PollEvents(); + } + } + + private void ShowFrameOnce() + { + viewPortDisplay.FlushSize(); + if (_nextView != _currentView) + { + Interlocked.Exchange(ref _currentView, _nextView); + } + CurrentView.Use(); + RenderStream.PollEvents(); + frameTimeProvider.WaitNextSpan(); + Interlocked.Add(ref _frameCount, 1); + } + + } +} diff --git a/源代码/StgSharpDebug/MVVM/ViewModel/ViewManage.cs b/源代码/StgSharpDebug/MVVM/ViewModel/ViewManage.cs new file mode 100644 index 00000000..dc77d997 --- /dev/null +++ b/源代码/StgSharpDebug/MVVM/ViewModel/ViewManage.cs @@ -0,0 +1,58 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="ViewManage.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics; +using StgSharp.Graphics.OpenGL; +using StgSharp.MVVM.View; + +using System; +using System.Collections.Generic; +using System.ComponentModel.Design; +using System.Text; + +namespace StgSharp.MVVM.ViewModel +{ + public partial class ViewModelBase + { + + private Dictionary allView; + + public T CreateAndBindView(string name, (int x, int y, int z) unitCubeSize) + where T : ViewBase, new() + { + T ret = new T(); + ret.SelfName = name; + ret.InternalInitialize(name, unitCubeSize, this); + allView.Add(name, ret); + return ret; + } + + } +} diff --git a/源代码/StgSharp/Logic/ViewModel/ViewModel.cs b/源代码/StgSharpDebug/MVVM/ViewModel/ViewModel.cs similarity index 94% rename from 源代码/StgSharp/Logic/ViewModel/ViewModel.cs rename to 源代码/StgSharpDebug/MVVM/ViewModel/ViewModel.cs index 1cd49aed..6bda32b3 100644 --- a/源代码/StgSharp/Logic/ViewModel/ViewModel.cs +++ b/源代码/StgSharpDebug/MVVM/ViewModel/ViewModel.cs @@ -32,8 +32,9 @@ using StgSharp.Controlling.UsrActivity; using StgSharp.Graphics; using StgSharp.Graphics.OpenGL; using StgSharp.Math; - -using StgSharpDebug.Logic; +using StgSharp.MVVM.View; +using StgSharp.MVVM.ViewModel; +using StgSharp.Timing; using System; using System.Collections.Generic; @@ -45,7 +46,7 @@ using System.Runtime.InteropServices; using System.Text; using System.Threading; -namespace StgSharp.Logic +namespace StgSharp.MVVM.ViewModel { public abstract partial class ViewModelBase { @@ -54,7 +55,7 @@ namespace StgSharp.Logic private int _frameSpeed; private ViewPort viewPortDisplay; - internal IntPtr monitor; + //internal IntPtr monitor; internal TimeSpanProvider fpsCountProvider; internal TimeSpanProvider frameTimeProvider; @@ -62,11 +63,7 @@ namespace StgSharp.Logic protected ViewModelBase(int frameSpeed) { - viewPortDisplay = new ViewPort( - name: "Hello, Stg#!", - size: (800, 600), - monitor: IntPtr.Zero - ); + viewPortDisplay = new ViewPort(); allView = new(); fpsCountProvider = new TimeSpanProvider(1.0, TimeSpanProvider.DefaultProvider); _frameSpeed = 0; @@ -80,16 +77,11 @@ namespace StgSharp.Logic () => { }; - } protected ViewModelBase(float frameLength) { - viewPortDisplay = new ViewPort( - name: "Hello, Stg#!", - size: (800, 600), - monitor: IntPtr.Zero - ); + viewPortDisplay = new ViewPort(); allView = new(); fpsCountProvider = new TimeSpanProvider(1.0, TimeSpanProvider.DefaultProvider); _frameSpeed = 0; @@ -125,7 +117,7 @@ namespace StgSharp.Logic => { InternalIO.glfwMakeContextCurrent(viewPortDisplay.ViewPortID); - GlFunction.CurrentGL.Viewport(0, 0, width, height); + OpenGLFunction.CurrentGL.Viewport(0, 0, width, height); PrivateShow(); }; viewPortDisplay.FramePostionCallback = (handle, xpos, ypos) @@ -156,7 +148,7 @@ namespace StgSharp.Logic => { InternalIO.glfwMakeContextCurrent(viewPortDisplay.ViewPortID); - GlFunction.CurrentGL.Viewport(0, 0, width, height); + OpenGLFunction.CurrentGL.Viewport(0, 0, width, height); PrivateShow(); }; viewPortDisplay.FramePostionCallback = (handle, xpos, ypos) @@ -166,6 +158,18 @@ namespace StgSharp.Logic }; } + public DataBindingEntry this[string name] + { + get + { + if (this.TryGetObjectReference(name, out DataBindingEntry entry)) + { + return entry; + } + throw new KeyNotFoundException(); + } + } + public bool ShouldClose { get => InternalIO.glfwWindowShouldClose(viewPortDisplay.ViewPortID) != 0; @@ -201,11 +205,6 @@ namespace StgSharp.Logic } } - public ViewPort ViewPortBinding - { - get => viewPortDisplay; - } - public unsafe IntPtr WindowID { get => viewPortDisplay.ViewPortID; @@ -233,6 +232,11 @@ namespace StgSharp.Logic } } + public ViewPort ViewPortBinding + { + get => viewPortDisplay; + } + #pragma warning disable CA1044 protected FrameBufferSizeHandler FrameSizeCallback { @@ -245,7 +249,7 @@ namespace StgSharp.Logic #pragma warning restore CA1044 - public abstract bool TryGetObjectReference(string name,out DataBindingEntry entry); + public abstract void CustomizeInitialize(); public Action MethodLookup(string methodName) { @@ -300,6 +304,8 @@ namespace StgSharp.Logic InternalIO.glfwSetWindowSizeLimits(this.viewPortDisplay.ViewPortID, minWidth, minHeight, maxWidth, maxHeight); } + public abstract bool TryGetObjectReference(string name, out DataBindingEntry entry); + private void CountFps() { /**/ @@ -310,20 +316,6 @@ namespace StgSharp.Logic Interlocked.Exchange(ref _frameCount, 0); } - public DataBindingEntry this[string name] - { - get - { - if (this.TryGetObjectReference(name, out DataBindingEntry entry)) - { - return entry; - } - throw new KeyNotFoundException(); - } - } - - public abstract void CustomizeInitialize(); - } } diff --git a/源代码/StgSharp/Graphics/View/ViewPort.cs b/源代码/StgSharpDebug/MVVM/ViewPort.cs similarity index 87% rename from 源代码/StgSharp/Graphics/View/ViewPort.cs rename to 源代码/StgSharpDebug/MVVM/ViewPort.cs index 3751d31d..2cba5319 100644 --- a/源代码/StgSharp/Graphics/View/ViewPort.cs +++ b/源代码/StgSharpDebug/MVVM/ViewPort.cs @@ -28,6 +28,7 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- +using StgSharp.Graphics; using StgSharp.Math; using System; @@ -38,18 +39,19 @@ using System.Runtime.InteropServices; using System.Text; using System.Threading; -namespace StgSharp.Graphics +namespace StgSharp.MVVM { public class ViewPort { - private int _width, _height; + private FrameBufferSizeHandler _sizeHandler; private FramePositionHandler _positionHandler; + private int _width, _height; internal ViewPort() { - _height = 800; - _width = 600; + _height = 600; + _width = 800; Name = new StackFrame(1, false). GetMethod()!.DeclaringType!.Name; Monitor = IntPtr.Zero; @@ -77,51 +79,6 @@ namespace StgSharp.Graphics } } - public unsafe int Height - { - get - { - return _height; - } - set - { - InternalIO.glfwSetWindowSize(this.ViewPortID, _width, value); - } - } - - public unsafe int Width - { - get - { - return _width; - } - set - { - InternalIO.glfwSetWindowSize(this.ViewPortID, value, _height); - } - } - - public IntPtr GraphicHandle { get; internal set; } - - public IntPtr Monitor { get; internal set; } - - public IntPtr ViewPortID { get; private set; } - - public string Name { get; set; } - - public void Close() - { - InternalIO.glfwSetWindowShouldClose(this.ViewPortID,1); - } - - internal unsafe void FlushSize() - { - fixed (int* wptr = &_width, hptr = &_height) - { - InternalIO.glfwGetWindowSize(ViewPortID, wptr, hptr); - } - } - public FrameBufferSizeHandler FrameSizeCallback { set @@ -134,12 +91,46 @@ namespace StgSharp.Graphics public FramePositionHandler FramePostionCallback { - set + set { _positionHandler = value; IntPtr handlerPtr = Marshal.GetFunctionPointerForDelegate(_positionHandler); - InternalIO.glfwSetWindowPosCallback(ViewPortID,handlerPtr); + InternalIO.glfwSetWindowPosCallback(ViewPortID, handlerPtr); } } + + public unsafe int Height + { + get { return _height; } + set { InternalIO.glfwSetWindowSize(ViewPortID, _width, value); } + } + + public unsafe int Width + { + get { return _width; } + set { InternalIO.glfwSetWindowSize(ViewPortID, value, _height); } + } + + public IntPtr GraphicHandle { get; internal set; } + + public IntPtr Monitor { get; internal set; } + + public IntPtr ViewPortID { get; private set; } + + public string Name { get; set; } + + public void Close() + { + InternalIO.glfwSetWindowShouldClose(ViewPortID, 1); + } + + internal unsafe void FlushSize() + { + fixed (int* wptr = &_width, hptr = &_height) + { + InternalIO.glfwGetWindowSize(ViewPortID, wptr, hptr); + } + } + } } diff --git a/源代码/StgSharpDebug/Math/Graphic/Camera.cs b/源代码/StgSharpDebug/Math/Graphic/Camera.cs index 8164bbc7..c4277b90 100644 --- a/源代码/StgSharpDebug/Math/Graphic/Camera.cs +++ b/源代码/StgSharpDebug/Math/Graphic/Camera.cs @@ -29,7 +29,7 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- using StgSharp.Graphics; -using StgSharp.Graphics.GL; +using StgSharp.Graphics.OpenGL; using StgSharp.Graphics.ShaderEdit; using StgSharp.Math; @@ -116,7 +116,7 @@ namespace StgSharp.Graphics { if (uniformName.Length != 1) { - throw new ArgumentException(); + throw new ArgumentException("Camera needs only one uniform.", nameof(uniformName)); } convertedUniform = source.GetUniform(uniformName[0]); } @@ -142,8 +142,8 @@ namespace StgSharp.Graphics public unsafe void SetAllUniforms() { - //Console.WriteLine(Projection * View); - glFunc.SetUniformValue(convertedUniform, Projection * View); + //Console.WriteLine(Projection * ViewBase); + OpenGL.OpenGLFunction.CurrentGL.SetUniformValue(convertedUniform, Projection * View); } public void SetViewDirection(vec3d position, vec3d target, vec3d up) diff --git a/源代码/StgSharpDebug/Math/Linear/IVector.cs b/源代码/StgSharpDebug/Math/Linear/IVector.cs index eb261e86..a97cf3de 100644 --- a/源代码/StgSharpDebug/Math/Linear/IVector.cs +++ b/源代码/StgSharpDebug/Math/Linear/IVector.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="IVector.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/源代码/StgSharpDebug/Math/Linear/Vector.Normalize.cs b/源代码/StgSharpDebug/Math/Linear/Vector.Normalize.cs index 101e51b4..0b5c7599 100644 --- a/源代码/StgSharpDebug/Math/Linear/Vector.Normalize.cs +++ b/源代码/StgSharpDebug/Math/Linear/Vector.Normalize.cs @@ -1,4 +1,34 @@ -using StgSharp.Data; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Vector.Normalize.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Data; using StgSharp.Math; using System; @@ -13,6 +43,15 @@ namespace StgSharp.Math { public static partial class Linear { + + public static vec4d Normalize(vec4d vec) + { + return new vec4d { vec = Vector4.Normalize(vec.vec) }; + } + public static vec3d Normalize(vec3d vec) + { + return new vec3d { vec = Vector4.Normalize(vec.vec) }; + } public static unsafe void Normalize(ref vec4d source, ref vec4d target) { Vector4 s = source.vec; @@ -35,7 +74,7 @@ namespace StgSharp.Math Vector3 t = target.v; s = Vector3.Normalize(s); - Vector3 projection = Vector3.Dot(t, s) / Vector3.Dot(s, s) * s; + Vector3 projection = (Vector3.Dot(t, s) / Vector3.Dot(s, s)) * s; t -= projection; t = Vector3.Normalize(t); @@ -43,13 +82,5 @@ namespace StgSharp.Math target.v = t; } - public static vec4d Normalize(vec4d vec) - { - return new vec4d() { vec = Vector4.Normalize(vec.vec) }; - } - public static vec3d Normalize(vec3d vec) - { - return new vec3d() { vec = Vector4.Normalize(vec.vec) }; - } } } diff --git a/源代码/StgSharpDebug/Math/Linear/vec2d.cs b/源代码/StgSharpDebug/Math/Linear/vec2d.cs index c0842b81..a5aa80c3 100644 --- a/源代码/StgSharpDebug/Math/Linear/vec2d.cs +++ b/源代码/StgSharpDebug/Math/Linear/vec2d.cs @@ -39,7 +39,7 @@ namespace StgSharp.Math /// Vec2Ds in StgSharp are default used as colum vector. /// [StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)] - public struct vec2d:IVector + public struct vec2d : IVector { [FieldOffset(0)] internal unsafe fixed float num[2]; @@ -97,15 +97,15 @@ namespace StgSharp.Math { return new vec2d(vec.v * value); } + public static vec2d operator *(float value, vec2d vec) + { + return new vec2d(vec.v * value); + } public static vec2d operator /(vec2d vec, float value) { return new vec2d(vec.v / value); } - public static vec2d operator *(float value, vec2d vec) - { - return new vec2d(vec.v * value); - } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static vec2d operator +(vec2d left, vec2d right) diff --git a/源代码/StgSharpDebug/Math/Linear/vec3d.cs b/源代码/StgSharpDebug/Math/Linear/vec3d.cs index 0913f400..1e11dd27 100644 --- a/源代码/StgSharpDebug/Math/Linear/vec3d.cs +++ b/源代码/StgSharpDebug/Math/Linear/vec3d.cs @@ -82,6 +82,18 @@ namespace StgSharp.Math v = new Vector3(x, y, z); } + public unsafe vec2d XY + { + get => new vec2d(this.vec); + set + { + fixed (Vector3* vptr = &v) + { + *(Vector2*)vptr = value.v; + } + } + } + public vec3d XYZ { get { return new vec3d(v); } @@ -200,18 +212,6 @@ namespace StgSharp.Math return v; } - public unsafe vec2d XY - { - get => new vec2d(this.vec); - set - { - fixed (Vector3* vptr = &v) - { - *(Vector2*)vptr = value.v; - } - } - } - } public static class Vec3d diff --git a/源代码/StgSharpDebug/Math/Linear/vec4d.cs b/源代码/StgSharpDebug/Math/Linear/vec4d.cs index 256d19e0..b9eb8851 100644 --- a/源代码/StgSharpDebug/Math/Linear/vec4d.cs +++ b/源代码/StgSharpDebug/Math/Linear/vec4d.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="Vec4d.cs" +// file="vec4d.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -28,7 +28,6 @@ // //----------------------------------------------------------------------- //----------------------------------------------------------------------- - using StgSharp.Data; using StgSharp.Math; @@ -85,6 +84,16 @@ namespace StgSharp.Math vec = new Vector4(x, y, z, w); } + public unsafe vec2d XY + { + get => new vec2d(vec); + set + { + X = value.X; + Y = value.Y; + } + } + public unsafe vec3d XYZ { get => new vec3d(vec); @@ -95,14 +104,11 @@ namespace StgSharp.Math W = w; } } - public unsafe vec2d XY + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static vec4d Add(vec4d left, vec4d right) { - get => new vec2d(vec); - set - { - X = value.X; - Y = value.Y; - } + return left + right; } public override bool Equals(object obj) @@ -115,11 +121,23 @@ namespace StgSharp.Math return vec.GetHashCode(); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static vec4d Subtract(vec4d left, vec4d right) + { + return left - right; + } + public override string ToString() { return vec.ToString(); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static vec4d operator -(vec4d left, vec4d right) + { + return new vec4d(left.vec - right.vec); + } + public static bool operator !=(vec4d left, vec4d right) { return !(left == right); @@ -143,12 +161,6 @@ namespace StgSharp.Math return new vec4d(left.vec + right.vec); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static vec4d operator -(vec4d left, vec4d right) - { - return new vec4d(left.vec - right.vec); - } - public static bool operator ==(vec4d left, vec4d right) { return left.vec == right.vec; @@ -164,16 +176,5 @@ namespace StgSharp.Math return vec == other.vec; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static vec4d Subtract(vec4d left, vec4d right) - { - return left - right; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static vec4d Add(vec4d left, vec4d right) - { - return left + right; - } } } \ No newline at end of file diff --git a/源代码/StgSharpDebug/Math/Scalar/Compare.cs b/源代码/StgSharpDebug/Math/Scalar/Compare.cs index 4644403c..09c580fe 100644 --- a/源代码/StgSharpDebug/Math/Scalar/Compare.cs +++ b/源代码/StgSharpDebug/Math/Scalar/Compare.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="Compare.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,10 +38,11 @@ namespace StgSharp.Math { public static partial class Scaler { + public static float MaxOf(params float[] stream) { float ret = stream[0]; - foreach (var num in stream) + foreach (float num in stream) { if (ret < num) { @@ -23,7 +54,7 @@ namespace StgSharp.Math public static float MinOf(params float[] stream) { float ret = stream[0]; - foreach (var num in stream) + foreach (float num in stream) { if (ret > num) { diff --git a/源代码/StgSharpDebug/Math/Scalar/Random.cs b/源代码/StgSharpDebug/Math/Scalar/Random.cs index 5567870d..b0d14251 100644 --- a/源代码/StgSharpDebug/Math/Scalar/Random.cs +++ b/源代码/StgSharpDebug/Math/Scalar/Random.cs @@ -46,6 +46,14 @@ namespace StgSharp.Math private static byte[] randomSeed; + internal static float currentSeed +#if DEBUG + = 0.5f; +#else + = Abs(System.DateTime.UtcNow.GetHashCode()); +#endif + + /// /// returns a random float number between 0 and 1. /// @@ -123,13 +131,5 @@ namespace StgSharp.Math return *(int*)&seedValue; } - internal static float currentSeed -#if DEBUG - = 0.5f; -#else - = Abs(System.DateTime.UtcNow.GetHashCode()); -#endif - - } } diff --git a/源代码/StgSharpDebug/Shader/ControlItemRender.frag b/源代码/StgSharpDebug/Shader/ControlItemRender.frag new file mode 100644 index 00000000..74a2e504 --- /dev/null +++ b/源代码/StgSharpDebug/Shader/ControlItemRender.frag @@ -0,0 +1,12 @@ +#version 430 core + +in vec3 texCoord; + +out vec4 fragColor; + +uniform sampler2D tex; + +void main() +{ + fragColor = texture(tex, texCoord.xy); +} \ No newline at end of file diff --git a/源代码/StgSharpDebug/Shader/ControlItemRender.vert b/源代码/StgSharpDebug/Shader/ControlItemRender.vert new file mode 100644 index 00000000..f3dc2319 --- /dev/null +++ b/源代码/StgSharpDebug/Shader/ControlItemRender.vert @@ -0,0 +1,12 @@ +#version 430 core + +layout(location = 0)in vec3 coord; +layout(location = 1)in vec3 tCoord; + +out vec3 texCoord; + +void main() +{ + gl_Position = vec4(coord.xyz,1.0f); + texCoord = tCoord; +} \ No newline at end of file diff --git a/源代码/StgSharpDebug/Stg/Bullet.cs b/源代码/StgSharpDebug/Stg/Bullet.cs index ea082de0..ba172b17 100644 --- a/源代码/StgSharpDebug/Stg/Bullet.cs +++ b/源代码/StgSharpDebug/Stg/Bullet.cs @@ -38,6 +38,7 @@ namespace StgSharp.Gaming { public abstract class Bullet : IInstancing, IPlainEntity { + protected Bullet ( PlainInstancingBuffer buffer, @@ -54,11 +55,23 @@ namespace StgSharp.Gaming GlobalBuffer = buffer; BufferId = buffer.CreateInstanceID(); ((IInstancing)this).Scale = scale; - ((IInstancing)this).Coord = new vec3d( beginPosition,0); + ((IInstancing)this).Coord = new vec3d(beginPosition, 0); ((IInstancing)this).Rotation = angle; Motion = movement; } + public GeometryMotion Motion + { + get; + set; + } + + public IInstancingBuffer GlobalBuffer + { + get; + set; + } + public int BufferId { get; @@ -71,28 +84,16 @@ namespace StgSharp.Gaming set; } - public IInstancingBuffer GlobalBuffer - { - get; - set; - } - - public GeometryMotion Motion - { - get; - set; - } - - vec3d IInstancing.CenterPositionGlobal - { - get; - set; - } - public bool CollideWith(IPlainEntity entity) { throw new System.NotImplementedException(); } + vec3d IInstancing.CenterPositionGlobal + { + get; + set; + } + } } \ No newline at end of file diff --git a/源代码/StgSharpDebug/Stg/CollisionTexture.cs b/源代码/StgSharpDebug/Stg/CollisionTexture.cs index e16c5c7d..eb9d1529 100644 --- a/源代码/StgSharpDebug/Stg/CollisionTexture.cs +++ b/源代码/StgSharpDebug/Stg/CollisionTexture.cs @@ -31,9 +31,10 @@ using StgSharp.Data; using StgSharp.Geometries; using StgSharp.Graphics; -using StgSharp.Graphics.GL; -using StgSharp.Logic; +using StgSharp.Graphics.OpenGL; + using StgSharp.Math; +using StgSharp.MVVM; using System; using System.Buffers; @@ -45,74 +46,97 @@ using System.Threading.Tasks; namespace StgSharp.Stg { - public class CollisionTextureInput : BlueprintPipelineArgs + public interface IOneDimensionalCollisionTexture2D { -#pragma warning disable CS8618 - public CollisionTextureInput() -#pragma warning restore CS8618 - { - } - - public new List Value - { - get; set; - } + public void Init(Radius angleStride, string name); } - public class OneDimensionalCollisionTexture2D : glRenderStream + public sealed class OneDimensionalCollisionTexture2D_GL : glRenderStream, IOneDimensionalCollisionTexture2D { - private const string inputName = "InstanceBufferList"; - private const string outputName = "CollisionTextureOutput"; - + float[] textureOutput; + ElementBuffer ebo; private FrameBuffer fbo; + RenderBuffer rbo; ShaderProgram generatingShader; + TextureGL t; + VertexArray vao; VertexBuffer vbo; - ElementBuffer ebo; - public OneDimensionalCollisionTexture2D(ViewPort args) : base(args,(1,1,1)) + public OneDimensionalCollisionTexture2D_GL() { - throw new InvalidOperationException( - $"Collision TextureGL unit cannot share context with other render stream or set as mainstream of a form," + - $"and cannot be inited by {typeof(ViewPort).Name} as well." - ); + } -#pragma warning disable CS8618 - public OneDimensionalCollisionTexture2D(Radius angleStride, string name) : -#pragma warning restore CS8618 - base( new ViewPort() + public override bool IsContextSharable => false; + + public void GenerateCollisionTexture(IEnumerable bufferEnumeration) + { + fbo.Bind(0); + GL.ClearColor(0, 0, 0, 1); + GL.Clear(MaskBufferBit.DEPTH | MaskBufferBit.COLOR); + generatingShader.Use(); + vao.Bind(0); + + foreach (IInstancingBuffer item in bufferEnumeration) + { + IGeometry g = item.TypicalShape; + + if (!(g is PlainGeometry)) + { + throw new InvalidOperationException("The current particle buffer contains non-planar geometry,"); + } + + ebo.Bind(0); + ebo.SetValue(0, g.VertexIndices, BufferUsage.StreamDraw); + + vbo.WriteVectorData(0, item.CoordAndRotationSpan, BufferUsage.StreamDraw); + vao.SetVertexAttribute(1, 3, TypeCode.Single, false, 4 * sizeof(float), 0); + vao.SetVertexAttribute(2, 1, TypeCode.Single, false, 4 * sizeof(float), 3 * sizeof(float)); + + vbo.WriteScalerData(2, item.ScalingSpan, BufferUsage.StreamDraw); + vao.SetVertexAttribute(3, 1, TypeCode.Single, false, sizeof(float), 0); + + vbo.WriteVectorData(1, g.VertexStream, BufferUsage.StreamDraw); + vao.SetVertexAttribute(0, 3, TypeCode.Single, false, 4 * sizeof(float), 0); + + GL.DrawElementsInstanced(GeometryType.TRIANGLES, ((uint)g.VertexIndices.Length) / 3, + TypeCode.UInt32, IntPtr.Zero, (uint)item.ScalingSpan.Length); + } + + t.Bind2D(0); + GL.GetTextureImage(Texture2DTarget.Texture2D, 0, ImageChannel.SingleColor, PixelChannelLayout.Float, textureOutput); + VertexArray.BindNull(); + } + + public void Init(Radius angleStride, string name) + { + primeArgs = new ViewPort { Height = 1, Width = (int)((new Radius(Scaler.Pi)) / angleStride), Name = name, - },(1, 1, 1)) - { - InternalInit(); + }; + + _coordStretch = (1, 1, 1); + + PlatformSpecifiedInitialize(); + CustomizeInit(); } - protected override string[] InputPortsName => - [ - inputName, - ]; +#pragma warning disable CS8618 - protected override string[] OutputPortsName => - [ - outputName, - ]; - - - protected override void Deinit() + protected override void CustomizeDeinit() { throw new NotImplementedException(); } - protected override void Init() + protected override void CustomizeInit() { generatingShader = CreateShaderProgram(); @@ -133,84 +157,30 @@ namespace StgSharp.Stg fbo = CreateFrameBuffer(1); - RenderBuffer rbo = CreateRenderBuffer(1); - glFunc.SetRenderBufferStorage( + rbo = CreateRenderBuffer(1); + GL.SetRenderBufferStorage( RenderBufferInternalFormat.Depth24_Stencil8, this.Size); t = CreateTexture(1); t.Bind2D(0); - glFunc.TextureImage2d(Texture2DTarget.Texture2D, 0, (int)ImageChannel.WithAlphaChannel, - (uint)Width, (uint)Height, (int)ImageChannel.WithAlphaChannel, ImageChannelLayout.Byte, glHandle.ZeroHandle); + GL.TextureImage2d(Texture2DTarget.Texture2D, 0, (int)ImageChannel.WithAlphaChannel, + (uint)Width, (uint)Height, (int)ImageChannel.WithAlphaChannel, PixelChannelLayout.Byte, Array.Empty()); - t.Set2dWrapProperty(Wrap.Repeat, Wrap.Repeat); - t.Set2dFilterProperty(Filter.Nearest, Filter.Nearest); + t.Set2dWrapProperty(0, TextureWrap.Repeat, TextureWrap.Repeat); + t.Set2dFilterProperty(0, TextureFilter.Nearest, TextureFilter.Nearest); - glFunc.FrameBufferTexture2d(FrameBufferTarget.All, glAttachment.Color(0), + GL.FrameBufferTexture2d(FrameBufferTarget.All, glAttachment.Color(0), Texture2DTarget.Texture2D, t[0], 0); - glFunc.CombineFrameBufferRenderBuffer(fbo[0], rbo[0]); + GL.CombineFrameBufferRenderBuffer(FrameBufferAttachment.Color, rbo[0]); textureOutput = new float[this.Width]; } - TextureGL t; - float[] textureOutput; - - protected override void Main( - in Dictionary input, - in Dictionary output) + protected override void Main() { - if (input == null) - { - throw new InvalidOperationException($"Unknown operation lead to null ref of {nameof(input)}"); - } - if (input[inputName].Args is not CollisionTextureInput inpipeline || inpipeline.Value == null || inpipeline.Value.Count == 0) - { - throw new InvalidOperationException(); - } - List bufferList = inpipeline.Value; - - fbo.Bind(0); - glFunc.ClearColor(0, 0, 0, 1); - glFunc.Clear(MaskBufferBit.DEPTH|MaskBufferBit.COLOR); - generatingShader.Use(); - vao.Bind(0); - - foreach (IInstancingBuffer item in bufferList) - { - IGeometry g = item.TypicalShape; - - if (!(g is PlainGeometry)) - { - throw new InvalidOperationException("The current particle buffer contains non-planar geometry,"); - } - - ebo.Bind(0); - ebo.SetValue(0,g.VertexIndices,BufferUsage.StreamDraw); - - vbo.WriteVectorData(0,item.CoordAndRotationSpan,BufferUsage.StreamDraw); - VertexArray.SetVertexAttribute(1,3,TypeCode.Single,false, 4 * sizeof(float), 0); - VertexArray.SetVertexAttribute(2,1, TypeCode.Single,false,4*sizeof(float), 3 * sizeof(float)); - - vbo.WriteScalerData(2, item.ScalingSpan, BufferUsage.StreamDraw); - VertexArray.SetVertexAttribute(3, 1, TypeCode.Single, false, sizeof(float), 0); - - vbo.WriteVectorData(1,g.VertexStream,BufferUsage.StreamDraw); - VertexArray.SetVertexAttribute(0,3,TypeCode.Single,false,4*sizeof(float),0); - - glFunc.DrawElementsInstanced(GeometryType.TRIANGLES,(uint)g.VertexIndices.Length / 3, - TypeCode.UInt32,IntPtr.Zero,(uint)item.ScalingSpan.Length); - } - - t.Bind2D(0); - glFunc.GetTextureImage(Texture2DTarget.Texture2D,0,ImageChannel.SingleColor,ImageChannelLayout.Float,ref textureOutput); - VertexArray.BindNull(); - } - - protected override void ProcessInput() - { - throw new NotImplementedException(); + throw new NotSupportedException(); } } diff --git a/源代码/StgSharpDebug/Stg/TimeLine.cs b/源代码/StgSharpDebug/Stg/TimeLine.cs index ed3ce54c..67d49584 100644 --- a/源代码/StgSharpDebug/Stg/TimeLine.cs +++ b/源代码/StgSharpDebug/Stg/TimeLine.cs @@ -1,4 +1,34 @@ -using System; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="TimeLine.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using System; using System.Collections.Generic; using System.Text; diff --git a/源代码/StgSharpDebug/Stg/Touhou/TouhouBuilder.cs b/源代码/StgSharpDebug/Stg/Touhou/TouhouBuilder.cs index 7efd902b..5bcc081a 100644 --- a/源代码/StgSharpDebug/Stg/Touhou/TouhouBuilder.cs +++ b/源代码/StgSharpDebug/Stg/Touhou/TouhouBuilder.cs @@ -1,4 +1,34 @@ -using StgSharp.Graphics; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="TouhouBuilder.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics; using StgSharp.Touhou; using System; @@ -12,7 +42,7 @@ namespace StgSharp.Stg.Touhou /* - public static View BuildTouhouWorld() + public static ViewBase BuildTouhouWorld() { TouhouForm form = new TouhouForm(); diff --git a/源代码/StgSharpDebug/Stg/Touhou/TouhouWindow.cs b/源代码/StgSharpDebug/Stg/Touhou/TouhouWindow.cs index 06b3cc6c..4558c200 100644 --- a/源代码/StgSharpDebug/Stg/Touhou/TouhouWindow.cs +++ b/源代码/StgSharpDebug/Stg/Touhou/TouhouWindow.cs @@ -1,4 +1,36 @@ -using StgSharp.Graphics; +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="TouhouWindow.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.Graphics; +using StgSharp.MVVM; +using StgSharp.MVVM.ViewModel; using System; using System.Collections.Generic; @@ -6,5 +38,14 @@ using System.Text; namespace StgSharp.Touhou { - + public abstract class TouhouWindowMain : ViewModelBase + { + + protected TouhouWindowMain(ViewPort vp) : base(vp, 60) + { + } + + + + } } diff --git a/源代码/StgSharpDebug/Stg/Touhou/View/OpenningView.cs b/源代码/StgSharpDebug/Stg/Touhou/View/OpenningView.cs new file mode 100644 index 00000000..53897cbc --- /dev/null +++ b/源代码/StgSharpDebug/Stg/Touhou/View/OpenningView.cs @@ -0,0 +1,53 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="OpenningView.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +using StgSharp.MVVM.View; +using StgSharp.MVVM.ViewModel; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Stg.Touhou +{ + public abstract class OpenningView : ViewBase + { + + public override void CustomizedInitialize(ViewModelBase viewModelBinding) + { + throw new NotImplementedException(); + } + + } + + +} diff --git a/源代码/StgSharpDebug/StgSharpDebug.csproj b/源代码/StgSharpDebug/StgSharpDebug.csproj index e50d340c..8e591d6c 100644 --- a/源代码/StgSharpDebug/StgSharpDebug.csproj +++ b/源代码/StgSharpDebug/StgSharpDebug.csproj @@ -103,6 +103,7 @@ + all diff --git a/源代码/StgSharpDebug/Test/FBOframe.cs b/源代码/StgSharpDebug/Test/FBOframe.cs deleted file mode 100644 index 3fa3f766..00000000 --- a/源代码/StgSharpDebug/Test/FBOframe.cs +++ /dev/null @@ -1,199 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="FBOframe.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Controls; -using StgSharp.Geometries; -using StgSharp.Graphics; -using StgSharp.Graphics.GL; -using StgSharp.Logic; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace StgSharp -{ - public class fboFrame : glRenderStream - { - - ElementBuffer ebo; - - TriggerButton button; - - Rectangle tex; - - ShaderProgram s; - TextureGL t; - - Uniform texUniform; - VertexArray vao; - VertexBuffer vbo; - - internal TimeSpanProvider spanProvider; - - public fboFrame(ViewPort args, (int,int,int) cube) : base(args,cube) - { - - } - - protected override string[] InputPortsName - => - [ - "TextureInput" - ]; - - protected override string[] OutputPortsName - => - [ - "Output" - ]; - - protected override void Deinit() - { - throw new NotImplementedException(); - } - - protected override void Init() - { - //SetSizeLimit(800, 800, 800, 800); - - vbo = CreateVertexBuffer(2); - vao = CreateVertexArray(1); - ebo = CreateElementBuffer(1); - - Rectangle rec = new Rectangle( - -0.9f, 0.9f, - 0.9f, 0.9f, - 0.9f, -0.9f, - -0.9f, -0.9f - ); - - /* - Rectangle tex = new Rectangle( - -0.8f, 0.8f, 0, - 0.8f, 0.8f, 0, - 0.8f, -0.8f, 0, - -0.8f, -0.8f, 0 - ); - /**/ - - /**/ - tex = new Rectangle( - 0f, 1f, - 1f, 1f, - 1f, 0f, - 0f, 0f - ); - - /**/ - - s = CreateShaderProgram(); - Shader vert = CreateShaderSegment(ShaderType.Vertex, 1); - Shader frag = CreateShaderSegment(ShaderType.Fragment, 1); - - vert.Compile(0, Shader.FromCodeFile("Shader\\fbo.vert")); - frag.Compile(0, Shader.FromCodeFile("Shader\\fbo.frag")); - - vert.AttachTo(0, s); - frag.AttachTo(0, s); - - s.Link(); - - vao.Bind(0); - - ebo.Bind(0); - ebo.SetValue(0, rec.VertexIndices, BufferUsage.StaticDraw); - - vbo.Bind(0); - vbo.WriteVectorData(0, rec.VertexStream, BufferUsage.StaticDraw); - VertexArray.SetVertexAttribute(0, 3, TypeCode.Single, false, 4 * sizeof(float), 0); - - vbo.Bind(1); - vbo.WriteVectorData(1, tex.VertexStream, BufferUsage.StaticDraw); - VertexArray.SetVertexAttribute(1, 3, TypeCode.Single, false, 4 * sizeof(float), 0); - - - t = CreateTexture(1); - t.Bind2D(0); - t.Set2dWrapProperty(Wrap.Repeat, Wrap.Repeat); - t.Set2dFilterProperty(Filter.Nearest, Filter.Nearest); - - TextureGL.Activate(TextureUnit.Unit0); - - texUniform = s.GetUniform("tex"); - glFunc.SetUniformValue(texUniform, 0); - - ViewPortDesigner vpDesigner = new ViewPortDesigner(); - vpDesigner.CreateKeyboardButtonGroup(null,null,null,null,null); - button = vpDesigner.CreateKeyboardButton( - rec,null,false - ); - } - - protected override void Main( - in Dictionary input, - in Dictionary output) - { - TexturePipeline p = input["TextureInput"].Args as TexturePipeline; - Image i = (p ?? throw new Exception("Pipeline has null value")).Value; - - AnimationBuilder animation = new AnimationBuilder( - (float f, out Polygon4 frame) => - { - frame = tex; - return i; - }, TimeFunction.One); - button.Enable(animation); - - - FrameBuffer.BindNull(); - glFunc.ClearColor(0.4f, 0.1f, 0f, 1.0f); - glFunc.Clear(MaskBufferBit.COLOR | MaskBufferBit.DEPTH); - - s.Use(); - - vao.Bind(0); - - foreach (PlainGeometryMesh item in button) - { - t.LoadTexture(0, item.TextureImage); - } - - glFunc.DrawElements(GeometryType.TRIANGLES, 6, TypeCode.UInt32, IntPtr.Zero); - //glFunc.DrawElements(GeometryType.LINES, 6, TypeCode.UInt32, IntPtr.Zero); - BlueprintPipeline.SkipAll(output); - - SwapBuffers(); - } - - } -} diff --git a/源代码/StgSharpDebug/Test/Particle.cs b/源代码/StgSharpDebug/Test/Particle.cs deleted file mode 100644 index 22d89579..00000000 --- a/源代码/StgSharpDebug/Test/Particle.cs +++ /dev/null @@ -1,245 +0,0 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file="Particle.cs" -// Project: StgSharp -// AuthorGroup: Nitload Space -// Copyright (c) Nitload Space. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the “Software”), to deal in the Software without restriction, -// including without limitation the rights to use, copy, modify, merge, -// publish, distribute, sublicense, and/or sell copies of the Software, -// and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and -// this permission notice shall be included in all copies -// or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED “AS IS”, -// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH -// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -using StgSharp.Geometries; -using StgSharp.Graphics; -using StgSharp.Graphics.GL; -using StgSharp.Logic; -using StgSharp.Math; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading.Channels; -using System.Threading.Tasks; - -namespace StgSharp -{ - public class ParticleStream : glRenderStream - { - - ElementBuffer ebo; - - FrameBuffer fbo; - Image i; - PlainInstancingBuffer buffer; - RenderBuffer rbo; - - ShaderProgram s; - - TextureGL t; - VertexArray vao; - VertexBuffer vbo; - - public ParticleStream(ViewPort args, (int, int, int) cube) : base(args, (100, 100, 100)) - { - } - - protected override string[] InputPortsName => ["input_1"]; - - protected override string[] OutputPortsName => ["output_1"]; - - internal static vec3d DefaultRotation(TimeSpanProvider provider, out float rotation) - { - rotation = 0.1f; - float angle = provider.CurrentSpan * 0.1f; - return new vec3d( - 0.01f * Scaler.Cos(angle), - (-0.01f) * Scaler.Sin(angle), - 0 - ); - } - - protected override void Deinit() - { - throw new NotImplementedException(); - } - - protected override void Init() - { - buffer = new PlainInstancingBuffer(); - for (int i = 0; i < 10; i++) - { - float ai = Scaler.Abs(i - 5.0f); - for (int t = 0; t < 10; t++) - { - float at = Scaler.Abs(t - 5.0f); - - ParticleOnPlain p = new ParticleOnPlain(buffer); - ((IInstancing)p).Coord = new vec3d( - (((-5) + i) * 0.2f) + 0.1f, (((-5) + t) * 0.2f) + 0.1f, 0); - ((IInstancing)p).Scale = - Scaler.MinOf(i, t) * 0.15f; - ((IInstancing)p).Motion = new GeometryMotion( - true, this.timeProvider, - DefaultRotation) - ; - } - } - - //SetSizeLimit(800, 800, 800, 800); - - s = CreateShaderProgram(); - Shader pvs = CreateShaderSegment(ShaderType.Vertex, 1); - Shader pfs = CreateShaderSegment(ShaderType.Fragment, 1); - - pvs.Compile(0, Shader.FromCodeFile("Shader\\particle.vert")); - pvs.AttachTo(0, s); - pfs.Compile(0, Shader.FromCodeFile("Shader\\particle.frag")); - pfs.AttachTo(0, s); - s.Link(); - - vbo = CreateVertexBuffer(3); - vao = CreateVertexArray(1); - ebo = CreateElementBuffer(1); - vbo.Bind(0); - - Rectangle rec = new Rectangle - ( - 0.05f, 0.05f, - 0.05f, -0.05f, - -0.05f, -0.05f, - -0.05f, 0.05f - ); - - vao.Bind(0); - vbo.WriteVectorData(0, rec.VertexStream, BufferUsage.StaticDraw); - ebo.SetValue(0, rec.VertexIndices, BufferUsage.StaticDraw); - VertexArray.SetVertexAttribute(0, 3, TypeCode.Single, false, 4 * sizeof(float), 0); - - vbo.WriteVectorData(1, buffer.CoordAndRotationSpan, BufferUsage.StreamDraw); - VertexArray.SetVertexAttribute(1, 3, TypeCode.Single, false, 4 * sizeof(float), 0); - VertexArray.SetVertexAttribute(2, 1, TypeCode.Single, false, 4 * sizeof(float), 3 * sizeof(float)); - - glFunc.VertexAttributeDivisor(1, 1); - glFunc.VertexAttributeDivisor(2, 1); - - vbo.WriteScalerData(2, buffer.ScalingSpan, BufferUsage.StaticDraw); - VertexArray.SetVertexAttribute(3, 1, TypeCode.Single, false, sizeof(float), 0); - - glFunc.VertexAttributeDivisor(3, 1); - - - - vbo.Unbind(); - VertexArray.BindNull(); - - NativeCameraViewTarget - ( - (0, 0, -100), - (0, 0, 0), - (0, 1, 0) - ); - NativeCameraViewRange(new Degree(1.5f), Vec2d.Zero, (50, 50)); - NativeCameraUniform(s, "Camera"); - - s.Use(); - fbo = CreateFrameBuffer(1); - rbo = CreateRenderBuffer(1); - - fbo.Bind(0); - rbo.Bind(0); - glFunc.SetRenderBufferStorage( - RenderBufferInternalFormat.Depth24_Stencil8, this.Size); - - - t = CreateTexture(1); - t.Bind2D(0); - /**/ - glFunc.TextureImage2d(Texture2DTarget.Texture2D, 0, (int)ImageChannel.WithAlphaChannel, - (uint)Width, (uint)Height, (int)ImageChannel.WithAlphaChannel, ImageChannelLayout.Byte, glHandle.ZeroHandle); - /**/ - t.Set2dWrapProperty(Wrap.Repeat, Wrap.Repeat); - t.Set2dFilterProperty(Filter.Nearest, Filter.Nearest); - - - glFunc.FrameBufferTexture2d(FrameBufferTarget.All, glAttachment.Color(0), - Texture2DTarget.Texture2D, t[0], 0); - - glFunc.CombineFrameBufferRenderBuffer(fbo[0], rbo[0]); - - int streamLength = this.Width * this.Height * 4; - byte[] imageStream = new byte[streamLength]; - i = Image.FromMemory(this.Size, 4, imageStream); - } - - protected override void Main( - in Dictionary input, - in Dictionary output) - { - //Console.WriteLine($"{Width} {Height}"); - buffer.UpdateAllParticles(); - - fbo.Bind(0); - vao.Bind(0); - t.Bind2D(0); - /**/ - glFunc.TextureImage2d(Texture2DTarget.Texture2D, 0, (int)ImageChannel.WithAlphaChannel, - (uint)Width, (uint)Height, (int)ImageChannel.WithAlphaChannel, ImageChannelLayout.Byte, glHandle.ZeroHandle); - /**/ - - glFunc.ClearColor(0.6f, 0.1f, 0.3f, 1); - glFunc.Clear(MaskBufferBit.COLOR | MaskBufferBit.DEPTH); - - vbo.Bind(1); - vbo.WriteVectorData(1, buffer.CoordAndRotationSpan, BufferUsage.StreamDraw); - - s.Use(); - NativeCamera.SetAllUniforms(); - - glFunc.DrawElementsInstanced( - GeometryType.TRIANGLES, 6, TypeCode.UInt32, IntPtr.Zero, 100 - ); - glFunc.WaitAccomplishment(); - VertexArray.BindNull(); - - /**/ - - ImageProcessor.Resize(i, this.Width, this.Height, ImageMovement.Discard); - - glFunc.GetTextureImage(Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel, - ImageChannelLayout.Byte, ref i.data); - - //Array.Fill(i.DataStream, 24); - output["output_1"].CompleteAndWriteData(new TexturePipeline(i)); - FrameBuffer.BindNull(); - /**/ - - /* - //BlueprintPipeline.SkipAll(output); - SwapBuffers(); - PollEvents(); - /**/ - } - - } -} diff --git a/源代码/StgSharpDebug/Test/Program.cs b/源代码/StgSharpDebug/Test/Program.cs deleted file mode 100644 index e20bc1aa..00000000 --- a/源代码/StgSharpDebug/Test/Program.cs +++ /dev/null @@ -1,116 +0,0 @@ -//using StgSharp.Environment.Win32; -using StgSharp.Controlling.UsrActivity; -using StgSharp.Geometries; -using StgSharp.Graphics; -using StgSharp.Logic; -using StgSharp.Math; - -using System; -using System.Runtime.CompilerServices; -using System.Xml.XPath; - -namespace StgSharp -{ - public class StgSharpDemoForm : ViewModelBase - { - public StgSharpDemoForm(int frameSpeed) : base(frameSpeed) - { - } - public StgSharpDemoForm(ViewPort vp, int frameSpeed) : base(vp, frameSpeed) - { - } - - protected sealed override void BuildGlobalKeyControl() - { - GlobalKeyAction.Add( - new KeyTrigger(KeyboardKey.ESCAPE,KeyStatus.PRESS), - new Action(() => { - InternalIO.glfwSetWindowShouldClose(this.WindowID, 1); - })); - } - } - - internal static class Program - { - internal static unsafe void Main(string[] args) - { - try - { - //StgSharp.TryCreatWindow(); - - /**/ - StgSharp.Init(); - StgSharp.InitGL(4, 6); - StgSharp.GlobalSetting.VSyncActivated = false; - - ViewPort viewport = new ViewPort( - name: "Hello, Stg#!", - size: (800,800), - monitor: IntPtr.Zero - ); - StgSharpDemoForm demoForm = new StgSharpDemoForm(vp: viewport,60); - - View v = demoForm.BuildNewView(null, (1,1,1)); - - var stream = demoForm.BuildRenderStream - // - // - - (v); - - var rstream = RenderStream.ShareContextWith - (stream); - Blueprint blueprint = new Blueprint(); - - //CrossFrameOperation cross = new CrossFrameOperation(() => Console.Beep(), 60 ); - var cross = new Action([BpNodeAction(60)] () => Console.Beep()).AsBlueprintNodeMainExecution(); - - BlueprintNode node0 = new BlueprintNode("BufferGenerateStream", rstream,true); - BlueprintNode node1 = new BlueprintNode("MainRenderStream",stream,true); - BlueprintNode node2 = new BlueprintNode("Beep", cross,false); - - node0.AddAfter(blueprint.BeginLayer, - "port_1", "input_1"); - node0.AddBefore(node1, - "output_1", "TextureInput"); - - - - /* - node1.AddBefore(blueprint.EndLayer, - "Output", "port2"); - node2.AddAfter(blueprint.BeginLayer, - "port_2", CrossFrameOperation.InputInterfacesName); - /**/ - /**/ - node2.AddAfter(blueprint.BeginLayer, - "input_2", CrossFrameOperation.InputInterfacesName); - /**/ - node2.AddBefore(blueprint.EndLayer, - CrossFrameOperation.OutputInterfacesName, "port_1"); - - blueprint.AddNode(node0,true); - blueprint.AddNode(node1, true); - blueprint.AddNode(node2, false); - blueprint.Init(); - - BlueprintRunner.SetMaxTaskCount(1); - - Console.WriteLine(2); - - demoForm.GeneralRenderLogic = blueprint; - demoForm.Show(); - StgSharp.Terminate(); - /**/ - - } - catch (Exception ex) - { - Console.WriteLine(ex.Message + "\n" + ex.StackTrace); - InternalIO.InternalWriteLog( - ex.Message + "\n" + ex.StackTrace, - LogType.Error); - } - } - } -} \ No newline at end of file diff --git a/源代码/StgSharpDebug/obj/StgSharpDebug.csproj.nuget.dgspec.json b/源代码/StgSharpDebug/obj/StgSharpDebug.csproj.nuget.dgspec.json index cb2a6bff..727d9d9a 100644 --- a/源代码/StgSharpDebug/obj/StgSharpDebug.csproj.nuget.dgspec.json +++ b/源代码/StgSharpDebug/obj/StgSharpDebug.csproj.nuget.dgspec.json @@ -10,14 +10,14 @@ "projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharpDebug\\StgSharpDebug.csproj", "projectName": "StgSharpDebug", "projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharpDebug\\StgSharpDebug.csproj", - "packagesPath": "C:\\Users\\Nitlo\\.nuget\\packages\\", + "packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\", "outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharpDebug\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Nitlo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -50,6 +50,10 @@ "net6.0": { "targetAlias": "net6.0", "dependencies": { + "BidirectionalDict": { + "target": "Package", + "version": "[1.2.0, )" + }, "Microsoft.Windows.CsWin32": { "suppressParent": "All", "target": "Package", @@ -72,7 +76,7 @@ "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.205\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json" } } } diff --git a/源代码/StgSharpDebug/obj/StgSharpDebug.csproj.nuget.g.props b/源代码/StgSharpDebug/obj/StgSharpDebug.csproj.nuget.g.props index d4f32cf7..9bb49262 100644 --- a/源代码/StgSharpDebug/obj/StgSharpDebug.csproj.nuget.g.props +++ b/源代码/StgSharpDebug/obj/StgSharpDebug.csproj.nuget.g.props @@ -5,12 +5,12 @@ NuGet $(MSBuildThisFileDirectory)project.assets.json $(UserProfile)\.nuget\packages\ - C:\Users\Nitlo\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + C:\Users\Youmu\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages PackageReference - 6.9.2 + 6.11.0 - + @@ -20,6 +20,6 @@ - C:\Users\Nitlo\.nuget\packages\microsoft.windows.cswin32\0.3.49-beta + C:\Users\Youmu\.nuget\packages\microsoft.windows.cswin32\0.3.49-beta \ No newline at end of file diff --git a/源代码/StgSharpDebug/obj/project.assets.json b/源代码/StgSharpDebug/obj/project.assets.json index a1037983..cdba4e32 100644 --- a/源代码/StgSharpDebug/obj/project.assets.json +++ b/源代码/StgSharpDebug/obj/project.assets.json @@ -2,6 +2,19 @@ "version": 3, "targets": { "net6.0": { + "BidirectionalDict/1.2.0": { + "type": "package", + "compile": { + "lib/netcoreapp3.1/BidirectionalDict.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netcoreapp3.1/BidirectionalDict.dll": { + "related": ".xml" + } + } + }, "Microsoft.Windows.CsWin32/0.3.49-beta": { "type": "package", "dependencies": { @@ -74,6 +87,24 @@ } }, "libraries": { + "BidirectionalDict/1.2.0": { + "sha512": "hjLTwpPTQBdseFVTVH1vf7Pbaj5ATKIM3DQN8Hup22ixyC14+r1bE4YFjtZmWfcegvJR74zYtatBTwpOHmIMNQ==", + "type": "package", + "path": "bidirectionaldict/1.2.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE", + "bidirectionaldict.1.2.0.nupkg.sha512", + "bidirectionaldict.nuspec", + "lib/net48/BidirectionalDict.dll", + "lib/net48/BidirectionalDict.xml", + "lib/netcoreapp3.1/BidirectionalDict.dll", + "lib/netcoreapp3.1/BidirectionalDict.xml", + "lib/netstandard2.1/BidirectionalDict.dll", + "lib/netstandard2.1/BidirectionalDict.xml" + ] + }, "Microsoft.Windows.CsWin32/0.3.49-beta": { "sha512": "/iAXplVDKESFyLz/MShuVYVx62YFvFePpq3qrzREl8KScQqG6Z2kV7r9UJTjQS1g+hfy3V+e4m1x9lsu24YNSg==", "type": "package", @@ -210,11 +241,12 @@ }, "projectFileDependencyGroups": { "net6.0": [ + "BidirectionalDict >= 1.2.0", "Microsoft.Windows.CsWin32 >= 0.3.49-beta" ] }, "packageFolders": { - "C:\\Users\\Nitlo\\.nuget\\packages\\": {}, + "C:\\Users\\Youmu\\.nuget\\packages\\": {}, "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} }, "project": { @@ -223,14 +255,14 @@ "projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharpDebug\\StgSharpDebug.csproj", "projectName": "StgSharpDebug", "projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharpDebug\\StgSharpDebug.csproj", - "packagesPath": "C:\\Users\\Nitlo\\.nuget\\packages\\", + "packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\", "outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharpDebug\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Nitlo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -263,6 +295,10 @@ "net6.0": { "targetAlias": "net6.0", "dependencies": { + "BidirectionalDict": { + "target": "Package", + "version": "[1.2.0, )" + }, "Microsoft.Windows.CsWin32": { "suppressParent": "All", "target": "Package", @@ -285,7 +321,7 @@ "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.205\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json" } } } diff --git a/源代码/StgSharpDebug/obj/project.nuget.cache b/源代码/StgSharpDebug/obj/project.nuget.cache index 30c04eae..331b9fa8 100644 --- a/源代码/StgSharpDebug/obj/project.nuget.cache +++ b/源代码/StgSharpDebug/obj/project.nuget.cache @@ -1,15 +1,16 @@ { "version": 2, - "dgSpecHash": "9FrwccujQMysIE1gNhytdC81aY+4t5P0bRlhT44Frq6mSp7hWqvElh1aPDvEG8vfHp6rpYnbuArWrHy1JPbb8g==", + "dgSpecHash": "WwCcxcrqPFk=", "success": true, "projectFilePath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharpDebug\\StgSharpDebug.csproj", "expectedPackageFiles": [ - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windows.cswin32\\0.3.49-beta\\microsoft.windows.cswin32.0.3.49-beta.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windows.sdk.win32docs\\0.1.42-alpha\\microsoft.windows.sdk.win32docs.0.1.42-alpha.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windows.sdk.win32metadata\\55.0.45-preview\\microsoft.windows.sdk.win32metadata.55.0.45-preview.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.windows.wdk.win32metadata\\0.9.9-experimental\\microsoft.windows.wdk.win32metadata.0.9.9-experimental.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.memory\\4.5.5\\system.memory.4.5.5.nupkg.sha512", - "C:\\Users\\Nitlo\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\6.0.0\\system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512" + "C:\\Users\\Youmu\\.nuget\\packages\\bidirectionaldict\\1.2.0\\bidirectionaldict.1.2.0.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.windows.cswin32\\0.3.49-beta\\microsoft.windows.cswin32.0.3.49-beta.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.windows.sdk.win32docs\\0.1.42-alpha\\microsoft.windows.sdk.win32docs.0.1.42-alpha.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.windows.sdk.win32metadata\\55.0.45-preview\\microsoft.windows.sdk.win32metadata.55.0.45-preview.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.windows.wdk.win32metadata\\0.9.9-experimental\\microsoft.windows.wdk.win32metadata.0.9.9-experimental.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.memory\\4.5.5\\system.memory.4.5.5.nupkg.sha512", + "C:\\Users\\Youmu\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\6.0.0\\system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512" ], "logs": [] } \ No newline at end of file diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs index ed926950..038bd533 100644 --- a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs +++ b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs @@ -1,3 +1,33 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file=".NETCoreApp,Version=v6.0.AssemblyAttributes.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the ¡°Software¡±), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED ¡°AS IS¡±, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- // using System; using System.Reflection; diff --git a/源代码/StgSharpC.dll.lastcodeanalysissucceeded b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharp.D6C465D7.Up2Date similarity index 100% rename from 源代码/StgSharpC.dll.lastcodeanalysissucceeded rename to 源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharp.D6C465D7.Up2Date diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfo.cs b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfo.cs index 8bbb9f1b..763d0f22 100644 --- a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfo.cs +++ b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfo.cs @@ -1,3 +1,33 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="StgSharpDebug.AssemblyInfo.cs" +// Project: StgSharp +// AuthorGroup: Nitload Space +// Copyright (c) Nitload Space. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the “Software”), to deal in the Software without restriction, +// including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, +// and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and +// this permission notice shall be included in all copies +// or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED “AS IS”, +// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH +// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- //------------------------------------------------------------------------------ // // 此代码由工具生成。 @@ -14,7 +44,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+da75200347e2ff7f483c83ff224678d05b0aefd1")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d082071f2d004b4566bd19a1a030cf06b112c3af")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfoInputs.cache b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfoInputs.cache index 2bf918df..653e7312 100644 --- a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfoInputs.cache +++ b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.AssemblyInfoInputs.cache @@ -1 +1 @@ -f21c4c1ccfd63860c2c75134277b4faedc528ed01118d9d20ba5ed0a9701f7eb +5ad0a74492fd5dc2b098dd42c75a0198fb30f1b94ed00ea2f263bc5c62d53d81 diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.GeneratedMSBuildEditorConfig.editorconfig b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.GeneratedMSBuildEditorConfig.editorconfig index 1e50f4ef..3be2601f 100644 --- a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.GeneratedMSBuildEditorConfig.editorconfig +++ b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.GeneratedMSBuildEditorConfig.editorconfig @@ -1,6 +1,6 @@ is_global = true -build_property.CsWin32InputMetadataPaths = C:\Users\Nitlo\.nuget\packages\microsoft.windows.sdk.win32metadata\55.0.45-preview\Windows.Win32.winmd|C:\Users\Nitlo\.nuget\packages\microsoft.windows.wdk.win32metadata\0.9.9-experimental\Windows.Wdk.winmd -build_property.CsWin32InputDocPaths = C:\Users\Nitlo\.nuget\packages\microsoft.windows.sdk.win32docs\0.1.42-alpha\apidocs.msgpack +build_property.CsWin32InputMetadataPaths = C:\Users\Youmu\.nuget\packages\microsoft.windows.sdk.win32metadata\55.0.45-preview\Windows.Win32.winmd|C:\Users\Youmu\.nuget\packages\microsoft.windows.wdk.win32metadata\0.9.9-experimental\Windows.Wdk.winmd +build_property.CsWin32InputDocPaths = C:\Users\Youmu\.nuget\packages\microsoft.windows.sdk.win32docs\0.1.42-alpha\apidocs.msgpack build_property.TargetFramework = net6.0 build_property.TargetPlatformMinVersion = build_property.UsingMicrosoftNETSdkWeb = diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.assets.cache b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.assets.cache index 90fe8d84..7daa24dc 100644 Binary files a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.assets.cache and b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.assets.cache differ diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.AssemblyReference.cache b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.AssemblyReference.cache new file mode 100644 index 00000000..b5b5ef95 Binary files /dev/null and b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.AssemblyReference.cache differ diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.CoreCompileInputs.cache b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.CoreCompileInputs.cache index e09f32da..4a394c41 100644 --- a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.CoreCompileInputs.cache +++ b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -b028bb001e6a3eaa550ee1bb9783af776f1bb601c648f8bbe4d5912177f7a58e +bcb48722adbdd7afaf3aa3703d28ebb084bd23338e0162c4e8231d5c38b9dcdc diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.FileListAbsolute.txt b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.FileListAbsolute.txt index 8d016a9d..ee592c48 100644 --- a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.FileListAbsolute.txt +++ b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.csproj.FileListAbsolute.txt @@ -30,3 +30,5 @@ D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharp D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.xml D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.pdb D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.genruntimeconfig.cache +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharpDebug.csproj.AssemblyReference.cache +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\obj\x64\Debug\net6.0\StgSharp.D6C465D7.Up2Date diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.dll b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.dll index 6ea9c0f6..e06d6004 100644 Binary files a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.dll and b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.dll differ diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.genruntimeconfig.cache b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.genruntimeconfig.cache index aeb22e5f..49ac4aaf 100644 --- a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.genruntimeconfig.cache +++ b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.genruntimeconfig.cache @@ -1 +1 @@ -ea0ebfd1cd59c5700d207915aa4401613d3e32652ccbcca32e347ba391485f3e +ebddd9bfa545cdaf35f7c9e0bb27f550cdcb46ccc6e8eda2dd73d2fac4f3b71b diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.pdb b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.pdb index 59749b6c..d185fb4f 100644 Binary files a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.pdb and b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.pdb differ diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.sourcelink.json b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.sourcelink.json index 1d144cc4..90ba985a 100644 --- a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.sourcelink.json +++ b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.sourcelink.json @@ -1 +1 @@ -{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/da75200347e2ff7f483c83ff224678d05b0aefd1/*"}} \ No newline at end of file +{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/d082071f2d004b4566bd19a1a030cf06b112c3af/*"}} \ No newline at end of file diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.xml b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.xml index 1ca3ac39..091b5b94 100644 --- a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.xml +++ b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/StgSharpDebug.xml @@ -4,62 +4,49 @@ StgSharpDebug - - - - - - - - Get the status of a certain key on the keyboard. - - - - - - - - Function handler to load an opengl function by searching its name. - - the name of the Opengl function - An intptr value representing the pointer to the function - - + Interface of all kinds OpenGL buffer objects - + Get the only handle to one of the Object instance - + Bind a buffer instance to OpenGL Index of handle of the object in this instance to be bind - + - + + + Function handler to load an opengl function by searching its name. + + the name of the Opengl function + An Intptr value representing the pointer to the function + + A collection of handle to Element Buffer Object in OpenglFunc. Each value indexed from instance of this class this is the only handle to one Element Buffer Object. - + Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. will be set as default target. Index of object to be binded in handle set - + Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. Target of this frame buffer should be set manually. @@ -67,139 +54,140 @@ The frame buffer target of the binding operation. Index of object to be binded in handle set - + + Load an to certain texture. - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - Data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - Data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - A of data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - A of data to write in - How OpenGL use these data, defined by - - - - Set data to current vertex buffer object - - Type of bufferData - Index to find certain VBO in this instance - A array of data to write in - How OpenGL use these data, defined by - - + - + - Load all supported OpenGL APIs and bind them to given context. + Set _data to current vertex buffer object - The used as current OpenGL context + Type of bufferData + Index to find certain VBO in this instance + Data to write in + How OpenGL use these _data, defined by - + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + Data to write in + How OpenGL use these _data, defined by + + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A of _data to write in + How OpenGL use these _data, defined by + + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A of _data to write in + How OpenGL use these _data, defined by + + + + Set _data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A array of _data to write in + How OpenGL use these _data, defined by + + Get the function pointer of given OpenGL api name ContextName of the OpenGL api The funtion pointer of the api in stream of - + + + Load all supported OpenGL APIs and bind them to given . + + The handle to current OpenGL viewPortDisplay + + Bind a frame buffer to a frame buffer target - Same function as glBindFramebuffer. + Same function as glBindFramebuffer. The frame buffer target of the binding operation. The handle of the frame buffer object to bind. - + - Init an OpenGl context if current form has not been binded to any context. and set the context binded to - current form as current OpenGL context. + Initialize an OpenGl viewPortDisplay if current form has not been binded to any viewPortDisplay. + and set the viewPortDisplay binded to current form as current OpenGL viewPortDisplay. - Something goes wrong and StgSharp fails in creating a new OpenGL context. + Something goes wrong and StgSharp fails in creating a new OpenGL viewPortDisplay. - + - Create a set of . + Create a set of . Amount of EBO to be created. - + - Create a sets of + Create a sets of Amount of textures to be created. - + - Create a set of . + Create a set of . Amount of VAO to be created. - + - Create a set of . + Create a set of . Amount of Object to be created. - + - Create an instance of program + Create an instance of program - New instance of instance. + New instance of instance. - + Attach one shader code to a shader program. Shader program to attach Index of shader code in current shader code set. - + - Init a program with no shader attached. + CustomizeInit a program with no shader attached. - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -207,7 +195,7 @@ ContextName of the Uniform in shader code - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -215,7 +203,7 @@ ContextName of the Uniform in shader code - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -223,7 +211,7 @@ ContextName of the Uniform in shader code - + Get a uniform form current shader, the value type of the uniform should be provided. @@ -231,43 +219,19 @@ ContextName of the Uniform in shader code - + - Link the shader to current context. + Link the shader to current viewPortDisplay. - + - Let the current context use this shader. + Let the current viewPortDisplay use this shader. - + - A handle to an OpenGL object, - must be indexed from a . - Direct call will cause - - - - - A handle to an OpenGL object. - - - - - Release all resource in this handle. - This will release all resource in this . - This will be not usable. - - - - - - - - - - + Hash code of time pixels updated last time. @@ -275,12 +239,22 @@ + + + + + + + + + + Set the size limit of current form @@ -290,9 +264,9 @@ Maximum width of current form Maximum height of current form - + - Get (T is ) uniform from a shader. + Get (TView is ) uniform from a shader. This uniform will be used as projection matrix of this camera. Additionally, for multi-shader rendering, each shader requires a uniform, so do not ignore return value of this method. @@ -300,11 +274,11 @@ Shader using this camera ContextName of projection camera named in shader - (T is ) representing + (TView is ) representing projection matrix in shader program. - + Get all uniform related to this . @@ -317,7 +291,7 @@ - Init an instance of OpenGL program, + CustomizeInit an instance of OpenGL program, This method should be called before any other StgSharp api. @@ -423,16 +397,6 @@ Data is actually stored in s in certain RAID mode. - - - A sensor used for checking out if a bullet hit a player or something else - - - - - A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y - - X position of an enenmy entity @@ -443,6 +407,16 @@ Y position of an enemy entity + + + A sensor used for checking out if a bullet hit a player or something else + + + + + A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y + + 当几何体调用了过多的CalcVec方法时,产生UnusedVertexException异常 @@ -474,7 +448,7 @@ Calculate movement to center - Current time tick + CurrentBlueprint time tick @@ -482,13 +456,14 @@ A square - + - Run all nodes repeatedly until it is instructed to terminate. + A sets of complex logic designed for running in multi threads environment. + Warning: do not run a instance in multi threads more than once. + - Instructor to terminate all tasks. Returns if tasks should terminate - + @@ -497,27 +472,87 @@ in current node, the port on the other node cannot get the change. - + - Init this form and render it on screen, and respond with operation + Determines whether the contains the + specified key. + + The value to locate in the . + + true if the contains an element with the + specified key; otherwise, false. + + + + + Determines whether the contains the + specified key. + + The value to locate in the . + + true if the contains an element with the + specified key; otherwise, false. + + + + + A microsecond-accuracy timer. It will refresh every a certain time span. - + + + Create a new and define the length of time span. Length of a single time span is defined in microseconds. + + + + + + + Create a new and define the length of time span. + Length of a single time span is defined in seconds. + + + + + + + Create a new and define the length of time span. Length of a single time span is defined in microseconds. + + + + + + + + The method this will call every time a new time span started. + + + + + Time source provider provided in internal framework. + + + + + CustomizeInit this form and render it on screen, and respond with operation + + + Height of this form, represent in - + Width of this form, represent in - + Width of this form, represent in - + Resize the current form @@ -525,7 +560,7 @@ A (width,height) representing the new size of current form - + Set the size limit of current form @@ -536,7 +571,7 @@ Maximum size of current form. In form of a of (width,height) - + Set the size limit of current form @@ -545,42 +580,26 @@ Maximum width of current form Maximum height of current form - + - A microsecond-accuracy timer. It will refresh every a certain time span. + ViewBase is the base type for all view types, providing context binding and control element binding. + A complete view should contain one complete , , and , + which provide layout descriptions of control elements, user responses, and rendering implementations in the view. + Data between instances of , , and is shared through . - + - Create a new and define the length of time span. Length of a single time span is defined in microseconds. + Get the status of a certain key on the keyboard. - - + + representing if a key is pressed or released. - + - Create a new and define the length of time span. - Length of a single time span is defined in seconds. - - - - - - - Create a new and define the length of time span. Length of a single time span is defined in microseconds. - - - - - - - - Time source provider provided in internal framework. - - - - - The method this will call every time a new time span started. + ViewDesigner provides descriptions of various controls in the view, + binds the controls to specific user actions and behaviors, + and describes the layout and interactions of each control. diff --git a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/apphost.exe b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/apphost.exe index ebad299e..b0ff78a1 100644 Binary files a/源代码/StgSharpDebug/obj/x64/Debug/net6.0/apphost.exe and b/源代码/StgSharpDebug/obj/x64/Debug/net6.0/apphost.exe differ diff --git a/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.AssemblyInfoInputs.cache b/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.AssemblyInfoInputs.cache index 45c3b19f..916935c1 100644 --- a/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.AssemblyInfoInputs.cache +++ b/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.AssemblyInfoInputs.cache @@ -1 +1 @@ -03d6b4d840ec0b238f29c4456a8608246768ed904e84175ffb9ca3815b52e9c9 +56ecec8aa4b256b60d27a3f1480f81eb0bbdcd9b4c33dc08751f620f532c944f diff --git a/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.csproj.CoreCompileInputs.cache b/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.csproj.CoreCompileInputs.cache index 986221f8..7e714981 100644 --- a/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.csproj.CoreCompileInputs.cache +++ b/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -3b11648f2e758de6884e4c5640c84f18d202df7e37d471ca7d1af4683b0300bb +d1e965a7734ffa108e1d40930e6c907b2322b72e90128d6dd368db944568ea07 diff --git a/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.dll b/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.dll index 0d32a729..cf395283 100644 Binary files a/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.dll and b/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.dll differ diff --git a/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.pdb b/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.pdb index b7fc25dd..37eb7a9e 100644 Binary files a/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.pdb and b/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.pdb differ diff --git a/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.xml b/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.xml index a71aa0d0..a83ac609 100644 --- a/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.xml +++ b/源代码/StgSharpDebug/obj/x64/Release/net6.0/StgSharpDebug.xml @@ -4,7 +4,12 @@ StgSharpDebug - + + + + + + Get the status of a certain key on the keyboard. @@ -12,161 +17,9 @@ - - - Function handler to load an opengl function by serching its name. - - the name of the Opengl function - An intptr value representing the pointer to the function - - - - - - - - - OpenGL package binded to current form context. - A OpenGL context is only binded to current form. - - - - - Height of this form, represent in - - - - - Representing - - - - - Width of this form, represent in - - - - - Width of this form, represent in - - - - - Necessary operation to init this form. - - - - - - Behaviour of current form when in a frame cycle. - - - - - - Init an OpenGl context if current form has not been binded to any context. and set the context binded to - current form as current OpenGL context. - - - Something goes wrong and StgSharp fails in creating a new OpenGL context. - - - - - Set all necessary metadata to current form instance - - - - - Resize the current form - - - A (width,height) representing the new size of current form - - - - - Resize the current form - - New width of the window - New height of the window - - - - Set the size limit of current form - - - Minimun size of current form. In form of a of (width,height) - - - Maximum size of current form. In form of a of (width,height) - - - - - Set the size limit of current form - - Minimum width of current form - Minimum height of current form - Maximum width of curent form - Maximum height of current form - - - - Init this form and render it on screen, and respond with operation - - - - - Get OpenGL library of this form's context. - - A package contains all opengl APIs - - - - Define how current form render in one frame. - - - Please define this befor calling any OpenGL api and other graphic methods. - - - - - Create a set of . - - Amount of EBO to be created. - - - - - Create a sets of - - Amount of textures to be crated. - - - - - Create a set of . - - Amount of VAO to be crated. - - - - - Create aset of . - - Amount of Object to be created. - - - - - Create an instance of program - - New instance of instance. - - Interface of all kinds OpenGL buffer onjects + Interface of all kinds OpenGL buffer objects @@ -185,415 +38,264 @@ - + - A collecion of handle to Element Buffer Object in OpenGL. + Function handler to load an opengl function by searching its name. + + the name of the Opengl function + An Intptr value representing the pointer to the function + + + + A collection of handle to Element Buffer Object in OpenglFunc. Each value indexed from instance of this class this is the only handle to one Element Buffer Object. - + + Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. + will be set as default target. - - - + Index of object to be binded in handle set - + + + Bind the frame buffer object with name frame buffer to the frame buffer target specified by target. + Target of this frame buffer should be set manually. + + The frame buffer target of the binding operation. + Index of object to be binded in handle set + + + + Load an to certain texture. + + + + + Set data to current vertex buffer object Type of bufferData Index to find certain VBO in this instance Data to write in - How OpenGL use these data, defined by + How OpenGL use these data, defined by - + Set data to current vertex buffer object Type of bufferData Index to find certain VBO in this instance - A array of data to write in - How OpenGL use these data, defined by + Data to write in + How OpenGL use these data, defined by - + + + Set data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A of data to write in + How OpenGL use these data, defined by + + + + Set data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A of data to write in + How OpenGL use these data, defined by + + + + Set data to current vertex buffer object + + Type of bufferData + Index to find certain VBO in this instance + A array of data to write in + How OpenGL use these data, defined by + + - + - Load all aupportable OpenGL APIs and bind them to given context. + Load all supported OpenGL APIs and bind them to given viewPortDisplay. - The used as current OpenGL context - A delegate to get address of OprnGL api + The used as current OpenGL viewPortDisplay - + Get the function pointer of given OpenGL api name - Name of the OpenGL api - The funtion pointer of the api in form of + ContextName of the OpenGL api + The funtion pointer of the api in stream of - + - A handle to an OpenGL object, - must be indexed from a . - Direct call will cause + Bind a frame buffer to a frame buffer target + Same function as glBindFramebuffer. + + The frame buffer target of the binding operation. + The handle of the frame buffer object to bind. + + + + Init an OpenGl viewPortDisplay if current form has not been binded to any viewPortDisplay. + and set the viewPortDisplay binded to current form as current OpenGL viewPortDisplay. + + + Something goes wrong and StgSharp fails in creating a new OpenGL viewPortDisplay. + + + + + Create a set of . + + Amount of EBO to be created. + + + + + Create a sets of + + Amount of textures to be created. + + + + + Create a set of . + + Amount of VAO to be created. + + + + + Create a set of . + + Amount of Object to be created. + + + + + Create an instance of program + + New instance of instance. + + + + Attach one shader code to a shader program. + + Shader program to attach + Index of shader code in current shader code set. + + + + Init a program with no shader attached. - + - A handle to an OpenGL object. + Get a uniform form current shader, + the value type of the uniform should be provided. + + ContextName of the Uniform in shader code + + + + + Get a uniform form current shader, + the value type of the uniform should be provided. + + ContextName of the Uniform in shader code + + + + + Get a uniform form current shader, + the value type of the uniform should be provided. + + ContextName of the Uniform in shader code + + + + + Get a uniform form current shader, + the value type of the uniform should be provided. + + ContextName of the Uniform in shader code + + + + + Link the shader to current viewPortDisplay. - + - temporarily release the handle of GLhandle sets. - Please call method before indexing. + Let the current viewPortDisplay use this shader. - + - Realse all resource in this handle. - This will release all resource in this . - This will be not usable. - - - - - - - - - - - Inti a shader with no program attached. - + + + + + + + + + + + - Get a uniform form current shader, - the value type of the uniform should be provided. - - Name of the Uniform in shader code - - - - - Get a uniform form current shader, - the value type of the uniform should be provided. - - Name of the Uniform in shader code - - - - - Get a uniform form current shader, - the value type of the uniform should be provided. - - Name of the Uniform in shader code - - - - - Link the shader to current context. - - - - - Let the current context use this shader. - - - - - Same function as OpenGL api glActiveTexture - - type of texture to activate - - - - Operation after alignment by calling . - No calling of this method is acceptable, but it will bring the risk - of that relevant code will not run if it is interrupted by frame overtime. - Please call this method immediately after calling , - too early or sonner may cause . - - The form used as frame update benchmark. - Operation after frame update alignment. - The action binded to a wrong alignment. - - - - Align a sets of code to frame update of a . - Usually, a call of is required. - This method is used as sigle thread method. If more than one - alignment is requested, a will throw. - - The form used as frame update benchmark. - More than one alingment attached to one form timer - - - - Same fucntion as OpenGL api glAttachShader. - Only the first in handle - will be attached to the first in handle. - The rest shader and program will be ignored. - - Shader program to be attachec - A shader part to attach - - - - Bind the indexed buffer object to certain type of buffer - - - - - - - Same function as OpenGL api, glBindTexture. - - Type of texture to bind - Sign of texture - - - - Same function as OpenGL api, glBindVertexArray - - - - - - Clear buffers to preset values - - - - - - Call apiClearColor in OpenGL - specifies the red, green, blue, and alpha values used by apiClear to clear the color buffers. - Values specified by apiClearColor are clamped to the range [0,1] - - Specify the red values used when the color buffers are cleared. - Specify the red values used when the color buffers are cleared. - Specify the red values used when the color buffers are cleared. - Specify the red values used when the color buffers are cleared. - - - - Same function as OpenGL api, glCreateProgram - - A handle representing a single shader program - - - - Same function as OpenGL api, glCreateProgram. - Used for creating multiple shader program. - - A handle representing all shader programs - - - - Creates a form and its associated - - Required width - Required width - Tittle of the window - - - - - - - Same function as OpenGL api, glDeleteBuffer. This method can delete one buffer in one call - - a handle representing the buffer to be deleted - - - - Same function as OpenGL api, glDeleteBuffer. This method can delete a sets of buffers in one call. - - Array of buffers to be deleted - - - - Same function as OpenGL api, glDeleteVertexArrays - - Handle of vertex objects. - - - - - - - - - - - - Same fucntion as the OpenGL api glGenBuffers - - + - Same fucnction as OpenGL api glGenTextures. + Set the size limit of current form - amount of textures to generate + Minimum width of current form + Minimum height of current form + Maximum width of current form + Maximum height of current form - + - Same fucntion as OpenGL api, glGenVertexArray + Get (T is ) uniform from a shader. + This uniform will be used as projection matrix of this camera. + Additionally, for multi-shader rendering, each shader requires a uniform, + so do not ignore return value of this method. - Amount of vao to be generated + Shader using this camera + ContextName of projection camera named in shader + + (T is ) representing + projection matrix in shader program. + - + - Same fucntion as OpenGL api, glGetUniformLocation - - Shader program to find the uniform - Name of the uniform - - - - - Make the OpenGL context of a certain as the activated OpenGL context. - - - - - - Set data value to a float , - all types of parameters are float. - - The target - A packing four parameters of the uniform - - - - Set data value to a float , - all types of parameters are float. - - The target - The value to be set - - - - Set data value to a int , - all types of parameters are int. - - The target - The value to be set - - - - Set data value to a float , - all types of parameters are . - - The target - A value of the uniform - - - - Set data value to a float , - all types of parameters are float. - - The target - The first value to be set - The second value to be set - - - - Set data value to a float , - all types of parameters are float. - - The target - The first value to be set - The second value to be set - The third value to be set - - - - Set data value to a float , - all types of parameters are float. - - The target - The first value to be set - The second value to be set - The third value to be set - The forth value to be set - - - - Set how a shader parameter read data from a VBO. - - Serial number of the parameter - Amount of data each elements contains - Type of data read by shader - - Pixels stride of each sets of data - - - - - Same function as OpenGL api glTexImage2d - - texture target to load image in - level of mipmap, 0 if default - OpenGL's internal color channel format - width of image - height of image - color channels of this image - how this image express each pixel - data array of pixels - - - - Same fucntion as OpenGL api glTexParameteri - - texture target to set parameters - name of parameter - value of parameter - - - - Same fucntion as OpenGL api glUseShader. - - Sign of program to be used - - - - Same function as the OpenGL api, glViewPort - - - - - - - - - A sensor used for cheking out if a bullet hit a player or something else - - - - - A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y - - - - - X position of an enenmy entity - - - - - Y position of an enemy entity + Get all uniform related to this . + Shader program requires this camera. + + ContextName of all related uniforms. + If you fallow form from + + @@ -610,211 +312,11 @@ - Write a log message to log file, and mark the level of this message. + Write a log message to log file, and mark the _level of this message. A string contains information of how current evironment runs. The severity of current message. - - - Part of a circle. All points on a arc has the same distance to their center. - - - - - A collection of all point on the same plain and has the same distance to a point - - - - - The origin of this coordinate. - - - - - The horizontial axis of the coordinate. - Point to the right direction. - - - - - The vertical axis of the coordinate. - Point to the top direction. - - - - - 当几何体调用了过多的CalcVec方法时,产生UnusedVertexException异常 - - - - - Caculate the movement of a point. - - The game tick represent time passed by - A 3d vector representing movement - - - - Move begin side of a line. - It is recommended to override this function rather than - loading an with same function. - - Time passed since current line was created. - - - - Move end side of a line. - It is recommended to override this function rather than - loading an with same function. - - Time passed since current line was created. - - - - - Move the third vertix. this is a useless method for Parallelograms. - - Current time tick - - Geometry overdefined - - - - Move the third vertix. This method is useless for Parallelograms. - - Current time tick - - Geometry overdefined - - - - 平面几何体。包含三角形,对称四边形,自由多边形等。最多可由16个点参数定义。 - - - - - Tick time this geometry eas crested - - - - - Get all sides of this . - - A array contains all straight s of current geometry item. - - - - Get a flat cincide with current geometry. - - - - - - Update the coordinate of the point. If this is a moving point, - (Points on sides or surface if other geometry items) - please do not define any motion here, codes will be ignored by program - - Time passes since the program begin, counted by frames - - - - 计算中心点相对于参考原点的位移 - - 当前游戏刻 - - - - - A square - - - - - A linear data structure with dynamic length. - It contains a of , - each is twice longer than the former one. - - - - - - Init a with a certain amount of elements prepared. - - Amount of elements to be prepared. - - - - Create a new instance of , - and fill the begining ones of elemtns as given instance. - - Amount of beginning elements to be filled - - - - - Length of this - - - - - A pair of value - - - - - A value. - The lower byte is , - and higher byte is . - - - - - The first value. - - - - - The second value. - - - - - A microsecond-accuracy timer. It will refresh every a certain time span. - - - - - Create a new and define the length of time span. Length of a single time span is defined in microseconds. - - - - - - - Create a new and define the length of time span. - Length of a single time span is defined in seconds. - - - - - - - Create a new and define the length of time span. Length of a single time span is defined in microseconds. - - - - - - - Time source provider provided in internal framework. - - - - - The method this will call every time a new time span started. - - OpenGL numeric type. @@ -827,12 +329,20 @@ An IEEE-754 double precision floating-point value, clamped to the range [0,1]. - + A two dimension vector defined by two elements. - Vec2Ds in StgSharp are defaultly usaed as colum vector. + Vec2Ds in StgSharp are default used as colum vector. + + + Orthogonalize two s, let their length be 1 + and perpendicular to each other. + + + + Reurns the value of ArcSin(x) @@ -871,7 +381,7 @@ - + @@ -883,6 +393,184 @@ + + + A class contains a sets of methods to serialize several types + + + + + An independent storage area, used as the only folder type in root folder. + Contains several files reference as virtual disc. + Data is actually stored in s in certain RAID mode. + + + + + A sensor used for checking out if a bullet hit a player or something else + + + + + A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y + + + + + X position of an enenmy entity + + + + + Y position of an enemy entity + + + + + 当几何体调用了过多的CalcVec方法时,产生UnusedVertexException异常 + + + + + The origin of this coordinate. + + + + + The horizontial axis of the coordinate. + Point to the right direction. + + + + + The vertical axis of the coordinate. + Point to the top direction. + + + + + Plain geometry only contains straight sides. + + + + + Calculate movement to center + + CurrentBlueprint time tick + + + + + A square + + + + + A sets of complex logic designed for running in multi threads environment. + Warning: do not run a instance in multi threads more than once. + + + + + + + + + Reset pipeline has risk, this operation is a direct operation to port + in current node, the port on the other node cannot get the change. + + + + + Render logic for every frame with no relation to . + + + + + Init this form and render it on screen, and respond with operation + + + + + Height of this form, represent in + + + + + Width of this form, represent in + + + + + Width of this form, represent in + + + + + Resize the current form + + + A (width,height) representing the new size of current form + + + + + Set the size limit of current form + + + Minimum size of current form. In form of a of (width,height) + + + Maximum size of current form. In form of a of (width,height) + + + + + Set the size limit of current form + + Minimum width of current form + Minimum height of current form + Maximum width of current form + Maximum height of current form + + + + A microsecond-accuracy timer. It will refresh every a certain time span. + + + + + Create a new and define the length of time span. Length of a single time span is defined in microseconds. + + + + + + + Create a new and define the length of time span. + Length of a single time span is defined in seconds. + + + + + + + Create a new and define the length of time span. Length of a single time span is defined in microseconds. + + + + + + + + Time source provider provided in internal framework. + + + + + The method this will call every time a new time span started. + + The COLORREF value is used to specify an RGB color. diff --git a/源代码/StgSharpDebug/obj/x64/Release/net6.0/apphost.exe b/源代码/StgSharpDebug/obj/x64/Release/net6.0/apphost.exe index 7ad1cad7..d2d5a29f 100644 Binary files a/源代码/StgSharpDebug/obj/x64/Release/net6.0/apphost.exe and b/源代码/StgSharpDebug/obj/x64/Release/net6.0/apphost.exe differ diff --git a/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.AssemblyInfo.cs b/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.AssemblyInfo.cs index a06890ec..fdef0d66 100644 --- a/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.AssemblyInfo.cs +++ b/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("StgsharpEnvDebug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+da75200347e2ff7f483c83ff224678d05b0aefd1")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d082071f2d004b4566bd19a1a030cf06b112c3af")] [assembly: System.Reflection.AssemblyProductAttribute("StgsharpEnvDebug")] [assembly: System.Reflection.AssemblyTitleAttribute("StgsharpEnvDebug")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.AssemblyInfoInputs.cache b/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.AssemblyInfoInputs.cache index 793f78ca..d0d56982 100644 --- a/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.AssemblyInfoInputs.cache +++ b/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.AssemblyInfoInputs.cache @@ -1 +1 @@ -b372b53c8d2ed9b53466d99a78c92f27bde5e6dfd76c487cb45dff5fd6851063 +b8641128c70f6c42df5a26890631f32b0b8a396c4e4baf44215c7e6caba42b05 diff --git a/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.assets.cache b/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.assets.cache index 265fc5ea..2c2c15be 100644 Binary files a/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.assets.cache and b/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.assets.cache differ diff --git a/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.csproj.AssemblyReference.cache b/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.csproj.AssemblyReference.cache index eb994780..b932021f 100644 Binary files a/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.csproj.AssemblyReference.cache and b/源代码/StgsharpEnvDebug/obj/Debug/net6.0/StgsharpEnvDebug.csproj.AssemblyReference.cache differ diff --git a/源代码/StgsharpEnvDebug/obj/Release/net6.0/StgsharpEnvDebug.AssemblyInfoInputs.cache b/源代码/StgsharpEnvDebug/obj/Release/net6.0/StgsharpEnvDebug.AssemblyInfoInputs.cache index 9fc1beae..fe3b54e6 100644 --- a/源代码/StgsharpEnvDebug/obj/Release/net6.0/StgsharpEnvDebug.AssemblyInfoInputs.cache +++ b/源代码/StgsharpEnvDebug/obj/Release/net6.0/StgsharpEnvDebug.AssemblyInfoInputs.cache @@ -1 +1 @@ -4fc0349ba444277f9a08e4e0cfb6a3d490f153c6aba7f8f72dc8a8082d1988f6 +9b4f4cd2f325c6e4db0e9634c2a00a4140e56b0c81893c09312524243a7d6366 diff --git a/源代码/StgsharpEnvDebug/obj/Release/net6.0/StgsharpEnvDebug.csproj.AssemblyReference.cache b/源代码/StgsharpEnvDebug/obj/Release/net6.0/StgsharpEnvDebug.csproj.AssemblyReference.cache index bd2a86c7..e6ad81d6 100644 Binary files a/源代码/StgsharpEnvDebug/obj/Release/net6.0/StgsharpEnvDebug.csproj.AssemblyReference.cache and b/源代码/StgsharpEnvDebug/obj/Release/net6.0/StgsharpEnvDebug.csproj.AssemblyReference.cache differ diff --git a/源代码/StgsharpEnvDebug/obj/StgsharpEnvDebug.csproj.nuget.dgspec.json b/源代码/StgsharpEnvDebug/obj/StgsharpEnvDebug.csproj.nuget.dgspec.json index f96ba25f..44a22f7b 100644 --- a/源代码/StgsharpEnvDebug/obj/StgsharpEnvDebug.csproj.nuget.dgspec.json +++ b/源代码/StgsharpEnvDebug/obj/StgsharpEnvDebug.csproj.nuget.dgspec.json @@ -10,14 +10,14 @@ "projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgsharpEnvDebug\\StgsharpEnvDebug.csproj", "projectName": "StgsharpEnvDebug", "projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgsharpEnvDebug\\StgsharpEnvDebug.csproj", - "packagesPath": "C:\\Users\\Nitlo\\.nuget\\packages\\", + "packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\", "outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgsharpEnvDebug\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Nitlo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -69,7 +69,7 @@ "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.205\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json" } } }, @@ -79,14 +79,14 @@ "projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\StgSharp.csproj", "projectName": "StgSharp", "projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\StgSharp.csproj", - "packagesPath": "C:\\Users\\Nitlo\\.nuget\\packages\\", + "packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\", "outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgSharp\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Nitlo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -145,7 +145,7 @@ "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.205\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json" } } } diff --git a/源代码/StgsharpEnvDebug/obj/StgsharpEnvDebug.csproj.nuget.g.props b/源代码/StgsharpEnvDebug/obj/StgsharpEnvDebug.csproj.nuget.g.props index 94271f7e..7226a4fb 100644 --- a/源代码/StgsharpEnvDebug/obj/StgsharpEnvDebug.csproj.nuget.g.props +++ b/源代码/StgsharpEnvDebug/obj/StgsharpEnvDebug.csproj.nuget.g.props @@ -5,12 +5,12 @@ NuGet $(MSBuildThisFileDirectory)project.assets.json $(UserProfile)\.nuget\packages\ - C:\Users\Nitlo\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + C:\Users\Youmu\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages PackageReference - 6.9.2 + 6.11.0 - + \ No newline at end of file diff --git a/源代码/StgsharpEnvDebug/obj/project.assets.json b/源代码/StgsharpEnvDebug/obj/project.assets.json index 87327d52..ebe836fe 100644 --- a/源代码/StgsharpEnvDebug/obj/project.assets.json +++ b/源代码/StgsharpEnvDebug/obj/project.assets.json @@ -108,7 +108,7 @@ ] }, "packageFolders": { - "C:\\Users\\Nitlo\\.nuget\\packages\\": {}, + "C:\\Users\\Youmu\\.nuget\\packages\\": {}, "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} }, "project": { @@ -117,14 +117,14 @@ "projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgsharpEnvDebug\\StgsharpEnvDebug.csproj", "projectName": "StgsharpEnvDebug", "projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgsharpEnvDebug\\StgsharpEnvDebug.csproj", - "packagesPath": "C:\\Users\\Nitlo\\.nuget\\packages\\", + "packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\", "outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgsharpEnvDebug\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" ], "configFilePaths": [ - "C:\\Users\\Nitlo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], @@ -176,7 +176,7 @@ "privateAssets": "all" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.205\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json" } } } diff --git a/源代码/StgsharpEnvDebug/obj/project.nuget.cache b/源代码/StgsharpEnvDebug/obj/project.nuget.cache index e5c586e6..acf18e76 100644 --- a/源代码/StgsharpEnvDebug/obj/project.nuget.cache +++ b/源代码/StgsharpEnvDebug/obj/project.nuget.cache @@ -1,10 +1,10 @@ { "version": 2, - "dgSpecHash": "w06sTHTi7vpH9QczpWZsp6zqu8RM3caQjBZNwmIWqsEwJi/vuYYJviXuJHwkUp+NAbMCNId4km0VBU+EIyQ+kw==", + "dgSpecHash": "tHv+gfLgFuo=", "success": true, "projectFilePath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\源代码\\StgsharpEnvDebug\\StgsharpEnvDebug.csproj", "expectedPackageFiles": [ - "C:\\Users\\Nitlo\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512" + "C:\\Users\\Youmu\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512" ], "logs": [] } \ No newline at end of file diff --git a/组织工作/第一次概念宣传/00003-3299464950.png b/组织工作/第一次概念宣传/00003-3299464950.png new file mode 100644 index 00000000..3c78e1d5 Binary files /dev/null and b/组织工作/第一次概念宣传/00003-3299464950.png differ diff --git a/组织工作/第一次概念宣传/BOSS效果.psd b/组织工作/第一次概念宣传/BOSS效果.psd new file mode 100644 index 00000000..4193aa0c Binary files /dev/null and b/组织工作/第一次概念宣传/BOSS效果.psd differ diff --git a/组织工作/第一次概念宣传/Designer.png b/组织工作/第一次概念宣传/Designer.png new file mode 100644 index 00000000..b5c543f1 Binary files /dev/null and b/组织工作/第一次概念宣传/Designer.png differ diff --git a/组织工作/第一次概念宣传/Designer1.png b/组织工作/第一次概念宣传/Designer1.png new file mode 100644 index 00000000..b79183e0 Binary files /dev/null and b/组织工作/第一次概念宣传/Designer1.png differ diff --git a/组织工作/第一次概念宣传/Designer3.png b/组织工作/第一次概念宣传/Designer3.png new file mode 100644 index 00000000..d8b1267d Binary files /dev/null and b/组织工作/第一次概念宣传/Designer3.png differ diff --git a/组织工作/第一次概念宣传/PV1.mkv b/组织工作/第一次概念宣传/PV1.mkv new file mode 100644 index 00000000..925642df Binary files /dev/null and b/组织工作/第一次概念宣传/PV1.mkv differ diff --git a/组织工作/第一次概念宣传/ProjectStaff_SampleOne.wav b/组织工作/第一次概念宣传/ProjectStaff_SampleOne.wav new file mode 100644 index 00000000..c7930894 Binary files /dev/null and b/组织工作/第一次概念宣传/ProjectStaff_SampleOne.wav differ diff --git a/组织工作/第一次概念宣传/效果图.png b/组织工作/第一次概念宣传/效果图.png new file mode 100644 index 00000000..3c2d303e Binary files /dev/null and b/组织工作/第一次概念宣传/效果图.png differ diff --git a/组织工作/第一次概念宣传/未标题-2.png b/组织工作/第一次概念宣传/未标题-2.png new file mode 100644 index 00000000..2f59bd66 Binary files /dev/null and b/组织工作/第一次概念宣传/未标题-2.png differ diff --git a/组织工作/第一次概念宣传/概念海报Ver1.png b/组织工作/第一次概念宣传/概念海报Ver1.png new file mode 100644 index 00000000..e7276413 Binary files /dev/null and b/组织工作/第一次概念宣传/概念海报Ver1.png differ diff --git a/组织工作/第一次概念宣传/概念海报Ver1.psd b/组织工作/第一次概念宣传/概念海报Ver1.psd new file mode 100644 index 00000000..42eb1d86 Binary files /dev/null and b/组织工作/第一次概念宣传/概念海报Ver1.psd differ diff --git a/组织工作/第一次概念宣传/秘闻章PV1.aep b/组织工作/第一次概念宣传/秘闻章PV1.aep new file mode 100644 index 00000000..efede51d Binary files /dev/null and b/组织工作/第一次概念宣传/秘闻章PV1.aep differ