Fix std/png for depth-16 grayscale interlaced

This commit is contained in:
Nigel Tao committed 2021-11-20 22:54:21 +11:00
1 parent f5d6ce3797
commit f5c68a13cb
3 files changed
+16 -5

No files matched your search

+8 -2
View File
@@ -441,8 +441,14 @@ pri func decoder.assign_filter_distance!() {
this.src_pixfmt = base.PIXEL_FORMAT__Y
this.filter_distance = 1
} else if this.depth == 16 {
this.dst_pixfmt = base.PIXEL_FORMAT__Y_16LE
this.src_pixfmt = base.PIXEL_FORMAT__Y_16BE
if this.interlace_pass == 0 {
this.dst_pixfmt = base.PIXEL_FORMAT__Y_16LE
this.src_pixfmt = base.PIXEL_FORMAT__Y_16BE
} else {
// Interlaced means choosing filter_and_swizzle_tricky.
this.dst_pixfmt = base.PIXEL_FORMAT__BGRA_NONPREMUL_4X16LE
this.src_pixfmt = base.PIXEL_FORMAT__BGRA_NONPREMUL_4X16LE
}
this.filter_distance = 2
}